Lines Matching defs:head
1 ;;; elide-head.el --- hide headers in files
32 ;; `elide-head-headers-to-hide' controls what is elided by the command
33 ;; `elide-head'. A buffer-local invisible overlay manages the
36 ;; You might add `elide-head' to appropriate major mode hooks or to
49 (defgroup elide-head nil
52 :prefix "elide-head"
55 (defcustom elide-head-headers-to-hide
68 :group 'elide-head
72 (defvar elide-head-overlay nil)
73 (make-variable-buffer-local 'elide-head-overlay)
76 (defun elide-head (&optional arg)
77 "Hide header material in buffer according to `elide-head-headers-to-hide'.
85 (elide-head-show)
88 (let ((rest elide-head-headers-to-hide)
105 (if (overlayp elide-head-overlay)
106 (move-overlay elide-head-overlay (point-marker) end)
107 (setq elide-head-overlay (make-overlay (point-marker) end)))
108 (overlay-put elide-head-overlay 'invisible t)
109 (overlay-put elide-head-overlay 'evaporate t)
110 (overlay-put elide-head-overlay 'after-string "...")))))))
112 (defun elide-head-show ()
113 "Show a header elided current buffer by \\[elide-head]."
115 (if (and (overlayp elide-head-overlay)
116 (overlay-buffer elide-head-overlay))
117 (delete-overlay elide-head-overlay)
121 (provide 'elide-head)
124 ;;; elide-head.el ends here