1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 14:30:50 -08:00

; define-globalized-minor-mode: Slightly simplify control flow.

This commit is contained in:
Sean Whitton 2025-10-07 20:18:43 +01:00
parent 3c20a2bb25
commit c510608cb2

View file

@ -621,13 +621,13 @@ list."
;; The function that calls TURN-ON in the current buffer.
(defun ,MODE-enable-in-buffer ()
(unless ,MODE-set-explicitly
(unless (eq ,MODE-major-mode major-mode)
(if ,MODE-variable
(progn
(,mode -1)
(funcall ,turn-on-function))
(funcall ,turn-on-function))))
(unless (or ,MODE-set-explicitly
(eq ,MODE-major-mode major-mode))
(if ,MODE-variable
(progn
(,mode -1)
(funcall ,turn-on-function))
(funcall ,turn-on-function)))
(setq ,MODE-major-mode major-mode))
(put ',MODE-enable-in-buffer 'definition-name ',global-mode))))