chiark / gitweb /
dot/emacs, el/dot-emacs.el: Reformat in line with current styles.
[profile] / dot / emacs
index fd3536ee6b121d0217011d840b8a1661a5a63b27..211879050c9fc4e1714029c564b8a92ec802b226 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 (setq load-path (nconc load-path (list "~/lib/emacs")))
 (require 'dot-emacs)
 
-;;;----- Some random initialisation -----------------------------------------
+;;;--------------------------------------------------------------------------
+;;; Some random initialisation.
 
 (setq mdw-init-window (selected-window))
 
-;; --- Load some other bits of code ---
+;; Load some other bits of code.
 
 (maybe-autoload 'cc-mode "cc-mode" nil t)
 (maybe-autoload 'rexx-mode "rexx-mode" nil t)
 
 (trap (or mdw-fast-startup (semantic-load-enable-minimum-features)))
 
-;; --- Skeleton stuff ---
+;; Skeleton stuff.
 
 (trap (or mdw-fast-startup (require 'skel-init)))
 
-;; --- Window system-dependent things ---
+;; Window system-dependent things.
 
 (require 'paren)
 (trap (show-paren-mode t))
 (or window-system (menu-bar-mode -1))
 
-;; --- Temporary directory handling ---
+;; Temporary directory handling.
 
 (defun mdw-check-dir-exists (dir)
   (and dir
                 (mdw-check-dir-exists (format "/tmp/%s" (user-login-name)))
                 "/tmp"))
 
-;; --- Emacs server behaviour ---
+;; Emacs server behaviour.
 
 (and window-system
      (trap (gnuserv-start)
           (setq server-temp-file-regexp (concat "^" tmpdir "\\|/draft$"))))
 
-;; --- Control backup behaviour ---
+;; Control backup behaviour.
 
 (setq backup-by-copying nil)
 (setq backup-by-copying-when-linked t)
       '("/\\.git/COMMIT_EDITMSG$"
        "/\\.stgit\\(-edit\\.txt\\|msg\\.txt\\|\\.msg\\)$"))
 
-;; --- Safe variables ---
+;; Safe variables.
 
 (setq safe-local-variable-values
       '((make-backup-files . nil)))
 
-;; --- Calculator fiddling ---
+;; Calculator fiddling.
 
 (setq calc-settings-file "~/.emacs-calc")
 (load calc-settings-file)
     (trap (bbdb-initialize 'gnus 'sendmail 'message)))
 (setq bbdb-north-american-phone-numbers-p nil)
 
-;; --- Customization ---
+;; Customization.
 
 (setq custom-file "~/.emacs-custom")
 (trap (load custom-file))
 
 (trap (load "~/.emacs-local"))
 
-;; --- Internationalization twiddling ---
+;; Internationalization twiddling.
 
 (trap
   ;; Have top-bit-set characters work properly in terminals.
     (apply #'set-input-mode
           (nconc (list (nth 0 im) (nth 1 im) 0) (nthcdr 3 im)))))
 
-;; --- Don't disable any commands ---
+;; Don't disable any commands.
 
 (mapatoms #'(lambda (sym) (put sym 'disabled nil)))
 
-;; --- Split a wide window ---
+;; Split a wide window.
 
 (mdw-divvy-window)
 
-;; --- Postscript printing ---
+;; Postscript printing.
 
 (setq ps-paper-type 'a4
       ps-print-color-p nil
       ps-font-family 'Courier
       ps-font-size 6.5)
 
-;; --- Splash screen stuff ---
+;; Splash screen stuff.
 
 (or window-system
     (setq inhibit-splash-screen t
          inhibit-startup-message t))
 
-;; --- Other goodies ---
+;; Other goodies.
 
 (trap (resize-minibuffer-mode 1))      ;Make minibuffer grow dynamically
 (auto-compression-mode 1)              ;Enable automatic compression
 (setq cltl2-root-url (mdw-config 'cltl-url))
 (setq common-lisp-hyperspec-root (mdw-config 'hyperspec-url))
 
-;;;----- W3 and URL fetching stuff ------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; W3 and URL fetching stuff.
 
 (let ((proxy (mdw-config 'http-proxy)))
   (setq url-proxy-services
       w3-display-inline-image t
       w3-keybinding 'info)
 
-;;;----- Calendar configuration ---------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; Calendar configuration.
 
 (setq diary-file "~/etc/diary")
 
-;; --- Trivial stuff for the sunrise/sunset calculations ---
+;; Trivial stuff for the sunrise/sunset calculations.
 
 (setq calendar-latitude 52.2)
 (setq calendar-longitude 0.1)
 (setq calendar-location-name "Cambridge, UK")
 
-;; --- Holidays ---
+;; Holidays.
 
 (and (not mdw-fast-startup)
      (trap
        (setq other-holidays (append english-and-welsh-bank-holidays
                                    other-holidays))))
 
-;; --- Date format fiddling ---
+;; Date format fiddling.
 
 (setq european-calendar-style t)
 
                         (year "[-/]" month "[-/]" day "[^0-9]")
                         (dayname "\\W")))
 
-;; --- Fancy diary handling ---
+;; Fancy diary handling.
 
 (add-hook 'diary-display-hook 'fancy-diary-display)
 (setq diary-list-include-blanks t)
 (add-hook 'list-diary-entries-hook 'include-other-diary-files)
 (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
 
-;; --- Appointment management ---
+;; Appointment management.
 
 (add-hook 'diary-hook 'appt-make-list)
 (setq appt-issue-message t)
 (setq appt-display-interval 3)
 (setq appt-message-warning-time 10)
 
-;; --- Org-mode agenda ---
+;; Org-mode agenda.
 
 (setq org-agenda-include-diary t
       org-tags-column -77)
 
-;; --- Cosmetic stuff ---
+;; Cosmetic stuff.
 
 (setq display-time-24hr-format t)
 (display-time)
       (let ((view-diary-entries-initially t))
        (calendar))))
 
-;;;----- MailCrypt ----------------------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; MailCrypt.
 
-;; --- Define more mode hooks for MailCrypt ---
+;; Define more mode hooks for MailCrypt.
 
 (setq mdw-mc-modes
       '((mdwmail-mode (encrypt . mdwmail-mc-encrypt)
                      (sign . mdwmail-mc-sign))))
 
-;; --- Load the MailCrypt support ---
+;; Load the MailCrypt support.
 
 (trap
   (and (string-match "linux" (symbol-name system-type))
              (define-key mc-write-mode-map "\C-c/E" 'mc-encrypt-region)
              (add-hook 'text-mode-hook 'mc-install-write-mode))))
 
-;;;----- Other common declarations ------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; Other common declarations.
 
-;; --- Default frame size ---
+;; Default frame size.
 
 (setq default-frame-alist
       (mdw-uniquify-alist
        '((transparency . t))
        default-frame-alist))
 
-;; --- Other frame fiddling ---
+;; Other frame fiddling.
 
 (setq frame-title-format '("" invocation-name "@" system-name ": %b"))
 
-;; --- Global keymap changes ---
+;; Global keymap changes.
 
 (trap
   (windmove-default-keybindings))
 (add-hook 'org-agenda-mode-hook
          #'(lambda () (mdw-clobber-evil-keymap org-agenda-mode-map)))
 
-;; --- Recognising types of files ---
+;; Recognising types of files.
 
 (setq auto-mode-alist
       (append `(("\\.p[lm]$" . perl-mode)
 (setq completion-ignored-extensions
       (append `(".hc" ".hi") completion-ignored-extensions))
 
-;; --- Some common local definitions ---
+;; Some common local definitions.
 
 (make-variable-buffer-local 'mdw-auto-indent)
 
 (global-font-lock-mode t)
 (defalias 'perl-mode 'cperl-mode)
 
-;;;----- Rootly editingness -------------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; Rootly editingness.
 
 (eval-after-load "tramp"
   '(progn
                     ((executable-find "really") "really")
                     (t "su")))))))
 
-;;;----- General fontification ----------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; General fontification.
 
-;; --- Configure lazy fontification ---
+;; Configure lazy fontification.
 
 (and (fboundp 'lazy-lock-mode)
      (setq font-lock-support-mode 'lazy-lock-mode))
 
 (add-hook 'text-mode-hook 'mdw-text-mode t)
 
-;;;----- TeX stuff ----------------------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; TeX stuff.
 
 (setq TeX-output-view-style
       '(("^dvi$"
                            unify-case)
       bibtex-include-OPTkey nil)
 
-;;;----- SLIME setup --------------------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; SLIME setup.
 
 (trap
  (if (not mdw-fast-startup)
              (cons head slime-lisp-implementations))))))
 (setq slime-default-lisp 'sbcl)
 
-;;;----- Blogging -----------------------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; Blogging.
 
 (setq weblogger-config-alist
       '(("vox"
         ("server-url" . "http://vox.distorted.org.uk/admin/mt-xmlrpc.cgi")
         ("weblog" . "1"))))
 
-;;;----- Shell mode ---------------------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; Shell mode.
 
-;; --- Make the shell mode aware of my prompt ---
+;; Make the shell mode aware of my prompt.
 
 (setq shell-prompt-pattern "^[^]#$%>»}\n]*[]#$%>»}] *")
 (setq comint-password-prompt-regexp
       (concat "\\(\\([Oo]ld \\|[Nn]ew \\|[a-zA-Z0-9_]*'s \\|^\\)"
              "[Pp]assword\\|pass phrase\\):\\s *\\'"))
 
-;; --- Notice passwords, and make C-a work right ---
+;; Notice passwords, and make C-a work right.
 
 (add-hook 'shell-mode-hook #'mdw-sh-mode-setup)
 (add-hook 'shell-mode-hook #'ansi-color-for-comint-mode-on)
 
 (add-hook 'term-mode-hook #'mdw-term-mode-setup)
 
-;;;----- Finishing touches --------------------------------------------------
+;;;--------------------------------------------------------------------------
+;;; Finishing touches.
 
 (trap (select-window mdw-init-window))
 (provide 'emacs-init)