summaryrefslogtreecommitdiff
path: root/lisp/man.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
committerEli Zaretskii <eliz@gnu.org>2013-09-26 10:37:16 +0300
commitb87c4ff2817e71ca71b028792200b1e069a95e04 (patch)
treebfe00c0655fa02078a9ab2c633ea06d90c4a2064 /lisp/man.el
parentbbc108377873aa6ed7cf21c731770103096eea39 (diff)
parentba355de014b75ed104da4777f909db70d62f2357 (diff)
downloademacs-b87c4ff2817e71ca71b028792200b1e069a95e04.tar.gz
Merge from trunk.
Diffstat (limited to 'lisp/man.el')
-rw-r--r--lisp/man.el15
1 files changed, 4 insertions, 11 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 34131f43692..9eb0ccd719a 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -413,7 +413,7 @@ Otherwise, the value is whatever the function
(defvar Man-topic-history nil "Topic read history.")
-(defvar man-mode-syntax-table
+(defvar Man-mode-syntax-table
(let ((table (copy-syntax-table (standard-syntax-table))))
(modify-syntax-entry ?. "w" table)
(modify-syntax-entry ?_ "w" table)
@@ -1350,7 +1350,7 @@ manpage command."
(put 'Man-mode 'mode-class 'special)
-(defun Man-mode ()
+(define-derived-mode Man-mode fundamental-mode "Man"
"A mode for browsing Un*x manual pages.
The following man commands are available in the buffer. Try
@@ -1387,11 +1387,7 @@ The following variables may be of some use. Try
The following key bindings are currently in effect in the buffer:
\\{Man-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'Man-mode
- mode-name "Man"
- buffer-auto-save-file-name nil
+ (setq buffer-auto-save-file-name nil
mode-line-buffer-identification
(list (default-value 'mode-line-buffer-identification)
" {" 'Man-page-mode-string "}")
@@ -1399,8 +1395,6 @@ The following key bindings are currently in effect in the buffer:
buffer-read-only t)
(buffer-disable-undo)
(auto-fill-mode -1)
- (use-local-map Man-mode-map)
- (set-syntax-table man-mode-syntax-table)
(setq imenu-generic-expression (list (list nil Man-heading-regexp 0)))
(set (make-local-variable 'outline-regexp) Man-heading-regexp)
(set (make-local-variable 'outline-level) (lambda () 1))
@@ -1409,8 +1403,7 @@ The following key bindings are currently in effect in the buffer:
(Man-build-page-list)
(Man-strip-page-headers)
(Man-unindent)
- (Man-goto-page 1 t)
- (run-mode-hooks 'Man-mode-hook))
+ (Man-goto-page 1 t))
(defsubst Man-build-section-alist ()
"Build the list of manpage sections."