X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/c4b18360a1a1f0f26ba6aca71eeb118ed60fd49e..b0ef6a6629b8f51972a8a1ca7401144e52299235:/el/dot-emacs.el?ds=sidebyside diff --git a/el/dot-emacs.el b/el/dot-emacs.el index e9390dd..6e28111 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -598,7 +598,7 @@ It in turn is a list of things: (defvar mdw-hanging-indents (concat "\\(\\(" - "\\([*o]\\|-[-#]?\\|[0-9]+\\.\\|\\[[0-9]+\\]\\|([a-zA-Z])\\)" + "\\([*o+]\\|-[-#]?\\|[0-9]+\\.\\|\\[[0-9]+\\]\\|([a-zA-Z])\\)" "[ \t]+" "\\)?\\)") "*Standard regexp matching parts of a hanging indent. @@ -699,6 +699,14 @@ case." (defvar mdw-auto-indent t "Whether to indent automatically after a newline.") +(defun mdw-whitespace-mode (&optional arg) + "Turn on/off whitespace mode, but don't highlight trailing space." + (interactive "P") + (when (and (boundp 'whitespace-style) + (fboundp 'whitespace-mode)) + (let ((whitespace-style (remove 'trailing whitespace-style))) + (whitespace-mode arg)))) + (defun mdw-misc-mode-config () (and mdw-auto-indent (cond ((eq major-mode 'lisp-mode) @@ -715,8 +723,7 @@ case." (auto-fill-mode 1) (setq fill-column 77) (setq show-trailing-whitespace t) - (let ((whitespace-style (remove 'trailing whitespace-style))) - (trap (whitespace-mode t))) + (mdw-whitespace-mode 1) (and (fboundp 'gtags-mode) (gtags-mode)) (outline-minor-mode t) @@ -725,8 +732,7 @@ case." (trap (turn-on-font-lock))) (defun mdw-post-config-mode-hack () - (let ((whitespace-style (remove 'trailing whitespace-style))) - (trap (whitespace-mode t)))) + (mdw-whitespace-mode 1)) (eval-after-load 'gtags '(progn @@ -767,26 +773,13 @@ doesn't match any of the regular expressions in (when (and frame-display (eq window-system 'x) (not (some (lambda (fr) - (message "checking frame %s" frame) (and (not (eq fr frame)) (string= (frame-parameter fr 'display) - frame-display) - (progn "frame %s still uses us" nil))) + frame-display))) (frame-list)))) (run-with-idle-timer 0 nil #'x-close-connection frame-display)))) (add-hook 'delete-frame-functions 'mdw-last-one-out-turn-off-the-lights) -(defvar mdw-frame-parameters-alist - '((nil (menu-bar-lines . 0)))) -(defun mdw-set-frame-parameters (frame) - (let ((params (assq (if (fboundp 'window-system) - (window-system frame) - window-system) - mdw-frame-parameters-alist))) - (when params - (modify-frame-parameters frame (cdr params))))) -(add-hook 'after-make-frame-functions 'mdw-set-frame-parameters) - ;;;-------------------------------------------------------------------------- ;;; General fontification. @@ -1539,6 +1532,7 @@ strip numbers instead." ;; Miscellaneous fiddling. (mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)") + (setq indent-tabs-mode nil) ;; Now define fontification things. (make-local-variable 'font-lock-keywords)