emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/simple.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el
Date: Sun, 06 Mar 2005 15:15:50 -0500

Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.694 emacs/lisp/simple.el:1.695
*** emacs/lisp/simple.el:1.694  Sun Mar  6 00:32:12 2005
--- emacs/lisp/simple.el        Sun Mar  6 20:15:50 2005
***************
*** 2913,2918 ****
--- 2913,2926 ----
  (put 'mark-inactive 'error-conditions '(mark-inactive error))
  (put 'mark-inactive 'error-message "The mark is not active now")
  
+ (defvar activate-mark-hook nil
+   "Hook run when the mark becomes active.
+ It is also run at the end of a command, if the mark is active and
+ it is possible that the region may have changed")
+ 
+ (defvar deactivate-mark-hook nil
+   "Hook run when the mark becomes inactive.")
+ 
  (defun mark (&optional force)
    "Return this buffer's mark value as integer; error if mark inactive.
  If optional argument FORCE is non-nil, access the mark value
***************
*** 3004,3009 ****
--- 3012,3018 ----
      (if (or arg (null mark) (/= mark (point)))
        (push-mark nil nomsg t)
        (setq mark-active t)
+       (run-hooks 'activate-mark-hook)
        (unless nomsg
        (message "Mark activated")))))
  




reply via email to

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