home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / emacs / help / 3892 < prev    next >
Encoding:
Text File  |  1992-08-30  |  2.3 KB  |  67 lines

  1. Path: sparky!uunet!channel1![rick.sheridan@channel1.com]
  2. From: "rick sheridan" <rick.sheridan@channel1.com>
  3. Newsgroups: gnu.emacs.help
  4. Subject: bc++ w/demacs     #04
  5. Message-ID: <1992Aug29.1277.2641@channel1>
  6. Date: 29 Aug 92 21:46:42 EST
  7. Reply-To: "rick sheridan" <rick.sheridan@channel1.com>
  8. Distribution: gnu
  9. Organization: Channel 1 Communications
  10. Lines: 55
  11.  
  12.           ... Continued from previous message... Part 4 of 4
  13.  
  14.       (narrow-to-region (match-beginning 0) (match-end 0))
  15.           (setq filename (buffer-substring (match-beginning 3) (match-end 3)))
  16.           (setq linenum (string-to-int (buffer-substring
  17.                 (match-beginning 4) (match-end 4)))))
  18.  
  19.     ;; Locate the erring file and line.
  20.     (if (and (equal filename last-filename)
  21.          (= linenum last-linenum))
  22.         nil
  23.       (beginning-of-line 1)
  24.       (setq error-marker (point-marker))
  25.       ;; text-buffer gets the buffer containing this error's file.
  26.       (if (not (equal filename last-filename))
  27.           (setq text-buffer
  28.             (and (file-exists-p (setq last-filename filename))
  29.              (find-file-noselect filename))
  30.             last-linenum 0))
  31.       (if text-buffer
  32.           ;; Go to that buffer and find the erring line.
  33.           (save-excursion
  34.         (set-buffer text-buffer)
  35.         (if (zerop last-linenum)
  36.             (progn
  37.               (goto-char 1)
  38.               (setq last-linenum 1)))
  39.         (forward-line (- linenum last-linenum))
  40.         (setq last-linenum linenum)
  41.         (setq text-marker (point-marker))
  42.         (setq compilation-error-list
  43.               (cons (list error-marker text-marker)
  44.                 compilation-error-list)))))
  45.     (forward-line 1)))
  46.     (setq compilation-parsing-end (point-max)))
  47.   (message "Parsing error messages...done")
  48.   (setq compilation-error-list (nreverse compilation-error-list)))
  49.  
  50. ;; The function compilation-grab-filename has been deleted since its
  51. ;; work is now being done in compilation-parse-errors.
  52.  
  53. (define-key ctl-x-map "`" 'next-error)
  54.  
  55. -------------------------------- cut here -----------------------------
  56.  
  57. --Rick.
  58. -----------------------------------------------------------------------
  59. This would be a standard disclaimer if there were anything to disclaim.
  60. Rick.Sheridan@channel1.com           Entered Aug 29,92 at 15:32:29(CST)
  61. -----------------------------------------------------------------------
  62. ---
  63.  ■ PMDBM DEMO V1.5ß #0 ■ Evaluation Copy
  64. --
  65. Channel 1 (R)   Cambridge, MA
  66.  
  67.