home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!channel1![rick.sheridan@channel1.com]
- From: "rick sheridan" <rick.sheridan@channel1.com>
- Newsgroups: gnu.emacs.help
- Subject: bc++ w/demacs #04
- Message-ID: <1992Aug29.1277.2641@channel1>
- Date: 29 Aug 92 21:46:42 EST
- Reply-To: "rick sheridan" <rick.sheridan@channel1.com>
- Distribution: gnu
- Organization: Channel 1 Communications
- Lines: 55
-
- ... Continued from previous message... Part 4 of 4
-
- (narrow-to-region (match-beginning 0) (match-end 0))
- (setq filename (buffer-substring (match-beginning 3) (match-end 3)))
- (setq linenum (string-to-int (buffer-substring
- (match-beginning 4) (match-end 4)))))
-
- ;; Locate the erring file and line.
- (if (and (equal filename last-filename)
- (= linenum last-linenum))
- nil
- (beginning-of-line 1)
- (setq error-marker (point-marker))
- ;; text-buffer gets the buffer containing this error's file.
- (if (not (equal filename last-filename))
- (setq text-buffer
- (and (file-exists-p (setq last-filename filename))
- (find-file-noselect filename))
- last-linenum 0))
- (if text-buffer
- ;; Go to that buffer and find the erring line.
- (save-excursion
- (set-buffer text-buffer)
- (if (zerop last-linenum)
- (progn
- (goto-char 1)
- (setq last-linenum 1)))
- (forward-line (- linenum last-linenum))
- (setq last-linenum linenum)
- (setq text-marker (point-marker))
- (setq compilation-error-list
- (cons (list error-marker text-marker)
- compilation-error-list)))))
- (forward-line 1)))
- (setq compilation-parsing-end (point-max)))
- (message "Parsing error messages...done")
- (setq compilation-error-list (nreverse compilation-error-list)))
-
- ;; The function compilation-grab-filename has been deleted since its
- ;; work is now being done in compilation-parse-errors.
-
- (define-key ctl-x-map "`" 'next-error)
-
- -------------------------------- cut here -----------------------------
-
- --Rick.
- -----------------------------------------------------------------------
- This would be a standard disclaimer if there were anything to disclaim.
- Rick.Sheridan@channel1.com Entered Aug 29,92 at 15:32:29(CST)
- -----------------------------------------------------------------------
- ---
- ■ PMDBM DEMO V1.5ß #0 ■ Evaluation Copy
- --
- Channel 1 (R) Cambridge, MA
-
-