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

Lines Matching +defs:function +defs:list

34 ;; - An electric buffer list showing class browser buffers only
78 (defcustom ebrowse-electric-list-mode-hook nil
253 (defun ebrowse-position (item list &optional test)
258 (while list
259 (when (funcall test item (car list))
260 (setq found i list nil))
261 (setq list (cdr list) i (1+ i))))
263 (while list
264 (when (eq item (car list))
265 (setq found i list nil))
266 (setq list (cdr list) i (1+ i)))))
270 (defun ebrowse-delete-if-not (predicate list)
274 (while list
275 (let ((next (cdr list)))
276 (when (funcall predicate (car list))
277 (setq result (nconc result list))
278 (setf (cdr list) nil))
279 (setq list next)))
337 TABLE can also be a function to do the completion itself.
412 ;; A list of `ebrowse-ts' structures for all subclasses.
499 "Value is non-nil if MEMBER is a pure virtual function."
518 (defsubst ebrowse-throw-list-p (member)
548 (defconst ebrowse-member-list-accessors
556 Each element is the symbol of an accessor function.
557 The nth element must be the accessor for the nth member list
651 "Member list displayed in a member buffer.
652 This is a symbol whose function definition is an accessor for the
653 member list in `ebrowse-cs' structures.
657 (defvar ebrowse--member-list nil
658 "The list of `ebrowse-ms' structures displayed in a member buffer.
701 ;;; Define mode line titles for each member list.
732 (ebrowse-show-progress "Preparing file list" (zerop i)))
741 (loop for accessor in ebrowse-member-list-accessors do
752 (defun ebrowse-files-list (&optional marked-only)
753 "Return a list containing all files mentioned in a tree.
755 (let (list)
756 (maphash #'(lambda (file dummy) (setq list (cons file list)))
758 list))
783 Each elements in the list has the form (CLASS-NAME . TREE).
801 (defun ebrowse-sort-tree-list (list)
803 (sort list
811 If CLASS is found, return the tail of TREE starting at CLASS. This function
826 "Return list of base-classes of TREE by searching subclass lists.
827 This function must be used instead of the struct slot
828 `base-classes' to access the base-class list directly because it
832 (loop with to-search = (list tree)
839 (setq result (nconc result (list ti))))
844 "Return the list of direct super classes of TREE."
858 ACCESSOR is the accessor function for the member list.
867 Each element of the list has the form (MEMBER-NAME . ACCESSOR),
869 accessor with which the member's list can be accessed in an `ebrowse-ts'
870 structure. The list includes inherited members if these are visible."
871 (let* ((list (ebrowse-name/accessor-alist ebrowse--displayed-class
874 (nconc list
879 list)))
884 This function includes members of base classes if base class members
886 (let (list)
887 (dolist (func ebrowse-member-list-accessors list)
888 (setq list (nconc list (ebrowse-name/accessor-alist
892 (setq list
893 (nconc list (ebrowse-name/accessor-alist class func))))))))
920 Return a list (HEADER TREE) where HEADER is the file header read
921 and TREE is a list of `ebrowse-ts' structures forming the class tree."
943 (list header tree)))
947 "Function installed as `revert-buffer-function' in tree buffers.
951 (loop for member-buffer in (ebrowse-same-tree-member-buffer-list)
993 Each symbol has its property `ebrowse-info' set to a list (TREE MEMBER-LIST
995 MEMBER-LIST is a symbol describing the member list in which the member
1008 (loop for f in ebrowse-member-list-accessors do
1012 (push (list c f m) value)
1021 (loop for buffer in (ebrowse-browser-buffer-list)
1053 Helper function for `ebrowse-build-tree-obarray'. Base classes should
1056 construct the base-class list top down with adding each level at the
1057 beginning of the base-class list.
1162 (setq tree (ebrowse-sort-tree-list tree))
1174 revert-buffer-function))
1185 revert-buffer-function 'ebrowse-revert-tree-buffer-from-file
1384 (defun ebrowse-browser-buffer-list ()
1385 "Return a list of all tree or member buffers."
1386 (ebrowse-delete-if-not 'ebrowse-buffer-p (buffer-list)))
1389 (defun ebrowse-member-buffer-list ()
1390 "Return a list of all member buffers."
1391 (ebrowse-delete-if-not 'ebrowse-member-buffer-p (buffer-list)))
1394 (defun ebrowse-tree-buffer-list ()
1395 "Return a list of all tree buffers."
1396 (ebrowse-delete-if-not 'ebrowse-tree-buffer-p (buffer-list)))
1399 (defun ebrowse-known-class-trees-buffer-list ()
1400 "Return a list of buffers containing class trees.
1401 The list will contain, for each class tree loaded,
1403 (let ((buffers (nconc (ebrowse-tree-buffer-list)
1404 (ebrowse-member-buffer-list)))
1415 (defun ebrowse-same-tree-member-buffer-list ()
1416 "Return a list of members buffers with same tree as current buffer."
1421 (ebrowse-member-buffer-list)))
1431 (let ((buf (or (first (ebrowse-same-tree-member-buffer-list))
1444 (let* ((list (ebrowse-member-buffer-list))
1445 (next-list (cdr (memq (current-buffer) list)))
1446 (next-buffer (if next-list (car next-list) (car list))))
1455 (loop for buffer in (ebrowse-member-buffer-list)
1583 (list ebrowse--header class nil)
1666 (loop for frame in (frame-list)
1697 INFO is a list (HEADER MEMBER-OR-CLASS ACCESSOR). HEADER is the
1700 ACCESSOR is an accessor function for the member list of a member
1765 (defun ebrowse-function-declaration/definition-regexp (name)
1766 "Construct a regexp for matching a function NAME."
1782 `view-mode-hook' is temporarily set to this function;
1785 INFO is a list (TREE-HEADER TREE-OR-MEMBER MEMBER-LIST)."
1796 (destructuring-bind (header class-or-member member-list) info
1804 (case member-list
1813 (setf pattern (ebrowse-function-declaration/definition-regexp
1878 This function may look weird, but this is faster than recursion."
1879 (setq stack1 (make-list (length ebrowse--tree) 0)
1925 (nconc (make-list (length (ebrowse-ts-subclasses tree))
2023 (defvar ebrowse-electric-list-mode-map ()
2024 "Keymap used in electric Ebrowse buffer list window.")
2027 (unless ebrowse-electric-list-mode-map
2030 (setq ebrowse-electric-list-mode-map map)
2031 (fillarray (car (cdr map)) 'ebrowse-electric-list-undefined)
2032 (fillarray (car (cdr submap)) 'ebrowse-electric-list-undefined)
2038 (define-key map "\C-c\C-c" 'ebrowse-electric-list-quit)
2039 (define-key map "q" 'ebrowse-electric-list-quit)
2040 (define-key map " " 'ebrowse-electric-list-select)
2055 (put 'ebrowse-electric-list-mode 'mode-class 'special)
2056 (put 'ebrowse-electric-list-undefined 'suppress-keymap t)
2059 (defun ebrowse-electric-list-mode ()
2060 "Mode for electric tree list mode."
2062 (use-local-map ebrowse-electric-list-mode-map)
2072 major-mode 'ebrowse-electric-list-mode)
2073 (run-mode-hooks 'ebrowse-electric-list-mode-hook))
2076 (defun ebrowse-list-tree-buffers ()
2077 "Display a list of all tree buffers."
2082 (dolist (buffer (ebrowse-known-class-trees-buffer-list))
2091 (unless (car (ebrowse-known-class-trees-buffer-list))
2095 (save-window-excursion (ebrowse-list-tree-buffers))
2102 (ebrowse-electric-list-mode)
2104 (catch 'ebrowse-electric-list-select
2105 (message "<<< Press Space to bury the list >>>")
2114 (Electric-command-loop 'ebrowse-electric-list-select
2117 'ebrowse-electric-list-looper
2129 (defun ebrowse-electric-list-looper (state condition)
2148 (defun ebrowse-electric-list-undefined ()
2155 (defun ebrowse-electric-list-quit ()
2156 "Discard the buffer list."
2158 (throw 'ebrowse-electric-list-select nil))
2161 (defun ebrowse-electric-list-select ()
2162 "Select a buffer from the buffer list."
2164 (throw 'ebrowse-electric-list-select (point)))
2170 (nth index (ebrowse-known-class-trees-buffer-list))))
2187 (let* ((buffers (ebrowse-known-class-trees-buffer-list)))
2248 (define-key map1 "d" 'ebrowse-display-friends-member-list)
2249 (define-key map1 "f" 'ebrowse-display-function-member-list)
2250 (define-key map1 "F" 'ebrowse-display-static-functions-member-list)
2251 (define-key map1 "n" 'ebrowse-display-next-member-list)
2252 (define-key map1 "p" 'ebrowse-display-previous-member-list)
2253 (define-key map1 "t" 'ebrowse-display-types-member-list)
2254 (define-key map1 "v" 'ebrowse-display-variables-member-list)
2255 (define-key map1 "V" 'ebrowse-display-static-variables-member-list))
2299 ebrowse--member-list ;list of members displayed
2338 (defsubst ebrowse-member-list-name ()
2350 (ident (concat name (ebrowse-member-list-name))))
2415 (defun ebrowse-display-member-list-for-accessor (accessor)
2416 "Switch the member buffer to display the member list for ACCESSOR."
2418 ebrowse--member-list (funcall accessor ebrowse--displayed-class))
2422 (defun ebrowse-cyclic-display-next/previous-member-list (incr)
2423 "Switch buffer to INCR'th next/previous list of members."
2425 ebrowse-member-list-accessors)))
2429 ebrowse-member-list-accessors)
2430 (first ebrowse-member-list-accessors)))
2434 ebrowse-member-list-accessors))
2435 (first (last ebrowse-member-list-accessors))))))
2436 (ebrowse-display-member-list-for-accessor ebrowse--accessor)))
2439 (defun ebrowse-display-next-member-list ()
2440 "Switch buffer to next member list."
2442 (ebrowse-cyclic-display-next/previous-member-list 1))
2445 (defun ebrowse-display-previous-member-list ()
2446 "Switch buffer to previous member list."
2448 (ebrowse-cyclic-display-next/previous-member-list -1))
2451 (defun ebrowse-display-function-member-list ()
2452 "Display the list of member functions."
2454 (ebrowse-display-member-list-for-accessor 'ebrowse-ts-member-functions))
2457 (defun ebrowse-display-variables-member-list ()
2458 "Display the list of member variables."
2460 (ebrowse-display-member-list-for-accessor 'ebrowse-ts-member-variables))
2463 (defun ebrowse-display-static-variables-member-list ()
2464 "Display the list of static member variables."
2466 (ebrowse-display-member-list-for-accessor 'ebrowse-ts-static-variables))
2469 (defun ebrowse-display-static-functions-member-list ()
2470 "Display the list of static member functions."
2472 (ebrowse-display-member-list-for-accessor 'ebrowse-ts-static-functions))
2475 (defun ebrowse-display-friends-member-list ()
2476 "Display the list of friends."
2478 (ebrowse-display-member-list-for-accessor 'ebrowse-ts-friends))
2481 (defun ebrowse-display-types-member-list ()
2482 "Display the list of types."
2484 (ebrowse-display-member-list-for-accessor 'ebrowse-ts-types))
2629 INFO is a list (TREE ACCESSOR MEMBER) describing the member to
2653 (list ebrowse--header (ebrowse-ts-class tree) nil)
2701 (list header member accessor)
2722 (funcall display-fn ebrowse--member-list ebrowse--displayed-class)
2757 (defun ebrowse-display-member-buffer (list &optional stand-alone class)
2759 LIST is the member list to display. STAND-ALONE non-nil
2778 (setq ebrowse--member-list (funcall list class)
2780 ebrowse--accessor list
2815 (if (ebrowse-throw-list-p member) "t" "-")))
2836 (defun ebrowse-draw-member-long-fn (member-list tree)
2839 (dolist (member-struc (mapcar 'ebrowse-member-display-p member-list))
2871 (defun ebrowse-draw-member-short-fn (member-list tree)
2880 (dolist (member (mapcar #'ebrowse-member-display-p member-list))
2930 (list tree member (null member))))
2943 (let* ((completion-list (ebrowse-name/accessor-alist-for-class-members))
2944 (member (completing-read "Goto member: " completion-list nil t))
2945 (accessor (cdr (assoc member completion-list))))
2950 ebrowse--member-list (funcall accessor ebrowse--displayed-class))
2963 (let* ((completion-list (ebrowse-name/accessor-alist-for-visible-members))
2964 (member (completing-read "Goto member: " completion-list nil t)))
3012 (defun ebrowse-switch-member-buffer-to-other-class (title compl-list)
3015 COMPL-LIST is a completion list to use."
3016 (let* ((initial (unless (second compl-list)
3017 (first (first compl-list))))
3018 (class (or (ebrowse-completing-read-value title compl-list initial)
3021 ebrowse--member-list (funcall ebrowse--accessor ebrowse--displayed-class))
3045 ebrowse--member-list
3065 (let ((containing-list ebrowse--tree)
3079 (setq containing-list (ebrowse-ts-subclasses tree)))))
3081 containing-list)))
3083 ((null (nth index containing-list)) (message "No next class")))
3084 (setq index (max 0 (min index (1- (length containing-list)))))
3085 (setq cls (nth index containing-list))
3087 ebrowse--member-list (funcall ebrowse--accessor cls))
3107 ebrowse--member-list
3134 ["Functions" ebrowse-display-function-member-list
3135 :help "Show the list of member functions"
3139 ["Variables" ebrowse-display-variables-member-list
3140 :help "Show the list of member variables"
3144 ["Static Functions" ebrowse-display-static-functions-member-list
3145 :help "Show the list of static member functions"
3149 ["Static Variables" ebrowse-display-static-variables-member-list
3150 :help "Show the list of static member variables"
3154 ["Types" ebrowse-display-types-member-list
3155 :help "Show the list of nested types"
3159 ["Friends/Defines" ebrowse-display-friends-member-list
3160 :help "Show the list of friends or defines"
3339 member was found. The CDR of the acons is described in function
3360 (if buffer (list (ebrowse-value-in-buffer 'ebrowse--tree buffer)
3369 from point as default. Value is a list (CLASS-NAME MEMBER-NAME)."
3385 (or (first (ebrowse-list-of-matching-members
3389 (list class-name name))
3390 (list class-name (read-from-minibuffer prompt member-name)))))))
3405 (list class name))))
3414 Value is a list (TREE ACCESSOR MEMBER) for the member."
3431 declaration. This function reads the member's name from the
3432 current buffer like FIND-TAG. It then prepares a completion list
3546 It is a list (TREE ACCESSOR MEMBER)."
3556 ebrowse--member-list (funcall ebrowse--accessor ebrowse--displayed-class))
3573 (concat "Find member list of: "))))
3579 (defun ebrowse-list-of-matching-members (members regexp &optional name)
3580 "Return a list of members in table MEMBERS matching REGEXP or NAME.
3583 (let (list)
3588 (setq list (cons member-name list))))
3590 list))
3594 "Display a list of members matching a regexp read from the minibuffer."
3606 (loop for s in (ebrowse-list-of-matching-members members regexp) do
3611 (defun ebrowse-tags-list-members-in-file ()
3612 "Display a list of members found in a file.
3625 #'(lambda (member-name list)
3626 (loop for info in list
3644 ACCESSOR is the accessor symbol of its member list.
3656 ('ebrowse-ts-member-functions "member function")
3658 ('ebrowse-ts-static-functions "static function")
3693 (let* ((buffers (ebrowse-known-class-trees-buffer-list))
3702 (defun ebrowse-cyclic-successor-in-string-list (string list)
3705 (or (nth (1+ (ebrowse-position string list 'string=)) list)
3706 (first list)))
3715 A second call of this function without changing point inserts the next match.
3722 list completion)
3733 ;; If this function is called at the same point the last
3736 (setf list (all-completions ebrowse-last-completion-start
3738 completion (ebrowse-cyclic-successor-in-string-list
3739 ebrowse-last-completion list))
3749 ;; First time the function is called at some position in the
3775 (defvar ebrowse-tags-next-file-list ()
3776 "A list of files to be processed.")
3790 to the beginning of the list of files in the tag table.
3793 ;; Call with INITIALIZE non-nil initializes the files list.
3800 (setq ebrowse-tags-next-file-list
3801 (ebrowse-files-list (ebrowse-marked-classes-p))
3807 (unless ebrowse-tags-next-file-list
3812 ;; prevent cluttering up the buffer list.
3820 (let ((file (expand-file-name (car ebrowse-tags-next-file-list)
3823 ;; Find the file and pop the file list. Pop has to be done
3827 (pop ebrowse-tags-next-file-list)
3855 (setq ebrowse-tags-loop-form (list 're-search-forward regexp nil t))
3866 (list 'and (list 'save-excursion
3867 (list 're-search-forward from nil t))
3868 (list 'not (list 'perform-replace from to t t nil))))
3878 looks like a function call to the member."
3892 ebrowse-tags-loop-form (list 're-search-forward regexp nil t))
3919 The string is printed in the electric position list buffer."
3935 (push (function
3946 INFO is a list (CLASS FUNC MEMBER) specifying what we jumped to.
3995 ;;; Electric position list
4089 (message "<<< Press Space to bury the list >>>")
4138 "Leave the electric position list."
4144 "Select a position from the list."
4211 (insert "(") ;list of subclasses
4214 (dolist (func ebrowse-member-list-accessors)
4261 The result is a list (NUMBER-OF-CLASSES NUMBER-OF-MEMBER-FUNCTIONS
4272 (list classes member-functions member-variables
4307 (define-key ebrowse-global-map "l" 'ebrowse-tags-list-members-in-file)
4320 (define-key ebrowse-global-map " " 'ebrowse-electric-buffer-list)
4345 ;;; invoked. But this buffer is not displayed in the buffer list if
4379 "Select the nth entry in the list by the keys 1..9."
4388 "Define keys 1..9 to select the 1st to 9nth entry in the list."
4394 (defun ebrowse-electric-buffer-list ()
4395 "Display an electric list of Ebrowse buffers."
4403 (call-interactively 'electric-buffer-list))
4444 :help "Display a list of member functions"
4447 :help "Display a list of member variables"
4450 :help "Display a list of static member functions"
4453 :help "Display a list of static member variables"
4456 :help "Display a list of friends of a class"
4459 :help "Display a list of types defined in a class"