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.
Stefan Kangas [Tue, 19 May 2020 00:22:02 +0000 (02:22 +0200)]
Clarify wording in my last commit
* lisp/mouse.el (mouse-drag-and-drop-region-show-tooltip): Clarify
wording of integer option. Suggested by Eli Zaretskii.
Paul Eggert [Mon, 18 May 2020 22:42:18 +0000 (15:42 -0700)]
Improve password-cache-add example in comment
* lisp/password-cache.el: Improve comment. See Andreas Schwab in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg02422.html
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'.
Dmitry Gutov [Mon, 18 May 2020 21:55:27 +0000 (00:55 +0300)]
; Update NEWS
Glenn Morris [Mon, 18 May 2020 20:08:27 +0000 (13:08 -0700)]
Add test for recent buffer-local-variables change
* test/src/buffer-tests.el (buffer-tests-buffer-local-variables-undo):
New.
Alan Mackenzie [Mon, 18 May 2020 18:20:05 +0000 (18:20 +0000)]
CC Mode: Allow "static" etc. to be placed after a declaration's type name
Fixes bug #41284.
* lisp/progmodes/cc-langs.el (c-type-decl-prefix-key): include additionally
c-modifier-kwds in the set of keywords at the base of this lang-const.
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.
Simen Heggestøyl [Mon, 18 May 2020 15:54:05 +0000 (17:54 +0200)]
Use lexical-binding in webjump.el and add tests
* lisp/net/webjump.el: Use lexical-binding.
(webjump-read-url-choice): Remove redundant 'function' around lambda.
* test/lisp/net/webjump-tests.el: New file with tests for webjump.el.
Mattias Engdegård [Sun, 17 May 2020 16:11:27 +0000 (18:11 +0200)]
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:44:26 +0000 (03:44 +0300)]
Update the package version
* lisp/progmodes/project.el: Update the package version.
(project-vc-merge-submodules): Update the docstring.
(project-try-vc): Add a FIXME.
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.
Richard Stallman [Sun, 17 May 2020 19:54:59 +0000 (15:54 -0400)]
Don't mention non-GNU package archives.
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 05:23:28 +0000 (22:23 -0700)]
Don’t attempt to modify constant strings
* lisp/bookmark.el (bookmark-bmenu-set-header):
Use copy-sequence instead of concat, for clarity.
Also, the byte-compiler optimizes (concat "a" "b") into "ab".
* lisp/button.el (make-text-button):
* test/lisp/erc/erc-track-tests.el (erc-track--erc-faces-in):
* test/lisp/password-cache-tests.el:
(password-cache-tests-add-and-remove)
(password-cache-tests-read-from-cache)
(password-cache-tests-in-cache-p, password-cache-tests-read)
(password-cache-tests-reset)
(password-cache-tests-add/expires-key)
(password-cache-tests-no-password-cache):
Don’t attempt to modify constant strings.
* lisp/progmodes/elisp-mode.el (elisp--xref-format)
(elisp--xref-format-extra):
Don’t attempt to modify constant strings via put-text-property.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-across-ref):
Don’t attempt to modify constant vectors or strings.
Dmitry Gutov [Sun, 17 May 2020 02:00:46 +0000 (05:00 +0300)]
; Bump the project.el version to trigger a new release
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.
John Wiegley [Sat, 16 May 2020 18:30:50 +0000 (11:30 -0700)]
Add a note to eshell.texi that I, too, was a contributor
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)
# Conflicts:
# doc/emacs/building.texi
Stefan Kangas [Sat, 16 May 2020 15:48:36 +0000 (17:48 +0200)]
Remove stale comments
* lisp/printing.el (pr-create-interface):
* lisp/progmodes/ebnf2ps.el (ebnf-eps-filename, ebnf-trim-right):
Remove old comments about Emacs 21/22 compatibility.
Stefan Kangas [Sat, 16 May 2020 15:27:58 +0000 (17:27 +0200)]
Remove some compat code from CEDET
* lisp/cedet/data-debug.el (data-debug-overlay-properties)
(data-debug-overlay-p, dd-propertize):
Redefine as obsolete function aliases.
(data-debug-insert-overlay-props, data-debug-insert-hash-table)
(data-debug-insert-hash-table-button)
(data-debug-insert-widget-properties, data-debug-insert-widget)
(data-debug-insert-symbol-from-point)
(data-debug-insert-symbol-button, data-debug-insert-string)
(data-debug-insert-number, data-debug-thing-alist):
Don't use obsolete names.
Stefan Kangas [Sat, 16 May 2020 15:02:18 +0000 (17:02 +0200)]
Remove Emacs 22 compat code from abbrev.el
* lisp/abbrev.el (write-abbrev-file): Remove Emacs 22
compatibility code.
Stefan Kangas [Sat, 16 May 2020 14:27:20 +0000 (16:27 +0200)]
; * lisp/htmlfontify.el: Minor fix in file headers.
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'.
Stefan Monnier [Sat, 16 May 2020 13:08:14 +0000 (09:08 -0400)]
* lisp/textmodes/bibtex.el: Fix bug#41285 (paren typo)
Michael Albinus [Sat, 16 May 2020 12:04:07 +0000 (14:04 +0200)]
Introduce process-file-return-signal-string
* doc/lispref/processes.texi (Synchronous Processes):
Describe `process-file-return-signal-string'.
* doc/misc/tramp.texi: Adapt Tramp and Emacs version numbers.
(Remote processes): Describe `process-file-return-signal-string'
and $INSIDE_EMACS.
* etc/NEWS: Describe `process-file-return-signal-string'. Fix typos.
* lisp/simple.el (process-file-return-signal-string): New user option.
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Use it.
* lisp/net/tramp.el (tramp-get-signal-strings): New defun.
* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
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>.
Eli Zaretskii [Sat, 16 May 2020 07:30:43 +0000 (10:30 +0300)]
Reflect the emacs-devel ELPA/MELPA dispute in FAQ
* doc/misc/efaq.texi (Packages that do not come with Emacs): Warn
that some MELPA packages may require non-free software.
Stefan Monnier [Fri, 15 May 2020 21:30:47 +0000 (17:30 -0400)]
* lisp/progmodes/project.el (project-try-vc): Fix regexp typo.
Dmitry Gutov [Fri, 15 May 2020 21:06:39 +0000 (00:06 +0300)]
Fix submodules, second try
* lisp/progmodes/project.el (project-try-vc):
Call the backend directly instead of binding default-directory.
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.
Dmitry Gutov [Fri, 15 May 2020 19:09:55 +0000 (22:09 +0300)]
Fix Git submodules detection breakage
* lisp/progmodes/project.el (project-try-vc):
Use the absolute name of .git both times.
Stefan Monnier [Fri, 15 May 2020 18:49:46 +0000 (14:49 -0400)]
* lisp/progmodes/xref.el: Fix first line syntax
(xref--find-ignores-arguments): Simplify.
Simen Heggestøyl [Fri, 15 May 2020 18:27:19 +0000 (20:27 +0200)]
Use lexical-binding in autoconf.el and add tests
* lisp/progmodes/autoconf.el: Use lexical-binding.
* test/lisp/progmodes/autoconf-tests.el: New file with tests for
autoconf.el.
Mattias Engdegård [Fri, 15 May 2020 12:52:50 +0000 (14:52 +0200)]
Calc: GCD(0,x)=GCD(x,0)=|x|, not x (bug#41279)
Reported by David Ongaro.
* lisp/calc/calc-comb.el (calcFunc-gcd): Fix GCD simplification.
* test/lisp/calc/calc-tests.el (calc-gcd, calc-sum-gcd): New tests.
Stefan Kangas [Fri, 15 May 2020 17:55:26 +0000 (19:55 +0200)]
Delete libraries obsolete since 23.1 and 23.2
Emacs 23.2 was released 10 years ago. old-whitespace.el has a
replacement in whitespace.el and is no longer relevant. The other
libraries implement compatibility with Lucid Emacs, a modified version
of Emacs last released in the 1990s.
* lisp/obsolete/ledit.el:
* lisp/obsolete/lmenu.el:
* lisp/obsolete/lucid.el:
* lisp/obsolete/old-whitespace.el: Delete files. These libraries have
been obsolete since Emacs 23.1 or 23.2.
* etc/NEWS: Announce their deletion.
* admin/authors.el (authors-ignored-files)
(authors-fixed-entries, authors-valid-file-names):
* lisp/emulation/viper.el (viper-mode):
* lisp/ffap.el (ffap-menu-ask): Remove references to deleted files.
João Távora [Fri, 15 May 2020 14:20:36 +0000 (15:20 +0100)]
; Tweak version numbers in lisp/progmodes/xref.el
Hopefully this aids in getting the package correctly listed in GNU
ELPA.
* lisp/progmodes/xref.el (Version): Bump to 1.0.1
(Package-Requires): Require project 0.1.1.
Leo Vivier [Thu, 14 May 2020 22:03:18 +0000 (00:03 +0200)]
Fix dired default file operation (bug#41261)
* lisp/dired-aux.el (dired-dwim-target-directories): Restore
pre-emacs-27 behavior of 'dired-dwim-target'.
Dmitry Gutov [Fri, 15 May 2020 05:10:22 +0000 (08:10 +0300)]
Improve detection of Git submodules
* lisp/progmodes/project.el (project-try-vc):
Improve detection of Git submodules
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02008.html).
Tino Calancha [Thu, 14 May 2020 20:02:09 +0000 (22:02 +0200)]
; Fix warning in last change
* lisp/arc-mode.el (archive--summarize-descs):
Use file-modes-number-to-symbolic.
Philipp Stephani [Thu, 14 May 2020 17:26:43 +0000 (19:26 +0200)]
Fix documentation related to 'command-switch-alist'.
While there, add a unit test to verify the behavior.
* doc/lispref/os.texi (Command-Line Arguments): Fix documentation: the
option string in 'command-switch-alist' does include leading hyphens.
Also mention that 'command-switch-alist' parsing ignores equals signs
in options.
* test/lisp/startup-tests.el
(startup-tests/command-switch-alist): New unit test.
Tino Calancha [Fri, 8 May 2020 20:14:03 +0000 (22:14 +0200)]
Combine archive-int-to-mode and tar-grind-file-mode
Add a new function, file-modes-number-to-symbolic.
Make archive-int-to-mode and obsolete alias of it; use it
to define tar-grind-file-mode (Bug#27952).
* lisp/files.el (file-modes-number-to-symbolic): New defun.
* lisp/arc-mode.el (archive-int-to-mode): Make it an obsolete alias.
* lisp/tar-mode.el (tar-grind-file-mode):
Use file-modes-number-to-symbolic.
* test/lisp/arc-mode-tests.el (arc-mode-test-archive-int-to-mode)
* test/lisp/tar-mode-tests.el (tar-mode-test-tar-grind-file-mode):
Update test.
* test/lisp/files-tests.el (files-tests-file-modes-symbolic-to-number)
(files-tests-file-modes-number-to-symbolic): New tests.
* doc/lispref/files.texi (Changing Files): Document the new funtion.
* etc/NEWS (Lisp Changes in Emacs 28.1): Announce it.
Mattias Engdegård [Thu, 14 May 2020 10:23:23 +0000 (12:23 +0200)]
Fix customisation of mouse-drag-and-drop-region (bug#41251)
Reported by David Ponce.
* lisp/mouse.el (mouse-drag-and-drop-region): Add missing unquote.
Mattias Engdegård [Wed, 13 May 2020 13:17:10 +0000 (15:17 +0200)]
Calc: fix LU decomposition for non-numeric matrices (bug#41223)
Computing determinant and inverse for on some matrices containing
non-numeric elements failed or gave the wrong result.
Reported by Mauro Aranda.
* lisp/calc/calc-mtx.el (math-do-matrix-lud): Don't use zero as pivot.
* test/lisp/calc/calc-tests.el (calc-matrix-determinant): New test.
Stefan Kangas [Wed, 13 May 2020 23:28:03 +0000 (01:28 +0200)]
; Fix warning after last change in cal-julian.el
* lisp/calendar/cal-julian.el (diary-julian-date)
(diary-astro-day-number): Silence byte-compiler warning about variable
'declared after its first use'.
Simon Lang [Tue, 12 May 2020 21:54:52 +0000 (22:54 +0100)]
Improve ediff readability in misterioso theme (Bug#41221)
* etc/themes/misterioso-theme.el: Add ediff faces.
Copyright-paperwork-exempt: yes
Clément Pit-Claudel [Wed, 13 May 2020 14:37:05 +0000 (10:37 -0400)]
Fix a crash in handle_display_spec
* src/xdisp.c (handle_display_spec): Check that the cdr of the
disable-eval spec is a cons before taking its car. (Bug#41232)
Michael Albinus [Wed, 13 May 2020 12:11:18 +0000 (14:11 +0200)]
Fix some oddities, uncovered by Tramp tests
* lisp/net/tramp-gvfs.el (tramp-gvfs-enabled): Prevent crash for
older Emacsen.
* lisp/net/tramp.el (tramp-process-running-p): Simplify.
* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Adapt test.
(tramp-test33-environment-variables): Unset "INSIDE_EMACS" initially.
João Távora [Wed, 13 May 2020 10:31:21 +0000 (11:31 +0100)]
Turn Eldoc, Xref and Project into GNU ELPA :core packages
The new packages state they require Emacs 26.3 to function, but a
small part of project.el breaks this "soft" rule: the two functions
requiring fileloop.el are incompatible with Emacs 26.3.
* lisp/jsonrpc.el: Tweak comment near Package-Requires.
* lisp/emacs-lisp/eldoc.el: Add Version and Package-Requires.
* lisp/progmodes/flymake.el: Add comment near Package-Requires.
* lisp/progmodes/project.el: Add Version and Package-Requires.
* lisp/progmodes/xref.el: Add Version and Package-Requires.
Stefan Kangas [Wed, 13 May 2020 10:13:52 +0000 (12:13 +0200)]
Use lexical-binding in t-mouse.el
* lisp/t-mouse.el: Use lexical-binding.
Martin Rudalics [Wed, 13 May 2020 08:31:50 +0000 (10:31 +0200)]
In x_hide_tip reset tip_last_frame for GTK+ tooltips only (Bug#41200)
* src/xfns.c (x_hide_tip): Reset tip_last_frame only when
using GTK+ system tooltips (Bug#41200).
Basil L. Contovounesios [Wed, 13 May 2020 01:12:33 +0000 (02:12 +0100)]
; Fix warning in last change
* lisp/play/animate.el (animate-place-char): Silence 'unused lexical
variable' warning.
Stefan Kangas [Wed, 13 May 2020 00:06:03 +0000 (02:06 +0200)]
Use lexical-binding in animate.el and add tests
* lisp/play/animate.el: Use lexical-binding.
* test/lisp/play/animate-tests.el: New file.
Stefan Kangas [Tue, 12 May 2020 23:48:55 +0000 (01:48 +0200)]
Use lexical-binding in dissociate.el and add tests
* lisp/play/dissociate.el: Use lexical-binding.
* test/lisp/play/dissociate-tests.el: New file.
Stefan Kangas [Tue, 12 May 2020 23:30:51 +0000 (01:30 +0200)]
Use lexical-binding in cal-julian.el and add tests
* lisp/calendar/cal-julian.el: Use lexical-binding.
* test/lisp/calendar/cal-julian-tests.el: New file.
Paul Eggert [Tue, 12 May 2020 22:19:46 +0000 (15:19 -0700)]
Use proper digraphs in Bahá’í month names
* lisp/calendar/cal-bahai.el (calendar-bahai-month-name-array):
There doesn’t seem to be any disagreement in the sources I
consulted that “Mas͟híyyat” and “S͟haraf” both need an “s͟h” digraph
instead of plain “sh”.
Stefan Monnier [Tue, 12 May 2020 20:51:55 +0000 (16:51 -0400)]
* lisp/emacs-lisp/syntax.el: Fix bug#41195
Allow use of `syntax-ppss-flush-cache` in `syntax-propertize-function`.
(syntax-propertize--inhibit-flush): New var.
(syntax-propertize): Bind it.
(syntax-ppss-flush-cache): Test it.
Michael Heerdegen [Fri, 8 May 2020 01:49:24 +0000 (03:49 +0200)]
Revert "Inhibit modification hooks when saving eieio-persistent's"
This reverts commit
c59e878439833d89998e03134ee9060f9c449fd9.
João Távora [Tue, 12 May 2020 18:33:19 +0000 (19:33 +0100)]
Fix docstring of flymake-make-diagnostic (bug#40351)
* lisp/progmodes/flymake.el (flymake-make-diagnostic): Fix docstring
Stefan Kangas [Fri, 24 Apr 2020 21:43:57 +0000 (23:43 +0200)]
Support sorting timer-list-mode by column (Bug#40854)
* lisp/emacs-lisp/timer-list.el (timer-list-mode)
(timer-list--idle-predicate, timer-list--next-predicate)
(timer-list--repeat-predicate)
(timer-list--function-predicate): Add support for sorting by column.
Stefan Kangas [Fri, 24 Apr 2020 21:42:37 +0000 (23:42 +0200)]
Base timer-list-mode on tabulated-list-mode (Bug#40854)
* lisp/emacs-lisp/timer-list.el (list-timers)
(timer-list-mode): Inherit from 'tabulated-list-mode' instead of
'special-mode' and make the necessary changes to support that.
* doc/lispref/os.texi (Timers): Update documentation.
Glenn Morris [Tue, 12 May 2020 16:34:46 +0000 (09:34 -0700)]
Suppress test failure on hydra.nixos.org
* test/lisp/net/tramp-tests.el (tramp-test28-process-file):
Attempt to suppress hydra oddity.
Paul Eggert [Tue, 12 May 2020 00:41:16 +0000 (17:41 -0700)]
Pacify GCC 10.1.0
Pacify GCC 10.1.0 so that it does not issue false alarms
when Emacs is configured with --enable-gcc-warnings.
* src/dispnew.c (clear_glyph_row):
* src/fns.c (hash_clear):
* src/keyboard.c (append_tab_bar_item):
* src/lisp.h (vcopy):
* src/xfaces.c (get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, realize_default_face):
* src/xmenu.c (set_frame_menubar):
Work around -Warray-bounds false alarm in GCC 10.1.0.
* src/intervals.c (copy_properties):
Avoid -Wnull-dereference false alarm in GCC 10.1.0.
* src/lisp.h (xvector_contents_addr, xvector_contents):
New functions, useful for working around GCC bug 95072.
Paul Eggert [Tue, 12 May 2020 00:28:23 +0000 (17:28 -0700)]
Update from gnulib
This incorporates:
2020-05-11 careadlinkat: fix GCC 10 workaround
2020-05-10 careadlinkat: limit GCC workaround
2020-05-10 attribute: clarify list of attributes
2020-05-10 string: fix compilation error in C++ mode
2020-05-09 manywarnings: port to GCC 10.1
2020-05-09 careadlinkat: pacify -Wreturn-local-addr
2020-05-09 attribute: remove ATTRIBUTE_DEPRECATED
2020-05-09 attribute: Add comments
* lib/attribute.h, lib/careadlinkat.c, lib/string.in.h:
* lib/warn-on-use.h, m4/manywarnings.m4: Copy from Gnulib.
Alan Mackenzie [Mon, 11 May 2020 20:05:54 +0000 (20:05 +0000)]
Fix bug #40992 whilst still allowing breakpoint highlights in edebug
Strategy: when an instrumented function gets re-evaluated, save the former
value of its symbol's `edebug' property in the new propery `ghost-edebug'. If
this function is still being edebugged, edebug will then access its info from
this new property.
Also fix the bug whereby compile-defun'ing an instrumented function prevents
the function being re-instrumented by I (edebug-instrument-callee).
* lisp/emacs-lisp/edebug.el (edebug-get-edebug-or-ghost): New function.
(edebug-read-and-maybe-wrap-form1): save value of `edebug' property in
'ghost-edebug'.
(edebug-make-form-wrapper): Set value of `ghost-edebug' to nil.
(edebug-make-form-wrapper, edebug-find-stop-point, edebug-next-break-point)
(edebug-modify-breakpoint, edebug--overlay-breakpoints, edebug-set-breakpoint)
(edebug-unset-breakpoints, edebug-toggle-disable-breakpoint)
(edebug--backtrace-goto-source, edebug-display-freq-count)
(edebug-set-conditional-breakpoint): Use edebug-get-edebug-or-ghost to access
edebug information.
(edebug-instrument-function): Also check a function is a cons before declaring
it "already instrumented".
Stefan Monnier [Mon, 11 May 2020 13:53:37 +0000 (09:53 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--fgrep): Look inside vectors
Basil L. Contovounesios [Mon, 11 May 2020 10:43:29 +0000 (11:43 +0100)]
; Fix last change to bibtex.el
* lisp/textmodes/bibtex.el
(bibtex-autokey-before-presentation-function): Bump :version tag now
that nil is no longer a valid value.
Stefan Monnier [Mon, 11 May 2020 04:30:10 +0000 (00:30 -0400)]
* lisp/textmodes/bibtex.el: Avoid `eval`
In the top-level construction of the entry-type commands,
use `defalias` instead of (eval `(defun ...)).
(bibtex-insert-kill): Strength reduce `eval` => `symbol-value`.
(bibtex-autokey-before-presentation-function): Avoid nil value.
Stefan Monnier [Mon, 11 May 2020 04:18:14 +0000 (00:18 -0400)]
* lisp/subr.el (dolist, dotimes, combine-change-calls): Cosmetic tweaks
(dolist, dotimes): Adjust comment since testing
`lexical-binding` is supposed to be reliable.
(combine-change-calls): Add debug and indent specs.
Stefan Monnier [Mon, 11 May 2020 04:15:15 +0000 (00:15 -0400)]
* lisp/emacs-lisp/syntax.el (syntax-propertize): Use run-hook-wrapped
This way we avoid making assumptions about the content of
syntax-propertize-extend-region-functions
Stefan Monnier [Mon, 11 May 2020 04:12:29 +0000 (00:12 -0400)]
* lisp/ielm.el: Handle corner case where */**/*** are not yet bound
Remote redundant :group args.
(ielm-eval-input): Use bound-and-true-p for */**/***
Dmitry Gutov [Mon, 11 May 2020 02:13:25 +0000 (05:13 +0300)]
Map "mail/compose" icon to "mail-message-new" in GTK
* lisp/term/x-win.el (x-gtk-stock-map): One more icon mapping.
Dmitry Gutov [Mon, 11 May 2020 01:34:55 +0000 (04:34 +0300)]
Use the "modern" toolbars in Gnus again
* lisp/gnus/gmm-utils.el (gmm-tool-bar-style):
Undo the breakage from commit
d88118db37dd
(https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg02094.html).
Dmitry Gutov [Mon, 11 May 2020 01:25:53 +0000 (04:25 +0300)]
Use better icons on GTK in message-mode and isearch
* lisp/gnus/message.el (message-tool-bar-retro):
Use non-Gnus-specific icon.
* lisp/term/x-win.el (x-gtk-stock-map):
Use more themed icons (bug#40990).
Stefan Monnier [Sun, 10 May 2020 23:07:45 +0000 (19:07 -0400)]
* lisp/emacs-lisp/pcase.el: Don't bind unused vars in branches
(pcase--fgrep): Change calling convention to take bindings rather than
just variables.
(pcase--funcall, pcase--eval): Adjust to this new calling convention.
(pcase--expand): Use `pcase--fgrep` to bind only the vars that are used.
Stefan Monnier [Sun, 10 May 2020 20:17:01 +0000 (16:17 -0400)]
* lisp/emacs-lisp/eieio.el (eieio pcase macro): Fix last-minute typo
Tassilo Horn [Sun, 10 May 2020 18:41:42 +0000 (20:41 +0200)]
Prefer function-put over put for setting browse-url-browser-kind.
* lisp/net/browse-url.el: Prefer `function-put' over `put' for setting
`browse-url-browser-kind' symbol property.
Stefan Monnier [Sun, 10 May 2020 17:51:51 +0000 (13:51 -0400)]
* lisp/emacs-lisp/eieio.el (eieio pcase macro): Remove unused var `is`
Paul Eggert [Sun, 10 May 2020 15:47:47 +0000 (08:47 -0700)]
Go back to “Bahá’í”
* doc/emacs/calendar.texi (Holidays): Revert previous change, as
bahai.org spells it “Bahá’í” (with U+2019 RIGHT SINGLE QUOTATION
MARK) and that’s good enough for us.
Eli Zaretskii [Sun, 10 May 2020 16:04:51 +0000 (19:04 +0300)]
* lisp/dired.el (dired-toggle-marks): Doc fix. (Bug#41097)
Simen Heggestøyl [Sun, 10 May 2020 14:17:27 +0000 (16:17 +0200)]
Use lexical-binding in glasses.el and add tests
* lisp/progmodes/glasses.el: Use lexical-binding.
(glasses-separator, glasses-original-separator, glasses-face)
(glasses-separate-parentheses-p)
(glasses-separate-parentheses-exceptions)
(glasses-separate-capital-groups, glasses-uncapitalize-p)
(glasses-uncapitalize-regexp, glasses-convert-on-write-p): Remove
redundant :group args.
* test/lisp/progmodes/glasses-tests.el: New file with tests for
glasses.el.
Simen Heggestøyl [Sun, 10 May 2020 12:44:26 +0000 (14:44 +0200)]
Allow underscores in CSS variable names
* lisp/textmodes/css-mode.el (css-nmchar-re): Allow underscores in
variable names (and in identifiers in general).
* test/manual/indent/css-mode.css: Add some examples of variable names
with underscores in them.
* test/manual/indent/less-css-mode.less: Add some examples of variable
names with underscores in them.
* test/manual/indent/scss-mode.scss: Add some examples of variable
names with underscores in them.
Simen Heggestøyl [Sun, 10 May 2020 10:14:21 +0000 (12:14 +0200)]
Add containment module to CSS property list
* lisp/textmodes/css-mode.el (css-property-alist): Add new properties
from CSS Containment Module Level 1.
Simen Heggestøyl [Sun, 10 May 2020 08:00:56 +0000 (10:00 +0200)]
Add writing modes module to CSS property list
* lisp/textmodes/css-mode.el (css-property-alist): Add new properties
from the CSS Writing Modes Level 3 module.
Simen Heggestøyl [Sat, 9 May 2020 17:58:46 +0000 (19:58 +0200)]
Use lexical-binding in help-mode.el and add tests
* lisp/help-mode.el: Use lexical-binding.
(help-mode-map, help-mode-menu, help-mode-setup)
(help-mode-finish): Make spelling of "Help mode" consistent throughout
the doc strings (also making it consistent with the spelling of "Help
mode" used in the Elisp manual).
(help-do-xref): Re-indent to make the else-branch easier to see.
* test/lisp/help-mode-tests.el: New file with tests for help-mode.el.
Glenn Morris [Sat, 9 May 2020 17:17:27 +0000 (10:17 -0700)]
* src/xdisp.c (Fwindow_text_pixel_size): Fix previous merge.
Glenn Morris [Sat, 9 May 2020 17:03:21 +0000 (10:03 -0700)]
Merge from origin/emacs-27
be0d1cac83 (origin/emacs-27) Small fix for type of 'display-fill-colu...
c5e5839776 Fix customization of 'display-fill-column-indicator-charac...
d5c184aa3e Refer to fill column indicator Info node in some places.
e13300ae50 Merge branch 'emacs-27' of git.sv.gnu.org:/srv/git/emacs i...
0bae57033f Fix GTK's Tool Bar menu radio buttons
4c98aa7ea5 Minor clarifications in NEWS
a1cbd05f38 Improve documentation of 'with-suppressed-warnings'.
4a895c1b26 Fix a typo in a comment
2caf3e997e Improve documentation of Hi Lock mode
7081c1d66f Fix typos in the Emacs user manual
0385771e2f Fix references to Speedbar in VHDL mode
a76cafea0d Fix handling of FROM = t and TO = t by 'window-text-pixel-...
# Conflicts:
# etc/NEWS
# src/xdisp.c
Pieter van Oostrum [Thu, 5 Mar 2020 19:20:04 +0000 (20:20 +0100)]
Add new filter command to Package Menu (Bug#39903)
* lisp/emacs-lisp/package.el
(package-menu-filter-marked): New filter command.
* test/lisp/emacs-lisp/package-tests.el
(package-test-list-filter-marked): New test.
(package-menu-mode-menu):
(package-menu-mode-map): Update menu to include new filter command.
* doc/emacs/package.texi (Package Menu): Document the new command.
* etc/NEWS: Announce the new command.
Paul Eggert [Sat, 9 May 2020 16:10:50 +0000 (09:10 -0700)]
Improve nonnull checking with GCC in emacs-module
* src/emacs-module.h.in (EMACS_ATTRIBUTE_NONNULL):
Also do the nonnull check with GCC. (The old code did the
check with Clang but not with GCC.)
Paul Eggert [Sat, 9 May 2020 15:47:05 +0000 (08:47 -0700)]
Update from Gnulib
This incorporates:
2020-05-09 stdio: don't redefine _GL_ATTRIBUTE_FORMAT
2020-05-09 dirent, stdlib, string: don't redefine _GL_ATTRIBUTE_PURE
2020-05-08 limits-h: define LONG_BIT correctly on Haiku/x86_64
2020-05-08 ignore-value tests: use module 'attribute'
2020-05-06 attribute: minor style fixes
* build-aux/config.sub, doc/misc/texinfo.tex, lib/attribute.h:
* lib/dirent.in.h, lib/limits.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/string.in.h, m4/gnulib-common.m4:
Copy from Gnulib.
Philipp Stephani [Sat, 9 May 2020 12:33:05 +0000 (14:33 +0200)]
Small fix for type of 'display-fill-column-indicator-character'
* lisp/cus-start.el (standard): Don't mark t as safe file-local value
for 'display-fill-column-indicator-character', as that value isn't
allowed.
Michal Nazarewicz [Mon, 4 May 2020 18:08:10 +0000 (19:08 +0100)]
cc-mode: extend regexp used by ‘c-or-c++-mode’
* lisp/progmodes/cc-mode (c-or-c++-mode--regexp): Expand the regexp to
match some more C++-only constructs and recognise a few more standard
C++ header files. Also make sure identifiers start with non-digit.
(c-or-c++-mode): Add ‘(interactive)’ declaration.
* test/lisp/progmodes/cc-mode-tests.el (c-or-c++-mode): Add test case
for the newly recognised constructs.
Michal Nazarewicz [Sun, 3 May 2020 15:32:47 +0000 (16:32 +0100)]
cc-mode: add ‘c-lineup-ternary-bodies’ (bug#41061)
Introduce ‘c-lineup-ternary-bodies’ function which, when used as
a c lineup function, aligns question mark and colon of a ternary
operator. For example:
return arg % 2 == 0 ? arg / 2
: (3 * arg + 1);
* lisp/progmodes/cc-align.el (c-lineup-ternary-bodies): New function.
* doc/misc/cc-mode.texi (Operator Line-Up Functions): Document the
new function.
* test/lisp/progmodes/cc-mode-tests.el (c-lineup-ternary-bodies): New
test case.