1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

145724 commits

Author SHA1 Message Date
Lars Ingebrigtsen
0981712e57 Add a command in package mode for opening home pages directly
* doc/emacs/package.texi (Package Menu): Document it.
* lisp/emacs-lisp/package.el (package-browse-url): New command and
keystroke (bug#46927).
2021-03-04 21:39:49 +01:00
Mauro Aranda
fd9202304c Make checkdoc work with qualified methods
* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): Handle
cl-defmethod in a case of its own.  Check for the presence of
qualifiers, and skip them accordingly until the docstring.

* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-cl-defmethod-qualified-ok)
(checkdoc-cl-defmethod-with-extra-qualifier-ok)
(checkdoc-cl-defmethod-with-extra-and-nil-args-ok): Add tests for the fix.
2021-03-04 08:34:58 -03:00
Lars Ingebrigtsen
2d43522468 Add "of" as a keyword in js-mode
* lisp/progmodes/js.el (js--keyword-re): Add the "of" of "for
... of" in ECMAScript 2018 (bug#46924).
2021-03-04 21:21:21 +01:00
Matt Armstrong
6ff90ef0bb Call the set_buffer_overlays_ setters
* src/buffer.c (Fkill_buffer): Call set_buffer_overlays_before and
set_buffer_overlays_after instead of setting the fields directly
(bug#46914).
2021-03-04 21:12:00 +01:00
Glenn Morris
9e94509267 Generate info/dir directly from any org sources
* Makefile.in (texi_misc): New variable.
(srcdir_doc_info_dir_inputs): Use texi_misc.
(${srcdir}/info/dir): No longer depend on info-real.
2021-03-04 10:47:09 -08:00
Glenn Morris
4e83fd00bd * doc/misc/Makefile.in (echo-sources): New phony target. 2021-03-04 10:44:07 -08:00
Glenn Morris
bd443f4e9c * build-aux/make-info-dir: Handle .org input files. 2021-03-04 10:43:25 -08:00
Glenn Morris
ee6527545d ; Makefile.in: Update a comment. 2021-03-04 10:41:36 -08:00
Basil L. Contovounesios
8e759d60cc Decouple require-theme from load-theme
* lisp/custom.el (require-theme): Refashion after 'require', as a
function for loading only named features.  Do not call
load-theme (bug#45068).
* etc/NEWS: Update its announcement accordingly.
* doc/lispref/customize.texi (Custom Themes): Document it.

* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-vivendi-theme.el: Remove redundant calls to
'provide'.

* test/lisp/custom-tests.el (custom-tests--with-temp-dir): New
macro.
(custom-theme--load-path): Use it.
(custom-tests-require-theme): New test.
2021-03-04 15:40:35 +00:00
Basil L. Contovounesios
358c6c9b95 ; Pacify warnings in last newsticker change. 2021-03-04 15:34:19 +00:00
Eli Zaretskii
b1011e9e95 ; * etc/NEWS: Fix wording of a recently added entry. 2021-03-04 15:21:52 +02:00
Mauro Aranda
ac42f71908 Remove copy-pasto from image-dired.el
* lisp/image-dired.el (image-dired-dired-edit-comment-and-tags):
Remove reference to widget-example-repeat.
2021-03-04 10:16:02 -03:00
Mauro Aranda
986bf7ac0d Remove duplicated tests in checkdoc-tests.el
* test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-cl-defmethod-ok)
(checkdoc-cl-defmethod-with-types-ok, checkdoc-cl-defun-with-key-ok)
(checkdoc-cl-defun-with-allow-other-keys-ok)
(checkdoc-cl-defun-with-default-optional-value-ok)
(checkdoc-cl-defun-with-destructuring-ok): This tests were duplicated,
so keep one copy of them.  Checked by diffing two files with the
suspected tests, and supported by the fact that running occur with the
regexp "^(ert-deftest" reported 14 matches, while the tests being run
were 8.
2021-03-04 10:13:26 -03:00
Lars Ingebrigtsen
7b99fc0069 Make radio checkboxes work in eww
* lisp/net/eww.el (eww-toggle-checkbox): Actually update the
:checked values in the form.
2021-03-04 12:11:08 +01:00
Glenn Morris
ba33089d50 Fix a doc/misc clean rule
* doc/misc/Makefile.in (TEXI_FROM_ORG): New variable.
(orgclean): Fix rule.
2021-03-03 19:58:47 -08:00
Basil L. Contovounesios
a2ae2d2860 Fix pcase dontcare pattern in cl--sm-macroexpand
For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-03/msg00119.html

* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Fix recently
uncovered use of old name for pcase--dontcare.
2021-03-04 00:57:28 +00:00
Stefan Monnier
88ca2280ba * lisp/emacs-lisp/pcase.el (pcase-defmacro): Fix pcase-tests-macro
* lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Simplify accordingly.
2021-03-03 18:40:03 -05:00
Ulf Jasper
b379420a5b Preserve group structure on opml import and export.
* lisp/net/newst-backend.el (newsticker--raw-url-list-defaults),
  (newsticker-url-list-defaults),
  (newsticker--get-news-by-url),
  (newsticker--sentinel-work),
  (newsticker--parse-atom-0.3),
  (newsticker--decode-rfc822-date),
  (newsticker--image-download-by-wget),
  (newsticker--image-save),
  (newsticker--image-download-by-url),
  (newsticker--cache-save),
  (newsticker--stat-num-items): Fix indentation.
  (newsticker-opml-export): Preserve group structure on export.
  (newsticker--opml-insert-elt),
  (newsticker--opml-insert-group),
  (newsticker--opml-insert-feed): New.
  (newsticker--opml-import-outlines):
  (newsticker-opml-import): Preserve group structure on import. (Fixes
  fourth issue in Bug#41376.)
2021-03-03 21:10:34 +01:00
Juri Linkov
6458e16f33 New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings
* lisp/outline.el (outline-mode-cycle-map): New keymap from outline-mode-map.
(outline-mode-map): Inherit from outline-mode-cycle-map.
(outline-font-lock-keywords): Append keymap and face depending on
'outline-minor-mode-cycle' and 'outline-minor-mode-highlight'.
(outline-minor-mode-cycle, outline-minor-mode-highlight): New variables.
(outline-minor-mode-highlight-buffer): New function.
(outline-minor-mode): Handle 'outline-minor-mode-cycle' and
'outline-minor-mode-highlight'.
(outline-cycle-minor-mode, outline-cycle-highlight-minor-mode):
New minor modes (bug#45147).

* etc/compilation.txt:
* etc/grep.txt:
Enable outline-cycle-highlight-minor-mode.
2021-03-03 21:12:13 +02:00
Stefan Kangas
356636c6a1 Make inversion.el obsolete (Bug#46841)
* lisp/cedet/inversion.el:
* test/lisp/cedet/inversion-tests.el: Move from here...
* lisp/obsolete/inversion.el:
* test/lisp/obsolete/inversion-tests.el: ...to here.

* lisp/cedet/cedet.el (cedet-version): Make obsolete.
* lisp/cedet/cedet-cscope.el (cedet-cscope-version-check):
* lisp/cedet/cedet-global.el (cedet-gnu-global-version-check):
* lisp/cedet/cedet-idutils.el (cedet-idutils-version-check):
* lisp/cedet/ede/make.el (ede-make-check-version): Use 'version<'
instead of 'inversion-check-version'.
* lisp/cedet/semantic/db-file.el (semanticdb-load-database): Don't
use 'inversion-test'.
* lisp/cedet/semantic/ede-grammar.el
(ede-proj-makefile-insert-variables): Don't add inversion to
loadpath.
* lisp/speedbar.el: Remove stale comment.
2021-03-03 19:54:37 +01:00
Alan Mackenzie
9ef8a3bfca C++ Mode: Handle "if constexpr (...)" with a simple statement correctly
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): Add a check and
handling for c-block-stmt-hangon-key in the main loop.
2021-03-03 11:55:51 +00:00
Stefan Monnier
3ef6d04dcf * lisp/emacs-lisp/pcase.el (pcase--u1): Fix typo 2021-03-02 15:57:45 -05:00
Alan Mackenzie
8dd588b1fb CC Mode: Fix analysis of brace lists, particularly in C++ Mode
Fix some alignment functionality in cc-align.el.

* lisp/progmodes/cc-align.el (c-lineup-arglist-intro-after-paren): Align the
next line under the previous entry rather than one to the right of the paren.
(c-lineup-2nd-brace-entry-in-arglist): Take the anchor point from the
brace-list-entry element, not the brace-list-intro one.

* lisp/progmodes/cc-engine.el (c-looking-at-decl-block): Use
c-looking-at-statement-block to test whether "struct A {" begins a brace list
or a struct declaration.
(c-looking-at-or-maybe-in-bracelist): Several detailed amendments, correctly
to recognize brace lists.
(c-looking-at-statement-block): No longer search for commas, as they are not
reliable indicators of a brace list.  Search now for a restricted set of
keywords, since some can appear in brace lists in C++ mode.

* lisp/progmodes/cc-langs.el (c-stmt-block-only-keywords)
(c-stmt-block-only-keywords-regexp): New lang consts/vars.
(c-pre-id-bracelist-kwds): New lang const.
(c-pre-id-bracelist-key): Derive now from the above.
(c-pre-brace-non-bracelist-key): New lang const/var.
2021-03-02 20:31:36 +00:00
Juri Linkov
aa14398aa1 * lisp/tab-bar.el: Minor stylistic fixes.
(tab-bar-select-tab-modifiers): Use tab-bar--undefine-keys and
tab-bar--define-keys instead of turning tab-bar-mode on/off.
2021-03-02 21:50:49 +02:00
Stefan Monnier
20596a5ca2 * lisp/emacs-lisp/trace.el (trace-values): Work outside of traced function 2021-03-02 09:13:57 -05:00
Dmitry Gutov
6dee194535 (ruby-find-library-file): Also recognize 'gem' statements
* lisp/progmodes/ruby-mode.el (ruby-find-library-file):
Also recognize 'gem' statements.
2021-03-02 15:16:34 +02:00
Pip Cet
2b069c67d7 Compile closures that modify their bound vars correctly (Bug#46834)
* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Don't
move let bindings into the lambda. Don't reverse list of
bindings. (byte-compile): Evaluate the return value if it was
previously reified.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-reify-function):
Add tests.
2021-03-02 07:14:13 +00:00
Lars Ingebrigtsen
b9cb3b9040 Improve the dired-do-kill-lines doc string
* lisp/dired-aux.el (dired-do-kill-lines): Document the FMT
parameter (bug#46867).
2021-03-02 08:07:59 +01:00
Stefan Monnier
165353674e * lisp/emacs-lisp/pcase.el: Bind all the vars in or patterns
Improve the handling of `or` patterns where not all sub-patterns bind the
same set of variables.  This used to be "unsupported" and behaved in
somewhat unpredictable ways.

(pcase--expand): Rewrite.
(pcase-codegen): Delete.

* doc/lispref/control.texi (pcase Macro): Adjust accordingly.
Also remove the warning about "at least two" sub patterns.
These work fine, AFAICT, and if not we should fix it.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-or-vars): New test.
2021-03-01 23:57:56 -05:00
Lars Ingebrigtsen
bac0089fb8 Fix previous completion-pcm--optimize-pattern fix
* lisp/minibuffer.el (completion-pcm--optimize-pattern): Re-fix
previous change.
2021-03-01 22:41:42 +01:00
Lars Ingebrigtsen
7b62cda96e Fix warning in completion-pcm--optimize-pattern
* lisp/minibuffer.el (completion-pcm--optimize-pattern): Remove
unused variable.
2021-03-01 22:38:17 +01:00
Lars Ingebrigtsen
e5392d38ac Make easymenu downcase the menu symbol for greater backwards compat
* lisp/cmuscheme.el (map): Revert previous fix.

* lisp/woman.el (woman-dired-define-keys): Ditto.

* lisp/emacs-lisp/easymenu.el (easy-menu-do-define): Downcase the
menu name for greater backwards compatibility.
2021-03-01 22:12:43 +01:00
Stefan Monnier
0d827c7f52 * lisp/emacs-lisp/pcase.el: Fix bug#46786
Revert commit a218c98615, but in order
to avoid the spurious warnings that this commit tried to squash,
keep track of the vars used during the match so as to add
corresponding annotations to explicitly silence the spurious warnings.

To do this, we change the VARS used in `pcase-u` (and throughout
the pcase code): they used to hold elements of the form (NAME . VAL)
and now they hold elements of the form (NAME VAL . USED).

(pcase--expand): Bind all vars instead of only those found via fgrep.
(pcase-codegen): Silence "unused var" warnings for those vars that have
already been referenced during the match itself.
(pcase--funcall, pcase--eval): Record the vars that are used.
(pcase--u1): Record the vars that are used via non-linear patterns.

* lisp/textmodes/mhtml-mode.el (mhtml-forward):
* lisp/vc/diff-mode.el (diff-goto-source): Silence newly
discovered warnings.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-bug46786): New test.
2021-03-01 15:35:51 -05:00
Mattias Engdegård
08b11a02f4 Fix multiple Calc defmath errors (bug#46750)
Fix incorrect variable scoping in `let*`, `for` and `foreach`.
Fix loop variable value in `foreach` (should be element, not tail).
Fix function quoting, as in ('cons x y) -- didn't work at all.

Reported by Stephan Neuhaus.

* lisp/calc/calc-prog.el (math-define-exp, math-handle-foreach):
* test/lisp/calc/calc-tests.el: (var-g, test1, test2, test3, test4)
(test5, test6, test7, calc-defmath): Test various defmath forms.
2021-03-01 20:59:52 +01:00
Mattias Engdegård
5f319423c8 Remove references to old bignums from Calc manual
* doc/misc/calc.texi: Remove references to the old Calc representation
of big integers, outdated references to fixnums, an any text and
examples that only made sense at the time.
2021-03-01 20:59:52 +01:00
Mattias Engdegård
ce7e78a2c0 * lisp/calc/calc-ext.el (math-equal-int): Work for bignums. 2021-03-01 20:59:52 +01:00
Juri Linkov
e6a4ef48fd * lisp/isearch.el: Minor doc fix. 2021-03-01 21:58:43 +02:00
Juri Linkov
6268c9ba6e * lisp/tab-bar.el (tab-bar--define-keys): Add check for tab-bar-format-global. 2021-03-01 21:58:43 +02:00
Protesilaos Stavrou
59e1867a1f Add 'require-theme' function
* etc/NEWS: Document new function.
* lisp/custom.el (require-theme): Add function.

This follows from the discussion on bug#45068 where it became apparent
that there was no equivalent mechanism to 'require' that read through
the 'custom-theme-load-path'.
2021-03-01 19:50:02 +00:00
Lars Ingebrigtsen
ece8c1307a Fix woman.el menu alteration code
* lisp/woman.el (woman-dired-define-keys): Fix naming of menu
after dired menu changes.
2021-03-01 20:48:20 +01:00
Alan Mackenzie
4d35faa1db CC Mode: Amend C-M-a/e to handle lambda function in C++ arglist
* lisp/progmodes/cc-cmds.el (c-where-wrt-brace-construct): Reformulate latter
part such that the least enclosing braces and parentheses are used when
determining containment in such.  c-beginning-of-decl-1 has been superseded
by list movement and syntactic whitespace movement.
(c-backward-to-nth-BOF-{): Work on least enclosing parens rather than parens
at any level when moving back to an opening brace.
(c-forward-to-nth-EOF-\;-or-}): Work on least enclosing parens, as above.
Move the correction of point when in a "function trailer" to after the main
loop, correcting a minor bug.
2021-03-01 19:23:01 +00:00
Stefan Monnier
d56b1f9e7c * lisp/emacs-lisp/pcase.el (pcase--split-pred): Re-fix bug#14773
Adjust to calling convention of `macroexp--fgrep`.
2021-03-01 14:07:05 -05:00
Stefan Monnier
a0f60293d9 Fix misuses of byte-compile-macro-environment
These seem to be left overs from Emacs<24 when `macroexpand-all` was
implemented in the CL library and hence the macros's evaluation
environment could come from different places depending on the
circumstance (either `byte-compile-macro-environment`, or
`cl-macro-environment`, or ...).

`byte-compile-macro-environment` contains definitions which expand to
code that is only understood by the rest of the byte-compiler,
so using it for code which isn't being byte-compiled leads to errors
such as references to non-existing function
`internal--with-suppressed-warnings`.

* lisp/emacs-lisp/cl-extra.el (cl-prettyexpand): Remove left-over
binding from when `macroexpand-all` was implemented in the CL library.

* lisp/emacs-lisp/ert.el (ert--expand-should-1):
* lisp/emacs-lisp/cl-macs.el (cl--compile-time-too): Properly preserve the
macroexpand-all-environment.
(cl--macroexp-fboundp): Pay attention to `cl-macrolet` macros as well.
2021-03-01 12:18:49 -05:00
Stefan Monnier
6ad9b8d677 * src/eval.c (init_eval_once): Bump max_specpdl_size (bug46818)
Further testing seems to confirm my suspicion that the increase in the
specpdl comes from the recent change to `pcase--if`.

* lisp/international/mule-cmds.el (update-leim-list-file): Revert workaround.
2021-03-01 11:42:04 -05:00
Glenn Morris
5c26ea4cbc ; Auto-commit of loaddefs files. 2021-03-01 06:27:02 -08:00
Matt Armstrong
70514c6374 Clean up obsolete comment
* src/marker.c (unchain_marker): Clean up obsolete comment
(bug#46836).

Commit cf3164523b (* src/alloc.c: Avoid O(N²) complexity when
unchaining markers (bug#24548)., 2018-03-23) removed the call from GC
into unchain_marker, so there is no need to warn about it.
2021-03-01 14:26:21 +01:00
F. Jason Park
eb2a1e1d6c Fix Bootstring skew parameter in puny.el
* lisp/net/puny.el: change puny-skew to match value given in RFC3492.
* test/lisp/net/puny-tests.el (puny-test-encode-domain)
(puny-test-decode-domain): add regression case for popular
domain. (bug#46838).
2021-03-01 14:05:36 +01:00
Stefan Kangas
5684f7995d Convert various menus to easymenu
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-map): Move menu from
here...
(lisp-mode-menu): ...to here, and convert to easymenu.

* lisp/progmodes/elisp-mode.el (lisp-interaction-mode-map): Move
menu definition from here...
(lisp-interaction-mode-menu): ...to here, and convert to easymenu.

* lisp/replace.el (occur-menu-map): Convert to easymenu.
2021-03-01 04:38:38 +01:00
Glenn Morris
8bdaac3457 Improve admin.el's Makefile in standalone manual tarfiles
* admin/admin.el (make-manuals-dist-output-variables):
Fix abs_top_builddir.  Add EMACS.
(make-manuals-dist--1): Respect case when replacing output variables.
2021-02-28 18:07:04 -08:00
Glenn Morris
4825ea3c5d info/dir needs generated texi files to exist
* Makefile.in (misc-info): Depend on lisp.
(${srcdir}/info/dir): Depend on info-real.
(info): Simplify.
2021-02-28 15:22:29 -08:00