Merge from origin/emacs-28
66b8dfd060
(origin/emacs-28) ; Fix last change related to shorthands3832b983cf
In Fdelete_other_windows_internal fix new total window siz...5deb0ec14f
* lisp/mh-e/mh-show.el (mh-junk-whitelist): Custom obsoles...cf1409db71
Don't apply shorthands to punctuation-only symbols (bug#51...b3d0f53b29
* lisp/progmodes/python.el: Bump package version to 0.28.
This commit is contained in:
commit
d4a033696d
6 changed files with 50 additions and 28 deletions
|
@ -735,3 +735,19 @@ instead of @code{snu-}.
|
|||
;; ("sns-" . "some-nice-string-utils-"))
|
||||
;; End:
|
||||
@end example
|
||||
|
||||
@subsection Exceptions
|
||||
|
||||
There are two exceptions to rules governing Shorthand transformations:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Symbol forms comprised entirely of symbol and punctuation characters
|
||||
(@pxref{Syntax Class Table}) are not transformed. For example,
|
||||
it's possible to use @code{-} or @code{/=} as shorthand prefixes, but
|
||||
that won't shadow the arithmetic @emph{functions} of those names.
|
||||
|
||||
@item
|
||||
Symbol forms whose names start with @samp{#} or @samp{_} are not
|
||||
transformed.
|
||||
@end itemize
|
||||
|
|
|
@ -110,8 +110,15 @@ message(s) as specified by the option `mh-junk-disposition'."
|
|||
;;;###mh-autoload
|
||||
(defun mh-junk-whitelist (range)
|
||||
"Old name for `mh-junk-allowlist'; use \\[mh-junk-allowlist] instead."
|
||||
(declare (obsolete mh-junk-allowlist "28.1"))
|
||||
(interactive (list (mh-interactive-range "Allowlist")))
|
||||
;; We do our own message here instead of using "declare obsolete"
|
||||
;; in order to talk about keys instead of function names. Also, it
|
||||
;; lets us bind "J w" to this without the Emacs 29 compiler complaining.
|
||||
(when (not (get 'mh-junk-whitelist 'command-execute-obsolete-warned))
|
||||
(message "%s is an obsolete key (as of 28.1); use %s instead"
|
||||
(substitute-command-keys "\\[mh-junk-whitelist]")
|
||||
(substitute-command-keys "\\[mh-junk-allowlist]"))
|
||||
(put 'mh-junk-whitelist 'command-execute-obsolete-warned t))
|
||||
(mh-junk-allowlist range))
|
||||
|
||||
;;;###mh-autoload
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Fabián E. Gallina <fgallina@gnu.org>
|
||||
;; URL: https://github.com/fgallina/python.el
|
||||
;; Version: 0.27.1
|
||||
;; Version: 0.28
|
||||
;; Package-Requires: ((emacs "24.2") (cl-lib "1.0"))
|
||||
;; Maintainer: emacs-devel@gnu.org
|
||||
;; Created: Jul 2010
|
||||
|
|
|
@ -3805,7 +3805,13 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
|
|||
ptrdiff_t longhand_bytes = 0;
|
||||
|
||||
Lisp_Object tem;
|
||||
if (skip_shorthand)
|
||||
if (skip_shorthand
|
||||
/* The following ASCII characters are used in the
|
||||
only "core" Emacs Lisp symbols that are comprised
|
||||
entirely of characters that have the 'symbol
|
||||
constituent' syntax. We exempt them from
|
||||
transforming according to shorthands. */
|
||||
|| strspn (read_buffer, "^*+-/<=>_|") >= nbytes)
|
||||
tem = oblookup (obarray, read_buffer, nchars, nbytes);
|
||||
else
|
||||
tem = oblookup_considering_shorthand (obarray, read_buffer,
|
||||
|
|
38
src/window.c
38
src/window.c
|
@ -3199,8 +3199,10 @@ function in a program gives strange scrolling, make sure the
|
|||
window-start value is reasonable when this function is called. */)
|
||||
(Lisp_Object window, Lisp_Object root)
|
||||
{
|
||||
struct window *w, *r, *s;
|
||||
struct frame *f;
|
||||
struct window *w = decode_valid_window (window);
|
||||
struct window *r, *s;
|
||||
Lisp_Object frame = w->frame;
|
||||
struct frame *f = XFRAME (frame);
|
||||
Lisp_Object sibling, pwindow, delta;
|
||||
Lisp_Object swindow UNINIT;
|
||||
ptrdiff_t startpos UNINIT, startbyte UNINIT;
|
||||
|
@ -3208,9 +3210,7 @@ window-start value is reasonable when this function is called. */)
|
|||
int new_top;
|
||||
bool resize_failed = false;
|
||||
|
||||
w = decode_valid_window (window);
|
||||
XSETWINDOW (window, w);
|
||||
f = XFRAME (w->frame);
|
||||
|
||||
if (NILP (root))
|
||||
/* ROOT is the frame's root window. */
|
||||
|
@ -3250,7 +3250,7 @@ window-start value is reasonable when this function is called. */)
|
|||
/* Make sure WINDOW is the frame's selected window. */
|
||||
if (!EQ (window, FRAME_SELECTED_WINDOW (f)))
|
||||
{
|
||||
if (EQ (selected_frame, w->frame))
|
||||
if (EQ (selected_frame, frame))
|
||||
Fselect_window (window, Qnil);
|
||||
else
|
||||
/* Do not clear f->select_mini_window_flag here. If the
|
||||
|
@ -3283,7 +3283,7 @@ window-start value is reasonable when this function is called. */)
|
|||
|
||||
if (!EQ (swindow, FRAME_SELECTED_WINDOW (f)))
|
||||
{
|
||||
if (EQ (selected_frame, w->frame))
|
||||
if (EQ (selected_frame, frame))
|
||||
Fselect_window (swindow, Qnil);
|
||||
else
|
||||
fset_selected_window (f, swindow);
|
||||
|
@ -3318,18 +3318,12 @@ window-start value is reasonable when this function is called. */)
|
|||
w->top_line = r->top_line;
|
||||
resize_root_window (window, delta, Qnil, Qnil, Qt);
|
||||
if (window_resize_check (w, false))
|
||||
{
|
||||
window_resize_apply (w, false);
|
||||
window_pixel_to_total (w->frame, Qnil);
|
||||
}
|
||||
window_resize_apply (w, false);
|
||||
else
|
||||
{
|
||||
resize_root_window (window, delta, Qnil, Qt, Qt);
|
||||
if (window_resize_check (w, false))
|
||||
{
|
||||
window_resize_apply (w, false);
|
||||
window_pixel_to_total (w->frame, Qnil);
|
||||
}
|
||||
window_resize_apply (w, false);
|
||||
else
|
||||
resize_failed = true;
|
||||
}
|
||||
|
@ -3342,18 +3336,12 @@ window-start value is reasonable when this function is called. */)
|
|||
XSETINT (delta, r->pixel_width - w->pixel_width);
|
||||
resize_root_window (window, delta, Qt, Qnil, Qt);
|
||||
if (window_resize_check (w, true))
|
||||
{
|
||||
window_resize_apply (w, true);
|
||||
window_pixel_to_total (w->frame, Qt);
|
||||
}
|
||||
window_resize_apply (w, true);
|
||||
else
|
||||
{
|
||||
resize_root_window (window, delta, Qt, Qt, Qt);
|
||||
if (window_resize_check (w, true))
|
||||
{
|
||||
window_resize_apply (w, true);
|
||||
window_pixel_to_total (w->frame, Qt);
|
||||
}
|
||||
window_resize_apply (w, true);
|
||||
else
|
||||
resize_failed = true;
|
||||
}
|
||||
|
@ -3395,6 +3383,12 @@ window-start value is reasonable when this function is called. */)
|
|||
}
|
||||
|
||||
replace_window (root, window, true);
|
||||
/* Assign new total sizes to all windows on FRAME. We can't do that
|
||||
_before_ WINDOW replaces ROOT since 'window--pixel-to-total' works
|
||||
on the whole frame and thus would work on the frame's old window
|
||||
configuration (Bug#51007). */
|
||||
window_pixel_to_total (frame, Qnil);
|
||||
window_pixel_to_total (frame, Qt);
|
||||
|
||||
/* This must become SWINDOW anyway ....... */
|
||||
if (BUFFERP (w->contents) && !resize_failed)
|
||||
|
|
|
@ -1083,9 +1083,8 @@ evaluation of BODY."
|
|||
(should (unintern "f-test4---"))))
|
||||
|
||||
(ert-deftest elisp-dont-shadow-punctuation-only-symbols ()
|
||||
:expected-result :failed ; bug#51089
|
||||
(let* ((shorthanded-form '(- 42 (-foo 42)))
|
||||
(expected-longhand-form '(- 42 (fooey-foo 42)))
|
||||
(let* ((shorthanded-form '(/= 42 (-foo 42)))
|
||||
(expected-longhand-form '(/= 42 (fooey-foo 42)))
|
||||
(observed (let ((read-symbol-shorthands
|
||||
'(("-" . "fooey-"))))
|
||||
(car (read-from-string
|
||||
|
|
Loading…
Add table
Reference in a new issue