Paul Eggert [Tue, 26 May 2020 22:47:59 +0000 (15:47 -0700)]
Tweak GC performance if !USE_LSB_TAG
Performance issue reported by Eli Zaretskii (Bug#41321#149).
* src/alloc.c (GC_OBJECT_ALIGNMENT_MINIMUM): New constant.
(maybe_lisp_pointer): Use it instead of GCALIGNMENT.
Paul Eggert [Tue, 26 May 2020 07:47:24 +0000 (00:47 -0700)]
Port struct Lisp_FLoat to oddball platforms
* src/lisp.h (struct Lisp_Float): Declare via
GCALIGNED_UNION_MEMBER, not via GCALIGNED_STRUCT, since alloc.c
creates these in arrays and GCALIGNED_STRUCT does not necessarily
suffice to align struct Lisp_Float when it’s used in an array.
This avoids undefined behavior on oddball machines where
sizeof (struct Lisp_Float) is not a multiple of 8 and the compiler
does not support __attribute__ ((aligned 8)).
Paul Eggert [Tue, 26 May 2020 06:24:47 +0000 (23:24 -0700)]
Move union emacs_align_type to alloc.c
* src/alloc.c (union emacs_align_type): Move to here ...
* src/lisp.h: ... from here, and uncomment out some of the
types that alloc.c can see but lisp.h cannot.
Paul Eggert [Tue, 26 May 2020 06:06:07 +0000 (23:06 -0700)]
Further fix for aborts due to GC losing pseudovectors
* src/alloc.c (MALLOC_ALIGNMENT_BOUND): Remove.
(LISP_ALIGNMENT): Go back to yesterday’s version, except use
union emacs_align_type instead of max_align_t.
(MALLOC_IS_LISP_ALIGNED): Go back to yesterday’s version.
(maybe_lisp_pointer): Check against GCALIGNMENT, not LISP_ALIGNMENT.
* src/lisp.h (union emacs_align_type): Bring back.
Paul Eggert [Tue, 26 May 2020 05:06:25 +0000 (22:06 -0700)]
Refix aborts due to GC losing pseudovectors
This is simpler, and fixes a bug in the previous fix.
* src/alloc.c (MALLOC_ALIGNMENT_BOUND): Simplify by
using max_align_t, since the buggy implementations won’t
break this simpler implementation.
(LISP_ALIGNMENT): Simplify by just using GCALIGNMENT, since the
fancier implementation wasn’t correct anyway, and fixing it
isn’t worth the trouble on practical platforms.
* src/lisp.h (union emacs_align_type): Remove.
Paul Eggert [Tue, 26 May 2020 03:26:14 +0000 (20:26 -0700)]
Fix aborts due to GC losing pseudovectors
Problem reported by Eli Zaretskii (Bug#41321).
* src/alloc.c (MALLOC_ALIGNMENT_BOUND): New constant.
(LISP_ALIGNMENT): Lower it to avoid crashes on MinGW and similarly
buggy platforms where malloc returns pointers not aligned to
alignof (max_align_t). But keep it higher on platforms where this
is known to work, as it helps GC performance.
(MALLOC_IS_LISP_ALIGNED): Define in terms of the other two.
* src/alloc.c (stacktop_sentry):
* src/thread.c (run_thread):
Don’t overalign or oversize stack sentries; they need to be
aligned only for pointers and Lisp_Object, not for arbitrary
pseudovector contents.
* src/lisp.h (union emacs_align_type): New type, used for
LISP_ALIGNMENT.
Allow inhibiting 'auto-save-visited-mode' on a per-buffer basis.
At least for me, 'auto-save-visited-mode' is very slow and blocks user
interaction for files visited over TRAMP. Therefore, I'd like a
mechanism to disable it for some buffers (namely, those visiting
remote files).
* (auto-save-visited-mode): Document that 'auto-save-visited-mode' can
be set to nil buffer-locally.
Noam Postavsky [Mon, 25 May 2020 00:17:40 +0000 (20:17 -0400)]
Make dedicated keymap and mode for eshell-command (Bug#41370)
Otherwise, we end up permanently modifying eshell-mode-map when
running eshell-command.
* lisp/eshell/eshell.el (eshell-command-mode): New mode, with map to
contain the bindings previously set by eshell-return-exits-minibuffer.
(eshell-return-exits-minibuffer): Make into obsolete alias for
eshell-command-mode.
(eshell-command): Use eshell-command-mode instead of
eshell-return-exits-minibuffer.
Stefan Kangas [Sun, 24 May 2020 16:48:16 +0000 (18:48 +0200)]
Mark browse-url-conkeror as obsolete
* lisp/net/browse-url.el:
(browse-url--browser-defcustom-type)
(browse-url-conkeror-new-window-is-buffer)
(browse-url-conkeror-program, browse-url-conkeror-arguments)
(browse-url-default-browser, browse-url-conkeror): Mark the
conkeror browser as obsolete.
Carl Lei [Sun, 24 May 2020 11:52:24 +0000 (11:52 +0000)]
Add three C++20 coroutine keywords, co_await, co_yield, and co_return
* lisp/progmodes/cc-langs.el (c-operators): Add co_await and co_yield to the
C++ value of "Exception" keywords.
(c-return-kwds): Create a C++ value containing co_return.
(c-simple-stmt-kwds): Add co_return to the C++ value.
Paul Eggert [Sat, 23 May 2020 19:55:13 +0000 (12:55 -0700)]
Port etags FALLTHROUGH to C2X
Problem reported by Ashish SHUKLA in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg03013.html
* lib-src/etags.c (C_entries): Move label so that FALLTHROUGH
precedes a case label, as draft C2X specifies.
Paul Eggert [Sat, 23 May 2020 17:38:53 +0000 (10:38 -0700)]
Restore check for Emacs 20.2 bytecodes
* src/eval.c (Ffetch_bytecode): Check for multibyte bytecodes
here too. Problem reported by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg02876.html
Glenn Morris [Sat, 23 May 2020 14:50:30 +0000 (07:50 -0700)]
Merge from origin/emacs-27
d6a0b66a0c (origin/emacs-27) * lisp/subr.el (save-match-data): Clarif... 1a6d59eeba Improve the documentation of setting up fontsets c7737d40f2 ; * etc/TODO (Ligatures): Update the entry based on recent... fb2e34cd21 ; * etc/TODO (Ligatures): Update the entry based on recent... 13b6dfd4f7 * doc/emacs/killing.texi (Rectangles): Improve indexing. a10254dd46 Fix accessing files on networked drives on MS-Windows
Glenn Morris [Sat, 23 May 2020 14:50:29 +0000 (07:50 -0700)]
Merge from origin/emacs-27
4b9fbdb5a7 ; Update TODO item about ligature support 03d44acfdd * doc/lispref/control.texi (Processing of Errors): Improve... b48ab743a8 Minor fixups for mutability doc 6ac2326e5b Don’t use “constant” for values you shouldn’t change
Chris McMahan [Tue, 5 May 2020 18:15:01 +0000 (14:15 -0400)]
Let user adjust the column widths of the package menu.
* lisp/emacs-lisp/package.el (package-name-column-width)
(package-version-column-width, package-status-column-width)
(package-archive-column-width): New defcustoms.
(package-menu-mode):
Use the values of defcustoms instead of hardcoded
values. (Bug#41086)
Dmitry Gutov [Sat, 23 May 2020 01:38:27 +0000 (04:38 +0300)]
project.el: A project has only one main root now
Practice shows that the vast majority of projects only use one main
root. The users of this API very often make this assumption as well.
The rest of the "roots" should be possible to express through
project-external-roots.
* lisp/progmodes/project.el: Update the commentary.
Only 4 non-obsolete generics now.
(project-root): Replacement for `project-roots'.
All callers updated. Implementations too.
(project-roots): Declare obsolete.
(project-external-roots): Simplify the docstring.
(project-ignores): Update the docstring.
(project-find-regexp): Omit the second arg to project-files.
(project--dir-ignores): Simplify.
(project-compile): Simplify, remove outdated comment.
* lisp/net/eww.el (eww): Use function-put in place of put, as
recommended in "(elisp) Symbol Plists".
(eww-follow-link):
* lisp/net/shr.el (shr-browse-url): Rather than call browse-url-mail
directly, call browse-url which respects the user options
browse-url-handlers and browse-url-mailto-function. (Bug#41133)
(shr--current-link-region): Return nil if there is no link at point.
(shr--blink-link): Adapt accordingly.
(shr-fill-line, shr-indent, shr-table-body): Refactor to avoid some
unnecessary allocations.
* etc/NEWS: Announce that eww-follow-link and shr-browse-url support
custom URL handlers.
* etc/NEWS: Announce that json-read-number is now stricter.
* json.el: Bump package version.
(json-encoding-lisp-style-closings, json-pre-element-read-function)
(json-post-element-read-function, json-advance, json-peek)
(json--path): Clarify and improve style of doc strings.
(json-join): Define as an obsolete alias of string-join.
(json-alist-p, json-plist-p): Refactor for speed and declare as
pure, side-effect-free, and error-free.
(json--plist-reverse): Rename function...
(json--plist-nreverse): ...to this, making it destructive for speed.
All callers changed.
(json--plist-to-alist): Remove, replacing single use with map-pairs.
(json--with-indentation): Accept multiple forms as arguments, fix
their indentation, and allow them to be instrumented for debugging.
Add docstring.
(json-pop, json-read-keyword, json-add-to-object)
(json-encode-array): Simplify for speed.
(json-skip-whitespace): Put newline before carriage return for
likely frequency of occurrence, and so that the characters appear in
increasing order.
(json--check-position): Use 1+.
(json-path-to-position): Open code apply-partially.
(json-keywords): Turn into a defconst and mark as obsolete now that
it is no longer used.
(json--post-value, json--number, json--escape): New rx definitions.
(json-encode-keyword): Declare as side-effect-free.
(json-read-number): Reject leading zeros and plus signs, and make
integer part mandatory in accordance with JSON standards and for
consistency with native JSON parsing functions. Eagerly signal
json-number-format when garbage follows a valid number, e.g., when
reading "1.1.1", instead of leaving that up to the caller. Remove
optional internal argument from advertised calling convention now
that the function is no longer recursive.
(json-encode-number): Define as an alias of number-to-string.
(json-special-chars): Turn into a defconst.
(json-read-escaped-char, json-new-object, json-read-file)
(json-pretty-print): Simplify.
(json-read-string): For consistency with other json.el error
reporting, remove check for leading '"', and use the integer value
rather than the printed representation of characters in error data.
At EOB signal json-end-of-file instead of json-string-format.
(json--long-string-threshold, json--string-buffer): New variables.
(json-encode-string): Reimplement in terms of buffer manipulation
for speed (bug#20154).
(json-read-object): Escape ?\} properly.
(json--encode-alist): New function extracted from json-encode-alist.
(json-encode-hash-table, json-encode-alist, json-encode-plist): Use
it to avoid destructively modifying the argument when
json-encoding-object-sort-predicate is non-nil without incurring
unnecessary copying (bug#40693). Encode empty object as "{}" even
when pretty-printing. Simplify for speed.
(json-read-array): Avoid recomputing list length on each iteration
when json-pre-element-read-function is non-nil. Make first element
of json-array-format error data a string for consistency with
json-object-format and to make the displayed error message clearer.
(json-readtable-dispatch): Accept any kind of argument, not just
symbols. Generate the table in a simpler manner so the dispatch
order is clearer. Remove dispatch on ?+ and ?. now that
json-read-number is stricter and for consistency with native JSON
parsing functions. Signal json-end-of-file if argument is nil.
(json-read): Simplify accordingly.
(json-encode): Avoid allocating a list on each invocation.
* lisp/jsonrpc.el (jsonrpc--json-read, jsonrpc--json-encode): Check
whether native JSON functions are fboundp only once, at load time.
* lisp/progmodes/python.el (python--parse-json-array): New function.
(python-shell-prompt-detect): Use it to parse JSON directly as a
list rather than converting from a vector.
(test-json-path-to-position-no-match): Use should-not.
(test-json-read-object): Move error check to new test
test-json-read-object-invalid.
(test-json-pretty-print-object): Adapt test now that empty objects
are pretty-printed as "{}".
Paul Eggert [Mon, 18 May 2020 22:19:49 +0000 (15:19 -0700)]
Redo RCS Id for pdumper
* lisp/version.el: Don’t put an RCS Id style string into the
executable via purecopy, as this does not work with the pdumper.
* src/emacs.c (RCS_Id): New constant, for 'ident'.
Stefan Kangas [Tue, 19 May 2020 22:43:40 +0000 (00:43 +0200)]
Second attempt at improving indexing in control.texi
* doc/lispref/control.texi (Processing of Errors): Improve indexing by
adding the word form "handle" in addition to "handling". With thanks
to Eli Zaretskii.
Ryan C. Thompson [Wed, 20 May 2020 23:21:12 +0000 (02:21 +0300)]
lisp/ido.el: Respect completion-auto-help setting
This commit makes ido completion respect the user's setting for
`completion-auto-help' by default. It does this by defining a wrapper
function `ido-completion-auto-help', which calls `ido-completion-help'
only when `completion-auto-help' is non-nil.
* lisp/ido.el (ido-completion-auto-help): New function.
(ido-cannot-complete-command):
Use it as the new default (bug#41340).
Matthias Meulien [Wed, 20 May 2020 22:37:30 +0000 (01:37 +0300)]
Bookmark locations can refer to VC directory buffers (bug#39722)
* etc/NEWS: Document feature.
* lisp/vc/vc-dir.el (vc-dir-mode): Set local bookmark-make-record-function.
(bookmark-make-record-default, bookmark-prop-get, bookmark-default-handler)
(bookmark-get-bookmark-record): Declarations.
(vc-dir-bookmark-make-record): Make record used to bookmark a `vc-dir' buffer.
(vc-dir-bookmark-jump): Provides bookmark-jump behavior for a `vc-dir' buffer.
Eric Abrahamsen [Thu, 30 Apr 2020 01:10:35 +0000 (18:10 -0700)]
Prevent gnus-registry-handle-action from creating spurious entries
Thanks to Bob Newell for finding this.
* lisp/gnus/gnus-registry.el (gnus-registry-handle-action): If a
message entry ends up with no groups in its 'group key, that means the
entry should be deleted.
Alan Mackenzie [Wed, 20 May 2020 18:02:13 +0000 (18:02 +0000)]
which-function-mode: put hook function on after-change-major-mode-hook
, rather than find-file-hook. This keeps which-function-mode active should
the major mode be reinitialized. Also accept a null result from
add-log-current-defun as definitive, should that function have run. This
fixes bug #40714.
* lisp/progmodes/which-func.el (which-func-ff-hook): Put on
after-change-major-mode-hook.
(which-function): Enhance the logic to accept a null result from
add-log-current-defun.
Paul Eggert [Wed, 20 May 2020 06:22:40 +0000 (23:22 -0700)]
Hoist some byte-code checking out of eval
Check Lisp_Compiled objects better as they’re created,
so that the byte-code interpreter needn’t do the checks
each time it executes them. This improved performance
of ‘make compile-always’ by 1.5% on my platform. Also,
improve the quality of the (still-incomplete) checks, as
this is more practical now that they’re done less often.
* src/alloc.c (make_byte_code): Remove. All uses removed.
(Fmake_byte_code): Put a better (though still incomplete)
check here instead. Simplify by using Fvector instead
of make_uninit_vector followed by memcpy, and by using
XSETPVECTYPE instead of make_byte_code followed by XSETCOMPILED.
* src/bytecode.c (Fbyte_code): Do sanity check and conditional
translation to unibyte here instead of each time the function is
executed.
(exec_byte_code): Omit no-longer-necessary sanity and
unibyte checking. Use SCHARS instead of SBYTES where
either will do, as SCHARS is faster.
* src/eval.c (fetch_and_exec_byte_code): New function.
(funcall_lambda): Use it.
(funcall_lambda, lambda_arity, Ffetch_bytecode):
Omit no-longer-necessary sanity checks.
(Ffetch_bytecode): Add sanity check if actually fetching.
* src/lisp.h (XSETCOMPILED): Remove. All uses removed.
* src/lread.c (read1): Check byte-code objects more thoroughly,
albeit still incompletely, and do translation to unibyte here
instead of each time the function is executed.
(read1): Use XSETPVECYPE instead of make_byte_code.
(read_vector): Omit no-longer-necessary sanity check.
Tassilo Horn [Sat, 16 May 2020 08:05:12 +0000 (10:05 +0200)]
Allow back-references in syntax-propertize-rules.
* lisp/emacs-lisp/syntax.el (syntax-propertize--shift-groups-and-backrefs):
Renamed from syntax-propertize--shift-groups, and also shift
back-references.
(syntax-propertize-rules): Adapt docstring and use renamed function.
* test/lisp/emacs-lisp/syntax-tests.el: New test.
(syntax-propertize--shift-groups-and-backrefs): New ERT test.
Tassilo Horn [Tue, 19 May 2020 13:17:57 +0000 (15:17 +0200)]
Indicate not downloaded parts in MIME buttons.
Via nnimap-fetch-partial-articles one can tell Gnus to omit fetching
certain parts by default. Now the MIME buttons in the article buffer
indicate how to fetch the complete message in order to act on those
missing parts.
* lisp/gnus/gnus-art.el (gnus-insert-mime-button): Indicate not
downloaded parts in MIME buttons.
Paul Eggert [Tue, 19 May 2020 00:17:46 +0000 (17:17 -0700)]
Reject attempts to clear pure strings
* src/fns.c (Ffillarray, Fclear_string):
Add CHECK_IMPURE here, to be consistent with Faset etc.
(Ffillarray): Prefer memset when the fill is a single byte.
Paul Eggert [Mon, 18 May 2020 22:19:49 +0000 (15:19 -0700)]
Redo RCS Id for pdumper
* lisp/version.el: Don’t put an RCS Id style string into the
executable via purecopy, as this does not work with the pdumper.
* src/emacs.c (RCS_Id): New constant, for 'ident'.
Glenn Morris [Mon, 18 May 2020 17:54:14 +0000 (10:54 -0700)]
Restore buffer-undo-list to buffer-local-variables
It has been missing since 2012-07-03 (Emacs 24.3)
"Cleanup basic buffer management", when undo_list was moved to
the end of struct buffer. (Bug#33492)
* src/buffer.c (buffer_local_variables_1): New function.
(Fbuffer_local_variables): Explicitly add buffer-undo-list.
Fix calculator entry of numbers with negative exponents (bug#41347)
* lisp/calculator.el (calculator-string-to-number):
Remove obsolete string transformations preventing entry of 1e-3 etc.
Keep one transformation to allow entry of "1.e3".
Reported by Chris Zheng.
Dmitry Gutov [Mon, 18 May 2020 00:36:43 +0000 (03:36 +0300)]
Add user option project-vc-merge-submodules
* lisp/progmodes/project.el (project-vc): Update the docstring.
(project-vc-merge-submodules): New user option.
(project-try-vc): Use it.
(project--submodule-p): Extract from project-try-vc.
Dmitry Gutov [Sun, 17 May 2020 23:46:06 +0000 (02:46 +0300)]
vc-working-revision: Bind default-directory
* lisp/vc/vc-hooks.el (vc-working-revision):
Bind default-directory to be on the safe side.
Suggested by Ilya Ostapyshyn
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02301.html).
Paul Eggert [Sun, 17 May 2020 23:50:49 +0000 (16:50 -0700)]
Don’t attempt to modify constant strings
These attempts were found by ‘make compile-always’.
* lisp/language/tibet-util.el (tibetan-obsolete-glyphs):
* lisp/org/org-agenda.el (org-agenda-get-restriction-and-command):
Don’t try to modify string constants.
Andrea Corallo [Sun, 17 May 2020 12:23:59 +0000 (13:23 +0100)]
* Fix Garbage Collector for missing calle-saved regs content (Bug#41357)
* src/alloc.c (SET_STACK_TOP_ADDRESS): Do not call
__builtin_unwind_init.
(flush_stack_call_func1): Rename from 'flush_stack_call_func'.
(flush_stack_call_func): New function to spill all registers
before calling 'flush_stack_call_func1'. This to make sure the
top of the stack identified includes those registers.
Stefan Kangas [Sun, 17 May 2020 12:59:10 +0000 (14:59 +0200)]
Fix minor issues with mouse-drag-and-drop-region-show-tooltip
* lisp/mouse.el (mouse-drag-and-drop-region-show-tooltip): Fix
defcustom type to allow all valid values. Suggested by David
Ponce. (Bug#41351)
(mouse-drag-and-drop-region): Fix bug where setting
`drag-and-drop-region-show-tooltip' to 0 would still show a
tooltip.
Paul Eggert [Sun, 17 May 2020 00:17:00 +0000 (17:17 -0700)]
Don’t use “constant” for values you shouldn’t change
Inspired by patch proposed by Dmitry Gutov (Bug#40671#393)
and by further comments by him and by Michael Heerdegen
in the same bug report.
* doc/lispintro/emacs-lisp-intro.texi (setcar):
Don’t push mutability here.
* doc/lispref/eval.texi (Self-Evaluating Forms, Quoting)
(Backquote):
* doc/lispref/lists.texi (Modifying Lists):
* doc/lispref/objects.texi (Lisp Data Types, Mutability):
* doc/lispref/sequences.texi (Array Functions, Vectors):
* doc/lispref/strings.texi (String Basics, Modifying Strings):
Don’t use the word “constant” to describe all values that
a program should not change.
* doc/lispref/objects.texi (Mutability):
Rename from “Constants and Mutability”. All uses changed.
In a footnote, contrast the Emacs behavior with that of Common
Lisp, Python, etc. for clarity, and say the goal is to be nicer.
Paul Eggert [Sun, 17 May 2020 00:04:15 +0000 (17:04 -0700)]
Don’t attempt to modify constant conses
From a patch privately suggested by Mattias Engdegård on 2020-05-11
in a followup to Bug#40671.
* admin/charsets/cp51932.awk:
* admin/charsets/eucjp-ms.awk:
Generate code that does not modify constant conses.
* doc/misc/emacs-mime.texi (Encoding Customization):
* lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops):
* lisp/frameset.el (frameset-persistent-filter-alist):
* lisp/gnus/gnus-sum.el (gnus-article-mode-line-format-alist):
Use append instead of nconc.
* lisp/language/japanese.el (japanese-ucs-cp932-to-jis-map)
(jisx0213-to-unicode):
Use mapcar instead of mapc.
* lisp/language/lao-util.el (lao-transcription-consonant-alist)
(lao-transcription-vowel-alist):
* lisp/language/tibetan.el (tibetan-subjoined-transcription-alist):
Use copy-sequence.
* test/src/fns-tests.el (fns-tests-nreverse):
(fns-tests-sort, fns-tests-collate-sort)
(fns-tests-string-version-lessp, fns-tests-mapcan):
Use copy-sequence, vector, and list.
Glenn Morris [Sat, 16 May 2020 17:29:14 +0000 (10:29 -0700)]
Merge from origin/emacs-27
b4937f64cd (origin/emacs-27) Improve documentation of manually instal... efd4e973a4 Reflect the emacs-devel ELPA/MELPA dispute in FAQ 28541674cd Consider face inheritance when checking region face backgr... e75f6be6cc Fix dired default file operation (bug#41261) 406fb0746c Fix documentation related to 'command-switch-alist'. 747e0a2523 Improve ediff readability in misterioso theme (Bug#41221) 48830c73e7 Fix a crash in handle_display_spec a37290a6f9 In x_hide_tip reset tip_last_frame for GTK+ tooltips only ... 3d81995692 Fix docstring of flymake-make-diagnostic (bug#40351) 632aa9d57a Go back to “Bahá’í” e2406ff60f * lisp/dired.el (dired-toggle-marks): Doc fix. (Bug#41097)
Stefan Kangas [Sat, 16 May 2020 13:34:47 +0000 (15:34 +0200)]
Remove Emacs 22 compat code from ediff-vers.el
* lisp/vc/ediff-vers.el (ediff-vc-revision-other-window)
(ediff-vc-working-revision): Redefine Emacs 22 compatibility
aliases as obsolete function aliases.
(ediff-vc-internal, ediff-vc-merge-internal): Don't use the now
obsolete aliases.
Stefan Kangas [Sat, 16 May 2020 13:22:54 +0000 (15:22 +0200)]
Remove some XEmacs compat code from semantic
* lisp/cedet/semantic/wisent/comp.el (wisent-ISVALID-TOKEN)
(wisent-parse-nonterminals):
* lisp/cedet/semantic/wisent/wisent.el
(wisent-item-to-string): Remove XEmacs compatibility code.
(wisent-char-p): Redefine as obsolete function alias for
'characterp'.
Eli Zaretskii [Sat, 16 May 2020 08:54:37 +0000 (11:54 +0300)]
Improve documentation of manually installing Lisp packages
* doc/emacs/building.texi (Lisp Libraries): Describe how to
manually load packages in the init file. Mention the 'site-lisp'
subdirectory of the default 'load-path'.
* doc/emacs/package.texi (Packages): Describe manual installation
of ELisp packages. Suggested by Jean-Christophe Helary
<jean.christophe.helary@traduction-libre.org>.
Tassilo Horn [Fri, 15 May 2020 20:24:29 +0000 (22:24 +0200)]
Consider face inheritance when checking region face background.
Some themes (like dracula) make the region face inherit from some
other face. If the background color of the region was inherited,
`indicate-copied-region' did the switch-point-and-mark-twice dance
which is not visible in case the region is highlighted. It just
looked like Emacs would hang for a second after M-w.
* lisp/simple.el (indicate-copied-region): Consider face inheritance
when checking region face background.
Alan Mackenzie [Fri, 15 May 2020 19:24:29 +0000 (19:24 +0000)]
CC Mode: Fix bug #40052, where a very large macro was too slow in scrolling
* lisp/progmodes/cc-engine.el (c-end-of-macro): Fix faulty cache handling,
where the upper bound of c-macro-cache was never being set.
(c-forward-comment-minus-1): New macro which terminates unwanted indefinite
backward searching with lots of escaped newlines in c-backward-single-comment.
(c-backward-single-comment, c-backward-comments): Use the new macro above.
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string):
Optimize three regexps by using shy groups, thus preventing regexp stack
overflow while handling the large C Macro.