GNU bug report logs -
#13027
Activating mark does not run mark activation hook
Previous Next
Reported by: Kelly Dean <kellydeanch <at> yahoo.com>
Date: Thu, 29 Nov 2012 10:11:02 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In 24.2, from emacs -Q
(add-hook 'deactivate-mark-hook (lambda () (message "Deactivate mark hook called.")))
(add-hook 'activate-mark-hook (lambda () (message "Activate mark hook called.")))
C-SPC C-SPC C-SPC C-SPC
In *Messages* you get:
Mark set
Activate mark hook called.
Deactivate mark hook called.
Mark deactivated
Mark activated
Deactivate mark hook called.
Mark deactivated
Notice that the second "Activate mark hook called" is missing.
simple.el has:
(defun activate-mark ()
"Activate the mark."
(when (mark t)
(setq mark-active t)
(unless transient-mark-mode
(setq transient-mark-mode 'lambda))))
The bug is fixed by changing that to:
(defun activate-mark ()
"Activate the mark."
(when (mark t)
(setq mark-active t)
(run-hooks 'activate-mark-hook)
(unless transient-mark-mode
(setq transient-mark-mode 'lambda))))
This bug report was last modified 12 years and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.