Commits

Anonymous committed 66ab161

* ibuffer.el (ibuffer-make-temp-file): Use file-name-as-directory,
not convoluted brain-damage. Fix indentation.

Comments (0)

Files changed (2)

+2002-04-02  John Paul Wallington  <jpw@xemacs.org>
+
+	* ibuffer.el (ibuffer-make-temp-file): Use file-name-as-directory,
+	not convoluted brain-damage.  Fix indentation.
+
 2002-03-30  John Paul Wallington  <jpw@xemacs.org>
 
 	* ibuffer.el (ibuffer-make-temp-file): Use temp-directory, not 
   (if (fboundp 'make-temp-file)
       (defalias 'ibuffer-make-temp-file 'make-temp-file)
     (defun ibuffer-make-temp-file (prefix)
-	   "Create a temporary file.  DO NOT USE THIS FUNCTION.
+      "Create a temporary file.  DO NOT USE THIS FUNCTION.
 This function does not create files atomically, and is thus insecure."
-	   (let* ((tempdir (temp-directory))
-		  (dirsep (char-to-string directory-sep-char)))
-	     (unless (equal (substring tempdir (1- (length tempdir))) dirsep)
-	       (setq tempdir (concat tempdir dirsep)))
-	     (let ((name (concat tempdir (make-temp-name prefix))))
-	       (while (file-exists-p name)
-		 (setq name (concat tempdir (make-temp-name prefix))))
-	       (append-to-file (point-min) (point-min) name)
-	       name))))
+      (let* ((tempdir (file-name-as-directory (temp-directory)))
+	     (name (concat tempdir (make-temp-name prefix))))
+	(while (file-exists-p name)
+	  (setq name (concat tempdir (make-temp-name prefix))))
+	(append-to-file (point-min) (point-min) name)
+	name)))
 
   (if (fboundp 'propertize)
       (defalias 'ibuffer-propertize 'propertize)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.