• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/

Lines Matching defs:global

31 ;; a global minor mode (toggled by M-x global-hl-line-mode) to
33 ;; global mode highlights the current line in the selected window only
40 ;; local mode behave like the global mode.
42 ;; You probably don't really want to use the global mode; if the
57 ;; You could make variable `global-hl-line-mode' buffer-local and set
58 ;; it to nil to avoid highlighting specific buffers, when the global
71 (defvar global-hl-line-overlay nil
95 (when global-hl-line-overlay
96 (overlay-put global-hl-line-overlay 'face hl-line-face))))
164 (define-minor-mode global-hl-line-mode
168 Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
169 `global-hl-line-highlight' on `pre-command-hook' and `post-command-hook'."
170 :global t
172 (if global-hl-line-mode
174 (add-hook 'pre-command-hook #'global-hl-line-unhighlight)
175 (add-hook 'post-command-hook #'global-hl-line-highlight))
176 (global-hl-line-unhighlight)
177 (remove-hook 'pre-command-hook #'global-hl-line-unhighlight)
178 (remove-hook 'post-command-hook #'global-hl-line-highlight)))
180 (defun global-hl-line-highlight ()
182 (when global-hl-line-mode ; Might be changed outside the mode function.
184 (unless global-hl-line-overlay
185 (setq global-hl-line-overlay (make-overlay 1 1)) ; to be moved
186 (overlay-put global-hl-line-overlay 'face hl-line-face))
187 (overlay-put global-hl-line-overlay 'window (selected-window))
188 (hl-line-move global-hl-line-overlay))))
190 (defun global-hl-line-unhighlight ()
192 (if global-hl-line-overlay
193 (delete-overlay global-hl-line-overlay)))