;ELC ;;; compiled by jwz@thalidomide on Wed Mar 23 18:52:16 1994 ;;; from file /th/jwz/emacs19/lisp/ilisp/ilisp-src.el ;;; emacs version 19.10 Lucid (beta8). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (byte-code "!!‡" [boundp tags-file-name nil] 2) (defvar lisp-last-definition nil "\ Last definition (name type) looked for.") (defvar lisp-last-file nil "\ Last used source file.") (defvar lisp-first-point nil "\ First point found in last source file.") (defvar lisp-last-point nil "\ Last point in last source file.") (defvar lisp-last-locator nil "\ Last source locator used.") (defvar lisp-search nil "\ Set to T when searching for definitions.") (defvar lisp-using-tags nil "\ Set to T when using tags.") (defvar lisp-edit-files t "\ If T, then buffers in one of lisp-source-modes will be searched by edit-definitions-lisp if the source cannot be found through the inferior LISP. It can also be a list of files to edit definitions from set up by (\\[lisp-directory]). If it is set to nil, then no additional files will be searched.") (fset 'lisp-extensions #[nil " @A > @\nQ) Aj\nO*" [auto-mode-alist nil extensions entries entry lisp-source-modes "\\|" 2] 4 "\ Return a regexp for matching the extensions of files that enter one of lisp-source-modes according to auto-mode-alist."]) (fset 'lisp-directory #[(directory add) "\n=!\n \" \" !  ! #\n =? \" \"" [nil tags-file-name add - t lisp-edit-files message "No current lisp directory" "Added %s as a lisp directory" directory "%s is the lisp directory" expand-file-name file-directory-p append directory-files lisp-extensions error "%s is not a directory"] 5 "\ Edit the files in DIRECTORY that have an auto-mode alist entry in lisp-source-modes. With a positive prefix, add the files on to the already existing files. With a negative prefix, clear the list. In either case set tags-file-name to nil so that tags are not used." (byte-code "=? $D" [current-prefix-arg - read-file-name "Lisp Directory: " nil default-directory] 5)]) (fset 'fix-source-filenames #[nil "\" @eb @d# A! Ag)*" [ilisp-value ilisp-source-directory-fixup-alist t nil cons alist re-search-forward replace-match] 5 "\ Apply the ilisp-source-directory-fixup-alist to the current buffer (which will be *Edit-Definitions*) to change any pre-compiled source-file locations to point to local source file locations. See ilisp-source-directory-fixup-alist."]) (fset 'lisp-setup-edit-definitions #[(message edit-files) "\n;?!q cc\n\n=   @  q > !)c !cc) A S)\n;\nc\" \nc@ccAm)eby!!!" [nil lisp-using-tags edit-files lisp-search get-buffer-create "*Edit-Definitions*" erase-buffer message "\n\n" t buffer-list buffers buffer major-mode lisp-source-modes buffer-file-name 34 "\"\n" replace-regexp "^;[^\n]*\n" "" fix-source-filenames files 2 set-buffer-modified-p error substitute-command-keys "Use \\[lisp-directory] to define source files."] 4 "\ Set up *Edit-Definitions* with MESSAGE. If EDIT-FILES is T, insert all buffer filenames that are in one of lisp-source-modes into the current buffer. If it is a list of files set up by lisp-directory, insert those in the buffer. If it is a string put that in the buffer."]) (fset 'lisp-locate-definition #[(locator definition file point &optional back pop) "!\"!Ƈ@A \n=? p  \" ` dbbyb yy =# ! $  $\n`nyy!   #!ժ b qb-" [file file-exists-p message "File %s doesn't exist!" sit-for 1 nil definition symbol type lisp-last-file first buffer name lisp-find-file pop lisp-first-point back point -1 0 t "Search %s for %s" "Searching %s for %s %s" lisp-buffer-symbol locator lisp-last-point recenter "Found %s %s definition" "Found %s"] 6 "\ Use LOCATOR to find the next DEFINITION (symbol . type) in FILE starting at POINT, optionally BACKWARDS and POP to buffer. Return T if successful."]) (fset 'lisp-next-file #[(back) "!qy!y wmp!u` w `{p!) =? *" [t nil result file get-buffer-create "*Edit-Definitions*" back -1 looking-at "\n" 1 "^\"" bury-buffer start] 2 "\ Return the next filename in *Edit-Definitions*, or nil if none."]) (fset 'lisp-next-definition #[(back pop) " %!\n \n  &͉?ω)E !q *" [nil result done lisp-locate-definition lisp-last-locator lisp-last-definition lisp-last-file lisp-last-point back lisp-next-file file 1 pop first lisp-search none t window-buffer selected-window] 9 "\ Go to the next definition from *Edit-Definitions* going BACK with prefix and POPPING. Return 'first if found first time, 'none if no definition ever, T if another definition is found, and nil if no more definitions are found."]) (fset 'next-definition-lisp #[(back &optional pop) " \"@A=?! = =  #\" = #  #!," [lisp-using-tags tags-loop-continue lisp-next-definition back pop result lisp-last-definition symbol type t lisp-buffer-symbol name first message "Found %s %s definition" "Found %s" none error "Can't find %s %s definition" "No more %s %s definitions" "Done"] 5 "\ Edit the next definition from *Edit-Definitions* going BACK with prefix and optionally POPPING or call tags-loop-continue if using tags." "P"]) (fset 'edit-definitions-lisp #[(symbol type &optional stay search locator) " ! !\"  ! !$\nҰ#ԉ!\"?@\"?ݎ?!\" #\" ##lj. " [lisp-buffer-symbol symbol name lisp-symbol-name symbol-name ilisp-value ilisp-find-source-command t command search comint-check-proc ilisp-buffer ilisp-send format lisp-symbol-package type "Finding " " " " definitions" source "nil" lisp-last-line result comint-errorp string-match source-ok case-fold-search nil tagged ((byte-code " \nB! \n #A\"\"ć" [tagged symbol type lisp-last-definition nil lisp-last-file locator ilisp-value ilisp-locator lisp-last-locator lisp-setup-edit-definitions format "%s %s definitions:" name source-ok result lisp-edit-files next-definition-lisp t] 5)) tags-file-name lisp-using-tags "Lucid" emacs-version find-tag stay] 8 "\ Find the source files for the TYPE definitions of SYMBOL. If STAY, use the same window. If SEARCH, do not look for symbol in inferior LISP. The definition will be searched for through the inferior LISP and if not found it will be searched for in the current tags file and if not found in the files in lisp-edit-files set up by (\\[lisp-directory]) or the buffers in one of lisp-source-modes if lisp-edit-files is T. If lisp-edit-files is nil, no search will be done if not found through the inferior LISP. TYPES are from ilisp-source-types which is an alist of symbol strings or list strings. With a negative prefix, look for the current symbol as the first type in ilisp-source-types." (byte-code "\" @@ !  D\"$ \" #D," [ilisp-value ilisp-source-types t types default lisp-function-name function lisp-buffer-symbol symbol lisp-minus-prefix ilisp-read-symbol format "Edit Definition [%s]: " nil ilisp-completing-read "Type [%s]: "] 6)]) (fset 'lisp-locate-search #[(pattern type first back) "\n#\n#" [back search-backward pattern nil t search-forward] 4 "\ Find PATTERN in the current buffer."]) (fset 'lisp-locate-regexp #[(regexp type first back) "\n#\n#" [back re-search-backward regexp nil t re-search-forward] 4 "\ Find REGEXP in the current buffer."]) (defvar lisp-last-pattern nil "\ Last search regexp.") (fset 'search-lisp #[(pattern regexp) " !!  B\n ˪ \"\"ɉ\"" [tags-file-name t lisp-using-tags tags-search regexp pattern regexp-quote lisp-last-pattern lisp-last-definition nil lisp-last-file lisp-locate-regexp lisp-locate-search lisp-last-locator lisp-setup-edit-definitions format "Searching for %s:" lisp-edit-files next-definition-lisp] 4 "\ Search for PATTERN through the files in lisp-edit-files if it is a list and the current buffers in one of lisp-source-modes otherwise. If lisp-edit-files is nil, no search will be done. If called with a prefix, search for regexp. If there is a tags file, call tags-search instead." (byte-code " ª \" D" [read-string current-prefix-arg "Search for regexp: " "Search for: " lisp-last-pattern] 3)]) (defvar lisp-last-replace nil "\ Last replace regexp.") (fset 'replace-lisp #[(old new regexp) " !\"  # \"!!`eb # #y \" \"b)?)" [tags-file-name t lisp-using-tags tags-query-replace regexp old regexp-quote new lisp-last-pattern lisp-last-replace lisp-setup-edit-definitions format "Replacing %s by %s:\n\n" lisp-edit-files nil file lisp-next-file lisp-find-file point re-search-forward search-forward 0 query-replace-regexp query-replace] 5 "\ Query replace OLD by NEW through the files in lisp-edit-files if it is a list and the current buffers in one of lisp-source-modes otherwise. If lisp-edit-files is nil, no search will be done. If called with a prefix, replace regexps. If there is a tags file, then call tags-query-replace instead." (byte-code " ª \" \" \" \" E)" [read-string current-prefix-arg "Replace regexp: " "Replace: " lisp-last-pattern old format "Replace regexp %s by: " "Replace %s by: " lisp-last-replace] 6)]) (defvar lisp-callers nil "\ T if we found callers through inferior LISP.") (fset 'who-calls-lisp #[(function &optional no-show) " !\" ! !#\nP#  !!q \n\"c\"@\"\n\"!Aceb\"eby !!!Ūc-" [lisp-buffer-symbol function name ilisp-value ilisp-callers-command t command ilisp-send format lisp-symbol-name lisp-symbol-package "Finding callers of " callers lisp-last-line last-line case-fold-search get-buffer-create "*All-Callers*" erase-buffer "All callers of function %s:\n\n" comint-errorp string-match "nil" error "%s has no callers" message "" replace-regexp "^;[^\n]*\n" 2 no-show ilisp-temp-buffer-show-function get-buffer view-buffer "Using the current source files to find callers." nil] 7 "\ Put the functions that call FUNCTION into the buffer *All-Callers* and show it unless NO-SHOW is T. Return T if successful." (byte-code "  ! C \" ȉ$C*" [lisp-defun-name function lisp-buffer-symbol symbol lisp-minus-prefix ilisp-read-symbol format "Who Calls [%s]: " t] 5)]) (fset 'next-caller-lisp #[(back &optional pop) "\n \"!q\nywmp!!` w `{p!!!@@ ?#*" [lisp-callers next-definition-lisp back pop get-buffer-create "*All-Callers*" -1 " \n" nil bury-buffer error "No more callers" start "^ \n" caller-function edit-definitions-lisp lisp-string-to-symbol ilisp-value ilisp-source-types] 4 "\ Edit the next caller from *All-Callers*. With prefix, edit the previous caller. If it can't get caller information from the inferior LISP, this will search using the current source files. See lisp-directory." "P"]) (fset 'edit-callers-lisp #[(function) " \")!\" !%" [who-calls-lisp function t lisp-callers ilisp-value ilisp-calls-locator lisp-last-locator next-caller-lisp nil edit-definitions-lisp "calls"] 7 "\ Edit the callers of FUNCTION. With a minus prefix use the symbol at the start of the current defun." (byte-code "  C !\" #C)" [lisp-defun-name function lisp-minus-prefix ilisp-read-symbol format "Edit callers of [%s]: " lisp-buffer-symbol t] 5)]) (fset 'lisp-re #[(back format &rest args) " \n# # #)" [apply format args regexp back re-search-backward nil t re-search-forward] 4 "\ Search BACK if T using FORMAT applied to ARGS."]) (fset 'lisp-locate-ilisp #[(symbol type first back) " !!#" [lisp-re back "^[ \n]*(def[^ \n]*[ \n]+(?%s[ \n(]+" regexp-quote lisp-symbol-name symbol] 6 "\ Find SYMBOL's TYPE definition in the current file and return T if successful. A definition is of the form (def(?name."]) (fset 'lisp-locate-calls #[(symbol type first back) " !!#" [lisp-re back "\\(#'\\|(\\|'\\)%s\\([ \n]+\\|)\\)" regexp-quote lisp-buffer-symbol symbol] 6 "\ Locate calls to SYMBOL."]) (fset 'lisp-locate-clisp #[(symbol type first back) "\n!! \" ƉSO#)\n  Κ\n\nP R $( \" ԔԕO הוO! #OƕOQb  @\"P A m %,( ޚ #  # ⚫ # 䚫 # 暫 # 蚫 # ꚫ #,\n ,$,\n\n\" #+" [regexp-quote lisp-symbol-name symbol name string-match "-" 0 struct format "^\\(.\\)?[ \n]*(def[^ \n]*\\([ \n]+\\(.\\)?\\|\\|[ \n]*.[ \n]+\\)(?%s[ \n)]\\|:conc-name\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s-" prefix "\\(:accessor\\|:writer\\|:reader\\)\\([ \n]+\\(.\\)?+[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n)]" class type "any" lisp-re back "^\\(.\\)?[ \n]*(def[^ \n]*\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)\\((setf\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)\\|(?[ \n]*\\(.\\)?[ \n]*\\)%s[ \n)]" "\\|" "(\\([^(]*\\)\\(([^)]*)\\)" 1 quals read 2 nil class-re position "\\([ \n]+.[ \n]*\\|[ \n]*.[ \n]+\\|[ \n]+\\)" "[ \n]*\\(.\\)?[ \n]*([ \n]*\\(.\\)?[ \n]*[^ \n]*\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n]*\\(.\\)?[ \n]*" "^\\(.\\)?[ \n]*(def[^ \n]*\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[^ \n]*([^ \n]*%s" "setf" "^\\(.\\)?[ \n]*(def[^ \n]*\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)(setf\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n]*\\(.\\)?[ \n]*)" "function" "^\\(.\\)?[ \n]*(defun\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n(]" "macro" "^\\(.\\)?[ \n]*(defmacro\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n(]" "variable" "^\\(.\\)?[ \n]*(def\\(\\(var\\)\\|\\(parameter\\)\\|constant\\)\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n(]" "structure" "^\\(.\\)?[ \n]*(defstruct\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)(?[ \n]*\\(.\\)?[ \n]*%s[ \n(]" "type" "^\\(.\\)?[ \n]*(deftype\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n(]" "class" "^\\(.\\)?[ \n]*(defclass\\([ \n]+\\(.\\)?[ \n]*\\|[ \n]*.[ \n]+\\)%s[ \n(]" first lisp-locate-ilisp] 7 "\ Try to find SYMBOL's TYPE definition in the current buffer and return T if sucessful. FIRST is T if this is the first time in a file. BACK is T to go backwards."]) (provide 'ilisp-src)