GNU bug report logs - #13027
Activating mark does not run mark activation hook

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13027 in the body.
You can then email your comments to 13027 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13027; Package emacs. (Thu, 29 Nov 2012 10:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kelly Dean <kellydeanch <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 29 Nov 2012 10:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kelly Dean <kellydeanch <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Activating mark does not run mark activation hook
Date: Thu, 29 Nov 2012 02:08:19 -0800 (PST)
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))))





Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Thu, 29 Nov 2012 20:13:01 GMT) Full text and rfc822 format available.

Notification sent to Kelly Dean <kellydeanch <at> yahoo.com>:
bug acknowledged by developer. (Thu, 29 Nov 2012 20:13:01 GMT) Full text and rfc822 format available.

Message #10 received at 13027-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Kelly Dean <kellydeanch <at> yahoo.com>
Cc: 13027-done <at> debbugs.gnu.org
Subject: Re: bug#13027: Activating mark does not run mark activation hook
Date: Thu, 29 Nov 2012 15:10:05 -0500
> 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))))

Thank you, installed,


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Dec 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.