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

144261 commits

Author SHA1 Message Date
Andrea Corallo
831659b3b8 * Fix `memory-report' for '--without-x' builds
* lisp/emacs-lisp/memory-report.el
	(memory-report--image-cache): Don't call `image-cache-size' if
	unbound.
2020-12-13 11:09:20 +01:00
Dmitry Gutov
2d790c6c57 Bump project.el version
* lisp/progmodes/project.el: Bump the version.
2020-12-13 04:12:35 +02:00
Andrii Kolomoiets
6fc1b795c1 vc-create-tag: use vc-revision-history variable
* lisp/vc/vc.el (vc-create-tag): Use 'vc-revision-history' variable.
2020-12-13 04:00:49 +02:00
Dmitry Gutov
ebab7c48c3 Fix test failure
* test/lisp/vc/vc-tests.el (vc-test--working-revision):
Accept working revision -1, expected for older Hg (bug#36534).
2020-12-13 03:59:33 +02:00
Stefan Monnier
185b0820b8 * lisp/emacs-lisp/bytecomp.el: Allow a nil destination file
(byte-compile--default-dest-file): New function, extracted from
byte-compile-dest-file.
(byte-compile-dest-file): Use it.
(byte-compile-dest-file-function): Give it a non-nil default value.
(byte-recompile-file, byte-compile-file): Handle a nil return value
from `byte-compile-dest-file`.

* lisp/progmodes/elisp-mode.el (elisp-flymake--batch-compile-for-flymake):
Tell the compiler not to write the result, instead of writing it to
a dummy temp file.
2020-12-12 19:19:03 -05:00
Alan Third
c6f21e2420 Fix assertion on SVG load failure
* src/image.c (svg_load_image): Move setting DPI to after rsvg_handle
error checking.
2020-12-12 23:53:47 +00:00
Stefan Kangas
89c6efc690 Remove references to Emacs before version 22 from FAQ
* doc/misc/efaq.texi (Escape sequences in shell output): Remove
reference to versions before Emacs 21.
(Basic editing, Latest version of Emacs)
(Turning on abbrevs by default, Going to a line by number)
(Security risks with Emacs): Remove references to versions before
Emacs 22.
2020-12-12 23:51:30 +01:00
Philipp Stephani
52e3ac6303 Document and enforce some properties for strings created by modules.
When creating multibyte or unibyte strings, we should guarantee the
following invariants:

- When creating empty strings, a NULL data pointer should be allowed.
  This often arises in practice if the string length isn't known in
  advance, and we don't want to unnecessarily trigger undefined
  behavior.  Since functions like memcpy might not accept NULL
  pointers, use the canonical empty string objects in this case.

- Nonzero strings should be guaranteed to be unique and mutable.
  These are the same guarantees expected from Lisp functions such as
  'make-string' or 'unibyte-string'.  On the other hand, empty strings
  might not be unique.

* src/emacs-module.c (module_make_string)
(module_make_unibyte_string): Correctly handle empty strings.

* test/src/emacs-module-resources/mod-test.c (Fmod_test_make_string):
New test function.
(emacs_module_init): Expose it.

* test/src/emacs-module-tests.el (mod-test-make-string/empty)
(mod-test-make-string/nonempty): New unit tests.

* doc/lispref/internals.texi (Module Values): Document properties and
corner cases for strings.
2020-12-12 23:28:22 +01:00
Lars Ingebrigtsen
4bf98aecff Fix BSD .include etc syntax in Makefiles
* lisp/progmodes/make-mode.el (makefile-bsdmake-statements): Fix
the BSD conditional syntax (bug#24000).
(makefile-make-font-lock-keywords): Allow calling without keywords.
(makefile-bsdmake-font-lock-keywords): Add the conditional syntax.

     Makefile inclusion, conditional structures and for loops reminiscent of
     the C programming language are provided in make.  All such structures are
     identified by a line beginning with a single dot (`.') character.
     Whitespace characters may follow this dot, e.g.,

           .include <file>
     and
           .   include <file>

     are identical constructs
2020-12-12 21:59:08 +01:00
Lars Ingebrigtsen
180e309d8b Bind `C-c C-d' to rmail-epa-decrypt in rmail
* doc/emacs/rmail.texi (Rmail Display): Mention the key
binding (bug#25411).

* lisp/mail/rmail.el (rmail-mode-map): Bind C-c C-d to
rmail-epa-decrypt.
(rmail-mode): Mention it.
(rmail-epa-decrypt): Don't mark a mail as decrypted unless we're
replacing it.

* lisp/mail/rmailsum.el (rmail-summary-mode-map): Bind C-c C-d.
(rmail-summary-epa-decrypt): New command.
2020-12-12 21:19:26 +01:00
Eric Abrahamsen
8a220d7c8f New option gnus-registry-register-all
* lisp/gnus/gnus-registry.el (gnus-registry-register-all): If nil,
the registry won't automatically create new entries for all seen
messages. Defaults to t to preserve previous behavior.
(gnus-registry-handle-action): Don't automatically create entries; if
one doesn't exist, don't handle anything.
(gnus-registry-register-message-ids): Only register if this option is
t.
(gnus-registry-get-or-make-entry): Add optional no-create argument.
(gnus-registry-get-id-key): This "get" operation should only create an
entry if this option is t.
* doc/misc/gnus.texi: Documentation and news.
2020-12-12 09:03:13 -08:00
Stefan Monnier
b1f2eada47 * lisp/emacs-lisp/package.el (package-buffer-info): Improve error message
(package-strip-rcs-id): Return canonicalized version string.
2020-12-12 11:50:00 -05:00
Stefan Monnier
8eee54d23a * src/fns.c (hash_string): Tweak the code further
Merge the two main branches; remove the `max` test and thus reduce
the "most steps" to 8 as written
2020-12-12 10:59:50 -05:00
Stefan Monnier
a12fe07a88 * lisp/vc/log-edit.el: Keep separator line thin even with line-numbers
(log-edit-font-lock-keywords): Disable line-number display on
the thin separator line.
(log-edit-mode): Adjust `font-lock-extra-managed-props` accordingly.
(log-edit-changelog-entries): Don't use a nil buffer-local
`change-log-default-name`.
2020-12-12 10:37:42 -05:00
Eli Zaretskii
a83d8c9bbe Followup to recent changes in keyboard.c
* src/keyboard.c (prev_kbd_event): Now defined only if HAVE_X11.

* lisp/subr.el (while-no-input-ignore-events): Remove
'buffer-switch': no longer used or defined.  (Bug#5803)
2020-12-12 17:32:55 +02:00
Lars Ingebrigtsen
734f371365 Remove some unused process.c variables
* src/process.c (wait_reading_process_output): Remove some
variables that are unused after the previous patch.
2020-12-12 16:24:12 +01:00
Stefan Monnier
d165b5a46b New variable redisplay_adhoc_scroll_in_resize_mini_windows
* src/xdisp.c (syms_of_xdisp): Define it.
(resize_mini_window): Obey it.
2020-12-12 10:16:42 -05:00
Stefan Monnier
adbb4eacc2 * src/keyboard.c: Fix bug#5803.
A long time ago, `read_key_sequence` used to read the keymaps at the
start, so if something happened between this start and the moment
the user actually hits a key, `read_key_sequence` could end up using
the wrong keymaps.  To work around this problem, the code used
`record_asynch_buffer_change` to try and trigger `read_key_sequence`
to re-read the keymaps in some known cases.

Several years ago, `read_key_sequence` was changed so as to read the keymaps
only once the user hits a key, making this machinery now redundant
(and also harmful apparently in bug#5803 because it introduces
"spurious" events).

So we here remove `record_asynch_buffer_change` and the
`BUFFER_SWITCH_EVENT` and `Qbuffer_switch` pseudo-events it generated.

* src/termhooks.h (enum event_kind): Delete `BUFFER_SWITCH_EVENT`.
* src/keyboard.c: (record_asynch_buffer_change): Delete function.
(syms_of_keyboard): Delete `Qbuffer_switch`.
(force_auto_save_soon, readable_events)
(kbd_buffer_store_buffered_event, kbd_buffer_get_event)
(make_lispy_event):
* src/xterm.c (handle_one_xevent):
* src/w32term.c (w32_read_socket):
* src/process.c (wait_reading_process_output)
(read_and_dispose_of_process_output, exec_sentinel): Simplify accordingly.
2020-12-12 09:56:04 -05:00
Alan Mackenzie
7ee0fc0dc1 CC Mode: Handle several K&R parameters per declaration
This fixes bug #45160.

* lisp/progmodes/cc-engine.el (c-in-knr-argdecl): Reformulate the latter part
of this function using c-do-declarators.
2020-12-12 14:41:45 +00:00
Lars Ingebrigtsen
4afef614cd Alter the "Redundant pcase patter" warning message
* lisp/emacs-lisp/pcase.el (pcase--expand): Make the "Redundant
pcase pattern" warning less vague (bug#31350).
2020-12-12 14:22:58 +01:00
Lars Ingebrigtsen
9a7bce6241 Make elint load `require'd packages
* lisp/emacs-lisp/elint.el (elint-require-form): New function to
load files that are `require'd (bug#27006).
(elint-special-forms): Add function.
2020-12-12 14:13:40 +01:00
Eli Zaretskii
db339f6dd1 ; * lisp/info.el (Info-toc-build): Fix last change. (Bug#28074) 2020-12-12 15:05:26 +02:00
Zajcev Evgeny
f45ce78c40 Explicitly specify svg base_uri using `:base-uri' image property
* src/image.c (svg_load): Check `:base-uri' image property to
explicitly set base_uri for images embedded into SVG
(enum svg_keyword_index):
(svg_format): Add :base-uri.
* lisp/svg.el (svg-embed-base-uri-image): New function to embed images
located relative to images `:base-uri'
2020-12-12 12:48:32 +00:00
Alan Third
8ff70045c3 Revert "Explicitly specify svg base_uri using `:base-uri' image property"
This reverts commit a8e2143a5c.

I applied the incorrect version of the patch.
2020-12-12 12:48:32 +00:00
Lars Ingebrigtsen
e005095e41 Offer to save tutorial position on Emacs exit
* lisp/tutorial.el (tutorial--buffer): New variable (bug#27998).
(tutorial--save-on-kill): Use it.
(help-with-tutorial): Set it and add new function to
kill-emacs-query-functions.
2020-12-12 13:46:33 +01:00
Lars Ingebrigtsen
ad0bbcd565 Update Info-toc-build parsing
* lisp/info.el (Info-toc-build): Update to understand EMDASH
instead of a hyphen in the detailed node listing (bug#28074).
2020-12-12 13:34:25 +01:00
Stefan Kangas
f22e4bbf1c Prefer setq-local in python.el
* lisp/progmodes/python.el: Require Emacs 24.2 instead of 24.1.
(python-indent-guess-indent-offset)
(python-shell-font-lock-with-font-lock-buffer)
(python-shell-font-lock-turn-on)
(python-shell-font-lock-turn-off, python-shell-font-lock-toggle)
(python-shell-comint-watch-for-first-prompt-output-filter)
(inferior-python-mode, python-shell-completion-native-turn-off)
(python-shell-completion-native-turn-on)
(python-pdbtrack-comint-output-filter-function, python-mode):
Prefer setq-local.
2020-12-12 13:27:35 +01:00
Lars Ingebrigtsen
6e84addc51 Preserve point in dired buffers in dired-*-find-file* commands
* lisp/dired.el (dired--find-file): New function (bug#28949).
(dired-find-file): Use it.
(dired-mouse-find-file): Ditto.
(dired-find-file-other-window): Ditto.
2020-12-12 12:48:53 +01:00
Lars Ingebrigtsen
f6cafe6574 Make dired-toggle-read-only check whether the directory is writable
* lisp/dired.el (dired-toggle-read-only): Check that the directory
is writable (bug#29412).
2020-12-12 12:32:30 +01:00
Eli Zaretskii
204d151940 Unbreak the MS-Windows build broken by recent changes
* src/image.c (rsvg_handle_set_dpi_x_y) [WINDOWSNT]: DEF_DLL_FN it.
(init_svg_functions): LOAD_DLL_FN rsvg_handle_set_dpi_x_y.
<rsvg_handle_set_dpi_x_y>: Define as a macro
2020-12-12 13:25:35 +02:00
Lars Ingebrigtsen
b41942fac9 Improve the documentation of marker handling when reverting
* doc/lispref/backups.texi (Reverting): Mention markers from
non-file sources (bug#30028).

* lisp/files.el (revert-buffer): Mention what happens with markers
(bug#30028).

* src/fileio.c (Finsert_file_contents): Say a bit more about what
markers are restored (bug#30028).
2020-12-12 12:20:43 +01:00
Eli Zaretskii
61b6cc401a Improve support for 'memory-report' on MS-Windows
* src/w32term.c (w32_image_size): New function.
* src/image.c (image_frame_cache_size) [HAVE_NTGUI]: Support
reporting the size of frame image cache.
(image_frame_cache_size, Fimage_cache_size): The total size is
now of the type 'size_t', not 'int'.
2020-12-12 13:12:57 +02:00
Pankaj Jangid
dba74cb5ec Allow customizing the Gnus summary thread indicators
* doc/misc/gnus.texi (Summary Buffer Lines): Document them.

* lisp/gnus/gnus-sum.el (gnus-summary-prepare-threads): Use them.

* lisp/gnus/gnus-sum.el (gnus-sum-opening-bracket)
(gnus-sum-closing-bracket, gnus-sum-opening-bracket-adopted)
(gnus-sum-closing-bracket-adopted): New variables.
2020-12-12 11:47:17 +01:00
Alan Third
404f12060c Improve some NS drawing code
* src/nsterm.m (ns_update_end): There's no need to schedule a redraw
if nothing has been changed.
(ns_set_vertical_scroll_bar):
(ns_set_horizontal_scroll_bar): Fix the logic for clearing under the
scrollbars.
(ns_clear_under_internal_border): No need to clip, the default
clipping rectangle will be fine.
2020-12-12 10:30:56 +00:00
Alan Third
03ac24f239 Use real DPI when rendering SVGs (bug#45124)
* src/image.c (svg_css_length_to_pixels): Pass in a DPI value instead
of using a hard coded value.
(svg_load_image): Set the DPI on the rsvg_handle, and pass it to
svg_css_length_to_pixels.
2020-12-12 10:30:56 +00:00
Zajcev Evgeny
a8e2143a5c Explicitly specify svg base_uri using `:base-uri' image property
* src/image.c (svg_load): Check `:base-uri' image property to
  explicitly set base_uri for images embedded into SVG
2020-12-12 10:30:56 +00:00
Stefan Monnier
7660d0359e * lisp/emacs-lisp/thunk.el (thunk-let*): Don't modify bindings 2020-12-11 19:26:43 -05:00
Stefan Monnier
78607f21b5 * lisp/play/dunnet.el: Make it so loading the file is harmless
Move comments into docstrings while at it.

(dun-batch): New function.
2020-12-11 19:06:55 -05:00
Lars Ingebrigtsen
3ed3a33cb1 Fix copyright line 2020-12-11 23:18:01 +01:00
Lars Ingebrigtsen
70f7f0b1fd button-buttonize doc string clarification
* lisp/button.el (button-buttonize): Clarify what happens when
DATA isn't present.
2020-12-11 21:30:25 +01:00
Lars Ingebrigtsen
711e7bf29c Fix image-cache-size crash
* src/image.c (image_frame_cache_size): Ensure that img->pixmap is
in use before trying to access it.
2020-12-11 21:16:08 +01:00
Stefan Kangas
6864dc1dff * src/fns.c (Fbuffer_hash): Doc fix. (Bug#45178) 2020-12-11 20:09:52 +01:00
Harald Jörg
dc5e875930 ; cperl-mode: Eliminate fallbacks if font-lock isn't loaded
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres):
Eliminate conditionals which always evaluate to true if
font-lock is preloaded (since Emacs 22.1).  (Bug#45183)
2020-12-11 20:09:44 +01:00
Lars Ingebrigtsen
b04f322a9b Also sort the totals section by size
* lisp/emacs-lisp/memory-report.el (memory-report): Sort the
totals by size, too.
2020-12-11 18:58:41 +01:00
Lars Ingebrigtsen
c7c261ebdf Tweak memory-report--format
* lisp/emacs-lisp/memory-report.el (memory-report--format): Make
everything line up, even when there's "1023.4kB".
2020-12-11 18:48:44 +01:00
F. Jason Park
abc8d6b946 Append incremental message segments in socks-filter
* lisp/net/socks.el (socks-filter): Preserve the order data arrive
instead of semi-reversing it (bug#45162).

Copyright-paperwork-exempt: yes
2020-12-11 16:36:02 +01:00
Pankaj Jangid
fec05bc667 docstring: If FRAME is nil, it defaults to selected frame.
* src/frame.c (Fset_frame_size): Clarify what a nil FRAME
parameter means (bug#45170).
2020-12-11 16:31:48 +01:00
Lars Ingebrigtsen
ec16518753 Clarify fortran-beginning-of-subprogram doc string after change
* lisp/progmodes/fortran.el (fortran-beginning-of-subprogram):
Clarify doc string (bug#33208).
2020-12-11 16:17:36 +01:00
Stefan Kangas
af2695b045 * lisp/progmodes/python.el: Bump version. 2020-12-11 16:16:36 +01:00
Lars Ingebrigtsen
eebb7c8a69 Fix compilation of image.c on non-Cairo systems
* src/image.c (image_frame_cache_size): pixmap->width etc is only
defined on Cairo.  Return 0 for now on other systems.
2020-12-11 16:02:54 +01:00