aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2017-12-12 00:00:33 -0800
committerGlenn Morris2017-12-12 00:00:33 -0800
commit8c5be9cbaabc02f7c78f2bafb68e2e4ab35e130f (patch)
tree1fe185c91790c07567f20bd0e6fd53dae00f5eae
parentb585a2040148fb5d7f21ba8e51c731c594c64ef2 (diff)
downloademacs-8c5be9cbaabc02f7c78f2bafb68e2e4ab35e130f.tar.gz
emacs-8c5be9cbaabc02f7c78f2bafb68e2e4ab35e130f.zip
Make functions invocation-directory and invocation-name obsolete
* lisp/subr.el (invocation-directory, invocation-name): Mark the function versions as obsolete. (Bug#10476) * lisp/startup.el (tty-handle-args): * lisp/term/common-win.el (x-handle-xrm-switch, x-handle-name-switch): * lisp/term/ns-win.el (top-level): * lisp/term/pc-win.el (top-level): * lisp/term/w32-win.el (window-system-initialization): * lisp/term/x-win.el (top-level, x-handle-parent-id) (x-handle-smid, window-system-initialization): * test/lisp/htmlfontify-tests.el (htmlfontify-bug25468): Use invocation-directory and invocation-name as variables.
-rw-r--r--lisp/startup.el2
-rw-r--r--lisp/subr.el4
-rw-r--r--lisp/term/common-win.el4
-rw-r--r--lisp/term/ns-win.el2
-rw-r--r--lisp/term/pc-win.el2
-rw-r--r--lisp/term/w32-win.el4
-rw-r--r--lisp/term/x-win.el8
-rw-r--r--test/lisp/htmlfontify-tests.el2
8 files changed, 16 insertions, 12 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index a39c8f0fe76..4575f1f94d4 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -781,7 +781,7 @@ to prepare for opening the first frame (e.g. open a connection to an X server)."
781 argval 781 argval
782 (let ((case-fold-search t) 782 (let ((case-fold-search t)
783 i) 783 i)
784 (setq argval (invocation-name)) 784 (setq argval (copy-sequence invocation-name))
785 785
786 ;; Change any . or * characters in name to 786 ;; Change any . or * characters in name to
787 ;; hyphens, so as to emulate behavior on X. 787 ;; hyphens, so as to emulate behavior on X.
diff --git a/lisp/subr.el b/lisp/subr.el
index 7ec727ef19c..bf51c934cff 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1438,6 +1438,10 @@ be a list of the form returned by `event-start' and `event-end'."
1438(make-obsolete 'forward-point "use (+ (point) N) instead." "23.1") 1438(make-obsolete 'forward-point "use (+ (point) N) instead." "23.1")
1439(make-obsolete 'buffer-has-markers-at nil "24.3") 1439(make-obsolete 'buffer-has-markers-at nil "24.3")
1440 1440
1441(make-obsolete 'invocation-directory "use the variable of the same name."
1442 "27.1")
1443(make-obsolete 'invocation-name "use the variable of the same name." "27.1")
1444
1441;; bug#23850 1445;; bug#23850
1442(make-obsolete 'string-to-unibyte "use `encode-coding-string'." "26.1") 1446(make-obsolete 'string-to-unibyte "use `encode-coding-string'." "26.1")
1443(make-obsolete 'string-as-unibyte "use `encode-coding-string'." "26.1") 1447(make-obsolete 'string-as-unibyte "use `encode-coding-string'." "26.1")
diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el
index 2cf1e84768e..691009e7757 100644
--- a/lisp/term/common-win.el
+++ b/lisp/term/common-win.el
@@ -112,7 +112,7 @@
112;; Handle the -xrm option. 112;; Handle the -xrm option.
113(defun x-handle-xrm-switch (switch) 113(defun x-handle-xrm-switch (switch)
114 (unless (consp x-invocation-args) 114 (unless (consp x-invocation-args)
115 (error "%s: missing argument to `%s' option" (invocation-name) switch)) 115 (error "%s: missing argument to `%s' option" invocation-name switch))
116 (setq x-command-line-resources 116 (setq x-command-line-resources
117 (if (null x-command-line-resources) 117 (if (null x-command-line-resources)
118 (pop x-invocation-args) 118 (pop x-invocation-args)
@@ -152,7 +152,7 @@
152;; the initial frame, too. 152;; the initial frame, too.
153(defun x-handle-name-switch (switch) 153(defun x-handle-name-switch (switch)
154 (or (consp x-invocation-args) 154 (or (consp x-invocation-args)
155 (error "%s: missing argument to `%s' option" (invocation-name) switch)) 155 (error "%s: missing argument to `%s' option" invocation-name switch))
156 (setq x-resource-name (pop x-invocation-args) 156 (setq x-resource-name (pop x-invocation-args)
157 initial-frame-alist (cons (cons 'name x-resource-name) 157 initial-frame-alist (cons (cons 'name x-resource-name)
158 initial-frame-alist))) 158 initial-frame-alist)))
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index e895d09bb4f..82041a665d5 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -42,7 +42,7 @@
42(eval-when-compile (require 'cl-lib)) 42(eval-when-compile (require 'cl-lib))
43(or (featurep 'ns) 43(or (featurep 'ns)
44 (error "%s: Loading ns-win.el but not compiled for GNUstep/macOS" 44 (error "%s: Loading ns-win.el but not compiled for GNUstep/macOS"
45 (invocation-name))) 45 invocation-name))
46 46
47;; Documentation-purposes only: actually loaded in loadup.el. 47;; Documentation-purposes only: actually loaded in loadup.el.
48(require 'frame) 48(require 'frame)
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 0355350da72..0d1c843e893 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -38,7 +38,7 @@
38 38
39(if (not (fboundp 'msdos-remember-default-colors)) 39(if (not (fboundp 'msdos-remember-default-colors))
40 (error "%s: Loading pc-win.el but not compiled for MS-DOS" 40 (error "%s: Loading pc-win.el but not compiled for MS-DOS"
41 (invocation-name))) 41 invocation-name))
42 42
43(declare-function msdos-remember-default-colors "msdos.c") 43(declare-function msdos-remember-default-colors "msdos.c")
44(declare-function w16-set-clipboard-data "w16select.c") 44(declare-function w16-set-clipboard-data "w16select.c")
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 1db90aec984..737bf7fb5df 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -66,7 +66,7 @@
66;; ../startup.el. 66;; ../startup.el.
67 67
68;; (if (not (eq window-system 'w32)) 68;; (if (not (eq window-system 'w32))
69;; (error "%s: Loading w32-win.el but not compiled for w32" (invocation-name))) 69;; (error "%s: Loading w32-win.el but not compiled for w32" invocation-name))
70 70
71(eval-when-compile (require 'cl-lib)) 71(eval-when-compile (require 'cl-lib))
72(require 'frame) 72(require 'frame)
@@ -310,7 +310,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
310 (setq x-resource-name 310 (setq x-resource-name
311 ;; Change any . or * characters in x-resource-name to hyphens, 311 ;; Change any . or * characters in x-resource-name to hyphens,
312 ;; so as not to choke when we use it in X resource queries. 312 ;; so as not to choke when we use it in X resource queries.
313 (replace-regexp-in-string "[.*]" "-" (invocation-name)))) 313 (replace-regexp-in-string "[.*]" "-" invocation-name)))
314 314
315 (x-open-connection "w32" x-command-line-resources 315 (x-open-connection "w32" x-command-line-resources
316 ;; Exit with a fatal error if this fails and we 316 ;; Exit with a fatal error if this fails and we
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index e7b1e08b038..52ab746112a 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -69,7 +69,7 @@
69(eval-when-compile (require 'cl-lib)) 69(eval-when-compile (require 'cl-lib))
70 70
71(if (not (fboundp 'x-create-frame)) 71(if (not (fboundp 'x-create-frame))
72 (error "%s: Loading x-win.el but not compiled for X" (invocation-name))) 72 (error "%s: Loading x-win.el but not compiled for X" invocation-name))
73 73
74(require 'term/common-win) 74(require 'term/common-win)
75(require 'frame) 75(require 'frame)
@@ -93,7 +93,7 @@
93;; Handle the --parent-id option. 93;; Handle the --parent-id option.
94(defun x-handle-parent-id (switch) 94(defun x-handle-parent-id (switch)
95 (or (consp x-invocation-args) 95 (or (consp x-invocation-args)
96 (error "%s: missing argument to `%s' option" (invocation-name) switch)) 96 (error "%s: missing argument to `%s' option" invocation-name switch))
97 (setq initial-frame-alist (cons 97 (setq initial-frame-alist (cons
98 (cons 'parent-id 98 (cons 'parent-id
99 (string-to-number (car x-invocation-args))) 99 (string-to-number (car x-invocation-args)))
@@ -104,7 +104,7 @@
104;; to give us back our session id we had on the previous run. 104;; to give us back our session id we had on the previous run.
105(defun x-handle-smid (switch) 105(defun x-handle-smid (switch)
106 (or (consp x-invocation-args) 106 (or (consp x-invocation-args)
107 (error "%s: missing argument to `%s' option" (invocation-name) switch)) 107 (error "%s: missing argument to `%s' option" invocation-name switch))
108 (setq x-session-previous-id (car x-invocation-args) 108 (setq x-session-previous-id (car x-invocation-args)
109 x-invocation-args (cdr x-invocation-args))) 109 x-invocation-args (cdr x-invocation-args)))
110 110
@@ -1205,7 +1205,7 @@ This returns an error if any Emacs frames are X frames."
1205 ;; Make sure we have a valid resource name. 1205 ;; Make sure we have a valid resource name.
1206 (or (stringp x-resource-name) 1206 (or (stringp x-resource-name)
1207 (let (i) 1207 (let (i)
1208 (setq x-resource-name (invocation-name)) 1208 (setq x-resource-name (copy-sequence invocation-name))
1209 1209
1210 ;; Change any . or * characters in x-resource-name to hyphens, 1210 ;; Change any . or * characters in x-resource-name to hyphens,
1211 ;; so as not to choke when we use it in X resource queries. 1211 ;; so as not to choke when we use it in X resource queries.
diff --git a/test/lisp/htmlfontify-tests.el b/test/lisp/htmlfontify-tests.el
index 0ad775d74a0..614f2a18d8c 100644
--- a/test/lisp/htmlfontify-tests.el
+++ b/test/lisp/htmlfontify-tests.el
@@ -36,7 +36,7 @@ available (Bug#25468)."
36 (should (equal (let ((process-environment 36 (should (equal (let ((process-environment
37 (cons "SHELL=/does/not/exist" process-environment))) 37 (cons "SHELL=/does/not/exist" process-environment)))
38 (call-process 38 (call-process
39 (expand-file-name (invocation-name) (invocation-directory)) 39 (expand-file-name invocation-name invocation-directory)
40 nil nil nil 40 nil nil nil
41 "--quick" "--batch" 41 "--quick" "--batch"
42 (concat "--load=" (locate-library "htmlfontify")))) 42 (concat "--load=" (locate-library "htmlfontify"))))