Andrea Corallo [Thu, 18 Jun 2020 21:04:55 +0000 (23:04 +0200)]
* Handle correctly pure delaration specifier.
* lisp/emacs-lisp/comp.el (comp-func): New slot 'pure'.
(comp-spill-decl-spec): New function.
(comp-spill-speed): Rework to use the later.
(comp-spill-lap-function, comp-intern-func-in-ctxt): Spill pure
decl value.
(comp-function-optimizable-p): Check in the compiler env too if
pure.
Andrea Corallo [Mon, 15 Jun 2020 18:26:00 +0000 (20:26 +0200)]
Allow per function speed declaration
* src/comp.c (COMP_SPEED): Rename.
(comp_t): Add 'func_speed' field.
(emit_mvar_lval, compile_function): Update for per function speed.
(Fcomp__compile_ctxt_to_file): COMP_SPEED renamed.
* lisp/emacs-lisp/comp.el (comp-speed): Doc update.
(comp-func): New 'speed' slot.
(comp-spill-speed): New function.
(comp-spill-lap-function, comp-intern-func-in-ctxt): Fill 'speed'
slot.
(comp-spill-lap-function): Gate -1 speed functions for native
compilation and emit bytecode instead.
(comp-spill-lap): Close over `byte-to-native-plist-environment'.
(comp-latch-make-fill): Update for per function speed.
(comp-limplify-top-level): Fill speed.
(comp-propagate1, comp-call-optim-form-call, comp-call-optim)
(comp-dead-code, comp-tco, comp-remove-type-hints): Update for per
function speed.
Use a single parser of color strings in the #RGB, rgb:R/G/B and
rgbi:R/G/B formats, replacing four existing ones. Previously,
error-checking was spotty, handling of the rgbi: format not always
present, and normalization of the result was sometimes incorrect.
* src/dispextern.h: New prototype.
* src/xfaces.c (parse_hex_color_comp, parse_float_color_comp)
(parse_color_spec, Finternal-color_values_from_color_spec): New functions.
* test/src/xfaces-tests.el (xfaces-internal-color-values-from-color-spec):
New test.
* lisp/term/tty-colors.el (tty-color-standard-values):
Use internal-color-values-from-color-spec, replacing old parser.
* src/nsterm.m (ns_get_color):
* src/w32fns.c (x_to_w32_color):
* src/xterm.c (x_parse_color): Use parse_color_spec, replacing old
parsers.
(HEX_COLOR_NAME_LENGTH): Remove #define.
* lisp/net/tramp-crypt.el (tramp-crypt-handle-delete-file)
(tramp-crypt-handle-file-attributes, tramp-crypt-handle-file-system-info)
(tramp-crypt-handle-make-directory): Let-bind `tramp-crypt-enabled' to nil.
* lisp/net/tramp.el (tramp-file-name-for-operation): Fix for operations
with two arguments.
(tramp-handle-load): Suppress `signal-hook-function' when NOERROR
is non-nil.
* test/lisp/net/tramp-tests.el (tramp-test41-utf8)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Skip if needed.
* lisp/progmodes/project.el (project-shell): Improve docstring to
include information about an implementation detail.
* list/progmodes/project.el (project-eshell): Modelled after
'project-shell', change default behavior such that we don't create too
many eshell buffers by default. Use universal argument to create
subsequent buffers.
project-shell: Pop to an existing shell buffer by default
* lisp/progmodes/project.el (project-shell):
Pop to an existing shell buffer by default.
If there's none, or if universal argument is used, open a subsequent
shell buffer and jump to it. Prefix shell buffer name with the base
name of project root directory. (Bug#41858)
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-stat):
Simplify shell command. Suppress errors (interpret as nil).
(tramp-sh-handle-make-process): Do not visit with
`insert-file-contents'. Delete tmp file only if exists.
(tramp-send-command-and-read): Suppress `signal-hook-function'
when reading expression.
Andrea Corallo [Mon, 1 Jun 2020 11:47:29 +0000 (12:47 +0100)]
Add native compiler dynamic scope support
Add an initial implementation to support dynamic scope. Arg
parsing/binding it's done using the existing code in use for
bytecode (no ad-hoc code is synthetized for that).
* src/lisp.h (struct Lisp_Subr): Add lambda_list field.
(SUBR_NATIVE_COMPILED_DYNP): New inliner.
* src/alloc.c (mark_object): Update for Add lambda_list field.
* src/comp.c (declare_lex_function): Rename from declare_function
and rework.
(declare_function): New function.
(make_subr): Handle daynamic scope
* src/pdumper.c (dump_subr): Update for lambda_list field.
* lisp/emacs-lisp/comp.el (comp-func): Remove args slot.
(comp-func-l, comp-func-d): New classes deriving from `comp-func'.
(comp-spill-lap-function): Rework.
(comp-prepare-args-for-top-level): New function.
(comp-emit-for-top-level, comp-emit-lambda-for-top-level): Make
use of `comp-prepare-args-for-top-level'.
(comp-limplify-top-level): Use `comp-func-l'.
(comp-limplify-function): Emit arg prologue only for dynamic
scoped functions.
(comp-call-optim-form-call): Use `comp-func-l'.
(comp-call-optim, comp-tco): Do not optimize dynamic scoped code.
project-switch-to-buffer: Use the "other buffer" as default
* lisp/progmodes/project.el
(project-switch-to-buffer): Pass the "other buffer" as DEF to
read-buffer if it belongs to the current project (bug#41879).
Define the dark luminance limit as a named constant
To make the meaning of the color-dark-p cutoff luminance clear,
define it as a named constant. (We no longer use the somewhat
obscure 0.6^2.2 definition since it doesn't really make sense
to define the limit in gamma-compressed space.)
* lisp/faces.el (color-luminance-dark-limit): New constant.
(color-dark-p): Use color-luminance-dark-limit.
* lisp/net/shr.el (shr-target-id): Add docstring.
(shr-descend, shr-tag-a): Display dummy anchor characters as the
empty string. Give all relevant 'id' or 'name' fragment identifier
attributes the shr-target-id text property. This ensures that
cached content, such as tables, retains the property across
renders. (Bug#40532)
For discussion, see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00843.html
https://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00042.html
https://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00282.html
* etc/NEWS: Announce that battery-upower is enabled by default.
* lisp/battery.el (battery-upower-device): Accept both battery and
line power device names, or a list thereof (bug#39491).
(battery-upower-line-power-device): Remove user option; superseded
by battery-upower-device.
(battery-upower-subscribe): New user option.
(battery-status-function): Check whether a UPower service is
provided without activating it.
(display-battery-mode): Subscribe to UPower signals when using
battery-upower.
(battery-upower): Merge data from multiple power sources. Calculate
terse battery status %b based on average battery load percentage
rather than coarse and often missing BatteryLevel (bug#39491). Add
support for average temperature %d.
(battery-upower-device-list): Rename to...
(battery--upower-devices) ...this. Return a flat list of device
names determined by battery-upower-device.
(battery-upower-types, battery-upower-states)
(battery-upower-device-property, battery-upower-device-autodetect):
Remove.
(battery--upower-signals): New variable.
(battery--upower-signal-handler, battery--upower-props-changed)
(battery--upower-unsubscribe, battery--upower-subsribe)
(battery--upower-state): New functions.
* test/lisp/battery-tests.el (battery-upower-state)
(battery-upower-state-unknown): New tests.
* lisp/battery.el: Mention BSD support in Commentary. Don't load
preloaded lisp/emacs-lisp/timer.el.
(battery--files): New function.
(battery--find-linux-sysfs-batteries): Use it and make fewer
syscalls.
(battery-status-function): Perform GNU/Linux checks in increasing
order of obsolescence: sysfs, ACPI, and then APM. Simplify Darwin
check. Add :version tag now that battery-upower is the default.
(battery-echo-area-format, battery-mode-line-format): Mention %s.
(battery-load-low, battery-load-critical): New faces.
(battery-update): Display battery-mode-line-format even if
percentage is N/A. Apply faces battery-load-low or
battery-load-critical according to the percentage, but append them
so they don't override user customizations. Update all mode lines
since we are in global-mode-string.
(battery-linux-proc-apm-regexp): Mark as obsolete, replacing with...
(battery--linux-proc-apm): ...this new rx definition.
(battery-linux-proc-apm): Use it. Fix indentation. Simplify.
(battery--acpi-rate, battery--acpi-capacity): New rx definitions.
(battery-linux-proc-acpi): Use them. Fix pathological whitespace
regexps. Simplify.
(battery-linux-sysfs): Fix docstring and indentation. Reduce number
of file searches. Simplify.
(battery-bsd-apm): Fix docstring. Simplify.
(battery-pmset): Fix docstring. Simplify ID regexp.
* lisp/emacs-lisp/rx.el (rx-define): Indent as a defun.
* test/lisp/battery-tests.el (battery-linux-proc-apm-regexp): Test
new battery--linux-proc-apm rx definition.
(battery-acpi-rate-regexp, battery-acpi-capacity-regexp): New tests.
* lisp/format-spec.el: Use lexical-binding. Remove dependence on
subr-x.el.
(format-spec-make): Clarify docstring.
(format-spec--parse-modifiers): Rename to...
(format-spec--parse-flags): ...this and simplify. In particular,
don't bother parsing :space-pad which is redundant and unused.
(format-spec--pad): Remove, replacing with...
(format-spec--do-flags): ...this new helper function which performs
more of format-spec's supported text manipulation.
(format-spec): Autoload. Allow optional argument to take on special
values 'ignore' and 'delete' for more control over what happens when
a replacement for a format specification isn't provided. Bring back
proper support for a precision modifier similar to that of 'format'.
* lisp/battery.el (battery-format): Rewrite in terms of format-spec.
(battery-echo-area-format, battery-mode-line-format): Mention
support of format-spec syntax in docstrings.
* doc/lispref/strings.texi (Custom Format Strings):
* etc/NEWS: Document and announce these changes.
* lisp/dired-aux.el (dired-do-compress-to):
* lisp/erc/erc-match.el (erc-log-matches):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/gnus/gnus-sieve.el (gnus-sieve-update):
* lisp/gnus/gssapi.el (open-gssapi-stream):
* lisp/gnus/mail-source.el (mail-source-fetch-file)
(mail-source-fetch-directory, mail-source-fetch-pop)
(mail-source-fetch-imap):
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/image-dired.el:
* lisp/net/eww.el:
* lisp/net/imap.el (imap-kerberos4-open, imap-gssapi-open)
(imap-shell-open):
* lisp/net/network-stream.el (network-stream-open-shell):
* lisp/obsolete/tls.el (open-tls-stream):
* lisp/textmodes/tex-mode.el:
Remove extraneous loads and autoloads of format-spec now that it is
autoloaded and simplify its uses where possible.
* test/lisp/battery-tests.el (battery-format): Test new format-spec
support.
* test/lisp/format-spec-tests.el (test-format-spec): Rename to...
(format-spec) ...this, extending test cases.
(test-format-unknown): Rename to...
(format-spec-unknown): ...this, extending test cases.
(test-format-modifiers): Rename to...
(format-spec-flags): ...this.
(format-spec-make, format-spec-parse-flags, format-spec-do-flags)
(format-spec-do-flags-truncate, format-spec-do-flags-pad)
(format-spec-do-flags-chop, format-spec-do-flags-case): New tests.
* etc/NEWS: Announce removal of aliases obsolete since Emacs 24.3.
* lisp/net/dbus.el: Remove unneeded dependency on cl-lib.el. Quote
function symbols as such.
(dbus-ignore-errors): Don't add macro name to font-lock keywords, as
emacs-lisp-mode now dynamically fontifies new macro definitions.
(dbus-event-error-hooks, dbus-call-method-non-blocking): Remove
aliases obsolete since Emacs 24.3.
(dbus-register-signal, dbus-escape-as-identifier): Simplify. Use
regexp \` and \' in place of ^ and $.
(dbus--parse-xml-buffer): New function for libxml2 compatibility.
(dbus-introspect-xml): Use it.
Philip K [Thu, 18 Jun 2020 01:00:38 +0000 (04:00 +0300)]
New command: project-kill-buffers
* lisp/progmodes/project.el
(project-kill-buffers-skip-conditions): New variable.
(project--buffer-list): New function.
(project-kill-buffers): New command (bug#41868).
Dmitry Gutov [Wed, 17 Jun 2020 22:09:29 +0000 (01:09 +0300)]
vc-git-dir-extra-headers: Fix recent breakage
* lisp/vc/vc-git.el (vc-git-dir-extra-headers): Account for
'remote' being set to "" when not found
(https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00582.html).
(vc-git-dir-extra-headers): Check the value of remote-url instead.
Tassilo Horn [Thu, 11 Jun 2020 15:02:02 +0000 (17:02 +0200)]
Auto-setup for bug-reference-mode
Tries to guess suitable bug-reference-bug-regexp and
bug-reference-url-format values based on version control URL (in file
buffers) and mail information (in Gnus summary and article buffers).
* lisp/progmodes/bug-reference.el
(bug-reference--maybe-setup-from-vc): New defun.
(bug-reference-setup-from-vc-alist): New defvar defining setup rules
based on version control URL.
(bug-reference-try-setup-from-vc): New defun using above defvar.
(bug-reference--maybe-setup-from-mail): New defun.
(bug-reference-setup-from-mail-alist): New defvar defining setup rules
based on mail/newsgroups and header values.
(bug-reference-try-setup-from-gnus): New defun using above defvar.
(bug-reference--try-setup-gnus-article): New defun.
(bug-reference--run-auto-setup): New defun.
(bug-reference-mode): Call bug-reference--run-auto-setup as
:after-hook.
(bug-reference-prog-mode): Call bug-reference--run-auto-setup as
:after-hook.
* doc/misc/gnus-faq.texi (FAQ 3-11):
* doc/emacs/frames.texi (Tab Bars): Consistently use @var with
lower-case metasyntactic variables and @minus instead of a dash.
(Text-Only Mouse):
* doc/emacs/files.texi (Auto Revert):
* doc/emacs/misc.texi (emacsclient Options)
(Embedded WebKit Widgets):
* doc/lispref/control.texi (pcase Macro):
* doc/lispref/debugging.texi (Backtraces):
* doc/lispref/files.texi (Truenames):
* doc/lispref/frames.texi (Management Parameters):
* doc/lispref/os.texi (Time Calculations):
* doc/lispref/text.texi (Parsing JSON):
* doc/misc/efaq-w32.texi (Other versions of Emacs, Debugging)
(Swap Caps NT, Printing, Bash, Developing with Emacs):
* doc/misc/efaq.texi (New in Emacs 25):
* doc/misc/emacs-gnutls.texi (Help For Users):
* doc/misc/message.texi (Using S/MIME, Passphrase caching):
* test/manual/etags/tex-src/gzip.texi (Overview): Use @. when a
sentence in the middle of a paragraph ends with an upper-case letter
as per "(texinfo) Ending a Sentence".
Juri Linkov [Tue, 16 Jun 2020 23:14:12 +0000 (02:14 +0300)]
Rename default function to next-error-buffer-unnavigated-current (bug#40919)
* lisp/simple.el (next-error-find-buffer-function): Rename default function
from next-error-no-navigation-try-current
to next-error-buffer-unnavigated-current.
David Edmondson [Sat, 28 Mar 2020 19:03:58 +0000 (19:03 +0000)]
gnus-cloud: Improve cloud sync
After replaying a set of actions downloaded by gnus-cloud, persist the
highest sequence number seen as the local `gnus-cloud-sequence'
number, in order that a future download will not unnecessarily replay
previously seen actions and any future uploads from this emacs
instance use a higher sequence number than that downloaded.
Remove the test on whether individual newsrc entries are older than
the current time, as that is always going to be the case.
Michael Albinus [Mon, 15 Jun 2020 14:24:22 +0000 (16:24 +0200)]
Fix some Tramp problems seen during tests
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `access-file'.
(tramp-crypt-file-name-for-operation): Rewrite. Take second
argument into account.
(tramp-crypt-file-name-handler): Use it.
(tramp-crypt-send-command): Set buffer multibyte (but utf8 files
still don't work).
(tramp-crypt-handle-access-file): New defun.
(tramp-crypt-do-copy-or-rename-file): Short track if both files
are on a crypted remote dir.
* lisp/net/tramp.el (file-notify-rm-watch): Declare.
(tramp-inhibit-progress-reporter): New defvar.
(tramp-message): Display message only if not suppressed by
progress reporter.
(with-tramp-progress-reporter): Suppress concurrent progress
reporter messages.
(tramp-file-notify-process-sentinel): Simplify.
Tassilo Horn [Mon, 15 Jun 2020 06:56:11 +0000 (08:56 +0200)]
Add optional remote-name argument to VC repository-url command
* lisp/vc/vc.el: Document new remote-name argument of VC
repository-url command.
* lisp/vc/vc-git.el (vc-git-repository-url): Add and use new arg.
* lisp/vc/vc-hg.el (vc-hg-repository-url): Add and use new arg.
* lisp/vc/vc-bzr.el (vc-bzr-repository-url): Add new arg but ignore
it.
* lisp/vc/vc-svn.el (vc-svn-repository-url): Add new arg but ignore
it.
Philipp Stephani [Wed, 10 Jun 2020 17:01:03 +0000 (19:01 +0200)]
Band-aid for edebugging generator bodies (Bug#40434).
Edebug doesn't support them well. Rather than trying to fix Edebug,
disable instrumentation for now to prevent annoying bugs.
* lisp/emacs-lisp/generator.el (iter-defun, iter-lambda, iter-make)
(iter-do): Don't attempt to instrument bodies that are mangled by the
CPS transformer.
* test/lisp/emacs-lisp/generator-tests.el
(generator-tests-edebug): New regression test.
Philipp Stephani [Sun, 14 Jun 2020 16:18:13 +0000 (18:18 +0200)]
Ensure that getters and setters can be edebugged at the same time.
It's necessary to add a name suffix to setters defined with
'gv-define-setter' so that Edebug can distinguish between the getter
and the setter (Bug#41853).
* lisp/emacs-lisp/gv.el (gv-define-setter): Add a name suffix to
setter definitions.
* test/lisp/emacs-lisp/gv-tests.el (gv-setter-edebug): New regression
test.
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-ownership-preserved-p'.
(tramp-crypt-add-directory): Check, that NAME is not quoted.
(tramp-crypt-handle-file-ownership-preserved-p): New defun.
(tramp-crypt-handle-insert-directory): Fix docstring.
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-gvfs-handle-file-readable-p): Call `tramp-get-remote-uid'.
(tramp-gvfs-handle-get-remote-uid)
(tramp-gvfs-handle-get-remote-gid): Rename from
`tramp-gvfs-get-remote-{uid,gid}'. Do not cache result.
(tramp-gvfs-maybe-open-connection): No special handling for remote
uid and gid.
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid):
Rename from `tramp-get-remote-{uid,gid}'. Do not cache result.
(tramp-sh-handle-file-ownership-preserved-p): Distinguish by GROUP
when caching.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-sudoedit-handle-get-remote-uid)
(tramp-sudoedit-handle-get-remote-gid): Rename from
`tramp-sudoedit-get-remote-{uid,gid}'. Do not cache result.
(tramp-sudoedit-handle-set-file-uid-gid)
(tramp-sudoedit-handle-write-region): Call `tramp-get-remote-uid'
and `tramp-get-remote-gid'.
(tramp-sudoedit-maybe-open-connection): No special handling for
remote uid and gid.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `tramp-get-remote-gid' and 'tramp-get-remote-uid'.
(tramp-handle-write-region, tramp-check-cached-permissions):
Call `tramp-get-remote-uid' and `tramp-get-remote-gid'.
(tramp-get-remote-uid, tramp-get-remote-gid): New defuns.
(tramp-local-host-p): Simplify `tramp-get-remote-uid' call.
* test/lisp/net/tramp-tests.el (tramp-test17-dired-with-wildcards)
Skip if needed.
* lisp/progmodes/sql.el (sql-add-product): Re-correct argument
spec. Previous change was due to my mistake; I have
resolved back to the prior behavior (Bug#39960).
* test/lisp/progmodes/sql-tests.el (sql-test-add-product): Added
test to insure I don't make the same mistake again.
This partially reverts commit fc759eb9b3
"Fix with-coding-priority markup in Elisp manual"
of 2019-10-13T15:36:02Z!contovob@tcd.ie.
For discussion, see the following thread:
https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00550.html
https://lists.gnu.org/archive/html/emacs-devel/2020-06/msg00473.html
* doc/lispref/nonascii.texi (Specifying Coding Systems): Use more
specific cross-reference to progn even if info.el displays it
suboptimally.
Andrea Corallo [Sat, 13 Jun 2020 09:12:15 +0000 (11:12 +0200)]
* Implement 'maybe_gc_or_quit' to allow correct GC in compiled Lisp.
Implement the backend side of 'maybe_gc_or_quit' so that every time a
call to it is emitted we render it accordingly. This allow GC to
kicks in during long loops in Lisp code.
Andrea Corallo [Thu, 11 Jun 2020 20:53:31 +0000 (22:53 +0200)]
* Introduce latches
Define a new kind of basic block 'latch' to close over loops. Its
purpose is for now to emit calls to `comp-maybe-gc-or-quit' but in
future will be usefull for the loop optimizer to exploit unboxes.
* lisp/emacs-lisp/comp.el (comp-block): New base class.
(comp-block-lap): New class for LAP derived basic blocks.
(comp-latch): New class.
(comp-bb-maybe-add, comp-make-curr-block, comp-emit-handler)
(comp-emit-switch, comp-emit-switch, comp-limplify-top-level)
(comp-addr-to-bb-name, comp-limplify-block)
(comp-limplify-function): Update logic for new bb objects
arrangment.
(comp-latch-make-fill): New function.
(comp-emit-uncond-jump, comp-emit-cond-jump): Update to emit
latches.
(comp-new-block-sym): Add a postfix paramenter.
Michael Albinus [Fri, 12 Jun 2020 18:17:02 +0000 (20:17 +0200)]
Further fixes while testing tramp-crypt
* doc/misc/tramp.texi (External methods): Remove experimental note
for rclone.
(Keeping files encrypted): Mark file encryption as experimental.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-handle-file-truename'.
(tramp-adb-handle-file-truename): Remove.
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-writable-p'.
(tramp-crypt-send-command): Return t if no error.
(tramp-crypt-do-encrypt-or-decrypt-file-name)
(tramp-crypt-do-encrypt-or-decrypt-file): Raise an error if it fails.
(tramp-crypt-do-copy-or-rename-file): Flush file properties also
when copying a directory.
(tramp-crypt-handle-file-writable-p): New defun.
(tramp-crypt-handle-insert-directory): Check for library
`text-property-search'.
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-uid-gid):
Rename from `tramp-gvfs-set-file-uid-gid'.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename):
Use `tramp-handle-file-truename' as fallback.
* lisp/net/tramp.el (tramp-handle-file-truename):
Let-bind `tramp-crypt-enabled' to nil.
(tramp-handle-write-region): Set also file ownership.
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory):
Skip if needed.
Eric Abrahamsen [Sat, 6 Jun 2020 19:13:15 +0000 (12:13 -0700)]
Derive gnus-edit-form-mode from lisp-data-mode, fix mode map
* lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Derive from
lisp-data-mode, which can be handy for users who have turned on things
like paredit for lisp-data-mode.
(gnus-edit-form-mode-map): Put creation of the map inside the defvar.
Andrea Corallo [Thu, 11 Jun 2020 18:23:00 +0000 (20:23 +0200)]
Fix recursive load for non cons hashed 'data_ephemeral_vec' content
Removing `Vcomp_sym_subr_c_name_h' all c_name functions are GC
markable only through 'data_ephemeral_vec'. A recursive load must not
overide its content otherwise a previously activated load will have
the original content collected before it's used.
Andrea Corallo [Thu, 11 Jun 2020 20:22:00 +0000 (22:22 +0200)]
Remove `Vcomp_sym_subr_c_name_h'
Given there's no more unique relation symbol-name -> c-name remove
`Vcomp_sym_subr_c_name_h' and store the c_name directly in struct
Lisp_Subr. The old approach would have failed dumping two functions
with the same symbol-name.
Add a predicate, color-dark-p, for deciding whether a colour is more
readable with black or white as contrast. It has experimentally been
shown to be more accurate and robust than the various methods
currently employed.
The new predicate compares the relative luminance of the colour to an
empirically determined cut-off value, and it seems to get it right in
almost all cases, with no value leading to outright bad results.
* lisp/faces.el (readable-foreground-color): Use color-dark-p.
(color-dark-p): New function.
* lisp/facemenu.el (list-colors-print): Use readable-foreground-color,
improving readability of list-colors-display.
* lisp/textmodes/css-mode.el (css--contrasty-color): Remove.
(css--fontify-region): Use readable-foreground-color.
* lisp/emacs-lisp/cl-macs.el (cl-lambda-list, cl-lambda-list1)
(cl-macro-list, cl-macro-list1): Use exactly the same specification as
for &optional (sans the third optional list element).
Nicolás Bértolo [Tue, 9 Jun 2020 01:01:25 +0000 (22:01 -0300)]
Copy suffixes passed to 'openp' to avoid GC crashes. Fixes bug#41755
In openp_add_middle_dir_to_suffixes we build a heap-based list from
the passed suffixes. It is crucial that we don't create a heap-based
cons that points to a stack-based list.
* src/lread.c (openp_add_middle_dir_to_suffixes): Copy suffixes when
building a list of middle-dirs and suffixes.