summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-05-14 12:41:01 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2010-05-14 12:41:01 -0400
commit10dcc5612a47d4a6ab9f05c1e8f39993b16bb634 (patch)
treeb54836fe5cdf3146b310b0cafbb1c0728dc51921 /lisp
parent2fe72643a04d063444b0eba90d77e15fcf6d751f (diff)
downloademacs-10dcc5612a47d4a6ab9f05c1e8f39993b16bb634.tar.gz
emacs-10dcc5612a47d4a6ab9f05c1e8f39993b16bb634.tar.bz2
emacs-10dcc5612a47d4a6ab9f05c1e8f39993b16bb634.zip
* simple.el (prog-mode): New (abstract) major mode.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it. * progmodes/sh-script.el (sh-mode): Remove redundant var assignment.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/emacs-lisp/lisp-mode.el6
-rw-r--r--lisp/progmodes/sh-script.el1
-rw-r--r--lisp/simple.el7
4 files changed, 17 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2c98f1ab475..a80859f1a84 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * simple.el (prog-mode): New (abstract) major mode.
+ * emacs-lisp/lisp-mode.el (emacs-lisp-mode, lisp-mode): Use it.
+ * progmodes/sh-script.el (sh-mode): Remove redundant var assignment.
+
2010-05-14 Juanma Barranquero <lekktu@gmail.com>
* progmodes/sql.el (sql-oracle-program): Reflow docstring.
@@ -24,8 +30,8 @@
only when the message would be displayed. Handled nested calls.
(tramp-handle-load, tramp-handle-file-local-copy)
(tramp-handle-insert-file-contents, tramp-handle-write-region)
- (tramp-maybe-send-script, tramp-find-shell): Use
- `with-progress-reporter'.
+ (tramp-maybe-send-script, tramp-find-shell):
+ Use `with-progress-reporter'.
(tramp-handle-dired-compress-file, tramp-maybe-open-connection):
Fix message text.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 4a7f59e26fb..02477baf74f 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -221,8 +221,6 @@ font-lock keywords will not be case sensitive."
;;(set (make-local-variable 'adaptive-fill-mode) nil)
(make-local-variable 'indent-line-function)
(setq indent-line-function 'lisp-indent-line)
- (make-local-variable 'parse-sexp-ignore-comments)
- (setq parse-sexp-ignore-comments t)
(make-local-variable 'outline-regexp)
(setq outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(")
(make-local-variable 'outline-level)
@@ -431,7 +429,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
:type 'hook
:group 'lisp)
-(define-derived-mode emacs-lisp-mode nil "Emacs-Lisp"
+(define-derived-mode emacs-lisp-mode prog-mode "Emacs-Lisp"
"Major mode for editing Lisp code to run in Emacs.
Commands:
Delete converts tabs to spaces as it moves back.
@@ -466,7 +464,7 @@ if that value is non-nil."
"Keymap for ordinary Lisp mode.
All commands in `lisp-mode-shared-map' are inherited by this map.")
-(define-derived-mode lisp-mode nil "Lisp"
+(define-derived-mode lisp-mode prog-mode "Lisp"
"Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
Commands:
Delete converts tabs to spaces as it moves back.
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index eca6d5fbe7b..478b0e33431 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1583,7 +1583,6 @@ with your script for an edit-interpret-debug cycle."
sh-indent-supported-here nil)
(set (make-local-variable 'defun-prompt-regexp)
(concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)"))
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
;; Parse or insert magic number for exec, and set all variables depending
;; on the shell thus determined.
(sh-set-shell
diff --git a/lisp/simple.el b/lisp/simple.el
index 5948536262c..f0c38093d86 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -422,6 +422,13 @@ Other major modes are defined by comparison with this one."
"Parent major mode from which special major modes should inherit."
(setq buffer-read-only t))
+;; Major mode meant to be the parent of programming modes.
+
+(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)
+ (set (make-local-variable 'parse-sexp-ignore-comments) t))
+
;; Making and deleting lines.
(defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard))