From 13973643c9e26a06239a6da13cc72cbd4a5ec22a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 15 May 2010 00:08:03 -0400 Subject: [PATCH] * progmodes/prolog.el (prolog-mode): Use define-derived-mode. --- lisp/ChangeLog | 2 ++ lisp/progmodes/prolog.el | 12 ++---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 83e4012424b..32785d928cc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2010-05-15 Stefan Monnier + * progmodes/prolog.el (prolog-mode): Use define-derived-mode. + * pcomplete.el (pcomplete-completions-at-point): New function, extracted from pcomplete-std-complete. (pcomplete-std-complete): Use it. diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 197b41506bd..5bca3502af9 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -136,26 +136,18 @@ When nil, send actual operating system end of file." )) ;;;###autoload -(defun prolog-mode () +(define-derived-mode prolog-mode prog-mode "Prolog" "Major mode for editing Prolog code for Prologs. Blank lines and `%%...' separate paragraphs. `%'s start comments. Commands: \\{prolog-mode-map} Entry to this mode calls the value of `prolog-mode-hook' if that value is non-nil." - (interactive) - (kill-all-local-variables) - (use-local-map prolog-mode-map) - (set-syntax-table prolog-mode-syntax-table) - (setq major-mode 'prolog-mode) - (setq mode-name "Prolog") (prolog-mode-variables) (set (make-local-variable 'comment-add) 1) - ;; font lock (setq font-lock-defaults '(prolog-font-lock-keywords nil nil nil - beginning-of-line)) - (run-mode-hooks 'prolog-mode-hook)) + beginning-of-line))) (defun prolog-indent-line () "Indent current line as Prolog code. -- 2.39.2