X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/ff6a7bee1d2f9953fa7e87247cc15d89b41d3de8..60c22e1bb67d984e0c897e0970aca35620e6ceb8:/el/dot-emacs.el?ds=sidebyside diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 403a5e4..80fc05a 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -2551,6 +2551,49 @@ strip numbers instead." "yield"))) ;;;-------------------------------------------------------------------------- +;;; Lua programming style. + +(setq lua-indent-level 2) + +(defun mdw-fontify-lua () + + ;; Miscellaneous fiddling. + (mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)") + + ;; Now define fontification things. + (make-local-variable 'font-lock-keywords) + (let ((lua-keywords + (mdw-regexps "and" "break" "do" "else" "elseif" "end" + "false" "for" "function" "goto" "if" "in" "local" + "nil" "not" "or" "repeat" "return" "then" "true" + "until" "while"))) + (setq font-lock-keywords + (list + + ;; Set up the keywords defined above. + (list (concat "\\_<\\(" lua-keywords "\\)\\_>") + '(0 font-lock-keyword-face)) + + ;; At least numbers are simpler than C. + (list (concat "\\_<\\(" "0[xX]" + "\\(" "[0-9a-fA-F]+" + "\\(\\.[0-9a-fA-F]*\\)?" + "\\|" "\\.[0-9a-fA-F]+" + "\\)" + "\\([pP][-+]?[0-9]+\\)?" + "\\|" "\\(" "[0-9]+" + "\\(\\.[0-9]*\\)?" + "\\|" "\\.[0-9]+" + "\\)" + "\\([eE][-+]?[0-9]+\\)?" + "\\)") + '(0 mdw-number-face)) + + ;; And anything else is punctuation. + (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)" + '(0 mdw-punct-face)))))) + +;;;-------------------------------------------------------------------------- ;;; Icon programming style. ;; Icon indentation style. @@ -3635,7 +3678,12 @@ This allows you to pass a list of arguments through `ansi-term'." (magit-wip-after-save-mode 1) (magit-wip-after-apply-mode 1) (magit-wip-before-change-mode 1) - (add-to-list 'magit-no-confirm 'safe-with-wip))) + (add-to-list 'magit-no-confirm 'safe-with-wip) + (dolist (popup '(magit-diff-popup + magit-diff-refresh-popup + magit-diff-mode-refresh-popup + magit-revision-mode-refresh-popup)) + (magit-define-popup-switch popup ?R "Reverse diff" "-R")))) (setq magit-repolist-columns '(("Name" 16 magit-repolist-column-ident nil)