mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Use with-silent-modifications.
* lisp/composite.el (save-buffer-state): Delete, unused. * lisp/font-lock.el (save-buffer-state): Use with-silent-modifications. (font-lock-default-fontify-region): Use with-syntax-table. * lisp/jit-lock.el (with-buffer-unmodified): Remove. (with-buffer-prepared-for-jit-lock): Use with-silent-modifications.
This commit is contained in:
parent
f291fe60fb
commit
d36b74ca27
4 changed files with 40 additions and 91 deletions
|
|
@ -413,27 +413,6 @@ after a sequence of character events."
|
|||
|
||||
;;; Automatic character composition.
|
||||
|
||||
;; Copied from font-lock.el.
|
||||
(eval-when-compile
|
||||
;; Borrowed from lazy-lock.el.
|
||||
;; We use this to preserve or protect things when modifying text properties.
|
||||
(defmacro save-buffer-state (varlist &rest body)
|
||||
"Bind variables according to VARLIST and eval BODY restoring buffer state."
|
||||
`(let* ,(append varlist
|
||||
'((modified (buffer-modified-p)) (buffer-undo-list t)
|
||||
(inhibit-read-only t) (inhibit-point-motion-hooks t)
|
||||
(inhibit-modification-hooks t)
|
||||
deactivate-mark buffer-file-name buffer-file-truename))
|
||||
,@body
|
||||
(unless modified
|
||||
(restore-buffer-modified-p nil))))
|
||||
;; Fixme: This makes bootstrapping fail with this error.
|
||||
;; Symbol's function definition is void: eval-defun
|
||||
;;(def-edebug-spec save-buffer-state let)
|
||||
)
|
||||
|
||||
(put 'save-buffer-state 'lisp-indent-function 1)
|
||||
|
||||
;; These macros must match with C macros LGSTRING_XXX and LGLYPH_XXX in font.h
|
||||
(defsubst lgstring-header (gstring) (aref gstring 0))
|
||||
(defsubst lgstring-set-header (gstring header) (aset gstring 0 header))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue