1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

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
This commit is contained in:
Stefan Kangas 2022-08-23 04:54:57 +02:00
parent e425b7d231
commit b7e867b841
134 changed files with 586 additions and 550 deletions

View file

@ -135,7 +135,7 @@ If nil, the function `gitmerge-default-branch' guesses.")
(defun gitmerge-get-sha1 () (defun gitmerge-get-sha1 ()
"Get SHA1 from commit at point." "Get SHA1 from commit at point."
(save-excursion (save-excursion
(goto-char (point-at-bol)) (goto-char (line-beginning-position))
(when (looking-at "^[A-Z ]\\s-*\\([a-f0-9]+\\)") (when (looking-at "^[A-Z ]\\s-*\\([a-f0-9]+\\)")
(match-string 1)))) (match-string 1))))
@ -187,7 +187,7 @@ If nil, the function `gitmerge-default-branch' guesses.")
skip) skip)
(when commit (when commit
(save-excursion (save-excursion
(goto-char (point-at-bol)) (goto-char (line-beginning-position))
(when (looking-at "^\\([A-Z ]\\)\\s-*\\([a-f0-9]+\\)") (when (looking-at "^\\([A-Z ]\\)\\s-*\\([a-f0-9]+\\)")
(setq skip (string= (match-string 1) " ")) (setq skip (string= (match-string 1) " "))
(goto-char (match-beginning 2)) (goto-char (match-beginning 2))
@ -195,7 +195,7 @@ If nil, the function `gitmerge-default-branch' guesses.")
(dolist (ct gitmerge--commits) (dolist (ct gitmerge--commits)
(when (string-match commit (car ct)) (when (string-match commit (car ct))
(setcdr ct (when skip "M")))) (setcdr ct (when skip "M"))))
(goto-char (point-at-bol)) (goto-char (line-beginning-position))
(setq buffer-read-only nil) (setq buffer-read-only nil)
(delete-char 1) (delete-char 1)
(insert (if skip "M" " ")) (insert (if skip "M" " "))

View file

@ -4598,7 +4598,7 @@ by pops to non-distinctive yanks. Bug..."
(save-match-data (save-match-data
(save-excursion (save-excursion
(let* ((text-start allout-recent-prefix-end) (let* ((text-start allout-recent-prefix-end)
(heading-end (point-at-eol))) (heading-end (line-end-position)))
(goto-char text-start) (goto-char text-start)
(setq file-name (setq file-name
(if (re-search-forward "\\s-\\(\\S-*\\)" heading-end t) (if (re-search-forward "\\s-\\(\\S-*\\)" heading-end t)
@ -4874,7 +4874,7 @@ siblings, even if the target topic is already closed."
(interactive) (interactive)
(save-excursion (save-excursion
(allout-back-to-heading) (allout-back-to-heading)
(if (allout-hidden-p (point-at-eol)) (if (allout-hidden-p (line-end-position))
(allout-show-current-subtree) (allout-show-current-subtree)
(allout-hide-current-subtree)))) (allout-hide-current-subtree))))
;;;_ > allout-show-current-branches () ;;;_ > allout-show-current-branches ()
@ -5537,7 +5537,7 @@ environment. Leaves point at the end of the line."
(let ((inhibit-field-text-motion t)) (let ((inhibit-field-text-motion t))
(beginning-of-line) (beginning-of-line)
(let (;(beg (point)) (let (;(beg (point))
(end (point-at-eol))) (end (line-end-position)))
(save-match-data (save-match-data
(while (re-search-forward "\\\\" (while (re-search-forward "\\\\"
;;"\\\\\\|\\{\\|\\}\\|\\_\\|\\$\\|\\\"\\|\\&\\|\\^\\|\\-\\|\\*\\|#" ;;"\\\\\\|\\{\\|\\}\\|\\_\\|\\$\\|\\\"\\|\\&\\|\\^\\|\\-\\|\\*\\|#"

View file

@ -387,7 +387,7 @@
(interactive) (interactive)
(unless (eq major-mode 'calc-keypad-mode) (unless (eq major-mode 'calc-keypad-mode)
(error "Must be in *Calc Keypad* buffer for this command")) (error "Must be in *Calc Keypad* buffer for this command"))
(let* ((row (count-lines (point-min) (point-at-bol))) (let* ((row (count-lines (point-min) (line-beginning-position)))
(y (/ row 2)) (y (/ row 2))
(x (/ (current-column) (if (>= y 4) 6 5))) (x (/ (current-column) (if (>= y 4) 6 5)))
radix frac inv radix frac inv

View file

@ -48,7 +48,7 @@
(let ((stuff (calc-top-list n (- num n -1)))) (let ((stuff (calc-top-list n (- num n -1))))
(calc-cursor-stack-index num) (calc-cursor-stack-index num)
(unless calc-kill-line-numbering (unless calc-kill-line-numbering
(re-search-forward "\\=[0-9]+:\\s-+" (point-at-eol) t)) (re-search-forward "\\=[0-9]+:\\s-+" (line-end-position) t))
(let ((first (point))) (let ((first (point)))
(calc-cursor-stack-index (- num n)) (calc-cursor-stack-index (- num n))
(if (null nn) (if (null nn)
@ -410,8 +410,8 @@ Interactively, reads the register using `register-read-with-preview'."
(setq single t) (setq single t)
(setq arg (prefix-numeric-value arg)) (setq arg (prefix-numeric-value arg))
(if (= arg 0) (if (= arg 0)
(setq top (point-at-bol) (setq top (line-beginning-position)
bot (point-at-eol)) bot (line-end-position))
(save-excursion (save-excursion
(setq top (point)) (setq top (point))
(forward-line arg) (forward-line arg)

View file

@ -133,7 +133,7 @@ DIR defaults to `default-directory'."
(goto-char (point-min)) (goto-char (point-min))
(when (not (eobp)) (when (not (eobp))
(file-name-as-directory (file-name-as-directory
(buffer-substring (point) (point-at-eol))))))) (buffer-substring (point) (line-end-position)))))))
(defun cedet-gnu-global-version-check (&optional noerror) (defun cedet-gnu-global-version-check (&optional noerror)
"Check the version of the installed GNU Global command. "Check the version of the installed GNU Global command.

View file

@ -902,14 +902,14 @@ If PARENT is non-nil, it is somehow related as a parent to thing."
(interactive) (interactive)
(forward-line 1) (forward-line 1)
(beginning-of-line) (beginning-of-line)
(skip-chars-forward "- *><[]" (point-at-eol))) (skip-chars-forward "- *><[]" (line-end-position)))
(defun data-debug-prev () (defun data-debug-prev ()
"Go to the previous line in the Ddebug buffer." "Go to the previous line in the Ddebug buffer."
(interactive) (interactive)
(forward-line -1) (forward-line -1)
(beginning-of-line) (beginning-of-line)
(skip-chars-forward "- *><[]" (point-at-eol))) (skip-chars-forward "- *><[]" (line-end-position)))
(defun data-debug-next-expando () (defun data-debug-next-expando ()
"Go to the next line in the Ddebug buffer. "Go to the next line in the Ddebug buffer.
@ -996,7 +996,7 @@ Do nothing if already contracted."
(data-debug-current-line-expanded-p)) (data-debug-current-line-expanded-p))
(data-debug-contract-current-line) (data-debug-contract-current-line)
(data-debug-expand-current-line)) (data-debug-expand-current-line))
(skip-chars-forward "- *><[]" (point-at-eol))) (skip-chars-forward "- *><[]" (line-end-position)))
(defun data-debug-expand-or-contract-mouse (event) (defun data-debug-expand-or-contract-mouse (event)
"Expand or contract anything at event EVENT." "Expand or contract anything at event EVENT."

View file

@ -383,16 +383,16 @@ Optional argument BODY is the code to execute which edits the autoconf file."
(beginning-of-line) (beginning-of-line)
(let* ((end-of-cmd (let* ((end-of-cmd
(save-excursion (save-excursion
(if (re-search-forward "(" (point-at-eol) t) (if (re-search-forward "(" (line-end-position) t)
(progn (progn
(forward-char -1) (forward-char -1)
(forward-sexp 1) (forward-sexp 1)
(point)) (point))
;; Else, just return EOL. ;; Else, just return EOL.
(point-at-eol)))) (line-end-position))))
(cnt 0)) (cnt 0))
(save-restriction (save-restriction
(narrow-to-region (point-at-bol) end-of-cmd) (narrow-to-region (line-beginning-position) end-of-cmd)
(condition-case nil (condition-case nil
(progn (progn
(down-list 1) (down-list 1)
@ -417,7 +417,7 @@ INDEX starts at 1."
(down-list 1) (down-list 1)
(re-search-forward ", ?" nil nil (1- index)) (re-search-forward ", ?" nil nil (1- index))
(let ((end (save-excursion (let ((end (save-excursion
(re-search-forward ",\\|)" (point-at-eol)) (re-search-forward ",\\|)" (line-end-position))
(forward-char -1) (forward-char -1)
(point)))) (point))))
(setq autoconf-deleted-text (buffer-substring (point) end)) (setq autoconf-deleted-text (buffer-substring (point) end))

View file

@ -566,7 +566,7 @@ Argument THIS is the target that should insert stuff."
(cond ((eq (cdr sv) 'share) (cond ((eq (cdr sv) 'share)
;; This variable may be shared between multiple targets. ;; This variable may be shared between multiple targets.
(if (re-search-backward (concat "\\$(" (car sv) ")") (if (re-search-backward (concat "\\$(" (car sv) ")")
(point-at-bol) t) (line-beginning-position) t)
;; If its already in the dist target, then skip it. ;; If its already in the dist target, then skip it.
nil nil
(setq sv (car sv)))) (setq sv (car sv))))

View file

@ -272,7 +272,8 @@ is found, such as a `-version' variable, or the standard header."
(let ((path (match-string 1))) (let ((path (match-string 1)))
(if (string= path "nil") (if (string= path "nil")
nil nil
(delete-region (point-at-bol) (point-at-bol 2))))))))) (delete-region (line-beginning-position)
(line-beginning-position 2)))))))))
;;; ;;;
;; Autoload generators ;; Autoload generators

View file

@ -911,7 +911,7 @@ Kill the Configure buffer if it was not already in a buffer."
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward (concat "^" (regexp-quote var) "\\s-*=\\s-*") (when (re-search-forward (concat "^" (regexp-quote var) "\\s-*=\\s-*")
nil t) nil t)
(buffer-substring-no-properties (point) (point-at-eol))))) (buffer-substring-no-properties (point) (line-end-position)))))
(defun project-am-extract-package-info (dir) (defun project-am-extract-package-info (dir)
"Extract the package information for directory DIR." "Extract the package information for directory DIR."

View file

@ -175,7 +175,7 @@ Argument DIR is the directory from which to derive the list of objects."
(beginning-of-line) (beginning-of-line)
(looking-at "^\\([0-9]+\\):") (looking-at "^\\([0-9]+\\):")
(let ((depth (string-to-number (match-string 1)))) (let ((depth (string-to-number (match-string 1))))
(while (not (re-search-forward "[]] [^ ]" (point-at-eol) t)) (while (not (re-search-forward "[]] [^ ]" (line-end-position) t))
(re-search-backward (format "^%d:" (1- depth))) (re-search-backward (format "^%d:" (1- depth)))
(setq depth (1- depth))) (setq depth (1- depth)))
(speedbar-line-token)))) (speedbar-line-token))))

View file

@ -202,7 +202,7 @@ If POINT is nil or missing, the current point is used instead.
Optional argument FACE specifies the face to do the highlighting." Optional argument FACE specifies the face to do the highlighting."
(save-excursion (save-excursion
(goto-char (or point (point))) (goto-char (or point (point)))
(let ((start (point-at-bol)) (let ((start (line-beginning-position))
(end (save-excursion (end (save-excursion
(end-of-line) (end-of-line)
(when (not (eobp)) (when (not (eobp))

View file

@ -437,8 +437,8 @@ I think it just returns t/nil dependent on if VAR has been defined."
(progn (progn
(semantic-push-parser-warning (semantic-push-parser-warning
(format "Skip %s" (buffer-substring-no-properties (format "Skip %s" (buffer-substring-no-properties
(point-at-bol) (point-at-eol))) (line-beginning-position) (line-end-position)))
(point-at-bol) (point-at-eol)) (line-beginning-position) (line-end-position))
nil) nil)
t))) t)))
@ -501,8 +501,10 @@ code to parse."
;; The if indicates to skip this preprocessor section ;; The if indicates to skip this preprocessor section
(let () ;; (pt nil) (let () ;; (pt nil)
(semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties (point-at-bol) (point-at-eol))) (semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties
(point-at-bol) (point-at-eol)) (line-beginning-position)
(line-end-position)))
(line-beginning-position) (line-end-position))
(beginning-of-line) (beginning-of-line)
;; (setq pt (point)) ;; (setq pt (point))
;; This skips only a section of a conditional. Once that section ;; This skips only a section of a conditional. Once that section

View file

@ -252,7 +252,7 @@ That is tag names plus names defined in tag attribute `:rest'."
(skip-chars-backward "\r\n\t") (skip-chars-backward "\r\n\t")
;; If a grammar footer is found, skip it. ;; If a grammar footer is found, skip it.
(re-search-backward "^;;;\\s-+\\S-+\\s-+ends here" (re-search-backward "^;;;\\s-+\\S-+\\s-+ends here"
(point-at-bol) t) (line-beginning-position) t)
(skip-chars-backward "\r\n\t") (skip-chars-backward "\r\n\t")
(point))) (point)))
"\n")) "\n"))

View file

@ -818,13 +818,13 @@ visible, then highlight it."
(goto-char (overlay-start region)) (goto-char (overlay-start region))
(when (pos-visible-in-window-p (when (pos-visible-in-window-p
(point) (get-buffer-window (current-buffer) 'visible)) (point) (get-buffer-window (current-buffer) 'visible))
(if (< (overlay-end region) (point-at-eol)) (if (< (overlay-end region) (line-end-position))
(pulse-momentary-highlight-overlay (pulse-momentary-highlight-overlay
region semantic-idle-symbol-highlight-face) region semantic-idle-symbol-highlight-face)
;; Not the same ;; Not the same
(pulse-momentary-highlight-region (pulse-momentary-highlight-region
(overlay-start region) (overlay-start region)
(point-at-eol) (line-end-position)
semantic-idle-symbol-highlight-face)))) semantic-idle-symbol-highlight-face))))
)) ))
((vectorp region) ((vectorp region)
@ -843,8 +843,8 @@ visible, then highlight it."
end t) end t)
;; This is likely it, give it a try. ;; This is likely it, give it a try.
(pulse-momentary-highlight-region (pulse-momentary-highlight-region
start (if (<= end (point-at-eol)) end start (if (<= end (line-end-position)) end
(point-at-eol)) (line-end-position))
semantic-idle-symbol-highlight-face))) semantic-idle-symbol-highlight-face)))
)))) ))))
nil)) nil))

View file

@ -826,7 +826,7 @@ Argument BEG and END specify the bounds of SYM in the buffer."
(goto-char end) (goto-char end)
(setq arg-parsed (setq arg-parsed
(semantic-lex-spp-one-token-and-move-for-macro (semantic-lex-spp-one-token-and-move-for-macro
;; NOTE: This used to be (point-at-eol), but ;; NOTE: This used to be (line-end-position), but
;; that was too close for multi-line arguments ;; that was too close for multi-line arguments
;; to a macro. Point max may be too far if there ;; to a macro. Point max may be too far if there
;; is a typo in the buffer. ;; is a typo in the buffer.

View file

@ -1423,7 +1423,7 @@ Return either a paren token or a semantic list token depending on
;; to work properly. Lets try and move over ;; to work properly. Lets try and move over
;; whatever white space we matched to begin ;; whatever white space we matched to begin
;; with. ;; with.
(skip-syntax-forward "-.'" (point-at-eol)) (skip-syntax-forward "-.'" (line-end-position))
;; We may need to back up so newlines or whitespace is generated. ;; We may need to back up so newlines or whitespace is generated.
(if (bolp) (if (bolp)
(backward-char 1))) (backward-char 1)))

View file

@ -555,7 +555,7 @@ deleting the buffers that were opened."
(when (re-search-forward (if (memq searchtype '(regexp tagregexp)) (when (re-search-forward (if (memq searchtype '(regexp tagregexp))
searchtxt searchtxt
(regexp-quote searchtxt)) (regexp-quote searchtxt))
(point-at-eol) (line-end-position)
t) t)
(goto-char (match-beginning 0)) (goto-char (match-beginning 0))
) )

View file

@ -234,7 +234,7 @@ Some useful functions are found in `semantic-format-tag-functions'."
"Toggle showing the contents below the current line." "Toggle showing the contents below the current line."
(interactive) (interactive)
(beginning-of-line) (beginning-of-line)
(when (re-search-forward "\\[[-+]\\]" (point-at-eol) t) (when (re-search-forward "\\[[-+]\\]" (line-end-position) t)
(forward-char -1) (forward-char -1)
(push-button))) (push-button)))
@ -255,7 +255,7 @@ BUTTON is the button that was clicked."
(forward-line (1- H)) (forward-line (1- H))
(beginning-of-line) (beginning-of-line)
(back-to-indentation) (back-to-indentation)
(setq text (cons (buffer-substring (point) (point-at-eol)) text))) (setq text (cons (buffer-substring (point) (line-end-position)) text)))
(setq text (nreverse text))) (setq text (nreverse text)))
(goto-char (button-start button)) (goto-char (button-start button))
(forward-char 1) (forward-char 1)
@ -409,7 +409,7 @@ cursor to the beginning of that symbol, then record a macro as if
(switch-to-buffer-other-window (semantic-tag-buffer tag)) (switch-to-buffer-other-window (semantic-tag-buffer tag))
(goto-char (point-min)) (goto-char (point-min))
(forward-line (1- line)) (forward-line (1- line))
(when (not (re-search-forward (regexp-quote oldsym) (point-at-eol) t)) (when (not (re-search-forward (regexp-quote oldsym) (line-end-position) t))
(error "Cannot find hit. Cannot record macro")) (error "Cannot find hit. Cannot record macro"))
(goto-char (match-beginning 0)) (goto-char (match-beginning 0))
;; Cursor is now in the right location. Start recording a macro. ;; Cursor is now in the right location. Start recording a macro.
@ -479,7 +479,7 @@ Return the number of occurrences FUNCTION was operated upon."
(goto-char (point-min)) (goto-char (point-min))
(forward-line (1- line)) (forward-line (1- line))
(beginning-of-line) (beginning-of-line)
(while (re-search-forward (regexp-quote oldsym) (point-at-eol) t) (while (re-search-forward (regexp-quote oldsym) (line-end-position) t)
(setq count (1+ count)) (setq count (1+ count))
(save-excursion ;; Leave cursor after the matched name. (save-excursion ;; Leave cursor after the matched name.
(goto-char (match-beginning 0)) ;; Go to beginning of that sym (goto-char (match-beginning 0)) ;; Go to beginning of that sym

View file

@ -750,7 +750,7 @@ If there is no function, disable the header line."
(if noshow (if noshow
"" ""
(if semantic-stickyfunc-show-only-functions-p "" (if semantic-stickyfunc-show-only-functions-p ""
(buffer-substring (point-at-bol) (point-at-eol)) (buffer-substring (line-beginning-position) (line-end-position))
)) ))
;; Go get the first line of this tag. ;; Go get the first line of this tag.
(goto-char (semantic-tag-start tag)) (goto-char (semantic-tag-start tag))
@ -765,7 +765,7 @@ If there is no function, disable the header line."
;; Without going to the tag-name we would get"void" in the ;; Without going to the tag-name we would get"void" in the
;; header line which is IMHO not really useful ;; header line which is IMHO not really useful
(search-forward (semantic-tag-name tag) nil t) (search-forward (semantic-tag-name tag) nil t)
(buffer-substring (point-at-bol) (point-at-eol)) (buffer-substring (line-beginning-position) (line-end-position))
)))) ))))
(start 0)) (start 0))
(while (string-match "%" str start) (while (string-match "%" str start)
@ -959,7 +959,7 @@ function was called, move the overlay."
(goto-char (semantic-tag-start tag)) (goto-char (semantic-tag-start tag))
(search-forward (semantic-tag-name tag) nil t) (search-forward (semantic-tag-name tag) nil t)
(overlay-put ol 'tag tag) (overlay-put ol 'tag tag)
(move-overlay ol (point-at-bol) (point-at-eol))))))) (move-overlay ol (line-beginning-position) (line-end-position)))))))
nil) nil)
(semantic-add-minor-mode 'semantic-highlight-func-mode (semantic-add-minor-mode 'semantic-highlight-func-mode

View file

@ -107,7 +107,7 @@ This is currently needed for the mozrepl omniscient database."
(when (looking-at "\\w\\|\\s_") (when (looking-at "\\w\\|\\s_")
(forward-sexp 1)) (forward-sexp 1))
(setq end (point)) (setq end (point))
(unless (re-search-backward "\\s-" (point-at-bol) t) (unless (re-search-backward "\\s-" (line-beginning-position) t)
(beginning-of-line)) (beginning-of-line))
(setq tmp (buffer-substring-no-properties (point) end)) (setq tmp (buffer-substring-no-properties (point) end))
;; (setq symlist ;; (setq symlist

View file

@ -496,7 +496,7 @@ It is assumed that the comment occurs just after VAR-IN."
;; Find any existing doc strings. ;; Find any existing doc strings.
(goto-char (semantic-tag-end var-in)) (goto-char (semantic-tag-end var-in))
(skip-syntax-forward "-" (point-at-eol)) (skip-syntax-forward "-" (line-end-position))
(let ((lextok (semantic-doc-snarf-comment-for-tag 'lex)) (let ((lextok (semantic-doc-snarf-comment-for-tag 'lex))
) )
@ -521,7 +521,7 @@ It is assumed that the comment occurs just after VAR-IN."
(end-of-line) (end-of-line)
(delete-horizontal-space) (delete-horizontal-space)
(move-to-column comment-column t) (move-to-column comment-column t)
(when (< (point) (point-at-eol)) (end-of-line)) (when (< (point) (line-end-position)) (end-of-line))
;; Perform the insertion ;; Perform the insertion
(let ((srecode-semantic-selected-tag var-in) (let ((srecode-semantic-selected-tag var-in)
@ -819,7 +819,7 @@ not account for verb parts."
"Does TAG fit on one line with space on the end?" "Does TAG fit on one line with space on the end?"
(save-excursion (save-excursion
(semantic-go-to-tag tag) (semantic-go-to-tag tag)
(and (<= (semantic-tag-end tag) (point-at-eol)) (and (<= (semantic-tag-end tag) (line-end-position))
(goto-char (semantic-tag-end tag)) (goto-char (semantic-tag-end tag))
(< (current-column) 70)))) (< (current-column) 70))))

View file

@ -406,7 +406,7 @@ Specify the :blank argument to enable this inserter.")
((eq (oref sti where) 'end) ((eq (oref sti where) 'end)
;; If there is whitespace after pnt, then clear it out. ;; If there is whitespace after pnt, then clear it out.
(when (looking-at "\\s-*$") (when (looking-at "\\s-*$")
(delete-region (point) (point-at-eol))) (delete-region (point) (line-end-position)))
(when (not (eolp)) (when (not (eolp))
(princ "\n"))) (princ "\n")))
) )

View file

@ -1262,13 +1262,13 @@ The return value is the target column for the file names."
(dired-goto-next-file) (dired-goto-next-file)
;; Use point difference instead of `current-column', because ;; Use point difference instead of `current-column', because
;; the former works when `dired-hide-details-mode' is enabled. ;; the former works when `dired-hide-details-mode' is enabled.
(let* ((first (- (point) (point-at-bol))) (let* ((first (- (point) (line-beginning-position)))
(target first)) (target first))
(while (and (not (eobp)) (while (and (not (eobp))
(progn (progn
(forward-line) (forward-line)
(dired-move-to-filename))) (dired-move-to-filename)))
(when-let* ((distance (- (point) (point-at-bol))) (when-let* ((distance (- (point) (line-beginning-position)))
(higher (> distance target))) (higher (> distance target)))
(setq target distance))) (setq target distance)))
(and (/= first target) target)))) (and (/= first target) target))))
@ -1284,7 +1284,7 @@ The return value is the target column for the file names."
(while (dired-move-to-filename) (while (dired-move-to-filename)
;; Use point difference instead of `current-column', because ;; Use point difference instead of `current-column', because
;; the former works when `dired-hide-details-mode' is enabled. ;; the former works when `dired-hide-details-mode' is enabled.
(let ((distance (- target (- (point) (point-at-bol)))) (let ((distance (- target (- (point) (line-beginning-position))))
(inhibit-read-only t)) (inhibit-read-only t))
(unless (zerop distance) (unless (zerop distance)
(re-search-backward regexp nil t) (re-search-backward regexp nil t)

View file

@ -199,7 +199,7 @@ matches."
(goto-char (point-min)) (goto-char (point-min))
(forward-line line) (forward-line line)
(save-restriction (save-restriction
(narrow-to-region (point) (point-at-eol)) (narrow-to-region (point) (line-end-position))
(while (not (eobp)) (while (not (eobp))
;; Put the 'region face on any characters on this line that ;; Put the 'region face on any characters on this line that
;; aren't already highlighted. ;; aren't already highlighted.

View file

@ -591,7 +591,7 @@ content of the sexp."
(begin (previous-single-property-change end 'backtrace-form (begin (previous-single-property-change end 'backtrace-form
nil (point-min)))) nil (point-min))))
(unless tag (unless tag
(when (or (= end (point-max)) (> end (point-at-eol))) (when (or (= end (point-max)) (> end (line-end-position)))
(user-error "No form here to reformat")) (user-error "No form here to reformat"))
(goto-char end) (goto-char end)
(setq pos end (setq pos end

View file

@ -1235,7 +1235,8 @@ Order is by depth-first search."
(let (new-l new-c) (let (new-l new-c)
(save-excursion (save-excursion
(goto-char offset) (goto-char offset)
(setq new-l (1+ (count-lines (point-min) (point-at-bol))) (setq new-l (1+ (count-lines (point-min)
(line-beginning-position)))
new-c (1+ (current-column))) new-c (1+ (current-column)))
(format "%d:%d:" new-l new-c)))) (format "%d:%d:" new-l new-c))))
"")) ""))

View file

@ -526,9 +526,9 @@ cons cells of the form (NAME . NUM). See `sort' for more details."
(defun chart-zap-chars (n) (defun chart-zap-chars (n)
"Zap up to N chars without deleting EOLs." "Zap up to N chars without deleting EOLs."
(if (not (eobp)) (if (not (eobp))
(if (< n (- (point-at-eol) (point))) (if (< n (- (line-end-position) (point)))
(delete-char n) (delete-char n)
(delete-region (point) (point-at-eol))))) (delete-region (point) (line-end-position)))))
(defun chart-display-label (label dir zone start end &optional face) (defun chart-display-label (label dir zone start end &optional face)
"Display LABEL in direction DIR in column/row ZONE between START and END. "Display LABEL in direction DIR in column/row ZONE between START and END.

View file

@ -647,7 +647,7 @@ Argument NUM is the number of lines to move."
(bottom (save-excursion (move-to-window-line bottom-margin) (point))) (bottom (save-excursion (move-to-window-line bottom-margin) (point)))
(far (save-excursion (far (save-excursion
(goto-char bottom) (goto-char bottom)
(point-at-bol (1- height))))) (line-beginning-position (1- height)))))
(ignore top far) (ignore top far)
,@body)) ,@body))

View file

@ -3266,8 +3266,8 @@ controlled by the sign of prefix numeric value."
(if (and (eolp) (not (bolp))) (forward-char -1)) (if (and (eolp) (not (bolp))) (forward-char -1))
(if (not (looking-at "[][(){}]")) (if (not (looking-at "[][(){}]"))
(setq anchor-point (point))) (setq anchor-point (point)))
(setq beg-lim (point-at-bol) (setq beg-lim (line-beginning-position)
end-lim (point-at-eol)) end-lim (line-end-position))
(cond ((re-search-forward "[][(){}]" end-lim t) (cond ((re-search-forward "[][(){}]" end-lim t)
(backward-char) ) (backward-char) )
((re-search-backward "[][(){}]" beg-lim t)) ((re-search-backward "[][(){}]" beg-lim t))
@ -4390,7 +4390,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back."
(delete-char -1) (delete-char -1)
(setq p (point)) (setq p (point))
(setq indent nil))) (setq indent nil)))
(setq bol (point-at-bol)) (setq bol (line-beginning-position))
(if (re-search-backward "[^ \t]" bol 1) (forward-char)) (if (re-search-backward "[^ \t]" bol 1) (forward-char))
(delete-region (point) p) (delete-region (point) p)
(if indent (if indent
@ -4474,7 +4474,7 @@ One can use \\=`\\=` and \\='\\=' to temporarily jump 1 step back."
(goto-char pos) (goto-char pos)
(beginning-of-line) (beginning-of-line)
(if (re-search-backward "[^ \t]" nil t) (if (re-search-backward "[^ \t]" nil t)
(setq s (point-at-bol))) (setq s (line-beginning-position)))
(goto-char pos) (goto-char pos)
(forward-line 1) (forward-line 1)
(if (re-search-forward "[^ \t]" nil t) (if (re-search-forward "[^ \t]" nil t)

View file

@ -417,7 +417,7 @@ q trust status questionable. - trust status unspecified.
'epa-key)) 'epa-key))
(setq keys (cons key keys)))) (setq keys (cons key keys))))
(nreverse keys))) (nreverse keys)))
(let ((key (get-text-property (point-at-bol) 'epa-key))) (let ((key (get-text-property (line-beginning-position) 'epa-key)))
(if key (if key
(list key))))) (list key)))))

View file

@ -246,9 +246,9 @@ version requirement is met."
(goto-char (match-end 0)) (goto-char (match-end 0))
(backward-char) (backward-char)
(forward-sexp) (forward-sexp)
(skip-syntax-forward "-" (point-at-eol)) (skip-syntax-forward "-" (line-end-position))
(list (cons 'program program) (list (cons 'program program)
(cons 'version (buffer-substring (point) (point-at-eol))))))) (cons 'version (buffer-substring (point) (line-end-position)))))))
;;;###autoload ;;;###autoload
(defun epg-configuration () (defun epg-configuration ()

View file

@ -343,7 +343,7 @@ The INDENT level is ignored."
"Return the text for the item on the current line." "Return the text for the item on the current line."
(beginning-of-line) (beginning-of-line)
(when (re-search-forward "[]>] " nil t) (when (re-search-forward "[]>] " nil t)
(buffer-substring-no-properties (point) (point-at-eol)))) (buffer-substring-no-properties (point) (line-end-position))))
(defun erc-speedbar-item-info () (defun erc-speedbar-item-info ()
"Display information about the current buffer on the current line." "Display information about the current buffer on the current line."

View file

@ -303,7 +303,7 @@ printed just after each line's text (no alignment)."
;; to the next line before inserting a stamp. It allows for ;; to the next line before inserting a stamp. It allows for
;; some margin of error if what is displayed on the line differs ;; some margin of error if what is displayed on the line differs
;; from the number of characters on the line. ;; from the number of characters on the line.
(setq col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6)))) (setq col (+ col (ceiling (/ (- col (- (point) (line-beginning-position))) 1.6))))
(if (< col pos) (if (< col pos)
(erc-insert-aligned string pos) (erc-insert-aligned string pos)
(newline) (newline)

View file

@ -948,7 +948,7 @@ out of NAME."
(save-excursion (save-excursion
(re-search-backward (regexp-opt (re-search-backward (regexp-opt
(mapcar 'car preferred-suffix-rules)) (mapcar 'car preferred-suffix-rules))
(point-at-bol) (line-beginning-position)
t)) t))
(push (cons "" (cdr (assoc (match-string 0) ; i.e. "(TeX-current-macro)" (push (cons "" (cdr (assoc (match-string 0) ; i.e. "(TeX-current-macro)"
preferred-suffix-rules))) preferred-suffix-rules)))
@ -962,7 +962,7 @@ out of NAME."
(concat (car rule) name (cdr rule))) (concat (car rule) name (cdr rule)))
guess-rules))) guess-rules)))
(when (< (point-min) (point-max)) (when (< (point-min) (point-max))
(buffer-substring (goto-char (point-min)) (point-at-eol)))))))) (buffer-substring (goto-char (point-min)) (line-end-position))))))))
(defun ffap-tex (name) (defun ffap-tex (name)
(ffap-tex-init) (ffap-tex-init)

View file

@ -1572,7 +1572,7 @@ START should be at the beginning of a line."
font-lock-comment-delimiter-face))) font-lock-comment-delimiter-face)))
(if (looking-back (or font-lock-comment-end-skip (if (looking-back (or font-lock-comment-end-skip
comment-end-skip) comment-end-skip)
(point-at-bol) t) (line-beginning-position) t)
(put-text-property (match-beginning 0) (point) 'face (put-text-property (match-beginning 0) (point) 'face
font-lock-comment-delimiter-face)))) font-lock-comment-delimiter-face))))
(< (point) end)) (< (point) end))

View file

@ -1681,7 +1681,7 @@ and that there are no duplicates."
(gnus-message 1 (gnus-message 1
"Overview buffer contains garbage `%s'." "Overview buffer contains garbage `%s'."
(buffer-substring (buffer-substring
p (point-at-eol)))) p (line-end-position))))
((= cur prev-num) ((= cur prev-num)
(or backed-up (or backed-up
(setq backed-up (gnus-agent-backup-overview-buffer))) (setq backed-up (gnus-agent-backup-overview-buffer)))
@ -2687,7 +2687,7 @@ The following commands are available:
(gnus-category-position-point))) (gnus-category-position-point)))
(defun gnus-category-name () (defun gnus-category-name ()
(or (intern (get-text-property (point-at-bol) 'gnus-category)) (or (intern (get-text-property (line-beginning-position) 'gnus-category))
(error "No category on the current line"))) (error "No category on the current line")))
(defun gnus-category-read () (defun gnus-category-read ()
@ -3363,7 +3363,7 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it.")))
(cl-incf nov-entries-deleted) (cl-incf nov-entries-deleted)
(let* ((from (point-at-bol)) (let* ((from (line-beginning-position))
(to (progn (forward-line 1) (point))) (to (progn (forward-line 1) (point)))
(freed (- to from))) (freed (- to from)))
(cl-incf bytes-freed freed) (cl-incf bytes-freed freed)

View file

@ -1930,7 +1930,7 @@ always hide."
(while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t)
(forward-line -1) (forward-line -1)
(gnus-article-hide-text-type (gnus-article-hide-text-type
(point-at-bol) (line-beginning-position)
(progn (progn
(end-of-line) (end-of-line)
(if (re-search-forward "^[^ \t]" nil t) (if (re-search-forward "^[^ \t]" nil t)
@ -2060,7 +2060,7 @@ always hide."
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward (concat "^" header ":") nil t) (when (re-search-forward (concat "^" header ":") nil t)
(gnus-article-hide-text-type (gnus-article-hide-text-type
(point-at-bol) (line-beginning-position)
(progn (progn
(end-of-line) (end-of-line)
(if (re-search-forward "^[^ \t]" nil t) (if (re-search-forward "^[^ \t]" nil t)
@ -2081,7 +2081,7 @@ always hide."
(article-narrow-to-head) (article-narrow-to-head)
(while (not (eobp)) (while (not (eobp))
(cond (cond
((< (setq column (- (point-at-eol) (point))) ((< (setq column (- (line-end-position) (point)))
gnus-article-normalized-header-length) gnus-article-normalized-header-length)
(end-of-line) (end-of-line)
(insert (make-string (insert (make-string
@ -2092,7 +2092,7 @@ always hide."
(progn (progn
(forward-char gnus-article-normalized-header-length) (forward-char gnus-article-normalized-header-length)
(point)) (point))
(point-at-eol) (line-end-position)
'invisible t)) 'invisible t))
(t (t
;; Do nothing. ;; Do nothing.
@ -2389,7 +2389,7 @@ fill width."
(end-of-line) (end-of-line)
(when (>= (current-column) width) (when (>= (current-column) width)
(narrow-to-region (min (1+ (point)) (point-max)) (narrow-to-region (min (1+ (point)) (point-max))
(point-at-bol)) (line-beginning-position))
(let ((goback (point-marker)) (let ((goback (point-marker))
(fill-column width)) (fill-column width))
(fill-paragraph nil) (fill-paragraph nil)
@ -2446,7 +2446,7 @@ fill width."
(while (and (not (bobp)) (while (and (not (bobp))
(looking-at "^[ \t]*$") (looking-at "^[ \t]*$")
(not (gnus-annotation-in-region-p (not (gnus-annotation-in-region-p
(point) (point-at-eol)))) (point) (line-end-position))))
(forward-line -1)) (forward-line -1))
(forward-line 1) (forward-line 1)
(point)))))) (point))))))
@ -3583,9 +3583,10 @@ possible values."
'original-date) 'original-date)
bface (get-text-property (match-beginning 0) 'face) bface (get-text-property (match-beginning 0) 'face)
eface (get-text-property (match-end 0) 'face)) eface (get-text-property (match-end 0) 'face))
(delete-region (point-at-bol) (progn (delete-region (line-beginning-position)
(gnus-article-forward-header) (progn
(point))))) (gnus-article-forward-header)
(point)))))
(when (and (not date) (when (and (not date)
visible-date) visible-date)
(setq date visible-date)) (setq date visible-date))
@ -4388,8 +4389,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is
(message-narrow-to-head) (message-narrow-to-head)
(goto-char (point-max)) (goto-char (point-max))
(forward-line -1) (forward-line -1)
(setq bface (get-text-property (point-at-bol) 'face) (setq bface (get-text-property (line-beginning-position) 'face)
eface (get-text-property (1- (point-at-eol)) 'face)) eface (get-text-property (1- (line-end-position)) 'face))
(message-remove-header "X-Gnus-PGP-Verify") (message-remove-header "X-Gnus-PGP-Verify")
(if (re-search-forward "^X-PGP-Sig:" nil t) (if (re-search-forward "^X-PGP-Sig:" nil t)
(forward-line) (forward-line)
@ -5925,7 +5926,7 @@ all parts."
;; Go to the displayed subpart, assuming this is ;; Go to the displayed subpart, assuming this is
;; multipart/alternative. ;; multipart/alternative.
(setq part start (setq part start
end (point-at-eol)) end (line-end-position))
(while (and (not handle) (while (and (not handle)
part part
(< part end) (< part end)
@ -6825,9 +6826,9 @@ not have a face in `gnus-article-boring-faces'."
"Read article specified by message-id around point." "Read article specified by message-id around point."
(interactive nil gnus-article-mode) (interactive nil gnus-article-mode)
(save-excursion (save-excursion
(re-search-backward "[ \t]\\|^" (point-at-bol) t) (re-search-backward "[ \t]\\|^" (line-beginning-position) t)
(re-search-forward "<?news:<?\\|<" (point-at-eol) t) (re-search-forward "<?news:<?\\|<" (line-end-position) t)
(if (re-search-forward "[^@ ]+@[^ \t>]+" (point-at-eol) t) (if (re-search-forward "[^@ ]+@[^ \t>]+" (line-end-position) t)
(let ((msg-id (concat "<" (match-string 0) ">"))) (let ((msg-id (concat "<" (match-string 0) ">")))
(set-buffer gnus-summary-buffer) (set-buffer gnus-summary-buffer)
(gnus-summary-refer-article msg-id)) (gnus-summary-refer-article msg-id))
@ -8180,7 +8181,7 @@ url is put as the `gnus-button-url' overlay property on the button."
(goto-char start) (goto-char start)
(string-match (string-match
"\\(?:\"\\|\\(<\\)\\)[\t ]*\\(?:url[\t ]*:[\t ]*\\)?\\'" "\\(?:\"\\|\\(<\\)\\)[\t ]*\\(?:url[\t ]*:[\t ]*\\)?\\'"
(buffer-substring (point-at-bol) start))) (buffer-substring (line-beginning-position) start)))
(progn (progn
(setq url (list (buffer-substring start end)) (setq url (list (buffer-substring start end))
delim (if (match-beginning 1) ">" "\"")) delim (if (match-beginning 1) ">" "\""))

View file

@ -509,7 +509,7 @@ Optional argument SHOW means show them unconditionally."
(let ((bmrk (gnus-bookmark-bmenu-bookmark))) (let ((bmrk (gnus-bookmark-bmenu-bookmark)))
(setq gnus-bookmark-bmenu-hidden-bookmarks (setq gnus-bookmark-bmenu-hidden-bookmarks
(cons bmrk gnus-bookmark-bmenu-hidden-bookmarks)) (cons bmrk gnus-bookmark-bmenu-hidden-bookmarks))
(let ((start (point-at-eol))) (let ((start (line-end-position)))
(move-to-column gnus-bookmark-bmenu-file-column t) (move-to-column gnus-bookmark-bmenu-file-column t)
;; Strip off `mouse-face' from the white spaces region. ;; Strip off `mouse-face' from the white spaces region.
(if (display-mouse-p) (if (display-mouse-p)
@ -543,7 +543,7 @@ Optional argument SHOW means show them unconditionally."
"Kill from point to end of line. "Kill from point to end of line.
If optional arg NEWLINE-TOO is non-nil, delete the newline too. If optional arg NEWLINE-TOO is non-nil, delete the newline too.
Does not affect the kill ring." Does not affect the kill ring."
(delete-region (point) (point-at-eol)) (delete-region (point) (line-end-position))
(if (and newline-too (looking-at "\n")) (if (and newline-too (looking-at "\n"))
(delete-char 1))) (delete-char 1)))

View file

@ -552,7 +552,7 @@ Returns the list of articles removed."
(set-buffer cache-buf) (set-buffer cache-buf)
(if (search-forward (concat "\n" (int-to-string (car cached)) "\t") (if (search-forward (concat "\n" (int-to-string (car cached)) "\t")
nil t) nil t)
(setq beg (point-at-bol) (setq beg (line-beginning-position)
end (progn (end-of-line) (point))) end (progn (end-of-line) (point)))
(setq beg nil)) (setq beg nil))
(set-buffer nntp-server-buffer) (set-buffer nntp-server-buffer)

View file

@ -371,7 +371,7 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps
(goto-char (point-min)) (goto-char (point-min))
(forward-line (1- number)) (forward-line (1- number))
(when (re-search-forward gnus-cite-attribution-suffix (when (re-search-forward gnus-cite-attribution-suffix
(point-at-eol) (line-end-position)
t) t)
(gnus-article-add-button (match-beginning 1) (match-end 1) (gnus-article-add-button (match-beginning 1) (match-end 1)
'gnus-cite-toggle prefix)) 'gnus-cite-toggle prefix))
@ -756,7 +756,7 @@ See also the documentation for `gnus-article-highlight-citation'."
;; Each line. ;; Each line.
(setq begin (point) (setq begin (point)
guess-limit (progn (skip-chars-forward "^> \t\r\n") (point)) guess-limit (progn (skip-chars-forward "^> \t\r\n") (point))
end (point-at-bol 2) end (line-beginning-position 2)
start end) start end)
(goto-char begin) (goto-char begin)
;; Ignore standard Supercite attribution prefix. ;; Ignore standard Supercite attribution prefix.
@ -1105,8 +1105,8 @@ Returns nil if there is no such line before LIMIT, t otherwise."
"[\t [:alnum:]]+"))) "[\t [:alnum:]]+")))
gnus-message-max-citation-depth)) gnus-message-max-citation-depth))
(mlist (make-list (* (1+ gnus-message-max-citation-depth) 2) nil)) (mlist (make-list (* (1+ gnus-message-max-citation-depth) 2) nil))
(start (point-at-bol)) (start (line-beginning-position))
(end (point-at-eol))) (end (line-end-position)))
(setcar mlist start) (setcar mlist start)
(setcar (cdr mlist) end) (setcar (cdr mlist) end)
(setcar (nthcdr (* cdepth 2) mlist) start) (setcar (nthcdr (* cdepth 2) mlist) start)

View file

@ -327,7 +327,7 @@ If ARG (or prefix) is non-nil, force prompting for all fields."
(when (re-search-forward (concat "^" header ":") nil t) (when (re-search-forward (concat "^" header ":") nil t)
(unless (eq (char-after) ? ) (unless (eq (char-after) ? )
(insert " ")) (insert " "))
(setq value (buffer-substring (point) (point-at-eol))) (setq value (buffer-substring (point) (line-end-position)))
(and (string-match "[ \t]*\\([^ \t]+\\)[ \t]*" value) (and (string-match "[ \t]*\\([^ \t]+\\)[ \t]*" value)
(setq value (match-string 1 value))) (setq value (match-string 1 value)))
(condition-case () (condition-case ()

View file

@ -150,7 +150,7 @@ Obeys the standard process/prefix convention."
(concat "^" (regexp-quote gnus-agent-target-move-group-header) (concat "^" (regexp-quote gnus-agent-target-move-group-header)
":") nil t) ":") nil t)
(skip-syntax-forward "-") (skip-syntax-forward "-")
(setq move-to (buffer-substring (point) (point-at-eol))) (setq move-to (buffer-substring (point) (line-end-position)))
(message-remove-header gnus-agent-target-move-group-header)) (message-remove-header gnus-agent-target-move-group-header))
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward (when (re-search-forward

View file

@ -1204,7 +1204,7 @@ case interactively), the level will be updated by this command."
(gnus-group-setup-buffer) (gnus-group-setup-buffer)
(gnus-update-format-specifications nil 'group 'group-mode) (gnus-update-format-specifications nil 'group 'group-mode)
(let ((case-fold-search nil) (let ((case-fold-search nil)
(props (text-properties-at (point-at-bol))) (props (text-properties-at (line-beginning-position)))
(empty (= (point-min) (point-max))) (empty (= (point-min) (point-max)))
(group (gnus-group-group-name)) (group (gnus-group-group-name))
number) number)
@ -1724,24 +1724,24 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated."
(defun gnus-group-group-name () (defun gnus-group-group-name ()
"Get the name of the newsgroup on the current line." "Get the name of the newsgroup on the current line."
(let ((group (get-text-property (point-at-bol) 'gnus-group))) (let ((group (get-text-property (line-beginning-position) 'gnus-group)))
(cond ((stringp group) group) (cond ((stringp group) group)
(group (symbol-name group))))) (group (symbol-name group)))))
(defun gnus-group-group-level () (defun gnus-group-group-level ()
"Get the level of the newsgroup on the current line." "Get the level of the newsgroup on the current line."
(get-text-property (point-at-bol) 'gnus-level)) (get-text-property (line-beginning-position) 'gnus-level))
(defun gnus-group-group-indentation () (defun gnus-group-group-indentation ()
"Get the indentation of the newsgroup on the current line." "Get the indentation of the newsgroup on the current line."
(or (get-text-property (point-at-bol) 'gnus-indentation) (or (get-text-property (line-beginning-position) 'gnus-indentation)
(and gnus-group-indentation-function (and gnus-group-indentation-function
(funcall gnus-group-indentation-function)) (funcall gnus-group-indentation-function))
"")) ""))
(defun gnus-group-group-unread () (defun gnus-group-group-unread ()
"Get the number of unread articles of the newsgroup on the current line." "Get the number of unread articles of the newsgroup on the current line."
(get-text-property (point-at-bol) 'gnus-unread)) (get-text-property (line-beginning-position) 'gnus-unread))
(defun gnus-group-new-mail (group) (defun gnus-group-new-mail (group)
(if (nnmail-new-mail-p group) (if (nnmail-new-mail-p group)
@ -2095,14 +2095,14 @@ be permanent."
(looking-at "[][\C-@-*,/;-@\\^`{-\C-?]"))) (looking-at "[][\C-@-*,/;-@\\^`{-\C-?]")))
(prog1 t (prog1 t
(skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?"
(point-at-bol)))) (line-beginning-position))))
(and (looking-at "[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*$") (and (looking-at "[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*$")
(prog1 t (prog1 t
(skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?")
(skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?"
(point-at-bol)))) (line-beginning-position))))
(string-match "\\`[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*\\'" (string-match "\\`[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*\\'"
(buffer-substring (point-at-bol) (point)))) (buffer-substring (line-beginning-position) (point))))
(when (looking-at regexp) (when (looking-at regexp)
(match-string 1)) (match-string 1))
(let (group distance) (let (group distance)
@ -2111,7 +2111,7 @@ be permanent."
distance (- (match-beginning 1) (match-beginning 0)))) distance (- (match-beginning 1) (match-beginning 0))))
(skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?")
(skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?"
(point-at-bol)) (line-beginning-position))
(if (looking-at regexp) (if (looking-at regexp)
(if (and group (<= distance (- start (match-end 0)))) (if (and group (<= distance (- start (match-end 0))))
group group
@ -3948,10 +3948,10 @@ The killed newsgroups can be yanked by using \\[gnus-group-yank-group]."
(count-lines (count-lines
(progn (progn
(goto-char begin) (goto-char begin)
(point-at-bol)) (line-beginning-position))
(progn (progn
(goto-char end) (goto-char end)
(point-at-bol)))))) (line-beginning-position))))))
(goto-char begin) (goto-char begin)
(beginning-of-line) ;Important when LINES < 1 (beginning-of-line) ;Important when LINES < 1
(gnus-group-kill-group lines))) (gnus-group-kill-group lines)))

View file

@ -220,13 +220,13 @@ replacement is added."
(error 0))) (error 0)))
spec))) spec)))
(when (> len 0) (when (> len 0)
(goto-char (point-at-eol)) (goto-char (line-end-position))
(insert (propertize (insert (propertize
" " 'display " " 'display
(cons 'space (cons 'space
(list :align-to (- (window-width) 1 len)))))) (list :align-to (- (window-width) 1 len))))))
(goto-char (point-at-eol)) (goto-char (line-end-position))
(setq point (point-at-eol)) (setq point (line-end-position))
(dolist (image spec) (dolist (image spec)
(unless (stringp image) (unless (stringp image)
(goto-char point) (goto-char point)

View file

@ -686,7 +686,7 @@ it in the environment specified by BINDINGS."
(unless (zerop level) (unless (zerop level)
(gnus-tree-indent level) (gnus-tree-indent level)
(insert (cadr gnus-tree-parent-child-edges)) (insert (cadr gnus-tree-parent-child-edges))
(setq col (- (setq beg (point)) (point-at-bol) 1)) (setq col (- (setq beg (point)) (line-beginning-position) 1))
;; Draw "|" lines upwards. ;; Draw "|" lines upwards.
(while (progn (while (progn
(forward-line -1) (forward-line -1)
@ -710,7 +710,7 @@ it in the environment specified by BINDINGS."
(defsubst gnus-tree-indent-vertical () (defsubst gnus-tree-indent-vertical ()
(let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent) (let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent)
(- (point) (point-at-bol))))) (- (point) (line-beginning-position)))))
(when (> len 0) (when (> len 0)
(insert (make-string len ? ))))) (insert (make-string len ? )))))

View file

@ -1168,9 +1168,9 @@ If FORMAT, also format the current score file."
(reg " -> +") (reg " -> +")
(file (save-excursion (file (save-excursion
(end-of-line) (end-of-line)
(if (and (re-search-backward reg (point-at-bol) t) (if (and (re-search-backward reg (line-beginning-position) t)
(re-search-forward reg (point-at-eol) t)) (re-search-forward reg (line-end-position) t))
(buffer-substring (point) (point-at-eol)) (buffer-substring (point) (line-end-position))
nil)))) nil))))
(if (or (not file) (if (or (not file)
(string-match "\\<\\(non-file rule\\|A file\\)\\>" file) (string-match "\\<\\(non-file rule\\|A file\\)\\>" file)
@ -1999,7 +1999,7 @@ score in `gnus-newsgroup-scored' by SCORE."
(goto-char (point-min)) (goto-char (point-min))
(if (= dmt ?e) (if (= dmt ?e)
(while (funcall search-func match nil t) (while (funcall search-func match nil t)
(and (= (point-at-bol) (and (= (line-beginning-position)
(match-beginning 0)) (match-beginning 0))
(= (progn (end-of-line) (point)) (= (progn (end-of-line) (point))
(match-end 0)) (match-end 0))
@ -2170,7 +2170,7 @@ score in `gnus-newsgroup-scored' by SCORE."
(funcall search-func match nil t)) (funcall search-func match nil t))
;; Is it really exact? ;; Is it really exact?
(and (eolp) (and (eolp)
(= (point-at-bol) (match-beginning 0)) (= (line-beginning-position) (match-beginning 0))
;; Yup. ;; Yup.
(progn (progn
(setq found (setq arts (get-text-property (setq found (setq arts (get-text-property
@ -2260,7 +2260,7 @@ score in `gnus-newsgroup-scored' by SCORE."
(goto-char (point-min)) (goto-char (point-min))
(while (and (not (eobp)) (while (and (not (eobp))
(search-forward match nil t)) (search-forward match nil t))
(when (and (= (point-at-bol) (match-beginning 0)) (when (and (= (line-beginning-position) (match-beginning 0))
(eolp)) (eolp))
(setq found (setq arts (get-text-property (point) 'articles))) (setq found (setq arts (get-text-property (point) 'articles)))
(if trace (if trace
@ -2344,7 +2344,7 @@ score in `gnus-newsgroup-scored' by SCORE."
hashtb)) hashtb))
(puthash (puthash
word word
(append (get-text-property (point-at-eol) 'articles) val) (append (get-text-property (line-end-position) 'articles) val)
hashtb))) hashtb)))
;; Make all the ignorable words ignored. ;; Make all the ignorable words ignored.
(let ((ignored (append gnus-ignored-adaptive-words (let ((ignored (append gnus-ignored-adaptive-words

View file

@ -565,7 +565,7 @@ returning the one at the supplied position."
(buffer-substring (buffer-substring
(point) (point)
(progn (progn
(re-search-forward ":" (point-at-eol) t) (re-search-forward ":" (line-end-position) t)
(1- (point)))))) (1- (point))))))
(value (gnus-search-query-return-string (value (gnus-search-query-return-string
(when (looking-at-p "[\"/]") t)))) (when (looking-at-p "[\"/]") t))))

View file

@ -339,13 +339,13 @@ The following commands are available:
(gnus-server-position-point)) (gnus-server-position-point))
(defun gnus-server-server-name () (defun gnus-server-server-name ()
(let ((server (get-text-property (point-at-bol) 'gnus-server))) (let ((server (get-text-property (line-beginning-position) 'gnus-server)))
(and server (symbol-name server)))) (and server (symbol-name server))))
(defun gnus-server-named-server () (defun gnus-server-named-server ()
"Return a server name that matches one of the names returned by "Return a server name that matches one of the names returned by
`gnus-method-to-server'." `gnus-method-to-server'."
(let ((server (get-text-property (point-at-bol) 'gnus-named-server))) (let ((server (get-text-property (line-beginning-position) 'gnus-named-server)))
(and server (symbol-name server)))) (and server (symbol-name server))))
(defalias 'gnus-server-position-point 'gnus-goto-colon) (defalias 'gnus-server-position-point 'gnus-goto-colon)
@ -949,7 +949,7 @@ how new groups will be entered into the group buffer."
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
(let ((name (get-text-property (point) 'gnus-group))) (let ((name (get-text-property (point) 'gnus-group)))
(when (re-search-forward ": \\(.*\\)$" (point-at-eol) t) (when (re-search-forward ": \\(.*\\)$" (line-end-position) t)
(concat (gnus-method-to-server-name gnus-browse-current-method) ":" (concat (gnus-method-to-server-name gnus-browse-current-method) ":"
(or name (or name
(match-string-no-properties 1))))))) (match-string-no-properties 1)))))))

View file

@ -855,7 +855,7 @@ If REGEXP is given, lines that match it will be deleted."
(unless (bolp) (forward-line 1)) (unless (bolp) (forward-line 1))
(setq end (point)) (setq end (point))
(goto-char (match-beginning 0)) (goto-char (match-beginning 0))
(delete-region (point-at-bol) end)))) (delete-region (line-beginning-position) end))))
(goto-char (point-max)) (goto-char (point-max))
;; Make sure that each dribble entry is a single line, so that ;; Make sure that each dribble entry is a single line, so that
;; the "remove" code above works. ;; the "remove" code above works.
@ -2173,7 +2173,7 @@ The info element is shared with the same element of
(unless ignore-errors (unless ignore-errors
(gnus-message 3 "Warning - invalid active: %s" (gnus-message 3 "Warning - invalid active: %s"
(buffer-substring (buffer-substring
(point-at-bol) (point-at-eol)))))) (line-beginning-position) (line-end-position))))))
(forward-line 1))))) (forward-line 1)))))
(defun gnus-groups-to-gnus-format (method &optional hashtb real-active) (defun gnus-groups-to-gnus-format (method &optional hashtb real-active)
@ -2527,10 +2527,10 @@ The form should return either t or nil."
;; don't give a damn, frankly, my dear. ;; don't give a damn, frankly, my dear.
(concat gnus-newsrc-options (concat gnus-newsrc-options
(buffer-substring (buffer-substring
(point-at-bol) (line-beginning-position)
;; Options may continue on the next line. ;; Options may continue on the next line.
(or (and (re-search-forward "^[^ \t]" nil 'move) (or (and (re-search-forward "^[^ \t]" nil 'move)
(point-at-bol)) (line-beginning-position))
(point))))) (point)))))
(forward-line -1)) (forward-line -1))
(group (group
@ -2592,8 +2592,8 @@ The form should return either t or nil."
;; The line was buggy. ;; The line was buggy.
(setq group nil) (setq group nil)
(gnus-error 3.1 "Mangled line: %s" (gnus-error 3.1 "Mangled line: %s"
(buffer-substring (point-at-bol) (buffer-substring (line-beginning-position)
(point-at-eol)))) (line-end-position))))
nil)) nil))
;; Skip past ", ". Spaces are invalid in these ranges, but ;; Skip past ", ". Spaces are invalid in these ranges, but
;; we allow them, because it's a common mistake to put a ;; we allow them, because it's a common mistake to put a
@ -2702,9 +2702,9 @@ The form should return either t or nil."
(while (re-search-forward "[ \t]-n" nil t) (while (re-search-forward "[ \t]-n" nil t)
(setq eol (setq eol
(or (save-excursion (or (save-excursion
(and (re-search-forward "[ \t]-n" (point-at-eol) t) (and (re-search-forward "[ \t]-n" (line-end-position) t)
(- (point) 2))) (- (point) 2)))
(point-at-eol))) (line-end-position)))
;; Search for all "words"... ;; Search for all "words"...
(while (re-search-forward "[^ \t,\n]+" eol t) (while (re-search-forward "[^ \t,\n]+" eol t)
(if (eq (char-after (match-beginning 0)) ?!) (if (eq (char-after (match-beginning 0)) ?!)

View file

@ -3383,7 +3383,7 @@ marks of articles."
(let (config) (let (config)
(goto-char (point-min)) (goto-char (point-min))
(while (not (eobp)) (while (not (eobp))
(when (eq (get-char-property (point-at-eol) 'invisible) 'gnus-sum) (when (eq (get-char-property (line-end-position) 'invisible) 'gnus-sum)
(push (save-excursion (forward-line 0) (point)) config)) (push (save-excursion (forward-line 0) (point)) config))
(forward-line 1)) (forward-line 1))
config))) config)))
@ -4505,7 +4505,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise."
(let (header) (let (header)
;; overview: [num subject from date id refs chars lines misc] ;; overview: [num subject from date id refs chars lines misc]
(unwind-protect (unwind-protect
(narrow-to-region (point) (point-at-eol)) (narrow-to-region (point) (line-end-position))
(unless (eobp) (unless (eobp)
(forward-char)) (forward-char))
(setq header (nnheader-parse-nov number)) (setq header (nnheader-parse-nov number))
@ -4661,7 +4661,7 @@ If LINE, insert the rebuilt thread starting on line LINE."
(setq thread (list (car (gnus-id-to-thread id)))) (setq thread (list (car (gnus-id-to-thread id))))
;; Get the thread this article is part of. ;; Get the thread this article is part of.
(setq thread (gnus-remove-thread id))) (setq thread (gnus-remove-thread id)))
(setq old-pos (point-at-bol)) (setq old-pos (line-beginning-position))
(setq current (save-excursion (setq current (save-excursion
(and (re-search-backward "[\r\n]" nil t) (and (re-search-backward "[\r\n]" nil t)
(gnus-summary-article-number)))) (gnus-summary-article-number))))
@ -4845,9 +4845,9 @@ If LINE, insert the rebuilt thread starting on line LINE."
(gnus-summary-show-thread) (gnus-summary-show-thread)
(gnus-data-remove (gnus-data-remove
number number
(- (point-at-bol) (- (line-beginning-position)
(prog1 (prog1
(1+ (point-at-eol)) (1+ (line-end-position))
(gnus-delete-line))))))) (gnus-delete-line)))))))
(defun gnus-sort-threads-recursive (threads func) (defun gnus-sort-threads-recursive (threads func)
@ -6468,7 +6468,7 @@ This is meant to be called in `gnus-article-internal-prepare-hook'."
(looking-at "Xref:")) (looking-at "Xref:"))
(search-forward "\nXref:" nil t)) (search-forward "\nXref:" nil t))
(goto-char (1+ (match-end 0))) (goto-char (1+ (match-end 0)))
(setq xref (buffer-substring (point) (point-at-eol))) (setq xref (buffer-substring (point) (line-end-position)))
(setf (mail-header-xref headers) xref))))))) (setf (mail-header-xref headers) xref)))))))
(defun gnus-summary-insert-subject (id &optional old-header use-old-header) (defun gnus-summary-insert-subject (id &optional old-header use-old-header)
@ -6499,9 +6499,9 @@ too, instead of trying to fetch new headers."
(goto-char (gnus-data-pos d)) (goto-char (gnus-data-pos d))
(gnus-data-remove (gnus-data-remove
number number
(- (point-at-bol) (- (line-beginning-position)
(prog1 (prog1
(1+ (point-at-eol)) (1+ (line-end-position))
(gnus-delete-line)))))) (gnus-delete-line))))))
;; Remove list identifiers from subject. ;; Remove list identifiers from subject.
(let ((gnus-newsgroup-headers (list header))) (let ((gnus-newsgroup-headers (list header)))
@ -11219,7 +11219,7 @@ If NO-EXPIRE, auto-expiry will be inhibited."
(defun gnus-summary-update-mark (mark type) (defun gnus-summary-update-mark (mark type)
(let ((forward (cdr (assq type gnus-summary-mark-positions))) (let ((forward (cdr (assq type gnus-summary-mark-positions)))
(inhibit-read-only t)) (inhibit-read-only t))
(re-search-backward "[\n\r]" (point-at-bol) 'move-to-limit) (re-search-backward "[\n\r]" (line-beginning-position) 'move-to-limit)
(when forward (when forward
(when (looking-at "\r") (when (looking-at "\r")
(cl-incf forward)) (cl-incf forward))
@ -11756,7 +11756,7 @@ If ARG is positive number, turn showing conversation threads on."
Returns nil if no thread was there to be shown." Returns nil if no thread was there to be shown."
(interactive nil gnus-summary-mode) (interactive nil gnus-summary-mode)
(let* ((orig (point)) (let* ((orig (point))
(end (point-at-eol)) (end (line-end-position))
(end (or (gnus-summary--inv end) (gnus-summary--inv (1- end)))) (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end))))
;; Leave point at bol ;; Leave point at bol
(beg (progn (beginning-of-line) (if (bobp) (point) (1- (point))))) (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point)))))
@ -12675,8 +12675,8 @@ If REVERSE, save parts that do not match TYPE."
;; Added by Per Abrahamsen <amanda@iesd.auc.dk>. ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
(when gnus-summary-selected-face (when gnus-summary-selected-face
(save-excursion (save-excursion
(let* ((beg (point-at-bol)) (let* ((beg (line-beginning-position))
(end (point-at-eol)) (end (line-end-position))
;; Fix by Mike Dugan <dugan@bucrf16.bu.edu>. ;; Fix by Mike Dugan <dugan@bucrf16.bu.edu>.
(from (if (get-text-property beg 'mouse-face) (from (if (get-text-property beg 'mouse-face)
beg beg
@ -12732,7 +12732,7 @@ If REVERSE, save parts that do not match TYPE."
(with-no-warnings ;See docstring of gnus-summary-highlight. (with-no-warnings ;See docstring of gnus-summary-highlight.
(defvar score) (defvar default) (defvar default-high) (defvar default-low) (defvar score) (defvar default) (defvar default-high) (defvar default-low)
(defvar mark) (defvar uncached)) (defvar mark) (defvar uncached))
(let* ((beg (point-at-bol)) (let* ((beg (line-beginning-position))
(article (or (gnus-summary-article-number) gnus-current-article)) (article (or (gnus-summary-article-number) gnus-current-article))
(score (or (cdr (assq article (score (or (cdr (assq article
gnus-newsgroup-scored)) gnus-newsgroup-scored))
@ -12748,7 +12748,7 @@ If REVERSE, save parts that do not match TYPE."
(let ((face (funcall (gnus-summary-highlight-line-0)))) (let ((face (funcall (gnus-summary-highlight-line-0))))
(unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face)) (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face))
(gnus-put-text-property-excluding-characters-with-faces (gnus-put-text-property-excluding-characters-with-faces
beg (1+ (point-at-eol)) 'face beg (1+ (line-end-position)) 'face
(setq face (if (boundp face) (symbol-value face) face))) (setq face (if (boundp face) (symbol-value face) face)))
(when gnus-summary-highlight-line-function (when gnus-summary-highlight-line-function
(funcall gnus-summary-highlight-line-function article face)))))) (funcall gnus-summary-highlight-line-function article face))))))
@ -12895,7 +12895,7 @@ treated as multipart/mixed."
(insert "Mime-Version: 1.0\n") (insert "Mime-Version: 1.0\n")
(widen) (widen)
(when (search-forward "\n--" nil t) (when (search-forward "\n--" nil t)
(let ((separator (buffer-substring (point) (point-at-eol)))) (let ((separator (buffer-substring (point) (line-end-position))))
(message-narrow-to-head) (message-narrow-to-head)
(message-remove-header "Content-Type") (message-remove-header "Content-Type")
(goto-char (point-max)) (goto-char (point-max))

View file

@ -107,15 +107,15 @@ should return non-nil if the topic is to be displayed."
(defun gnus-group-topic-name () (defun gnus-group-topic-name ()
"The name of the topic on the current line." "The name of the topic on the current line."
(get-text-property (point-at-bol) 'gnus-topic)) (get-text-property (line-beginning-position) 'gnus-topic))
(defun gnus-group-topic-level () (defun gnus-group-topic-level ()
"The level of the topic on the current line." "The level of the topic on the current line."
(get-text-property (point-at-bol) 'gnus-topic-level)) (get-text-property (line-beginning-position) 'gnus-topic-level))
(defun gnus-group-topic-unread () (defun gnus-group-topic-unread ()
"The number of unread articles in topic on the current line." "The number of unread articles in topic on the current line."
(get-text-property (point-at-bol) 'gnus-topic-unread)) (get-text-property (line-beginning-position) 'gnus-topic-unread))
(defun gnus-topic-unread (topic) (defun gnus-topic-unread (topic)
"Return the number of unread articles in TOPIC." "Return the number of unread articles in TOPIC."
@ -128,7 +128,7 @@ should return non-nil if the topic is to be displayed."
(defun gnus-topic-visible-p () (defun gnus-topic-visible-p ()
"Return non-nil if the current topic is visible." "Return non-nil if the current topic is visible."
(get-text-property (point-at-bol) 'gnus-topic-visible)) (get-text-property (line-beginning-position) 'gnus-topic-visible))
(defun gnus-topic-articles-in-topic (entries) (defun gnus-topic-articles-in-topic (entries)
(let ((total 0) (let ((total 0)
@ -188,7 +188,7 @@ If TOPIC, start with that topic."
(defun gnus-group-active-topic-p () (defun gnus-group-active-topic-p ()
"Say whether the current topic comes from the active topics." "Say whether the current topic comes from the active topics."
(get-text-property (point-at-bol) 'gnus-active)) (get-text-property (line-beginning-position) 'gnus-active))
(defun gnus-topic-find-groups (topic &optional level all lowest recursive) (defun gnus-topic-find-groups (topic &optional level all lowest recursive)
"Return entries for all visible groups in TOPIC. "Return entries for all visible groups in TOPIC.

View file

@ -118,7 +118,7 @@ This is a compatibility function for different Emacsen."
;; Delete the current line (and the next N lines). ;; Delete the current line (and the next N lines).
(defmacro gnus-delete-line (&optional n) (defmacro gnus-delete-line (&optional n)
`(delete-region (point-at-bol) `(delete-region (line-beginning-position)
(progn (forward-line ,(or n 1)) (point)))) (progn (forward-line ,(or n 1)) (point))))
(defun gnus-extract-address-components (from) (defun gnus-extract-address-components (from)
@ -178,7 +178,7 @@ is slower."
(defun gnus-goto-colon () (defun gnus-goto-colon ()
(move-beginning-of-line 1) (move-beginning-of-line 1)
(let ((eol (point-at-eol))) (let ((eol (line-end-position)))
(goto-char (or (text-property-any (point) eol 'gnus-position t) (goto-char (or (text-property-any (point) eol 'gnus-position t)
(search-forward ":" eol t) (search-forward ":" eol t)
(point))))) (point)))))

View file

@ -544,11 +544,11 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
"Various")))) "Various"))))
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward "^Subject: ") (when (re-search-forward "^Subject: ")
(delete-region (point) (point-at-eol)) (delete-region (point) (line-end-position))
(insert subject)) (insert subject))
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward "^From:") (when (re-search-forward "^From:")
(delete-region (point) (point-at-eol)) (delete-region (point) (line-end-position))
(insert " " from)) (insert " " from))
(let ((message-forward-decoded-p t)) (let ((message-forward-decoded-p t))
(message-forward post t)))) (message-forward post t))))
@ -1763,7 +1763,7 @@ Gnus might fail to display all of it.")
(unless (looking-at (concat gnus-uu-begin-string "\\|" (unless (looking-at (concat gnus-uu-begin-string "\\|"
gnus-uu-end-string)) gnus-uu-end-string))
(when (not found) (when (not found)
(setq length (- (point-at-eol) (point-at-bol)))) (setq length (- (line-end-position) (line-beginning-position))))
(setq found t) (setq found t)
(beginning-of-line) (beginning-of-line)
(setq beg (point)) (setq beg (point))
@ -2068,7 +2068,7 @@ If no file has been included, the user will be asked for a file."
(goto-char (point-min)) (goto-char (point-min))
(re-search-forward (re-search-forward
(concat "^" (regexp-quote mail-header-separator) "$") nil t) (concat "^" (regexp-quote mail-header-separator) "$") nil t)
(setq header (buffer-substring (point-min) (point-at-bol))) (setq header (buffer-substring (point-min) (line-beginning-position)))
(goto-char (point-min)) (goto-char (point-min))
(when gnus-uu-post-separate-description (when gnus-uu-post-separate-description

View file

@ -2185,7 +2185,7 @@ see `message-narrow-to-headers-or-head'."
(progn (progn
(forward-line 1) (forward-line 1)
(if (re-search-forward "^[^ \n\t]" nil t) (if (re-search-forward "^[^ \n\t]" nil t)
(point-at-bol) (line-beginning-position)
(point-max)))) (point-max))))
(goto-char (point-min))) (goto-char (point-min)))
@ -3664,7 +3664,7 @@ Message buffers and is not meant to be called directly."
(save-excursion (save-excursion
(save-restriction (save-restriction
(widen) (widen)
(let ((bound (+ (point-at-eol) 1)) case-fold-search) (let ((bound (+ (line-end-position) 1)) case-fold-search)
(goto-char (point-min)) (goto-char (point-min))
(not (search-forward (concat "\n" mail-header-separator "\n") (not (search-forward (concat "\n" mail-header-separator "\n")
bound t)))))) bound t))))))
@ -5671,11 +5671,11 @@ Otherwise, generate and save a value for `canlock-password' first."
(goto-char (point-max)) (goto-char (point-max))
(if (not (re-search-backward message-signature-separator nil t)) (if (not (re-search-backward message-signature-separator nil t))
t t
(setq sig-start (1+ (point-at-eol))) (setq sig-start (1+ (line-end-position)))
(setq sig-end (setq sig-end
(if (re-search-forward (if (re-search-forward
"<#/?\\(multipart\\|part\\|external\\|mml\\)" nil t) "<#/?\\(multipart\\|part\\|external\\|mml\\)" nil t)
(- (point-at-bol) 1) (- (line-beginning-position) 1)
(point-max))) (point-max)))
(if (>= (count-lines sig-start sig-end) 5) (if (>= (count-lines sig-start sig-end) 5)
(if (message-gnksa-enable-p 'signature) (if (message-gnksa-enable-p 'signature)
@ -6361,7 +6361,7 @@ Headers already prepared in the buffer are not modified."
(forward-line -1))) (forward-line -1)))
;; The value of this header was empty, so we clear ;; The value of this header was empty, so we clear
;; totally and insert the new value. ;; totally and insert the new value.
(delete-region (point) (point-at-eol)) (delete-region (point) (line-end-position))
;; If the header is optional, and the header was ;; If the header is optional, and the header was
;; empty, we can't insert it anyway. ;; empty, we can't insert it anyway.
(unless optionalp (unless optionalp
@ -6616,10 +6616,10 @@ beginning of a folded header)."
(or (eq (char-after) ?\s) (eq (char-after) ?\t))) (or (eq (char-after) ?\s) (eq (char-after) ?\t)))
(beginning-of-line 0))) (beginning-of-line 0)))
(when (or (eq (char-after) ?\s) (eq (char-after) ?\t) (when (or (eq (char-after) ?\s) (eq (char-after) ?\t)
(search-forward ":" (point-at-eol) t)) (search-forward ":" (line-end-position) t))
;; We are a bit more lacks than the RFC and allow any positive number of WSP ;; We are a bit more lacks than the RFC and allow any positive number of WSP
;; characters. ;; characters.
(skip-chars-forward " \t" (point-at-eol)) (skip-chars-forward " \t" (line-end-position))
(point))) (point)))
(defun message-beginning-of-line (&optional n) (defun message-beginning-of-line (&optional n)
@ -8642,7 +8642,7 @@ From headers in the original article."
(autoload 'ecomplete-display-matches "ecomplete") (autoload 'ecomplete-display-matches "ecomplete")
(defun message--in-tocc-p () (defun message--in-tocc-p ()
(and (memq (char-after (point-at-bol)) '(?C ?T ?\t ? )) (and (memq (char-after (line-beginning-position)) '(?C ?T ?\t ? ))
(message-point-in-header-p) (message-point-in-header-p)
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)

View file

@ -307,7 +307,7 @@
(while (re-search-forward (while (re-search-forward
"^X-Gnus-Newsgroup:" "^X-Gnus-Newsgroup:"
(save-excursion (search-forward "\n\n" nil t) (point)) t) (save-excursion (search-forward "\n\n" nil t) (point)) t)
(delete-region (point-at-bol) (progn (forward-line 1) (point)))) (delete-region (line-beginning-position) (progn (forward-line 1) (point))))
(setq result (eval accept-form t)) (setq result (eval accept-form t))
(kill-buffer (current-buffer)) (kill-buffer (current-buffer))
result) result)
@ -424,7 +424,7 @@
(defun nnbabyl-delete-mail (&optional force leave-delim) (defun nnbabyl-delete-mail (&optional force leave-delim)
;; Delete the current X-Gnus-Newsgroup line. ;; Delete the current X-Gnus-Newsgroup line.
(unless force (unless force
(delete-region (point-at-bol) (progn (forward-line 1) (point)))) (delete-region (line-beginning-position) (progn (forward-line 1) (point))))
;; Beginning of the article. ;; Beginning of the article.
(save-excursion (save-excursion
(save-restriction (save-restriction
@ -630,7 +630,8 @@
(while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) " nil t) (while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) " nil t)
(if (gethash (setq id (match-string 1)) idents) (if (gethash (setq id (match-string 1)) idents)
(progn (progn
(delete-region (point-at-bol) (progn (forward-line 1) (point))) (delete-region (line-beginning-position)
(progn (forward-line 1) (point)))
(nnheader-message 7 "Moving %s..." id) (nnheader-message 7 "Moving %s..." id)
(nnbabyl-save-mail (nnbabyl-save-mail
(nnmail-article-group 'nnbabyl-active-number))) (nnmail-article-group 'nnbabyl-active-number)))

View file

@ -862,7 +862,7 @@ all. This may very well take some time.")
(search-forward id nil t)) ; We find the ID. (search-forward id nil t)) ; We find the ID.
;; And the id is in the fourth field. ;; And the id is in the fourth field.
(if (not (and (search-backward "\t" nil t 4) (if (not (and (search-backward "\t" nil t 4)
(not (search-backward"\t" (point-at-bol) t)))) (not (search-backward"\t" (line-beginning-position) t))))
(forward-line 1) (forward-line 1)
(beginning-of-line) (beginning-of-line)
(setq found t) (setq found t)

View file

@ -179,7 +179,7 @@ all. This may very well take some time.")
(goto-char (match-end 0)) (goto-char (match-end 0))
(setq num (string-to-number (setq num (string-to-number
(buffer-substring (buffer-substring
(point) (point-at-eol)))) (point) (line-end-position))))
(goto-char start) (goto-char start)
(< num article))) (< num article)))
;; Check that we are before an article with a ;; Check that we are before an article with a
@ -189,7 +189,7 @@ all. This may very well take some time.")
(progn (progn
(setq num (string-to-number (setq num (string-to-number
(buffer-substring (buffer-substring
(point) (point-at-eol)))) (point) (line-end-position))))
(> num article)) (> num article))
;; Discard any article numbers before the one we're ;; Discard any article numbers before the one we're
;; now looking at. ;; now looking at.
@ -259,7 +259,7 @@ all. This may very well take some time.")
(if (search-forward (concat "\n" nnfolder-article-marker) (if (search-forward (concat "\n" nnfolder-article-marker)
nil t) nil t)
(string-to-number (buffer-substring (string-to-number (buffer-substring
(point) (point-at-eol))) (point) (line-end-position)))
-1)))))))) -1))))))))
(deffoo nnfolder-request-group (group &optional server dont-check _info) (deffoo nnfolder-request-group (group &optional server dont-check _info)

View file

@ -188,7 +188,7 @@ on your system, you could say something like:
(defsubst nnheader-header-value () (defsubst nnheader-header-value ()
(skip-chars-forward " \t") (skip-chars-forward " \t")
(buffer-substring (point) (point-at-eol))) (buffer-substring (point) (line-end-position)))
(autoload 'ietf-drums-unfold-fws "ietf-drums") (autoload 'ietf-drums-unfold-fws "ietf-drums")
@ -397,7 +397,7 @@ leaving the original buffer untouched."
(autoload 'gnus-extract-message-id-from-in-reply-to "gnus-sum") (autoload 'gnus-extract-message-id-from-in-reply-to "gnus-sum")
(defun nnheader-parse-nov (&optional number) (defun nnheader-parse-nov (&optional number)
(let ((eol (point-at-eol)) (let ((eol (line-end-position))
references in-reply-to x header) references in-reply-to x header)
(setq header (setq header
(make-full-mail-header (make-full-mail-header
@ -632,7 +632,7 @@ the line could be found."
;; This is invalid, but not all articles have Message-IDs. ;; This is invalid, but not all articles have Message-IDs.
() ()
(mail-position-on-field "References") (mail-position-on-field "References")
(let ((begin (point-at-bol)) (let ((begin (line-beginning-position))
(fill-column 78) (fill-column 78)
(fill-prefix "\t")) (fill-prefix "\t"))
(when references (when references

View file

@ -661,7 +661,7 @@ nn*-request-list should have been called before calling this function."
(while (not (eobp)) (while (not (eobp))
(condition-case nil (condition-case nil
(progn (progn
(narrow-to-region (point) (point-at-eol)) (narrow-to-region (point) (line-end-position))
(setq group (read buffer) (setq group (read buffer)
group group
(cond ((symbolp group) (cond ((symbolp group)
@ -1116,7 +1116,7 @@ FUNC will be called with the group name to determine the article number."
(while (not (eobp)) (while (not (eobp))
(unless (< (move-to-column nnmail-split-header-length-limit) (unless (< (move-to-column nnmail-split-header-length-limit)
nnmail-split-header-length-limit) nnmail-split-header-length-limit)
(delete-region (point) (point-at-eol))) (delete-region (point) (line-end-position)))
(forward-line 1)) (forward-line 1))
;; Allow washing. ;; Allow washing.
(goto-char (point-min)) (goto-char (point-min))
@ -1650,7 +1650,7 @@ See the documentation for the variable `nnmail-split-fancy' for details."
(skip-chars-forward "^\n\r\t") (skip-chars-forward "^\n\r\t")
(unless (looking-at "[\r\n]") (unless (looking-at "[\r\n]")
(forward-char 1) (forward-char 1)
(buffer-substring (point) (point-at-eol))))))) (buffer-substring (point) (line-end-position)))))))
;; Function for nnmail-split-fancy: look up all references in the ;; Function for nnmail-split-fancy: look up all references in the
;; cache and if a match is found, return that group. ;; cache and if a match is found, return that group.

View file

@ -574,7 +574,7 @@ Other back ends might or might not work.")
(gnus-group-get-parameter qualgroup 'folder))) (gnus-group-get-parameter qualgroup 'folder)))
(progn (progn
(replace-match cur) (replace-match cur)
(delete-region cpoint (point-at-bol)) (delete-region cpoint (line-beginning-position))
(forward-line) (forward-line)
(setq cpoint (point))) (setq cpoint (point)))
(forward-line))) (forward-line)))

View file

@ -601,7 +601,7 @@ non-nil.")
(search-forward id nil t)) ; We find the ID. (search-forward id nil t)) ; We find the ID.
;; And the id is in the fourth field. ;; And the id is in the fourth field.
(if (not (and (search-backward "\t" nil t 4) (if (not (and (search-backward "\t" nil t 4)
(not (search-backward "\t" (point-at-bol) t)))) (not (search-backward "\t" (line-beginning-position) t))))
(forward-line 1) (forward-line 1)
(beginning-of-line) (beginning-of-line)
(setq found t) (setq found t)
@ -755,7 +755,7 @@ article number. This function is called narrowed to an article."
(nnheader-insert-nov headers))) (nnheader-insert-nov headers)))
(defsubst nnml-header-value () (defsubst nnml-header-value ()
(buffer-substring (match-end 0) (point-at-eol))) (buffer-substring (match-end 0) (line-end-position)))
(defun nnml-parse-head (chars &optional number) (defun nnml-parse-head (chars &optional number)
"Parse the head of the current buffer." "Parse the head of the current buffer."
@ -1061,7 +1061,7 @@ Use the nov database for the current group if available."
(regexp-quote (regexp-quote
(concat group ":" old-number-string)) (concat group ":" old-number-string))
"\\>") "\\>")
(point-at-eol) t)) (line-end-position) t))
(replace-match (replace-match
(concat group ":" new-number-string))) (concat group ":" new-number-string)))
;; Save to the new file: ;; Save to the new file:
@ -1109,7 +1109,7 @@ Use the nov database for the current group if available."
(regexp-quote (regexp-quote
(concat group ":" old-number-string)) (concat group ":" old-number-string))
"\\>") "\\>")
(point-at-eol) t) (line-end-position) t)
(replace-match (replace-match
(concat "\\1" group ":" new-number-string)))))) (concat "\\1" group ":" new-number-string))))))
;; 4/ Possibly remove the article from the backlog: ;; 4/ Possibly remove the article from the backlog:

View file

@ -480,7 +480,7 @@ retried once before actually displaying the error report."
(goto-char pos) (goto-char pos)
(if (looking-at (regexp-quote command)) (if (looking-at (regexp-quote command))
(delete-region pos (progn (forward-line 1) (delete-region pos (progn (forward-line 1)
(point-at-bol))))))) (line-beginning-position)))))))
(nnheader-report 'nntp "Couldn't open connection to %s." (nnheader-report 'nntp "Couldn't open connection to %s."
nntp-address)))) nntp-address))))
@ -503,7 +503,7 @@ retried once before actually displaying the error report."
(goto-char pos) (goto-char pos)
(if (looking-at (regexp-quote command)) (if (looking-at (regexp-quote command))
(delete-region pos (progn (forward-line 1) (delete-region pos (progn (forward-line 1)
(point-at-bol))))))) (line-beginning-position)))))))
(nnheader-report 'nntp "Couldn't open connection to %s." (nnheader-report 'nntp "Couldn't open connection to %s."
nntp-address)))) nntp-address))))
@ -528,7 +528,8 @@ retried once before actually displaying the error report."
(with-current-buffer buffer (with-current-buffer buffer
(goto-char pos) (goto-char pos)
(if (looking-at (regexp-quote command)) (if (looking-at (regexp-quote command))
(delete-region pos (progn (forward-line 1) (point-at-bol)))) (delete-region pos (progn (forward-line 1)
(line-beginning-position))))
))) )))
(nnheader-report 'nntp "Couldn't open connection to %s." (nnheader-report 'nntp "Couldn't open connection to %s."
nntp-address)))) nntp-address))))

View file

@ -387,7 +387,7 @@ lines have the correct component server prefix."
(looking-at (looking-at
"[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t") "[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t")
(goto-char (match-end 0)) (goto-char (match-end 0))
(unless (search-forward "\t" (point-at-eol) 'move) (unless (search-forward "\t" (line-end-position) 'move)
(insert "\t")) (insert "\t"))
;; Remove any spaces at the beginning of the Xref field. ;; Remove any spaces at the beginning of the Xref field.
@ -403,8 +403,8 @@ lines have the correct component server prefix."
;; component server prefix. ;; component server prefix.
(save-restriction (save-restriction
(narrow-to-region (point) (narrow-to-region (point)
(or (search-forward "\t" (point-at-eol) t) (or (search-forward "\t" (line-end-position) t)
(point-at-eol))) (line-end-position)))
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward "Xref: *[^\n:0-9 ]+ *" nil t) (when (re-search-forward "Xref: *[^\n:0-9 ]+ *" nil t)
(replace-match "" t t)) (replace-match "" t t))

View file

@ -519,7 +519,7 @@ A string or a list of strings is returned."
(goto-char b) (goto-char b)
(let (res) (let (res)
(while (< (point) e) (while (< (point) e)
(let ((str (buffer-substring (point) (point-at-eol)))) (let ((str (buffer-substring (point) (line-end-position))))
(unless (string= "" str) (unless (string= "" str)
(push str res))) (push str res)))
(forward-line)) (forward-line))

View file

@ -291,7 +291,7 @@ symbol `ask', query before flushing the queue file."
(goto-char (point-min)) (goto-char (point-min))
(while (and (not (eobp)) (while (and (not (eobp))
(re-search-forward (re-search-forward
"http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t)) "http://\\([^/]+\\)\\(/.*\\) *$" (line-end-position) t))
(let ((spam-report-gmane-wait (let ((spam-report-gmane-wait
(zerop (% (line-number-at-pos) spam-report-gmane-max-requests)))) (zerop (% (line-number-at-pos) spam-report-gmane-max-requests))))
(gnus-message 6 "Reporting %s%s..." (gnus-message 6 "Reporting %s%s..."

View file

@ -2132,7 +2132,7 @@ See `spam-ifile-database'."
;; check the return now (we're back in the temp buffer) ;; check the return now (we're back in the temp buffer)
(goto-char (point-min)) (goto-char (point-min))
(if (not (eobp)) (if (not (eobp))
(setq category (buffer-substring (point) (point-at-eol)))) (setq category (buffer-substring (point) (line-end-position))))
(when (not (zerop (length category))) ; we need a category here (when (not (zerop (length category))) ; we need a category here
(if spam-ifile-all-categories (if spam-ifile-all-categories
(setq return category) (setq return category)
@ -2321,7 +2321,7 @@ With a non-nil REMOVE, remove the ADDRESSES."
(with-temp-buffer (with-temp-buffer
(insert-file-contents file) (insert-file-contents file)
(while (not (eobp)) (while (not (eobp))
(setq address (buffer-substring (point) (point-at-eol))) (setq address (buffer-substring (point) (line-end-position)))
(forward-line 1) (forward-line 1)
;; insert the e-mail address if detected, otherwise the raw data ;; insert the e-mail address if detected, otherwise the raw data
(unless (zerop (length address)) (unless (zerop (length address))

View file

@ -310,7 +310,7 @@ matches may be returned from the message body."
(buffer-substring-no-properties (buffer-substring-no-properties
opoint (point))))) opoint (point)))))
(if delete (if delete
(delete-region (point-at-bol) (point))))) (delete-region (line-beginning-position) (point)))))
(if list (if list
value value
(and (not (string= value "")) value))) (and (not (string= value "")) value)))
@ -326,7 +326,8 @@ matches may be returned from the message body."
(prog1 (prog1
(buffer-substring-no-properties opoint (point)) (buffer-substring-no-properties opoint (point))
(if delete (if delete
(delete-region (point-at-bol) (1+ (point)))))))))))) (delete-region (line-beginning-position)
(1+ (point))))))))))))
;; Parse a list of tokens separated by commas. ;; Parse a list of tokens separated by commas.
;; It runs from point to the end of the visible part of the buffer. ;; It runs from point to the end of the visible part of the buffer.

View file

@ -394,7 +394,7 @@ with a space."
(let (p) (let (p)
(save-excursion (save-excursion
(while (>= (current-column) fill-column) (while (>= (current-column) fill-column)
(while (and (search-backward "," (point-at-bol) 'move) (while (and (search-backward "," (line-beginning-position) 'move)
(>= (current-column) (1- fill-column)) (>= (current-column) (1- fill-column))
(setq p (point)))) (setq p (point))))
(when (or (not (bolp)) (when (or (not (bolp))

View file

@ -264,7 +264,7 @@ Buffer is not displayed if SHOW is non-nil."
(delete-char 1)))) (delete-char 1))))
(message "folder %s spool %s" folder-name spool-name) (message "folder %s spool %s" folder-name spool-name)
(forward-line (if (eq (count-lines (point-min) (point-at-eol)) (forward-line (if (eq (count-lines (point-min) (line-end-position))
mspools-files-len) mspools-files-len)
;; FIXME: Why use `mspools-files-len' instead ;; FIXME: Why use `mspools-files-len' instead
;; of looking if we're on the last line and ;; of looking if we're on the last line and
@ -307,7 +307,7 @@ Buffer is not displayed if SHOW is non-nil."
(defun mspools-get-spool-name () (defun mspools-get-spool-name ()
"Return the name of the spool on the current line." "Return the name of the spool on the current line."
(let ((line-num (1- (count-lines (point-min) (point-at-eol))))) (let ((line-num (1- (count-lines (point-min) (line-end-position)))))
;; FIXME: Why not extract the name directly from the current line's text? ;; FIXME: Why not extract the name directly from the current line's text?
(car (nth line-num mspools-files)))) (car (nth line-num mspools-files))))

View file

@ -175,7 +175,7 @@ This is either `base64' or `quoted-printable'."
(progn (progn
(forward-line 1) (forward-line 1)
(if (re-search-forward "^[^ \n\t]" nil t) (if (re-search-forward "^[^ \n\t]" nil t)
(point-at-bol) (line-beginning-position)
(point-max)))) (point-max))))
(goto-char (point-min))) (goto-char (point-min)))
@ -681,14 +681,14 @@ Point moves to the end of the region."
(goto-char b) (goto-char b)
(setq b (point-marker) (setq b (point-marker)
e (set-marker (make-marker) e)) e (set-marker (make-marker) e))
(rfc2047-fold-region (point-at-bol) b) (rfc2047-fold-region (line-beginning-position) b)
(goto-char b) (goto-char b)
(skip-chars-backward "^ \t\n") (skip-chars-backward "^ \t\n")
(unless (= 0 (skip-chars-backward " \t")) (unless (= 0 (skip-chars-backward " \t"))
;; `crest' may contain whitespace and an open parenthesis. ;; `crest' may contain whitespace and an open parenthesis.
(setq crest (buffer-substring-no-properties (point) b))) (setq crest (buffer-substring-no-properties (point) b)))
(setq eword (rfc2047-encode-1 (setq eword (rfc2047-encode-1
(- b (point-at-bol)) (- b (line-beginning-position))
(replace-regexp-in-string (replace-regexp-in-string
"\n\\([ \t]?\\)" "\\1" "\n\\([ \t]?\\)" "\\1"
(buffer-substring-no-properties b e)) (buffer-substring-no-properties b e))
@ -824,18 +824,18 @@ Return the new end point."
(goto-char (point-min)) (goto-char (point-min))
(let ((bol (save-restriction (let ((bol (save-restriction
(widen) (widen)
(point-at-bol))) (line-beginning-position)))
(eol (point-at-eol))) (eol (line-end-position)))
(forward-line 1) (forward-line 1)
(while (not (eobp)) (while (not (eobp))
(if (and (looking-at "[ \t]") (if (and (looking-at "[ \t]")
(< (- (point-at-eol) bol) 76)) (< (- (line-end-position) bol) 76))
(delete-region eol (progn (delete-region eol (progn
(goto-char eol) (goto-char eol)
(skip-chars-forward "\r\n") (skip-chars-forward "\r\n")
(point))) (point)))
(setq bol (point-at-bol))) (setq bol (line-beginning-position)))
(setq eol (point-at-eol)) (setq eol (line-end-position))
(forward-line 1))))) (forward-line 1)))))
(defun rfc2047-b-encode-string (string) (defun rfc2047-b-encode-string (string)

View file

@ -1293,7 +1293,7 @@ external program defined by `sendmail-program'."
;; should override any specified in the message itself. ;; should override any specified in the message itself.
(when where-content-type (when where-content-type
(goto-char where-content-type) (goto-char where-content-type)
(delete-region (point-at-bol) (delete-region (line-beginning-position)
(progn (forward-line 1) (point))))))) (progn (forward-line 1) (point)))))))
;; Insert an extra newline if we need it to work around ;; Insert an extra newline if we need it to work around
;; Sun's bug that swallows newlines. ;; Sun's bug that swallows newlines.

View file

@ -474,7 +474,7 @@ for `smtpmail-try-auth-method'.")
(smtpmail--sanitize-error-message result)))))) (smtpmail--sanitize-error-message result))))))
(delete-file file-data) (delete-file file-data)
(delete-file file-elisp) (delete-file file-elisp)
(delete-region (point-at-bol) (point-at-bol 2))) (delete-region (line-beginning-position) (line-beginning-position 2)))
(write-region (point-min) (point-max) qfile)))) (write-region (point-min) (point-max) qfile))))
(defun smtpmail--sanitize-error-message (string) (defun smtpmail--sanitize-error-message (string)
@ -1057,7 +1057,8 @@ Returns an error if the server cannot be contacted."
(while data-continue (while data-continue
(with-current-buffer buffer (with-current-buffer buffer
(progress-reporter-update pr (point)) (progress-reporter-update pr (point))
(setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) (setq sending-data (buffer-substring (line-beginning-position)
(line-end-position)))
(end-of-line 2) (end-of-line 2)
(setq data-continue (not (eobp)))) (setq data-continue (not (eobp))))
(smtpmail-send-data-1 process sending-data)) (smtpmail-send-data-1 process sending-data))

View file

@ -802,7 +802,7 @@ that note messages to be refiled."
"Return a list of message numbers from point to the end of the line. "Return a list of message numbers from point to the end of the line.
Expands ranges into set of individual numbers." Expands ranges into set of individual numbers."
(let ((msgs ()) (let ((msgs ())
(end-of-line (point-at-eol)) (end-of-line (line-end-position))
num) num)
(while (re-search-forward "[0-9]+" end-of-line t) (while (re-search-forward "[0-9]+" end-of-line t)
(setq num (string-to-number (buffer-substring (match-beginning 0) (setq num (string-to-number (buffer-substring (match-beginning 0)

View file

@ -856,7 +856,7 @@ non-nil, collect results from all servers."
(let* ((end (point)) (let* ((end (point))
(beg (save-excursion (beg (save-excursion
(if (re-search-backward "\\([:,]\\|^\\)[ \t]*" (if (re-search-backward "\\([:,]\\|^\\)[ \t]*"
(point-at-bol) 'move) (line-beginning-position) 'move)
(goto-char (match-end 0))) (goto-char (match-end 0)))
(point))) (point)))
(query-words (split-string (buffer-substring-no-properties beg end) (query-words (split-string (buffer-substring-no-properties beg end)

View file

@ -2556,7 +2556,7 @@ Return nil if no complete line has arrived."
;; next line for Courier IMAP bug. ;; next line for Courier IMAP bug.
(skip-chars-forward " ") (skip-chars-forward " ")
(point))) (point)))
(> (skip-chars-forward "^ )" (point-at-eol)) 0)) (> (skip-chars-forward "^ )" (line-end-position)) 0))
(push (buffer-substring start (point)) flag-list)) (push (buffer-substring start (point)) flag-list))
(cl-assert (eq (char-after) ?\)) nil "In imap-parse-flag-list 2") (cl-assert (eq (char-after) ?\)) nil "In imap-parse-flag-list 2")
(imap-forward) (imap-forward)

View file

@ -694,7 +694,7 @@ an alist of attribute/value pairs."
(while (progn (while (progn
(skip-chars-forward " \t\n") (skip-chars-forward " \t\n")
(not (eobp))) (not (eobp)))
(setq dn (buffer-substring (point) (point-at-eol))) (setq dn (buffer-substring (point) (line-end-position)))
(forward-line 1) (forward-line 1)
(while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\
\\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\

View file

@ -541,7 +541,7 @@ The sort function is chosen according to the value of
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(goto-char (point-min)) (goto-char (point-min))
(while (not (eobp)) (while (not (eobp))
(let* ((pos (point-at-eol)) (let* ((pos (line-end-position))
(item (get-text-property (point) :nt-item)) (item (get-text-property (point) :nt-item))
(age (newsticker--age item)) (age (newsticker--age item))
(selected (get-text-property (point) :nt-selected)) (selected (get-text-property (point) :nt-selected))
@ -579,7 +579,8 @@ The sort function is chosen according to the value of
(newsticker--treeview-list-clear-highlight) (newsticker--treeview-list-clear-highlight)
(with-current-buffer (newsticker--treeview-list-buffer) (with-current-buffer (newsticker--treeview-list-buffer)
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(put-text-property (point-at-bol) (point-at-eol) :nt-selected t)) (put-text-property (line-beginning-position) (line-end-position)
:nt-selected t))
(newsticker--treeview-list-update-faces))) (newsticker--treeview-list-update-faces)))
(defun newsticker--treeview-list-highlight-start () (defun newsticker--treeview-list-highlight-start ()
@ -1080,7 +1081,7 @@ Arguments are ignored."
(with-current-buffer (newsticker--treeview-tree-buffer) (with-current-buffer (newsticker--treeview-tree-buffer)
(goto-char pos) (goto-char pos)
(move-overlay newsticker--tree-selection-overlay (move-overlay newsticker--tree-selection-overlay
(point-at-bol) (1+ (point-at-eol)) (line-beginning-position) (1+ (line-end-position))
(current-buffer))) (current-buffer)))
(if (window-live-p (newsticker--treeview-tree-window)) (if (window-live-p (newsticker--treeview-tree-window))
(set-window-point (newsticker--treeview-tree-window) pos))))) (set-window-point (newsticker--treeview-tree-window) pos)))))

View file

@ -469,7 +469,7 @@ Return non-nil if it is necessary to update the local UIDL file."
(delete-char -3) (delete-char -3)
(if (eq (char-before) ?\)) (if (eq (char-before) ?\))
(insert ")\n ") (insert ")\n ")
(goto-char (1+ (point-at-bol))) (goto-char (1+ (line-beginning-position)))
(delete-region (point) (point-max))))) (delete-region (point) (point-max)))))
(when (eq (char-before) ? ) (when (eq (char-before) ? )
(delete-char -2)) (delete-char -2))

View file

@ -1640,7 +1640,7 @@ Create the buffer if it doesn't exist."
(goto-char (point-max)) (goto-char (point-max))
(when (not (equal 0 (- (point) rcirc-prompt-end-marker))) (when (not (equal 0 (- (point) rcirc-prompt-end-marker)))
;; delete a trailing newline ;; delete a trailing newline
(when (eq (point) (point-at-bol)) (when (eq (point) (line-beginning-position))
(delete-char -1)) (delete-char -1))
(let ((input (buffer-substring-no-properties (let ((input (buffer-substring-no-properties
rcirc-prompt-end-marker (point)))) rcirc-prompt-end-marker (point))))

View file

@ -1198,12 +1198,12 @@ FMT and ARGS are passed to `error'."
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(goto-char (point-min)) (goto-char (point-min))
;; ADB terminal sends "^H" sequences. ;; ADB terminal sends "^H" sequences.
(when (re-search-forward "<\b+" (point-at-eol) t) (when (re-search-forward "<\b+" (line-end-position) t)
(forward-line 1) (forward-line 1)
(delete-region (point-min) (point))) (delete-region (point-min) (point)))
;; Delete the prompt. ;; Delete the prompt.
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward prompt (point-at-eol) t) (when (re-search-forward prompt (line-end-position) t)
(forward-line 1) (forward-line 1)
(delete-region (point-min) (point))) (delete-region (point-min) (point)))
(when (tramp-search-regexp prompt) (when (tramp-search-regexp prompt)

View file

@ -694,7 +694,7 @@ buffer in your bug report.
(setq buffer-read-only nil) (setq buffer-read-only nil)
(goto-char (point-min)) (goto-char (point-min))
(while (not (eobp)) (while (not (eobp))
(if (re-search-forward tramp-buf-regexp (point-at-eol) t) (if (re-search-forward tramp-buf-regexp (line-end-position) t)
(forward-line 1) (forward-line 1)
(forward-line 0) (forward-line 0)
(let ((start (point))) (let ((start (point)))

View file

@ -437,7 +437,7 @@ Otherwise, return NAME."
(if (eq op 'encrypt) "Encoding" "Decoding") name)) (if (eq op 'encrypt) "Encoding" "Decoding") name))
(with-current-buffer (tramp-get-connection-buffer crypt-vec) (with-current-buffer (tramp-get-connection-buffer crypt-vec)
(goto-char (point-min)) (goto-char (point-min))
(buffer-substring (point-min) (point-at-eol))))))) (buffer-substring (point-min) (line-end-position)))))))
;; Nothing to do. ;; Nothing to do.
name)) name))

View file

@ -1188,7 +1188,7 @@ component is used as the target of the symlink."
(tramp-shell-quote-argument localname))) (tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-connection-buffer v) (with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min)) (goto-char (point-min))
(buffer-substring (point-min) (point-at-eol)))) (buffer-substring (point-min) (line-end-position))))
;; Use Perl implementation. ;; Use Perl implementation.
((and (tramp-get-remote-perl v) ((and (tramp-get-remote-perl v)
@ -1334,7 +1334,7 @@ component is used as the target of the symlink."
(setq res-symlink-target (setq res-symlink-target
(if (looking-at-p "\"") (if (looking-at-p "\"")
(read (current-buffer)) (read (current-buffer))
(buffer-substring (point) (point-at-eol))))) (buffer-substring (point) (line-end-position)))))
(forward-line) (forward-line)
;; ... file mode flags ;; ... file mode flags
(read (current-buffer)) (read (current-buffer))
@ -1416,7 +1416,7 @@ component is used as the target of the symlink."
(format "%s -ild %s" (format "%s -ild %s"
(tramp-get-ls-command v) (tramp-get-ls-command v)
(tramp-shell-quote-argument localname))) (tramp-shell-quote-argument localname)))
(setq attr (buffer-substring (point) (point-at-eol)))) (setq attr (buffer-substring (point) (line-end-position))))
(tramp-set-file-property (tramp-set-file-property
v localname "visited-file-modtime-ild" attr)) v localname "visited-file-modtime-ild" attr))
(setq last-coding-system-used coding-system-used) (setq last-coding-system-used coding-system-used)
@ -1460,7 +1460,7 @@ of."
(tramp-get-ls-command v) (tramp-get-ls-command v)
(tramp-shell-quote-argument localname))) (tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-buffer v) (with-current-buffer (tramp-get-buffer v)
(setq attr (buffer-substring (point) (point-at-eol)))) (setq attr (buffer-substring (point) (line-end-position))))
(equal (equal
attr attr
(tramp-get-file-property (tramp-get-file-property
@ -1517,7 +1517,7 @@ VEC or USER, or if there is no home directory, return nil."
(concat "~" (or user (tramp-file-name-user vec)))))) (concat "~" (or user (tramp-file-name-user vec))))))
(with-current-buffer (tramp-get-buffer vec) (with-current-buffer (tramp-get-buffer vec)
(goto-char (point-min)) (goto-char (point-min))
(buffer-substring (point) (point-at-eol))))) (buffer-substring (point) (line-end-position)))))
(defun tramp-sh-handle-get-remote-uid (vec id-format) (defun tramp-sh-handle-get-remote-uid (vec id-format)
"The uid of the remote connection VEC, in ID-FORMAT. "The uid of the remote connection VEC, in ID-FORMAT.
@ -1582,7 +1582,7 @@ ID-FORMAT valid values are `string' and `integer'."
(tramp-shell-quote-argument localname)))) (tramp-shell-quote-argument localname))))
(with-current-buffer (tramp-get-connection-buffer v) (with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward regexp (point-at-eol) t) (when (re-search-forward regexp (line-end-position) t)
(setq context (list (match-string 1) (match-string 2) (setq context (list (match-string 1) (match-string 2)
(match-string 3) (match-string 4)))))) (match-string 3) (match-string 4))))))
;; Return the context. ;; Return the context.
@ -1817,7 +1817,7 @@ ID-FORMAT valid values are `string' and `integer'."
(tramp-error (tramp-error
v 'file-error v 'file-error
"tramp-sh-handle-file-name-all-completions: %s" "tramp-sh-handle-file-name-all-completions: %s"
(buffer-substring (point) (point-at-eol)))) (buffer-substring (point) (line-end-position))))
;; For peace of mind, if buffer doesn't end in `fail' ;; For peace of mind, if buffer doesn't end in `fail'
;; then it should end in `ok'. If neither are in the ;; then it should end in `ok'. If neither are in the
;; buffer something went seriously wrong on the remote ;; buffer something went seriously wrong on the remote
@ -1830,7 +1830,7 @@ ID-FORMAT valid values are `string' and `integer'."
(tramp-shell-quote-argument localname) (buffer-string)))) (tramp-shell-quote-argument localname) (buffer-string))))
(while (zerop (forward-line -1)) (while (zerop (forward-line -1))
(push (buffer-substring (point) (point-at-eol)) result))) (push (buffer-substring (point) (line-end-position)) result)))
result)))))) result))))))
;; cp, mv and ln ;; cp, mv and ln
@ -3124,7 +3124,8 @@ implementation will be used."
(tramp-shell-quote-argument (format "kill -%d $$" i)))) (tramp-shell-quote-argument (format "kill -%d $$" i))))
(with-current-buffer (tramp-get-connection-buffer vec) (with-current-buffer (tramp-get-connection-buffer vec)
(goto-char (point-min)) (goto-char (point-min))
(buffer-substring (point-at-bol) (point-at-eol))))) (buffer-substring (line-beginning-position)
(line-end-position)))))
(if (string-empty-p res) (if (string-empty-p res)
(format "Signal %d" i) (format "Signal %d" i)
res))) res)))
@ -4087,8 +4088,8 @@ This function expects to be in the right *tramp* buffer."
(when (search-backward "tramp_executable " nil t) (when (search-backward "tramp_executable " nil t)
(skip-chars-forward "^ ") (skip-chars-forward "^ ")
(skip-chars-forward " ") (skip-chars-forward " ")
(setq result (buffer-substring (point) (point-at-eol))))) (setq result (buffer-substring (point) (line-end-position)))))
result))) result)))
;; On hydra.nixos.org, the $PATH environment variable is too long to ;; On hydra.nixos.org, the $PATH environment variable is too long to
;; send it. This is likely not due to PATH_MAX, but PIPE_BUF. We ;; 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."
;; A simple-minded busybox has sent " ^H" sequences. ;; A simple-minded busybox has sent " ^H" sequences.
;; Delete them. ;; Delete them.
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward "^\\(.\b\\)+$" (point-at-eol) t) (when (re-search-forward "^\\(.\b\\)+$" (line-end-position) t)
(forward-line 1) (forward-line 1)
(delete-region (point-min) (point))) (delete-region (point-min) (point)))
;; Delete the prompt. ;; Delete the prompt.
@ -5368,7 +5369,7 @@ raises an error."
(unless noerror signal-hook-function))) (unless noerror signal-hook-function)))
(read (current-buffer))) (read (current-buffer)))
;; Error handling. ;; Error handling.
(when (re-search-forward "\\S-" (point-at-eol) t) (when (re-search-forward "\\S-" (line-end-position) t)
(error nil))) (error nil)))
(error (unless noerror (error (unless noerror
(tramp-error (tramp-error

View file

@ -1763,7 +1763,7 @@ If SHARE is result, entries are of type dir. Otherwise, shares
are listed. Result is the list (LOCALNAME MODE SIZE MTIME)." are listed. Result is the list (LOCALNAME MODE SIZE MTIME)."
;; We are called from `tramp-smb-get-file-entries', which sets the ;; We are called from `tramp-smb-get-file-entries', which sets the
;; current buffer. ;; current buffer.
(let ((line (buffer-substring (point) (point-at-eol))) (let ((line (buffer-substring (point) (line-end-position)))
localname mode size month day hour min sec year mtime) localname mode size month day hour min sec year mtime)
(if (not share) (if (not share)
@ -1877,7 +1877,7 @@ are listed. Result is the list (LOCALNAME MODE SIZE MTIME)."
(member (member
"pathnames" "pathnames"
(split-string (split-string
(buffer-substring (point) (point-at-eol)) nil 'omit))))))))) (buffer-substring (point) (line-end-position)) nil 'omit)))))))))
(defun tramp-smb-get-stat-capability (vec) (defun tramp-smb-get-stat-capability (vec)
"Check whether the SMB server supports the `stat' command." "Check whether the SMB server supports the `stat' command."

View file

@ -215,7 +215,7 @@ arguments to pass to the OPERATION."
(progn (progn
;; Read the expression. ;; Read the expression.
(goto-char (point-min)) (goto-char (point-min))
(buffer-substring (point) (point-at-eol))) (buffer-substring (point) (line-end-position)))
":" 'omit)))) ":" 'omit))))
;; The equivalent to `exec-directory'. ;; The equivalent to `exec-directory'.
`(,(tramp-file-local-name (expand-file-name default-directory))))) `(,(tramp-file-local-name (expand-file-name default-directory)))))

View file

@ -512,7 +512,7 @@ the result will be a local, non-Tramp, file name."
(tramp-compat-file-name-unquote localname))) (tramp-compat-file-name-unquote localname)))
(with-current-buffer (tramp-get-connection-buffer v) (with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward regexp (point-at-eol) t) (when (re-search-forward regexp (line-end-position) t)
(setq context (list (match-string 1) (match-string 2) (setq context (list (match-string 1) (match-string 2)
(match-string 3) (match-string 4)))))) (match-string 3) (match-string 4))))))
;; Return the context. ;; Return the context.
@ -752,7 +752,7 @@ ID-FORMAT valid values are `string' and `integer'."
(delete-region (point-min) (point)) (delete-region (point-min) (point))
;; Delete empty lines. ;; Delete empty lines.
(goto-char (point-min)) (goto-char (point-min))
(while (and (not (eobp)) (= (point) (point-at-eol))) (while (and (not (eobp)) (= (point) (line-end-position)))
(forward-line)) (forward-line))
(delete-region (point-min) (point)) (delete-region (point-min) (point))
(tramp-message vec 3 "Process has finished.") (tramp-message vec 3 "Process has finished.")
@ -841,7 +841,7 @@ In case there is no valid Lisp expression, it raises an error."
(condition-case nil (condition-case nil
(prog1 (read (current-buffer)) (prog1 (read (current-buffer))
;; Error handling. ;; Error handling.
(when (re-search-forward "\\S-" (point-at-eol) t) (when (re-search-forward "\\S-" (line-end-position) t)
(error nil))) (error nil)))
(error (tramp-error (error (tramp-error
vec 'file-error vec 'file-error

View file

@ -3203,7 +3203,7 @@ for all methods. Resulting data are derived from default settings."
"Return a (user host) tuple allowed to access. "Return a (user host) tuple allowed to access.
User is always nil." User is always nil."
(let (result) (let (result)
(when (re-search-forward regexp (point-at-eol) t) (when (re-search-forward regexp (line-end-position) t)
(setq result (list nil (match-string match-level)))) (setq result (list nil (match-string match-level))))
(or (or
(> (skip-chars-forward skip-chars) 0) (> (skip-chars-forward skip-chars) 0)
@ -3236,7 +3236,7 @@ Either user or host may be nil."
(concat (concat
"^\\(" tramp-host-regexp "\\)" "^\\(" tramp-host-regexp "\\)"
"\\([ \t]+" "\\(" tramp-user-regexp "\\)" "\\)?"))) "\\([ \t]+" "\\(" tramp-user-regexp "\\)" "\\)?")))
(when (re-search-forward regexp (point-at-eol) t) (when (re-search-forward regexp (line-end-position) t)
(setq result (append (list (match-string 3) (match-string 1))))) (setq result (append (list (match-string 3) (match-string 1)))))
(forward-line 1) (forward-line 1)
result)) result))
@ -3318,7 +3318,7 @@ Host is always \"localhost\"."
Host is always \"localhost\"." Host is always \"localhost\"."
(let (result (let (result
(regexp (concat "^\\(" tramp-user-regexp "\\):"))) (regexp (concat "^\\(" tramp-user-regexp "\\):")))
(when (re-search-forward regexp (point-at-eol) t) (when (re-search-forward regexp (line-end-position) t)
(setq result (list (match-string 1) "localhost"))) (setq result (list (match-string 1) "localhost")))
(forward-line 1) (forward-line 1)
result)) result))
@ -3339,7 +3339,7 @@ Host is always \"localhost\"."
"Return a (group host) tuple allowed to access. "Return a (group host) tuple allowed to access.
Host is always \"localhost\"." Host is always \"localhost\"."
(let (result (let (result
(split (split-string (buffer-substring (point) (point-at-eol)) ":"))) (split (split-string (buffer-substring (point) (line-end-position)) ":")))
(when (member (user-login-name) (split-string (nth 3 split) "," 'omit)) (when (member (user-login-name) (split-string (nth 3 split) "," 'omit))
(setq result (list (nth 0 split) "localhost"))) (setq result (list (nth 0 split) "localhost")))
(forward-line 1) (forward-line 1)
@ -3374,7 +3374,7 @@ User is always nil."
User is always nil." User is always nil."
(let (result (let (result
(regexp (concat (regexp-quote registry) "\\\\\\(.+\\)"))) (regexp (concat (regexp-quote registry) "\\\\\\(.+\\)")))
(when (re-search-forward regexp (point-at-eol) t) (when (re-search-forward regexp (line-end-position) t)
(setq result (list nil (match-string 1)))) (setq result (list nil (match-string 1))))
(forward-line 1) (forward-line 1)
result)) result))
@ -4142,12 +4142,12 @@ Let-bind it when necessary.")
(goto-char (point-min)) (goto-char (point-min))
(while (setq start (while (setq start
(text-property-not-all (text-property-not-all
(point) (point-at-eol) 'dired-filename t)) (point) (line-end-position) 'dired-filename t))
(delete-region (delete-region
start start
(or (text-property-any start (point-at-eol) 'dired-filename t) (or (text-property-any start (line-end-position) 'dired-filename t)
(point-at-eol))) (line-end-position)))
(if (= (point-at-bol) (point-at-eol)) (if (= (line-beginning-position) (line-end-position))
;; Empty line. ;; Empty line.
(delete-region (point) (progn (forward-line) (point))) (delete-region (point) (progn (forward-line) (point)))
(forward-line))))))))) (forward-line)))))))))

View file

@ -82,7 +82,7 @@
(goto-char (point-min)) (goto-char (point-min))
;; Go through the file, line by line. ;; Go through the file, line by line.
(while (not (eobp)) (while (not (eobp))
(narrow-to-region (point) (point-at-eol)) (narrow-to-region (point) (line-end-position))
;; For each line, get the tokens and values. ;; For each line, get the tokens and values.
(while (not (eobp)) (while (not (eobp))
(skip-chars-forward "\t ") (skip-chars-forward "\t ")
@ -205,7 +205,7 @@ MODE can be \"login\" or \"password\", suitable for passing to
(with-temp-buffer (with-temp-buffer
(insert-file-contents netrc-services-file) (insert-file-contents netrc-services-file)
(while (search-forward "#" nil t) (while (search-forward "#" nil t)
(delete-region (1- (point)) (point-at-eol))) (delete-region (1- (point)) (line-end-position)))
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward (while (re-search-forward
"^ *\\([^ \n\t]+\\)[ \t]+\\([0-9]+\\)/\\([^ \t\n]+\\)" nil t) "^ *\\([^ \n\t]+\\)[ \t]+\\([0-9]+\\)/\\([^ \t\n]+\\)" nil t)

View file

@ -292,7 +292,7 @@ Prefix argument serves as repeat count."
(bottom (save-excursion (move-to-window-line bottom-margin) (point))) (bottom (save-excursion (move-to-window-line bottom-margin) (point)))
(far (save-excursion (far (save-excursion
(goto-char bottom) (goto-char bottom)
(point-at-bol (1- height))))) (line-beginning-position (1- height)))))
,@body)) ,@body))
(defun tpu-paragraph (num) (defun tpu-paragraph (num)

View file

@ -917,7 +917,7 @@ arguments and pop open the results in a preview buffer."
vals "")))))) vals ""))))))
(save-excursion (save-excursion
(goto-char begin) (goto-char begin)
(goto-char (point-at-eol)) (goto-char (line-end-position))
(unless (= (char-before (point)) ?\ ) (insert " ")) (unless (= (char-before (point)) ?\ ) (insert " "))
(insert ":" header-arg) (when value (insert " " value))))) (insert ":" header-arg) (when value (insert " " value)))))
@ -1936,9 +1936,9 @@ region is not active then the point is demarcated."
(let ((lang (nth 0 info)) (let ((lang (nth 0 info))
(indent (make-string (current-indentation) ?\s))) (indent (make-string (current-indentation) ?\s)))
(when (string-match "^[[:space:]]*$" (when (string-match "^[[:space:]]*$"
(buffer-substring (point-at-bol) (buffer-substring (line-beginning-position)
(point-at-eol))) (line-end-position)))
(delete-region (point-at-bol) (point-at-eol))) (delete-region (line-beginning-position) (line-end-position)))
(insert (concat (insert (concat
(if (looking-at "^") "" "\n") (if (looking-at "^") "" "\n")
indent (if upper-case-p "#+END_SRC\n" "#+end_src\n") indent (if upper-case-p "#+END_SRC\n" "#+end_src\n")

View file

@ -312,7 +312,7 @@ LINENO is the number of the erroneous line."
(progn (progn
(goto-char (point-min)) (goto-char (point-min))
(forward-line (- lineNo 1)) (forward-line (- lineNo 1))
(buffer-substring (point) (point-at-eol))) (buffer-substring (point) (line-end-position)))
nil))) nil)))
(defun org-babel-lilypond-attempt-to-open-pdf (file-name &optional test) (defun org-babel-lilypond-attempt-to-open-pdf (file-name &optional test)

View file

@ -255,7 +255,7 @@ This removes initial blank and comment lines and then calls
(insert-file-contents file-name) (insert-file-contents file-name)
(re-search-forward "^[ \t]*[^# \t]" nil t) (re-search-forward "^[ \t]*[^# \t]" nil t)
(when (< (setq beg (point-min)) (when (< (setq beg (point-min))
(setq end (point-at-bol))) (setq end (line-beginning-position)))
(delete-region beg end))) (delete-region beg end)))
(org-babel-import-elisp-from-file temp-file '(16)))) (org-babel-import-elisp-from-file temp-file '(16))))

View file

@ -135,13 +135,13 @@ result is a cons of the filename and search string."
;; can we get a '::' part? ;; can we get a '::' part?
(if (string= erc-line (erc-prompt)) (if (string= erc-line (erc-prompt))
(progn (progn
(goto-char (point-at-bol)) (goto-char (line-beginning-position))
(when (search-backward-regexp "^[^ ]" nil t) (when (search-backward-regexp "^[^ ]" nil t)
(buffer-substring-no-properties (point-at-bol) (buffer-substring-no-properties (line-beginning-position)
(point-at-eol)))) (line-end-position))))
(when (search-backward erc-line nil t) (when (search-backward erc-line nil t)
(buffer-substring-no-properties (point-at-bol) (buffer-substring-no-properties (line-beginning-position)
(point-at-eol))))))) (line-end-position)))))))
(defun org-irc-erc-store-link () (defun org-irc-erc-store-link ()
"Store a link to the IRC log file or the session itself. "Store a link to the IRC log file or the session itself.
@ -151,7 +151,7 @@ the session itself."
(require 'erc-log) (require 'erc-log)
(if org-irc-link-to-logs (if org-irc-link-to-logs
(let* ((erc-line (buffer-substring-no-properties (let* ((erc-line (buffer-substring-no-properties
(point-at-bol) (point-at-eol))) (line-beginning-position) (line-end-position)))
(parsed-line (org-irc-erc-get-line-from-log erc-line))) (parsed-line (org-irc-erc-get-line-from-log erc-line)))
(if (erc-logging-enabled nil) (if (erc-logging-enabled nil)
(progn (progn

View file

@ -1481,7 +1481,7 @@ non-nil."
(let ((end (region-end))) (let ((end (region-end)))
(goto-char (region-beginning)) (goto-char (region-beginning))
(set-mark (point)) (set-mark (point))
(while (< (point-at-eol) end) (while (< (line-end-position) end)
(move-end-of-line 1) (activate-mark) (move-end-of-line 1) (activate-mark)
(let (current-prefix-arg) (let (current-prefix-arg)
(call-interactively 'org-store-link)) (call-interactively 'org-store-link))

View file

@ -2113,7 +2113,7 @@ in that string. If STRING is nil, it will be fetched from the beginning
of the current line." of the current line."
(declare (debug t)) (declare (debug t))
(org-with-gensyms (marker) (org-with-gensyms (marker)
`(let ((,marker (get-text-property (if ,string 0 (point-at-bol)) `(let ((,marker (get-text-property (if ,string 0 (line-beginning-position))
'org-hd-marker ,string))) 'org-hd-marker ,string)))
(with-current-buffer (marker-buffer ,marker) (with-current-buffer (marker-buffer ,marker)
(save-excursion (save-excursion
@ -3076,10 +3076,10 @@ s Search for keywords M Like m, but only TODO entries
(when (eq rmheader t) (when (eq rmheader t)
(org-goto-line 1) (org-goto-line 1)
(re-search-forward ":" nil t) (re-search-forward ":" nil t)
(delete-region (match-end 0) (point-at-eol)) (delete-region (match-end 0) (line-end-position))
(forward-char 1) (forward-char 1)
(looking-at "-+") (looking-at "-+")
(delete-region (match-end 0) (point-at-eol)) (delete-region (match-end 0) (line-end-position))
(move-marker header-end (match-end 0))) (move-marker header-end (match-end 0)))
(goto-char header-end) (goto-char header-end)
(delete-region (point) (point-max)) (delete-region (point) (point-max))
@ -3505,10 +3505,10 @@ This ensures the export commands can easily use it."
"Mark the line at POS as an agenda structure header." "Mark the line at POS as an agenda structure header."
(save-excursion (save-excursion
(goto-char pos) (goto-char pos)
(put-text-property (point-at-bol) (point-at-eol) (put-text-property (line-beginning-position) (line-end-position)
'org-agenda-structural-header t) 'org-agenda-structural-header t)
(when org-agenda-title-append (when org-agenda-title-append
(put-text-property (point-at-bol) (point-at-eol) (put-text-property (line-beginning-position) (line-end-position)
'org-agenda-title-append org-agenda-title-append)))) 'org-agenda-title-append org-agenda-title-append))))
(defvar org-mobile-creating-agendas) ; defined in org-mobile.el (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."
(while (not (eobp)) (while (not (eobp))
(unless (looking-at "[ \t]*$") (unless (looking-at "[ \t]*$")
(move-to-column ind) (move-to-column ind)
(delete-region (point-at-bol) (point))) (delete-region (line-beginning-position) (point)))
(beginning-of-line 2)) (beginning-of-line 2))
(run-hooks 'org-agenda-entry-text-cleanup-hook) (run-hooks 'org-agenda-entry-text-cleanup-hook)
@ -3987,7 +3987,7 @@ agenda display, configure `org-agenda-finalize-hook'."
(goto-char (point-min)) (goto-char (point-min))
(while (equal (forward-line) 0) (while (equal (forward-line) 0)
(when (setq mrk (get-text-property (point) 'org-hd-marker)) (when (setq mrk (get-text-property (point) 'org-hd-marker))
(put-text-property (point-at-bol) (point-at-eol) (put-text-property (line-beginning-position) (line-end-position)
'tags 'tags
(org-with-point-at mrk (org-with-point-at mrk
(org-get-tags)))))))) (org-get-tags))))))))
@ -4035,7 +4035,8 @@ agenda display, configure `org-agenda-finalize-hook'."
(goto-char s) (goto-char s)
(when (equal (org-get-at-bol 'org-hd-marker) (when (equal (org-get-at-bol 'org-hd-marker)
org-clock-hd-marker) org-clock-hd-marker)
(setq ov (make-overlay (point-at-bol) (1+ (point-at-eol)))) (setq ov (make-overlay (line-beginning-position)
(1+ (line-end-position))))
(overlay-put ov 'type 'org-agenda-clocking) (overlay-put ov 'type 'org-agenda-clocking)
(overlay-put ov 'face 'org-agenda-clocking) (overlay-put ov 'face 'org-agenda-clocking)
(overlay-put ov 'help-echo (overlay-put ov 'help-echo
@ -4066,7 +4067,7 @@ agenda display, configure `org-agenda-finalize-hook'."
b (match-beginning 1) b (match-beginning 1)
e (if (eq org-agenda-fontify-priorities 'cookies) e (if (eq org-agenda-fontify-priorities 'cookies)
(1+ (match-end 2)) (1+ (match-end 2))
(point-at-eol)) (line-end-position))
ov (make-overlay b e)) ov (make-overlay b e))
(overlay-put (overlay-put
ov 'face ov 'face
@ -4168,7 +4169,7 @@ A good way to set it is through options in `org-agenda-custom-commands'.")
"Throw to `:skip' in places that should be skipped. "Throw to `:skip' in places that should be skipped.
Also moves point to the end of the skipped region, so that search can Also moves point to the end of the skipped region, so that search can
continue from there." continue from there."
(let ((p (point-at-bol)) to) (let ((p (line-beginning-position)) to)
(when (or (when (or
(save-excursion (goto-char p) (looking-at comment-start-skip)) (save-excursion (goto-char p) (looking-at comment-start-skip))
(and org-agenda-skip-archived-trees (not org-agenda-archives-mode) (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."
m org-agenda-entry-text-maxlines m org-agenda-entry-text-maxlines
org-agenda-entry-text-leaders)))) org-agenda-entry-text-leaders))))
(when (string-match "\\S-" txt) (when (string-match "\\S-" txt)
(setq o (make-overlay (point-at-bol) (point-at-eol))) (setq o (make-overlay (line-beginning-position) (line-end-position)))
(overlay-put o 'evaporate t) (overlay-put o 'evaporate t)
(overlay-put o 'org-overlay-type 'agenda-entry-content) (overlay-put o 'org-overlay-type 'agenda-entry-content)
(overlay-put o 'after-string txt)))) (overlay-put o 'after-string txt))))
@ -4749,7 +4750,7 @@ is active."
(forward-line -1) (forward-line -1)
(org-back-to-heading t))) (org-back-to-heading t)))
(skip-chars-forward "* ") (skip-chars-forward "* ")
(setq beg (point-at-bol) (setq beg (line-beginning-position)
beg1 (point) beg1 (point)
end (progn end (progn
(outline-next-heading) (outline-next-heading)
@ -4764,8 +4765,8 @@ is active."
(goto-char beg) (goto-char beg)
(org-agenda-skip) (org-agenda-skip)
(setq str (buffer-substring-no-properties (setq str (buffer-substring-no-properties
(point-at-bol) (line-beginning-position)
(if hdl-only (point-at-eol) end))) (if hdl-only (line-end-position) end)))
(mapc (lambda (wr) (when (string-match wr str) (mapc (lambda (wr) (when (string-match wr str)
(goto-char (1- end)) (goto-char (1- end))
(throw :skip t))) (throw :skip t)))
@ -4793,7 +4794,7 @@ is active."
txt (org-agenda-format-item txt (org-agenda-format-item
"" ""
(buffer-substring-no-properties (buffer-substring-no-properties
beg1 (point-at-eol)) beg1 (line-end-position))
level category tags t)) level category tags t))
(org-add-props txt props (org-add-props txt props
'org-marker marker 'org-hd-marker marker 'org-marker marker 'org-hd-marker marker
@ -5335,7 +5336,7 @@ each date. It also removes lines that contain only whitespace."
(abbreviate-file-name buffer-file-name)) (abbreviate-file-name buffer-file-name))
"") "")
'org-agenda-diary-link t 'org-agenda-diary-link t
'org-marker (org-agenda-new-marker (point-at-bol)))) 'org-marker (org-agenda-new-marker (line-beginning-position))))
(defun org-diary-default-entry () (defun org-diary-default-entry ()
"Add a dummy entry to the diary. "Add a dummy entry to the diary.
@ -5986,7 +5987,7 @@ then those holidays will be skipped."
clockp (not (or closedp statep)) clockp (not (or closedp statep))
state (and statep (match-string 2)) state (and statep (match-string 2))
category (org-get-category (match-beginning 0)) category (org-get-category (match-beginning 0))
timestr (buffer-substring (match-beginning 0) (point-at-eol))) timestr (buffer-substring (match-beginning 0) (line-end-position)))
(when (string-match "\\]" timestr) (when (string-match "\\]" timestr)
;; substring should only run to end of time stamp ;; substring should only run to end of time stamp
(setq rest (substring timestr (match-end 0)) (setq rest (substring timestr (match-end 0))
@ -6044,7 +6045,7 @@ then those holidays will be skipped."
'type type 'date date 'type type 'date date
'undone-face 'org-warning 'done-face 'org-agenda-done) 'undone-face 'org-warning 'done-face 'org-agenda-done)
(push txt ee)) (push txt ee))
(goto-char (point-at-eol)))) (goto-char (line-end-position))))
(nreverse ee))) (nreverse ee)))
(defun org-agenda-show-clocking-issues () (defun org-agenda-show-clocking-issues ()
@ -6081,7 +6082,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
(setq issue "No valid clock line") (throw 'next t)) (setq issue "No valid clock line") (throw 'next t))
(org-with-point-at m (org-with-point-at m
(save-excursion (save-excursion
(goto-char (point-at-bol)) (goto-char (line-beginning-position))
(unless (looking-at re) (unless (looking-at re)
(error "No valid Clock line") (error "No valid Clock line")
(throw 'next t)) (throw 'next t))
@ -6127,7 +6128,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
(setq tlend (or te tlend) tlstart (or ts tlstart)) (setq tlend (or te tlend) tlstart (or ts tlstart))
(when issue (when issue
;; OK, there was some issue, add an overlay to show the issue ;; OK, there was some issue, add an overlay to show the issue
(setq ov (make-overlay (point-at-bol) (point-at-eol))) (setq ov (make-overlay (line-beginning-position) (line-end-position)))
(overlay-put ov 'before-string (overlay-put ov 'before-string
(concat (concat
(org-add-props (org-add-props
@ -7147,7 +7148,10 @@ The optional argument TYPE tells the agenda type."
(save-excursion (save-excursion
(beginning-of-line 1) (beginning-of-line 1)
(setq re (org-get-at-bol 'org-todo-regexp)) (setq re (org-get-at-bol 'org-todo-regexp))
(goto-char (or (text-property-any (point-at-bol) (point-at-eol) 'org-heading t) (point))) (goto-char (or (text-property-any (line-beginning-position)
(line-end-position)
'org-heading t)
(point)))
(when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +")) (when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +"))
(add-text-properties (match-beginning 0) (match-end 1) (add-text-properties (match-beginning 0) (match-end 1)
(list 'face (org-get-todo-face 1))) (list 'face (org-get-todo-face 1)))
@ -7428,7 +7432,7 @@ subtree."
(point) (point)
(if org-agenda-restriction-lock-highlight-subtree (if org-agenda-restriction-lock-highlight-subtree
(save-excursion (org-end-of-subtree t t) (point)) (save-excursion (org-end-of-subtree t t) (point))
(point-at-eol))) (line-end-position)))
(move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-begin (point))
(move-marker org-agenda-restrict-end (move-marker org-agenda-restrict-end
(save-excursion (org-end-of-subtree t t))) (save-excursion (org-end-of-subtree t t)))
@ -8254,8 +8258,8 @@ grouptags."
(defun org-agenda-filter-hide-line (type) (defun org-agenda-filter-hide-line (type)
"If current line is TYPE, hide it in the agenda buffer." "If current line is TYPE, hide it in the agenda buffer."
(let* (buffer-invisibility-spec (let* (buffer-invisibility-spec
(beg (max (point-min) (1- (point-at-bol)))) (beg (max (point-min) (1- (line-beginning-position))))
(end (point-at-eol))) (end (line-end-position)))
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(add-text-properties (add-text-properties
beg end `(invisible org-filtered org-filter-type ,type))))) 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."
(interactive "p") (interactive "p")
(let ((col (current-column))) (let ((col (current-column)))
(dotimes (_ n) (dotimes (_ n)
(when (next-single-property-change (point-at-eol) 'org-marker) (when (next-single-property-change (line-end-position) 'org-marker)
(move-end-of-line 1) (move-end-of-line 1)
(goto-char (next-single-property-change (point) 'org-marker)))) (goto-char (next-single-property-change (point) 'org-marker))))
(org-move-to-column col)) (org-move-to-column col))
@ -8945,7 +8949,8 @@ When called with a prefix argument, include all archive files as well."
(when (re-search-forward org-complex-heading-regexp nil t) (when (re-search-forward org-complex-heading-regexp nil t)
(goto-char (match-beginning 4))))) (goto-char (match-beginning 4)))))
(run-hooks 'org-agenda-after-show-hook) (run-hooks 'org-agenda-after-show-hook)
(and highlight (org-highlight (point-at-bol) (point-at-eol))))) (and highlight (org-highlight (line-beginning-position)
(line-end-position)))))
(defvar org-agenda-after-show-hook nil (defvar org-agenda-after-show-hook nil
"Normal hook run after an item has been shown from the agenda. "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."
(level (and (eq org-agenda-loop-over-headlines-in-active-region 'start-level) (level (and (eq org-agenda-loop-over-headlines-in-active-region 'start-level)
(org-get-at-bol 'level)))) (org-get-at-bol 'level))))
(while (< (point) mend) (while (< (point) mend)
(let ((ov (make-overlay (point) (point-at-eol)))) (let ((ov (make-overlay (point) (line-end-position))))
(if (not (or all (if (not (or all
(and match (looking-at-p match)) (and match (looking-at-p match))
(eq level (org-get-at-bol 'level)))) (eq level (org-get-at-bol 'level))))
@ -9013,8 +9018,8 @@ Pass ARG, FORCE-ARG, DELETE and BODY to `org-agenda-do-in-region'."
(if (and (derived-mode-p 'org-mode) (not (member type '("sexp")))) (if (and (derived-mode-p 'org-mode) (not (member type '("sexp"))))
(setq dbeg (progn (org-back-to-heading t) (point)) (setq dbeg (progn (org-back-to-heading t) (point))
dend (org-end-of-subtree t t)) dend (org-end-of-subtree t t))
(setq dbeg (point-at-bol) (setq dbeg (line-beginning-position)
dend (min (point-max) (1+ (point-at-eol))))) dend (min (point-max) (1+ (line-end-position)))))
(goto-char dbeg) (goto-char dbeg)
(while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n))))) (while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n)))))
(when (or (eq t org-agenda-confirm-kill) (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."
(>= p beg) (>= p beg)
(< p end)) (< p end))
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(delete-region (point-at-bol) (1+ (point-at-eol))))) (delete-region (line-beginning-position)
(1+ (line-end-position)))))
(beginning-of-line 0)))))) (beginning-of-line 0))))))
(defun org-agenda-refile (&optional goto rfloc no-update) (defun org-agenda-refile (&optional goto rfloc no-update)
@ -9162,7 +9168,8 @@ It also looks at the text of the entry itself."
(let* ((marker (or (org-get-at-bol 'org-hd-marker) (let* ((marker (or (org-get-at-bol 'org-hd-marker)
(org-get-at-bol 'org-marker))) (org-get-at-bol 'org-marker)))
(buffer (and marker (marker-buffer marker))) (buffer (and marker (marker-buffer marker)))
(prefix (buffer-substring (point-at-bol) (point-at-eol))) (prefix (buffer-substring (line-beginning-position)
(line-end-position)))
(lkall (and buffer (org-offer-links-in-entry (lkall (and buffer (org-offer-links-in-entry
buffer marker arg prefix))) buffer marker arg prefix)))
(lk0 (car lkall)) (lk0 (car lkall))
@ -9295,7 +9302,7 @@ if it was hidden in the outline."
(let ((win (selected-window))) (let ((win (selected-window)))
(org-agenda-goto t) (org-agenda-goto t)
(org-back-to-heading) (org-back-to-heading)
(set-window-start (selected-window) (point-at-bol)) (set-window-start (selected-window) (line-beginning-position))
(cond (cond
((= more 0) ((= more 0)
(org-flag-subtree t) (org-flag-subtree t)
@ -9532,7 +9539,8 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags."
(with-current-buffer (marker-buffer hdmarker) (with-current-buffer (marker-buffer hdmarker)
(org-with-wide-buffer (org-with-wide-buffer
(org-agenda-format-item extra newhead level cat tags dotime)))) (org-agenda-format-item extra newhead level cat tags dotime))))
;; pl (text-property-any (point-at-bol) (point-at-eol) 'org-heading t) ;; pl (text-property-any (line-beginning-position)
;; (line-end-position) 'org-heading t)
undone-face (org-get-at-bol 'undone-face) undone-face (org-get-at-bol 'undone-face)
done-face (org-get-at-bol 'done-face)) done-face (org-get-at-bol 'done-face))
(beginning-of-line 1) (beginning-of-line 1)
@ -9549,10 +9557,11 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags."
(replace-match new t t) (replace-match new t t)
(beginning-of-line) (beginning-of-line)
(when mark (move-overlay mark (point) (+ 2 (point))))) (when mark (move-overlay mark (point) (+ 2 (point)))))
(add-text-properties (point-at-bol) (point-at-eol) props) (add-text-properties (line-beginning-position)
(line-end-position) props)
(when fixface (when fixface
(add-text-properties (add-text-properties
(point-at-bol) (point-at-eol) (line-beginning-position) (line-end-position)
(list 'face (list 'face
(if org-last-todo-state-is-todo (if org-last-todo-state-is-todo
undone-face done-face)))) undone-face done-face))))
@ -9560,7 +9569,7 @@ If FORCE-TAGS is non-nil, the car of it returns the new tags."
(beginning-of-line 1)) (beginning-of-line 1))
(t (error "Line update did not work"))) (t (error "Line update did not work")))
(save-restriction (save-restriction
(narrow-to-region (point-at-bol) (point-at-eol)) (narrow-to-region (line-beginning-position) (line-end-position))
(org-agenda-finalize))) (org-agenda-finalize)))
(beginning-of-line 0))))) (beginning-of-line 0)))))
@ -9791,7 +9800,8 @@ When called programmatically, FORCE-DIRECTION can be `set', `up',
(setq arg (- today cdate)))) (setq arg (- today cdate))))
(org-timestamp-change arg (or what 'day)) (org-timestamp-change arg (or what 'day))
(when (and (org-at-date-range-p) (when (and (org-at-date-range-p)
(re-search-backward org-tr-regexp-both (point-at-bol))) (re-search-backward org-tr-regexp-both
(line-beginning-position)))
(let ((end org-last-changed-timestamp)) (let ((end org-last-changed-timestamp))
(org-timestamp-change arg (or what 'day)) (org-timestamp-change arg (or what 'day))
(setq org-last-changed-timestamp (setq org-last-changed-timestamp
@ -9846,7 +9856,7 @@ When called programmatically, FORCE-DIRECTION can be `set', `up',
(length stamp)) (length stamp))
t) t)
(add-text-properties (add-text-properties
(1- (point)) (point-at-eol) (1- (point)) (line-end-position)
(list 'display (org-add-props stamp nil (list 'display (org-add-props stamp nil
'face '(secondary-selection default)))) 'face '(secondary-selection default))))
(beginning-of-line 1)) (beginning-of-line 1))
@ -9990,13 +10000,13 @@ buffer, display it in another window."
(if (equal (buffer-name) "*Calendar*") (if (equal (buffer-name) "*Calendar*")
(setq d1 (calendar-cursor-to-date t) (setq d1 (calendar-cursor-to-date t)
d2 (car calendar-mark-ring)) d2 (car calendar-mark-ring))
(setq dp1 (get-text-property (point-at-bol) 'day)) (setq dp1 (get-text-property (line-beginning-position) 'day))
(unless dp1 (user-error "No date defined in current line")) (unless dp1 (user-error "No date defined in current line"))
(setq d1 (calendar-gregorian-from-absolute dp1) (setq d1 (calendar-gregorian-from-absolute dp1)
d2 (and (ignore-errors (mark)) d2 (and (ignore-errors (mark))
(save-excursion (save-excursion
(goto-char (mark)) (goto-char (mark))
(setq dp2 (get-text-property (point-at-bol) 'day))) (setq dp2 (get-text-property (line-beginning-position) 'day)))
(calendar-gregorian-from-absolute dp2)))) (calendar-gregorian-from-absolute dp2))))
(message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree") (message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree")
(setq char (read-char-exclusive)) (setq char (read-char-exclusive))
@ -10319,7 +10329,7 @@ This is a command that has to be installed in `calendar-mode-map'."
(defun org-agenda-bulk-marked-p () (defun org-agenda-bulk-marked-p ()
"Non-nil when current entry is marked for bulk action." "Non-nil when current entry is marked for bulk action."
(eq (get-char-property (point-at-bol) 'type) (eq (get-char-property (line-beginning-position) 'type)
'org-marked-entry-overlay)) 'org-marked-entry-overlay))
(defun org-agenda-bulk-mark (&optional arg) (defun org-agenda-bulk-mark (&optional arg)
@ -10344,7 +10354,8 @@ When ARG is greater than one mark ARG lines."
(unless (org-agenda-bulk-marked-p) (unless (org-agenda-bulk-marked-p)
(unless m (user-error "Nothing to mark at point")) (unless m (user-error "Nothing to mark at point"))
(push m org-agenda-bulk-marked-entries) (push m org-agenda-bulk-marked-entries)
(setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol)))) (setq ov (make-overlay (line-beginning-position)
(+ 2 (line-beginning-position))))
(org-overlay-display ov (concat org-agenda-bulk-mark-char " ") (org-overlay-display ov (concat org-agenda-bulk-mark-char " ")
(org-get-todo-face "TODO") (org-get-todo-face "TODO")
'evaporate) 'evaporate)
@ -10388,7 +10399,7 @@ When ARG is greater than one mark ARG lines."
(org-agenda-bulk-unmark-all) (org-agenda-bulk-unmark-all)
(cond ((org-agenda-bulk-marked-p) (cond ((org-agenda-bulk-marked-p)
(org-agenda-bulk-remove-overlays (org-agenda-bulk-remove-overlays
(point-at-bol) (+ 2 (point-at-bol))) (line-beginning-position) (+ 2 (line-beginning-position)))
(setq org-agenda-bulk-marked-entries (setq org-agenda-bulk-marked-entries
(delete (org-get-at-bol 'org-hd-marker) (delete (org-get-at-bol 'org-hd-marker)
org-agenda-bulk-marked-entries)) org-agenda-bulk-marked-entries))
@ -10768,8 +10779,8 @@ tag and note")))))
(message "Entry unflagged"))) (message "Entry unflagged")))
(defun org-agenda-get-any-marker (&optional pos) (defun org-agenda-get-any-marker (&optional pos)
(or (get-text-property (or pos (point-at-bol)) 'org-hd-marker) (or (get-text-property (or pos (line-beginning-position)) 'org-hd-marker)
(get-text-property (or pos (point-at-bol)) 'org-marker))) (get-text-property (or pos (line-beginning-position)) 'org-marker)))
;;; Appointment reminders ;;; Appointment reminders

View file

@ -1447,7 +1447,7 @@ Of course, if exact position has been required, just put it there."
(if (org-at-table-p) (if (org-at-table-p)
(save-excursion (save-excursion
(org-table-goto-line (nth 1 where)) (org-table-goto-line (nth 1 where))
(point-at-bol)) (line-beginning-position))
(point)))))) (point))))))
(with-current-buffer (buffer-base-buffer (current-buffer)) (with-current-buffer (buffer-base-buffer (current-buffer))
(org-with-point-at pos (org-with-point-at pos

View file

@ -1317,7 +1317,7 @@ the default behavior."
;; Clock in at which position? ;; Clock in at which position?
(setq target-pos (setq target-pos
(if (and (eobp) (not (org-at-heading-p))) (if (and (eobp) (not (org-at-heading-p)))
(point-at-bol 0) (line-beginning-position 0)
(point))) (point)))
(save-excursion (save-excursion
(when (and selected-task (marker-buffer selected-task)) (when (and selected-task (marker-buffer selected-task))
@ -1666,7 +1666,7 @@ to, overriding the existing value of `org-clock-out-switch-to-state'."
(setq ts (match-string 2)) (setq ts (match-string 2))
(if fail-quietly (throw 'exit nil) (error "Clock start time is gone"))) (if fail-quietly (throw 'exit nil) (error "Clock start time is gone")))
(goto-char (match-end 0)) (goto-char (match-end 0))
(delete-region (point) (point-at-eol)) (delete-region (point) (line-end-position))
(insert "--") (insert "--")
(setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive)) (setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive))
(setq s (org-time-convert-to-integer (setq s (org-time-convert-to-integer
@ -1804,7 +1804,7 @@ Optional argument N tells to change by that many units."
(goto-char org-clock-marker) (goto-char org-clock-marker)
(if (looking-back (concat "^[ \t]*" org-clock-string ".*") (if (looking-back (concat "^[ \t]*" org-clock-string ".*")
(line-beginning-position)) (line-beginning-position))
(progn (delete-region (1- (point-at-bol)) (point-at-eol)) (progn (delete-region (1- (line-beginning-position)) (line-end-position))
(org-remove-empty-drawer-at (point))) (org-remove-empty-drawer-at (point)))
(message "Clock gone, cancel the timer anyway") (message "Clock gone, cancel the timer anyway")
(sit-for 2))) (sit-for 2)))
@ -1946,7 +1946,7 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
(aset ltimes l (+ (aref ltimes l) t1)))) (aset ltimes l (+ (aref ltimes l) t1))))
(setq time (aref ltimes level)) (setq time (aref ltimes level))
(goto-char (match-beginning 0)) (goto-char (match-beginning 0))
(put-text-property (point) (point-at-eol) (put-text-property (point) (line-end-position)
(or propname :org-clock-minutes) time) (or propname :org-clock-minutes) time)
(when headline-filter (when headline-filter
(save-excursion (save-excursion
@ -2114,7 +2114,7 @@ fontified, and then returned."
(forward-line 2) (forward-line 2)
(buffer-substring (point) (progn (buffer-substring (point) (progn
(re-search-forward "^[ \t]*#\\+END" nil t) (re-search-forward "^[ \t]*#\\+END" nil t)
(point-at-bol))))) (line-beginning-position)))))
;;;###autoload ;;;###autoload
(defun org-clock-report (&optional arg) (defun org-clock-report (&optional arg)
@ -2390,7 +2390,7 @@ the currently selected interval size."
(setq n (prefix-numeric-value n)) (setq n (prefix-numeric-value n))
(and (memq dir '(left down)) (setq n (- n))) (and (memq dir '(left down)) (setq n (- n)))
(save-excursion (save-excursion
(goto-char (point-at-bol)) (goto-char (line-beginning-position))
(if (not (looking-at "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>.*?:block[ \t]+\\(\\S-+\\)")) (if (not (looking-at "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>.*?:block[ \t]+\\(\\S-+\\)"))
(user-error "Line needs a :block definition before this command works") (user-error "Line needs a :block definition before this command works")
(let* ((b (match-beginning 1)) (e (match-end 1)) (let* ((b (match-beginning 1)) (e (match-end 1))
@ -3030,7 +3030,7 @@ Otherwise, return nil."
((not (match-end 2)) ((not (match-end 2))
(when (and (equal (marker-buffer org-clock-marker) (current-buffer)) (when (and (equal (marker-buffer org-clock-marker) (current-buffer))
(> org-clock-marker (point)) (> org-clock-marker (point))
(<= org-clock-marker (point-at-eol))) (<= org-clock-marker (line-end-position)))
;; The clock is running here ;; The clock is running here
(setq org-clock-start-time (setq org-clock-start-time
(org-time-string-to-time (match-string 1))) (org-time-string-to-time (match-string 1)))

View file

@ -1028,7 +1028,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'."
(require 'org-agenda) (require 'org-agenda)
(let (p m tp np dir txt) (let (p m tp np dir txt)
(cond (cond
((setq p (text-property-any (point-at-bol) (point-at-eol) ((setq p (text-property-any (line-beginning-position) (line-end-position)
'org-imenu t)) 'org-imenu t))
(setq m (get-text-property p 'org-imenu-marker)) (setq m (get-text-property p 'org-imenu-marker))
(with-current-buffer (marker-buffer m) (with-current-buffer (marker-buffer m)
@ -1038,7 +1038,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'."
(overlays-at (point)))) (overlays-at (point))))
(org-agenda-remove-restriction-lock 'noupdate) (org-agenda-remove-restriction-lock 'noupdate)
(org-agenda-set-restriction-lock 'subtree)))) (org-agenda-set-restriction-lock 'subtree))))
((setq p (text-property-any (point-at-bol) (point-at-eol) ((setq p (text-property-any (line-beginning-position) (line-end-position)
'speedbar-function 'speedbar-find-file)) 'speedbar-function 'speedbar-find-file))
(setq tp (previous-single-property-change (setq tp (previous-single-property-change
(1+ p) 'speedbar-function) (1+ p) 'speedbar-function)
@ -1055,7 +1055,7 @@ To get rid of the restriction, use `\\[org-agenda-remove-restriction-lock]'."
(org-agenda-set-restriction-lock 'file))) (org-agenda-set-restriction-lock 'file)))
(t (user-error "Don't know how to restrict Org mode agenda"))) (t (user-error "Don't know how to restrict Org mode agenda")))
(move-overlay org-speedbar-restriction-lock-overlay (move-overlay org-speedbar-restriction-lock-overlay
(point-at-bol) (point-at-eol)) (line-beginning-position) (line-end-position))
(setq current-prefix-arg nil) (setq current-prefix-arg nil)
(org-agenda-maybe-redo))) (org-agenda-maybe-redo)))

View file

@ -2205,7 +2205,7 @@ CDR is a plist containing `:key', `:value', `:begin', `:end',
(key (progn (looking-at "[ \t]*#\\+\\(\\S-*\\):") (key (progn (looking-at "[ \t]*#\\+\\(\\S-*\\):")
(upcase (match-string-no-properties 1)))) (upcase (match-string-no-properties 1))))
(value (org-trim (buffer-substring-no-properties (value (org-trim (buffer-substring-no-properties
(match-end 0) (point-at-eol)))) (match-end 0) (line-end-position))))
(pos-before-blank (progn (forward-line) (point))) (pos-before-blank (progn (forward-line) (point)))
(end (progn (skip-chars-forward " \r\t\n" limit) (end (progn (skip-chars-forward " \r\t\n" limit)
(if (eobp) (point) (line-beginning-position))))) (if (eobp) (point) (line-beginning-position)))))
@ -4273,7 +4273,7 @@ This function assumes that current major mode is `org-mode'."
(goto-char (point-min)) (goto-char (point-min))
(org-skip-whitespace) (org-skip-whitespace)
(org-element--parse-elements (org-element--parse-elements
(point-at-bol) (point-max) (line-beginning-position) (point-max)
;; Start in `first-section' mode so text before the first ;; Start in `first-section' mode so text before the first
;; headline belongs to a section. ;; headline belongs to a section.
'first-section nil granularity visible-only (list 'org-data nil)))) 'first-section nil granularity visible-only (list 'org-data nil))))
@ -6207,12 +6207,12 @@ end of ELEM-A."
(end-A (save-excursion (end-A (save-excursion
(goto-char (org-element-property :end elem-A)) (goto-char (org-element-property :end elem-A))
(skip-chars-backward " \r\t\n") (skip-chars-backward " \r\t\n")
(point-at-eol))) (line-end-position)))
(beg-B (org-element-property :begin elem-B)) (beg-B (org-element-property :begin elem-B))
(end-B (save-excursion (end-B (save-excursion
(goto-char (org-element-property :end elem-B)) (goto-char (org-element-property :end elem-B))
(skip-chars-backward " \r\t\n") (skip-chars-backward " \r\t\n")
(point-at-eol))) (line-end-position)))
;; Store inner overlays responsible for visibility status. ;; Store inner overlays responsible for visibility status.
;; We also need to store their boundaries as they will be ;; We also need to store their boundaries as they will be
;; removed from buffer. ;; removed from buffer.

Some files were not shown because too many files have changed in this diff Show more