home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / a2.0bemacs-src.lha / Emacs-19.25 / lisp / compile.elc < prev    next >
Encoding:
Text File  |  1994-11-03  |  24.9 KB  |  393 lines

  1.  
  2. (defvar compilation-mode-hook nil "\
  3. *List of hook functions run by `compilation-mode' (see `run-hooks').")
  4.  
  5. (defconst compilation-window-height nil "\
  6. *Number of lines in a compilation window.  If nil, use Emacs default.")
  7.  
  8. (defvar compilation-error-list nil "\
  9. List of error message descriptors for visiting erring functions.
  10. Each error descriptor is a cons (or nil).  Its car is a marker pointing to
  11. an error message.  If its cdr is a marker, it points to the text of the
  12. line the message is about.  If its cdr is a cons, it is a list
  13. ((DIRECTORY . FILE) LINE [COLUMN]).  Or its cdr may be nil if that
  14. error is not interesting.
  15.  
  16. The value may be t instead of a list; this means that the buffer of
  17. error messages should be reparsed the next time the list of errors is wanted.
  18.  
  19. Some other commands (like `diff') use this list to control the error
  20. message tracking facilites; if you change its structure, you should make
  21. sure you also change those packages.  Perhaps it is better not to change
  22. it at all.")
  23.  
  24. (defvar compilation-old-error-list nil "\
  25. Value of `compilation-error-list' after errors were parsed.")
  26.  
  27. (defvar compilation-parse-errors-function (quote compilation-parse-errors) "\
  28. Function to call to parse error messages from a compilation.
  29. It takes args LIMIT-SEARCH and FIND-AT-LEAST.
  30. If LIMIT-SEARCH is non-nil, don't bother parsing past that location.
  31. If FIND-AT-LEAST is non-nil, don't bother parsing after finding that 
  32. many new errors.
  33. It should read in the source files which have errors and set
  34. `compilation-error-list' to a list with an element for each error message
  35. found.  See that variable for more info.")
  36.  
  37. (defvar compilation-buffer-name-function nil "\
  38. Function to compute the name of a compilation buffer.
  39. The function receives one argument, the name of the major mode of the
  40. compilation buffer.  It should return a string.
  41. nil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'.")
  42.  
  43. (defvar compilation-finish-function nil "\
  44. *Function to call when a compilation process finishes.
  45. It is called with two arguments: the compilation buffer, and a string
  46. describing how the process finished.")
  47.  
  48. (defvar compilation-last-buffer nil "\
  49. The most recent compilation buffer.
  50. A buffer becomes most recent when its compilation is started
  51. or when it is used with \\[next-error] or \\[compile-goto-error].")
  52.  
  53. (defvar compilation-in-progress nil "\
  54. List of compilation processes now running.")
  55.  
  56. (or (assq (quote compilation-in-progress) minor-mode-alist) (setq minor-mode-alist (cons (quote (compilation-in-progress " Compiling")) minor-mode-alist)))
  57.  
  58. (defvar compilation-parsing-end nil "\
  59. Position of end of buffer when last error messages were parsed.")
  60.  
  61. (defvar compilation-error-message "No more errors" "\
  62. Message to print when no more matches are found.")
  63.  
  64. (defvar compilation-num-errors-found)
  65.  
  66. (defvar compilation-error-regexp-alist (quote (("
  67. \\([^:(     
  68. ]+\\)[:(][     ]*\\([0-9]+\\)[:)     ]" 1 2) ("[     :]\\([^:(     
  69. ]+\\)[:(](+[     ]*\\([0-9]+\\))[:)     ]*$" 1 2) ("([     ]*\\([^:(     
  70. ]+\\)[:(][     ]*\\([0-9]+\\))" 1 2) ("
  71. fort: [^:
  72. ]*: \\([^ 
  73. ]*\\), line \\([0-9]+\\):" 1 2) ("\\(
  74. \\|on \\)[Ll]ine[     ]+\\([0-9]+\\)[     ]+of[     ]+\"?\\([^\":
  75. ]+\\)\"?:" 3 2) ("\"\\([^,\" 
  76.     ]+\\)\", lines? \\([0-9]+\\)[:., -]" 1 2) ("rror: \\([^,\" 
  77.     ]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 1 3) ("in line \\([0-9]+\\) of file \\([^ 
  78. ]+[^. 
  79. ]\\)\\.? " 2 1) ("
  80. [EW], \\([^(
  81. ]*\\)(\\([0-9]+\\),[     ]*\\([0-9]+\\)" 1 2 3) ("
  82. \\\"\\([^ 
  83. \\\"]+\\)\\\",[ ]*\\([0-9]+\\),[ ]*\\([0-9]+\\): Error" 1 2 3) ("
  84. \\\"\\([^ 
  85. \\\"]+\\)\\\",[ ]*\\([0-9]+\\),[ ]*\\([0-9]+\\): Warning" 1 2 3) ("
  86. \\([^ 
  87. ]+\\) \\([0-9]+\\) Warning" 1 2) ("
  88. \\([^ 
  89. ]+\\) \\([0-9]+\\) Error" 1 2))) "Alist that specifies how to match errors in compiler output.
  90. Each element has the form (REGEXP FILE-IDX LINE-IDX [COLUMN-IDX]).
  91. If REGEXP matches, the FILE-IDX'th subexpression gives the file name, and
  92. the LINE-IDX'th subexpression gives the line number.  If COLUMN-IDX is
  93. given, the COLUMN-IDX'th subexpression gives the column number on that line.")
  94.  
  95. (defvar compilation-read-command t "\
  96. If not nil, M-x compile reads the compilation command to use.
  97. Otherwise, M-x compile just uses the value of `compile-command'.")
  98.  
  99. (defvar compilation-ask-about-save t "\
  100. If not nil, M-x compile asks which buffers to save before compiling.
  101. Otherwise, it saves all modified buffers without asking.")
  102.  
  103. (defvar grep-regexp-alist (quote (("^\\([^:(     
  104. ]+\\)[:(     ]+\\([0-9]+\\)[:)     ]" 1 2))) "Regexp used to match grep hits.  See `compilation-error-regexp-alist'.")
  105.  
  106. (defvar grep-command "grep -n " "\
  107. Last grep command used in \\{grep}; default for next grep.")
  108.  
  109. (defvar compilation-search-path (quote (nil)) "\
  110. *List of directories to search for source files named in error messages.
  111. Elements should be directory names, not file names of directories.
  112. nil as an element means to try the default directory.")
  113.  
  114. (defvar compile-command "make -k " "\
  115. Last shell command used to do a compilation; default for next compilation.
  116.  
  117. Sometimes it is useful for files to supply local values for this variable.
  118. You might also use mode hooks to specify it in certain modes, like this:
  119.  
  120.     (setq c-mode-hook
  121.       '(lambda () (or (file-exists-p \"makefile\") (file-exists-p \"Makefile\")
  122.               (progn (make-local-variable 'compile-command)
  123.                  (setq compile-command
  124.                     (concat \"make -k \"
  125.                         buffer-file-name))))))")
  126.  
  127. (defconst compilation-enter-directory-regexp ": Entering directory `\\(.*\\)'$" "\
  128. Regular expression matching lines that indicate a new current directory.
  129. This must contain one \\(, \\) pair around the directory name.
  130.  
  131. The default value matches lines printed by the `-w' option of GNU Make.")
  132.  
  133. (defconst compilation-leave-directory-regexp ": Leaving directory `\\(.*\\)'$" "\
  134. Regular expression matching lines that indicate restoring current directory.
  135. This may contain one \\(, \\) pair around the name of the directory
  136. being moved from.  If it does not, the last directory entered (by a
  137. line matching `compilation-enter-directory-regexp') is assumed.
  138.  
  139. The default value matches lines printed by the `-w' option of GNU Make.")
  140.  
  141. (defvar compilation-directory-stack nil "\
  142. Stack of previous directories for `compilation-leave-directory-regexp'.
  143. The head element is the directory the compilation was started in.")
  144.  
  145. (defvar compile-history nil)
  146.  
  147. (defvar grep-history nil)
  148.  
  149. (defun compile (command) "\
  150. Compile the program including the current buffer.  Default: run `make'.
  151. Runs COMMAND, a shell command, in a separate process asynchronously
  152. with output going to the buffer `*compilation*'.
  153.  
  154. You can then use the command \\[next-error] to find the next error message
  155. and move to the source code that caused it.
  156.  
  157. To run more than one compilation at once, start one and rename the
  158. `*compilation*' buffer to some other name with \\[rename-buffer].
  159. Then start the next one.
  160.  
  161. The name used for the buffer is actually whatever is returned by
  162. the function in `compilation-buffer-name-function', so you can set that
  163. to a function that generates a unique name." (interactive (byte-code "ƒÃÄ    ÂÂÅ%C‚    C‡" [compilation-read-command compile-command nil read-from-minibuffer "Compile command: " (compile-history . 1)] 6)) (byte-code "ˆ ‰ˆÅ ?Â\"ˆÆ    Ç\"‡" [compilation-read-command compile-command nil command compilation-ask-about-save save-some-buffers compile-internal "No more errors"] 4))
  164.  
  165. (defun grep (command-args) "\
  166. Run grep, with user-specified args, and collect output in a buffer.
  167. While grep runs asynchronously, you can use the \\[next-error] command
  168. to find the text that grep hits refer to.
  169.  
  170. This command uses a special history list for its arguments, so you can
  171. easily repeat a grep command." (interactive (byte-code "ÂÃÁÁÄ%C‡" [grep-command nil read-from-minibuffer "Run grep (like this): " grep-history] 6)) (byte-code "ÁˆÅ
  172. Æ=ƒǂÈPÉÊÁ %‡" [grep-command nil command-args system-type grep-regexp-alist compile-internal amigados " nil:" " /dev/null" "No more grep hits" "grep"] 6))
  173.  
  174. (defun compile-internal (command error-message &optional name-of-mode parser regexp-alist name-function) "\
  175. Run compilation command COMMAND (low level interface).
  176. ERROR-MESSAGE is a string to print if the user asks to see another error
  177. and there are no more errors.  Third argument NAME-OF-MODE is the name
  178. to display as the major mode in the compilation buffer.
  179.  
  180. Fourth arg PARSER is the error parser function (nil means the default).  Fifth
  181. arg REGEXP-ALIST is the error message regexp alist to use (nil means the
  182. default).  Sixth arg NAME-FUNCTION is a function called to name the buffer (nil
  183. means the default).  The defaults for these variables are the global values of
  184. `compilation-parse-errors-function', `compilation-error-regexp-alist', and
  185. `compilation-buffer-name-function', respectively.
  186.  
  187. Returns the compilation buffer created." (byte-code "ÍŠ    †
  188. ىˆÚÛ
  189. † †Ü    \"!‰ˆqˆÝp! …EÞ !ß=?†6àáâ    \"!ƒ@Íã䏂Eåæç \")ˆè )ˆ
  190. †Q†X
  191. Í     ŠqˆÍ‰ ˆé ˆ    ‰
  192. ˆêë    ìì%ˆíÍ!)ˆp=…‹dbˆî!‰ ˆŠqˆï ˆðp!ˆñÈ!Lˆñò!LˆñÆ!
  193. Lˆ    
  194. 
  195. C‰ˆó e\"ˆ    ‰ˆ ô =†Õõ e\"ˆ…ùö !÷ U…ùô øŽù !ˆúû Z!))ˆüý!ƒ8þÿ!#@A\"ˆBC\"ˆDE!`#ˆB‰)‚cFáG\"!ˆHÍ́I&Í)ˆFáJ\"!),ˆ‰)‡" [outbuf name-of-mode name-function compilation-buffer-name-function comp-proc regexp-alist compilation-error-regexp-alist parser compilation-parse-errors-function thisdir default-directory outwin buffer-read-only nil command error-message compilation-directory-stack mode-name compilation-window-height w proc compilation-in-progress status shell-file-name compilation-last-buffer "Compilation" get-buffer-create funcall (lambda (mode) (byte-code "ÁÂ!ÁQ‡" [mode "*" downcase] 4)) get-buffer-process process-status run yes-or-no-p format "A %s process is running; kill it? " (byte-code "Á!ˆÂÃ!ˆÄ!‡" [comp-proc interrupt-process sit-for 1 delete-process] 4) ((error (byte-code "À‡" [nil] 1))) error "Cannot have two processes in `%s' at once" buffer-name kill-all-local-variables erase-buffer insert "cd " "
  196. " set-buffer-modified-p display-buffer compilation-mode buffer-disable-undo make-local-variable compilation-error-message set-window-start selected-window set-window-point window-width frame-width ((byte-code "Á!‡" [w select-window] 2)) select-window enlarge-window window-height fboundp start-process start-process-shell-command downcase set-process-sentinel compilation-sentinel set-process-filter compilation-filter set-marker process-mark message "Executing `%s'..." call-process "-c" "Executing `%s'...done"] 43))
  197.  
  198. (defvar compilation-minor-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] (quote compile-mouse-goto-error)) (define-key map "" (quote compile-goto-error)) (define-key map " " (quote kill-compilation)) (define-key map "î" (quote compilation-next-error)) (define-key map "ð" (quote compilation-previous-error)) (define-key map "û" (quote compilation-previous-file)) (define-key map "ý" (quote compilation-next-file)) map) "\
  199. Keymap for `compilation-minor-mode'.")
  200.  
  201. (defvar compilation-mode-map (let ((map (cons (quote keymap) compilation-minor-mode-map))) (define-key map " " (quote scroll-up)) (define-key map "" (quote scroll-down)) map) "\
  202. Keymap for compilation log buffers.
  203. `compilation-minor-mode-map' is a cdr of this.")
  204.  
  205. (defun compilation-mode nil "\
  206. Major mode for compilation log buffers.
  207. \\<compilation-mode-map>To visit the source for a line-numbered error,
  208. move point to the error message line and type \\[compile-goto-error].
  209. To kill the compilation, type \\[kill-compilation].
  210.  
  211. Runs `compilation-mode-hook' with `run-hooks' (which see)." (interactive) (byte-code "ÈĠˆÅ!ˆÆljˆÈ ˆÉÊ!‡" [compilation-mode-map major-mode mode-name nil fundamental-mode use-local-map compilation-mode "Compilation" compilation-setup run-hooks compilation-mode-hook] 5))
  212.  
  213. (defun compilation-setup nil (byte-code "ɈÄÅ!ÁLˆÄÆ!ÁLˆÄÇ!ÈLˆÄÉ!ÁLˆp‰‡" [mode-line-process nil compilation-last-buffer (":%s") make-local-variable compilation-error-list compilation-old-error-list compilation-parsing-end 1 compilation-directory-stack] 6))
  214.  
  215. (defvar compilation-minor-mode nil "\
  216. Non-nil when in compilation-minor-mode.
  217. In this minor mode, all the error-parsing commands of the
  218. Compilation major mode are available.")
  219.  
  220. (make-variable-buffer-local (quote compilation-minor-mode))
  221.  
  222. (or (assq (quote compilation-minor-mode) minor-mode-alist) (setq minor-mode-alist (cons (quote (compilation-minor-mode " Compilation")) minor-mode-alist)))
  223.  
  224. (or (assq (quote compilation-minor-mode) minor-mode-map-alist) (setq minor-mode-map-alist (cons (cons (quote compilation-minor-mode) compilation-minor-mode-map) minor-mode-map-alist)))
  225.  
  226. (defun compilation-minor-mode (&optional arg) "\
  227. Toggle compilation minor mode.
  228. With arg, turn compilation mode on if and only if arg is positive.
  229. See `compilation-mode'." (interactive "P") (byte-code "ˆ    ?ƒ ?‚à   !ÄV‰…Å ‡" [compilation-minor-mode arg nil prefix-numeric-value 0 compilation-setup] 3))
  230.  
  231. (defun compilation-sentinel (proc msg) "\
  232. Sentinel for compilation buffers." (byte-code "Ì    !Í    !Î>…„Ï!?ƒР   Â\"‚{pÂÂюqˆÂd`‰ˆ bˆÒÓÔ$ˆÕÖ!ˆÒר ÙÚO\"ˆÕÛ!ˆÜÝÍ    !!P‰    ˆÞ    !ˆßà !)ˆ
  233. …g
  234. W…l
  235. bˆ
  236. …yá
  237. #)+ˆâ     \"‰ )‡" [buffer proc nil obuf omax opoint buffer-read-only mode-name msg mode-line-process compilation-finish-function compilation-in-progress process-buffer process-status (signal exit) buffer-name set-process-buffer ((byte-code "q‡" [obuf] 1)) insert 10 " " forward-char -1 " at " current-time-string 0 19 1 ":" symbol-name delete-process set-buffer-modified-p buffer-modified-p funcall delq] 18))
  238.  
  239. (defun compilation-filter (proc string) "\
  240. Process filter for compilation buffers.
  241. Just inserts the text, but uses `insert-before-markers'." (byte-code "ŠÄ!qˆÂŠÅ!bˆÆ !ˆÇÅ!`\")))‡" [proc buffer-read-only nil string process-buffer process-mark insert-before-markers set-marker] 7))
  242.  
  243. (defun compile-error-at-point nil (byte-code "ÃÀ`\"ˆ
  244.     …`    @@V…    A‰ˆ‚ˆ    )‡" [nil errors compilation-old-error-list compile-reinitialize-errors] 4))
  245.  
  246. (defsubst compilation-buffer-p (buffer) (assq (quote compilation-error-list) (buffer-local-variables buffer)))
  247.  
  248. (defun compilation-next-error (n) "\
  249. Move point to the next error in the compilation buffer.
  250. Does NOT find the source line like \\[next-error]." (interactive "p") (byte-code "LjÈp!† ÉÊ!ˆp‰ˆË 
  251. ÌWƒFÌ
  252.      =?…/ T A‰ˆ‚ˆ
  253. [ Vƒ=ÉÍ!‚B
  254. \\
  255. 8*‚a    AÎÇÇ
  256. #ˆƒ]
  257. S8‚`ÉÏ!)@b)‡" [compilation-last-buffer errors n i e compilation-old-error-list compilation-error-list nil compilation-buffer-p error "Not in a compilation buffer." compile-error-at-point 0 "Moved back past first error" compile-reinitialize-errors "Moved past last error"] 8))
  258.  
  259. (defun compilation-previous-error (n) "\
  260. Move point to the previous error in the compilation buffer.
  261. Does NOT find the source line like \\[next-error]." (interactive "p") (byte-code "ÁˆÂ[!‡" [n nil compilation-next-error] 2))
  262.  
  263. (defsubst compilation-error-filedata (data) (setq data (cdr data)) (if (markerp data) (marker-buffer data) (car data)))
  264.  
  265. (defsubst compilation-error-filedata-file-name (filedata) (if (bufferp filedata) (buffer-file-name filedata) (car filedata)))
  266.  
  267. (defun compilation-next-file (n) "\
  268. Move point to the next error for a different file than the current one." (interactive "p") (byte-code "ňÈp!† ÉÊ!ˆp‰ˆ
  269. ËWÅÅ    ?ƒ*Ì †%ÉÍ!‰‚MÎÅ`\"ˆÏ!
  270. [‰ˆ …B` @@W…M A‰ˆ‚9ˆ
  271. ËV…Ð @!‰ˆÑ Ð ††    ƒoÉÒÓ !\"‚}ÅÎÅÅÔ#ˆ‰)††ÉÕÓ !\"@!\"…” A‰ˆ‚[ˆ
  272. S‰ˆ‚Nˆ †¸    ƒ¬ÉÖ!‚¸ÅÎÅÅ×#ˆ)@@b+‡" [compilation-last-buffer reversed n errors filedata nil compilation-old-error-list compilation-error-list compilation-buffer-p error "Not in a compilation buffer." 0 compile-error-at-point "Moved past last error" compile-reinitialize-errors reverse compilation-error-filedata equal "%s the first erring file" compilation-error-filedata-file-name 2 "%s is the last erring file" "This is the first erring file" 1] 19))
  273.  
  274. (defun compilation-previous-file (n) "\
  275. Move point to the previous error for a different file than the current one." (interactive "p") (byte-code "ÁˆÂ[!‡" [n nil compilation-next-file] 2))
  276.  
  277. (defun kill-compilation nil "\
  278. Kill the process made by the \\[compile] command." (interactive) (byte-code "ÁˆÂ Ã!ƒÄÃ!!‚ÅÆ!)‡" [buffer nil compilation-find-buffer get-buffer-process interrupt-process error "The compilation process is not running."] 6))
  279.  
  280. (defun compile-reinitialize-errors (reparse &optional limit-search find-at-least) (byte-code "Šqˆ    Â=† …Ë ˆ    …+ ?†
  281. V…+?†+    GYƒ2ǂbÌÇ!ˆ
  282. dW…b    Í     …M    GZ#ˆÎ
  283.     \"‰
  284. ˆ…a‰))‡" [compilation-last-buffer compilation-error-list t reparse limit-search compilation-parsing-end find-at-least nil error-list-pos compilation-parse-errors-function compilation-old-error-list compilation-forget-errors set-buffer-modified-p funcall nconc] 7))
  285.  
  286. (defun compile-mouse-goto-error (event) (interactive "e") (byte-code "ˆŠÅÆÇ!!!qˆÈÇ!!bˆÉp!†ÊË!ˆp‰ˆÌÂ`\"ˆÍ ˆ ‰ˆ …6` @@V…A A‰ˆ‚-ˆ †IÊÎ!)ˆÏÆÇ!!!ˆÐ †^ÑÒ!ˆ    qˆÓ ˆÔÕ!‡" [event compilation-last-buffer nil compilation-error-list compilation-old-error-list window-buffer posn-window event-end posn-point compilation-buffer-p error "Not in a compilation buffer." compile-reinitialize-errors beginning-of-line "No error to go to" select-window one-window-p other-window -1 push-mark next-error 1] 18))
  287.  
  288. (defun compile-goto-error (&optional argp) "\
  289. Visit the source for the error message point is on.
  290. Use this command in a compilation log buffer.  Sets the mark at point there.
  291. \\[universal-argument] as a prefix arg means to reparse the buffer's error messages first;
  292. other kinds of prefix arguments are ignored." (interactive "P") (byte-code "ĈÅp!† ÆÇ!ˆp‰ˆÈ    :`\"ˆÉ ˆ ‰ˆ
  293. …&`
  294. @@V…1
  295. A‰ˆ‚ˆÊ †=ËÌ!ˆqˆÍ ˆÎÏ!‡" [compilation-last-buffer argp compilation-error-list compilation-old-error-list nil compilation-buffer-p error "Not in a compilation buffer." compile-reinitialize-errors beginning-of-line one-window-p other-window -1 push-mark next-error 1] 9))
  296.  
  297. (defun compilation-find-buffer (&optional other-buffer) (byte-code "?…Ãp!ƒp‚o    …\"Ä    !…\"?†\"    p=?ƒ)    ‚oÅ 
  298. …@Ã
  299. @!?†@…@
  300. @p=…K
  301. A‰ˆ‚,ˆ
  302. ƒU
  303. @‚n…hÃp!…h…fÆÇ!ˆp†nÈÉ!)‡" [other-buffer compilation-last-buffer buffers compilation-buffer-p buffer-name buffer-list message "This is the only compilation buffer." error "No compilation started!"] 8))
  304.  
  305. (defun next-error (&optional argp) "\
  306. Visit next compilation error message and corresponding source code.
  307. This operates on the output from the \\[compile] command.
  308. If all preparsed error messages have been processed,
  309. the error message buffer is checked for new ones.
  310.  
  311. A prefix arg specifies how many error messages to move;
  312. negative means move back to previous error messages.
  313. Just C-u as a prefix means reparse the error message buffer
  314. and start at the first error.
  315.  
  316. \\[next-error] normally applies to the most recent compilation started,
  317. but as long as you are in the middle of parsing errors from one compilation
  318. output buffer, you stay with that compilation output buffer.
  319.  
  320. Use \\[next-error] in a compilation output buffer to switch to
  321. processing errors from that compilation.
  322.  
  323. See variables `compilation-parse-errors-function' and
  324. `compilation-error-regexp-alist' for customization ideas." (interactive "P") (byte-code "ˆà‰ˆÄÅ    :?…Æ    !    :\"!‡" [compilation-last-buffer argp nil compilation-find-buffer compilation-goto-locus compilation-next-error-locus prefix-numeric-value] 6))
  325.  
  326. (defun compilation-next-error-locus (&optional move reparse) "\
  327. Visit next compilation error and return locus in corresponding source code.
  328. This operates on the output from the \\[compile] command.
  329. If all preparsed error messages have been processed,
  330. the error message buffer is checked for new ones.
  331.  
  332. Returns a cons (ERROR . SOURCE) of two markers: ERROR is a marker at the
  333. location of the error message in the compilation buffer, and SOURCE is a
  334. marker at the location in the source code indicated by the error message.
  335.  
  336. Optional first arg MOVE says how many error messages to move forwards (or
  337. backwards, if negative); default is 1.  Optional second arg REPARSE, if
  338. non-nil, says to reparse the error message buffer and reset to the first
  339. error (plus MOVE - 1).
  340.  
  341. The current buffer should be the desired compilation output buffer." (byte-code "†ՉˆÖ    Â    ?…ÕWƒׂS#ˆÂŠ
  342. qˆ×Vƒ5ØS\"‚rS×
  343.         =?…XT    A‰    ˆ‚@ˆ[VƒhÙÚ!‚qØ\\
  344. \"+ @‰ˆ ?ƒ¯…’ÛÕ\"…’Ù×V…ÜÚ\"ˆÝ ˆÙ Þp!…ªßÞp!!à=…ªáP!‚Ò A‰ˆ A?ƒ¿Ì‚Òâ A!†Ä A@
  345. ã
  346. A
  347. @ @#?ƒ
  348. ‰ˆ …
  349.  @A:…ä @A@
  350. \"…å @@Â\"ˆæ @Â\"ˆ A‰ˆ‚âˆÌ‚Ã
  351. Õ A8ç A8qˆŠŒè ˆé!ˆƒ<ê!‚>레æ ì \"ˆ…À@A:…µä@A@
  352. \"…µÕ@A8ç@A8ZÌ=ƒ˜×WƒŽíîÂï[$‚•ðîÂï$‚œñ!ˆ…¦ê!ˆ‰ˆæ@ì \"+ˆA‰ˆ‚E))+*ˆâ A!?†Òò A!?…à @‰ˆ‚x)ˆ…ïä@A A\"…üA‰ˆ‚∠*‡" [move reparse nil next-errors next-error compilation-last-buffer compilation-error-list n i e compilation-old-error-list compilation-error-message t fileinfo buffer errors last-line column this lines selective-display 1 compile-reinitialize-errors 0 nthcdr error "Moved back past first error" /= "Moved past last error" compilation-forget-errors get-buffer-process process-status run " yet" markerp compilation-find-file equal set-marker setcdr 2 widen goto-line move-to-column beginning-of-line point-marker re-search-backward "[
  353.  
  354. ]" end re-search-forward forward-line marker-buffer] 35))
  355.  
  356. (defun compilation-goto-locus (next-error) "\
  357. Jump to an error locus returned by `compilation-next-error-locus'.
  358. Takes one argument, a cons (ERROR . SOURCE) of two markers.
  359. Selects a window with point at SOURCE, with another window displaying ERROR." (byte-code "ÄÅ !… Å Æ =ƒÇÈA!!‚ÉÈA!!ˆAbˆ`ÊA!U†2Ë ˆAbˆÂÌÈ@!!Í @\"ˆÎ @\"*‡" [next-error pop-up-windows t w window-dedicated-p selected-window frame-root-window switch-to-buffer-other-frame marker-buffer switch-to-buffer marker-position widen display-buffer set-window-point set-window-start] 16))
  360.  
  361. (defun compilation-find-file (filename dir marker) (byte-code "    ÊÊ…
  362. ?…+Ë @†
  363. \"Ì !…\"Í !A‰ˆ‚ˆ
  364. †oÇÎÏ    !!Р   \"ˆÑ    \"*ˆËÒÓÔ \"
  365. Ç$!‰ˆÕ !…eÖ ! P‰ˆÌ !…oÍ !+‡" [dirs compilation-search-path result name filename dir pop-up-windows t w marker nil expand-file-name file-exists-p find-file-noselect display-buffer marker-buffer set-window-point set-window-start read-file-name format "Find this error in: (default %s) " file-directory-p file-name-as-directory] 15))
  366.  
  367. (defun compilation-forget-errors nil (byte-code "…#@Æ    @Â\"ˆÇ    A!…Æ    AÂ\")ˆA‰ˆ‚ˆÂÂȉ‡" [compilation-old-error-list next-error nil compilation-error-list compilation-directory-stack compilation-parsing-end set-marker markerp 1] 6))
  368.  
  369. (defun count-regexp-groupings (regexp) "\
  370. Return the number of \\( ... \\) groupings in REGEXP (a string)." (byte-code "Å
  371. GÅÆ     W…[
  372. H T‰ˆ ÇUƒ8     W…*
  373. HÈU?…5 T‰ˆ‚‚W ÉU…W     W…W
  374. H T‰ˆ ÊU…WT‰ˆ‚    ˆ,‡" [groupings len regexp i c 0 nil 91 93 92 41] 4))
  375.  
  376. (defun compilation-parse-errors (limit-search find-at-least) "\
  377. Parse the current buffer as grep, cc or lint error messages.
  378. See variable `compilation-parse-errors-function' for the interface it uses." (byte-code "Á‰ˆáâ!ˆÁÁÁÁÁÁÁÁÁÁÁÁã
  379.   
  380.     bˆo…:äå!ˆæç!ˆèéêéêéëìí#î&    ‰ˆïðñ!ï#ðñ!ï#‰    ˆ†uòó!
  381.     T‰ ˆ
  382. …Æ  ï
  383. @8\\ å
  384. @8\\ô
  385. @8…¥ ô
  386. @8\\F B‰ ˆð ïñ
  387. @@!#‰ ˆ
  388. A‰
  389. ˆ‚~ˆ‰ˆõ !‰ˆö÷ \"‰ˆ
  390. ?…åøÁÔ#…üù!ƒ8úöûùï\\!üï\\!\"!!ý
  391. $‰ˆB‰ˆþ!…#‰)ˆ…5`Y…5ԉ
  392. ‚Òù!ƒ´ùï\\!…†úöûüï\\!\"!!ý
  393. $‰ˆ…xÿ@\"?……A‰ˆ‚k)ˆA‰ˆ@‰ˆ…Ÿ‰*ˆ…±`Y…±ԉ
  394. ‚Òù    !ƒÍ ‰
  395. ˆ
  396. …Íù
  397. @@!?…Ú
  398. A‰
  399. ˆ‚Áˆ
  400. Ď
  401. @‰
  402. ‚îò@!ˆùã!ûùï
  403. 8!üï
  404. 8!\"Aûùå
  405. 8!üå
  406. 8!\"!ô
  407. 8…+Aûùô
  408. 8!üô
  409. 8!\"!BÞ!…LC!…LP‰ˆB‰ˆŠDï!ˆE EBFA@A\"ƒ|Á‚‰B‰ˆT‰))ˆ …– V†¢…¢`Y…ÉA…ɁFã8A@ï8A@\"?…ÉA‰ˆbˆÔ‰
  410. ,‚ÒòG!ˆáHIJK`\"d\"#ˆ…ø`Y…øԉ
  411. ˆ‚Ùˆ
  412. ƒ`‚d‰.
  413. ˆL!‰ˆáM!‡" [compilation-error-list nil text-buffer orig orig-expanded parent-expanded regexp enter-group leave-group error-group alist subexpr error-regexp-groups found-desired compilation-num-errors-found compilation-parsing-end compilation-enter-directory-regexp compilation-leave-directory-regexp compilation-error-regexp-alist default-directory t dir compilation-directory-stack limit-search beg stack beginning-of-match filename linenum column comint-file-name-prefix this find-at-least message "Parsing error messages..." 0 forward-line 2 forward-char -1 concat "\\(" "\\)\\|" mapconcat (lambda (elt) (byte-code "Á@ÂQ‡" [elt "\\(" "\\)"] 3)) "\\|" "\\)" 1 + count-regexp-groupings error "compilation-error-regexp-alist is empty!" 3 file-truename expand-file-name "../" re-search-forward match-beginning file-name-as-directory buffer-substring match-end compile-abbreviate-directory file-directory-p string-equal "compilation-parse-errors: impossible regexp match!" string-to-int boundp file-name-absolute-p beginning-of-line point-marker equal "compilation-parse-errors: known groups didn't match!" "Parsing error messages...%d (%.0f%% of buffer)" / * 100.0 nreverse "Parsing error messages...done"] 61))
  414.  
  415. (defun compile-abbreviate-directory (dir orig orig-expanded parent-expanded) (byte-code "ÅÁ!…     P‰ˆG
  416. GV…Æ
  417. Ç
  418. GO\"…(
  419. GÈOP‰ˆG GV…9Æ Ç GO\"…IÉÊ !! GÈOP‰ˆ‡" [dir comint-file-name-prefix orig-expanded orig parent-expanded boundp string= 0 nil file-name-directory directory-file-name] 9))
  420.  
  421. (provide (quote compile))
  422.