CVS update by stephent xemacs/src ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Tue Nov 21 21:20:44 EST 2006


  User: stephent
  Date: 06/11/22 03:20:44

  Modified:    xemacs/src ChangeLog buffer.c
Log:
Update buffer-file-truename with buffer-file-name in info.el.
Document invariant. <874pssmen5.fsf at uwakimon.sk.tsukuba.ac.jp>

Revision  Changes    Path
1.771     +8 -0      XEmacs/xemacs/lisp/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.770
retrieving revision 1.771
diff -u -p -r1.770 -r1.771
--- ChangeLog	2006/11/15 21:39:51	1.770
+++ ChangeLog	2006/11/22 02:20:20	1.771
@@ -1,3 +1,11 @@
+2006-11-14  Stephen J. Turnbull  <stephen at xemacs.org>
+
+	* info.el (Info-find-file-node, Info-insert-dir)
+	(Info-read-subfile, Info-insert-file-contents): Maintain invariant
+	`(equal buffer-file-truename (file-truename buffer-file-name))'.
+	Thanks to Nelson Ferreira <nelson.ferreira at ieee.org> for report
+	and discussion.
+
 2006-11-15  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* mule/mule-charset.el:



1.36      +8 -4      XEmacs/xemacs/lisp/info.el

Index: info.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/info.el,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- info.el	2006/10/15 00:50:52	1.35
+++ info.el	2006/11/22 02:20:22	1.36
@@ -717,7 +717,8 @@ node of a file of this name."
 		    ;; Nooooooooooo!  Info-index can extend across more
 		    ;; than one file (e.g. XEmacs, Lispref)
 		    ;; Info-index-alternatives nil
-		    buffer-file-name nil)
+		    buffer-file-name nil
+		    buffer-file-truename nil)
 	      (erase-buffer)
 	      (if (string= "dir" (file-name-nondirectory filename))
 		  (Info-insert-dir)
@@ -1052,7 +1053,8 @@ actually get any text from."
       (message "Composing main Info directory...done"))
     (setq Info-dir-contents (buffer-string)))
   (setq default-directory (file-name-as-directory Info-dir-contents-directory))
-  (setq buffer-file-name (caar Info-dir-file-attributes)))
+  (setq buffer-file-name (caar Info-dir-file-attributes)
+	buffer-file-truename (file-truename buffer-file-name)))
 
 (defmacro Info-directory-files (dir-file &optional all full nosort files-only)
   "Return a list of Info files living in the same directory as DIR-FILE.
@@ -1423,7 +1425,8 @@ invoke \"xemacs -batch -f Info-batch-reb
 	    (throw 'foo t)))))
     (or (equal Info-current-subfile lastfilename)
 	(let ((buffer-read-only nil))
-	  (setq buffer-file-name nil)
+	  (setq buffer-file-name nil
+		buffer-file-truename nil)
 	  (widen)
 	  (erase-buffer)
 	  (Info-insert-file-contents (Info-suffixed-file
@@ -1531,7 +1534,8 @@ versions of NAME. Only the suffixes are 
 	  (call-process shell-file-name nil t nil shell-command-switch command)
 	  (message "")
 	  (when visit
-	    (setq buffer-file-name file)
+	    (setq buffer-file-name file
+		  buffer-file-truename (file-truename buffer-file-name))
 	    (set-buffer-modified-p nil)
 	    (clear-visited-file-modtime)))
       (insert-file-contents file visit))))



1.1016    +7 -0      XEmacs/xemacs/src/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1015
retrieving revision 1.1016
diff -u -p -r1.1015 -r1.1016
--- ChangeLog	2006/11/20 19:21:47	1.1015
+++ ChangeLog	2006/11/22 02:20:31	1.1016
@@ -1,3 +1,10 @@
+2006-11-14  Stephen J. Turnbull  <stephen at xemacs.org>
+
+	* buffer.c (buffer-file-name): Document invariant.
+	(buffer-file-truename): Sync wording to buffer-file-name.
+	Thanks to Nelson Ferreira <nelson.ferreira at ieee.org> for report
+	and discussion.
+
 2006-11-20  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* mule-ccl.c (CCL_MAKE_CHAR):



1.77      +7 -6      XEmacs/xemacs/src/buffer.c

Index: buffer.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/buffer.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- buffer.c	2006/02/27 16:29:22	1.76
+++ buffer.c	2006/11/22 02:20:34	1.77
@@ -2635,6 +2635,8 @@ It may not be a list of functions.
   DEFVAR_BUFFER_LOCAL ("buffer-file-name", filename /*
 Name of file visited in current buffer, or nil if not visiting a file.
 Each buffer has its own value of this variable.
+Code that changes this variable must maintain the invariant
+`(equal buffer-file-truename (file-truename buffer-file-name))'.
 */ );
 
 #if 0 /* FSFmacs */
@@ -2647,12 +2649,11 @@ Each buffer has its own value of this va
 #endif /* FSFmacs */
 
   DEFVAR_BUFFER_LOCAL ("buffer-file-truename", file_truename /*
-The real name of the file visited in the current buffer,
-or nil if not visiting a file.  This is the result of passing
-buffer-file-name to the `file-truename' function.  Every buffer has
-its own value of this variable.  This variable is automatically
-maintained by the functions that change the file name associated
-with a buffer.
+The real name of the file visited in the current buffer, or nil if not
+visiting a file.  This is the result of passing `buffer-file-name' to the
+`file-truename' function.  Every buffer has its own value of this variable.
+Code that changes the file name associated with a buffer maintains the
+invariant `(equal buffer-file-truename (file-truename buffer-file-name))'.
 */ );
 
   DEFVAR_BUFFER_LOCAL ("buffer-auto-save-file-name", auto_save_file_name /*





More information about the XEmacs-CVS mailing list