commit 8c5be9cbaabc02f7c78f2bafb68e2e4ab35e130f (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Tue Dec 12 00:00:33 2017 -0800 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. diff --git a/lisp/startup.el b/lisp/startup.el index a39c8f0fe7..4575f1f94d 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)." argval (let ((case-fold-search t) i) - (setq argval (invocation-name)) + (setq argval (copy-sequence invocation-name)) ;; Change any . or * characters in name to ;; hyphens, so as to emulate behavior on X. diff --git a/lisp/subr.el b/lisp/subr.el index 7ec727ef19..bf51c934cf 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'." (make-obsolete 'forward-point "use (+ (point) N) instead." "23.1") (make-obsolete 'buffer-has-markers-at nil "24.3") +(make-obsolete 'invocation-directory "use the variable of the same name." + "27.1") +(make-obsolete 'invocation-name "use the variable of the same name." "27.1") + ;; bug#23850 (make-obsolete 'string-to-unibyte "use `encode-coding-string'." "26.1") (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 2cf1e84768..691009e775 100644 --- a/lisp/term/common-win.el +++ b/lisp/term/common-win.el @@ -112,7 +112,7 @@ ;; Handle the -xrm option. (defun x-handle-xrm-switch (switch) (unless (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to `%s' option" invocation-name switch)) (setq x-command-line-resources (if (null x-command-line-resources) (pop x-invocation-args) @@ -152,7 +152,7 @@ ;; the initial frame, too. (defun x-handle-name-switch (switch) (or (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to `%s' option" invocation-name switch)) (setq x-resource-name (pop x-invocation-args) initial-frame-alist (cons (cons 'name x-resource-name) initial-frame-alist))) diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index e895d09bb4..82041a665d 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -42,7 +42,7 @@ (eval-when-compile (require 'cl-lib)) (or (featurep 'ns) (error "%s: Loading ns-win.el but not compiled for GNUstep/macOS" - (invocation-name))) + invocation-name)) ;; Documentation-purposes only: actually loaded in loadup.el. (require 'frame) diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 0355350da7..0d1c843e89 100644 --- a/lisp/term/pc-win.el +++ b/lisp/term/pc-win.el @@ -38,7 +38,7 @@ (if (not (fboundp 'msdos-remember-default-colors)) (error "%s: Loading pc-win.el but not compiled for MS-DOS" - (invocation-name))) + invocation-name)) (declare-function msdos-remember-default-colors "msdos.c") (declare-function w16-set-clipboard-data "w16select.c") diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 1db90aec98..737bf7fb5d 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -66,7 +66,7 @@ ;; ../startup.el. ;; (if (not (eq window-system 'w32)) -;; (error "%s: Loading w32-win.el but not compiled for w32" (invocation-name))) +;; (error "%s: Loading w32-win.el but not compiled for w32" invocation-name)) (eval-when-compile (require 'cl-lib)) (require 'frame) @@ -310,7 +310,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") (setq x-resource-name ;; Change any . or * characters in x-resource-name to hyphens, ;; so as not to choke when we use it in X resource queries. - (replace-regexp-in-string "[.*]" "-" (invocation-name)))) + (replace-regexp-in-string "[.*]" "-" invocation-name))) (x-open-connection "w32" x-command-line-resources ;; 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 e7b1e08b03..52ab746112 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -69,7 +69,7 @@ (eval-when-compile (require 'cl-lib)) (if (not (fboundp 'x-create-frame)) - (error "%s: Loading x-win.el but not compiled for X" (invocation-name))) + (error "%s: Loading x-win.el but not compiled for X" invocation-name)) (require 'term/common-win) (require 'frame) @@ -93,7 +93,7 @@ ;; Handle the --parent-id option. (defun x-handle-parent-id (switch) (or (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to `%s' option" invocation-name switch)) (setq initial-frame-alist (cons (cons 'parent-id (string-to-number (car x-invocation-args))) @@ -104,7 +104,7 @@ ;; to give us back our session id we had on the previous run. (defun x-handle-smid (switch) (or (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to `%s' option" invocation-name switch)) (setq x-session-previous-id (car x-invocation-args) x-invocation-args (cdr x-invocation-args))) @@ -1205,7 +1205,7 @@ This returns an error if any Emacs frames are X frames." ;; Make sure we have a valid resource name. (or (stringp x-resource-name) (let (i) - (setq x-resource-name (invocation-name)) + (setq x-resource-name (copy-sequence invocation-name)) ;; Change any . or * characters in x-resource-name to hyphens, ;; 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 0ad775d74a..614f2a18d8 100644 --- a/test/lisp/htmlfontify-tests.el +++ b/test/lisp/htmlfontify-tests.el @@ -36,7 +36,7 @@ available (Bug#25468)." (should (equal (let ((process-environment (cons "SHELL=/does/not/exist" process-environment))) (call-process - (expand-file-name (invocation-name) (invocation-directory)) + (expand-file-name invocation-name invocation-directory) nil nil nil "--quick" "--batch" (concat "--load=" (locate-library "htmlfontify")))) commit b585a2040148fb5d7f21ba8e51c731c594c64ef2 Author: Glenn Morris Date: Mon Dec 11 21:17:55 2017 -0500 * lisp/mail/emacsbug.el (report-emacs-bug): Try "sw_vers" on Darwin. diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 92f3965936..667b6f39ab 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -232,13 +232,32 @@ usually do not have translators for other languages.\n\n"))) "', version " (mapconcat 'number-to-string (x-server-version) ".") "\n") (error t))) - (let ((lsb (with-temp-buffer - (if (eq 0 (ignore-errors - (call-process "lsb_release" nil '(t nil) - nil "-d"))) - (buffer-string))))) - (if (stringp lsb) - (insert "System " lsb "\n"))) + (let (os) + ;; Maybe this should be factored out in a standalone function, + ;; eg emacs-os-description. + (cond ((eq system-type 'darwin) + (with-temp-buffer + (when (eq 0 (ignore-errors + (call-process "sw_vers" nil '(t nil) nil))) + (dolist (s '("ProductName" "ProductVersion")) + (goto-char (point-min)) + (if (re-search-forward (format "^%s\\s-*:\\s-+\\(.*\\)$" s) + nil t) + (setq os (concat os " " (match-string 1)))))))) + ;; TODO include other branches here. + ;; MS Windows: systeminfo ? + ;; Cygwin, *BSD, etc: ? + (t + (with-temp-buffer + (when (eq 0 (ignore-errors + (call-process "lsb_release" nil '(t nil) + nil "-d"))) + (goto-char (point-min)) + (if (looking-at "^\\sw+:\\s-+") + (goto-char (match-end 0))) + (setq os (buffer-substring (point) (line-end-position))))))) + (if (stringp os) + (insert "System Description: " os "\n\n"))) (let ((message-buf (get-buffer "*Messages*"))) (if message-buf (let (beg-pos commit 2714a18fb20b6707184a4c73e05dd5e3a4494882 Author: Rasmus Date: Wed Dec 6 15:24:22 2017 +0100 ; NEWS: Update Org version number (cherry picked from commit cb3d979b740d163088610067a5eec87c0d34fea9) diff --git a/etc/NEWS.26 b/etc/NEWS.26 index 4ccf468693..64b53d88c8 100644 --- a/etc/NEWS.26 +++ b/etc/NEWS.26 @@ -626,7 +626,7 @@ state to take effect (making a frame visible, for example). * Changes in Specialized Modes and Packages in Emacs 26.1 --- -** Emacs 26.1 comes with Org v9.1.2. +** Emacs 26.1 comes with Org v9.1.4. See the file ORG-NEWS for user-visible changes in Org. --- commit 1ef8e28cf8d2f42c9cef3dac8dccb283508ac481 Author: Glenn Morris Date: Mon Dec 11 13:25:41 2017 -0500 * admin/gitmerge.el (gitmerge-resolve): Disable buggy NEWS handling. diff --git a/admin/gitmerge.el b/admin/gitmerge.el index 69f48b877a..eddc72e679 100644 --- a/admin/gitmerge.el +++ b/admin/gitmerge.el @@ -316,7 +316,11 @@ Returns non-nil if conflicts remain." (gitmerge-emacs-version gitmerge--from)))) (file-exists-p temp) (or noninteractive - (y-or-n-p "Try to fix NEWS conflict? "))) + (and + (y-or-n-p "Try to fix NEWS conflict? ") + ;; FIXME + (y-or-n-p "This is buggy, really try? ") + ))) (let ((relfile (file-name-nondirectory file)) (tempfile (make-temp-file "gitmerge"))) (unwind-protect