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

View file

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

View file

@ -387,7 +387,7 @@
(interactive)
(unless (eq major-mode 'calc-keypad-mode)
(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))
(x (/ (current-column) (if (>= y 4) 6 5)))
radix frac inv

View file

@ -48,7 +48,7 @@
(let ((stuff (calc-top-list n (- num n -1))))
(calc-cursor-stack-index num)
(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)))
(calc-cursor-stack-index (- num n))
(if (null nn)
@ -410,8 +410,8 @@ Interactively, reads the register using `register-read-with-preview'."
(setq single t)
(setq arg (prefix-numeric-value arg))
(if (= arg 0)
(setq top (point-at-bol)
bot (point-at-eol))
(setq top (line-beginning-position)
bot (line-end-position))
(save-excursion
(setq top (point))
(forward-line arg)

View file

@ -133,7 +133,7 @@ DIR defaults to `default-directory'."
(goto-char (point-min))
(when (not (eobp))
(file-name-as-directory
(buffer-substring (point) (point-at-eol)))))))
(buffer-substring (point) (line-end-position)))))))
(defun cedet-gnu-global-version-check (&optional noerror)
"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)
(forward-line 1)
(beginning-of-line)
(skip-chars-forward "- *><[]" (point-at-eol)))
(skip-chars-forward "- *><[]" (line-end-position)))
(defun data-debug-prev ()
"Go to the previous line in the Ddebug buffer."
(interactive)
(forward-line -1)
(beginning-of-line)
(skip-chars-forward "- *><[]" (point-at-eol)))
(skip-chars-forward "- *><[]" (line-end-position)))
(defun data-debug-next-expando ()
"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-contract-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)
"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)
(let* ((end-of-cmd
(save-excursion
(if (re-search-forward "(" (point-at-eol) t)
(if (re-search-forward "(" (line-end-position) t)
(progn
(forward-char -1)
(forward-sexp 1)
(point))
;; Else, just return EOL.
(point-at-eol))))
(line-end-position))))
(cnt 0))
(save-restriction
(narrow-to-region (point-at-bol) end-of-cmd)
(narrow-to-region (line-beginning-position) end-of-cmd)
(condition-case nil
(progn
(down-list 1)
@ -417,7 +417,7 @@ INDEX starts at 1."
(down-list 1)
(re-search-forward ", ?" nil nil (1- index))
(let ((end (save-excursion
(re-search-forward ",\\|)" (point-at-eol))
(re-search-forward ",\\|)" (line-end-position))
(forward-char -1)
(point))))
(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)
;; This variable may be shared between multiple targets.
(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.
nil
(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)))
(if (string= path "nil")
nil
(delete-region (point-at-bol) (point-at-bol 2)))))))))
(delete-region (line-beginning-position)
(line-beginning-position 2)))))))))
;;;
;; Autoload generators

View file

@ -911,7 +911,7 @@ Kill the Configure buffer if it was not already in a buffer."
(goto-char (point-min))
(when (re-search-forward (concat "^" (regexp-quote var) "\\s-*=\\s-*")
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)
"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)
(looking-at "^\\([0-9]+\\):")
(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)))
(setq depth (1- depth)))
(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."
(save-excursion
(goto-char (or point (point)))
(let ((start (point-at-bol))
(let ((start (line-beginning-position))
(end (save-excursion
(end-of-line)
(when (not (eobp))

View file

@ -437,8 +437,8 @@ I think it just returns t/nil dependent on if VAR has been defined."
(progn
(semantic-push-parser-warning
(format "Skip %s" (buffer-substring-no-properties
(point-at-bol) (point-at-eol)))
(point-at-bol) (point-at-eol))
(line-beginning-position) (line-end-position)))
(line-beginning-position) (line-end-position))
nil)
t)))
@ -501,8 +501,10 @@ code to parse."
;; The if indicates to skip this preprocessor section
(let () ;; (pt nil)
(semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
(point-at-bol) (point-at-eol))
(semantic-push-parser-warning (format "Skip %s" (buffer-substring-no-properties
(line-beginning-position)
(line-end-position)))
(line-beginning-position) (line-end-position))
(beginning-of-line)
;; (setq pt (point))
;; 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")
;; If a grammar footer is found, skip it.
(re-search-backward "^;;;\\s-+\\S-+\\s-+ends here"
(point-at-bol) t)
(line-beginning-position) t)
(skip-chars-backward "\r\n\t")
(point)))
"\n"))

View file

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

View file

@ -826,7 +826,7 @@ Argument BEG and END specify the bounds of SYM in the buffer."
(goto-char end)
(setq arg-parsed
(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
;; to a macro. Point max may be too far if there
;; 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
;; whatever white space we matched to begin
;; 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.
(if (bolp)
(backward-char 1)))

View file

@ -555,7 +555,7 @@ deleting the buffers that were opened."
(when (re-search-forward (if (memq searchtype '(regexp tagregexp))
searchtxt
(regexp-quote searchtxt))
(point-at-eol)
(line-end-position)
t)
(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."
(interactive)
(beginning-of-line)
(when (re-search-forward "\\[[-+]\\]" (point-at-eol) t)
(when (re-search-forward "\\[[-+]\\]" (line-end-position) t)
(forward-char -1)
(push-button)))
@ -255,7 +255,7 @@ BUTTON is the button that was clicked."
(forward-line (1- H))
(beginning-of-line)
(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)))
(goto-char (button-start button))
(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))
(goto-char (point-min))
(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"))
(goto-char (match-beginning 0))
;; 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))
(forward-line (1- 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))
(save-excursion ;; Leave cursor after the matched name.
(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 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.
(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
;; header line which is IMHO not really useful
(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))
(while (string-match "%" str start)
@ -959,7 +959,7 @@ function was called, move the overlay."
(goto-char (semantic-tag-start tag))
(search-forward (semantic-tag-name tag) nil t)
(overlay-put ol 'tag tag)
(move-overlay ol (point-at-bol) (point-at-eol)))))))
(move-overlay ol (line-beginning-position) (line-end-position)))))))
nil)
(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_")
(forward-sexp 1))
(setq end (point))
(unless (re-search-backward "\\s-" (point-at-bol) t)
(unless (re-search-backward "\\s-" (line-beginning-position) t)
(beginning-of-line))
(setq tmp (buffer-substring-no-properties (point) end))
;; (setq symlist

View file

@ -496,7 +496,7 @@ It is assumed that the comment occurs just after VAR-IN."
;; Find any existing doc strings.
(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))
)
@ -521,7 +521,7 @@ It is assumed that the comment occurs just after VAR-IN."
(end-of-line)
(delete-horizontal-space)
(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
(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?"
(save-excursion
(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))
(< (current-column) 70))))

View file

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

View file

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

View file

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

View file

@ -591,7 +591,7 @@ content of the sexp."
(begin (previous-single-property-change end 'backtrace-form
nil (point-min))))
(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"))
(goto-char end)
(setq pos end

View file

@ -1235,7 +1235,8 @@ Order is by depth-first search."
(let (new-l new-c)
(save-excursion
(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)))
(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)
"Zap up to N chars without deleting EOLs."
(if (not (eobp))
(if (< n (- (point-at-eol) (point)))
(if (< n (- (line-end-position) (point)))
(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)
"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)))
(far (save-excursion
(goto-char bottom)
(point-at-bol (1- height)))))
(line-beginning-position (1- height)))))
(ignore top far)
,@body))

View file

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

View file

@ -417,7 +417,7 @@ q trust status questionable. - trust status unspecified.
'epa-key))
(setq keys (cons key 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
(list key)))))

View file

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

View file

@ -343,7 +343,7 @@ The INDENT level is ignored."
"Return the text for the item on the current line."
(beginning-of-line)
(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 ()
"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
;; some margin of error if what is displayed on the line differs
;; 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)
(erc-insert-aligned string pos)
(newline)

View file

@ -948,7 +948,7 @@ out of NAME."
(save-excursion
(re-search-backward (regexp-opt
(mapcar 'car preferred-suffix-rules))
(point-at-bol)
(line-beginning-position)
t))
(push (cons "" (cdr (assoc (match-string 0) ; i.e. "(TeX-current-macro)"
preferred-suffix-rules)))
@ -962,7 +962,7 @@ out of NAME."
(concat (car rule) name (cdr rule)))
guess-rules)))
(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)
(ffap-tex-init)

View file

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

View file

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

View file

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

View file

@ -509,7 +509,7 @@ Optional argument SHOW means show them unconditionally."
(let ((bmrk (gnus-bookmark-bmenu-bookmark)))
(setq 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)
;; Strip off `mouse-face' from the white spaces region.
(if (display-mouse-p)
@ -543,7 +543,7 @@ Optional argument SHOW means show them unconditionally."
"Kill from point to end of line.
If optional arg NEWLINE-TOO is non-nil, delete the newline too.
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"))
(delete-char 1)))

View file

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

View file

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

View file

@ -150,7 +150,7 @@ Obeys the standard process/prefix convention."
(concat "^" (regexp-quote gnus-agent-target-move-group-header)
":") nil t)
(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))
(goto-char (point-min))
(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-update-format-specifications nil 'group 'group-mode)
(let ((case-fold-search nil)
(props (text-properties-at (point-at-bol)))
(props (text-properties-at (line-beginning-position)))
(empty (= (point-min) (point-max)))
(group (gnus-group-group-name))
number)
@ -1724,24 +1724,24 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated."
(defun gnus-group-group-name ()
"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)
(group (symbol-name group)))))
(defun gnus-group-group-level ()
"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 ()
"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
(funcall gnus-group-indentation-function))
""))
(defun gnus-group-group-unread ()
"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)
(if (nnmail-new-mail-p group)
@ -2095,14 +2095,14 @@ be permanent."
(looking-at "[][\C-@-*,/;-@\\^`{-\C-?]")))
(prog1 t
(skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?"
(point-at-bol))))
(line-beginning-position))))
(and (looking-at "[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*$")
(prog1 t
(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-?]*\\'"
(buffer-substring (point-at-bol) (point))))
(buffer-substring (line-beginning-position) (point))))
(when (looking-at regexp)
(match-string 1))
(let (group distance)
@ -2111,7 +2111,7 @@ be permanent."
distance (- (match-beginning 1) (match-beginning 0))))
(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 (and group (<= distance (- start (match-end 0))))
group
@ -3948,10 +3948,10 @@ The killed newsgroups can be yanked by using \\[gnus-group-yank-group]."
(count-lines
(progn
(goto-char begin)
(point-at-bol))
(line-beginning-position))
(progn
(goto-char end)
(point-at-bol))))))
(line-beginning-position))))))
(goto-char begin)
(beginning-of-line) ;Important when LINES < 1
(gnus-group-kill-group lines)))

View file

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

View file

@ -686,7 +686,7 @@ it in the environment specified by BINDINGS."
(unless (zerop level)
(gnus-tree-indent level)
(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.
(while (progn
(forward-line -1)
@ -710,7 +710,7 @@ it in the environment specified by BINDINGS."
(defsubst gnus-tree-indent-vertical ()
(let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent)
(- (point) (point-at-bol)))))
(- (point) (line-beginning-position)))))
(when (> len 0)
(insert (make-string len ? )))))

View file

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

View file

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

View file

@ -339,13 +339,13 @@ The following commands are available:
(gnus-server-position-point))
(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))))
(defun gnus-server-named-server ()
"Return a server name that matches one of the names returned by
`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))))
(defalias 'gnus-server-position-point 'gnus-goto-colon)
@ -949,7 +949,7 @@ how new groups will be entered into the group buffer."
(save-excursion
(beginning-of-line)
(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) ":"
(or name
(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))
(setq end (point))
(goto-char (match-beginning 0))
(delete-region (point-at-bol) end))))
(delete-region (line-beginning-position) end))))
(goto-char (point-max))
;; Make sure that each dribble entry is a single line, so that
;; the "remove" code above works.
@ -2173,7 +2173,7 @@ The info element is shared with the same element of
(unless ignore-errors
(gnus-message 3 "Warning - invalid active: %s"
(buffer-substring
(point-at-bol) (point-at-eol))))))
(line-beginning-position) (line-end-position))))))
(forward-line 1)))))
(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.
(concat gnus-newsrc-options
(buffer-substring
(point-at-bol)
(line-beginning-position)
;; Options may continue on the next line.
(or (and (re-search-forward "^[^ \t]" nil 'move)
(point-at-bol))
(line-beginning-position))
(point)))))
(forward-line -1))
(group
@ -2592,8 +2592,8 @@ The form should return either t or nil."
;; The line was buggy.
(setq group nil)
(gnus-error 3.1 "Mangled line: %s"
(buffer-substring (point-at-bol)
(point-at-eol))))
(buffer-substring (line-beginning-position)
(line-end-position))))
nil))
;; Skip past ", ". Spaces are invalid in these ranges, but
;; 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)
(setq eol
(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-at-eol)))
(line-end-position)))
;; Search for all "words"...
(while (re-search-forward "[^ \t,\n]+" eol t)
(if (eq (char-after (match-beginning 0)) ?!)

View file

@ -3383,7 +3383,7 @@ marks of articles."
(let (config)
(goto-char (point-min))
(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))
(forward-line 1))
config)))
@ -4505,7 +4505,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise."
(let (header)
;; overview: [num subject from date id refs chars lines misc]
(unwind-protect
(narrow-to-region (point) (point-at-eol))
(narrow-to-region (point) (line-end-position))
(unless (eobp)
(forward-char))
(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))))
;; Get the thread this article is part of.
(setq thread (gnus-remove-thread id)))
(setq old-pos (point-at-bol))
(setq old-pos (line-beginning-position))
(setq current (save-excursion
(and (re-search-backward "[\r\n]" nil t)
(gnus-summary-article-number))))
@ -4845,9 +4845,9 @@ If LINE, insert the rebuilt thread starting on line LINE."
(gnus-summary-show-thread)
(gnus-data-remove
number
(- (point-at-bol)
(- (line-beginning-position)
(prog1
(1+ (point-at-eol))
(1+ (line-end-position))
(gnus-delete-line)))))))
(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:"))
(search-forward "\nXref:" nil t))
(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)))))))
(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))
(gnus-data-remove
number
(- (point-at-bol)
(- (line-beginning-position)
(prog1
(1+ (point-at-eol))
(1+ (line-end-position))
(gnus-delete-line))))))
;; Remove list identifiers from subject.
(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)
(let ((forward (cdr (assq type gnus-summary-mark-positions)))
(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 (looking-at "\r")
(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."
(interactive nil gnus-summary-mode)
(let* ((orig (point))
(end (point-at-eol))
(end (line-end-position))
(end (or (gnus-summary--inv end) (gnus-summary--inv (1- end))))
;; Leave point at bol
(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>.
(when gnus-summary-selected-face
(save-excursion
(let* ((beg (point-at-bol))
(end (point-at-eol))
(let* ((beg (line-beginning-position))
(end (line-end-position))
;; Fix by Mike Dugan <dugan@bucrf16.bu.edu>.
(from (if (get-text-property beg 'mouse-face)
beg
@ -12732,7 +12732,7 @@ If REVERSE, save parts that do not match TYPE."
(with-no-warnings ;See docstring of gnus-summary-highlight.
(defvar score) (defvar default) (defvar default-high) (defvar default-low)
(defvar mark) (defvar uncached))
(let* ((beg (point-at-bol))
(let* ((beg (line-beginning-position))
(article (or (gnus-summary-article-number) gnus-current-article))
(score (or (cdr (assq article
gnus-newsgroup-scored))
@ -12748,7 +12748,7 @@ If REVERSE, save parts that do not match TYPE."
(let ((face (funcall (gnus-summary-highlight-line-0))))
(unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face))
(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)))
(when gnus-summary-highlight-line-function
(funcall gnus-summary-highlight-line-function article face))))))
@ -12895,7 +12895,7 @@ treated as multipart/mixed."
(insert "Mime-Version: 1.0\n")
(widen)
(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-remove-header "Content-Type")
(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 ()
"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 ()
"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 ()
"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)
"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 ()
"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)
(let ((total 0)
@ -188,7 +188,7 @@ If TOPIC, start with that topic."
(defun gnus-group-active-topic-p ()
"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)
"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).
(defmacro gnus-delete-line (&optional n)
`(delete-region (point-at-bol)
`(delete-region (line-beginning-position)
(progn (forward-line ,(or n 1)) (point))))
(defun gnus-extract-address-components (from)
@ -178,7 +178,7 @@ is slower."
(defun gnus-goto-colon ()
(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)
(search-forward ":" eol t)
(point)))))

View file

@ -544,11 +544,11 @@ didn't work, and overwrite existing files. Otherwise, ask each time."
"Various"))))
(goto-char (point-min))
(when (re-search-forward "^Subject: ")
(delete-region (point) (point-at-eol))
(delete-region (point) (line-end-position))
(insert subject))
(goto-char (point-min))
(when (re-search-forward "^From:")
(delete-region (point) (point-at-eol))
(delete-region (point) (line-end-position))
(insert " " from))
(let ((message-forward-decoded-p 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 "\\|"
gnus-uu-end-string))
(when (not found)
(setq length (- (point-at-eol) (point-at-bol))))
(setq length (- (line-end-position) (line-beginning-position))))
(setq found t)
(beginning-of-line)
(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))
(re-search-forward
(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))
(when gnus-uu-post-separate-description

View file

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

View file

@ -307,7 +307,7 @@
(while (re-search-forward
"^X-Gnus-Newsgroup:"
(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))
(kill-buffer (current-buffer))
result)
@ -424,7 +424,7 @@
(defun nnbabyl-delete-mail (&optional force leave-delim)
;; Delete the current X-Gnus-Newsgroup line.
(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.
(save-excursion
(save-restriction
@ -630,7 +630,8 @@
(while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) " nil t)
(if (gethash (setq id (match-string 1)) idents)
(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)
(nnbabyl-save-mail
(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.
;; And the id is in the fourth field.
(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)
(beginning-of-line)
(setq found t)

View file

@ -179,7 +179,7 @@ all. This may very well take some time.")
(goto-char (match-end 0))
(setq num (string-to-number
(buffer-substring
(point) (point-at-eol))))
(point) (line-end-position))))
(goto-char start)
(< num article)))
;; Check that we are before an article with a
@ -189,7 +189,7 @@ all. This may very well take some time.")
(progn
(setq num (string-to-number
(buffer-substring
(point) (point-at-eol))))
(point) (line-end-position))))
(> num article))
;; Discard any article numbers before the one we're
;; now looking at.
@ -259,7 +259,7 @@ all. This may very well take some time.")
(if (search-forward (concat "\n" nnfolder-article-marker)
nil t)
(string-to-number (buffer-substring
(point) (point-at-eol)))
(point) (line-end-position)))
-1))))))))
(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 ()
(skip-chars-forward " \t")
(buffer-substring (point) (point-at-eol)))
(buffer-substring (point) (line-end-position)))
(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")
(defun nnheader-parse-nov (&optional number)
(let ((eol (point-at-eol))
(let ((eol (line-end-position))
references in-reply-to x header)
(setq header
(make-full-mail-header
@ -632,7 +632,7 @@ the line could be found."
;; This is invalid, but not all articles have Message-IDs.
()
(mail-position-on-field "References")
(let ((begin (point-at-bol))
(let ((begin (line-beginning-position))
(fill-column 78)
(fill-prefix "\t"))
(when references

View file

@ -661,7 +661,7 @@ nn*-request-list should have been called before calling this function."
(while (not (eobp))
(condition-case nil
(progn
(narrow-to-region (point) (point-at-eol))
(narrow-to-region (point) (line-end-position))
(setq group (read buffer)
group
(cond ((symbolp group)
@ -1116,7 +1116,7 @@ FUNC will be called with the group name to determine the article number."
(while (not (eobp))
(unless (< (move-to-column 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))
;; Allow washing.
(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")
(unless (looking-at "[\r\n]")
(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
;; 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)))
(progn
(replace-match cur)
(delete-region cpoint (point-at-bol))
(delete-region cpoint (line-beginning-position))
(forward-line)
(setq cpoint (point)))
(forward-line)))

View file

@ -601,7 +601,7 @@ non-nil.")
(search-forward id nil t)) ; We find the ID.
;; And the id is in the fourth field.
(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)
(beginning-of-line)
(setq found t)
@ -755,7 +755,7 @@ article number. This function is called narrowed to an article."
(nnheader-insert-nov headers)))
(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)
"Parse the head of the current buffer."
@ -1061,7 +1061,7 @@ Use the nov database for the current group if available."
(regexp-quote
(concat group ":" old-number-string))
"\\>")
(point-at-eol) t))
(line-end-position) t))
(replace-match
(concat group ":" new-number-string)))
;; Save to the new file:
@ -1109,7 +1109,7 @@ Use the nov database for the current group if available."
(regexp-quote
(concat group ":" old-number-string))
"\\>")
(point-at-eol) t)
(line-end-position) t)
(replace-match
(concat "\\1" group ":" new-number-string))))))
;; 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)
(if (looking-at (regexp-quote command))
(delete-region pos (progn (forward-line 1)
(point-at-bol)))))))
(line-beginning-position)))))))
(nnheader-report 'nntp "Couldn't open connection to %s."
nntp-address))))
@ -503,7 +503,7 @@ retried once before actually displaying the error report."
(goto-char pos)
(if (looking-at (regexp-quote command))
(delete-region pos (progn (forward-line 1)
(point-at-bol)))))))
(line-beginning-position)))))))
(nnheader-report 'nntp "Couldn't open connection to %s."
nntp-address))))
@ -528,7 +528,8 @@ retried once before actually displaying the error report."
(with-current-buffer buffer
(goto-char pos)
(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."
nntp-address))))

View file

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

View file

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

View file

@ -291,7 +291,7 @@ symbol `ask', query before flushing the queue file."
(goto-char (point-min))
(while (and (not (eobp))
(re-search-forward
"http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t))
"http://\\([^/]+\\)\\(/.*\\) *$" (line-end-position) t))
(let ((spam-report-gmane-wait
(zerop (% (line-number-at-pos) spam-report-gmane-max-requests))))
(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)
(goto-char (point-min))
(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
(if spam-ifile-all-categories
(setq return category)
@ -2321,7 +2321,7 @@ With a non-nil REMOVE, remove the ADDRESSES."
(with-temp-buffer
(insert-file-contents file)
(while (not (eobp))
(setq address (buffer-substring (point) (point-at-eol)))
(setq address (buffer-substring (point) (line-end-position)))
(forward-line 1)
;; insert the e-mail address if detected, otherwise the raw data
(unless (zerop (length address))

View file

@ -310,7 +310,7 @@ matches may be returned from the message body."
(buffer-substring-no-properties
opoint (point)))))
(if delete
(delete-region (point-at-bol) (point)))))
(delete-region (line-beginning-position) (point)))))
(if list
value
(and (not (string= value "")) value)))
@ -326,7 +326,8 @@ matches may be returned from the message body."
(prog1
(buffer-substring-no-properties opoint (point))
(if delete
(delete-region (point-at-bol) (1+ (point))))))))))))
(delete-region (line-beginning-position)
(1+ (point))))))))))))
;; Parse a list of tokens separated by commas.
;; 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)
(save-excursion
(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))
(setq p (point))))
(when (or (not (bolp))

View file

@ -264,7 +264,7 @@ Buffer is not displayed if SHOW is non-nil."
(delete-char 1))))
(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)
;; FIXME: Why use `mspools-files-len' instead
;; 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 ()
"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?
(car (nth line-num mspools-files))))

View file

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

View file

@ -474,7 +474,7 @@ for `smtpmail-try-auth-method'.")
(smtpmail--sanitize-error-message result))))))
(delete-file file-data)
(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))))
(defun smtpmail--sanitize-error-message (string)
@ -1057,7 +1057,8 @@ Returns an error if the server cannot be contacted."
(while data-continue
(with-current-buffer buffer
(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)
(setq data-continue (not (eobp))))
(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.
Expands ranges into set of individual numbers."
(let ((msgs ())
(end-of-line (point-at-eol))
(end-of-line (line-end-position))
num)
(while (re-search-forward "[0-9]+" end-of-line t)
(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))
(beg (save-excursion
(if (re-search-backward "\\([:,]\\|^\\)[ \t]*"
(point-at-bol) 'move)
(line-beginning-position) 'move)
(goto-char (match-end 0)))
(point)))
(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.
(skip-chars-forward " ")
(point)))
(> (skip-chars-forward "^ )" (point-at-eol)) 0))
(> (skip-chars-forward "^ )" (line-end-position)) 0))
(push (buffer-substring start (point)) flag-list))
(cl-assert (eq (char-after) ?\)) nil "In imap-parse-flag-list 2")
(imap-forward)

View file

@ -694,7 +694,7 @@ an alist of attribute/value pairs."
(while (progn
(skip-chars-forward " \t\n")
(not (eobp)))
(setq dn (buffer-substring (point) (point-at-eol)))
(setq dn (buffer-substring (point) (line-end-position)))
(forward-line 1)
(while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\
\\|[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))
(goto-char (point-min))
(while (not (eobp))
(let* ((pos (point-at-eol))
(let* ((pos (line-end-position))
(item (get-text-property (point) :nt-item))
(age (newsticker--age item))
(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)
(with-current-buffer (newsticker--treeview-list-buffer)
(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)))
(defun newsticker--treeview-list-highlight-start ()
@ -1080,7 +1081,7 @@ Arguments are ignored."
(with-current-buffer (newsticker--treeview-tree-buffer)
(goto-char pos)
(move-overlay newsticker--tree-selection-overlay
(point-at-bol) (1+ (point-at-eol))
(line-beginning-position) (1+ (line-end-position))
(current-buffer)))
(if (window-live-p (newsticker--treeview-tree-window))
(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)
(if (eq (char-before) ?\))
(insert ")\n ")
(goto-char (1+ (point-at-bol)))
(goto-char (1+ (line-beginning-position)))
(delete-region (point) (point-max)))))
(when (eq (char-before) ? )
(delete-char -2))

View file

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

View file

@ -1198,12 +1198,12 @@ FMT and ARGS are passed to `error'."
(let ((inhibit-read-only t))
(goto-char (point-min))
;; 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)
(delete-region (point-min) (point)))
;; Delete the prompt.
(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)
(delete-region (point-min) (point)))
(when (tramp-search-regexp prompt)

View file

@ -694,7 +694,7 @@ buffer in your bug report.
(setq buffer-read-only nil)
(goto-char (point-min))
(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 0)
(let ((start (point)))

View file

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

View file

@ -1188,7 +1188,7 @@ component is used as the target of the symlink."
(tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-min))
(buffer-substring (point-min) (point-at-eol))))
(buffer-substring (point-min) (line-end-position))))
;; Use Perl implementation.
((and (tramp-get-remote-perl v)
@ -1334,7 +1334,7 @@ component is used as the target of the symlink."
(setq res-symlink-target
(if (looking-at-p "\"")
(read (current-buffer))
(buffer-substring (point) (point-at-eol)))))
(buffer-substring (point) (line-end-position)))))
(forward-line)
;; ... file mode flags
(read (current-buffer))
@ -1416,7 +1416,7 @@ component is used as the target of the symlink."
(format "%s -ild %s"
(tramp-get-ls-command v)
(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
v localname "visited-file-modtime-ild" attr))
(setq last-coding-system-used coding-system-used)
@ -1460,7 +1460,7 @@ of."
(tramp-get-ls-command v)
(tramp-shell-quote-argument localname)))
(with-current-buffer (tramp-get-buffer v)
(setq attr (buffer-substring (point) (point-at-eol))))
(setq attr (buffer-substring (point) (line-end-position))))
(equal
attr
(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))))))
(with-current-buffer (tramp-get-buffer vec)
(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)
"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))))
(with-current-buffer (tramp-get-connection-buffer v)
(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)
(match-string 3) (match-string 4))))))
;; Return the context.
@ -1817,7 +1817,7 @@ ID-FORMAT valid values are `string' and `integer'."
(tramp-error
v 'file-error
"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'
;; then it should end in `ok'. If neither are in the
;; 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))))
(while (zerop (forward-line -1))
(push (buffer-substring (point) (point-at-eol)) result)))
(push (buffer-substring (point) (line-end-position)) result)))
result))))))
;; cp, mv and ln
@ -3124,7 +3124,8 @@ implementation will be used."
(tramp-shell-quote-argument (format "kill -%d $$" i))))
(with-current-buffer (tramp-get-connection-buffer vec)
(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)
(format "Signal %d" i)
res)))
@ -4087,8 +4088,8 @@ This function expects to be in the right *tramp* buffer."
(when (search-backward "tramp_executable " nil t)
(skip-chars-forward "^ ")
(skip-chars-forward " ")
(setq result (buffer-substring (point) (point-at-eol)))))
result)))
(setq result (buffer-substring (point) (line-end-position)))))
result)))
;; 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
@ -5276,7 +5277,7 @@ function waits for output unless NOOUTPUT is set."
;; A simple-minded busybox has sent " ^H" sequences.
;; Delete them.
(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)
(delete-region (point-min) (point)))
;; Delete the prompt.
@ -5368,7 +5369,7 @@ raises an error."
(unless noerror signal-hook-function)))
(read (current-buffer)))
;; Error handling.
(when (re-search-forward "\\S-" (point-at-eol) t)
(when (re-search-forward "\\S-" (line-end-position) t)
(error nil)))
(error (unless noerror
(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)."
;; We are called from `tramp-smb-get-file-entries', which sets the
;; 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)
(if (not share)
@ -1877,7 +1877,7 @@ are listed. Result is the list (LOCALNAME MODE SIZE MTIME)."
(member
"pathnames"
(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)
"Check whether the SMB server supports the `stat' command."

View file

@ -215,7 +215,7 @@ arguments to pass to the OPERATION."
(progn
;; Read the expression.
(goto-char (point-min))
(buffer-substring (point) (point-at-eol)))
(buffer-substring (point) (line-end-position)))
":" 'omit))))
;; The equivalent to `exec-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)))
(with-current-buffer (tramp-get-connection-buffer v)
(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)
(match-string 3) (match-string 4))))))
;; Return the context.
@ -752,7 +752,7 @@ ID-FORMAT valid values are `string' and `integer'."
(delete-region (point-min) (point))
;; Delete empty lines.
(goto-char (point-min))
(while (and (not (eobp)) (= (point) (point-at-eol)))
(while (and (not (eobp)) (= (point) (line-end-position)))
(forward-line))
(delete-region (point-min) (point))
(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
(prog1 (read (current-buffer))
;; Error handling.
(when (re-search-forward "\\S-" (point-at-eol) t)
(when (re-search-forward "\\S-" (line-end-position) t)
(error nil)))
(error (tramp-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.
User is always nil."
(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))))
(or
(> (skip-chars-forward skip-chars) 0)
@ -3236,7 +3236,7 @@ Either user or host may be nil."
(concat
"^\\(" tramp-host-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)))))
(forward-line 1)
result))
@ -3318,7 +3318,7 @@ Host is always \"localhost\"."
Host is always \"localhost\"."
(let (result
(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")))
(forward-line 1)
result))
@ -3339,7 +3339,7 @@ Host is always \"localhost\"."
"Return a (group host) tuple allowed to access.
Host is always \"localhost\"."
(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))
(setq result (list (nth 0 split) "localhost")))
(forward-line 1)
@ -3374,7 +3374,7 @@ User is always nil."
User is always nil."
(let (result
(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))))
(forward-line 1)
result))
@ -4142,12 +4142,12 @@ Let-bind it when necessary.")
(goto-char (point-min))
(while (setq start
(text-property-not-all
(point) (point-at-eol) 'dired-filename t))
(point) (line-end-position) 'dired-filename t))
(delete-region
start
(or (text-property-any start (point-at-eol) 'dired-filename t)
(point-at-eol)))
(if (= (point-at-bol) (point-at-eol))
(or (text-property-any start (line-end-position) 'dired-filename t)
(line-end-position)))
(if (= (line-beginning-position) (line-end-position))
;; Empty line.
(delete-region (point) (progn (forward-line) (point)))
(forward-line)))))))))

View file

@ -82,7 +82,7 @@
(goto-char (point-min))
;; Go through the file, line by line.
(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.
(while (not (eobp))
(skip-chars-forward "\t ")
@ -205,7 +205,7 @@ MODE can be \"login\" or \"password\", suitable for passing to
(with-temp-buffer
(insert-file-contents netrc-services-file)
(while (search-forward "#" nil t)
(delete-region (1- (point)) (point-at-eol)))
(delete-region (1- (point)) (line-end-position)))
(goto-char (point-min))
(while (re-search-forward
"^ *\\([^ \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)))
(far (save-excursion
(goto-char bottom)
(point-at-bol (1- height)))))
(line-beginning-position (1- height)))))
,@body))
(defun tpu-paragraph (num)

View file

@ -917,7 +917,7 @@ arguments and pop open the results in a preview buffer."
vals ""))))))
(save-excursion
(goto-char begin)
(goto-char (point-at-eol))
(goto-char (line-end-position))
(unless (= (char-before (point)) ?\ ) (insert " "))
(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))
(indent (make-string (current-indentation) ?\s)))
(when (string-match "^[[:space:]]*$"
(buffer-substring (point-at-bol)
(point-at-eol)))
(delete-region (point-at-bol) (point-at-eol)))
(buffer-substring (line-beginning-position)
(line-end-position)))
(delete-region (line-beginning-position) (line-end-position)))
(insert (concat
(if (looking-at "^") "" "\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
(goto-char (point-min))
(forward-line (- lineNo 1))
(buffer-substring (point) (point-at-eol)))
(buffer-substring (point) (line-end-position)))
nil)))
(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)
(re-search-forward "^[ \t]*[^# \t]" nil t)
(when (< (setq beg (point-min))
(setq end (point-at-bol)))
(setq end (line-beginning-position)))
(delete-region beg end)))
(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?
(if (string= erc-line (erc-prompt))
(progn
(goto-char (point-at-bol))
(goto-char (line-beginning-position))
(when (search-backward-regexp "^[^ ]" nil t)
(buffer-substring-no-properties (point-at-bol)
(point-at-eol))))
(buffer-substring-no-properties (line-beginning-position)
(line-end-position))))
(when (search-backward erc-line nil t)
(buffer-substring-no-properties (point-at-bol)
(point-at-eol)))))))
(buffer-substring-no-properties (line-beginning-position)
(line-end-position)))))))
(defun org-irc-erc-store-link ()
"Store a link to the IRC log file or the session itself.
@ -151,7 +151,7 @@ the session itself."
(require 'erc-log)
(if org-irc-link-to-logs
(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)))
(if (erc-logging-enabled nil)
(progn

View file

@ -1481,7 +1481,7 @@ non-nil."
(let ((end (region-end)))
(goto-char (region-beginning))
(set-mark (point))
(while (< (point-at-eol) end)
(while (< (line-end-position) end)
(move-end-of-line 1) (activate-mark)
(let (current-prefix-arg)
(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."
(declare (debug t))
(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)))
(with-current-buffer (marker-buffer ,marker)
(save-excursion
@ -3076,10 +3076,10 @@ s Search for keywords M Like m, but only TODO entries
(when (eq rmheader t)
(org-goto-line 1)
(re-search-forward ":" nil t)
(delete-region (match-end 0) (point-at-eol))
(delete-region (match-end 0) (line-end-position))
(forward-char 1)
(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)))
(goto-char header-end)
(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."
(save-excursion
(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)
(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))))
(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))
(unless (looking-at "[ \t]*$")
(move-to-column ind)
(delete-region (point-at-bol) (point)))
(delete-region (line-beginning-position) (point)))
(beginning-of-line 2))
(run-hooks 'org-agenda-entry-text-cleanup-hook)
@ -3987,7 +3987,7 @@ agenda display, configure `org-agenda-finalize-hook'."
(goto-char (point-min))
(while (equal (forward-line) 0)
(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
(org-with-point-at mrk
(org-get-tags))))))))
@ -4035,7 +4035,8 @@ agenda display, configure `org-agenda-finalize-hook'."
(goto-char s)
(when (equal (org-get-at-bol 'org-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 'face 'org-agenda-clocking)
(overlay-put ov 'help-echo
@ -4066,7 +4067,7 @@ agenda display, configure `org-agenda-finalize-hook'."
b (match-beginning 1)
e (if (eq org-agenda-fontify-priorities 'cookies)
(1+ (match-end 2))
(point-at-eol))
(line-end-position))
ov (make-overlay b e))
(overlay-put
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.
Also moves point to the end of the skipped region, so that search can
continue from there."
(let ((p (point-at-bol)) to)
(let ((p (line-beginning-position)) to)
(when (or
(save-excursion (goto-char p) (looking-at comment-start-skip))
(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
org-agenda-entry-text-leaders))))
(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 'org-overlay-type 'agenda-entry-content)
(overlay-put o 'after-string txt))))
@ -4749,7 +4750,7 @@ is active."
(forward-line -1)
(org-back-to-heading t)))
(skip-chars-forward "* ")
(setq beg (point-at-bol)
(setq beg (line-beginning-position)
beg1 (point)
end (progn
(outline-next-heading)
@ -4764,8 +4765,8 @@ is active."
(goto-char beg)
(org-agenda-skip)
(setq str (buffer-substring-no-properties
(point-at-bol)
(if hdl-only (point-at-eol) end)))
(line-beginning-position)
(if hdl-only (line-end-position) end)))
(mapc (lambda (wr) (when (string-match wr str)
(goto-char (1- end))
(throw :skip t)))
@ -4793,7 +4794,7 @@ is active."
txt (org-agenda-format-item
""
(buffer-substring-no-properties
beg1 (point-at-eol))
beg1 (line-end-position))
level category tags t))
(org-add-props txt props
'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))
"")
'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 ()
"Add a dummy entry to the diary.
@ -5986,7 +5987,7 @@ then those holidays will be skipped."
clockp (not (or closedp statep))
state (and statep (match-string 2))
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)
;; substring should only run to end of time stamp
(setq rest (substring timestr (match-end 0))
@ -6044,7 +6045,7 @@ then those holidays will be skipped."
'type type 'date date
'undone-face 'org-warning 'done-face 'org-agenda-done)
(push txt ee))
(goto-char (point-at-eol))))
(goto-char (line-end-position))))
(nreverse ee)))
(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))
(org-with-point-at m
(save-excursion
(goto-char (point-at-bol))
(goto-char (line-beginning-position))
(unless (looking-at re)
(error "No valid Clock line")
(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))
(when 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
(concat
(org-add-props
@ -7147,7 +7148,10 @@ The optional argument TYPE tells the agenda type."
(save-excursion
(beginning-of-line 1)
(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 "\\) +"))
(add-text-properties (match-beginning 0) (match-end 1)
(list 'face (org-get-todo-face 1)))
@ -7428,7 +7432,7 @@ subtree."
(point)
(if org-agenda-restriction-lock-highlight-subtree
(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-end
(save-excursion (org-end-of-subtree t t)))
@ -8254,8 +8258,8 @@ grouptags."
(defun org-agenda-filter-hide-line (type)
"If current line is TYPE, hide it in the agenda buffer."
(let* (buffer-invisibility-spec
(beg (max (point-min) (1- (point-at-bol))))
(end (point-at-eol)))
(beg (max (point-min) (1- (line-beginning-position))))
(end (line-end-position)))
(let ((inhibit-read-only t))
(add-text-properties
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")
(let ((col (current-column)))
(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)
(goto-char (next-single-property-change (point) 'org-marker))))
(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)
(goto-char (match-beginning 4)))))
(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
"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)
(org-get-at-bol 'level))))
(while (< (point) mend)
(let ((ov (make-overlay (point) (point-at-eol))))
(let ((ov (make-overlay (point) (line-end-position))))
(if (not (or all
(and match (looking-at-p match))
(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"))))
(setq dbeg (progn (org-back-to-heading t) (point))
dend (org-end-of-subtree t t))
(setq dbeg (point-at-bol)
dend (min (point-max) (1+ (point-at-eol)))))
(setq dbeg (line-beginning-position)
dend (min (point-max) (1+ (line-end-position)))))
(goto-char dbeg)
(while (re-search-forward "^[ \t]*\\S-" dend t) (setq n (1+ n)))))
(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 end))
(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))))))
(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)
(org-get-at-bol 'org-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
buffer marker arg prefix)))
(lk0 (car lkall))
@ -9295,7 +9302,7 @@ if it was hidden in the outline."
(let ((win (selected-window)))
(org-agenda-goto t)
(org-back-to-heading)
(set-window-start (selected-window) (point-at-bol))
(set-window-start (selected-window) (line-beginning-position))
(cond
((= more 0)
(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)
(org-with-wide-buffer
(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)
done-face (org-get-at-bol 'done-face))
(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)
(beginning-of-line)
(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
(add-text-properties
(point-at-bol) (point-at-eol)
(line-beginning-position) (line-end-position)
(list 'face
(if org-last-todo-state-is-todo
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))
(t (error "Line update did not work")))
(save-restriction
(narrow-to-region (point-at-bol) (point-at-eol))
(narrow-to-region (line-beginning-position) (line-end-position))
(org-agenda-finalize)))
(beginning-of-line 0)))))
@ -9791,7 +9800,8 @@ When called programmatically, FORCE-DIRECTION can be `set', `up',
(setq arg (- today cdate))))
(org-timestamp-change arg (or what 'day))
(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))
(org-timestamp-change arg (or what 'day))
(setq org-last-changed-timestamp
@ -9846,7 +9856,7 @@ When called programmatically, FORCE-DIRECTION can be `set', `up',
(length stamp))
t)
(add-text-properties
(1- (point)) (point-at-eol)
(1- (point)) (line-end-position)
(list 'display (org-add-props stamp nil
'face '(secondary-selection default))))
(beginning-of-line 1))
@ -9990,13 +10000,13 @@ buffer, display it in another window."
(if (equal (buffer-name) "*Calendar*")
(setq d1 (calendar-cursor-to-date t)
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"))
(setq d1 (calendar-gregorian-from-absolute dp1)
d2 (and (ignore-errors (mark))
(save-excursion
(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))))
(message "Diary entry: [d]ay [a]nniversary [b]lock [j]ump to date tree")
(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 ()
"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))
(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 m (user-error "Nothing to mark at point"))
(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-get-todo-face "TODO")
'evaporate)
@ -10388,7 +10399,7 @@ When ARG is greater than one mark ARG lines."
(org-agenda-bulk-unmark-all)
(cond ((org-agenda-bulk-marked-p)
(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
(delete (org-get-at-bol 'org-hd-marker)
org-agenda-bulk-marked-entries))
@ -10768,8 +10779,8 @@ tag and note")))))
(message "Entry unflagged")))
(defun org-agenda-get-any-marker (&optional pos)
(or (get-text-property (or pos (point-at-bol)) 'org-hd-marker)
(get-text-property (or pos (point-at-bol)) 'org-marker)))
(or (get-text-property (or pos (line-beginning-position)) 'org-hd-marker)
(get-text-property (or pos (line-beginning-position)) 'org-marker)))
;;; 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)
(save-excursion
(org-table-goto-line (nth 1 where))
(point-at-bol))
(line-beginning-position))
(point))))))
(with-current-buffer (buffer-base-buffer (current-buffer))
(org-with-point-at pos

View file

@ -1317,7 +1317,7 @@ the default behavior."
;; Clock in at which position?
(setq target-pos
(if (and (eobp) (not (org-at-heading-p)))
(point-at-bol 0)
(line-beginning-position 0)
(point)))
(save-excursion
(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))
(if fail-quietly (throw 'exit nil) (error "Clock start time is gone")))
(goto-char (match-end 0))
(delete-region (point) (point-at-eol))
(delete-region (point) (line-end-position))
(insert "--")
(setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive))
(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)
(if (looking-back (concat "^[ \t]*" org-clock-string ".*")
(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)))
(message "Clock gone, cancel the timer anyway")
(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))))
(setq time (aref ltimes level))
(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)
(when headline-filter
(save-excursion
@ -2114,7 +2114,7 @@ fontified, and then returned."
(forward-line 2)
(buffer-substring (point) (progn
(re-search-forward "^[ \t]*#\\+END" nil t)
(point-at-bol)))))
(line-beginning-position)))))
;;;###autoload
(defun org-clock-report (&optional arg)
@ -2390,7 +2390,7 @@ the currently selected interval size."
(setq n (prefix-numeric-value n))
(and (memq dir '(left down)) (setq n (- n)))
(save-excursion
(goto-char (point-at-bol))
(goto-char (line-beginning-position))
(if (not (looking-at "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>.*?:block[ \t]+\\(\\S-+\\)"))
(user-error "Line needs a :block definition before this command works")
(let* ((b (match-beginning 1)) (e (match-end 1))
@ -3030,7 +3030,7 @@ Otherwise, return nil."
((not (match-end 2))
(when (and (equal (marker-buffer org-clock-marker) (current-buffer))
(> org-clock-marker (point))
(<= org-clock-marker (point-at-eol)))
(<= org-clock-marker (line-end-position)))
;; The clock is running here
(setq org-clock-start-time
(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)
(let (p m tp np dir txt)
(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))
(setq m (get-text-property p 'org-imenu-marker))
(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))))
(org-agenda-remove-restriction-lock 'noupdate)
(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))
(setq tp (previous-single-property-change
(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)))
(t (user-error "Don't know how to restrict Org mode agenda")))
(move-overlay org-speedbar-restriction-lock-overlay
(point-at-bol) (point-at-eol))
(line-beginning-position) (line-end-position))
(setq current-prefix-arg nil)
(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-*\\):")
(upcase (match-string-no-properties 1))))
(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)))
(end (progn (skip-chars-forward " \r\t\n" limit)
(if (eobp) (point) (line-beginning-position)))))
@ -4273,7 +4273,7 @@ This function assumes that current major mode is `org-mode'."
(goto-char (point-min))
(org-skip-whitespace)
(org-element--parse-elements
(point-at-bol) (point-max)
(line-beginning-position) (point-max)
;; Start in `first-section' mode so text before the first
;; headline belongs to a section.
'first-section nil granularity visible-only (list 'org-data nil))))
@ -6207,12 +6207,12 @@ end of ELEM-A."
(end-A (save-excursion
(goto-char (org-element-property :end elem-A))
(skip-chars-backward " \r\t\n")
(point-at-eol)))
(line-end-position)))
(beg-B (org-element-property :begin elem-B))
(end-B (save-excursion
(goto-char (org-element-property :end elem-B))
(skip-chars-backward " \r\t\n")
(point-at-eol)))
(line-end-position)))
;; Store inner overlays responsible for visibility status.
;; We also need to store their boundaries as they will be
;; removed from buffer.

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