mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Merge from origin/emacs-26
17ebb6e(origin/emacs-26) Use consistent function names in thread-tes...1c86229Fix format error in Faccept_process_outputb38b91aLessen stack consumption in recursive read13eb4603Match w32 paths in grep sans --null hits (Bug#32051)5cc7c4bFix previous make-network-process changed6a1b69Another documentation improvement in flyspell.el9b49a8eImprove documentation of Flyspell3744fdaProvide feature 'threadsef9025fSave the server alias on reconnect (Bug#29657)db3874bRefer to "proper lists" instead of "true lists"35e0305Avoid turning on the global-minor-mode recursively51bf4e4Fix Bug#32085
This commit is contained in:
commit
cda7e1850f
13 changed files with 161 additions and 77 deletions
|
|
@ -474,22 +474,26 @@ See `%s' for more information on %s."
|
|||
|
||||
;; The function that calls TURN-ON in each buffer.
|
||||
(defun ,MODE-enable-in-buffers ()
|
||||
(dolist (buf ,MODE-buffers)
|
||||
(when (buffer-live-p buf)
|
||||
(with-current-buffer buf
|
||||
(unless ,MODE-set-explicitly
|
||||
(unless (eq ,MODE-major-mode major-mode)
|
||||
(if ,mode
|
||||
(progn
|
||||
(,mode -1)
|
||||
(funcall #',turn-on))
|
||||
(funcall #',turn-on))))
|
||||
(setq ,MODE-major-mode major-mode)))))
|
||||
(let ((buffers ,MODE-buffers))
|
||||
;; Clear MODE-buffers to avoid scanning the same list of
|
||||
;; buffers in recursive calls to MODE-enable-in-buffers.
|
||||
;; Otherwise it could lead to infinite recursion.
|
||||
(setq ,MODE-buffers nil)
|
||||
(dolist (buf buffers)
|
||||
(when (buffer-live-p buf)
|
||||
(with-current-buffer buf
|
||||
(unless ,MODE-set-explicitly
|
||||
(unless (eq ,MODE-major-mode major-mode)
|
||||
(if ,mode
|
||||
(progn
|
||||
(,mode -1)
|
||||
(funcall #',turn-on))
|
||||
(funcall #',turn-on))))
|
||||
(setq ,MODE-major-mode major-mode))))))
|
||||
(put ',MODE-enable-in-buffers 'definition-name ',global-mode)
|
||||
|
||||
(defun ,MODE-check-buffers ()
|
||||
(,MODE-enable-in-buffers)
|
||||
(setq ,MODE-buffers nil)
|
||||
(remove-hook 'post-command-hook ',MODE-check-buffers))
|
||||
(put ',MODE-check-buffers 'definition-name ',global-mode)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue