Stefan Kangas [Tue, 23 Aug 2022 18:15:49 +0000 (20:15 +0200)]
Move generalized variable docs to elisp manual
* doc/misc/cl.texi (Setf Extensions): Delete documentation on obsolete
generalized variable 'buffer-substring'. Move documentation on
generalized variables from here...
* doc/lispref/variables.texi (Setting Generalized Variables):
...to here. These variables have already been moved to gv.el.
Gregory Heytings [Tue, 23 Aug 2022 15:41:05 +0000 (15:41 +0000)]
Improve detection of long lines.
* src/buffer.h (struct buffer_text): New field.
(BUF_CHARS_UNCHANGED_MODIFIED, CHARS_UNCHANGED_MODIFIED): New macros.
* src/buffer.c (Fget_buffer_create): Initialize the new field.
* src/xdisp.c (mark_window_display_accurate_1): Set the new field.
(redisplay_window): Use it, together with CHARS_MODIFF, instead of
MODIFF and UNCHANGED_MODIFIED to decide whether to check for long
lines.
* src/pdumper.c (dump_buffer): Dump the new field.
Stefan Kangas [Tue, 23 Aug 2022 14:34:01 +0000 (16:34 +0200)]
Make XEmacs compat alias face-background-pixmap obsolete
* lisp/faces.el (face-background-pixmap)
(set-face-background-pixmap): Make XEmacs compat aliases obsolete in
favor of 'face-stipple' and 'set-face-stipple'. Update callers.
* lisp/emacs-lisp/gv.el (face-background-pixmap): Make XEmacs
alias obsolete as a generalized variable.
(face-stipple): New generalized variable.
* doc/misc/cl.texi (Setf Extensions): Refer to above new generalized
variable instead of the obsolete one.
Gerd Möllmann [Tue, 23 Aug 2022 13:50:25 +0000 (15:50 +0200)]
Fix pixel-scroll-precision in a corner case
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up-page): Handle
case that point cannot be found.
(pixel-scroll-precision-scroll-up): Handle case that window is one line high
(bug#57349)
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Revert
back to the old version before bug#49592. The new approach just
doesn't work well enough -- we don't really have the data to know
that, say, `make-obsolete-variable' is about the second symbol and
not the first.
Make buffer-local-value obsolete as a generalized variable
* lisp/electric.el (electric-indent-local-mode)
(electric-layout-local-mode, electric-quote-local-mode):
* lisp/elec-pair.el (electric-pair-local-mode): Adjust usage.
* lisp/emacs-lisp/gv.el (make-obsolete-generalized-variable): Move
since we're using it earlier in the file.
(buffer-local-value): Make obsolete as a generalized variable
since the semantics are unclear (bug#26624).
Stefan Kangas [Tue, 23 Aug 2022 02:54:57 +0000 (04:54 +0200)]
Make point-at-eol and point-at-bol obsolete
* lisp/subr.el (point-at-eol, point-at-bol): Make XEmacs compat
aliases obsolete in favor of `pos-bol'/'line-beginning-position' or
'pos-eol'/'line-end-position'. Update callers.
Ref: https://lists.gnu.org/r/emacs-devel/2022-08/msg00853.html
Make the size of elements the same in pgtk and X in tetris
* lisp/play/gamegrid.el (gamegrid-glyph-height-mm): Decrease
height a bit (since it wasn't really that height).
(gamegrid-calculate-glyph-size): Change calculation to work on
both X and pgtk (bug#49937).
(gamegrid-make-glyph): Inhibit image scaling.
Make it possible to mark generalized variables as obsolete
* doc/lispref/variables.texi (Adding Generalized Variables):
Document it.
* lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete): Alter
the interface so that it can also be used by generalized variable
warnings.
(byte-compile-function-warn): Adjust caller.
(byte-compile-check-variable): Adjust caller.
* lisp/emacs-lisp/gv.el (gv-get): Warn about obsolete generalized
variables (bug#49730).
(make-obsolete-generalized-variable): New function.
* lisp/emacs-lisp/byte-opt.el (byte-opt--bool-value-form):
Recognise boolean identity in aset, put, function-put and puthash.
* lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp):
Mark more functins as non-nil-returning, including the new
pos-bol and pos-eol.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
Mark pos-bol and pos-eol as side-effect-free.
Don't use the system-file-manager icon in the toolbar
* lisp/term/x-win.el (x-gtk-stock-map):
* lisp/term/pgtk-win.el (x-gtk-stock-map): Don't use
n:system-file-manager, because it's larger than the other Gtk
icons in some themes (bug#56627).
Make conf-javaprop-mode only claim that # lines are comments
* lisp/textmodes/conf-mode.el (conf-javaprop-mode-syntax-table):
Make obsolete and remove syntax entries for // and /* (bug#49077),
because only # are comments in javaprop files.
(conf-javaprop-mode): Adjust doc string to just mention #
comments.
* modus-themes.org (Option for inhibiting theme reload)
(Option for completion framework aesthetics, Advanced customization)
(Remap face with local value, Cycle through arbitrary colors)
(Custom Org emphasis faces, Note on git-gutter in Doom Emacs): Fix
typographic errors.
Stefan Kangas [Fri, 19 Aug 2022 18:19:59 +0000 (20:19 +0200)]
Fix return value of help--key-description-fontified
This fixes a bug with warning about obsolete commands in
`command-execute', where we incorrectly showed empty parenthesis
instead of the empty string when there was no keybinding for the new
command.
* lisp/help.el (help--key-description-fontified): Return nil instead
of the empty string if KEYS argument is nil.
* test/lisp/help-tests.el (help--key-description-fontified): New test.
(with-substitute-command-keys-test): Fix indentation.
Stefan Kangas [Fri, 19 Aug 2022 17:00:24 +0000 (19:00 +0200)]
Display new keybinding in obsolete command warning
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/simple.el (command-execute): When warning about an obsolete
command, display the keybinding for the new command.
Stefan Kangas [Fri, 19 Aug 2022 15:17:41 +0000 (17:17 +0200)]
Delete two functions obsolete since Emacs 23
These were announced as removed in Emacs 28.1 NEWS, but apparently
never actually deleted: only their obsoletion warning was removed.
So the warnings were reintroduced in Emacs 28.2, and we now actually
delete them here instead.
Stefan Kangas [Fri, 19 Aug 2022 15:30:18 +0000 (17:30 +0200)]
Merge from origin/emacs-28
f2c0fb2615 Resurrect obsoletion warning for two functions 9c0eec4ed8 * src/window.c (select_window): Fix assert for buffer = no... 16dfe04be2 Find libgccjit on macOS with Homebrew differently
Augusto Stoffel [Sat, 13 Aug 2022 16:10:14 +0000 (18:10 +0200)]
python.el: Add completion-predicate symbol property to commands
* lisp/progmodes/python.el: Add a completion-predicate property to
most commands defined in this file; some are only useful in
python-mode, others in inferior-python mode as well. (Bug#53913)
(python-skeleton-define, python-define-auxiliary-skeleton): Add
appropriate completion-predicate properties.
(python--completion-predicate): New function.
* doc/lispref/positions.texi (Text Lines): Document them
* lisp/emacs-lisp/shortdoc.el: Mention them, and also the
buffer/line predicates.
* src/editfns.c (bol): New function.
(Fbol): New defun.
(Fline_beginning_position): Use `bol'.
(eol): New function.
(Feol): New defun.
(Fline_end_position): Use `eol'.