X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/0c3e50d50c256600f66379a8bc8d29c16cc7b11a..61aab3720fad74e4166c9541df43a46a25b0567f:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 1ee073f..70d3b7a 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -24,19 +24,23 @@ ;;;-------------------------------------------------------------------------- ;;; Check command-line. +(defun mdw-check-command-line-switch (switch) + (let ((probe nil) (next command-line-args) (found nil)) + (while next + (cond ((string= (car next) switch) + (setq found t) + (if probe (rplacd probe (cdr next)) + (setq command-line-args (cdr next)))) + (t + (setq probe next))) + (setq next (cdr next))) + found)) + (defvar mdw-fast-startup nil "Whether .emacs should optimize for rapid startup. This may be at the expense of cool features.") -(let ((probe nil) (next command-line-args)) - (while next - (cond ((string= (car next) "--mdw-fast-startup") - (setq mdw-fast-startup t) - (if probe - (rplacd probe (cdr next)) - (setq command-line-args (cdr next)))) - (t - (setq probe next))) - (setq next (cdr next)))) +(setq mdw-fast-startup + (mdw-check-command-line-switch "--mdw-fast-startup")) ;;;-------------------------------------------------------------------------- ;;; Some general utilities. @@ -3509,6 +3513,8 @@ strip numbers instead." (setq LaTeX-syntactic-comments nil LaTeX-fill-break-at-separators '(\\\[)) +(add-hook 'bibtex-mode-hook (lambda () (setq fill-column 76))) + ;;;-------------------------------------------------------------------------- ;;; HTML, CSS, and other web foolishness.