1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 05:30:45 -08:00
Commit graph

145616 commits

Author SHA1 Message Date
Alan Third
056b468f74 Fix freeze on older macOS's (bug#46687)
* src/nsterm.m ([EmacsView windowDidChangeBackingProperties:]):
([EmacsView viewWillDraw]): Only run this code when actually drawing
to an offscreen bitmap.
2021-02-25 17:58:59 +00:00
Robert Pluim
90ac405702 Re-enable network-stream-tests.el :nowait t tests
After the fix for Bug#46709, these no longer fail in the absence of a
working Internet connection

* test/lisp/net/network-stream-tests.el (internet-is-working): Remove
defvar, it's no longer needed in this file.

* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv4-nowait):
(connect-to-tls-ipv6-nowait):
(open-network-stream-tls-nowait):
(open-gnutls-stream-new-api-nowait):
(open-gnutls-stream-old-api-nowait): Remove check for internet-is-working.
2021-02-25 16:44:43 +01:00
Robert Pluim
d84d69dfbc Don't crash if gnutls_handshake fails
In some situations involving Internet access not being fully
functional, gnutls_handshake returns a fatal error, which we were
ignoring, causing us to call gnutls_handshake again.  Now we check for
the error and return it to the caller.

* src/gnutls.c (gnutls_try_handshake): Return immediately if
gnutls_handshake returns a fatal error (Bug#46709).
2021-02-25 16:44:43 +01:00
Robert Pluim
6c5e86fc17 * Specify 'ipv4 when testing ipv4 in network-stream-tests.el
* test/lisp/net/network-stream-tests.el
(connect-to-tls-ipv4-nowait): Specify :family 'ipv4.
2021-02-25 16:44:43 +01:00
Robert Pluim
a1673d3296 ; * src/xfaces.c (realize_gui_face): Correct formatting
* src/xfaces.c (realize_gui_face): Correct code formatting.
2021-02-25 16:44:43 +01:00
Stefan Kangas
4d43b9a0b0 Convert epa-key-list-mode menu to easy-menu-define
* lisp/epa.el (epa-key-list-mode-map): Move menu from here...
(epa-key-list-mode-menu): ...to here, and convert to easy-menu-define.
2021-02-25 12:56:12 +01:00
Stefan Monnier
4b1ace22be Remove last remaining external uses of edebug-form-spec
* lisp/emacs-lisp/gv.el (gv-place): Use `def-edebug-elem-spec`.

* lisp/obsolete/erc-compat.el (erc-define-minor-mode): Remove redundant
`edebug-form-spec`.
2021-02-24 23:08:47 -05:00
Stefan Monnier
8114a84b21 * test/lisp/emacs-lisp/macroexp-tests.el (macroexp--tests-file-name): Add case
Add use of `macroexp-file-name` from a macro called from within
a function, which works thanks to eager-macroexpansion (so the macro
is expanded which the file is being loaded rather than only later
when the function is called).

* test/lisp/emacs-lisp/macroexp-resources/m1.el
(macroexp--m1-tests-file-name): New function.
2021-02-24 18:39:06 -05:00
Stefan Monnier
d527bc4b7d * test/lisp/emacs-lisp/macroexp-tests.el (macroexp--tests-file-name): New test
* test/lisp/emacs-lisp/macroexp-resources/m1.el:
* test/lisp/emacs-lisp/macroexp-resources/m2.el: New files.
2021-02-24 18:12:18 -05:00
Lars Ingebrigtsen
97ab85c78e Include a "make check-maybe" in the admin/emake script 2021-02-24 23:55:05 +01:00
Basil L. Contovounesios
db09267de3 ; Fix recent obsoletion warning in cl.el. 2021-02-24 22:34:06 +00:00
Basil L. Contovounesios
2bbc2262cd ; Add :version tags to recent newsticker options. 2021-02-24 22:23:53 +00:00
Stefan Monnier
b7f67d432b * lisp/emacs-lisp/macroexp.el (macroexp-file-name): Work in eval-buffer
Rely on `current-load-list` instead of `load-file-name`.

* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables):
Change the var we override accordingly.
2021-02-24 17:16:00 -05:00
Lars Ingebrigtsen
46b54e5bb4 Improve quail-update-leim-list-file error messaging
* lisp/international/quail.el (quail-update-leim-list-file): Give
a better error message.
2021-02-24 20:32:09 +01:00
Lars Ingebrigtsen
8fd97b1de0 Fix warning generated by indian.el + quail.el
* lisp/leim/quail/indian.el (quail-define-indian-trans-package):
Reintroduce kludge to fix automatic detection by Quail.
2021-02-24 20:31:31 +01:00
Juri Linkov
65f458ba5e * lisp/tab-bar.el: Move aliases down closer to keybindings. 2021-02-24 20:53:25 +02:00
Juri Linkov
24be523fde * lisp/tab-bar.el (tab-switch): New defalias to 'tab-bar-switch-to-tab'.
(tab-prefix-map): Bind "O" to 'tab-previous'.
2021-02-24 20:53:25 +02:00
Stefan Monnier
2766f9fdb9 * lisp/emacs-lisp/macroexp.el (macroexp-file-name): New function.
Yes, finally: a function that tells you the name of the file where
the code is located.  Finding this name is non-trivial in practice,
as evidenced by the "4 shift/reduce conflicts" warning when compiling
CEDET's python.el, because its `wisent-source` got it wrong in that
case, thinking the grammar came from `python.el` instead of
`python-wy.el`.

While at it, also made `macroexp-compiling-p` public, since it's
useful at various places.

(macroexp-compiling-p): Rename from `macroexp--compiling-p`.

* lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables):
Bind `load-file-name` to nil so we can distinguish a load that calls
the byte compiler from a byte compilation which causes a load.

* lisp/cedet/semantic/wisent/python.el (wisent-python--expected-conflicts):
Remove; it was just a workaround.
* lisp/subr.el (do-after-load-evaluation): Avoid `byte-compile--` vars.
* lisp/cedet/semantic/fw.el (semantic-alias-obsolete):
Use `macroexp-compiling-p` and `macroexp-file-name`.
* lisp/cedet/semantic/wisent/comp.el (wisent-source): Use `macroexp-file-name`
(wisent-total-conflicts): Tighten regexp.
* lisp/emacs-lisp/cl-lib.el (cl--compiling-file): Delete function
and variable.  Use `macroexp-compiling-p` instead.
* lisp/progmodes/flymake.el (flymake-log):
* lisp/emacs-lisp/package.el (package-get-version):
* lisp/emacs-lisp/ert-x.el (ert-resource-directory):
Use `macroexp-file-name`.
2021-02-24 13:52:45 -05:00
Ulf Jasper
654cb8e6b7 Add options to use feed names from newticker-url-list
* lisp/net/newst-treeview.el
  (newsticker-treeview-use-feed-name-from-url-list-in-treeview): New.
  (newsticker-treeview-use-feed-name-from-url-list-in-itemview): New.
  (newsticker--treeview-item-show): Show feed name from
  newsticker-url-list if wanted.
  (newsticker--treeview-propertize-tag): Add argument 'tooltip'.
  (newsticker--treeview-tree-get-tag): Usefeed name from
  newsticker-url-list if wanted.  (Fixes third issue in
  Bug#41376.)
2021-02-24 19:26:37 +01:00
Lars Ingebrigtsen
1f5ed3edc6 Fix wisent/python.el grammar warning
* lisp/cedet/semantic/wisent/python.el: Fix warning about
shift/reduce conflicts in the Python grammar.
2021-02-24 18:29:25 +01:00
Lars Ingebrigtsen
d56fbc375d Fix warning generated by indian.el + quail.el
* lisp/leim/quail/indian.el (quail-define-indian-trans-package):
Reintroduce kludge to fix automatic detection by Quail.
2021-02-24 18:13:03 +01:00
Lars Ingebrigtsen
b0b4609be0 Remove the "Documentation:" line from the variable help
* lisp/help-fns.el (describe-variable): Remove the
"Documentation:" line (bug#46702).  This makes the help text more
compact and seems easier to read, too.
2021-02-24 17:58:38 +01:00
Lars Ingebrigtsen
e21d6fdb2c Fix Calc menu item for vector dot products
* lisp/calc/calc-menu.el (calc-vectors-menu): Use the correct
function `calc-times' instead of the non-existent `calc-mult'
function (bug#46710).
2021-02-24 17:53:53 +01:00
Doug Davis
b7a2b2bdd9 Interactive tag byte compilation functions in emacs-lisp-mode
* lisp/progmodes/elisp-mode.el (emacs-lisp-byte-compile)
(emacs-lisp-byte-compile-and-load): Add interactive tagging
(bug#46721).
2021-02-24 17:43:49 +01:00
Miha Rihtaršič
a2a6364265 Run all functions in `prefix-command-echo-keystrokes-functions'
* lisp/simple.el (internal-echo-keystrokes-prefix): Really run all
functions in `prefix-command-echo-keystrokes-functions' (bug#46727).

Copyright-paperwork-exempt: yes
2021-02-24 17:38:56 +01:00
Protesilaos Stavrou
7c48c83dab Use named faces in shortdoc
* shortdoc.el (shortdoc-heading): Define new face for headings.
(shortdoc-display-group): Apply new heading face.
(shortdoc--display-function): Use existing face for section text.
* etc/NEWS: Document new face (bug#46748).
2021-02-24 17:18:26 +01:00
Utkarsh Singh
4aa9db7337 Use sh-mode for PKGBUILD files
* lisp/files.el (auto-mode-alist): Use sh-mode for PKGBUILD files
(bug#46660).

Copyright-paperwork-exempt: yes
2021-02-24 17:06:53 +01:00
Eli Zaretskii
ac45f31454 Fix dangerous code in xdisp.c
* src/xdisp.c (move_it_to, display_line): Make sure ZV_BYTE is
greater than 1 before fetching previous byte.
2021-02-24 17:55:28 +02:00
Eli Zaretskii
eef185dfc8 Better support for 'truncate-line' non-nil in the mini-window
* src/xdisp.c (resize_mini_window): Resize the mini-window
when multi-line text is displayed under	truncate-lines
non-nil in the minibuffer.  (Bug#46718)
2021-02-24 17:43:08 +02:00
Protesilaos Stavrou
91b37381ea Specify the Emacs version of new vc-dir faces
* vc-dir.el (vc-dir-header)
(vc-dir-header-value)
(vc-dir-directory)
(vc-dir-file)
(vc-dir-mark-indicator)
(vc-dir-status-warning)
(vc-dir-status-edited)
(vc-dir-status-up-to-date)
(vc-dir-status-ignored): Add version 28.1.  (Bug#46745)
2021-02-24 13:45:12 +00:00
Juri Linkov
6172454ff3 Small fixes
* lisp/emacs-lisp/seq.el (seq-contains): Move the ‘declare’ form
after the docstring.
* lisp/misc.el (copy-from-above-command): Fix whitespace regexp.
2021-02-23 21:05:30 +02:00
Juri Linkov
29c0b640ba * lisp/tab-line.el (tab-line-tab-name-format-function): New defcustom.
(tab-line-tab-name-format-default): New function as the default value.
(tab-line-format-template): Funcall tab-line-tab-name-format-function.
This is like recently added tab-bar-tab-name-format-function.
2021-02-23 21:01:31 +02:00
Juri Linkov
0b9fda1fd9 * lisp/tab-bar.el (tab-prefix-map): Bind "n" to 'tab-duplicate'.
(tab-bar-separator): New function.
(tab-bar-make-keymap-1): Use it.
2021-02-23 20:57:31 +02:00
Ulf Jasper
a1333fe6cf Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2021-02-23 19:43:56 +01:00
Ulf Jasper
7271b11457 Leave other windows unchanged, use search instead of re-search
* lisp/net/newst-backend.el (newsticker-customize-feed): Leave other
  windws unchanged.  Use search instead of re-search.
2021-02-23 19:31:32 +01:00
Ulf Jasper
5ae0289464 Fix invalid interactive-statement
* lisp/net/newst-backend.el (newsticker-customize): Fix invalid
  interactive-statement.
2021-02-23 19:23:50 +01:00
Stefan Monnier
07235678a4 * test/: Use lexical-binding the few remaining files
* test/manual/biditest.el: Use lexical-binding.
(biditest-generate-testfile): Remove unused var `levels`.

* test/manual/image-circular-tests.el: Use lexical-binding.

* test/manual/image-size-tests.el: Use lexical-binding.
(image-size-tests): Check `fboundp` before calling `imagemagick-types`.

* test/manual/redisplay-testsuite.el: Use lexical-binding.

* test/manual/cedet/cedet-utests.el: Use lexical-binding.
Use `with-current-buffer`.
(cedet-utest): Test `fboundp` i.s.o `featurep` to silence warning.
(srecode-map-save-file): Declare var.
(pulse-test): Test `fboundp` before calling `pulse-available-p`.
Declare `pulse-momentary-highlight-overlay` since it's not autoloaded.

* test/manual/cedet/semantic-tests.el: Use lexical-binding.
Use `with-current-buffer`.
(semanticdb-ebrowse-dump): Remove unused var `ab`.
(semanticdb-test-gnu-global): Don't use obsolete "name" arg to constructor.
(cedet-utest-directory): Declare var.
2021-02-23 12:14:59 -05:00
Ulf Jasper
a283996fc7 Add command for customizing current newsticker feed
* lisp/net/newst-backend.el (newsticker-customize-feed): New.
  (newsticker--insert-bytes): Add documentation string.
  (newsticker--decode-iso8601-date): Fix documentation string.
* lisp/net/newst-treeview.el (newsticker-treeview-customize-current-feed):
  New.
  (newsticker-treeview-mode-map): Add key for new command
  'newsticker-treeview-customize-current-feed'. (Fixes second issue in
  Bug#41376.)
2021-02-23 17:33:46 +01:00
Michael Albinus
57084098f4 ; Fix tramp.texi typos 2021-02-23 16:04:22 +01:00
Robert Pluim
228fd92fb3 * doc/misc/tramp.texi: Grammar/style fixes
* doc/misc/tramp.texi (Overview):
(Obtaining @value{tramp}):
(Quick Start Guide):
(Configuration):
(Connection types):
(Inline methods):
(External methods):
(Password handling):
(Predefined connection information):
(Remote shell setup):
(Remote processes):
(Frequently Asked Questions):
(External packages):
(Traces and Profiles): Grammar/style fixes.
2021-02-23 14:21:26 +01:00
Robert Pluim
4cb24e44ca * lisp/net/dictionary-connection.el: Grammar fixes
* lisp/net/dictionary-connection.el: Grammar fix
(dictionary-connection-open): Use active voice.
(dictionary-connection-status): Reword and improve formatting.
2021-02-23 14:07:32 +01:00
Robert Pluim
7788129c3a Make message-mailto work for emacsclient
* doc/misc/message.texi (System Mailer Setup): Add index entry.
Mention option to use emacsclient.

* etc/NEWS: Mention emacsclient option for 'mailto:' handling.

* etc/emacs-mail.desktop: Add example using emacsclient.

* lisp/gnus/message.el (message-mailto): Add optional url argument
so we can call it from emacsclient.
2021-02-23 13:50:37 +01:00
Alan Mackenzie
7ebdecfcdf CC Mode: Fix bug in "state cache" invalidation function.
* lisp/progmodes/cc-engine.el (c-invalidate-state-cache-1): Rewrite part of
it, following the code in c-parse-state-1, to get a proper setting of
c-state-cache-good-pos.
2021-02-23 11:16:24 +00:00
Stefan Kangas
b03d9d2c13 Convert some more menus to easy-menu-define
* lisp/tar-mode.el (tar-mode-map):
* lisp/textmodes/sgml-mode.el (sgml-mode-map, html-mode-map):
* lisp/wdired.el (wdired-mode-map): Move menus from here...

* lisp/tar-mode.el (tar-mode-immediate-menu, tar-mode-mark-menu)
* lisp/textmodes/sgml-mode.el (sgml-mode-menu, html-mode-menu):
* lisp/wdired.el (wdired-mode-menu): ...to here, and convert to
easy-menu-define.
2021-02-23 03:51:12 +01:00
Stefan Kangas
9202106a99 Improve easymenu.el Commentary section
* lisp/emacs-lisp/easymenu.el: Improve Commentary section.
2021-02-23 03:24:39 +01:00
Stefan Monnier
efe42c2b63 * lisp/progmodes/antlr-mode.el: Fix bootstrap failure
(antlr-mode): Remove compatibility code with older CC-mode.
This somehow appears to fix the error:

    In antlr-mode:
    progmodes/antlr-mode.el:2426:20: Error: `c-init-language-vars' defined
        after use in (c-init-language-vars) (missing `require' of a library
        file?)
    progmodes/antlr-mode.el:2427:26: Warning: c-init-language-vars called
        with 0 arguments, but requires 1

No idea what caused the error to appear after the previous patch either.
2021-02-22 17:38:58 -05:00
Lars Ingebrigtsen
97eec9db79 Do mode tagging in decipher.el 2021-02-22 23:30:04 +01:00
Lars Ingebrigtsen
11e22452b0 Do mode tagging in bubbles.el 2021-02-22 23:27:53 +01:00
Stefan Monnier
79d585c2be * lisp/obsolete: Use lexical-binding
Use lexical-binding in all the lisp/obsolete/*.el files.
While at it, removed redundant :group arguments and used #' to quote
functions.  Commented out the key bindings which the #' revealed
to lead to non-existing commands, and replaced those revealed to be obsolete.

* lisp/obsolete/cl-compat.el: Use cl-lib.

* lisp/obsolete/cust-print.el: Assume `defalias` exists.
(with-custom-print): Use `declare`.

* lisp/obsolete/iswitchb.el (iswitchb-init-XEmacs-trick)
(iswitchb-xemacs-backspacekey): Remove functions.

* lisp/obsolete/landmark.el (landmark, landmark-nslify-wts):
Prefer `apply` to `eval`.

* lisp/obsolete/longlines.el (longlines-mode): Don't use `add-to-list`
on a hook.

* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): Use `clear-string`.

* lisp/obsolete/pgg-pgp.el (pgg-pgp-encrypt-region): Remove oddly
unused var `passphrase`.
(pgg-pgp-verify-region): Declare var `jam-zcat-filename-list`.

* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-encrypt-region): Remove oddly
unused var `passphrase`.
(pgg-pgp5-verify-region): Declare var `jam-zcat-filename-list`.

* lisp/obsolete/pgg.el: Remove some XEmacs compatibility code.
(pgg-run-at-time, pgg-cancel-timer, pgg-clear-string): Remove functions.
Use their core equivalent instead.

* lisp/obsolete/rcompile.el (remote-compile): Remove unused vars `l`,
`l-host`, `l-user`, and `localname`.

* lisp/obsolete/starttls.el (starttls-any-program-available):
Use `define-obsolete-function-alias`.

* lisp/obsolete/tls.el (tls-format-message): Delete function, use
`format-message` instead.

* lisp/obsolete/url-ns.el (url-ns-prefs): Use `with-current-buffer`
and `dlet`.

* lisp/obsolete/vip.el (vip-escape-to-emacs): Remove unused var `key`.
(vip-command-argument, vip-read-string, ex-delete, ex-line): Remove
unused var `conditions`.
(ex-map): Use a closure instead of `eval`.
(ex-set): Make it an alias of `set-variable`.
(ex-substitute): Remove unused var `cont`.

* lisp/obsolete/abbrevlist.el:
* lisp/obsolete/bruce.el:
* lisp/obsolete/cc-compat.el:
* lisp/obsolete/cl-compat.el:
* lisp/obsolete/cl.el:
* lisp/obsolete/complete.el:
* lisp/obsolete/crisp.el:
* lisp/obsolete/cust-print.el:
* lisp/obsolete/erc-compat.el:
* lisp/obsolete/erc-hecomplete.el:
* lisp/obsolete/eudcb-ph.el:
* lisp/obsolete/fast-lock.el:
* lisp/obsolete/gs.el:
* lisp/obsolete/gulp.el:
* lisp/obsolete/html2text.el:
* lisp/obsolete/info-edit.el:
* lisp/obsolete/iswitchb.el:
* lisp/obsolete/landmark.el:
* lisp/obsolete/lazy-lock.el:
* lisp/obsolete/longlines.el:
* lisp/obsolete/mailpost.el:
* lisp/obsolete/mantemp.el:
* lisp/obsolete/meese.el:
* lisp/obsolete/messcompat.el:
* lisp/obsolete/metamail.el:
* lisp/obsolete/mouse-sel.el:
* lisp/obsolete/nnir.el:
* lisp/obsolete/old-emacs-lock.el:
* lisp/obsolete/otodo-mode.el:
* lisp/obsolete/patcomp.el:
* lisp/obsolete/pc-mode.el:
* lisp/obsolete/pc-select.el:
* lisp/obsolete/pgg-def.el:
* lisp/obsolete/pgg-gpg.el:
* lisp/obsolete/pgg-parse.el:
* lisp/obsolete/pgg-pgp.el:
* lisp/obsolete/pgg-pgp5.el:
* lisp/obsolete/pgg.el:
* lisp/obsolete/rcompile.el:
* lisp/obsolete/s-region.el:
* lisp/obsolete/sb-image.el:
* lisp/obsolete/sregex.el:
* lisp/obsolete/starttls.el:
* lisp/obsolete/sup-mouse.el:
* lisp/obsolete/terminal.el:
* lisp/obsolete/tls.el:
* lisp/obsolete/tpu-edt.el:
* lisp/obsolete/tpu-extras.el:
* lisp/obsolete/tpu-mapper.el:
* lisp/obsolete/url-ns.el:
* lisp/obsolete/vc-arch.el:
* lisp/obsolete/vi.el:
* lisp/obsolete/vip.el:
* lisp/obsolete/ws-mode.el:
* lisp/obsolete/yow.el: Use lexical-binding.
2021-02-22 16:54:59 -05:00
Lars Ingebrigtsen
59698d924e Mention the problems with newlines in Dired
* doc/emacs/dired.texi (Dired Enter): Mention newlines and what to
do about them.

* lisp/dired.el (dired-listing-switches): Mention newlines
(bug#46705).
2021-02-22 22:39:27 +01:00