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

Lines Matching +refs:mouse +refs:major +refs:mode +refs:menu

36 ;; files are displayed.  These items can be clicked on with mouse-2 in
51 ;; AUC-TEX users: The imenu tags for AUC-TEX mode don't work very
52 ;; well. Use the imenu keywords from tex-mode.el for better results.
62 ;; Adding a speedbar specialized display mode:
69 ;; If your `major-mode' is `foo-mode', the only requirement is to
98 ;; If you wish to add to the default speedbar menu for the case of
99 ;; `foo-mode', create a variable `foo-speedbar-menu-items'. This
101 ;; be spliced into the main menu. (Available with click-mouse-3). If
102 ;; you wish to have extra key bindings in your special mode, create a
108 ;; Adding a speedbar top-level display mode:
111 ;; however the methods for writing a button display, menu, and keymap
116 ;; Displays menu item. MENU is a symbol containing the menu items to
125 ;; Lastly, `speedbar-mode-functions-list' allows you to set special
161 ;; (defun speedbar-require-version (major minor &optional beta)
174 ;; (concat major "." minor
177 (defvar speedbar-initial-expansion-mode-alist
182 ;; Files last, means first in the Displays menu
188 still get to override this list on a mode-by-mode basis. This list of
191 structure used when in this mode. KEYMAP is a local keymap to install
201 The expansion list `speedbar-initial-expansion-mode-alist' contains
220 where NAME is the name of the major display mode these functions are
228 (defvar speedbar-mode-functions-list
236 "List of function tables to use for different major display modes.
237 It is not necessary to define any functions for a specialized mode.
241 Where NAME is the name of the specialized mode. The rest of the list
248 (defcustom speedbar-mode-specific-contents-flag t
249 "*Non-nil means speedbar will show special mode contents.
269 (defvar speedbar-special-mode-expansion-list nil
276 (defvar speedbar-special-mode-key-map nil
277 "Default keymap used when identifying a specialized display mode.
338 (menu-bar-lines . 0)
390 (>= emacs-major-version 21))
392 When tooltips are not available, mouse-tracking and minibuffer
397 (defcustom speedbar-track-mouse-flag (not speedbar-use-tool-tips-flag)
398 "*Non-nil means to display info about the line under the mouse."
515 (defcustom speedbar-mode-hook nil
616 (defvar speedbar-ignored-modes '(fundamental-mode)
617 "*List of major modes which speedbar will not switch directories for.")
821 "Create a keymap for use with a speedbar major or minor display mode.
875 "Base part of the speedbar menu.")
917 "Additional menu items while in file-mode.")
926 "Menu items appearing at the end of the speedbar menu.")
929 "Non-nil when speedbar is showing buttons specific to a special mode.
953 "Never set this by hand. Value is t when S-mouse activity occurs.")
968 (defalias 'speedbar-mode-line-update
969 (if (featurep 'xemacs) 'redraw-modeline 'force-mode-line-update))
976 (defalias 'speedbar 'speedbar-frame-mode)
978 (defun speedbar-frame-mode (&optional arg)
981 `speedbar-mode' will be displayed. Currently, only one speedbar is
991 (speedbar-mode)))
993 (dframe-frame-mode arg
998 #'speedbar-frame-mode
1052 (dframe-current-frame 'speedbar-frame 'speedbar-mode))
1070 (dframe-get-focus 'speedbar-frame 'speedbar-frame-mode
1079 (defun speedbar-mode ()
1080 "Major mode for managing a display of directories and tags.
1122 (setq major-mode 'speedbar-mode)
1123 (setq mode-name "Speedbar")
1131 (speedbar-set-mode-line-format)
1133 (if speedbar-track-mouse-flag
1134 (setq dframe-track-mouse-function #'speedbar-track-mouse))
1136 dframe-mouse-click-function #'speedbar-click
1137 dframe-mouse-position-function #'speedbar-position-cursor-on-line)
1138 (run-hooks 'speedbar-mode-hook))
1164 (defun speedbar-set-mode-line-format ()
1165 "Set the format of the mode line based on the current speedbar environment.
1181 (if line-number-mode 5 1)))
1189 (if line-number-mode
1190 (list (concat p1 p2 p3 " " p35) '(line-number-mode " %3l")
1193 (if (not (equal mode-line-format tf))
1195 (setq mode-line-format tf)
1196 (speedbar-mode-line-update)))))))
1198 (defvar speedbar-previous-menu nil
1199 "The menu before the last `speedbar-reconfigure-keymaps' was called.")
1202 "Reconfigure the menu-bar in a speedbar frame.
1203 Different menu items are displayed depending on the current display mode
1208 ;; file display mode version
1209 (speedbar-initial-menu)
1213 speedbar-initial-expansion-mode-alist)))))
1214 ;; Dynamic menu stuff
1218 (alist speedbar-initial-expansion-mode-alist))
1242 'speedbar-special-mode-key-map
1244 speedbar-special-mode-key-map)
1251 ;; menu adjustments into.
1253 ;; Delete the old menu if applicable.
1254 (if speedbar-previous-menu (easy-menu-remove speedbar-previous-menu))
1255 (setq speedbar-previous-menu md)
1256 ;; Now add the new menu
1258 (easy-menu-define speedbar-menu-map (current-local-map)
1259 "Speedbar menu" md)
1260 (easy-menu-add md (current-local-map))
1280 (defun speedbar-track-mouse (event)
1282 (if (not speedbar-track-mouse-flag)
1288 (mouse-set-point event)
1289 (if (eq major-mode 'speedbar-mode)
1290 ;; XEmacs may let us get in here in other mode buffers.
1294 (defun speedbar-show-info-under-mouse ()
1295 "Call the info function for the line under the mouse.
1297 (let ((pos (mouse-position))) ; we ignore event until I use it later.
1301 (apply 'set-mouse-position pos)
1434 "Load the item under the cursor or mouse if it is a Lisp file."
1446 "Byte compile the item under the cursor or mouse if it is a Lisp file."
1458 (defun speedbar-mouse-item-info (event)
1460 This should be bound to a mouse EVENT."
1462 (mouse-set-point event)
1479 "Display info in the mini-buffer about the button the mouse is over.
1480 This function can be replaced in `speedbar-mode-functions-list' as
1557 "Display info in the mini-buffer about the button the mouse is over."
1597 "Rename the item under the cursor or mouse.
1680 (speedbar-set-mode-line-format)
1687 (speedbar-set-mode-line-format)
1721 (defun speedbar-insert-button (text face mouse function
1740 (speedbar-make-button start (point) face mouse function token))
1744 start (point) '(face nil invisible nil mouse-face nil))))
1759 (defun speedbar-make-button (start end face mouse function &optional token)
1761 MOUSE is the mouse face. When this button is clicked on FUNCTION
1768 start end `(mouse-face ,mouse invisible nil
1785 `speedbar-initial-expansion-mode-alist'."
1786 ;; cdr1 - name, cdr2 - menu
1788 speedbar-initial-expansion-mode-alist)))))
1790 (defun speedbar-initial-menu ()
1791 "Return the current default menu data.
1793 `speedbar-initial-expansion-mode-alist'."
1796 speedbar-initial-expansion-mode-alist)))))
1799 "Return the current default menu data.
1801 `speedbar-initial-expansion-mode-alist'."
1804 speedbar-initial-expansion-mode-alist))))))
1815 (add-to-list 'speedbar-initial-expansion-mode-alist new-list))
1823 speedbar-initial-expansion-mode-alist
1835 "Return a current mode specific replacement for function, or nil.
1836 Scans `speedbar-mode-functions-list' first for the current mode, then
1840 speedbar-mode-functions-list)))))
1842 (defun speedbar-add-mode-functions-list (new-list)
1843 "Add NEW-LIST to the list of mode functions.
1844 See `speedbar-mode-functions-list' for details."
1845 (add-to-list 'speedbar-mode-functions-list new-list))
1854 of the special mode functions."
1855 (or speedbar-special-mode-expansion-list
1859 "Add localized speedbar support to BUFFER's mode if it is available."
1867 (let ((ms (symbol-name major-mode)) v)
1868 (if (not (string-match "-mode$" ms))
1869 nil ;; do nothing to broken mode
1872 (make-local-variable 'speedbar-special-mode-expansion-list)
1874 (setq speedbar-special-mode-expansion-list t)
1876 ;; we have access to the varialbe -speedbar-menu-items.
1881 (setq speedbar-special-mode-expansion-list (list v))
1885 (make-local-variable 'speedbar-special-mode-key-map)
1886 (setq speedbar-special-mode-key-map
1888 (setq v (intern-soft (concat ms "-speedbar-menu-items")))
1900 (kill-local-variable 'speedbar-special-mode-expansion-list)
1901 (kill-local-variable 'speedbar-special-mode-key-map)
1914 ;; If in powerclick mode, then the directory we are getting
2403 Make buffer local for your mode.")
2408 Make buffer local for your mode.")
2485 (if (and speedbar-mode-specific-contents-flag
2486 (consp speedbar-special-mode-expansion-list)
2488 'speedbar-special-mode-expansion-list
2490 ;;(eq (get major-mode 'mode-class 'special)))
2497 ;; special for "files" mode. Too bad.
2615 "Use the mode-specific variable to fill in the speedbar buffer.
2617 (let ((funclst speedbar-special-mode-expansion-list)
2651 (speedbar-set-mode-line-format))
2674 ;; Update for special mode all the time!
2675 (if (and speedbar-mode-specific-contents-flag
2676 (consp speedbar-special-mode-expansion-list)
2678 'speedbar-special-mode-expansion-list
2680 ;;(eq (get major-mode 'mode-class 'special)))
2684 "Updating speedbar to special mode: %s..."
2685 major-mode))
2690 "Updating speedbar to special mode: %s...done"
2691 major-mode)
2695 (unless (and (or (member major-mode speedbar-ignored-modes)
3109 "Activate any speedbar buttons where the mouse is clicked.
3110 This must be bound to a mouse event. A button is any location of text
3111 with a mouse face that has a text property called `speedbar-function'.
3116 (dframe-quick-mouse e))
3230 `speedbar-mode-functions-list' as `speedbar-line-directory'."
3485 (mode nil)
3737 This function is a convenience function for XEmacs menu created by
3864 ;;; BUFFER DISPLAY mode.
3867 "Keymap used when in the buffers display mode.")
3987 (save-excursion (set-buffer buffer) major-mode)
4138 "Face used for highlighting buttons with the mouse."
4170 (add-to-list 'font-lock-global-modes '(not speedbar-mode))