]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoAnother tweak to NEWS scratch/jit-lock-antiblink-cleaned-up
João Távora [Sun, 1 Dec 2019 17:49:33 +0000 (17:49 +0000)]
Another tweak to NEWS

4 years agoAdjust jit-lock-antiblink documentation again
João Távora [Sat, 30 Nov 2019 17:44:55 +0000 (17:44 +0000)]
Adjust jit-lock-antiblink documentation again

* etc/NEWS: Mention default value of jit-lock-antiblink-grace.

* lisp/jit-lock.el (jit-lock-antiblink-grace): Simplifify docstring.
(jit-lock--antiblink-post-command): Rework comment.  Cleanup
whitespace.

4 years agoTweak jit-lock-antiblink-grace's docs and code style
João Távora [Tue, 26 Nov 2019 02:23:47 +0000 (02:23 +0000)]
Tweak jit-lock-antiblink-grace's docs and code style

* lisp/jit-lock.el (jit-lock-antiblink-grace): Adjust docstring.
(jit-lock--antiblink-line-beginning-position)
(jit-lock--antiblink-string-or-comment): Rename from
jit-lock--antiblink-l-b-p, jit-lock--antiblink-i-s-o-c.
(jit-lock--antiblink-post-command): Use new variables.  Don't
message.

* etc/NEWS (jit-lock-antiblink-grace): Adjust entry.

4 years ago* etc/NEWS: Mention jit-lock-antiblink-grace
João Távora [Thu, 10 Oct 2019 21:45:23 +0000 (22:45 +0100)]
* etc/NEWS: Mention jit-lock-antiblink-grace

4 years agoRework jit-lock-antiblink-grace after Stefan's comments
João Távora [Wed, 31 Jul 2019 21:07:41 +0000 (22:07 +0100)]
Rework jit-lock-antiblink-grace after Stefan's comments

* lisp/jit-lock.el (jit-lock--antiblink-l-b-p): Rename from
jit-lock--antiblink-l-l-b.
(jit-lock--antiblink-grace-timer): Add period to docstring.
(jit-lock--antiblink-post-command): Rework after Stefan's
comments.

4 years agoNew jit-lock-antiblink-grace feature
João Távora [Fri, 12 Jul 2019 18:27:53 +0000 (19:27 +0100)]
New jit-lock-antiblink-grace feature

* lisp/jit-lock.el (jit-lock-antiblink-grace): New variable.
(jit-lock--antiblink-grace-timer, jit-lock--antiblink-l-l-b)
(jit-lock--antiblink-i-s-o-c): New helpers.
(jit-lock-mode): Tweak post-command-hook and
jit-lock-context-timer.
(jit-lock--antiblink-post-command): New helper.

4 years agoTemporary enable transient-mark-mode for rectangle selection
Mattias Engdegård [Sun, 1 Dec 2019 17:31:34 +0000 (18:31 +0100)]
Temporary enable transient-mark-mode for rectangle selection

* lisp/mouse.el (mouse-drag-region-rectangle):
Enable transient-mark-mode during selection (bug#38431).

4 years ago; Auto-commit of loaddefs files.
Glenn Morris [Sun, 1 Dec 2019 14:27:14 +0000 (06:27 -0800)]
; Auto-commit of loaddefs files.

4 years agoSuppress superfluous messages in tramp-tests
Michael Albinus [Sun, 1 Dec 2019 11:25:15 +0000 (12:25 +0100)]
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'.

4 years agoibuffer-mark-by-content-regexp: don't depend on `cl-some'
Juanma Barranquero [Sun, 1 Dec 2019 09:41:49 +0000 (10:41 +0100)]
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.

4 years agoibuffer-do-isearch: don't depend on `cl-values-list' (bug#38430)
Juanma Barranquero [Sun, 1 Dec 2019 09:12:12 +0000 (10:12 +0100)]
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.

4 years agoImproved mouse rectangle selection robustness (bug#38013)
Mattias Engdegård [Sat, 30 Nov 2019 10:37:04 +0000 (11:37 +0100)]
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.

4 years ago* lisp/tab-line.el (tab-line-auto-hscroll): Don't let-bind buffer-local values
Juri Linkov [Sat, 30 Nov 2019 21:42:37 +0000 (23:42 +0200)]
* 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.

4 years ago* lisp/gnus/gnus-win.el (gnus-configure-frame): Check for window-live-p.
Juri Linkov [Sat, 30 Nov 2019 21:36:52 +0000 (23:36 +0200)]
* lisp/gnus/gnus-win.el (gnus-configure-frame): Check for window-live-p.

* doc/misc/gnus.texi (Tabbed Interface): New node.  (bug#37998)

4 years ago* lisp/subr.el: Add discard-input to more functions.
Juri Linkov [Sat, 30 Nov 2019 21:33:41 +0000 (23:33 +0200)]
* 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

4 years agoCC Mode. Fix fontification bug with unterminated quotes on adjacent lines
Alan Mackenzie [Sat, 30 Nov 2019 21:22:55 +0000 (21:22 +0000)]
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.

4 years ago* lisp/image.el: Support image scaling with mouse in other buffer.
Juri Linkov [Sat, 30 Nov 2019 21:21:00 +0000 (23:21 +0200)]
* 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.

4 years agoUse run-with-idle-timer instead of debounce for responsive image scaling.
Juri Linkov [Sat, 30 Nov 2019 21:16:03 +0000 (23:16 +0200)]
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.

4 years agoFix compilation warning in vc-hg.el
Juanma Barranquero [Sat, 30 Nov 2019 12:41:30 +0000 (13:41 +0100)]
Fix compilation warning in vc-hg.el

* lisp/vc/vc-hg.el (vc-read-revision): Declare.

4 years agoMinor fixes in last change
Eli Zaretskii [Sat, 30 Nov 2019 12:06:19 +0000 (14:06 +0200)]
Minor fixes in last change

* doc/emacs/maintaining.texi (Switching Branches)
(Pulling / Pushing, Merging): Fix markup of shell commands.

4 years agovc-hg: prompt for branch to merge
Andrii Kolomoiets [Sat, 23 Nov 2019 16:43:47 +0000 (18:43 +0200)]
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

4 years agoFix preserving cell boundaries in table.el after <delete>
Michal Sojka [Sat, 23 Nov 2019 22:32:39 +0000 (23:32 +0100)]
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)

4 years agoAdd ':extend' attribute to faces and themes
Eli Zaretskii [Sat, 30 Nov 2019 11:27:11 +0000 (13:27 +0200)]
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.

4 years ago* src/lread.c (syms_of_lread): Doc fix.
Juanma Barranquero [Sat, 30 Nov 2019 09:31:45 +0000 (10:31 +0100)]
* src/lread.c (syms_of_lread): Doc fix.

4 years agoFix image scaling with masks (bug#38109)
Alan Third [Sat, 9 Nov 2019 17:04:25 +0000 (17:04 +0000)]
Fix image scaling with masks (bug#38109)

* src/image.c (lookup_image): Move call to image_set_transform after
postprocess_image.
(image_create_x_image_and_pixmap_1): Use new function.
(image_set_transform): Apply the transform to the mask too.
(x_create_xrender_picture): New function.
(Create_Pixmap_From_Bitmap_Data):
(xpm_load): Use new function.
* src/xterm.c (x_composite_image): Use PictOpOver when there is a mask
so the transparency is honoured.
(x_draw_image_foreground_1): Use x_composite_image.

4 years ago* lisp/gnus/gnus.el (gnus-info): Define with `cl-defstruct`
Stefan Monnier [Fri, 29 Nov 2019 17:26:31 +0000 (12:26 -0500)]
* 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.

4 years ago* lisp/textmodes/mhtml-mode.el: Fix bug#38372
Stefan Monnier [Fri, 29 Nov 2019 16:51:48 +0000 (11:51 -0500)]
* 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.

4 years agoAdd nsm-should-check IPv6 local subnet tests
Robert Pluim [Mon, 18 Nov 2019 10:07:51 +0000 (11:07 +0100)]
Add nsm-should-check IPv6 local subnet tests

* test/lisp/net/nsm-tests.el (nsm-check-local-subnet-ipv6): Now
that IPv6 addresses are returned from network-interface-list, test
nsm-should check and nsm-network-same-subnet for IPv6 as well.

4 years agoSupport showing one revision with Mercurial
Eli Zaretskii [Fri, 29 Nov 2019 14:02:33 +0000 (16:02 +0200)]
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".

4 years ago* lisp/so-long.el (so-long-variable-overrides): Set bidi-inhibit-bpa
Phil Sainty [Fri, 29 Nov 2019 11:57:21 +0000 (00:57 +1300)]
* lisp/so-long.el (so-long-variable-overrides): Set bidi-inhibit-bpa

(Bug#38407)

4 years agoDocument 'zap-up-to-char'
Eli Zaretskii [Fri, 29 Nov 2019 10:17:14 +0000 (12:17 +0200)]
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)

4 years agoSupport showing one revision with Subversion
Eli Zaretskii [Fri, 29 Nov 2019 10:00:59 +0000 (12:00 +0200)]
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".

4 years agoMinor fix in 'vc-print-root-log's prompt for revision ID
Eli Zaretskii [Fri, 29 Nov 2019 09:34:07 +0000 (11:34 +0200)]
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.

4 years agoSupport showing one revision with Bazaar
Eli Zaretskii [Fri, 29 Nov 2019 09:30:43 +0000 (11:30 +0200)]
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".

4 years agoImprove indexing of VC log commands
Eli Zaretskii [Fri, 29 Nov 2019 09:09:19 +0000 (11:09 +0200)]
Improve indexing of VC log commands

* doc/emacs/maintaining.texi (VC Change Log): Add missing
index entries.

4 years agoImprove documentation and UI of 'C-x v L'
Eli Zaretskii [Fri, 29 Nov 2019 09:03:55 +0000 (11:03 +0200)]
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.

4 years agoImprove errors & warnings due to fancy quoted vars (Bug#32939)
Noam Postavsky [Sat, 10 Mar 2018 23:12:55 +0000 (18:12 -0500)]
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.

4 years agoStop signaling an error when reading "smart quotes" in symbols
Noam Postavsky [Sat, 10 Mar 2018 23:20:45 +0000 (18:20 -0500)]
Stop signaling an error when reading "smart quotes" in symbols

Revert commits from 2018-01-28 "Fix round tripping of read->print for
symbols with strange quotes", and 2017-07-22 "Signal error for symbol
names with strange quotes (Bug#2967)".
* etc/NEWS: Remove corresponding entries.
* src/character.c (confusable_symbol_character_p):
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Remove.
* src/lread.c (read1): Don't signal error on confusable character.
* src/print.c (print_object): Don't escape confusable characters.

4 years agoDo not call custom-reevaluate-setting in dired-isearch-filenames-end
Filipp Gunbin [Thu, 28 Nov 2019 21:54:52 +0000 (00:54 +0300)]
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.

4 years agoImprove PY-b5 input methods
Eli Zaretskii [Thu, 28 Nov 2019 15:42:47 +0000 (17:42 +0200)]
Improve PY-b5 input methods

* leim/leim-ext.el ("quail/PY-b5"): Assign key sequence for
U+25CB (WHITE CIRCLE).  (Bug#3179)

4 years agoAllow disabling the BPA part of bidi reordering
Eli Zaretskii [Thu, 28 Nov 2019 15:00:33 +0000 (17:00 +0200)]
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)

4 years agoSupport wlan in network-interface-list on pre-Vista Windows
Robert Pluim [Wed, 27 Nov 2019 09:41:32 +0000 (10:41 +0100)]
Support wlan in network-interface-list on pre-Vista Windows

* src/w32.c (network_interface_list): Check for 'Wireless' in
adapter description to support pre-Vista Windows.

4 years ago* lisp/subr.el (do-after-load-evaluation): Fix thinko
Stefan Monnier [Thu, 28 Nov 2019 03:37:11 +0000 (22:37 -0500)]
* lisp/subr.el (do-after-load-evaluation): Fix thinko

4 years agoMenu bar rearrangements, move Print menu items to submenu, etc. (bug#37594)
Juri Linkov [Wed, 27 Nov 2019 22:35:53 +0000 (00:35 +0200)]
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'.

4 years ago'C-1 C-x v L' asks for revision and shows its log entry with diff (bug#38044)
Juri Linkov [Wed, 27 Nov 2019 22:14:46 +0000 (00:14 +0200)]
'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.

4 years ago* lisp/image-mode.el: Resize image on window resizing (bug#32672)
Juri Linkov [Wed, 27 Nov 2019 21:52:29 +0000 (23:52 +0200)]
* 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.

4 years agoMake some anonymous faces extend to EOL
Eli Zaretskii [Wed, 27 Nov 2019 16:19:30 +0000 (18:19 +0200)]
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.

4 years ago; Fix recent change in w32.c
Eli Zaretskii [Wed, 27 Nov 2019 16:16:37 +0000 (18:16 +0200)]
; Fix recent change in w32.c

* src/w32.c (network_interface_list): Correct an embarrassing
typo and cleanup the code.

4 years agoMouse rectangular region selection (bug#38013)
Mattias Engdegård [Fri, 25 Oct 2019 09:16:39 +0000 (11:16 +0200)]
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.

4 years agoCall vc-setup-buffer in vc-hg-log-incoming and vc-hg-log-outgoing
Andrii Kolomoiets [Wed, 27 Nov 2019 12:13:12 +0000 (14:13 +0200)]
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.

4 years agoFix documentation of eieio-class-name
Lars Ingebrigtsen [Wed, 27 Nov 2019 12:12:39 +0000 (13:12 +0100)]
Fix documentation of eieio-class-name

* doc/misc/eieio.texi (Predicates): Update the documentation of
eieio-class-name to say what it really returns (bug#38365).

4 years agoMake message-allow-no-recipients 'always work
Lars Ingebrigtsen [Wed, 27 Nov 2019 11:44:58 +0000 (12:44 +0100)]
Make message-allow-no-recipients 'always work

* lisp/gnus/message.el (message-send): Make
message-allow-no-recipients 'always work.

4 years agoFine-grained NS modifier key settings (bug#38296)
Mattias Engdegård [Mon, 25 Nov 2019 17:54:20 +0000 (18:54 +0100)]
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.

4 years agomessage uses minibuffer-message in the active minibuffer (bug#17272 bug#19064)
Juri Linkov [Tue, 26 Nov 2019 23:43:49 +0000 (01:43 +0200)]
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.

4 years agoAllow recursive minibuffers for yes-or-no-p and y-or-n-p (bug#17272 bug#19064)
Juri Linkov [Tue, 26 Nov 2019 23:18:17 +0000 (01:18 +0200)]
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.

4 years ago* lisp/tab-bar.el (display-buffer-in-tab): New function (bug#38354)
Juri Linkov [Tue, 26 Nov 2019 22:29:31 +0000 (00:29 +0200)]
* lisp/tab-bar.el (display-buffer-in-tab): New function (bug#38354)

4 years agoetags: remove some arbitrary limits
Paul Eggert [Tue, 26 Nov 2019 21:53:41 +0000 (13:53 -0800)]
etags: remove some arbitrary limits

etags had undefined behavior if input files, lines, tags, etc.,
had more than INT_MAX bytes.  Clean up the usage of integer types
to fix the overflow errors I found.
* admin/merge-gnulib (GNULIB_MODULES): Add mempcpy.
* lib-src/etags.c: Include inttypes.h, intprops.h.
(memcpyz): New function.  Use it to simplify several occurrences
of memcpy followed by storing a trailing '\0'.
(xnew): Use xnmalloc, to catch overflow on integer multiplication.
(xrnew): Change last arg to multiplier.  The type is not needed.
All callers changed.
(node, lineno, charno, linecharno, invalidcharno, make_tag):
(pfnote, add_node, number_len, C_symtype, lbz, Makefile_targets)
(readline):
Use intmax_t for line numbers and character positions, instead of
int or long.
(linebuffer, make_tag, pfnote, total_size_of_entries, put_entry)
(in_word_set, C_symtype, token, cstack, pushclass_above):
(popclass_above, write_classname, consider_token, C_entries)
(Ruby_functions, Makefile_targets, Lua_functions, TeX_commands)
(TeX_decode_env, erlang_func, erlang_attribute, erlang_atom)
(substitute, regex_tag_multiline, nocase_tail, readline_interval)
(readline, savenstr, concat, etags_getcwd, relative_filename)
(linebuffer_setlen):
Use ptrdiff_t for object sizes, instead of int or long or unsigned
or size_t.
(write_classname, C_entries):
Avoid sprintf, as the result could exceed INT_MAX bytes
and then behavior goes haywire.
(main): Use int, instead of unsigned, for argv counts.
(get_language_from_filename): Use bool for boolean.
(Ruby_functions): Prefer strcpy to memcpy when copying "=".
(linebuffer_setlen): Use ‘if’ instead of ‘while’.
(memory_full, xnmalloc, xnrealloc): New functions.
(xmalloc): Use memory_full, and take a ptrdiff_t instead of a size_t.
(xrealloc): Remove; no longer needed.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/mempcpy.c, m4/mempcpy.m4: New files, copied from Gnulib.

4 years agoFix previous change to (next|previous)-buffer
Juanma Barranquero [Tue, 26 Nov 2019 21:35:04 +0000 (22:35 +0100)]
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.

4 years agoUpdate from Gnulib
Paul Eggert [Tue, 26 Nov 2019 21:14:42 +0000 (13:14 -0800)]
Update from Gnulib

This incorporates:
2019-11-24 Fix errors in C++ mode on mingw
2019-11-24 time_r: Fix for mingw (regression from 2019-11-16)
2019-11-24 sys_time: Fix errors in C++ mode on mingw
2019-11-22 intprops: INT_MULTIPLY_WRAPV speedup for GCC 8.4+
2019-11-21 Disable many _GL_CXXALIASWARN on non-glibc
2019-11-21 Fix various errors in _GL_CXXALIAS_SYS invocations
2019-11-19 intprops: INT_MULTIPLY_WRAPV speedup for GCC 9.3+
2019-11-18 stdint: Define [u]intptr_t correctly on 64-bit native Windows
2019-11-18 stdint: Fix value of WINT_MAX when we override wint_t
2019-11-18 stdint: Avoid "conflicting types" error on mingw 5.22
2019-11-16 time_r: Fix for mingw
2019-11-06 regex: now back in sync with glibc
* lib/intprops.h, lib/regexec.c, lib/signal.in.h:
* lib/stdint.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/string.in.h, lib/sys_select.in.h, lib/sys_time.in.h:
* lib/time.in.h, lib/unistd.in.h, m4/time_r.m4:
Copy from Gnulib.

4 years ago* lisp/subr.el (do-after-load-evaluation): Handle batch mode as well
Stefan Monnier [Tue, 26 Nov 2019 18:58:39 +0000 (13:58 -0500)]
* lisp/subr.el (do-after-load-evaluation): Handle batch mode as well

4 years agoUse 127.0.0.1 in nsm-tests
Robert Pluim [Tue, 26 Nov 2019 18:07:42 +0000 (19:07 +0100)]
Use 127.0.0.1 in nsm-tests

Winsock doesn't like "127.1"

* test/lisp/net/nsm-tests.el (nsm-check-local-subnet-ipv4): Spell
numeric localhost as "127.0.0.1" instead of "127.1".

4 years ago* test/lisp/minibuffer-tests.el (completion-table-test-quoting): New test
Stefan Monnier [Tue, 26 Nov 2019 18:18:18 +0000 (13:18 -0500)]
* test/lisp/minibuffer-tests.el (completion-table-test-quoting): New test

* test/data/minibuffer-test-cttq$tion: New file-name test data.

4 years agoSupport ':extend' in faces defined by list of key/value pairs
Eli Zaretskii [Tue, 26 Nov 2019 17:29:45 +0000 (19:29 +0200)]
Support ':extend' in faces defined by list of key/value pairs

* src/xfaces.c: Update and improve commentary at the beginning
of the file.
(face_attr_sym): New static array.
(init_xfaces): Initialize 'face_attr_sym'.
(merge_face_ref): Handle the :extend attribute in faces
specified as lists of key/value pairs.  (Bug#37774)

4 years agoFix MS-Windows build with mingw.org's MinGW
Eli Zaretskii [Tue, 26 Nov 2019 17:13:12 +0000 (19:13 +0200)]
Fix MS-Windows build with mingw.org's MinGW

mingw.org's MinGW by default targets Windows 9X, so
_WIN32_WINNT is set to a value that bypasses declarations
in system headers we need to compile network_interface_list.
Also, the code needed a workaround for Windows XP, where
some functionality is missing from the GetAdaptersAddresses
API.

* src/w32.c (_WIN32_WINNT): Define to 0x0501, if the value is
lower, temporarily while processing iphlpapi.h.
(address_prefix_match): New helper function.
(network_interface_list): Work around the fact that the
OnLinkPrefixLength member of IP_ADAPTER_UNICAST_ADDRESS is not
available when _WIN32_WINNT < 0x0600.  On Windows XP use
special code that calls address_prefix_match to compute the
network prefix length.

4 years ago* lisp/progmodes/asm-mode.el (asm-mode-map): Obey electric-indent-mode
Stefan Monnier [Tue, 26 Nov 2019 14:04:12 +0000 (09:04 -0500)]
* lisp/progmodes/asm-mode.el (asm-mode-map): Obey electric-indent-mode

4 years ago(next|previous)-buffer no longer fail silently (bug#38384)
Juanma Barranquero [Tue, 26 Nov 2019 14:03:57 +0000 (15:03 +0100)]
(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.

4 years agolisp/auth-source.el: Depend on cl-lib unconditionally
Juanma Barranquero [Tue, 26 Nov 2019 13:00:25 +0000 (14:00 +0100)]
lisp/auth-source.el: Depend on cl-lib unconditionally

A change in 2016-04-24 introduced a run-time dependency on cl-subseq.

4 years agolisp/auth-source-pass.el: Require cl-lib unconditionally
Juanma Barranquero [Tue, 26 Nov 2019 11:55:29 +0000 (12:55 +0100)]
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.

4 years ago2019-11-26 Martin Rudalics <rudalics@gmx.at>
Martin Rudalics [Tue, 26 Nov 2019 09:13:12 +0000 (10:13 +0100)]
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'.

4 years agoFix auth-source password lookup
Alex Murray [Mon, 25 Nov 2019 11:48:07 +0000 (22:18 +1030)]
Fix auth-source password lookup

* lisp/net/network-stream.el
(network-stream-certificate): Ensure :port is specified as a string to
'auth-source-search' (Bug#38371).

Copyright-paperwork-exempt: yes

4 years agoExtend network-interface-list to return IPv6 and network info
Robert Pluim [Fri, 15 Nov 2019 10:11:30 +0000 (11:11 +0100)]
Extend network-interface-list to return IPv6 and network info

Bug#38218

* src/process.c (Fnetwork_interface_list): Extend argument list to
allow requesting full network info and/or IPv4/IPv6 info.
(network_interface_list) [HAVE_GETIFADDRS]: Use getifaddrs to retrieve
interface IP addresses.

* src/process.h: Update prototype of network_interface_list.

* src/w32.c (g_b_init_get_adapters_addresses): New init flag.
(globals_of_w32): Initialize it.
(GetAdaptersAddresses_Proc): New function typedef.
(get_adapters_addresses): New wrapper function.
(init_winsock): Load htonl and ntohl.
(sys_htonl, sys_ntohl): New wrapper functions.
(network_interface_list): Implement in terms of
get_adapters_addresses.

* nt/inc/sys/socket.h: Add sys_htonl and sys_ntohl prototypes.

* etc/NEWS: Announce IPv4/IPv6 changes in network-interface-list.

* doc/lispref/processes.texi (Misc Network): Document updated arglist
and return values for network-interface-list.

4 years agoFix previous message.el point-restoring fix
Lars Ingebrigtsen [Tue, 26 Nov 2019 01:40:59 +0000 (02:40 +0100)]
Fix previous message.el point-restoring fix

* lisp/gnus/message.el (message-send-and-exit): Restore window
point before burying buffer so we actually bury the buffer.

4 years agoRemove outdated documentation
Lars Ingebrigtsen [Tue, 26 Nov 2019 01:36:11 +0000 (02:36 +0100)]
Remove outdated documentation

* doc/misc/eieio.texi (Predicates): Remove documentation of
same-class-fast-p, which was removed some years back (bug#38362).

4 years agoFix test failures of test/lisp/auth-source-pass-tests.el
João Távora [Mon, 25 Nov 2019 22:45:24 +0000 (22:45 +0000)]
Fix test failures of test/lisp/auth-source-pass-tests.el

Failures introduced by recent "Make auth-source-pass-search understand
port lists", commit 92fda5a7f92162d610d57df14372bcfcee1f01b6.

* lisp/auth-source-pass.el
(auth-source-pass--generate-entry-suffixes): Fix test failures.

4 years ago; * etc/NEWS: Elaborate the entry about ':extend' face attribute.
Eli Zaretskii [Mon, 25 Nov 2019 18:58:40 +0000 (20:58 +0200)]
; * etc/NEWS: Elaborate the entry about ':extend' face attribute.

4 years agoCorrect small misprint in defcustom's docstring
Filipp Gunbin [Mon, 25 Nov 2019 18:12:46 +0000 (21:12 +0300)]
Correct small misprint in defcustom's docstring

* lisp/custom.el (defcustom): Correct misprint in docstring.

4 years agoFix face merging when some have :extend non-nil and some are inherited
Eli Zaretskii [Mon, 25 Nov 2019 15:52:24 +0000 (17:52 +0200)]
Fix face merging when some have :extend non-nil and some are inherited

* src/xfaces.c (face_inherited_attr): New function.
(merge_named_face): Call 'face_inherited_attr' when testing
whether a face that inherits from another fits the filtering
criteria specified by ATTR_FILTER.
(merge_face_vectors): Revert the changes made in this function
for filtering by ATTR_FILTER, and remove that argument as
well.  These tests are now completely done by the caller, see
'merge_named_face'.  (Bug#37774)

4 years agoHandle auth-source-search failures in open-network-stream
Robert Pluim [Sun, 17 Nov 2019 20:21:48 +0000 (21:21 +0100)]
Handle auth-source-search failures in open-network-stream

If the user cancels the gpg decryption pop-up, auth-source-search
fails *and* epa pops up an error buffer.  Fix epa to allow suppressing
that, and ignore errors returned from auth-source-search.

* lisp/epa.el (epa-suppress-error-buffer): New defvar.  Bind non-nil
to stop epa popping up an error buffer.

* lisp/net/network-stream.el: require epa when byte-compiling.
(network-stream-certificate): ignore errors when calling
auth-source-search, and suppress the epa error buffer.

4 years agoAdd eassert check for bad default face
Paul Eggert [Sat, 23 Nov 2019 23:47:28 +0000 (15:47 -0800)]
Add eassert check for bad default face

* src/xdisp.c (append_space_for_newline): Add an eassert check
that default_face is not null, by calling FACE_FROM_ID instead of
FACE_FROM_ID_OR_NULL.  Initialize a local only if needed.

4 years agoPort gnutls.c to --enable-gcc-warnings --without-gnutls
Paul Eggert [Sat, 23 Nov 2019 23:28:45 +0000 (15:28 -0800)]
Port gnutls.c to --enable-gcc-warnings --without-gnutls

* src/gnutls.c: Move the "#ifdef HAVE_GNUTLS" earlier, so
that "./configure --enable-gcc-warnings --without-gnutls"
does not complain about macros being defined but never used.
Indent "#" directives more consistently.

4 years agoRework previous fix to bug#38222
Juanma Barranquero [Sat, 23 Nov 2019 22:32:33 +0000 (23:32 +0100)]
Rework previous fix to bug#38222

* lisp/help.el (help--doc-without-fn): Remove.
(describe-mode): Use help-split-fundoc instead.

4 years agoMake help-split-fundoc more flexible about what returns
Juanma Barranquero [Sat, 23 Nov 2019 22:29:53 +0000 (23:29 +0100)]
Make help-split-fundoc more flexible about what returns

* lisp/help.el (help-split-fundoc): New arg SECTION to return
only the usage or doc parts of the docstring, or both even if
there is no usage.

* test/lisp/help-tests.el: New file.

4 years agoUse new macro debounce-reduce to make mouse scaling of images more responsive
Juri Linkov [Sat, 23 Nov 2019 22:22:46 +0000 (00:22 +0200)]
Use new macro debounce-reduce to make mouse scaling of images more responsive

* lisp/emacs-lisp/timer.el (debounce, debounce-reduce): New macros.

* lisp/image.el (image-increase-size, image-decrease-size):
Use funcall to call image--change-size-function.
(image--change-size-function): Move code from defun of
image--change-size to defvar that has the value of lambda
returned from debounce-reduce.  (Bug#38187)

4 years agoDefault network-stream-use-client-certificates to nil
Robert Pluim [Mon, 18 Nov 2019 09:48:29 +0000 (10:48 +0100)]
Default network-stream-use-client-certificates to nil

* lisp/net/network-stream.el (network-stream-use-client-certificates):
Default to nil.
(open-network-stream): Adapt description to new default of
network-stream-use-client-certificates.

* etc/NEWS: network-stream-use-client-certificates defaults to nil
now.

* doc/lispref/processes.texi (Network): Flip
network-stream-use-client-certificates description.

* doc/misc/auth.texi (Help for users): Mention
network-stream-use-client-certificates.

4 years agoHave what-cursor-position optionally show character name
Robert Pluim [Tue, 19 Nov 2019 10:33:10 +0000 (11:33 +0100)]
Have what-cursor-position optionally show character name

* lisp/simple.el (what-cursor-show-names): New defcustom, default nil.
(what-cursor-position): Show character names if what-cursor-show-names
is non-nil.

* doc/emacs/basic.texi (Position Info): Add what-cursor-show-names
description.

* etc/NEWS: Announce what-cursor-show-names.

4 years agoAlways expand "total" in dired
Christopher Schmidt [Sat, 23 Nov 2019 14:45:56 +0000 (15:45 +0100)]
Always expand "total" in dired

* lisp/files.el (insert-directory): Always replace "total" with
"total used in directory", even when we don't have free disk space
(bug#13191).  This makes the display more consistent.

4 years agoFix edebug instrumentation removing from advised functions
Michael Heerdegen [Thu, 14 Nov 2019 16:47:51 +0000 (17:47 +0100)]
Fix edebug instrumentation removing from advised functions

* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Handle
advised functions correctly.

4 years agoImprove indexing of modifier keys
Eli Zaretskii [Sat, 23 Nov 2019 11:37:28 +0000 (13:37 +0200)]
Improve indexing of modifier keys

* doc/emacs/commands.texi (User Input): Add index entry for
the Alt key serving as Meta.
* doc/emacs/custom.texi (Modifier Keys): Add index entries for
Alt, Super, and Hyper modifier keys.  (Bug#38315)

4 years agoFix cursor display at EOL before extended face
Eli Zaretskii [Sat, 23 Nov 2019 10:43:49 +0000 (12:43 +0200)]
Fix cursor display at EOL before extended face

* src/xdisp.c (extend_face_to_end_of_line): Make sure the
character position of the stretch glyph inserted to extend the
face is zero, as various other parts of the display code rely
on that.  (Bug#38330)

4 years agoFix and speed up en/decoding of UTF-8 strings
Eli Zaretskii [Sat, 23 Nov 2019 09:27:43 +0000 (11:27 +0200)]
Fix and speed up en/decoding of UTF-8 strings

* src/coding.c (get_char_bytes, encode_string_utf_8)
(decode_string_utf_8): Fix commentary.
(encode_string_utf_8): Return the original ASCII string only
if NOCOPY is non-zero.
(decode_string_utf_8): Accept 2 additional arguments STR and
STR_LEN, which allow to pass the input text as a C string.
(make_string_from_utf8): Delegate the job to decode_string_utf_8.
* src/coding.h: Update the prototype of decode_string_utf_8.
* src/json.c (json_encode): Call encode_string_utf_8.

4 years ago* lisp/minibuffer.el (completion-flex-nospace): Default to t.
João Távora [Sat, 23 Nov 2019 00:30:49 +0000 (00:30 +0000)]
* lisp/minibuffer.el (completion-flex-nospace): Default to t.

4 years agohelp-follow-symbol now complains if no symbol found (bug#38248)
Juanma Barranquero [Fri, 22 Nov 2019 20:10:49 +0000 (21:10 +0100)]
help-follow-symbol now complains if no symbol found (bug#38248)

* lisp/help-mode.el (help-follow-symbol): Signal 'user-error' if
there's no symbol at POS.

* etc/NEWS: Document it.

4 years agoCheck gnus-mailing-list-groups in turn-on-gnus-mailing-list-mode
Filipp Gunbin [Fri, 22 Nov 2019 17:49:02 +0000 (20:49 +0300)]
Check gnus-mailing-list-groups in turn-on-gnus-mailing-list-mode

* lisp/gnus/gnus-ml.el (turn-on-gnus-mailing-list-mode): Check also
gnus-mailing-list-groups variable.

4 years agoMake gnus-mailing-list-archive recognize https
Filipp Gunbin [Fri, 22 Nov 2019 17:37:27 +0000 (20:37 +0300)]
Make gnus-mailing-list-archive recognize https

* /lisp/gnus/gnus-ml.el (gnus-mailing-list-archive): Accept https in
regexp.

4 years agoUnify docstrings of Gnus summary's copy/move/crosspost article functions
Filipp Gunbin [Fri, 22 Nov 2019 16:23:51 +0000 (19:23 +0300)]
Unify docstrings of Gnus summary's copy/move/crosspost article functions

* lisp/gnus/gnus-sum.el (gnus-summary-copy-article)
(gnus-summary-crosspost-article): Make docstrings refer to
gnus-summary-move-article.

4 years agoRefix conditional step clauses in cl-loop
dickmao [Fri, 22 Nov 2019 14:53:58 +0000 (15:53 +0100)]
Refix conditional step clauses in cl-loop

* lisp/emacs-lisp/cl-macs.el
(cl--loop-bindings, cl--loop-symbol-macs, cl-loop):
Add cl--loop-conditions, remove cl--loop-guard-cond.
(cl--push-clause-loop-body): Apply clause to both cl--loop-conditions
and cl--loop-body
(cl--parse-loop-clause): Use cl--push-clause-loop-body.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-and-assignment):
Use docstring.
(cl-macs-loop-for-as-arith): Removed expected failure.
(cl-macs-loop-conditional-step-clauses): Add some tests (bug#29799).

4 years agoFix uses of inhibit-message in package.el
Eli Zaretskii [Fri, 22 Nov 2019 14:36:25 +0000 (16:36 +0200)]
Fix uses of inhibit-message in package.el

* lisp/emacs-lisp/package.el (package-generate-autoloads)
(package--compile, package--save-selected-packages): Don't use
'inhibit-message' to bind 'noninteractive' and 'save-silently',
since 'inhibit-message' already disables all messages.
(Bug#38264)

4 years agofont-lock special attributes in python-mode
Hong Xu [Fri, 22 Nov 2019 13:34:59 +0000 (14:34 +0100)]
font-lock special attributes in python-mode

* lisp/progmodes/python.el (python-font-lock-keywords-level-2): Add
special attributes (bug#38318).

4 years agoGive better error messages in image-convert
Lars Ingebrigtsen [Fri, 22 Nov 2019 12:15:41 +0000 (13:15 +0100)]
Give better error messages in image-convert

* lisp/image/image-converter.el (image-convert): Make
image-convert bug out earlier on a wrong IMAGE-FORMAT value
(bug#38310).

4 years agoMake auth-source-pass-search understand port lists
João Távora [Wed, 20 Nov 2019 00:11:00 +0000 (00:11 +0000)]
Make auth-source-pass-search understand port lists

For cases such as a typical IMAP Gnus setup, auto-source-pass-search
is passed a list of "port aliases" like (993 "imaps" "imap" "993"
"143") in hopes of finding a matching ~/.password-store entry.

This modification makes this library understand and unroll the port
list so that, i.e. "domain:993", "domain:imaps"", "domain:imap",
etc. are computed as potential suffixes.  Previously a nonsensical
string "domain:(993 imaps imap ...)" was returned.

* lisp/auth-source-pass.el
(auth-source-pass--generate-entry-suffixes): Allow PORT to be a list
of ports.