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

Lines Matching defs:routine

235 lines in routine calls or definitions, other statements with
349 (defgroup idlwave-routine-info nil
356 These files, named .idlwave_catalog, document routine information for
360 :group 'idlwave-routine-info
364 "*Seconds of idle time before routine info is automatically
365 initialized. Initializing the routine info can take a long time, in
376 instead wait until routine information is needed, and initialize
378 :group 'idlwave-routine-info
381 (defcustom idlwave-scan-all-buffers-for-routine-info t
383 The scanning is done by the command `idlwave-update-routine-info'.
389 :group 'idlwave-routine-info
395 (defcustom idlwave-query-shell-for-routine-info t
400 :group 'idlwave-routine-info
403 (defcustom idlwave-auto-routine-info-updates
405 "*Controls under what circumstances routine info is updated automatically.
414 :group 'idlwave-routine-info
428 :group 'idlwave-routine-info
433 When selecting the directories to scan for IDL user catalog routine
443 :group 'idlwave-routine-info
454 :group 'idlwave-routine-info
461 :group 'idlwave-routine-info
473 When listing routine source locations, IDLWAVE gives a short hint where
474 the file defining the routine is located. By default it lists `SystemLib'
480 :group 'idlwave-routine-info
490 :group 'idlwave-routine-info
507 (defcustom idlwave-completion-case '((routine . upcase)
515 be specified separately for routine names, keywords, classes and
517 This alist should therefore have entries for `routine' (normal
531 routine. This was implemented to allow for mixed-case completion, in
536 *first* definition it encounters during routine info collection and
574 the routine info from the buffers. This is slow.
591 :group 'idlwave-routine-info
601 :group 'idlwave-routine-info
688 `idlwave-routine-info' and `idlwave-complete', depending upon the
695 The class stored can be checked and removed with `\\[idlwave-routine-info]'
703 `idlwave-class-arrow-face'. The command \\[idlwave-routine-info]
717 (defcustom idlwave-resize-routine-help-window t
786 "*Non-nil means pad '=' in keywords (routine calls or defs) like assignment.
969 the current routine and the code, allowing several routine headers in
1085 keyword-parameters Keyword Parameters in routine definitions and calls
1598 (define-key idlwave-mode-map "\C-c?" 'idlwave-routine-info)
1606 (define-key idlwave-mode-map "\C-c\C-i" 'idlwave-update-routine-info)
1823 \\[idlwave-routine-info]. \\[idlwave-find-module] jumps to the
1829 default. Use \\[idlwave-update-routine-info] to update this
1948 'idlwave-current-routine-fullname)
1995 ;; Update the routine info with info about current buffer?
2533 (defun idlwave-current-routine-fullname ()
2534 (let ((name (idlwave-current-routine)))
2537 (defun idlwave-current-routine ()
2538 "Return (NAME TYPE CLASS) of current routine."
2546 (name (idlwave-sintern-routine-or-method (match-string 4) class)))
2872 (action-routine (cdr action)))
2875 (if (listp action-routine)
2876 (eval (append action-routine '('is-action)))
2877 (funcall action-routine 'is-action)))))
3008 including assignments, routine definitions, and parenthetical
3590 ;(defun idlwave-fill-routine-call ()
3591 ; "Fill a routine definition or statement, indenting appropriately."
3921 clicks in the routine info window.
4123 ;; For the completion and routine info function, we want to normalize
4137 ;; buffers for routine information do not intern the grabbed strings.
4140 ;; fed into the routine assq functions.
4189 (defun idlwave-sintern-routine-or-method (name &optional class set)
4192 (idlwave-sintern-routine name set)))
4204 (defun idlwave-sintern-routine (name &optional set)
4208 (set (idlwave-sintern-set name 'routine idlwave-sint-routines set))
4272 (setq name (idlwave-sintern-routine name set)))
4326 "Holds the routine-info obtained by scanning buffers.")
4328 "Holds the routine-info obtained by scanning buffers.")
4330 "Holds the routine-info obtained by asking the shell.")
4332 "Holds the unresolved routine-info obtained by asking the shell.")
4334 "Holds the procedure routine-info from the user scan.")
4336 "Holds the procedure routine-info from the .idlwave_catalog library files.")
4346 "Holds the combinded procedure/function/method routine-info.")
4354 (defvar idlwave-last-system-routine-info-cons-cell nil
4355 "The last cons cell in the system routine info.")
4358 ;; The code to get routine info from different sources.
4366 This routine loads the builtin routines on the first call. Later it
4375 (idlwave-update-routine-info '(4)))
4388 (idlwave-update-routine-info)
4398 (idlwave-update-routine-info '(16)))
4402 After the process finishes normally, the first access to routine info
4437 (idlwave-update-routine-info '(4))))))
4441 ;; Format for all routine info user catalog, library catalogs, etc.:
4458 (defun idlwave-update-routine-info (&optional arg no-concatenate)
4459 "Update the internal routine-info lists.
4460 These lists are used by `idlwave-routine-info' (\\[idlwave-routine-info])
4471 `idlwave-scan-all-buffers-for-routine-info').
4479 If NO-CONCATENATE is non-nil, don't pre-concatenate the routine info
4481 asynchronously finish updating routine info. This is set
4482 automatically when called interactively. When you need routine
4520 (idlwave-update-buffer-routine-info)
4524 (idlwave-update-buffer-routine-info))
4530 idlwave-query-shell-for-routine-info)))
4547 ;; means that someone needs routine info *now*. The
4557 (idlwave-shell-update-routine-info nil t)))))))
4584 ;;------ XML Help routine info system
4585 (defun idlwave-load-system-routine-info ()
4586 ;; Load the system routine info from the cached routine info file,
4592 (idlwave-xml-system-routine-info-up-to-date))
4595 (idlwave-convert-xml-system-routine-info)
4601 "Failed to load converted routine info, using old conversion.")
4603 "Failed to convert XML routine info, falling back on idlw-rinfo.")
4606 "Could not locate any system routine information."))))))))
4608 (defun idlwave-xml-system-routine-info-up-to-date()
4708 ;; than one sub-list possible if a routine can serve as both
4806 (defun idlwave-convert-xml-clean-routine-aliases (aliases)
4807 ;; Duplicate and trim original routine aliases from rinfo list
4833 ;; Duplicate and trim original routine aliases from rinfo list
4872 (defvar idlwave-xml-routine-info-file nil)
4874 (defun idlwave-save-routine-info ()
4875 (if idlwave-xml-routine-info-file
4881 ;; " idlwave-xml-routine-info-file "
4884 (insert (format "\n(setq idlwave-xml-routine-info-file \n \"%s\")"
4885 idlwave-xml-routine-info-file))
4902 (defun idlwave-convert-xml-system-routine-info ()
4903 "Convert XML supplied IDL routine info into internal form.
4911 routines routine-aliases statement-aliases sysvar-aliases
4914 (error "No such XML routine info file: %s" catalog-file)
4916 (error "Cannot read XML routine info file: %s" catalog-file)))
4918 (message "Reading XML routine info...")
4920 (message "Reading XML routine info...done")
4922 (unless rinfo (error "Failed to parse XML routine info"))
4931 (setq idlwave-xml-routine-info-file nil)
4932 (message "Converting XML routine info...")
4947 (message "Converting XML routine info...%2d%%"
4953 routine-aliases)
4984 (idlwave-convert-xml-clean-routine-aliases routine-aliases)
4988 (setq idlwave-xml-routine-info-file catalog-file)
4989 (idlwave-save-routine-info)
4990 (message "Converting XML routine info...done")))
5005 (message "Loading system routine info in idle time...")
5006 (idlwave-load-system-routine-info)
5008 (message "Loading system routine info in idle time...done")
5073 ;; Load and case-treat the system, user catalog, and library routine
5079 (idlwave-load-system-routine-info))
5087 (setq idlwave-last-system-routine-info-cons-cell
5118 (defun idlwave-update-buffer-routine-info ()
5121 ((eq idlwave-scan-all-buffers-for-routine-info t)
5124 (setq res (idlwave-get-routine-info-from-buffers
5126 ((null idlwave-scan-all-buffers-for-routine-info)
5134 (setq res (idlwave-get-routine-info-from-buffers
5141 "Put the different sources for routine information together."
5145 (setcdr idlwave-last-system-routine-info-cons-cell
5185 (or (eq t idlwave-auto-routine-info-updates)
5186 (memq why idlwave-auto-routine-info-updates))
5187 idlwave-scan-all-buffers-for-routine-info
5191 (idlwave-replace-buffer-routine-info
5197 (idlwave-get-routine-info-from-buffers
5203 (defun idlwave-replace-buffer-routine-info (file new)
5211 (if (eq (idlwave-routine-source-file (nth 3 (car list))) file)
5224 (defun idlwave-get-routine-info-from-buffers (buffers)
5225 "Call `idlwave-get-buffer-routine-info' on idlwave-mode buffers in BUFFERS."
5226 (let (buf routine-lists res)
5234 (idlwave-get-buffer-routine-info)
5236 (push res routine-lists)))))
5238 (apply 'nconc routine-lists)))
5240 (defun idlwave-get-buffer-routine-info ()
5241 "Scan the current buffer for routine info. Return (PRO-LIST FUNC-LIST)."
5243 routine-list string entry)
5256 (push entry routine-list))))
5257 routine-list))
5335 "Scan all files on selected dirs of IDL search path for routine information.
5339 exists, will be automatically loaded to give routine information about
5401 would like to extract routine information, to be stored in the file:
5414 directories and save the routine info.
5545 (append (idlwave-get-routine-info-from-buffers
5561 ;; Define the routine info list
5580 (idlwave-update-routine-info t))
5706 (defconst idlwave-routine-info.pro
5727 ;; Get routine info
5745 ;; No class, just a normal routine.
5825 "Remembers if the routine info procedure is already compiled.")
5837 (insert idlwave-routine-info.pro)
5849 ;; errors on undefinded routine
5857 (defun idlwave-shell-update-routine-info (&optional quiet run-hooks wait file)
5864 ;; FILE is set, only update routine info for routines in that file.
5871 (idlwave-shell-routine-info-filter)
5877 ;; Completion and displaying routine calling sequences
5983 (list 'routine nil type-selector class-selector nil super-classes))
5985 'procedure (if class-selector 'method 'routine)
6006 (list 'routine nil type-selector class-selector nil super-classes))
6008 'function (if class-selector 'method 'routine)
6118 ;; routine to complete a specific item independent of context.
6120 ;; MODULE and CLASS can be used to specify the routine name and class.
6127 (module (idlwave-sintern-routine-or-method module class))
6156 (setq pro (idlwave-sintern-routine pro))
6170 (setq func (idlwave-sintern-routine func))
6241 (idlwave-sintern-routine-or-method name class)
6270 (let ((twins (idlwave-routine-twins
6275 (setq twins (sort twins 'idlwave-routine-entry-compare-twins))
6293 (idlwave-sintern-routine-or-method name class)
6303 (setq file (idlwave-routine-source-file (nth 3 (car entries))))
6380 ;; Determine the class of a routine call.
6385 ;; current routine. otherwise prompt the user for a class name.
6418 (setq class (or (nth 2 (idlwave-current-routine)) class)))
6502 CLASS: What class has the routine (nil=no, t=is method, but class unknown)
6617 (idlwave-sintern-routine-or-method func class)
6651 (list (idlwave-sintern-routine-or-method pro class)
7437 class__define routine, on which ALL-HOOK will be run. If ALT-CLASS is
7456 (file (idlwave-routine-source-file
7464 (let* ((idlwave-auto-routine-info-updates nil)
7551 "Return the flat entry keywords alist from routine-info entry.
7617 (let* ((class-selector (nth 2 (idlwave-current-routine)))
7619 ;; Check if we are in a class routine
7627 (idlwave-sintern-routine
7914 point is on a routine name or in the argument list of a routine, help
7915 for that routine will be displayed. Works for system routines and
7918 `idlwave-help-source-try-header' is non-nil) or the routine definition
7931 (defun idlwave-routine-info (&optional arg external)
7974 Like `idlwave-routine-info', this looks for a routine call at point.
7976 a RESOLVE call for this routine, to attempt to make it defined and its
7977 routine info available for IDLWAVE. If the routine is a method call,
8003 'idlwave-update-routine-info
8011 '(idlwave-update-routine-info)
8020 Works for modules for which IDLWAVE has routine info available. The
8021 function offers as default the module name `idlwave-routine-info'
8064 (setq name (idlwave-sintern-routine-or-method name class)
8085 (setq file (idlwave-routine-source-file source)))
8096 (error "Source code for system routine %s is not available"
8099 (error "Source code for routine %s is not available"
8120 (error "Could not find routine %s" name2)))))))
8124 Used by `idlwave-routine-info' and `idlwave-find-module'."
8131 ;; We return the defined routine as module.
8133 (idlwave-sintern-routine-or-method (match-string-no-properties 4)
8150 (setq this-word (idlwave-sintern-routine-or-method
8160 (setq this-word (idlwave-sintern-routine-or-method
8169 (setq this-word (idlwave-sintern-routine this-word))
8365 (twins (idlwave-routine-twins entry))
8491 idlwave-resize-routine-help-window)
8503 "Insert a source location into the routine info buffer.
8542 ;; New special syntax: taken directly from routine-info for
8603 "Does the mouse actions in the routine info buffer.
8627 ((eq id 'usage) ; Online help on this routine
8715 When IDL hits a routine call which is not defined, it will search on
8739 routine twins dtwins twin done props1 lroutines)
8771 (while (setq routine (pop routines))
8776 (setq twins (idlwave-routine-twins routine (or lroutines routines)))
8777 (if (memq routine done)
8788 (idlwave-make-full-name (nth 2 routine)
8789 (car routine))
8790 (if (eq (nth 1 routine) 'fun) "()" "")))
8793 (list (nth 0 routine)
8794 (nth 1 routine)
8795 (nth 2 routine)))
8808 (defun idlwave-print-source (routine)
8809 (let* ((source (nth 3 routine))
8811 (sfile (idlwave-routine-source-file source)))
8821 (defun idlwave-routine-twins (entry &optional list)
8851 (class (nth 2 entry)) ; idlwave-routine-twin-compare
8859 file (idlwave-routine-source-file source))
8889 (sort alist 'idlwave-routine-twin-compare)))
8894 "Internal variable used to influence `idlwave-routine-twin-compare'.")
8900 (defun idlwave-routine-entry-compare (a b)
8901 "Compare two routine info entries for sortiung. This is the general case.
8903 are twins (same name, class, and type), calls another routine which
8922 (idlwave-routine-entry-compare-twins a b)))))
8924 (defun idlwave-routine-entry-compare-twins (a b)
8925 "Compare two routine entries, under the assumption that they are
8926 twins. This basically calls `idlwave-routine-twin-compare' with the
8933 (afile (idlwave-routine-source-file asrc))
8934 (bfile (idlwave-routine-source-file bsrc)))
8935 (idlwave-routine-twin-compare
8944 (defun idlwave-routine-twin-compare (a b)
8945 "Compare two routine twin entries for sorting.
8946 In here, A and B are not normal routine info entries, but special
8984 ;; Is file name derived from the routine name?
9006 (defun idlwave-routine-source-file (source)
9201 ["Show Routine Info" idlwave-routine-info t]
9207 ["Update Routine Info" idlwave-update-routine-info t]
9208 ["Rescan XML Help Catalog" idlwave-convert-xml-system-routine-info t]
9212 ["Scan Directories" (idlwave-update-routine-info '(16))
9214 ["Scan Directories &" (idlwave-update-routine-info '(64))
9380 ;; Set an idle timer to load the routine info.