Bits from Mark Triggs's .emacs

Just a couple of things I find useful for Lisp editing.

(require 'w3m)

(defadvice common-lisp-hyperspec (around hyperspec-lookup-w3m () activate) "Browse the Common Lisp HyperSpec using w3m. When leaving w3m, restore the original window configuration." (let* ((window-configuration (current-window-configuration)) (browse-url-browser-function `(lambda (url new-window) (unless (member (current-buffer) (w3m-list-buffers)) (select-window (split-window-vertically))) (w3m-browse-url url nil) (let ((hs-map (copy-keymap w3m-mode-map))) (define-key hs-map (kbd "q") (lambda () (interactive) (kill-buffer nil) (set-window-configuration ,window-configuration))) (use-local-map hs-map))))) ad-do-it))

(defun lisp-reindent-defun () "Indent the current defun." (interactive) (save-excursion (beginning-of-defun) (indent-sexp)))

;; Highlight "FIXME" comments (defface fixme-face '((t (:weight bold :box (:line-width 2 :color "orange")))) "The faced used to show FIXME lines.")

(defun show-fixme-lines (&optional arg) "Emphasise FIXME comments. If ARG is positive, enable highlighting. If ARG is negative, disable highlighting. Otherwise, toggle highlighting." (interactive) (if (or (and (not arg) (assoc "FIXME" hi-lock-interactive-patterns)) (and arg (minusp arg))) (unhighlight-regexp "FIXME") (highlight-phrase "FIXME" 'fixme-face)))


Emacs customizations

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively