From: Mark Wooding Date: Fri, 13 Sep 2019 16:13:14 +0000 (+0100) Subject: el/dot-emacs.el: Promote `Lispy languages' to a top-level section. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/658bc84883a2de0f540525aa3d9f0a726c32fb1c?ds=sidebyside el/dot-emacs.el: Promote `Lispy languages' to a top-level section. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index b30a963..776915c 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -3879,31 +3879,7 @@ (defun nfast-debug-mode () (run-hooks 'nfast-debug-mode-hook)) ;;;-------------------------------------------------------------------------- -;;; Other languages. - -;; Smalltalk. - -(defun mdw-setup-smalltalk () - (and mdw-auto-indent - (local-set-key "\C-m" 'smalltalk-newline-and-indent)) - (make-local-variable 'mdw-auto-indent) - (setq mdw-auto-indent nil) - (local-set-key "\C-i" 'smalltalk-reindent)) - -(defun mdw-fontify-smalltalk () - (make-local-variable 'font-lock-keywords) - (setq font-lock-keywords - (list - (list "\\<[A-Z][a-zA-Z0-9]*\\>" - '(0 font-lock-keyword-face)) - (list (concat "\\<0\\([xX][0-9a-fA-F_]+\\|[0-7_]+\\)\\|" - "[0-9][0-9_]*\\(\\.[0-9_]*\\|\\)" - "\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)") - '(0 mdw-number-face)) - (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)" - '(0 mdw-punct-face))))) - -;; Lispy languages. +;;; Lispy languages. ;; Unpleasant bodge. (unless (boundp 'slime-repl-mode-map) @@ -3970,6 +3946,31 @@ (defun mdw-fontify-lispy () (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)" '(0 mdw-punct-face))))) +;;;-------------------------------------------------------------------------- +;;; Other languages. + +;; Smalltalk. + +(defun mdw-setup-smalltalk () + (and mdw-auto-indent + (local-set-key "\C-m" 'smalltalk-newline-and-indent)) + (make-local-variable 'mdw-auto-indent) + (setq mdw-auto-indent nil) + (local-set-key "\C-i" 'smalltalk-reindent)) + +(defun mdw-fontify-smalltalk () + (make-local-variable 'font-lock-keywords) + (setq font-lock-keywords + (list + (list "\\<[A-Z][a-zA-Z0-9]*\\>" + '(0 font-lock-keyword-face)) + (list (concat "\\<0\\([xX][0-9a-fA-F_]+\\|[0-7_]+\\)\\|" + "[0-9][0-9_]*\\(\\.[0-9_]*\\|\\)" + "\\([eE]\\([-+]\\|\\)[0-9_]+\\|\\)") + '(0 mdw-number-face)) + (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)" + '(0 mdw-punct-face))))) + (defun mdw-setup-m4 () ;; Inexplicably, Emacs doesn't match braces in m4 mode. This is very