commit a15431ffe23838025e7b20131c16bbeb80ce4090 (HEAD, refs/remotes/origin/master) Merge: 3cc06d1abb 5bc97ebceb Author: Michael Albinus Date: Tue Nov 19 08:19:00 2019 +0100 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 5bc97ebceb54e0eb2804bef4c1bc32a40d8a2371 Author: Stefan Monnier Date: Mon Nov 18 17:47:06 2019 -0500 * lisp/org/org.el (org-mode): Add pcomplete-completions-at-point to capf. This lets the normal `completion-at-point` and `complete-symbol` use `pcomplete` for completion. (org-mode-map): Leave M-TAB bound to the global default since `pcomplete` is now obsolete. diff --git a/lisp/org/org.el b/lisp/org/org.el index aa7e319bda..73848a4634 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -5541,11 +5541,13 @@ The following commands are available: (lambda (&rest _) (org-show-context 'isearch))) ;; Setup the pcomplete hooks - (setq-local pcomplete-command-completion-function 'org-pcomplete-initial) - (setq-local pcomplete-command-name-function 'org-command-at-point) - (setq-local pcomplete-default-completion-function 'ignore) - (setq-local pcomplete-parse-arguments-function 'org-parse-arguments) + (setq-local pcomplete-command-completion-function #'org-pcomplete-initial) + (setq-local pcomplete-command-name-function #'org-command-at-point) + (setq-local pcomplete-default-completion-function #'ignore) + (setq-local pcomplete-parse-arguments-function #'org-parse-arguments) (setq-local pcomplete-termination-string "") + (add-hook 'completion-at-point-functions + #'pcomplete-completions-at-point nil t) (setq-local buffer-face-mode-face 'org-default) ;; If empty file that did not turn on Org mode automatically, make @@ -19501,7 +19503,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." (org-defkey org-mode-map "\C-i" 'org-cycle) (org-defkey org-mode-map [(tab)] 'org-cycle) (org-defkey org-mode-map [(control tab)] 'org-force-cycle-archived) -(org-defkey org-mode-map "\M-\t" #'pcomplete) +(org-defkey org-mode-map "\M-\t" nil) ;; Override text-mode binding ;; The following line is necessary under Suse GNU/Linux (org-defkey org-mode-map [S-iso-lefttab] 'org-shifttab) @@ -19567,7 +19569,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." (org-defkey org-mode-map [?\C-c (right)] 'org-shiftright) (org-defkey org-mode-map [?\C-c ?\C-x (right)] 'org-shiftcontrolright) (org-defkey org-mode-map [?\C-c ?\C-x (left)] 'org-shiftcontrolleft) - (org-defkey org-mode-map [?\e (tab)] #'pcomplete) + (org-defkey org-mode-map [?\e (tab)] nil) ;; Override text-mode binding (org-defkey org-mode-map [?\e (shift return)] 'org-insert-todo-heading) (org-defkey org-mode-map [?\e (shift left)] 'org-shiftmetaleft) (org-defkey org-mode-map [?\e (shift right)] 'org-shiftmetaright) commit da00577793f9eff3a4cf11638053f6d3fa07728b Author: Juri Linkov Date: Mon Nov 18 23:57:16 2019 +0200 * lisp/tab-line.el (tab-line-auto-hscroll): New defcustom (bug#37667) (tab-line-auto-hscroll): Use this option in the function. diff --git a/lisp/tab-line.el b/lisp/tab-line.el index b99e726329..0f701842df 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -471,13 +471,21 @@ variable `tab-line-tabs-function'." tab-line-new-button))))))) +(defcustom tab-line-auto-hscroll t + "Allow or disallow automatic horizontal scrolling of the tab line. +Non-nil means the tab line are automatically scrolled horizontally to make +the selected tab visible." + :type 'boolean + :group 'tab-line + :version "27.1") + (defun tab-line-auto-hscroll (strings hscroll) (with-temp-buffer (let ((truncate-partial-width-windows nil) + (truncate-lines nil) (inhibit-modification-hooks t) + (buffer-undo-list t) show-arrows) - (setq truncate-lines nil - buffer-undo-list t) (apply 'insert strings) (goto-char (point-min)) (add-face-text-property (point-min) (point-max) 'tab-line) @@ -486,7 +494,9 @@ variable `tab-line-tabs-function'." (setq show-arrows (> (vertical-motion 1) 0)) ;; Try to auto-scroll only when scrolling is needed, ;; but no manual scrolling was performed before. - (when (and show-arrows (not (and (integerp hscroll) (>= hscroll 0)))) + (when (and tab-line-auto-hscroll + show-arrows + (not (and (integerp hscroll) (>= hscroll 0)))) (let ((pos (seq-position strings 'selected (lambda (str prop) (get-pos-property 1 prop str))))) commit 3ba98fb1d735140cb3c6cd5f74674a65d7a45015 Author: Juri Linkov Date: Mon Nov 18 23:53:11 2019 +0200 * lisp/vc/ediff-util.el: Set this-command to ediff-quit (bug#38219) * lisp/vc/ediff-util.el (ediff-toggle-read-only, ediff-quit): Set this-command to the same command after using y-or-n-p that doesn't guarantee to keep this-command unchanged to check it later for some contrived logic. diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index a481defe29..c7c5405bdd 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -1038,6 +1038,7 @@ of the current buffer." (format "File %s is under version control. Check it out? " (ediff-abbreviate-file-name file)))) + (setq this-command 'ediff-toggle-read-only) ; bug#38219 ;; if we checked the file out, we should also change the ;; original state of buffer-read-only to nil. If we don't ;; do this, the mode line will show %%, since the file was @@ -2379,6 +2380,7 @@ temporarily reverses the meaning of this variable." " & show containing session group" ""))) (progn (message "") + (setq this-command 'ediff-quit) ; bug#38219 (set-buffer ctl-buf) (ediff-really-quit reverse-default-keep-variants)) (select-frame ctl-frm) commit ed52618e707682e812002c98b99efe4baf43e1ca Author: Robert Pluim Date: Mon Nov 18 16:35:51 2019 +0100 ; Fix previous commit diff --git a/src/gtkutil.c b/src/gtkutil.c index 4bab4059c3..25ef5dd248 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2228,7 +2228,7 @@ xg_get_file_name (struct frame *f, static char *x_last_font_name; -#if HAVE_GTK3 +#ifdef HAVE_GTK3 static gboolean xg_font_filter (const PangoFontFamily *family, const PangoFontFace *face, commit 899bd78c4fe81ee8e9de7677674396f2dea37510 Author: Robert Pluim Date: Mon Nov 18 15:39:54 2019 +0100 Check for HAVE_GTK3 instead of a specific version Our minimum GTK3 version is 3.10, the font filter functions appeared in 3.2. * gtkutil.c (xg_font_filter) [HAVE_GTK3]: Just check for HAVE_GTK3. (xg_get_font) [HAVE_GTK3]: Same here. diff --git a/src/gtkutil.c b/src/gtkutil.c index c4d2ef9d80..4bab4059c3 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2228,7 +2228,7 @@ xg_get_file_name (struct frame *f, static char *x_last_font_name; -#if GTK_CHECK_VERSION (3, 2, 0) +#if HAVE_GTK3 static gboolean xg_font_filter (const PangoFontFamily *family, const PangoFontFace *face, @@ -2262,7 +2262,7 @@ xg_get_font (struct frame *f, const char *default_name) w = gtk_font_chooser_dialog_new ("Pick a font", GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f))); -#if GTK_CHECK_VERSION (3, 2, 0) +#ifdef HAVE_GTK3 gtk_font_chooser_set_filter_func (GTK_FONT_CHOOSER (w), xg_font_filter, NULL, NULL); #endif if (default_name) commit 3cc06d1abb6587e0922a5ddc7a7febd3dd71d55a Author: Michael Albinus Date: Mon Nov 18 15:33:21 2019 +0100 * lisp/net/tramp.el (tramp-handle-file-regular-p): Improve error handling. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 99c93eaa57..cb40c71cfe 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3306,9 +3306,13 @@ User is always nil." (defun tramp-handle-file-regular-p (filename) "Like `file-regular-p' for Tramp files." (and (file-exists-p filename) - (eq ?- - (aref (tramp-compat-file-attribute-modes (file-attributes filename)) - 0)))) + ;; Sometimes, `file-attributes' does not return a proper value + ;; even if `file-exists-p' does. + (ignore-errors + (eq ?- + (aref + (tramp-compat-file-attribute-modes (file-attributes filename)) + 0))))) (defun tramp-handle-file-remote-p (filename &optional identification connected) "Like `file-remote-p' for Tramp files." commit 2e92f176a3ae68ed6fcf9f07c173c61a497f33fd Author: Lars Ingebrigtsen Date: Mon Nov 18 11:02:27 2019 +0100 Fix cl-prettyexpand in the non-FULL case * lisp/emacs-lisp/cl-extra.el (cl-prettyexpand): This function has apparently not worked for at least a couple of decades (bug#38206) unless supplied with a FULL parameter. Make the FULL parameter obsolete and make the function always work as it did with a non-nil FULL. diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 91034de539..7e9d8fe870 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -693,17 +693,15 @@ PROPLIST is a list of the sort returned by `symbol-plist'. (forward-sexp))) ;;;###autoload -(defun cl-prettyexpand (form &optional full) - "Expand macros in FORM and insert the pretty-printed result. -Optional argument FULL non-nil means to expand all macros, -including `cl-block' and `cl-eval-when'." +(defun cl-prettyexpand (form &optional _full) + "Expand macros in FORM and insert the pretty-printed result." + (declare (advertised-calling-convention (form) "27.1")) (message "Expanding...") - (let ((cl--compiling-file full) - (byte-compile-macro-environment nil)) - (setq form (macroexpand-all form - (and (not full) '((cl-block) (cl-eval-when))))) + (let ((byte-compile-macro-environment nil)) + (setq form (macroexpand-all form)) (message "Formatting...") - (prog1 (cl-prettyprint form) + (prog1 + (cl-prettyprint form) (message "")))) ;;; Integration into the online help system.