diff options
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/page-ext.el | 5 | ||||
-rw-r--r-- | lisp/textmodes/picture.el | 3 | ||||
-rw-r--r-- | lisp/textmodes/table.el | 5 | ||||
-rw-r--r-- | lisp/textmodes/texnfo-upd.el | 27 |
4 files changed, 15 insertions, 25 deletions
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 05065cd4427..548223e4f2c 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -671,7 +671,7 @@ Used by `pages-directory' function." (setq position (make-marker)) (set-marker position (point)) (let ((start (point)) - (end (save-excursion (end-of-line) (point))) + (end (line-end-position)) inserted-at) ;; change to directory buffer (set-buffer standard-output) @@ -783,7 +783,7 @@ directory." (delete-other-windows)) (save-excursion (goto-char (point-min)) - (delete-region (point) (save-excursion (end-of-line) (point))) + (delete-region (point) (line-end-position)) (insert "=== Address List Directory: use `C-c C-c' to go to page under cursor. ===") (set-buffer-modified-p nil) @@ -801,5 +801,4 @@ to the same line in the pages buffer." (provide 'page-ext) -;; arch-tag: 2f311550-c6e0-4458-9c12-7f039c058bdb ;;; page-ext.el ends here diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 89e1020db98..961be29cc86 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -438,7 +438,7 @@ If no such character is found, move to beginning of line." (move-to-column target)) (if (re-search-forward (concat "[ \t]+[" (regexp-quote picture-tab-chars) "]") - (save-excursion (end-of-line) (point)) + (line-end-position) 'move) (setq target (1- (current-column))) (setq target nil))) @@ -775,5 +775,4 @@ Runs `picture-mode-exit-hook' at the end." (provide 'picture) -;; arch-tag: e452d08d-a470-4fbf-896e-ea276698d1ca ;;; picture.el ends here diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 136c5dc466c..eb2d4849a32 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -5057,7 +5057,7 @@ Focus only on the corner pattern. Further cell validity check is required." (intersection-str (regexp-quote (char-to-string table-cell-intersection-char))) (v-border (format "[%c%c]" table-cell-vertical-char table-cell-intersection-char)) (h-border (format "[%s%c]" table-cell-horizontal-chars table-cell-intersection-char)) - (limit (save-excursion (beginning-of-line) (point)))) + (limit (line-beginning-position))) (catch 'end (while t (catch 'retry-horizontal @@ -5095,7 +5095,7 @@ Focus only on the corner pattern. Further cell validity check is required." (intersection-str (regexp-quote (char-to-string table-cell-intersection-char))) (v-border (format "[%c%c]" table-cell-vertical-char table-cell-intersection-char)) (h-border (format "[%s%c]" table-cell-horizontal-chars table-cell-intersection-char)) - (limit (save-excursion (end-of-line) (point)))) + (limit (line-end-position))) (catch 'end (while t (catch 'retry-horizontal @@ -5589,5 +5589,4 @@ It returns COLUMN unless STR contains some wide characters." (provide 'table) -;; arch-tag: 0d69b03e-aa5f-4e72-8806-5727217617e0 ;;; table.el ends here diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el index f4fcc95908b..a5b4937f240 100644 --- a/lisp/textmodes/texnfo-upd.el +++ b/lisp/textmodes/texnfo-upd.el @@ -719,21 +719,21 @@ complements the node name rather than repeats it as a title does." (let (beginning end node-name title) (save-excursion (beginning-of-line) - (if (search-forward "* " (save-excursion (end-of-line) (point)) t) + (if (search-forward "* " (line-end-position) t) (progn (skip-chars-forward " \t") (setq beginning (point))) (error "This is not a line in a menu")) (cond ;; "Double colon" entry line; menu entry and node name are the same, - ((search-forward "::" (save-excursion (end-of-line) (point)) t) + ((search-forward "::" (line-end-position) t) (if (looking-at "[ \t]*[^ \t\n]+") (error "Descriptive text already exists")) (skip-chars-backward ": \t") (setq node-name (buffer-substring beginning (point)))) ;; "Single colon" entry line; menu entry and node name are different. - ((search-forward ":" (save-excursion (end-of-line) (point)) t) + ((search-forward ":" (line-end-position) t) (skip-chars-forward " \t") (setq beginning (point)) ;; Menu entry line ends in a period, comma, or tab. @@ -1154,8 +1154,7 @@ Only argument is a string of the general type of section." (save-excursion (goto-char (point-min)) (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t) - (beginning-of-line) - (point))) + (line-beginning-position))) (t (save-excursion (re-search-backward @@ -1206,13 +1205,11 @@ The menu will be located just before this position. First argument is the position of the beginning of the section in which the menu will be located; second argument is the position of the end of that region; it limits the search." - (save-excursion (goto-char beginning) (forward-line 1) (re-search-forward "^@node" end t) - (beginning-of-line) - (point))) + (line-beginning-position))) ;;; Updating a node @@ -1331,7 +1328,7 @@ Point must be at beginning of node line. Does not move point." Starts from the current position of the cursor, and searches forward on the line for a comma and if one is found, deletes the rest of the line, including the comma. Leaves point at beginning of line." - (let ((eol-point (save-excursion (end-of-line) (point)))) + (let ((eol-point (line-end-position))) (if (search-forward "," eol-point t) (delete-region (1- (point)) eol-point))) (beginning-of-line)) @@ -1437,8 +1434,7 @@ will be at some level higher in the Texinfo file. The fourth argument "\\)") (save-excursion (goto-char beginning) - (beginning-of-line) - (point)) + (line-beginning-position)) t) 'normal 'no-pointer)) @@ -1483,7 +1479,7 @@ towards which the pointer is directed, one of `next', `previous', or `up'." "Remove extra commas, if any, at end of node line." (end-of-line) (skip-chars-backward ", ") - (delete-region (point) (save-excursion (end-of-line) (point)))) + (delete-region (point) (line-end-position))) ;;; Updating nodes sequentially @@ -1647,7 +1643,7 @@ node names in pre-existing `@node' lines that lack names." (skip-chars-forward " \t") (setq title (buffer-substring (point) - (save-excursion (end-of-line) (point)))))) + (line-end-position))))) ;; Insert node line if necessary. (if (re-search-backward "^@node" @@ -1993,9 +1989,7 @@ chapter." (point-min) (save-excursion (re-search-forward "^@include") - (beginning-of-line) - (point))) - + (line-beginning-position))) ;; If found, leave point after word `menu' on the `@menu' line. (progn (texinfo-incorporate-descriptions main-menu-list) @@ -2057,5 +2051,4 @@ chapter." ;; Place `provide' at end of file. (provide 'texnfo-upd) -;; arch-tag: d21613a5-c32f-43f4-8af4-bfb1e7455842 ;;; texnfo-upd.el ends here |