# HG changeset patch # User Stefan Monnier # Date 1273896483 14400 # Node ID 7c03bbe03019921790c062c1bed87e920cf34800 # Parent 17dd83b6f6d9706fa87ca5b11c5178dc3a316748 * progmodes/prolog.el (prolog-mode): Use define-derived-mode. diff -r 17dd83b6f6d9 -r 7c03bbe03019 lisp/ChangeLog --- a/lisp/ChangeLog Fri May 14 23:50:26 2010 -0400 +++ b/lisp/ChangeLog Sat May 15 00:08:03 2010 -0400 @@ -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 -r 17dd83b6f6d9 -r 7c03bbe03019 lisp/progmodes/prolog.el --- a/lisp/progmodes/prolog.el Fri May 14 23:50:26 2010 -0400 +++ b/lisp/progmodes/prolog.el Sat May 15 00:08:03 2010 -0400 @@ -136,26 +136,18 @@ )) ;;;###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.