Mercurial > hg > xemacs-beta
comparison lisp/gnus/gnus-undo.el @ 140:585fb297b004 r20-2b4
Import from CVS: tag r20-2b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:32:43 +0200 |
parents | d2f30a177268 |
children | 8eaf7971accc |
comparison
equal
deleted
inserted
replaced
139:2b5203979d01 | 140:585fb297b004 |
---|---|
69 | 69 |
70 (gnus-define-keys gnus-undo-mode-map | 70 (gnus-define-keys gnus-undo-mode-map |
71 "\M-\C-_" gnus-undo | 71 "\M-\C-_" gnus-undo |
72 "\C-_" gnus-undo | 72 "\C-_" gnus-undo |
73 "\C-xu" gnus-undo | 73 "\C-xu" gnus-undo |
74 [(control /)] gnus-undo ; many people are used to type `C-/' on | 74 ;; many people are used to type `C-/' on X terminals and get `C-_'. |
75 ; X terminals and get `C-_'. | 75 [(control /)] gnus-undo)) |
76 )) | |
77 | 76 |
78 (defun gnus-undo-make-menu-bar () | 77 (defun gnus-undo-make-menu-bar () |
78 ;; This is disabled for the time being. | |
79 (when nil | 79 (when nil |
80 (define-key-after (current-local-map) [menu-bar file gnus-undo] | 80 (define-key-after (current-local-map) [menu-bar file gnus-undo] |
81 (cons "Undo" 'gnus-undo-actions) | 81 (cons "Undo" 'gnus-undo-actions) |
82 [menu-bar file whatever]))) | 82 [menu-bar file whatever]))) |
83 | 83 |
84 (defun gnus-undo-mode (&optional arg) | 84 (defun gnus-undo-mode (&optional arg) |
85 "Minor mode for providing `undo' in Gnus buffers. | 85 "Minor mode for providing `undo' in Gnus buffers. |
86 | 86 |
87 \\{gnus-undo-mode-map}" | 87 \\{gnus-undo-mode-map}" |
101 (unless (assq 'gnus-undo-mode minor-mode-map-alist) | 101 (unless (assq 'gnus-undo-mode minor-mode-map-alist) |
102 (push (cons 'gnus-undo-mode gnus-undo-mode-map) | 102 (push (cons 'gnus-undo-mode gnus-undo-mode-map) |
103 minor-mode-map-alist)) | 103 minor-mode-map-alist)) |
104 (make-local-hook 'post-command-hook) | 104 (make-local-hook 'post-command-hook) |
105 (add-hook 'post-command-hook 'gnus-undo-boundary nil t) | 105 (add-hook 'post-command-hook 'gnus-undo-boundary nil t) |
106 (add-hook 'gnus-summary-exit-hook 'gnus-undo-boundary) | |
107 (run-hooks 'gnus-undo-mode-hook))) | 106 (run-hooks 'gnus-undo-mode-hook))) |
108 | 107 |
109 ;;; Interface functions. | 108 ;;; Interface functions. |
110 | 109 |
111 (defun gnus-disable-undo (&optional buffer) | 110 (defun gnus-disable-undo (&optional buffer) |
119 (defun gnus-undo-boundary () | 118 (defun gnus-undo-boundary () |
120 "Set Gnus undo boundary." | 119 "Set Gnus undo boundary." |
121 (if gnus-undo-boundary-inhibit | 120 (if gnus-undo-boundary-inhibit |
122 (setq gnus-undo-boundary-inhibit nil) | 121 (setq gnus-undo-boundary-inhibit nil) |
123 (setq gnus-undo-boundary t))) | 122 (setq gnus-undo-boundary t))) |
123 | |
124 (defun gnus-undo-force-boundary () | |
125 "Set Gnus undo boundary." | |
126 (setq gnus-undo-boundary-inhibit nil | |
127 gnus-undo-boundary t)) | |
124 | 128 |
125 (defun gnus-undo-register (form) | 129 (defun gnus-undo-register (form) |
126 "Register FORMS as something to be performed to undo a change. | 130 "Register FORMS as something to be performed to undo a change. |
127 FORMS may use backtick quote syntax." | 131 FORMS may use backtick quote syntax." |
128 (when gnus-undo-mode | 132 (when gnus-undo-mode |