* C-c ... C-r (`reveal-mode') turns on or off reveal-mode.
* C-c ... C-- (`mdw-outline-collapse-all') collapses the entire
buffer. C mode in particular doesn't collapse comments unless
beaten over the head rather vigorously. This command does the
beating.
(auto-fill-mode 1)
(setq fill-column 77)
(setq show-trailing-whitespace t)
(auto-fill-mode 1)
(setq fill-column 77)
(setq show-trailing-whitespace t)
(mdw-set-font))
;; --- Set up all sorts of faces ---
(mdw-set-font))
;; --- Set up all sorts of faces ---
"\\([ \t]*\\([>#|:] ?\\)*[ \t]*\\)" 3)
(auto-fill-mode 1))
"\\([ \t]*\\([>#|:] ?\\)*[ \t]*\\)" 3)
(auto-fill-mode 1))
+;;;----- Outline mode -------------------------------------------------------
+
+(defun mdw-outline-collapse-all ()
+ "Completely collapse everything in the entire buffer."
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (while (< (point) (point-max))
+ (hide-subtree)
+ (forward-line))))
+
;;;----- Shell mode ---------------------------------------------------------
(defun mdw-sh-mode-setup ()
;;;----- Shell mode ---------------------------------------------------------
(defun mdw-sh-mode-setup ()
(defvar mdw-black-background t)
(defvar mdw-black-background t)
-(eval-after-load "outline" '(require 'foldout))
+(eval-after-load "outline"
+ '(progn
+ (trap (require 'foldout))
+ (define-key outline-mode-prefix-map [?\C-r] 'reveal-mode)
+ (define-key outline-mode-prefix-map [?\C--] 'mdw-outline-collapse-all)))
(setq cltl2-root-url (mdw-config 'cltl-url))
(setq common-lisp-hyperspec-root (mdw-config 'hyperspec-url))
(setq cltl2-root-url (mdw-config 'cltl-url))
(setq common-lisp-hyperspec-root (mdw-config 'hyperspec-url))