]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/textmodes/page-ext.el (pages-directory-mode): Use special-mode.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Aug 2016 18:17:20 +0000 (14:17 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Aug 2016 18:17:20 +0000 (14:17 -0400)
lisp/textmodes/page-ext.el

index 4769af5a1d17442a95fb979f3e3c239a728e0728..f67e85e8432893ed071ce67cc7fdfe07e552e051 100644 (file)
@@ -694,20 +694,14 @@ Used by `pages-directory' function."
       (terpri))
     (end-of-line 1)))
 
-(defun pages-directory-mode ()
+(define-derived-mode pages-directory-mode special-mode "Pages-Directory"
   "Mode for handling the pages-directory buffer.
 
 Move point to one of the lines in this buffer, then use \\[pages-directory-goto] to go
 to the same line in the pages buffer."
-
-  (kill-all-local-variables)
-  (use-local-map pages-directory-mode-map)
-  (setq major-mode 'pages-directory-mode)
-  (setq mode-name "Pages-Directory")
   (make-local-variable 'pages-buffer)
   (make-local-variable 'pages-pos-list)
-  (make-local-variable 'pages-directory-buffer-narrowing-p)
-  (run-mode-hooks 'pages-directory-mode-hook))
+  (make-local-variable 'pages-directory-buffer-narrowing-p))
 
 (defun pages-directory-goto ()
   "Go to the corresponding line in the pages buffer."