commit c996fe1ec69de0082043397d4965d08cb94892fb (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Thu Mar 5 17:11:51 2020 -0800 Remove ancient OS X process-connection-type handling * src/process.c (init_process_emacs) [DARWIN_OS]: Remove process-connection-type special-casing for OS X < 10.3 (ie pre-2003). Ref https://lists.gnu.org/r/emacs-devel/2005-01/msg00741.html diff --git a/src/emacs.c b/src/emacs.c index 8b27c63f73..ea9c4cd79d 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1964,7 +1964,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem /* This calls putenv and so must precede init_process_emacs. */ init_timefns (); - /* This sets Voperating_system_release, which init_process_emacs uses. */ init_editfns (); /* These two call putenv. */ diff --git a/src/process.c b/src/process.c index 91d426103d..e4e5e57aee 100644 --- a/src/process.c +++ b/src/process.c @@ -8277,19 +8277,6 @@ init_process_emacs (int sockfd) memset (datagram_address, 0, sizeof datagram_address); #endif -#if defined (DARWIN_OS) - /* PTYs are broken on Darwin < 6, but are sometimes useful for interactive - processes. As such, we only change the default value. */ - if (initialized) - { - char const *release = (STRINGP (Voperating_system_release) - ? SSDATA (Voperating_system_release) - : 0); - if (!release || !release[0] || (release[0] < '7' && release[1] == '.')) { - Vprocess_connection_type = Qnil; - } - } -#endif #endif /* subprocesses */ kbd_is_on_hold = 0; } commit 7e8b8da9e30c8b3dcb2f7740406358e00a1a42f8 Author: Juri Linkov Date: Fri Mar 6 02:27:32 2020 +0200 Fix handling of empty input in describe-variable and describe-symbol * lisp/help-fns.el (describe-variable): Use 'user-error' like in 'describe-function'. (describe-symbol): Use empty string for arg SYMBOL when input is empty and there is no default value. This allows to signal the error "You didn't specify a function or variable" instead of displaying help about the symbol 'nil' on empty input. OTOH, still allows to see help about 'nil' when the input is "nil". diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 59eedb5331..cc00c722cc 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -944,7 +944,7 @@ it is displayed along with the global value." (unless (buffer-live-p buffer) (setq buffer (current-buffer))) (unless (frame-live-p frame) (setq frame (selected-frame))) (if (not (symbolp variable)) - (message "You did not specify a variable") + (user-error "You didn't specify a variable") (save-excursion (let ((valvoid (not (with-current-buffer buffer (boundp variable)))) val val-start-pos locus) @@ -1435,7 +1435,7 @@ current buffer and the selected frame, respectively." t nil nil (if found (symbol-name v-or-f))))) (list (if (equal val "") - v-or-f (intern val))))) + (or v-or-f "") (intern val))))) (if (not (symbolp symbol)) (user-error "You didn't specify a function or variable")) (unless (buffer-live-p buffer) (setq buffer (current-buffer))) commit 32261ed15bc4fb7b9d2cf955286aa21562d2fc8e Author: Juri Linkov Date: Fri Mar 6 02:19:00 2020 +0200 New command make-frame-on-current-monitor to use in windmove (bug#39875) * lisp/frame.el (make-frame-on-current-monitor): New command. * lisp/windmove.el (windmove-display-in-direction): Use make-frame-on-current-monitor for 'new-frame'. (windmove-display-new-frame): New command. (windmove-display-default-keybindings): Bind windmove-display-new-frame to 'f' key. * lisp/window.el (display-buffer-in-direction): Fix quotes in docstring. diff --git a/lisp/frame.el b/lisp/frame.el index 16ee7580f8..dc8dabc5a5 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -713,6 +713,18 @@ The optional argument PARAMETERS specifies additional frame parameters." (x-display-list)))) (make-frame (cons (cons 'display display) parameters))) +(defun make-frame-on-current-monitor (&optional parameters) + "Make a frame on the currently selected monitor. +Like `make-frame-on-monitor' and with the same PARAMETERS as in `make-frame'." + (interactive) + (let* ((monitor-workarea + (cdr (assq 'workarea (frame-monitor-attributes)))) + (geometry-parameters + (when monitor-workarea + `((top . ,(nth 1 monitor-workarea)) + (left . ,(nth 0 monitor-workarea)))))) + (make-frame (append geometry-parameters parameters)))) + (defun make-frame-on-monitor (monitor &optional display parameters) "Make a frame on monitor MONITOR. The optional argument DISPLAY can be a display name, and the optional diff --git a/lisp/windmove.el b/lisp/windmove.el index 40adb49e20..94d2b75210 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -474,6 +474,11 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (tab-bar-new-tab)) (setq type 'tab) (selected-window)) + ((eq dir 'new-frame) + (window--maybe-raise-frame + (make-frame-on-current-monitor pop-up-frame-alist)) + (setq type 'frame) + (selected-window)) ((eq dir 'same-window) (selected-window)) (t (window-in-direction @@ -541,6 +546,12 @@ See the logic of the prefix ARG in `windmove-display-in-direction'." (interactive "P") (windmove-display-in-direction 'same-window arg)) +;;;###autoload +(defun windmove-display-new-frame (&optional arg) + "Display the next buffer in a new frame." + (interactive "P") + (windmove-display-in-direction 'new-frame arg)) + ;;;###autoload (defun windmove-display-new-tab (&optional arg) "Display the next buffer in a new tab." @@ -562,6 +573,7 @@ Default value of MODIFIERS is `shift-meta'." (global-set-key (vector (append modifiers '(up))) 'windmove-display-up) (global-set-key (vector (append modifiers '(down))) 'windmove-display-down) (global-set-key (vector (append modifiers '(?0))) 'windmove-display-same-window) + (global-set-key (vector (append modifiers '(?f))) 'windmove-display-new-frame) (global-set-key (vector (append modifiers '(?t))) 'windmove-display-new-tab)) diff --git a/lisp/window.el b/lisp/window.el index b1a0294ae9..bbd4e9b6df 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7891,15 +7891,15 @@ Info node `(elisp) Buffer Display Action Alists' for details of such alists. ALIST has to contain a `direction' entry whose value should be -one of `left', `above' (or `up'), `right' and `below' (or -'down'). Other values are usually interpreted as `below'. +one of `left', `above' (or `up'), `right' and `below' (or `down'). +Other values are usually interpreted as `below'. If ALIST also contains a `window' entry, its value specifies a reference window. That value can be a special symbol like -'main' (which stands for the selected frame's main window) or -'root' (standings for the selected frame's root window) or an +`main' (which stands for the selected frame's main window) or +`root' (standings for the selected frame's root window) or an arbitrary valid window. Any other value (or omitting the -'window' entry) means to use the selected window as reference +`window' entry) means to use the selected window as reference window. This function tries to reuse or split a window such that the