Mercurial > emacs
changeset 109999:6e14b22d0a49
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 19 Aug 2010 00:35:46 +0000 |
parents | 529971ebf9b1 (current diff) dce0738d09ef (diff) |
children | 757182d1d4cb |
files | |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Aug 18 22:46:56 2010 +0000 +++ b/lisp/ChangeLog Thu Aug 19 00:35:46 2010 +0000 @@ -1,5 +1,8 @@ 2010-08-18 Stefan Monnier <monnier@iro.umontreal.ca> + * simple.el (prog-mode-map): New var. + (prog-indent-sexp): New command. + * progmodes/octave-mod.el (octave-mode-menu): Make toggle buttons. * progmodes/prolog.el (smie): Require.
--- a/lisp/simple.el Wed Aug 18 22:46:56 2010 +0000 +++ b/lisp/simple.el Thu Aug 19 00:35:46 2010 +0000 @@ -424,6 +424,19 @@ ;; Major mode meant to be the parent of programming modes. +(defvar prog-mode-map + (let ((map (make-sparse-keymap))) + (define-key map [?\C-\M-q] 'prog-indent-sexp) + map) + "Keymap used for programming modes.") + +(defun prog-indent-sexp () + "Indent the expression after point." + (interactive) + (let ((start (point)) + (end (save-excursion (forward-sexp 1) (point)))) + (indent-region start end nil))) + (define-derived-mode prog-mode fundamental-mode "Prog" "Major mode for editing programming language source code." (set (make-local-variable 'require-final-newline) mode-require-final-newline)