[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compile.el
From: |
Richard M. Stallman |
Subject: |
compile.el |
Date: |
Mon, 22 Aug 2005 15:35:44 -0400 |
My patch to compile.el has a bug; here's a revised patch.
*** compile.el 20 Aug 2005 17:41:24 -0400 1.375
--- compile.el 22 Aug 2005 03:32:32 -0400
***************
*** 1770,1776 ****
(defun compilation-get-file-structure (file &optional fmt)
"Retrieve FILE's file-structure or create a new one.
! FILE should be (ABSOLUTE-FILENAME) or (RELATIVE-FILENAME . DIRNAME)."
(or (gethash file compilation-locs)
;; File was not previously encountered, at least not in the form passed.
--- 1773,1780 ----
(defun compilation-get-file-structure (file &optional fmt)
"Retrieve FILE's file-structure or create a new one.
! FILE should be (FILENAME) or (RELATIVE-FILENAME . DIRNAME).
! In the former case, FILENAME may be relative or absolute."
(or (gethash file compilation-locs)
;; File was not previously encountered, at least not in the form passed.
***************
*** 1783,1795 ****
;; Check for a comint-file-name-prefix and prepend it if appropriate.
;; (This is very useful for compilation-minor-mode in an rlogin-mode
;; buffer.)
! (if (boundp 'comint-file-name-prefix)
! (if (file-name-absolute-p filename)
! (setq filename
! (concat (with-no-warnings comint-file-name-prefix)
filename))
! (setq default-directory
! (file-truename
! (concat (with-no-warnings comint-file-name-prefix)
default-directory)))))
;; If compilation-parse-errors-filename-function is
;; defined, use it to process the filename.
--- 1787,1799 ----
;; Check for a comint-file-name-prefix and prepend it if appropriate.
;; (This is very useful for compilation-minor-mode in an rlogin-mode
;; buffer.)
! (unless (equal comint-file-name-prefix "")
! (if (file-name-absolute-p filename)
! (setq filename
! (concat comint-file-name-prefix filename))
! (setq default-directory
! (file-truename
! (concat comint-file-name-prefix default-directory)))))
;; If compilation-parse-errors-filename-function is
;; defined, use it to process the filename.
***************
*** 1805,1824 ****
;; name and fix them.
(setq filename (command-line-normalize-file-name filename))
- ;; Now eliminate any "..", because find-file would get them wrong.
- ;; Make relative and absolute filenames, with or without links, the
- ;; same.
- (setq filename
- (list (abbreviate-file-name
- (file-truename (if (cdr file)
- (expand-file-name filename)
- filename)))))
-
;; Store it for the possibly unnormalized name
(puthash file
;; Retrieve or create file-structure for normalized name
! (or (gethash filename compilation-locs)
! (puthash filename (list filename fmt) compilation-locs))
compilation-locs))))
(add-to-list 'debug-ignored-errors "^No more [-a-z ]+s yet$")
--- 1809,1821 ----
;; name and fix them.
(setq filename (command-line-normalize-file-name filename))
;; Store it for the possibly unnormalized name
(puthash file
;; Retrieve or create file-structure for normalized name
! (or (gethash (list filename) compilation-locs)
! (puthash (list filename)
! (list (list filename) fmt)
! compilation-locs))
compilation-locs))))
(add-to-list 'debug-ignored-errors "^No more [-a-z ]+s yet$")
- compile.el,
Richard M. Stallman <=