diff options
| author | Stefan Kangas | 2022-08-23 04:54:57 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-08-23 04:54:57 +0200 |
| commit | b7e867b841f47dcff3aeaef9b5608a237386ce70 (patch) | |
| tree | 57154cb336fcfdf9fbf80e4c6bb24b07a0432b66 | |
| parent | e425b7d231d02e76ec3e3790418121fc07877e70 (diff) | |
| download | emacs-b7e867b841f47dcff3aeaef9b5608a237386ce70.tar.gz emacs-b7e867b841f47dcff3aeaef9b5608a237386ce70.zip | |
Make point-at-eol and point-at-bol obsolete
* lisp/subr.el (point-at-eol, point-at-bol): Make XEmacs compat
aliases obsolete in favor of `pos-bol'/'line-beginning-position' or
'pos-eol'/'line-end-position'. Update callers.
Ref: https://lists.gnu.org/r/emacs-devel/2022-08/msg00853.html
134 files changed, 586 insertions, 550 deletions
diff --git a/admin/gitmerge.el b/admin/gitmerge.el index a214dcbcb74..25bed949ad9 100644 --- a/admin/gitmerge.el +++ b/admin/gitmerge.el | |||
| @@ -135,7 +135,7 @@ If nil, the function `gitmerge-default-branch' guesses.") | |||
| 135 | (defun gitmerge-get-sha1 () | 135 | (defun gitmerge-get-sha1 () |
| 136 | "Get SHA1 from commit at point." | 136 | "Get SHA1 from commit at point." |
| 137 | (save-excursion | 137 | (save-excursion |
| 138 | (goto-char (point-at-bol)) | 138 | (goto-char (line-beginning-position)) |
| 139 | (when (looking-at "^[A-Z ]\\s-*\\([a-f0-9]+\\)") | 139 | (when (looking-at "^[A-Z ]\\s-*\\([a-f0-9]+\\)") |
| 140 | (match-string 1)))) | 140 | (match-string 1)))) |
| 141 | 141 | ||
| @@ -187,7 +187,7 @@ If nil, the function `gitmerge-default-branch' guesses.") | |||
| 187 | skip) | 187 | skip) |
| 188 | (when commit | 188 | (when commit |
| 189 | (save-excursion | 189 | (save-excursion |
| 190 | (goto-char (point-at-bol)) | 190 | (goto-char (line-beginning-position)) |
| 191 | (when (looking-at "^\\([A-Z ]\\)\\s-*\\([a-f0-9]+\\)") | 191 | (when (looking-at "^\\([A-Z ]\\)\\s-*\\([a-f0-9]+\\)") |
| 192 | (setq skip (string= (match-string 1) " ")) | 192 | (setq skip (string= (match-string 1) " ")) |
| 193 | (goto-char (match-beginning 2)) | 193 | (goto-char (match-beginning 2)) |
| @@ -195,7 +195,7 @@ If nil, the function `gitmerge-default-branch' guesses.") | |||
| 195 | (dolist (ct gitmerge--commits) | 195 | (dolist (ct gitmerge--commits) |
| 196 | (when (string-match commit (car ct)) | 196 | (when (string-match commit (car ct)) |
| 197 | (setcdr ct (when skip "M")))) | 197 | (setcdr ct (when skip "M")))) |
| 198 | (goto-char (point-at-bol)) | 198 | (goto-char (line-beginning-position)) |
| 199 | (setq buffer-read-only nil) | 199 | (setq buffer-read-only nil) |
| 200 | (delete-char 1) | 200 | (delete-char 1) |
| 201 | (insert (if skip "M" " ")) | 201 | (insert (if skip "M" " ")) |
diff --git a/lisp/allout.el b/lisp/allout.el index 8e303a8a02f..fb922608b0d 100644 --- a/lisp/allout.el +++ b/lisp/allout.el | |||
| @@ -4598,7 +4598,7 @@ by pops to non-distinctive yanks. Bug..." | |||
| 4598 | (save-match-data | 4598 | (save-match-data |
| 4599 | (save-excursion | 4599 | (save-excursion |
| 4600 | (let* ((text-start allout-recent-prefix-end) | 4600 | (let* ((text-start allout-recent-prefix-end) |
| 4601 | (heading-end (point-at-eol))) | 4601 | (heading-end (line-end-position))) |
| 4602 | (goto-char text-start) | 4602 | (goto-char text-start) |
| 4603 | (setq file-name | 4603 | (setq file-name |
| 4604 | (if (re-search-forward "\\s-\\(\\S-*\\)" heading-end t) | 4604 | (if (re-search-forward "\\s-\\(\\S-*\\)" heading-end t) |
| @@ -4874,7 +4874,7 @@ siblings, even if the target topic is already closed." | |||
| 4874 | (interactive) | 4874 | (interactive) |
| 4875 | (save-excursion | 4875 | (save-excursion |
| 4876 | (allout-back-to-heading) | 4876 | (allout-back-to-heading) |
| 4877 | (if (allout-hidden-p (point-at-eol)) | 4877 | (if (allout-hidden-p (line-end-position)) |
| 4878 | (allout-show-current-subtree) | 4878 | (allout-show-current-subtree) |
| 4879 | (allout-hide-current-subtree)))) | 4879 | (allout-hide-current-subtree)))) |
| 4880 | ;;;_ > allout-show-current-branches () | 4880 | ;;;_ > allout-show-current-branches () |
| @@ -5537,7 +5537,7 @@ environment. Leaves point at the end of the line." | |||
| 5537 | (let ((inhibit-field-text-motion t)) | 5537 | (let ((inhibit-field-text-motion t)) |
| 5538 | (beginning-of-line) | 5538 | (beginning-of-line) |
| 5539 | (let (;(beg (point)) | 5539 | (let (;(beg (point)) |
| 5540 | (end (point-at-eol))) | 5540 | (end (line-end-position))) |
| 5541 | (save-match-data | 5541 | (save-match-data |
| 5542 | (while (re-search-forward "\\\\" | 5542 | (while (re-search-forward "\\\\" |
| 5543 | ;;"\\\\\\|\\{\\|\\}\\|\\_\\|\\$\\|\\\"\\|\\&\\|\\^\\|\\-\\|\\*\\|#" | 5543 | ;;"\\\\\\|\\{\\|\\}\\|\\_\\|\\$\\|\\\"\\|\\&\\|\\^\\|\\-\\|\\*\\|#" |
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index 6144ee1c08b..3db3746a8e5 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el | |||
| @@ -387,7 +387,7 @@ | |||
| 387 | (interactive) | 387 | (interactive) |
| 388 | (unless (eq major-mode 'calc-keypad-mode) | 388 | (unless (eq major-mode 'calc-keypad-mode) |
| 389 | (error "Must be in *Calc Keypad* buffer for this command")) | 389 | (error "Must be in *Calc Keypad* buffer for this command")) |
| 390 | (let* ((row (count-lines (point-min) (point-at-bol))) | 390 | (let* ((row (count-lines (point-min) (line-beginning-position))) |
| 391 | (y (/ row 2)) | 391 | (y (/ row 2)) |
| 392 | (x (/ (current-column) (if (>= y 4) 6 5))) | 392 | (x (/ (current-column) (if (>= y 4) 6 5))) |
| 393 | radix frac inv | 393 | radix frac inv |
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index d4594370cae..504ba5b40d1 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | (let ((stuff (calc-top-list n (- num n -1)))) | 48 | (let ((stuff (calc-top-list n (- num n -1)))) |
| 49 | (calc-cursor-stack-index num) | 49 | (calc-cursor-stack-index num) |
| 50 | (unless calc-kill-line-numbering | 50 | (unless calc-kill-line-numbering |
| 51 | (re-search-forward "\\=[0-9]+:\\s-+" (point-at-eol) t)) | 51 | (re-search-forward "\\=[0-9]+:\\s-+" (line-end-position) t)) |
| 52 | (let ((first (point))) | 52 | (let ((first (point))) |
| 53 | (calc-cursor-stack-index (- num n)) | 53 | (calc-cursor-stack-index (- num n)) |
| 54 | (if (null nn) | 54 | (if (null nn) |
| @@ -410,8 +410,8 @@ Interactively, reads the register using `register-read-with-preview'." | |||
| 410 | (setq single t) | 410 | (setq single t) |
| 411 | (setq arg (prefix-numeric-value arg)) | 411 | (setq arg (prefix-numeric-value arg)) |
| 412 | (if (= arg 0) | 412 | (if (= arg 0) |
| 413 | (setq top (point-at-bol) | 413 | (setq top (line-beginning-position) |
| 414 | bot (point-at-eol)) | 414 | bot (line-end-position)) |
| 415 | (save-excursion | 415 | (save-excursion |
| 416 | (setq top (point)) | 416 | (setq top (point)) |
| 417 | (forward-line arg) | 417 | (forward-line arg) |
diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el index 6a147bf430c..a2d8bae36b4 100644 --- a/lisp/cedet/cedet-global.el +++ b/lisp/cedet/cedet-global.el | |||
| @@ -133,7 +133,7 @@ DIR defaults to `default-directory'." | |||
| 133 | (goto-char (point-min)) | 133 | (goto-char (point-min)) |
| 134 | (when (not (eobp)) | 134 | (when (not (eobp)) |
| 135 | (file-name-as-directory | 135 | (file-name-as-directory |
| 136 | (buffer-substring (point) (point-at-eol))))))) | 136 | (buffer-substring (point) (line-end-position))))))) |
| 137 | 137 | ||
| 138 | (defun cedet-gnu-global-version-check (&optional noerror) | 138 | (defun cedet-gnu-global-version-check (&optional noerror) |
| 139 | "Check the version of the installed GNU Global command. | 139 | "Check the version of the installed GNU Global command. |
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index e7635c0aec5..605dc9fa19c 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el | |||
| @@ -902,14 +902,14 @@ If PARENT is non-nil, it is somehow related as a parent to thing." | |||
| 902 | (interactive) | 902 | (interactive) |
| 903 | (forward-line 1) | 903 | (forward-line 1) |
| 904 | (beginning-of-line) | 904 | (beginning-of-line) |
| 905 | (skip-chars-forward "- *><[]" (point-at-eol))) | 905 | (skip-chars-forward "- *><[]" (line-end-position))) |
| 906 | 906 | ||
| 907 | (defun data-debug-prev () | 907 | (defun data-debug-prev () |
| 908 | "Go to the previous line in the Ddebug buffer." | 908 | "Go to the previous line in the Ddebug buffer." |
| 909 | (interactive) | 909 | (interactive) |
| 910 | (forward-line -1) | 910 | (forward-line -1) |
| 911 | (beginning-of-line) | 911 | (beginning-of-line) |
| 912 | (skip-chars-forward "- *><[]" (point-at-eol))) | 912 | (skip-chars-forward "- *><[]" (line-end-position))) |
| 913 | 913 | ||
| 914 | (defun data-debug-next-expando () | 914 | (defun data-debug-next-expando () |
| 915 | "Go to the next line in the Ddebug buffer. | 915 | "Go to the next line in the Ddebug buffer. |
| @@ -996,7 +996,7 @@ Do nothing if already contracted." | |||
| 996 | (data-debug-current-line-expanded-p)) | 996 | (data-debug-current-line-expanded-p)) |
| 997 | (data-debug-contract-current-line) | 997 | (data-debug-contract-current-line) |
| 998 | (data-debug-expand-current-line)) | 998 | (data-debug-expand-current-line)) |
| 999 | (skip-chars-forward "- *><[]" (point-at-eol))) | 999 | (skip-chars-forward "- *><[]" (line-end-position))) |
| 1000 | 1000 | ||
| 1001 | (defun data-debug-expand-or-contract-mouse (event) | 1001 | (defun data-debug-expand-or-contract-mouse (event) |
| 1002 | "Expand or contract anything at event EVENT." | 1002 | "Expand or contract anything at event EVENT." |
diff --git a/lisp/cedet/ede/autoconf-edit.el b/lisp/cedet/ede/autoconf-edit.el index faf50edaa13..78edea1da8d 100644 --- a/lisp/cedet/ede/autoconf-edit.el +++ b/lisp/cedet/ede/autoconf-edit.el | |||
| @@ -383,16 +383,16 @@ Optional argument BODY is the code to execute which edits the autoconf file." | |||
| 383 | (beginning-of-line) | 383 | (beginning-of-line) |
| 384 | (let* ((end-of-cmd | 384 | (let* ((end-of-cmd |
| 385 | (save-excursion | 385 | (save-excursion |
| 386 | (if (re-search-forward "(" (point-at-eol) t) | 386 | (if (re-search-forward "(" (line-end-position) t) |
| 387 | (progn | 387 | (progn |
| 388 | (forward-char -1) | 388 | (forward-char -1) |
| 389 | (forward-sexp 1) | 389 | (forward-sexp 1) |
| 390 | (point)) | 390 | (point)) |
| 391 | ;; Else, just return EOL. | 391 | ;; Else, just return EOL. |
| 392 | (point-at-eol)))) | 392 | (line-end-position)))) |
| 393 | (cnt 0)) | 393 | (cnt 0)) |
| 394 | (save-restriction | 394 | (save-restriction |
| 395 | (narrow-to-region (point-at-bol) end-of-cmd) | 395 | (narrow-to-region (line-beginning-position) end-of-cmd) |
| 396 | (condition-case nil | 396 | (condition-case nil |
| 397 | (progn | 397 | (progn |
| 398 | (down-list 1) | 398 | (down-list 1) |
| @@ -417,7 +417,7 @@ INDEX starts at 1." | |||
| 417 | (down-list 1) | 417 | (down-list 1) |
| 418 | (re-search-forward ", ?" nil nil (1- index)) | 418 | (re-search-forward ", ?" nil nil (1- index)) |
| 419 | (let ((end (save-excursion | 419 | (let ((end (save-excursion |
| 420 | (re-search-forward ",\\|)" (point-at-eol)) | 420 | (re-search-forward ",\\|)" (line-end-position)) |
| 421 | (forward-char -1) | 421 | (forward-char -1) |
| 422 | (point)))) | 422 | (point)))) |
| 423 | (setq autoconf-deleted-text (buffer-substring (point) end)) | 423 | (setq autoconf-deleted-text (buffer-substring (point) end)) |
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index 9a913109f09..7739115b31f 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el | |||
| @@ -566,7 +566,7 @@ Argument THIS is the target that should insert stuff." | |||
| 566 | (cond ((eq (cdr sv) 'share) | 566 | (cond ((eq (cdr sv) 'share) |
| 567 | ;; This variable may be shared between multiple targets. | 567 | ;; This variable may be shared between multiple targets. |
| 568 | (if (re-search-backward (concat "\\$(" (car sv) ")") | 568 | (if (re-search-backward (concat "\\$(" (car sv) ")") |
| 569 | (point-at-bol) t) | 569 | (line-beginning-position) t) |
| 570 | ;; If its already in the dist target, then skip it. | 570 | ;; If its already in the dist target, then skip it. |
| 571 | nil | 571 | nil |
| 572 | (setq sv (car sv)))) | 572 | (setq sv (car sv)))) |
diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index 7c56ca19936..594d8f1c29d 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el | |||
| @@ -272,7 +272,8 @@ is found, such as a `-version' variable, or the standard header." | |||
| 272 | (let ((path (match-string 1))) | 272 | (let ((path (match-string 1))) |
| 273 | (if (string= path "nil") | 273 | (if (string= path "nil") |
| 274 | nil | 274 | nil |
| 275 | (delete-region (point-at-bol) (point-at-bol 2))))))))) | 275 | (delete-region (line-beginning-position) |
| 276 | (line-beginning-position 2))))))))) | ||
| 276 | 277 | ||
| 277 | ;;; | 278 | ;;; |
| 278 | ;; Autoload generators | 279 | ;; Autoload generators |
diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index 544e39b8729..de6936ad1a8 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el | |||
| @@ -911,7 +911,7 @@ Kill the Configure buffer if it was not already in a buffer." | |||
| 911 | (goto-char (point-min)) | 911 | (goto-char (point-min)) |
| 912 | (when (re-search-forward (concat "^" (regexp-quote var) "\\s-*=\\s-*") | 912 | (when (re-search-forward (concat "^" (regexp-quote var) "\\s-*=\\s-*") |
| 913 | nil t) | 913 | nil t) |
| 914 | (buffer-substring-no-properties (point) (point-at-eol))))) | 914 | (buffer-substring-no-properties (point) (line-end-position))))) |
| 915 | 915 | ||
| 916 | (defun project-am-extract-package-info (dir) | 916 | (defun project-am-extract-package-info (dir) |
| 917 | "Extract the package information for directory DIR." | 917 | "Extract the package information for directory DIR." |
diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index 604b660344c..f45c070539a 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el | |||
| @@ -175,7 +175,7 @@ Argument DIR is the directory from which to derive the list of objects." | |||
| 175 | (beginning-of-line) | 175 | (beginning-of-line) |
| 176 | (looking-at "^\\([0-9]+\\):") | 176 | (looking-at "^\\([0-9]+\\):") |
| 177 | (let ((depth (string-to-number (match-string 1)))) | 177 | (let ((depth (string-to-number (match-string 1)))) |
| 178 | (while (not (re-search-forward "[]] [^ ]" (point-at-eol) t)) | 178 | (while (not (re-search-forward "[]] [^ ]" (line-end-position) t)) |
| 179 | (re-search-backward (format "^%d:" (1- depth))) | 179 | (re-search-backward (format "^%d:" (1- depth))) |
| 180 | (setq depth (1- depth))) | 180 | (setq depth (1- depth))) |
| 181 | (speedbar-line-token)))) | 181 | (speedbar-line-token)))) |
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index f7af10887c9..9941f2a0cb7 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el | |||
| @@ -202,7 +202,7 @@ If POINT is nil or missing, the current point is used instead. | |||
| 202 | Optional argument FACE specifies the face to do the highlighting." | 202 | Optional argument FACE specifies the face to do the highlighting." |
| 203 | (save-excursion | 203 | (save-excursion |
| 204 | (goto-char (or point (point))) | 204 | (goto-char (or point (point))) |
| 205 | (let ((start (point-at-bol)) | 205 | (let ((start (line-beginning-position)) |
| 206 | (end (save-excursion | 206 | (end (save-excursion |
| 207 | (end-of-line) | 207 | (end-of-line) |
| 208 | (when (not (eobp)) | 208 | (when (not (eobp)) |
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index ee1cbcad4da..d4ce20589e6 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el | |||
| @@ -437,8 +437,8 @@ I think it just returns t/nil dependent on if VAR has been defined." | |||
| 437 | (progn | 437 | (progn |
| 438 | (semantic-push-parser-warning | 438 | (semantic-push-parser-warning |
| 439 | (format "Skip %s" (buffer-substring-no-properties | 439 | (format "Skip %s" (buffer-substring-no-properties |
| 440 | (point-at-bol) (point-at-eol))) | 440 | (line-beginning-position) (line-end-position))) |
| 441 | (point-at-bol) (point-at-eol)) | 441 | (line-beginning-position) (line-end-position)) |
| 442 | nil) | 442 | nil) |
| 443 | t))) | 443 | t))) |
| 444 | 444 | ||
| @@ -501,8 +501,10 @@ code to parse." | |||
| 501 | 501 | ||
| 502 | ;; The if indicates to skip this preprocessor section | 502 | ;; The if indicates to skip this preprocessor section |
| 503 | (let () ;; (pt nil) | 503 | (let () ;; (pt nil) |
| 504 | (semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties (point-at-bol) (point-at-eol))) | 504 | (semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties |
| 505 | (point-at-bol) (point-at-eol)) | 505 | (line-beginning-position) |
| 506 | (line-end-position))) | ||
| 507 | (line-beginning-position) (line-end-position)) | ||
| 506 | (beginning-of-line) | 508 | (beginning-of-line) |
| 507 | ;; (setq pt (point)) | 509 | ;; (setq pt (point)) |
| 508 | ;; This skips only a section of a conditional. Once that section | 510 | ;; This skips only a section of a conditional. Once that section |
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 97456265ead..d42022e0423 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el | |||
| @@ -252,7 +252,7 @@ That is tag names plus names defined in tag attribute `:rest'." | |||
| 252 | (skip-chars-backward "\r\n\t") | 252 | (skip-chars-backward "\r\n\t") |
| 253 | ;; If a grammar footer is found, skip it. | 253 | ;; If a grammar footer is found, skip it. |
| 254 | (re-search-backward "^;;;\\s-+\\S-+\\s-+ends here" | 254 | (re-search-backward "^;;;\\s-+\\S-+\\s-+ends here" |
| 255 | (point-at-bol) t) | 255 | (line-beginning-position) t) |
| 256 | (skip-chars-backward "\r\n\t") | 256 | (skip-chars-backward "\r\n\t") |
| 257 | (point))) | 257 | (point))) |
| 258 | "\n")) | 258 | "\n")) |
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index 1afb1d841dd..2d6f26919d7 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el | |||
| @@ -818,13 +818,13 @@ visible, then highlight it." | |||
| 818 | (goto-char (overlay-start region)) | 818 | (goto-char (overlay-start region)) |
| 819 | (when (pos-visible-in-window-p | 819 | (when (pos-visible-in-window-p |
| 820 | (point) (get-buffer-window (current-buffer) 'visible)) | 820 | (point) (get-buffer-window (current-buffer) 'visible)) |
| 821 | (if (< (overlay-end region) (point-at-eol)) | 821 | (if (< (overlay-end region) (line-end-position)) |
| 822 | (pulse-momentary-highlight-overlay | 822 | (pulse-momentary-highlight-overlay |
| 823 | region semantic-idle-symbol-highlight-face) | 823 | region semantic-idle-symbol-highlight-face) |
| 824 | ;; Not the same | 824 | ;; Not the same |
| 825 | (pulse-momentary-highlight-region | 825 | (pulse-momentary-highlight-region |
| 826 | (overlay-start region) | 826 | (overlay-start region) |
| 827 | (point-at-eol) | 827 | (line-end-position) |
| 828 | semantic-idle-symbol-highlight-face)))) | 828 | semantic-idle-symbol-highlight-face)))) |
| 829 | )) | 829 | )) |
| 830 | ((vectorp region) | 830 | ((vectorp region) |
| @@ -843,8 +843,8 @@ visible, then highlight it." | |||
| 843 | end t) | 843 | end t) |
| 844 | ;; This is likely it, give it a try. | 844 | ;; This is likely it, give it a try. |
| 845 | (pulse-momentary-highlight-region | 845 | (pulse-momentary-highlight-region |
| 846 | start (if (<= end (point-at-eol)) end | 846 | start (if (<= end (line-end-position)) end |
| 847 | (point-at-eol)) | 847 | (line-end-position)) |
| 848 | semantic-idle-symbol-highlight-face))) | 848 | semantic-idle-symbol-highlight-face))) |
| 849 | )))) | 849 | )))) |
| 850 | nil)) | 850 | nil)) |
diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index 4bdaaf77acf..b66e5c19cb2 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el | |||
| @@ -826,7 +826,7 @@ Argument BEG and END specify the bounds of SYM in the buffer." | |||
| 826 | (goto-char end) | 826 | (goto-char end) |
| 827 | (setq arg-parsed | 827 | (setq arg-parsed |
| 828 | (semantic-lex-spp-one-token-and-move-for-macro | 828 | (semantic-lex-spp-one-token-and-move-for-macro |
| 829 | ;; NOTE: This used to be (point-at-eol), but | 829 | ;; NOTE: This used to be (line-end-position), but |
| 830 | ;; that was too close for multi-line arguments | 830 | ;; that was too close for multi-line arguments |
| 831 | ;; to a macro. Point max may be too far if there | 831 | ;; to a macro. Point max may be too far if there |
| 832 | ;; is a typo in the buffer. | 832 | ;; is a typo in the buffer. |
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 9c64cc9f7e5..75c4ee328d6 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el | |||
| @@ -1423,7 +1423,7 @@ Return either a paren token or a semantic list token depending on | |||
| 1423 | ;; to work properly. Lets try and move over | 1423 | ;; to work properly. Lets try and move over |
| 1424 | ;; whatever white space we matched to begin | 1424 | ;; whatever white space we matched to begin |
| 1425 | ;; with. | 1425 | ;; with. |
| 1426 | (skip-syntax-forward "-.'" (point-at-eol)) | 1426 | (skip-syntax-forward "-.'" (line-end-position)) |
| 1427 | ;; We may need to back up so newlines or whitespace is generated. | 1427 | ;; We may need to back up so newlines or whitespace is generated. |
| 1428 | (if (bolp) | 1428 | (if (bolp) |
| 1429 | (backward-char 1))) | 1429 | (backward-char 1))) |
diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index e48cefa4ca6..16bbacc428e 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el | |||
| @@ -555,7 +555,7 @@ deleting the buffers that were opened." | |||
| 555 | (when (re-search-forward (if (memq searchtype '(regexp tagregexp)) | 555 | (when (re-search-forward (if (memq searchtype '(regexp tagregexp)) |
| 556 | searchtxt | 556 | searchtxt |
| 557 | (regexp-quote searchtxt)) | 557 | (regexp-quote searchtxt)) |
| 558 | (point-at-eol) | 558 | (line-end-position) |
| 559 | t) | 559 | t) |
| 560 | (goto-char (match-beginning 0)) | 560 | (goto-char (match-beginning 0)) |
| 561 | ) | 561 | ) |
diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el index 7823dad6ef9..eacbb6f1f8e 100644 --- a/lisp/cedet/semantic/symref/list.el +++ b/lisp/cedet/semantic/symref/list.el | |||
| @@ -234,7 +234,7 @@ Some useful functions are found in `semantic-format-tag-functions'." | |||
| 234 | "Toggle showing the contents below the current line." | 234 | "Toggle showing the contents below the current line." |
| 235 | (interactive) | 235 | (interactive) |
| 236 | (beginning-of-line) | 236 | (beginning-of-line) |
| 237 | (when (re-search-forward "\\[[-+]\\]" (point-at-eol) t) | 237 | (when (re-search-forward "\\[[-+]\\]" (line-end-position) t) |
| 238 | (forward-char -1) | 238 | (forward-char -1) |
| 239 | (push-button))) | 239 | (push-button))) |
| 240 | 240 | ||
| @@ -255,7 +255,7 @@ BUTTON is the button that was clicked." | |||
| 255 | (forward-line (1- H)) | 255 | (forward-line (1- H)) |
| 256 | (beginning-of-line) | 256 | (beginning-of-line) |
| 257 | (back-to-indentation) | 257 | (back-to-indentation) |
| 258 | (setq text (cons (buffer-substring (point) (point-at-eol)) text))) | 258 | (setq text (cons (buffer-substring (point) (line-end-position)) text))) |
| 259 | (setq text (nreverse text))) | 259 | (setq text (nreverse text))) |
| 260 | (goto-char (button-start button)) | 260 | (goto-char (button-start button)) |
| 261 | (forward-char 1) | 261 | (forward-char 1) |
| @@ -409,7 +409,7 @@ cursor to the beginning of that symbol, then record a macro as if | |||
| 409 | (switch-to-buffer-other-window (semantic-tag-buffer tag)) | 409 | (switch-to-buffer-other-window (semantic-tag-buffer tag)) |
| 410 | (goto-char (point-min)) | 410 | (goto-char (point-min)) |
| 411 | (forward-line (1- line)) | 411 | (forward-line (1- line)) |
| 412 | (when (not (re-search-forward (regexp-quote oldsym) (point-at-eol) t)) | 412 | (when (not (re-search-forward (regexp-quote oldsym) (line-end-position) t)) |
| 413 | (error "Cannot find hit. Cannot record macro")) | 413 | (error "Cannot find hit. Cannot record macro")) |
| 414 | (goto-char (match-beginning 0)) | 414 | (goto-char (match-beginning 0)) |
| 415 | ;; Cursor is now in the right location. Start recording a macro. | 415 | ;; Cursor is now in the right location. Start recording a macro. |
| @@ -479,7 +479,7 @@ Return the number of occurrences FUNCTION was operated upon." | |||
| 479 | (goto-char (point-min)) | 479 | (goto-char (point-min)) |
| 480 | (forward-line (1- line)) | 480 | (forward-line (1- line)) |
| 481 | (beginning-of-line) | 481 | (beginning-of-line) |
| 482 | (while (re-search-forward (regexp-quote oldsym) (point-at-eol) t) | 482 | (while (re-search-forward (regexp-quote oldsym) (line-end-position) t) |
| 483 | (setq count (1+ count)) | 483 | (setq count (1+ count)) |
| 484 | (save-excursion ;; Leave cursor after the matched name. | 484 | (save-excursion ;; Leave cursor after the matched name. |
| 485 | (goto-char (match-beginning 0)) ;; Go to beginning of that sym | 485 | (goto-char (match-beginning 0)) ;; Go to beginning of that sym |
diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index fdd93c6bcf8..33fed9191e1 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el | |||
| @@ -750,7 +750,7 @@ If there is no function, disable the header line." | |||
| 750 | (if noshow | 750 | (if noshow |
| 751 | "" | 751 | "" |
| 752 | (if semantic-stickyfunc-show-only-functions-p "" | 752 | (if semantic-stickyfunc-show-only-functions-p "" |
| 753 | (buffer-substring (point-at-bol) (point-at-eol)) | 753 | (buffer-substring (line-beginning-position) (line-end-position)) |
| 754 | )) | 754 | )) |
| 755 | ;; Go get the first line of this tag. | 755 | ;; Go get the first line of this tag. |
| 756 | (goto-char (semantic-tag-start tag)) | 756 | (goto-char (semantic-tag-start tag)) |
| @@ -765,7 +765,7 @@ If there is no function, disable the header line." | |||
| 765 | ;; Without going to the tag-name we would get"void" in the | 765 | ;; Without going to the tag-name we would get"void" in the |
| 766 | ;; header line which is IMHO not really useful | 766 | ;; header line which is IMHO not really useful |
| 767 | (search-forward (semantic-tag-name tag) nil t) | 767 | (search-forward (semantic-tag-name tag) nil t) |
| 768 | (buffer-substring (point-at-bol) (point-at-eol)) | 768 | (buffer-substring (line-beginning-position) (line-end-position)) |
| 769 | )))) | 769 | )))) |
| 770 | (start 0)) | 770 | (start 0)) |
| 771 | (while (string-match "%" str start) | 771 | (while (string-match "%" str start) |
| @@ -959,7 +959,7 @@ function was called, move the overlay." | |||
| 959 | (goto-char (semantic-tag-start tag)) | 959 | (goto-char (semantic-tag-start tag)) |
| 960 | (search-forward (semantic-tag-name tag) nil t) | 960 | (search-forward (semantic-tag-name tag) nil t) |
| 961 | (overlay-put ol 'tag tag) | 961 | (overlay-put ol 'tag tag) |
| 962 | (move-overlay ol (point-at-bol) (point-at-eol))))))) | 962 | (move-overlay ol (line-beginning-position) (line-end-position))))))) |
| 963 | nil) | 963 | nil) |
| 964 | 964 | ||
| 965 | (semantic-add-minor-mode 'semantic-highlight-func-mode | 965 | (semantic-add-minor-mode 'semantic-highlight-func-mode |
diff --git a/lisp/cedet/semantic/wisent/javascript.el b/lisp/cedet/semantic/wisent/javascript.el index cc7ae1b181e..492f574fce6 100644 --- a/lisp/cedet/semantic/wisent/javascript.el +++ b/lisp/cedet/semantic/wisent/javascript.el | |||
| @@ -107,7 +107,7 @@ This is currently needed for the mozrepl omniscient database." | |||
| 107 | (when (looking-at "\\w\\|\\s_") | 107 | (when (looking-at "\\w\\|\\s_") |
| 108 | (forward-sexp 1)) | 108 | (forward-sexp 1)) |
| 109 | (setq end (point)) | 109 | (setq end (point)) |
| 110 | (unless (re-search-backward "\\s-" (point-at-bol) t) | 110 | (unless (re-search-backward "\\s-" (line-beginning-position) t) |
| 111 | (beginning-of-line)) | 111 | (beginning-of-line)) |
| 112 | (setq tmp (buffer-substring-no-properties (point) end)) | 112 | (setq tmp (buffer-substring-no-properties (point) end)) |
| 113 | ;; (setq symlist | 113 | ;; (setq symlist |
diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el index 8c5f343e98c..a25d1441f1f 100644 --- a/lisp/cedet/srecode/document.el +++ b/lisp/cedet/srecode/document.el | |||
| @@ -496,7 +496,7 @@ It is assumed that the comment occurs just after VAR-IN." | |||
| 496 | 496 | ||
| 497 | ;; Find any existing doc strings. | 497 | ;; Find any existing doc strings. |
| 498 | (goto-char (semantic-tag-end var-in)) | 498 | (goto-char (semantic-tag-end var-in)) |
| 499 | (skip-syntax-forward "-" (point-at-eol)) | 499 | (skip-syntax-forward "-" (line-end-position)) |
| 500 | (let ((lextok (semantic-doc-snarf-comment-for-tag 'lex)) | 500 | (let ((lextok (semantic-doc-snarf-comment-for-tag 'lex)) |
| 501 | ) | 501 | ) |
| 502 | 502 | ||
| @@ -521,7 +521,7 @@ It is assumed that the comment occurs just after VAR-IN." | |||
| 521 | (end-of-line) | 521 | (end-of-line) |
| 522 | (delete-horizontal-space) | 522 | (delete-horizontal-space) |
| 523 | (move-to-column comment-column t) | 523 | (move-to-column comment-column t) |
| 524 | (when (< (point) (point-at-eol)) (end-of-line)) | 524 | (when (< (point) (line-end-position)) (end-of-line)) |
| 525 | 525 | ||
| 526 | ;; Perform the insertion | 526 | ;; Perform the insertion |
| 527 | (let ((srecode-semantic-selected-tag var-in) | 527 | (let ((srecode-semantic-selected-tag var-in) |
| @@ -819,7 +819,7 @@ not account for verb parts." | |||
| 819 | "Does TAG fit on one line with space on the end?" | 819 | "Does TAG fit on one line with space on the end?" |
| 820 | (save-excursion | 820 | (save-excursion |
| 821 | (semantic-go-to-tag tag) | 821 | (semantic-go-to-tag tag) |
| 822 | (and (<= (semantic-tag-end tag) (point-at-eol)) | 822 | (and (<= (semantic-tag-end tag) (line-end-position)) |
| 823 | (goto-char (semantic-tag-end tag)) | 823 | (goto-char (semantic-tag-end tag)) |
| 824 | (< (current-column) 70)))) | 824 | (< (current-column) 70)))) |
| 825 | 825 | ||
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index c0260c62a91..db17b7f23f8 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el | |||
| @@ -406,7 +406,7 @@ Specify the :blank argument to enable this inserter.") | |||
| 406 | ((eq (oref sti where) 'end) | 406 | ((eq (oref sti where) 'end) |
| 407 | ;; If there is whitespace after pnt, then clear it out. | 407 | ;; If there is whitespace after pnt, then clear it out. |
| 408 | (when (looking-at "\\s-*$") | 408 | (when (looking-at "\\s-*$") |
| 409 | (delete-region (point) (point-at-eol))) | 409 | (delete-region (point) (line-end-position))) |
| 410 | (when (not (eolp)) | 410 | (when (not (eolp)) |
| 411 | (princ "\n"))) | 411 | (princ "\n"))) |
| 412 | ) | 412 | ) |
diff --git a/lisp/dired.el b/lisp/dired.el index 01098fdf891..f45d215ed60 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1262,13 +1262,13 @@ The return value is the target column for the file names." | |||
| 1262 | (dired-goto-next-file) | 1262 | (dired-goto-next-file) |
| 1263 | ;; Use point difference instead of `current-column', because | 1263 | ;; Use point difference instead of `current-column', because |
| 1264 | ;; the former works when `dired-hide-details-mode' is enabled. | 1264 | ;; the former works when `dired-hide-details-mode' is enabled. |
| 1265 | (let* ((first (- (point) (point-at-bol))) | 1265 | (let* ((first (- (point) (line-beginning-position))) |
| 1266 | (target first)) | 1266 | (target first)) |
| 1267 | (while (and (not (eobp)) | 1267 | (while (and (not (eobp)) |
| 1268 | (progn | 1268 | (progn |
| 1269 | (forward-line) | 1269 | (forward-line) |
| 1270 | (dired-move-to-filename))) | 1270 | (dired-move-to-filename))) |
| 1271 | (when-let* ((distance (- (point) (point-at-bol))) | 1271 | (when-let* ((distance (- (point) (line-beginning-position))) |
| 1272 | (higher (> distance target))) | 1272 | (higher (> distance target))) |
| 1273 | (setq target distance))) | 1273 | (setq target distance))) |
| 1274 | (and (/= first target) target)))) | 1274 | (and (/= first target) target)))) |
| @@ -1284,7 +1284,7 @@ The return value is the target column for the file names." | |||
| 1284 | (while (dired-move-to-filename) | 1284 | (while (dired-move-to-filename) |
| 1285 | ;; Use point difference instead of `current-column', because | 1285 | ;; Use point difference instead of `current-column', because |
| 1286 | ;; the former works when `dired-hide-details-mode' is enabled. | 1286 | ;; the former works when `dired-hide-details-mode' is enabled. |
| 1287 | (let ((distance (- target (- (point) (point-at-bol)))) | 1287 | (let ((distance (- target (- (point) (line-beginning-position)))) |
| 1288 | (inhibit-read-only t)) | 1288 | (inhibit-read-only t)) |
| 1289 | (unless (zerop distance) | 1289 | (unless (zerop distance) |
| 1290 | (re-search-backward regexp nil t) | 1290 | (re-search-backward regexp nil t) |
diff --git a/lisp/ecomplete.el b/lisp/ecomplete.el index d5f3fc77560..aa415a3e9e3 100644 --- a/lisp/ecomplete.el +++ b/lisp/ecomplete.el | |||
| @@ -199,7 +199,7 @@ matches." | |||
| 199 | (goto-char (point-min)) | 199 | (goto-char (point-min)) |
| 200 | (forward-line line) | 200 | (forward-line line) |
| 201 | (save-restriction | 201 | (save-restriction |
| 202 | (narrow-to-region (point) (point-at-eol)) | 202 | (narrow-to-region (point) (line-end-position)) |
| 203 | (while (not (eobp)) | 203 | (while (not (eobp)) |
| 204 | ;; Put the 'region face on any characters on this line that | 204 | ;; Put the 'region face on any characters on this line that |
| 205 | ;; aren't already highlighted. | 205 | ;; aren't already highlighted. |
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index 4f98bf3f4f5..70473770d16 100644 --- a/lisp/emacs-lisp/backtrace.el +++ b/lisp/emacs-lisp/backtrace.el | |||
| @@ -591,7 +591,7 @@ content of the sexp." | |||
| 591 | (begin (previous-single-property-change end 'backtrace-form | 591 | (begin (previous-single-property-change end 'backtrace-form |
| 592 | nil (point-min)))) | 592 | nil (point-min)))) |
| 593 | (unless tag | 593 | (unless tag |
| 594 | (when (or (= end (point-max)) (> end (point-at-eol))) | 594 | (when (or (= end (point-max)) (> end (line-end-position))) |
| 595 | (user-error "No form here to reformat")) | 595 | (user-error "No form here to reformat")) |
| 596 | (goto-char end) | 596 | (goto-char end) |
| 597 | (setq pos end | 597 | (setq pos end |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 5dde2d2bfbb..c25250533a4 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1235,7 +1235,8 @@ Order is by depth-first search." | |||
| 1235 | (let (new-l new-c) | 1235 | (let (new-l new-c) |
| 1236 | (save-excursion | 1236 | (save-excursion |
| 1237 | (goto-char offset) | 1237 | (goto-char offset) |
| 1238 | (setq new-l (1+ (count-lines (point-min) (point-at-bol))) | 1238 | (setq new-l (1+ (count-lines (point-min) |
| 1239 | (line-beginning-position))) | ||
| 1239 | new-c (1+ (current-column))) | 1240 | new-c (1+ (current-column))) |
| 1240 | (format "%d:%d:" new-l new-c)))) | 1241 | (format "%d:%d:" new-l new-c)))) |
| 1241 | "")) | 1242 | "")) |
diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el index ac6cbb53a56..6d1821504c8 100644 --- a/lisp/emacs-lisp/chart.el +++ b/lisp/emacs-lisp/chart.el | |||
| @@ -526,9 +526,9 @@ cons cells of the form (NAME . NUM). See `sort' for more details." | |||
| 526 | (defun chart-zap-chars (n) | 526 | (defun chart-zap-chars (n) |
| 527 | "Zap up to N chars without deleting EOLs." | 527 | "Zap up to N chars without deleting EOLs." |
| 528 | (if (not (eobp)) | 528 | (if (not (eobp)) |
| 529 | (if (< n (- (point-at-eol) (point))) | 529 | (if (< n (- (line-end-position) (point))) |
| 530 | (delete-char n) | 530 | (delete-char n) |
| 531 | (delete-region (point) (point-at-eol))))) | 531 | (delete-region (point) (line-end-position))))) |
| 532 | 532 | ||
| 533 | (defun chart-display-label (label dir zone start end &optional face) | 533 | (defun chart-display-label (label dir zone start end &optional face) |
| 534 | "Display LABEL in direction DIR in column/row ZONE between START and END. | 534 | "Display LABEL in direction DIR in column/row ZONE between START and END. |
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 3f8113dea36..cd0e8d60cca 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el | |||
| @@ -647,7 +647,7 @@ Argument NUM is the number of lines to move." | |||
| 647 | (bottom (save-excursion (move-to-window-line bottom-margin) (point))) | 647 | (bottom (save-excursion (move-to-window-line bottom-margin) (point))) |
| 648 | (far (save-excursion | 648 | (far (save-excursion |
| 649 | (goto-char bottom) | 649 | (goto-char bottom) |
| 650 | (point-at-bol (1- height))))) | 650 | (line-beginning-position (1- height))))) |
| 651 | (ignore top far) | 651 | (ignore top far) |
| 652 | ,@body)) | 652 | ,@body)) |
| 653 | 653 | ||
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index ddb49609d40..26793989d05 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el | |||
| @@ -3266,8 +3266,8 @@ controlled by the sign of prefix numeric value." | |||
| 3266 | (if (and (eolp) (not (bolp))) (forward-char -1)) | 3266 | (if (and (eolp) (not (bolp))) (forward-char -1)) |
| 3267 | (if (not (looking-at "[][(){}]")) | 3267 | (if (not (looking-at "[][(){}]")) |
| 3268 | (setq anchor-point (point))) | 3268 | (setq anchor-point (point))) |
| 3269 | (setq beg-lim (point-at-bol) | 3269 | (setq beg-lim (line-beginning-position) |
| 3270 | end-lim (point-at-eol)) | 3270 | end-lim (line-end-position)) |
| 3271 | (cond ((re-search-forward "[][(){}]" end-lim t) | 3271 | (cond ((re-search-forward "[][(){}]" end-lim t) |
| 3272 | (backward-char) ) | 3272 | (backward-char) ) |
| 3273 | ((re-search-backward "[][(){}]" beg-lim t)) | 3273 | ((re-search-backward "[][(){}]" beg-lim t)) |
| @@ -4390,7 +4390,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back." | |||
| 4390 | (delete-char -1) | 4390 | (delete-char -1) |
| 4391 | (setq p (point)) | 4391 | (setq p (point)) |
| 4392 | (setq indent nil))) | 4392 | (setq indent nil))) |
| 4393 | (setq bol (point-at-bol)) | 4393 | (setq bol (line-beginning-position)) |
| 4394 | (if (re-search-backward "[^ \t]" bol 1) (forward-char)) | 4394 | (if (re-search-backward "[^ \t]" bol 1) (forward-char)) |
| 4395 | (delete-region (point) p) | 4395 | (delete-region (point) p) |
| 4396 | (if indent | 4396 | (if indent |
| @@ -4474,7 +4474,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back." | |||
| 4474 | (goto-char pos) | 4474 | (goto-char pos) |
| 4475 | (beginning-of-line) | 4475 | (beginning-of-line) |
| 4476 | (if (re-search-backward "[^ \t]" nil t) | 4476 | (if (re-search-backward "[^ \t]" nil t) |
| 4477 | (setq s (point-at-bol))) | 4477 | (setq s (line-beginning-position))) |
| 4478 | (goto-char pos) | 4478 | (goto-char pos) |
| 4479 | (forward-line 1) | 4479 | (forward-line 1) |
| 4480 | (if (re-search-forward "[^ \t]" nil t) | 4480 | (if (re-search-forward "[^ \t]" nil t) |
diff --git a/lisp/epa.el b/lisp/epa.el index 742c37d085b..63bc0941d62 100644 --- a/lisp/epa.el +++ b/lisp/epa.el | |||
| @@ -417,7 +417,7 @@ q trust status questionable. - trust status unspecified. | |||
| 417 | 'epa-key)) | 417 | 'epa-key)) |
| 418 | (setq keys (cons key keys)))) | 418 | (setq keys (cons key keys)))) |
| 419 | (nreverse keys))) | 419 | (nreverse keys))) |
| 420 | (let ((key (get-text-property (point-at-bol) 'epa-key))) | 420 | (let ((key (get-text-property (line-beginning-position) 'epa-key))) |
| 421 | (if key | 421 | (if key |
| 422 | (list key))))) | 422 | (list key))))) |
| 423 | 423 | ||
diff --git a/lisp/epg-config.el b/lisp/epg-config.el index 28003eaf71b..6501434e030 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el | |||
| @@ -246,9 +246,9 @@ version requirement is met." | |||
| 246 | (goto-char (match-end 0)) | 246 | (goto-char (match-end 0)) |
| 247 | (backward-char) | 247 | (backward-char) |
| 248 | (forward-sexp) | 248 | (forward-sexp) |
| 249 | (skip-syntax-forward "-" (point-at-eol)) | 249 | (skip-syntax-forward "-" (line-end-position)) |
| 250 | (list (cons 'program program) | 250 | (list (cons 'program program) |
| 251 | (cons 'version (buffer-substring (point) (point-at-eol))))))) | 251 | (cons 'version (buffer-substring (point) (line-end-position))))))) |
| 252 | 252 | ||
| 253 | ;;;###autoload | 253 | ;;;###autoload |
| 254 | (defun epg-configuration () | 254 | (defun epg-configuration () |
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index 11979a01301..0c32f1e51f0 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el | |||
| @@ -343,7 +343,7 @@ The INDENT level is ignored." | |||
| 343 | "Return the text for the item on the current line." | 343 | "Return the text for the item on the current line." |
| 344 | (beginning-of-line) | 344 | (beginning-of-line) |
| 345 | (when (re-search-forward "[]>] " nil t) | 345 | (when (re-search-forward "[]>] " nil t) |
| 346 | (buffer-substring-no-properties (point) (point-at-eol)))) | 346 | (buffer-substring-no-properties (point) (line-end-position)))) |
| 347 | 347 | ||
| 348 | (defun erc-speedbar-item-info () | 348 | (defun erc-speedbar-item-info () |
| 349 | "Display information about the current buffer on the current line." | 349 | "Display information about the current buffer on the current line." |
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index cdab3241c12..c167cd23930 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el | |||
| @@ -303,7 +303,7 @@ printed just after each line's text (no alignment)." | |||
| 303 | ;; to the next line before inserting a stamp. It allows for | 303 | ;; to the next line before inserting a stamp. It allows for |
| 304 | ;; some margin of error if what is displayed on the line differs | 304 | ;; some margin of error if what is displayed on the line differs |
| 305 | ;; from the number of characters on the line. | 305 | ;; from the number of characters on the line. |
| 306 | (setq col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6)))) | 306 | (setq col (+ col (ceiling (/ (- col (- (point) (line-beginning-position))) 1.6)))) |
| 307 | (if (< col pos) | 307 | (if (< col pos) |
| 308 | (erc-insert-aligned string pos) | 308 | (erc-insert-aligned string pos) |
| 309 | (newline) | 309 | (newline) |
diff --git a/lisp/ffap.el b/lisp/ffap.el index e4017595916..88b4bce9fd1 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -948,7 +948,7 @@ out of NAME." | |||
| 948 | (save-excursion | 948 | (save-excursion |
| 949 | (re-search-backward (regexp-opt | 949 | (re-search-backward (regexp-opt |
| 950 | (mapcar 'car preferred-suffix-rules)) | 950 | (mapcar 'car preferred-suffix-rules)) |
| 951 | (point-at-bol) | 951 | (line-beginning-position) |
| 952 | t)) | 952 | t)) |
| 953 | (push (cons "" (cdr (assoc (match-string 0) ; i.e. "(TeX-current-macro)" | 953 | (push (cons "" (cdr (assoc (match-string 0) ; i.e. "(TeX-current-macro)" |
| 954 | preferred-suffix-rules))) | 954 | preferred-suffix-rules))) |
| @@ -962,7 +962,7 @@ out of NAME." | |||
| 962 | (concat (car rule) name (cdr rule))) | 962 | (concat (car rule) name (cdr rule))) |
| 963 | guess-rules))) | 963 | guess-rules))) |
| 964 | (when (< (point-min) (point-max)) | 964 | (when (< (point-min) (point-max)) |
| 965 | (buffer-substring (goto-char (point-min)) (point-at-eol)))))))) | 965 | (buffer-substring (goto-char (point-min)) (line-end-position)))))))) |
| 966 | 966 | ||
| 967 | (defun ffap-tex (name) | 967 | (defun ffap-tex (name) |
| 968 | (ffap-tex-init) | 968 | (ffap-tex-init) |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 7eb5a414fe3..b6f4150964d 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1572,7 +1572,7 @@ START should be at the beginning of a line." | |||
| 1572 | font-lock-comment-delimiter-face))) | 1572 | font-lock-comment-delimiter-face))) |
| 1573 | (if (looking-back (or font-lock-comment-end-skip | 1573 | (if (looking-back (or font-lock-comment-end-skip |
| 1574 | comment-end-skip) | 1574 | comment-end-skip) |
| 1575 | (point-at-bol) t) | 1575 | (line-beginning-position) t) |
| 1576 | (put-text-property (match-beginning 0) (point) 'face | 1576 | (put-text-property (match-beginning 0) (point) 'face |
| 1577 | font-lock-comment-delimiter-face)))) | 1577 | font-lock-comment-delimiter-face)))) |
| 1578 | (< (point) end)) | 1578 | (< (point) end)) |
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index e4704b35c8d..e1c7bcb467d 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -1681,7 +1681,7 @@ and that there are no duplicates." | |||
| 1681 | (gnus-message 1 | 1681 | (gnus-message 1 |
| 1682 | "Overview buffer contains garbage `%s'." | 1682 | "Overview buffer contains garbage `%s'." |
| 1683 | (buffer-substring | 1683 | (buffer-substring |
| 1684 | p (point-at-eol)))) | 1684 | p (line-end-position)))) |
| 1685 | ((= cur prev-num) | 1685 | ((= cur prev-num) |
| 1686 | (or backed-up | 1686 | (or backed-up |
| 1687 | (setq backed-up (gnus-agent-backup-overview-buffer))) | 1687 | (setq backed-up (gnus-agent-backup-overview-buffer))) |
| @@ -2687,7 +2687,7 @@ The following commands are available: | |||
| 2687 | (gnus-category-position-point))) | 2687 | (gnus-category-position-point))) |
| 2688 | 2688 | ||
| 2689 | (defun gnus-category-name () | 2689 | (defun gnus-category-name () |
| 2690 | (or (intern (get-text-property (point-at-bol) 'gnus-category)) | 2690 | (or (intern (get-text-property (line-beginning-position) 'gnus-category)) |
| 2691 | (error "No category on the current line"))) | 2691 | (error "No category on the current line"))) |
| 2692 | 2692 | ||
| 2693 | (defun gnus-category-read () | 2693 | (defun gnus-category-read () |
| @@ -3363,7 +3363,7 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it."))) | |||
| 3363 | 3363 | ||
| 3364 | (cl-incf nov-entries-deleted) | 3364 | (cl-incf nov-entries-deleted) |
| 3365 | 3365 | ||
| 3366 | (let* ((from (point-at-bol)) | 3366 | (let* ((from (line-beginning-position)) |
| 3367 | (to (progn (forward-line 1) (point))) | 3367 | (to (progn (forward-line 1) (point))) |
| 3368 | (freed (- to from))) | 3368 | (freed (- to from))) |
| 3369 | (cl-incf bytes-freed freed) | 3369 | (cl-incf bytes-freed freed) |
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 480ebe377d7..83ba72c091f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -1930,7 +1930,7 @@ always hide." | |||
| 1930 | (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) | 1930 | (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) |
| 1931 | (forward-line -1) | 1931 | (forward-line -1) |
| 1932 | (gnus-article-hide-text-type | 1932 | (gnus-article-hide-text-type |
| 1933 | (point-at-bol) | 1933 | (line-beginning-position) |
| 1934 | (progn | 1934 | (progn |
| 1935 | (end-of-line) | 1935 | (end-of-line) |
| 1936 | (if (re-search-forward "^[^ \t]" nil t) | 1936 | (if (re-search-forward "^[^ \t]" nil t) |
| @@ -2060,7 +2060,7 @@ always hide." | |||
| 2060 | (goto-char (point-min)) | 2060 | (goto-char (point-min)) |
| 2061 | (when (re-search-forward (concat "^" header ":") nil t) | 2061 | (when (re-search-forward (concat "^" header ":") nil t) |
| 2062 | (gnus-article-hide-text-type | 2062 | (gnus-article-hide-text-type |
| 2063 | (point-at-bol) | 2063 | (line-beginning-position) |
| 2064 | (progn | 2064 | (progn |
| 2065 | (end-of-line) | 2065 | (end-of-line) |
| 2066 | (if (re-search-forward "^[^ \t]" nil t) | 2066 | (if (re-search-forward "^[^ \t]" nil t) |
| @@ -2081,7 +2081,7 @@ always hide." | |||
| 2081 | (article-narrow-to-head) | 2081 | (article-narrow-to-head) |
| 2082 | (while (not (eobp)) | 2082 | (while (not (eobp)) |
| 2083 | (cond | 2083 | (cond |
| 2084 | ((< (setq column (- (point-at-eol) (point))) | 2084 | ((< (setq column (- (line-end-position) (point))) |
| 2085 | gnus-article-normalized-header-length) | 2085 | gnus-article-normalized-header-length) |
| 2086 | (end-of-line) | 2086 | (end-of-line) |
| 2087 | (insert (make-string | 2087 | (insert (make-string |
| @@ -2092,7 +2092,7 @@ always hide." | |||
| 2092 | (progn | 2092 | (progn |
| 2093 | (forward-char gnus-article-normalized-header-length) | 2093 | (forward-char gnus-article-normalized-header-length) |
| 2094 | (point)) | 2094 | (point)) |
| 2095 | (point-at-eol) | 2095 | (line-end-position) |
| 2096 | 'invisible t)) | 2096 | 'invisible t)) |
| 2097 | (t | 2097 | (t |
| 2098 | ;; Do nothing. | 2098 | ;; Do nothing. |
| @@ -2389,7 +2389,7 @@ fill width." | |||
| 2389 | (end-of-line) | 2389 | (end-of-line) |
| 2390 | (when (>= (current-column) width) | 2390 | (when (>= (current-column) width) |
| 2391 | (narrow-to-region (min (1+ (point)) (point-max)) | 2391 | (narrow-to-region (min (1+ (point)) (point-max)) |
| 2392 | (point-at-bol)) | 2392 | (line-beginning-position)) |
| 2393 | (let ((goback (point-marker)) | 2393 | (let ((goback (point-marker)) |
| 2394 | (fill-column width)) | 2394 | (fill-column width)) |
| 2395 | (fill-paragraph nil) | 2395 | (fill-paragraph nil) |
| @@ -2446,7 +2446,7 @@ fill width." | |||
| 2446 | (while (and (not (bobp)) | 2446 | (while (and (not (bobp)) |
| 2447 | (looking-at "^[ \t]*$") | 2447 | (looking-at "^[ \t]*$") |
| 2448 | (not (gnus-annotation-in-region-p | 2448 | (not (gnus-annotation-in-region-p |
| 2449 | (point) (point-at-eol)))) | 2449 | (point) (line-end-position)))) |
| 2450 | (forward-line -1)) | 2450 | (forward-line -1)) |
| 2451 | (forward-line 1) | 2451 | (forward-line 1) |
| 2452 | (point)))))) | 2452 | (point)))))) |
| @@ -3583,9 +3583,10 @@ possible values." | |||
| 3583 | 'original-date) | 3583 | 'original-date) |
| 3584 | bface (get-text-property (match-beginning 0) 'face) | 3584 | bface (get-text-property (match-beginning 0) 'face) |
| 3585 | eface (get-text-property (match-end 0) 'face)) | 3585 | eface (get-text-property (match-end 0) 'face)) |
| 3586 | (delete-region (point-at-bol) (progn | 3586 | (delete-region (line-beginning-position) |
| 3587 | (gnus-article-forward-header) | 3587 | (progn |
| 3588 | (point))))) | 3588 | (gnus-article-forward-header) |
| 3589 | (point))))) | ||
| 3589 | (when (and (not date) | 3590 | (when (and (not date) |
| 3590 | visible-date) | 3591 | visible-date) |
| 3591 | (setq date visible-date)) | 3592 | (setq date visible-date)) |
| @@ -4388,8 +4389,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is | |||
| 4388 | (message-narrow-to-head) | 4389 | (message-narrow-to-head) |
| 4389 | (goto-char (point-max)) | 4390 | (goto-char (point-max)) |
| 4390 | (forward-line -1) | 4391 | (forward-line -1) |
| 4391 | (setq bface (get-text-property (point-at-bol) 'face) | 4392 | (setq bface (get-text-property (line-beginning-position) 'face) |
| 4392 | eface (get-text-property (1- (point-at-eol)) 'face)) | 4393 | eface (get-text-property (1- (line-end-position)) 'face)) |
| 4393 | (message-remove-header "X-Gnus-PGP-Verify") | 4394 | (message-remove-header "X-Gnus-PGP-Verify") |
| 4394 | (if (re-search-forward "^X-PGP-Sig:" nil t) | 4395 | (if (re-search-forward "^X-PGP-Sig:" nil t) |
| 4395 | (forward-line) | 4396 | (forward-line) |
| @@ -5925,7 +5926,7 @@ all parts." | |||
| 5925 | ;; Go to the displayed subpart, assuming this is | 5926 | ;; Go to the displayed subpart, assuming this is |
| 5926 | ;; multipart/alternative. | 5927 | ;; multipart/alternative. |
| 5927 | (setq part start | 5928 | (setq part start |
| 5928 | end (point-at-eol)) | 5929 | end (line-end-position)) |
| 5929 | (while (and (not handle) | 5930 | (while (and (not handle) |
| 5930 | part | 5931 | part |
| 5931 | (< part end) | 5932 | (< part end) |
| @@ -6825,9 +6826,9 @@ not have a face in `gnus-article-boring-faces'." | |||
| 6825 | "Read article specified by message-id around point." | 6826 | "Read article specified by message-id around point." |
| 6826 | (interactive nil gnus-article-mode) | 6827 | (interactive nil gnus-article-mode) |
| 6827 | (save-excursion | 6828 | (save-excursion |
| 6828 | (re-search-backward "[ \t]\\|^" (point-at-bol) t) | 6829 | (re-search-backward "[ \t]\\|^" (line-beginning-position) t) |
| 6829 | (re-search-forward "<?news:<?\\|<" (point-at-eol) t) | 6830 | (re-search-forward "<?news:<?\\|<" (line-end-position) t) |
| 6830 | (if (re-search-forward "[^@ ]+@[^ \t>]+" (point-at-eol) t) | 6831 | (if (re-search-forward "[^@ ]+@[^ \t>]+" (line-end-position) t) |
| 6831 | (let ((msg-id (concat "<" (match-string 0) ">"))) | 6832 | (let ((msg-id (concat "<" (match-string 0) ">"))) |
| 6832 | (set-buffer gnus-summary-buffer) | 6833 | (set-buffer gnus-summary-buffer) |
| 6833 | (gnus-summary-refer-article msg-id)) | 6834 | (gnus-summary-refer-article msg-id)) |
| @@ -8180,7 +8181,7 @@ url is put as the `gnus-button-url' overlay property on the button." | |||
| 8180 | (goto-char start) | 8181 | (goto-char start) |
| 8181 | (string-match | 8182 | (string-match |
| 8182 | "\\(?:\"\\|\\(<\\)\\)[\t ]*\\(?:url[\t ]*:[\t ]*\\)?\\'" | 8183 | "\\(?:\"\\|\\(<\\)\\)[\t ]*\\(?:url[\t ]*:[\t ]*\\)?\\'" |
| 8183 | (buffer-substring (point-at-bol) start))) | 8184 | (buffer-substring (line-beginning-position) start))) |
| 8184 | (progn | 8185 | (progn |
| 8185 | (setq url (list (buffer-substring start end)) | 8186 | (setq url (list (buffer-substring start end)) |
| 8186 | delim (if (match-beginning 1) ">" "\"")) | 8187 | delim (if (match-beginning 1) ">" "\"")) |
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 4f5b9bd3422..18732218c9f 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el | |||
| @@ -509,7 +509,7 @@ Optional argument SHOW means show them unconditionally." | |||
| 509 | (let ((bmrk (gnus-bookmark-bmenu-bookmark))) | 509 | (let ((bmrk (gnus-bookmark-bmenu-bookmark))) |
| 510 | (setq gnus-bookmark-bmenu-hidden-bookmarks | 510 | (setq gnus-bookmark-bmenu-hidden-bookmarks |
| 511 | (cons bmrk gnus-bookmark-bmenu-hidden-bookmarks)) | 511 | (cons bmrk gnus-bookmark-bmenu-hidden-bookmarks)) |
| 512 | (let ((start (point-at-eol))) | 512 | (let ((start (line-end-position))) |
| 513 | (move-to-column gnus-bookmark-bmenu-file-column t) | 513 | (move-to-column gnus-bookmark-bmenu-file-column t) |
| 514 | ;; Strip off `mouse-face' from the white spaces region. | 514 | ;; Strip off `mouse-face' from the white spaces region. |
| 515 | (if (display-mouse-p) | 515 | (if (display-mouse-p) |
| @@ -543,7 +543,7 @@ Optional argument SHOW means show them unconditionally." | |||
| 543 | "Kill from point to end of line. | 543 | "Kill from point to end of line. |
| 544 | If optional arg NEWLINE-TOO is non-nil, delete the newline too. | 544 | If optional arg NEWLINE-TOO is non-nil, delete the newline too. |
| 545 | Does not affect the kill ring." | 545 | Does not affect the kill ring." |
| 546 | (delete-region (point) (point-at-eol)) | 546 | (delete-region (point) (line-end-position)) |
| 547 | (if (and newline-too (looking-at "\n")) | 547 | (if (and newline-too (looking-at "\n")) |
| 548 | (delete-char 1))) | 548 | (delete-char 1))) |
| 549 | 549 | ||
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index ee20ba3c7f0..449b73163f4 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el | |||
| @@ -552,7 +552,7 @@ Returns the list of articles removed." | |||
| 552 | (set-buffer cache-buf) | 552 | (set-buffer cache-buf) |
| 553 | (if (search-forward (concat "\n" (int-to-string (car cached)) "\t") | 553 | (if (search-forward (concat "\n" (int-to-string (car cached)) "\t") |
| 554 | nil t) | 554 | nil t) |
| 555 | (setq beg (point-at-bol) | 555 | (setq beg (line-beginning-position) |
| 556 | end (progn (end-of-line) (point))) | 556 | end (progn (end-of-line) (point))) |
| 557 | (setq beg nil)) | 557 | (setq beg nil)) |
| 558 | (set-buffer nntp-server-buffer) | 558 | (set-buffer nntp-server-buffer) |
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 3ba2bbd6fea..b4d7661d742 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el | |||
| @@ -371,7 +371,7 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps | |||
| 371 | (goto-char (point-min)) | 371 | (goto-char (point-min)) |
| 372 | (forward-line (1- number)) | 372 | (forward-line (1- number)) |
| 373 | (when (re-search-forward gnus-cite-attribution-suffix | 373 | (when (re-search-forward gnus-cite-attribution-suffix |
| 374 | (point-at-eol) | 374 | (line-end-position) |
| 375 | t) | 375 | t) |
| 376 | (gnus-article-add-button (match-beginning 1) (match-end 1) | 376 | (gnus-article-add-button (match-beginning 1) (match-end 1) |
| 377 | 'gnus-cite-toggle prefix)) | 377 | 'gnus-cite-toggle prefix)) |
| @@ -756,7 +756,7 @@ See also the documentation for `gnus-article-highlight-citation'." | |||
| 756 | ;; Each line. | 756 | ;; Each line. |
| 757 | (setq begin (point) | 757 | (setq begin (point) |
| 758 | guess-limit (progn (skip-chars-forward "^> \t\r\n") (point)) | 758 | guess-limit (progn (skip-chars-forward "^> \t\r\n") (point)) |
| 759 | end (point-at-bol 2) | 759 | end (line-beginning-position 2) |
| 760 | start end) | 760 | start end) |
| 761 | (goto-char begin) | 761 | (goto-char begin) |
| 762 | ;; Ignore standard Supercite attribution prefix. | 762 | ;; Ignore standard Supercite attribution prefix. |
| @@ -1105,8 +1105,8 @@ Returns nil if there is no such line before LIMIT, t otherwise." | |||
| 1105 | "[\t [:alnum:]]+"))) | 1105 | "[\t [:alnum:]]+"))) |
| 1106 | gnus-message-max-citation-depth)) | 1106 | gnus-message-max-citation-depth)) |
| 1107 | (mlist (make-list (* (1+ gnus-message-max-citation-depth) 2) nil)) | 1107 | (mlist (make-list (* (1+ gnus-message-max-citation-depth) 2) nil)) |
| 1108 | (start (point-at-bol)) | 1108 | (start (line-beginning-position)) |
| 1109 | (end (point-at-eol))) | 1109 | (end (line-end-position))) |
| 1110 | (setcar mlist start) | 1110 | (setcar mlist start) |
| 1111 | (setcar (cdr mlist) end) | 1111 | (setcar (cdr mlist) end) |
| 1112 | (setcar (nthcdr (* cdepth 2) mlist) start) | 1112 | (setcar (nthcdr (* cdepth 2) mlist) start) |
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el index 6028d4fcb2f..3c57d7b1124 100644 --- a/lisp/gnus/gnus-diary.el +++ b/lisp/gnus/gnus-diary.el | |||
| @@ -327,7 +327,7 @@ If ARG (or prefix) is non-nil, force prompting for all fields." | |||
| 327 | (when (re-search-forward (concat "^" header ":") nil t) | 327 | (when (re-search-forward (concat "^" header ":") nil t) |
| 328 | (unless (eq (char-after) ? ) | 328 | (unless (eq (char-after) ? ) |
| 329 | (insert " ")) | 329 | (insert " ")) |
| 330 | (setq value (buffer-substring (point) (point-at-eol))) | 330 | (setq value (buffer-substring (point) (line-end-position))) |
| 331 | (and (string-match "[ \t]*\\([^ \t]+\\)[ \t]*" value) | 331 | (and (string-match "[ \t]*\\([^ \t]+\\)[ \t]*" value) |
| 332 | (setq value (match-string 1 value))) | 332 | (setq value (match-string 1 value))) |
| 333 | (condition-case () | 333 | (condition-case () |
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index 56d498cc4d3..e38deefe2aa 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el | |||
| @@ -150,7 +150,7 @@ Obeys the standard process/prefix convention." | |||
| 150 | (concat "^" (regexp-quote gnus-agent-target-move-group-header) | 150 | (concat "^" (regexp-quote gnus-agent-target-move-group-header) |
| 151 | ":") nil t) | 151 | ":") nil t) |
| 152 | (skip-syntax-forward "-") | 152 | (skip-syntax-forward "-") |
| 153 | (setq move-to (buffer-substring (point) (point-at-eol))) | 153 | (setq move-to (buffer-substring (point) (line-end-position))) |
| 154 | (message-remove-header gnus-agent-target-move-group-header)) | 154 | (message-remove-header gnus-agent-target-move-group-header)) |
| 155 | (goto-char (point-min)) | 155 | (goto-char (point-min)) |
| 156 | (when (re-search-forward | 156 | (when (re-search-forward |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index a6b6c4a6cda..fcad601d0c3 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -1204,7 +1204,7 @@ case interactively), the level will be updated by this command." | |||
| 1204 | (gnus-group-setup-buffer) | 1204 | (gnus-group-setup-buffer) |
| 1205 | (gnus-update-format-specifications nil 'group 'group-mode) | 1205 | (gnus-update-format-specifications nil 'group 'group-mode) |
| 1206 | (let ((case-fold-search nil) | 1206 | (let ((case-fold-search nil) |
| 1207 | (props (text-properties-at (point-at-bol))) | 1207 | (props (text-properties-at (line-beginning-position))) |
| 1208 | (empty (= (point-min) (point-max))) | 1208 | (empty (= (point-min) (point-max))) |
| 1209 | (group (gnus-group-group-name)) | 1209 | (group (gnus-group-group-name)) |
| 1210 | number) | 1210 | number) |
| @@ -1724,24 +1724,24 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated." | |||
| 1724 | 1724 | ||
| 1725 | (defun gnus-group-group-name () | 1725 | (defun gnus-group-group-name () |
| 1726 | "Get the name of the newsgroup on the current line." | 1726 | "Get the name of the newsgroup on the current line." |
| 1727 | (let ((group (get-text-property (point-at-bol) 'gnus-group))) | 1727 | (let ((group (get-text-property (line-beginning-position) 'gnus-group))) |
| 1728 | (cond ((stringp group) group) | 1728 | (cond ((stringp group) group) |
| 1729 | (group (symbol-name group))))) | 1729 | (group (symbol-name group))))) |
| 1730 | 1730 | ||
| 1731 | (defun gnus-group-group-level () | 1731 | (defun gnus-group-group-level () |
| 1732 | "Get the level of the newsgroup on the current line." | 1732 | "Get the level of the newsgroup on the current line." |
| 1733 | (get-text-property (point-at-bol) 'gnus-level)) | 1733 | (get-text-property (line-beginning-position) 'gnus-level)) |
| 1734 | 1734 | ||
| 1735 | (defun gnus-group-group-indentation () | 1735 | (defun gnus-group-group-indentation () |
| 1736 | "Get the indentation of the newsgroup on the current line." | 1736 | "Get the indentation of the newsgroup on the current line." |
| 1737 | (or (get-text-property (point-at-bol) 'gnus-indentation) | 1737 | (or (get-text-property (line-beginning-position) 'gnus-indentation) |
| 1738 | (and gnus-group-indentation-function | 1738 | (and gnus-group-indentation-function |
| 1739 | (funcall gnus-group-indentation-function)) | 1739 | (funcall gnus-group-indentation-function)) |
| 1740 | "")) | 1740 | "")) |
| 1741 | 1741 | ||
| 1742 | (defun gnus-group-group-unread () | 1742 | (defun gnus-group-group-unread () |
| 1743 | "Get the number of unread articles of the newsgroup on the current line." | 1743 | "Get the number of unread articles of the newsgroup on the current line." |
| 1744 | (get-text-property (point-at-bol) 'gnus-unread)) | 1744 | (get-text-property (line-beginning-position) 'gnus-unread)) |
| 1745 | 1745 | ||
| 1746 | (defun gnus-group-new-mail (group) | 1746 | (defun gnus-group-new-mail (group) |
| 1747 | (if (nnmail-new-mail-p group) | 1747 | (if (nnmail-new-mail-p group) |
| @@ -2095,14 +2095,14 @@ be permanent." | |||
| 2095 | (looking-at "[][\C-@-*,/;-@\\^`{-\C-?]"))) | 2095 | (looking-at "[][\C-@-*,/;-@\\^`{-\C-?]"))) |
| 2096 | (prog1 t | 2096 | (prog1 t |
| 2097 | (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" | 2097 | (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" |
| 2098 | (point-at-bol)))) | 2098 | (line-beginning-position)))) |
| 2099 | (and (looking-at "[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*$") | 2099 | (and (looking-at "[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*$") |
| 2100 | (prog1 t | 2100 | (prog1 t |
| 2101 | (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") | 2101 | (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") |
| 2102 | (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" | 2102 | (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" |
| 2103 | (point-at-bol)))) | 2103 | (line-beginning-position)))) |
| 2104 | (string-match "\\`[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*\\'" | 2104 | (string-match "\\`[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*\\'" |
| 2105 | (buffer-substring (point-at-bol) (point)))) | 2105 | (buffer-substring (line-beginning-position) (point)))) |
| 2106 | (when (looking-at regexp) | 2106 | (when (looking-at regexp) |
| 2107 | (match-string 1)) | 2107 | (match-string 1)) |
| 2108 | (let (group distance) | 2108 | (let (group distance) |
| @@ -2111,7 +2111,7 @@ be permanent." | |||
| 2111 | distance (- (match-beginning 1) (match-beginning 0)))) | 2111 | distance (- (match-beginning 1) (match-beginning 0)))) |
| 2112 | (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") | 2112 | (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") |
| 2113 | (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" | 2113 | (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" |
| 2114 | (point-at-bol)) | 2114 | (line-beginning-position)) |
| 2115 | (if (looking-at regexp) | 2115 | (if (looking-at regexp) |
| 2116 | (if (and group (<= distance (- start (match-end 0)))) | 2116 | (if (and group (<= distance (- start (match-end 0)))) |
| 2117 | group | 2117 | group |
| @@ -3948,10 +3948,10 @@ The killed newsgroups can be yanked by using \\[gnus-group-yank-group]." | |||
| 3948 | (count-lines | 3948 | (count-lines |
| 3949 | (progn | 3949 | (progn |
| 3950 | (goto-char begin) | 3950 | (goto-char begin) |
| 3951 | (point-at-bol)) | 3951 | (line-beginning-position)) |
| 3952 | (progn | 3952 | (progn |
| 3953 | (goto-char end) | 3953 | (goto-char end) |
| 3954 | (point-at-bol)))))) | 3954 | (line-beginning-position)))))) |
| 3955 | (goto-char begin) | 3955 | (goto-char begin) |
| 3956 | (beginning-of-line) ;Important when LINES < 1 | 3956 | (beginning-of-line) ;Important when LINES < 1 |
| 3957 | (gnus-group-kill-group lines))) | 3957 | (gnus-group-kill-group lines))) |
diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index d0edf2cba85..012ac9d556f 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el | |||
| @@ -220,13 +220,13 @@ replacement is added." | |||
| 220 | (error 0))) | 220 | (error 0))) |
| 221 | spec))) | 221 | spec))) |
| 222 | (when (> len 0) | 222 | (when (> len 0) |
| 223 | (goto-char (point-at-eol)) | 223 | (goto-char (line-end-position)) |
| 224 | (insert (propertize | 224 | (insert (propertize |
| 225 | " " 'display | 225 | " " 'display |
| 226 | (cons 'space | 226 | (cons 'space |
| 227 | (list :align-to (- (window-width) 1 len)))))) | 227 | (list :align-to (- (window-width) 1 len)))))) |
| 228 | (goto-char (point-at-eol)) | 228 | (goto-char (line-end-position)) |
| 229 | (setq point (point-at-eol)) | 229 | (setq point (line-end-position)) |
| 230 | (dolist (image spec) | 230 | (dolist (image spec) |
| 231 | (unless (stringp image) | 231 | (unless (stringp image) |
| 232 | (goto-char point) | 232 | (goto-char point) |
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 4ef2ebf1dd7..6b7958dcb91 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el | |||
| @@ -686,7 +686,7 @@ it in the environment specified by BINDINGS." | |||
| 686 | (unless (zerop level) | 686 | (unless (zerop level) |
| 687 | (gnus-tree-indent level) | 687 | (gnus-tree-indent level) |
| 688 | (insert (cadr gnus-tree-parent-child-edges)) | 688 | (insert (cadr gnus-tree-parent-child-edges)) |
| 689 | (setq col (- (setq beg (point)) (point-at-bol) 1)) | 689 | (setq col (- (setq beg (point)) (line-beginning-position) 1)) |
| 690 | ;; Draw "|" lines upwards. | 690 | ;; Draw "|" lines upwards. |
| 691 | (while (progn | 691 | (while (progn |
| 692 | (forward-line -1) | 692 | (forward-line -1) |
| @@ -710,7 +710,7 @@ it in the environment specified by BINDINGS." | |||
| 710 | 710 | ||
| 711 | (defsubst gnus-tree-indent-vertical () | 711 | (defsubst gnus-tree-indent-vertical () |
| 712 | (let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent) | 712 | (let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent) |
| 713 | (- (point) (point-at-bol))))) | 713 | (- (point) (line-beginning-position))))) |
| 714 | (when (> len 0) | 714 | (when (> len 0) |
| 715 | (insert (make-string len ? ))))) | 715 | (insert (make-string len ? ))))) |
| 716 | 716 | ||
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index c852986ae61..5f49c280072 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el | |||
| @@ -1168,9 +1168,9 @@ If FORMAT, also format the current score file." | |||
| 1168 | (reg " -> +") | 1168 | (reg " -> +") |
| 1169 | (file (save-excursion | 1169 | (file (save-excursion |
| 1170 | (end-of-line) | 1170 | (end-of-line) |
| 1171 | (if (and (re-search-backward reg (point-at-bol) t) | 1171 | (if (and (re-search-backward reg (line-beginning-position) t) |
| 1172 | (re-search-forward reg (point-at-eol) t)) | 1172 | (re-search-forward reg (line-end-position) t)) |
| 1173 | (buffer-substring (point) (point-at-eol)) | 1173 | (buffer-substring (point) (line-end-position)) |
| 1174 | nil)))) | 1174 | nil)))) |
| 1175 | (if (or (not file) | 1175 | (if (or (not file) |
| 1176 | (string-match "\\<\\(non-file rule\\|A file\\)\\>" file) | 1176 | (string-match "\\<\\(non-file rule\\|A file\\)\\>" file) |
| @@ -1999,7 +1999,7 @@ score in `gnus-newsgroup-scored' by SCORE." | |||
| 1999 | (goto-char (point-min)) | 1999 | (goto-char (point-min)) |
| 2000 | (if (= dmt ?e) | 2000 | (if (= dmt ?e) |
| 2001 | (while (funcall search-func match nil t) | 2001 | (while (funcall search-func match nil t) |
| 2002 | (and (= (point-at-bol) | 2002 | (and (= (line-beginning-position) |
| 2003 | (match-beginning 0)) | 2003 | (match-beginning 0)) |
| 2004 | (= (progn (end-of-line) (point)) | 2004 | (= (progn (end-of-line) (point)) |
| 2005 | (match-end 0)) | 2005 | (match-end 0)) |
| @@ -2170,7 +2170,7 @@ score in `gnus-newsgroup-scored' by SCORE." | |||
| 2170 | (funcall search-func match nil t)) | 2170 | (funcall search-func match nil t)) |
| 2171 | ;; Is it really exact? | 2171 | ;; Is it really exact? |
| 2172 | (and (eolp) | 2172 | (and (eolp) |
| 2173 | (= (point-at-bol) (match-beginning 0)) | 2173 | (= (line-beginning-position) (match-beginning 0)) |
| 2174 | ;; Yup. | 2174 | ;; Yup. |
| 2175 | (progn | 2175 | (progn |
| 2176 | (setq found (setq arts (get-text-property | 2176 | (setq found (setq arts (get-text-property |
| @@ -2260,7 +2260,7 @@ score in `gnus-newsgroup-scored' by SCORE." | |||
| 2260 | (goto-char (point-min)) | 2260 | (goto-char (point-min)) |
| 2261 | (while (and (not (eobp)) | 2261 | (while (and (not (eobp)) |
| 2262 | (search-forward match nil t)) | 2262 | (search-forward match nil t)) |
| 2263 | (when (and (= (point-at-bol) (match-beginning 0)) | 2263 | (when (and (= (line-beginning-position) (match-beginning 0)) |
| 2264 | (eolp)) | 2264 | (eolp)) |
| 2265 | (setq found (setq arts (get-text-property (point) 'articles))) | 2265 | (setq found (setq arts (get-text-property (point) 'articles))) |
| 2266 | (if trace | 2266 | (if trace |
| @@ -2344,7 +2344,7 @@ score in `gnus-newsgroup-scored' by SCORE." | |||
| 2344 | hashtb)) | 2344 | hashtb)) |
| 2345 | (puthash | 2345 | (puthash |
| 2346 | word | 2346 | word |
| 2347 | (append (get-text-property (point-at-eol) 'articles) val) | 2347 | (append (get-text-property (line-end-position) 'articles) val) |
| 2348 | hashtb))) | 2348 | hashtb))) |
| 2349 | ;; Make all the ignorable words ignored. | 2349 | ;; Make all the ignorable words ignored. |
| 2350 | (let ((ignored (append gnus-ignored-adaptive-words | 2350 | (let ((ignored (append gnus-ignored-adaptive-words |
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 53b6d1b4c6f..327dba95c07 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el | |||
| @@ -565,7 +565,7 @@ returning the one at the supplied position." | |||
| 565 | (buffer-substring | 565 | (buffer-substring |
| 566 | (point) | 566 | (point) |
| 567 | (progn | 567 | (progn |
| 568 | (re-search-forward ":" (point-at-eol) t) | 568 | (re-search-forward ":" (line-end-position) t) |
| 569 | (1- (point)))))) | 569 | (1- (point)))))) |
| 570 | (value (gnus-search-query-return-string | 570 | (value (gnus-search-query-return-string |
| 571 | (when (looking-at-p "[\"/]") t)))) | 571 | (when (looking-at-p "[\"/]") t)))) |
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 54be0f8e6a0..e659a648e10 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el | |||
| @@ -339,13 +339,13 @@ The following commands are available: | |||
| 339 | (gnus-server-position-point)) | 339 | (gnus-server-position-point)) |
| 340 | 340 | ||
| 341 | (defun gnus-server-server-name () | 341 | (defun gnus-server-server-name () |
| 342 | (let ((server (get-text-property (point-at-bol) 'gnus-server))) | 342 | (let ((server (get-text-property (line-beginning-position) 'gnus-server))) |
| 343 | (and server (symbol-name server)))) | 343 | (and server (symbol-name server)))) |
| 344 | 344 | ||
| 345 | (defun gnus-server-named-server () | 345 | (defun gnus-server-named-server () |
| 346 | "Return a server name that matches one of the names returned by | 346 | "Return a server name that matches one of the names returned by |
| 347 | `gnus-method-to-server'." | 347 | `gnus-method-to-server'." |
| 348 | (let ((server (get-text-property (point-at-bol) 'gnus-named-server))) | 348 | (let ((server (get-text-property (line-beginning-position) 'gnus-named-server))) |
| 349 | (and server (symbol-name server)))) | 349 | (and server (symbol-name server)))) |
| 350 | 350 | ||
| 351 | (defalias 'gnus-server-position-point 'gnus-goto-colon) | 351 | (defalias 'gnus-server-position-point 'gnus-goto-colon) |
| @@ -949,7 +949,7 @@ how new groups will be entered into the group buffer." | |||
| 949 | (save-excursion | 949 | (save-excursion |
| 950 | (beginning-of-line) | 950 | (beginning-of-line) |
| 951 | (let ((name (get-text-property (point) 'gnus-group))) | 951 | (let ((name (get-text-property (point) 'gnus-group))) |
| 952 | (when (re-search-forward ": \\(.*\\)$" (point-at-eol) t) | 952 | (when (re-search-forward ": \\(.*\\)$" (line-end-position) t) |
| 953 | (concat (gnus-method-to-server-name gnus-browse-current-method) ":" | 953 | (concat (gnus-method-to-server-name gnus-browse-current-method) ":" |
| 954 | (or name | 954 | (or name |
| 955 | (match-string-no-properties 1))))))) | 955 | (match-string-no-properties 1))))))) |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 7b5721fafbb..7700e6bd430 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -855,7 +855,7 @@ If REGEXP is given, lines that match it will be deleted." | |||
| 855 | (unless (bolp) (forward-line 1)) | 855 | (unless (bolp) (forward-line 1)) |
| 856 | (setq end (point)) | 856 | (setq end (point)) |
| 857 | (goto-char (match-beginning 0)) | 857 | (goto-char (match-beginning 0)) |
| 858 | (delete-region (point-at-bol) end)))) | 858 | (delete-region (line-beginning-position) end)))) |
| 859 | (goto-char (point-max)) | 859 | (goto-char (point-max)) |
| 860 | ;; Make sure that each dribble entry is a single line, so that | 860 | ;; Make sure that each dribble entry is a single line, so that |
| 861 | ;; the "remove" code above works. | 861 | ;; the "remove" code above works. |
| @@ -2173,7 +2173,7 @@ The info element is shared with the same element of | |||
| 2173 | (unless ignore-errors | 2173 | (unless ignore-errors |
| 2174 | (gnus-message 3 "Warning - invalid active: %s" | 2174 | (gnus-message 3 "Warning - invalid active: %s" |
| 2175 | (buffer-substring | 2175 | (buffer-substring |
| 2176 | (point-at-bol) (point-at-eol)))))) | 2176 | (line-beginning-position) (line-end-position)))))) |
| 2177 | (forward-line 1))))) | 2177 | (forward-line 1))))) |
| 2178 | 2178 | ||
| 2179 | (defun gnus-groups-to-gnus-format (method &optional hashtb real-active) | 2179 | (defun gnus-groups-to-gnus-format (method &optional hashtb real-active) |
| @@ -2527,10 +2527,10 @@ The form should return either t or nil." | |||
| 2527 | ;; don't give a damn, frankly, my dear. | 2527 | ;; don't give a damn, frankly, my dear. |
| 2528 | (concat gnus-newsrc-options | 2528 | (concat gnus-newsrc-options |
| 2529 | (buffer-substring | 2529 | (buffer-substring |
| 2530 | (point-at-bol) | 2530 | (line-beginning-position) |
| 2531 | ;; Options may continue on the next line. | 2531 | ;; Options may continue on the next line. |
| 2532 | (or (and (re-search-forward "^[^ \t]" nil 'move) | 2532 | (or (and (re-search-forward "^[^ \t]" nil 'move) |
| 2533 | (point-at-bol)) | 2533 | (line-beginning-position)) |
| 2534 | (point))))) | 2534 | (point))))) |
| 2535 | (forward-line -1)) | 2535 | (forward-line -1)) |
| 2536 | (group | 2536 | (group |
| @@ -2592,8 +2592,8 @@ The form should return either t or nil." | |||
| 2592 | ;; The line was buggy. | 2592 | ;; The line was buggy. |
| 2593 | (setq group nil) | 2593 | (setq group nil) |
| 2594 | (gnus-error 3.1 "Mangled line: %s" | 2594 | (gnus-error 3.1 "Mangled line: %s" |
| 2595 | (buffer-substring (point-at-bol) | 2595 | (buffer-substring (line-beginning-position) |
| 2596 | (point-at-eol)))) | 2596 | (line-end-position)))) |
| 2597 | nil)) | 2597 | nil)) |
| 2598 | ;; Skip past ", ". Spaces are invalid in these ranges, but | 2598 | ;; Skip past ", ". Spaces are invalid in these ranges, but |
| 2599 | ;; we allow them, because it's a common mistake to put a | 2599 | ;; we allow them, because it's a common mistake to put a |
| @@ -2702,9 +2702,9 @@ The form should return either t or nil." | |||
| 2702 | (while (re-search-forward "[ \t]-n" nil t) | 2702 | (while (re-search-forward "[ \t]-n" nil t) |
| 2703 | (setq eol | 2703 | (setq eol |
| 2704 | (or (save-excursion | 2704 | (or (save-excursion |
| 2705 | (and (re-search-forward "[ \t]-n" (point-at-eol) t) | 2705 | (and (re-search-forward "[ \t]-n" (line-end-position) t) |
| 2706 | (- (point) 2))) | 2706 | (- (point) 2))) |
| 2707 | (point-at-eol))) | 2707 | (line-end-position))) |
| 2708 | ;; Search for all "words"... | 2708 | ;; Search for all "words"... |
| 2709 | (while (re-search-forward "[^ \t,\n]+" eol t) | 2709 | (while (re-search-forward "[^ \t,\n]+" eol t) |
| 2710 | (if (eq (char-after (match-beginning 0)) ?!) | 2710 | (if (eq (char-after (match-beginning 0)) ?!) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 90b57695c57..dde60caee7e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -3383,7 +3383,7 @@ marks of articles." | |||
| 3383 | (let (config) | 3383 | (let (config) |
| 3384 | (goto-char (point-min)) | 3384 | (goto-char (point-min)) |
| 3385 | (while (not (eobp)) | 3385 | (while (not (eobp)) |
| 3386 | (when (eq (get-char-property (point-at-eol) 'invisible) 'gnus-sum) | 3386 | (when (eq (get-char-property (line-end-position) 'invisible) 'gnus-sum) |
| 3387 | (push (save-excursion (forward-line 0) (point)) config)) | 3387 | (push (save-excursion (forward-line 0) (point)) config)) |
| 3388 | (forward-line 1)) | 3388 | (forward-line 1)) |
| 3389 | config))) | 3389 | config))) |
| @@ -4505,7 +4505,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." | |||
| 4505 | (let (header) | 4505 | (let (header) |
| 4506 | ;; overview: [num subject from date id refs chars lines misc] | 4506 | ;; overview: [num subject from date id refs chars lines misc] |
| 4507 | (unwind-protect | 4507 | (unwind-protect |
| 4508 | (narrow-to-region (point) (point-at-eol)) | 4508 | (narrow-to-region (point) (line-end-position)) |
| 4509 | (unless (eobp) | 4509 | (unless (eobp) |
| 4510 | (forward-char)) | 4510 | (forward-char)) |
| 4511 | (setq header (nnheader-parse-nov number)) | 4511 | (setq header (nnheader-parse-nov number)) |
| @@ -4661,7 +4661,7 @@ If LINE, insert the rebuilt thread starting on line LINE." | |||
| 4661 | (setq thread (list (car (gnus-id-to-thread id)))) | 4661 | (setq thread (list (car (gnus-id-to-thread id)))) |
| 4662 | ;; Get the thread this article is part of. | 4662 | ;; Get the thread this article is part of. |
| 4663 | (setq thread (gnus-remove-thread id))) | 4663 | (setq thread (gnus-remove-thread id))) |
| 4664 | (setq old-pos (point-at-bol)) | 4664 | (setq old-pos (line-beginning-position)) |
| 4665 | (setq current (save-excursion | 4665 | (setq current (save-excursion |
| 4666 | (and (re-search-backward "[\r\n]" nil t) | 4666 | (and (re-search-backward "[\r\n]" nil t) |
| 4667 | (gnus-summary-article-number)))) | 4667 | (gnus-summary-article-number)))) |
| @@ -4845,9 +4845,9 @@ If LINE, insert the rebuilt thread starting on line LINE." | |||
| 4845 | (gnus-summary-show-thread) | 4845 | (gnus-summary-show-thread) |
| 4846 | (gnus-data-remove | 4846 | (gnus-data-remove |
| 4847 | number | 4847 | number |
| 4848 | (- (point-at-bol) | 4848 | (- (line-beginning-position) |
| 4849 | (prog1 | 4849 | (prog1 |
| 4850 | (1+ (point-at-eol)) | 4850 | (1+ (line-end-position)) |
| 4851 | (gnus-delete-line))))))) | 4851 | (gnus-delete-line))))))) |
| 4852 | 4852 | ||
| 4853 | (defun gnus-sort-threads-recursive (threads func) | 4853 | (defun gnus-sort-threads-recursive (threads func) |
| @@ -6468,7 +6468,7 @@ This is meant to be called in `gnus-article-internal-prepare-hook'." | |||
| 6468 | (looking-at "Xref:")) | 6468 | (looking-at "Xref:")) |
| 6469 | (search-forward "\nXref:" nil t)) | 6469 | (search-forward "\nXref:" nil t)) |
| 6470 | (goto-char (1+ (match-end 0))) | 6470 | (goto-char (1+ (match-end 0))) |
| 6471 | (setq xref (buffer-substring (point) (point-at-eol))) | 6471 | (setq xref (buffer-substring (point) (line-end-position))) |
| 6472 | (setf (mail-header-xref headers) xref))))))) | 6472 | (setf (mail-header-xref headers) xref))))))) |
| 6473 | 6473 | ||
| 6474 | (defun gnus-summary-insert-subject (id &optional old-header use-old-header) | 6474 | (defun gnus-summary-insert-subject (id &optional old-header use-old-header) |
| @@ -6499,9 +6499,9 @@ too, instead of trying to fetch new headers." | |||
| 6499 | (goto-char (gnus-data-pos d)) | 6499 | (goto-char (gnus-data-pos d)) |
| 6500 | (gnus-data-remove | 6500 | (gnus-data-remove |
| 6501 | number | 6501 | number |
| 6502 | (- (point-at-bol) | 6502 | (- (line-beginning-position) |
| 6503 | (prog1 | 6503 | (prog1 |
| 6504 | (1+ (point-at-eol)) | 6504 | (1+ (line-end-position)) |
| 6505 | (gnus-delete-line)))))) | 6505 | (gnus-delete-line)))))) |
| 6506 | ;; Remove list identifiers from subject. | 6506 | ;; Remove list identifiers from subject. |
| 6507 | (let ((gnus-newsgroup-headers (list header))) | 6507 | (let ((gnus-newsgroup-headers (list header))) |
| @@ -11219,7 +11219,7 @@ If NO-EXPIRE, auto-expiry will be inhibited." | |||
| 11219 | (defun gnus-summary-update-mark (mark type) | 11219 | (defun gnus-summary-update-mark (mark type) |
| 11220 | (let ((forward (cdr (assq type gnus-summary-mark-positions))) | 11220 | (let ((forward (cdr (assq type gnus-summary-mark-positions))) |
| 11221 | (inhibit-read-only t)) | 11221 | (inhibit-read-only t)) |
| 11222 | (re-search-backward "[\n\r]" (point-at-bol) 'move-to-limit) | 11222 | (re-search-backward "[\n\r]" (line-beginning-position) 'move-to-limit) |
| 11223 | (when forward | 11223 | (when forward |
| 11224 | (when (looking-at "\r") | 11224 | (when (looking-at "\r") |
| 11225 | (cl-incf forward)) | 11225 | (cl-incf forward)) |
| @@ -11756,7 +11756,7 @@ If ARG is positive number, turn showing conversation threads on." | |||
| 11756 | Returns nil if no thread was there to be shown." | 11756 | Returns nil if no thread was there to be shown." |
| 11757 | (interactive nil gnus-summary-mode) | 11757 | (interactive nil gnus-summary-mode) |
| 11758 | (let* ((orig (point)) | 11758 | (let* ((orig (point)) |
| 11759 | (end (point-at-eol)) | 11759 | (end (line-end-position)) |
| 11760 | (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end)))) | 11760 | (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end)))) |
| 11761 | ;; Leave point at bol | 11761 | ;; Leave point at bol |
| 11762 | (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point))))) | 11762 | (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point))))) |
| @@ -12675,8 +12675,8 @@ If REVERSE, save parts that do not match TYPE." | |||
| 12675 | ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>. | 12675 | ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>. |
| 12676 | (when gnus-summary-selected-face | 12676 | (when gnus-summary-selected-face |
| 12677 | (save-excursion | 12677 | (save-excursion |
| 12678 | (let* ((beg (point-at-bol)) | 12678 | (let* ((beg (line-beginning-position)) |
| 12679 | (end (point-at-eol)) | 12679 | (end (line-end-position)) |
| 12680 | ;; Fix by Mike Dugan <dugan@bucrf16.bu.edu>. | 12680 | ;; Fix by Mike Dugan <dugan@bucrf16.bu.edu>. |
| 12681 | (from (if (get-text-property beg 'mouse-face) | 12681 | (from (if (get-text-property beg 'mouse-face) |
| 12682 | beg | 12682 | beg |
| @@ -12732,7 +12732,7 @@ If REVERSE, save parts that do not match TYPE." | |||
| 12732 | (with-no-warnings ;See docstring of gnus-summary-highlight. | 12732 | (with-no-warnings ;See docstring of gnus-summary-highlight. |
| 12733 | (defvar score) (defvar default) (defvar default-high) (defvar default-low) | 12733 | (defvar score) (defvar default) (defvar default-high) (defvar default-low) |
| 12734 | (defvar mark) (defvar uncached)) | 12734 | (defvar mark) (defvar uncached)) |
| 12735 | (let* ((beg (point-at-bol)) | 12735 | (let* ((beg (line-beginning-position)) |
| 12736 | (article (or (gnus-summary-article-number) gnus-current-article)) | 12736 | (article (or (gnus-summary-article-number) gnus-current-article)) |
| 12737 | (score (or (cdr (assq article | 12737 | (score (or (cdr (assq article |
| 12738 | gnus-newsgroup-scored)) | 12738 | gnus-newsgroup-scored)) |
| @@ -12748,7 +12748,7 @@ If REVERSE, save parts that do not match TYPE." | |||
| 12748 | (let ((face (funcall (gnus-summary-highlight-line-0)))) | 12748 | (let ((face (funcall (gnus-summary-highlight-line-0)))) |
| 12749 | (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face)) | 12749 | (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face)) |
| 12750 | (gnus-put-text-property-excluding-characters-with-faces | 12750 | (gnus-put-text-property-excluding-characters-with-faces |
| 12751 | beg (1+ (point-at-eol)) 'face | 12751 | beg (1+ (line-end-position)) 'face |
| 12752 | (setq face (if (boundp face) (symbol-value face) face))) | 12752 | (setq face (if (boundp face) (symbol-value face) face))) |
| 12753 | (when gnus-summary-highlight-line-function | 12753 | (when gnus-summary-highlight-line-function |
| 12754 | (funcall gnus-summary-highlight-line-function article face)))))) | 12754 | (funcall gnus-summary-highlight-line-function article face)))))) |
| @@ -12895,7 +12895,7 @@ treated as multipart/mixed." | |||
| 12895 | (insert "Mime-Version: 1.0\n") | 12895 | (insert "Mime-Version: 1.0\n") |
| 12896 | (widen) | 12896 | (widen) |
| 12897 | (when (search-forward "\n--" nil t) | 12897 | (when (search-forward "\n--" nil t) |
| 12898 | (let ((separator (buffer-substring (point) (point-at-eol)))) | 12898 | (let ((separator (buffer-substring (point) (line-end-position)))) |
| 12899 | (message-narrow-to-head) | 12899 | (message-narrow-to-head) |
| 12900 | (message-remove-header "Content-Type") | 12900 | (message-remove-header "Content-Type") |
| 12901 | (goto-char (point-max)) | 12901 | (goto-char (point-max)) |
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index fa942bee8e8..13263dddc9c 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el | |||
| @@ -107,15 +107,15 @@ should return non-nil if the topic is to be displayed." | |||
| 107 | 107 | ||
| 108 | (defun gnus-group-topic-name () | 108 | (defun gnus-group-topic-name () |
| 109 | "The name of the topic on the current line." | 109 | "The name of the topic on the current line." |
| 110 | (get-text-property (point-at-bol) 'gnus-topic)) | 110 | (get-text-property (line-beginning-position) 'gnus-topic)) |
| 111 | 111 | ||
| 112 | (defun gnus-group-topic-level () | 112 | (defun gnus-group-topic-level () |
| 113 | "The level of the topic on the current line." | 113 | "The level of the topic on the current line." |
| 114 | (get-text-property (point-at-bol) 'gnus-topic-level)) | 114 | (get-text-property (line-beginning-position) 'gnus-topic-level)) |
| 115 | 115 | ||
| 116 | (defun gnus-group-topic-unread () | 116 | (defun gnus-group-topic-unread () |
| 117 | "The number of unread articles in topic on the current line." | 117 | "The number of unread articles in topic on the current line." |
| 118 | (get-text-property (point-at-bol) 'gnus-topic-unread)) | 118 | (get-text-property (line-beginning-position) 'gnus-topic-unread)) |
| 119 | 119 | ||
| 120 | (defun gnus-topic-unread (topic) | 120 | (defun gnus-topic-unread (topic) |
| 121 | "Return the number of unread articles in TOPIC." | 121 | "Return the number of unread articles in TOPIC." |
| @@ -128,7 +128,7 @@ should return non-nil if the topic is to be displayed." | |||
| 128 | 128 | ||
| 129 | (defun gnus-topic-visible-p () | 129 | (defun gnus-topic-visible-p () |
| 130 | "Return non-nil if the current topic is visible." | 130 | "Return non-nil if the current topic is visible." |
| 131 | (get-text-property (point-at-bol) 'gnus-topic-visible)) | 131 | (get-text-property (line-beginning-position) 'gnus-topic-visible)) |
| 132 | 132 | ||
| 133 | (defun gnus-topic-articles-in-topic (entries) | 133 | (defun gnus-topic-articles-in-topic (entries) |
| 134 | (let ((total 0) | 134 | (let ((total 0) |
| @@ -188,7 +188,7 @@ If TOPIC, start with that topic." | |||
| 188 | 188 | ||
| 189 | (defun gnus-group-active-topic-p () | 189 | (defun gnus-group-active-topic-p () |
| 190 | "Say whether the current topic comes from the active topics." | 190 | "Say whether the current topic comes from the active topics." |
| 191 | (get-text-property (point-at-bol) 'gnus-active)) | 191 | (get-text-property (line-beginning-position) 'gnus-active)) |
| 192 | 192 | ||
| 193 | (defun gnus-topic-find-groups (topic &optional level all lowest recursive) | 193 | (defun gnus-topic-find-groups (topic &optional level all lowest recursive) |
| 194 | "Return entries for all visible groups in TOPIC. | 194 | "Return entries for all visible groups in TOPIC. |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 4c93814e0dc..fe556b155a8 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -118,7 +118,7 @@ This is a compatibility function for different Emacsen." | |||
| 118 | 118 | ||
| 119 | ;; Delete the current line (and the next N lines). | 119 | ;; Delete the current line (and the next N lines). |
| 120 | (defmacro gnus-delete-line (&optional n) | 120 | (defmacro gnus-delete-line (&optional n) |
| 121 | `(delete-region (point-at-bol) | 121 | `(delete-region (line-beginning-position) |
| 122 | (progn (forward-line ,(or n 1)) (point)))) | 122 | (progn (forward-line ,(or n 1)) (point)))) |
| 123 | 123 | ||
| 124 | (defun gnus-extract-address-components (from) | 124 | (defun gnus-extract-address-components (from) |
| @@ -178,7 +178,7 @@ is slower." | |||
| 178 | 178 | ||
| 179 | (defun gnus-goto-colon () | 179 | (defun gnus-goto-colon () |
| 180 | (move-beginning-of-line 1) | 180 | (move-beginning-of-line 1) |
| 181 | (let ((eol (point-at-eol))) | 181 | (let ((eol (line-end-position))) |
| 182 | (goto-char (or (text-property-any (point) eol 'gnus-position t) | 182 | (goto-char (or (text-property-any (point) eol 'gnus-position t) |
| 183 | (search-forward ":" eol t) | 183 | (search-forward ":" eol t) |
| 184 | (point))))) | 184 | (point))))) |
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index ee6cab365f3..9cafc78ab89 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el | |||
| @@ -544,11 +544,11 @@ didn't work, and overwrite existing files. Otherwise, ask each time." | |||
| 544 | "Various")))) | 544 | "Various")))) |
| 545 | (goto-char (point-min)) | 545 | (goto-char (point-min)) |
| 546 | (when (re-search-forward "^Subject: ") | 546 | (when (re-search-forward "^Subject: ") |
| 547 | (delete-region (point) (point-at-eol)) | 547 | (delete-region (point) (line-end-position)) |
| 548 | (insert subject)) | 548 | (insert subject)) |
| 549 | (goto-char (point-min)) | 549 | (goto-char (point-min)) |
| 550 | (when (re-search-forward "^From:") | 550 | (when (re-search-forward "^From:") |
| 551 | (delete-region (point) (point-at-eol)) | 551 | (delete-region (point) (line-end-position)) |
| 552 | (insert " " from)) | 552 | (insert " " from)) |
| 553 | (let ((message-forward-decoded-p t)) | 553 | (let ((message-forward-decoded-p t)) |
| 554 | (message-forward post t)))) | 554 | (message-forward post t)))) |
| @@ -1763,7 +1763,7 @@ Gnus might fail to display all of it.") | |||
| 1763 | (unless (looking-at (concat gnus-uu-begin-string "\\|" | 1763 | (unless (looking-at (concat gnus-uu-begin-string "\\|" |
| 1764 | gnus-uu-end-string)) | 1764 | gnus-uu-end-string)) |
| 1765 | (when (not found) | 1765 | (when (not found) |
| 1766 | (setq length (- (point-at-eol) (point-at-bol)))) | 1766 | (setq length (- (line-end-position) (line-beginning-position)))) |
| 1767 | (setq found t) | 1767 | (setq found t) |
| 1768 | (beginning-of-line) | 1768 | (beginning-of-line) |
| 1769 | (setq beg (point)) | 1769 | (setq beg (point)) |
| @@ -2068,7 +2068,7 @@ If no file has been included, the user will be asked for a file." | |||
| 2068 | (goto-char (point-min)) | 2068 | (goto-char (point-min)) |
| 2069 | (re-search-forward | 2069 | (re-search-forward |
| 2070 | (concat "^" (regexp-quote mail-header-separator) "$") nil t) | 2070 | (concat "^" (regexp-quote mail-header-separator) "$") nil t) |
| 2071 | (setq header (buffer-substring (point-min) (point-at-bol))) | 2071 | (setq header (buffer-substring (point-min) (line-beginning-position))) |
| 2072 | 2072 | ||
| 2073 | (goto-char (point-min)) | 2073 | (goto-char (point-min)) |
| 2074 | (when gnus-uu-post-separate-description | 2074 | (when gnus-uu-post-separate-description |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index da05a768e3b..b98e623db80 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -2185,7 +2185,7 @@ see `message-narrow-to-headers-or-head'." | |||
| 2185 | (progn | 2185 | (progn |
| 2186 | (forward-line 1) | 2186 | (forward-line 1) |
| 2187 | (if (re-search-forward "^[^ \n\t]" nil t) | 2187 | (if (re-search-forward "^[^ \n\t]" nil t) |
| 2188 | (point-at-bol) | 2188 | (line-beginning-position) |
| 2189 | (point-max)))) | 2189 | (point-max)))) |
| 2190 | (goto-char (point-min))) | 2190 | (goto-char (point-min))) |
| 2191 | 2191 | ||
| @@ -3664,7 +3664,7 @@ Message buffers and is not meant to be called directly." | |||
| 3664 | (save-excursion | 3664 | (save-excursion |
| 3665 | (save-restriction | 3665 | (save-restriction |
| 3666 | (widen) | 3666 | (widen) |
| 3667 | (let ((bound (+ (point-at-eol) 1)) case-fold-search) | 3667 | (let ((bound (+ (line-end-position) 1)) case-fold-search) |
| 3668 | (goto-char (point-min)) | 3668 | (goto-char (point-min)) |
| 3669 | (not (search-forward (concat "\n" mail-header-separator "\n") | 3669 | (not (search-forward (concat "\n" mail-header-separator "\n") |
| 3670 | bound t)))))) | 3670 | bound t)))))) |
| @@ -5671,11 +5671,11 @@ Otherwise, generate and save a value for `canlock-password' first." | |||
| 5671 | (goto-char (point-max)) | 5671 | (goto-char (point-max)) |
| 5672 | (if (not (re-search-backward message-signature-separator nil t)) | 5672 | (if (not (re-search-backward message-signature-separator nil t)) |
| 5673 | t | 5673 | t |
| 5674 | (setq sig-start (1+ (point-at-eol))) | 5674 | (setq sig-start (1+ (line-end-position))) |
| 5675 | (setq sig-end | 5675 | (setq sig-end |
| 5676 | (if (re-search-forward | 5676 | (if (re-search-forward |
| 5677 | "<#/?\\(multipart\\|part\\|external\\|mml\\)" nil t) | 5677 | "<#/?\\(multipart\\|part\\|external\\|mml\\)" nil t) |
| 5678 | (- (point-at-bol) 1) | 5678 | (- (line-beginning-position) 1) |
| 5679 | (point-max))) | 5679 | (point-max))) |
| 5680 | (if (>= (count-lines sig-start sig-end) 5) | 5680 | (if (>= (count-lines sig-start sig-end) 5) |
| 5681 | (if (message-gnksa-enable-p 'signature) | 5681 | (if (message-gnksa-enable-p 'signature) |
| @@ -6361,7 +6361,7 @@ Headers already prepared in the buffer are not modified." | |||
| 6361 | (forward-line -1))) | 6361 | (forward-line -1))) |
| 6362 | ;; The value of this header was empty, so we clear | 6362 | ;; The value of this header was empty, so we clear |
| 6363 | ;; totally and insert the new value. | 6363 | ;; totally and insert the new value. |
| 6364 | (delete-region (point) (point-at-eol)) | 6364 | (delete-region (point) (line-end-position)) |
| 6365 | ;; If the header is optional, and the header was | 6365 | ;; If the header is optional, and the header was |
| 6366 | ;; empty, we can't insert it anyway. | 6366 | ;; empty, we can't insert it anyway. |
| 6367 | (unless optionalp | 6367 | (unless optionalp |
| @@ -6616,10 +6616,10 @@ beginning of a folded header)." | |||
| 6616 | (or (eq (char-after) ?\s) (eq (char-after) ?\t))) | 6616 | (or (eq (char-after) ?\s) (eq (char-after) ?\t))) |
| 6617 | (beginning-of-line 0))) | 6617 | (beginning-of-line 0))) |
| 6618 | (when (or (eq (char-after) ?\s) (eq (char-after) ?\t) | 6618 | (when (or (eq (char-after) ?\s) (eq (char-after) ?\t) |
| 6619 | (search-forward ":" (point-at-eol) t)) | 6619 | (search-forward ":" (line-end-position) t)) |
| 6620 | ;; We are a bit more lacks than the RFC and allow any positive number of WSP | 6620 | ;; We are a bit more lacks than the RFC and allow any positive number of WSP |
| 6621 | ;; characters. | 6621 | ;; characters. |
| 6622 | (skip-chars-forward " \t" (point-at-eol)) | 6622 | (skip-chars-forward " \t" (line-end-position)) |
| 6623 | (point))) | 6623 | (point))) |
| 6624 | 6624 | ||
| 6625 | (defun message-beginning-of-line (&optional n) | 6625 | (defun message-beginning-of-line (&optional n) |
| @@ -8642,7 +8642,7 @@ From headers in the original article." | |||
| 8642 | (autoload 'ecomplete-display-matches "ecomplete") | 8642 | (autoload 'ecomplete-display-matches "ecomplete") |
| 8643 | 8643 | ||
| 8644 | (defun message--in-tocc-p () | 8644 | (defun message--in-tocc-p () |
| 8645 | (and (memq (char-after (point-at-bol)) '(?C ?T ?\t ? )) | 8645 | (and (memq (char-after (line-beginning-position)) '(?C ?T ?\t ? )) |
| 8646 | (message-point-in-header-p) | 8646 | (message-point-in-header-p) |
| 8647 | (save-excursion | 8647 | (save-excursion |
| 8648 | (beginning-of-line) | 8648 | (beginning-of-line) |
diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index 5f9903a5b06..1a699d0e705 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el | |||
| @@ -307,7 +307,7 @@ | |||
| 307 | (while (re-search-forward | 307 | (while (re-search-forward |
| 308 | "^X-Gnus-Newsgroup:" | 308 | "^X-Gnus-Newsgroup:" |
| 309 | (save-excursion (search-forward "\n\n" nil t) (point)) t) | 309 | (save-excursion (search-forward "\n\n" nil t) (point)) t) |
| 310 | (delete-region (point-at-bol) (progn (forward-line 1) (point)))) | 310 | (delete-region (line-beginning-position) (progn (forward-line 1) (point)))) |
| 311 | (setq result (eval accept-form t)) | 311 | (setq result (eval accept-form t)) |
| 312 | (kill-buffer (current-buffer)) | 312 | (kill-buffer (current-buffer)) |
| 313 | result) | 313 | result) |
| @@ -424,7 +424,7 @@ | |||
| 424 | (defun nnbabyl-delete-mail (&optional force leave-delim) | 424 | (defun nnbabyl-delete-mail (&optional force leave-delim) |
| 425 | ;; Delete the current X-Gnus-Newsgroup line. | 425 | ;; Delete the current X-Gnus-Newsgroup line. |
| 426 | (unless force | 426 | (unless force |
| 427 | (delete-region (point-at-bol) (progn (forward-line 1) (point)))) | 427 | (delete-region (line-beginning-position) (progn (forward-line 1) (point)))) |
| 428 | ;; Beginning of the article. | 428 | ;; Beginning of the article. |
| 429 | (save-excursion | 429 | (save-excursion |
| 430 | (save-restriction | 430 | (save-restriction |
| @@ -630,7 +630,8 @@ | |||
| 630 | (while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) " nil t) | 630 | (while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) " nil t) |
| 631 | (if (gethash (setq id (match-string 1)) idents) | 631 | (if (gethash (setq id (match-string 1)) idents) |
| 632 | (progn | 632 | (progn |
| 633 | (delete-region (point-at-bol) (progn (forward-line 1) (point))) | 633 | (delete-region (line-beginning-position) |
| 634 | (progn (forward-line 1) (point))) | ||
| 634 | (nnheader-message 7 "Moving %s..." id) | 635 | (nnheader-message 7 "Moving %s..." id) |
| 635 | (nnbabyl-save-mail | 636 | (nnbabyl-save-mail |
| 636 | (nnmail-article-group 'nnbabyl-active-number))) | 637 | (nnmail-article-group 'nnbabyl-active-number))) |
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 14540ac7e87..27204b3618a 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el | |||
| @@ -862,7 +862,7 @@ all. This may very well take some time.") | |||
| 862 | (search-forward id nil t)) ; We find the ID. | 862 | (search-forward id nil t)) ; We find the ID. |
| 863 | ;; And the id is in the fourth field. | 863 | ;; And the id is in the fourth field. |
| 864 | (if (not (and (search-backward "\t" nil t 4) | 864 | (if (not (and (search-backward "\t" nil t 4) |
| 865 | (not (search-backward"\t" (point-at-bol) t)))) | 865 | (not (search-backward"\t" (line-beginning-position) t)))) |
| 866 | (forward-line 1) | 866 | (forward-line 1) |
| 867 | (beginning-of-line) | 867 | (beginning-of-line) |
| 868 | (setq found t) | 868 | (setq found t) |
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index a2b461c15f0..c47a398c4c2 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el | |||
| @@ -179,7 +179,7 @@ all. This may very well take some time.") | |||
| 179 | (goto-char (match-end 0)) | 179 | (goto-char (match-end 0)) |
| 180 | (setq num (string-to-number | 180 | (setq num (string-to-number |
| 181 | (buffer-substring | 181 | (buffer-substring |
| 182 | (point) (point-at-eol)))) | 182 | (point) (line-end-position)))) |
| 183 | (goto-char start) | 183 | (goto-char start) |
| 184 | (< num article))) | 184 | (< num article))) |
| 185 | ;; Check that we are before an article with a | 185 | ;; Check that we are before an article with a |
| @@ -189,7 +189,7 @@ all. This may very well take some time.") | |||
| 189 | (progn | 189 | (progn |
| 190 | (setq num (string-to-number | 190 | (setq num (string-to-number |
| 191 | (buffer-substring | 191 | (buffer-substring |
| 192 | (point) (point-at-eol)))) | 192 | (point) (line-end-position)))) |
| 193 | (> num article)) | 193 | (> num article)) |
| 194 | ;; Discard any article numbers before the one we're | 194 | ;; Discard any article numbers before the one we're |
| 195 | ;; now looking at. | 195 | ;; now looking at. |
| @@ -259,7 +259,7 @@ all. This may very well take some time.") | |||
| 259 | (if (search-forward (concat "\n" nnfolder-article-marker) | 259 | (if (search-forward (concat "\n" nnfolder-article-marker) |
| 260 | nil t) | 260 | nil t) |
| 261 | (string-to-number (buffer-substring | 261 | (string-to-number (buffer-substring |
| 262 | (point) (point-at-eol))) | 262 | (point) (line-end-position))) |
| 263 | -1)))))))) | 263 | -1)))))))) |
| 264 | 264 | ||
| 265 | (deffoo nnfolder-request-group (group &optional server dont-check _info) | 265 | (deffoo nnfolder-request-group (group &optional server dont-check _info) |
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 634cc251b87..b91798b8a0c 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el | |||
| @@ -188,7 +188,7 @@ on your system, you could say something like: | |||
| 188 | 188 | ||
| 189 | (defsubst nnheader-header-value () | 189 | (defsubst nnheader-header-value () |
| 190 | (skip-chars-forward " \t") | 190 | (skip-chars-forward " \t") |
| 191 | (buffer-substring (point) (point-at-eol))) | 191 | (buffer-substring (point) (line-end-position))) |
| 192 | 192 | ||
| 193 | (autoload 'ietf-drums-unfold-fws "ietf-drums") | 193 | (autoload 'ietf-drums-unfold-fws "ietf-drums") |
| 194 | 194 | ||
| @@ -397,7 +397,7 @@ leaving the original buffer untouched." | |||
| 397 | (autoload 'gnus-extract-message-id-from-in-reply-to "gnus-sum") | 397 | (autoload 'gnus-extract-message-id-from-in-reply-to "gnus-sum") |
| 398 | 398 | ||
| 399 | (defun nnheader-parse-nov (&optional number) | 399 | (defun nnheader-parse-nov (&optional number) |
| 400 | (let ((eol (point-at-eol)) | 400 | (let ((eol (line-end-position)) |
| 401 | references in-reply-to x header) | 401 | references in-reply-to x header) |
| 402 | (setq header | 402 | (setq header |
| 403 | (make-full-mail-header | 403 | (make-full-mail-header |
| @@ -632,7 +632,7 @@ the line could be found." | |||
| 632 | ;; This is invalid, but not all articles have Message-IDs. | 632 | ;; This is invalid, but not all articles have Message-IDs. |
| 633 | () | 633 | () |
| 634 | (mail-position-on-field "References") | 634 | (mail-position-on-field "References") |
| 635 | (let ((begin (point-at-bol)) | 635 | (let ((begin (line-beginning-position)) |
| 636 | (fill-column 78) | 636 | (fill-column 78) |
| 637 | (fill-prefix "\t")) | 637 | (fill-prefix "\t")) |
| 638 | (when references | 638 | (when references |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index bde0de98924..afa14448fc7 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -661,7 +661,7 @@ nn*-request-list should have been called before calling this function." | |||
| 661 | (while (not (eobp)) | 661 | (while (not (eobp)) |
| 662 | (condition-case nil | 662 | (condition-case nil |
| 663 | (progn | 663 | (progn |
| 664 | (narrow-to-region (point) (point-at-eol)) | 664 | (narrow-to-region (point) (line-end-position)) |
| 665 | (setq group (read buffer) | 665 | (setq group (read buffer) |
| 666 | group | 666 | group |
| 667 | (cond ((symbolp group) | 667 | (cond ((symbolp group) |
| @@ -1116,7 +1116,7 @@ FUNC will be called with the group name to determine the article number." | |||
| 1116 | (while (not (eobp)) | 1116 | (while (not (eobp)) |
| 1117 | (unless (< (move-to-column nnmail-split-header-length-limit) | 1117 | (unless (< (move-to-column nnmail-split-header-length-limit) |
| 1118 | nnmail-split-header-length-limit) | 1118 | nnmail-split-header-length-limit) |
| 1119 | (delete-region (point) (point-at-eol))) | 1119 | (delete-region (point) (line-end-position))) |
| 1120 | (forward-line 1)) | 1120 | (forward-line 1)) |
| 1121 | ;; Allow washing. | 1121 | ;; Allow washing. |
| 1122 | (goto-char (point-min)) | 1122 | (goto-char (point-min)) |
| @@ -1650,7 +1650,7 @@ See the documentation for the variable `nnmail-split-fancy' for details." | |||
| 1650 | (skip-chars-forward "^\n\r\t") | 1650 | (skip-chars-forward "^\n\r\t") |
| 1651 | (unless (looking-at "[\r\n]") | 1651 | (unless (looking-at "[\r\n]") |
| 1652 | (forward-char 1) | 1652 | (forward-char 1) |
| 1653 | (buffer-substring (point) (point-at-eol))))))) | 1653 | (buffer-substring (point) (line-end-position))))))) |
| 1654 | 1654 | ||
| 1655 | ;; Function for nnmail-split-fancy: look up all references in the | 1655 | ;; Function for nnmail-split-fancy: look up all references in the |
| 1656 | ;; cache and if a match is found, return that group. | 1656 | ;; cache and if a match is found, return that group. |
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index 8c811b0c6c0..b1eee2d5308 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el | |||
| @@ -574,7 +574,7 @@ Other back ends might or might not work.") | |||
| 574 | (gnus-group-get-parameter qualgroup 'folder))) | 574 | (gnus-group-get-parameter qualgroup 'folder))) |
| 575 | (progn | 575 | (progn |
| 576 | (replace-match cur) | 576 | (replace-match cur) |
| 577 | (delete-region cpoint (point-at-bol)) | 577 | (delete-region cpoint (line-beginning-position)) |
| 578 | (forward-line) | 578 | (forward-line) |
| 579 | (setq cpoint (point))) | 579 | (setq cpoint (point))) |
| 580 | (forward-line))) | 580 | (forward-line))) |
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index ae726ba0f7b..40e4b9ea828 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el | |||
| @@ -601,7 +601,7 @@ non-nil.") | |||
| 601 | (search-forward id nil t)) ; We find the ID. | 601 | (search-forward id nil t)) ; We find the ID. |
| 602 | ;; And the id is in the fourth field. | 602 | ;; And the id is in the fourth field. |
| 603 | (if (not (and (search-backward "\t" nil t 4) | 603 | (if (not (and (search-backward "\t" nil t 4) |
| 604 | (not (search-backward "\t" (point-at-bol) t)))) | 604 | (not (search-backward "\t" (line-beginning-position) t)))) |
| 605 | (forward-line 1) | 605 | (forward-line 1) |
| 606 | (beginning-of-line) | 606 | (beginning-of-line) |
| 607 | (setq found t) | 607 | (setq found t) |
| @@ -755,7 +755,7 @@ article number. This function is called narrowed to an article." | |||
| 755 | (nnheader-insert-nov headers))) | 755 | (nnheader-insert-nov headers))) |
| 756 | 756 | ||
| 757 | (defsubst nnml-header-value () | 757 | (defsubst nnml-header-value () |
| 758 | (buffer-substring (match-end 0) (point-at-eol))) | 758 | (buffer-substring (match-end 0) (line-end-position))) |
| 759 | 759 | ||
| 760 | (defun nnml-parse-head (chars &optional number) | 760 | (defun nnml-parse-head (chars &optional number) |
| 761 | "Parse the head of the current buffer." | 761 | "Parse the head of the current buffer." |
| @@ -1061,7 +1061,7 @@ Use the nov database for the current group if available." | |||
| 1061 | (regexp-quote | 1061 | (regexp-quote |
| 1062 | (concat group ":" old-number-string)) | 1062 | (concat group ":" old-number-string)) |
| 1063 | "\\>") | 1063 | "\\>") |
| 1064 | (point-at-eol) t)) | 1064 | (line-end-position) t)) |
| 1065 | (replace-match | 1065 | (replace-match |
| 1066 | (concat group ":" new-number-string))) | 1066 | (concat group ":" new-number-string))) |
| 1067 | ;; Save to the new file: | 1067 | ;; Save to the new file: |
| @@ -1109,7 +1109,7 @@ Use the nov database for the current group if available." | |||
| 1109 | (regexp-quote | 1109 | (regexp-quote |
| 1110 | (concat group ":" old-number-string)) | 1110 | (concat group ":" old-number-string)) |
| 1111 | "\\>") | 1111 | "\\>") |
| 1112 | (point-at-eol) t) | 1112 | (line-end-position) t) |
| 1113 | (replace-match | 1113 | (replace-match |
| 1114 | (concat "\\1" group ":" new-number-string)))))) | 1114 | (concat "\\1" group ":" new-number-string)))))) |
| 1115 | ;; 4/ Possibly remove the article from the backlog: | 1115 | ;; 4/ Possibly remove the article from the backlog: |
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 6fa424a1555..6dea405d02b 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el | |||
| @@ -480,7 +480,7 @@ retried once before actually displaying the error report." | |||
| 480 | (goto-char pos) | 480 | (goto-char pos) |
| 481 | (if (looking-at (regexp-quote command)) | 481 | (if (looking-at (regexp-quote command)) |
| 482 | (delete-region pos (progn (forward-line 1) | 482 | (delete-region pos (progn (forward-line 1) |
| 483 | (point-at-bol))))))) | 483 | (line-beginning-position))))))) |
| 484 | (nnheader-report 'nntp "Couldn't open connection to %s." | 484 | (nnheader-report 'nntp "Couldn't open connection to %s." |
| 485 | nntp-address)))) | 485 | nntp-address)))) |
| 486 | 486 | ||
| @@ -503,7 +503,7 @@ retried once before actually displaying the error report." | |||
| 503 | (goto-char pos) | 503 | (goto-char pos) |
| 504 | (if (looking-at (regexp-quote command)) | 504 | (if (looking-at (regexp-quote command)) |
| 505 | (delete-region pos (progn (forward-line 1) | 505 | (delete-region pos (progn (forward-line 1) |
| 506 | (point-at-bol))))))) | 506 | (line-beginning-position))))))) |
| 507 | (nnheader-report 'nntp "Couldn't open connection to %s." | 507 | (nnheader-report 'nntp "Couldn't open connection to %s." |
| 508 | nntp-address)))) | 508 | nntp-address)))) |
| 509 | 509 | ||
| @@ -528,7 +528,8 @@ retried once before actually displaying the error report." | |||
| 528 | (with-current-buffer buffer | 528 | (with-current-buffer buffer |
| 529 | (goto-char pos) | 529 | (goto-char pos) |
| 530 | (if (looking-at (regexp-quote command)) | 530 | (if (looking-at (regexp-quote command)) |
| 531 | (delete-region pos (progn (forward-line 1) (point-at-bol)))) | 531 | (delete-region pos (progn (forward-line 1) |
| 532 | (line-beginning-position)))) | ||
| 532 | ))) | 533 | ))) |
| 533 | (nnheader-report 'nntp "Couldn't open connection to %s." | 534 | (nnheader-report 'nntp "Couldn't open connection to %s." |
| 534 | nntp-address)))) | 535 | nntp-address)))) |
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index 7b192aa1d2e..e150cbf2b46 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el | |||
| @@ -387,7 +387,7 @@ lines have the correct component server prefix." | |||
| 387 | (looking-at | 387 | (looking-at |
| 388 | "[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t") | 388 | "[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t") |
| 389 | (goto-char (match-end 0)) | 389 | (goto-char (match-end 0)) |
| 390 | (unless (search-forward "\t" (point-at-eol) 'move) | 390 | (unless (search-forward "\t" (line-end-position) 'move) |
| 391 | (insert "\t")) | 391 | (insert "\t")) |
| 392 | 392 | ||
| 393 | ;; Remove any spaces at the beginning of the Xref field. | 393 | ;; Remove any spaces at the beginning of the Xref field. |
| @@ -403,8 +403,8 @@ lines have the correct component server prefix." | |||
| 403 | ;; component server prefix. | 403 | ;; component server prefix. |
| 404 | (save-restriction | 404 | (save-restriction |
| 405 | (narrow-to-region (point) | 405 | (narrow-to-region (point) |
| 406 | (or (search-forward "\t" (point-at-eol) t) | 406 | (or (search-forward "\t" (line-end-position) t) |
| 407 | (point-at-eol))) | 407 | (line-end-position))) |
| 408 | (goto-char (point-min)) | 408 | (goto-char (point-min)) |
| 409 | (when (re-search-forward "Xref: *[^\n:0-9 ]+ *" nil t) | 409 | (when (re-search-forward "Xref: *[^\n:0-9 ]+ *" nil t) |
| 410 | (replace-match "" t t)) | 410 | (replace-match "" t t)) |
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 87b5551d31c..fd2791f5c51 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el | |||
| @@ -519,7 +519,7 @@ A string or a list of strings is returned." | |||
| 519 | (goto-char b) | 519 | (goto-char b) |
| 520 | (let (res) | 520 | (let (res) |
| 521 | (while (< (point) e) | 521 | (while (< (point) e) |
| 522 | (let ((str (buffer-substring (point) (point-at-eol)))) | 522 | (let ((str (buffer-substring (point) (line-end-position)))) |
| 523 | (unless (string= "" str) | 523 | (unless (string= "" str) |
| 524 | (push str res))) | 524 | (push str res))) |
| 525 | (forward-line)) | 525 | (forward-line)) |
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 334204768b4..014b8254fa0 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el | |||
| @@ -291,7 +291,7 @@ symbol `ask', query before flushing the queue file." | |||
| 291 | (goto-char (point-min)) | 291 | (goto-char (point-min)) |
| 292 | (while (and (not (eobp)) | 292 | (while (and (not (eobp)) |
| 293 | (re-search-forward | 293 | (re-search-forward |
| 294 | "http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t)) | 294 | "http://\\([^/]+\\)\\(/.*\\) *$" (line-end-position) t)) |
| 295 | (let ((spam-report-gmane-wait | 295 | (let ((spam-report-gmane-wait |
| 296 | (zerop (% (line-number-at-pos) spam-report-gmane-max-requests)))) | 296 | (zerop (% (line-number-at-pos) spam-report-gmane-max-requests)))) |
| 297 | (gnus-message 6 "Reporting %s%s..." | 297 | (gnus-message 6 "Reporting %s%s..." |
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 2883a6186bd..e0d90e5547a 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el | |||
| @@ -2132,7 +2132,7 @@ See `spam-ifile-database'." | |||
| 2132 | ;; check the return now (we're back in the temp buffer) | 2132 | ;; check the return now (we're back in the temp buffer) |
| 2133 | (goto-char (point-min)) | 2133 | (goto-char (point-min)) |
| 2134 | (if (not (eobp)) | 2134 | (if (not (eobp)) |
| 2135 | (setq category (buffer-substring (point) (point-at-eol)))) | 2135 | (setq category (buffer-substring (point) (line-end-position)))) |
| 2136 | (when (not (zerop (length category))) ; we need a category here | 2136 | (when (not (zerop (length category))) ; we need a category here |
| 2137 | (if spam-ifile-all-categories | 2137 | (if spam-ifile-all-categories |
| 2138 | (setq return category) | 2138 | (setq return category) |
| @@ -2321,7 +2321,7 @@ With a non-nil REMOVE, remove the ADDRESSES." | |||
| 2321 | (with-temp-buffer | 2321 | (with-temp-buffer |
| 2322 | (insert-file-contents file) | 2322 | (insert-file-contents file) |
| 2323 | (while (not (eobp)) | 2323 | (while (not (eobp)) |
| 2324 | (setq address (buffer-substring (point) (point-at-eol))) | 2324 | (setq address (buffer-substring (point) (line-end-position))) |
| 2325 | (forward-line 1) | 2325 | (forward-line 1) |
| 2326 | ;; insert the e-mail address if detected, otherwise the raw data | 2326 | ;; insert the e-mail address if detected, otherwise the raw data |
| 2327 | (unless (zerop (length address)) | 2327 | (unless (zerop (length address)) |
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 63752f953a7..a6e508155f6 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el | |||
| @@ -310,7 +310,7 @@ matches may be returned from the message body." | |||
| 310 | (buffer-substring-no-properties | 310 | (buffer-substring-no-properties |
| 311 | opoint (point))))) | 311 | opoint (point))))) |
| 312 | (if delete | 312 | (if delete |
| 313 | (delete-region (point-at-bol) (point))))) | 313 | (delete-region (line-beginning-position) (point))))) |
| 314 | (if list | 314 | (if list |
| 315 | value | 315 | value |
| 316 | (and (not (string= value "")) value))) | 316 | (and (not (string= value "")) value))) |
| @@ -326,7 +326,8 @@ matches may be returned from the message body." | |||
| 326 | (prog1 | 326 | (prog1 |
| 327 | (buffer-substring-no-properties opoint (point)) | 327 | (buffer-substring-no-properties opoint (point)) |
| 328 | (if delete | 328 | (if delete |
| 329 | (delete-region (point-at-bol) (1+ (point)))))))))))) | 329 | (delete-region (line-beginning-position) |
| 330 | (1+ (point)))))))))))) | ||
| 330 | 331 | ||
| 331 | ;; Parse a list of tokens separated by commas. | 332 | ;; Parse a list of tokens separated by commas. |
| 332 | ;; It runs from point to the end of the visible part of the buffer. | 333 | ;; It runs from point to the end of the visible part of the buffer. |
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 86711a4543f..0e0fb512003 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el | |||
| @@ -394,7 +394,7 @@ with a space." | |||
| 394 | (let (p) | 394 | (let (p) |
| 395 | (save-excursion | 395 | (save-excursion |
| 396 | (while (>= (current-column) fill-column) | 396 | (while (>= (current-column) fill-column) |
| 397 | (while (and (search-backward "," (point-at-bol) 'move) | 397 | (while (and (search-backward "," (line-beginning-position) 'move) |
| 398 | (>= (current-column) (1- fill-column)) | 398 | (>= (current-column) (1- fill-column)) |
| 399 | (setq p (point)))) | 399 | (setq p (point)))) |
| 400 | (when (or (not (bolp)) | 400 | (when (or (not (bolp)) |
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index 2ab4fa411a6..0673493487a 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el | |||
| @@ -264,7 +264,7 @@ Buffer is not displayed if SHOW is non-nil." | |||
| 264 | (delete-char 1)))) | 264 | (delete-char 1)))) |
| 265 | 265 | ||
| 266 | (message "folder %s spool %s" folder-name spool-name) | 266 | (message "folder %s spool %s" folder-name spool-name) |
| 267 | (forward-line (if (eq (count-lines (point-min) (point-at-eol)) | 267 | (forward-line (if (eq (count-lines (point-min) (line-end-position)) |
| 268 | mspools-files-len) | 268 | mspools-files-len) |
| 269 | ;; FIXME: Why use `mspools-files-len' instead | 269 | ;; FIXME: Why use `mspools-files-len' instead |
| 270 | ;; of looking if we're on the last line and | 270 | ;; of looking if we're on the last line and |
| @@ -307,7 +307,7 @@ Buffer is not displayed if SHOW is non-nil." | |||
| 307 | 307 | ||
| 308 | (defun mspools-get-spool-name () | 308 | (defun mspools-get-spool-name () |
| 309 | "Return the name of the spool on the current line." | 309 | "Return the name of the spool on the current line." |
| 310 | (let ((line-num (1- (count-lines (point-min) (point-at-eol))))) | 310 | (let ((line-num (1- (count-lines (point-min) (line-end-position))))) |
| 311 | ;; FIXME: Why not extract the name directly from the current line's text? | 311 | ;; FIXME: Why not extract the name directly from the current line's text? |
| 312 | (car (nth line-num mspools-files)))) | 312 | (car (nth line-num mspools-files)))) |
| 313 | 313 | ||
diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el index 67874d508b1..abb95a63f16 100644 --- a/lisp/mail/rfc2047.el +++ b/lisp/mail/rfc2047.el | |||
| @@ -175,7 +175,7 @@ This is either `base64' or `quoted-printable'." | |||
| 175 | (progn | 175 | (progn |
| 176 | (forward-line 1) | 176 | (forward-line 1) |
| 177 | (if (re-search-forward "^[^ \n\t]" nil t) | 177 | (if (re-search-forward "^[^ \n\t]" nil t) |
| 178 | (point-at-bol) | 178 | (line-beginning-position) |
| 179 | (point-max)))) | 179 | (point-max)))) |
| 180 | (goto-char (point-min))) | 180 | (goto-char (point-min))) |
| 181 | 181 | ||
| @@ -681,14 +681,14 @@ Point moves to the end of the region." | |||
| 681 | (goto-char b) | 681 | (goto-char b) |
| 682 | (setq b (point-marker) | 682 | (setq b (point-marker) |
| 683 | e (set-marker (make-marker) e)) | 683 | e (set-marker (make-marker) e)) |
| 684 | (rfc2047-fold-region (point-at-bol) b) | 684 | (rfc2047-fold-region (line-beginning-position) b) |
| 685 | (goto-char b) | 685 | (goto-char b) |
| 686 | (skip-chars-backward "^ \t\n") | 686 | (skip-chars-backward "^ \t\n") |
| 687 | (unless (= 0 (skip-chars-backward " \t")) | 687 | (unless (= 0 (skip-chars-backward " \t")) |
| 688 | ;; `crest' may contain whitespace and an open parenthesis. | 688 | ;; `crest' may contain whitespace and an open parenthesis. |
| 689 | (setq crest (buffer-substring-no-properties (point) b))) | 689 | (setq crest (buffer-substring-no-properties (point) b))) |
| 690 | (setq eword (rfc2047-encode-1 | 690 | (setq eword (rfc2047-encode-1 |
| 691 | (- b (point-at-bol)) | 691 | (- b (line-beginning-position)) |
| 692 | (replace-regexp-in-string | 692 | (replace-regexp-in-string |
| 693 | "\n\\([ \t]?\\)" "\\1" | 693 | "\n\\([ \t]?\\)" "\\1" |
| 694 | (buffer-substring-no-properties b e)) | 694 | (buffer-substring-no-properties b e)) |
| @@ -824,18 +824,18 @@ Return the new end point." | |||
| 824 | (goto-char (point-min)) | 824 | (goto-char (point-min)) |
| 825 | (let ((bol (save-restriction | 825 | (let ((bol (save-restriction |
| 826 | (widen) | 826 | (widen) |
| 827 | (point-at-bol))) | 827 | (line-beginning-position))) |
| 828 | (eol (point-at-eol))) | 828 | (eol (line-end-position))) |
| 829 | (forward-line 1) | 829 | (forward-line 1) |
| 830 | (while (not (eobp)) | 830 | (while (not (eobp)) |
| 831 | (if (and (looking-at "[ \t]") | 831 | (if (and (looking-at "[ \t]") |
| 832 | (< (- (point-at-eol) bol) 76)) | 832 | (< (- (line-end-position) bol) 76)) |
| 833 | (delete-region eol (progn | 833 | (delete-region eol (progn |
| 834 | (goto-char eol) | 834 | (goto-char eol) |
| 835 | (skip-chars-forward "\r\n") | 835 | (skip-chars-forward "\r\n") |
| 836 | (point))) | 836 | (point))) |
| 837 | (setq bol (point-at-bol))) | 837 | (setq bol (line-beginning-position))) |
| 838 | (setq eol (point-at-eol)) | 838 | (setq eol (line-end-position)) |
| 839 | (forward-line 1))))) | 839 | (forward-line 1))))) |
| 840 | 840 | ||
| 841 | (defun rfc2047-b-encode-string (string) | 841 | (defun rfc2047-b-encode-string (string) |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 189ad075c47..387792eb310 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -1293,7 +1293,7 @@ external program defined by `sendmail-program'." | |||
| 1293 | ;; should override any specified in the message itself. | 1293 | ;; should override any specified in the message itself. |
| 1294 | (when where-content-type | 1294 | (when where-content-type |
| 1295 | (goto-char where-content-type) | 1295 | (goto-char where-content-type) |
| 1296 | (delete-region (point-at-bol) | 1296 | (delete-region (line-beginning-position) |
| 1297 | (progn (forward-line 1) (point))))))) | 1297 | (progn (forward-line 1) (point))))))) |
| 1298 | ;; Insert an extra newline if we need it to work around | 1298 | ;; Insert an extra newline if we need it to work around |
| 1299 | ;; Sun's bug that swallows newlines. | 1299 | ;; Sun's bug that swallows newlines. |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 45b25b55301..c2f8f273772 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -474,7 +474,7 @@ for `smtpmail-try-auth-method'.") | |||
| 474 | (smtpmail--sanitize-error-message result)))))) | 474 | (smtpmail--sanitize-error-message result)))))) |
| 475 | (delete-file file-data) | 475 | (delete-file file-data) |
| 476 | (delete-file file-elisp) | 476 | (delete-file file-elisp) |
| 477 | (delete-region (point-at-bol) (point-at-bol 2))) | 477 | (delete-region (line-beginning-position) (line-beginning-position 2))) |
| 478 | (write-region (point-min) (point-max) qfile)))) | 478 | (write-region (point-min) (point-max) qfile)))) |
| 479 | 479 | ||
| 480 | (defun smtpmail--sanitize-error-message (string) | 480 | (defun smtpmail--sanitize-error-message (string) |
| @@ -1057,7 +1057,8 @@ Returns an error if the server cannot be contacted." | |||
| 1057 | (while data-continue | 1057 | (while data-continue |
| 1058 | (with-current-buffer buffer | 1058 | (with-current-buffer buffer |
| 1059 | (progress-reporter-update pr (point)) | 1059 | (progress-reporter-update pr (point)) |
| 1060 | (setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) | 1060 | (setq sending-data (buffer-substring (line-beginning-position) |
| 1061 | (line-end-position))) | ||
| 1061 | (end-of-line 2) | 1062 | (end-of-line 2) |
| 1062 | (setq data-continue (not (eobp)))) | 1063 | (setq data-continue (not (eobp)))) |
| 1063 | (smtpmail-send-data-1 process sending-data)) | 1064 | (smtpmail-send-data-1 process sending-data)) |
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index 8339273fc9b..c82a1a53baf 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el | |||
| @@ -802,7 +802,7 @@ that note messages to be refiled." | |||
| 802 | "Return a list of message numbers from point to the end of the line. | 802 | "Return a list of message numbers from point to the end of the line. |
| 803 | Expands ranges into set of individual numbers." | 803 | Expands ranges into set of individual numbers." |
| 804 | (let ((msgs ()) | 804 | (let ((msgs ()) |
| 805 | (end-of-line (point-at-eol)) | 805 | (end-of-line (line-end-position)) |
| 806 | num) | 806 | num) |
| 807 | (while (re-search-forward "[0-9]+" end-of-line t) | 807 | (while (re-search-forward "[0-9]+" end-of-line t) |
| 808 | (setq num (string-to-number (buffer-substring (match-beginning 0) | 808 | (setq num (string-to-number (buffer-substring (match-beginning 0) |
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index eb440ba6144..40cb25fca20 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el | |||
| @@ -856,7 +856,7 @@ non-nil, collect results from all servers." | |||
| 856 | (let* ((end (point)) | 856 | (let* ((end (point)) |
| 857 | (beg (save-excursion | 857 | (beg (save-excursion |
| 858 | (if (re-search-backward "\\([:,]\\|^\\)[ \t]*" | 858 | (if (re-search-backward "\\([:,]\\|^\\)[ \t]*" |
| 859 | (point-at-bol) 'move) | 859 | (line-beginning-position) 'move) |
| 860 | (goto-char (match-end 0))) | 860 | (goto-char (match-end 0))) |
| 861 | (point))) | 861 | (point))) |
| 862 | (query-words (split-string (buffer-substring-no-properties beg end) | 862 | (query-words (split-string (buffer-substring-no-properties beg end) |
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 0b6488292de..fe78fbe8339 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el | |||
| @@ -2556,7 +2556,7 @@ Return nil if no complete line has arrived." | |||
| 2556 | ;; next line for Courier IMAP bug. | 2556 | ;; next line for Courier IMAP bug. |
| 2557 | (skip-chars-forward " ") | 2557 | (skip-chars-forward " ") |
| 2558 | (point))) | 2558 | (point))) |
| 2559 | (> (skip-chars-forward "^ )" (point-at-eol)) 0)) | 2559 | (> (skip-chars-forward "^ )" (line-end-position)) 0)) |
| 2560 | (push (buffer-substring start (point)) flag-list)) | 2560 | (push (buffer-substring start (point)) flag-list)) |
| 2561 | (cl-assert (eq (char-after) ?\)) nil "In imap-parse-flag-list 2") | 2561 | (cl-assert (eq (char-after) ?\)) nil "In imap-parse-flag-list 2") |
| 2562 | (imap-forward) | 2562 | (imap-forward) |
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 0f2943cbb03..5e14589d19b 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el | |||
| @@ -694,7 +694,7 @@ an alist of attribute/value pairs." | |||
| 694 | (while (progn | 694 | (while (progn |
| 695 | (skip-chars-forward " \t\n") | 695 | (skip-chars-forward " \t\n") |
| 696 | (not (eobp))) | 696 | (not (eobp))) |
| 697 | (setq dn (buffer-substring (point) (point-at-eol))) | 697 | (setq dn (buffer-substring (point) (line-end-position))) |
| 698 | (forward-line 1) | 698 | (forward-line 1) |
| 699 | (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ | 699 | (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ |
| 700 | \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ | 700 | \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ |
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index e98767ae7c7..a1ac55bc7af 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el | |||
| @@ -541,7 +541,7 @@ The sort function is chosen according to the value of | |||
| 541 | (let ((inhibit-read-only t)) | 541 | (let ((inhibit-read-only t)) |
| 542 | (goto-char (point-min)) | 542 | (goto-char (point-min)) |
| 543 | (while (not (eobp)) | 543 | (while (not (eobp)) |
| 544 | (let* ((pos (point-at-eol)) | 544 | (let* ((pos (line-end-position)) |
| 545 | (item (get-text-property (point) :nt-item)) | 545 | (item (get-text-property (point) :nt-item)) |
| 546 | (age (newsticker--age item)) | 546 | (age (newsticker--age item)) |
| 547 | (selected (get-text-property (point) :nt-selected)) | 547 | (selected (get-text-property (point) :nt-selected)) |
| @@ -579,7 +579,8 @@ The sort function is chosen according to the value of | |||
| 579 | (newsticker--treeview-list-clear-highlight) | 579 | (newsticker--treeview-list-clear-highlight) |
| 580 | (with-current-buffer (newsticker--treeview-list-buffer) | 580 | (with-current-buffer (newsticker--treeview-list-buffer) |
| 581 | (let ((inhibit-read-only t)) | 581 | (let ((inhibit-read-only t)) |
| 582 | (put-text-property (point-at-bol) (point-at-eol) :nt-selected t)) | 582 | (put-text-property (line-beginning-position) (line-end-position) |
| 583 | :nt-selected t)) | ||
| 583 | (newsticker--treeview-list-update-faces))) | 584 | (newsticker--treeview-list-update-faces))) |
| 584 | 585 | ||
| 585 | (defun newsticker--treeview-list-highlight-start () | 586 | (defun newsticker--treeview-list-highlight-start () |
| @@ -1080,7 +1081,7 @@ Arguments are ignored." | |||
| 1080 | (with-current-buffer (newsticker--treeview-tree-buffer) | 1081 | (with-current-buffer (newsticker--treeview-tree-buffer) |
| 1081 | (goto-char pos) | 1082 | (goto-char pos) |
| 1082 | (move-overlay newsticker--tree-selection-overlay | 1083 | (move-overlay newsticker--tree-selection-overlay |
| 1083 | (point-at-bol) (1+ (point-at-eol)) | 1084 | (line-beginning-position) (1+ (line-end-position)) |
| 1084 | (current-buffer))) | 1085 | (current-buffer))) |
| 1085 | (if (window-live-p (newsticker--treeview-tree-window)) | 1086 | (if (window-live-p (newsticker--treeview-tree-window)) |
| 1086 | (set-window-point (newsticker--treeview-tree-window) pos))))) | 1087 | (set-window-point (newsticker--treeview-tree-window) pos))))) |
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el index de225d76dcc..9d59ddf978d 100644 --- a/lisp/net/pop3.el +++ b/lisp/net/pop3.el | |||
| @@ -469,7 +469,7 @@ Return non-nil if it is necessary to update the local UIDL file." | |||
| 469 | (delete-char -3) | 469 | (delete-char -3) |
| 470 | (if (eq (char-before) ?\)) | 470 | (if (eq (char-before) ?\)) |
| 471 | (insert ")\n ") | 471 | (insert ")\n ") |
| 472 | (goto-char (1+ (point-at-bol))) | 472 | (goto-char (1+ (line-beginning-position))) |
| 473 | (delete-region (point) (point-max))))) | 473 | (delete-region (point) (point-max))))) |
| 474 | (when (eq (char-before) ? ) | 474 | (when (eq (char-before) ? ) |
| 475 | (delete-char -2)) | 475 | (delete-char -2)) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 065398b64af..71505dcaa39 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -1640,7 +1640,7 @@ Create the buffer if it doesn't exist." | |||
| 1640 | (goto-char (point-max)) | 1640 | (goto-char (point-max)) |
| 1641 | (when (not (equal 0 (- (point) rcirc-prompt-end-marker))) | 1641 | (when (not (equal 0 (- (point) rcirc-prompt-end-marker))) |
| 1642 | ;; delete a trailing newline | 1642 | ;; delete a trailing newline |
| 1643 | (when (eq (point) (point-at-bol)) | 1643 | (when (eq (point) (line-beginning-position)) |
| 1644 | (delete-char -1)) | 1644 | (delete-char -1)) |
| 1645 | (let ((input (buffer-substring-no-properties | 1645 | (let ((input (buffer-substring-no-properties |
| 1646 | rcirc-prompt-end-marker (point)))) | 1646 | rcirc-prompt-end-marker (point)))) |
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 170583f608c..be231fcba63 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -1198,12 +1198,12 @@ FMT and ARGS are passed to `error'." | |||
| 1198 | (let ((inhibit-read-only t)) | 1198 | (let ((inhibit-read-only t)) |
| 1199 | (goto-char (point-min)) | 1199 | (goto-char (point-min)) |
| 1200 | ;; ADB terminal sends "^H" sequences. | 1200 | ;; ADB terminal sends "^H" sequences. |
| 1201 | (when (re-search-forward "<\b+" (point-at-eol) t) | 1201 | (when (re-search-forward "<\b+" (line-end-position) t) |
| 1202 | (forward-line 1) | 1202 | (forward-line 1) |
| 1203 | (delete-region (point-min) (point))) | 1203 | (delete-region (point-min) (point))) |
| 1204 | ;; Delete the prompt. | 1204 | ;; Delete the prompt. |
| 1205 | (goto-char (point-min)) | 1205 | (goto-char (point-min)) |
| 1206 | (when (re-search-forward prompt (point-at-eol) t) | 1206 | (when (re-search-forward prompt (line-end-position) t) |
| 1207 | (forward-line 1) | 1207 | (forward-line 1) |
| 1208 | (delete-region (point-min) (point))) | 1208 | (delete-region (point-min) (point))) |
| 1209 | (when (tramp-search-regexp prompt) | 1209 | (when (tramp-search-regexp prompt) |
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index f7704864ec6..b2a68fc5eba 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el | |||
| @@ -694,7 +694,7 @@ buffer in your bug report. | |||
| 694 | (setq buffer-read-only nil) | 694 | (setq buffer-read-only nil) |
| 695 | (goto-char (point-min)) | 695 | (goto-char (point-min)) |
| 696 | (while (not (eobp)) | 696 | (while (not (eobp)) |
| 697 | (if (re-search-forward tramp-buf-regexp (point-at-eol) t) | 697 | (if (re-search-forward tramp-buf-regexp (line-end-position) t) |
| 698 | (forward-line 1) | 698 | (forward-line 1) |
| 699 | (forward-line 0) | 699 | (forward-line 0) |
| 700 | (let ((start (point))) | 700 | (let ((start (point))) |
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 27b359d439b..657437b283c 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el | |||
| @@ -437,7 +437,7 @@ Otherwise, return NAME." | |||
| 437 | (if (eq op 'encrypt) "Encoding" "Decoding") name)) | 437 | (if (eq op 'encrypt) "Encoding" "Decoding") name)) |
| 438 | (with-current-buffer (tramp-get-connection-buffer crypt-vec) | 438 | (with-current-buffer (tramp-get-connection-buffer crypt-vec) |
| 439 | (goto-char (point-min)) | 439 | (goto-char (point-min)) |
| 440 | (buffer-substring (point-min) (point-at-eol))))))) | 440 | (buffer-substring (point-min) (line-end-position))))))) |
| 441 | ;; Nothing to do. | 441 | ;; Nothing to do. |
| 442 | name)) | 442 | name)) |
| 443 | 443 | ||
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5075394d432..ca08c6f0b3d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -1188,7 +1188,7 @@ component is used as the target of the symlink." | |||
| 1188 | (tramp-shell-quote-argument localname))) | 1188 | (tramp-shell-quote-argument localname))) |
| 1189 | (with-current-buffer (tramp-get-connection-buffer v) | 1189 | (with-current-buffer (tramp-get-connection-buffer v) |
| 1190 | (goto-char (point-min)) | 1190 | (goto-char (point-min)) |
| 1191 | (buffer-substring (point-min) (point-at-eol)))) | 1191 | (buffer-substring (point-min) (line-end-position)))) |
| 1192 | 1192 | ||
| 1193 | ;; Use Perl implementation. | 1193 | ;; Use Perl implementation. |
| 1194 | ((and (tramp-get-remote-perl v) | 1194 | ((and (tramp-get-remote-perl v) |
| @@ -1334,7 +1334,7 @@ component is used as the target of the symlink." | |||
| 1334 | (setq res-symlink-target | 1334 | (setq res-symlink-target |
| 1335 | (if (looking-at-p "\"") | 1335 | (if (looking-at-p "\"") |
| 1336 | (read (current-buffer)) | 1336 | (read (current-buffer)) |
| 1337 | (buffer-substring (point) (point-at-eol))))) | 1337 | (buffer-substring (point) (line-end-position))))) |
| 1338 | (forward-line) | 1338 | (forward-line) |
| 1339 | ;; ... file mode flags | 1339 | ;; ... file mode flags |
| 1340 | (read (current-buffer)) | 1340 | (read (current-buffer)) |
| @@ -1416,7 +1416,7 @@ component is used as the target of the symlink." | |||
| 1416 | (format "%s -ild %s" | 1416 | (format "%s -ild %s" |
| 1417 | (tramp-get-ls-command v) | 1417 | (tramp-get-ls-command v) |
| 1418 | (tramp-shell-quote-argument localname))) | 1418 | (tramp-shell-quote-argument localname))) |
| 1419 | (setq attr (buffer-substring (point) (point-at-eol)))) | 1419 | (setq attr (buffer-substring (point) (line-end-position)))) |
| 1420 | (tramp-set-file-property | 1420 | (tramp-set-file-property |
| 1421 | v localname "visited-file-modtime-ild" attr)) | 1421 | v localname "visited-file-modtime-ild" attr)) |
| 1422 | (setq last-coding-system-used coding-system-used) | 1422 | (setq last-coding-system-used coding-system-used) |
| @@ -1460,7 +1460,7 @@ of." | |||
| 1460 | (tramp-get-ls-command v) | 1460 | (tramp-get-ls-command v) |
| 1461 | (tramp-shell-quote-argument localname))) | 1461 | (tramp-shell-quote-argument localname))) |
| 1462 | (with-current-buffer (tramp-get-buffer v) | 1462 | (with-current-buffer (tramp-get-buffer v) |
| 1463 | (setq attr (buffer-substring (point) (point-at-eol)))) | 1463 | (setq attr (buffer-substring (point) (line-end-position)))) |
| 1464 | (equal | 1464 | (equal |
| 1465 | attr | 1465 | attr |
| 1466 | (tramp-get-file-property | 1466 | (tramp-get-file-property |
| @@ -1517,7 +1517,7 @@ VEC or USER, or if there is no home directory, return nil." | |||
| 1517 | (concat "~" (or user (tramp-file-name-user vec)))))) | 1517 | (concat "~" (or user (tramp-file-name-user vec)))))) |
| 1518 | (with-current-buffer (tramp-get-buffer vec) | 1518 | (with-current-buffer (tramp-get-buffer vec) |
| 1519 | (goto-char (point-min)) | 1519 | (goto-char (point-min)) |
| 1520 | (buffer-substring (point) (point-at-eol))))) | 1520 | (buffer-substring (point) (line-end-position))))) |
| 1521 | 1521 | ||
| 1522 | (defun tramp-sh-handle-get-remote-uid (vec id-format) | 1522 | (defun tramp-sh-handle-get-remote-uid (vec id-format) |
| 1523 | "The uid of the remote connection VEC, in ID-FORMAT. | 1523 | "The uid of the remote connection VEC, in ID-FORMAT. |
| @@ -1582,7 +1582,7 @@ ID-FORMAT valid values are `string' and `integer'." | |||
| 1582 | (tramp-shell-quote-argument localname)))) | 1582 | (tramp-shell-quote-argument localname)))) |
| 1583 | (with-current-buffer (tramp-get-connection-buffer v) | 1583 | (with-current-buffer (tramp-get-connection-buffer v) |
| 1584 | (goto-char (point-min)) | 1584 | (goto-char (point-min)) |
| 1585 | (when (re-search-forward regexp (point-at-eol) t) | 1585 | (when (re-search-forward regexp (line-end-position) t) |
| 1586 | (setq context (list (match-string 1) (match-string 2) | 1586 | (setq context (list (match-string 1) (match-string 2) |
| 1587 | (match-string 3) (match-string 4)))))) | 1587 | (match-string 3) (match-string 4)))))) |
| 1588 | ;; Return the context. | 1588 | ;; Return the context. |
| @@ -1817,7 +1817,7 @@ ID-FORMAT valid values are `string' and `integer'." | |||
| 1817 | (tramp-error | 1817 | (tramp-error |
| 1818 | v 'file-error | 1818 | v 'file-error |
| 1819 | "tramp-sh-handle-file-name-all-completions: %s" | 1819 | "tramp-sh-handle-file-name-all-completions: %s" |
| 1820 | (buffer-substring (point) (point-at-eol)))) | 1820 | (buffer-substring (point) (line-end-position)))) |
| 1821 | ;; For peace of mind, if buffer doesn't end in `fail' | 1821 | ;; For peace of mind, if buffer doesn't end in `fail' |
| 1822 | ;; then it should end in `ok'. If neither are in the | 1822 | ;; then it should end in `ok'. If neither are in the |
| 1823 | ;; buffer something went seriously wrong on the remote | 1823 | ;; buffer something went seriously wrong on the remote |
| @@ -1830,7 +1830,7 @@ ID-FORMAT valid values are `string' and `integer'." | |||
| 1830 | (tramp-shell-quote-argument localname) (buffer-string)))) | 1830 | (tramp-shell-quote-argument localname) (buffer-string)))) |
| 1831 | 1831 | ||
| 1832 | (while (zerop (forward-line -1)) | 1832 | (while (zerop (forward-line -1)) |
| 1833 | (push (buffer-substring (point) (point-at-eol)) result))) | 1833 | (push (buffer-substring (point) (line-end-position)) result))) |
| 1834 | result)))))) | 1834 | result)))))) |
| 1835 | 1835 | ||
| 1836 | ;; cp, mv and ln | 1836 | ;; cp, mv and ln |
| @@ -3124,7 +3124,8 @@ implementation will be used." | |||
| 3124 | (tramp-shell-quote-argument (format "kill -%d $$" i)))) | 3124 | (tramp-shell-quote-argument (format "kill -%d $$" i)))) |
| 3125 | (with-current-buffer (tramp-get-connection-buffer vec) | 3125 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3126 | (goto-char (point-min)) | 3126 | (goto-char (point-min)) |
| 3127 | (buffer-substring (point-at-bol) (point-at-eol))))) | 3127 | (buffer-substring (line-beginning-position) |
| 3128 | (line-end-position))))) | ||
| 3128 | (if (string-empty-p res) | 3129 | (if (string-empty-p res) |
| 3129 | (format "Signal %d" i) | 3130 | (format "Signal %d" i) |
| 3130 | res))) | 3131 | res))) |
| @@ -4087,8 +4088,8 @@ This function expects to be in the right *tramp* buffer." | |||
| 4087 | (when (search-backward "tramp_executable " nil t) | 4088 | (when (search-backward "tramp_executable " nil t) |
| 4088 | (skip-chars-forward "^ ") | 4089 | (skip-chars-forward "^ ") |
| 4089 | (skip-chars-forward " ") | 4090 | (skip-chars-forward " ") |
| 4090 | (setq result (buffer-substring (point) (point-at-eol))))) | 4091 | (setq result (buffer-substring (point) (line-end-position))))) |
| 4091 | result))) | 4092 | result))) |
| 4092 | 4093 | ||
| 4093 | ;; On hydra.nixos.org, the $PATH environment variable is too long to | 4094 | ;; On hydra.nixos.org, the $PATH environment variable is too long to |
| 4094 | ;; send it. This is likely not due to PATH_MAX, but PIPE_BUF. We | 4095 | ;; send it. This is likely not due to PATH_MAX, but PIPE_BUF. We |
| @@ -5276,7 +5277,7 @@ function waits for output unless NOOUTPUT is set." | |||
| 5276 | ;; A simple-minded busybox has sent " ^H" sequences. | 5277 | ;; A simple-minded busybox has sent " ^H" sequences. |
| 5277 | ;; Delete them. | 5278 | ;; Delete them. |
| 5278 | (goto-char (point-min)) | 5279 | (goto-char (point-min)) |
| 5279 | (when (re-search-forward "^\\(.\b\\)+$" (point-at-eol) t) | 5280 | (when (re-search-forward "^\\(.\b\\)+$" (line-end-position) t) |
| 5280 | (forward-line 1) | 5281 | (forward-line 1) |
| 5281 | (delete-region (point-min) (point))) | 5282 | (delete-region (point-min) (point))) |
| 5282 | ;; Delete the prompt. | 5283 | ;; Delete the prompt. |
| @@ -5368,7 +5369,7 @@ raises an error." | |||
| 5368 | (unless noerror signal-hook-function))) | 5369 | (unless noerror signal-hook-function))) |
| 5369 | (read (current-buffer))) | 5370 | (read (current-buffer))) |
| 5370 | ;; Error handling. | 5371 | ;; Error handling. |
| 5371 | (when (re-search-forward "\\S-" (point-at-eol) t) | 5372 | (when (re-search-forward "\\S-" (line-end-position) t) |
| 5372 | (error nil))) | 5373 | (error nil))) |
| 5373 | (error (unless noerror | 5374 | (error (unless noerror |
| 5374 | (tramp-error | 5375 | (tramp-error |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index a81a8f13636..ba0a1d3598f 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -1763,7 +1763,7 @@ If SHARE is result, entries are of type dir. Otherwise, shares | |||
| 1763 | are listed. Result is the list (LOCALNAME MODE SIZE MTIME)." | 1763 | are listed. Result is the list (LOCALNAME MODE SIZE MTIME)." |
| 1764 | ;; We are called from `tramp-smb-get-file-entries', which sets the | 1764 | ;; We are called from `tramp-smb-get-file-entries', which sets the |
| 1765 | ;; current buffer. | 1765 | ;; current buffer. |
| 1766 | (let ((line (buffer-substring (point) (point-at-eol))) | 1766 | (let ((line (buffer-substring (point) (line-end-position))) |
| 1767 | localname mode size month day hour min sec year mtime) | 1767 | localname mode size month day hour min sec year mtime) |
| 1768 | 1768 | ||
| 1769 | (if (not share) | 1769 | (if (not share) |
| @@ -1877,7 +1877,7 @@ are listed. Result is the list (LOCALNAME MODE SIZE MTIME)." | |||
| 1877 | (member | 1877 | (member |
| 1878 | "pathnames" | 1878 | "pathnames" |
| 1879 | (split-string | 1879 | (split-string |
| 1880 | (buffer-substring (point) (point-at-eol)) nil 'omit))))))))) | 1880 | (buffer-substring (point) (line-end-position)) nil 'omit))))))))) |
| 1881 | 1881 | ||
| 1882 | (defun tramp-smb-get-stat-capability (vec) | 1882 | (defun tramp-smb-get-stat-capability (vec) |
| 1883 | "Check whether the SMB server supports the `stat' command." | 1883 | "Check whether the SMB server supports the `stat' command." |
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el index a9225db434e..4e3b94277be 100644 --- a/lisp/net/tramp-sshfs.el +++ b/lisp/net/tramp-sshfs.el | |||
| @@ -215,7 +215,7 @@ arguments to pass to the OPERATION." | |||
| 215 | (progn | 215 | (progn |
| 216 | ;; Read the expression. | 216 | ;; Read the expression. |
| 217 | (goto-char (point-min)) | 217 | (goto-char (point-min)) |
| 218 | (buffer-substring (point) (point-at-eol))) | 218 | (buffer-substring (point) (line-end-position))) |
| 219 | ":" 'omit)))) | 219 | ":" 'omit)))) |
| 220 | ;; The equivalent to `exec-directory'. | 220 | ;; The equivalent to `exec-directory'. |
| 221 | `(,(tramp-file-local-name (expand-file-name default-directory))))) | 221 | `(,(tramp-file-local-name (expand-file-name default-directory))))) |
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el index 0de2e0ef69a..643b5f35c0f 100644 --- a/lisp/net/tramp-sudoedit.el +++ b/lisp/net/tramp-sudoedit.el | |||
| @@ -512,7 +512,7 @@ the result will be a local, non-Tramp, file name." | |||
| 512 | (tramp-compat-file-name-unquote localname))) | 512 | (tramp-compat-file-name-unquote localname))) |
| 513 | (with-current-buffer (tramp-get-connection-buffer v) | 513 | (with-current-buffer (tramp-get-connection-buffer v) |
| 514 | (goto-char (point-min)) | 514 | (goto-char (point-min)) |
| 515 | (when (re-search-forward regexp (point-at-eol) t) | 515 | (when (re-search-forward regexp (line-end-position) t) |
| 516 | (setq context (list (match-string 1) (match-string 2) | 516 | (setq context (list (match-string 1) (match-string 2) |
| 517 | (match-string 3) (match-string 4)))))) | 517 | (match-string 3) (match-string 4)))))) |
| 518 | ;; Return the context. | 518 | ;; Return the context. |
| @@ -752,7 +752,7 @@ ID-FORMAT valid values are `string' and `integer'." | |||
| 752 | (delete-region (point-min) (point)) | 752 | (delete-region (point-min) (point)) |
| 753 | ;; Delete empty lines. | 753 | ;; Delete empty lines. |
| 754 | (goto-char (point-min)) | 754 | (goto-char (point-min)) |
| 755 | (while (and (not (eobp)) (= (point) (point-at-eol))) | 755 | (while (and (not (eobp)) (= (point) (line-end-position))) |
| 756 | (forward-line)) | 756 | (forward-line)) |
| 757 | (delete-region (point-min) (point)) | 757 | (delete-region (point-min) (point)) |
| 758 | (tramp-message vec 3 "Process has finished.") | 758 | (tramp-message vec 3 "Process has finished.") |
| @@ -841,7 +841,7 @@ In case there is no valid Lisp expression, it raises an error." | |||
| 841 | (condition-case nil | 841 | (condition-case nil |
| 842 | (prog1 (read (current-buffer)) | 842 | (prog1 (read (current-buffer)) |
| 843 | ;; Error handling. | 843 | ;; Error handling. |
| 844 | (when (re-search-forward "\\S-" (point-at-eol) t) | 844 | (when (re-search-forward "\\S-" (line-end-position) t) |
| 845 | (error nil))) | 845 | (error nil))) |
| 846 | (error (tramp-error | 846 | (error (tramp-error |
| 847 | vec 'file-error | 847 | vec 'file-error |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index ed40245e8a0..238ec50c40f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3203,7 +3203,7 @@ for all methods. Resulting data are derived from default settings." | |||
| 3203 | "Return a (user host) tuple allowed to access. | 3203 | "Return a (user host) tuple allowed to access. |
| 3204 | User is always nil." | 3204 | User is always nil." |
| 3205 | (let (result) | 3205 | (let (result) |
| 3206 | (when (re-search-forward regexp (point-at-eol) t) | 3206 | (when (re-search-forward regexp (line-end-position) t) |
| 3207 | (setq result (list nil (match-string match-level)))) | 3207 | (setq result (list nil (match-string match-level)))) |
| 3208 | (or | 3208 | (or |
| 3209 | (> (skip-chars-forward skip-chars) 0) | 3209 | (> (skip-chars-forward skip-chars) 0) |
| @@ -3236,7 +3236,7 @@ Either user or host may be nil." | |||
| 3236 | (concat | 3236 | (concat |
| 3237 | "^\\(" tramp-host-regexp "\\)" | 3237 | "^\\(" tramp-host-regexp "\\)" |
| 3238 | "\\([ \t]+" "\\(" tramp-user-regexp "\\)" "\\)?"))) | 3238 | "\\([ \t]+" "\\(" tramp-user-regexp "\\)" "\\)?"))) |
| 3239 | (when (re-search-forward regexp (point-at-eol) t) | 3239 | (when (re-search-forward regexp (line-end-position) t) |
| 3240 | (setq result (append (list (match-string 3) (match-string 1))))) | 3240 | (setq result (append (list (match-string 3) (match-string 1))))) |
| 3241 | (forward-line 1) | 3241 | (forward-line 1) |
| 3242 | result)) | 3242 | result)) |
| @@ -3318,7 +3318,7 @@ Host is always \"localhost\"." | |||
| 3318 | Host is always \"localhost\"." | 3318 | Host is always \"localhost\"." |
| 3319 | (let (result | 3319 | (let (result |
| 3320 | (regexp (concat "^\\(" tramp-user-regexp "\\):"))) | 3320 | (regexp (concat "^\\(" tramp-user-regexp "\\):"))) |
| 3321 | (when (re-search-forward regexp (point-at-eol) t) | 3321 | (when (re-search-forward regexp (line-end-position) t) |
| 3322 | (setq result (list (match-string 1) "localhost"))) | 3322 | (setq result (list (match-string 1) "localhost"))) |
| 3323 | (forward-line 1) | 3323 | (forward-line 1) |
| 3324 | result)) | 3324 | result)) |
| @@ -3339,7 +3339,7 @@ Host is always \"localhost\"." | |||
| 3339 | "Return a (group host) tuple allowed to access. | 3339 | "Return a (group host) tuple allowed to access. |
| 3340 | Host is always \"localhost\"." | 3340 | Host is always \"localhost\"." |
| 3341 | (let (result | 3341 | (let (result |
| 3342 | (split (split-string (buffer-substring (point) (point-at-eol)) ":"))) | 3342 | (split (split-string (buffer-substring (point) (line-end-position)) ":"))) |
| 3343 | (when (member (user-login-name) (split-string (nth 3 split) "," 'omit)) | 3343 | (when (member (user-login-name) (split-string (nth 3 split) "," 'omit)) |
| 3344 | (setq result (list (nth 0 split) "localhost"))) | 3344 | (setq result (list (nth 0 split) "localhost"))) |
| 3345 | (forward-line 1) | 3345 | (forward-line 1) |
| @@ -3374,7 +3374,7 @@ User is always nil." | |||
| 3374 | User is always nil." | 3374 | User is always nil." |
| 3375 | (let (result | 3375 | (let (result |
| 3376 | (regexp (concat (regexp-quote registry) "\\\\\\(.+\\)"))) | 3376 | (regexp (concat (regexp-quote registry) "\\\\\\(.+\\)"))) |
| 3377 | (when (re-search-forward regexp (point-at-eol) t) | 3377 | (when (re-search-forward regexp (line-end-position) t) |
| 3378 | (setq result (list nil (match-string 1)))) | 3378 | (setq result (list nil (match-string 1)))) |
| 3379 | (forward-line 1) | 3379 | (forward-line 1) |
| 3380 | result)) | 3380 | result)) |
| @@ -4142,12 +4142,12 @@ Let-bind it when necessary.") | |||
| 4142 | (goto-char (point-min)) | 4142 | (goto-char (point-min)) |
| 4143 | (while (setq start | 4143 | (while (setq start |
| 4144 | (text-property-not-all | 4144 | (text-property-not-all |
| 4145 | (point) (point-at-eol) 'dired-filename t)) | 4145 | (point) (line-end-position) 'dired-filename t)) |
| 4146 | (delete-region | 4146 | (delete-region |
| 4147 | start | 4147 | start |
| 4148 | (or (text-property-any start (point-at-eol) 'dired-filename t) | 4148 | (or (text-property-any start (line-end-position) 'dired-filename t) |
| 4149 | (point-at-eol))) | 4149 | (line-end-position))) |
| 4150 | (if (= (point-at-bol) (point-at-eol)) | 4150 | (if (= (line-beginning-position) (line-end-position)) |
| 4151 | ;; Empty line. | 4151 | ;; Empty line. |
| 4152 | (delete-region (point) (progn (forward-line) (point))) | 4152 | (delete-region (point) (progn (forward-line) (point))) |
| 4153 | (forward-line))))))))) | 4153 | (forward-line))))))))) |
diff --git a/lisp/obsolete/netrc.el b/lisp/obsolete/netrc.el index f664a77a9b1..0114dadbabf 100644 --- a/lisp/obsolete/netrc.el +++ b/lisp/obsolete/netrc.el | |||
| @@ -82,7 +82,7 @@ | |||
| 82 | (goto-char (point-min)) | 82 | (goto-char (point-min)) |
| 83 | ;; Go through the file, line by line. | 83 | ;; Go through the file, line by line. |
| 84 | (while (not (eobp)) | 84 | (while (not (eobp)) |
| 85 | (narrow-to-region (point) (point-at-eol)) | 85 | (narrow-to-region (point) (line-end-position)) |
| 86 | ;; For each line, get the tokens and values. | 86 | ;; For each line, get the tokens and values. |
| 87 | (while (not (eobp)) | 87 | (while (not (eobp)) |
| 88 | (skip-chars-forward "\t ") | 88 | (skip-chars-forward "\t ") |
| @@ -205,7 +205,7 @@ MODE can be \"login\" or \"password\", suitable for passing to | |||
| 205 | (with-temp-buffer | 205 | (with-temp-buffer |
| 206 | (insert-file-contents netrc-services-file) | 206 | (insert-file-contents netrc-services-file) |
| 207 | (while (search-forward "#" nil t) | 207 | (while (search-forward "#" nil t) |
| 208 | (delete-region (1- (point)) (point-at-eol))) | 208 | (delete-region (1- (point)) (line-end-position))) |
| 209 | (goto-char (point-min)) | 209 | (goto-char (point-min)) |
| 210 | (while (re-search-forward | 210 | (while (re-search-forward |
| 211 | "^ *\\([^ \n\t]+\\)[ \t]+\\([0-9]+\\)/\\([^ \t\n]+\\)" nil t) | 211 | "^ *\\([^ \n\t]+\\)[ \t]+\\([0-9]+\\)/\\([^ \t\n]+\\)" nil t) |
diff --git a/lisp/obsolete/tpu-extras.el b/lisp/obsolete/tpu-extras.el index 76338cdd24e..d631c47705d 100644 --- a/lisp/obsolete/tpu-extras.el +++ b/lisp/obsolete/tpu-extras.el | |||
| @@ -292,7 +292,7 @@ Prefix argument serves as repeat count." | |||
| 292 | (bottom (save-excursion (move-to-window-line bottom-margin) (point))) | 292 | (bottom (save-excursion (move-to-window-line bottom-margin) (point))) |
| 293 | (far (save-excursion | 293 | (far (save-excursion |
| 294 | (goto-char bottom) | 294 | (goto-char bottom) |
| 295 | (point-at-bol (1- height))))) | 295 | (line-beginning-position (1- height))))) |
| 296 | ,@body)) | 296 | ,@body)) |
| 297 | 297 | ||
| 298 | (defun tpu-paragraph (num) | 298 | (defun tpu-paragraph (num) |
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index 3b114703cdc..41b7a2a9713 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el | |||
| @@ -917,7 +917,7 @@ arguments and pop open the results in a preview buffer." | |||
| 917 | vals "")))))) | 917 | vals "")))))) |
| 918 | (save-excursion | 918 | (save-excursion |
| 919 | (goto-char begin) | 919 | (goto-char begin) |
| 920 | (goto-char (point-at-eol)) | 920 | (goto-char (line-end-position)) |
| 921 | (unless (= (char-before (point)) ?\ ) (insert " ")) | 921 | (unless (= (char-before (point)) ?\ ) (insert " ")) |
| 922 | (insert ":" header-arg) (when value (insert " " value))))) | 922 | (insert ":" header-arg) (when value (insert " " value))))) |
| 923 | 923 | ||
| @@ -1936,9 +1936,9 @@ region is not active then the point is demarcated." | |||
| 1936 | (let ((lang (nth 0 info)) | 1936 | (let ((lang (nth 0 info)) |
| 1937 | (indent (make-string (current-indentation) ?\s))) | 1937 | (indent (make-string (current-indentation) ?\s))) |
| 1938 | (when (string-match "^[[:space:]]*$" | 1938 | (when (string-match "^[[:space:]]*$" |
| 1939 | (buffer-substring (point-at-bol) | 1939 | (buffer-substring (line-beginning-position) |
| 1940 | (point-at-eol))) | 1940 | (line-end-position))) |
| 1941 | (delete-region (point-at-bol) (point-at-eol))) | 1941 | (delete-region (line-beginning-position) (line-end-position))) |
| 1942 | (insert (concat | 1942 | (insert (concat |
| 1943 | (if (looking-at "^") "" "\n") | 1943 | (if (looking-at "^") "" "\n") |
| 1944 | indent (if upper-case-p "#+END_SRC\n" "#+end_src\n") | 1944 | indent (if upper-case-p "#+END_SRC\n" "#+end_src\n") |
diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el index dd204d7f6b1..f1ea803ba31 100644 --- a/lisp/org/ob-lilypond.el +++ b/lisp/org/ob-lilypond.el | |||
| @@ -312,7 +312,7 @@ LINENO is the number of the erroneous line." | |||
| 312 | (progn | 312 | (progn |
| 313 | (goto-char (point-min)) | 313 | (goto-char (point-min)) |
| 314 | (forward-line (- lineNo 1)) | 314 | (forward-line (- lineNo 1)) |
| 315 | (buffer-substring (point) (point-at-eol))) | 315 | (buffer-substring (point) (line-end-position))) |
| 316 | nil))) | 316 | nil))) |
| 317 | 317 | ||
| 318 | (defun org-babel-lilypond-attempt-to-open-pdf (file-name &optional test) | 318 | (defun org-babel-lilypond-attempt-to-open-pdf (file-name &optional test) |
diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index bbbda5bb1e5..9be8f5ad3eb 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el | |||
| @@ -255,7 +255,7 @@ This removes initial blank and comment lines and then calls | |||
| 255 | (insert-file-contents file-name) | 255 | (insert-file-contents file-name) |
| 256 | (re-search-forward "^[ \t]*[^# \t]" nil t) | 256 | (re-search-forward "^[ \t]*[^# \t]" nil t) |
| 257 | (when (< (setq beg (point-min)) | 257 | (when (< (setq beg (point-min)) |
| 258 | (setq end (point-at-bol))) | 258 | (setq end (line-beginning-position))) |
| 259 | (delete-region beg end))) | 259 | (delete-region beg end))) |
| 260 | (org-babel-import-elisp-from-file temp-file '(16)))) | 260 | (org-babel-import-elisp-from-file temp-file '(16)))) |
| 261 | 261 | ||
diff --git a/lisp/org/ol-irc.el b/lisp/org/ol-irc.el index ed8bad5a50a..e36c44ff704 100644 --- a/lisp/org/ol-irc.el +++ b/lisp/org/ol-irc.el | |||
| @@ -135,13 +135,13 @@ result is a cons of the filename and search string." | |||
| 135 | ;; can we get a '::' part? | 135 | ;; can we get a '::' part? |
| 136 | (if (string= erc-line (erc-prompt)) | 136 | (if (string= erc-line (erc-prompt)) |
| 137 | (progn | 137 | (progn |
| 138 | (goto-char (point-at-bol)) | 138 | (goto-char (line-beginning-position)) |
| 139 | (when (search-backward-regexp "^[^ ]" nil t) | 139 | (when (search-backward-regexp "^[^ ]" nil t) |
| 140 | (buffer-substring-no-properties (point-at-bol) | 140 | (buffer-substring-no-properties (line-beginning-position) |
| 141 | (point-at-eol)))) | 141 | (line-end-position)))) |
| 142 | (when (search-backward erc-line nil t) | 142 | (when (search-backward erc-line nil t) |
| 143 | (buffer-substring-no-properties (point-at-bol) | 143 | (buffer-substring-no-properties (line-beginning-position) |
| 144 | (point-at-eol))))))) | 144 | (line-end-position))))))) |
| 145 | 145 | ||
| 146 | (defun org-irc-erc-store-link () | 146 | (defun org-irc-erc-store-link () |
| 147 | "Store a link to the IRC log file or the session itself. | 147 | "Store a link to the IRC log file or the session itself. |
| @@ -151,7 +151,7 @@ the session itself." | |||
| 151 | (require 'erc-log) | 151 | (require 'erc-log) |
| 152 | (if org-irc-link-to-logs | 152 | (if org-irc-link-to-logs |
| 153 | (let* ((erc-line (buffer-substring-no-properties | 153 | (let* ((erc-line (buffer-substring-no-properties |
| 154 | (point-at-bol) (point-at-eol))) | 154 | (line-beginning-position) (line-end-position))) |
| 155 | (parsed-line (org-irc-erc-get-line-from-log erc-line))) | 155 | (parsed-line (org-irc-erc-get-line-from-log erc-line))) |
| 156 | (if (erc-logging-enabled nil) | 156 | (if (erc-logging-enabled nil) |
| 157 | (progn | 157 | (progn |
diff --git a/lisp/org/ol.el b/lisp/org/ol.el index a9e613e0d4e..4ad1f6d3452 100644 --- a/lisp/org/ol.el +++ b/lisp/org/ol.el | |||
| @@ -1481,7 +1481,7 @@ non-nil." | |||
| 1481 | (let ((end (region-end))) | 1481 | (let ((end (region-end))) |
| 1482 | (goto-char (region-beginning)) | 1482 | (goto-char (region-beginning)) |
| 1483 | (set-mark (point)) | 1483 | (set-mark (point)) |
| 1484 | (while (< (point-at-eol) end) | 1484 | (while (< (line-end-position) end) |
| 1485 | (move-end-of-line 1) (activate-mark) | 1485 | (move-end-of-line 1) (activate-mark) |
| 1486 | (let (current-prefix-arg) | 1486 | (let (current-prefix-arg) |
| 1487 | (call-interactively 'org-store-link)) | 1487 | (call-interactively 'org-store-link)) |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index a43b083d536..35f19cf03b4 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -2113,7 +2113,7 @@ in that string. If STRING is nil, it will be fetched from the beginning | |||
| 2113 | of the current line." | 2113 | of the current line." |
| 2114 | (declare (debug t)) | 2114 | (declare (debug t)) |
| 2115 | (org-with-gensyms (marker) | 2115 | (org-with-gensyms (marker) |
| 2116 | `(let ((,marker (get-text-property (if ,string 0 (point-at-bol)) | 2116 | `(let ((,marker (get-text-property (if ,string 0 (line-beginning-position)) |
| 2117 | 'org-hd-marker ,string))) | 2117 | 'org-hd-marker ,string))) |
| 2118 | (with-current-buffer (marker-buffer ,marker) | 2118 | (with-current-buffer (marker-buffer ,marker) |
| 2119 | (save-excursion | 2119 | (save-excursion |
| @@ -3076,10 +3076,10 @@ s Search for keywords M Like m, but only TODO entries | |||
| 3076 | (when (eq rmheader t) | 3076 | (when (eq rmheader t) |
| 3077 | (org-goto-line 1) | 3077 | (org-goto-line 1) |
| 3078 | (re-search-forward ":" nil t) | 3078 | (re-search-forward ":" nil t) |
| 3079 | (delete-region (match-end 0) (point-at-eol)) | 3079 | (delete-region (match-end 0) (line-end-position)) |
| 3080 | (forward-char 1) | 3080 | (forward-char 1) |
| 3081 | (looking-at "-+") | 3081 | (looking-at "-+") |
| 3082 | (delete-region (match-end 0) (point-at-eol)) | 3082 | (delete-region (match-end 0) (line-end-position)) |
| 3083 | (move-marker header-end (match-end 0))) | 3083 | (move-marker header-end (match-end 0))) |
| 3084 | (goto-char header-end) | 3084 | (goto-char header-end) |
| 3085 | (delete-region (point) (point-max)) | 3085 | (delete-region (point) (point-max)) |
| @@ -3505,10 +3505,10 @@ This ensures the export commands can easily use it." | |||
| 3505 | "Mark the line at POS as an agenda structure header." | 3505 | "Mark the line at POS as an agenda structure header." |
| 3506 | (save-excursion | 3506 | (save-excursion |
| 3507 | (goto-char pos) | 3507 | (goto-char pos) |
| 3508 | (put-text-property (point-at-bol) (point-at-eol) | 3508 | (put-text-property (line-beginning-position) (line-end-position) |
| 3509 | 'org-agenda-structural-header t) | 3509 | 'org-agenda-structural-header t) |
| 3510 | (when org-agenda-title-append | 3510 | (when org-agenda-title-append |
| 3511 | (put-text-property (point-at-bol) (point-at-eol) | 3511 | (put-text-property (line-beginning-position) (line-end-position) |
| 3512 | 'org-agenda-title-append org-agenda-title-append)))) | 3512 | 'org-agenda-title-append org-agenda-title-append)))) |
| 3513 | 3513 | ||
| 3514 | (defvar org-mobile-creating-agendas) ; defined in org-mobile.el | 3514 | (defvar org-mobile-creating-agendas) ; defined in org-mobile.el |
| @@ -3715,7 +3715,7 @@ removed from the entry content. Currently only `planning' is allowed here." | |||
| 3715 | (while (not (eobp)) | 3715 | (while (not (eobp)) |
| 3716 | (unless (looking-at "[ \t]*$") | 3716 | (unless (looking-at "[ \t]*$") |
| 3717 | (move-to-column ind) | 3717 | (move-to-column ind) |
| 3718 | (delete-region (point-at-bol) (point))) | 3718 | (delete-region (line-beginning-position) (point))) |
| 3719 | (beginning-of-line 2)) | 3719 | (beginning-of-line 2)) |
| 3720 | 3720 | ||
| 3721 | (run-hooks 'org-agenda-entry-text-cleanup-hook) | 3721 | (run-hooks 'org-agenda-entry-text-cleanup-hook) |
| @@ -3987,7 +3987,7 @@ agenda display, configure `org-agenda-finalize-hook'." | |||
| 3987 | (goto-char (point-min)) | 3987 | (goto-char (point-min)) |
| 3988 | (while (equal (forward-line) 0) | 3988 | (while (equal (forward-line) 0) |
| 3989 | (when (setq mrk (get-text-property (point) 'org-hd-marker)) | 3989 | (when (setq mrk (get-text-property (point) 'org-hd-marker)) |
| 3990 | (put-text-property (point-at-bol) (point-at-eol) | 3990 | (put-text-property (line-beginning-position) (line-end-position) |
| 3991 | 'tags | 3991 | 'tags |
| 3992 | (org-with-point-at mrk | 3992 | (org-with-point-at mrk |
| 3993 | (org-get-tags)))))))) | 3993 | (org-get-tags)))))))) |
| @@ -4035,7 +4035,8 @@ agenda display, configure `org-agenda-finalize-hook'." | |||
| 4035 | (goto-char s) | 4035 | (goto-char s) |
| 4036 | (when (equal (org-get-at-bol 'org-hd-marker) | 4036 | (when (equal (org-get-at-bol 'org-hd-marker) |
| 4037 | org-clock-hd-marker) | 4037 | org-clock-hd-marker) |
| 4038 | (setq ov (make-overlay (point-at-bol) (1+ (point-at-eol)))) | 4038 | (setq ov (make-overlay (line-beginning-position) |
| 4039 | (1+ (line-end-position)))) | ||
| 4039 | (overlay-put ov 'type 'org-agenda-clocking) | 4040 | (overlay-put ov 'type 'org-agenda-clocking) |
| 4040 | (overlay-put ov 'face 'org-agenda-clocking) | 4041 | (overlay-put ov 'face 'org-agenda-clocking) |
| 4041 | (overlay-put ov 'help-echo | 4042 | (overlay-put ov 'help-echo |
| @@ -4066,7 +4067,7 @@ agenda display, configure `org-agenda-finalize-hook'." | |||
| 4066 | b (match-beginning 1) | 4067 | b (match-beginning 1) |
| 4067 | e (if (eq org-agenda-fontify-priorities 'cookies) | 4068 | e (if (eq org-agenda-fontify-priorities 'cookies) |
| 4068 | (1+ (match-end 2)) | 4069 | (1+ (match-end 2)) |
| 4069 | (point-at-eol)) | 4070 | (line-end-position)) |
| 4070 | ov (make-overlay b e)) | 4071 | ov (make-overlay b e)) |
| 4071 | (overlay-put | 4072 | (overlay-put |
| 4072 | ov 'face | 4073 | ov 'face |
| @@ -4168,7 +4169,7 @@ A good way to set it is through options in `org-agenda-custom-commands'.") | |||
| 4168 | "Throw to `:skip' in places that should be skipped. | 4169 | "Throw to `:skip' in places that should be skipped. |
| 4169 | Also moves point to the end of the skipped region, so that search can | 4170 | Also moves point to the end of the skipped region, so that search can |
| 4170 | continue from there." | 4171 | continue from there." |
| 4171 | (let ((p (point-at-bol)) to) | 4172 | (let ((p (line-beginning-position)) to) |
| 4172 | (when (or | 4173 | (when (or |
| 4173 | (save-excursion (goto-char p) (looking-at comment-start-skip)) | 4174 | (save-excursion (goto-char p) (looking-at comment-start-skip)) |
| 4174 | (and org-agenda-skip-archived-trees (not org-agenda-archives-mode) | 4175 | (and org-agenda-skip-archived-trees (not org-agenda-archives-mode) |
| @@ -4244,7 +4245,7 @@ This check for agenda markers in all agenda buffers currently active." | |||
| 4244 | m org-agenda-entry-text-maxlines | 4245 | m org-agenda-entry-text-maxlines |
| 4245 | org-agenda-entry-text-leaders)))) | 4246 | org-agenda-entry-text-leaders)))) |
| 4246 | (when (string-match "\\S-" txt) | 4247 | (when (string-match "\\S-" txt) |
| 4247 | (setq o (make-overlay (point-at-bol) (point-at-eol))) | 4248 | (setq o (make-overlay (line-beginning-position) (line-end-position))) |
| 4248 | (overlay-put o 'evaporate t) | 4249 | (overlay-put o 'evaporate t) |
| 4249 | (overlay-put o 'org-overlay-type 'agenda-entry-content) | 4250 | (overlay-put o 'org-overlay-type 'agenda-entry-content) |
| 4250 | (overlay-put o 'after-string txt)))) | 4251 | (overlay-put o 'after-string txt)))) |
| @@ -4749,7 +4750,7 @@ is active." | |||
| 4749 | (forward-line -1) | 4750 | (forward-line -1) |
| 4750 | (org-back-to-heading t))) | 4751 | (org-back-to-heading t))) |
| 4751 | (skip-chars-forward "* ") | 4752 | (skip-chars-forward "* ") |
| 4752 | (setq beg (point-at-bol) | 4753 | (setq beg (line-beginning-position) |
| 4753 | beg1 (point) | 4754 | beg1 (point) |
| 4754 | end (progn | 4755 | end (progn |
| 4755 | (outline-next-heading) | 4756 | (outline-next-heading) |
| @@ -4764,8 +4765,8 @@ is active." | |||
| 4764 | (goto-char beg) | 4765 | (goto-char beg) |
| 4765 | (org-agenda-skip) | 4766 | (org-agenda-skip) |
| 4766 | (setq str (buffer-substring-no-properties | 4767 | (setq str (buffer-substring-no-properties |
| 4767 | (point-at-bol) | 4768 | (line-beginning-position) |
| 4768 | (if hdl-only (point-at-eol) end))) | 4769 | (if hdl-only (line-end-position) end))) |
| 4769 | (mapc (lambda (wr) (when (string-match wr str) | 4770 | (mapc (lambda (wr) (when (string-match wr str) |
| 4770 | (goto-char (1- end)) | 4771 | (goto-char (1- end)) |
| 4771 | (throw :skip t))) | 4772 | (throw :skip t))) |
| @@ -4793,7 +4794,7 @@ is active." | |||
| 4793 | txt (org-agenda-format-item | 4794 | txt (org-agenda-format-item |
| 4794 | "" | 4795 | "" |
| 4795 | (buffer-substring-no-properties | 4796 | (buffer-substring-no-properties |
| 4796 | beg1 (point-at-eol)) | 4797 | beg1 (line-end-position)) |
| 4797 | level category tags t)) | 4798 | level category tags t)) |
| 4798 | (org-add-props txt props | 4799 | (org-add-props txt props |
| 4799 | 'org-marker marker 'org-hd-marker marker | 4800 | 'org-marker marker 'org-hd-marker marker |
| @@ -5335,7 +5336,7 @@ each date. It also removes lines that contain only whitespace." | |||
| 5335 | (abbreviate-file-name buffer-file-name)) | 5336 | (abbreviate-file-name buffer-file-name)) |
| 5336 | "") | 5337 | "") |
| 5337 | 'org-agenda-diary-link t | 5338 | 'org-agenda-diary-link t |
| 5338 | 'org-marker (org-agenda-new-marker (point-at-bol)))) | 5339 | 'org-marker (org-agenda-new-marker (line-beginning-position)))) |
| 5339 | 5340 | ||
| 5340 | (defun org-diary-default-entry () | 5341 | (defun org-diary-default-entry () |
| 5341 | "Add a dummy entry to the diary. | 5342 | "Add a dummy entry to the diary. |
| @@ -5986,7 +5987,7 @@ then those holidays will be skipped." | |||
| 5986 | clockp (not (or closedp statep)) | 5987 | clockp (not (or closedp statep)) |
| 5987 | state (and statep (match-string 2)) | 5988 | state (and statep (match-string 2)) |
| 5988 | category (org-get-category (match-beginning 0)) | 5989 | category (org-get-category (match-beginning 0)) |
| 5989 | timestr (buffer-substring (match-beginning 0) (point-at-eol))) | 5990 | timestr (buffer-substring (match-beginning 0) (line-end-position))) |
| 5990 | (when (string-match "\\]" timestr) | 5991 | (when (string-match "\\]" timestr) |
| 5991 | ;; substring should only run to end of time stamp | 5992 | ;; substring should only run to end of time stamp |
| 5992 | (setq rest (substring timestr (match-end 0)) | 5993 | (setq rest (substring timestr (match-end 0)) |
| @@ -6044,7 +6045,7 @@ then those holidays will be skipped." | |||
| 6044 | 'type type 'date date | 6045 | 'type type 'date date |
| 6045 | 'undone-face 'org-warning 'done-face 'org-agenda-done) | 6046 | 'undone-face 'org-warning 'done-face 'org-agenda-done) |
| 6046 | (push txt ee)) | 6047 | (push txt ee)) |
| 6047 | (goto-char (point-at-eol)))) | 6048 | (goto-char (line-end-position)))) |
| 6048 | (nreverse ee))) | 6049 | (nreverse ee))) |
| 6049 | 6050 | ||
| 6050 | (defun org-agenda-show-clocking-issues () | 6051 | (defun org-agenda-show-clocking-issues () |
| @@ -6081,7 +6082,7 @@ See also the user option `org-agenda-clock-consistency-checks'." | |||
| 6081 | (setq issue "No valid clock line") (throw 'next t)) | 6082 | (setq issue "No valid clock line") (throw 'next t)) |
| 6082 | (org-with-point-at m | 6083 | (org-with-point-at m |
| 6083 | (save-excursion | 6084 | (save-excursion |
| 6084 | (goto-char (point-at-bol)) | 6085 | (goto-char (line-beginning-position)) |
| 6085 | (unless (looking-at re) | 6086 | (unless (looking-at re) |
| 6086 | (error "No valid Clock line") | 6087 | (error "No valid Clock line") |
| 6087 | (throw 'next t)) | 6088 | (throw 'next t)) |
| @@ -6127,7 +6128,7 @@ See also the user option `org-agenda-clock-consistency-checks'." | |||
| 6127 | (setq tlend (or te tlend) tlstart (or ts tlstart)) | 6128 | (setq tlend (or te tlend) tlstart (or ts tlstart)) |
| 6128 | (when issue | 6129 | (when issue |
| 6129 | ;; OK, there was some issue, add an overlay to show the issue | 6130 | ;; OK, there was some issue, add an overlay to show the issue |
| 6130 | (setq ov (make-overlay (point-at-bol) (point-at-eol))) | 6131 | (setq ov (make-overlay (line-beginning-position) (line-end-position))) |
| 6131 | (overlay-put ov 'before-string | 6132 | (overlay-put ov 'before-string |
| 6132 | (concat | 6133 | (concat |
| 6133 | (org-add-props | 6134 | (org-add-props |
| @@ -7147,7 +7148,10 @@ The optional argument TYPE tells the agenda type." | |||
| 7147 | (save-excursion | 7148 | (save-excursion |
| 7148 | (beginning-of-line 1) | 7149 | (beginning-of-line 1) |
| 7149 | (setq re (org-get-at-bol 'org-todo-regexp)) | 7150 | (setq re (org-get-at-bol 'org-todo-regexp)) |
| 7150 | (goto-char (or (text-property-any (point-at-bol) (point-at-eol) 'org-heading t) (point))) | 7151 | (goto-char (or (text-property-any (line-beginning-position) |
| 7152 | (line-end-position) | ||
| 7153 | 'org-heading t) | ||
| 7154 | (point))) | ||
| 7151 | (when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +")) | 7155 | (when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +")) |
| 7152 | (add-text-properties (match-beginning 0) (match-end 1) | 7156 | (add-text-properties (match-beginning 0) (match-end 1) |
| 7153 | (list 'face (org-get-todo-face 1))) | 7157 | (list 'face (org-get-todo-face 1))) |
| @@ -7428,7 +7432,7 @@ subtree." | |||
| 7428 | (point) | 7432 | (point) |
| 7429 | (if org-agenda-restriction-lock-highlight-subtree | 7433 | (if org-agenda-restriction-lock-highlight-subtree |
| 7430 | (save-excursion (org-end-of-subtree t t) (point)) | 7434 | (save-excursion (org-end-of-subtree t t) (point)) |
| 7431 | (point-at-eol))) | 7435 | (line-end-position))) |
| 7432 | (move-marker org-agenda-restrict-begin (point)) | 7436 | (move-marker org-agenda-restrict-begin (point)) |
| 7433 | (move-marker org-agenda-restrict-end | 7437 | (move-marker org-agenda-restrict-end |
| 7434 | (save-excursion (org-end-of-subtree t t))) | 7438 | (save-excursion (org-end-of-subtree t t))) |
| @@ -8254,8 +8258,8 @@ grouptags." | |||
| 8254 | (defun org-agenda-filter-hide-line (type) | 8258 | (defun org-agenda-filter-hide-line (type) |
| 8255 | "If current line is TYPE, hide it in the agenda buffer." | 8259 | "If current line is TYPE, hide it in the agenda buffer." |
| 8256 | (let* (buffer-invisibility-spec | 8260 | (let* (buffer-invisibility-spec |
| 8257 | (beg (max (point-min) (1- (point-at-bol)))) | 8261 | (beg (max (point-min) (1- (line-beginning-position)))) |
| 8258 | (end (point-at-eol))) | 8262 | (end (line-end-position))) |
| 8259 | (let ((inhibit-read-only t)) | 8263 | (let ((inhibit-read-only t)) |
| 8260 | (add-text-properties | 8264 | (add-text-properties |
| 8261 | beg end `(invisible org-filtered org-filter-type ,type))))) | 8265 | beg end `(invisible org-filtered org-filter-type ,type))))) |
| @@ -8887,7 +8891,7 @@ When called with a prefix argument, include all archive files as well." | |||
| 8887 | (interactive "p") | 8891 | (interactive "p") |
| 8888 | (let ((col (current-column))) | 8892 | (let ((col (current-column))) |
| 8889 | (dotimes (_ n) | 8893 | (dotimes (_ n) |
| 8890 | (when (next-single-property-change (point-at-eol) 'org-marker) | 8894 | (when (next-single-property-change (line-end-position) 'org-marker) |
| 8891 | (move-end-of-line 1) | 8895 | (move-end-of-line 1) |
| 8892 | (goto-char (next-single-property-change (point) 'org-marker)))) | 8896 | (goto-char (next-single-property-change (point) 'org-marker)))) |
| 8893 | (org-move-to-column col)) | 8897 | (org-move-to-column col)) |
| @@ -8945,7 +8949,8 @@ When called with a prefix argument, include all archive files as well." | |||
| 8945 | (when (re-search-forward org-complex-heading-regexp nil t) | 8949 | (when (re-search-forward org-complex-heading-regexp nil t) |
| 8946 | (goto-char (match-beginning 4))))) | 8950 | (goto-char (match-beginning 4))))) |
| 8947 | (run-hooks 'org-agenda-after-show-hook) | 8951 | (run-hooks 'org-agenda-after-show-hook) |
| 8948 | (and highlight (org-highlight (point-at-bol) (point-at-eol))))) | 8952 | (and highlight (org-highlight (line-beginning-position) |
| 8953 | (line-end-position))))) | ||
| 8949 | 8954 | ||
| 8950 | (defvar org-agenda-after-show-hook nil | 8955 | (defvar org-agenda-after-show-hook nil |
| 8951 | "Normal hook run after an item has been shown from the agenda. | 8956 | "Normal hook run after an item has been shown from the agenda. |
| @@ -8968,7 +8973,7 @@ deletes the agenda entry and don't move to the next entry." | |||
| 8968 | (level (and (eq org-agenda-loop-over-headlines-in-active-region 'start-level) | 8973 | (level (and (eq org-agenda-loop-over-headlines-in-active-region 'start-level) |
| 8969 | (org-get-at-bol 'level)))) | 8974 | (org-get-at-bol 'level)))) |
| 8970 | (while (< (point) mend) | 8975 | (while (< (point) mend) |
| 8971 | (let ((ov (make-overlay (point) (point-at-eol)))) | 8976 | (let ((ov (make-overlay (point) (line-end-position)))) |
| 8972 | (if (not (or all | 8977 | (if (not (or all |
| 8973 | (and match (looking-at-p match)) | 8978 | (and match (looking-at-p match)) |
| 8974 | (eq level (org-get-at-bol 'level)))) | 8979 | (eq level (org-get-at-bol 'level)))) |
| @@ -9013,8 +9018,8 @@ Pass ARG, FORCE-ARG, DELETE and BODY to `org-agenda-do-in-region'." | |||
| 9013 | (if (and (derived-mode-p 'org-mode) (not (member type '("sexp")))) | 9018 | (if (and (derived-mode-p 'org-mode) (not (member type '("sexp")))) |
| 9014 | (setq dbeg (progn (org-back-to-heading t) (point)) | 9019 | (setq dbeg (progn (org-back-to-heading t) (point)) |
| 9015 | dend (org-end-of-subtree t t)) | 9020 | dend (org-end-of-subtree t t)) |
| 9016 | (setq dbeg (point-at-bol) | 9021 | (setq dbeg (line-beginning-position) |
| 9017 | dend (min (point-max) (1+ (point-at-eol))))) | 9022 | dend (min (point-max) (1+ (line-end-position))))) |
| 9018 | (goto-char dbeg) | 9023 | (goto-char dbeg) |
| 9019 | (while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n))))) | 9024 | (while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n))))) |
| 9020 | (when (or (eq t org-agenda-confirm-kill) | 9025 | (when (or (eq t org-agenda-confirm-kill) |
| @@ -9113,7 +9118,8 @@ If this information is not given, the function uses the tree at point." | |||
| 9113 | (>= p beg) | 9118 | (>= p beg) |
| 9114 | (< p end)) | 9119 | (< p end)) |
| 9115 | (let ((inhibit-read-only t)) | 9120 | (let ((inhibit-read-only t)) |
| 9116 | (delete-region (point-at-bol) (1+ (point-at-eol))))) | 9121 | (delete-region (line-beginning-position) |
| 9122 | (1+ (line-end-position))))) | ||
| 9117 | (beginning-of-line 0)))))) | 9123 | (beginning-of-line 0)))))) |
| 9118 | 9124 | ||
| 9119 | (defun org-agenda-refile (&optional goto rfloc no-update) | 9125 | (defun org-agenda-refile (&optional goto rfloc no-update) |
| @@ -9162,7 +9168,8 @@ It also looks at the text of the entry itself." | |||
| 9162 | (let* ((marker (or (org-get-at-bol 'org-hd-marker) | 9168 | (let* ((marker (or (org-get-at-bol 'org-hd-marker) |
| 9163 | (org-get-at-bol 'org-marker))) | 9169 | (org-get-at-bol 'org-marker))) |
| 9164 | (buffer (and marker (marker-buffer marker))) | 9170 | (buffer (and marker (marker-buffer marker))) |
| 9165 | (prefix (buffer-substring (point-at-bol) (point-at-eol))) | 9171 | (prefix (buffer-substring (line-beginning-position) |
| 9172 | (line-end-position))) | ||
| 9166 | (lkall (and buffer (org-offer-links-in-entry | 9173 | (lkall (and buffer (org-offer-links-in-entry |
| 9167 | buffer marker arg prefix))) | 9174 | buffer marker arg prefix))) |
| 9168 | (lk0 (car lkall)) | 9175 | (lk0 (car lkall)) |
| @@ -9295,7 +9302,7 @@ if it was hidden in the outline." | |||
| 9295 | (let ((win (selected-window))) | 9302 | (let ((win (selected-window))) |
| 9296 | (org-agenda-goto t) | 9303 | (org-agenda-goto t) |
| 9297 | (org-back-to-heading) | 9304 | (org-back-to-heading) |
| 9298 | (set-window-start (selected-window) (point-at-bol)) | 9305 | (set-window-start (selected-window) (line-beginning-position)) |
| 9299 | (cond | 9306 | (cond |
| 9300 | ((= more 0) | 9307 | ((= more 0) |
| 9301 | (org-flag-subtree t) | 9308 | (org-flag-subtree t) |
| @@ -9532,7 +9539,8 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags." | |||
| 9532 | (with-current-buffer (marker-buffer hdmarker) | 9539 | (with-current-buffer (marker-buffer hdmarker) |
| 9533 | (org-with-wide-buffer | 9540 | (org-with-wide-buffer |
| 9534 | (org-agenda-format-item extra newhead level cat tags dotime)))) | 9541 | (org-agenda-format-item extra newhead level cat tags dotime)))) |
| 9535 | ;; pl (text-property-any (point-at-bol) (point-at-eol) 'org-heading t) | 9542 | ;; pl (text-property-any (line-beginning-position) |
| 9543 | ;; (line-end-position) 'org-heading t) | ||
| 9536 | undone-face (org-get-at-bol 'undone-face) | 9544 | undone-face (org-get-at-bol 'undone-face) |
| 9537 | done-face (org-get-at-bol 'done-face)) | 9545 | done-face (org-get-at-bol 'done-face)) |
| 9538 | (beginning-of-line 1) | 9546 | (beginning-of-line 1) |
| @@ -9549,10 +9557,11 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags." | |||
| 9549 | (replace-match new t t) | 9557 | (replace-match new t t) |
| 9550 | (beginning-of-line) | 9558 | (beginning-of-line) |
| 9551 | (when mark (move-overlay mark (point) (+ 2 (point))))) | 9559 | (when mark (move-overlay mark (point) (+ 2 (point))))) |
| 9552 | (add-text-properties (point-at-bol) (point-at-eol) props) | 9560 | (add-text-properties (line-beginning-position) |
| 9561 | (line-end-position) props) | ||
| 9553 | (when fixface | 9562 | (when fixface |
| 9554 | (add-text-properties | 9563 | (add-text-properties |
| 9555 | (point-at-bol) (point-at-eol) | 9564 | (line-beginning-position) (line-end-position) |
| 9556 | (list 'face | 9565 | (list 'face |
| 9557 | (if org-last-todo-state-is-todo | 9566 | (if org-last-todo-state-is-todo |
| 9558 | undone-face done-face)))) | 9567 | undone-face done-face)))) |
| @@ -9560,7 +9569,7 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags." | |||
| 9560 | (beginning-of-line 1)) | 9569 | (beginning-of-line 1)) |
| 9561 | (t (error "Line update did not work"))) | 9570 | (t (error "Line update did not work"))) |
| 9562 | (save-restriction | 9571 | (save-restriction |
| 9563 | (narrow-to-region (point-at-bol) (point-at-eol)) | 9572 | (narrow-to-region (line-beginning-position) (line-end-position)) |
| 9564 | (org-agenda-finalize))) | 9573 | (org-agenda-finalize))) |
| 9565 | (beginning-of-line 0))))) | 9574 | (beginning-of-line 0))))) |
| 9566 | 9575 | ||
| @@ -9791,7 +9800,8 @@ When called programmatically, FORCE-DIRECTION can be `set', `up', | |||
| 9791 | (setq arg (- today cdate)))) | 9800 | (setq arg (- today cdate)))) |
| 9792 | (org-timestamp-change arg (or what 'day)) | 9801 | (org-timestamp-change arg (or what 'day)) |
| 9793 | (when (and (org-at-date-range-p) | 9802 | (when (and (org-at-date-range-p) |
| 9794 | (re-search-backward org-tr-regexp-both (point-at-bol))) | 9803 | (re-search-backward org-tr-regexp-both |
| 9804 | (line-beginning-position))) | ||
| 9795 | (let ((end org-last-changed-timestamp)) | 9805 | (let ((end org-last-changed-timestamp)) |
| 9796 | (org-timestamp-change arg (or what 'day)) | 9806 | (org-timestamp-change arg (or what 'day)) |
| 9797 | (setq org-last-changed-timestamp | 9807 | (setq org-last-changed-timestamp |
| @@ -9846,7 +9856,7 @@ When called programmatically, FORCE-DIRECTION can be `set', `up', | |||
| 9846 | (length stamp)) | 9856 | (length stamp)) |
| 9847 | t) | 9857 | t) |
| 9848 | (add-text-properties | 9858 | (add-text-properties |
| 9849 | (1- (point)) (point-at-eol) | 9859 | (1- (point)) (line-end-position) |
| 9850 | (list 'display (org-add-props stamp nil | 9860 | (list 'display (org-add-props stamp nil |
| 9851 | 'face '(secondary-selection default)))) | 9861 | 'face '(secondary-selection default)))) |
| 9852 | (beginning-of-line 1)) | 9862 | (beginning-of-line 1)) |
| @@ -9990,13 +10000,13 @@ buffer, display it in another window." | |||
| 9990 | (if (equal (buffer-name) "*Calendar*") | 10000 | (if (equal (buffer-name) "*Calendar*") |
| 9991 | (setq d1 (calendar-cursor-to-date t) | 10001 | (setq d1 (calendar-cursor-to-date t) |
| 9992 | d2 (car calendar-mark-ring)) | 10002 | d2 (car calendar-mark-ring)) |
| 9993 | (setq dp1 (get-text-property (point-at-bol) 'day)) | 10003 | (setq dp1 (get-text-property (line-beginning-position) 'day)) |
| 9994 | (unless dp1 (user-error "No date defined in current line")) | 10004 | (unless dp1 (user-error "No date defined in current line")) |
| 9995 | (setq d1 (calendar-gregorian-from-absolute dp1) | 10005 | (setq d1 (calendar-gregorian-from-absolute dp1) |
| 9996 | d2 (and (ignore-errors (mark)) | 10006 | d2 (and (ignore-errors (mark)) |
| 9997 | (save-excursion | 10007 | (save-excursion |
| 9998 | (goto-char (mark)) | 10008 | (goto-char (mark)) |
| 9999 | (setq dp2 (get-text-property (point-at-bol) 'day))) | 10009 | (setq dp2 (get-text-property (line-beginning-position) 'day))) |
| 10000 | (calendar-gregorian-from-absolute dp2)))) | 10010 | (calendar-gregorian-from-absolute dp2)))) |
| 10001 | (message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree") | 10011 | (message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree") |
| 10002 | (setq char (read-char-exclusive)) | 10012 | (setq char (read-char-exclusive)) |
| @@ -10319,7 +10329,7 @@ This is a command that has to be installed in `calendar-mode-map'." | |||
| 10319 | 10329 | ||
| 10320 | (defun org-agenda-bulk-marked-p () | 10330 | (defun org-agenda-bulk-marked-p () |
| 10321 | "Non-nil when current entry is marked for bulk action." | 10331 | "Non-nil when current entry is marked for bulk action." |
| 10322 | (eq (get-char-property (point-at-bol) 'type) | 10332 | (eq (get-char-property (line-beginning-position) 'type) |
| 10323 | 'org-marked-entry-overlay)) | 10333 | 'org-marked-entry-overlay)) |
| 10324 | 10334 | ||
| 10325 | (defun org-agenda-bulk-mark (&optional arg) | 10335 | (defun org-agenda-bulk-mark (&optional arg) |
| @@ -10344,7 +10354,8 @@ When ARG is greater than one mark ARG lines." | |||
| 10344 | (unless (org-agenda-bulk-marked-p) | 10354 | (unless (org-agenda-bulk-marked-p) |
| 10345 | (unless m (user-error "Nothing to mark at point")) | 10355 | (unless m (user-error "Nothing to mark at point")) |
| 10346 | (push m org-agenda-bulk-marked-entries) | 10356 | (push m org-agenda-bulk-marked-entries) |
| 10347 | (setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol)))) | 10357 | (setq ov (make-overlay (line-beginning-position) |
| 10358 | (+ 2 (line-beginning-position)))) | ||
| 10348 | (org-overlay-display ov (concat org-agenda-bulk-mark-char " ") | 10359 | (org-overlay-display ov (concat org-agenda-bulk-mark-char " ") |
| 10349 | (org-get-todo-face "TODO") | 10360 | (org-get-todo-face "TODO") |
| 10350 | 'evaporate) | 10361 | 'evaporate) |
| @@ -10388,7 +10399,7 @@ When ARG is greater than one mark ARG lines." | |||
| 10388 | (org-agenda-bulk-unmark-all) | 10399 | (org-agenda-bulk-unmark-all) |
| 10389 | (cond ((org-agenda-bulk-marked-p) | 10400 | (cond ((org-agenda-bulk-marked-p) |
| 10390 | (org-agenda-bulk-remove-overlays | 10401 | (org-agenda-bulk-remove-overlays |
| 10391 | (point-at-bol) (+ 2 (point-at-bol))) | 10402 | (line-beginning-position) (+ 2 (line-beginning-position))) |
| 10392 | (setq org-agenda-bulk-marked-entries | 10403 | (setq org-agenda-bulk-marked-entries |
| 10393 | (delete (org-get-at-bol 'org-hd-marker) | 10404 | (delete (org-get-at-bol 'org-hd-marker) |
| 10394 | org-agenda-bulk-marked-entries)) | 10405 | org-agenda-bulk-marked-entries)) |
| @@ -10768,8 +10779,8 @@ tag and note"))))) | |||
| 10768 | (message "Entry unflagged"))) | 10779 | (message "Entry unflagged"))) |
| 10769 | 10780 | ||
| 10770 | (defun org-agenda-get-any-marker (&optional pos) | 10781 | (defun org-agenda-get-any-marker (&optional pos) |
| 10771 | (or (get-text-property (or pos (point-at-bol)) 'org-hd-marker) | 10782 | (or (get-text-property (or pos (line-beginning-position)) 'org-hd-marker) |
| 10772 | (get-text-property (or pos (point-at-bol)) 'org-marker))) | 10783 | (get-text-property (or pos (line-beginning-position)) 'org-marker))) |
| 10773 | 10784 | ||
| 10774 | ;;; Appointment reminders | 10785 | ;;; Appointment reminders |
| 10775 | 10786 | ||
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 2fd9a9c74da..abf4f9610e7 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el | |||
| @@ -1447,7 +1447,7 @@ Of course, if exact position has been required, just put it there." | |||
| 1447 | (if (org-at-table-p) | 1447 | (if (org-at-table-p) |
| 1448 | (save-excursion | 1448 | (save-excursion |
| 1449 | (org-table-goto-line (nth 1 where)) | 1449 | (org-table-goto-line (nth 1 where)) |
| 1450 | (point-at-bol)) | 1450 | (line-beginning-position)) |
| 1451 | (point)))))) | 1451 | (point)))))) |
| 1452 | (with-current-buffer (buffer-base-buffer (current-buffer)) | 1452 | (with-current-buffer (buffer-base-buffer (current-buffer)) |
| 1453 | (org-with-point-at pos | 1453 | (org-with-point-at pos |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index fdc9818a5a8..38e0826075b 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -1317,7 +1317,7 @@ the default behavior." | |||
| 1317 | ;; Clock in at which position? | 1317 | ;; Clock in at which position? |
| 1318 | (setq target-pos | 1318 | (setq target-pos |
| 1319 | (if (and (eobp) (not (org-at-heading-p))) | 1319 | (if (and (eobp) (not (org-at-heading-p))) |
| 1320 | (point-at-bol 0) | 1320 | (line-beginning-position 0) |
| 1321 | (point))) | 1321 | (point))) |
| 1322 | (save-excursion | 1322 | (save-excursion |
| 1323 | (when (and selected-task (marker-buffer selected-task)) | 1323 | (when (and selected-task (marker-buffer selected-task)) |
| @@ -1666,7 +1666,7 @@ to, overriding the existing value of `org-clock-out-switch-to-state'." | |||
| 1666 | (setq ts (match-string 2)) | 1666 | (setq ts (match-string 2)) |
| 1667 | (if fail-quietly (throw 'exit nil) (error "Clock start time is gone"))) | 1667 | (if fail-quietly (throw 'exit nil) (error "Clock start time is gone"))) |
| 1668 | (goto-char (match-end 0)) | 1668 | (goto-char (match-end 0)) |
| 1669 | (delete-region (point) (point-at-eol)) | 1669 | (delete-region (point) (line-end-position)) |
| 1670 | (insert "--") | 1670 | (insert "--") |
| 1671 | (setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive)) | 1671 | (setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive)) |
| 1672 | (setq s (org-time-convert-to-integer | 1672 | (setq s (org-time-convert-to-integer |
| @@ -1804,7 +1804,7 @@ Optional argument N tells to change by that many units." | |||
| 1804 | (goto-char org-clock-marker) | 1804 | (goto-char org-clock-marker) |
| 1805 | (if (looking-back (concat "^[ \t]*" org-clock-string ".*") | 1805 | (if (looking-back (concat "^[ \t]*" org-clock-string ".*") |
| 1806 | (line-beginning-position)) | 1806 | (line-beginning-position)) |
| 1807 | (progn (delete-region (1- (point-at-bol)) (point-at-eol)) | 1807 | (progn (delete-region (1- (line-beginning-position)) (line-end-position)) |
| 1808 | (org-remove-empty-drawer-at (point))) | 1808 | (org-remove-empty-drawer-at (point))) |
| 1809 | (message "Clock gone, cancel the timer anyway") | 1809 | (message "Clock gone, cancel the timer anyway") |
| 1810 | (sit-for 2))) | 1810 | (sit-for 2))) |
| @@ -1946,7 +1946,7 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes." | |||
| 1946 | (aset ltimes l (+ (aref ltimes l) t1)))) | 1946 | (aset ltimes l (+ (aref ltimes l) t1)))) |
| 1947 | (setq time (aref ltimes level)) | 1947 | (setq time (aref ltimes level)) |
| 1948 | (goto-char (match-beginning 0)) | 1948 | (goto-char (match-beginning 0)) |
| 1949 | (put-text-property (point) (point-at-eol) | 1949 | (put-text-property (point) (line-end-position) |
| 1950 | (or propname :org-clock-minutes) time) | 1950 | (or propname :org-clock-minutes) time) |
| 1951 | (when headline-filter | 1951 | (when headline-filter |
| 1952 | (save-excursion | 1952 | (save-excursion |
| @@ -2114,7 +2114,7 @@ fontified, and then returned." | |||
| 2114 | (forward-line 2) | 2114 | (forward-line 2) |
| 2115 | (buffer-substring (point) (progn | 2115 | (buffer-substring (point) (progn |
| 2116 | (re-search-forward "^[ \t]*#\\+END" nil t) | 2116 | (re-search-forward "^[ \t]*#\\+END" nil t) |
| 2117 | (point-at-bol))))) | 2117 | (line-beginning-position))))) |
| 2118 | 2118 | ||
| 2119 | ;;;###autoload | 2119 | ;;;###autoload |
| 2120 | (defun org-clock-report (&optional arg) | 2120 | (defun org-clock-report (&optional arg) |
| @@ -2390,7 +2390,7 @@ the currently selected interval size." | |||
| 2390 | (setq n (prefix-numeric-value n)) | 2390 | (setq n (prefix-numeric-value n)) |
| 2391 | (and (memq dir '(left down)) (setq n (- n))) | 2391 | (and (memq dir '(left down)) (setq n (- n))) |
| 2392 | (save-excursion | 2392 | (save-excursion |
| 2393 | (goto-char (point-at-bol)) | 2393 | (goto-char (line-beginning-position)) |
| 2394 | (if (not (looking-at "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>.*?:block[ \t]+\\(\\S-+\\)")) | 2394 | (if (not (looking-at "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>.*?:block[ \t]+\\(\\S-+\\)")) |
| 2395 | (user-error "Line needs a :block definition before this command works") | 2395 | (user-error "Line needs a :block definition before this command works") |
| 2396 | (let* ((b (match-beginning 1)) (e (match-end 1)) | 2396 | (let* ((b (match-beginning 1)) (e (match-end 1)) |
| @@ -3030,7 +3030,7 @@ Otherwise, return nil." | |||
| 3030 | ((not (match-end 2)) | 3030 | ((not (match-end 2)) |
| 3031 | (when (and (equal (marker-buffer org-clock-marker) (current-buffer)) | 3031 | (when (and (equal (marker-buffer org-clock-marker) (current-buffer)) |
| 3032 | (> org-clock-marker (point)) | 3032 | (> org-clock-marker (point)) |
| 3033 | (<= org-clock-marker (point-at-eol))) | 3033 | (<= org-clock-marker (line-end-position))) |
| 3034 | ;; The clock is running here | 3034 | ;; The clock is running here |
| 3035 | (setq org-clock-start-time | 3035 | (setq org-clock-start-time |
| 3036 | (org-time-string-to-time (match-string 1))) | 3036 | (org-time-string-to-time (match-string 1))) |
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 085e32d6774..15f0daa91ae 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el | |||
| @@ -1028,7 +1028,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'." | |||
| 1028 | (require 'org-agenda) | 1028 | (require 'org-agenda) |
| 1029 | (let (p m tp np dir txt) | 1029 | (let (p m tp np dir txt) |
| 1030 | (cond | 1030 | (cond |
| 1031 | ((setq p (text-property-any (point-at-bol) (point-at-eol) | 1031 | ((setq p (text-property-any (line-beginning-position) (line-end-position) |
| 1032 | 'org-imenu t)) | 1032 | 'org-imenu t)) |
| 1033 | (setq m (get-text-property p 'org-imenu-marker)) | 1033 | (setq m (get-text-property p 'org-imenu-marker)) |
| 1034 | (with-current-buffer (marker-buffer m) | 1034 | (with-current-buffer (marker-buffer m) |
| @@ -1038,7 +1038,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'." | |||
| 1038 | (overlays-at (point)))) | 1038 | (overlays-at (point)))) |
| 1039 | (org-agenda-remove-restriction-lock 'noupdate) | 1039 | (org-agenda-remove-restriction-lock 'noupdate) |
| 1040 | (org-agenda-set-restriction-lock 'subtree)))) | 1040 | (org-agenda-set-restriction-lock 'subtree)))) |
| 1041 | ((setq p (text-property-any (point-at-bol) (point-at-eol) | 1041 | ((setq p (text-property-any (line-beginning-position) (line-end-position) |
| 1042 | 'speedbar-function 'speedbar-find-file)) | 1042 | 'speedbar-function 'speedbar-find-file)) |
| 1043 | (setq tp (previous-single-property-change | 1043 | (setq tp (previous-single-property-change |
| 1044 | (1+ p) 'speedbar-function) | 1044 | (1+ p) 'speedbar-function) |
| @@ -1055,7 +1055,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'." | |||
| 1055 | (org-agenda-set-restriction-lock 'file))) | 1055 | (org-agenda-set-restriction-lock 'file))) |
| 1056 | (t (user-error "Don't know how to restrict Org mode agenda"))) | 1056 | (t (user-error "Don't know how to restrict Org mode agenda"))) |
| 1057 | (move-overlay org-speedbar-restriction-lock-overlay | 1057 | (move-overlay org-speedbar-restriction-lock-overlay |
| 1058 | (point-at-bol) (point-at-eol)) | 1058 | (line-beginning-position) (line-end-position)) |
| 1059 | (setq current-prefix-arg nil) | 1059 | (setq current-prefix-arg nil) |
| 1060 | (org-agenda-maybe-redo))) | 1060 | (org-agenda-maybe-redo))) |
| 1061 | 1061 | ||
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 20b5b030392..4c018062af3 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -2205,7 +2205,7 @@ CDR is a plist containing `:key', `:value', `:begin', `:end', | |||
| 2205 | (key (progn (looking-at "[ \t]*#\\+\\(\\S-*\\):") | 2205 | (key (progn (looking-at "[ \t]*#\\+\\(\\S-*\\):") |
| 2206 | (upcase (match-string-no-properties 1)))) | 2206 | (upcase (match-string-no-properties 1)))) |
| 2207 | (value (org-trim (buffer-substring-no-properties | 2207 | (value (org-trim (buffer-substring-no-properties |
| 2208 | (match-end 0) (point-at-eol)))) | 2208 | (match-end 0) (line-end-position)))) |
| 2209 | (pos-before-blank (progn (forward-line) (point))) | 2209 | (pos-before-blank (progn (forward-line) (point))) |
| 2210 | (end (progn (skip-chars-forward " \r\t\n" limit) | 2210 | (end (progn (skip-chars-forward " \r\t\n" limit) |
| 2211 | (if (eobp) (point) (line-beginning-position))))) | 2211 | (if (eobp) (point) (line-beginning-position))))) |
| @@ -4273,7 +4273,7 @@ This function assumes that current major mode is `org-mode'." | |||
| 4273 | (goto-char (point-min)) | 4273 | (goto-char (point-min)) |
| 4274 | (org-skip-whitespace) | 4274 | (org-skip-whitespace) |
| 4275 | (org-element--parse-elements | 4275 | (org-element--parse-elements |
| 4276 | (point-at-bol) (point-max) | 4276 | (line-beginning-position) (point-max) |
| 4277 | ;; Start in `first-section' mode so text before the first | 4277 | ;; Start in `first-section' mode so text before the first |
| 4278 | ;; headline belongs to a section. | 4278 | ;; headline belongs to a section. |
| 4279 | 'first-section nil granularity visible-only (list 'org-data nil)))) | 4279 | 'first-section nil granularity visible-only (list 'org-data nil)))) |
| @@ -6207,12 +6207,12 @@ end of ELEM-A." | |||
| 6207 | (end-A (save-excursion | 6207 | (end-A (save-excursion |
| 6208 | (goto-char (org-element-property :end elem-A)) | 6208 | (goto-char (org-element-property :end elem-A)) |
| 6209 | (skip-chars-backward " \r\t\n") | 6209 | (skip-chars-backward " \r\t\n") |
| 6210 | (point-at-eol))) | 6210 | (line-end-position))) |
| 6211 | (beg-B (org-element-property :begin elem-B)) | 6211 | (beg-B (org-element-property :begin elem-B)) |
| 6212 | (end-B (save-excursion | 6212 | (end-B (save-excursion |
| 6213 | (goto-char (org-element-property :end elem-B)) | 6213 | (goto-char (org-element-property :end elem-B)) |
| 6214 | (skip-chars-backward " \r\t\n") | 6214 | (skip-chars-backward " \r\t\n") |
| 6215 | (point-at-eol))) | 6215 | (line-end-position))) |
| 6216 | ;; Store inner overlays responsible for visibility status. | 6216 | ;; Store inner overlays responsible for visibility status. |
| 6217 | ;; We also need to store their boundaries as they will be | 6217 | ;; We also need to store their boundaries as they will be |
| 6218 | ;; removed from buffer. | 6218 | ;; removed from buffer. |
diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el index bc5175b1637..3bf4307f4a1 100644 --- a/lisp/org/org-habit.el +++ b/lisp/org/org-habit.el | |||
| @@ -426,7 +426,7 @@ current time." | |||
| 426 | (moment (org-time-subtract nil | 426 | (moment (org-time-subtract nil |
| 427 | (* 3600 org-extend-today-until)))) | 427 | (* 3600 org-extend-today-until)))) |
| 428 | (save-excursion | 428 | (save-excursion |
| 429 | (goto-char (if line (point-at-bol) (point-min))) | 429 | (goto-char (if line (line-beginning-position) (point-min))) |
| 430 | (while (not (eobp)) | 430 | (while (not (eobp)) |
| 431 | (let ((habit (get-text-property (point) 'org-habit-p)) | 431 | (let ((habit (get-text-property (point) 'org-habit-p)) |
| 432 | (invisible-prop (get-text-property (point) 'invisible))) | 432 | (invisible-prop (get-text-property (point) 'invisible))) |
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 581370bb53e..2cbbf7f7ac3 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el | |||
| @@ -238,7 +238,7 @@ going below `org-inlinetask-min-level'." | |||
| 238 | (setq beg (point)) | 238 | (setq beg (point)) |
| 239 | (replace-match down-task nil t nil 1) | 239 | (replace-match down-task nil t nil 1) |
| 240 | (org-inlinetask-goto-end) | 240 | (org-inlinetask-goto-end) |
| 241 | (if (and (eobp) (looking-back "END\\s-*" (point-at-bol))) | 241 | (if (and (eobp) (looking-back "END\\s-*" (line-beginning-position))) |
| 242 | (beginning-of-line) | 242 | (beginning-of-line) |
| 243 | (forward-line -1)) | 243 | (forward-line -1)) |
| 244 | (unless (= (point) beg) | 244 | (unless (= (point) beg) |
| @@ -264,7 +264,7 @@ If the task has an end part, also demote it." | |||
| 264 | (setq beg (point)) | 264 | (setq beg (point)) |
| 265 | (replace-match down-task nil t nil 1) | 265 | (replace-match down-task nil t nil 1) |
| 266 | (org-inlinetask-goto-end) | 266 | (org-inlinetask-goto-end) |
| 267 | (if (and (eobp) (looking-back "END\\s-*" (point-at-bol))) | 267 | (if (and (eobp) (looking-back "END\\s-*" (line-beginning-position))) |
| 268 | (beginning-of-line) | 268 | (beginning-of-line) |
| 269 | (forward-line -1)) | 269 | (forward-line -1)) |
| 270 | (unless (= (point) beg) | 270 | (unless (= (point) beg) |
| @@ -312,7 +312,7 @@ If the task has an end part, also demote it." | |||
| 312 | (if (bolp) (1- (point)) (point)))) | 312 | (if (bolp) (1- (point)) (point)))) |
| 313 | (start (save-excursion | 313 | (start (save-excursion |
| 314 | (org-inlinetask-goto-beginning) | 314 | (org-inlinetask-goto-beginning) |
| 315 | (point-at-eol)))) | 315 | (line-end-position)))) |
| 316 | (cond | 316 | (cond |
| 317 | ;; Nothing to show/hide. | 317 | ;; Nothing to show/hide. |
| 318 | ((= end start)) | 318 | ((= end start)) |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index da309f8c6da..978e36ed617 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -517,7 +517,7 @@ Contexts `block' and `invalid' refer to `org-list-forbidden-blocks'." | |||
| 517 | (and (not (looking-at beg-re)) | 517 | (and (not (looking-at beg-re)) |
| 518 | (not (looking-at end-re)) | 518 | (not (looking-at end-re)) |
| 519 | (setq beg (and (re-search-backward beg-re lim-up t) | 519 | (setq beg (and (re-search-backward beg-re lim-up t) |
| 520 | (1+ (point-at-eol)))) | 520 | (1+ (line-end-position)))) |
| 521 | (setq end (or (and (re-search-forward end-re lim-down t) | 521 | (setq end (or (and (re-search-forward end-re lim-down t) |
| 522 | (1- (match-beginning 0))) | 522 | (1- (match-beginning 0))) |
| 523 | lim-down)) | 523 | lim-down)) |
| @@ -528,12 +528,12 @@ Contexts `block' and `invalid' refer to `org-list-forbidden-blocks'." | |||
| 528 | (when (save-excursion | 528 | (when (save-excursion |
| 529 | (and (not (looking-at block-re)) | 529 | (and (not (looking-at block-re)) |
| 530 | (setq beg (and (re-search-backward block-re lim-up t) | 530 | (setq beg (and (re-search-backward block-re lim-up t) |
| 531 | (1+ (point-at-eol)))) | 531 | (1+ (line-end-position)))) |
| 532 | (looking-at "^[ \t]*#\\+begin_\\(\\S-+\\)") | 532 | (looking-at "^[ \t]*#\\+begin_\\(\\S-+\\)") |
| 533 | (setq type (downcase (match-string 1))) | 533 | (setq type (downcase (match-string 1))) |
| 534 | (goto-char beg) | 534 | (goto-char beg) |
| 535 | (setq end (or (and (re-search-forward block-re lim-down t) | 535 | (setq end (or (and (re-search-forward block-re lim-down t) |
| 536 | (1- (point-at-bol))) | 536 | (1- (line-beginning-position))) |
| 537 | lim-down)) | 537 | lim-down)) |
| 538 | (>= end pos) | 538 | (>= end pos) |
| 539 | (equal (downcase (match-string 1)) "end"))) | 539 | (equal (downcase (match-string 1)) "end"))) |
| @@ -547,7 +547,7 @@ Contexts `block' and `invalid' refer to `org-list-forbidden-blocks'." | |||
| 547 | (end-re (concat beg-re "END[ \t]*$"))) | 547 | (end-re (concat beg-re "END[ \t]*$"))) |
| 548 | (and (not (looking-at "^\\*+")) | 548 | (and (not (looking-at "^\\*+")) |
| 549 | (setq beg (and (re-search-backward beg-re lim-up t) | 549 | (setq beg (and (re-search-backward beg-re lim-up t) |
| 550 | (1+ (point-at-eol)))) | 550 | (1+ (line-end-position)))) |
| 551 | (not (looking-at end-re)) | 551 | (not (looking-at end-re)) |
| 552 | (setq end (and (re-search-forward end-re lim-down t) | 552 | (setq end (and (re-search-forward end-re lim-down t) |
| 553 | (1- (match-beginning 0)))) | 553 | (1- (match-beginning 0)))) |
| @@ -569,7 +569,7 @@ values are: | |||
| 569 | 6. position at item end. | 569 | 6. position at item end. |
| 570 | 570 | ||
| 571 | Thus the following list, where numbers in parens are | 571 | Thus the following list, where numbers in parens are |
| 572 | point-at-bol: | 572 | line-beginning-position: |
| 573 | 573 | ||
| 574 | - [X] first item (1) | 574 | - [X] first item (1) |
| 575 | 1. sub-item 1 (18) | 575 | 1. sub-item 1 (18) |
| @@ -617,7 +617,7 @@ Assume point is at an item." | |||
| 617 | ;; Ensure list ends at the first blank line. | 617 | ;; Ensure list ends at the first blank line. |
| 618 | (lambda () | 618 | (lambda () |
| 619 | (skip-chars-backward " \r\t\n") | 619 | (skip-chars-backward " \r\t\n") |
| 620 | (min (1+ (point-at-eol)) lim-down)))) | 620 | (min (1+ (line-end-position)) lim-down)))) |
| 621 | ;; 1. Read list from starting item to its beginning, and save | 621 | ;; 1. Read list from starting item to its beginning, and save |
| 622 | ;; top item position and indentation in BEG-CELL. Also store | 622 | ;; top item position and indentation in BEG-CELL. Also store |
| 623 | ;; ending position of items in END-LST. | 623 | ;; ending position of items in END-LST. |
| @@ -872,7 +872,7 @@ Point returned is at end of line." | |||
| 872 | (save-excursion | 872 | (save-excursion |
| 873 | (goto-char (org-list-get-item-end item struct)) | 873 | (goto-char (org-list-get-item-end item struct)) |
| 874 | (skip-chars-backward " \r\t\n") | 874 | (skip-chars-backward " \r\t\n") |
| 875 | (point-at-eol))) | 875 | (line-end-position))) |
| 876 | 876 | ||
| 877 | (defun org-list-get-parent (item struct parents) | 877 | (defun org-list-get-parent (item struct parents) |
| 878 | "Return parent of ITEM or nil. | 878 | "Return parent of ITEM or nil. |
| @@ -1182,7 +1182,7 @@ some heuristics to guess the result." | |||
| 1182 | (lambda () | 1182 | (lambda () |
| 1183 | ;; Count blank lines above beginning of line. | 1183 | ;; Count blank lines above beginning of line. |
| 1184 | (save-excursion | 1184 | (save-excursion |
| 1185 | (count-lines (goto-char (point-at-bol)) | 1185 | (count-lines (goto-char (line-beginning-position)) |
| 1186 | (progn (skip-chars-backward " \r\t\n") | 1186 | (progn (skip-chars-backward " \r\t\n") |
| 1187 | (forward-line) | 1187 | (forward-line) |
| 1188 | (point))))))) | 1188 | (point))))))) |
| @@ -1287,7 +1287,7 @@ This function modifies STRUCT." | |||
| 1287 | ;; must be removed, or they will be left, stacking up | 1287 | ;; must be removed, or they will be left, stacking up |
| 1288 | ;; after the list. | 1288 | ;; after the list. |
| 1289 | (when (< item-end pos) | 1289 | (when (< item-end pos) |
| 1290 | (delete-region (1- item-end) (point-at-eol))) | 1290 | (delete-region (1- item-end) (line-end-position))) |
| 1291 | (skip-chars-backward " \r\t\n") | 1291 | (skip-chars-backward " \r\t\n") |
| 1292 | ;; Cut position is after any blank on the line. | 1292 | ;; Cut position is after any blank on the line. |
| 1293 | (save-excursion | 1293 | (save-excursion |
| @@ -1364,7 +1364,7 @@ STRUCT is the list structure." | |||
| 1364 | (save-excursion | 1364 | (save-excursion |
| 1365 | (goto-char item) | 1365 | (goto-char item) |
| 1366 | (skip-chars-backward " \r\t\n") | 1366 | (skip-chars-backward " \r\t\n") |
| 1367 | (min (1+ (point-at-eol)) (point-max))) | 1367 | (min (1+ (line-end-position)) (point-max))) |
| 1368 | item))) | 1368 | item))) |
| 1369 | ;; Remove item from buffer. | 1369 | ;; Remove item from buffer. |
| 1370 | (delete-region beg end) | 1370 | (delete-region beg end) |
| @@ -1441,7 +1441,7 @@ This function returns, destructively, the new list structure." | |||
| 1441 | (setq dest (org-list-get-list-end item struct prevs)) | 1441 | (setq dest (org-list-get-list-end item struct prevs)) |
| 1442 | (save-excursion | 1442 | (save-excursion |
| 1443 | (goto-char (org-list-get-last-item item struct prevs)) | 1443 | (goto-char (org-list-get-last-item item struct prevs)) |
| 1444 | (point-at-eol))) | 1444 | (line-end-position))) |
| 1445 | ((and (stringp dest) (string-match-p "\\`[0-9]+\\'" dest)) | 1445 | ((and (stringp dest) (string-match-p "\\`[0-9]+\\'" dest)) |
| 1446 | (let* ((all (org-list-get-all-items item struct prevs)) | 1446 | (let* ((all (org-list-get-all-items item struct prevs)) |
| 1447 | (len (length all)) | 1447 | (len (length all)) |
| @@ -1453,7 +1453,7 @@ This function returns, destructively, the new list structure." | |||
| 1453 | (save-excursion | 1453 | (save-excursion |
| 1454 | (goto-char | 1454 | (goto-char |
| 1455 | (org-list-get-last-item item struct prevs)) | 1455 | (org-list-get-last-item item struct prevs)) |
| 1456 | (point-at-eol))))) | 1456 | (line-end-position))))) |
| 1457 | (t dest))) | 1457 | (t dest))) |
| 1458 | (org-M-RET-may-split-line nil) | 1458 | (org-M-RET-may-split-line nil) |
| 1459 | ;; Store inner overlays (to preserve visibility). | 1459 | ;; Store inner overlays (to preserve visibility). |
| @@ -1880,7 +1880,7 @@ Initial position of cursor is restored after the changes." | |||
| 1880 | (insert (concat new-box (unless counterp " ")))))) | 1880 | (insert (concat new-box (unless counterp " ")))))) |
| 1881 | ;; c. Indent item to appropriate column. | 1881 | ;; c. Indent item to appropriate column. |
| 1882 | (unless (= new-ind old-ind) | 1882 | (unless (= new-ind old-ind) |
| 1883 | (delete-region (goto-char (point-at-bol)) | 1883 | (delete-region (goto-char (line-beginning-position)) |
| 1884 | (progn (skip-chars-forward " \t") (point))) | 1884 | (progn (skip-chars-forward " \t") (point))) |
| 1885 | (indent-to new-ind)))))) | 1885 | (indent-to new-ind)))))) |
| 1886 | ;; 1. First get list of items and position endings. We maintain | 1886 | ;; 1. First get list of items and position endings. We maintain |
| @@ -2010,7 +2010,7 @@ Sublists of the list are skipped. Cursor is always at the | |||
| 2010 | beginning of the item." | 2010 | beginning of the item." |
| 2011 | (let* ((struct (org-list-struct)) | 2011 | (let* ((struct (org-list-struct)) |
| 2012 | (prevs (org-list-prevs-alist struct)) | 2012 | (prevs (org-list-prevs-alist struct)) |
| 2013 | (item (copy-marker (point-at-bol))) | 2013 | (item (copy-marker (line-beginning-position))) |
| 2014 | (all (org-list-get-all-items (marker-position item) struct prevs)) | 2014 | (all (org-list-get-all-items (marker-position item) struct prevs)) |
| 2015 | (value init-value)) | 2015 | (value init-value)) |
| 2016 | (dolist (e (nreverse all)) | 2016 | (dolist (e (nreverse all)) |
| @@ -2147,10 +2147,10 @@ the item, so this really moves item trees." | |||
| 2147 | (interactive) | 2147 | (interactive) |
| 2148 | (unless (org-at-item-p) (error "Not at an item")) | 2148 | (unless (org-at-item-p) (error "Not at an item")) |
| 2149 | (let* ((col (current-column)) | 2149 | (let* ((col (current-column)) |
| 2150 | (item (point-at-bol)) | 2150 | (item (line-beginning-position)) |
| 2151 | (struct (org-list-struct)) | 2151 | (struct (org-list-struct)) |
| 2152 | (prevs (org-list-prevs-alist struct)) | 2152 | (prevs (org-list-prevs-alist struct)) |
| 2153 | (next-item (org-list-get-next-item (point-at-bol) struct prevs))) | 2153 | (next-item (org-list-get-next-item (line-beginning-position) struct prevs))) |
| 2154 | (unless (or next-item org-list-use-circular-motion) | 2154 | (unless (or next-item org-list-use-circular-motion) |
| 2155 | (user-error "Cannot move this item further down")) | 2155 | (user-error "Cannot move this item further down")) |
| 2156 | (if (not next-item) | 2156 | (if (not next-item) |
| @@ -2168,10 +2168,10 @@ the item, so this really moves item trees." | |||
| 2168 | (interactive) | 2168 | (interactive) |
| 2169 | (unless (org-at-item-p) (error "Not at an item")) | 2169 | (unless (org-at-item-p) (error "Not at an item")) |
| 2170 | (let* ((col (current-column)) | 2170 | (let* ((col (current-column)) |
| 2171 | (item (point-at-bol)) | 2171 | (item (line-beginning-position)) |
| 2172 | (struct (org-list-struct)) | 2172 | (struct (org-list-struct)) |
| 2173 | (prevs (org-list-prevs-alist struct)) | 2173 | (prevs (org-list-prevs-alist struct)) |
| 2174 | (prev-item (org-list-get-prev-item (point-at-bol) struct prevs))) | 2174 | (prev-item (org-list-get-prev-item (line-beginning-position) struct prevs))) |
| 2175 | (unless (or prev-item org-list-use-circular-motion) | 2175 | (unless (or prev-item org-list-use-circular-motion) |
| 2176 | (user-error "Cannot move this item further up")) | 2176 | (user-error "Cannot move this item further up")) |
| 2177 | (if (not prev-item) | 2177 | (if (not prev-item) |
| @@ -2312,7 +2312,7 @@ is an integer, 0 means `-', 1 means `+' etc. If WHICH is | |||
| 2312 | (old-struct (copy-tree struct)) | 2312 | (old-struct (copy-tree struct)) |
| 2313 | (cbox (org-list-get-checkbox cpos struct)) | 2313 | (cbox (org-list-get-checkbox cpos struct)) |
| 2314 | (prevs (org-list-prevs-alist struct)) | 2314 | (prevs (org-list-prevs-alist struct)) |
| 2315 | (start (org-list-get-list-begin (point-at-bol) struct prevs)) | 2315 | (start (org-list-get-list-begin (line-beginning-position) struct prevs)) |
| 2316 | (new (unless (and cbox (equal arg '(4)) (equal start cpos)) | 2316 | (new (unless (and cbox (equal arg '(4)) (equal start cpos)) |
| 2317 | "[ ]"))) | 2317 | "[ ]"))) |
| 2318 | (dolist (pos (org-list-get-all-items | 2318 | (dolist (pos (org-list-get-all-items |
| @@ -2372,7 +2372,7 @@ subtree, ignoring planning line and any drawer following it." | |||
| 2372 | (let ((limit (region-end))) | 2372 | (let ((limit (region-end))) |
| 2373 | (goto-char (region-beginning)) | 2373 | (goto-char (region-beginning)) |
| 2374 | (if (org-list-search-forward (org-item-beginning-re) limit t) | 2374 | (if (org-list-search-forward (org-item-beginning-re) limit t) |
| 2375 | (setq lim-up (point-at-bol)) | 2375 | (setq lim-up (line-beginning-position)) |
| 2376 | (error "No item in region")) | 2376 | (error "No item in region")) |
| 2377 | (setq lim-down (copy-marker limit)))) | 2377 | (setq lim-down (copy-marker limit)))) |
| 2378 | ((org-at-heading-p) | 2378 | ((org-at-heading-p) |
| @@ -2381,14 +2381,14 @@ subtree, ignoring planning line and any drawer following it." | |||
| 2381 | (let ((limit (save-excursion (outline-next-heading) (point)))) | 2381 | (let ((limit (save-excursion (outline-next-heading) (point)))) |
| 2382 | (org-end-of-meta-data t) | 2382 | (org-end-of-meta-data t) |
| 2383 | (if (org-list-search-forward (org-item-beginning-re) limit t) | 2383 | (if (org-list-search-forward (org-item-beginning-re) limit t) |
| 2384 | (setq lim-up (point-at-bol)) | 2384 | (setq lim-up (line-beginning-position)) |
| 2385 | (error "No item in subtree")) | 2385 | (error "No item in subtree")) |
| 2386 | (setq lim-down (copy-marker limit)))) | 2386 | (setq lim-down (copy-marker limit)))) |
| 2387 | ;; Just one item: set SINGLEP flag. | 2387 | ;; Just one item: set SINGLEP flag. |
| 2388 | ((org-at-item-p) | 2388 | ((org-at-item-p) |
| 2389 | (setq singlep t) | 2389 | (setq singlep t) |
| 2390 | (setq lim-up (point-at-bol) | 2390 | (setq lim-up (line-beginning-position) |
| 2391 | lim-down (copy-marker (point-at-eol)))) | 2391 | lim-down (copy-marker (line-end-position)))) |
| 2392 | (t (error "Not at an item or heading, and no active region")))) | 2392 | (t (error "Not at an item or heading, and no active region")))) |
| 2393 | ;; Determine the checkbox going to be applied to all items | 2393 | ;; Determine the checkbox going to be applied to all items |
| 2394 | ;; within bounds. | 2394 | ;; within bounds. |
| @@ -2636,7 +2636,7 @@ Return t if successful." | |||
| 2636 | ;; Are we going to move the whole list? | 2636 | ;; Are we going to move the whole list? |
| 2637 | (specialp | 2637 | (specialp |
| 2638 | (and (not regionp) | 2638 | (and (not regionp) |
| 2639 | (= top (point-at-bol)) | 2639 | (= top (line-beginning-position)) |
| 2640 | (cdr (assq 'indent org-list-automatic-rules)) | 2640 | (cdr (assq 'indent org-list-automatic-rules)) |
| 2641 | (if no-subtree | 2641 | (if no-subtree |
| 2642 | (user-error | 2642 | (user-error |
| @@ -2650,12 +2650,12 @@ Return t if successful." | |||
| 2650 | (progn | 2650 | (progn |
| 2651 | (set-marker org-last-indent-begin-marker rbeg) | 2651 | (set-marker org-last-indent-begin-marker rbeg) |
| 2652 | (set-marker org-last-indent-end-marker rend)) | 2652 | (set-marker org-last-indent-end-marker rend)) |
| 2653 | (set-marker org-last-indent-begin-marker (point-at-bol)) | 2653 | (set-marker org-last-indent-begin-marker (line-beginning-position)) |
| 2654 | (set-marker org-last-indent-end-marker | 2654 | (set-marker org-last-indent-end-marker |
| 2655 | (cond | 2655 | (cond |
| 2656 | (specialp (org-list-get-bottom-point struct)) | 2656 | (specialp (org-list-get-bottom-point struct)) |
| 2657 | (no-subtree (1+ (point-at-bol))) | 2657 | (no-subtree (1+ (line-beginning-position))) |
| 2658 | (t (org-list-get-item-end (point-at-bol) struct)))))) | 2658 | (t (org-list-get-item-end (line-beginning-position) struct)))))) |
| 2659 | (let* ((beg (marker-position org-last-indent-begin-marker)) | 2659 | (let* ((beg (marker-position org-last-indent-begin-marker)) |
| 2660 | (end (marker-position org-last-indent-end-marker))) | 2660 | (end (marker-position org-last-indent-end-marker))) |
| 2661 | (cond | 2661 | (cond |
| @@ -2893,8 +2893,8 @@ function is being called interactively." | |||
| 2893 | (let* ((case-func (if with-case 'identity 'downcase)) | 2893 | (let* ((case-func (if with-case 'identity 'downcase)) |
| 2894 | (struct (org-list-struct)) | 2894 | (struct (org-list-struct)) |
| 2895 | (prevs (org-list-prevs-alist struct)) | 2895 | (prevs (org-list-prevs-alist struct)) |
| 2896 | (start (org-list-get-list-begin (point-at-bol) struct prevs)) | 2896 | (start (org-list-get-list-begin (line-beginning-position) struct prevs)) |
| 2897 | (end (org-list-get-list-end (point-at-bol) struct prevs)) | 2897 | (end (org-list-get-list-end (line-beginning-position) struct prevs)) |
| 2898 | (sorting-type | 2898 | (sorting-type |
| 2899 | (or sorting-type | 2899 | (or sorting-type |
| 2900 | (progn | 2900 | (progn |
| @@ -2939,21 +2939,21 @@ function is being called interactively." | |||
| 2939 | ((= dcst ?n) | 2939 | ((= dcst ?n) |
| 2940 | (string-to-number | 2940 | (string-to-number |
| 2941 | (org-sort-remove-invisible | 2941 | (org-sort-remove-invisible |
| 2942 | (buffer-substring (match-end 0) (point-at-eol))))) | 2942 | (buffer-substring (match-end 0) (line-end-position))))) |
| 2943 | ((= dcst ?a) | 2943 | ((= dcst ?a) |
| 2944 | (funcall case-func | 2944 | (funcall case-func |
| 2945 | (org-sort-remove-invisible | 2945 | (org-sort-remove-invisible |
| 2946 | (buffer-substring | 2946 | (buffer-substring |
| 2947 | (match-end 0) (point-at-eol))))) | 2947 | (match-end 0) (line-end-position))))) |
| 2948 | ((= dcst ?t) | 2948 | ((= dcst ?t) |
| 2949 | (cond | 2949 | (cond |
| 2950 | ;; If it is a timer list, convert timer to seconds | 2950 | ;; If it is a timer list, convert timer to seconds |
| 2951 | ((org-at-item-timer-p) | 2951 | ((org-at-item-timer-p) |
| 2952 | (org-timer-hms-to-secs (match-string 1))) | 2952 | (org-timer-hms-to-secs (match-string 1))) |
| 2953 | ((or (save-excursion | 2953 | ((or (save-excursion |
| 2954 | (re-search-forward org-ts-regexp (point-at-eol) t)) | 2954 | (re-search-forward org-ts-regexp (line-end-position) t)) |
| 2955 | (save-excursion (re-search-forward org-ts-regexp-both | 2955 | (save-excursion (re-search-forward org-ts-regexp-both |
| 2956 | (point-at-eol) t))) | 2956 | (line-end-position) t))) |
| 2957 | (org-time-string-to-seconds (match-string 0))) | 2957 | (org-time-string-to-seconds (match-string 0))) |
| 2958 | (t (float-time now)))) | 2958 | (t (float-time now)))) |
| 2959 | ((= dcst ?x) (or (and (stringp (match-string 1)) | 2959 | ((= dcst ?x) (or (and (stringp (match-string 1)) |
| @@ -3026,14 +3026,14 @@ With a prefix argument ARG, change the region in a single item." | |||
| 3026 | (save-excursion | 3026 | (save-excursion |
| 3027 | (goto-char pos) | 3027 | (goto-char pos) |
| 3028 | (skip-chars-forward " \r\t\n") | 3028 | (skip-chars-forward " \r\t\n") |
| 3029 | (point-at-bol)))) | 3029 | (line-beginning-position)))) |
| 3030 | beg end) | 3030 | beg end) |
| 3031 | ;; Determine boundaries of changes. | 3031 | ;; Determine boundaries of changes. |
| 3032 | (if (org-region-active-p) | 3032 | (if (org-region-active-p) |
| 3033 | (setq beg (funcall skip-blanks (region-beginning)) | 3033 | (setq beg (funcall skip-blanks (region-beginning)) |
| 3034 | end (copy-marker (region-end))) | 3034 | end (copy-marker (region-end))) |
| 3035 | (setq beg (point-at-bol) | 3035 | (setq beg (line-beginning-position) |
| 3036 | end (copy-marker (point-at-eol)))) | 3036 | end (copy-marker (line-end-position)))) |
| 3037 | ;; Depending on the starting line, choose an action on the text | 3037 | ;; Depending on the starting line, choose an action on the text |
| 3038 | ;; between BEG and END. | 3038 | ;; between BEG and END. |
| 3039 | (org-with-limited-levels | 3039 | (org-with-limited-levels |
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index bb0562dde06..cf0eb48f2da 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -1124,11 +1124,11 @@ the value in cadr." | |||
| 1124 | 1124 | ||
| 1125 | (defsubst org-get-at-bol (property) | 1125 | (defsubst org-get-at-bol (property) |
| 1126 | "Get text property PROPERTY at the beginning of line." | 1126 | "Get text property PROPERTY at the beginning of line." |
| 1127 | (get-text-property (point-at-bol) property)) | 1127 | (get-text-property (line-beginning-position) property)) |
| 1128 | 1128 | ||
| 1129 | (defun org-get-at-eol (property n) | 1129 | (defun org-get-at-eol (property n) |
| 1130 | "Get text property PROPERTY at the end of line less N characters." | 1130 | "Get text property PROPERTY at the end of line less N characters." |
| 1131 | (get-text-property (- (point-at-eol) n) property)) | 1131 | (get-text-property (- (line-end-position) n) property)) |
| 1132 | 1132 | ||
| 1133 | (defun org-find-text-property-in-string (prop s) | 1133 | (defun org-find-text-property-in-string (prop s) |
| 1134 | "Return the first non-nil value of property PROP in string S." | 1134 | "Return the first non-nil value of property PROP in string S." |
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el index 5cfaa7fe0ae..6f0a60125c5 100644 --- a/lisp/org/org-mobile.el +++ b/lisp/org/org-mobile.el | |||
| @@ -617,7 +617,7 @@ The table of checksums is written to the file mobile-checksums." | |||
| 617 | ((looking-at "[ \t]*$")) ; keep empty lines | 617 | ((looking-at "[ \t]*$")) ; keep empty lines |
| 618 | ((looking-at "=+$") | 618 | ((looking-at "=+$") |
| 619 | ;; remove underlining | 619 | ;; remove underlining |
| 620 | (delete-region (point) (point-at-eol))) | 620 | (delete-region (point) (line-end-position))) |
| 621 | ((get-text-property (point) 'org-agenda-structural-header) | 621 | ((get-text-property (point) 'org-agenda-structural-header) |
| 622 | (setq in-date nil) | 622 | (setq in-date nil) |
| 623 | (setq app (get-text-property (point) 'org-agenda-title-append)) | 623 | (setq app (get-text-property (point) 'org-agenda-title-append)) |
| @@ -637,14 +637,14 @@ The table of checksums is written to the file mobile-checksums." | |||
| 637 | (get-text-property (point) 'org-marker))) | 637 | (get-text-property (point) 'org-marker))) |
| 638 | (setq sexp (member (get-text-property (point) 'type) | 638 | (setq sexp (member (get-text-property (point) 'type) |
| 639 | '("diary" "sexp"))) | 639 | '("diary" "sexp"))) |
| 640 | (if (setq pl (text-property-any (point) (point-at-eol) 'org-heading t)) | 640 | (if (setq pl (text-property-any (point) (line-end-position) 'org-heading t)) |
| 641 | (progn | 641 | (progn |
| 642 | (setq prefix (org-trim (buffer-substring | 642 | (setq prefix (org-trim (buffer-substring |
| 643 | (point) pl)) | 643 | (point) pl)) |
| 644 | line (org-trim (buffer-substring | 644 | line (org-trim (buffer-substring |
| 645 | pl | 645 | pl |
| 646 | (point-at-eol)))) | 646 | (line-end-position)))) |
| 647 | (delete-region (point-at-bol) (point-at-eol)) | 647 | (delete-region (line-beginning-position) (line-end-position)) |
| 648 | (insert line "<before>" prefix "</before>") | 648 | (insert line "<before>" prefix "</before>") |
| 649 | (beginning-of-line 1)) | 649 | (beginning-of-line 1)) |
| 650 | (and (looking-at "[ \t]+") (replace-match ""))) | 650 | (and (looking-at "[ \t]+") (replace-match ""))) |
| @@ -857,7 +857,7 @@ If BEG and END are given, only do this in that region." | |||
| 857 | (org-mobile-timestamp-buffer (marker-buffer id-pos)) | 857 | (org-mobile-timestamp-buffer (marker-buffer id-pos)) |
| 858 | (push (marker-buffer id-pos) buf-list)) | 858 | (push (marker-buffer id-pos) buf-list)) |
| 859 | (unless (markerp id-pos) | 859 | (unless (markerp id-pos) |
| 860 | (goto-char (+ 2 (point-at-bol))) | 860 | (goto-char (+ 2 (line-beginning-position))) |
| 861 | (if (stringp id-pos) | 861 | (if (stringp id-pos) |
| 862 | (insert id-pos " ") | 862 | (insert id-pos " ") |
| 863 | (insert "BAD REFERENCE ")) | 863 | (insert "BAD REFERENCE ")) |
| @@ -1093,7 +1093,7 @@ be returned that indicates what went wrong." | |||
| 1093 | (org-archive-to-archive-sibling)) | 1093 | (org-archive-to-archive-sibling)) |
| 1094 | 1094 | ||
| 1095 | ((eq what 'body) | 1095 | ((eq what 'body) |
| 1096 | (setq current (buffer-substring (min (1+ (point-at-eol)) (point-max)) | 1096 | (setq current (buffer-substring (min (1+ (line-end-position)) (point-max)) |
| 1097 | (save-excursion (outline-next-heading) | 1097 | (save-excursion (outline-next-heading) |
| 1098 | (point)))) | 1098 | (point)))) |
| 1099 | (if (not (string-match "\\S-" current)) (setq current nil)) | 1099 | (if (not (string-match "\\S-" current)) (setq current nil)) |
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index a590ff87f24..aa4c20050ff 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el | |||
| @@ -184,7 +184,7 @@ Changing this variable requires a restart of Emacs to get activated." | |||
| 184 | (defun org-mouse-re-search-line (regexp) | 184 | (defun org-mouse-re-search-line (regexp) |
| 185 | "Search the current line for a given regular expression." | 185 | "Search the current line for a given regular expression." |
| 186 | (beginning-of-line) | 186 | (beginning-of-line) |
| 187 | (re-search-forward regexp (point-at-eol) t)) | 187 | (re-search-forward regexp (line-end-position) t)) |
| 188 | 188 | ||
| 189 | (defun org-mouse-end-headline () | 189 | (defun org-mouse-end-headline () |
| 190 | "Go to the end of current headline (ignoring tags)." | 190 | "Go to the end of current headline (ignoring tags)." |
| @@ -574,7 +574,7 @@ This means, between the beginning of line and the point." | |||
| 574 | (insert "+ ")) | 574 | (insert "+ ")) |
| 575 | (:end ; insert text here | 575 | (:end ; insert text here |
| 576 | (skip-chars-backward " \t") | 576 | (skip-chars-backward " \t") |
| 577 | (kill-region (point) (point-at-eol)) | 577 | (kill-region (point) (line-end-position)) |
| 578 | (unless (looking-back org-mouse-punctuation (line-beginning-position)) | 578 | (unless (looking-back org-mouse-punctuation (line-beginning-position)) |
| 579 | (insert (concat org-mouse-punctuation " "))))) | 579 | (insert (concat org-mouse-punctuation " "))))) |
| 580 | (insert text) | 580 | (insert text) |
| @@ -985,7 +985,7 @@ This means, between the beginning of line and the point." | |||
| 985 | (defun org-mouse-do-remotely (command) | 985 | (defun org-mouse-do-remotely (command) |
| 986 | ;; (org-agenda-check-no-diary) | 986 | ;; (org-agenda-check-no-diary) |
| 987 | (when (get-text-property (point) 'org-marker) | 987 | (when (get-text-property (point) 'org-marker) |
| 988 | (let* ((anticol (- (point-at-eol) (point))) | 988 | (let* ((anticol (- (line-end-position) (point))) |
| 989 | (marker (get-text-property (point) 'org-marker)) | 989 | (marker (get-text-property (point) 'org-marker)) |
| 990 | (buffer (marker-buffer marker)) | 990 | (buffer (marker-buffer marker)) |
| 991 | (pos (marker-position marker)) | 991 | (pos (marker-position marker)) |
| @@ -1009,7 +1009,7 @@ This means, between the beginning of line and the point." | |||
| 1009 | (org-flag-heading nil))) ; show the next heading | 1009 | (org-flag-heading nil))) ; show the next heading |
| 1010 | (org-back-to-heading) | 1010 | (org-back-to-heading) |
| 1011 | (setq marker (point-marker)) | 1011 | (setq marker (point-marker)) |
| 1012 | (goto-char (max (point-at-bol) (- (point-at-eol) anticol))) | 1012 | (goto-char (max (line-beginning-position) (- (line-end-position) anticol))) |
| 1013 | (funcall command) | 1013 | (funcall command) |
| 1014 | (message "_cmd: %S" org-mouse-cmd) | 1014 | (message "_cmd: %S" org-mouse-cmd) |
| 1015 | (message "this-command: %S" this-command) | 1015 | (message "this-command: %S" this-command) |
diff --git a/lisp/org/org-refile.el b/lisp/org/org-refile.el index 71d00a7a22b..3b3344b2709 100644 --- a/lisp/org/org-refile.el +++ b/lisp/org/org-refile.el | |||
| @@ -465,9 +465,9 @@ prefix argument (`C-u C-u C-u C-c C-w')." | |||
| 465 | (unless (or (org-kill-is-subtree-p | 465 | (unless (or (org-kill-is-subtree-p |
| 466 | (buffer-substring region-start region-end)) | 466 | (buffer-substring region-start region-end)) |
| 467 | (prog1 org-refile-active-region-within-subtree | 467 | (prog1 org-refile-active-region-within-subtree |
| 468 | (let ((s (point-at-eol))) | 468 | (let ((s (line-end-position))) |
| 469 | (org-toggle-heading) | 469 | (org-toggle-heading) |
| 470 | (setq region-end (+ (- (point-at-eol) s) region-end))))) | 470 | (setq region-end (+ (- (line-end-position) s) region-end))))) |
| 471 | (user-error "The region is not a (sequence of) subtree(s)"))) | 471 | (user-error "The region is not a (sequence of) subtree(s)"))) |
| 472 | (if (equal arg '(16)) | 472 | (if (equal arg '(16)) |
| 473 | (org-refile-goto-last-stored) | 473 | (org-refile-goto-last-stored) |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index c301bc6af1a..9b692d09736 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -486,7 +486,7 @@ This may be useful when columns have been shrunk." | |||
| 486 | (looking-at-p ".*|\\s-+<[rcl]?\\([0-9]+\\)?>")) | 486 | (looking-at-p ".*|\\s-+<[rcl]?\\([0-9]+\\)?>")) |
| 487 | (move-beginning-of-line 2)) | 487 | (move-beginning-of-line 2)) |
| 488 | (line-beginning-position))) | 488 | (line-beginning-position))) |
| 489 | (end (save-excursion (goto-char beg) (point-at-eol)))) | 489 | (end (save-excursion (goto-char beg) (line-end-position)))) |
| 490 | (if (pos-visible-in-window-p beg) | 490 | (if (pos-visible-in-window-p beg) |
| 491 | (when (overlayp org-table-header-overlay) | 491 | (when (overlayp org-table-header-overlay) |
| 492 | (delete-overlay org-table-header-overlay)) | 492 | (delete-overlay org-table-header-overlay)) |
| @@ -825,7 +825,7 @@ SIZE is a string Columns x Rows like for example \"3x2\"." | |||
| 825 | (line (concat (apply 'concat indent "|" (make-list columns " |")) | 825 | (line (concat (apply 'concat indent "|" (make-list columns " |")) |
| 826 | "\n"))) | 826 | "\n"))) |
| 827 | (if (string-match "^[ \t]*$" (buffer-substring-no-properties | 827 | (if (string-match "^[ \t]*$" (buffer-substring-no-properties |
| 828 | (point-at-bol) (point))) | 828 | (line-beginning-position) (point))) |
| 829 | (beginning-of-line 1) | 829 | (beginning-of-line 1) |
| 830 | (newline)) | 830 | (newline)) |
| 831 | ;; (mapcar (lambda (x) (insert line)) (make-list rows t)) | 831 | ;; (mapcar (lambda (x) (insert line)) (make-list rows t)) |
| @@ -1087,7 +1087,7 @@ With numeric argument N, move N-1 fields backward first." | |||
| 1087 | (while (> n 1) | 1087 | (while (> n 1) |
| 1088 | (setq n (1- n)) | 1088 | (setq n (1- n)) |
| 1089 | (org-table-previous-field)) | 1089 | (org-table-previous-field)) |
| 1090 | (if (not (re-search-backward "|" (point-at-bol 0) t)) | 1090 | (if (not (re-search-backward "|" (line-beginning-position 0) t)) |
| 1091 | (user-error "No more table fields before the current") | 1091 | (user-error "No more table fields before the current") |
| 1092 | (goto-char (match-end 0)) | 1092 | (goto-char (match-end 0)) |
| 1093 | (and (looking-at " ") (forward-char 1))) | 1093 | (and (looking-at " ") (forward-char 1))) |
| @@ -1102,7 +1102,7 @@ With numeric argument N, move N-1 fields forward first." | |||
| 1102 | (while (> n 1) | 1102 | (while (> n 1) |
| 1103 | (setq n (1- n)) | 1103 | (setq n (1- n)) |
| 1104 | (org-table-next-field)) | 1104 | (org-table-next-field)) |
| 1105 | (when (re-search-forward "|" (point-at-eol 1) t) | 1105 | (when (re-search-forward "|" (line-end-position 1) t) |
| 1106 | (backward-char 1) | 1106 | (backward-char 1) |
| 1107 | (skip-chars-backward " ") | 1107 | (skip-chars-backward " ") |
| 1108 | (when (and (equal (char-before (point)) ?|) (equal (char-after (point)) ?\s)) | 1108 | (when (and (equal (char-before (point)) ?|) (equal (char-after (point)) ?\s)) |
| @@ -1159,7 +1159,7 @@ When ALIGN is set, also realign the table." | |||
| 1159 | (goto-char (org-table-begin)) | 1159 | (goto-char (org-table-begin)) |
| 1160 | (while (and (re-search-forward org-table-dataline-regexp end t) | 1160 | (while (and (re-search-forward org-table-dataline-regexp end t) |
| 1161 | (setq cnt (1+ cnt)) | 1161 | (setq cnt (1+ cnt)) |
| 1162 | (< (point-at-eol) pos)))) | 1162 | (< (line-end-position) pos)))) |
| 1163 | cnt)) | 1163 | cnt)) |
| 1164 | 1164 | ||
| 1165 | (defun org-table-current-column () | 1165 | (defun org-table-current-column () |
| @@ -1322,7 +1322,7 @@ However, when FORCE is non-nil, create new columns if necessary." | |||
| 1322 | (beginning-of-line 1) | 1322 | (beginning-of-line 1) |
| 1323 | (when (> n 0) | 1323 | (when (> n 0) |
| 1324 | (while (and (> (setq n (1- n)) -1) | 1324 | (while (and (> (setq n (1- n)) -1) |
| 1325 | (or (search-forward "|" (point-at-eol) t) | 1325 | (or (search-forward "|" (line-end-position) t) |
| 1326 | (and force | 1326 | (and force |
| 1327 | (progn (end-of-line 1) | 1327 | (progn (end-of-line 1) |
| 1328 | (skip-chars-backward "^|") | 1328 | (skip-chars-backward "^|") |
| @@ -1663,7 +1663,7 @@ With prefix ABOVE, insert above the current line." | |||
| 1663 | (org-table-align)) | 1663 | (org-table-align)) |
| 1664 | (org-table-with-shrunk-columns | 1664 | (org-table-with-shrunk-columns |
| 1665 | (let ((line (org-table-clean-line | 1665 | (let ((line (org-table-clean-line |
| 1666 | (buffer-substring (point-at-bol) (point-at-eol)))) | 1666 | (buffer-substring (line-beginning-position) (line-end-position)))) |
| 1667 | (col (current-column))) | 1667 | (col (current-column))) |
| 1668 | (while (string-match "|\\( +\\)|" line) | 1668 | (while (string-match "|\\( +\\)|" line) |
| 1669 | (setq line (replace-match | 1669 | (setq line (replace-match |
| @@ -1712,7 +1712,8 @@ In particular, this does handle wide and invisible characters." | |||
| 1712 | (dline (and (not (org-match-line org-table-hline-regexp)) | 1712 | (dline (and (not (org-match-line org-table-hline-regexp)) |
| 1713 | (org-table-current-dline)))) | 1713 | (org-table-current-dline)))) |
| 1714 | (org-table-with-shrunk-columns | 1714 | (org-table-with-shrunk-columns |
| 1715 | (kill-region (point-at-bol) (min (1+ (point-at-eol)) (point-max))) | 1715 | (kill-region (line-beginning-position) |
| 1716 | (min (1+ (line-end-position)) (point-max))) | ||
| 1716 | (if (not (org-at-table-p)) (beginning-of-line 0)) | 1717 | (if (not (org-at-table-p)) (beginning-of-line 0)) |
| 1717 | (org-move-to-column col) | 1718 | (org-move-to-column col) |
| 1718 | (when (and dline | 1719 | (when (and dline |
| @@ -2253,14 +2254,14 @@ For all numbers larger than LIMIT, shift them by DELTA." | |||
| 2253 | (format "@%d\\$[0-9]+=.*?\\(::\\|$\\)" remove)))) | 2254 | (format "@%d\\$[0-9]+=.*?\\(::\\|$\\)" remove)))) |
| 2254 | s n a) | 2255 | s n a) |
| 2255 | (when remove | 2256 | (when remove |
| 2256 | (while (re-search-forward re2 (point-at-eol) t) | 2257 | (while (re-search-forward re2 (line-end-position) t) |
| 2257 | (unless (save-match-data (org-in-regexp "remote([^)]+?)")) | 2258 | (unless (save-match-data (org-in-regexp "remote([^)]+?)")) |
| 2258 | (if (equal (char-before (match-beginning 0)) ?.) | 2259 | (if (equal (char-before (match-beginning 0)) ?.) |
| 2259 | (user-error | 2260 | (user-error |
| 2260 | "Change makes TBLFM term %s invalid, use undo to recover" | 2261 | "Change makes TBLFM term %s invalid, use undo to recover" |
| 2261 | (match-string 0)) | 2262 | (match-string 0)) |
| 2262 | (replace-match ""))))) | 2263 | (replace-match ""))))) |
| 2263 | (while (re-search-forward re (point-at-eol) t) | 2264 | (while (re-search-forward re (line-end-position) t) |
| 2264 | (unless (save-match-data (org-in-regexp "remote([^)]+?)")) | 2265 | (unless (save-match-data (org-in-regexp "remote([^)]+?)")) |
| 2265 | (setq s (match-string 1) n (string-to-number s)) | 2266 | (setq s (match-string 1) n (string-to-number s)) |
| 2266 | (cond | 2267 | (cond |
| @@ -3789,8 +3790,9 @@ FACE, when non-nil, for the highlight." | |||
| 3789 | (let ((id 0) (ih 0) hline eol str ov) | 3790 | (let ((id 0) (ih 0) hline eol str ov) |
| 3790 | (goto-char (org-table-begin)) | 3791 | (goto-char (org-table-begin)) |
| 3791 | (while (org-at-table-p) | 3792 | (while (org-at-table-p) |
| 3792 | (setq eol (point-at-eol)) | 3793 | (setq eol (line-end-position)) |
| 3793 | (setq ov (make-overlay (point-at-bol) (1+ (point-at-bol)))) | 3794 | (setq ov (make-overlay (line-beginning-position) |
| 3795 | (1+ (line-beginning-position)))) | ||
| 3794 | (push ov org-table-coordinate-overlays) | 3796 | (push ov org-table-coordinate-overlays) |
| 3795 | (setq hline (looking-at org-table-hline-regexp)) | 3797 | (setq hline (looking-at org-table-hline-regexp)) |
| 3796 | (setq str (if hline (format "I*%-2d" (setq ih (1+ ih))) | 3798 | (setq str (if hline (format "I*%-2d" (setq ih (1+ ih))) |
| @@ -4923,7 +4925,7 @@ When LOCAL is non-nil, show references for the table at point." | |||
| 4923 | ((not local) nil) | 4925 | ((not local) nil) |
| 4924 | (t (user-error "No reference at point"))) | 4926 | (t (user-error "No reference at point"))) |
| 4925 | match (and what (or match (match-string 0)))) | 4927 | match (and what (or match (match-string 0)))) |
| 4926 | (when (and match (not (equal (match-beginning 0) (point-at-bol)))) | 4928 | (when (and match (not (equal (match-beginning 0) (line-beginning-position)))) |
| 4927 | (org-table-add-rectangle-overlay (match-beginning 0) (match-end 0) | 4929 | (org-table-add-rectangle-overlay (match-beginning 0) (match-end 0) |
| 4928 | 'secondary-selection)) | 4930 | 'secondary-selection)) |
| 4929 | (add-hook 'before-change-functions | 4931 | (add-hook 'before-change-functions |
diff --git a/lisp/org/org.el b/lisp/org/org.el index df708a2159d..9facbed04de 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -5971,7 +5971,7 @@ and subscripts." | |||
| 5971 | (emph-p (get-text-property mpos 'org-emphasis)) | 5971 | (emph-p (get-text-property mpos 'org-emphasis)) |
| 5972 | (link-p (get-text-property mpos 'mouse-face)) | 5972 | (link-p (get-text-property mpos 'mouse-face)) |
| 5973 | (keyw-p (eq 'org-special-keyword (get-text-property mpos 'face)))) | 5973 | (keyw-p (eq 'org-special-keyword (get-text-property mpos 'face)))) |
| 5974 | (goto-char (point-at-bol)) | 5974 | (goto-char (line-beginning-position)) |
| 5975 | (setq table-p (looking-at-p org-table-dataline-regexp) | 5975 | (setq table-p (looking-at-p org-table-dataline-regexp) |
| 5976 | comment-p (looking-at-p "^[ \t]*#[ +]")) | 5976 | comment-p (looking-at-p "^[ \t]*#[ +]")) |
| 5977 | (goto-char pos) | 5977 | (goto-char pos) |
| @@ -6443,7 +6443,7 @@ Use `\\[org-edit-special]' to edit table.el tables")) | |||
| 6443 | (and (memq org-cycle-emulate-tab '(white whitestart)) | 6443 | (and (memq org-cycle-emulate-tab '(white whitestart)) |
| 6444 | (save-excursion (beginning-of-line 1) (looking-at "[ \t]*")) | 6444 | (save-excursion (beginning-of-line 1) (looking-at "[ \t]*")) |
| 6445 | (or (and (eq org-cycle-emulate-tab 'white) | 6445 | (or (and (eq org-cycle-emulate-tab 'white) |
| 6446 | (= (match-end 0) (point-at-eol))) | 6446 | (= (match-end 0) (line-end-position))) |
| 6447 | (and (eq org-cycle-emulate-tab 'whitestart) | 6447 | (and (eq org-cycle-emulate-tab 'whitestart) |
| 6448 | (>= (match-end 0) pos))))) | 6448 | (>= (match-end 0) pos))))) |
| 6449 | (call-interactively (global-key-binding (kbd "TAB")))) | 6449 | (call-interactively (global-key-binding (kbd "TAB")))) |
| @@ -6498,7 +6498,7 @@ Use `\\[org-edit-special]' to edit table.el tables")) | |||
| 6498 | (progn | 6498 | (progn |
| 6499 | (beginning-of-line) | 6499 | (beginning-of-line) |
| 6500 | (setq struct (org-list-struct)) | 6500 | (setq struct (org-list-struct)) |
| 6501 | (setq eoh (point-at-eol)) | 6501 | (setq eoh (line-end-position)) |
| 6502 | (setq eos (org-list-get-item-end-before-blank (point) struct)) | 6502 | (setq eos (org-list-get-item-end-before-blank (point) struct)) |
| 6503 | (setq has-children (org-list-has-child-p (point) struct))) | 6503 | (setq has-children (org-list-has-child-p (point) struct))) |
| 6504 | (org-back-to-heading) | 6504 | (org-back-to-heading) |
| @@ -6545,7 +6545,7 @@ Use `\\[org-edit-special]' to edit table.el tables")) | |||
| 6545 | (unless (org-before-first-heading-p) | 6545 | (unless (org-before-first-heading-p) |
| 6546 | (run-hook-with-args 'org-pre-cycle-hook 'children)) | 6546 | (run-hook-with-args 'org-pre-cycle-hook 'children)) |
| 6547 | (if (org-at-item-p) | 6547 | (if (org-at-item-p) |
| 6548 | (org-list-set-item-visibility (point-at-bol) struct 'children) | 6548 | (org-list-set-item-visibility (line-beginning-position) struct 'children) |
| 6549 | (org-show-entry) | 6549 | (org-show-entry) |
| 6550 | (org-with-limited-levels (org-show-children)) | 6550 | (org-with-limited-levels (org-show-children)) |
| 6551 | (org-show-set-visibility 'tree) | 6551 | (org-show-set-visibility 'tree) |
| @@ -6729,7 +6729,7 @@ This function is the default value of the hook `org-cycle-hook'." | |||
| 6729 | (org-get-next-sibling) | 6729 | (org-get-next-sibling) |
| 6730 | (org-get-next-sibling)) | 6730 | (org-get-next-sibling)) |
| 6731 | (if (org-at-heading-p) | 6731 | (if (org-at-heading-p) |
| 6732 | (point-at-eol) | 6732 | (line-end-position) |
| 6733 | (point)))) | 6733 | (point)))) |
| 6734 | (level (looking-at "\\*+")) | 6734 | (level (looking-at "\\*+")) |
| 6735 | (re (when level (concat "^" (regexp-quote (match-string 0)) " ")))) | 6735 | (re (when level (concat "^" (regexp-quote (match-string 0)) " ")))) |
| @@ -7147,7 +7147,7 @@ This is a list with the following elements: | |||
| 7147 | "Get the entry text, after heading, entire subtree." | 7147 | "Get the entry text, after heading, entire subtree." |
| 7148 | (save-excursion | 7148 | (save-excursion |
| 7149 | (org-back-to-heading t) | 7149 | (org-back-to-heading t) |
| 7150 | (buffer-substring (point-at-bol 2) (org-end-of-subtree t)))) | 7150 | (buffer-substring (line-beginning-position 2) (org-end-of-subtree t)))) |
| 7151 | 7151 | ||
| 7152 | (defun org-edit-headline (&optional heading) | 7152 | (defun org-edit-headline (&optional heading) |
| 7153 | "Edit the current headline. | 7153 | "Edit the current headline. |
| @@ -8402,7 +8402,7 @@ function is being called interactively." | |||
| 8402 | (org-time-string-to-seconds (match-string 1)) | 8402 | (org-time-string-to-seconds (match-string 1)) |
| 8403 | (float-time now)))) | 8403 | (float-time now)))) |
| 8404 | ((= dcst ?p) | 8404 | ((= dcst ?p) |
| 8405 | (if (re-search-forward org-priority-regexp (point-at-eol) t) | 8405 | (if (re-search-forward org-priority-regexp (line-end-position) t) |
| 8406 | (string-to-char (match-string 2)) | 8406 | (string-to-char (match-string 2)) |
| 8407 | org-priority-default)) | 8407 | org-priority-default)) |
| 8408 | ((= dcst ?r) | 8408 | ((= dcst ?r) |
| @@ -9244,7 +9244,8 @@ If not found, stay at current position and return nil." | |||
| 9244 | (defun org-create-dblock (plist) | 9244 | (defun org-create-dblock (plist) |
| 9245 | "Create a dynamic block section, with parameters taken from PLIST. | 9245 | "Create a dynamic block section, with parameters taken from PLIST. |
| 9246 | PLIST must contain a :name entry which is used as the name of the block." | 9246 | PLIST must contain a :name entry which is used as the name of the block." |
| 9247 | (when (string-match "\\S-" (buffer-substring (point-at-bol) (point-at-eol))) | 9247 | (when (string-match "\\S-" (buffer-substring (line-beginning-position) |
| 9248 | (line-end-position))) | ||
| 9248 | (end-of-line 1) | 9249 | (end-of-line 1) |
| 9249 | (newline)) | 9250 | (newline)) |
| 9250 | (let ((col (current-column)) | 9251 | (let ((col (current-column)) |
| @@ -9908,7 +9909,8 @@ When called through ELisp, arg is also interpreted in the following way: | |||
| 9908 | (run-hooks 'org-after-todo-state-change-hook) | 9909 | (run-hooks 'org-after-todo-state-change-hook) |
| 9909 | (when (and arg (not (member org-state org-done-keywords))) | 9910 | (when (and arg (not (member org-state org-done-keywords))) |
| 9910 | (setq head (org-get-todo-sequence-head org-state))) | 9911 | (setq head (org-get-todo-sequence-head org-state))) |
| 9911 | (put-text-property (point-at-bol) (point-at-eol) 'org-todo-head head) | 9912 | (put-text-property (line-beginning-position) |
| 9913 | (line-end-position) 'org-todo-head head) | ||
| 9912 | ;; Do we need to trigger a repeat? | 9914 | ;; Do we need to trigger a repeat? |
| 9913 | (when now-done-p | 9915 | (when now-done-p |
| 9914 | (when (boundp 'org-agenda-headline-snapshot-before-repeat) | 9916 | (when (boundp 'org-agenda-headline-snapshot-before-repeat) |
| @@ -10121,7 +10123,7 @@ all statistics cookies in the buffer." | |||
| 10121 | (beginning-of-line 1) | 10123 | (beginning-of-line 1) |
| 10122 | (while (re-search-forward | 10124 | (while (re-search-forward |
| 10123 | "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)" | 10125 | "\\(\\(\\[[0-9]*%\\]\\)\\|\\(\\[[0-9]*/[0-9]*\\]\\)\\)" |
| 10124 | (point-at-eol) t) | 10126 | (line-end-position) t) |
| 10125 | (replace-match (if (match-end 2) "[100%]" "[0/0]") t t))))) | 10127 | (replace-match (if (match-end 2) "[100%]" "[0/0]") t t))))) |
| 10126 | (goto-char pos) | 10128 | (goto-char pos) |
| 10127 | (move-marker pos nil))))) | 10129 | (move-marker pos nil))))) |
| @@ -10168,7 +10170,7 @@ statistics everywhere." | |||
| 10168 | (downcase (or (org-entry-get nil "COOKIE_DATA") | 10170 | (downcase (or (org-entry-get nil "COOKIE_DATA") |
| 10169 | ""))))) | 10171 | ""))))) |
| 10170 | (throw 'exit nil)) | 10172 | (throw 'exit nil)) |
| 10171 | (while (re-search-forward box-re (point-at-eol) t) | 10173 | (while (re-search-forward box-re (line-end-position) t) |
| 10172 | (setq cnt-all 0 cnt-done 0 cookie-present t) | 10174 | (setq cnt-all 0 cnt-done 0 cookie-present t) |
| 10173 | (setq is-percent (match-end 2) checkbox-beg (match-beginning 0)) | 10175 | (setq is-percent (match-end 2) checkbox-beg (match-beginning 0)) |
| 10174 | (save-match-data | 10176 | (save-match-data |
| @@ -10277,10 +10279,11 @@ right sequence." | |||
| 10277 | (let (p) | 10279 | (let (p) |
| 10278 | (cond | 10280 | (cond |
| 10279 | ((not kwd) | 10281 | ((not kwd) |
| 10280 | (or (get-text-property (point-at-bol) 'org-todo-head) | 10282 | (or (get-text-property (line-beginning-position) 'org-todo-head) |
| 10281 | (progn | 10283 | (progn |
| 10282 | (setq p (next-single-property-change (point-at-bol) 'org-todo-head | 10284 | (setq p (next-single-property-change (line-beginning-position) |
| 10283 | nil (point-at-eol))) | 10285 | 'org-todo-head |
| 10286 | nil (line-end-position))) | ||
| 10284 | (get-text-property p 'org-todo-head)))) | 10287 | (get-text-property p 'org-todo-head)))) |
| 10285 | ((not (member kwd org-todo-keywords-1)) | 10288 | ((not (member kwd org-todo-keywords-1)) |
| 10286 | (car org-todo-keywords-1)) | 10289 | (car org-todo-keywords-1)) |
| @@ -10736,13 +10739,13 @@ nil." | |||
| 10736 | (outline-next-heading) | 10739 | (outline-next-heading) |
| 10737 | (while (re-search-backward re beg t) | 10740 | (while (re-search-backward re beg t) |
| 10738 | (replace-match "") | 10741 | (replace-match "") |
| 10739 | (if (and (string-match "\\S-" (buffer-substring (point-at-bol) (point))) | 10742 | (if (and (string-match "\\S-" (buffer-substring (line-beginning-position) (point))) |
| 10740 | (equal (char-before) ?\ )) | 10743 | (equal (char-before) ?\ )) |
| 10741 | (backward-delete-char 1) | 10744 | (backward-delete-char 1) |
| 10742 | (when (string-match "^[ \t]*$" (buffer-substring | 10745 | (when (string-match "^[ \t]*$" (buffer-substring |
| 10743 | (point-at-bol) (point-at-eol))) | 10746 | (line-beginning-position) (line-end-position))) |
| 10744 | (delete-region (point-at-bol) | 10747 | (delete-region (line-beginning-position) |
| 10745 | (min (point-max) (1+ (point-at-eol)))))))))) | 10748 | (min (point-max) (1+ (line-end-position)))))))))) |
| 10746 | 10749 | ||
| 10747 | (defvar org-time-was-given) ; dynamically scoped parameter | 10750 | (defvar org-time-was-given) ; dynamically scoped parameter |
| 10748 | (defvar org-end-time-was-given) ; dynamically scoped parameter | 10751 | (defvar org-end-time-was-given) ; dynamically scoped parameter |
| @@ -12216,7 +12219,7 @@ Also insert END." | |||
| 12216 | (defun org-fast-tag-show-exit (flag) | 12219 | (defun org-fast-tag-show-exit (flag) |
| 12217 | (save-excursion | 12220 | (save-excursion |
| 12218 | (org-goto-line 3) | 12221 | (org-goto-line 3) |
| 12219 | (when (re-search-forward "[ \t]+Next change exits" (point-at-eol) t) | 12222 | (when (re-search-forward "[ \t]+Next change exits" (line-end-position) t) |
| 12220 | (replace-match "")) | 12223 | (replace-match "")) |
| 12221 | (when flag | 12224 | (when flag |
| 12222 | (end-of-line 1) | 12225 | (end-of-line 1) |
| @@ -12263,7 +12266,7 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 12263 | (setq ov-start (match-beginning 1) | 12266 | (setq ov-start (match-beginning 1) |
| 12264 | ov-end (match-end 1) | 12267 | ov-end (match-end 1) |
| 12265 | ov-prefix "") | 12268 | ov-prefix "") |
| 12266 | (setq ov-start (1- (point-at-eol)) | 12269 | (setq ov-start (1- (line-end-position)) |
| 12267 | ov-end (1+ ov-start)) | 12270 | ov-end (1+ ov-start)) |
| 12268 | (skip-chars-forward "^\n\r") | 12271 | (skip-chars-forward "^\n\r") |
| 12269 | (setq ov-prefix | 12272 | (setq ov-prefix |
| @@ -12422,7 +12425,7 @@ Returns the new tags string, or nil to not change the current settings." | |||
| 12422 | (when (eq exit-after-next 'now) (throw 'exit t)) | 12425 | (when (eq exit-after-next 'now) (throw 'exit t)) |
| 12423 | (goto-char (point-min)) | 12426 | (goto-char (point-min)) |
| 12424 | (beginning-of-line 2) | 12427 | (beginning-of-line 2) |
| 12425 | (delete-region (point) (point-at-eol)) | 12428 | (delete-region (point) (line-end-position)) |
| 12426 | (org-fast-tag-insert "Current" current c-face) | 12429 | (org-fast-tag-insert "Current" current c-face) |
| 12427 | (org-set-current-tags-overlay current ov-prefix) | 12430 | (org-set-current-tags-overlay current ov-prefix) |
| 12428 | (let ((tag-re (concat "\\[.\\] \\(" org-tag-re "\\)"))) | 12431 | (let ((tag-re (concat "\\[.\\] \\(" org-tag-re "\\)"))) |
| @@ -14082,7 +14085,8 @@ user." | |||
| 14082 | (max (point-min) (- (point) 4)) (point)) | 14085 | (max (point-min) (- (point) 4)) (point)) |
| 14083 | " ")) | 14086 | " ")) |
| 14084 | (insert " "))) | 14087 | (insert " "))) |
| 14085 | (let* ((ans (concat (buffer-substring (point-at-bol) (point-max)) | 14088 | (let* ((ans (concat (buffer-substring (line-beginning-position) |
| 14089 | (point-max)) | ||
| 14086 | " " (or org-ans1 org-ans2))) | 14090 | " " (or org-ans1 org-ans2))) |
| 14087 | (org-end-time-was-given nil) | 14091 | (org-end-time-was-given nil) |
| 14088 | (f (org-read-date-analyze ans org-def org-defdecode)) | 14092 | (f (org-read-date-analyze ans org-def org-defdecode)) |
| @@ -14104,7 +14108,7 @@ user." | |||
| 14104 | (when org-read-date-analyze-futurep | 14108 | (when org-read-date-analyze-futurep |
| 14105 | (setq txt (concat txt " (=>F)"))) | 14109 | (setq txt (concat txt " (=>F)"))) |
| 14106 | (setq org-read-date-overlay | 14110 | (setq org-read-date-overlay |
| 14107 | (make-overlay (1- (point-at-eol)) (point-at-eol))) | 14111 | (make-overlay (1- (line-end-position)) (line-end-position))) |
| 14108 | (org-overlay-display org-read-date-overlay txt 'secondary-selection))))) | 14112 | (org-overlay-display org-read-date-overlay txt 'secondary-selection))))) |
| 14109 | 14113 | ||
| 14110 | (defun org-read-date-analyze (ans def defdecode) | 14114 | (defun org-read-date-analyze (ans def defdecode) |
| @@ -14654,8 +14658,8 @@ days in order to avoid rounding problems." | |||
| 14654 | (org-clock-update-time-maybe) | 14658 | (org-clock-update-time-maybe) |
| 14655 | (save-excursion | 14659 | (save-excursion |
| 14656 | (unless (org-at-date-range-p t) | 14660 | (unless (org-at-date-range-p t) |
| 14657 | (goto-char (point-at-bol)) | 14661 | (goto-char (line-beginning-position)) |
| 14658 | (re-search-forward org-tr-regexp-both (point-at-eol) t)) | 14662 | (re-search-forward org-tr-regexp-both (line-end-position) t)) |
| 14659 | (unless (org-at-date-range-p t) | 14663 | (unless (org-at-date-range-p t) |
| 14660 | (user-error "Not at a time-stamp range, and none found in current line"))) | 14664 | (user-error "Not at a time-stamp range, and none found in current line"))) |
| 14661 | (let* ((ts1 (match-string 1)) | 14665 | (let* ((ts1 (match-string 1)) |
| @@ -15719,7 +15723,8 @@ When a buffer is unmodified, it is just killed. When modified, it is saved | |||
| 15719 | (goto-char (point-min)) | 15723 | (goto-char (point-min)) |
| 15720 | (while (re-search-forward rea nil t) | 15724 | (while (re-search-forward rea nil t) |
| 15721 | (when (org-at-heading-p t) | 15725 | (when (org-at-heading-p t) |
| 15722 | (add-text-properties (point-at-bol) (org-end-of-subtree t) pa)))) | 15726 | (add-text-properties (line-beginning-position) |
| 15727 | (org-end-of-subtree t) pa)))) | ||
| 15723 | (goto-char (point-min)) | 15728 | (goto-char (point-min)) |
| 15724 | (setq re (format "^\\*+ .*\\<%s\\>" org-comment-string)) | 15729 | (setq re (format "^\\*+ .*\\<%s\\>" org-comment-string)) |
| 15725 | (while (re-search-forward re nil t) | 15730 | (while (re-search-forward re nil t) |
| @@ -17231,14 +17236,14 @@ this function returns t, nil otherwise." | |||
| 17231 | (save-excursion | 17236 | (save-excursion |
| 17232 | (catch 'exit | 17237 | (catch 'exit |
| 17233 | (unless (org-region-active-p) | 17238 | (unless (org-region-active-p) |
| 17234 | (setq beg (point-at-bol)) | 17239 | (setq beg (line-beginning-position)) |
| 17235 | (beginning-of-line 2) | 17240 | (beginning-of-line 2) |
| 17236 | (while (and (not (eobp)) ;; this is like `next-line' | 17241 | (while (and (not (eobp)) ;; this is like `next-line' |
| 17237 | (get-char-property (1- (point)) 'invisible)) | 17242 | (get-char-property (1- (point)) 'invisible)) |
| 17238 | (beginning-of-line 2)) | 17243 | (beginning-of-line 2)) |
| 17239 | (setq end (point)) | 17244 | (setq end (point)) |
| 17240 | (goto-char beg) | 17245 | (goto-char beg) |
| 17241 | (goto-char (point-at-eol)) | 17246 | (goto-char (line-end-position)) |
| 17242 | (setq end (max end (point))) | 17247 | (setq end (max end (point))) |
| 17243 | (while (re-search-forward re end t) | 17248 | (while (re-search-forward re end t) |
| 17244 | (when (get-char-property (match-beginning 0) 'invisible) | 17249 | (when (get-char-property (match-beginning 0) 'invisible) |
| @@ -18160,7 +18165,7 @@ number of stars to add." | |||
| 18160 | (goto-char pos) | 18165 | (goto-char pos) |
| 18161 | (while (org-at-comment-p) (forward-line)) | 18166 | (while (org-at-comment-p) (forward-line)) |
| 18162 | (skip-chars-forward " \r\t\n") | 18167 | (skip-chars-forward " \r\t\n") |
| 18163 | (point-at-bol)))) | 18168 | (line-beginning-position)))) |
| 18164 | beg end toggled) | 18169 | beg end toggled) |
| 18165 | ;; Determine boundaries of changes. If a universal prefix has | 18170 | ;; Determine boundaries of changes. If a universal prefix has |
| 18166 | ;; been given, put the list in a region. If region ends at a bol, | 18171 | ;; been given, put the list in a region. If region ends at a bol, |
| @@ -18174,9 +18179,9 @@ number of stars to add." | |||
| 18174 | (setq beg (funcall skip-blanks (region-beginning)) | 18179 | (setq beg (funcall skip-blanks (region-beginning)) |
| 18175 | end (copy-marker (save-excursion | 18180 | end (copy-marker (save-excursion |
| 18176 | (goto-char (region-end)) | 18181 | (goto-char (region-end)) |
| 18177 | (if (bolp) (point) (point-at-eol))))) | 18182 | (if (bolp) (point) (line-end-position))))) |
| 18178 | (setq beg (funcall skip-blanks (point-at-bol)) | 18183 | (setq beg (funcall skip-blanks (line-beginning-position)) |
| 18179 | end (copy-marker (point-at-eol)))) | 18184 | end (copy-marker (line-end-position)))) |
| 18180 | ;; Ensure inline tasks don't count as headings. | 18185 | ;; Ensure inline tasks don't count as headings. |
| 18181 | (org-with-limited-levels | 18186 | (org-with-limited-levels |
| 18182 | (save-excursion | 18187 | (save-excursion |
| @@ -18787,7 +18792,9 @@ and :keyword." | |||
| 18787 | ;; First the large context | 18792 | ;; First the large context |
| 18788 | (cond | 18793 | (cond |
| 18789 | ((org-at-heading-p t) | 18794 | ((org-at-heading-p t) |
| 18790 | (push (list :headline (point-at-bol) (point-at-eol)) clist) | 18795 | (push (list :headline (line-beginning-position) |
| 18796 | (line-end-position)) | ||
| 18797 | clist) | ||
| 18791 | (when (progn | 18798 | (when (progn |
| 18792 | (beginning-of-line 1) | 18799 | (beginning-of-line 1) |
| 18793 | (looking-at org-todo-line-tags-regexp)) | 18800 | (looking-at org-todo-line-tags-regexp)) |
| @@ -18801,7 +18808,7 @@ and :keyword." | |||
| 18801 | 18808 | ||
| 18802 | ((org-at-item-p) | 18809 | ((org-at-item-p) |
| 18803 | (push (org-point-in-group p 2 :item-bullet) clist) | 18810 | (push (org-point-in-group p 2 :item-bullet) clist) |
| 18804 | (push (list :item (point-at-bol) | 18811 | (push (list :item (line-beginning-position) |
| 18805 | (save-excursion (org-end-of-item) (point))) | 18812 | (save-excursion (org-end-of-item) (point))) |
| 18806 | clist) | 18813 | clist) |
| 18807 | (and (org-at-item-checkbox-p) | 18814 | (and (org-at-item-checkbox-p) |
| @@ -19198,7 +19205,7 @@ Also align node properties according to `org-property-format'." | |||
| 19198 | (beginning-of-line 1) | 19205 | (beginning-of-line 1) |
| 19199 | (skip-chars-backward "\n") | 19206 | (skip-chars-backward "\n") |
| 19200 | (or (org-at-heading-p) | 19207 | (or (org-at-heading-p) |
| 19201 | (looking-back ":END:.*" (point-at-bol)))))) | 19208 | (looking-back ":END:.*" (line-beginning-position)))))) |
| 19202 | (let* ((element (save-excursion (beginning-of-line) (org-element-at-point))) | 19209 | (let* ((element (save-excursion (beginning-of-line) (org-element-at-point))) |
| 19203 | (type (org-element-type element))) | 19210 | (type (org-element-type element))) |
| 19204 | (cond ((and (memq type '(plain-list item)) | 19211 | (cond ((and (memq type '(plain-list item)) |
| @@ -19938,7 +19945,7 @@ major mode." | |||
| 19938 | (point)))) | 19945 | (point)))) |
| 19939 | (org-babel-do-in-edit-buffer (call-interactively 'comment-dwim)) | 19946 | (org-babel-do-in-edit-buffer (call-interactively 'comment-dwim)) |
| 19940 | (beginning-of-line) | 19947 | (beginning-of-line) |
| 19941 | (if (looking-at "\\s-*$") (delete-region (point) (point-at-eol)) | 19948 | (if (looking-at "\\s-*$") (delete-region (point) (line-end-position)) |
| 19942 | (open-line 1)) | 19949 | (open-line 1)) |
| 19943 | (org-indent-line) | 19950 | (org-indent-line) |
| 19944 | (insert "# "))) | 19951 | (insert "# "))) |
| @@ -20431,7 +20438,7 @@ interactive command with similar behavior." | |||
| 20431 | (and (looking-at "[ \t]*$") | 20438 | (and (looking-at "[ \t]*$") |
| 20432 | (string-match | 20439 | (string-match |
| 20433 | "\\`\\*+\\'" | 20440 | "\\`\\*+\\'" |
| 20434 | (buffer-substring (point-at-bol) (point))))))) | 20441 | (buffer-substring (line-beginning-position) (point))))))) |
| 20435 | swallowp) | 20442 | swallowp) |
| 20436 | (cond | 20443 | (cond |
| 20437 | ((and subtreep org-yank-folded-subtrees) | 20444 | ((and subtreep org-yank-folded-subtrees) |
| @@ -20464,7 +20471,7 @@ interactive command with similar behavior." | |||
| 20464 | (beginning-of-line 1) | 20471 | (beginning-of-line 1) |
| 20465 | (push-mark beg 'nomsg))) | 20472 | (push-mark beg 'nomsg))) |
| 20466 | ((and subtreep org-yank-adjusted-subtrees) | 20473 | ((and subtreep org-yank-adjusted-subtrees) |
| 20467 | (let ((beg (point-at-bol))) | 20474 | (let ((beg (line-beginning-position))) |
| 20468 | (org-paste-subtree nil nil 'for-yank) | 20475 | (org-paste-subtree nil nil 'for-yank) |
| 20469 | (push-mark beg 'nomsg))) | 20476 | (push-mark beg 'nomsg))) |
| 20470 | (t | 20477 | (t |
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index bb3369de5fc..c9bd8ea9fe1 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el | |||
| @@ -445,7 +445,7 @@ The most useful commands are: | |||
| 445 | (let ((font-lock-fontify-region-function #'ignore)) | 445 | (let ((font-lock-fontify-region-function #'ignore)) |
| 446 | ;; insert-and-inherit will pick the right face automatically | 446 | ;; insert-and-inherit will pick the right face automatically |
| 447 | (while (search-forward-regexp "^:" nil t) | 447 | (while (search-forward-regexp "^:" nil t) |
| 448 | (setq bound (point-at-eol)) | 448 | (setq bound (line-end-position)) |
| 449 | (while (search-forward cipher-string bound 'end) | 449 | (while (search-forward cipher-string bound 'end) |
| 450 | (decipher-insert plain-char))))))) | 450 | (decipher-insert plain-char))))))) |
| 451 | 451 | ||
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el index 32031d19462..7d7e9265380 100644 --- a/lisp/progmodes/cfengine.el +++ b/lisp/progmodes/cfengine.el | |||
| @@ -1186,7 +1186,7 @@ Intended as the value of `indent-line-function'." | |||
| 1186 | (skip-syntax-forward "w_") | 1186 | (skip-syntax-forward "w_") |
| 1187 | (when (search-backward-regexp | 1187 | (when (search-backward-regexp |
| 1188 | cfengine-mode-syntax-functions-regex | 1188 | cfengine-mode-syntax-functions-regex |
| 1189 | (point-at-bol) | 1189 | (line-beginning-position) |
| 1190 | t) | 1190 | t) |
| 1191 | (match-string 1))))) | 1191 | (match-string 1))))) |
| 1192 | (and w (assq (intern w) flist)))))) | 1192 | (and w (assq (intern w) flist)))))) |
| @@ -1285,7 +1285,7 @@ see. Use it by enabling `eldoc-mode'." | |||
| 1285 | "Return completions for function name around or before point." | 1285 | "Return completions for function name around or before point." |
| 1286 | (let* ((bounds (save-excursion | 1286 | (let* ((bounds (save-excursion |
| 1287 | (let ((p (point))) | 1287 | (let ((p (point))) |
| 1288 | (skip-syntax-backward "w_" (point-at-bol)) | 1288 | (skip-syntax-backward "w_" (line-beginning-position)) |
| 1289 | (list (point) p)))) | 1289 | (list (point) p)))) |
| 1290 | (syntax (cfengine3-make-syntax-cache)) | 1290 | (syntax (cfengine3-make-syntax-cache)) |
| 1291 | (flist (assq 'functions syntax))) | 1291 | (flist (assq 'functions syntax))) |
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 2a7bbf01058..ba0adcc913f 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el | |||
| @@ -2081,7 +2081,7 @@ Affected by `cperl-electric-parens'." | |||
| 2081 | "Insert a construction appropriate after a keyword. | 2081 | "Insert a construction appropriate after a keyword. |
| 2082 | Help message may be switched off by setting `cperl-message-electric-keyword' | 2082 | Help message may be switched off by setting `cperl-message-electric-keyword' |
| 2083 | to nil." | 2083 | to nil." |
| 2084 | (let ((beg (point-at-bol)) | 2084 | (let ((beg (line-beginning-position)) |
| 2085 | (dollar (and (eq last-command-event ?$) | 2085 | (dollar (and (eq last-command-event ?$) |
| 2086 | (eq this-command 'self-insert-command))) | 2086 | (eq this-command 'self-insert-command))) |
| 2087 | (delete (and (memq last-command-event '(?\s ?\n ?\t ?\f)) | 2087 | (delete (and (memq last-command-event '(?\s ?\n ?\t ?\f)) |
| @@ -2224,7 +2224,7 @@ to nil." | |||
| 2224 | "Insert a construction appropriate after a keyword. | 2224 | "Insert a construction appropriate after a keyword. |
| 2225 | Help message may be switched off by setting `cperl-message-electric-keyword' | 2225 | Help message may be switched off by setting `cperl-message-electric-keyword' |
| 2226 | to nil." | 2226 | to nil." |
| 2227 | (let ((beg (point-at-bol))) | 2227 | (let ((beg (line-beginning-position))) |
| 2228 | (and (save-excursion | 2228 | (and (save-excursion |
| 2229 | (skip-chars-backward "[:alpha:]") | 2229 | (skip-chars-backward "[:alpha:]") |
| 2230 | (cperl-after-expr-p nil "{;:")) | 2230 | (cperl-after-expr-p nil "{;:")) |
| @@ -2264,8 +2264,8 @@ to nil." | |||
| 2264 | "Go to end of line, open a new line and indent appropriately. | 2264 | "Go to end of line, open a new line and indent appropriately. |
| 2265 | If in POD, insert appropriate lines." | 2265 | If in POD, insert appropriate lines." |
| 2266 | (interactive) | 2266 | (interactive) |
| 2267 | (let ((beg (point-at-bol)) | 2267 | (let ((beg (line-beginning-position)) |
| 2268 | (end (point-at-eol)) | 2268 | (end (line-end-position)) |
| 2269 | (pos (point)) start over cut res) | 2269 | (pos (point)) start over cut res) |
| 2270 | (if (and ; Check if we need to split: | 2270 | (if (and ; Check if we need to split: |
| 2271 | ; i.e., on a boundary and inside "{...}" | 2271 | ; i.e., on a boundary and inside "{...}" |
| @@ -2343,8 +2343,8 @@ If in POD, insert appropriate lines." | |||
| 2343 | (forward-paragraph -1) | 2343 | (forward-paragraph -1) |
| 2344 | (forward-word-strictly 1) | 2344 | (forward-word-strictly 1) |
| 2345 | (setq pos (point)) | 2345 | (setq pos (point)) |
| 2346 | (setq cut (buffer-substring (point) (point-at-eol))) | 2346 | (setq cut (buffer-substring (point) (line-end-position))) |
| 2347 | (delete-char (- (point-at-eol) (point))) | 2347 | (delete-char (- (line-end-position) (point))) |
| 2348 | (setq res (expand-abbrev)) | 2348 | (setq res (expand-abbrev)) |
| 2349 | (save-excursion | 2349 | (save-excursion |
| 2350 | (goto-char pos) | 2350 | (goto-char pos) |
| @@ -2823,7 +2823,7 @@ Will not look before LIM." | |||
| 2823 | (point-max)))) ; do not loop if no syntaxification | 2823 | (point-max)))) ; do not loop if no syntaxification |
| 2824 | ;; label: | 2824 | ;; label: |
| 2825 | (t | 2825 | (t |
| 2826 | (setq colon-line-end (point-at-eol)) | 2826 | (setq colon-line-end (line-end-position)) |
| 2827 | (search-forward ":")))) | 2827 | (search-forward ":")))) |
| 2828 | ;; We are at beginning of code (NOT label or comment) | 2828 | ;; We are at beginning of code (NOT label or comment) |
| 2829 | ;; First, the following code counts | 2829 | ;; First, the following code counts |
| @@ -2866,7 +2866,7 @@ Will not look before LIM." | |||
| 2866 | (looking-at (concat cperl-sub-regexp "\\>")))) | 2866 | (looking-at (concat cperl-sub-regexp "\\>")))) |
| 2867 | (setq p (nth 1 ; start of innermost containing list | 2867 | (setq p (nth 1 ; start of innermost containing list |
| 2868 | (parse-partial-sexp | 2868 | (parse-partial-sexp |
| 2869 | (point-at-bol) | 2869 | (line-beginning-position) |
| 2870 | (point))))) | 2870 | (point))))) |
| 2871 | (progn | 2871 | (progn |
| 2872 | (goto-char (1+ p)) ; enclosing block on the same line | 2872 | (goto-char (1+ p)) ; enclosing block on the same line |
| @@ -3109,7 +3109,7 @@ comment." | |||
| 3109 | Returns true if comment is found. In POD will not move the point." | 3109 | Returns true if comment is found. In POD will not move the point." |
| 3110 | ;; If the line is inside other syntax groups (qq-style strings, HERE-docs) | 3110 | ;; If the line is inside other syntax groups (qq-style strings, HERE-docs) |
| 3111 | ;; then looks for literal # or end-of-line. | 3111 | ;; then looks for literal # or end-of-line. |
| 3112 | (let (state stop-in cpoint (lim (point-at-eol)) pr e) | 3112 | (let (state stop-in cpoint (lim (line-end-position)) pr e) |
| 3113 | (or cperl-font-locking | 3113 | (or cperl-font-locking |
| 3114 | (cperl-update-syntaxification lim)) | 3114 | (cperl-update-syntaxification lim)) |
| 3115 | (beginning-of-line) | 3115 | (beginning-of-line) |
| @@ -4020,7 +4020,8 @@ recursive calls in starting lines of here-documents." | |||
| 4020 | "") | 4020 | "") |
| 4021 | tb (match-beginning 0)) | 4021 | tb (match-beginning 0)) |
| 4022 | (setq argument nil) | 4022 | (setq argument nil) |
| 4023 | (put-text-property (point-at-bol) b 'first-format-line 't) | 4023 | (put-text-property (line-beginning-position) |
| 4024 | b 'first-format-line 't) | ||
| 4024 | (if cperl-pod-here-fontify | 4025 | (if cperl-pod-here-fontify |
| 4025 | (while (and (eq (forward-line) 0) | 4026 | (while (and (eq (forward-line) 0) |
| 4026 | (not (looking-at "^[.;]$"))) | 4027 | (not (looking-at "^[.;]$"))) |
| @@ -4996,7 +4997,7 @@ If `cperl-indent-region-fix-constructs', will improve spacing on | |||
| 4996 | conditional/loop constructs." | 4997 | conditional/loop constructs." |
| 4997 | (interactive) | 4998 | (interactive) |
| 4998 | (save-excursion | 4999 | (save-excursion |
| 4999 | (let ((tmp-end (point-at-eol)) top done) | 5000 | (let ((tmp-end (line-end-position)) top done) |
| 5000 | (save-excursion | 5001 | (save-excursion |
| 5001 | (beginning-of-line) | 5002 | (beginning-of-line) |
| 5002 | (while (null done) | 5003 | (while (null done) |
| @@ -5046,9 +5047,9 @@ conditional/loop constructs." | |||
| 5046 | "\\<\\(else\\|elsif\\|continue\\)\\>")) | 5047 | "\\<\\(else\\|elsif\\|continue\\)\\>")) |
| 5047 | (progn | 5048 | (progn |
| 5048 | (goto-char (match-end 0)) | 5049 | (goto-char (match-end 0)) |
| 5049 | (setq tmp-end (point-at-eol))) | 5050 | (setq tmp-end (line-end-position))) |
| 5050 | (setq done t)))) | 5051 | (setq done t)))) |
| 5051 | (setq tmp-end (point-at-eol))) | 5052 | (setq tmp-end (line-end-position))) |
| 5052 | (goto-char tmp-end) | 5053 | (goto-char tmp-end) |
| 5053 | (setq tmp-end (point-marker))) | 5054 | (setq tmp-end (point-marker))) |
| 5054 | (if cperl-indent-region-fix-constructs | 5055 | (if cperl-indent-region-fix-constructs |
| @@ -5061,7 +5062,7 @@ Returns some position at the last line." | |||
| 5061 | (interactive) | 5062 | (interactive) |
| 5062 | (or end | 5063 | (or end |
| 5063 | (setq end (point-max))) | 5064 | (setq end (point-max))) |
| 5064 | (let ((ee (point-at-eol)) | 5065 | (let ((ee (line-end-position)) |
| 5065 | (cperl-indent-region-fix-constructs | 5066 | (cperl-indent-region-fix-constructs |
| 5066 | (or cperl-indent-region-fix-constructs 1)) | 5067 | (or cperl-indent-region-fix-constructs 1)) |
| 5067 | p pp ml have-brace ret) | 5068 | p pp ml have-brace ret) |
| @@ -5237,7 +5238,7 @@ Returns some position at the last line." | |||
| 5237 | (if (cperl-indent-line parse-data) | 5238 | (if (cperl-indent-line parse-data) |
| 5238 | (setq ret (cperl-fix-line-spacing end parse-data))))))))))) | 5239 | (setq ret (cperl-fix-line-spacing end parse-data))))))))))) |
| 5239 | (beginning-of-line) | 5240 | (beginning-of-line) |
| 5240 | (setq p (point) pp (point-at-eol)) ; May be different from ee. | 5241 | (setq p (point) pp (line-end-position)) ; May be different from ee. |
| 5241 | ;; Now check whether there is a hanging `}' | 5242 | ;; Now check whether there is a hanging `}' |
| 5242 | ;; Looking at: | 5243 | ;; Looking at: |
| 5243 | ;; } blah | 5244 | ;; } blah |
| @@ -7282,7 +7283,7 @@ Currently it is tuned to C and Perl syntax." | |||
| 7282 | ;; Get to the something meaningful | 7283 | ;; Get to the something meaningful |
| 7283 | (or (eobp) (eolp) (forward-char 1)) | 7284 | (or (eobp) (eolp) (forward-char 1)) |
| 7284 | (re-search-backward "[-[:alnum:]_:!&*+,./<=>?\\^|~$%@]" | 7285 | (re-search-backward "[-[:alnum:]_:!&*+,./<=>?\\^|~$%@]" |
| 7285 | (point-at-bol) | 7286 | (line-beginning-position) |
| 7286 | 'to-beg) | 7287 | 'to-beg) |
| 7287 | ;; (cond | 7288 | ;; (cond |
| 7288 | ;; ((or (eobp) (looking-at "[][ \t\n{}();,]")) ; Not at a symbol | 7289 | ;; ((or (eobp) (looking-at "[][ \t\n{}();,]")) ; Not at a symbol |
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 0c4a9bfdbea..4617a01947c 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el | |||
| @@ -1899,7 +1899,7 @@ or elsewhere, return a 1-line docstring." | |||
| 1899 | ;; go to the arg after `&rest'. | 1899 | ;; go to the arg after `&rest'. |
| 1900 | (if (and key-have-value | 1900 | (if (and key-have-value |
| 1901 | (save-excursion | 1901 | (save-excursion |
| 1902 | (not (re-search-forward ":.*" (point-at-eol) t))) | 1902 | (not (re-search-forward ":.*" (line-end-position) t))) |
| 1903 | (string-match "&rest \\([^ ()]*\\)" args)) | 1903 | (string-match "&rest \\([^ ()]*\\)" args)) |
| 1904 | (setq index nil ; Skip next block based on positional args. | 1904 | (setq index nil ; Skip next block based on positional args. |
| 1905 | start (match-beginning 1) | 1905 | start (match-beginning 1) |
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 7766694edff..65bc42c0996 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -1144,7 +1144,7 @@ error message." | |||
| 1144 | ;; Naive match found. Qualify the match. | 1144 | ;; Naive match found. Qualify the match. |
| 1145 | (and (funcall (car order) pattern) | 1145 | (and (funcall (car order) pattern) |
| 1146 | ;; Make sure it is not a previous qualified match. | 1146 | ;; Make sure it is not a previous qualified match. |
| 1147 | (not (member (set-marker match-marker (point-at-bol)) | 1147 | (not (member (set-marker match-marker (line-beginning-position)) |
| 1148 | tag-lines-already-matched)) | 1148 | tag-lines-already-matched)) |
| 1149 | (throw 'qualified-match-found nil)) | 1149 | (throw 'qualified-match-found nil)) |
| 1150 | (if next-line-after-failure-p | 1150 | (if next-line-after-failure-p |
| @@ -1314,11 +1314,11 @@ buffer-local values of tags table format variables." | |||
| 1314 | 1314 | ||
| 1315 | ;; Find the end of the tag and record the whole tag text. | 1315 | ;; Find the end of the tag and record the whole tag text. |
| 1316 | (search-forward "\177") | 1316 | (search-forward "\177") |
| 1317 | (setq tag-text (buffer-substring (1- (point)) (point-at-bol))) | 1317 | (setq tag-text (buffer-substring (1- (point)) (line-beginning-position))) |
| 1318 | ;; If use-explicit is non-nil and explicit tag is present, use it as part of | 1318 | ;; If use-explicit is non-nil and explicit tag is present, use it as part of |
| 1319 | ;; return value. Else just skip it. | 1319 | ;; return value. Else just skip it. |
| 1320 | (setq explicit-start (point)) | 1320 | (setq explicit-start (point)) |
| 1321 | (when (and (search-forward "\001" (point-at-bol 2) t) | 1321 | (when (and (search-forward "\001" (line-beginning-position 2) t) |
| 1322 | use-explicit) | 1322 | use-explicit) |
| 1323 | (setq tag-text (buffer-substring explicit-start (1- (point))))) | 1323 | (setq tag-text (buffer-substring explicit-start (1- (point))))) |
| 1324 | 1324 | ||
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index f760ccf3686..c7b05873369 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el | |||
| @@ -243,7 +243,8 @@ CATEGORY is the overlay category. If it is nil, use the `glasses' category." | |||
| 243 | (when glasses-separate-parentheses-p | 243 | (when glasses-separate-parentheses-p |
| 244 | (goto-char beg) | 244 | (goto-char beg) |
| 245 | (while (re-search-forward "[a-zA-Z]_*\\((\\)" end t) | 245 | (while (re-search-forward "[a-zA-Z]_*\\((\\)" end t) |
| 246 | (unless (glasses-parenthesis-exception-p (point-at-bol) (match-end 1)) | 246 | (unless (glasses-parenthesis-exception-p (line-beginning-position) |
| 247 | (match-end 1)) | ||
| 247 | (glasses-make-overlay (match-beginning 1) (match-end 1) | 248 | (glasses-make-overlay (match-beginning 1) (match-end 1) |
| 248 | 'glasses-parenthesis)))))))) | 249 | 'glasses-parenthesis)))))))) |
| 249 | 250 | ||
| @@ -282,7 +283,8 @@ recognized according to the current value of the variable `glasses-separator'." | |||
| 282 | (when glasses-separate-parentheses-p | 283 | (when glasses-separate-parentheses-p |
| 283 | (goto-char (point-min)) | 284 | (goto-char (point-min)) |
| 284 | (while (re-search-forward "[a-zA-Z]_*\\( \\)(" nil t) | 285 | (while (re-search-forward "[a-zA-Z]_*\\( \\)(" nil t) |
| 285 | (unless (glasses-parenthesis-exception-p (point-at-bol) (1+ (match-end 1))) | 286 | (unless (glasses-parenthesis-exception-p (line-beginning-position) |
| 287 | (1+ (match-end 1))) | ||
| 286 | (replace-match "" t nil nil 1))))))) | 288 | (replace-match "" t nil nil 1))))))) |
| 287 | ;; nil must be returned to allow use in write file hooks | 289 | ;; nil must be returned to allow use in write file hooks |
| 288 | nil) | 290 | nil) |
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index d21a9faec9d..63f032b7b39 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -1381,7 +1381,7 @@ Otherwise just move the line. Move down unless UP is non-nil." | |||
| 1381 | (arg (if up arg (- arg)))) | 1381 | (arg (if up arg (- arg)))) |
| 1382 | (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos)) | 1382 | (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos)) |
| 1383 | (if (and idlwave-shell-arrows-do-history | 1383 | (if (and idlwave-shell-arrows-do-history |
| 1384 | (>= (1+ (point-at-eol)) proc-pos)) | 1384 | (>= (1+ (line-end-position)) proc-pos)) |
| 1385 | (comint-previous-input arg) | 1385 | (comint-previous-input arg) |
| 1386 | (forward-line (- arg))))) | 1386 | (forward-line (- arg))))) |
| 1387 | 1387 | ||
| @@ -2130,7 +2130,7 @@ args of an executive .run, .rnew or .compile." | |||
| 2130 | 2130 | ||
| 2131 | (defun idlwave-shell-filename-string () | 2131 | (defun idlwave-shell-filename-string () |
| 2132 | "Return t if in a string and after what could be a file name." | 2132 | "Return t if in a string and after what could be a file name." |
| 2133 | (let ((limit (point-at-bol))) | 2133 | (let ((limit (line-beginning-position))) |
| 2134 | (save-excursion | 2134 | (save-excursion |
| 2135 | ;; Skip backwards over file name chars | 2135 | ;; Skip backwards over file name chars |
| 2136 | (skip-chars-backward idlwave-shell-file-name-chars limit) | 2136 | (skip-chars-backward idlwave-shell-file-name-chars limit) |
| @@ -2139,7 +2139,7 @@ args of an executive .run, .rnew or .compile." | |||
| 2139 | 2139 | ||
| 2140 | (defun idlwave-shell-batch-command () | 2140 | (defun idlwave-shell-batch-command () |
| 2141 | "Return t if we're in a batch command statement like \"@foo\"." | 2141 | "Return t if we're in a batch command statement like \"@foo\"." |
| 2142 | (let ((limit (point-at-bol))) | 2142 | (let ((limit (line-beginning-position))) |
| 2143 | (save-excursion | 2143 | (save-excursion |
| 2144 | ;; Skip backwards over filename | 2144 | ;; Skip backwards over filename |
| 2145 | (skip-chars-backward idlwave-shell-file-name-chars limit) | 2145 | (skip-chars-backward idlwave-shell-file-name-chars limit) |
| @@ -2317,7 +2317,7 @@ matter what the settings of that variable." | |||
| 2317 | idlwave-shell-electric-stop-line-face | 2317 | idlwave-shell-electric-stop-line-face |
| 2318 | idlwave-shell-stop-line-face)) | 2318 | idlwave-shell-stop-line-face)) |
| 2319 | (move-overlay idlwave-shell-stop-line-overlay | 2319 | (move-overlay idlwave-shell-stop-line-overlay |
| 2320 | (point) (point-at-eol) | 2320 | (point) (line-end-position) |
| 2321 | (current-buffer))) | 2321 | (current-buffer))) |
| 2322 | ;; use the arrow instead, but only if marking is wanted. | 2322 | ;; use the arrow instead, but only if marking is wanted. |
| 2323 | (if idlwave-shell-mark-stop-line | 2323 | (if idlwave-shell-mark-stop-line |
| @@ -2510,7 +2510,7 @@ If in the IDL shell buffer, returns `idlwave-shell-pc-frame'." | |||
| 2510 | (list (idlwave-shell-file-name (buffer-file-name)) | 2510 | (list (idlwave-shell-file-name (buffer-file-name)) |
| 2511 | (save-restriction | 2511 | (save-restriction |
| 2512 | (widen) | 2512 | (widen) |
| 2513 | (1+ (count-lines 1 (point-at-bol))))))) | 2513 | (1+ (count-lines 1 (line-beginning-position))))))) |
| 2514 | 2514 | ||
| 2515 | (defun idlwave-shell-current-module () | 2515 | (defun idlwave-shell-current-module () |
| 2516 | "Return the name of the module for the current file. | 2516 | "Return the name of the module for the current file. |
| @@ -3528,7 +3528,7 @@ Existing overlays are recycled, in order to minimize consumption." | |||
| 3528 | (while (setq bp (pop bp-list)) | 3528 | (while (setq bp (pop bp-list)) |
| 3529 | (save-excursion | 3529 | (save-excursion |
| 3530 | (idlwave-shell-goto-frame (car bp)) | 3530 | (idlwave-shell-goto-frame (car bp)) |
| 3531 | (let* ((end (point-at-eol)) | 3531 | (let* ((end (line-end-position)) |
| 3532 | (beg (progn (beginning-of-line 1) (point))) | 3532 | (beg (progn (beginning-of-line 1) (point))) |
| 3533 | (condition (idlwave-shell-bp-get bp 'condition)) | 3533 | (condition (idlwave-shell-bp-get bp 'condition)) |
| 3534 | (count (idlwave-shell-bp-get bp 'count)) | 3534 | (count (idlwave-shell-bp-get bp 'count)) |
| @@ -3851,7 +3851,7 @@ of the form: | |||
| 3851 | (append | 3851 | (append |
| 3852 | ;; compiled procedures | 3852 | ;; compiled procedures |
| 3853 | (progn | 3853 | (progn |
| 3854 | (narrow-to-region cpro (point-at-bol)) | 3854 | (narrow-to-region cpro (line-beginning-position)) |
| 3855 | (goto-char (point-min)) | 3855 | (goto-char (point-min)) |
| 3856 | (idlwave-shell-sources-grep)) | 3856 | (idlwave-shell-sources-grep)) |
| 3857 | ;; compiled functions | 3857 | ;; compiled functions |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index b290854e1b9..81f74dc1fa1 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -2004,7 +2004,7 @@ Returns non-nil if abbrev is left expanded." | |||
| 2004 | Moves to end of line if there is no comment delimiter. | 2004 | Moves to end of line if there is no comment delimiter. |
| 2005 | Ignores comment delimiters in strings. | 2005 | Ignores comment delimiters in strings. |
| 2006 | Returns point if comment found and nil otherwise." | 2006 | Returns point if comment found and nil otherwise." |
| 2007 | (let ((eos (point-at-eol)) | 2007 | (let ((eos (line-end-position)) |
| 2008 | (data (match-data)) | 2008 | (data (match-data)) |
| 2009 | found) | 2009 | found) |
| 2010 | ;; Look for first comment delimiter not in a string | 2010 | ;; Look for first comment delimiter not in a string |
| @@ -2054,7 +2054,7 @@ Also checks if the correct END statement has been used." | |||
| 2054 | ;;(backward-char 1) | 2054 | ;;(backward-char 1) |
| 2055 | (let* ((pos (point-marker)) | 2055 | (let* ((pos (point-marker)) |
| 2056 | (last-abbrev-marker (copy-marker last-abbrev-location)) | 2056 | (last-abbrev-marker (copy-marker last-abbrev-location)) |
| 2057 | (eol-pos (point-at-eol)) | 2057 | (eol-pos (line-end-position)) |
| 2058 | begin-pos end-pos end end1 ) | 2058 | begin-pos end-pos end end1 ) |
| 2059 | (if idlwave-reindent-end (idlwave-indent-line)) | 2059 | (if idlwave-reindent-end (idlwave-indent-line)) |
| 2060 | (setq last-abbrev-location (marker-position last-abbrev-marker)) | 2060 | (setq last-abbrev-location (marker-position last-abbrev-marker)) |
| @@ -3202,7 +3202,7 @@ ignored." | |||
| 3202 | (beginning-of-line) | 3202 | (beginning-of-line) |
| 3203 | (setq bcl (point)) | 3203 | (setq bcl (point)) |
| 3204 | (re-search-forward (concat "^[ \t]*" comment-start "+") | 3204 | (re-search-forward (concat "^[ \t]*" comment-start "+") |
| 3205 | (point-at-eol) t) | 3205 | (line-end-position) t) |
| 3206 | ;; Get the comment leader on the line and its length | 3206 | ;; Get the comment leader on the line and its length |
| 3207 | (setq pre (current-column)) | 3207 | (setq pre (current-column)) |
| 3208 | ;; the comment leader is the indentation plus exactly the | 3208 | ;; the comment leader is the indentation plus exactly the |
| @@ -3210,7 +3210,8 @@ ignored." | |||
| 3210 | (setq fill-prefix-reg | 3210 | (setq fill-prefix-reg |
| 3211 | (concat | 3211 | (concat |
| 3212 | (setq fill-prefix | 3212 | (setq fill-prefix |
| 3213 | (regexp-quote (buffer-substring (point-at-bol) (point)))) | 3213 | (regexp-quote (buffer-substring (line-beginning-position) |
| 3214 | (point)))) | ||
| 3214 | "[^;]")) | 3215 | "[^;]")) |
| 3215 | 3216 | ||
| 3216 | ;; Mark the beginning and end of the paragraph | 3217 | ;; Mark the beginning and end of the paragraph |
| @@ -3264,7 +3265,7 @@ ignored." | |||
| 3264 | (setq indent hang) | 3265 | (setq indent hang) |
| 3265 | (beginning-of-line) | 3266 | (beginning-of-line) |
| 3266 | (while (> (point) start) | 3267 | (while (> (point) start) |
| 3267 | (re-search-forward comment-start-skip (point-at-eol) t) | 3268 | (re-search-forward comment-start-skip (line-end-position) t) |
| 3268 | (if (> (setq diff (- indent (current-column))) 0) | 3269 | (if (> (setq diff (- indent (current-column))) 0) |
| 3269 | (progn | 3270 | (progn |
| 3270 | (if (>= here (point)) | 3271 | (if (>= here (point)) |
| @@ -3286,7 +3287,7 @@ ignored." | |||
| 3286 | (setq indent | 3287 | (setq indent |
| 3287 | (min indent | 3288 | (min indent |
| 3288 | (progn | 3289 | (progn |
| 3289 | (re-search-forward comment-start-skip (point-at-eol) t) | 3290 | (re-search-forward comment-start-skip (line-end-position) t) |
| 3290 | (current-column)))) | 3291 | (current-column)))) |
| 3291 | (forward-line -1))) | 3292 | (forward-line -1))) |
| 3292 | (setq fill-prefix (concat fill-prefix | 3293 | (setq fill-prefix (concat fill-prefix |
| @@ -3296,7 +3297,7 @@ ignored." | |||
| 3296 | (setq first-indent | 3297 | (setq first-indent |
| 3297 | (max | 3298 | (max |
| 3298 | (progn | 3299 | (progn |
| 3299 | (re-search-forward comment-start-skip (point-at-eol) t) | 3300 | (re-search-forward comment-start-skip (line-end-position) t) |
| 3300 | (current-column)) | 3301 | (current-column)) |
| 3301 | indent)) | 3302 | indent)) |
| 3302 | 3303 | ||
| @@ -3334,11 +3335,11 @@ If not found returns nil." | |||
| 3334 | (if idlwave-use-last-hang-indent | 3335 | (if idlwave-use-last-hang-indent |
| 3335 | (save-excursion | 3336 | (save-excursion |
| 3336 | (end-of-line) | 3337 | (end-of-line) |
| 3337 | (if (re-search-backward idlwave-hang-indent-regexp (point-at-bol) t) | 3338 | (if (re-search-backward idlwave-hang-indent-regexp (line-beginning-position) t) |
| 3338 | (+ (current-column) (length idlwave-hang-indent-regexp)))) | 3339 | (+ (current-column) (length idlwave-hang-indent-regexp)))) |
| 3339 | (save-excursion | 3340 | (save-excursion |
| 3340 | (beginning-of-line) | 3341 | (beginning-of-line) |
| 3341 | (if (re-search-forward idlwave-hang-indent-regexp (point-at-eol) t) | 3342 | (if (re-search-forward idlwave-hang-indent-regexp (line-end-position) t) |
| 3342 | (current-column))))) | 3343 | (current-column))))) |
| 3343 | 3344 | ||
| 3344 | (defun idlwave-auto-fill () | 3345 | (defun idlwave-auto-fill () |
| @@ -3386,7 +3387,7 @@ if `idlwave-auto-fill-split-string' is non-nil." | |||
| 3386 | ;; Remove whitespace between comment delimiter and | 3387 | ;; Remove whitespace between comment delimiter and |
| 3387 | ;; text, insert spaces for appropriate indentation. | 3388 | ;; text, insert spaces for appropriate indentation. |
| 3388 | (beginning-of-line) | 3389 | (beginning-of-line) |
| 3389 | (re-search-forward comment-start-skip (point-at-eol) t) | 3390 | (re-search-forward comment-start-skip (line-end-position) t) |
| 3390 | (delete-horizontal-space) | 3391 | (delete-horizontal-space) |
| 3391 | (idlwave-indent-to indent) | 3392 | (idlwave-indent-to indent) |
| 3392 | (goto-char (- (point-max) here))))) | 3393 | (goto-char (- (point-max) here))))) |
| @@ -3548,7 +3549,7 @@ constants - a double quote followed by an octal digit." | |||
| 3548 | ;; Because single and double quotes can quote each other we must | 3549 | ;; Because single and double quotes can quote each other we must |
| 3549 | ;; search for the string start from the beginning of line. | 3550 | ;; search for the string start from the beginning of line. |
| 3550 | (let* ((start (point)) | 3551 | (let* ((start (point)) |
| 3551 | (eol (point-at-eol)) | 3552 | (eol (line-end-position)) |
| 3552 | (bq (progn (beginning-of-line) (point))) | 3553 | (bq (progn (beginning-of-line) (point))) |
| 3553 | (endq (point)) | 3554 | (endq (point)) |
| 3554 | (data (match-data)) | 3555 | (data (match-data)) |
| @@ -3626,7 +3627,7 @@ unless the optional second argument NOINDENT is non-nil." | |||
| 3626 | (setq s1 (downcase s1) s2 (downcase s2))) | 3627 | (setq s1 (downcase s1) s2 (downcase s2))) |
| 3627 | (idlwave-abbrev-change-case | 3628 | (idlwave-abbrev-change-case |
| 3628 | (setq s1 (upcase s1) s2 (upcase s2)))) | 3629 | (setq s1 (upcase s1) s2 (upcase s2)))) |
| 3629 | (let ((beg (point-at-bol)) | 3630 | (let ((beg (line-beginning-position)) |
| 3630 | end) | 3631 | end) |
| 3631 | (if (not (looking-at "\\s-*\n")) | 3632 | (if (not (looking-at "\\s-*\n")) |
| 3632 | (open-line 1)) | 3633 | (open-line 1)) |
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index efad3b52aa9..b920ef6c2cc 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -812,7 +812,7 @@ point at BOB." | |||
| 812 | (setq str-terminator ?/)) | 812 | (setq str-terminator ?/)) |
| 813 | (re-search-forward | 813 | (re-search-forward |
| 814 | (concat "\\([^\\]\\|^\\)" (string str-terminator)) | 814 | (concat "\\([^\\]\\|^\\)" (string str-terminator)) |
| 815 | (point-at-eol) t)) | 815 | (line-end-position) t)) |
| 816 | ((nth 7 parse) | 816 | ((nth 7 parse) |
| 817 | (forward-line)) | 817 | (forward-line)) |
| 818 | ((or (nth 4 parse) | 818 | ((or (nth 4 parse) |
| @@ -1683,7 +1683,7 @@ point of view of font-lock. It applies highlighting directly with | |||
| 1683 | (insert "=") | 1683 | (insert "=") |
| 1684 | (goto-char (match-beginning 2))) | 1684 | (goto-char (match-beginning 2))) |
| 1685 | (setq js--tmp-location nil) | 1685 | (setq js--tmp-location nil) |
| 1686 | (goto-char (point-at-eol))) | 1686 | (goto-char (line-end-position))) |
| 1687 | (when js--tmp-location | 1687 | (when js--tmp-location |
| 1688 | (save-excursion | 1688 | (save-excursion |
| 1689 | (goto-char js--tmp-location) | 1689 | (goto-char js--tmp-location) |
| @@ -2506,14 +2506,14 @@ the same column as the current line." | |||
| 2506 | (looking-at "[ \t\n]*}")) | 2506 | (looking-at "[ \t\n]*}")) |
| 2507 | (save-excursion | 2507 | (save-excursion |
| 2508 | (backward-list) (forward-symbol -1) (looking-at "\\_<do\\_>")) | 2508 | (backward-list) (forward-symbol -1) (looking-at "\\_<do\\_>")) |
| 2509 | (js--re-search-backward "\\_<do\\_>" (point-at-bol) t) | 2509 | (js--re-search-backward "\\_<do\\_>" (line-beginning-position) t) |
| 2510 | (or (looking-at "\\_<do\\_>") | 2510 | (or (looking-at "\\_<do\\_>") |
| 2511 | (let ((saved-indent (current-indentation))) | 2511 | (let ((saved-indent (current-indentation))) |
| 2512 | (while (and (js--re-search-backward "^\\s-*\\_<" nil t) | 2512 | (while (and (js--re-search-backward "^\\s-*\\_<" nil t) |
| 2513 | (/= (current-indentation) saved-indent))) | 2513 | (/= (current-indentation) saved-indent))) |
| 2514 | (and (looking-at "\\s-*\\_<do\\_>") | 2514 | (and (looking-at "\\s-*\\_<do\\_>") |
| 2515 | (not (js--re-search-forward | 2515 | (not (js--re-search-forward |
| 2516 | "\\_<while\\_>" (point-at-eol) t)) | 2516 | "\\_<while\\_>" (line-end-position) t)) |
| 2517 | (= (current-indentation) saved-indent))))))))) | 2517 | (= (current-indentation) saved-indent))))))))) |
| 2518 | 2518 | ||
| 2519 | 2519 | ||
| @@ -2525,7 +2525,7 @@ nil." | |||
| 2525 | (save-excursion | 2525 | (save-excursion |
| 2526 | (back-to-indentation) | 2526 | (back-to-indentation) |
| 2527 | (when (save-excursion | 2527 | (when (save-excursion |
| 2528 | (and (not (eq (point-at-bol) (point-min))) | 2528 | (and (not (eq (line-beginning-position) (point-min))) |
| 2529 | (not (looking-at "[{]")) | 2529 | (not (looking-at "[{]")) |
| 2530 | (js--re-search-backward "[[:graph:]]" nil t) | 2530 | (js--re-search-backward "[[:graph:]]" nil t) |
| 2531 | (progn | 2531 | (progn |
| @@ -2546,8 +2546,8 @@ nil." | |||
| 2546 | (c-get-syntactic-indentation (list (cons symbol anchor))))) | 2546 | (c-get-syntactic-indentation (list (cons symbol anchor))))) |
| 2547 | 2547 | ||
| 2548 | (defun js--same-line (pos) | 2548 | (defun js--same-line (pos) |
| 2549 | (and (>= pos (point-at-bol)) | 2549 | (and (>= pos (line-beginning-position)) |
| 2550 | (<= pos (point-at-eol)))) | 2550 | (<= pos (line-end-position)))) |
| 2551 | 2551 | ||
| 2552 | (defun js--multi-line-declaration-indentation () | 2552 | (defun js--multi-line-declaration-indentation () |
| 2553 | "Helper function for `js--proper-indentation'. | 2553 | "Helper function for `js--proper-indentation'. |
| @@ -2921,7 +2921,7 @@ return nil." | |||
| 2921 | "Indent the current line as JavaScript." | 2921 | "Indent the current line as JavaScript." |
| 2922 | (interactive) | 2922 | (interactive) |
| 2923 | (let* ((parse-status | 2923 | (let* ((parse-status |
| 2924 | (save-excursion (syntax-ppss (point-at-bol)))) | 2924 | (save-excursion (syntax-ppss (line-beginning-position)))) |
| 2925 | (offset (- (point) (save-excursion (back-to-indentation) (point))))) | 2925 | (offset (- (point) (save-excursion (back-to-indentation) (point))))) |
| 2926 | (unless (nth 3 parse-status) | 2926 | (unless (nth 3 parse-status) |
| 2927 | (indent-line-to (js--proper-indentation parse-status)) | 2927 | (indent-line-to (js--proper-indentation parse-status)) |
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index 30d37cf7ecd..00bab00a0d4 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el | |||
| @@ -520,7 +520,7 @@ If the list was changed, sort the list and remove duplicates first." | |||
| 520 | (looking-at meta-ignore-comment-regexp)) | 520 | (looking-at meta-ignore-comment-regexp)) |
| 521 | (current-indentation)) | 521 | (current-indentation)) |
| 522 | ;; Beginning of buffer. | 522 | ;; Beginning of buffer. |
| 523 | ((eq (point-at-bol) (point-min)) | 523 | ((eq (line-beginning-position) (point-min)) |
| 524 | 0) | 524 | 0) |
| 525 | ;; Backindent at end of environments. | 525 | ;; Backindent at end of environments. |
| 526 | ((meta-indent-looking-at-code | 526 | ((meta-indent-looking-at-code |
| @@ -558,14 +558,14 @@ If the list was changed, sort the list and remove duplicates first." | |||
| 558 | (end-of-line) | 558 | (end-of-line) |
| 559 | ;; Skip backward the comments. | 559 | ;; Skip backward the comments. |
| 560 | (let ((point-not-in-string (point))) | 560 | (let ((point-not-in-string (point))) |
| 561 | (while (search-backward comment-start (point-at-bol) t) | 561 | (while (search-backward comment-start (line-beginning-position) t) |
| 562 | (unless (meta-indent-in-string-p) | 562 | (unless (meta-indent-in-string-p) |
| 563 | (setq point-not-in-string (point)))) | 563 | (setq point-not-in-string (point)))) |
| 564 | (goto-char point-not-in-string)) | 564 | (goto-char point-not-in-string)) |
| 565 | ;; Search for the end of the previous expression. | 565 | ;; Search for the end of the previous expression. |
| 566 | (if (search-backward ";" (point-at-bol) t) | 566 | (if (search-backward ";" (line-beginning-position) t) |
| 567 | (progn (while (and (meta-indent-in-string-p) | 567 | (progn (while (and (meta-indent-in-string-p) |
| 568 | (search-backward ";" (point-at-bol) t))) | 568 | (search-backward ";" (line-beginning-position) t))) |
| 569 | (if (= (char-after) ?\;) | 569 | (if (= (char-after) ?\;) |
| 570 | (forward-char) | 570 | (forward-char) |
| 571 | (beginning-of-line))) | 571 | (beginning-of-line))) |
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index 8d3194e6a47..9786b1aa455 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el | |||
| @@ -274,7 +274,7 @@ are handled in another way, and should not be added to this list." | |||
| 274 | (while (and (> nest 0) | 274 | (while (and (> nest 0) |
| 275 | (re-search-forward | 275 | (re-search-forward |
| 276 | "[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" | 276 | "[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" |
| 277 | (point-at-eol 2) t)) | 277 | (line-end-position 2) t)) |
| 278 | (cond ((match-beginning 1) (setq nest (1+ nest))) | 278 | (cond ((match-beginning 1) (setq nest (1+ nest))) |
| 279 | ((match-beginning 2) (setq nest (1- nest))) | 279 | ((match-beginning 2) (setq nest (1- nest))) |
| 280 | ((looking-at "[^(\n]+)") (setq nest 0)))))) | 280 | ((looking-at "[^(\n]+)") (setq nest 0)))))) |
| @@ -283,7 +283,8 @@ are handled in another way, and should not be added to this list." | |||
| 283 | (defun pascal-declaration-beg () | 283 | (defun pascal-declaration-beg () |
| 284 | (let ((nest 1)) | 284 | (let ((nest 1)) |
| 285 | (while (and (> nest 0) | 285 | (while (and (> nest 0) |
| 286 | (re-search-backward "[:=]\\|\\<\\(type\\|var\\|label\\|const\\)\\>\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" (point-at-bol 0) t)) | 286 | (re-search-backward "[:=]\\|\\<\\(type\\|var\\|label\\|const\\)\\>\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" |
| 287 | (line-beginning-position 0) t)) | ||
| 287 | (cond ((match-beginning 1) (setq nest 0)) | 288 | (cond ((match-beginning 1) (setq nest 0)) |
| 288 | ((match-beginning 2) (setq nest (1- nest))) | 289 | ((match-beginning 2) (setq nest (1- nest))) |
| 289 | ((match-beginning 3) (setq nest (1+ nest))))) | 290 | ((match-beginning 3) (setq nest (1+ nest))))) |
| @@ -291,7 +292,7 @@ are handled in another way, and should not be added to this list." | |||
| 291 | 292 | ||
| 292 | 293 | ||
| 293 | (defsubst pascal-within-string () | 294 | (defsubst pascal-within-string () |
| 294 | (nth 3 (parse-partial-sexp (point-at-bol) (point)))) | 295 | (nth 3 (parse-partial-sexp (line-beginning-position) (point)))) |
| 295 | 296 | ||
| 296 | 297 | ||
| 297 | ;;;###autoload | 298 | ;;;###autoload |
| @@ -388,7 +389,7 @@ See also the user variables `pascal-type-keywords', `pascal-start-keywords' and | |||
| 388 | (forward-char 1) | 389 | (forward-char 1) |
| 389 | (delete-horizontal-space)) | 390 | (delete-horizontal-space)) |
| 390 | ((and (looking-at "(\\*\\|\\*[^)]") | 391 | ((and (looking-at "(\\*\\|\\*[^)]") |
| 391 | (not (save-excursion (search-forward "*)" (point-at-eol) t)))) | 392 | (not (save-excursion (search-forward "*)" (line-end-position) t)))) |
| 392 | (setq setstar t)))) | 393 | (setq setstar t)))) |
| 393 | ;; If last line was a star comment line then this one shall be too. | 394 | ;; If last line was a star comment line then this one shall be too. |
| 394 | (if (null setstar) | 395 | (if (null setstar) |
| @@ -707,7 +708,7 @@ on the line which ends a function or procedure named NAME." | |||
| 707 | (if (and (looking-at "\\<end;") | 708 | (if (and (looking-at "\\<end;") |
| 708 | (not (save-excursion | 709 | (not (save-excursion |
| 709 | (end-of-line) | 710 | (end-of-line) |
| 710 | (search-backward "{" (point-at-bol) t)))) | 711 | (search-backward "{" (line-beginning-position) t)))) |
| 711 | (let ((type (car (pascal-calculate-indent)))) | 712 | (let ((type (car (pascal-calculate-indent)))) |
| 712 | (if (eq type 'declaration) | 713 | (if (eq type 'declaration) |
| 713 | () | 714 | () |
| @@ -979,7 +980,7 @@ indent of the current line in parameterlist." | |||
| 979 | (stpos (progn (goto-char (scan-lists (point) -1 1)) (point))) | 980 | (stpos (progn (goto-char (scan-lists (point) -1 1)) (point))) |
| 980 | (stcol (1+ (current-column))) | 981 | (stcol (1+ (current-column))) |
| 981 | (edpos (progn (pascal-declaration-end) | 982 | (edpos (progn (pascal-declaration-end) |
| 982 | (search-backward ")" (point-at-bol) t) | 983 | (search-backward ")" (line-beginning-position) t) |
| 983 | (point))) | 984 | (point))) |
| 984 | (usevar (re-search-backward "\\<var\\>" stpos t))) | 985 | (usevar (re-search-backward "\\<var\\>" stpos t))) |
| 985 | (if arg (progn | 986 | (if arg (progn |
| @@ -1026,7 +1027,7 @@ indent of the current line in parameterlist." | |||
| 1026 | (setq pascal--extra-indent (pascal-get-lineup-indent stpos edpos lineup)) | 1027 | (setq pascal--extra-indent (pascal-get-lineup-indent stpos edpos lineup)) |
| 1027 | (goto-char stpos) | 1028 | (goto-char stpos) |
| 1028 | (while (and (<= (point) edpos) (not (eobp))) | 1029 | (while (and (<= (point) edpos) (not (eobp))) |
| 1029 | (if (search-forward lineup (point-at-eol) 'move) | 1030 | (if (search-forward lineup (line-end-position) 'move) |
| 1030 | (forward-char -1)) | 1031 | (forward-char -1)) |
| 1031 | (delete-horizontal-space) | 1032 | (delete-horizontal-space) |
| 1032 | (indent-to pascal--extra-indent) | 1033 | (indent-to pascal--extra-indent) |
| @@ -1053,7 +1054,7 @@ indent of the current line in parameterlist." | |||
| 1053 | (goto-char b) | 1054 | (goto-char b) |
| 1054 | ;; Get rightmost position | 1055 | ;; Get rightmost position |
| 1055 | (while (< (point) e) | 1056 | (while (< (point) e) |
| 1056 | (and (re-search-forward reg (min e (point-at-eol 2)) 'move) | 1057 | (and (re-search-forward reg (min e (line-end-position 2)) 'move) |
| 1057 | (cond ((match-beginning 1) | 1058 | (cond ((match-beginning 1) |
| 1058 | ;; Skip record blocks | 1059 | ;; Skip record blocks |
| 1059 | (pascal-declaration-end)) | 1060 | (pascal-declaration-end)) |
| @@ -1117,7 +1118,7 @@ indent of the current line in parameterlist." | |||
| 1117 | 1118 | ||
| 1118 | ;; Search through all reachable functions | 1119 | ;; Search through all reachable functions |
| 1119 | (while (pascal-beg-of-defun) | 1120 | (while (pascal-beg-of-defun) |
| 1120 | (if (re-search-forward pascal-str (point-at-eol) t) | 1121 | (if (re-search-forward pascal-str (line-end-position) t) |
| 1121 | (progn (setq match (buffer-substring (match-beginning 2) | 1122 | (progn (setq match (buffer-substring (match-beginning 2) |
| 1122 | (match-end 2))) | 1123 | (match-end 2))) |
| 1123 | (push match pascal-all))) | 1124 | (push match pascal-all))) |
| @@ -1134,17 +1135,17 @@ indent of the current line in parameterlist." | |||
| 1134 | match) | 1135 | match) |
| 1135 | ;; Traverse lines | 1136 | ;; Traverse lines |
| 1136 | (while (< (point) end) | 1137 | (while (< (point) end) |
| 1137 | (if (re-search-forward "[:=]" (point-at-eol) t) | 1138 | (if (re-search-forward "[:=]" (line-end-position) t) |
| 1138 | ;; Traverse current line | 1139 | ;; Traverse current line |
| 1139 | (while (and (re-search-backward | 1140 | (while (and (re-search-backward |
| 1140 | (concat "\\((\\|\\<\\(var\\|type\\|const\\)\\>\\)\\|" | 1141 | (concat "\\((\\|\\<\\(var\\|type\\|const\\)\\>\\)\\|" |
| 1141 | pascal-symbol-re) | 1142 | pascal-symbol-re) |
| 1142 | (point-at-bol) t) | 1143 | (line-beginning-position) t) |
| 1143 | (not (match-end 1))) | 1144 | (not (match-end 1))) |
| 1144 | (setq match (buffer-substring (match-beginning 0) (match-end 0))) | 1145 | (setq match (buffer-substring (match-beginning 0) (match-end 0))) |
| 1145 | (if (string-match (concat "\\<" pascal-str) match) | 1146 | (if (string-match (concat "\\<" pascal-str) match) |
| 1146 | (push match pascal-all)))) | 1147 | (push match pascal-all)))) |
| 1147 | (if (re-search-forward "\\<record\\>" (point-at-eol) t) | 1148 | (if (re-search-forward "\\<record\\>" (line-end-position) t) |
| 1148 | (pascal-declaration-end) | 1149 | (pascal-declaration-end) |
| 1149 | (forward-line 1))) | 1150 | (forward-line 1))) |
| 1150 | 1151 | ||
| @@ -1187,7 +1188,7 @@ indent of the current line in parameterlist." | |||
| 1187 | (if (> start (prog1 (save-excursion (pascal-end-of-defun) | 1188 | (if (> start (prog1 (save-excursion (pascal-end-of-defun) |
| 1188 | (point)))) | 1189 | (point)))) |
| 1189 | () ; Declarations not reachable | 1190 | () ; Declarations not reachable |
| 1190 | (if (search-forward "(" (point-at-eol) t) | 1191 | (if (search-forward "(" (line-end-position) t) |
| 1191 | ;; Check parameterlist | 1192 | ;; Check parameterlist |
| 1192 | ;; FIXME: pascal-get-completion-decl doesn't understand | 1193 | ;; FIXME: pascal-get-completion-decl doesn't understand |
| 1193 | ;; the var declarations in parameter lists :-( | 1194 | ;; the var declarations in parameter lists :-( |
| @@ -1245,7 +1246,7 @@ indent of the current line in parameterlist." | |||
| 1245 | (or (eq state 'declaration) (eq state 'paramlist) | 1246 | (or (eq state 'declaration) (eq state 'paramlist) |
| 1246 | (and (eq state 'defun) | 1247 | (and (eq state 'defun) |
| 1247 | (save-excursion | 1248 | (save-excursion |
| 1248 | (re-search-backward ")[ \t]*:" (point-at-bol) t)))) | 1249 | (re-search-backward ")[ \t]*:" (line-beginning-position) t)))) |
| 1249 | (save-excursion | 1250 | (save-excursion |
| 1250 | (if (or (eq state 'paramlist) (eq state 'defun)) | 1251 | (if (or (eq state 'paramlist) (eq state 'defun)) |
| 1251 | (pascal-beg-of-defun)) | 1252 | (pascal-beg-of-defun)) |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 6437bbd4c1c..f8edc2b1f7b 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -2282,12 +2282,12 @@ between them)." | |||
| 2282 | (backward-paragraph) | 2282 | (backward-paragraph) |
| 2283 | (unless (bobp) (forward-line)) | 2283 | (unless (bobp) (forward-line)) |
| 2284 | (if (string-match "^/\\*[^a-zA-Z]*$" (thing-at-point 'line)) | 2284 | (if (string-match "^/\\*[^a-zA-Z]*$" (thing-at-point 'line)) |
| 2285 | (narrow-to-region (point-at-eol) (point-max)))) | 2285 | (narrow-to-region (line-end-position) (point-max)))) |
| 2286 | (save-excursion | 2286 | (save-excursion |
| 2287 | (forward-paragraph) | 2287 | (forward-paragraph) |
| 2288 | (forward-line -1) | 2288 | (forward-line -1) |
| 2289 | (if (string-match "^[^a-zA-Z]*\\*/$" (thing-at-point 'line)) | 2289 | (if (string-match "^[^a-zA-Z]*\\*/$" (thing-at-point 'line)) |
| 2290 | (narrow-to-region (point-min) (point-at-bol)))) | 2290 | (narrow-to-region (point-min) (line-beginning-position)))) |
| 2291 | (let ((fill-prefix (prolog-guess-fill-prefix))) | 2291 | (let ((fill-prefix (prolog-guess-fill-prefix))) |
| 2292 | (fill-paragraph nil)))) | 2292 | (fill-paragraph nil)))) |
| 2293 | ))) | 2293 | ))) |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 87bb92908d1..955daa393ce 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1147,7 +1147,7 @@ delimiter." | |||
| 1147 | (setq re (regexp-quote (or (match-string 4) (match-string 2)))) | 1147 | (setq re (regexp-quote (or (match-string 4) (match-string 2)))) |
| 1148 | (if (match-beginning 1) (setq re (concat "\\s *" re))) | 1148 | (if (match-beginning 1) (setq re (concat "\\s *" re))) |
| 1149 | (let* ((id-end (goto-char (match-end 0))) | 1149 | (let* ((id-end (goto-char (match-end 0))) |
| 1150 | (line-end-position (point-at-eol)) | 1150 | (line-end-position (line-end-position)) |
| 1151 | (state (list in-string nest depth pcol indent))) | 1151 | (state (list in-string nest depth pcol indent))) |
| 1152 | ;; parse the rest of the line | 1152 | ;; parse the rest of the line |
| 1153 | (while (and (> line-end-position (point)) | 1153 | (while (and (> line-end-position (point)) |
| @@ -1924,7 +1924,7 @@ It will be properly highlighted even when the call omits parens.") | |||
| 1924 | (save-excursion | 1924 | (save-excursion |
| 1925 | (forward-char -1) | 1925 | (forward-char -1) |
| 1926 | (looking-back ruby-syntax-before-regexp-re | 1926 | (looking-back ruby-syntax-before-regexp-re |
| 1927 | (point-at-bol)))) | 1927 | (line-beginning-position)))) |
| 1928 | ;; End of regexp. We don't match the whole | 1928 | ;; End of regexp. We don't match the whole |
| 1929 | ;; regexp at once because it can have | 1929 | ;; regexp at once because it can have |
| 1930 | ;; string interpolation inside, or span | 1930 | ;; string interpolation inside, or span |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index f063fb5a7ca..fa799a0fb37 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -1824,7 +1824,7 @@ If set will become buffer local.") | |||
| 1824 | ;; | 1824 | ;; |
| 1825 | 1825 | ||
| 1826 | (defsubst verilog-within-string () | 1826 | (defsubst verilog-within-string () |
| 1827 | (nth 3 (parse-partial-sexp (point-at-bol) (point)))) | 1827 | (nth 3 (parse-partial-sexp (line-beginning-position) (point)))) |
| 1828 | 1828 | ||
| 1829 | (defsubst verilog-string-match-fold (regexp string &optional start) | 1829 | (defsubst verilog-string-match-fold (regexp string &optional start) |
| 1830 | "Like `string-match', but use `verilog-case-fold'. | 1830 | "Like `string-match', but use `verilog-case-fold'. |
| @@ -1927,7 +1927,7 @@ This speeds up complicated regexp matches." | |||
| 1927 | (search-forward substr bound noerror)) | 1927 | (search-forward substr bound noerror)) |
| 1928 | (save-excursion | 1928 | (save-excursion |
| 1929 | (beginning-of-line) | 1929 | (beginning-of-line) |
| 1930 | (setq done (re-search-forward regexp (point-at-eol) noerror))) | 1930 | (setq done (re-search-forward regexp (line-end-position) noerror))) |
| 1931 | (unless (and (<= (match-beginning 0) (point)) | 1931 | (unless (and (<= (match-beginning 0) (point)) |
| 1932 | (>= (match-end 0) (point))) | 1932 | (>= (match-end 0) (point))) |
| 1933 | (setq done nil))) | 1933 | (setq done nil))) |
| @@ -1947,7 +1947,7 @@ This speeds up complicated regexp matches." | |||
| 1947 | (search-backward substr bound noerror)) | 1947 | (search-backward substr bound noerror)) |
| 1948 | (save-excursion | 1948 | (save-excursion |
| 1949 | (end-of-line) | 1949 | (end-of-line) |
| 1950 | (setq done (re-search-backward regexp (point-at-bol) noerror))) | 1950 | (setq done (re-search-backward regexp (line-beginning-position) noerror))) |
| 1951 | (unless (and (<= (match-beginning 0) (point)) | 1951 | (unless (and (<= (match-beginning 0) (point)) |
| 1952 | (>= (match-end 0) (point))) | 1952 | (>= (match-end 0) (point))) |
| 1953 | (setq done nil))) | 1953 | (setq done nil))) |
| @@ -4908,7 +4908,7 @@ primitive or interface named NAME." | |||
| 4908 | (or kill-existing-comment | 4908 | (or kill-existing-comment |
| 4909 | (not (save-excursion | 4909 | (not (save-excursion |
| 4910 | (end-of-line) | 4910 | (end-of-line) |
| 4911 | (search-backward "//" (point-at-bol) t))))) | 4911 | (search-backward "//" (line-beginning-position) t))))) |
| 4912 | (let ((nest 1) b e | 4912 | (let ((nest 1) b e |
| 4913 | m | 4913 | m |
| 4914 | (else (if (match-end 2) "!" " "))) | 4914 | (else (if (match-end 2) "!" " "))) |
| @@ -4961,7 +4961,7 @@ primitive or interface named NAME." | |||
| 4961 | (or kill-existing-comment | 4961 | (or kill-existing-comment |
| 4962 | (not (save-excursion | 4962 | (not (save-excursion |
| 4963 | (end-of-line) | 4963 | (end-of-line) |
| 4964 | (search-backward "//" (point-at-bol) t))))) | 4964 | (search-backward "//" (line-beginning-position) t))))) |
| 4965 | (let ((type (car indent-str))) | 4965 | (let ((type (car indent-str))) |
| 4966 | (unless (eq type 'declaration) | 4966 | (unless (eq type 'declaration) |
| 4967 | (unless (looking-at (concat "\\(" verilog-end-block-ordered-re "\\)[ \t]*:")) ; ignore named ends | 4967 | (unless (looking-at (concat "\\(" verilog-end-block-ordered-re "\\)[ \t]*:")) ; ignore named ends |
| @@ -5503,7 +5503,7 @@ becomes: | |||
| 5503 | (cond | 5503 | (cond |
| 5504 | ((looking-at "// surefire lint_off_line ") | 5504 | ((looking-at "// surefire lint_off_line ") |
| 5505 | (goto-char (match-end 0)) | 5505 | (goto-char (match-end 0)) |
| 5506 | (let ((lim (point-at-eol))) | 5506 | (let ((lim (line-end-position))) |
| 5507 | (if (re-search-forward code lim 'move) | 5507 | (if (re-search-forward code lim 'move) |
| 5508 | (throw 'already t) | 5508 | (throw 'already t) |
| 5509 | (insert (concat " " code))))) | 5509 | (insert (concat " " code))))) |
| @@ -9958,7 +9958,7 @@ Use DEFAULT-DIR to anchor paths if non-nil." | |||
| 9958 | (verilog-point-text) filename)) | 9958 | (verilog-point-text) filename)) |
| 9959 | (goto-char (point-min)) | 9959 | (goto-char (point-min)) |
| 9960 | (while (not (eobp)) | 9960 | (while (not (eobp)) |
| 9961 | (setq line (buffer-substring (point) (point-at-eol))) | 9961 | (setq line (buffer-substring (point) (line-end-position))) |
| 9962 | (forward-line 1) | 9962 | (forward-line 1) |
| 9963 | (when (string-match "//" line) | 9963 | (when (string-match "//" line) |
| 9964 | (setq line (substring line 0 (match-beginning 0)))) | 9964 | (setq line (substring line 0 (match-beginning 0)))) |
| @@ -14758,7 +14758,7 @@ Clicking on the middle-mouse button loads them in a buffer (as in dired)." | |||
| 14758 | (verilog-save-scan-cache | 14758 | (verilog-save-scan-cache |
| 14759 | (let (end-point) | 14759 | (let (end-point) |
| 14760 | (goto-char end) | 14760 | (goto-char end) |
| 14761 | (setq end-point (point-at-eol)) | 14761 | (setq end-point (line-end-position)) |
| 14762 | (goto-char beg) | 14762 | (goto-char beg) |
| 14763 | (beginning-of-line) ; scan entire line | 14763 | (beginning-of-line) ; scan entire line |
| 14764 | ;; delete overlays existing on this line | 14764 | ;; delete overlays existing on this line |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 18219db740b..b763da3fbc5 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -7707,7 +7707,7 @@ non-nil, indentation is done before aligning." | |||
| 7707 | (save-excursion | 7707 | (save-excursion |
| 7708 | (goto-char begin) | 7708 | (goto-char begin) |
| 7709 | (let (element | 7709 | (let (element |
| 7710 | (eol (point-at-eol))) | 7710 | (eol (line-end-position))) |
| 7711 | (setq element (nth 0 copy)) | 7711 | (setq element (nth 0 copy)) |
| 7712 | (when (and (or (and (listp (car element)) | 7712 | (when (and (or (and (listp (car element)) |
| 7713 | (memq major-mode (car element))) | 7713 | (memq major-mode (car element))) |
| @@ -7733,7 +7733,7 @@ space is inserted after the token in MATCH." | |||
| 7733 | ;; Determine the greatest whitespace distance to the alignment | 7733 | ;; Determine the greatest whitespace distance to the alignment |
| 7734 | ;; character | 7734 | ;; character |
| 7735 | (goto-char begin) | 7735 | (goto-char begin) |
| 7736 | (setq eol (point-at-eol) | 7736 | (setq eol (line-end-position) |
| 7737 | bol (setq begin (progn (beginning-of-line) (point)))) | 7737 | bol (setq begin (progn (beginning-of-line) (point)))) |
| 7738 | (while (< bol end) | 7738 | (while (< bol end) |
| 7739 | (save-excursion | 7739 | (save-excursion |
| @@ -7750,13 +7750,13 @@ space is inserted after the token in MATCH." | |||
| 7750 | (setq max distance)))) | 7750 | (setq max distance)))) |
| 7751 | (forward-line) | 7751 | (forward-line) |
| 7752 | (setq bol (point) | 7752 | (setq bol (point) |
| 7753 | eol (point-at-eol)) | 7753 | eol (line-end-position)) |
| 7754 | (setq lines (1+ lines))) | 7754 | (setq lines (1+ lines))) |
| 7755 | ;; Now insert enough maxs to push each assignment operator to | 7755 | ;; Now insert enough maxs to push each assignment operator to |
| 7756 | ;; the same column. We need to use 'lines' as a counter, since | 7756 | ;; the same column. We need to use 'lines' as a counter, since |
| 7757 | ;; the location of the mark may change | 7757 | ;; the location of the mark may change |
| 7758 | (goto-char (setq bol begin)) | 7758 | (goto-char (setq bol begin)) |
| 7759 | (setq eol (point-at-eol)) | 7759 | (setq eol (line-end-position)) |
| 7760 | (while (> lines 0) | 7760 | (while (> lines 0) |
| 7761 | (when (and (vhdl-re-search-forward match eol t) | 7761 | (when (and (vhdl-re-search-forward match eol t) |
| 7762 | (save-excursion | 7762 | (save-excursion |
| @@ -7776,7 +7776,7 @@ space is inserted after the token in MATCH." | |||
| 7776 | (beginning-of-line) | 7776 | (beginning-of-line) |
| 7777 | (forward-line) | 7777 | (forward-line) |
| 7778 | (setq bol (point) | 7778 | (setq bol (point) |
| 7779 | eol (point-at-eol)) | 7779 | eol (line-end-position)) |
| 7780 | (setq lines (1- lines)))))) | 7780 | (setq lines (1- lines)))))) |
| 7781 | 7781 | ||
| 7782 | (defun vhdl-align-region-groups (beg end &optional spacing | 7782 | (defun vhdl-align-region-groups (beg end &optional spacing |
| @@ -8647,7 +8647,7 @@ buffer." | |||
| 8647 | (forward-char) | 8647 | (forward-char) |
| 8648 | (vhdl-forward-syntactic-ws)) | 8648 | (vhdl-forward-syntactic-ws)) |
| 8649 | (goto-char end) | 8649 | (goto-char end) |
| 8650 | (when (> pos (point-at-eol)) | 8650 | (when (> pos (line-end-position)) |
| 8651 | (error "ERROR: Not within a generic/port clause")) | 8651 | (error "ERROR: Not within a generic/port clause")) |
| 8652 | ;; delete closing parenthesis on separate line (not supported style) | 8652 | ;; delete closing parenthesis on separate line (not supported style) |
| 8653 | (when (save-excursion (beginning-of-line) (looking-at "^\\s-*);")) | 8653 | (when (save-excursion (beginning-of-line) (looking-at "^\\s-*);")) |
| @@ -12838,7 +12838,7 @@ expressions (e.g. for index ranges of types and signals)." | |||
| 12838 | "Return the line number of the line containing point." | 12838 | "Return the line number of the line containing point." |
| 12839 | (save-restriction | 12839 | (save-restriction |
| 12840 | (widen) | 12840 | (widen) |
| 12841 | (1+ (count-lines (point-min) (point-at-bol))))) | 12841 | (1+ (count-lines (point-min) (line-beginning-position))))) |
| 12842 | 12842 | ||
| 12843 | (defun vhdl-line-kill-entire (&optional arg) | 12843 | (defun vhdl-line-kill-entire (&optional arg) |
| 12844 | "Delete entire line." | 12844 | "Delete entire line." |
| @@ -12855,7 +12855,7 @@ expressions (e.g. for index ranges of types and signals)." | |||
| 12855 | "Copy current line." | 12855 | "Copy current line." |
| 12856 | (interactive "p") | 12856 | (interactive "p") |
| 12857 | (save-excursion | 12857 | (save-excursion |
| 12858 | (let ((position (point-at-bol))) | 12858 | (let ((position (line-beginning-position))) |
| 12859 | (forward-line (or arg 1)) | 12859 | (forward-line (or arg 1)) |
| 12860 | (copy-region-as-kill position (point))))) | 12860 | (copy-region-as-kill position (point))))) |
| 12861 | 12861 | ||
| @@ -16752,7 +16752,7 @@ current project/directory." | |||
| 16752 | (let ((ent-alist ent-alist-arg) | 16752 | (let ((ent-alist ent-alist-arg) |
| 16753 | (conf-alist conf-alist-arg) | 16753 | (conf-alist conf-alist-arg) |
| 16754 | (margin (current-indentation)) | 16754 | (margin (current-indentation)) |
| 16755 | (beg (point-at-bol)) | 16755 | (beg (line-beginning-position)) |
| 16756 | ent-entry inst-entry inst-path inst-prev-path tmp-alist) ;; cons-key | 16756 | ent-entry inst-entry inst-path inst-prev-path tmp-alist) ;; cons-key |
| 16757 | ;; insert block configuration (for architecture) | 16757 | ;; insert block configuration (for architecture) |
| 16758 | (vhdl-insert-keyword "FOR ") (insert arch-name "\n") | 16758 | (vhdl-insert-keyword "FOR ") (insert arch-name "\n") |
diff --git a/lisp/rect.el b/lisp/rect.el index 6babd046051..e1d79da962e 100644 --- a/lisp/rect.el +++ b/lisp/rect.el | |||
| @@ -218,7 +218,7 @@ The returned value has the form of (WIDTH . HEIGHT)." | |||
| 218 | (point))))) | 218 | (point))))) |
| 219 | 219 | ||
| 220 | (defun delete-extract-rectangle-line (startcol endcol lines fill) | 220 | (defun delete-extract-rectangle-line (startcol endcol lines fill) |
| 221 | (let ((pt (point-at-eol))) | 221 | (let ((pt (line-end-position))) |
| 222 | (if (< (move-to-column startcol (if fill t 'coerce)) startcol) | 222 | (if (< (move-to-column startcol (if fill t 'coerce)) startcol) |
| 223 | (setcdr lines (cons (spaces-string (- endcol startcol)) | 223 | (setcdr lines (cons (spaces-string (- endcol startcol)) |
| 224 | (cdr lines))) | 224 | (cdr lines))) |
| @@ -397,13 +397,13 @@ no text on the right side of the rectangle." | |||
| 397 | (defun open-rectangle-line (startcol endcol fill) | 397 | (defun open-rectangle-line (startcol endcol fill) |
| 398 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) | 398 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
| 399 | (unless (and (not fill) | 399 | (unless (and (not fill) |
| 400 | (= (point) (point-at-eol))) | 400 | (= (point) (line-end-position))) |
| 401 | (indent-to endcol)))) | 401 | (indent-to endcol)))) |
| 402 | 402 | ||
| 403 | (defun delete-whitespace-rectangle-line (startcol _endcol fill) | 403 | (defun delete-whitespace-rectangle-line (startcol _endcol fill) |
| 404 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) | 404 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
| 405 | (unless (= (point) (point-at-eol)) | 405 | (unless (= (point) (line-end-position)) |
| 406 | (delete-region (point) (progn (skip-syntax-forward " " (point-at-eol)) | 406 | (delete-region (point) (progn (skip-syntax-forward " " (line-end-position)) |
| 407 | (point)))))) | 407 | (point)))))) |
| 408 | 408 | ||
| 409 | ;;;###autoload | 409 | ;;;###autoload |
| @@ -568,7 +568,7 @@ rectangle which were empty." | |||
| 568 | (apply-on-rectangle 'clear-rectangle-line start end fill)) | 568 | (apply-on-rectangle 'clear-rectangle-line start end fill)) |
| 569 | 569 | ||
| 570 | (defun clear-rectangle-line (startcol endcol fill) | 570 | (defun clear-rectangle-line (startcol endcol fill) |
| 571 | (let ((pt (point-at-eol))) | 571 | (let ((pt (line-end-position))) |
| 572 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) | 572 | (when (= (move-to-column startcol (if fill t 'coerce)) startcol) |
| 573 | (if (and (not fill) | 573 | (if (and (not fill) |
| 574 | (<= (save-excursion (goto-char pt) (current-column)) endcol)) | 574 | (<= (save-excursion (goto-char pt) (current-column)) endcol)) |
diff --git a/lisp/subr.el b/lisp/subr.el index 3fde0551cc8..36f5e2fee49 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1911,12 +1911,11 @@ be a list of the form returned by `event-start' and `event-end'." | |||
| 1911 | (defalias 'store-match-data #'set-match-data) | 1911 | (defalias 'store-match-data #'set-match-data) |
| 1912 | (defalias 'chmod #'set-file-modes) | 1912 | (defalias 'chmod #'set-file-modes) |
| 1913 | (defalias 'mkdir #'make-directory) | 1913 | (defalias 'mkdir #'make-directory) |
| 1914 | ;; These are the XEmacs names: | ||
| 1915 | (defalias 'point-at-eol #'line-end-position) | ||
| 1916 | (defalias 'point-at-bol #'line-beginning-position) | ||
| 1917 | 1914 | ||
| 1918 | (define-obsolete-function-alias 'user-original-login-name | 1915 | ;; These were the XEmacs names, now obsolete: |
| 1919 | #'user-login-name "28.1") | 1916 | (define-obsolete-function-alias 'point-at-eol #'line-end-position "29.1") |
| 1917 | (define-obsolete-function-alias 'point-at-bol #'line-beginning-position "29.1") | ||
| 1918 | (define-obsolete-function-alias 'user-original-login-name #'user-login-name "28.1") | ||
| 1920 | 1919 | ||
| 1921 | ;; These are in obsolete/autoload.el, but are commonly used by | 1920 | ;; These are in obsolete/autoload.el, but are commonly used by |
| 1922 | ;; third-party scripts that assume that they exist without requiring | 1921 | ;; third-party scripts that assume that they exist without requiring |
diff --git a/lisp/term.el b/lisp/term.el index 11c2d2aaa16..797fb18074f 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -2862,13 +2862,13 @@ See `term-prompt-regexp'." | |||
| 2862 | 2862 | ||
| 2863 | (defun term-move-to-column (column) | 2863 | (defun term-move-to-column (column) |
| 2864 | (setq term-current-column column) | 2864 | (setq term-current-column column) |
| 2865 | (let ((point-at-eol (line-end-position))) | 2865 | (let ((line-end-position (line-end-position))) |
| 2866 | (move-to-column term-current-column t) | 2866 | (move-to-column term-current-column t) |
| 2867 | ;; If move-to-column extends the current line it will use the face | 2867 | ;; If move-to-column extends the current line it will use the face |
| 2868 | ;; from the last character on the line, set the face for the chars | 2868 | ;; from the last character on the line, set the face for the chars |
| 2869 | ;; to default. | 2869 | ;; to default. |
| 2870 | (when (> (point) point-at-eol) | 2870 | (when (> (point) line-end-position) |
| 2871 | (put-text-property point-at-eol (point) 'font-lock-face 'default)))) | 2871 | (put-text-property line-end-position (point) 'font-lock-face 'default)))) |
| 2872 | 2872 | ||
| 2873 | ;; Move DELTA column right (or left if delta < 0 limiting at column 0). | 2873 | ;; Move DELTA column right (or left if delta < 0 limiting at column 0). |
| 2874 | (defun term-move-columns (delta) | 2874 | (defun term-move-columns (delta) |
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index a2a7774aba7..d2a35bd550f 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el | |||
| @@ -1711,7 +1711,7 @@ be used to fill comments. | |||
| 1711 | ;; comment. | 1711 | ;; comment. |
| 1712 | (when (save-excursion | 1712 | (when (save-excursion |
| 1713 | (beginning-of-line) | 1713 | (beginning-of-line) |
| 1714 | (comment-search-forward (point-at-eol) t)) | 1714 | (comment-search-forward (line-end-position) t)) |
| 1715 | (goto-char (match-end 0))) | 1715 | (goto-char (match-end 0))) |
| 1716 | (let ((ppss (syntax-ppss)) | 1716 | (let ((ppss (syntax-ppss)) |
| 1717 | (eol (line-end-position))) | 1717 | (eol (line-end-position))) |
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 2ee20ef1d45..1094ef3e934 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -1553,7 +1553,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1553 | (goto-char (point-min)) | 1553 | (goto-char (point-min)) |
| 1554 | ;; Localwords parsing copied from ispell.el. | 1554 | ;; Localwords parsing copied from ispell.el. |
| 1555 | (while (search-forward ispell-words-keyword nil t) | 1555 | (while (search-forward ispell-words-keyword nil t) |
| 1556 | (let ((end (point-at-eol)) | 1556 | (let ((end (line-end-position)) |
| 1557 | string) | 1557 | string) |
| 1558 | ;; buffer-local words separated by a space, and can contain | 1558 | ;; buffer-local words separated by a space, and can contain |
| 1559 | ;; any character other than a space. Not rigorous enough. | 1559 | ;; any character other than a space. Not rigorous enough. |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 6e83982e220..8e633688091 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -3154,7 +3154,7 @@ ispell-region: Search for first region to skip after (ispell-begin-skip-region-r | |||
| 3154 | (min skip-region-start ispell-region-end) | 3154 | (min skip-region-start ispell-region-end) |
| 3155 | (marker-position ispell-region-end)))) | 3155 | (marker-position ispell-region-end)))) |
| 3156 | (let* ((ispell-start (point)) | 3156 | (let* ((ispell-start (point)) |
| 3157 | (ispell-end (min (point-at-eol) reg-end)) | 3157 | (ispell-end (min (line-end-position) reg-end)) |
| 3158 | ;; See if line must be prefixed by comment string to let ispell know this is | 3158 | ;; See if line must be prefixed by comment string to let ispell know this is |
| 3159 | ;; part of a comment string. This is only supported in some modes. | 3159 | ;; part of a comment string. This is only supported in some modes. |
| 3160 | ;; In particular, this is not supported in autoconf mode where adding the | 3160 | ;; In particular, this is not supported in autoconf mode where adding the |
| @@ -3167,7 +3167,8 @@ ispell-region: Search for first region to skip after (ispell-begin-skip-region-r | |||
| 3167 | ispell-start ispell-end add-comment))) | 3167 | ispell-start ispell-end add-comment))) |
| 3168 | (ispell-print-if-debug | 3168 | (ispell-print-if-debug |
| 3169 | "ispell-region: string pos (%s->%s), eol: %s, [in-comment]: [%s], [add-comment]: [%s], [string]: [%s]\n" | 3169 | "ispell-region: string pos (%s->%s), eol: %s, [in-comment]: [%s], [add-comment]: [%s], [string]: [%s]\n" |
| 3170 | ispell-start ispell-end (point-at-eol) in-comment add-comment string) | 3170 | ispell-start ispell-end (line-end-position) |
| 3171 | in-comment add-comment string) | ||
| 3171 | (if add-comment ; account for comment chars added | 3172 | (if add-comment ; account for comment chars added |
| 3172 | (setq ispell-start (- ispell-start (length add-comment)) | 3173 | (setq ispell-start (- ispell-start (length add-comment)) |
| 3173 | ;; Reset `in-comment' (and indirectly `add-comment') for new line | 3174 | ;; Reset `in-comment' (and indirectly `add-comment') for new line |
| @@ -4104,7 +4105,7 @@ Includes LaTeX/Nroff modes and extended character mode." | |||
| 4104 | (goto-char (point-max)) | 4105 | (goto-char (point-max)) |
| 4105 | ;; Uses last occurrence of ispell-parsing-keyword | 4106 | ;; Uses last occurrence of ispell-parsing-keyword |
| 4106 | (if (search-backward ispell-parsing-keyword nil t) | 4107 | (if (search-backward ispell-parsing-keyword nil t) |
| 4107 | (let ((end (point-at-eol)) | 4108 | (let ((end (line-end-position)) |
| 4108 | string) | 4109 | string) |
| 4109 | (search-forward ispell-parsing-keyword) | 4110 | (search-forward ispell-parsing-keyword) |
| 4110 | (while (re-search-forward " *\\([^ \"]+\\)" end t) | 4111 | (while (re-search-forward " *\\([^ \"]+\\)" end t) |
| @@ -4140,7 +4141,7 @@ Both should not be used to define a buffer-local dictionary." | |||
| 4140 | (if (search-backward ispell-dictionary-keyword nil t) | 4141 | (if (search-backward ispell-dictionary-keyword nil t) |
| 4141 | (progn | 4142 | (progn |
| 4142 | (search-forward ispell-dictionary-keyword) | 4143 | (search-forward ispell-dictionary-keyword) |
| 4143 | (setq end (point-at-eol)) | 4144 | (setq end (line-end-position)) |
| 4144 | (if (re-search-forward " *\\([^ \"]+\\)" end t) | 4145 | (if (re-search-forward " *\\([^ \"]+\\)" end t) |
| 4145 | (setq ispell-local-dictionary | 4146 | (setq ispell-local-dictionary |
| 4146 | (match-string-no-properties 1)))))) | 4147 | (match-string-no-properties 1)))))) |
| @@ -4148,7 +4149,7 @@ Both should not be used to define a buffer-local dictionary." | |||
| 4148 | (if (search-backward ispell-pdict-keyword nil t) | 4149 | (if (search-backward ispell-pdict-keyword nil t) |
| 4149 | (progn | 4150 | (progn |
| 4150 | (search-forward ispell-pdict-keyword) | 4151 | (search-forward ispell-pdict-keyword) |
| 4151 | (setq end (point-at-eol)) | 4152 | (setq end (line-end-position)) |
| 4152 | (if (re-search-forward " *\\([^ \"]+\\)" end t) | 4153 | (if (re-search-forward " *\\([^ \"]+\\)" end t) |
| 4153 | (setq ispell-local-pdict | 4154 | (setq ispell-local-pdict |
| 4154 | (match-string-no-properties 1))))))) | 4155 | (match-string-no-properties 1))))))) |
| @@ -4177,7 +4178,7 @@ Both should not be used to define a buffer-local dictionary." | |||
| 4177 | (while (search-forward ispell-words-keyword nil t) | 4178 | (while (search-forward ispell-words-keyword nil t) |
| 4178 | (or ispell-buffer-local-name | 4179 | (or ispell-buffer-local-name |
| 4179 | (setq ispell-buffer-local-name (buffer-name))) | 4180 | (setq ispell-buffer-local-name (buffer-name))) |
| 4180 | (let ((end (point-at-eol)) | 4181 | (let ((end (line-end-position)) |
| 4181 | (ispell-casechars (ispell-get-casechars)) | 4182 | (ispell-casechars (ispell-get-casechars)) |
| 4182 | string) | 4183 | string) |
| 4183 | ;; buffer-local words separated by a space, and can contain | 4184 | ;; buffer-local words separated by a space, and can contain |
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index 7a654f72ab8..98672f42b3f 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el | |||
| @@ -779,10 +779,10 @@ braces." | |||
| 779 | nil | 779 | nil |
| 780 | (cond | 780 | (cond |
| 781 | ;; parenthesis | 781 | ;; parenthesis |
| 782 | ((looking-back "([^)]*" (point-at-bol 0)) | 782 | ((looking-back "([^)]*" (line-beginning-position 0)) |
| 783 | "@pxref{") | 783 | "@pxref{") |
| 784 | ;; beginning of sentence or buffer | 784 | ;; beginning of sentence or buffer |
| 785 | ((or (looking-back (sentence-end) (point-at-bol 0)) | 785 | ((or (looking-back (sentence-end) (line-beginning-position 0)) |
| 786 | (= (point) (point-min))) | 786 | (= (point) (point-min))) |
| 787 | "@xref{") | 787 | "@xref{") |
| 788 | ;; bol or eol | 788 | ;; bol or eol |
| @@ -790,7 +790,7 @@ braces." | |||
| 790 | "@ref{") | 790 | "@ref{") |
| 791 | ;; inside word | 791 | ;; inside word |
| 792 | ((not (eq (char-syntax (char-after)) ? )) | 792 | ((not (eq (char-syntax (char-after)) ? )) |
| 793 | (skip-syntax-backward "^ " (point-at-bol)) | 793 | (skip-syntax-backward "^ " (line-beginning-position)) |
| 794 | "@ref{") | 794 | "@ref{") |
| 795 | ;; everything else | 795 | ;; everything else |
| 796 | (t | 796 | (t |
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index e4a1996c1bb..6b30de3cb37 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -633,7 +633,7 @@ See https://lists.gnu.org/r/emacs-devel/2007-11/msg01990.html") | |||
| 633 | (when (looking-at regexp-hunk) ; Hunk header. | 633 | (when (looking-at regexp-hunk) ; Hunk header. |
| 634 | (throw 'headerp (point))) | 634 | (throw 'headerp (point))) |
| 635 | (forward-line -1) | 635 | (forward-line -1) |
| 636 | (when (re-search-forward regexp-file (point-at-eol 4) t) ; File header. | 636 | (when (re-search-forward regexp-file (line-end-position 4) t) ; File header. |
| 637 | (forward-line 0) | 637 | (forward-line 0) |
| 638 | (throw 'headerp (point))) | 638 | (throw 'headerp (point))) |
| 639 | (goto-char orig) | 639 | (goto-char orig) |
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 61976288e35..f4a44df3c29 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -907,7 +907,7 @@ if we don't understand a construct, we signal | |||
| 907 | ;; should cover the common cases. Remember that we fall back | 907 | ;; should cover the common cases. Remember that we fall back |
| 908 | ;; to regular hg commands if we see something we don't like. | 908 | ;; to regular hg commands if we see something we don't like. |
| 909 | (save-restriction | 909 | (save-restriction |
| 910 | (narrow-to-region (point) (point-at-eol)) | 910 | (narrow-to-region (point) (line-end-position)) |
| 911 | (cond ((looking-at "[ \t]*\\(?:#.*\\)?$")) | 911 | (cond ((looking-at "[ \t]*\\(?:#.*\\)?$")) |
| 912 | ((looking-at "syntax:[ \t]*re[ \t]*$") | 912 | ((looking-at "syntax:[ \t]*re[ \t]*$") |
| 913 | (setf default-syntax 'vc-hg--hgignore-add-pcre)) | 913 | (setf default-syntax 'vc-hg--hgignore-add-pcre)) |
diff --git a/lisp/xdg.el b/lisp/xdg.el index c7d9c0e785e..dd0d51290dc 100644 --- a/lisp/xdg.el +++ b/lisp/xdg.el | |||
| @@ -250,7 +250,7 @@ This should be called at the beginning of a line." | |||
| 250 | ;; Filter localized strings | 250 | ;; Filter localized strings |
| 251 | ((looking-at (rx (group-n 1 (+ (in alnum "-"))) (* blank) "["))) | 251 | ((looking-at (rx (group-n 1 (+ (in alnum "-"))) (* blank) "["))) |
| 252 | (t (error "Malformed line: %s" | 252 | (t (error "Malformed line: %s" |
| 253 | (buffer-substring (point) (point-at-eol))))) | 253 | (buffer-substring (point) (line-end-position))))) |
| 254 | (forward-line)) | 254 | (forward-line)) |
| 255 | res)) | 255 | res)) |
| 256 | 256 | ||
| @@ -265,7 +265,7 @@ Optional argument GROUP defaults to the string \"Desktop Entry\"." | |||
| 265 | (forward-line)) | 265 | (forward-line)) |
| 266 | (unless (looking-at xdg-desktop-group-regexp) | 266 | (unless (looking-at xdg-desktop-group-regexp) |
| 267 | (error "Expected group name! Instead saw: %s" | 267 | (error "Expected group name! Instead saw: %s" |
| 268 | (buffer-substring (point) (point-at-eol)))) | 268 | (buffer-substring (point) (line-end-position)))) |
| 269 | (when group | 269 | (when group |
| 270 | (while (and (re-search-forward xdg-desktop-group-regexp nil t) | 270 | (while (and (re-search-forward xdg-desktop-group-regexp nil t) |
| 271 | (not (equal (match-string 1) group))))) | 271 | (not (equal (match-string 1) group))))) |