]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove XEmacs compat code from idlw-shell.el
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 4 Oct 2019 12:22:41 +0000 (14:22 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 4 Oct 2019 12:30:21 +0000 (14:30 +0200)
* lisp/progmodes/idlw-shell.el (idlwave-shell-make-temp-file):
Make into obsolete alias.
(idlwave-shell-temp-file): Adjust callers.

lisp/progmodes/idlw-shell.el

index e4f46bf8825db666e39a12bddc783bb50864c368..dde51b355e5c07c681c4a8b82310df7b624320aa 100644 (file)
@@ -577,38 +577,17 @@ TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
    ((eq type 'rinfo)
     (or idlwave-shell-temp-rinfo-save-file
        (setq idlwave-shell-temp-rinfo-save-file
-             (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
+             (make-temp-file idlwave-shell-temp-pro-prefix))))
    ((eq type 'pro)
     (or idlwave-shell-temp-pro-file
        (setq idlwave-shell-temp-pro-file
-             (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix))))
+             (make-temp-file idlwave-shell-temp-pro-prefix))))
    (t (error "Wrong argument (idlwave-shell-temp-file): %s"
             (symbol-name type)))))
 
 
-(defun idlwave-shell-make-temp-file (prefix)
-  "Create a temporary file."
-  (if (featurep 'emacs)
-      (make-temp-file prefix)
-    (if (fboundp 'make-temp-file)
-       (make-temp-file prefix)
-      (let (file
-           (temp-file-dir (if (boundp 'temporary-file-directory)
-                              temporary-file-directory
-                            "/tmp")))
-       (while (condition-case ()
-                  (progn
-                    (setq file
-                          (make-temp-name
-                           (expand-file-name prefix temp-file-dir)))
-                    (write-region "" nil file nil 'silent nil 'excl)
-                    nil)
-                (file-already-exists t))
-         ;; the file was somehow created by someone else between
-         ;; `make-temp-name' and `write-region', let's try again.
-         nil)
-       file))))
-
+(define-obsolete-function-alias 'idlwave-shell-make-temp-file
+  #'make-temp-file "27.1")
 
 (defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
   "Command used by `idlwave-shell-resync-dirs' to query IDL for