commit 5b111f85a244a71cd6c02f46166437f542ae01f7 (HEAD, refs/remotes/origin/master) Author: Lars Ingebrigtsen Date: Wed Oct 23 10:34:28 2019 +0200 Make Gnus recognise "git am" diffs in all groups * lisp/gnus/mm-uu.el (mm-uu-diff-groups-regexp): Recognise diffs in all groups (bug#32730). diff --git a/etc/NEWS b/etc/NEWS index c13d879f1a..43411b7d4f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1142,6 +1142,10 @@ Of course it will still find it if you have it in "~/.ecompleterc". ** Gnus +--- +*** 'mm-uu-diff-groups-regexp' now defaults to matching all groups, +which means that "git am" diffs are recognised everywhere. + +++ *** Two new Gnus summary mode navigation commands have been added, bound to the '[' and ']' keys: 'gnus-summary-prev-unseen-article' and diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index fec3986ded..39cad57212 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -77,10 +77,9 @@ This can be either \"inline\" or \"attachment\".") :type 'regexp :group 'gnus-article-mime) -(defcustom mm-uu-diff-groups-regexp - "\\(gmane\\|gnu\\)\\..*\\(diff\\|commit\\|cvs\\|bug\\|devel\\)" +(defcustom mm-uu-diff-groups-regexp "." "Regexp matching diff groups." - :version "22.1" + :version "27.1" :type 'regexp :group 'gnus-article-mime) commit 68b531e99effeb905dac43c287c1c00bcc976715 Author: Stefan Kangas Date: Wed Oct 23 02:26:34 2019 +0200 Add version tag to gnutls-min-prime-bits * lisp/net/gnutls.el (gnutls-min-prime-bits): Add version tag. diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index da7665089e..ae15b3aecf 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -137,7 +137,8 @@ network security is handled at a higher level via node `(emacs) Network Security'." :type '(choice (const :tag "Use default value" nil) (integer :tag "Number of bits" 2048)) - :group 'gnutls) + :group 'gnutls + :version "27.1") (defcustom gnutls-crlfiles '( commit ab6728787245e0d46bd8a8919e30c882f6011182 Author: memeplex Date: Mon Oct 14 21:37:20 2019 -0300 Avoid extra lines in python-shell font lock buffer (Bug#33959) * lisp/progmodes/python.el (python-shell-font-lock-comint-output-filter-function): Avoid writing a newline to the font lock buffer when receiving an empty string. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index b168b62c29..634c297957 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2600,18 +2600,19 @@ goes wrong and syntax highlighting in the shell gets messed up." (defun python-shell-font-lock-comint-output-filter-function (output) "Clean up the font-lock buffer after any OUTPUT." - (if (let ((output (ansi-color-filter-apply output))) - (and (python-shell-comint-end-of-output-p output) - ;; Assume "..." represents a continuation prompt. - (not (string-match "\\.\\.\\." output)))) - ;; If output ends with an initial (not continuation) input prompt - ;; then the font-lock buffer must be cleaned up. - (python-shell-font-lock-cleanup-buffer) - ;; Otherwise just add a newline. - (python-shell-font-lock-with-font-lock-buffer - (goto-char (point-max)) - (newline))) - output) + (unless (string= output "") ;; See Bug#33959. + (if (let ((output (ansi-color-filter-apply output))) + (and (python-shell-comint-end-of-output-p output) + ;; Assume "..." represents a continuation prompt. + (not (string-match "\\.\\.\\." output)))) + ;; If output ends with an initial (not continuation) input prompt + ;; then the font-lock buffer must be cleaned up. + (python-shell-font-lock-cleanup-buffer) + ;; Otherwise just add a newline. + (python-shell-font-lock-with-font-lock-buffer + (goto-char (point-max)) + (newline))) + output)) (defun python-shell-font-lock-post-command-hook () "Fontifies current line in shell buffer." commit 5f67809a8f34be99d2d1cb081c071b72655a59f1 Author: Glenn Morris Date: Tue Oct 22 16:25:21 2019 -0700 Set expected result for a cedet test * test/lisp/cedet/srecode-utest-template.el (srecode-utest-project): Test fails on hydra.nixos.org, for some reason. diff --git a/test/lisp/cedet/srecode-utest-template.el b/test/lisp/cedet/srecode-utest-template.el index 691f5c15b6..7a034bd982 100644 --- a/test/lisp/cedet/srecode-utest-template.el +++ b/test/lisp/cedet/srecode-utest-template.el @@ -322,7 +322,8 @@ INSIDE SECTION: ARG HANDLER ONE") ;; Test that "project" specification works ok. (ert-deftest srecode-utest-project () - "Test thta project filtering works." + "Test that project filtering works." + :expected-result (if (getenv "EMACS_HYDRA_CI") :failed :passed) ; fixme (save-excursion (let ((testbuff (find-file-noselect srecode-utest-testfile)) (temp nil)) commit 095908aec4a6a414c13385c429e559a73d787ae0 Author: Juri Linkov Date: Wed Oct 23 00:17:27 2019 +0300 Tab-line horizontal scrolling with UI buttons and commands (bug#37667) * etc/images/tabs/left-arrow.xpm: * etc/images/tabs/right-arrow.xpm: New images. * lisp/tab-line.el (tab-line-left-map, tab-line-right-map): New keymaps. (tab-line-left-button, tab-line-right-button): New variables. (tab-line-tab-name-function): Turn defvar into defcustom. (tab-line-tab-name-buffer): New function. (tab-line-tab-name-truncated-buffer): Rename from tab-line-tab-name. (tab-line-tabs-limit): Default to nil. (tab-line-tabs): Behavior depends on tab-line-tabs-limit. (tab-line-format): Use window-parameter tab-line-hscroll. Add left/right buttons. (tab-line-hscroll): New function. (tab-line-hscroll-right, tab-line-hscroll-left): New commands bound to mouse-wheel. Rebind tab-switching commands to mouse-wheel with Ctrl-modifier. diff --git a/etc/images/tabs/README b/etc/images/tabs/README index 1e9f4e5b59..ac549cf4bd 100644 --- a/etc/images/tabs/README +++ b/etc/images/tabs/README @@ -2,7 +2,7 @@ This directory contains icons for the Tabs user interface. COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES -Files: close.xpm new.xpm +Files: close.xpm new.xpm left-arrow.xpm right-arrow.xpm Author: Juri Linkov Copyright (C) 2019 Free Software Foundation, Inc. License: GNU General Public License version 3 or later (see COPYING) diff --git a/etc/images/tabs/left-arrow.xpm b/etc/images/tabs/left-arrow.xpm new file mode 100644 index 0000000000..f133cd6217 --- /dev/null +++ b/etc/images/tabs/left-arrow.xpm @@ -0,0 +1,16 @@ +/* XPM */ +static char * left_arrow_xpm[] = { +"9 9 4 1", +" c None", +". c #BFBFBF", +"+ c #000000", +"@ c #808080", +".........", +".....+@..", +"....+@...", +"...+@....", +"..+@.....", +"...+@....", +"....+@...", +".....+@..", +"........."}; diff --git a/etc/images/tabs/right-arrow.xpm b/etc/images/tabs/right-arrow.xpm new file mode 100644 index 0000000000..ab1f1a099f --- /dev/null +++ b/etc/images/tabs/right-arrow.xpm @@ -0,0 +1,16 @@ +/* XPM */ +static char * right_arrow_xpm[] = { +"9 9 4 1", +" c None", +". c #BFBFBF", +"+ c #808080", +"@ c #000000", +".........", +"..+@.....", +"...+@....", +"....+@...", +".....+@..", +"....+@...", +"...+@....", +"..+@.....", +"........."}; diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 58f648c282..7dc6e2b6d0 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -113,6 +113,22 @@ map) "Local keymap to close `tab-line-mode' window tabs.") +(defvar tab-line-left-map + (let ((map (make-sparse-keymap))) + (define-key map [tab-line mouse-1] 'tab-line-hscroll-left) + (define-key map [tab-line mouse-2] 'tab-line-hscroll-left) + (define-key map "\C-m" 'tab-line-new-tab) + map) + "Local keymap to scroll `tab-line-mode' window tabs to the left.") + +(defvar tab-line-right-map + (let ((map (make-sparse-keymap))) + (define-key map [tab-line mouse-1] 'tab-line-hscroll-right) + (define-key map [tab-line mouse-2] 'tab-line-hscroll-right) + (define-key map "\C-m" 'tab-line-new-tab) + map) + "Local keymap to scroll `tab-line-mode' window tabs to the right.") + (defcustom tab-line-new-tab-choice t "Defines what to show in a new tab. @@ -164,22 +180,60 @@ If nil, don't show it at all." 'help-echo "Click to close tab") "Button for closing the clicked tab.") +(defvar tab-line-left-button + (propertize " <" + 'display `(image :type xpm + :file "tabs/left-arrow.xpm" + :margin (2 . 0) + :ascent center) + 'keymap tab-line-left-map + 'mouse-face 'tab-line-highlight + 'help-echo "Click to scroll left") + "Button for scrolling horizontally to the left.") + +(defvar tab-line-right-button + (propertize "> " + 'display `(image :type xpm + :file "tabs/right-arrow.xpm" + :margin (2 . 0) + :ascent center) + 'keymap tab-line-right-map + 'mouse-face 'tab-line-highlight + 'help-echo "Click to scroll right") + "Button for scrolling horizontally to the right.") + (defvar tab-line-separator nil) (defvar tab-line-tab-name-ellipsis (if (char-displayable-p ?…) "…" "...")) -(defvar tab-line-tab-name-function #'tab-line-tab-name +(defcustom tab-line-tab-name-function #'tab-line-tab-name-buffer "Function to get a tab name. Function gets two arguments: tab to get name for and a list of tabs -to display. By default, use function `tab-line-tab-name'.") +to display. By default, use function `tab-line-tab-name'." + :type '(choice (const :tag "Buffer name" + tab-line-tab-name-buffer) + (const :tag "Truncated buffer name" + tab-line-tab-name-truncated-buffer) + (function :tag "Function")) + :initialize 'custom-initialize-default + :set (lambda (sym val) + (set-default sym val) + (force-mode-line-update)) + :group 'tab-line + :version "27.1") -(defun tab-line-tab-name (buffer &optional buffers) +(defun tab-line-tab-name-buffer (buffer &optional _buffers) "Generate tab name from BUFFER. Reduce tab width proportionally to space taken by other tabs. This function can be overridden by changing the default value of the variable `tab-line-tab-name-function'." + (buffer-name buffer)) + +(defun tab-line-tab-name-truncated-buffer (buffer &optional buffers) + "Generate tab name from BUFFER. +Reduce tab width proportionally to space taken by other tabs." (let ((tab-name (buffer-name buffer)) (limit (when buffers (max 1 (- (/ (window-width) (length buffers)) 3))))) @@ -189,8 +243,9 @@ variable `tab-line-tab-name-function'." tab-line-tab-name-ellipsis) 'help-echo tab-name)))) -(defvar tab-line-tabs-limit 15 - "Maximum number of buffer tabs displayed in the tab line.") +(defvar tab-line-tabs-limit nil + "Maximum number of buffer tabs displayed in the tab line. +If nil, no limit.") (defvar tab-line-tabs-function #'tab-line-tabs "Function to get a list of tabs to display in the tab line. @@ -213,52 +268,90 @@ variable `tab-line-tabs-function'." (mapcar #'car (window-prev-buffers window)))) (prev-buffers (seq-filter #'buffer-live-p prev-buffers)) ;; Remove next-buffers from prev-buffers - (prev-buffers (seq-difference prev-buffers next-buffers)) - (half-limit (/ tab-line-tabs-limit 2)) - (prev-buffers-limit - (if (> (length prev-buffers) half-limit) - (if (> (length next-buffers) half-limit) - half-limit - (+ half-limit (- half-limit (length next-buffers)))) - (length prev-buffers))) - (next-buffers-limit - (- tab-line-tabs-limit prev-buffers-limit)) - (buffer-tabs + (prev-buffers (seq-difference prev-buffers next-buffers))) + (if (natnump tab-line-tabs-limit) + (let* ((half-limit (/ tab-line-tabs-limit 2)) + (prev-buffers-limit + (if (> (length prev-buffers) half-limit) + (if (> (length next-buffers) half-limit) + half-limit + (+ half-limit (- half-limit (length next-buffers)))) + (length prev-buffers))) + (next-buffers-limit + (- tab-line-tabs-limit prev-buffers-limit))) (append (reverse (seq-take prev-buffers prev-buffers-limit)) (list buffer) - (seq-take next-buffers next-buffers-limit)))) - buffer-tabs)) + (seq-take next-buffers next-buffers-limit))) + (append (reverse prev-buffers) + (list buffer) + next-buffers)))) (defun tab-line-format () "Template for displaying tab line for selected window." (let* ((window (selected-window)) (selected-buffer (window-buffer window)) (tabs (funcall tab-line-tabs-function)) - (separator (or tab-line-separator (if window-system " " "|")))) + (separator (or tab-line-separator (if window-system " " "|"))) + (hscroll (window-parameter nil 'tab-line-hscroll)) + (strings + (mapcar + (lambda (tab) + (concat + separator + (apply 'propertize + (concat (propertize + (funcall tab-line-tab-name-function tab tabs) + 'keymap tab-line-tab-map) + (or (and tab-line-close-button-show + (not (eq tab-line-close-button-show + (if (eq tab selected-buffer) + 'non-selected + 'selected))) + tab-line-close-button) "")) + `( + tab ,tab + face ,(if (eq tab selected-buffer) + 'tab-line-tab + 'tab-line-tab-inactive) + mouse-face tab-line-highlight)))) + tabs))) (append - (mapcar - (lambda (tab) - (concat - separator - (apply 'propertize (concat (propertize - (funcall tab-line-tab-name-function tab tabs) - 'keymap tab-line-tab-map) - (or (and tab-line-close-button-show - (not (eq tab-line-close-button-show - (if (eq tab selected-buffer) - 'non-selected - 'selected))) - tab-line-close-button) "")) - `( - tab ,tab - face ,(if (eq tab selected-buffer) - 'tab-line-tab - 'tab-line-tab-inactive) - mouse-face tab-line-highlight)))) - tabs) + (list separator + (when (and (natnump hscroll) (> hscroll 0)) + tab-line-left-button) + (when (if (natnump hscroll) + (< hscroll (1- (length strings))) + (> (length strings) 1)) + tab-line-right-button)) + (if hscroll (nthcdr hscroll strings) strings) (list (concat separator (when tab-line-new-tab-choice tab-line-new-button)))))) + +(defun tab-line-hscroll (&optional arg window) + (let* ((hscroll (window-parameter window 'tab-line-hscroll)) + (tabs (if window + (with-selected-window window (funcall tab-line-tabs-function)) + (funcall tab-line-tabs-function)))) + (set-window-parameter + window 'tab-line-hscroll + (max 0 (min (+ (or hscroll 0) (or arg 1)) + (1- (length tabs))))) + (when window + (force-mode-line-update t)))) + +(defun tab-line-hscroll-right (&optional arg mouse-event) + (interactive (list current-prefix-arg last-nonmenu-event)) + (let ((window (and (listp mouse-event) (posn-window (event-start mouse-event))))) + (tab-line-hscroll arg window) + (force-mode-line-update window))) + +(defun tab-line-hscroll-left (&optional arg mouse-event) + (interactive (list current-prefix-arg last-nonmenu-event)) + (let ((window (and (listp mouse-event) (posn-window (event-start mouse-event))))) + (tab-line-hscroll (- (or arg 1)) window) + (force-mode-line-update window))) + (defun tab-line-new-tab (&optional mouse-event) "Add a new tab to the tab line. @@ -316,6 +409,7 @@ Its effect is the same as using the `next-buffer' command (switch-to-next-buffer (and (listp mouse-event) (posn-window (event-start mouse-event))))) + (defcustom tab-line-close-tab-action 'bury-buffer "Defines what to do on closing the tab. If `bury-buffer', put the tab's buffer at the end of the list of all @@ -359,10 +453,15 @@ from the tab line." '(:eval (tab-line-format))))) -(global-set-key [tab-line mouse-4] 'tab-line-switch-to-prev-tab) -(global-set-key [tab-line mouse-5] 'tab-line-switch-to-next-tab) -(global-set-key [tab-line wheel-up] 'tab-line-switch-to-prev-tab) -(global-set-key [tab-line wheel-down] 'tab-line-switch-to-next-tab) +(global-set-key [tab-line mouse-4] 'tab-line-hscroll-left) +(global-set-key [tab-line mouse-5] 'tab-line-hscroll-right) +(global-set-key [tab-line wheel-up] 'tab-line-hscroll-left) +(global-set-key [tab-line wheel-down] 'tab-line-hscroll-right) + +(global-set-key [tab-line C-mouse-4] 'tab-line-switch-to-prev-tab) +(global-set-key [tab-line C-mouse-5] 'tab-line-switch-to-next-tab) +(global-set-key [tab-line C-wheel-up] 'tab-line-switch-to-prev-tab) +(global-set-key [tab-line C-wheel-down] 'tab-line-switch-to-next-tab) (provide 'tab-line) commit f342f9cd267d39b3ef7d0c2a58718f4ac62f5abd Author: Lars Ingebrigtsen Date: Tue Oct 22 21:18:33 2019 +0200 Fix "make bootstrap" build warning in tab-bar.el * lisp/tab-bar.el (require): Require seq when compiling to avoid a compilation warning. The function it uses is autoloaded, but autoloads aren't loaded when this is built (on "make bootstrap"). diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 098d7057e5..8350b4e694 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -34,7 +34,9 @@ ;;; Code: -(eval-when-compile (require 'cl-lib)) +(eval-when-compile + (require 'cl-lib) + (require 'seq)) (defgroup tab-bar nil commit b1be40c468ccffd7cd0793f3e23f8413d9876f5d Author: Eli Zaretskii Date: Tue Oct 22 19:28:58 2019 +0300 Fix recent changes in documentation * doc/lispref/edebug.texi (Edebug Eval, Eval List): Reword recently added text to follow conventions. * src/textprop.c (Ftext_properties_at): Don't use passive tense in doc string. diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index bd287ebe1a..e1147df8af 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -705,8 +705,8 @@ Evaluate expression @var{exp} in the context of Edebug itself @item C-x C-e Evaluate the expression before point, in the context outside of Edebug -(@code{edebug-eval-last-sexp}). If given a zero prefix (for instance -@kbd{C-u 0 C-x C-e}), don't shorten long items (like strings and +(@code{edebug-eval-last-sexp}). With the prefix argument of zero +(@kbd{C-u 0 C-x C-e}), don't shorten long items (like strings and lists). @end table @@ -739,8 +739,8 @@ Manual}) as well as these special commands: @item C-j Evaluate the expression before point, in the outside context, and insert the value in the buffer (@code{edebug-eval-print-last-sexp}). -If given a zero prefix (for instance @kbd{C-u 0 C-j}), don't shorten -long items (like strings and lists). +With prefix argument of zero (@kbd{C-u 0 C-j}), don't shorten long +items (like strings and lists). @item C-x C-e Evaluate the expression before point, in the context outside of Edebug diff --git a/src/textprop.c b/src/textprop.c index dd2e68891e..858b077ec1 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -564,7 +564,7 @@ If OBJECT is a string, POSITION is a 0-based index into it. If POSITION is at the end of OBJECT, the value is nil. If you want to display the text properties at point in a human-readable -form, the `describe-text-properties' command can be used. */) +form, use the `describe-text-properties' command. */) (Lisp_Object position, Lisp_Object object) { register INTERVAL i; commit 1f1b2e3da66ecc47bcaae4ea7df0a8ef884b40d0 Author: Stefan Kangas Date: Tue Oct 22 18:02:43 2019 +0200 Various doc fixes for auto-insert-mode * doc/misc/autotype.texi (Autoinserting): Various doc fixes. * lisp/autoinsert.el (top-level): Recommend 'auto-insert-mode' over 'add-hook'. diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 89cba183a2..e36793bf58 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -268,8 +268,8 @@ certain contexts. For example an escaped character stands for itself. @kbd{M-x auto-insert} will put some predefined text at the beginning of the buffer. The main application for this function, as its name suggests, is to have it be called automatically every time an empty, and only an -empty file is visited. This is accomplished by putting @code{(add-hook -'find-file-hook 'auto-insert)} into your @file{~/.emacs} file +empty file is visited. This is accomplished by putting +@code{(auto-insert-mode t)} into your init file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). @vindex auto-insert-alist @@ -300,15 +300,16 @@ the filename to prevent multiple inclusions. C and C++ sources insert an include of the header. Makefiles insert the file makefile.inc if it exists. TeX and bibTeX mode files insert the file tex-insert.tex if it exists, while -LaTeX mode files insert a typical @code{\documentclass} frame. Html +LaTeX mode files insert a typical @code{\documentclass} frame. HTML files insert a skeleton with the usual frame. - Ada mode files call the Ada header skeleton command. Emacs lisp + Ada mode files call the Ada header skeleton command. Emacs Lisp source files insert the usual header, with a copyright of your -environment variable @env{$ORGANIZATION} or else the FSF, and prompt -for valid keywords describing the contents. Files in a @file{bin} -directory for which Emacs could determine no specialized mode -(@pxref{Choosing Modes,,, emacs, The GNU Emacs Manual}) are set to Shell script mode. +environment variable @env{$ORGANIZATION} or else the name of the +current user, and prompt for valid keywords describing the contents. +Files in a @file{bin} directory for which Emacs could determine no +specialized mode (@pxref{Choosing Modes,,, emacs, The GNU Emacs +Manual}) are set to Shell script mode. @findex define-auto-insert In Lisp (@pxref{Init File,,, emacs, The GNU Emacs Manual}) you can use the function diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index a77ca091d2..b8c2bfd606 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -32,7 +32,7 @@ ;; auto-mode-alist. ;; ;; To use: -;; (add-hook 'find-file-hook 'auto-insert) +;; (auto-insert-mode t) ;; setq auto-insert-directory to an appropriate slash-terminated value ;; ;; You can also customize the variable `auto-insert-mode' to load the commit 38021e555961c534c7e386547214ef1eb725dadc Author: Lars Ingebrigtsen Date: Tue Oct 22 16:54:50 2019 +0200 Make text-properties-at mention describe-text-properties * src/textprop.c (Ftext_properties_at): Mention describe-text-properties in the doc string. diff --git a/src/textprop.c b/src/textprop.c index 93d19754da..dd2e68891e 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -561,7 +561,10 @@ DEFUN ("text-properties-at", Ftext_properties_at, If the optional second argument OBJECT is a buffer (or nil, which means the current buffer), POSITION is a buffer position (integer or marker). If OBJECT is a string, POSITION is a 0-based index into it. -If POSITION is at the end of OBJECT, the value is nil. */) +If POSITION is at the end of OBJECT, the value is nil. + +If you want to display the text properties at point in a human-readable +form, the `describe-text-properties' command can be used. */) (Lisp_Object position, Lisp_Object object) { register INTERVAL i; commit f9519a9c8649f50ee8f34773d050c4b5346f1efd Author: Lars Ingebrigtsen Date: Tue Oct 22 16:21:00 2019 +0200 Add a fringe example * doc/lispref/display.texi (Fringe Bitmaps): Add an example. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 82d9f1db61..d7a118296c 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -4218,6 +4218,17 @@ to display. The optional @var{face} names a face whose foreground color is used to display the bitmap; this face is automatically merged with the @code{fringe} face. + For instance, to display an arrow in the left fringe, using the +@code{warning} face, you could say something like: + +@lisp +(overlay-put + (make-overlay (point) (point)) + 'before-string (propertize + "x" 'display + `(left-fringe right-arrow warning))) +@end lisp + Here is a list of the standard fringe bitmaps defined in Emacs, and how they are currently used in Emacs (via @code{fringe-indicator-alist} and @code{fringe-cursor-alist}): commit 0e9d92146e3d4e5da597c3d1400cb31f58e19374 Author: Mattias Engdegård Date: Tue Oct 22 15:35:40 2019 +0200 rx doc string tweaks * lisp/emacs-lisp/rx.el (rx--translate-seq, rx--translate-or, rx): Say "zero or more" instead of "one or more" where applicable. diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 006a393921..2370948e81 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -210,7 +210,8 @@ each on the form (REGEXP . PRECEDENCE), returning (REGEXP . PRECEDENCE)." 'seq))))))) ; seq ++ seq (defun rx--translate-seq (body) - "Translate a sequence of one or more rx items. Return (REGEXP . PRECEDENCE)." + "Translate a sequence of zero or more rx items. +Return (REGEXP . PRECEDENCE)." (if body (let* ((items (mapcar #'rx--translate body)) (result (car items))) @@ -231,7 +232,7 @@ each on the form (REGEXP . PRECEDENCE), returning (REGEXP . PRECEDENCE)." (null list)) (defun rx--translate-or (body) - "Translate an or-pattern of one of more rx items. + "Translate an or-pattern of zero or more rx items. Return (REGEXP . PRECEDENCE)." ;; FIXME: Possible improvements: ;; @@ -982,7 +983,7 @@ For extending the `rx' notation in FORM, use `rx-define' or `rx-let-eval'." (defmacro rx (&rest regexps) "Translate regular expressions REGEXPS in sexp form to a regexp string. Each argument is one of the forms below; RX is a subform, and RX... stands -for one or more RXs. For details, see Info node `(elisp) Rx Notation'. +for zero or more RXs. For details, see Info node `(elisp) Rx Notation'. See `rx-to-string' for the corresponding function. STRING Match a literal string. commit 7f5d92e64326173b9d2d14567739390320403ec8 Author: Lars Ingebrigtsen Date: Tue Oct 22 13:12:03 2019 +0200 Make edebug-eval-last-sexp interactively take a zero prefix * lisp/emacs-lisp/edebug.el (edebug-eval-last-sexp): Make the zero prefix work analogously to in eval-last-sexp (bug#28895). (edebug-eval-print-last-sexp): Ditto. diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 43665ea9ec..bd287ebe1a 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -705,7 +705,9 @@ Evaluate expression @var{exp} in the context of Edebug itself @item C-x C-e Evaluate the expression before point, in the context outside of Edebug -(@code{edebug-eval-last-sexp}). +(@code{edebug-eval-last-sexp}). If given a zero prefix (for instance +@kbd{C-u 0 C-x C-e}), don't shorten long items (like strings and +lists). @end table @cindex lexical binding (Edebug) @@ -735,8 +737,10 @@ Manual}) as well as these special commands: @table @kbd @item C-j -Evaluate the expression before point, in the outside context, and insert -the value in the buffer (@code{edebug-eval-print-last-sexp}). +Evaluate the expression before point, in the outside context, and +insert the value in the buffer (@code{edebug-eval-print-last-sexp}). +If given a zero prefix (for instance @kbd{C-u 0 C-j}), don't shorten +long items (like strings and lists). @item C-x C-e Evaluate the expression before point, in the context outside of Edebug diff --git a/etc/NEWS b/etc/NEWS index d44c853cef..c13d879f1a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1473,19 +1473,23 @@ the Elisp manual for documentation of the new mode and its commands. ** Edebug +++ -*** New faces 'edebug-enabled-breakpoint' and 'edebug-disabled-breakpoint' +*** 'edebug-eval-last-sexp' and 'edebug-eval-print-last-sexp' interactively +now take a zero prefix analogously to the non-Edebug counterparts. + ++++ +*** New faces 'edebug-enabled-breakpoint' and 'edebug-disabled-breakpoint'. When setting breakpoints in Edebug, an overlay with these faces are placed over the point in question, depending on whether they are enabled or not. +++ -*** New command 'edebug-toggle-disable-breakpoint' +*** New command 'edebug-toggle-disable-breakpoint'. This command allows you to disable a breakpoint temporarily. This is mainly useful with breakpoints that are conditional and would take some time to recreate. +++ -*** New command 'edebug-unset-breakpoints' +*** New command 'edebug-unset-breakpoints'. To clear all breakpoints in the current form, the 'U' command in 'edebug-mode', or 'M-x edebug-unset-breakpoints' can be used. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 7a40ca36b8..237d93922f 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3749,26 +3749,45 @@ Print result in minibuffer." (concat (edebug-safe-prin1-to-string (car values)) (eval-expression-print-format (car values)))))) -(defun edebug-eval-last-sexp () +(defun edebug-eval-last-sexp (&optional no-truncate) "Evaluate sexp before point in the outside environment. -Print value in minibuffer." - (interactive) - (edebug-eval-expression (edebug-last-sexp))) +Print value in minibuffer. -(defun edebug-eval-print-last-sexp () +If NO-TRUNCATE is non-nil (or interactively with a prefix +argument of zero), show the full length of the expression, not +limited by `edebug-print-length' or `edebug-print-level'." + (interactive + (list (and current-prefix-arg + (zerop (prefix-numeric-value current-prefix-arg))))) + (if no-truncate + (let ((edebug-print-length nil) + (edebug-print-level nil)) + (edebug-eval-expression (edebug-last-sexp))) + (edebug-eval-expression (edebug-last-sexp)))) + +(defun edebug-eval-print-last-sexp (&optional no-truncate) "Evaluate sexp before point in outside environment; insert value. -This prints the value into current buffer." - (interactive) +This prints the value into current buffer. + +If NO-TRUNCATE is non-nil (or interactively with a prefix +argument of zero), show the full length of the expression, not +limited by `edebug-print-length' or `edebug-print-level'." + (interactive + (list (and current-prefix-arg + (zerop (prefix-numeric-value current-prefix-arg))))) (let* ((form (edebug-last-sexp)) (result-string (edebug-outside-excursion - (edebug-safe-prin1-to-string (edebug-safe-eval form)))) + (if no-truncate + (let ((edebug-print-length nil) + (edebug-print-level nil)) + (edebug-safe-prin1-to-string (edebug-safe-eval form))) + (edebug-safe-prin1-to-string (edebug-safe-eval form))))) (standard-output (current-buffer))) (princ "\n") ;; princ the string to get rid of quotes. (princ result-string) - (princ "\n") - )) + (princ "\n"))) ;;; Edebug Minor Mode