]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years ago* lisp/files.el (auto-mode-alist): Handle .dir-locals-2.el.
João Távora [Sat, 18 Apr 2020 11:58:58 +0000 (12:58 +0100)]
* lisp/files.el (auto-mode-alist): Handle .dir-locals-2.el.

4 years agoMake lisp-mode-variables function less backward-incompatible
João Távora [Sat, 18 Apr 2020 11:39:57 +0000 (12:39 +0100)]
Make lisp-mode-variables function less backward-incompatible

A small number of third-party packages rely on its arguments.  They
shouldn't be seriously affected.

* doc/lispref/modes.texi (Example Major Modes): Make example
closer to reality.

* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Ignore any
number of arguments.

4 years agoUse lisp-data-mode in 5 more places
João Távora [Sat, 18 Apr 2020 08:04:13 +0000 (09:04 +0100)]
Use lisp-data-mode in 5 more places

Thanks to Juri Linkov and Basil L. Contovounesios for the list and the
indication of the function that needed to be changed.

* lisp/bookmark.el (bookmark-insert-file-format-version-stamp):
Use lisp-data-mode.

* lisp/saveplace.el (save-place-alist-to-file): Use
lisp-data-mode.

* lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode.

* lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode.

* lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use
lisp-data-mode.

4 years agoAdd a lisp-data-mode for editing non-code lisp data
João Távora [Sat, 18 Apr 2020 01:46:04 +0000 (02:46 +0100)]
Add a lisp-data-mode for editing non-code lisp data

To provide a cleaner implementation remove arguments from the
auxiliary routine lisp-mode-variables.  The modes/functions that need
to do some something special adjustment do them in their own bodies.

* lisp/chistory.el (command-history-mode): Don't pass nil to
lisp-mode-variables.

* lisp/files.el (auto-mode-alist): Add entry for ".dir-locals".

* lisp/help-fns.el (describe-variable): Don't pass useless args to
lisp-mode-variables.

* lisp/emacs-lisp/pp.el (pp-to-string): Don't pass useless args to
lisp-mode-variables.

* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables):
Simplify.  Always set same variables.
(lisp-data-mode): New major mode.
(lisp-mode): Inherit from lisp-data-mode.  Set special lisp-mode
stuff here.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from
lisp-data-mode.
(emacs-lisp-mode): Simplify.

* lisp/progmodes/inf-lisp.el (inferior-lisp-mode): Set the needed
syntax table here, not through other function.

4 years agoPort recent character.h changes to --with-wide-int
Paul Eggert [Fri, 17 Apr 2020 21:09:01 +0000 (14:09 -0700)]
Port recent character.h changes to --with-wide-int

* src/fns.c (mapcar1):
* src/keymap.c (Fkey_description):
* src/syntax.c (scan_lists):
Prefer ptrdiff_t to EMACS_INT where either will do; this fixes
newly-introduced type errors on --with-wide-int platforms where
ptrdiff_t is narrower than EMACS_INT.
* src/keymap.c (Fkey_description): Rework for clarity; remove goto.
* src/syntax.c (scan_words, Fforward_comment, scan_lists)):
Fix unlikely integer overflow problems that can occur on
--with-wide-int platforms, and that were caught by the recent
character.h changes.

4 years agoPacify gcc -Og x86-64
Paul Eggert [Fri, 17 Apr 2020 16:16:41 +0000 (09:16 -0700)]
Pacify gcc -Og x86-64

* src/editfns.c (Ftranslate_region_internal): Add UNINIT
to pacify gcc -Og x86-64 (GCC 9.3.1 20200317 (Red Hat 9.3.1-1)).

4 years agoPrefer more inline functions in character.h
Paul Eggert [Fri, 17 Apr 2020 14:57:25 +0000 (07:57 -0700)]
Prefer more inline functions in character.h

* src/buffer.h (fetch_char_advance, fetch_char_advance_no_check)
(buf_next_char_len, next_char_len, buf_prev_char_len)
(prev_char_len, inc_both, dec_both): New inline functions,
replacing the old character.h macros FETCH_CHAR_ADVANCE,
FETCH_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS, INC_POS, BUF_DEC_POS,
DEC_POS, INC_BOTH, DEC_BOTH respectively.  All callers changed.
These new functions all assume buffer primitives and so need
to be here rather than in character.h.
* src/casefiddle.c (make_char_unibyte): New static function,
replacing the old MAKE_CHAR_UNIBYTE macro.  All callers changed.
(do_casify_unibyte_string): Use SINGLE_BYTE_CHAR_P instead
of open-coding it.
* src/ccl.c (GET_TRANSLATION_TABLE): New static function,
replacing the old macro of the same name.
* src/character.c (string_char): Omit 2nd arg.  3rd arg can no
longer be NULL.  All callers changed.
* src/character.h (SINGLE_BYTE_CHAR_P): Move up.
(MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE, PREV_CHAR_BOUNDARY)
(STRING_CHAR_AND_LENGTH, STRING_CHAR_ADVANCE)
(FETCH_STRING_CHAR_ADVANCE)
(FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
(FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
(FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
(DEC_BOTH, BUF_INC_POS, BUF_DEC_POS): Remove.
(make_char_multibyte): New static function, replacing
the old macro MAKE_CHAR_MULTIBYTE.  All callers changed.
(CHAR_STRING_ADVANCE): Remove; all callers changed to use
CHAR_STRING.
(NEXT_CHAR_BOUNDARY): Remove; it was unused.
(raw_prev_char_len): New inline function, replacing the
old PREV_CHAR_BOUNDARY macro.  All callers changed.
(string_char_and_length): New inline function, replacing the
old STRING_CHAR_AND_LENGTH macro.  All callers changed.
(STRING_CHAR): Rewrite in terms of string_char_and_length.
(string_char_advance): New inline function, replacing the old
STRING_CHAR_ADVANCE macro.  All callers changed.
(fetch_string_char_advance): New inline function, replacing the
old FETCH_STRING_CHAR_ADVANCE macro.  All callers changed.
(fetch_string_char_as_multibyte_advance): New inline function,
replacing the old FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE macro.
All callers changed.
(fetch_string_char_advance_no_check): New inline function,
replacing the old FETCH_STRING_CHAR_ADVANCE_NO_CHECK macro.  All
callers changed.
* src/regex-emacs.c (HEAD_ADDR_VSTRING): Remove; no longer used.
* src/syntax.c (scan_lists): Use dec_bytepos instead of
open-coding it.
* src/xdisp.c (string_char_and_length): Rename from
string_char_and_length to avoid name conflict with new function in
character.h.  All callers changed.

4 years agoPrefer inline functions in character.h
Paul Eggert [Fri, 17 Apr 2020 14:57:25 +0000 (07:57 -0700)]
Prefer inline functions in character.h

In character.h, replace macros with inline functions or enums
when this is easy.  This improves maintainability and
on my platform (Fedora 31 x86-64, gcc -O2) improved CPU
performance very slightly (0.3%) on ‘make compile-always’.
* src/buffer.h (SANE_TAB_WIDTH, CHARACTER_WIDTH):
Move here from character.h, and make them inline functions.
Tune CHARACTER_WIDTH so that ASCII_CHAR_WIDTH is no longer needed.
(sanitize_tab_width, sanitize_char_width):
Move here from character.h.
* src/character.h (MAX_CHAR, MAX_UNICODE_CHAR, MAX_1_BYTE_CHAR)
(MAX_2_BYTE_CHAR, MAX_3_BYTE_CHAR, MAX_4_BYTE_CHAR)
(MAX_5_BYTE_CHAR, MIN_MULTIBYTE_LEADING_CODE)
(MAX_MULTIBYTE_LEADING_CODE, MAX_MULTIBYTE_LENGTH):
Now enum constants instead of macros.
* src/character.h (CHAR_BYTES): Redo to avoid conditional branches.
(CHAR_BYTE8_P, BYTE8_TO_CHAR, UNIBYTE_TO_CHAR, CHAR_TO_BYTE8)
(CHAR_TO_BYTE_SAFE, CHAR_BYTE8_HEAD_P, CHARACTERP)
(CHECK_CHARACTER, CHECK_CHARACTER_CAR, CHECK_CHARACTER_CDR)
(CHAR_PRINTABLE_P, CHAR_BYTES, CHAR_LEADING_CODE, BYTE8_STRING)
(LEADING_CODE_P, TRAILING_CODE_P, CHAR_HEAD_P)
(BYTES_BY_CHAR_HEAD):
Now inline functions instead of macros.
(ASCII_CHAR_WIDTH): Remove; no longer used.
* src/conf_post.h (ATTRIBUTE_PURE): New macro.
* src/lisp.h (char_table_ref): Use it, for better inlining.
* src/fns.c (base64_decode_1): Add now-necessary casts.

4 years agoFix effect-free warning in ob-screen.el while loop
Basil L. Contovounesios [Tue, 14 Apr 2020 14:26:04 +0000 (15:26 +0100)]
Fix effect-free warning in ob-screen.el while loop

The warning was introduced and detected by an optimizer addition
proposed in the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00711.html

* lisp/org/ob-screen.el (org-babel-screen-test): Avoid 'value
returned from (format "...") is unused' warning by doing something
more useful than busy string manipulation while waiting for an
asynchronous subprocess to make the temporary file readable.

4 years agoBind 'n' and 'p' to move between symbols in apropos
Justin Timmons [Fri, 17 Apr 2020 04:00:19 +0000 (06:00 +0200)]
Bind 'n' and 'p' to move between symbols in apropos

* lisp/apropos.el (apropos-next-symbol)
(apropos-previous-symbol): New commands.
(apropos-mode-map): Bind above commands to 'n' and 'p'.  (Bug#20694)
* etc/NEWS: Announce the new commands.

4 years agoFix comparing command names in strokes.el (bug#40600)
Masahiro Nakamura [Tue, 14 Apr 2020 13:37:17 +0000 (22:37 +0900)]
Fix comparing command names in strokes.el (bug#40600)

* lisp/strokes.el (strokes-alphabetic-lessp): Simply call string-lessp
because the cdr of the argument may be a string.

4 years agoUse native image API for NS
Alan Third [Tue, 14 Apr 2020 21:56:06 +0000 (22:56 +0100)]
Use native image API for NS

* configure.ac (NATIVE_IMAGE_API): Move above NS definitions.
(HAVE_NATIVE_IMAGE_API): Set for NS.
(HAVE_PNG, HAVE_JPEG, HAVE_GIF, HAVE_TIFF): Enable on NS builds.
* src/image.c (HAVE_NS): Fix a number of #if's so they no longer rely
on HAVE_NS.
(PIX_MASK_DRAW): Add for HAVE_NS so libpng support will compile.
(image_can_use_native_api):
(native_image_load): Add NS support.
(png_load):
(jpeg_load):
(tiff_load):
(gif_load): Remove NS specific definitions.
* src/nsimage.m (ns_can_use_native_image_api): New function.
* src/nsterm.h: (ns_can_use_native_image_api): New function.

4 years agoAllow dynamic choice of drawing path on NS (bug#39883)
Alan Third [Sat, 11 Apr 2020 13:18:39 +0000 (14:18 +0100)]
Allow dynamic choice of drawing path on NS (bug#39883)

* src/nsterm.h (NS_DRAW_TO_BUFFER): Let this be enabled on versions
older than 10.14.
* src/nsterm.m (ns_update_begin):
(ns_update_end):
(ns_focus):
(ns_unfocus):
([EmacsView viewDidResize:]):
([EmacsView createDrawingBuffer]):
([EmacsView windowDidChangeBackingProperties:]):
([EmacsView copyRect:to:]):
([EmacsView wantsUpdateLayer]): Dynamically switch between drawing to a
buffer and drawing to the screen, depending on the version of AppKit
in use.
([EmacsView dealloc]): We can't release the context unless
NS_DRAW_TO_BUFFER is defined.

4 years agoFix NS frame resizing issues (bug#40200, bug#28872)
Alan Third [Sat, 4 Apr 2020 14:13:58 +0000 (15:13 +0100)]
Fix NS frame resizing issues (bug#40200, bug#28872)

* src/nsmenu.m (update_frame_tool_bar): Remove reference to
updateFrameSize.
* src/nsterm.h: ([EmacsView updateFrameSize]):
([EmacsView setRows:andColumns:]): Remove unused
method definitions.
(NS_PARENT_WINDOW_LEFT_POS):
(NS_PARENT_WINDOW_TOP_POS): Move to nsterm.m.
* src/nsterm.m (ns_parent_window_rect): New function.
(NS_PARENT_WINDOW_LEFT_POS):
(NS_PARENT_WINDOW_TOP_POS): Move to nsterm.m and simplify.
(ns_set_offset): Fix strange behaviours when using negative values.
(ns_set_window_size):
(ns_set_undecorated):
([EmacsView windowDidResize:]):
([EmacsView windowDidExitFullScreen]):
(ns_judge_scroll_bars): Remove references to updateFrameSize.
([EmacsView dealloc]): Unset resize notification and release buffer.
([EmacsView updateFrameSize:]): Remove function.
([EmacsView windowWillResize:toSize:]): Move some code to
viewDidResize.
([EmacsView viewDidResize]): New function.
([EmacsView initFrameFromEmacs:]): Set up resize notification and move
buffer creation until after the prerequisite objects are created.
([EmacsView toggleFullScreen:]): Set frame to the size of the
contentview, not the whole window, and remove reference to
updateFrameSize.
([EmacsView setRows:andColumns:]): Remove unused method.
([EmacsView windowDidMove:]): Tidy up.

4 years agoImprove regexp in org-table-finish-edit-field
Mattias Engdegård [Thu, 16 Apr 2020 17:40:26 +0000 (19:40 +0200)]
Improve regexp in org-table-finish-edit-field

* lisp/org/org-table.el (org-table-finish-edit-field):
Further improvement of regexp, as suggested by Paul Eggert.

4 years agoIgnore D-Bus errors in tramp-gvfs.el (Bug#40655)
Michael Albinus [Thu, 16 Apr 2020 17:51:23 +0000 (19:51 +0200)]
Ignore D-Bus errors in tramp-gvfs.el (Bug#40655)

* lisp/net/tramp-gvfs.el (with-tramp-dbus-call-method): Ignore D-Bus
errors.  (Bug#40655)

4 years ago(forward-comment -n): escaped newline is sometimes NOT end of comment
Alan Mackenzie [Thu, 16 Apr 2020 17:01:14 +0000 (17:01 +0000)]
(forward-comment -n): escaped newline is sometimes NOT end of comment

* src/syntax.c (Fforward_comment) When comment-end-can-be-escaped is non-nil,
don't attempt back_comment when point is just after an escaped newline, etc.

4 years agoFix type-checking bug in vertical-motion
Paul Eggert [Thu, 16 Apr 2020 16:22:42 +0000 (09:22 -0700)]
Fix type-checking bug in vertical-motion

* src/indent.c (Fvertical_motion): Fix bug where the type of lcols
was checked too late.

4 years ago* src/indent.c (Fvertical_motion): Fix int/Lisp_Object mix up.
Glenn Morris [Thu, 16 Apr 2020 16:05:52 +0000 (09:05 -0700)]
* src/indent.c (Fvertical_motion): Fix int/Lisp_Object mix up.

4 years ago; * lisp/files.el (directory-files-no-dot-files-regexp): Arg name.
Mattias Engdegård [Thu, 16 Apr 2020 15:33:02 +0000 (17:33 +0200)]
; * lisp/files.el (directory-files-no-dot-files-regexp): Arg name.

4 years agoUse directory-files-no-dot-files-regexp wherever possible
Mattias Engdegård [Thu, 16 Apr 2020 10:05:02 +0000 (12:05 +0200)]
Use directory-files-no-dot-files-regexp wherever possible

Suggested by Paul Eggert.

* lisp/files.el (directory-files-no-dot-files-regexp):
Clarify semantics and purpose.
* lisp/dired.el (dired-re-no-dot):
Define as obsolete alias of directory-files-no-dot-files-regexp.
(dired-delete-file):
* lisp/gnus/gnus-util.el (gnus-delete-directory):
* lisp/net/ange-ftp.el (ange-ftp-delete-directory):
* lisp/obsolete/vc-arch.el (vc-arch-trim-revlib):
* lisp/org/ob-core.el (org-babel-remove-temporary-directory):
* lisp/vc/vc-rcs.el (vc-rcs-unregister):
Use directory-files-no-dot-files-regexp.

4 years agoQuote semanticdb-ebrowse-default-file-name in regexp
Mattias Engdegård [Thu, 16 Apr 2020 09:27:43 +0000 (11:27 +0200)]
Quote semanticdb-ebrowse-default-file-name in regexp

Noticed by Andreas Schwab.

* lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches):
Quote file name in regexp.

4 years agoFix bugs, inefficiencies and bad style in regexps
Mattias Engdegård [Thu, 16 Apr 2020 09:04:24 +0000 (11:04 +0200)]
Fix bugs, inefficiencies and bad style in regexps

Found by relint.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html

* lisp/org/org-table.el (org-table-finish-edit-field):
* lisp/arc-mode.el (archive-rar-summarize):
Avoid wrapped subsumption in repeated sequences.
* lisp/erc/erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Replace
inefficient repeated empty-matching expression with a plain greedy
form.
(erc-dcc-handle-ctcp-send): Adjust group numbers.
* lisp/net/puny.el (puny-encode-domain): Fix fast-path shortcut
pattern so that it actually works as intended.
* lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp):
* lisp/vc/diff-mode.el (diff-imenu-generic-expression):
Remove superfluous backslashes.
* lisp/progmodes/scheme.el (scheme-imenu-generic-expression):
Correct confused definition-matching pattern which would match more
than intended.
* lisp/textmodes/sgml-mode.el (sgml-tag-name-re): Avoid inefficient
matching by using the fact that the first character cannot match the
last char of sgml-name-re.

4 years agoRegularise some file-matching regexps
Mattias Engdegård [Thu, 16 Apr 2020 07:06:37 +0000 (09:06 +0200)]
Regularise some file-matching regexps

* admin/authors.el (authors-obsolete-files-regexps)
(authors-renamed-files-regexps): Replace ^ and $ with \` and \'.

4 years agoAvoid compiler warning in indent.c
Eli Zaretskii [Thu, 16 Apr 2020 10:08:01 +0000 (13:08 +0300)]
Avoid compiler warning in indent.c

* src/indent.c (Fvertical_motion): Avoid compilation warning.
Reported by Juanma Barranquero <lekktu@gmail.com>.

4 years ago; * src/w32image.c (w32_select_active_frame): Comment about GUID values.
Eli Zaretskii [Thu, 16 Apr 2020 09:52:35 +0000 (12:52 +0300)]
; * src/w32image.c (w32_select_active_frame): Comment about GUID values.

4 years agoFile-handling cleanup in w32image.c
Eli Zaretskii [Thu, 16 Apr 2020 06:14:07 +0000 (09:14 +0300)]
File-handling cleanup in w32image.c

* src/w32image.c (w32_load_image): Encode the image file name and
convert it via 'map_w32_filename'.  No need to do anything special
when 'w32_unicode_filenames' is zero, since file names are in
UTF-8 internally, and this code will never run on Windows 9X.
* src/w32.h (map_w32_filename): Add prototype; removed prototypes
from all *.c files.

4 years agoFix retrieval of frame delay when using GDI+
Eli Zaretskii [Wed, 15 Apr 2020 20:15:03 +0000 (23:15 +0300)]
Fix retrieval of frame delay when using GDI+

* src/w32image.c (enum PropertyItem_type): New enumeration.
(decode_delay): New function.
(w32_frame_delay): Call 'decode_delay' to retrieve the frame delay
from image data.

4 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 15 Apr 2020 14:50:15 +0000 (07:50 -0700)]
Merge from origin/emacs-27

a5f7c26907 (origin/emacs-27) * admin/authors.el: Add an author alias.
d87a4d1f4e Limit RLIMIT_NOFILE to FD_SETSIZE on macOS
e5ca8e5e73 Fix Elisp manual entry on 'set-window-configuration'
485f24223f ; Update ChangeLog.3
8f200254fb ; Update etc/AUTHORS
c7adc851ad * admin/authors.el: Add missing author aliases.
4acdd7fe58 Fix edge case errors in filename-matching regexps
5f36e21fe5 Clarify the doc string of 'yank'
13301d4266 New function erc-track-switch-buffer-other-window
38f7538d8f New function erc-switch-to-buffer-other-window

# Conflicts:
# etc/NEWS

4 years agoFix small glitches in documenting the native image API feature
Eli Zaretskii [Wed, 15 Apr 2020 13:54:38 +0000 (16:54 +0300)]
Fix small glitches in documenting the native image API feature

* etc/NEWS: Fix wording of the entry for native image API support.
Reported by Juanma Barranquero <lekktu@gmail.com>.

* configure.ac (native-image-api): Fix the "--help" description.

4 years agoAvoid infloop in redisplay when wrap-prefix is too wide
Eli Zaretskii [Wed, 15 Apr 2020 11:28:21 +0000 (14:28 +0300)]
Avoid infloop in redisplay when wrap-prefix is too wide

* src/xdisp.c (move_it_to): Avoid infloop due to wrap-prefix that
is wide enough to leave no space to display even the first
character of the continuation line.  (Bug#40632)

4 years ago* admin/authors.el: Add an author alias.
Nicolas Petton [Wed, 15 Apr 2020 11:20:48 +0000 (13:20 +0200)]
* admin/authors.el: Add an author alias.

4 years agoLimit RLIMIT_NOFILE to FD_SETSIZE on macOS
YAMAMOTO Mitsuharu [Wed, 15 Apr 2020 08:04:21 +0000 (10:04 +0200)]
Limit RLIMIT_NOFILE to FD_SETSIZE on macOS

* src/nsterm.m ([EmacsApp applicationDidFinishLaunching:]): Call
CoreFoundation functions that increase RLIMIT_NOFILE behind our back
during startup, and then set RLIMIT_NOFILE back to FD_SETSIZE to avoid
crashes in setup_process_coding_system  (Bug#39164).

4 years agoFix Elisp manual entry on 'set-window-configuration'
Martin Rudalics [Wed, 15 Apr 2020 08:18:15 +0000 (10:18 +0200)]
Fix Elisp manual entry on 'set-window-configuration'

* doc/lispref/windows.texi (Window Configurations): Fix
description of 'set-window-configuration'.

4 years ago* lisp/htmlfontify.el: Use `font-lock-ensure` unconditionally
Stefan Monnier [Wed, 15 Apr 2020 04:23:09 +0000 (00:23 -0400)]
* lisp/htmlfontify.el: Use `font-lock-ensure` unconditionally

Remove redundant `:group`s.

(hfy-force-fontification): Make it an obsolete alias for `font-lock-ensure`.
Update all callers.
(hfy-init-kludge-hooks, hfy-init-kludge-hook): Remove vars, not used any more.
(hfy-kludge-cperl-mode): Declare it obsolete.

4 years agoAvoid compiler warning in image.c
Eli Zaretskii [Tue, 14 Apr 2020 19:22:07 +0000 (22:22 +0300)]
Avoid compiler warning in image.c

* src/image.c (image_can_use_native_api): Avoid compiler warnings
by making this function conditioned on HAVE_NATIVE_IMAGE_API.
(initialize_image_type): Call image_can_use_native_api only if
HAVE_NATIVE_IMAGE_API is non-zero.  Reported by Basil
L. Contovounesios <contovob@tcd.ie>.

4 years ago; Update ChangeLog.3
Nicolas Petton [Tue, 14 Apr 2020 16:34:30 +0000 (18:34 +0200)]
; Update ChangeLog.3

4 years ago; Update etc/AUTHORS
Nicolas Petton [Tue, 14 Apr 2020 16:33:50 +0000 (18:33 +0200)]
; Update etc/AUTHORS

4 years ago* admin/authors.el: Add missing author aliases.
Nicolas Petton [Tue, 14 Apr 2020 16:33:28 +0000 (18:33 +0200)]
* admin/authors.el: Add missing author aliases.

4 years ago; * src/image.c: Cleanup of #ifdef's related to HAVE_NATIVE_IMAGE_API.
Eli Zaretskii [Tue, 14 Apr 2020 15:19:59 +0000 (18:19 +0300)]
; * src/image.c: Cleanup of #ifdef's related to HAVE_NATIVE_IMAGE_API.

4 years agoMake use of MS-Windows native image API be selectable at run time
Eli Zaretskii [Tue, 14 Apr 2020 15:10:41 +0000 (18:10 +0300)]
Make use of MS-Windows native image API be selectable at run time

* configure.ac: Minor cleanup in how w32image.o is added to the
build when native image APIs are requested.

* src/w32gui.h (w32_load_image, w32_can_use_native_image_api)
(w32_gdiplus_shutdown): Move prototypes from w32term.h here, since
w32.c doesn't include w32term.h.
* src/image.c (struct image_type): No need to pass TYPE to the
'valid_p' method.  All callers changed.
(initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call
'image_can_use_native_api' before trying image-specific methods.
(image_can_use_native_api): New function.
(image_types): Remove the native_image_type parts.
(syms_of_image): New symbol 'native-image'.
(parse_image_spec): Accept native-image "type" for any image type.
* src/w32term.c (syms_of_w32term): New variable
'w32-use-native-image-API'.
* src/w32image.c: (w32_can_use_native_image_api): New function.
(gdiplus_init): Rename from w32_gdiplus_startup. Simplify code.
Move the call to GdiplusStartup to a separate function.  Use
ordinal number for SHCreateMemStream if cannot load it by name.
(w32_load_image): Ignore Win32Error status from
w32_select_active_frame.
Move DEFSYMs from here...
* src/image.c (syms_of_image) [HAVE_NATIVE_IMAGE_API]: ...to here.

* etc/NEWS: Update the entry about native image API use.

4 years agoFix edge case errors in filename-matching regexps
Mattias Engdegård [Tue, 14 Apr 2020 10:17:40 +0000 (12:17 +0200)]
Fix edge case errors in filename-matching regexps

These changes fix actual or latent bugs in regexps that match
file names, such as PATTERN arguments to 'directory-files'.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html

* admin/authors.el (authors-obsolete-files-regexps)
(authors-renamed-files-regexps):
* lisp/auth-source-pass.el (auth-source-pass-entries):
* lisp/calendar/todo-mode.el (todo-show, todo-find-filtered-items-file)
(todo-filter-items, todo-reset-nondiary-marker, todo-reset-done-string)
(todo-reset-comment-string, todo-reset-highlight-item):
* lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches):
* lisp/cedet/semantic/texi.el (semantic-texi-associated-files):
* lisp/cedet/srecode/map.el (srecode-map-update-map):
* lisp/dired.el (dired-re-no-dot):
* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
* lisp/emacs-lisp/shadow.el (load-path-shadows-find):
* lisp/files.el (auto-mode-alist, directory-files-no-dot-files-regexp):
* lisp/finder.el (finder-compile-keywords):
* lisp/generic-x.el (inetd-conf-generic-mode, named-boot-generic-mode)
(resolve-conf-generic-mode, etc-modules-conf-generic-mode):
* lisp/gnus/gnus-agent.el (gnus-agent-read-agentview)
(gnus-agent-regenerate-group, gnus-agent-update-files-total-fetched-for):
* lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group):
* lisp/gnus/gnus-score.el (gnus-score-search-global-directories):
* lisp/gnus/gnus-util.el (gnus-delete-directory):
* lisp/gnus/gnus-uu.el (gnus-uu-dir-files):
* lisp/gnus/nndraft.el (nndraft-request-group):
* lisp/gnus/nnmh.el (nnmh-request-group, nnmh-request-create-group):
(nnmh-request-delete-group, nnmh-active-number, nnmh-update-gnus-unreads):
* lisp/gnus/nnspool.el (nnspool-request-group):
* lisp/gnus/spam-stat.el (spam-stat-process-directory)
(spam-stat-test-directory):
* lisp/help-fns.el (help-fns--first-release):
* lisp/help.el (view-emacs-news):
* lisp/international/quail.el (quail-update-leim-list-file):
* lisp/international/titdic-cnv.el (batch-titdic-convert):
* lisp/mail/mspools.el (mspools-set-vm-spool-files)
(mspools-get-spool-files):
* lisp/mail/rmail.el (rmail-secondary-file-regexp)
(rmail-speedbar-match-folder-regexp):
* lisp/net/ange-ftp.el (ange-ftp-delete-directory):
* lisp/net/tramp.el (tramp-use-absolute-autoload-file-names):
* lisp/obsolete/gulp.el (gulp-send-requests):
* lisp/obsolete/vc-arch.el (vc-arch-trim-revlib):
* lisp/org/ob-core.el (org-babel-remove-temporary-directory):
* lisp/progmodes/ebnf2ps.el (ebnf-file-suffix-regexp, ebnf-style-database):
* lisp/progmodes/executable.el (executable-command-find-posix-p):
* lisp/startup.el (command-line):
* lisp/textmodes/refer.el (refer-get-bib-files):
* lisp/url/url-about.el (url-probe-protocols):
* lisp/vc/vc-rcs.el (vc-rcs-register, vc-rcs-unregister):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test19-directory-files-and-attributes):
* test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes):
Replace ^ and $ with \` and \', respectively.
Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.",
to match anything but "." and "..", instead of several incorrect
regexps.

4 years agoInitial version of native image API support for MS-Windows
Juan José García-Ripoll [Mon, 13 Apr 2020 10:04:39 +0000 (12:04 +0200)]
Initial version of native image API support for MS-Windows

* src/w32image.c: New file.
* src/w32term.h: Add prototypes of 'w32_load_image',
'w32_gdiplus_startup', 'w32_gdiplus_shutdown', and
'w32_query_frame_background_color'.
* src/w32term.c (w32_query_frame_background_color): No longer
static.
* src/w32.c (term_ntproc) [HAVE_GDIPLUS]: Call
'w32_gdiplus_shutdown'.
* src/image.c (struct image_type) <valid_p>: Accept an additional
argument, the image type.  All implementations changed.
(init_native_image_functions, native_image_p, native_image_load)
[HAVE_NATIVE_IMAGE_API]: New methods for "native image type".
(initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call
'init_native_image_functions'.
(image_types) [HAVE_NATIVE_IMAGE_API]: Add settings for native
image API.
(lookup_image_type) [HAVE_NATIVE_IMAGE_API]: Initialize native
functions if needed.

* lisp/term/w32-win.el (dynamic-library-alist): Add gdiplus and
shlwapi.

* etc/NEWS: Announce the new feature.

* configure.ac (native-image-api): New option, OFF by default.
(HAVE_NATIVE_IMAGE_API): If native-image-api is selected, add
w32image.o to W32_OBJ.

4 years agoClarify the doc string of 'yank'
Eli Zaretskii [Tue, 14 Apr 2020 05:38:00 +0000 (08:38 +0300)]
Clarify the doc string of 'yank'

* lisp/simple.el (yank): Mention 'current-kill' in the doc string,
so that people could find all the gory details of what is "the most
recent kill" for this purpose.  (Bug#40375)

4 years agoNew function erc-track-switch-buffer-other-window
Amin Bandali [Tue, 14 Apr 2020 04:23:56 +0000 (00:23 -0400)]
New function erc-track-switch-buffer-other-window

* lisp/erc/erc-track.el (erc-track-switch-buffer): Factor out the
implementation from here ...
(erc-track--switch-buffer): ... to here.
(erc-track-switch-buffer-other-window): New function, like
`erc-track-switch-buffer', but uses `switch-to-buffer-other-window'
instead, to open the buffer in another window.

4 years agoNew function erc-switch-to-buffer-other-window
Amin Bandali [Tue, 14 Apr 2020 03:21:34 +0000 (23:21 -0400)]
New function erc-switch-to-buffer-other-window

* lisp/erc/erc.el (erc-switch-to-buffer): Factor out the buffer choice
implementation from here ...
(erc--switch-to-buffer): ... to here.
(erc-switch-to-buffer-other-window): New function, like
`erc-switch-to-buffer', but uses `switch-to-buffer-other-window'
instead, to open the buffer in another window.

4 years agoFix hi-lock test and add new test for unhighlight (bug#40337)
Juri Linkov [Mon, 13 Apr 2020 23:33:52 +0000 (02:33 +0300)]
Fix hi-lock test and add new test for unhighlight (bug#40337)

* lisp/hi-lock.el (hi-lock-unface-buffer): Use hi-lock--hashcons
only on strings, not lists.

* test/lisp/hi-lock-tests.el (hi-lock-bug26666): Revert previous change,
use "a" instead of "b".
(hi-lock-unhighlight): New test.

4 years ago* lisp/vc/vc.el (vc-deduce-fileset): Improve docstring (bug#34949).
Juri Linkov [Mon, 13 Apr 2020 23:24:51 +0000 (02:24 +0300)]
* lisp/vc/vc.el (vc-deduce-fileset): Improve docstring (bug#34949).

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 13 Apr 2020 16:02:29 +0000 (09:02 -0700)]
Merge from origin/emacs-27

f84aed5fd2 (origin/emacs-27) Clarify documentation on inhibit-modific...

4 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 13 Apr 2020 16:02:29 +0000 (09:02 -0700)]
; Merge from origin/emacs-27

The following commit was skipped:

81d07da788 gnus-shorten-url: Improve and avoid args-out-of-range error

4 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 13 Apr 2020 16:02:29 +0000 (09:02 -0700)]
Merge from origin/emacs-27

1dfc497fac Minor wording change in Introduction to Programming in Ema...
ff09b4eeac Fix 'flymake-show-diagnostics-buffer' when line numbers ar...
63e8d0ea87 Fix last changes describing mail commands
01212a762f Do setup Flymake in file-less Elisp buffers
36873ef2b2 Fix error message for ‘cl-struct-unknown-slot’ (bug#39995)
3f9310b0fe Fix and improve documentation of mail-related features
1482a75efa Fix build failure with Fx_gtk_debug
cf57663f2a Mention jit-lock deferred as an alternative to fast-but-im...

# Conflicts:
# etc/NEWS

4 years ago* doc/lispref/processes.texi (Network): Fix xref usage.
Glenn Morris [Mon, 13 Apr 2020 16:01:45 +0000 (09:01 -0700)]
* doc/lispref/processes.texi (Network): Fix xref usage.

4 years ago* doc/emacs/msdos.texi (Windows Keyboard): Fix xref.
Glenn Morris [Mon, 13 Apr 2020 15:59:05 +0000 (08:59 -0700)]
* doc/emacs/msdos.texi (Windows Keyboard): Fix xref.

4 years agoFix previous change in w32fns.c
Albert [Mon, 13 Apr 2020 14:52:30 +0000 (22:52 +0800)]
Fix previous change in w32fns.c

* src/w32fns.c (w32_msg_pump): Simplify by not calling
ImmGetOpenStatus.
(Fw32_get_ime_open_status): Fix a typo.

4 years agoDocument the new 'w32-get/set-ime-open-status' functions
Eli Zaretskii [Mon, 13 Apr 2020 13:33:57 +0000 (16:33 +0300)]
Document the new 'w32-get/set-ime-open-status' functions

* doc/emacs/msdos.texi (Windows Keyboard): Document
'w32-set-ime-open-status'.

* etc/NEWS: Announce the new IME-related functions.

4 years ago; Fix last change.
Eli Zaretskii [Mon, 13 Apr 2020 13:20:14 +0000 (16:20 +0300)]
; Fix last change.

4 years agoSupport toggling native Input Methods on MS-Windows
Albert [Mon, 13 Apr 2020 10:02:17 +0000 (18:02 +0800)]
Support toggling native Input Methods on MS-Windows

* src/w32term.h (WM_EMACS_IME_STATUS): New message code.

* src/w32fns.c (ImmGetOpenStatus_Proc, ImmSetOpenStatus_Proc): New
typedefs.
(w32_msg_pump): Handle the WM_EMACS_IME_STATUS message.
(Fw32_get_ime_open_status, Fw32_set_ime_open_status): New functions
(syms_of_w32fns): Defsubr them.
(globals_of_w32fns): Load ImmGetOpenStatus and ImmSetOpenStatus
from IMM2.DLL.

4 years agoClarify documentation on inhibit-modification-hooks intended usage
Štěpán Němec [Tue, 31 Mar 2020 03:38:50 +0000 (05:38 +0200)]
Clarify documentation on inhibit-modification-hooks intended usage

Cf. bug#40332 and the discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00921.html

* doc/lispref/text.texi (Change Hooks):
* src/insdel.c (syms_of_insdel): Clarify the intended usage of
'inhibit-modification-hooks'.

4 years agognus-shorten-url: Improve and avoid args-out-of-range error
Štěpán Němec [Sat, 7 Mar 2020 17:26:44 +0000 (18:26 +0100)]
gnus-shorten-url: Improve and avoid args-out-of-range error

'gnus-shorten-url' (used by 'gnus-summary-browse-url') ignored
fragment identifiers and didn't check substring bounds, in some cases
leading to runtime errors, e.g.:

  (gnus-shorten-url "https://some.url.with/path/and#also_a_long_target" 40)
  ;; => Lisp error: (args-out-of-range "/path/and" -18 nil)

This commit makes it account for #fragments and fixes faulty string
computation, reusing existing helper function.  (bug#39980)

* lisp/vc/ediff-init.el (ediff-truncate-string-left): Rename to
'string-truncate-left' and move...
* lisp/emacs-lisp/subr-x.el (string-truncate-left):  ...here.
All callers changed.
* lisp/gnus/gnus-sum.el (gnus-shorten-url): Fix args-out-of-range
error, don't drop #fragments, use 'string-truncate-left'.

4 years agognus-shorten-url: Improve and avoid args-out-of-range error
Štěpán Němec [Sun, 12 Apr 2020 17:57:59 +0000 (19:57 +0200)]
gnus-shorten-url: Improve and avoid args-out-of-range error

'gnus-shorten-url' (used by 'gnus-summary-browse-url') ignored
fragment identifiers and didn't check substring bounds, in some cases
leading to runtime errors, e.g.:

  (gnus-shorten-url "https://some.url.with/path/and#also_a_long_target" 40)
  ;; => Lisp error: (args-out-of-range "/path/and" -18 nil)

This commit makes it account for #fragments and fixes faulty string
computation.  (bug#39980)

Do not merge to master, where the helper is put to subr-x.el.

* lisp/gnus/gnus-sum.el (gnus--string-truncate-left): New helper
function (copied from 'ediff-truncate-string-left').
(gnus-shorten-url): Use it and don't drop #fragments.

4 years agoFix last change
Eli Zaretskii [Mon, 13 Apr 2020 09:25:37 +0000 (12:25 +0300)]
Fix last change

* lisp/mail/rmail.el (rmail-simplified-subject): A prefix can have
up to 4 characters, not 3.

4 years agoMinor wording change in Introduction to Programming in Emacs Lisp
Eli Zaretskii [Mon, 13 Apr 2020 08:53:47 +0000 (11:53 +0300)]
Minor wording change in Introduction to Programming in Emacs Lisp

* doc/lispintro/emacs-lisp-intro.texi (Prevent confusion): Mention
that dynamic scoping is only the default in Emacs Lisp, not the
only scoping rule.  (Bug#40594)

4 years agoImprove support of "Re:" in Rmail
Eli Zaretskii [Mon, 13 Apr 2020 08:43:39 +0000 (11:43 +0300)]
Improve support of "Re:" in Rmail

* lisp/mail/rmail.el (rmail-simplified-subject)
(rmail-reply-regexp): Recognize U+FF1A FULLWIDTH COLON as a colon
after "Re:"-type prefixes.
(rmail-re-abbrevs): New defcustom with localized abbreviations of
"Re:".
(rmail-reply-regexp): Use 'rmail-re-abbrevs'.  Recognize U+FF1A
in addition to the ASCII colon.

* etc/NEWS: Call out the new defcustom 'rmail-re-abbrevs'.

4 years agoFix 'flymake-show-diagnostics-buffer' when line numbers are displayed
Eli Zaretskii [Mon, 13 Apr 2020 05:00:14 +0000 (08:00 +0300)]
Fix 'flymake-show-diagnostics-buffer' when line numbers are displayed

* lisp/progmodes/flymake.el (flymake--diagnostics-buffer-entries):
Do nothing if 'flymake--diagnostics-buffer-source' is not a
buffer.  (Bug#40529)

4 years agoFix hi-lock test and add new test for case-fold (bug#40337)
Juri Linkov [Sun, 12 Apr 2020 23:40:56 +0000 (02:40 +0300)]
Fix hi-lock test and add new test for case-fold (bug#40337)

* lisp/hi-lock.el (hi-lock--regexps-at-point): Handle font-lock faces.
(hi-lock-unface-buffer): Simplify default value handling.
(hi-lock-set-pattern): Add either lighter or regexp to
hi-lock-interactive-lighters.
(hi-lock-set-pattern): Put overlay prop hi-lock-overlay-regexp to
either lighter or regexp.

* test/lisp/hi-lock-tests.el (hi-lock-bug26666): Use "b" instead of "a".
(hi-lock-case-fold): New test.

4 years agoFix bootstrap compiler warnings about `read-library-name'
Štěpán Němec [Sun, 12 Apr 2020 16:20:41 +0000 (18:20 +0200)]
Fix bootstrap compiler warnings about `read-library-name'

Introduced by

2020-03-28T22:16:28+01:00!stepnem@gmail.com
2c45091791 (load-library, locate-library: Use read-library-name)

Thanks to Juanma Barranquero <lekktu@gmail.com> for reporting.

* lisp/files.el:
* lisp/subr.el: Declare 'read-library-name'.

4 years agoFix last changes describing mail commands
Eli Zaretskii [Sun, 12 Apr 2020 18:47:52 +0000 (21:47 +0300)]
Fix last changes describing mail commands

* doc/emacs/sending.texi (Sending Mail): Fix the description of
the behavior of 'C-x m' without prefix argument.  (Bug#40561)

4 years agoFix error in 'call-process-region' when START is nil (Bug#40576)
Philipp Stephani [Sun, 12 Apr 2020 17:04:11 +0000 (19:04 +0200)]
Fix error in 'call-process-region' when START is nil (Bug#40576)

* src/callproc.c (Fcall_process_region): Fix behavior when START is
nil and DELETE is non-nil.

* test/src/callproc-tests.el
(call-process-region-entire-buffer-with-delete): New unit test.

4 years ago; * test/src/callproc-tests.el: Fix checkdoc errors.
Philipp Stephani [Sun, 12 Apr 2020 16:08:04 +0000 (18:08 +0200)]
; * test/src/callproc-tests.el: Fix checkdoc errors.

4 years agoDo setup Flymake in file-less Elisp buffers
João Távora [Sun, 12 Apr 2020 14:17:15 +0000 (15:17 +0100)]
Do setup Flymake in file-less Elisp buffers

Fixes: bug#40573
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Change
condition for setting flymake-diagnostic-functions.

4 years agoFix error message for ‘cl-struct-unknown-slot’ (bug#39995)
Philipp Stephani [Sun, 12 Apr 2020 13:11:22 +0000 (15:11 +0200)]
Fix error message for ‘cl-struct-unknown-slot’ (bug#39995)

* lisp/emacs-lisp/cl-macs.el (cl-struct-unknown-slot): Remove spurious
format specifiers.

4 years agoAlso use named functions for the ‘gv’ declare forms (Bug#40491)
Philipp Stephani [Sun, 12 Apr 2020 12:25:33 +0000 (14:25 +0200)]
Also use named functions for the ‘gv’ declare forms (Bug#40491)

* lisp/emacs-lisp/gv.el (gv--expander-defun-declaration)
(gv--setter-defun-declaration): New helper functions; use them.

4 years agoUse named functions in {defun,macro}-declarations-alist (Bug#40491)
Philipp Stephani [Sun, 12 Apr 2020 10:01:47 +0000 (12:01 +0200)]
Use named functions in {defun,macro}-declarations-alist (Bug#40491)

* lisp/emacs-lisp/byte-run.el (byte-run--set-advertised-calling-convention)
(byte-run--set-obsolete, byte-run--set-interactive-only)
(byte-run--set-pure, byte-run--set-side-effect-free)
(byte-run--set-compiler-macro, byte-run--set-doc-string)
(byte-run--set-indent, byte-run--set-debug)
(byte-run--set-no-font-lock-keyword): New helper functions.
(defun-declarations-alist, macro-declarations-alist): Use them.

4 years agoFix a bootstrap issue with unescaped character literal detection.
Philipp Stephani [Sun, 12 Apr 2020 09:58:36 +0000 (11:58 +0200)]
Fix a bootstrap issue with unescaped character literal detection.

* src/lread.c (load_warn_unescaped_character_literals): Deal with the
case that 'byte-run--unescaped-character-literals-warning' isn't yet
defined.

4 years agoFix and improve documentation of mail-related features
Eli Zaretskii [Sun, 12 Apr 2020 08:31:29 +0000 (11:31 +0300)]
Fix and improve documentation of mail-related features

* lisp/simple.el (compose-mail): Clarify the effect of the
CONTINUE argument.
* lisp/mail/sendmail.el (mail-from-style): Update the RFC value in
the obsolescence warning text.

* doc/emacs/sending.texi (Sending Mail): Fix the description of
the behavior of 'C-x m' wrt prefix argument.
(Mail Headers): Remove the description of 'mail-from-style'.

* etc/NEWS: Mention that 'mail-from-style' is obsolete.

(Bug#40561)

4 years agoFix build failure with Fx_gtk_debug
Martin Rudalics [Sun, 12 Apr 2020 08:00:28 +0000 (10:00 +0200)]
Fix build failure with Fx_gtk_debug

* src/xfns.c (Fx_gtk_debug, Sx_gtk_debug): Define only for GTK
versions >= 3.14.0 so gtk_window_set_interactive_debugging is
defined.  Reported by Andreas Schwab  <schwab@linux-m68k.org>.

4 years ago; * etc/NEWS: NEWS followup to recent changes in hi-lock.el.
Eli Zaretskii [Sun, 12 Apr 2020 06:42:12 +0000 (09:42 +0300)]
; * etc/NEWS: NEWS followup to recent changes in hi-lock.el.

4 years agoRemove UNSIGNED_CMP
Paul Eggert [Sun, 12 Apr 2020 01:35:35 +0000 (18:35 -0700)]
Remove UNSIGNED_CMP

I added this macro in 2011 to fix some signedness comparison bugs.
However, it’s a weird macro and the bugs can be fixed in a
more-straightforward way.  This helps performance slightly (0.5%) on my
platform (Fedora 31 x86-64, GCC 9.3.1 with -O2).
* src/casefiddle.c (do_casify_natnum): Use simple comparison
instead of UNSIGNED_CMP.
* src/character.h (CHAR_VALID_P, SINGLE_BYTE_CHAR_P, CHAR_STRING):
* src/composite.h (COMPOSITION_ENCODE_RULE_VALID):
* src/lisp.h (ASCII_CHAR_P):
Now an inline function, and uses simple comparison instead of
UNSIGNED_CMP.
* src/dispextern.h (FACE_FROM_ID, FACE_FROM_ID_OR_NULL)
(IMAGE_FROM_ID, IMAGE_OPT_FROM_ID): Move these to ...
* src/frame.h (FACE_FROM_ID, FACE_FROM_ID_OR_NULL)
(IMAGE_FROM_ID, IMAGE_OPT_FROM_ID): ... here, and make them
inline functions that no longer use UNSIGNED_CMP.
* src/keyboard.c (read_char): UNSIGNED_CMP is not needed here
since XFIXNAT always returns a nonnegative value.
* src/lisp.h (UNSIGNED_CMP): Remove; no longer used.

4 years ago* lisp/hi-lock.el (hi-lock-highlight-range): Bump default value (bug#40224)
Juri Linkov [Sat, 11 Apr 2020 23:49:55 +0000 (02:49 +0300)]
* lisp/hi-lock.el (hi-lock-highlight-range): Bump default value (bug#40224)

* lisp/hi-lock.el (hi-lock-highlight-range): Change default value
from 200_000 to 2_000_000.

4 years agoImplement case-insensitivity in hi-lock (bug#40337)
Juri Linkov [Sat, 11 Apr 2020 23:45:02 +0000 (02:45 +0300)]
Implement case-insensitivity in hi-lock (bug#40337)

* lisp/hi-lock.el (hi-lock-interactive-lighters): New buffer-local variable.
(hi-lock-mode): Set hi-lock-interactive-lighters to nil.
(hi-lock-line-face-buffer): Use case-fold-search and search-upper-case.
(hi-lock-face-buffer): Add new arg LIGHTER. Use case-fold-search,
search-upper-case and search-spaces-regexp.
(hi-lock-face-phrase-buffer): Don't call hi-lock-process-phrase.
Use case-fold-search, search-upper-case and search-whitespace-regexp.
(hi-lock-face-symbol-at-point): Use case-fold-search and search-upper-case.
(hi-lock-unface-buffer): Use hi-lock-interactive-lighters to get
a human-readable string for completion and x-popup-menu.
(hi-lock-process-phrase): Remove function.
(hi-lock-set-pattern): Add new args LIGHTER, CASE-FOLD, SPACES-REGEXP.
Set font-lock pattern to a search function.  Add mapping from
lighter or regexp to pattern to hi-lock-interactive-lighters.
Let-bind case-fold-search and search-spaces-regexp in search functions.

* lisp/isearch.el (isearch--highlight-regexp-or-lines): Replace ugly code
with let-binding of case-fold-search, search-upper-case, search-spaces-regexp.
(isearch-highlight-regexp, isearch-highlight-lines-matching-regexp):
Use lambda.

4 years agoMention jit-lock deferred as an alternative to fast-but-imprecise-scrolling
Alan Mackenzie [Sat, 11 Apr 2020 21:04:50 +0000 (21:04 +0000)]
Mention jit-lock deferred as an alternative to fast-but-imprecise-scrolling

* doc/emacs/display.texi (Scrolling): Add a paragraph on using jit-lock
deferred fontification as a way of obviating Emacs hanging after
auto-repeated scrolling.

4 years ago* etc/NEWS: Mention 'cl-font-lock-built-in-mode'
Stefan Monnier [Sat, 11 Apr 2020 18:01:06 +0000 (14:01 -0400)]
* etc/NEWS: Mention 'cl-font-lock-built-in-mode'

4 years ago* lisp/progmodes/cl-font-lock.el: Fix header and make it a minor mode
Stefan Monnier [Sat, 11 Apr 2020 17:55:52 +0000 (13:55 -0400)]
* lisp/progmodes/cl-font-lock.el: Fix header and make it a minor mode

Change copyright to FSF and licence to GPLv3+.
Tweak Commentary (the code doesn't seem to provide the lambda
prettification mentioned).

(cl-font-lock-add-regexes): Remove macro.
(cl-font-lock-built-in-keywords): New variable.
(cl-font-lock-built-in-mode): New minor mode.

4 years ago* lisp/progmodes/cl-font-lock.el: New file
Stefan Monnier [Fri, 10 Apr 2020 22:27:36 +0000 (18:27 -0400)]
* lisp/progmodes/cl-font-lock.el: New file

Taken from commit 1a54066611da213626ab69ea426ba3c63ece3438
of https://github.com/cl-font-lock/cl-font-lock,
but with names reverted to a `cl-font-lock-` prefix.

4 years agoAllow ENCODE_FILE and DECODE_FILE to use no-copy conversion
Mattias Engdegård [Tue, 7 Apr 2020 08:10:04 +0000 (10:10 +0200)]
Allow ENCODE_FILE and DECODE_FILE to use no-copy conversion

They already did return their argument under some circumstances;
this change broadens it to further reduce allocation in common cases
(bug#40407).

* src/coding.c (convert_string_nocopy): New function.
(decode_file_name, encode_file_name): Use convert_string_nocopy.
* src/coding.h (ENCODE_FILE, DECODE_FILE): Note the nocopy semantics.

4 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 11 Apr 2020 14:50:12 +0000 (07:50 -0700)]
Merge from origin/emacs-27

fd27685c1e (origin/emacs-27) ; * doc/lispref/keymaps.texi (Extended M...
6057d79a4e * doc/lispref/keymaps.texi (Extended Menu Items): Tweak :k...
17a1bb5a03 Fix redisplay when scrolling under redisplay-dont-pause
90321f595c Fix face extension in pulse.el
36c42d2a30 * doc/misc/tramp.texi (Bug Reports): Avoid line breaks in ...
d5750af151 Avoid assertion violation in intervals.c
18d1bc0a09 Improve documentation of 'jit-lock-contextually'
08486f4cae Speed up 'resize-mode' child frames a little
f451ef9308 ; * etc/NEWS: Mention 'executing-macro' in removed vars.
c49d379f17 Fix some problems with moving and resizing child frames

# Conflicts:
# etc/NEWS

4 years ago; * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Fix wording.
Eli Zaretskii [Sat, 11 Apr 2020 09:20:10 +0000 (12:20 +0300)]
; * lisp/eshell/esh-var.el (eshell-variable-aliases-list): Fix wording.

4 years agoReword documentation for eshell-variable-aliases-list
Federico Tedin [Sat, 4 Apr 2020 10:04:11 +0000 (12:04 +0200)]
Reword documentation for eshell-variable-aliases-list

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Update
documentation string to avoid passive tense.

4 years ago* lisp/net/tramp.el (tramp-action-process-alive): Read pending output.
Michael Albinus [Sat, 11 Apr 2020 07:08:54 +0000 (09:08 +0200)]
* lisp/net/tramp.el (tramp-action-process-alive): Read pending output.

4 years ago; * doc/lispref/keymaps.texi (Extended Menu Items): Fix last change.
Eli Zaretskii [Sat, 11 Apr 2020 06:40:37 +0000 (09:40 +0300)]
; * doc/lispref/keymaps.texi (Extended Menu Items): Fix last change.

4 years ago* doc/lispref/keymaps.texi (Extended Menu Items): Tweak :key-sequence
Stefan Monnier [Fri, 10 Apr 2020 21:04:19 +0000 (17:04 -0400)]
* doc/lispref/keymaps.texi (Extended Menu Items): Tweak :key-sequence

Don't make it sound like `:key-sequence nil` is any different than the
absence of `:key-sequence`.  And the performance advantage of
`:key-sequence` disappeared long ago.

4 years agoFix redisplay when scrolling under redisplay-dont-pause
Eli Zaretskii [Fri, 10 Apr 2020 15:30:21 +0000 (18:30 +0300)]
Fix redisplay when scrolling under redisplay-dont-pause

* src/dispnew.c (update_window): Reset the window's
'must_be_updated_p' flag if the window's update was completed
without interruption.  This fixes redisplay glitches when
'redisplay-dont-pause' is nil, at least on MS-Windows, because
'expose_window' doesn't redraw the exposed rectangle when the
window's 'must_be_updated_p' flag is set.

4 years agoFix face extension in pulse.el
Eli Zaretskii [Thu, 9 Apr 2020 16:44:55 +0000 (19:44 +0300)]
Fix face extension in pulse.el

* lisp/cedet/pulse.el (pulse-reset-face): Propagate the :extend
attribute of FACE to the face used for displaying the pulse.
Reported by Adam Porter <adam@alphapapa.net>.

4 years agoSet last-coding-system-used upon ASCII conversion bypass (bug#40407)
Mattias Engdegård [Thu, 9 Apr 2020 14:19:14 +0000 (16:19 +0200)]
Set last-coding-system-used upon ASCII conversion bypass (bug#40407)

Spotted by Kazuhiro Ito.

* src/coding.c (code_convert_string):
Set Vlast_coding_system if appropriate.
* test/src/coding-tests.el (coding-nocopy-ascii): Add test.

4 years ago* doc/misc/tramp.texi (Bug Reports): Avoid line breaks in traces.
Michael Albinus [Thu, 9 Apr 2020 13:55:32 +0000 (15:55 +0200)]
* doc/misc/tramp.texi (Bug Reports): Avoid line breaks in traces.

4 years agoFix display of boxed header-line
Eli Zaretskii [Thu, 9 Apr 2020 13:38:02 +0000 (16:38 +0300)]
Fix display of boxed header-line

* src/xdisp.c (init_iterator): Set IT->face_box_p flag for a boxed
mode/header/tab line.  (Bug#40521)

4 years agoFix ASCII-only conversion logic (bug#40407)
Mattias Engdegård [Thu, 9 Apr 2020 10:04:22 +0000 (12:04 +0200)]
Fix ASCII-only conversion logic (bug#40407)

To sidestep conversion altogether when EOL conversion applies, we must
either be encoding a string without NL, or decoding without CR.

* src/coding.c (string_ascii_p): Revert to a pure predicate.
(code_convert_string): Fix logic.  Don't use uninitialised
ascii_p (removed).  Use memchr to detect CR or LF in string when needed.
* test/src/coding-tests.el (coding-nocopy-ascii):
Update tests to include encodings with explicit EOL conversions.

4 years agochinese-hz is not ASCII compatible (bug#40407)
Mattias Engdegård [Thu, 9 Apr 2020 09:29:51 +0000 (11:29 +0200)]
chinese-hz is not ASCII compatible (bug#40407)

* lisp/language/chinese.el: Disable :ascii-compatible-p for chinese-hz.
* test/lisp/international/mule-tests.el (mule-hz): New test.

4 years agoDon't crash with invalid argument in check-coding-systems-region
Mattias Engdegård [Wed, 8 Apr 2020 15:13:39 +0000 (17:13 +0200)]
Don't crash with invalid argument in check-coding-systems-region

* src/coding.c (Fcheck_coding_systems_region): Don't crash if
the third arg contains something that isn't a coding system.
* test/src/coding-tests.el (coding-check-coding-systems-region):
New test.

4 years agoDon't rely on copying in {EN,DE}CODE_FILE
Mattias Engdegård [Mon, 6 Apr 2020 13:20:08 +0000 (15:20 +0200)]
Don't rely on copying in {EN,DE}CODE_FILE

Callers of ENCODE_FILE and DECODE_FILE should not assume that these
functions always return a new string (bug#40407).

* src/w32fns.c (Fw32_shell_execute):
* src/w32proc.c (Fw32_application_type):
Sink taking the address of a Lisp string past GC points.
Copy values returned from ENCODE_FILE before mutating them.