commit 1854511e97843e028a76cd5a6d8fee74cfabd3d1 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Thu Oct 3 04:08:11 2019 +0200 Don't use obsolete name in em-cmpl.el * lisp/eshell/em-cmpl.el (eshell-complete-lisp-symbol): Update reference to 'elisp-completion-at-point' from its obsolete name. Reported by Carlos Pita . (Bug#31906) diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index df4e24c88b..7f20314258 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -241,7 +241,7 @@ to writing a completion function." (defun eshell-complete-lisp-symbol () "Try to complete the text around point as a Lisp symbol." (interactive) - (let ((completion-at-point-functions '(lisp-completion-at-point))) + (let ((completion-at-point-functions '(elisp-completion-at-point))) (completion-at-point))) (defvar eshell-cmpl-mode-map commit 52ab9485107919771d3627b93c8a996563b34abd Author: Juri Linkov Date: Wed Oct 2 23:18:01 2019 +0300 * lisp/tab-bar.el (tab-bar-show): New defcustom. * lisp/tab-bar.el (tab-bar-close-current-tab, tab-bar-close-tab): (tab-bar-new-tab): Use tab-bar-show. * doc/emacs/frames.texi (Tab Bars): Add tab-bar-show. * lisp/speedbar.el (speedbar-mode): Set buffer-local tab-bar-mode and tab-line-format to nil to not show in dedicated speedbar frame. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 0003881fad..0cb9c4eb1d 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -1242,6 +1242,19 @@ command applies to all frames, including frames yet to be created. To control the use of tab bars at startup, customize the variable @code{tab-bar-mode}. +@vindex tab-bar-show +@cindex Tab Bar show + This variable is intended to toggle the tab bar automatically. +When the value is @code{t}, then @code{tab-bar-mode} is enabled when +using the commands that create new window configurations. The value +@code{1} hides the tab bar when it has only one tab, and shows it +again once more tabs are created. If @code{nil}, always keep the tab +bar hidden. In this case it's still possible to use persistent named +window configurations without using the tab bar by relying on keyboard +commands that create a new window configuration (@kbd{M-x tab-new}), +that switch windows configurations (@kbd{M-x tab-next}, @kbd{M-x +tab-list}), or delete the existing ones (@kbd{M-x tab-close}). + @vindex tab-bar-new-tab-choice @cindex Tab Bar new tab By default, Emacs follows the same behavior as when creating frames, diff --git a/lisp/speedbar.el b/lisp/speedbar.el index e4e6734994..addb2b42bb 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1115,7 +1115,9 @@ in the selected file. (setq dframe-track-mouse-function #'speedbar-track-mouse)) (setq dframe-help-echo-function #'speedbar-item-info dframe-mouse-click-function #'speedbar-click - dframe-mouse-position-function #'speedbar-position-cursor-on-line)) + dframe-mouse-position-function #'speedbar-position-cursor-on-line) + (setq-local tab-bar-mode nil) + (setq-local tab-line-format nil)) speedbar-buffer) (define-obsolete-function-alias 'speedbar-message 'dframe-message "24.4") diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 42d40a9654..6d2c915aa6 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -96,9 +96,9 @@ (assq-delete-all 'tab-bar-lines default-frame-alist))))) (when tab-bar-mode - (global-set-key [(control shift iso-lefttab)] 'tab-bar-switch-to-prev-tab) - (global-set-key [(control shift tab)] 'tab-bar-switch-to-prev-tab) - (global-set-key [(control tab)] 'tab-bar-switch-to-next-tab))) + (global-set-key [(control shift iso-lefttab)] 'tab-previous) + (global-set-key [(control shift tab)] 'tab-previous) + (global-set-key [(control tab)] 'tab-next))) (defun tab-bar-handle-mouse (event) "Text-mode emulation of switching tabs on the tab bar. @@ -152,6 +152,28 @@ Its main job is to show tabs in the tab bar." (puthash key tab-bar-map tab-bar-keymap-cache))))) +(defcustom tab-bar-show t + "Defines when to show the tab bar. +If t, enable `tab-bar-mode' automatically on using the commands that +create new window configurations (e.g. `tab-new'). +If the value is `1', then hide the tab bar when it has only one tab, +and show it again once more tabs are created. +If nil, always keep the tab bar hidden. In this case it's still +possible to use persistent named window configurations by relying on +keyboard commands `tab-list', `tab-new', `tab-close', `tab-next', etc." + :type '(choice (const :tag "Always" t) + (const :tag "When more than one tab" 1) + (const :tag "Never" nil)) + :initialize 'custom-initialize-default + :set (lambda (sym val) + (set-default sym val) + (tab-bar-mode + (if (or (eq val t) + (and (natnump val) (> (length (tab-bar-tabs)) val))) + 1 -1))) + :group 'tab-bar + :version "27.1") + (defcustom tab-bar-new-tab-choice t "Defines what to show in a new tab. If t, start a new tab with the current buffer, i.e. the buffer @@ -192,8 +214,9 @@ If nil, don't show it at all." (const :tag "On selected tab" selected) (const :tag "On non-selected tabs" non-selected) (const :tag "None" nil)) + :initialize 'custom-initialize-default :set (lambda (sym val) - (set sym val) + (set-default sym val) (force-mode-line-update)) :group 'tab-bar :version "27.1") @@ -354,7 +377,8 @@ Return its existing value or a new value." ((eq (car (car tabs)) 'current-tab) (setcar tabs new-tab))) (setq tabs (cdr tabs))) - (force-mode-line-update)))) + (when tab-bar-mode + (force-mode-line-update))))) (defun tab-bar-switch-to-prev-tab (&optional _arg) "Switch to ARGth previous tab." @@ -389,11 +413,14 @@ If `rightmost', create as the last tab." (defun tab-bar-new-tab () "Clone the current tab to the position specified by `tab-bar-new-tab-to'." (interactive) - (unless tab-bar-mode - (tab-bar-mode 1)) (let* ((tabs (tab-bar-tabs)) ;; (i-tab (- (length tabs) (length (memq tab tabs)))) (new-tab (tab-bar-tab-default))) + (when (and (not tab-bar-mode) + (or (eq tab-bar-show t) + (and (natnump tab-bar-show) + (>= (length tabs) tab-bar-show)))) + (tab-bar-mode 1)) (cond ((eq tab-bar-new-tab-to 'leftmost) (setq tabs (cons new-tab tabs))) @@ -415,6 +442,9 @@ If `rightmost', create as the last tab." (tab-bar-select-tab new-tab) (when tab-bar-new-tab-choice (delete-other-windows) + ;; Create a new window to get rid of old window parameters + ;; (e.g. prev/next buffers) of old window. + (split-window) (delete-window) (let ((buffer (if (functionp tab-bar-new-tab-choice) (funcall tab-bar-new-tab-choice) @@ -463,6 +493,10 @@ if its value is provided." (setq tabs (delq tab tabs) i-select (max 0 (min (1- (length tabs)) i-select)) select-tab (nth i-select tabs)))) + (when (and tab-bar-mode + (and (natnump tab-bar-show) + (<= (length tabs) tab-bar-show))) + (tab-bar-mode -1)) (set-frame-parameter nil 'tabs tabs) (tab-bar-select-tab select-tab))) @@ -474,9 +508,15 @@ specified by `tab-bar-close-tab-select'." (when tab (if (eq (car tab) 'current-tab) (tab-bar-close-current-tab tab) - ;; Close non-current tab, no need to switch to another tab - (set-frame-parameter nil 'tabs (delq tab (tab-bar-tabs))) - (force-mode-line-update)))) + (let ((tabs (tab-bar-tabs))) + ;; Close non-current tab, no need to switch to another tab + (when (and tab-bar-mode + (and (natnump tab-bar-show) + (<= (length tabs) tab-bar-show))) + (tab-bar-mode -1)) + (set-frame-parameter nil 'tabs (delq tab tabs)) + (when tab-bar-mode + (force-mode-line-update)))))) ;;; Non-graphical access to frame-local tabs (named window configurations) @@ -733,7 +773,8 @@ in the selected frame." Like \\[switch-to-buffer-other-frame] (which see), but creates a new tab." (interactive (list (read-buffer-to-switch "Switch to buffer in other tab: "))) - (tab-bar-new-tab) + (let ((tab-bar-new-tab-choice t)) + (tab-bar-new-tab)) (delete-other-windows) (switch-to-buffer buffer-or-name norecord)) @@ -752,8 +793,8 @@ Like \\[find-file-other-frame] (which see), but creates a new tab." value) (switch-to-buffer-other-tab value)))) -(define-key ctl-x-6-map "2" 'tab-bar-new-tab) -(define-key ctl-x-6-map "0" 'tab-bar-close-current-tab) +(define-key ctl-x-6-map "2" 'tab-new) +(define-key ctl-x-6-map "0" 'tab-close) (define-key ctl-x-6-map "b" 'switch-to-buffer-other-tab) (define-key ctl-x-6-map "f" 'find-file-other-tab) (define-key ctl-x-6-map "\C-f" 'find-file-other-tab) diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 62e06a797d..b552df9ba5 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -147,8 +147,9 @@ If nil, don't show it at all." (const :tag "On selected tab" selected) (const :tag "On non-selected tabs" non-selected) (const :tag "None" nil)) + :initialize 'custom-initialize-default :set (lambda (sym val) - (set sym val) + (set-default sym val) (force-mode-line-update)) :group 'tab-line :version "27.1") commit 5eb2477be214d379128a5527f67e0f7afcc4499b Author: Juri Linkov Date: Wed Oct 2 22:54:56 2019 +0300 * src/w32inevt.c: Take into account FRAME_TAB_BAR_LINES. * src/w32inevt.c (resize_event, maybe_generate_resize_event): Subtract FRAME_TAB_BAR_LINES from FRAME_MENU_BAR_LINES. diff --git a/src/w32inevt.c b/src/w32inevt.c index 2b6979bda2..0a1321c6d8 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -596,7 +596,8 @@ resize_event (WINDOW_BUFFER_SIZE_RECORD *event) struct frame *f = get_frame (); change_frame_size (f, event->dwSize.X, event->dwSize.Y - - FRAME_MENU_BAR_LINES (f), 0, 1, 0, 0); + - FRAME_MENU_BAR_LINES (f) + - FRAME_TAB_BAR_LINES (f), 0, 1, 0, 0); SET_FRAME_GARBAGED (f); } @@ -613,7 +614,8 @@ maybe_generate_resize_event (void) change_frame_size (f, 1 + info.srWindow.Right - info.srWindow.Left, 1 + info.srWindow.Bottom - info.srWindow.Top - - FRAME_MENU_BAR_LINES (f), 0, 1, 0, 0); + - FRAME_MENU_BAR_LINES (f) + - FRAME_TAB_BAR_LINES (f), 0, 1, 0, 0); } #if HAVE_W32NOTIFY commit 6a1a87f49cda307da8efb854030b520e8c7995ba Author: Eli Zaretskii Date: Wed Oct 2 19:42:43 2019 +0300 Fix MS-Windows error when a directory on PATH doesn't exist * src/w32.c (faccessat): Support more MS-Windows native error codes that should be translated to ENOENT. (Bug#37576) diff --git a/src/w32.c b/src/w32.c index 88e9aef338..55e471f14c 100644 --- a/src/w32.c +++ b/src/w32.c @@ -4062,7 +4062,11 @@ faccessat (int dirfd, const char * path, int mode, int flags) /* FALLTHROUGH */ FALLTHROUGH; case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + case ERROR_INVALID_DRIVE: + case ERROR_NOT_READY: case ERROR_BAD_NETPATH: + case ERROR_BAD_NET_NAME: errno = ENOENT; break; default: commit 9cd3b50ca869e6a91668eb8bbc2a44617294b85c Author: Stefan Kangas Date: Wed Oct 2 15:25:57 2019 +0200 Don't mention server-socket-dir in FAQ server-socket-dir is a defvar, and users should use the defcustom server-name instead. * doc/misc/efaq.texi (Using an already running Emacs process): Remove details on server-socket-dir, refer to Emacs Manual. (Bug#20675) diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 219ad248cc..5a81fc0094 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -1990,19 +1990,6 @@ or by invoking @code{server-start} from @file{.emacs}: (if (@var{some conditions are met}) (server-start)) @end lisp -When this is done, Emacs by default creates a Unix domain socket named -@file{server} in a well-known directory, typically -@file{$XDG_RUNTIME_DIR/emacs} if Emacs is running under an X Window System -desktop and @file{$TMPDIR/emacs@var{userid}} otherwise. See the variable -@code{server-socket-dir}. Traditionally, Emacs used -@file{$TMPDIR/emacs@var{userid}} even when running under an X desktop; -if you prefer this traditional (and less-secure) behavior, you -can set the environment variable @env{EMACS_SOCKET_NAME} to -@samp{$TMPDIR/emacs@var{userid}/server} before invoking Emacs and -@samp{emacsclient}, although it will be your responsibility to create -the directory @samp{$TMPDIR/emacs@var{userid}} with appropriate -ownership and permissions. - To get your news reader, mail reader, etc., to invoke @samp{emacsclient}, try setting the environment variable @code{EDITOR} (or sometimes @code{VISUAL}) to the value @samp{emacsclient}. You may @@ -2045,6 +2032,8 @@ The most recent @samp{gnuserv} package is available at @end itemize +For more information, @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. + @node Compiler error messages @section How do I make Emacs recognize my compiler's funny error messages? @cindex Compiler error messages, recognizing commit 433dd77b4a4c52a98e1ce0438d6bd475cdb81f7b Author: Eli Zaretskii Date: Wed Oct 2 18:24:03 2019 +0300 Fix a typo in url-http.el * lisp/url/url-http.el (url-http-parse-headers): Fix a typo. Reported by Mattias EngdegÄrd . diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 31c866bd66..0ea7e02ee7 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -955,8 +955,8 @@ should be shown to the user." (url-mark-buffer-as-dead buffer) ;; Narrow the buffer for url-handle-content-transfer-encoding to ;; find only the headers relevant to this transaction. - (and (not (buffer-narrowed-p) - (mail-narrow-to-head))) + (and (not (buffer-narrowed-p)) + (mail-narrow-to-head)) (url-handle-content-transfer-encoding)) (url-http-debug "Finished parsing HTTP headers: %S" success) (widen) commit 77207ca84184fc01428154c318b21c70ad150c01 Author: Sergio Durigan Junior Date: Sun Sep 15 14:50:17 2019 -0400 Don't add trailing whitespace when passing argument to GDB * lisp/progmodes/gdb-mi.el (gdb-send): Don't append whitespace to 'gdb-continuation'. (Bug#25488) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 1c8fad3069..60852e4ad6 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1827,7 +1827,7 @@ commands to be prefixed by \"-interpreter-exec console\".") " ")) (setq gdb-first-done-or-error t) (let ((to-send (concat "-interpreter-exec console " - (gdb-mi-quote (concat gdb-continuation string " ")) + (gdb-mi-quote (concat gdb-continuation string)) "\n"))) (if gdb-enable-debug (push (cons 'mi-send to-send) gdb-debug-log))