Mercurial > hg > xemacs-beta
diff lisp/prim/files.el @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | bfd6434d15b3 |
children | 489f57a838ef |
line wrap: on
line diff
--- a/lisp/prim/files.el Mon Aug 13 09:54:24 2007 +0200 +++ b/lisp/prim/files.el Mon Aug 13 09:55:28 2007 +0200 @@ -635,6 +635,7 @@ (frame (make-frame (if name (list (cons 'name (symbol-name name))))))) (pop-to-buffer buffer t frame) + (select-frame frame) (make-frame-visible frame) buffer)) @@ -946,7 +947,7 @@ If a buffer exists visiting FILENAME, return that one, but verify that the file has not changed since visited or saved. The buffer is not selected, just returned to the caller. -If NOWARN is non-nil warning messages about several potential +If NOWARN is non-nil, warning messages about several potential problems will be suppressed." (setq filename (abbreviate-file-name (expand-file-name filename))) (if (file-directory-p filename) @@ -976,15 +977,15 @@ ; (if (or find-file-existing-other-name find-file-visit-truename) ; (setq buf (or same-truename same-number))) - (if (and buf - (or find-file-compare-truenames find-file-use-truenames) - (not nowarn)) - (save-excursion - (set-buffer buf) - (if (not (string-equal buffer-file-name filename)) - (message "%s and %s are the same file (%s)" - filename buffer-file-name - buffer-file-truename)))) + (when (and buf + (or find-file-compare-truenames find-file-use-truenames) + (not nowarn)) + (save-excursion + (set-buffer buf) + (if (not (string-equal buffer-file-name filename)) + (message "%s and %s are the same file (%s)" + filename buffer-file-name + buffer-file-truename)))) (if buf (or nowarn @@ -1008,6 +1009,7 @@ (save-excursion (set-buffer buf) (revert-buffer t t))))) + ;; Else: we must create a new buffer for filename (save-excursion ;;; The truename stuff makes this obsolete. ;;; (let* ((link-name (car (file-attributes filename))) @@ -1066,7 +1068,8 @@ (setq backup-inhibited t))) (if rawfile nil - (after-find-file error (not nowarn))))) + (after-find-file error (not nowarn)) + (setq buf (current-buffer))))) buf))) (defvar after-find-file-from-revert-buffer nil) @@ -1935,6 +1938,7 @@ "Given the name of a numeric backup file, return the backup number. Uses the free variable `bv-length', whose value should be the index in the name where the version number begins." + (declare (special bv-length)) (if (and (string-match "[0-9]+~\\'" fn bv-length) (= (match-beginning 0) bv-length)) (string-to-int (substring fn bv-length -1))