diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-08-23 04:54:57 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-08-23 04:54:57 +0200 |
commit | b7e867b841f47dcff3aeaef9b5608a237386ce70 (patch) | |
tree | 57154cb336fcfdf9fbf80e4c6bb24b07a0432b66 /lisp/cedet | |
parent | e425b7d231d02e76ec3e3790418121fc07877e70 (diff) | |
download | emacs-b7e867b841f47dcff3aeaef9b5608a237386ce70.tar.gz emacs-b7e867b841f47dcff3aeaef9b5608a237386ce70.tar.bz2 emacs-b7e867b841f47dcff3aeaef9b5608a237386ce70.zip |
Make point-at-eol and point-at-bol obsolete
* lisp/subr.el (point-at-eol, point-at-bol): Make XEmacs compat
aliases obsolete in favor of `pos-bol'/'line-beginning-position' or
'pos-eol'/'line-end-position'. Update callers.
Ref: https://lists.gnu.org/r/emacs-devel/2022-08/msg00853.html
Diffstat (limited to 'lisp/cedet')
-rw-r--r-- | lisp/cedet/cedet-global.el | 2 | ||||
-rw-r--r-- | lisp/cedet/data-debug.el | 6 | ||||
-rw-r--r-- | lisp/cedet/ede/autoconf-edit.el | 8 | ||||
-rw-r--r-- | lisp/cedet/ede/pmake.el | 2 | ||||
-rw-r--r-- | lisp/cedet/ede/proj-elisp.el | 3 | ||||
-rw-r--r-- | lisp/cedet/ede/project-am.el | 2 | ||||
-rw-r--r-- | lisp/cedet/ede/speedbar.el | 2 | ||||
-rw-r--r-- | lisp/cedet/pulse.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/bovine/c.el | 10 | ||||
-rw-r--r-- | lisp/cedet/semantic/grammar.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/idle.el | 8 | ||||
-rw-r--r-- | lisp/cedet/semantic/lex-spp.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/lex.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/symref.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/symref/list.el | 8 | ||||
-rw-r--r-- | lisp/cedet/semantic/util-modes.el | 6 | ||||
-rw-r--r-- | lisp/cedet/semantic/wisent/javascript.el | 2 | ||||
-rw-r--r-- | lisp/cedet/srecode/document.el | 6 | ||||
-rw-r--r-- | lisp/cedet/srecode/insert.el | 2 |
19 files changed, 40 insertions, 37 deletions
diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el index 6a147bf430c..a2d8bae36b4 100644 --- a/lisp/cedet/cedet-global.el +++ b/lisp/cedet/cedet-global.el @@ -133,7 +133,7 @@ DIR defaults to `default-directory'." (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. diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index e7635c0aec5..605dc9fa19c 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -902,14 +902,14 @@ If PARENT is non-nil, it is somehow related as a parent to thing." (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." diff --git a/lisp/cedet/ede/autoconf-edit.el b/lisp/cedet/ede/autoconf-edit.el index faf50edaa13..78edea1da8d 100644 --- a/lisp/cedet/ede/autoconf-edit.el +++ b/lisp/cedet/ede/autoconf-edit.el @@ -383,16 +383,16 @@ Optional argument BODY is the code to execute which edits the autoconf file." (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)) diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index 9a913109f09..7739115b31f 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -566,7 +566,7 @@ Argument THIS is the target that should insert stuff." (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)))) diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index 7c56ca19936..594d8f1c29d 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el @@ -272,7 +272,8 @@ is found, such as a `-version' variable, or the standard header." (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 diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index 544e39b8729..de6936ad1a8 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -911,7 +911,7 @@ Kill the Configure buffer if it was not already in a buffer." (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." diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index 604b660344c..f45c070539a 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -175,7 +175,7 @@ Argument DIR is the directory from which to derive the list of objects." (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)))) diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index f7af10887c9..9941f2a0cb7 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -202,7 +202,7 @@ If POINT is nil or missing, the current point is used instead. 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)) diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index ee1cbcad4da..d4ce20589e6 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -437,8 +437,8 @@ I think it just returns t/nil dependent on if VAR has been defined." (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 diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 97456265ead..d42022e0423 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -252,7 +252,7 @@ That is tag names plus names defined in tag attribute `:rest'." (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")) diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index 1afb1d841dd..2d6f26919d7 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -818,13 +818,13 @@ visible, then highlight it." (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)) diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index 4bdaaf77acf..b66e5c19cb2 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -826,7 +826,7 @@ Argument BEG and END specify the bounds of SYM in the buffer." (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. diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 9c64cc9f7e5..75c4ee328d6 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -1423,7 +1423,7 @@ Return either a paren token or a semantic list token depending on ;; 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))) diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index e48cefa4ca6..16bbacc428e 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -555,7 +555,7 @@ deleting the buffers that were opened." (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)) ) diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el index 7823dad6ef9..eacbb6f1f8e 100644 --- a/lisp/cedet/semantic/symref/list.el +++ b/lisp/cedet/semantic/symref/list.el @@ -234,7 +234,7 @@ Some useful functions are found in `semantic-format-tag-functions'." "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 diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index fdd93c6bcf8..33fed9191e1 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el @@ -750,7 +750,7 @@ If there is no function, disable the header line." (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 diff --git a/lisp/cedet/semantic/wisent/javascript.el b/lisp/cedet/semantic/wisent/javascript.el index cc7ae1b181e..492f574fce6 100644 --- a/lisp/cedet/semantic/wisent/javascript.el +++ b/lisp/cedet/semantic/wisent/javascript.el @@ -107,7 +107,7 @@ This is currently needed for the mozrepl omniscient database." (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 diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el index 8c5f343e98c..a25d1441f1f 100644 --- a/lisp/cedet/srecode/document.el +++ b/lisp/cedet/srecode/document.el @@ -496,7 +496,7 @@ It is assumed that the comment occurs just after VAR-IN." ;; 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)))) diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index c0260c62a91..db17b7f23f8 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el @@ -406,7 +406,7 @@ Specify the :blank argument to enable this inserter.") ((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"))) ) |