• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:insert +defs:text +defs:button

75 ;; read-only) `speedbar-make-tag-line', `speedbar-insert-button', and
76 ;; `speedbar-insert-generic-list'. If you use
77 ;; `speedbar-insert-generic-list', also read the doc for
85 ;; parameters. They are (TEXT TOKEN INDENT). TEXT is the text of the
86 ;; button clicked on. TOKEN is the data passed in when you create the
87 ;; button. INDENT is an indentation level, or 0. You can store
89 ;; line with an expander (eg. [+]) and a text button.
92 ;; functions are `speedbar-change-expand-button-char',
111 ;; however the methods for writing a button display, menu, and keymap
270 "Default function list for creating specialized button lists.
318 "*Non-nil show files we can't expand with a ? in the expand button.
378 '((speedbar-fetch-dynamic-imenu . speedbar-insert-imenu-list)
379 (speedbar-fetch-dynamic-etags . speedbar-insert-etags-list))
380 "Set to a list of functions which will return and insert a list of tags.
384 corresponding insert method can handle it. If it returns t, then an
387 tags to insert. It will then create the speedbar buttons.")
467 (defcustom speedbar-directory-button-trim-method 'span
468 "*Indicates how the directory button will be displayed.
495 (defcustom speedbar-hide-button-brackets-flag nil
533 "String separating file text from indicator characters.")
937 (defvar speedbar-full-text-cache nil
1083 Each directory segment is a button which jumps speedbar's default
1089 to insert the directory listing into the current tree. Click on the
1378 files, or the directory button."
1386 files, or the directory button."
1472 ;; Skip items in "folder" type text characters.
1474 ;; Get the text
1479 "Display info in the mini-buffer about the button the mouse is over.
1557 "Display info in the mini-buffer about the button the mouse is over."
1721 (defun speedbar-insert-button (text face mouse function
1723 "Insert TEXT as the next logical speedbar button.
1724 FACE is the face to put on the button, MOUSE is the highlight face to use.
1727 If PREVLINE, then put this button on the previous line.
1733 (if (/= (current-column) 0) (insert "\n"))
1734 (put-text-property start (point) 'invisible nil))
1736 (insert " ") ;back up if desired...
1737 (put-text-property (1- (point)) (point) 'invisible nil)))
1739 (insert text)
1740 (speedbar-make-button start (point) face mouse function token))
1742 (insert "\n")
1743 (add-text-properties
1746 (defun speedbar-insert-separator (text)
1751 (insert "//")
1752 (speedbar-insert-image-button-maybe start 2)))
1754 (insert text "\n")
1755 (speedbar-make-button start (point)
1759 (defun speedbar-make-button (start end face mouse function &optional token)
1760 "Create a button from START to END, with FACE as the display face.
1761 MOUSE is the mouse face. When this button is clicked on FUNCTION
1763 is t use the text properties of the string that is passed as an
1766 (put-text-property start end 'face face))
1767 (add-text-properties
1769 speedbar-text ,(buffer-substring-no-properties start end)))
1771 (put-text-property start end 'help-echo #'dframe-help-echo))
1772 (if function (put-text-property start end 'speedbar-function function))
1773 (if token (put-text-property start end 'speedbar-token token))
1774 ;; So far the only text we have is less that 3 chars.
1776 (speedbar-insert-image-button-maybe start (- end start)))
1905 ;;; File button management
1938 "Insert a single button group at point for DIRECTORY.
1939 Each directory directory part is a different button. If part of the directory
1950 (insert displayme)
1954 (speedbar-make-button (match-beginning 1) (match-end 1)
1964 (cond ((eq speedbar-directory-button-trim-method 'span)
1978 (insert "/...\n ")
1980 ((eq speedbar-directory-button-trim-method 'trim)
1990 (insert "$")
1995 (insert " ")
1997 (insert "<root>")
1998 (speedbar-make-button p (point)
2004 (insert-char ?\n 1 nil)))
2006 (defun speedbar-make-tag-line (exp-button-type
2007 exp-button-char exp-button-function
2008 exp-button-data
2009 tag-button tag-button-function tag-button-data
2010 tag-button-face depth)
2011 "Create a tag line with EXP-BUTTON-TYPE for the small expansion button.
2012 This is the button that expands or contracts a node (if applicable),
2016 EXP-BUTTON-DATA is extra data attached to the text forming the expansion
2017 button.
2019 Next, TAG-BUTTON is the text of the tag. TAG-BUTTON-FUNCTION is the
2021 attach to the text field (such a tag positioning, etc).
2027 position to insert a new item, and that the new item will end with a CR."
2030 (insert (int-to-string depth) ":")
2033 (put-text-property start end 'invisible t)
2034 (insert-char ? depthspacesize nil)
2035 (put-text-property (- (point) depthspacesize) (point) 'invisible nil)
2036 (let* ((exp-button (cond ((eq exp-button-type 'bracket) "[%c]")
2037 ((eq exp-button-type 'angle) "<%c>")
2038 ((eq exp-button-type 'curly) "{%c}")
2039 ((eq exp-button-type 'expandtag) " %c>")
2040 ((eq exp-button-type 'statictag) " =>")
2042 (buttxt (format exp-button exp-button-char))
2044 (end (progn (insert buttxt) (point)))
2045 (bf (if (and exp-button-type (not (eq exp-button-type 'statictag)))
2046 'speedbar-button-face nil))
2047 (mf (if exp-button-function 'speedbar-highlight-face nil))
2049 (speedbar-make-button start end bf mf exp-button-function exp-button-data)
2050 (if speedbar-hide-button-brackets-flag
2052 (put-text-property start (1+ start) 'invisible t)
2053 (put-text-property end (1- end) 'invisible t)))
2055 (insert-char ? 1 nil)
2056 (put-text-property (1- (point)) (point) 'invisible nil)
2058 (end (progn (insert tag-button) (point))))
2059 (insert-char ?\n 1 nil)
2060 (put-text-property (1- (point)) (point) 'invisible nil)
2061 (speedbar-make-button start end tag-button-face
2062 (if tag-button-function 'speedbar-highlight-face nil)
2063 tag-button-function tag-button-data))
2066 (defun speedbar-change-expand-button-char (char)
2067 "Change the expansion button character to CHAR for the current line."
2074 (insert-char char 1 t)
2077 ;;(put-text-property (point) (1- (point)) 'invisible nil)
2078 ;; make sure we fix the image on the text here.
2079 (speedbar-insert-image-button-maybe (- (point) 1) 3)))))
2083 ;;; Build button lists
2085 (defun speedbar-insert-files-at-point (files level)
2111 (speedbar-insert-files-at-point
2400 (defvar speedbar-generic-list-group-expand-button-type 'curly
2401 "The type of button created for groups of tags.
2405 (defvar speedbar-generic-list-tag-button-type nil
2406 "The type of button created for tags in generic lists.
2410 (defun speedbar-insert-generic-list (level lst expand-fun find-fun)
2411 "At LEVEL, insert a generic multi-level alist LST.
2416 ;; Remove imenu rescan button
2423 expand-button tag-button)
2427 (setq expand-button speedbar-generic-list-group-expand-button-type
2428 tag-button speedbar-generic-list-tag-button-type))
2431 ;; insert the parts
2435 (speedbar-make-tag-line tag-button
2436 nil nil nil ;no expand button data
2437 (car (car lst)) ;button name
2443 (speedbar-make-tag-line expand-button
2445 (car (car lst)) ;button name
2451 (speedbar-make-tag-line expand-button
2453 (car (car lst)) ;button name
2456 (t (speedbar-message "speedbar-insert-generic-list: malformed list!")
2460 (defun speedbar-insert-imenu-list (indent lst)
2461 "At level INDENT, insert the imenu generated LST."
2462 (speedbar-insert-generic-list indent lst
2466 (defun speedbar-insert-etags-list (indent lst)
2467 "At level INDENT, insert the etags generated LST."
2468 (speedbar-insert-generic-list indent lst
2520 ;; Else, we can do a short cut. No text cache.
2540 (cache speedbar-full-text-cache)
2550 ;; careful with our text cache!
2579 (setq speedbar-full-text-cache
2583 ;; shown in the text-cache
2605 (insert (cdr cache)))
2628 (setq speedbar-full-text-cache
2771 (put-text-property (match-beginning 1)
2810 (put-text-property (match-beginning 1)
2823 (put-text-property (match-beginning 1)
2861 (insert speedbar-indicator-separator))
2872 (insert indicator-string)
2873 (speedbar-insert-image-button-maybe start (length indicator-string))
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'.
3119 "Look under the cursor and examine the text properties.
3123 (fn (get-text-property (point) 'speedbar-function))
3124 (tok (get-text-property (point) 'speedbar-token))
3147 (defun speedbar-line-text (&optional p)
3148 "Retrieve the text after prefix junk for the current line.
3155 (get-text-property (match-beginning 2) 'speedbar-text)
3169 (get-text-property (point) 'speedbar-token))
3179 (let ((f (speedbar-line-text p)))
3253 (setq directory (concat (speedbar-line-text)
3258 (setq directory (speedbar-line-text)))))
3376 (defun speedbar-find-file (text token indent)
3387 (speedbar-find-file-in-frame (concat cdd text))
3396 (defun speedbar-dir-follow (text token indent)
3402 (concat (expand-file-name (concat (speedbar-line-directory indent) text))
3415 "Delete text from point to indentation level INDENT or greater.
3428 (defun speedbar-dired (text token indent)
3429 "Speedbar click handler for directory expand button.
3430 Clicking this button expands or contracts a directory. TEXT is the
3431 button clicked which has either a + or -. TOKEN is the directory to be
3433 (cond ((string-match "+" text) ;we have to expand this dir
3438 (speedbar-change-expand-button-char ?-)
3446 ((string-match "-" text) ;we have to contract this node
3457 (speedbar-change-expand-button-char ?+)
3464 (defun speedbar-directory-buttons-follow (text token indent)
3466 TEXT is the button clicked on. TOKEN is the directory to follow.
3477 (defun speedbar-tag-file (text token indent)
3479 The parameter TEXT and TOKEN are required, where TEXT is the button
3482 (cond ((string-match "+" text) ;we have to expand this file
3487 ;; if no list, then remove expando button
3489 (speedbar-change-expand-button-char ??)
3490 (speedbar-change-expand-button-char ?-)
3495 ((string-match "-" text) ;we have to contract this node
3496 (speedbar-change-expand-button-char ?+)
3501 (defun speedbar-tag-find (text token indent)
3520 (defun speedbar-tag-expand (text token indent)
3522 Etags does not support this feature. TEXT will be the button
3525 (cond ((string-match "+" text) ;we have to expand this file
3526 (speedbar-change-expand-button-char ?-)
3530 (speedbar-insert-generic-list indent token 'speedbar-tag-expand
3532 ((string-match "-" text) ;we have to contract this node
3533 (speedbar-change-expand-button-char ?+)
3666 ;; We have some tags. Return the list with the insert fn
3921 (speedbar-insert-separator "Active Buffers:")
3941 (speedbar-insert-separator "Scratch Buffers:")
3954 ;;(speedbar-insert-separator "Hidden Buffers:")
3976 (if ro (speedbar-insert-button "%" nil nil nil nil t))))
3981 (let* ((item (speedbar-line-text))
4001 (let* ((bn (speedbar-line-text))
4012 (defun speedbar-buffer-click (text token indent)
4013 "When the users clicks on a buffer-button in speedbar.
4016 (let ((pop-up-frames t)) (select-window (display-buffer text)))
4018 (switch-to-buffer text)
4026 (let ((text (speedbar-line-text)))
4027 (if (and (get-buffer text)
4028 (speedbar-y-or-n-p (format "Kill buffer %s? " text)))
4029 (kill-buffer text))
4042 (let ((text (progn
4047 (if (get-buffer text)
4049 (set-buffer text)
4092 (defface speedbar-button-face '((((class color) (background light))