* lisp/hi-lock.el (hi-lock-mode): Tweak the doc string so that
running hi-lock-mode in a *Help* buffer showing this help text
won't issue an error (bug#20977).
* doc/emacs/calendar.texi: Document the change.
* lisp/calendar/diary-lib.el (diary-offset):
* test/lisp/calendar/icalendar-tests.el: Add a test (bug#50195).
Augusto Stoffel [Fri, 3 Sep 2021 12:26:51 +0000 (14:26 +0200)]
Change Python eval to send directly instead of using temporary files
* lisp/progmodes/python.el (python-shell-eval-setup-code): New
const for setting up eval (bug#49822).
(python-shell--encode-string): New function.
(python-shell-send-string): Use it to send commands directly
instead of writing to a temporary file.
(python-shell-send-string-no-output): Adjust sending.
(python-shell-send-file): Ditto.
* css-mode.el (css-property-alist, css-value-class-alist): Provide new
position related entries for use in css-property-alist. Make sure
that property-alist reflect the spec:
https://www.w3.org/TR/css-align-3/#property-index
Fix `describe-function' for autoloaded adviced functions
* lisp/emacs-lisp/nadvice.el (advice--make-single-doc): Factor
out.
(advice--make-docstring): From here (bug#23523). Also include
advices for autoloads.
Make recent timer changes more backwards-compatible
* lisp/emacs-lisp/timer.el (timerp, timer-event-handler): Make
backwards-compatible with old .elc files that have their own
versions of `timer-create'd structures.
Stefan Kangas [Wed, 28 Jul 2021 11:31:40 +0000 (13:31 +0200)]
Move cl-lib tests for caaXr to subr-tests.el
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-test-caaar)
(cl-test-caadr): Move tests using a cl-lib alias from here...
* test/lisp/subr-tests.el (subr-test-caaar, subr-test-caadr): ...to
here. The functions under test are in subr.el.
* lisp/textmodes/css-mode.el (css-property-alist): Consolidate
`align-{contents, items, self}', as well as the corresponding
values for `justify-{contents, items, self}' and `place-{contents,
items, self}'. Values extracted from the flex part and into its
own block (bug#50345).
Formerly, bug-reference-setup-from-vc-alist basically had one entry
per host (like gitlab.com). Restructure so that it's easy to add new
hosts being just an instance of some type of forge such as SourceHut,
Gitea, or GitLab.
While we're at it, add support for gitea.com, salsa.debian.org, and
framagit.org, the latter two being GitLab instances.
* lisp/progmodes/bug-reference.el (bug-reference-gitea-instances)
(bug-reference-gitlab-instances,bug-reference-sourcehut-instances):
New variables listing online instances of those forges.
(bug-reference--setup-from-vc-alist): New function (and variable for
caching) using the former three new variables to generate suitable VC
auto-setup alist.
(bug-reference-try-setup-from-vc): Use both
bug-reference-setup-from-vc-alist and
bug-reference--setup-from-vc-alist.
Eli Zaretskii [Thu, 2 Sep 2021 11:58:41 +0000 (14:58 +0300)]
Fix 'clone-frame' on TTY frames
* src/frame.c (Fmake_terminal_frame): Make a separate copy of the
faces for the new frame before calling modify-frame-parameters, as
on TTY frames that needs the faces already set up. (Bug#34715)
Eli Zaretskii [Thu, 2 Sep 2021 10:43:00 +0000 (13:43 +0300)]
Improve a recent change in 'mule-cmds.el'
* lisp/international/mule-cmds.el
(select-safe-coding-system--format-list): Display codepoints in
hex and as characters. Display the ellipsis in a better place.
Enlarge the limit to 5 codepoints, as the display is now easier to
grasp.
(select-safe-coding-system-interactively): Don't use
'select-safe-coding-system--format-list' for "rejected"
coding-systems, as those don't come with characters and positions.
* lisp/international/mule-cmds.el
(select-safe-coding-system--format-list): New function to display
the coding system information in a more readable format (bug#31062).
(select-safe-coding-system-interactively): Use it.
* lisp/emacs-lisp/lisp.el (backward-up-list): Reformat the doc
string into several paragraphs (bug#31349).
(up-list): Ditto and fix the "start" to be "end".
Eli Zaretskii [Wed, 1 Sep 2021 16:27:43 +0000 (19:27 +0300)]
Fix segfault with invalid key-translation-map binding
* src/keyboard.c (access_keymap_keyremap): Don't assume an invalid
function is specified as a symbol. Reported by Perry E. Metzger
<perry@piermont.com>.
* lisp/epg.el (epg--start): We may be called from contexts where
the directory doesn't exist, but we need to have an existing
directory here for the process (bug#32004).
Make set-foreground-color display completions using foreground colors
* lisp/faces.el (defined-colors-with-face-attributes): Also create
colors for foregrounds (bug#33799).
(read-color): Also allow varying the foreground color.
* lisp/frame.el (set-foreground-color): Vary the foreground color.
Marco Centurion [Wed, 1 Sep 2021 07:37:12 +0000 (09:37 +0200)]
Use "gzip -d" instead of "gunzip"
* lisp/dired-aux.el (dired-compress-file-suffixes): Use "gzip -d"
instead of "gunzip" since we already assume that "gzip" exists on
the system (bug#10990).
* doc/emacs/maintaining.texi (Xref Commands): `mouse-1' is bound
to `xref-goto-xref', not `mouse-2' (bug#35376).
(Xref Commands): Mention what `mouse-2' does.
* lisp/progmodes/xref.el (xref--button-map): Adjust.
(xref-select-and-goto-xref): Rename from xref--mouse-2 (bug#35376).
* lisp/textmodes/ispell.el (ispell-complete-word): Leave point at
the end of the inserted word instead of a less than useful amount
of distance from the start of the word (bug#37552).
Make calc plotting through gnuplot work on non-X gnuplots
* lisp/calc/calc-graph.el (calc-graph-plot): Fall back on "dumb"
if we don't support the terminal (bug#50237).
(calc-gnuplot-command): Say whether the command errored out.
Make run-at-time try harder to run at integral multiples
* lisp/emacs-lisp/timer.el (timer): Add new slot integral-multiple.
(timerp): Adjust.
(timer-event-handler): Recompute the delay if requested
(bug#39099).
(run-at-time): Mark the timer as recomputable if given a t
parameter.
Harald Jörg [Mon, 30 Aug 2021 16:53:51 +0000 (18:53 +0200)]
; cperl-mode.el: Fix border cases of inserting with elisp
* lisp/progmodes/cperl-mode.el (cperl-unwind-to-safe): Replace
(and extend) inline comment by a docstring. Handle edge cases when
inserting text with elisp (related to Bug#28962).
(cperl-process-here-doc): Add syntax-type `here-doc-start'.
(cperl-find-pods-heres): Make sure that the results of this
function are immediately visible.
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-14343):
Add test cases for "empty" here-documents and inserting at the
edges of a here-document.
Stefan Monnier [Mon, 30 Aug 2021 14:52:25 +0000 (10:52 -0400)]
(cperl-test-bug-14343): Make it work for perl-mode
* test/lisp/progmodes/cperl-mode-tests.el (cperl--tests-heredoc-face):
New const.
(cperl-test-heredocs, cperl-test-bug-14343): Use it.
(cperl-test-identify-no-heredoc): Remove left-over message.
Move vc-branch-p and vc-branch-part from vc.el to vc-rcs.el and rename
* lisp/vc/vc-rcs.el (vc-rcs-branch-p): Renamed from `vc-branch-p'
(old name made into obsolete alias) and moved from vc.el.
(vc-rcs-branch-part): Renamed from `vc-branch-part'
(old name made into obsolete alias) and moved from vc.el.
Augusto Stoffel [Sun, 29 Aug 2021 18:56:11 +0000 (20:56 +0200)]
Add support for OSC 7 in comint (current directory tracking)
* lisp/comint.el (comint-osc-directory-tracker, comint-osc-handlers):
Define and register a handler for OSC 7.
(comint-osc-process-output): Do fewer checks on
'comint-last-output-start'.
Alan Mackenzie [Sun, 29 Aug 2021 14:03:57 +0000 (14:03 +0000)]
C++ Mode: handle compound identifiers preceding brace lists correctly
* lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): early in
function, check alternatively for c-back-over-compound-identifier when doing
c-backward-token-2.
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
Don't overly truncate headers that are before a right-aligned
column (bug#44594).
(tabulated-list--available-space): Separated out into own
function...
(tabulated-list-print-col): ... from here.