el/dot-emacs.el (arm-assembler-mode): Untangle strange nesting.
[profile] / el / dot-emacs.el
index 2909fdd..850db10 100644 (file)
@@ -647,13 +647,13 @@ This is mainly useful in `auto-fill-mode'.")
 
 (defun mdw-maybe-tabify (s)
   "Tabify or untabify the string S, according to `indent-tabs-mode'."
-  (with-temp-buffer
-    (save-match-data
-      (let ((tabfun (if indent-tabs-mode #'tabify #'untabify)))
+  (let ((tabfun (if indent-tabs-mode #'tabify #'untabify)))
+    (with-temp-buffer
+      (save-match-data
        (insert s "\n")
        (let ((start (point-min)) (end (point-max)))
-         (funcall tabfun start end)
-         (setq s (buffer-substring start (1- end))))))))
+         (funcall tabfun (point-min) (point-max))
+         (setq s (buffer-substring (point-min) (1- (point-max)))))))))
 
 (defun mdw-examine-fill-prefixes (l)
   "Given a list of dynamic fill prefixes, pick one which matches
@@ -974,6 +974,9 @@ doesn't match any of the regular expressions in
   (t :weight bold))
 (mdw-define-face magit-diff-hunk-header
   (t :foreground "SkyBlue1"))
+(mdw-define-face magit-item-highlight
+  (((type tty)) :background "blue")
+  (t :background "DarkSeaGreen4"))
 
 (mdw-define-face erc-input-face
   (t :foreground "red"))
@@ -1420,17 +1423,17 @@ doesn't match any of the regular expressions in
          (list
 
           ;; Handle the keywords defined above.
-          (list (concat "\\<\\(" javascript-keywords "\\)\\>")
+          (list (concat "\\_<\\(" javascript-keywords "\\)\\_>")
                 '(0 font-lock-keyword-face))
 
           ;; Handle the predefined constants defined above.
-          (list (concat "\\<\\(" javascript-constants "\\)\\>")
+          (list (concat "\\_<\\(" javascript-constants "\\)\\_>")
                 '(0 font-lock-variable-name-face))
 
           ;; Handle numbers too.
           ;;
           ;; The following isn't quite right, but it's close enough.
-          (list (concat "\\<\\("
+          (list (concat "\\_<\\("
                         "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
                         "[0-9]+\\(\\.[0-9]*\\|\\)"
                         "\\([eE]\\([-+]\\|\\)[0-9]+\\|\\)\\)"
@@ -1861,9 +1864,9 @@ strip numbers instead."
 
         ;; And anything else is punctuation.
         (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
-              '(0 mdw-punct-face)))
+              '(0 mdw-punct-face))))
 
-  (mdw-post-config-mode-hack))
+  (mdw-post-config-mode-hack)
   (run-hooks 'arm-assembler-mode-hook))
 
 ;;;--------------------------------------------------------------------------