diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-10-07 12:25:09 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-10-07 12:25:09 -0400 |
commit | 4840b91e41329cd1221e6224142af9ae13fd7606 (patch) | |
tree | d5754fc6bad43232b04b88ac86e9e73bcbe7aa7c /lisp/progmodes/hideshow.el | |
parent | d28581101adb967b32b2d1de93aba34ce69e15d2 (diff) | |
download | emacs-4840b91e41329cd1221e6224142af9ae13fd7606.tar.gz |
Remove aliases of `with-silent-modifications`
There were many reinventions of `with-silent-modifications` (tho
many of them weren't reinventions but copy&paste of code from
font-lock, IIUC). Now that those don't even need to let-bind
`inhibit-point-motion-hooks` they're really just obsolete.
* lisp/font-lock.el (save-buffer-state): Delete macro.
(font-lock-unfontify-region, font-lock-default-fontify-region):
Use `with-silent-modifications` instead.
(font-lock-after-change-function, font-lock-fontify-block): Don't
let-bind `inhibit-point-motion-hooks`.
* lisp/htmlfontify.el (hfy-save-buffer-state): Delete macro.
(hfy-mark-trailing-whitespace, hfy-unmark-trailing-whitespace):
Use `with-silent-modifications` instead.
* lisp/jit-lock.el (with-buffer-prepared-for-jit-lock): Delete macro.
(jit-lock--debug-fontify, jit-lock-refontify, jit-lock-function)
(jit-lock-fontify-now, jit-lock-force-redisplay)
(jit-lock-deferred-fontify, jit-lock-context-fontify)
(jit-lock-after-change): Use `with-silent-modifications` instead.
* lisp/progmodes/antlr-mode.el (save-buffer-state-x): Delete macro.
(antlr-hide-actions): Use `with-silent-modifications` instead.
* lisp/progmodes/hideshow.el (hs-life-goes-on): Don't
let-bind `inhibit-point-motion-hooks`.
Diffstat (limited to 'lisp/progmodes/hideshow.el')
-rw-r--r-- | lisp/progmodes/hideshow.el | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 2a1b6d6b7bb..6de079f05a6 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1994-2022 Free Software Foundation, Inc. ;; Author: Thien-Thi Nguyen <ttn@gnu.org> -;; Dan Nicolaescu <dann@ics.uci.edu> +;; Dan Nicolaescu <dann@gnu.org> ;; Keywords: C C++ java lisp tools editing comments blocks hiding outlines ;; Maintainer-Version: 5.65.2.2 ;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning @@ -256,7 +256,7 @@ This has effect only if `search-invisible' is set to `open'." ;;;###autoload (defvar hs-special-modes-alist - (mapcar 'purecopy + (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) @@ -351,17 +351,17 @@ Use the command `hs-minor-mode' to toggle or set this variable.") (defvar hs-minor-mode-map (let ((map (make-sparse-keymap))) ;; These bindings roughly imitate those used by Outline mode. - (define-key map "\C-c@\C-h" 'hs-hide-block) - (define-key map "\C-c@\C-s" 'hs-show-block) - (define-key map "\C-c@\C-\M-h" 'hs-hide-all) - (define-key map "\C-c@\C-\M-s" 'hs-show-all) - (define-key map "\C-c@\C-l" 'hs-hide-level) - (define-key map "\C-c@\C-c" 'hs-toggle-hiding) - (define-key map "\C-c@\C-a" 'hs-show-all) - (define-key map "\C-c@\C-t" 'hs-hide-all) - (define-key map "\C-c@\C-d" 'hs-hide-block) - (define-key map "\C-c@\C-e" 'hs-toggle-hiding) - (define-key map [(shift mouse-2)] 'hs-toggle-hiding) + (define-key map "\C-c@\C-h" #'hs-hide-block) + (define-key map "\C-c@\C-s" #'hs-show-block) + (define-key map "\C-c@\C-\M-h" #'hs-hide-all) + (define-key map "\C-c@\C-\M-s" #'hs-show-all) + (define-key map "\C-c@\C-l" #'hs-hide-level) + (define-key map "\C-c@\C-c" #'hs-toggle-hiding) + (define-key map "\C-c@\C-a" #'hs-show-all) + (define-key map "\C-c@\C-t" #'hs-hide-all) + (define-key map "\C-c@\C-d" #'hs-hide-block) + (define-key map "\C-c@\C-e" #'hs-toggle-hiding) + (define-key map [(shift mouse-2)] #'hs-toggle-hiding) map) "Keymap for hideshow minor mode.") @@ -778,12 +778,10 @@ region (point MAXP)." (defmacro hs-life-goes-on (&rest body) "Evaluate BODY forms if variable `hs-minor-mode' is non-nil. -In the dynamic context of this macro, `inhibit-point-motion-hooks' -and `case-fold-search' are both t." +In the dynamic context of this macro, `case-fold-search' is t." (declare (debug t)) `(when hs-minor-mode - (let ((inhibit-point-motion-hooks t) - (case-fold-search t)) + (let ((case-fold-search t)) ,@body))) (defun hs-find-block-beginning-match () |