aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-10-04 14:22:41 +0200
committerLars Ingebrigtsen2019-10-04 14:30:21 +0200
commit280bdc06cefa6e72e91c9da362770452d9bbbbd4 (patch)
tree45d71339d206b3957bfa52617449f5dbaeb0b9f8
parent4df55f8f2fc5f73dec77582a03f1cc3c849c4836 (diff)
downloademacs-280bdc06cefa6e72e91c9da362770452d9bbbbd4.tar.gz
emacs-280bdc06cefa6e72e91c9da362770452d9bbbbd4.zip
Remove XEmacs compat code from idlw-shell.el
* lisp/progmodes/idlw-shell.el (idlwave-shell-make-temp-file): Make into obsolete alias. (idlwave-shell-temp-file): Adjust callers.
-rw-r--r--lisp/progmodes/idlw-shell.el29
1 files changed, 4 insertions, 25 deletions
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index e4f46bf8825..dde51b355e5 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -577,38 +577,17 @@ TYPE is either 'pro' or 'rinfo', and `idlwave-shell-temp-pro-file' or
577 ((eq type 'rinfo) 577 ((eq type 'rinfo)
578 (or idlwave-shell-temp-rinfo-save-file 578 (or idlwave-shell-temp-rinfo-save-file
579 (setq idlwave-shell-temp-rinfo-save-file 579 (setq idlwave-shell-temp-rinfo-save-file
580 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) 580 (make-temp-file idlwave-shell-temp-pro-prefix))))
581 ((eq type 'pro) 581 ((eq type 'pro)
582 (or idlwave-shell-temp-pro-file 582 (or idlwave-shell-temp-pro-file
583 (setq idlwave-shell-temp-pro-file 583 (setq idlwave-shell-temp-pro-file
584 (idlwave-shell-make-temp-file idlwave-shell-temp-pro-prefix)))) 584 (make-temp-file idlwave-shell-temp-pro-prefix))))
585 (t (error "Wrong argument (idlwave-shell-temp-file): %s" 585 (t (error "Wrong argument (idlwave-shell-temp-file): %s"
586 (symbol-name type))))) 586 (symbol-name type)))))
587 587
588 588
589(defun idlwave-shell-make-temp-file (prefix) 589(define-obsolete-function-alias 'idlwave-shell-make-temp-file
590 "Create a temporary file." 590 #'make-temp-file "27.1")
591 (if (featurep 'emacs)
592 (make-temp-file prefix)
593 (if (fboundp 'make-temp-file)
594 (make-temp-file prefix)
595 (let (file
596 (temp-file-dir (if (boundp 'temporary-file-directory)
597 temporary-file-directory
598 "/tmp")))
599 (while (condition-case ()
600 (progn
601 (setq file
602 (make-temp-name
603 (expand-file-name prefix temp-file-dir)))
604 (write-region "" nil file nil 'silent nil 'excl)
605 nil)
606 (file-already-exists t))
607 ;; the file was somehow created by someone else between
608 ;; `make-temp-name' and `write-region', let's try again.
609 nil)
610 file))))
611
612 591
613(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur" 592(defvar idlwave-shell-dirstack-query "cd,current=___cur & print,___cur"
614 "Command used by `idlwave-shell-resync-dirs' to query IDL for 593 "Command used by `idlwave-shell-resync-dirs' to query IDL for