]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoRename doprnt_nul to doprnt_non_null_end
Paul Eggert [Sat, 24 Oct 2020 20:46:46 +0000 (13:46 -0700)]
Rename doprnt_nul to doprnt_non_null_end

* src/doprnt.c (doprnt_non_null_end): Rename from doprnt_nul,
as the old name was misleading (left over from a previous proposal).
Caller changed.

4 years agoImprove doprnt performance
Paul Eggert [Sat, 24 Oct 2020 20:41:01 +0000 (13:41 -0700)]
Improve doprnt performance

This patch implements some of my suggestions in Bug#8545,
with further changes suggested by Eli Zaretskii (Bug#43439).
* src/doprnt.c: Improve comments.
(SIZE_BOUND_EXTRA): Now at top level, for parse_format_integer.
(parse_format_integer): New static function, containing some of
the old doprnt.  Fix a bug that caused doprnt to infloop on
formats like "%10s" that Emacs does not use.  We could simplify
doprnt further if we dropped support for these never-used formats.
(doprnt_nul): New function.
(doprnt): Use it.  Change doprnt API to exit when either it finds NUL
or reaches the character specified by FORMAT_END.  In the typical case
where FORMAT_END is null, take just one pass over FORMAT, not two.
Assume C99 to make code clearer.  Do not use malloc or alloca to
allocate a copy of the format FMTCPY; instead, use a small fixed-size
array FMTSTAR, and use '*' in that array to represent width and
precision, passing them as separate int arguments.  Use eassume to
pacify GCC in switch statements.

4 years agoWarn about a bad default value in restricted-sexp widget
Mauro Aranda [Sat, 24 Oct 2020 19:40:42 +0000 (21:40 +0200)]
Warn about a bad default value in restricted-sexp widget

* lisp/wid-edit.el (restricted-sexp widget): New :value-to-external
function.  If value is not in the internal format, then we might be
dealing with a bad default value for the widget, so display a warning
about that (bug#25152).

4 years ago; Prefer https to http in more URLs
Stefan Kangas [Sat, 24 Oct 2020 18:22:33 +0000 (20:22 +0200)]
; Prefer https to http in more URLs

These were all tested and confirmed working.

4 years agoRework semantics of eldoc-echo-are-use-multiline-p
João Távora [Sun, 4 Oct 2020 18:31:02 +0000 (19:31 +0100)]
Rework semantics of eldoc-echo-are-use-multiline-p

Per bug#43543.  Now uses logical lines, not visual lines.

* lisp/emacs-lisp/eldoc.el (eldoc-echo-area-use-multiline-p): Rework
semantics.
(eldoc--echo-area-substring): New helper.
(eldoc--echo-area-prefer-doc-buffer-p): New helper.
(eldoc-display-in-echo-area): Rework using new helpers.

4 years agoRename ElDoc user option controlling display of truncation notice
João Távora [Sun, 4 Oct 2020 11:19:47 +0000 (12:19 +0100)]
Rename ElDoc user option controlling display of truncation notice

The new name makes it consistent with other variables controlling the
display of ElDoc documentation in the echo area.

Per bug#43543.

* etc/NEWS (Eldoc): Rename eldoc-display-truncation-message to
eldoc-echo-area-display-truncation-message.

* lisp/emacs-lisp/eldoc.el
(eldoc-echo-area-display-truncation-message): Rename from
eldoc-display-truncation-message.
(eldoc-display-in-echo-area): Use new variable name.

4 years agoRework eldoc-echo-area-prefer-doc-buffer (bug#42532)
João Távora [Sat, 3 Oct 2020 16:27:05 +0000 (17:27 +0100)]
Rework eldoc-echo-area-prefer-doc-buffer (bug#42532)

* lisp/emacs-lisp/eldoc.el:
(eldoc-echo-area-prefer-doc-buffer): Rename from
eldoc-echo-area-prefer-doc-buffer
(eldoc-display-in-echo-area): Rework to honour
eldoc-echo-area-prefer-doc-buffer.

4 years agoIntroduce eldoc-display-functions
João Távora [Sun, 6 Sep 2020 14:37:02 +0000 (15:37 +0100)]
Introduce eldoc-display-functions

See bug#43609.

* lisp/emacs-lisp/eldoc.el (eldoc--request-state): Add comment.
(eldoc--last-request-state): No longer buffer-local.
(eldoc--request-docs-p): Delete.
(eldoc-display-functions): New user variable.
(eldoc--doc-buffer-docs): New variable.
(eldoc-display-message-p): Rework.
(eldoc--format-doc-buffer): Rework from eldoc--handle-docs.
(eldoc-display-in-echo-area, eldoc-display-in-buffer): New
user-visible function.
(eldoc--invoke-strategy): Take INTERACTIVE arg.
Invoke eldoc-display-in-buffer
(eldoc-print-current-symbol-info): Simplify.
(Version): Bump to 1.11.0

* etc/NEWS: Mention eldoc-display-functions.

4 years ago; Fix last change
Basil L. Contovounesios [Sat, 24 Oct 2020 14:50:16 +0000 (15:50 +0100)]
; Fix last change

4 years agoRe-introduce variable for world clock timer
Stefan Kangas [Sat, 24 Oct 2020 13:47:26 +0000 (15:47 +0200)]
Re-introduce variable for world clock timer

* lisp/time.el (world-clock--timer): New variable.
(world-clock): Save timer to above variable when it is started.
(world-clock-cancel-timer): Delete timer saved in variable instead of
searching for the function name.

4 years agoUse lexical-binding in several language support libraries
Stefan Kangas [Sat, 24 Oct 2020 13:34:52 +0000 (15:34 +0200)]
Use lexical-binding in several language support libraries

* lisp/language/burmese.el:
* lisp/language/cham.el:
* lisp/language/czech.el:
* lisp/language/georgian.el:
* lisp/language/greek.el:
* lisp/language/khmer.el:
* lisp/language/romanian.el:
* lisp/language/sinhala.el:
* lisp/language/slovak.el:
* lisp/language/tai-viet.el:
* lisp/language/vietnamese.el: Use lexical-binding.

4 years agoAccept nil COMMAND in tramp-sh-handle-make-process (Bug#44151)
Michael Albinus [Sat, 24 Oct 2020 12:36:34 +0000 (14:36 +0200)]
Accept nil COMMAND in tramp-sh-handle-make-process (Bug#44151)

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Accept nil
COMMAND.  (Bug#44151)

* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process):
Extend test.

4 years agoRevert "Use lexical-binding in bindat.el"
Stefan Kangas [Sat, 24 Oct 2020 12:22:58 +0000 (14:22 +0200)]
Revert "Use lexical-binding in bindat.el"

This reverts commit a497b8e4a41e3223089654da4b36d0fdd51ce555.

This conversion to lexical-binding broke the eval specification,
documented in the ELisp manual.  We will probably want to add tests
for that before we can confidently convert this to lexical-binding.
Problem reported by Mattias Engdegård <mattiase@acm.org>.

4 years agoUse lexical-binding in most term libraries
Stefan Kangas [Sat, 24 Oct 2020 12:17:35 +0000 (14:17 +0200)]
Use lexical-binding in most term libraries

* lisp/term/AT386.el:
* lisp/term/internal.el:
* lisp/term/iris-ansi.el:
* lisp/term/lk201.el:
* lisp/term/news.el:
* lisp/term/rxvt.el:
* lisp/term/sun.el:
* lisp/term/tvi970.el:
* lisp/term/wyse50.el: Use lexical-binding.

4 years agoUse lexical-binding in copyright.el and add tests
Stefan Kangas [Sat, 24 Oct 2020 11:35:04 +0000 (13:35 +0200)]
Use lexical-binding in copyright.el and add tests

* lisp/emacs-lisp/copyright.el: Use lexical-binding.  Remove
redundant :group args.
* test/lisp/emacs-lisp/copyright-tests.el: New file.

4 years ago* test/manual/image-transforms-tests.el: Use lexical-binding.
Stefan Kangas [Sat, 24 Oct 2020 10:34:23 +0000 (12:34 +0200)]
* test/manual/image-transforms-tests.el: Use lexical-binding.

4 years agoMove faces.el test data to follow our conventions
Stefan Kangas [Sat, 24 Oct 2020 01:45:48 +0000 (03:45 +0200)]
Move faces.el test data to follow our conventions

* test/lisp/faces-tests.el (ert-x): Require.
(faces--test-data-dir): Remove variable.
(faces--test-extend-with-themes): Use ert-resource-directory.
* test/lisp/faces-resources/*: Moved from test/data/themes/*.

4 years agoFix a bug where the wrong menu would be triggered by mouse
Jared Finder [Mon, 12 Oct 2020 03:16:00 +0000 (20:16 -0700)]
Fix a bug where the wrong menu would be triggered by mouse

For layouts such as the following, clicking the "l" in Tools with the
right window focused would trigger the File menu, not the Tools menu.
This is because the event would have window coordinate (1 . 0).
Similarly, clicking the "p" in Help would trigger the Edit menu.

Example Emacs frame:
+--------------------------------------------------------+
|File Edit Options Buffers Tools Help                    |
|;; This buffer is for text$|;; This buffer is for text $|
|;; To create a file, visit$|;; To create a file, visit $|
|                           |                            |
|                           |                            |
|-UUU:----F1  *scratch*     |-UUU:----F1  *scratch*      |
|                                                        |
+--------------------------------------------------------+
* lisp/menu-bar.el (menu-bar-open-mouse): Reject clicks not on
the menu bar.
*lisp/xt-mouse.el (xterm-mouse-event): Pass the current frame to
'posn-at-x-y', to make the effect consistent with other mouse-handling
features.

4 years agoEnable TTY menus with xterm-mouse-mode
Jared Finder [Wed, 7 Oct 2020 03:04:12 +0000 (20:04 -0700)]
Enable TTY menus with xterm-mouse-mode

* lisp/tmm.el: No need to bind 'tmm-menubar-mouse' to mouse clicks
on the menu bar.
* lisp/menu-bar.el (global-map): Bind 'menu-bar-open-mouse' to
mouse click on menu bar.  This is needed in xt-mouse.

* etc/NEWS: Announce TTY menu support in xterm-mouse-mode.

4 years agoMake TTY menus work with xterm-mouse-mode
Jared Finder [Sat, 3 Oct 2020 21:46:30 +0000 (14:46 -0700)]
Make TTY menus work with xterm-mouse-mode

* src/term.c (mouse_get_xy): Call 'mouse_position' passing it the
value of 'tty-menu-calls-mouse-position-function' as the
argument.
(syms_of_term) <tty-menu-calls-mouse-position-function>: New
DEFVAR_BOOL.
* src/frame.c (mouse_position): New function, with most of the
code from Fmouse_position, but call 'mouse-position-function' only
if called with non-zero argument.
(Fmouse_position): Call 'mouse_position' to do the job.

* lisp/xt-mouse.el (xterm-mouse-translate-1): Respect
'track-mouse'.
(xterm-mouse-mode): Set 'tty-menu-calls-mouse-position-function'
when setting 'mouse-position-function'.
(xterm-mouse-tracking-enable-sequence): Use SET_ANY_EVENT_MOUSE
(0x1003) so that mouse movement can be reported even if no buttons
are pressed.  Doc fix.
* lisp/menu-bar.el (menu-bar-define-mouse-key): New function.
(tty-menu-navigation-map): Call it.

* doc/lispref/frames.texi (Mouse Position): Document
'tty-menu-calls-mouse-position-function'.

* etc/NEWS: Announce 'tty-menu-calls-mouse-position-function'.

4 years agoAdding mouse controls to menu-bar.el.
Jared Finder [Sat, 19 Sep 2020 07:43:29 +0000 (00:43 -0700)]
Adding mouse controls to menu-bar.el.

* lisp/isearch.el (tmm-menubar-keymap): Remove declare-function.
* lisp/menu-bar.el (menu-bar-open-mouse, menu-bar-keymap)
(menu-bar-current-active-maps, menu-bar-item-at-x): New functions.
*lisp.tmm.el (tmm-menubar-keymap, tmm-get-keybind): Functions
deleted.
(tmm-menubar): Call 'menu-bar-item-at-x'.

4 years agoFix last change in image.c for MS-Windows
Eli Zaretskii [Sat, 24 Oct 2020 07:07:44 +0000 (10:07 +0300)]
Fix last change in image.c for MS-Windows

* src/image.c [LIBRSVG_CHECK_VERSION (2, 46, 0)]: Define
prototype for rsvg_handle_get_geometry_for_layer.
(init_svg_functions) [LIBRSVG_CHECK_VERSION (2, 46, 0)]: Load
rsvg_handle_get_geometry_for_layer from the DLL, instead of
rsvg_handle_get_dimensions.
(rsvg_handle_get_geometry_for_layer) [LIBRSVG_CHECK_VERSION (2, 46, 0)]:
Define macro.  (Bug#44065)

4 years agoFix a broken unsafep test
Stefan Kangas [Sat, 24 Oct 2020 00:56:00 +0000 (02:56 +0200)]
Fix a broken unsafep test

* test/lisp/emacs-lisp/unsafep-tests.el
(test-unsafep/message): Fix test case.

(unsafep-tests--safe): Rename from testcover-unsafep-safe.
(unsafep-tests--unsafe): Rename from testcover-unsafep-unsafe.
(test-unsafep/safe, test-unsafep/unsafe): Doc fix.  Adjust usage
of above renamed variables.

4 years agoMove epg.el test data to follow our conventions
Stefan Kangas [Sat, 24 Oct 2020 00:36:33 +0000 (02:36 +0200)]
Move epg.el test data to follow our conventions

* test/lisp/epg-tests.el (ert-x): Require.
(epg-tests-data-directory): Remove variable.
(with-epg-tests): Use ert-resource-file.
* test/lisp/epg-resources/*: Moved from test/data/epg/.

4 years agoMove shr.el test data to follow our conventions
Stefan Kangas [Sat, 24 Oct 2020 00:28:45 +0000 (02:28 +0200)]
Move shr.el test data to follow our conventions

* test/lisp/net/shr-tests.el (ert, ert-x): Require.
(shr-tests--datadir): Remove variable.
(shr-test, rendering): Use ert-resource-directory.
* test/lisp/net/shr-resources/*: Move from test/data/shr/.

4 years agoMove mml-sec.el test data to follow our conventions
Stefan Kangas [Sat, 24 Oct 2020 00:17:37 +0000 (02:17 +0200)]
Move mml-sec.el test data to follow our conventions

* test/lisp/gnus/mml-sec-tests.el (ert-x): Require.
(mml-secure-test-fixture, mml-sec-test--kill-gpg-agent):
Use ert-resource-directory.
* test/lisp/gnus/mml-sec-resources/*: Moved from test/data/mml-sec/.
* .gitignore: Update location of moved file "random_seed".

4 years agoMove more test data to follow our conventions
Stefan Kangas [Fri, 23 Oct 2020 19:07:26 +0000 (21:07 +0200)]
Move more test data to follow our conventions

* test/data/minibuffer-test-cttq$tion: Move from here...
* test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion:
...to here.
* test/lisp/minibuffer-resources/lisp/cedet/semantic-utest-c.test:
* test/lisp/minibuffer-resources/lisp/cedet/semantic-utest.test:
New files.
* test/lisp/minibuffer-tests.el (ert, ert-x): Require.
(completion-table-test-quoting): Use ert-resource-directory.

* test/data/net/cert.pem:
* test/data/net/key.pem: Move frome here...
* test/lisp/net/network-stream-resources/cert.pem:
* test/lisp/net/network-stream-resources/key.pem: ...to here.
* test/lisp/net/network-stream-tests.el (ert, ert-x): Require.
(network-stream-tests--datadir): Remove variable.
(make-tls-server): Use ert-resource-file.

* test/data/vc/diff-mode/hello_emacs.c:
* test/data/vc/diff-mode/hello_emacs_1.c:
* test/data/vc/diff-mode/hello_world.c:
* test/data/vc/diff-mode/hello_world_1.c: Move from here...
* test/lisp/vc/diff-mode-resources/hello_emacs.c:
* test/lisp/vc/diff-mode-resources/hello_emacs_1.c:
* test/lisp/vc/diff-mode-resources/hello_world.c:
* test/lisp/vc/diff-mode-resources/hello_world_1.c: ...to here.
* test/lisp/vc/diff-mode-tests.el (ert, ert-x): Require.
(diff-mode-tests--datadir): Remove variable.
(diff-mode-test-font-lock-syntax-one-line)
(diff-mode-test-font-lock): Use ert-resource-directory.

* test/data/xdg/l10n.desktop:
* test/data/xdg/malformed.desktop:
* test/data/xdg/mimeapps.list:
* test/data/xdg/mimeinfo.cache:
* test/data/xdg/test.desktop: Move from here...
* test/lisp/xdg-resources/l10n.desktop:
* test/lisp/xdg-resources/malformed.desktop:
* test/lisp/xdg-resources/mimeapps.list:
* test/lisp/xdg-resources/mimeinfo.cache:
* test/lisp/xdg-resources/test.desktop: ...to here.
* test/lisp/xdg-tests.el (ert-x): Require.
(xdg-tests-data-dir): Remove variable.
(xdg-desktop-parsing, xdg-mime-associations): Use ert-resource-file.

4 years agoFix error in tramp-sh-handle-make-process
Michael Albinus [Fri, 23 Oct 2020 14:31:56 +0000 (16:31 +0200)]
Fix error in tramp-sh-handle-make-process

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't use heredoc
script whent the argument contains a string.

4 years agoMove some test data to follow our conventions
Stefan Kangas [Fri, 23 Oct 2020 14:29:46 +0000 (16:29 +0200)]
Move some test data to follow our conventions

* test/data/emacs-module/mod-test.c: Move from here...
* test/src/emacs-module-resources/mod-test.c: ...to here.
* test/src/emacs-module-tests.el (ert-x): Require.
(mod-test-file, module/describe-function-1):
* test/Makefile.in (test_module_dir): Adjust for move.

* test/data/files-bug18141.el.gz: Move from here...
* test/lisp/files-resources/files-bug18141.el.gz: ... to here.
* test/lisp/files-tests.el (ert-x): Require.
(files-test-bug-18141-file): Use ert-resource-file.

* test/data/mailcap/mime.types: Move from here...
* test/lisp/net/mailcap-resources/mime.types: ...to here.
* test/lisp/net/mailcap-tests.el (ert-x): Require.
(mailcap-tests-path): Use ert-resource-file.

* test/data/somelib.el:
* test/data/somelib2.el: Move from here...
* test/src/lread-resources/somelib.el:
* test/src/lread-resources/somelib2.el: ...to here.
* test/src/lread-tests.el (ert, ert-x): Require.
(lread-test-bug26837): Use ert-resource-directory.

* test/data/syntax-comments.txt: Move from here....
* test/src/syntax-resources/syntax-comments.txt: ...to here.
* test/src/syntax-tests.el (ert-x): Require.
(syntax-comments, syntax-br-comments, syntax-pps-comments):
Use ert-resource-file.

* test/data/xref/file1.txt:
* test/data/xref/file2.txt: Move from here...
* test/lisp/progmodes/xref-resources/file1.txt:
* test/lisp/progmodes/xref-resources/file2.txt: ...to here.
* test/lisp/progmodes/xref-tests.el (ert, ert-x): Require.
(xref-tests-data-dir): Use ert-resource-directory.

4 years agoSet up composition-function-table for Egyptian
Eli Zaretskii [Fri, 23 Oct 2020 14:23:23 +0000 (17:23 +0300)]
Set up composition-function-table for Egyptian

* lisp/language/misc-lang.el (composition-function-table): Set up
for Egyptian Hieroglyphs.

4 years agoRemove most of charset markup from etc/HELLO
Eli Zaretskii [Fri, 23 Oct 2020 13:59:37 +0000 (16:59 +0300)]
Remove most of charset markup from etc/HELLO

For the reasons, see the discussion that started in
https://lists.gnu.org/archive/html/emacs-devel/2018-12/msg00407.html
and its conclusion in
https://lists.gnu.org/archive/html/emacs-devel/2019-01/msg00144.html.
The only markup left is in the preamble, just to show the example
of this facility.

4 years agoERC: Fix ERC's IBuffer format "crash" on killed server buffer
Olivier Certner [Fri, 23 Oct 2020 12:39:04 +0000 (14:39 +0200)]
ERC: Fix ERC's IBuffer format "crash" on killed server buffer

* lisp/erc/erc-ibuffer.el (erc-server-name): Fix a crash when
displaying (or updating) an IBuffer buffer using ERC's first IBuffer
format.  This happens when one ERC buffer has its associated server
buffer killed, e.g., voluntarily or automatically after server
disconnection when `erc-kill-server-buffer-on-quit' is set to t.  The
culprit is the "Server" column, which returns nil in this case.
Display "(closed)" instead (bug#44156).
Copyright-paperwork-exempt: yes

4 years agoAdd support for squashfs files in archive mode
Ruthra Kumar [Fri, 23 Oct 2020 11:02:55 +0000 (13:02 +0200)]
Add support for squashfs files in archive mode

* lisp/arc-mode.el (archive-squashfs-extract): New variable
(bug#43827).
(archive-find-type): Identify squashfs.
(archive-squashfs-summarize, archive-squashfs-extract-by-stdout):
New functions to parse/extract squashfs.

* lisp/files.el (auto-mode-alist): Add squashfs.

4 years agoMove icalendar test data to test/lisp/calendar/icalendar-resources
Ulf Jasper [Fri, 23 Oct 2020 12:48:49 +0000 (14:48 +0200)]
Move icalendar test data to test/lisp/calendar/icalendar-resources

* test/lisp/calendar/icalendar-tests.el (ert-x): Required for
'ert-resource-file'.
(icalendar-tests--data-dir): Removed.
(icalendar-tests--get-file-contents): Use 'ert-resource-file' for
finding test data files.
* test/data/icalendar/*: Moved to test/lisp/calendar/icalendar-resources/.
* test/lisp/calendar/icalendar-resources/*: Moved from test/data/icalendar.

4 years agoClean up temporary files after package tests
Stefan Kangas [Fri, 23 Oct 2020 10:56:39 +0000 (12:56 +0200)]
Clean up temporary files after package tests

* test/lisp/emacs-lisp/package-tests.el (with-package-test): Remove
temporary files after test.  (Bug#43359)

4 years agoUse lexical binding in ffap.el
Mattias Engdegård [Fri, 23 Oct 2020 09:11:51 +0000 (11:11 +0200)]
Use lexical binding in ffap.el

* lisp/ffap.el (ffap-search-backward-file-end): Remove binding for
variable shadowing an optional (and never used) argument.
(ffap--gopher-var-on-line): Remove unused variable.

4 years ago* lisp/emacs-lisp/pcase.el: Add "extensions" to keyword header.
Stefan Kangas [Fri, 23 Oct 2020 03:25:22 +0000 (05:25 +0200)]
* lisp/emacs-lisp/pcase.el: Add "extensions" to keyword header.

4 years agoMerge branch 'scratch/substitute-command-keys'
Stefan Kangas [Thu, 22 Oct 2020 22:33:19 +0000 (00:33 +0200)]
Merge branch 'scratch/substitute-command-keys'

4 years ago* etc/HELLO: Use JavaScript for Javanese script (bug#43887)
Juri Linkov [Thu, 22 Oct 2020 20:09:24 +0000 (23:09 +0300)]
* etc/HELLO: Use JavaScript for Javanese script (bug#43887)

4 years agoFix SVG image dimension calculations (bug#44065)
Alan Third [Mon, 19 Oct 2020 20:19:57 +0000 (21:19 +0100)]
Fix SVG image dimension calculations (bug#44065)

* src/image.c (svg_load_image): Calculate the image size by using the
viewBox size and applying it to the image.
* etc/PROBLEMS: Describe the problem with librsvg 2.45 and below.

4 years agoFix crash when no face is defined (bug#44058, bug#43973)
Alan Third [Thu, 22 Oct 2020 18:47:17 +0000 (19:47 +0100)]
Fix crash when no face is defined (bug#44058, bug#43973)

* src/nsterm.m (ns_clear_under_internal_border): If face is null,
don't try drawing anything.

4 years agoRemove incorrect use of decode-coding-string
Stefan Kangas [Thu, 22 Oct 2020 18:32:32 +0000 (20:32 +0200)]
Remove incorrect use of decode-coding-string

* test/lisp/emacs-lisp/bindat-tests.el
(bindat-test-pack/multibyte-string-fails)
(bindat-test-unpack/multibyte-string-fails): Don't use
decode-coding-string.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.

4 years agoeww: don't add keymap to <a> without href
Andreas Schwab [Thu, 22 Oct 2020 18:07:24 +0000 (20:07 +0200)]
eww: don't add keymap to <a> without href

* lisp/net/eww.el (eww-tag-a): Only add keymap if the href
attribute is present.  (Bug#44147)

4 years agoAdd missed file needed by time-tests.el
Stefan Kangas [Thu, 22 Oct 2020 16:28:21 +0000 (18:28 +0200)]
Add missed file needed by time-tests.el

* test/lisp/time-resources/non-empty: New file.  This file is needed
by time-tests.el but was missed when it was committed.

4 years ago; * lisp/progmodes/fortran.el: Call 'eval' with lexical binding.
Mattias Engdegård [Thu, 22 Oct 2020 16:31:31 +0000 (18:31 +0200)]
; * lisp/progmodes/fortran.el: Call 'eval' with lexical binding.

4 years agoRemove useless uses of bindat-get-field
Mattias Engdegård [Thu, 22 Oct 2020 16:26:24 +0000 (18:26 +0200)]
Remove useless uses of bindat-get-field

* lisp/progmodes/gdb-mi.el (gdb-var-list-children-handler)
(gdb-edit-register-value): bindat-get-field with a single argument is
identity; remove.

4 years agoAdd tests for perl-mode.el
Stefan Kangas [Thu, 22 Oct 2020 16:23:40 +0000 (18:23 +0200)]
Add tests for perl-mode.el

* test/lisp/progmodes/perl-mode-tests.el: New file.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into master
Ulf Jasper [Thu, 22 Oct 2020 15:47:29 +0000 (17:47 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into master

4 years agoMove test data for icalendar tests to separate files.
Ulf Jasper [Thu, 22 Oct 2020 15:45:59 +0000 (17:45 +0200)]
Move test data for icalendar tests to separate files.

* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--data-dir, icalendar-tests--get-file-contents):
New.
(icalendar-tests--test-import, icalendar-tests--do-test-import):
Read input and expected results from files.
(icalendar-import-non-recurring, icalendar-import-rrule)
(icalendar-import-duration, icalendar-import-bug-6766)
(icalendar-import-bug-24199, icalendar-import-bug-33277)
(icalendar-import-multiple-vcalendars, icalendar-import-with-uid)
(icalendar-import-with-timezone, icalendar-real-world): Move test
data (input and expected result) to separate files.

* test/calendar/icalendar/*
New files containing test data for icalendar tests.

4 years agoUse lexical-binding in time-date.el and expand tests
Stefan Kangas [Thu, 22 Oct 2020 14:34:11 +0000 (16:34 +0200)]
Use lexical-binding in time-date.el and expand tests

* lisp/calendar/time-date.el: Use lexical-binding.
* test/lisp/calendar/time-date-tests.el
(test-obsolete-with-decoded-time-value)
(test-obsolete-encode-time-value, test-format-seconds)
(test-days-to-time, test-seconds-to-string): New tests.
(test-days-in-month, test-time-since, test-time-decoded-period):
Expand test with a few more values.

4 years agoMake State button interaction less confusing
Mauro Aranda [Thu, 22 Oct 2020 14:55:03 +0000 (16:55 +0200)]
Make State button interaction less confusing

* lisp/cus-edit.el (custom-variable-current-value): New function.
(custom-variable-backup-value): Use it.
(custom-variable-set, custom-variable-mark-to-reset-standard): Check
that old value is different than the new one.  If it is, make a
backup.  This way, we avoid offering the Set to Backup Value
unnecesarily.
(custom-variable-reset-saved): Reset the variable-comment property for
the variable, to help custom-variable-state be more correct.  Also
check if we should backup old value.
(custom-variable-state): If a variable was set to the standard value,
say its state is standard rather than set, which is more correct.
Getting the right variable state is important for menu options to be
enabled/disabled, and for displaying the right message to the user
(bug#12864).

4 years ago; fix docstring typo in last commit
Robert Pluim [Thu, 22 Oct 2020 14:49:10 +0000 (16:49 +0200)]
; fix docstring typo in last commit

4 years agoUse HTTP instead of Tramp for the ffap rfc path (and also fix it)
Lars Ingebrigtsen [Thu, 22 Oct 2020 13:36:59 +0000 (15:36 +0200)]
Use HTTP instead of Tramp for the ffap rfc path (and also fix it)

* lisp/ffap.el (ffap-rfc-path): Use an URL instead of an FTP tramp
file, since that's more widely supported (bug#41663).

4 years agoComment JSX lines using JSX syntax
Lars Ingebrigtsen [Thu, 22 Oct 2020 13:20:04 +0000 (15:20 +0200)]
Comment JSX lines using JSX syntax

* lisp/progmodes/js.el (js-jsx--comment-region): New function
(bug#41696).
(js-jsx-mode): Use it.

4 years agoTest for error with multibyte strings in bindat.el
Stefan Kangas [Wed, 21 Oct 2020 16:23:38 +0000 (18:23 +0200)]
Test for error with multibyte strings in bindat.el

* test/lisp/emacs-lisp/bindat-tests.el
(bindat-test-pack/multibyte-string-fails)
(bindat-test-unpack/multibyte-string-fails): New tests.

4 years agoPretty print restricted sexp values too
Mauro Aranda [Thu, 22 Oct 2020 12:30:13 +0000 (14:30 +0200)]
Pretty print restricted sexp values too

* lisp/wid-edit.el (restricted-sexp widget): Use
widget-sexp-value-to-internal to pretty print the widget's value, when
it is a valid one (bug#7524).

4 years agoRemove reference HP-UX 8.0 and 9.x bug from FAQ
Stefan Kangas [Thu, 22 Oct 2020 11:58:23 +0000 (13:58 +0200)]
Remove reference HP-UX 8.0 and 9.x bug from FAQ

* doc/misc/efaq.texi (Meta key does not work in xterm): Remove section
about a bug on HP-UX 8.0 and 9.x.  Support for these platforms were
removed in 23.1.

4 years agoRemove two references to Emacs 21 from the FAQ
Stefan Kangas [Thu, 22 Oct 2020 11:52:42 +0000 (13:52 +0200)]
Remove two references to Emacs 21 from the FAQ

* doc/misc/efaq.texi (Turning on syntax highlighting): Remove some
references to Emacs 21 and older.

4 years agoAllow moving members of editable-list widget, via delete+insert
Mauro Aranda [Thu, 22 Oct 2020 11:52:42 +0000 (13:52 +0200)]
Allow moving members of editable-list widget, via delete+insert

* etc/NEWS (Widget): Announce the feature (bug#6419).
* lisp/wid-edit.el (widget-editable-list-delete-at): Save into a new
widget property, :last-deleted, the WIDGET to be deleted.  Add
docstring.
(widget-editable-list-insert-before): If there is a recently deleted
child for the editable list, insert that one, instead of a new default
widget.  Add docstring.
(insert-button widget): Make :help-echo a function to avoid the
help-echo string become too long.
(delete-button widget): Tweak the :help-echo string, to document this
behavior.

* test/lisp/wid-edit-tests.el (widget-test-moving-editable-list-item):
Test the feature.

4 years agoHandle Cairo errors in ftcrfont_open
Pip Cet [Thu, 22 Oct 2020 11:40:34 +0000 (13:40 +0200)]
Handle Cairo errors in ftcrfont_open

* src/ftcrfont.c (ftcrfont_open): Handle Cairo errors (bug#41627).

4 years agoUse lexical binding in fortran.el
Mattias Engdegård [Thu, 22 Oct 2020 10:18:16 +0000 (12:18 +0200)]
Use lexical binding in fortran.el

* lisp/progmodes/fortran.el: Use lexical binding.
(fortran-make-syntax-propertize-function): Hoist use of lexical
variable to outside the 'eval' call.

4 years ago* lisp/progmodes/cpp.el: Use lexical binding.
Mattias Engdegård [Thu, 22 Oct 2020 09:46:09 +0000 (11:46 +0200)]
* lisp/progmodes/cpp.el: Use lexical binding.

4 years agoUpdate TUTORIAL.de
Werner Lemberg [Thu, 22 Oct 2020 05:27:45 +0000 (07:27 +0200)]
Update TUTORIAL.de

This also includes the minor fix for bug #44123.

4 years agounload-feature: Correct doc string to match info manual and reality
Štěpán Němec [Mon, 6 Apr 2020 15:05:33 +0000 (17:05 +0200)]
unload-feature: Correct doc string to match info manual and reality

'unload-feature' doesn't try to "undo any additions the library has
made" to hooks, it tries to remove functions defined by the library
from hooks, no matter how they got there.

* lisp/loadhist.el (unload-feature): Correct the doc string.
* doc/lispref/loading.texi (Unloading): Clarify, fix typo.

4 years agounload-feature: Handle local hooks (bug#5293)
Štěpán Němec [Mon, 6 Apr 2020 11:30:11 +0000 (13:30 +0200)]
unload-feature: Handle local hooks (bug#5293)

Buffer-local hooks were introduced in

1994-09-30T20:47:13+00:00!rms@gnu.org
0e4d378b32 (add-hook): Initialize default value and local value.

but 'unload-feature' has not been updated to handle them.

* lisp/loadhist.el (unload-feature): Handle local hooks (bug#5293).

4 years agounload-feature: Improve logic (don't repeat computation)
Štěpán Němec [Mon, 6 Apr 2020 11:25:41 +0000 (13:25 +0200)]
unload-feature: Improve logic (don't repeat computation)

* lisp/loadhist.el (unload-feature): Don't do the same computation twice.

4 years agoConvert artist.el to lexical binding
Mattias Engdegård [Wed, 21 Oct 2020 16:15:14 +0000 (18:15 +0200)]
Convert artist.el to lexical binding

* lisp/textmodes/artist.el (artist-system, (artist-flood-fill):
Remove binding of the obsolete variables binary-process-input,
binary-process-output and input-queue.
(artist-down-mouse-1): Fix mistyped 'echo-keystrokes'; bind it to 0.
(artist-fill-rect, artist-fill-square, artist-pen-set-arrow-points)
(artist-spray-clear-circle, artist-spray-set-radius)
(artist-draw-ellipse-with-0-height, artist-fill-ellipse)
(artist-ff-is-topmost-line, artist-ff-is-bottommost-line)
(artist-set-arrow-points-for-2points, artist-key-undraw-continously)
(artist-key-undraw-poly, artist-key-undraw-1point)
(artist-key-undraw-2points, artist-key-do-continously-1point)
(artist-key-set-point-1point, artist-shift-has-changed)
(artist-mouse-draw-continously, artist-mouse-draw-1point)
(artist-submit-bug-report): Suppress warnings about unused parameters
which are there for function signature commonality.  Remove unused
variables.

4 years ago; * lisp/emacs-lisp/bindat.el (bindat-unpack): Fix typo.
Stefan Kangas [Wed, 21 Oct 2020 15:31:47 +0000 (17:31 +0200)]
; * lisp/emacs-lisp/bindat.el (bindat-unpack): Fix typo.

4 years agoTweak two time.el tests
Stefan Kangas [Wed, 21 Oct 2020 15:21:46 +0000 (17:21 +0200)]
Tweak two time.el tests

* test/lisp/time-tests.el (time-tests-display-time-update--load)
(time-tests-display-time-update): Tweak tests.

4 years ago* lisp/time.el: Use lexical-binding.
Stefan Kangas [Wed, 21 Oct 2020 15:00:11 +0000 (17:00 +0200)]
* lisp/time.el: Use lexical-binding.

4 years agoAdd tests for time.el
Stefan Kangas [Wed, 21 Oct 2020 14:59:50 +0000 (16:59 +0200)]
Add tests for time.el

* lisp/time.el (display-time-update--load)
(display-time-update--mail): Extract from...
(display-time-update): ...here.
* test/lisp/time-tests.el: New file.

4 years agoUse lexical-binding in bindat.el
Stefan Kangas [Wed, 21 Oct 2020 14:09:12 +0000 (16:09 +0200)]
Use lexical-binding in bindat.el

* lisp/emacs-lisp/bindat.el: Use lexical-binding.
(bindat-raw, bindat-idx, bindat-unpack, bindat-pack): Adjust for
lexical-binding.
(bindat--unpack-group, bindat--length-group): Fix byte-compiler
warning about unused variables last and vlen.
(bindat--unpack-group, bindat--length-group, bindat--pack-group)
(bindat-format-vector): Quote function symbols as such.

4 years agoRemove some compat code from uudecode.el and binhex.el
Stefan Kangas [Wed, 21 Oct 2020 13:37:13 +0000 (15:37 +0200)]
Remove some compat code from uudecode.el and binhex.el

* lisp/mail/uudecode.el (uudecode-char-int): Make obsolete.
(uudecode-decode-region-internal): Adjust callers.
* lisp/mail/binhex.el (binhex-char-int): Make obsolete.
(binhex-string-big-endian, binhex-string-little-endian)
(binhex-header): Adjust callers.

4 years agoDeclare old compat aliases in tcl.el obsolete
Stefan Kangas [Wed, 21 Oct 2020 13:25:45 +0000 (15:25 +0200)]
Declare old compat aliases in tcl.el obsolete

* lisp/progmodes/tcl.el (tcl-uncomment-region)
(tcl-indent-for-comment, add-log-tcl-defun, indent-tcl-exp)
(calculate-tcl-indent, tcl-beginning-of-defun, tcl-end-of-defun)
(tcl-mark-defun, tcl-mark): Make obsolete.

4 years agoAdd some top level domains
Stefan Kangas [Wed, 21 Oct 2020 12:49:04 +0000 (14:49 +0200)]
Add some top level domains

* lisp/mail/mail-extr.el (mail-extr-all-top-level-domains): Add
some geographic domains.

4 years agoRevert "Add emoji to etc/HELLO"
Lars Ingebrigtsen [Wed, 21 Oct 2020 12:10:58 +0000 (14:10 +0200)]
Revert "Add emoji to etc/HELLO"

This reverts commit a1fcdeec25be87e8f97ac5c14e6fbf6a4d1eb2d4.

There was already an emoji in there.

4 years ago* test/lisp/vc/vc-bzr-tests.el: Use lexical-binding.
Stefan Kangas [Wed, 21 Oct 2020 11:26:57 +0000 (13:26 +0200)]
* test/lisp/vc/vc-bzr-tests.el: Use lexical-binding.

4 years agoUse lexical-binding in files-x-tests.el
Stefan Kangas [Wed, 21 Oct 2020 11:25:39 +0000 (13:25 +0200)]
Use lexical-binding in files-x-tests.el

* test/lisp/files-x-tests.el: Use lexical-binding.
(remote-null-device): Declare.

4 years agoUse lexical-binding in iso-ascii.el
Stefan Kangas [Wed, 21 Oct 2020 11:19:02 +0000 (13:19 +0200)]
Use lexical-binding in iso-ascii.el

* lisp/international/iso-ascii.el: Use lexical-binding.  Remove
redundant :group args.

4 years agoUse lexical-binding in hfy-cmap.el and add tests
Stefan Kangas [Wed, 21 Oct 2020 11:05:32 +0000 (13:05 +0200)]
Use lexical-binding in hfy-cmap.el and add tests

* lisp/hfy-cmap.el: Use lexical-binding.
(hfy-cmap--parse-buffer): Extract from...
(htmlfontify-load-rgb-file): ...here.

* test/lisp/hfy-cmap-resources/rgb.txt:
* test/lisp/hfy-cmap-tests.el: New files.

4 years agoAdd emoji to etc/HELLO
Lars Ingebrigtsen [Wed, 21 Oct 2020 10:31:12 +0000 (12:31 +0200)]
Add emoji to etc/HELLO

4 years ago* etc/HELLO: Keep Javanese System.out.println("");
Michael Albinus [Wed, 21 Oct 2020 10:24:46 +0000 (12:24 +0200)]
* etc/HELLO: Keep Javanese System.out.println("");

4 years ago* lisp/outline.el: Use lexical-binding
Stefan Monnier [Tue, 20 Oct 2020 23:00:52 +0000 (19:00 -0400)]
* lisp/outline.el: Use lexical-binding

Remove redundant `group` arguments.
(outline-level): Move before first use.
(outline-mode): Use `setq-local`.
(outline-isearch-open-invisible-function): Give it a non-nil default.

4 years ago; Fix last change to idlw-complete-structtag.el
Basil L. Contovounesios [Tue, 20 Oct 2020 19:02:29 +0000 (20:02 +0100)]
; Fix last change to idlw-complete-structtag.el

4 years agoUse lexical-binding in m4-mode.el
Stefan Kangas [Tue, 20 Oct 2020 18:14:24 +0000 (20:14 +0200)]
Use lexical-binding in m4-mode.el

* lisp/progmodes/m4-mode.el: Use lexical-binding.  Remove redundant
:group args.
* lisp/progmodes/m4-mode.el (m4-m4-buffer, m4-m4-region): Quote
function symbols as such.

4 years agoMake more load-hooks obsolete (Bug#21563)
Stefan Kangas [Tue, 20 Oct 2020 17:10:51 +0000 (19:10 +0200)]
Make more load-hooks obsolete (Bug#21563)

* lisp/progmodes/dcl-mode.el (dcl-mode):
* lisp/progmodes/idlw-complete-structtag.el: Recommend
with-eval-after-load instead of load-hooks.
* lisp/calc/calc-ext.el (calc-ext-load-hook):
* lisp/emacs-lisp/bytecomp.el (bytecomp-load-hook):
* lisp/emacs-lisp/cl-extra.el (cl-extra-load-hook):
* lisp/emacs-lisp/cl-macs.el (cl-macs-load-hook):
* lisp/emacs-lisp/cl-seq.el (cl-seq-load-hook):
* lisp/gnus/message.el (message-load-hook):
* lisp/gnus/nnheader.el (nnheader-load-hook):
* lisp/gnus/nnmail.el (nnmail-load-hook):
* lisp/progmodes/dcl-mode.el (dcl-mode-load-hook):
* lisp/textmodes/tex-mode.el (tex-mode-load-hook):
* lisp/whitespace.el (whitespace-load-hook): Obsolete for
with-eval-after-load.  Note that these variables are never declared,
but the byte-compiler will still warn about them if used.

4 years agobyte-compile-file: Make optional LOAD argument obsolete
Stefan Kangas [Mon, 21 Sep 2020 22:16:22 +0000 (00:16 +0200)]
byte-compile-file: Make optional LOAD argument obsolete

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Declare optional
LOAD argument obsolete.  Adjust callers.  (Bug#38072)
(byte-recompile-file): Declare optional LOAD argument obsolete.
* doc/lispref/compile.texi (Compilation Functions): Update
documentation to reflect above obsoletion.
* etc/NEWS: Announce above obsoletion.

4 years agoSimplify regexp in last change to woman.el
Basil L. Contovounesios [Tue, 20 Oct 2020 16:35:29 +0000 (17:35 +0100)]
Simplify regexp in last change to woman.el

* lisp/woman.el (woman-decode-region): Use simpler character
alternative instead of alternation.

4 years agoSimplify syntax of shortdoc face specs
Basil L. Contovounesios [Tue, 20 Oct 2020 16:28:26 +0000 (17:28 +0100)]
Simplify syntax of shortdoc face specs

* lisp/emacs-lisp/shortdoc.el: Remove unused dependency.
(shortdoc-section, shortdoc-example): Use newer (DISPLAY . PLIST)
face spec syntax.

4 years agoTweak test data for signed package installation
Stefan Kangas [Tue, 20 Oct 2020 16:26:38 +0000 (18:26 +0200)]
Tweak test data for signed package installation

* test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el:
* test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el:
Use lexical-binding.
* test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh:
New file.
* test/lisp/emacs-lisp/package-resources/key.pub:
* test/lisp/emacs-lisp/package-resources/key.sec: Add new key.
* test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig:
* test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig:
Update signatures using new key.

4 years ago* lisp/textmodes/picture.el: Use lexical binding.
Mattias Engdegård [Tue, 20 Oct 2020 15:27:31 +0000 (17:27 +0200)]
* lisp/textmodes/picture.el: Use lexical binding.

4 years agoAvoid assertion violations in malformed Unicode escapes
Eli Zaretskii [Tue, 20 Oct 2020 15:27:47 +0000 (18:27 +0300)]
Avoid assertion violations in malformed Unicode escapes

* src/lread.c (read_escape): Produce better diagnostic for
malformed \u Unicode escapes, while avoiding assertion violation
when READCHAR returns -1 because the input is exhausted.
(Bug#44084)

4 years ago* lisp/language/utf-8-lang.el: Use lexical-binding.
Stefan Kangas [Tue, 20 Oct 2020 13:41:04 +0000 (15:41 +0200)]
* lisp/language/utf-8-lang.el: Use lexical-binding.

4 years ago; * etc/tutorials/TUTORIAL.fr: Fix typo.
Bastien Guerry [Tue, 20 Oct 2020 13:01:02 +0000 (15:01 +0200)]
; * etc/tutorials/TUTORIAL.fr: Fix typo.

4 years agoTweak the documentation for define-obsolete-variable-alias
Lars Ingebrigtsen [Tue, 20 Oct 2020 11:28:29 +0000 (13:28 +0200)]
Tweak the documentation for define-obsolete-variable-alias

* doc/lispref/variables.texi (Variable Aliases): Actually describe
the macro parameters (bug#44088).

* lisp/emacs-lisp/byte-run.el (define-obsolete-variable-alias):
Ditto (bug#44088).

4 years agoFix some mpc.el updating quirks
Masahiro Nakamura [Tue, 20 Oct 2020 11:20:48 +0000 (13:20 +0200)]
Fix some mpc.el updating quirks

* lisp/mpc.el (mpc-songs-jump-to): Update the status buffer.

* lisp/mpc.el (mpc-stop): M-x mpc-stop clears playlist queue. So
updating *MPC-Songs* buffer is useful.

* lisp/mpc.el (mpc-cmd-delete): I noticed M-x mpc-playlist-delete
always messages “Deleted 1 songs” even if playlist queue has more
than one songs.  This is because mpc-cmd-delete’s sort modifies
songs-poss by side effect.  Using copy-sequence fixes this (bug#44093).
* lisp/mpc.el (mpc-cmd-move): Ditto.

4 years agoMan highlighting: Don't occasionally bold entire sections.
Jim Blandy [Tue, 20 Oct 2020 11:09:16 +0000 (13:09 +0200)]
Man highlighting: Don't occasionally bold entire sections.

* lisp/ansi-color.el (ansi-color-apply-on-region): Always save a
restart position in ansi-color-context-region if the region ends with
highlighting active.

4 years agoPreserve all `eval' elements from both .dir-locals files
Lars Ingebrigtsen [Tue, 20 Oct 2020 11:07:25 +0000 (13:07 +0200)]
Preserve all `eval' elements from both .dir-locals files

* lisp/files.el (dir-locals-read-from-dir): Preserve all `eval'
elements from both .dir-locals files (bug#44066).

4 years ago* lisp/image-file.el: Use lexical-binding.
Stefan Kangas [Tue, 20 Oct 2020 01:21:16 +0000 (03:21 +0200)]
* lisp/image-file.el: Use lexical-binding.

4 years agoMake a bookmark test more robust
Stefan Kangas [Tue, 20 Oct 2020 01:14:36 +0000 (03:14 +0200)]
Make a bookmark test more robust

* test/lisp/bookmark-tests.el (bookmark-tests-insert-annotation):
Make test more robust by not being timing dependent.