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

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

Re: pre-command-hook not run for DEL


From: Richard Stallman
Subject: Re: pre-command-hook not run for DEL
Date: Sun, 25 Feb 2007 22:27:53 -0500

Does this patch do the right thing?

diff -c /home/rms/emacs/lisp/mouse.el.\~37\~ /home/rms/emacs/lisp/mouse.el
*** /home/rms/emacs/lisp/mouse.el.~37~  Sun Feb 11 17:04:09 2007
--- /home/rms/emacs/lisp/mouse.el       Sun Feb 25 19:20:25 2007
***************
*** 1267,1273 ****
      (unless ignore
        ;; For certain special keys, delete the region.
        (if (member key mouse-region-delete-keys)
!         (delete-region (mark t) (point))
        ;; Otherwise, unread the key so it gets executed normally.
        (setq unread-command-events
              (nconc events unread-command-events))))
--- 1267,1279 ----
      (unless ignore
        ;; For certain special keys, delete the region.
        (if (member key mouse-region-delete-keys)
!         (progn
!           ;; Since notionally this is a separate command,
!           ;; run all the hooks that would be run if it were
!           ;; executed separately.
!           (run-hooks 'post-command-hook)
!           (run-hooks 'pre-command-hook)
!           (delete-region (mark t) (point)))
        ;; Otherwise, unread the key so it gets executed normally.
        (setq unread-command-events
              (nconc events unread-command-events))))

Diff finished.  Sun Feb 25 19:20:47 2007




reply via email to

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