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

Lines Matching defs:func

1 ;;; which-func.el --- print current function in mode line
41 ;; show the same `which-func' information.
70 (defvar which-func-unknown "???"
73 (defgroup which-func nil
78 (defcustom which-func-modes
84 :group 'which-func
88 (defcustom which-func-non-auto-modes nil
92 larger than `which-func-maxout' behave in this way too;
94 :group 'which-func
97 (defcustom which-func-maxout 500000
100 :group 'which-func
103 (defvar which-func-keymap
114 "Keymap to display on mode line which-func.")
116 (defface which-func
141 :group 'which-func)
143 (defcustom which-func-format
145 (:propertize which-func-current
146 local-map ,which-func-keymap
147 face which-func
152 :group 'which-func
154 ;;;###autoload (put 'which-func-format 'risky-local-variable t)
156 (defvar which-func-cleanup-function nil
172 (defvar which-func-table (make-hash-table :test 'eq :weakness 'key))
174 (defconst which-func-current
175 '(:eval (gethash (selected-window) which-func-table which-func-unknown)))
176 ;;;###autoload (put 'which-func-current 'risky-local-variable t)
178 (defvar which-func-mode nil
181 (make-variable-buffer-local 'which-func-mode)
182 ;;(put 'which-func-mode 'permanent-local t)
184 (add-hook 'find-file-hook 'which-func-ff-hook t)
186 (defun which-func-ff-hook ()
189 (setq which-func-mode
191 (or (eq which-func-modes t)
192 (member major-mode which-func-modes))))
195 (if (and which-func-mode
196 (not (member major-mode which-func-non-auto-modes))
197 (or (null which-func-maxout)
198 (< buffer-saved-size which-func-maxout)
199 (= which-func-maxout 0)))
203 (setq which-func-mode nil))))
205 (defun which-func-update ()
207 ;; (walk-windows 'which-func-update-1 nil 'visible))
208 (which-func-update-1 (selected-window)))
210 (defun which-func-update-1 (window)
213 (when which-func-mode
216 (unless (equal current (gethash window which-func-table))
217 (puthash window current which-func-table)
220 (setq which-func-mode nil)
221 (error "Error in which-func-update: %s" info))))))
224 (defalias 'which-func-mode 'which-function-mode)
226 (defvar which-func-update-timer nil)
237 :global t :group 'which-func
241 (setq which-func-update-timer
242 (run-with-idle-timer idle-update-delay t 'which-func-update))
245 (setq which-func-mode
246 (or (eq which-func-modes t)
247 (member major-mode which-func-modes))))))
249 (when (timerp which-func-update-timer)
250 (cancel-timer which-func-update-timer))
251 (setq which-func-update-timer nil)
253 (with-current-buffer buf (setq which-func-mode nil)))))
258 (defvar which-func-functions nil
265 Uses `which-func-functions', `imenu--index-alist'
269 ;; Try the `which-func-functions' functions first.
270 (run-hook-with-args-until-success 'which-func-functions)))
310 (if which-func-cleanup-function
311 (funcall which-func-cleanup-function name)
314 (provide 'which-func)
317 ;;; which-func.el ends here