(setq semanticdb-default-save-directory "~/.emacs.d/semanticdb/")
(eval-after-load "senator"
'(setq isearch-mode-hook
- (remq 'senator-isearch-mode-hook isearch-mode-hook)
+ (remq 'senator-isearch-mode-hook isearch-mode-hook)
isearch-mode-end-hook
- (remq 'senator-isearch-mode-hook isearch-mode-end-hook)))
+ (remq 'senator-isearch-mode-hook isearch-mode-end-hook)))
;; Skeleton stuff.
(setq backup-by-copying-when-mismatch t)
(setq mdw-backup-disable-regexps
- '("/\\.git/COMMIT_EDITMSG$"
- "/\\.stgit\\(-edit\\.txt\\|msg\\.txt\\|\\.msg\\)$"
- "^/tmp/" "^/var/tmp/"))
+ '("/\\.git/COMMIT_EDITMSG$"
+ "/\\.stgit\\(-edit\\.txt\\|msg\\.txt\\|\\.msg\\)$"
+ "^/tmp/" "^/var/tmp/"))
;; Safe variables.
(setq safe-local-variable-values
- '((make-backup-files . nil)))
+ '((make-backup-files . nil)))
;; Calculator fiddling.
mail-signature t
mail-yank-prefix "> "
mail-archive-file-name nil
- message-default-mail-headers "X-Auto-Response-Suppress: DR, RN, NRN, OOF\n"
+ message-default-mail-headers
+ "X-Auto-Response-Suppress: DR, RN, NRN, OOF\n"
message-default-news-headers ""
compose-mail-user-agent-warnings nil)
bbdb-extract-address-components-func 'bbdb-extract-address-components
bbdb-allow-duplicates t
bbdb/news-auto-create-p
- (lambda ()
- (let ((group gnus-newsgroup-name))
- (and (string-match "^nn\\(imap\\|folder\\)\\+" group)
- (not (string-match (concat ":" "\\(" "\\(" "crap"
- "\\|" "spam"
- "\\|" "lists"
- "\\|" "corpus"
- "\\)" "\\."
- "\\|" "Junk Email$"
- "\\)")
- group)))))
+ (lambda ()
+ (let ((group gnus-newsgroup-name))
+ (and (string-match "^nn\\(imap\\|folder\\)\\+" group)
+ (not (string-match (concat ":" "\\(" "\\(" "crap"
+ "\\|" "spam"
+ "\\|" "lists"
+ "\\|" "corpus"
+ "\\)" "\\."
+ "\\|" "Junk Email$"
+ "\\)")
+ group)))))
bbdb-user-mail-names
- (concat "^"
- "\\(" "\\(mdw\\|markw\\|root\\|postmaster\\)"
- "\\([-+][^@]*\\)?"
- "@\\(\\(dist\\|esc\\)orted\\.org\\.uk\\|odin\\.gg\\)"
- "\\|" "\\(" "\\(mdw\\|mwooding\\)"
- "\\(\\+[^@]*\\)?"
- "\\|" "0" "\\(mdw\\|mwooding\\)" "k\\.[^@]*"
- "\\)" "@"
- "\\(chiark\\|slimy\\|coriolis\\)\\.greenend\\.org\\.uk"
- "\\|" "distorted\\.mdw@g\\(oogle\\)?mail.com"
- "\\|" "mwooding@\\(good\\|blackberry\\)\\.com"
- "\\|" "mark\\.wooding@trustonic\\.com"
- "\\)$")
+ (concat "^"
+ "\\(" "\\(mdw\\|markw\\|root\\|postmaster\\)"
+ "\\([-+][^@]*\\)?"
+ "@\\(\\(dist\\|esc\\)orted\\.org\\.uk\\|odin\\.gg\\)"
+ "\\|" "\\(" "\\(mdw\\|mwooding\\)"
+ "\\(\\+[^@]*\\)?"
+ "\\|" "0" "\\(mdw\\|mwooding\\)" "k\\.[^@]*"
+ "\\)" "@"
+ "\\(chiark\\|slimy\\|coriolis\\)\\.greenend\\.org\\.uk"
+ "\\|" "distorted\\.mdw@g\\(oogle\\)?mail.com"
+ "\\|" "mwooding@\\(good\\|blackberry\\)\\.com"
+ "\\|" "mark\\.wooding@trustonic\\.com"
+ "\\)$")
bbdb-canonicalize-net-hook
- (lambda (addr)
- (cond ((null addr)
- nil)
- ((or (string-match "^mailer-daemon@" addr)
- (string-match "\.invalid$" addr)
- (string-match (concat "^reply-[0-9a-f]+-[0-9a-f]+_"
- "HTML-[0-9]+-[0-9]+-[0-9]+"
- "@\\(nationwide-communications\\."
- "co\\.uk\\)$")
- addr)
- (string-match (concat "^[0-9]+@bugs\\."
- "\\(" "debian\\.org"
- "\\|" "distorted\\.org\\.uk"
- "\\)$")
- addr)
- (string-match (concat "^MicrosoftExchange[0-9a-f]*"
- "@newincco\\.onmicrosoft\\.com")
- addr)
- (member (md5 addr)
- '("8815c5583970856799c85a3ee0eb6a9f" ;work wiki spam
- "0b94ab4d25dacaa5ac07243a09c9e22e" ;work bug spam
- "35fb1633379a1e4d4be3b139cae20111" ;work crucible spam
- ))
- (and (string-match "^news\\([0-9]+\\)@\\(.*\\)$" addr)
- (string= (md5 (match-string 2 addr))
- "879b795aed959b1a000e9f95c132b16c")))
- nil)
- ((string-match "^\\([^@+]+\\)\\+[^@]*\\(@.*\\)$" addr)
- (concat (match-string 1 addr) (match-string 2 addr)))
- (t addr))))
+ (lambda (addr)
+ (cond ((null addr)
+ nil)
+ ((or (string-match "^mailer-daemon@" addr)
+ (string-match "\.invalid$" addr)
+ (string-match (concat "^reply-[0-9a-f]+-[0-9a-f]+_"
+ "HTML-[0-9]+-[0-9]+-[0-9]+"
+ "@\\(nationwide-communications\\."
+ "co\\.uk\\)$")
+ addr)
+ (string-match (concat "^[0-9]+@bugs\\."
+ "\\(" "debian\\.org"
+ "\\|" "distorted\\.org\\.uk"
+ "\\)$")
+ addr)
+ (string-match (concat "^MicrosoftExchange[0-9a-f]*"
+ "@newincco\\.onmicrosoft\\.com")
+ addr)
+ (member (md5 addr)
+ '("8815c5583970856799c85a3ee0eb6a9f" ;work wiki spam
+ "0b94ab4d25dacaa5ac07243a09c9e22e" ;work bug spam
+ "35fb1633379a1e4d4be3b139cae20111" ;work crucible spam
+ ))
+ (and (string-match "^news\\([0-9]+\\)@\\(.*\\)$" addr)
+ (string= (md5 (match-string 2 addr))
+ "879b795aed959b1a000e9f95c132b16c")))
+ nil)
+ ((string-match "^\\([^@+]+\\)\\+[^@]*\\(@.*\\)$" addr)
+ (concat (match-string 1 addr) (match-string 2 addr)))
+ (t addr))))
;; Customization.
(setq pcomplete-cycle-completions nil ;Who thought that was a good idea?
eshell-cmpl-cycle-completions nil)
(setq dired-deletion-confirmer ;Make deletion easier in dired
- (symbol-function 'y-or-n-p)
+ (symbol-function 'y-or-n-p)
delete-by-moving-to-trash (mdw-emacs-version-p 24)
dired-listing-switches "-alF" ;Do `ls -F' things in dired windows
wdired-allow-to-change-permissions 'advanced)
(setq ediff-split-window-function 'split-window-horizontally)
(setq rfcview-rfc-location-pattern
- "/ftp@mirror.distorted.org.uk:/pub/mirrors/rfc/rfc%s.txt"
+ "/ftp@mirror.distorted.org.uk:/pub/mirrors/rfc/rfc%s.txt"
rfcview-std-location-pattern
- "/ftp@mirror.distorted.org.uk:/pub/mirrors/rfc/std/std%s.txt"
+ "/ftp@mirror.distorted.org.uk:/pub/mirrors/rfc/std/std%s.txt"
rfcview-index-location
- "/ftp@mirror.distorted.org.uk:/pub/mirrors/rfc/rfc-index.txt")
+ "/ftp@mirror.distorted.org.uk:/pub/mirrors/rfc/rfc-index.txt")
;;;--------------------------------------------------------------------------
;;; W3 and URL fetching stuff.
(let ((proxy (mdw-config 'http-proxy)))
(setq url-proxy-services
- `(("http" . ,proxy)
- ("ftp" . ,proxy)
- ("gopher" . ,proxy))))
+ `(("http" . ,proxy)
+ ("ftp" . ,proxy)
+ ("gopher" . ,proxy))))
(setq url-cookie-untrusted-urls '("."))
(setq browse-url-browser-function (mdw-good-url-browser)
("application/x-pdf" "\\.pdf\\'" ("xdg-open" file) nil))))
(dolist (e entries)
(setq w3m-content-type-alist
- (cons e (remove* (car e) w3m-content-type-alist
- :key #'car :test #'string=))))))
+ (cons e (remove* (car e) w3m-content-type-alist
+ :key #'car :test #'string=))))))
(setq w3-do-incremental-display t
w3-use-menus '(file edit view go bookmark options
(setq european-calendar-style t
calendar-date-style 'european
calendar-time-display-form
- '(24-hours ":" minutes
- (if time-zone " (") time-zone (if time-zone ")")))
+ '(24-hours ":" minutes
+ (if time-zone " (") time-zone (if time-zone ")")))
(setq diary-date-forms
- '((day "[-/]" month "[^-/0-9]")
- (day " *" monthname "[ \t]*\\(\^M\\|\n\\)")
- (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|[0-9]+[:aApP]\\)")
- (day "[-/]" month "[-/]" year "[^0-9]")
- (day " *" monthname " *" year "[^0-9]")
- (year "[-/]" month "[-/]" day "[^0-9]")
- (dayname "\\W")))
+ '((day "[-/]" month "[^-/0-9]")
+ (day " *" monthname "[ \t]*\\(\^M\\|\n\\)")
+ (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|[0-9]+[:aApP]\\)")
+ (day "[-/]" month "[-/]" year "[^0-9]")
+ (day " *" monthname " *" year "[^0-9]")
+ (year "[-/]" month "[-/]" day "[^0-9]")
+ (dayname "\\W")))
;; Fancy diary handling.
;; Define more mode hooks for MailCrypt.
(setq mdw-mc-modes
- '((mdwmail-mode (encrypt . mdwmail-mc-encrypt)
- (sign . mdwmail-mc-sign))))
+ '((mdwmail-mode (encrypt . mdwmail-mc-encrypt)
+ (sign . mdwmail-mc-sign))))
;; Load the MailCrypt support.
(setq frame-background-mode (if mdw-black-background 'dark 'light)
frame-inhibit-implied-resize t
default-frame-alist
- `((width . ,(+ mdw-column-width mdw-frame-width-fudge))
- (height . 33)
- (vertical-scroll-bars . right)
- (cursor-type . bar)
- (cursor-blink . t)
- (left-fringe . 5)
- (right-fringe . 5)
- (scroll-bar-width . 15)
- (tool-bar-lines . 0)
- (menu-bar-lines . 1)
- (cursor-color . "red")
- (background-mode . ,frame-background-mode))
+ `((width . ,(+ mdw-column-width mdw-frame-width-fudge))
+ (height . 33)
+ (vertical-scroll-bars . right)
+ (cursor-type . bar)
+ (cursor-blink . t)
+ (left-fringe . 5)
+ (right-fringe . 5)
+ (scroll-bar-width . 15)
+ (tool-bar-lines . 0)
+ (menu-bar-lines . 1)
+ (cursor-color . "red")
+ (background-mode . ,frame-background-mode))
initial-frame-alist
- `((width . ,(+ mdw-column-width
- (if (>= emacs-major-version 21) 0 1)))
- (menu-bar-lines . ,(if window-system 1 0)))
+ `((width . ,(+ mdw-column-width
+ (if (>= emacs-major-version 21) 0 1)))
+ (menu-bar-lines . ,(if window-system 1 0)))
window-system-default-frame-alist
- '((pm (font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
- (menu-font . "8.Helv")
- (background-color . "lightgrey"))
- (w32 (font . "fixed613 10")
- (background-color . "black")
- (foreground-color . "white"))
- (nil (menu-bar-lines . 0)
- (background-color . nil))))
+ '((pm (font . "-os2-System VIO-medium-r-normal--*-40-*-*-m-*-cp850")
+ (menu-font . "8.Helv")
+ (background-color . "lightgrey"))
+ (w32 (font . "fixed613 10")
+ (background-color . "black")
+ (foreground-color . "white"))
+ (nil (menu-bar-lines . 0)
+ (background-color . nil))))
(let ((backg (frame-parameter nil 'background-color)))
(if (and backg window-system)
(push (cons 'background-color backg) default-frame-alist)))
"\\'"))))
(if (boundp 'ido-ubiquitous-command-overrides)
(setq ido-ubiquitous-command-overrides
- (append ido-ubiquitous-command-overrides
- (mapcar (lambda (exclude)
- (if (symbolp exclude)
- `(enable-old exact
- ,(symbol-name exclude))
- `(enable-old regexp ,exclude)))
- excludes)))
+ (append ido-ubiquitous-command-overrides
+ (mapcar (lambda (exclude)
+ (if (symbolp exclude)
+ `(enable-old exact
+ ,(symbol-name exclude))
+ `(enable-old regexp ,exclude)))
+ excludes)))
(setq ido-cr+-function-blacklist
- (append ido-cr+-function-blacklist excludes))))
+ (append ido-cr+-function-blacklist excludes))))
(setq magit-completing-read-function 'magit-ido-completing-read)
(require 'smex) (smex-initialize) (global-set-key [?\M-x] 'smex))
(eval-after-load "hippie-exp"
'(setq hippie-expand-try-functions-list
- (remove-if (lambda (name)
- (memq name '(try-expand-list
- try-expand-list-all-buffers)))
- hippie-expand-try-functions-list)))
+ (remove-if (lambda (name)
+ (memq name '(try-expand-list
+ try-expand-list-all-buffers)))
+ hippie-expand-try-functions-list)))
(autoload 'dired-jump "dired-x")
(autoload 'dired-jump-other-window "dired-x")
(and (fboundp 'dired-do-relsymlink)
(define-key dired-mode-map [?\C-c ?\C-s] 'dired-do-relsymlink))))
(setq dired-guess-shell-alist-user
- '(("\\.pdf\\'" "mupdf")))
+ '(("\\.pdf\\'" "mupdf")))
(add-hook 'org-mode-hook
#'(lambda () (mdw-clobber-evil-keymap org-mode-map)))
;; Minor mode listing
(setq minor-mode-alist
- (mdw-uniquify-alist '((reveal-mode (hs-minor-mode
- " hs/r"
- (global-reveal-mode
- "" " Reveal")))
- (hs-minor-mode (reveal-mode "" " hs"))
- (abbrev-mode "")
- (gtags-mode ""))
- minor-mode-alist))
+ (mdw-uniquify-alist '((reveal-mode (hs-minor-mode
+ " hs/r"
+ (global-reveal-mode
+ "" " Reveal")))
+ (hs-minor-mode (reveal-mode "" " hs"))
+ (abbrev-mode "")
+ (gtags-mode ""))
+ minor-mode-alist))
;; Recognising types of files.
(setq auto-mode-alist
- (append `(("\\.p[lm]$" . cperl-mode)
- ("\\.sage$" . python-mode)
- ("\\.m$" . objc-mode)
- ("\\.mxd$" . c-mode)
- ("\\.cs$" . csharp-mode)
- ("\\.go$" . go-mode)
- ("\\.org$" . org-mode)
- ("\\.make$" . makefile-mode)
- ("\\.mk?d$" . markdown-mode)
- ;; ("/[ch]/" . c-mode)
- (,(concat "/\\("
- "\\.stgit\\.msg" "\\|"
- "\\.topmsg" "\\|"
- "\\.git/COMMIT_EDITMSG" "\\|"
- "svn-commit\\.tmp" "\\|"
- "svk-commit[^/.]*\\.tmp"
- "\\)$")
- . text-mode)
- (,(concat "^" tmpdir "/\\("
- "svk-commit[^/.]*\\.tmp" "\\|"
- "gitci\\.[^/.]*" "\\|"
- "cvs[^/.]\\{6\\}" "\\|"
- "quilt_header\.[^/.]\\{6\\}"
- "\\)$")
- . text-mode)
- ("\\.calc?$" . apcalc-mode)
- ("/\\(s\\|sh\\)/" . arm-assembler-mode)
- ("\\.\\(cmd\\|exec\\|rexx\\)$" . rexx-mode)
- ("\\.st$" . smalltalk-mode)
- ("\\.msgs$" . messages-mode)
- ("/all-cmds\\.in$" . cpp-messages-mode)
- ("\\.\\(tex\\|dtx\\)$" . latex-mode)
- ("\\.gc$" . haskell.-mode)
- (,(concat "^" (getenv "HOME") "/News/") . mdwmail-mode)
- (,(concat "^" tmpdir "/\\(SLRN\\|snd\\|pico\\|mutt\\)")
- . mdwmail-mode))
- auto-mode-alist))
+ (append `(("\\.p[lm]$" . cperl-mode)
+ ("\\.sage$" . python-mode)
+ ("\\.m$" . objc-mode)
+ ("\\.mxd$" . c-mode)
+ ("\\.cs$" . csharp-mode)
+ ("\\.go$" . go-mode)
+ ("\\.org$" . org-mode)
+ ("\\.make$" . makefile-mode)
+ ("\\.mk?d$" . markdown-mode)
+ ;; ("/[ch]/" . c-mode)
+ (,(concat "/\\("
+ "\\.stgit\\.msg" "\\|"
+ "\\.topmsg" "\\|"
+ "\\.git/COMMIT_EDITMSG" "\\|"
+ "svn-commit\\.tmp" "\\|"
+ "svk-commit[^/.]*\\.tmp"
+ "\\)$")
+ . text-mode)
+ (,(concat "^" tmpdir "/\\("
+ "svk-commit[^/.]*\\.tmp" "\\|"
+ "gitci\\.[^/.]*" "\\|"
+ "cvs[^/.]\\{6\\}" "\\|"
+ "quilt_header\.[^/.]\\{6\\}"
+ "\\)$")
+ . text-mode)
+ ("\\.calc?$" . apcalc-mode)
+ ("/\\(s\\|sh\\)/" . arm-assembler-mode)
+ ("\\.\\(cmd\\|exec\\|rexx\\)$" . rexx-mode)
+ ("\\.st$" . smalltalk-mode)
+ ("\\.msgs$" . messages-mode)
+ ("/all-cmds\\.in$" . cpp-messages-mode)
+ ("\\.\\(tex\\|dtx\\)$" . latex-mode)
+ ("\\.gc$" . haskell.-mode)
+ (,(concat "^" (getenv "HOME") "/News/") . mdwmail-mode)
+ (,(concat "^" tmpdir "/\\(SLRN\\|snd\\|pico\\|mutt\\)")
+ . mdwmail-mode))
+ auto-mode-alist))
(setq interpreter-mode-alist
- (append `(("runlisp" . lisp-mode)
- ("@BASH@" . sh-mode)
- ("@PYTHON@" . python-mode)
- ("sage" . python-mode)
- ("@PERL@" . cperl-mode)
- ("perl" . cperl-mode)
- ("@TCLSH@" . tcl-mode)
- ("@WISH@" . tcl-mode)
- ("tclsh" . tcl-mode)
- ("wish" . tcl-mode))
- interpreter-mode-alist))
+ (append `(("runlisp" . lisp-mode)
+ ("@BASH@" . sh-mode)
+ ("@PYTHON@" . python-mode)
+ ("sage" . python-mode)
+ ("@PERL@" . cperl-mode)
+ ("perl" . cperl-mode)
+ ("@TCLSH@" . tcl-mode)
+ ("@WISH@" . tcl-mode)
+ ("tclsh" . tcl-mode)
+ ("wish" . tcl-mode))
+ interpreter-mode-alist))
(setq completion-ignored-extensions
- (append `(".hc" ".hi") completion-ignored-extensions))
+ (append `(".hc" ".hi") completion-ignored-extensions))
(dolist (dir (remove-if-not (lambda (ext)
(= (aref ext (- (length ext) 1)) ?/))
completion-ignored-extensions))
(if (/= (aref dir 0) ?/)
(setq completion-ignored-extensions
- (cons (concat "/" dir)
- (remove dir completion-ignored-extensions)))))
+ (cons (concat "/" dir)
+ (remove dir completion-ignored-extensions)))))
;; Some common local definitions.
'(let ((fix-args (if (mdw-version-< tramp-version "2.1")
#'append #'list)))
(setq tramp-methods
- (mdw-uniquify-alist
- `(("become"
- (tramp-connection-function tramp-open-connection-su)
- (tramp-remote-sh "/bin/sh")
- (tramp-login-program "become")
- (tramp-copy-program nil)
- (tramp-copy-args nil)
- (tramp-copy-keep-date-arg nil)
- (tramp-login-args ,(funcall fix-args `("TERM=dumb" "%u"))))
- ("really"
- (tramp-connection-function tramp-open-connection-su)
- (tramp-login-program "really")
- (tramp-login-args ,(funcall fix-args
- `("-u" "%u")
- `("--")
- `("env" "TERM=dumb" "/bin/sh")))
- (tramp-copy-program nil)
- (tramp-copy-args nil)
- (tramp-copy-keep-date-arg nil)
- (tramp-remote-sh "/bin/sh"))
- ,@tramp-methods)))
+ (mdw-uniquify-alist
+ `(("become"
+ (tramp-connection-function tramp-open-connection-su)
+ (tramp-remote-sh "/bin/sh")
+ (tramp-login-program "become")
+ (tramp-copy-program nil)
+ (tramp-copy-args nil)
+ (tramp-copy-keep-date-arg nil)
+ (tramp-login-args ,(funcall fix-args `("TERM=dumb" "%u"))))
+ ("really"
+ (tramp-connection-function tramp-open-connection-su)
+ (tramp-login-program "really")
+ (tramp-login-args ,(funcall fix-args
+ `("-u" "%u")
+ `("--")
+ `("env" "TERM=dumb" "/bin/sh")))
+ (tramp-copy-program nil)
+ (tramp-copy-args nil)
+ (tramp-copy-keep-date-arg nil)
+ (tramp-remote-sh "/bin/sh"))
+ ,@tramp-methods)))
(setq tramp-default-method "ssh")
(let ((rootlyness (cond ((executable-find "really") "really")
((executable-find "become") "become")
(this-user (concat "\\`\\(" (user-login-name) "\\|"
(user-real-login-name) "\\)?\\'")))
(setq tramp-default-method-alist
- `((,this-host nil ,rootlyness)
- (nil ,this-user "ssh")
- (nil "." ,rootlyness)))
+ `((,this-host nil ,rootlyness)
+ (nil ,this-user "ssh")
+ (nil "." ,rootlyness)))
(setq tramp-default-proxies-alist
- `((,this-host nil nil)
- (nil "." "/ssh:%h:"))))))
+ `((,this-host nil nil)
+ (nil "." "/ssh:%h:"))))))
;;;--------------------------------------------------------------------------
;;; General fontification.
;; Late, for `mdw-black-background'.
(setq-default py-python-command-args
- `("-i" "-colors" ,(if mdw-black-background "Linux" "LightBG")))
+ `("-i" "-colors" ,(if mdw-black-background "Linux" "LightBG")))
;;;--------------------------------------------------------------------------
;;; Blogging.
(setq weblogger-config-alist
- '(("vox"
- ("user" . "mdw")
- ("server-url" . "http://vox.distorted.org.uk/admin/mt-xmlrpc.cgi")
- ("weblog" . "1"))))
+ '(("vox"
+ ("user" . "mdw")
+ ("server-url" . "http://vox.distorted.org.uk/admin/mt-xmlrpc.cgi")
+ ("weblog" . "1"))))
;;;--------------------------------------------------------------------------
;;; Shell mode.
(setq shell-prompt-pattern "^[^]#$%>»}\n]*\\([]#$%»}]\\|>>?\\) *")
(setq comint-password-prompt-regexp
- (concat "\\(\\([Ee]nter \\|[Oo]ld \\|[Nn]ew \\|[a-zA-Z0-9_]*'s \\|^\\)"
- "[Pp]assword\\|[Pp]ass ?phrase\\( [-a-zA-Z0-9._]+\\)?\\):")
+ (concat "\\(\\([Ee]nter \\|[Oo]ld \\|[Nn]ew \\|[a-zA-Z0-9_]*'s \\|^\\)"
+ "[Pp]assword\\|[Pp]ass ?phrase\\( [-a-zA-Z0-9._]+\\)?\\):")
comint-file-name-chars "~/A-Za-z0-9+@:_.$#%,={}-"
shell-file-name-chars comint-file-name-chars)
"Read the configuration variable named SYM."
(unless mdw-config
(setq mdw-config
- (flet ((replace (what with)
- (goto-char (point-min))
- (while (re-search-forward what nil t)
- (replace-match with t))))
- (with-temp-buffer
- (insert-file-contents "~/.mdw.conf")
- (replace "^[ \t]*\\(#.*\\)?\n" "")
- (replace (concat "^[ \t]*"
- "\\([-a-zA-Z0-9_.]*\\)"
- "[ \t]*=[ \t]*"
- "\\(.*[^ \t\n]\\)?"
- "[ \t]**\\(\n\\|$\\)")
- "(\\1 . \"\\2\")\n")
- (car (read-from-string
- (concat "(" (buffer-string) ")")))))))
+ (flet ((replace (what with)
+ (goto-char (point-min))
+ (while (re-search-forward what nil t)
+ (replace-match with t))))
+ (with-temp-buffer
+ (insert-file-contents "~/.mdw.conf")
+ (replace "^[ \t]*\\(#.*\\)?\n" "")
+ (replace (concat "^[ \t]*"
+ "\\([-a-zA-Z0-9_.]*\\)"
+ "[ \t]*=[ \t]*"
+ "\\(.*[^ \t\n]\\)?"
+ "[ \t]**\\(\n\\|$\\)")
+ "(\\1 . \"\\2\")\n")
+ (car (read-from-string
+ (concat "(" (buffer-string) ")")))))))
(cdr (assq sym mdw-config)))
;; Width configuration.
(insert e)
(setq anyp t)))
(setq ad-return-value
- (and anyp (buffer-string))))))
+ (and anyp (buffer-string))))))
;; Fighting with Org-mode's evil key maps.
(eval-after-load "org-latex"
'(setq org-export-latex-classes
- (append mdw-org-latex-defs org-export-latex-classes)))
+ (append mdw-org-latex-defs org-export-latex-classes)))
(eval-after-load "ox-latex"
'(setq org-latex-classes (append mdw-org-latex-defs org-latex-classes)
(setq org-export-docbook-xslt-proc-command "xsltproc --output %o %s %i"
org-export-docbook-xsl-fo-proc-command "fop %i.safe %o"
org-export-docbook-xslt-stylesheet
- "/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl")
+ "/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl")
;; Glasses.
buffers in random frames.")
(setq display-buffer--other-frame-action
- '((display-buffer-reuse-window display-buffer-pop-up-frame)
- (reusable-frames . nil)
- (inhibit-same-window . t)))
+ '((display-buffer-reuse-window display-buffer-pop-up-frame)
+ (reusable-frames . nil)
+ (inhibit-same-window . t)))
(defadvice walk-windows (around mdw-inhibit activate)
"If `mdw-inhibit-walk-windows' is non-nil, then do nothing."
(unless mdw-inhibit-rename-buffer
(let ((buffer (get-file-buffer from)))
(when buffer
- (with-current-buffer buffer
- (set-visited-file-name to nil t))))))
+ (let ((to (if (not (directory-name-p to)) to
+ (concat to (file-name-nondirectory from)))))
+ (with-current-buffer buffer
+ (set-visited-file-name to nil t)))))))
;;;--------------------------------------------------------------------------
;;; Improved compilation machinery.
;; Uprated version of M-x compile.
(setq compile-command
- (let ((ncpu (with-temp-buffer
- (insert-file-contents "/proc/cpuinfo")
- (buffer-string)
- (count-matches "^processor\\s-*:"))))
- (format "make -j%d -k" (* 2 ncpu))))
+ (let ((ncpu (with-temp-buffer
+ (insert-file-contents "/proc/cpuinfo")
+ (buffer-string)
+ (count-matches "^processor\\s-*:"))))
+ (format "make -j%d -k" (* 2 ncpu))))
(defun mdw-compilation-buffer-name (mode)
(concat "*" (downcase mode) ": "
#'flymake-get-make-cmdline)))))
(setq flymake-allowed-file-name-masks
- '(("\\.\\(?:[cC]\\|cc\\|cpp\\|cxx\\|c\\+\\+\\)\\'"
- mdw-flymake-make-init)
- ("\\.\\(?:[hH]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'"
- mdw-flymake-master-make-init)
- ("\\.p[lm]" flymake-perl-init)))
+ '(("\\.\\(?:[cC]\\|cc\\|cpp\\|cxx\\|c\\+\\+\\)\\'"
+ mdw-flymake-make-init)
+ ("\\.\\(?:[hH]\\|hh\\|hpp\\|hxx\\|h\\+\\+\\)\\'"
+ mdw-flymake-master-make-init)
+ ("\\.p[lm]" flymake-perl-init)))
(setq flymake-mode-map
- (let ((map (if (boundp 'flymake-mode-map)
- flymake-mode-map
- (make-sparse-keymap))))
- (define-key map [?\C-c ?\C-f ?\C-p] 'flymake-goto-prev-error)
- (define-key map [?\C-c ?\C-f ?\C-n] 'flymake-goto-next-error)
- (define-key map [?\C-c ?\C-f ?\C-c] 'flymake-compile)
- (define-key map [?\C-c ?\C-f ?\C-k] 'flymake-stop-all-syntax-checks)
- (define-key map [?\C-c ?\C-f ?\C-e] 'flymake-popup-current-error-menu)
- map))
+ (let ((map (if (boundp 'flymake-mode-map)
+ flymake-mode-map
+ (make-sparse-keymap))))
+ (define-key map [?\C-c ?\C-f ?\C-p] 'flymake-goto-prev-error)
+ (define-key map [?\C-c ?\C-f ?\C-n] 'flymake-goto-next-error)
+ (define-key map [?\C-c ?\C-f ?\C-c] 'flymake-compile)
+ (define-key map [?\C-c ?\C-f ?\C-k] 'flymake-stop-all-syntax-checks)
+ (define-key map [?\C-c ?\C-f ?\C-e] 'flymake-popup-current-error-menu)
+ map))
;;;--------------------------------------------------------------------------
;;; Mail and news hacking.
(make-local-variable 'paragraph-separate)
(make-local-variable 'paragraph-start)
(setq paragraph-start
- (concat "[ \t]*[-_][-_][-_]+$\\|^-- \\|-----\\|"
- paragraph-start))
+ (concat "[ \t]*[-_][-_][-_]+$\\|^-- \\|-----\\|"
+ paragraph-start))
(setq paragraph-separate
(concat "[ \t]*[-_][-_][-_]+$\\|^-- \\|-----\\|"
paragraph-separate))))
(backward-char 1))
(beginning-of-line)
(setq article
- (and (re-search-forward "UID \\([0-9]+\\)" (line-end-position)
- t)
- (match-string 1)))
+ (and (re-search-forward "UID \\([0-9]+\\)"
+ (line-end-position)
+ t)
+ (match-string 1)))
(setq lines nil)
(setq size
- (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)"
- (line-end-position)
- t)
- (match-string 1)))
+ (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)"
+ (line-end-position)
+ t)
+ (match-string 1)))
(beginning-of-line)
(when (search-forward "BODYSTRUCTURE" (line-end-position) t)
(let ((structure (ignore-errors
;; Preferred programs.
(setq mailcap-user-mime-data
- '(((type . "application/pdf") (viewer . "mupdf %s"))))
+ '(((type . "application/pdf") (viewer . "mupdf %s"))))
;;;--------------------------------------------------------------------------
;;; Utility functions.
(eq (field-at-pos (point)) 'output))
ad-do-it
(setq ad-return-value
- (constrain-to-field (line-beginning-position) (point)))))
+ (constrain-to-field (line-beginning-position) (point)))))
;;;--------------------------------------------------------------------------
;;; Dired hacking.
design it doesn't cope with anything approximating a complicated
case."
(setq mdw-fill-prefix
- `(((if (mdw-point-within-string-p)
- ,(concat "\\(\\s-*\\)" mdw-hanging-indents)
- ,(concat rx mdw-hanging-indents))
- (match . 1)
- (pad . ,(or mat 2))))))
+ `(((if (mdw-point-within-string-p)
+ ,(concat "\\(\\s-*\\)" mdw-hanging-indents)
+ ,(concat rx mdw-hanging-indents))
+ (match . 1)
+ (pad . ,(or mat 2))))))
;;;--------------------------------------------------------------------------
;;; Other common declarations.
:global nil
(let ((buffer (current-buffer)))
(setq mdw-point-overlay-buffers
- (mapcan (lambda (buf)
- (if (and (buffer-live-p buf)
- (not (eq buf buffer)))
- (list buf)))
- mdw-point-overlay-buffers))
+ (mapcan (lambda (buf)
+ (if (and (buffer-live-p buf)
+ (not (eq buf buffer)))
+ (list buf)))
+ mdw-point-overlay-buffers))
(if mdw-point-overlay-mode
(setq mdw-point-overlay-buffers
- (cons buffer mdw-point-overlay-buffers))))
+ (cons buffer mdw-point-overlay-buffers))))
(cond (mdw-point-overlay-buffers
(add-hook 'pre-command-hook 'mdw-remove-point-overlay)
(add-hook 'post-command-hook 'mdw-update-point-overlay))
(unless (and old (equal (cdr old) new))
(if old (rplacd old new)
(setq mdw-terminal-title-alist
- (cons (cons tty new) mdw-terminal-title-alist)))
+ (cons (cons tty new) mdw-terminal-title-alist)))
(send-string-to-terminal (concat "\e]2;" new "\e\\"))))))
(add-hook 'post-command-hook 'mdw-update-terminal-title)
(func (intern (concat "mdw-define-c-style/" name-string))))
`(progn
(setq ,var
- ,(if (null parent)
- `',assocs
- (let ((parent-list (intern (concat "mdw-c-style/"
- (symbol-name parent)))))
- `(mdw-merge-style-alists ',assocs ,parent-list))))
+ ,(if (null parent)
+ `',assocs
+ (let ((parent-list (intern (concat "mdw-c-style/"
+ (symbol-name parent)))))
+ `(mdw-merge-style-alists ',assocs ,parent-list))))
(defun ,func () (c-add-style ,name-string ,var))
(and (featurep 'cc-mode) (,func))
(add-hook 'mdw-define-c-styles-hook ',func)
(let ((modes (if (listp modes) modes (list modes)))
(style (symbol-name style)))
(setq c-default-style
- (append (mapcar (lambda (mode)
- (cons mode style))
- modes)
- (remove-if (lambda (assoc)
- (memq (car assoc) modes))
- (if (listp c-default-style)
- c-default-style
- (list (cons 'other c-default-style))))))))
+ (append (mapcar (lambda (mode)
+ (cons mode style))
+ modes)
+ (remove-if (lambda (assoc)
+ (memq (car assoc) modes))
+ (if (listp c-default-style)
+ c-default-style
+ (list (cons 'other c-default-style))))))))
(setq c-default-style "mdw-c")
(mdw-set-default-c-style '(c-mode c++-mode) 'mdw-c)
"selector")))
(setq font-lock-keywords
- (list
-
- ;; Fontify include files as strings.
- (list (concat "^[ \t]*\\#[ \t]*"
- "\\(include\\|import\\)"
- "[ \t]*\\(<[^>]+>?\\)")
- '(2 font-lock-string-face))
-
- ;; Preprocessor directives are `references'?.
- (list (concat "^\\([ \t]*#[ \t]*\\(\\("
- preprocessor-keywords
- "\\)\\>\\|[0-9]+\\|$\\)\\)")
- '(1 font-lock-keyword-face))
-
- ;; Handle the keywords defined above.
- (list (concat "@\\<\\(" objc-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
-
- (list (concat "\\<\\(" c-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
-
- (list (concat "\\<\\(" c-builtins "\\)\\>")
- '(0 font-lock-variable-name-face))
-
- ;; Handle numbers too.
- ;;
- ;; This looks strange, I know. It corresponds to the
- ;; preprocessor's idea of what a number looks like, rather than
- ;; anything sensible.
- (list (concat "\\(\\<[0-9]\\|\\.[0-9]\\)"
- "\\([Ee][+-]\\|[0-9A-Za-z_.]\\)*")
- '(0 mdw-number-face))
+ (list
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; Fontify include files as strings.
+ (list (concat "^[ \t]*\\#[ \t]*"
+ "\\(include\\|import\\)"
+ "[ \t]*\\(<[^>]+>?\\)")
+ '(2 font-lock-string-face))
+
+ ;; Preprocessor directives are `references'?.
+ (list (concat "^\\([ \t]*#[ \t]*\\(\\("
+ preprocessor-keywords
+ "\\)\\>\\|[0-9]+\\|$\\)\\)")
+ '(1 font-lock-keyword-face))
+
+ ;; Handle the keywords defined above.
+ (list (concat "@\\<\\(" objc-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
+
+ (list (concat "\\<\\(" c-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
+
+ (list (concat "\\<\\(" c-builtins "\\)\\>")
+ '(0 font-lock-variable-name-face))
+
+ ;; Handle numbers too.
+ ;;
+ ;; This looks strange, I know. It corresponds to the
+ ;; preprocessor's idea of what a number looks like, rather than
+ ;; anything sensible.
+ (list (concat "\\(\\<[0-9]\\|\\.[0-9]\\)"
+ "\\([Ee][+-]\\|[0-9A-Za-z_.]\\)*")
+ '(0 mdw-number-face))
+
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(define-derived-mode sod-mode c-mode "Sod"
"Major mode for editing Sod code.")
"show" "static" "switch" "while" "write")))
(setq font-lock-keywords
- (list
+ (list
- ;; Handle the keywords defined above.
- (list (concat "\\<\\(" c-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Handle the keywords defined above.
+ (list (concat "\\<\\(" c-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; Handle numbers too.
- ;;
- ;; This looks strange, I know. It corresponds to the
- ;; preprocessor's idea of what a number looks like, rather than
- ;; anything sensible.
- (list (concat "\\(\\<[0-9]\\|\\.[0-9]\\)"
- "\\([Ee][+-]\\|[0-9A-Za-z_.]\\)*")
- '(0 mdw-number-face))
+ ;; Handle numbers too.
+ ;;
+ ;; This looks strange, I know. It corresponds to the
+ ;; preprocessor's idea of what a number looks like, rather than
+ ;; anything sensible.
+ (list (concat "\\(\\<[0-9]\\|\\.[0-9]\\)"
+ "\\([Ee][+-]\\|[0-9A-Za-z_.]\\)*")
+ '(0 mdw-number-face))
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'apcalc-mode-hook 'mdw-misc-mode-config t)
(mdw-regexps "false" "null" "super" "this" "true")))
(setq font-lock-keywords
- (list
+ (list
- ;; Handle the keywords defined above.
- (list (concat "\\<\\(" java-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Handle the keywords defined above.
+ (list (concat "\\<\\(" java-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; Handle the magic builtins defined above.
- (list (concat "\\<\\(" java-builtins "\\)\\>")
- '(0 font-lock-variable-name-face))
-
- ;; Handle numbers too.
- ;;
- ;; The following isn't quite right, but it's close enough.
- (list (concat "\\<\\("
- "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
- "[0-9]+\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?\\)"
- "[lLfFdD]?")
- '(0 mdw-number-face))
+ ;; Handle the magic builtins defined above.
+ (list (concat "\\<\\(" java-builtins "\\)\\>")
+ '(0 font-lock-variable-name-face))
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; Handle numbers too.
+ ;;
+ ;; The following isn't quite right, but it's close enough.
+ (list (concat "\\<\\("
+ "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
+ "[0-9]+\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\)?\\)"
+ "[lLfFdD]?")
+ '(0 mdw-number-face))
+
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'java-mode-hook 'mdw-misc-mode-config t)
"arguments" "this")))
(setq font-lock-keywords
- (list
+ (list
- ;; Handle the keywords defined above.
- (list (concat "\\_<\\(" javascript-keywords "\\)\\_>")
- '(0 font-lock-keyword-face))
+ ;; Handle the keywords defined above.
+ (list (concat "\\_<\\(" javascript-keywords "\\)\\_>")
+ '(0 font-lock-keyword-face))
- ;; Handle the predefined builtins defined above.
- (list (concat "\\_<\\(" javascript-builtins "\\)\\_>")
- '(0 font-lock-variable-name-face))
-
- ;; Handle numbers too.
- ;;
- ;; The following isn't quite right, but it's close enough.
- (list (concat "\\_<\\("
- "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
- "[0-9]+\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?\\)"
- "[lLfFdD]?")
- '(0 mdw-number-face))
+ ;; Handle the predefined builtins defined above.
+ (list (concat "\\_<\\(" javascript-builtins "\\)\\_>")
+ '(0 font-lock-variable-name-face))
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; Handle numbers too.
+ ;;
+ ;; The following isn't quite right, but it's close enough.
+ (list (concat "\\_<\\("
+ "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
+ "[0-9]+\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\)?\\)"
+ "[lLfFdD]?")
+ '(0 mdw-number-face))
+
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'js-mode-hook 'mdw-misc-mode-config t)
(punctuation "[-!%^&*=+:@#~/?\\|`]"))
(setq font-lock-keywords
- (list
+ (list
- ;; Magical identifiers between backticks.
- (list (concat "`\\([^`]+\\)`")
- '(1 font-lock-variable-name-face))
+ ;; Magical identifiers between backticks.
+ (list (concat "`\\([^`]+\\)`")
+ '(1 font-lock-variable-name-face))
- ;; Handle the keywords defined above.
- (list (concat "\\_<\\(" scala-keywords "\\)\\_>")
- '(0 font-lock-keyword-face))
+ ;; Handle the keywords defined above.
+ (list (concat "\\_<\\(" scala-keywords "\\)\\_>")
+ '(0 font-lock-keyword-face))
- ;; Handle the constants defined above.
- (list (concat "\\_<\\(" scala-constants "\\)\\_>")
- '(0 font-lock-variable-name-face))
-
- ;; Magical identifiers between backticks.
- (list (concat "`\\([^`]+\\)`")
- '(1 font-lock-variable-name-face))
-
- ;; Handle numbers too.
- ;;
- ;; As usual, not quite right.
- (list (concat "\\_<\\("
- "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
- "[0-9]+\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?\\)"
- "[lLfFdD]?")
- '(0 mdw-number-face))
+ ;; Handle the constants defined above.
+ (list (concat "\\_<\\(" scala-constants "\\)\\_>")
+ '(0 font-lock-variable-name-face))
- ;; And everything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))
+ ;; Magical identifiers between backticks.
+ (list (concat "`\\([^`]+\\)`")
+ '(1 font-lock-variable-name-face))
+
+ ;; Handle numbers too.
+ ;;
+ ;; As usual, not quite right.
+ (list (concat "\\_<\\("
+ "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
+ "[0-9]+\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\)?\\)"
+ "[lLfFdD]?")
+ '(0 mdw-number-face))
+
+ ;; And everything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face)))
font-lock-syntactic-keywords
- (list
+ (list
- ;; Single quotes around characters. But not when used to quote
- ;; symbol names. Ugh.
- (list (concat "\\('\\)"
- "\\(" "."
- "\\|" "\\\\" "\\(" "\\\\\\\\" "\\)*"
- "u+" "[0-9a-fA-F]\\{4\\}"
- "\\|" "\\\\" "[0-7]\\{1,3\\}"
- "\\|" "\\\\" "." "\\)"
- "\\('\\)")
- '(1 "\"")
- '(4 "\""))))))
+ ;; Single quotes around characters. But not when used to quote
+ ;; symbol names. Ugh.
+ (list (concat "\\('\\)"
+ "\\(" "."
+ "\\|" "\\\\" "\\(" "\\\\\\\\" "\\)*"
+ "u+" "[0-9a-fA-F]\\{4\\}"
+ "\\|" "\\\\" "[0-7]\\{1,3\\}"
+ "\\|" "\\\\" "." "\\)"
+ "\\('\\)")
+ '(1 "\"")
+ '(4 "\""))))))
(progn
(add-hook 'scala-mode-hook 'mdw-misc-mode-config t)
(mdw-regexps "base" "false" "null" "this" "true")))
(setq font-lock-keywords
- (list
+ (list
- ;; Handle the keywords defined above.
- (list (concat "\\<\\(" csharp-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Handle the keywords defined above.
+ (list (concat "\\<\\(" csharp-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; Handle the magic builtins defined above.
- (list (concat "\\<\\(" csharp-builtins "\\)\\>")
- '(0 font-lock-variable-name-face))
-
- ;; Handle numbers too.
- ;;
- ;; The following isn't quite right, but it's close enough.
- (list (concat "\\<\\("
- "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
- "[0-9]+\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?\\)"
- "[lLfFdD]?")
- '(0 mdw-number-face))
+ ;; Handle the magic builtins defined above.
+ (list (concat "\\<\\(" csharp-builtins "\\)\\>")
+ '(0 font-lock-variable-name-face))
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; Handle numbers too.
+ ;;
+ ;; The following isn't quite right, but it's close enough.
+ (list (concat "\\<\\("
+ "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
+ "[0-9]+\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\)?\\)"
+ "[lLfFdD]?")
+ '(0 mdw-number-face))
+
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(define-derived-mode csharp-mode java-mode "C#"
"Major mode for editing C# code.")
(mdw-regexps "if" "indent" "else" "endif")))
(setq font-lock-keywords
- (list (list (concat "\\(^\\|[^\"]\\)"
- "\\(" "(\\*"
- "[^*]*\\*+"
- "\\(" "[^)*]" "[^*]*" "\\*+" "\\)*"
- ")"
- "\\|"
- "//.*"
- "\\)")
- '(2 font-lock-comment-face))
-
- (list (concat "'" "\\("
- "\\\\"
- "\\(" "[ntbr'\\]"
- "\\|" "[0-9][0-9][0-9]"
- "\\|" "u" "[0-9a-fA-F]\\{4\\}"
- "\\|" "U" "[0-9a-fA-F]\\{8\\}"
- "\\)"
- "\\|"
- "." "\\)" "'"
- "\\|"
- "\"" "[^\"\\]*"
- "\\(" "\\\\" "\\(.\\|\n\\)"
- "[^\"\\]*" "\\)*"
- "\\(\"\\|\\'\\)")
- '(0 font-lock-string-face))
-
- (list (concat "\\_<\\(" bang-keywords "\\)!" "\\|"
- "^#[ \t]*\\(" preprocessor-keywords "\\)\\_>"
- "\\|"
- "\\_<\\(" fsharp-keywords "\\)\\_>")
- '(0 font-lock-keyword-face))
- (list (concat "\\<\\(" fsharp-builtins "\\)\\_>")
- '(0 font-lock-variable-name-face))
-
- (list (concat "\\_<"
- "\\(" "0[bB][01]+" "\\|"
- "0[oO][0-7]+" "\\|"
- "0[xX][0-9a-fA-F]+" "\\)"
- "\\(" "lf\\|LF" "\\|"
- "[uU]?[ysnlL]?" "\\)"
- "\\|"
- "\\_<"
- "[0-9]+" "\\("
- "[mMQRZING]"
+ (list (list (concat "\\(^\\|[^\"]\\)"
+ "\\(" "(\\*"
+ "[^*]*\\*+"
+ "\\(" "[^)*]" "[^*]*" "\\*+" "\\)*"
+ ")"
"\\|"
- "\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?"
- "[fFmM]?"
+ "//.*"
+ "\\)")
+ '(2 font-lock-comment-face))
+
+ (list (concat "'" "\\("
+ "\\\\"
+ "\\(" "[ntbr'\\]"
+ "\\|" "[0-9][0-9][0-9]"
+ "\\|" "u" "[0-9a-fA-F]\\{4\\}"
+ "\\|" "U" "[0-9a-fA-F]\\{8\\}"
+ "\\)"
+ "\\|"
+ "." "\\)" "'"
"\\|"
- "[uU]?[ysnlL]?"
- "\\)")
- '(0 mdw-number-face))
+ "\"" "[^\"\\]*"
+ "\\(" "\\\\" "\\(.\\|\n\\)"
+ "[^\"\\]*" "\\)*"
+ "\\(\"\\|\\'\\)")
+ '(0 font-lock-string-face))
+
+ (list (concat "\\_<\\(" bang-keywords "\\)!" "\\|"
+ "^#[ \t]*\\(" preprocessor-keywords "\\)\\_>"
+ "\\|"
+ "\\_<\\(" fsharp-keywords "\\)\\_>")
+ '(0 font-lock-keyword-face))
+ (list (concat "\\<\\(" fsharp-builtins "\\)\\_>")
+ '(0 font-lock-variable-name-face))
+
+ (list (concat "\\_<"
+ "\\(" "0[bB][01]+" "\\|"
+ "0[oO][0-7]+" "\\|"
+ "0[xX][0-9a-fA-F]+" "\\)"
+ "\\(" "lf\\|LF" "\\|"
+ "[uU]?[ysnlL]?" "\\)"
+ "\\|"
+ "\\_<"
+ "[0-9]+" "\\("
+ "[mMQRZING]"
+ "\\|"
+ "\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\)?"
+ "[fFmM]?"
+ "\\|"
+ "[uU]?[ysnlL]?"
+ "\\)")
+ '(0 mdw-number-face))
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(defun mdw-fontify-inferior-fsharp ()
(mdw-fontify-fsharp)
(setq font-lock-keywords
- (append (list (list "^[#-]" '(0 font-lock-comment-face))
- (list "^>" '(0 font-lock-keyword-face)))
- font-lock-keywords)))
+ (append (list (list "^[#-]" '(0 font-lock-comment-face))
+ (list "^>" '(0 font-lock-keyword-face)))
+ font-lock-keywords)))
(progn
(add-hook 'fsharp-mode-hook 'mdw-misc-mode-config t)
"new" "panic" "real" "recover")))
(setq font-lock-keywords
- (list
-
- ;; Handle the keywords defined above.
- (list (concat "\\<\\(" go-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
- (list (concat "\\<\\(" go-intrinsics "\\)\\>")
- '(0 font-lock-variable-name-face))
-
- ;; Strings and characters.
- (list (concat "'"
- "\\(" "[^\\']" "\\|"
- "\\\\"
- "\\(" "[abfnrtv\\'\"]" "\\|"
- "[0-7]\\{3\\}" "\\|"
- "x" "[0-9A-Fa-f]\\{2\\}" "\\|"
- "u" "[0-9A-Fa-f]\\{4\\}" "\\|"
- "U" "[0-9A-Fa-f]\\{8\\}" "\\)" "\\)"
- "'"
- "\\|"
- "\""
- "\\(" "[^\n\\\"]+" "\\|" "\\\\." "\\)*"
- "\\(\"\\|$\\)"
- "\\|"
- "`" "[^`]+" "`")
- '(0 font-lock-string-face))
-
- ;; Handle numbers too.
- ;;
- ;; The following isn't quite right, but it's close enough.
- (list (concat "\\<\\("
- "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
- "[0-9]+\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?\\)")
- '(0 mdw-number-face))
+ (list
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; Handle the keywords defined above.
+ (list (concat "\\<\\(" go-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
+ (list (concat "\\<\\(" go-intrinsics "\\)\\>")
+ '(0 font-lock-variable-name-face))
+
+ ;; Strings and characters.
+ (list (concat "'"
+ "\\(" "[^\\']" "\\|"
+ "\\\\"
+ "\\(" "[abfnrtv\\'\"]" "\\|"
+ "[0-7]\\{3\\}" "\\|"
+ "x" "[0-9A-Fa-f]\\{2\\}" "\\|"
+ "u" "[0-9A-Fa-f]\\{4\\}" "\\|"
+ "U" "[0-9A-Fa-f]\\{8\\}" "\\)" "\\)"
+ "'"
+ "\\|"
+ "\""
+ "\\(" "[^\n\\\"]+" "\\|" "\\\\." "\\)*"
+ "\\(\"\\|$\\)"
+ "\\|"
+ "`" "[^`]+" "`")
+ '(0 font-lock-string-face))
+
+ ;; Handle numbers too.
+ ;;
+ ;; The following isn't quite right, but it's close enough.
+ (list (concat "\\<\\("
+ "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
+ "[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))))))
(progn
(add-hook 'go-mode-hook 'mdw-misc-mode-config t)
(add-hook 'go-mode-hook 'mdw-fontify-go t))
"char" "str"
"self" "Self")))
(setq font-lock-keywords
- (list
+ (list
- ;; Handle the keywords defined above.
- (list (concat "\\_<\\(" rust-keywords "\\)\\_>")
- '(0 font-lock-keyword-face))
- (list (concat "\\_<\\(" rust-builtins "\\)\\_>")
- '(0 font-lock-variable-name-face))
-
- ;; Handle numbers too.
- (list (concat "\\_<\\("
- "[0-9][0-9_]*"
- "\\(" "\\(\\.[0-9_]+\\)?[eE][-+]?[0-9_]+"
- "\\|" "\\.[0-9_]+"
- "\\)"
- "\\(f32\\|f64\\)?"
- "\\|" "\\(" "[0-9][0-9_]*"
- "\\|" "0x[0-9a-fA-F_]+"
- "\\|" "0o[0-7_]+"
- "\\|" "0b[01_]+"
- "\\)"
- "\\([ui]\\(8\\|16\\|32\\|64\\|size\\)\\)?"
- "\\)\\_>")
- '(0 mdw-number-face))
-
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
+ ;; Handle the keywords defined above.
+ (list (concat "\\_<\\(" rust-keywords "\\)\\_>")
+ '(0 font-lock-keyword-face))
+ (list (concat "\\_<\\(" rust-builtins "\\)\\_>")
+ '(0 font-lock-variable-name-face))
+
+ ;; Handle numbers too.
+ (list (concat "\\_<\\("
+ "[0-9][0-9_]*"
+ "\\(" "\\(\\.[0-9_]+\\)?[eE][-+]?[0-9_]+"
+ "\\|" "\\.[0-9_]+"
+ "\\)"
+ "\\(f32\\|f64\\)?"
+ "\\|" "\\(" "[0-9][0-9_]*"
+ "\\|" "0x[0-9a-fA-F_]+"
+ "\\|" "0o[0-7_]+"
+ "\\|" "0b[01_]+"
+ "\\)"
+ "\\([ui]\\(8\\|16\\|32\\|64\\|size\\)\\)?"
+ "\\)\\_>")
+ '(0 mdw-number-face))
+
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face)))))
;; Hack key bindings.
(local-set-key [?{] 'mdw-self-insert-and-indent)
"systime" "tolower" "toupper" "while")))
(setq font-lock-keywords
- (list
+ (list
- ;; Handle the keywords defined above.
- (list (concat "\\<\\(" c-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Handle the keywords defined above.
+ (list (concat "\\<\\(" c-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; Handle numbers too.
- ;;
- ;; The following isn't quite right, but it's close enough.
- (list (concat "\\<\\("
- "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
- "[0-9]+\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?\\)"
- "[uUlL]*")
- '(0 mdw-number-face))
+ ;; Handle numbers too.
+ ;;
+ ;; The following isn't quite right, but it's close enough.
+ (list (concat "\\<\\("
+ "0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
+ "[0-9]+\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\)?\\)"
+ "[uUlL]*")
+ '(0 mdw-number-face))
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'awk-mode-hook 'mdw-misc-mode-config t)
"when" "while")))
(setq font-lock-keywords
- (list
+ (list
- ;; Set up the keywords defined above.
- (list (concat "\\<\\(" perl-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Set up the keywords defined above.
+ (list (concat "\\<\\(" perl-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; At least numbers are simpler than C.
- (list (concat "\\<0\\([xX][0-9a-fA-F_]+\\|[0-7_]+\\)\\|"
- "\\<[0-9][0-9_]*\\(\\.[0-9_]*\\)?"
- "\\([eE][-+]?[0-9_]+\\)?")
- '(0 mdw-number-face))
+ ;; At least numbers are simpler than C.
+ (list (concat "\\<0\\([xX][0-9a-fA-F_]+\\|[0-7_]+\\)\\|"
+ "\\<[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))))))
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(defun perl-number-tests (&optional arg)
"Assign consecutive numbers to lines containing `#t'. With ARG,
;; Now define fontification things.
(make-local-variable 'font-lock-keywords)
(setq font-lock-keywords
- (list
+ (list
- ;; Set up the keywords defined above.
- (list (concat "\\_<\\(" keywords "\\)\\_>")
- '(0 font-lock-keyword-face))
+ ;; Set up the keywords defined above.
+ (list (concat "\\_<\\(" keywords "\\)\\_>")
+ '(0 font-lock-keyword-face))
- ;; At least numbers are simpler than C.
- (list (concat "\\_<0\\([xX][0-9a-fA-F]+\\|[oO]?[0-7]+\\|[bB][01]+\\)\\|"
- "\\_<[0-9][0-9]*\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\|[lL]\\)?")
- '(0 mdw-number-face))
+ ;; At least numbers are simpler than C.
+ (list (concat "\\_<0\\([xX][0-9a-fA-F]+\\|[oO]?[0-7]+\\|[bB][01]+\\)\\|"
+ "\\_<[0-9][0-9]*\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\|[lL]\\)?")
+ '(0 mdw-number-face))
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face)))))
;; Define Python fontification styles.
(define-derived-mode pyrex-mode python-mode "Pyrex"
"Major mode for editing Pyrex source code")
(setq auto-mode-alist
- (append '(("\\.pyx$" . pyrex-mode)
- ("\\.pxd$" . pyrex-mode)
- ("\\.pxi$" . pyrex-mode))
- auto-mode-alist))
+ (append '(("\\.pyx$" . pyrex-mode)
+ ("\\.pxd$" . pyrex-mode)
+ ("\\.pxi$" . pyrex-mode))
+ auto-mode-alist))
(progn
(add-hook 'python-mode-hook 'mdw-misc-mode-config t)
"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))
+ (list
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; 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))))))
(progn
(add-hook 'lua-mode-hook 'mdw-misc-mode-config t)
(mdw-regexps "define" "else" "endif" "error" "ifdef" "ifndef"
"include" "line" "undef")))
(setq font-lock-keywords
- (list
+ (list
- ;; Set up the keywords defined above.
- (list (concat "\\<\\(" icon-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Set up the keywords defined above.
+ (list (concat "\\<\\(" icon-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; The things that Icon calls keywords.
- (list "&\\sw+\\>" '(0 font-lock-variable-name-face))
+ ;; The things that Icon calls keywords.
+ (list "&\\sw+\\>" '(0 font-lock-variable-name-face))
- ;; At least numbers are simpler than C.
- (list (concat "\\<[0-9]+"
- "\\([rR][0-9a-zA-Z]+\\|"
- "\\.[0-9]+\\([eE][+-]?[0-9]+\\)?\\)\\>\\|"
- "\\.[0-9]+\\([eE][+-]?[0-9]+\\)?\\>")
- '(0 mdw-number-face))
+ ;; At least numbers are simpler than C.
+ (list (concat "\\<[0-9]+"
+ "\\([rR][0-9a-zA-Z]+\\|"
+ "\\.[0-9]+\\([eE][+-]?[0-9]+\\)?\\)\\>\\|"
+ "\\.[0-9]+\\([eE][+-]?[0-9]+\\)?\\>")
+ '(0 mdw-number-face))
- ;; Preprocessor.
- (list (concat "^[ \t]*$[ \t]*\\<\\("
- preprocessor-keywords
- "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Preprocessor.
+ (list (concat "^[ \t]*$[ \t]*\\<\\("
+ preprocessor-keywords
+ "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; And anything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'icon-mode-hook 'mdw-misc-mode-config t)
(mdw-standard-fill-prefix "\\([ \t]*#+[ \t]*\\)")
(make-local-variable 'font-lock-keywords)
(setq font-lock-keywords
- (list
- (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)))))
+ (list
+ (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)))))
(progn
(add-hook 'tcl-mode-hook 'mdw-misc-mode-config t)
"all-keys" "key" "next" "rest" "include"
"t" "f")))
(setq font-lock-keywords
- (list (list (concat "\\<\\(" dylan-keywords
- "\\|" "with\\(out\\)?-" word
- "\\)\\>")
- '(0 font-lock-keyword-face))
- (list (concat "\\<" word ":" "\\|"
- "#\\(" sharp-keywords "\\)\\>")
- '(0 font-lock-variable-name-face))
- (list (concat "\\("
- "\\([-+]\\|\\<\\)[0-9]+" "\\("
- "\\(\\.[0-9]+\\)?" "\\([eE][-+][0-9]+\\)?"
- "\\|" "/[0-9]+"
- "\\)"
- "\\|" "\\.[0-9]+" "\\([eE][-+][0-9]+\\)?"
- "\\|" "#b[01]+"
- "\\|" "#o[0-7]+"
- "\\|" "#x[0-9a-zA-Z]+"
- "\\)\\>")
- '(0 mdw-number-face))
- (list (concat "\\("
- "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\|"
- "\\_<[-+*/=<>:&|]+\\_>"
- "\\)")
- '(0 mdw-punct-face))))))
+ (list (list (concat "\\<\\(" dylan-keywords
+ "\\|" "with\\(out\\)?-" word
+ "\\)\\>")
+ '(0 font-lock-keyword-face))
+ (list (concat "\\<" word ":" "\\|"
+ "#\\(" sharp-keywords "\\)\\>")
+ '(0 font-lock-variable-name-face))
+ (list (concat "\\("
+ "\\([-+]\\|\\<\\)[0-9]+" "\\("
+ "\\(\\.[0-9]+\\)?" "\\([eE][-+][0-9]+\\)?"
+ "\\|" "/[0-9]+"
+ "\\)"
+ "\\|" "\\.[0-9]+" "\\([eE][-+][0-9]+\\)?"
+ "\\|" "#b[01]+"
+ "\\|" "#o[0-7]+"
+ "\\|" "#x[0-9a-zA-Z]+"
+ "\\)\\>")
+ '(0 mdw-number-face))
+ (list (concat "\\("
+ "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\|"
+ "\\_<[-+*/=<>:&|]+\\_>"
+ "\\)")
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'dylan-mode-hook 'mdw-misc-mode-config t)
(i 1 (1+ i)))
((>= i (length word)) regexp)))))
(setq font-lock-keywords
- (list (list (concat "\\<COMMENT\\>"
- "\\(" not-comment "\\)\\{0,5\\}"
- "\\(\\'\\|\\<COMMENT\\>\\)")
- '(0 font-lock-comment-face))
- (list (concat "\\<CO\\>"
- "\\([^C]+\\|C[^O]\\)\\{0,5\\}"
- "\\($\\|\\<CO\\>\\)")
- '(0 font-lock-comment-face))
- (list "\\<[A-Z_]+\\>"
- '(0 font-lock-keyword-face))
- (list (concat "\\<"
- "[0-9]+"
- "\\(\\.[0-9]+\\)?"
- "\\([eE][-+]?[0-9]+\\)?"
- "\\>")
- '(0 mdw-number-face))
- (list "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/"
- '(0 mdw-punct-face))))))
+ (list (list (concat "\\<COMMENT\\>"
+ "\\(" not-comment "\\)\\{0,5\\}"
+ "\\(\\'\\|\\<COMMENT\\>\\)")
+ '(0 font-lock-comment-face))
+ (list (concat "\\<CO\\>"
+ "\\([^C]+\\|C[^O]\\)\\{0,5\\}"
+ "\\($\\|\\<CO\\>\\)")
+ '(0 font-lock-comment-face))
+ (list "\\<[A-Z_]+\\>"
+ '(0 font-lock-keyword-face))
+ (list (concat "\\<"
+ "[0-9]+"
+ "\\(\\.[0-9]+\\)?"
+ "\\([eE][-+]?[0-9]+\\)?"
+ "\\>")
+ '(0 mdw-number-face))
+ (list "\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/"
+ '(0 mdw-punct-face))))))
(dolist (hook '(a68-mode-hook a68-mode-hooks))
(add-hook hook 'mdw-misc-mode-config t)
"x2d")))
(setq font-lock-keywords
- (list
+ (list
- ;; Set up the keywords defined above.
- (list (concat "\\<\\(" rexx-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Set up the keywords defined above.
+ (list (concat "\\<\\(" rexx-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; Fontify all symbols the same way.
- (list (concat "\\<\\([0-9.][A-Za-z0-9.!?_#@$]*[Ee][+-]?[0-9]+\\|"
- "[A-Za-z0-9.!?_#@$]+\\)")
- '(0 font-lock-variable-name-face))
+ ;; Fontify all symbols the same way.
+ (list (concat "\\<\\([0-9.][A-Za-z0-9.!?_#@$]*[Ee][+-]?[0-9]+\\|"
+ "[A-Za-z0-9.!?_#@$]+\\)")
+ '(0 font-lock-variable-name-face))
- ;; And everything else is punctuation.
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ ;; And everything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'rexx-mode-hook 'mdw-misc-mode-config t)
"where" "while" "with" "withtype")))
(setq font-lock-keywords
- (list
+ (list
- ;; Set up the keywords defined above.
- (list (concat "\\<\\(" sml-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
+ ;; Set up the keywords defined above.
+ (list (concat "\\<\\(" sml-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
- ;; At least numbers are simpler than C.
- (list (concat "\\<\\~?"
- "\\(0\\([wW]?[xX][0-9a-fA-F]+\\|"
- "[wW][0-9]+\\)\\|"
- "\\([0-9]+\\(\\.[0-9]+\\)?"
- "\\([eE]\\~?"
- "[0-9]+\\)?\\)\\)")
- '(0 mdw-number-face))
+ ;; At least numbers are simpler than C.
+ (list (concat "\\<\\~?"
+ "\\(0\\([wW]?[xX][0-9a-fA-F]+\\|"
+ "[wW][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))))))
+ ;; And anything else is punctuation.
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'sml-mode-hook 'mdw-misc-mode-config t)
"SP" "STX" "SUB" "SYN" "US" "VT")))
(setq font-lock-keywords
- (list
- (list (concat "{-" "[^-]*" "\\(-+[^-}][^-]*\\)*"
- "\\(-+}\\|-*\\'\\)"
- "\\|"
- "--.*$")
- '(0 font-lock-comment-face))
- (list (concat "\\_<\\(" haskell-keywords "\\)\\_>")
- '(0 font-lock-keyword-face))
- (list (concat "'\\("
- "[^\\]"
- "\\|"
- "\\\\"
- "\\(" "[abfnrtv\\\"']" "\\|"
- "^" "\\(" control-sequences "\\|"
- "[]A-Z@[\\^_]" "\\)" "\\|"
- "\\|"
- "[0-9]+" "\\|"
- "[oO][0-7]+" "\\|"
- "[xX][0-9A-Fa-f]+"
- "\\)"
- "\\)'")
- '(0 font-lock-string-face))
- (list "\\_<[A-Z]\\(\\sw+\\|\\s_+\\)*\\_>"
- '(0 font-lock-variable-name-face))
- (list (concat "\\_<0\\([xX][0-9a-fA-F]+\\|[oO][0-7]+\\)\\|"
- "\\_<[0-9]+\\(\\.[0-9]*\\)?"
- "\\([eE][-+]?[0-9]+\\)?")
- '(0 mdw-number-face))
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ (list
+ (list (concat "{-" "[^-]*" "\\(-+[^-}][^-]*\\)*"
+ "\\(-+}\\|-*\\'\\)"
+ "\\|"
+ "--.*$")
+ '(0 font-lock-comment-face))
+ (list (concat "\\_<\\(" haskell-keywords "\\)\\_>")
+ '(0 font-lock-keyword-face))
+ (list (concat "'\\("
+ "[^\\]"
+ "\\|"
+ "\\\\"
+ "\\(" "[abfnrtv\\\"']" "\\|"
+ "^" "\\(" control-sequences "\\|"
+ "[]A-Z@[\\^_]" "\\)" "\\|"
+ "\\|"
+ "[0-9]+" "\\|"
+ "[oO][0-7]+" "\\|"
+ "[xX][0-9A-Fa-f]+"
+ "\\)"
+ "\\)'")
+ '(0 font-lock-string-face))
+ (list "\\_<[A-Z]\\(\\sw+\\|\\s_+\\)*\\_>"
+ '(0 font-lock-variable-name-face))
+ (list (concat "\\_<0\\([xX][0-9a-fA-F]+\\|[oO][0-7]+\\)\\|"
+ "\\_<[0-9]+\\(\\.[0-9]*\\)?"
+ "\\([eE][-+]?[0-9]+\\)?")
+ '(0 mdw-number-face))
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'haskell-mode-hook 'mdw-misc-mode-config t)
"query" "receive" "rem" "try" "when" "xor")))
(setq font-lock-keywords
- (list
- (list "%.*$"
- '(0 font-lock-comment-face))
- (list (concat "\\<\\(" erlang-keywords "\\)\\>")
- '(0 font-lock-keyword-face))
- (list (concat "^-\\sw+\\>")
- '(0 font-lock-keyword-face))
- (list "\\<[0-9]+\\(#[0-9a-zA-Z]+\\|[eE][+-]?[0-9]+\\)?\\>"
- '(0 mdw-number-face))
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face))))))
+ (list
+ (list "%.*$"
+ '(0 font-lock-comment-face))
+ (list (concat "\\<\\(" erlang-keywords "\\)\\>")
+ '(0 font-lock-keyword-face))
+ (list (concat "^-\\sw+\\>")
+ '(0 font-lock-keyword-face))
+ (list "\\<[0-9]+\\(#[0-9a-zA-Z]+\\|[eE][+-]?[0-9]+\\)?\\>"
+ '(0 mdw-number-face))
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face))))))
(progn
(add-hook 'erlang-mode-hook 'mdw-misc-mode-config t)
;; Real fontification things.
(make-local-variable 'font-lock-keywords)
(setq font-lock-keywords
- (list
+ (list
- ;; Environment names are keywords.
- (list "@\\(end\\) *\\([a-zA-Z]*\\)?"
- '(2 font-lock-keyword-face))
+ ;; Environment names are keywords.
+ (list "@\\(end\\) *\\([a-zA-Z]*\\)?"
+ '(2 font-lock-keyword-face))
- ;; Unmark escaped magic characters.
- (list "\\(@\\)\\([@{}]\\)"
- '(1 font-lock-keyword-face)
- '(2 font-lock-variable-name-face))
+ ;; Unmark escaped magic characters.
+ (list "\\(@\\)\\([@{}]\\)"
+ '(1 font-lock-keyword-face)
+ '(2 font-lock-variable-name-face))
- ;; Make sure we get comments properly.
- (list "@c\\(omment\\)?\\( .*\\)?$"
- '(0 font-lock-comment-face))
+ ;; Make sure we get comments properly.
+ (list "@c\\(omment\\)?\\( .*\\)?$"
+ '(0 font-lock-comment-face))
- ;; Command names are keywords.
- (list "@\\([^a-zA-Z@]\\|[a-zA-Z@]*\\)"
- '(0 font-lock-keyword-face))
+ ;; Command names are keywords.
+ (list "@\\([^a-zA-Z@]\\|[a-zA-Z@]*\\)"
+ '(0 font-lock-keyword-face))
- ;; Fontify TeX special characters as punctuation.
- (list "[{}]+"
- '(0 mdw-punct-face)))))
+ ;; Fontify TeX special characters as punctuation.
+ (list "[{}]+"
+ '(0 mdw-punct-face)))))
(dolist (hook '(texinfo-mode-hook TeXinfo-mode-hook))
(add-hook hook 'mdw-misc-mode-config t)
;; Real fontification things.
(make-local-variable 'font-lock-keywords)
(setq font-lock-keywords
- (list
-
- ;; Environment names are keywords.
- (list (concat "\\\\\\(begin\\|end\\|newenvironment\\)"
- "{\\([^}\n]*\\)}")
- '(2 font-lock-keyword-face))
-
- ;; Suspended environment names are keywords too.
- (list (concat "\\\\\\(suspend\\|resume\\)\\(\\[[^]]*\\]\\)?"
- "{\\([^}\n]*\\)}")
- '(3 font-lock-keyword-face))
-
- ;; Command names are keywords.
- (list "\\\\\\([^a-zA-Z@]\\|[a-zA-Z@]*\\)"
- '(0 font-lock-keyword-face))
-
- ;; Handle @/.../ for italics.
- ;; (list "\\(@/\\)\\([^/]*\\)\\(/\\)"
- ;; '(1 font-lock-keyword-face)
- ;; '(3 font-lock-keyword-face))
-
- ;; Handle @*...* for boldness.
- ;; (list "\\(@\\*\\)\\([^*]*\\)\\(\\*\\)"
- ;; '(1 font-lock-keyword-face)
- ;; '(3 font-lock-keyword-face))
-
- ;; Handle @`...' for literal syntax things.
- ;; (list "\\(@`\\)\\([^']*\\)\\('\\)"
- ;; '(1 font-lock-keyword-face)
- ;; '(3 font-lock-keyword-face))
-
- ;; Handle @<...> for nonterminals.
- ;; (list "\\(@<\\)\\([^>]*\\)\\(>\\)"
- ;; '(1 font-lock-keyword-face)
- ;; '(3 font-lock-keyword-face))
-
- ;; Handle other @-commands.
- ;; (list "@\\([^a-zA-Z]\\|[a-zA-Z]*\\)"
- ;; '(0 font-lock-keyword-face))
-
- ;; Make sure we get comments properly.
- (list "%.*"
- '(0 font-lock-comment-face))
-
- ;; Fontify TeX special characters as punctuation.
- (list "[$^_{}#&]"
- '(0 mdw-punct-face)))))
+ (list
+
+ ;; Environment names are keywords.
+ (list (concat "\\\\\\(begin\\|end\\|newenvironment\\)"
+ "{\\([^}\n]*\\)}")
+ '(2 font-lock-keyword-face))
+
+ ;; Suspended environment names are keywords too.
+ (list (concat "\\\\\\(suspend\\|resume\\)\\(\\[[^]]*\\]\\)?"
+ "{\\([^}\n]*\\)}")
+ '(3 font-lock-keyword-face))
+
+ ;; Command names are keywords.
+ (list "\\\\\\([^a-zA-Z@]\\|[a-zA-Z@]*\\)"
+ '(0 font-lock-keyword-face))
+
+ ;; Handle @/.../ for italics.
+ ;; (list "\\(@/\\)\\([^/]*\\)\\(/\\)"
+ ;; '(1 font-lock-keyword-face)
+ ;; '(3 font-lock-keyword-face))
+
+ ;; Handle @*...* for boldness.
+ ;; (list "\\(@\\*\\)\\([^*]*\\)\\(\\*\\)"
+ ;; '(1 font-lock-keyword-face)
+ ;; '(3 font-lock-keyword-face))
+
+ ;; Handle @`...' for literal syntax things.
+ ;; (list "\\(@`\\)\\([^']*\\)\\('\\)"
+ ;; '(1 font-lock-keyword-face)
+ ;; '(3 font-lock-keyword-face))
+
+ ;; Handle @<...> for nonterminals.
+ ;; (list "\\(@<\\)\\([^>]*\\)\\(>\\)"
+ ;; '(1 font-lock-keyword-face)
+ ;; '(3 font-lock-keyword-face))
+
+ ;; Handle other @-commands.
+ ;; (list "@\\([^a-zA-Z]\\|[a-zA-Z]*\\)"
+ ;; '(0 font-lock-keyword-face))
+
+ ;; Make sure we get comments properly.
+ (list "%.*"
+ '(0 font-lock-comment-face))
+
+ ;; Fontify TeX special characters as punctuation.
+ (list "[$^_{}#&]"
+ '(0 mdw-punct-face)))))
(setq TeX-install-font-lock 'tex-font-setup)
(restore-buffer-modified-p nil)))))))
(setq TeX-output-view-style
- '(("^dvi$"
- ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$")
- "%(o?)dvips -t landscape %d -o && xdg-open %f")
- ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$"
- "%(o?)dvips %d -o && xdg-open %f")
- ("^dvi$"
- ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$")
- "%(o?)xdvi %dS -paper a4r -s 0 %d")
- ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$"
- "%(o?)xdvi %dS -paper a4 %d")
- ("^dvi$"
- ("^a5\\(?:comb\\|paper\\)$" "^landscape$")
- "%(o?)xdvi %dS -paper a5r -s 0 %d")
- ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)xdvi %dS -paper a5 %d")
- ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d")
- ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d")
- ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d")
- ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d")
- ("^dvi$" "." "%(o?)xdvi %dS %d")
- ("^pdf$" "." "xdg-open %o")
- ("^html?$" "." "sensible-browser %o")))
+ '(("^dvi$"
+ ("^landscape$" "^pstricks$\\|^pst-\\|^psfrag$")
+ "%(o?)dvips -t landscape %d -o && xdg-open %f")
+ ("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$"
+ "%(o?)dvips %d -o && xdg-open %f")
+ ("^dvi$"
+ ("^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$" "^landscape$")
+ "%(o?)xdvi %dS -paper a4r -s 0 %d")
+ ("^dvi$" "^a4\\(?:dutch\\|paper\\|wide\\)\\|sem-a4$"
+ "%(o?)xdvi %dS -paper a4 %d")
+ ("^dvi$"
+ ("^a5\\(?:comb\\|paper\\)$" "^landscape$")
+ "%(o?)xdvi %dS -paper a5r -s 0 %d")
+ ("^dvi$" "^a5\\(?:comb\\|paper\\)$" "%(o?)xdvi %dS -paper a5 %d")
+ ("^dvi$" "^b5paper$" "%(o?)xdvi %dS -paper b5 %d")
+ ("^dvi$" "^letterpaper$" "%(o?)xdvi %dS -paper us %d")
+ ("^dvi$" "^legalpaper$" "%(o?)xdvi %dS -paper legal %d")
+ ("^dvi$" "^executivepaper$" "%(o?)xdvi %dS -paper 7.25x10.5in %d")
+ ("^dvi$" "." "%(o?)xdvi %dS %d")
+ ("^pdf$" "." "xdg-open %o")
+ ("^html?$" "." "sensible-browser %o")))
(setq TeX-view-program-list
- '(("mupdf" ("mupdf %o" (mode-io-correlate " %(outpage)")))))
+ '(("mupdf" ("mupdf %o" (mode-io-correlate " %(outpage)")))))
(setq TeX-view-program-selection
- '(((output-dvi style-pstricks) "dvips and gv")
- (output-dvi "xdvi")
- (output-pdf "mupdf")
- (output-html "sensible-browser")))
+ '(((output-dvi style-pstricks) "dvips and gv")
+ (output-dvi "xdvi")
+ (output-pdf "mupdf")
+ (output-html "sensible-browser")))
(setq TeX-open-quote "\""
TeX-close-quote "\"")
reftex-auto-recenter-toc t)
(setq reftex-label-alist
- '(("theorem" ?T "th:" "~\\ref{%s}" t ("theorems?" "th\\.") -2)
- ("axiom" ?A "ax:" "~\\ref{%s}" t ("axioms?" "ax\\.") -2)
- ("definition" ?D "def:" "~\\ref{%s}" t ("definitions?" "def\\.") -2)
- ("proposition" ?P "prop:" "~\\ref{%s}" t
- ("propositions?" "prop\\.") -2)
- ("lemma" ?L "lem:" "~\\ref{%s}" t ("lemmas?" "lem\\.") -2)
- ("example" ?X "eg:" "~\\ref{%s}" t ("examples?") -2)
- ("exercise" ?E "ex:" "~\\ref{%s}" t ("exercises?" "ex\\.") -2)
- ("enumerate" ?i "i:" "~\\ref{%s}" item ("items?"))))
+ '(("theorem" ?T "th:" "~\\ref{%s}" t ("theorems?" "th\\.") -2)
+ ("axiom" ?A "ax:" "~\\ref{%s}" t ("axioms?" "ax\\.") -2)
+ ("definition" ?D "def:" "~\\ref{%s}" t ("definitions?" "def\\.") -2)
+ ("proposition" ?P "prop:" "~\\ref{%s}" t
+ ("propositions?" "prop\\.") -2)
+ ("lemma" ?L "lem:" "~\\ref{%s}" t ("lemmas?" "lem\\.") -2)
+ ("example" ?X "eg:" "~\\ref{%s}" t ("examples?") -2)
+ ("exercise" ?E "ex:" "~\\ref{%s}" t ("exercises?" "ex\\.") -2)
+ ("enumerate" ?i "i:" "~\\ref{%s}" item ("items?"))))
(setq reftex-section-prefixes
- '((0 . "part:")
- (1 . "ch:")
- (t . "sec:")))
+ '((0 . "part:")
+ (1 . "ch:")
+ (t . "sec:")))
(setq bibtex-field-delimiters 'double-quotes
bibtex-align-at-equal-sign t
(mdw-standard-fill-prefix "")
(make-local-variable 'sgml-delimiters)
(setq sgml-delimiters
- '("AND" "&" "COM" "--" "CRO" "&#" "DSC" "]" "DSO" "[" "DTGC" "]"
- "DTGO" "[" "ERO" "&" "ETAGO" ":e" "GRPC" ")" "GRPO" "(" "LIT" "\""
- "LITA" "'" "MDC" ">" "MDO" "<!" "MINUS" "-" "MSC" "]]" "NESTC" "{"
- "NET" "}" "OPT" "?" "OR" "|" "PERO" "%" "PIC" ">" "PIO" "<?"
- "PLUS" "+" "REFC" "." "REP" "*" "RNI" "#" "SEQ" "," "STAGO" ":"
- "TAGC" "." "VI" "=" "MS-START" "<![" "MS-END" "]]>"
- "XML-ECOM" "-->" "XML-PIC" "?>" "XML-SCOM" "<!--" "XML-TAGCE" "/>"
- "NULL" ""))
+ '("AND" "&" "COM" "--" "CRO" "&#" "DSC" "]" "DSO" "[" "DTGC" "]"
+ "DTGO" "[" "ERO" "&" "ETAGO" ":e" "GRPC" ")" "GRPO" "(" "LIT"
+ "\"" "LITA" "'" "MDC" ">" "MDO" "<!" "MINUS" "-" "MSC" "]]"
+ "NESTC" "{" "NET" "}" "OPT" "?" "OR" "|" "PERO" "%" "PIC" ">"
+ "PIO" "<?" "PLUS" "+" "REFC" "." "REP" "*" "RNI" "#" "SEQ" ","
+ "STAGO" ":" "TAGC" "." "VI" "=" "MS-START" "<![" "MS-END" "]]>"
+ "XML-ECOM" "-->" "XML-PIC" "?>" "XML-SCOM" "<!--" "XML-TAGCE"
+ "/>" "NULL" ""))
(setq major-mode 'mdw-sgml-mode)
(setq mode-name "[mdw] SGML")
(run-hooks 'mdw-sgml-mode-hook))
(if assoc
(rplacd assoc frag)
(setq sh-mode-syntax-table-input
- (cons (cons 'rc frag)
- sh-mode-syntax-table-input))))))
+ (cons (cons 'rc frag)
+ sh-mode-syntax-table-input))))))
(progn
(add-hook 'sh-mode-hook 'mdw-misc-mode-config t)
"set" "table" "tagged-optional" "union"
"variadic" "vector" "version" "version-tag")))
(setq messages-mode-keywords
- (list
- (list (concat "\\<\\(" keywords "\\)\\>:")
- '(0 font-lock-keyword-face))
- '("\\([-a-zA-Z0-9]+:\\)" (0 font-lock-warning-face))
- '("\\(\\<[a-z][-_a-zA-Z0-9]*\\)"
- (0 font-lock-variable-name-face))
- '("\\<\\([0-9]+\\)\\>" (0 mdw-number-face))
- '("\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- (0 mdw-punct-face)))))
+ (list
+ (list (concat "\\<\\(" keywords "\\)\\>:")
+ '(0 font-lock-keyword-face))
+ '("\\([-a-zA-Z0-9]+:\\)" (0 font-lock-warning-face))
+ '("\\(\\<[a-z][-_a-zA-Z0-9]*\\)"
+ (0 font-lock-variable-name-face))
+ '("\\<\\([0-9]+\\)\\>" (0 mdw-number-face))
+ '("\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ (0 mdw-punct-face)))))
(setq font-lock-defaults
- '(messages-mode-keywords nil nil nil nil))
+ '(messages-mode-keywords nil nil nil nil))
(run-hooks 'messages-file-hook))
(defun messages-mode ()
"ident" "if" "ifdef" "ifndef" "import" "include"
"line" "pragma" "unassert" "undef" "warning")))
(setq messages-mode-keywords
- (append (list (list (concat "^[ \t]*\\#[ \t]*"
- "\\(include\\|import\\)"
- "[ \t]*\\(<[^>]+\\(>\\)?\\)")
- '(2 font-lock-string-face))
- (list (concat "^\\([ \t]*#[ \t]*\\(\\("
- preprocessor-keywords
- "\\)\\>\\|[0-9]+\\|$\\)\\)")
- '(1 font-lock-keyword-face)))
- messages-mode-keywords)))
+ (append (list (list (concat "^[ \t]*\\#[ \t]*"
+ "\\(include\\|import\\)"
+ "[ \t]*\\(<[^>]+\\(>\\)?\\)")
+ '(2 font-lock-string-face))
+ (list (concat "^\\([ \t]*#[ \t]*\\(\\("
+ preprocessor-keywords
+ "\\)\\>\\|[0-9]+\\|$\\)\\)")
+ '(1 font-lock-keyword-face)))
+ messages-mode-keywords)))
(run-hooks 'cpp-messages-mode-hook))
(progn
(mdw-regexps "each" "divert" "file" "if"
"perl" "set" "string" "type" "write")))
(setq mallow-driver-mode-keywords
- (list
- (list (concat "^%\\s *\\(}\\|\\(" keywords "\\)\\>\\).*$")
- '(0 font-lock-keyword-face))
- (list "^%\\s *\\(#.*\\)?$"
- '(0 font-lock-comment-face))
- (list "^%"
- '(0 font-lock-keyword-face))
- (list "^|?\\(.+\\)$" '(1 mallow-driver-text-face))
- (list "\\${[^}]*}"
- '(0 mallow-driver-substitution-face t)))))
+ (list
+ (list (concat "^%\\s *\\(}\\|\\(" keywords "\\)\\>\\).*$")
+ '(0 font-lock-keyword-face))
+ (list "^%\\s *\\(#.*\\)?$"
+ '(0 font-lock-comment-face))
+ (list "^%"
+ '(0 font-lock-keyword-face))
+ (list "^|?\\(.+\\)$" '(1 mallow-driver-text-face))
+ (list "\\${[^}]*}"
+ '(0 mallow-driver-substitution-face t)))))
(setq font-lock-defaults
'(mallow-driver-mode-keywords nil nil nil nil))
(modify-syntax-entry ?\" "_" mallow-driver-mode-syntax-table)
(make-local-variable 'nfast-debug-mode-keywords)
(setq truncate-lines t)
(setq nfast-debug-mode-keywords
- (list
- '("^\\(NFast_\\(Connect\\|Disconnect\\|Submit\\|Wait\\)\\)"
- (0 font-lock-keyword-face))
- (list (concat "^[ \t]+\\(\\("
- "[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
- "[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
- "[ \t]+\\)*"
- "[0-9a-fA-F]+\\)[ \t]*$")
- '(0 mdw-number-face))
- '("^[ \t]+\.status=[ \t]+\\<\\(OK\\)\\>"
- (1 font-lock-keyword-face))
- '("^[ \t]+\.status=[ \t]+\\<\\([a-zA-Z][0-9a-zA-Z]*\\)\\>"
- (1 font-lock-warning-face))
- '("^[ \t]+\.status[ \t]+\\<\\(zero\\)\\>"
- (1 nil))
- (list (concat "^[ \t]+\\.cmd=[ \t]+"
- "\\<\\([a-zA-Z][0-9a-zA-Z]*\\)\\>")
- '(1 font-lock-keyword-face))
- '("-?\\<\\([0-9]+\\|0x[0-9a-fA-F]+\\)\\>" (0 mdw-number-face))
- '("^\\([ \t]+[a-z0-9.]+\\)" (0 font-lock-variable-name-face))
- '("\\<\\([a-z][a-z0-9.]+\\)\\>=" (1 font-lock-variable-name-face))
- '("\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)" (0 mdw-punct-face))))
+ (list
+ '("^\\(NFast_\\(Connect\\|Disconnect\\|Submit\\|Wait\\)\\)"
+ (0 font-lock-keyword-face))
+ (list (concat "^[ \t]+\\(\\("
+ "[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
+ "[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
+ "[ \t]+\\)*"
+ "[0-9a-fA-F]+\\)[ \t]*$")
+ '(0 mdw-number-face))
+ '("^[ \t]+\.status=[ \t]+\\<\\(OK\\)\\>"
+ (1 font-lock-keyword-face))
+ '("^[ \t]+\.status=[ \t]+\\<\\([a-zA-Z][0-9a-zA-Z]*\\)\\>"
+ (1 font-lock-warning-face))
+ '("^[ \t]+\.status[ \t]+\\<\\(zero\\)\\>"
+ (1 nil))
+ (list (concat "^[ \t]+\\.cmd=[ \t]+"
+ "\\<\\([a-zA-Z][0-9a-zA-Z]*\\)\\>")
+ '(1 font-lock-keyword-face))
+ '("-?\\<\\([0-9]+\\|0x[0-9a-fA-F]+\\)\\>" (0 mdw-number-face))
+ '("^\\([ \t]+[a-z0-9.]+\\)" (0 font-lock-variable-name-face))
+ '("\\<\\([a-z][a-z0-9.]+\\)\\>=" (1 font-lock-variable-name-face))
+ '("\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)" (0 mdw-punct-face))))
(setq font-lock-defaults
- '(nfast-debug-mode-keywords nil nil nil nil))
+ '(nfast-debug-mode-keywords nil nil nil nil))
(run-hooks 'nfast-debug-mode-hook))
;;;--------------------------------------------------------------------------
;; Not much fontification needed.
(make-local-variable 'font-lock-keywords)
- (setq font-lock-keywords
- (list (list (concat "\\("
- "\\_<[-+]?"
- "\\(" "[0-9]+/[0-9]+"
- "\\|" "\\(" "[0-9]+" "\\(\\.[0-9]*\\)?" "\\|"
- "\\.[0-9]+" "\\)"
- "\\([dDeEfFlLsS][-+]?[0-9]+\\)?"
- "\\)"
- "\\|"
- "#"
- "\\(" "x" "[-+]?"
- "[0-9A-Fa-f]+" "\\(/[0-9A-Fa-f]+\\)?"
- "\\|" "o" "[-+]?" "[0-7]+" "\\(/[0-7]+\\)?"
- "\\|" "b" "[-+]?" "[01]+" "\\(/[01]+\\)?"
- "\\|" "[0-9]+" "r" "[-+]?"
- "[0-9a-zA-Z]+" "\\(/[0-9a-zA-Z]+\\)?"
- "\\)"
- "\\)\\_>")
- '(0 mdw-number-face))
- (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
- '(0 mdw-punct-face)))))
+ (setq font-lock-keywords
+ (list (list (concat "\\("
+ "\\_<[-+]?"
+ "\\(" "[0-9]+/[0-9]+"
+ "\\|" "\\(" "[0-9]+" "\\(\\.[0-9]*\\)?" "\\|"
+ "\\.[0-9]+" "\\)"
+ "\\([dDeEfFlLsS][-+]?[0-9]+\\)?"
+ "\\)"
+ "\\|"
+ "#"
+ "\\(" "x" "[-+]?"
+ "[0-9A-Fa-f]+" "\\(/[0-9A-Fa-f]+\\)?"
+ "\\|" "o" "[-+]?" "[0-7]+" "\\(/[0-7]+\\)?"
+ "\\|" "b" "[-+]?" "[01]+" "\\(/[01]+\\)?"
+ "\\|" "[0-9]+" "r" "[-+]?"
+ "[0-9a-zA-Z]+" "\\(/[0-9a-zA-Z]+\\)?"
+ "\\)"
+ "\\)\\_>")
+ '(0 mdw-number-face))
+ (list "\\(\\s.\\|\\s(\\|\\s)\\|\\s\\\\|\\s/\\)"
+ '(0 mdw-punct-face)))))
;; Special indentation.
(beginning-of-line)
(setq ad-return-value
- (list
- (cond ((not (lisp-extended-loop-p (elt state 1)))
- (+ baseline-indent lisp-simple-loop-indentation))
- ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
- (+ baseline-indent lisp-loop-keyword-indentation))
- (t
- (+ baseline-indent lisp-loop-forms-indentation)))
-
- ;; Tell the caller that the next line needs recomputation, even
- ;; though it doesn't start a sexp.
- loop-indentation)))))
+ (list
+ (cond ((not (lisp-extended-loop-p (elt state 1)))
+ (+ baseline-indent lisp-simple-loop-indentation))
+ ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
+ (+ baseline-indent lisp-loop-keyword-indentation))
+ (t
+ (+ baseline-indent lisp-loop-forms-indentation)))
+
+ ;; Tell the caller that the next line needs recomputation,
+ ;; even though it doesn't start a sexp.
+ loop-indentation)))))
;; SLIME setup.
(if found
(rplacd found (cdr head))
(setq slime-lisp-implementations
- (cons head slime-lisp-implementations))))))
+ (cons head slime-lisp-implementations))))))
(setq slime-default-lisp 'sbcl)
;; Hooks.
(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)))))
+ (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)))))
(progn
(add-hook 'smalltalk-mode 'mdw-misc-mode-config t)
ad-do-it))
(setq magit-repolist-columns
- '(("Name" 16 magit-repolist-column-ident nil)
- ("Version" 18 magit-repolist-column-version nil)
- ("St" 2 magit-repolist-column-dirty nil)
- ("L<U" 3 mdw-repolist-column-unpulled-from-upstream nil)
- ("L>U" 3 mdw-repolist-column-unpushed-to-upstream nil)
- ("Path" 32 magit-repolist-column-path nil)))
+ '(("Name" 16 magit-repolist-column-ident nil)
+ ("Version" 18 magit-repolist-column-version nil)
+ ("St" 2 magit-repolist-column-dirty nil)
+ ("L<U" 3 mdw-repolist-column-unpulled-from-upstream nil)
+ ("L>U" 3 mdw-repolist-column-unpushed-to-upstream nil)
+ ("Path" 32 magit-repolist-column-path nil)))
(setq magit-repository-directories '(("~/etc/profile" . 0)
("~/src/" . 1)))
(defun mdw-mpc-hack-tagbrowsers ()
(setq-local mode-line-format
- '("%e"
- mode-line-frame-identification
- mode-line-buffer-identification)))
+ '("%e"
+ mode-line-frame-identification
+ mode-line-buffer-identification)))
(add-hook 'mpc-tagbrowser-mode-hook 'mdw-mpc-hack-tagbrowsers)
(defun mdw-mpc-hack-songs ()