emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#12161: closed (24.1.50; delete-selection mode vs a


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#12161: closed (24.1.50; delete-selection mode vs ask-user-about-supersession-threat)
Date: Thu, 09 Aug 2012 02:28:02 +0000

Your message dated Wed, 08 Aug 2012 22:19:33 -0400
with message-id <address@hidden>
and subject line Re: bug#12161: 24.1.50; delete-selection mode vs 
ask-user-about-supersession-threat
has caused the debbugs.gnu.org bug report #12161,
regarding 24.1.50; delete-selection mode vs ask-user-about-supersession-threat
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
12161: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12161
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.1.50; delete-selection mode vs ask-user-about-supersession-threat Date: Wed, 08 Aug 2012 23:49:16 +0100
The following code in delsel.el doesn't seem to be working any more:

        (file-supersession
         ;; If ask-user-about-supersession-threat signals an error,
         ;; stop safe_run_hooks from clearing out pre-command-hook.
         (and (eq inhibit-quit 'pre-command-hook)
              (setq inhibit-quit 'delete-selection-dummy))

I think it hasn't been adjusted for the changes in Emacs 24 which make
safe_run_hooks remove a single function from the hook, rather than
clearing out the hook altogether.

If I change the (eq inhibit-quit 'pre-command-hook) to
(equal inhibit-quit '(pre-command-hook . delete-selection-pre-hook))
then it works again for me.


Full recipe to reproduce:

echo 12345 > /tmp/testfile
emacs -Q /tmp/testfile
M-x delete-selection-mode
  (in another console: touch /tmp/testfile)
C-M-h
DEL
At the prompt 'testfile changed on disk; really edit the buffer?', enter 'n'
The prompt appears a second time; enter 'n' (or 'y')

Now Emacs thinks it is in delete-selection-mode, but the pre-command-hook has
mysteriously evaporated.

-----

In GNU Emacs 24.1.50.2 (i486-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2012-08-08 on golux, modified by Debian
 (emacs-snapshot package, version 2:20120807-1mjw1)



--- End Message ---
--- Begin Message --- Subject: Re: bug#12161: 24.1.50; delete-selection mode vs ask-user-about-supersession-threat Date: Wed, 08 Aug 2012 22:19:33 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
> The following code in delsel.el doesn't seem to be working any more:

>       (file-supersession
>        ;; If ask-user-about-supersession-threat signals an error,
>        ;; stop safe_run_hooks from clearing out pre-command-hook.
>        (and (eq inhibit-quit 'pre-command-hook)
>             (setq inhibit-quit 'delete-selection-dummy))

Indeed, thanks.
I've simplified it so it doesn't need to know about how
safe_run_hook works.


        Stefan


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]