mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Nix some useless uses of looking-at, looking-back
* lisp/allout.el (allout-kill-topic): (allout-next-topic-pending-encryption): * lisp/bookmark.el (bookmark-kill-line): * lisp/cus-edit.el (custom-save-variables, custom-save-faces): * lisp/cus-theme.el (custom-theme-write-variables): (custom-theme-write-faces): * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads): * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): * lisp/emacs-lisp/checkdoc.el (checkdoc-interactive-loop): (checkdoc-interactive-ispell-loop): (checkdoc-message-interactive-ispell-loop, checkdoc-this-string-valid): (checkdoc-this-string-valid-engine): * lisp/emacs-lisp/elint.el (elint-get-top-forms): * lisp/emulation/viper-cmd.el (viper-backward-indent): * lisp/image-dired.el (image-dired-delete-char): * lisp/simple.el (kill-visual-line): Replace instances of looking-at, looking-back with char comparisons using following-char, preceding-char.
This commit is contained in:
parent
862d6438cf
commit
91478f4623
11 changed files with 23 additions and 24 deletions
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue