summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-undo.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>1997-09-24 01:50:24 +0000
committerLars Magne Ingebrigtsen <larsi@gnus.org>1997-09-24 01:50:24 +0000
commita8151ef7e5caf46b41fc52f8189b07d1fa6c184e (patch)
tree8eb82a1990da4afe2e247c1397e42a20128f0568 /lisp/gnus/gnus-undo.el
parent5f016f400343a57d641642ce114f90d3a15082e1 (diff)
downloademacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.tar.gz
emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.tar.bz2
emacs-a8151ef7e5caf46b41fc52f8189b07d1fa6c184e.zip
*** empty log message ***
Diffstat (limited to 'lisp/gnus/gnus-undo.el')
-rw-r--r--lisp/gnus/gnus-undo.el25
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el
index 4ce5d92a1e4..b34070a3373 100644
--- a/lisp/gnus/gnus-undo.el
+++ b/lisp/gnus/gnus-undo.el
@@ -73,15 +73,15 @@
"\M-\C-_" gnus-undo
"\C-_" gnus-undo
"\C-xu" gnus-undo
- [(control /)] gnus-undo ; many people are used to type `C-/' on
- ; X terminals and get `C-_'.
- ))
+ ;; many people are used to type `C-/' on X terminals and get `C-_'.
+ [(control /)] gnus-undo))
(defun gnus-undo-make-menu-bar ()
+ ;; This is disabled for the time being.
(when nil
- (define-key-after (current-local-map) [menu-bar file gnus-undo]
- (cons "Undo" 'gnus-undo-actions)
- [menu-bar file whatever])))
+ (define-key-after (current-local-map) [menu-bar file gnus-undo]
+ (cons "Undo" 'gnus-undo-actions)
+ [menu-bar file whatever])))
(defun gnus-undo-mode (&optional arg)
"Minor mode for providing `undo' in Gnus buffers.
@@ -97,15 +97,9 @@
;; Set up the menu.
(when (gnus-visual-p 'undo-menu 'menu)
(gnus-undo-make-menu-bar))
- ;; Don't display anything in the mode line -- too annoying.
- ;;(unless (assq 'gnus-undo-mode minor-mode-alist)
- ;; (push '(gnus-undo-mode " Undo") minor-mode-alist))
- (unless (assq 'gnus-undo-mode minor-mode-map-alist)
- (push (cons 'gnus-undo-mode gnus-undo-mode-map)
- minor-mode-map-alist))
+ (gnus-add-minor-mode 'gnus-undo-mode "" gnus-undo-mode-map)
(make-local-hook 'post-command-hook)
(add-hook 'post-command-hook 'gnus-undo-boundary nil t)
- (add-hook 'gnus-summary-exit-hook 'gnus-undo-boundary)
(run-hooks 'gnus-undo-mode-hook)))
;;; Interface functions.
@@ -124,6 +118,11 @@
(setq gnus-undo-boundary-inhibit nil)
(setq gnus-undo-boundary t)))
+(defun gnus-undo-force-boundary ()
+ "Set Gnus undo boundary."
+ (setq gnus-undo-boundary-inhibit nil
+ gnus-undo-boundary t))
+
(defun gnus-undo-register (form)
"Register FORMS as something to be performed to undo a change.
FORMS may use backtick quote syntax."