diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 16 | ||||
-rw-r--r-- | lisp/emacs-lisp/elint.el | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index ca1d75176dc..1b7ff36f422 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -748,7 +748,7 @@ FILE's modification time." (setq output-start (autoload--setup-output otherbuf outbuf absfile load-name))) (autoload--print-cookie-text output-start load-name file)) - ((looking-at ";") + ((= (following-char) ?\;) ;; Don't read the comment. (forward-line 1)) (t diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6e8442291f8..75e6b904aa6 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2013,7 +2013,7 @@ With argument ARG, insert value in current buffer after the form." ;; Compile the forms from the input buffer. (while (progn (while (progn (skip-chars-forward " \t\n\^l") - (looking-at ";")) + (= (following-char) ?\;)) (forward-line 1)) (not (eobp))) (setq byte-compile-read-position (point) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 59edbe100e1..1d6fdfa4e87 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -603,7 +603,7 @@ style." (checkdoc-overlay-put cdo 'face 'highlight) ;; Make sure the whole doc string is visible if possible. (sit-for 0) - (if (and (looking-at "\"") + (if (and (= (following-char) ?\") (not (pos-visible-in-window-p (save-excursion (forward-sexp 1) (point)) (selected-window)))) @@ -743,9 +743,9 @@ buffer, otherwise searching starts at START-HERE." (while (checkdoc-next-docstring) (message "Searching for doc string spell error...%d%%" (floor (* 100.0 (point)) (point-max))) - (if (looking-at "\"") - (checkdoc-ispell-docstring-engine - (save-excursion (forward-sexp 1) (point-marker))))) + (when (= (following-char) ?\") + (checkdoc-ispell-docstring-engine + (save-excursion (forward-sexp 1) (point-marker))))) (message "Checkdoc: Done.")))) (defun checkdoc-message-interactive-ispell-loop (start-here) @@ -763,7 +763,7 @@ buffer, otherwise searching starts at START-HERE." (while (checkdoc-message-text-next-string (point-max)) (message "Searching for message string spell error...%d%%" (floor (* 100.0 (point)) (point-max))) - (if (looking-at "\"") + (if (= (following-char) ?\") (checkdoc-ispell-docstring-engine (save-excursion (forward-sexp 1) (point-marker))))) (message "Checkdoc: Done.")))) @@ -1381,7 +1381,7 @@ See the style guide in the Emacs Lisp manual for more details." "All variables and subroutines might as well have a \ documentation string") (point) (+ (point) 1) t))))) - (if (and (not err) (looking-at "\"")) + (if (and (not err) (= (following-char) ?\")) (with-syntax-table checkdoc-syntax-table (checkdoc-this-string-valid-engine fp)) err))) @@ -1395,7 +1395,7 @@ regexp short cuts work. FP is the function defun information." ;; we won't accidentally lose our place. This could cause ;; end-of doc string whitespace to also delete the " char. (s (point)) - (e (if (looking-at "\"") + (e (if (= (following-char) ?\") (save-excursion (forward-sexp 1) (point-marker)) (point)))) (or @@ -1475,7 +1475,7 @@ regexp short cuts work. FP is the function defun information." ((looking-at "[\\!?;:.)]") ;; These are ok nil) - ((and checkdoc-permit-comma-termination-flag (looking-at ",")) + ((and checkdoc-permit-comma-termination-flag (= (following-char) ?,)) nil) (t ;; If it is not a complete sentence, let's see if we can diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index d68e49fa4b2..f5e10a24d37 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -372,7 +372,7 @@ Returns the forms." (let ((elint-current-pos (point))) ;; non-list check could be here too. errors may be out of seq. ;; quoted check cannot be elsewhere, since quotes skipped. - (if (looking-back "'" (1- (point))) + (if (= (preceding-char) ?\') ;; Eg cust-print.el uses ' as a comment syntax. (elint-warning "Skipping quoted form `%c%.20s...'" ?\' (read (current-buffer))) |