Stefan Monnier [Wed, 23 Oct 2019 21:48:41 +0000 (17:48 -0400)]
* lisp/cedet/mode-local.el: Use lexical-binding and `declare`
(with-mode-local-symbol, with-mode-local, setq-mode-local)
(defvar-mode-local, defconst-mode-local)
(define-overloadable-function, define-mode-local-override):
Use `declare` for indent and edebug specs.
(xref-mode-local-find-overloadable-regexp): Simplify regexp.
(mode-local-setup-edebug-specs): Delete.
(edebug-setup-hook): Don't use any more.
Juri Linkov [Wed, 23 Oct 2019 20:58:30 +0000 (23:58 +0300)]
* lisp/tab-bar.el: Allow to specify interactively where to add a new tab.
* lisp/tab-bar.el (tab-bar-new-tab-to): Rename from tab-bar-new-tab.
Add optional arg TO-INDEX.
(tab-bar-new-tab): New implementation to use relative ARG.
(tab-new-to): Alias to tab-bar-new-tab-to.
Juri Linkov [Wed, 23 Oct 2019 20:53:08 +0000 (23:53 +0300)]
* lisp/tab-bar.el: Rename tab-bar-swap-tabs to tab-bar-move-tab-to.
* lisp/tab-bar.el (tab-bar-move-tab-to): Rename from tab-bar-swap-tabs.
Change logic to push the moved tab between existing tabs.
(tab-bar-move-tab): Call tab-bar-move-tab-to instead of tab-bar-swap-tabs.
(tab-move-to): Rename alias from tab-swap.
Juri Linkov [Wed, 23 Oct 2019 20:39:31 +0000 (23:39 +0300)]
Implement tab close undo feature for tab-bar.
* lisp/tab-bar.el (tab-bar-closed-tabs): New variable.
(tab-bar-close-tab): Add closed tab to tab-bar-closed-tabs.
Disable tab-bar-mode on closing the last tab.
(tab-bar-close-other-tabs): Add all closed tabs to tab-bar-closed-tabs.
(tab-bar-undo-close-tab): New command.
(tab-undo): Alias to tab-bar-undo-close-tab.
Completion tables are not supposed to signal errors:
emacs -q
M-x semantic-mode
; visit a file supported by semantic, such as a C file
; put cursor in a blank space
M-x completion-at-point
It will error with: "Nothing to complete"
(semantic-analyze-possible-completions): Return nil instead of
signaling errors.
memeplex [Tue, 15 Oct 2019 00:37:20 +0000 (21:37 -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.
Juri Linkov [Tue, 22 Oct 2019 21:17:27 +0000 (00:17 +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.
* 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").
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.
Robert Pluim [Tue, 22 Oct 2019 07:31:15 +0000 (09:31 +0200)]
Show stash counts in button in vc-dir
Based on suggestions from Mattias Engdegård.
* lisp/vc/vc-git.el (vc-git--make-button-text): New function to
generate text for stash button.
(vc-git-make-stash-button): Show stash counts. Delete and recreate
button when toggling.
(vc-git-dir-extra-headers): Pass counts to vc-git-make-stash-button.
Treat stash count <= vc-git-show-stash as equivalent to showing entire
list.
Arash Esbati [Sun, 20 Oct 2019 18:27:00 +0000 (20:27 +0200)]
Move entry for \Ref into LaTeX core
* lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Move
entry for \Ref from "Varioref" into "Default" as this macro is
part of LaTeX 2019-10-01 kernel.
Rearrange entries for "Varioref".
Paul Eggert [Tue, 22 Oct 2019 00:28:02 +0000 (17:28 -0700)]
Portcheck only if --enable-gcc-warnings
Problem reported by Richard Copley (Bug#37852).
This patch causes the problem to not occur if one uses plain
‘configure’. The problem can still occur if with ‘configure
--enable-gcc-warnings’, so a further fix may be needed.
* configure.ac (GNULIB_PORTCHECK, _FORTIFY_SOURCE):
Define these only with an explicit --enable-gcc-warnings.
* lisp/vc/vc-git.el (vc-git-show-stash):New user option.
(vc-git-make-stash-button): Create button that allows hiding the stash
list.
(vc-git-dir-extra-headers): Split stash list into hideable and
non-hideable parts depending on value of vc-git-show-stash. Add
button to toggle visibility of hideable part.
Add a way to disable substitution of command keys in help strings
* src/keyboard.c (help_echo_substitute_command_keys): New function.
(help_echo_echo, parse_menu_item): Use it.
(syms_of_keyboard): Define Qhelp_echo_inhibit_substitution.
* doc/lispref/text.texi (Special Properties), etc/NEWS: Document
the effect of 'help-echo-inhibit-substitution'.
Juri Linkov [Sun, 20 Oct 2019 22:37:39 +0000 (01:37 +0300)]
* lisp/tab-line.el: Bind mouse commands to [tab-line].
* lisp/tab-line.el: Bind mouse-4/mouse-5, wheel-up/wheel-down
globally to [tab-line].
(tab-line-tab-map): Remove local bindings of mouse-4/mouse-5.
(tab-line-new-tab, tab-line-switch-to-prev-tab)
(tab-line-switch-to-next-tab, tab-line-close-tab):
Turn commands into mouse-free (can be used without mouse).
* lisp/emacs-lisp/edebug.el (edebug-disabled-breakpoint): New face
(bug#23472).
(edebug-enabled-breakpoint): Rename.
(edebug--overlay-breakpoints): Use the new face.
(edebug-toggle-disable-breakpoint): New command and keystroke.
Alan Mackenzie [Sun, 20 Oct 2019 16:55:26 +0000 (16:55 +0000)]
Optimize c-crosses-statement-barrier-p for large blocks of comment.
This fixes bug #18134.
* lisp/progmodes/cc-engine.el (c-crosses-statement-barrier-p): Give a limit
to the c-backward-syntactic-ws which is searching for a virtual semicolon. In
the main loop, Use c-forward-syntactic-ws to skip blocks of comments.
Juri Linkov [Sun, 20 Oct 2019 16:30:30 +0000 (19:30 +0300)]
Provide default value for tab-name/frame-name reading minibuffer
* lisp/tab-bar.el (tab-bar-rename-tab, tab-bar-rename-tab-by-name):
Provide default value for read-string.
(tab-bar-select-tab-by-name): Alias for tab-bar-switch-to-tab.
* lisp/frame.el (set-frame-name): Provide default value for
read-string in interactive spec.
* lisp/cus-start.el (tab-bar-position): Use choice instead of boolean.
* lisp/emacs-lisp/edebug.el (edebug--recursive-edit): Bind
minor-mode-overriding-map-alist to avoid other minor modes hiding the
edebug commands (bug#11018).
Stefan Kangas [Fri, 18 Oct 2019 20:16:50 +0000 (22:16 +0200)]
Update FAQ entry on XEmacs (Bug#37815)
* doc/misc/efaq.texi (Difference between Emacs and XEmacs): Update
section to reflect the current state of affairs. XEmacs is not
actively developed and is lacking many important features of Emacs.
Stefan Kangas [Sat, 19 Oct 2019 00:51:21 +0000 (02:51 +0200)]
Improve doc string of eshell and eshell-buffer-name
* lisp/eshell/eshell.el (eshell-buffer-name, eshell): Improve doc
strings, by clarifying how buffers are named. Also refer users to the
Info manual. (Bug#37178)
* lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints)
(edebug--overlay-breakpoints-remove): New functions (bug#23468).
(edebug-modify-breakpoint): Use them to highlight breakpoints.
(edebug--display-1): Restore breakpoint highlights.
(edebug--recursive-edit): Remove highlights on exit.
Fix doc string and interactive spec of cancel-edebug-on-entry
* lisp/emacs-lisp/edebug.el (cancel-edebug-on-entry): Add doc
string and make the interactive spec complete over functions that
have the spec (bug#10806).
(edebug-cancel-edebug-on-entry): Add alias for discoverability.
(edebug-on-entry): Clarify what this command does.
Stefan Kangas [Sat, 19 Oct 2019 13:04:13 +0000 (15:04 +0200)]
Don't explain FTP acronym in FAQ
* doc/misc/efaq.texi (Common acronyms): Remove explanation of the FTP
acronym. Emacs is no longer distributed over FTP, and the FAQ doesn't
refer to any other FTP URLs.
Raimon Grau [Sat, 19 Oct 2019 09:46:17 +0000 (11:46 +0200)]
Fix optional parameter passing in calc-fin-* functions
* lisp/calc/calc-fin.el (calc-fin-pv, calc-fin-fv, calc-fin-pmt)
(calc-fin-pner, calc-fin-rate): Add support for an optional
parameter standing for an initial lump. The functions already
support it but the extra parameter was not taken into account in
stack mode. This commit it takes into consideration when deciding
if a function takes 3 or 4 parameters (bug#37649).
Eli Zaretskii [Sat, 19 Oct 2019 09:12:31 +0000 (12:12 +0300)]
Fix display of Info files on TTY frames
* lisp/info.el (info-symbols-and-replacements): New variable.
(Info-mode): Use 'info-symbols-and-replacements' to set up a
buffer-display-table for non-ASCII symbols used by Info files
that cannot be displayed on TTY frames.
Eli Zaretskii [Sat, 19 Oct 2019 07:42:14 +0000 (10:42 +0300)]
A better fix for tab-line mouse highlight on TTY frames
* src/dispnew.c (mode_line_string):
* src/xdisp.c (note_mode_line_or_margin_highlight): Remove
recently-added workarounds for incorrect TTY mouse highlight:
they are no longer needed.
(mark_window_display_accurate_1): Set the header_line_p and
tab_line_p flags of the window's current_matrix if the window
displays these.
(display_mode_line): Set the header_line_p and tab_line_p
flags of the window's desired_matrix if the window displays
these. (Bug#37807)
Paul Eggert [Fri, 18 Oct 2019 22:33:13 +0000 (15:33 -0700)]
Pacify x86 GCC 9 in tab bar code
* src/xdisp.c (tty_get_tab_bar_item): Simplify a bit. This
pacifies --enable-gcc-warnings with x86 GCC 9.2.1 20190827
(Red Hat 9.2.1-1) when combined with -fsanitize=undefined.