commit 0cdedf612b9da14fccc39c4a4e81cbf400e4552f (HEAD, refs/remotes/origin/master) Author: ej32u@protonmail.com Date: Tue May 19 21:43:13 2020 +0000 Add command ffap-other-tab (Bug#41410) * lisp/ffap.el (ffap-other-tab): New command, opens files at point in another tab. (ffap-bindings): Bind it to find-file-other-tab's binding. diff --git a/lisp/ffap.el b/lisp/ffap.el index d656b37372..ceba9d2622 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -54,6 +54,8 @@ ;; C-x 5 r ffap-read-only-other-frame ;; C-x 5 d ffap-dired-other-frame ;; +;; C-x t f ffap-other-tab +;; ;; S-mouse-3 ffap-at-mouse ;; C-S-mouse-3 ffap-menu ;; @@ -1758,6 +1760,14 @@ Only intended for interactive use." (set-window-dedicated-p win wdp)) value)) +(defun ffap-other-tab (filename) + "Like `ffap', but put buffer in another tab. +Only intended for interactive use." + (interactive (list (ffap-prompter nil " other tab"))) + (pcase (save-window-excursion (find-file-at-point filename)) + ((or (and (pred bufferp) b) `(,(and (pred bufferp) b) . ,_)) + (switch-to-buffer-other-tab b)))) + (defun ffap--toggle-read-only (buffer-or-list) (dolist (buffer (if (listp buffer-or-list) buffer-or-list @@ -2013,6 +2023,7 @@ This hook is intended to be put in `file-name-at-point-functions'." (global-set-key [remap find-file-other-window] 'ffap-other-window) (global-set-key [remap find-file-other-frame] 'ffap-other-frame) + (global-set-key [remap find-file-other-tab] 'ffap-other-tab) (global-set-key [remap find-file-read-only-other-window] 'ffap-read-only-other-window) (global-set-key [remap find-file-read-only-other-frame] 'ffap-read-only-other-frame) commit b9b8c5e3fa71aea719934ce422fb22734590a8b3 Author: Noam Postavsky Date: Sun May 24 20:17:40 2020 -0400 Make dedicated keymap and mode for eshell-command (Bug#41370) Otherwise, we end up permanently modifying eshell-mode-map when running eshell-command. * lisp/eshell/eshell.el (eshell-command-mode): New mode, with map to contain the bindings previously set by eshell-return-exits-minibuffer. (eshell-return-exits-minibuffer): Make into obsolete alias for eshell-command-mode. (eshell-command): Use eshell-command-mode instead of eshell-return-exits-minibuffer. diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 2a63882ff0..5ffb159b57 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el @@ -265,14 +265,18 @@ information on Eshell, see Info node `(eshell)Top'." (eshell-mode)) buf)) -(defun eshell-return-exits-minibuffer () - ;; This is supposedly run after enabling esh-mode, when eshell-mode-map - ;; already exists. - (defvar eshell-mode-map) - (define-key eshell-mode-map [(control ?g)] 'abort-recursive-edit) - (define-key eshell-mode-map [(control ?m)] 'exit-minibuffer) - (define-key eshell-mode-map [(control ?j)] 'exit-minibuffer) - (define-key eshell-mode-map [(meta control ?m)] 'exit-minibuffer)) +(define-minor-mode eshell-command-mode + "Minor mode for `eshell-command' input. +\\{eshell-command-mode-map}" + :keymap (let ((map (make-sparse-keymap))) + (define-key map [(control ?g)] 'abort-recursive-edit) + (define-key map [(control ?m)] 'exit-minibuffer) + (define-key map [(control ?j)] 'exit-minibuffer) + (define-key map [(meta control ?m)] 'exit-minibuffer) + map)) + +(define-obsolete-function-alias 'eshell-return-exits-minibuffer + #'eshell-command-mode "28.1") (defvar eshell-non-interactive-p nil "A variable which is non-nil when Eshell is not running interactively. @@ -292,7 +296,7 @@ With prefix ARG, insert output into the current buffer at point." ;; Enable `eshell-mode' only in this minibuffer. (minibuffer-with-setup-hook #'(lambda () (eshell-mode) - (eshell-return-exits-minibuffer)) + (eshell-command-mode +1)) (unless command (setq command (read-from-minibuffer "Emacs shell command: ")) (if (eshell-using-module 'eshell-hist) commit 3b65fb7658c2717457c033c6704cf3b007804226 Author: Noam Postavsky Date: Sun May 24 20:14:48 2020 -0400 Fix segfault on closing frame with tooltip (Bug#41239) * src/gtkutil.c (xg_free_frame_widgets): Empty and unreference the tooltip widget before destroying its label. diff --git a/src/gtkutil.c b/src/gtkutil.c index 681f86f51b..5d1ce6de97 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1404,10 +1404,15 @@ xg_free_frame_widgets (struct frame *f) FRAME_X_WINDOW (f) = 0; /* Set to avoid XDestroyWindow in xterm.c */ FRAME_X_RAW_DRAWABLE (f) = 0; FRAME_GTK_OUTER_WIDGET (f) = 0; + if (x->ttip_widget) + { + /* Remove ttip_lbl from ttip_widget's custom slot before + destroying it, to avoid double-free (Bug#41239). */ + gtk_tooltip_set_custom (x->ttip_widget, NULL); + g_object_unref (G_OBJECT (x->ttip_widget)); + } if (x->ttip_lbl) gtk_widget_destroy (x->ttip_lbl); - if (x->ttip_widget) - g_object_unref (G_OBJECT (x->ttip_widget)); } } commit 104b68b670eb6de6614c562ae6b18c009b20584f Author: Stefan Kangas Date: Sun May 24 18:48:16 2020 +0200 Mark browse-url-conkeror as obsolete * lisp/net/browse-url.el: (browse-url--browser-defcustom-type) (browse-url-conkeror-new-window-is-buffer) (browse-url-conkeror-program, browse-url-conkeror-arguments) (browse-url-default-browser, browse-url-conkeror): Mark the conkeror browser as obsolete. * etc/NEWS: Mention this. diff --git a/etc/NEWS b/etc/NEWS index efad273da6..4bc00cc337 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -362,6 +362,8 @@ symbol property to the browsing functions. With a new command 'browse-url-with-browser-kind', an URL can explicitly be browsed with either an internal or external browser. +*** Support for the conkeror browser is now obsolete. + ** SHR --- diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 8132f8d993..8892e800cd 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -39,7 +39,6 @@ ;; browse-url-chrome Chrome 47.0.2526.111 ;; browse-url-chromium Chromium 3.0 ;; browse-url-epiphany Epiphany Don't know -;; browse-url-conkeror Conkeror Don't know ;; browse-url-w3 w3 0 ;; browse-url-text-* Any text browser 0 ;; browse-url-generic arbitrary @@ -154,7 +153,6 @@ (function-item :tag "Google Chrome" :value browse-url-chrome) (function-item :tag "Chromium" :value browse-url-chromium) (function-item :tag "Epiphany" :value browse-url-epiphany) - (function-item :tag "Conkeror" :value browse-url-conkeror) (function-item :tag "Text browser in an xterm window" :value browse-url-text-xterm) (function-item :tag "Text browser in an Emacs window" @@ -396,6 +394,8 @@ If non-nil, then open the URL in a new buffer rather than a new window if :version "25.1" :type 'boolean) +(make-obsolete-variable 'browse-url-conkeror-new-window-is-buffer nil "28.1") + (defcustom browse-url-galeon-new-window-is-tab nil "Whether to open up new windows in a tab or a new window. If non-nil, then open the URL in a new tab rather than a new window if @@ -449,11 +449,15 @@ commands reverses the effect of this variable." :type 'string :version "25.1") +(make-obsolete-variable 'browse-url-conkeror-program nil "28.1") + (defcustom browse-url-conkeror-arguments nil "A list of strings to pass to Conkeror as arguments." :version "25.1" :type '(repeat (string :tag "Argument"))) +(make-obsolete-variable 'browse-url-conkeror-arguments nil "28.1") + (defcustom browse-url-filename-alist `(("^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*" . "ftp://\\2/") ;; The above loses the username to avoid the browser prompting for @@ -1072,7 +1076,7 @@ instead of `browse-url-new-window-flag'." ((executable-find browse-url-kde-program) 'browse-url-kde) ;;; ((executable-find browse-url-netscape-program) 'browse-url-netscape) ;;; ((executable-find browse-url-mosaic-program) 'browse-url-mosaic) - ((executable-find browse-url-conkeror-program) 'browse-url-conkeror) +;;; ((executable-find browse-url-conkeror-program) 'browse-url-conkeror) ((executable-find browse-url-chrome-program) 'browse-url-chrome) ((executable-find browse-url-xterm-program) 'browse-url-text-xterm) ((locate-library "w3") 'browse-url-w3) @@ -1546,6 +1550,7 @@ new window, load it in a new buffer in an existing window instead. When called non-interactively, use optional second argument NEW-WINDOW instead of `browse-url-new-window-flag'." + (declare (obsolete nil "28.1")) (interactive (browse-url-interactive-arg "URL: ")) (setq url (browse-url-encode-url url)) (let* ((process-environment (browse-url-process-environment))) commit ced29038dfbab47428b974dff1408f331f36c8f1 Author: Carl Lei Date: Sun May 24 11:52:24 2020 +0000 Add three C++20 coroutine keywords, co_await, co_yield, and co_return * lisp/progmodes/cc-langs.el (c-operators): Add co_await and co_yield to the C++ value of "Exception" keywords. (c-return-kwds): Create a C++ value containing co_return. (c-simple-stmt-kwds): Add co_return to the C++ value. Copyright-paperwork-exempt: yes. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 17ffea59ff..2369cb0342 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1174,7 +1174,7 @@ since CC Mode treats every identifier as an expression." ;; Exception. ,@(when (c-major-mode-is 'c++-mode) - '((prefix "throw"))) + '((prefix "throw" "co_await" "co_yield"))) ;; Sequence. (left-assoc ",")) @@ -2040,6 +2040,7 @@ the appropriate place for that." (c-lang-defconst c-return-kwds "Keywords which return a value to the calling function." t '("return") + c++ '("return" "co_return") idl nil) (c-lang-defconst c-return-key @@ -2822,6 +2823,7 @@ Keywords here should also be in `c-block-stmt-1-kwds'." (c-lang-defconst c-simple-stmt-kwds "Statement keywords followed by an expression or nothing." t '("break" "continue" "goto" "return") + c++ '("break" "continue" "goto" "return" "co_return") objc '("break" "continue" "goto" "return" "@throw") ;; Note: `goto' is not valid in Java, but the keyword is still reserved. java '("break" "continue" "goto" "return" "throw")