1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
Commit Graph

74767 Commits

Author SHA1 Message Date
Juanma Barranquero
91762e49e1 Don't save/restore font-backend in framesets (bug#38442)
* lisp/frameset.el (frameset-persistent-filter-alist):
Add :never filter for `font-backend'.
2019-12-02 19:19:13 +01:00
Juanma Barranquero
9c0ac88199 ibuf-ext.el: Fix previous change
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups): Use
`cl-destructuring-bind' instead of `cl-multiple-value-bind', as we
don't want to assume how multiple-values are implemented, and we
know a list is being returned anyway.  Suggested by Stefan Monnier.
2019-12-02 01:38:31 +01:00
Dmitry Gutov
3dd7de625f * lisp/vc/diff-mode.el (diff-context): Set 'extend t' (bug#37774). 2019-12-02 01:33:41 +02:00
Mattias Engdegård
9f2145f42d Temporary enable transient-mark-mode for rectangle selection
* lisp/mouse.el (mouse-drag-region-rectangle):
Enable transient-mark-mode during selection (bug#38431).
2019-12-01 18:32:43 +01:00
Glenn Morris
8b5c5a9a9b ; Auto-commit of loaddefs files. 2019-12-01 06:27:14 -08:00
Michael Albinus
ec65b9adbe Suppress superfluous messages in tramp-tests
* test/lisp/net/tramp-tests.el (tramp-test10-write-region)
(tramp-test10-write-region-file-precious-flag)
(tramp-test34-connection-local-variables)
(tramp-test36-vc-registered): Let-bind `inhibit-message'.
2019-12-01 12:25:15 +01:00
Juanma Barranquero
eb452dfe95 ibuffer-mark-by-content-regexp: don't depend on `cl-some'
* lisp/ibuf-ext.el (ibuffer-mark-by-content-regexp): Use `cl-dolist'
instead of `cl-some' to avoid a run-time dependency on cl-lib that
triggers an unreported bug similar to bug#38430.
2019-12-01 10:41:49 +01:00
Juanma Barranquero
f22501185e ibuffer-do-isearch: don't depend on `cl-values-list' (bug#38430)
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups): Don't call
`cl-values-list'.  Our implementation of that function just
checks that its argument is a list, and then returns it.  In
this specific case, the argument is guaranteed to be a list.
2019-12-01 10:13:06 +01:00
Mattias Engdegård
293eb32598 Improved mouse rectangle selection robustness (bug#38013)
Make the rectangular selection work better with
display-line-numbers-mode and side-by-side windows.
Also make the mouse track the text cursor in a consistent way.

* lisp/mouse.el (mouse--rectangle-track-cursor): Added constant.
(mouse-drag-region-rectangle): Take the line-number width into
account, and use window-relative columns.  Track either the cursor or
rectangle corner with more care.
2019-11-30 22:43:00 +01:00
Juri Linkov
dfbbbf319e * lisp/tab-line.el (tab-line-auto-hscroll): Don't let-bind buffer-local values
Use setq to set buffer-local values of truncate-lines and buffer-undo-list.
This will prevent leaking of let-bound values to buffer-local values
of the minibuffer.
2019-11-30 23:42:37 +02:00
Juri Linkov
df89d6d6dc * lisp/gnus/gnus-win.el (gnus-configure-frame): Check for window-live-p.
* doc/misc/gnus.texi (Tabbed Interface): New node.  (bug#37998)
2019-11-30 23:36:52 +02:00
Juri Linkov
54c792ece6 * lisp/subr.el: Add discard-input to more functions.
* lisp/subr.el (read-char-from-minibuffer-insert-other)
(y-or-n-p-insert-other): Use discard-input in case of user mistake.
(do-after-load-evaluation): Add discard-input before calling 'message',
so in case of the active minibuffer, calling minibuffer-message will allow
sit-for to wait the complete timeout, because discard-input will discard
all initial events that prevent sit-for from waiting during startup.
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00581.html
2019-11-30 23:33:41 +02:00
Alan Mackenzie
757e66afdc CC Mode. Fix fontification bug with unterminated quotes on adjacent lines
In particular, with these unterminated quotes on each of two adjacent lines,
the following text was spuriously fontified with string face.

* lisp/progmodes/cc-defs.el
(c-search-backward-char-property-with-value-on-char): New macro.

* lisp/progmodes/cc-mode.el (c-clear-string-fences): Check whether there is an
unmatched quote at a lower buffer position which should match the current
quote, rather than wrongly assuming the latter is unmatched and marking it
with a punctuation syntax.
(c-font-lock-fontify-region): Ensure all pertinent parts of the buffer have
string fence properties applied before performing any syntactic operations on
it; in particular, this applies to a quote at an earlier buffer position which
"matches" one inside the region about to be fontified.
2019-11-30 21:26:00 +00:00
Juri Linkov
3c278b4999 * lisp/image.el: Support image scaling with mouse in other buffer.
* lisp/image.el (image-increase-size, image-decrease-size):
Add optional arg position.
(image-mouse-increase-size, image-mouse-decrease-size):
Use '(point-marker)' for arg position.
(image--get-image): Use get-char-property from position if non-nil,
and its buffer.
(image--get-imagemagick-and-warn, image--change-size):
Add optional arg position.
2019-11-30 23:21:00 +02:00
Juri Linkov
d64ea182fb Use run-with-idle-timer instead of debounce for responsive image scaling.
* lisp/emacs-lisp/timer.el (debounce, debounce-reduce): Revert macro addition.
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg01133.html

* lisp/image.el (image-increase-size, image-decrease-size):
Use run-with-idle-timer.
(image--change-size): Rename back from image--change-size-function.

* lisp/image-mode.el (image-mode--setup-mode): Remove hooks
window-size-change-functions and window-selection-change-functions (bug#32672)
(image-fit-to-window): Rename from image--window-change-function.
(image--window-state-change): Rename from image--window-change.
Use run-with-idle-timer.
2019-11-30 23:16:03 +02:00
Juanma Barranquero
9ac78ef56c Fix compilation warning in vc-hg.el
* lisp/vc/vc-hg.el (vc-read-revision): Declare.
2019-11-30 13:41:30 +01:00
Andrii Kolomoiets
561840b553 vc-hg: prompt for branch to merge
* lisp/vc/vc-hg.el (vc-hg-merge-branch): Prompt for revision to merge.
(vc-hg-revision-table): Use branches, tags and bookmarks as competion
candidates.

* etc/NEWS: Mention changes of vc-hg.el

* doc/emacs/maintaining.texi (Switching Branches): Mention 'hg update'
command.
(Merging): Mention 'hg merge' command.

This fixes bug#22860
2019-11-30 14:00:16 +02:00
Michal Sojka
63e7dd4360 Fix preserving cell boundaries in table.el after <delete>
* lisp/textmodes/table.el (table-command-remap-alist): Add
entry for 'delete-forward-char'.  (Bug#38353)
2019-11-30 13:55:02 +02:00
Eli Zaretskii
64687872f6 Add ':extend' attribute to faces and themes
* etc/themes/wombat-theme.el:
* etc/themes/wheatgrass-theme.el:
* etc/themes/tsdh-light-theme.el:
* etc/themes/tsdh-dark-theme.el:
* etc/themes/tango-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/misterioso-theme.el:
* etc/themes/manoj-dark-theme.el:
* etc/themes/light-blue-theme.el:
* etc/themes/leuven-theme.el:
* etc/themes/dichromacy-theme.el:
* etc/themes/deeper-blue-theme.el:
* etc/themes/adwaita-theme.el: Add ':extend' attribute to all
faces that are by default defined with it.

* lisp/vc/smerge-mode.el (smerge-upper, smerge-lower)
(smerge-base):
* lisp/vc/log-view.el (log-view-file, log-view-message):
* lisp/vc/ediff-init.el (ediff-current-diff-A)
(ediff-current-diff-B, ediff-current-diff-C)
(ediff-current-diff-Ancestor, ediff-even-diff-A)
(ediff-even-diff-B, ediff-even-diff-C)
(ediff-even-diff-Ancestor, ediff-odd-diff-A)
(ediff-odd-diff-B, ediff-odd-diff-C)
(ediff-odd-diff-Ancestor):
* lisp/vc/diff-mode.el (diff-header, diff-file-header)
(diff-removed, diff-added): Make sure all definitions of faces
have the same value of the ':extend' property, otherwise
customizing background color or underline etc. attributes of
these faces on some displays will produce effects different
from other displays.
2019-11-30 13:27:11 +02:00
Stefan Monnier
b1a6950584 * lisp/gnus/gnus.el (gnus-info): Define with cl-defstruct
This makes the accessors into (inlined) functions (instead of macros),
which simplifies some uses, and it makes the gnus-info-set-<foo>
macros redundant since we can use `setf` instead.  Remove them and
update all users.

(gnus-info-group, gnus-info-rank, gnus-info-read, gnus-info-marks)
(gnus-info-method, gnus-info-params): Auto-defined by defstruct.
(gnus-info-level, gnus-info-score): Define as a function.  Add gv-setter.
(gnus-info-set-group, gnus-info-set-rank, gnus-info-set-read): Remove,
use `setf` instead.
(gnus-info-set-marks, gnus-info-set-method, gnus-info-set-params):
Define as a function.
(gnus-info-set-entry): Delete function.
(gnus-info--grow-entry): New function, extracted from it.
(gnus-info--set-level, gnus-info--set-score): New functions, extracted
from the `gnus-info-set-level` and `gnus-info-set-score` which they replace.
(gnus-get-info): Define as a function.

* lisp/gnus/gnus-group.el (gnus-group-edit-group-done):
Use the `extend` arg of `gnus-info-set-method`.
(gnus-group-sort-selected-flat): eta-reduce.
2019-11-29 12:26:31 -05:00
Stefan Monnier
7fff418edf * lisp/textmodes/mhtml-mode.el: Fix bug#38372
The `sgml-syntax-propertize-rules` rely on the `sgml--syntax-propertize-ppss`
setup by `sgml-syntax-propertize` so it is not correct/safe to use
them directly like html used to do.

Change `sgml-syntax-propertize` so it can be used by mhtml,
and then adjust mhtml-mode accordingly.

* lisp/textmodes/mhtml-mode.el: Remove redundant `eval-and-compile`.
Only require cl-lib at compile-time.
(mhtml--syntax-propertize): New const, extracted from mhtml-syntax-propertize.
(mhtml-syntax-propertize): Use `sgml-syntax-propertize`.

* lisp/textmodes/sgml-mode.el (sgml--syntax-propertize): New const,
extracted from sgml-syntax-propertize.
(sgml-syntax-propertize): Add optional `rules-function` arg.
2019-11-29 11:51:48 -05:00
Eli Zaretskii
8400766b43 Support showing one revision with Mercurial
* lisp/vc/vc-hg.el (vc-hg-print-log): Support 'with-diff'
invocation of "C-1 C-x v L".
2019-11-29 16:02:33 +02:00
Phil Sainty
17f9151f4a * lisp/so-long.el (so-long-variable-overrides): Set bidi-inhibit-bpa
(Bug#38407)
2019-11-30 01:02:16 +13:00
Eli Zaretskii
baa9ea7395 Document 'zap-up-to-char'
* doc/emacs/killing.texi (Other Kill Commands): Document
'zap-up-to-char'.

* lisp/simple.el (zap-to-char): Mention 'zap-up-to-char' in
the doc string.  (Bug#38392)
2019-11-29 12:17:14 +02:00
Eli Zaretskii
11baa417c5 Support showing one revision with Subversion
* lisp/vc/vc-svn.el (vc-svn-print-log): Support 'with-diff'
invocation of "C-1 C-x v L".
2019-11-29 12:00:59 +02:00
Eli Zaretskii
3fe9d86535 Minor fix in 'vc-print-root-log's prompt for revision ID
* lisp/vc/vc.el (vc-print-root-log): Remove text properties
from the default revision suggestion.
2019-11-29 11:34:07 +02:00
Eli Zaretskii
cf715848d8 Support showing one revision with Bazaar
* lisp/vc/vc-bzr.el (vc-bzr-print-log): Support 'with-diff'
invocation of "C-1 C-x v L".
2019-11-29 11:30:43 +02:00
Eli Zaretskii
6e41b08ea8 Improve documentation and UI of 'C-x v L'
* lisp/vc/vc.el (vc-print-root-log): Improve the wording of
the doc string and of the prompt for the root directory.

* etc/NEWS: Improve and expand the wording of the changes in
'C-x v L'.

* doc/emacs/maintaining.texi (VC Change Log): Improve and
clarify wording of the 'C-x v L' description.
2019-11-29 11:03:55 +02:00
Noam Postavsky
b2790db049 Improve errors & warnings due to fancy quoted vars (Bug#32939)
Add some hints to the message for byte compiler free & unused variable
warnings, and 'void-variable' errors where the variable has confusable
quote characters in it.
* lisp/help.el (uni-confusables), uni-confusables-regexp): New
constants.
(help-command-error-confusable-suggestions): New function, added to
`command-error-function'.
(help-uni-confusable-suggestions): New function.
* lisp/emacs-lisp/bytecomp.el (byte-compile-variable-ref):
* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Use it.

* lisp/emacs-lisp/lisp-mode.el
(lisp--match-confusable-symbol-character): New function.
(lisp-fdefs): Use it to fontify confusable characters with
font-lock-warning-face when they occur in symbol names.
* doc/lispref/modes.texi (Faces for Font Lock):
* doc/lispref/objects.texi (Basic Char Syntax): Recommend backslash
escaping of confusable characters, and mention new fontification.
* etc/NEWS: Announce the new fontification behavior.
* test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-fontify-confusables):
New test.
2019-11-28 18:10:07 -05:00
Filipp Gunbin
98f8c5fb07 Do not call custom-reevaluate-setting in dired-isearch-filenames-end
* lisp/dired-aux.el (dired-isearch-filenames-end)
  (dired-isearch-filenames, dired-isearch-filenames-regexp): Use
  temporary local variable for dired-isearch-filenames instead of
  custom-reevaluate-setting (Bug#30187).  Without this fix, the value
  set in .emacs with plain setq would be lost after one isearch.
2019-11-29 00:58:37 +03:00
Eli Zaretskii
5629af9cbe Allow disabling the BPA part of bidi reordering
* src/xdisp.c (syms_of_xdisp): New variable 'bidi-inhibit-bpa'.
* src/bidi.c (bidi_paired_bracket_type): If 'bidi-inhibit-bpa'
is non-nil, return BIDI_BRACKET_NONE for all characters.

* lisp/frame.el: Add 'bidi-inhibit-bpa' to the list of
variables whose changes require redisplay.  (Bug#38407)
2019-11-28 17:00:33 +02:00
Stefan Monnier
25d4bf4fe0 * lisp/subr.el (do-after-load-evaluation): Fix thinko 2019-11-27 22:37:11 -05:00
Juri Linkov
7921811726 Menu bar rearrangements, move Print menu items to submenu, etc. (bug#37594)
* lisp/menu-bar.el (menu-bar-print-menu): New defvar.
(menu-bar-file-menu): Move print entries to submenu.
Add menu entries for tab-new, tab-close, make-frame-on-monitor.
(menu-bar-showhide-menu): Add menu entry for global-tab-line-mode.
Don't add toggle-tab-bar-mode-from-frame on ns where it's unavailable.
(menu-bar-tools-menu): Add rgrep.

* lisp/bindings.el (next-buffer, previous-buffer): Advertise bindings
'C-x right' and 'C-x left' instead of 'XF86Forward' and 'XF86Back'.
2019-11-28 00:35:53 +02:00
Juri Linkov
f655967b83 'C-1 C-x v L' asks for revision and shows its log entry with diff (bug#38044)
* doc/emacs/maintaining.texi (VC Change Log): Explain the numeric prefix arg
of 'C-x v L' (vc-print-root-log).

* lisp/vc/vc-git.el (vc-git-print-log): Add command line option "-p"
when vc-log-view-type is 'with-diff'.
(vc-git-log-view-mode): Use long style when vc-log-view-type is 'with-diff'.

* lisp/vc/vc.el (vc-print-log-internal): Add optional arg 'type'.
(vc-log-internal-common): Use 'region-history-mode' when type is
'with-diff' and backend supports 'region-history-mode'.
(vc-print-root-log): Add optional arg 'revision'.  In interactive spec
read a revision when current-prefix-arg is 1.  Use current-prefix-arg
"as is" when it is a number.  Show revision in long style with diff
when limit is 1 and revision is non-nil.
2019-11-28 00:14:46 +02:00
Juri Linkov
b31a966e88 * lisp/image-mode.el: Resize image on window resizing (bug#32672)
* lisp/image-mode.el (image--window-change): New function.
(image--window-change-function): New variable.
(image-mode--setup-mode): Add buffer-local hook image--window-change
to window-size-change-functions, window-state-change-functions,
window-selection-change-functions.
2019-11-27 23:52:29 +02:00
Eli Zaretskii
2435f811b9 Make some anonymous faces extend to EOL
* lisp/vc/log-edit.el (log-edit-font-lock-keywords):
* lisp/mpc.el (mpc-separator):
* lisp/help.el (describe-key):
* lisp/help-fns.el (describe-symbol): Make the anonymous faces
extend to EOL.
2019-11-27 18:19:30 +02:00
Mattias Engdegård
4eb7db5d4b Mouse rectangular region selection (bug#38013)
Make it possible to select a rectangular region using the mouse.
The standard binding is C-M-mouse-1.

* lisp/mouse.el (mouse-scroll-subr): Add ADJUST argument.
(mouse-drag-region-rectangle): New.
* lisp/rect.el (rectangle--reset-point-crutches): New.
(rectangle--reset-crutches): Use 'rectangle--reset-point-crutches'.
* src/xdisp.c (remember_mouse_glyph, syms_of_xdisp):
Add 'mouse-fine-grained-tracking'.
* doc/lispref/commands.texi (Motion Events):
Document 'mouse-fine-grained-tracking'.
* doc/emacs/frames.texi (Mouse Commands):
* doc/emacs/killing.texi (Rectangles):
* etc/NEWS: Document rectangular selection with the mouse.
2019-11-27 13:40:29 +01:00
Andrii Kolomoiets
e7b4c248a6 Call vc-setup-buffer in vc-hg-log-incoming and vc-hg-log-outgoing
* lisp/vc/vc-hg.el (vc-hg-log-incoming, vc-hg-log-outgoing):
Call vc-setup-buffer.
2019-11-27 14:17:03 +02:00
Lars Ingebrigtsen
fd63880540 Make message-allow-no-recipients 'always work
* lisp/gnus/message.el (message-send): Make
message-allow-no-recipients 'always work.
2019-11-27 12:44:58 +01:00
Mattias Engdegård
215f678c72 Fine-grained NS modifier key settings (bug#38296)
For the ns-KEY-modifier and ns-right-KEY-modifier variables, KEY
being 'control', 'command', 'alternate' and 'function', allow
values on the form (:ordinary SYMBOL :function :SYMBOL :mouse SYMBOL),
so that the key can be used for different modifiers (or none) in
different contexts.  This is particularly useful for using the macOS
Option key for extended character entry while still using it as an
Emacs modifier for function keys and mouse clicks.

* src/nsterm.m (mod_of_kind, right_mod, nil_or_none): Helper functions.
(EV_MODIFIERS2): Add KIND argument.
(EV_MODIFIERS): Adapt call to EV_MODIFIERS2.
(ns_get_shifted_character): Use correct event kind for modifiers.
(ns-alternate-modifier, ns-right-alternate-modifier)
(ns-command-modifier, ns-right-command-modifier)
(ns-control-modifier, ns-right-control-modifier)
(ns-function-modifier): Rewrite doc strings for new data format.
(QCordinary, QCfunction, QCmouse): Define symbols.
* lisp/cus-start.el: Conform to new data types.
* doc/emacs/macos.texi (Mac / GNUstep Basics)
(Mac / GNUstep Customization): Improved documentation.
* etc/NEWS: Mention the change.
2019-11-27 11:14:55 +01:00
Juri Linkov
aa89c84e00 message uses minibuffer-message in the active minibuffer (bug#17272 bug#19064)
* doc/lispref/display.texi (Displaying Messages): Explain the
behavior of using minibuffer-message if the minibuffer is active.

* src/editfns.c (Fmessage_in_echo_area): New function with body
copied from Fmessage.
(Fmessage): Call minibuffer-message in the active minibuffer,
otherwise call Fmessage_in_echo_area.
(message-in-echo-area): New variable.

* lisp/isearch.el (isearch--momentary-message, isearch-message):
* lisp/minibuffer.el (minibuffer-message, minibuffer-completion-help):
Use 'message-in-echo-area' instead of 'message' where necessary.

* lisp/autorevert.el (auto-revert-handler):
* lisp/man.el (Man-bgproc-sentinel):
* lisp/subr.el (do-after-load-evaluation):
Revert recent changes that replaced 'message' with 'minibuffer-message'.
This is not needed anymore since 'message' uses 'minibuffer-message'
in the active minibuffer.
2019-11-27 01:43:49 +02:00
Juri Linkov
b3c0fb21bd Allow recursive minibuffers for yes-or-no-p and y-or-n-p (bug#17272 bug#19064)
* lisp/subr.el (y-or-n-p): Let-bind enable-recursive-minibuffers to t.

* src/fns.c (Fyes_or_no_p): Specbind Qenable_recursive_minibuffers to Qt.
2019-11-27 01:18:17 +02:00
Juri Linkov
6960a7543c * lisp/tab-bar.el (display-buffer-in-tab): New function (bug#38354) 2019-11-27 00:29:31 +02:00
Juanma Barranquero
75b41a38dd Fix previous change to (next|previous)-buffer
* lisp/window.el (next-buffer, previous-buffer): If no other
buffer is available, signal 'user-error' only when called
interactively.
2019-11-26 22:35:04 +01:00
Stefan Monnier
50b52390ee * lisp/subr.el (do-after-load-evaluation): Handle batch mode as well 2019-11-26 13:58:39 -05:00
Stefan Monnier
52eca2d3bd * lisp/progmodes/asm-mode.el (asm-mode-map): Obey electric-indent-mode 2019-11-26 09:05:36 -05:00
Juanma Barranquero
e495dbea70 (next|previous)-buffer no longer fail silently (bug#38384)
* lisp/window.el (next-buffer, previous-buffer):
Signal 'user-error' if there is no buffer to switch to.

* etc/NEWS: Document it.
2019-11-26 15:03:57 +01:00
Juanma Barranquero
90a7cd073b lisp/auth-source.el: Depend on cl-lib unconditionally
A change in 2016-04-24 introduced a run-time dependency on cl-subseq.
2019-11-26 14:00:25 +01:00
Juanma Barranquero
db2d6398a5 lisp/auth-source-pass.el: Require cl-lib unconditionally
Changes in 2019-05-05 and 2019-05-14 introduced run-time dependencies
on cl-maplist and cl-remove-if-not.
2019-11-26 12:55:29 +01:00
Martin Rudalics
261b060f12 2019-11-26 Martin Rudalics <rudalics@gmx.at>
* lisp/window.el (switch-to-visible-buffer): Declare obsolete.
(switch-to-prev-buffer-skip): New option.
(switch-to-prev-buffer, switch-to-next-buffer): Obey
'switch-to-prev-buffer-skip'.
* doc/lispref/windows.texi (Window History): Remove
description of 'switch-to-visible-buffer'.  Describe new
option 'switch-to-prev-buffer-skip'
* etc/NEWS: Mention switch from 'switch-to-visible-buffer' to
'switch-to-prev-buffer-skip'.
2019-11-26 10:13:12 +01:00