[gnu.emacs.bug] next-error does not parse lint messages correctly

kamat@UCENG.UC.EDU (Govind N. Kamat) (05/18/89)

Error-output from System V lint is not parsed correctly by next-error
(apparently, the format of these messages was changed by AT&T).  I'm
using Gnu_Emacs version 18.51.7 with HP-UX 3.0, on a HP 9000/840.

Lars Pensj| (lars@myab.se) posted the following code to comp.emacs on
USENET which works reasonably well.  It would be helpful to have
something like this included in compile.el with a new release of
Emacs.

Thanks very much.

(defun lint-convert ()
  "Modify *compilation* buffer from lint format."
  (interactive)
  (save-excursion
    (switch-to-buffer "*compilation*" t)
    (goto-line 1)
    (while (re-search-forward "^=")
      (let (loc filename)
	(forward-line -1)
	(beginning-of-line)
	(setq loc (point)) (end-of-line)
	(setq filename (buffer-substring loc (point)))
	(message filename)
	(sit-for 1)
	(beginning-of-line 3)
	(while (equal (buffer-substring (point) (1+ (point))) "(")
	  (insert (concat "\"" filename "\", line "))
	  (delete-char 1)
	  (search-forward ")")
	  (delete-char -1)
	  (insert ":")
	  (beginning-of-line 2)
	  )
	)
      )
    )
  )


--
Govind N. Kamat				College of Engineering
kamat@uceng.UC.EDU			University of Cincinnati
					Cincinnati, OH 45221, USA