~mdw
/
profile
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
el/dot-emacs.el: Provide a global setting of `mdw-do-misc-mode-hacking'.
[profile]
/
el
/
dot-emacs.el
diff --git
a/el/dot-emacs.el
b/el/dot-emacs.el
index
bd29385
..
7e55329
100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-810,6
+810,8
@@
case."
(whitespace-mode arg))
(setq show-trailing-whitespace whitespace-mode)))
(whitespace-mode arg))
(setq show-trailing-whitespace whitespace-mode)))
+(defvar mdw-do-misc-mode-hacking nil)
+
(defun mdw-misc-mode-config ()
(and mdw-auto-indent
(cond ((eq major-mode 'lisp-mode)
(defun mdw-misc-mode-config ()
(and mdw-auto-indent
(cond ((eq major-mode 'lisp-mode)
@@
-819,14
+821,13
@@
case."
nil)
(t
(local-set-key "\C-m" 'newline-and-indent))))
nil)
(t
(local-set-key "\C-m" 'newline-and-indent))))
+ (set (make-local-variable 'mdw-do-misc-mode-hacking) t)
(local-set-key [C-return] 'newline)
(make-local-variable 'page-delimiter)
(setq page-delimiter "\f\\|^.*-\\{6\\}.*$")
(setq comment-column 40)
(auto-fill-mode 1)
(setq fill-column 77)
(local-set-key [C-return] 'newline)
(make-local-variable 'page-delimiter)
(setq page-delimiter "\f\\|^.*-\\{6\\}.*$")
(setq comment-column 40)
(auto-fill-mode 1)
(setq fill-column 77)
- (setq show-trailing-whitespace t)
- (mdw-whitespace-mode 1)
(and (fboundp 'gtags-mode)
(gtags-mode))
(if (fboundp 'hs-minor-mode)
(and (fboundp 'gtags-mode)
(gtags-mode))
(if (fboundp 'hs-minor-mode)
@@
-835,8
+836,11
@@
case."
(reveal-mode t)
(trap (turn-on-font-lock)))
(reveal-mode t)
(trap (turn-on-font-lock)))
-(defun mdw-post-config-mode-hack ()
- (mdw-whitespace-mode 1))
+(defun mdw-post-local-vars-misc-mode-config ()
+ (when mdw-do-misc-mode-hacking
+ (setq show-trailing-whitespace t)
+ (mdw-whitespace-mode 1)))
+(add-hook 'hack-local-variables-hook 'mdw-post-local-vars-misc-mode-config)
(eval-after-load 'gtags
'(progn
(eval-after-load 'gtags
'(progn
@@
-1461,9
+1465,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))
-
- (mdw-post-config-mode-hack)))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; AP calc mode.
;;;--------------------------------------------------------------------------
;;; AP calc mode.
@@
-1515,9
+1517,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Java programming configuration.
;;;--------------------------------------------------------------------------
;;; Java programming configuration.
@@
-1583,9
+1583,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Javascript programming configuration.
;;;--------------------------------------------------------------------------
;;; Javascript programming configuration.
@@
-1643,9
+1641,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Scala programming configuration.
;;;--------------------------------------------------------------------------
;;; Scala programming configuration.
@@
-1718,9
+1714,7
@@
doesn't match any of the regular expressions in
"\\|" "\\\\" "." "\\)"
"\\('\\)")
'(1 "\"")
"\\|" "\\\\" "." "\\)"
"\\('\\)")
'(1 "\"")
- '(4 "\"")))))
-
- (mdw-post-config-mode-hack))
+ '(4 "\""))))))
;;;--------------------------------------------------------------------------
;;; C# programming configuration.
;;;--------------------------------------------------------------------------
;;; C# programming configuration.
@@
-1791,9
+1785,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
(define-derived-mode csharp-mode java-mode "C#"
"Major mode for editing C# code.")
(define-derived-mode csharp-mode java-mode "C#"
"Major mode for editing C# code.")
@@
-1908,9
+1900,7
@@
doesn't match any of the regular expressions in
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
(defun mdw-fontify-inferior-fsharp ()
(mdw-fontify-fsharp)
(defun mdw-fontify-inferior-fsharp ()
(mdw-fontify-fsharp)
@@
-1979,9
+1969,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Rust programming configuration.
;;;--------------------------------------------------------------------------
;;; Rust programming configuration.
@@
-2057,10
+2045,7
@@
doesn't match any of the regular expressions in
;; Hack key bindings.
(local-set-key [?{] 'mdw-self-insert-and-indent)
;; Hack key bindings.
(local-set-key [?{] 'mdw-self-insert-and-indent)
- (local-set-key [?}] 'mdw-self-insert-and-indent)
-
- ;; Final hacking.
- (mdw-post-config-mode-hack))
+ (local-set-key [?}] 'mdw-self-insert-and-indent))
;;;--------------------------------------------------------------------------
;;; Awk programming configuration.
;;;--------------------------------------------------------------------------
;;; Awk programming configuration.
@@
-2118,9
+2103,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Perl programming style.
;;;--------------------------------------------------------------------------
;;; Perl programming style.
@@
-2180,9
+2163,7
@@
doesn't match any of the regular expressions in
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
(defun perl-number-tests (&optional arg)
"Assign consecutive numbers to lines containing `#t'. With ARG,
(defun perl-number-tests (&optional arg)
"Assign consecutive numbers to lines containing `#t'. With ARG,
@@
-2225,9
+2206,7
@@
strip numbers instead."
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face)))))
;; Define Python fontification styles.
;; Define Python fontification styles.
@@
-2301,9
+2280,7
@@
strip numbers instead."
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Assembler mode.
;;;--------------------------------------------------------------------------
;;; Assembler mode.
@@
-2337,8
+2314,7
@@
strip numbers instead."
"\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
"\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face)))))
;;;--------------------------------------------------------------------------
;;; Dylan programming configuration.
;;;--------------------------------------------------------------------------
;;; Dylan programming configuration.
@@
-2404,9
+2380,7
@@
strip numbers instead."
"\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\|"
"\\_<[-+*/=<>:&|]+\\_>"
"\\)")
"\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\|"
"\\_<[-+*/=<>:&|]+\\_>"
"\\)")
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Algol 68 configuration.
;;;--------------------------------------------------------------------------
;;; Algol 68 configuration.
@@
-2448,9
+2422,7
@@
strip numbers instead."
"\\>")
'(0 mdw-number-face))
(list "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/"
"\\>")
'(0 mdw-number-face))
(list "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; REXX configuration.
;;;--------------------------------------------------------------------------
;;; REXX configuration.
@@
-2523,9
+2495,7
@@
strip numbers instead."
;; And everything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And everything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Standard ML programming style.
;;;--------------------------------------------------------------------------
;;; Standard ML programming style.
@@
-2575,9
+2545,7
@@
strip numbers instead."
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
;; And anything else is punctuation.
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Haskell configuration.
;;;--------------------------------------------------------------------------
;;; Haskell configuration.
@@
-2655,9
+2623,7
@@
strip numbers instead."
"\\([eE]\\([-+]\\|\\)[0-9]+\\|\\)")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
"\\([eE]\\([-+]\\|\\)[0-9]+\\|\\)")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Erlang configuration.
;;;--------------------------------------------------------------------------
;;; Erlang configuration.
@@
-2690,9
+2656,7
@@
strip numbers instead."
(list "\\<[0-9]+\\(\\|#[0-9a-zA-Z]+\\|[eE][+-]?[0-9]+\\)\\>"
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
(list "\\<[0-9]+\\(\\|#[0-9a-zA-Z]+\\|[eE][+-]?[0-9]+\\)\\>"
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face))))))
;;;--------------------------------------------------------------------------
;;; Texinfo configuration.
;;;--------------------------------------------------------------------------
;;; Texinfo configuration.
@@
-2726,9
+2690,7
@@
strip numbers instead."
;; Fontify TeX special characters as punctuation.
(list "[{}]+"
;; Fontify TeX special characters as punctuation.
(list "[{}]+"
- '(0 mdw-punct-face))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face)))))
;;;--------------------------------------------------------------------------
;;; TeX and LaTeX configuration.
;;;--------------------------------------------------------------------------
;;; TeX and LaTeX configuration.
@@
-2794,9
+2756,7
@@
strip numbers instead."
;; Fontify TeX special characters as punctuation.
(list "[$^_{}#&]"
;; Fontify TeX special characters as punctuation.
(list "[$^_{}#&]"
- '(0 mdw-punct-face))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face)))))
;;;--------------------------------------------------------------------------
;;; SGML hacking.
;;;--------------------------------------------------------------------------
;;; SGML hacking.
@@
-3156,8
+3116,7
@@
that character only to be normal punctuation.")
"\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
"\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face)))))
;; Lispy languages.
;; Lispy languages.
@@
-3214,9
+3173,7
@@
that character only to be normal punctuation.")
"\\)\\_>")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
"\\)\\_>")
'(0 mdw-number-face))
(list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))
-
- (mdw-post-config-mode-hack))
+ '(0 mdw-punct-face)))))
(defun comint-send-and-indent ()
(interactive)
(defun comint-send-and-indent ()
(interactive)