Stefan Kangas [Thu, 25 Aug 2022 16:06:30 +0000 (18:06 +0200)]
Don't refer to Emacs 24.3 or older in FAQ
* doc/misc/efaq.texi: Don't say that the FAQ has been edited.
(Displaying the current line or column, Automatic indentation)
(Problems with very large files, Emacs for other operating systems)
(Right-to-left alphabets, Expanding aliases when sending mail): Remove
references to Emacs 24.3 or older.
(Learning how to do something): Don't include the reference card
price; it is currently incorrect and is likely to be incorrect again
in the future.
Robert Pluim [Thu, 25 Aug 2022 09:47:57 +0000 (11:47 +0200)]
Treat smtp-auth method from auth-info as a symbol
The lookup of the SMTP auth method is done based on symbols, but
sometimes the requested value comes from `auth-info', in which case it
is a string, so call `intern-soft' to convert it to a symbol (which
does nothing if it's already a symbol).
* lisp/mail/smtpmail.el (smtpmail-try-auth-methods): Call
`intern-soft' on the smtp-auth key's value. (Bug#57373)
* lisp/emacs-lisp/bytecomp.el (byte-compile-warn-obsolete):
Autoload so that the call here from gv.el (about obsolete
generalized variables) doesn't bug out (bug#57394).
Daniel Martín [Thu, 25 Aug 2022 12:37:36 +0000 (14:37 +0200)]
Fix instrumented eval-defun not printing "Edebug:" to the echo area
* lisp/progmodes/elisp-mode.el (elisp--eval-defun): Determine if we're
instrumenting a function and call eval-region with PRINTFLAG set to
nil if so (Bug#50245).
* test/lisp/progmodes/elisp-mode-tests.el
(eval-defun-prints-edebug-when-instrumented): Add a new test.
kobarity [Thu, 25 Aug 2022 12:29:10 +0000 (14:29 +0200)]
Add Python blocks support for hideshow
* lisp/progmodes/python.el (python-nav-beginning-of-block-regexp):
New variable.
(python-hideshow-forward-sexp-function): Change to call
`python-nav-end-of-block'.
(python-hideshow-find-next-block): New function to be used as
FIND-NEXT-BLOCK-FUNC in `hs-special-modes-alist'.
(python-info-looking-at-beginning-of-block): New function to be
used as LOOKING-AT-BLOCK-START-P-FUNC in `hs-special-modes-alist'.
(python-mode): Change settings of `hs-special-modes-alist'.
* test/lisp/progmodes/python-tests.el
(python-hideshow-hide-levels-1): Fix to keep empty lines.
(python-info-looking-at-beginning-of-block-1)
(python-hideshow-hide-levels-3, python-hideshow-hide-levels-4)
(python-hideshow-hide-all-1, python-hideshow-hide-all-2)
(python-hideshow-hide-all-3, python-hideshow-hide-block-1): New
tests (bug#56635).
kobarity [Thu, 25 Aug 2022 12:28:22 +0000 (14:28 +0200)]
Extend `hs-special-modes-alist' for languages such as Python
* lisp/progmodes/hideshow.el (hs-special-modes-alist): Add
elements FIND-BLOCK-BEGINNING-FUNC, FIND-NEXT-BLOCK-FUNC, and
LOOKING-AT-BLOCK-START-P-FUNC.
(hs-find-block-beginning-func): New variable to hold
FIND-BLOCK-BEGINNING-FUNC.
(hs-find-next-block-func): New variable to hold
FIND-NEXT-BLOCK-FUNC.
(hs-looking-at-block-start-p-func): New variable to hold
LOOKING-AT-BLOCK-START-P-FUNC.
(hs-grok-mode-type): Set new variables from
`hs-special-modes-alist'.
(hs-find-next-block): New function.
(Misc.): Update callers of the above functions.
* test/lisp/progmodes/hideshow-tests.el: New test file (bug#56635).
Allow not deleting the config.cache file with "make FAST=true bootstrap"
* Makefile.in: Add some commentary about make bootstrap,
./configure -C and FASTo
(top_bootclean): Don't delete config.cache here.
(top_distclean): Delete it here instead.
(bootstrap-clean): Allow not deleting the cache file.
Michael Albinus [Thu, 25 Aug 2022 09:08:48 +0000 (11:08 +0200)]
Minor fixes in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl)
(tramp--test-deftest-with-ls): Skip if underlying test didn't run
or lasted too long.
(tramp--test-shell-file-name): Do not depend on `tramp--test-adb-p'.
Po Lu [Thu, 25 Aug 2022 04:24:34 +0000 (12:24 +0800)]
Fix various problems with mouse highlight on XI2 builds
* src/dispextern.h (reset_mouse_highlight): Fix coding style.
* src/xterm.c (xi_position_changed): New functions.
(xi_report_motion_window_clear, handle_one_xevent): Don't report
motion events if the pixel position did not actually change.
* src/xterm.h (struct xi_device_t): New fields
`last_motion_window', `last_motion_x' and `last_motion_y'.
Alan Mackenzie [Wed, 24 Aug 2022 19:27:32 +0000 (19:27 +0000)]
C++ Mode - Fontify "class Foo {\n ~Foo() noexcept;" correctly
This fixes bug #49787.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): (In `if' form just
before CASE 8) Remove the (not ...) around the (looking-at
c-after-suffixed-type-maybe-decl-key).
* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Add
`c-not-decl' to the values of c-type which are erased at the start of a
fontification.
Alan Mackenzie [Wed, 24 Aug 2022 14:42:11 +0000 (14:42 +0000)]
CC Mode: Fontify args correctly when arglist closing ) is not on the same line
This fixes bug #56841.
* lisp/progmodes/cc-engine.el (c-forward-declarator): Fix an off-by-one
comparing the position after a c-forward-name with a limit.
* lisp/progmodes/cc-mode.el (c-fl-decl-end): Handle correctly point starting
inside a literal. Insert a missing c-backward-syntactic-ws in the handling of
C++ attributes. Correctly handle an unmatched (. Better handle point
starting inside a [ or (. Tidy up the handling of syntactic whitespace at the
end of the buffer.
Po Lu [Wed, 24 Aug 2022 11:10:44 +0000 (19:10 +0800)]
Fix input extension focus tracking with some window managers
* src/xterm.c (handle_one_xevent): If a window manager sends us
FocusIn and FocusOut with XSendEvent (they do that), don't
detect focus changes when XInput 2 is enabled. The X server
will tell us the actual truth if the focus really did change.
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.