[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102348: * lisp/gnus/smime.el (smime-
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102348: * lisp/gnus/smime.el (smime-mode): Use define-derived-mode. |
Date: |
Thu, 11 Nov 2010 17:24:03 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102348
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2010-11-11 17:24:03 -0500
message:
* lisp/gnus/smime.el (smime-mode): Use define-derived-mode.
(smime-mode-map): Move initialization into declaration.
(gnus-run-mode-hooks): Don't autoload.
modified:
lisp/gnus/ChangeLog
lisp/gnus/smime.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-11-11 04:07:40 +0000
+++ b/lisp/gnus/ChangeLog 2010-11-11 22:24:03 +0000
@@ -1,3 +1,9 @@
+2010-11-11 Stefan Monnier <address@hidden>
+
+ * smime.el (smime-mode-map): Move initialization into declaration.
+ (gnus-run-mode-hooks): Don't autoload.
+ (smime-mode): Use define-derived-mode.
+
2010-11-11 Glenn Morris <address@hidden>
* smime.el (from): Restrict declaration to XEmacs.
=== modified file 'lisp/gnus/smime.el'
--- a/lisp/gnus/smime.el 2010-11-11 04:07:40 +0000
+++ b/lisp/gnus/smime.el 2010-11-11 22:24:03 +0000
@@ -649,20 +649,18 @@
(defvar smime-buffer "*SMIME*")
-(defvar smime-mode-map nil)
+(defvar smime-mode-map
+ (let ((map (make-sparse-keymap)))
+ (suppress-keymap map)
+ (define-key map "q" 'smime-exit)
+ (define-key map "f" 'smime-certificate-info)
+ map))
+
+(autoload 'gnus-completing-read "gnus-util")
+
(put 'smime-mode 'mode-class 'special)
-
-(unless smime-mode-map
- (setq smime-mode-map (make-sparse-keymap))
- (suppress-keymap smime-mode-map)
-
- (define-key smime-mode-map "q" 'smime-exit)
- (define-key smime-mode-map "f" 'smime-certificate-info))
-
-(autoload 'gnus-run-mode-hooks "gnus-util")
-(autoload 'gnus-completing-read "gnus-util")
-
-(defun smime-mode ()
+(define-derived-mode smime-mode fundamental-mode ;special-mode
+ "SMIME"
"Major mode for browsing, viewing and fetching certificates.
All normal editing commands are switched off.
@@ -671,16 +669,10 @@
The following commands are available:
\\{smime-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'smime-mode)
- (setq mode-name "SMIME")
(setq mode-line-process nil)
- (use-local-map smime-mode-map)
(buffer-disable-undo)
(setq truncate-lines t)
- (setq buffer-read-only t)
- (gnus-run-mode-hooks 'smime-mode-hook))
+ (setq buffer-read-only t))
(defun smime-certificate-info (certfile)
(interactive "fCertificate file: ")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102348: * lisp/gnus/smime.el (smime-mode): Use define-derived-mode.,
Stefan Monnier <=