Merge from origin/emacs-29
4f0121f8db
Avoid assertion violations in displaying under 'outline-m...1bf6583662
Improve documentation of 'no-special-glyphs' frame parameter3647645e94
Fix Python font lock of chained assignment statement3291dea441
Fix example in Calc manual350ae75f5c
Avoid crashes on MS-Windows due to invalid UNC file namesccf8dba44a
; * lisp/face-remap.el (text-scale-adjust): Doc fix.5ab144c77c
; Improve documentation of backing up files
This commit is contained in:
commit
ed7e576975
10 changed files with 55 additions and 12 deletions
|
@ -786,6 +786,14 @@ those previous versions. If you want to be able to do that with files
|
|||
hosted by those services when editing them with Emacs, customize
|
||||
@code{backup-by-copying} to a non-@code{nil} value.
|
||||
|
||||
@vindex file-precious-flag
|
||||
Copying the old file for backup is also useful when editing precious
|
||||
files, because it makes sure the old file keeps its name if something
|
||||
fails between the backup and the saving of your edits. Alternatively,
|
||||
you can customize @code{file-precious-flag} to a non-@code{nil} value,
|
||||
which implies backups by copying and also protects against I/O errors
|
||||
while saving your edits.
|
||||
|
||||
@node Customize Save
|
||||
@subsection Customizing Saving of Files
|
||||
|
||||
|
|
|
@ -148,7 +148,8 @@ boundary. @xref{Filling}.
|
|||
|
||||
On a graphical display, tiny arrow images in the window fringes
|
||||
indicate truncated and continued lines (@pxref{Fringes}). On a text
|
||||
terminal, a @samp{$} in the rightmost column of the window indicates
|
||||
terminal, and on a graphical display when @code{fringe-mode} was
|
||||
turned off, a @samp{$} in the rightmost column of the window indicates
|
||||
truncation; a @samp{\} on the rightmost column indicates a line that
|
||||
wraps. (The display table can specify alternate characters to use
|
||||
for this; @pxref{Display Tables}).
|
||||
|
|
|
@ -1944,10 +1944,16 @@ integer). @xref{Line Height}, for more information.
|
|||
@vindex no-special-glyphs@r{, a frame parameter}
|
||||
@item no-special-glyphs
|
||||
If this is non-@code{nil}, it suppresses the display of any truncation
|
||||
and continuation glyphs (@pxref{Truncation}) for all buffers displayed
|
||||
by this frame. This is useful to eliminate such glyphs when fitting a
|
||||
frame to its buffer via @code{fit-frame-to-buffer} (@pxref{Resizing
|
||||
Windows}).
|
||||
(@pxref{Truncation}) and continuation glyphs for all the buffers
|
||||
displayed by this frame. This is useful to eliminate such glyphs when
|
||||
fitting a frame to its buffer via @code{fit-frame-to-buffer}
|
||||
(@pxref{Resizing Windows}). This frame parameter has effect only for
|
||||
GUI frames shown on graphical displays, and only if the fringes are
|
||||
disabled. This parameter is intended as a purely-presentation
|
||||
feature, and in particular should not be used for frames where the
|
||||
user can interactively insert text, or more generally where the cursor
|
||||
is shown. A notable example of frames where this is used is tooltip
|
||||
frames (@pxref{Tooltips}).
|
||||
@end table
|
||||
|
||||
|
||||
|
|
|
@ -32501,9 +32501,9 @@ decreases the precision.
|
|||
(put 'calc-define 'inc-prec '(progn
|
||||
|
||||
(define-key calc-mode-map (format "Y%sI" inc-prec-base-key)
|
||||
'increase-precision)
|
||||
'calc-increase-precision)
|
||||
(define-key calc-mode-map (format "Y%sD" inc-prec-base-key)
|
||||
'decrease-precision)
|
||||
'calc-decrease-precision)
|
||||
|
||||
(setq calc-Y-help-msgs
|
||||
(cons (format "%s + Inc-prec, Dec-prec" inc-prec-base-key)
|
||||
|
|
|
@ -387,9 +387,10 @@ this are the `default' and `header-line' faces: they will both be
|
|||
scaled even if they have an explicit `:height' setting.
|
||||
|
||||
See also the related command `global-text-scale-adjust'. Unlike
|
||||
that command, which scales the font size with a increment,
|
||||
`text-scale-adjust' scales the font size with a factor,
|
||||
`text-scale-mode-step'. With a small `text-scale-mode-step'
|
||||
that command, which scales the font size with a increment (and can
|
||||
also optionally resize frames to keep the same number of lines and
|
||||
characters per line), `text-scale-adjust' scales the font size with
|
||||
a factor, `text-scale-mode-step'. With a small `text-scale-mode-step'
|
||||
factor, the two commands behave similarly."
|
||||
(interactive "p")
|
||||
(let ((ev last-command-event)
|
||||
|
|
|
@ -845,6 +845,17 @@ sign in chained assignment."
|
|||
(match-beginning 2)) ; limit the search until the assignment
|
||||
nil
|
||||
(1 font-lock-variable-name-face)))
|
||||
;; single assignment with type hints, e.g.
|
||||
;; a: int = 5
|
||||
;; b: Tuple[Optional[int], Union[Sequence[str], str]] = (None, 'foo')
|
||||
;; c: Collection = {1, 2, 3}
|
||||
;; d: Mapping[int, str] = {1: 'bar', 2: 'baz'}
|
||||
(,(python-font-lock-assignment-matcher
|
||||
(python-rx grouped-assignment-target (* space)
|
||||
(? ?: (* space) (+ not-simple-operator) (* space))
|
||||
(group assignment-operator)))
|
||||
(1 font-lock-variable-name-face)
|
||||
(2 'font-lock-operator-face))
|
||||
;; special cases
|
||||
;; (a) = 5
|
||||
;; [a] = 5,
|
||||
|
|
|
@ -2572,7 +2572,7 @@ parse_root (const char * name, const char ** pPath)
|
|||
name += 2;
|
||||
do
|
||||
{
|
||||
if (IS_DIRECTORY_SEP (*name) && --slashes == 0)
|
||||
if (!*name || (IS_DIRECTORY_SEP (*name) && --slashes == 0))
|
||||
break;
|
||||
name++;
|
||||
}
|
||||
|
|
|
@ -3878,7 +3878,7 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos)
|
|||
if (in_ellipses_for_invisible_text_p (pos, w))
|
||||
{
|
||||
--charpos;
|
||||
bytepos = 0;
|
||||
bytepos = BYTE_TO_CHAR (charpos);
|
||||
}
|
||||
|
||||
/* Keep in mind: the call to reseat in init_iterator skips invisible
|
||||
|
|
|
@ -502,6 +502,16 @@ def f(x: CustomInt) -> CustomInt:
|
|||
(31 . font-lock-type-face) (40)
|
||||
(43 . font-lock-operator-face) (44))))
|
||||
|
||||
(ert-deftest python-font-lock-assignment-statement-20 ()
|
||||
(python-tests-assert-faces
|
||||
"a = b = c = 1"
|
||||
'((1 . font-lock-variable-name-face) (2)
|
||||
(3 . font-lock-operator-face) (4)
|
||||
(5 . font-lock-variable-name-face) (6)
|
||||
(7 . font-lock-operator-face) (8)
|
||||
(9 . font-lock-variable-name-face) (10)
|
||||
(11 . font-lock-operator-face) (12))))
|
||||
|
||||
(ert-deftest python-font-lock-operator-1 ()
|
||||
(python-tests-assert-faces
|
||||
"1 << 2 ** 3 == +4%-5|~6&7^8%9"
|
||||
|
|
|
@ -217,4 +217,10 @@ Also check that an encoding error can appear in a symlink."
|
|||
(should (equal (expand-file-name file nil) file))
|
||||
(file-name-case-insensitive-p file)))
|
||||
|
||||
(ert-deftest fileio-tests-invalid-UNC ()
|
||||
(skip-unless (eq system-type 'windows-nt))
|
||||
;; These should not crash, see bug#70914.
|
||||
(should-not (file-exists-p "//"))
|
||||
(should (file-attributes "//")))
|
||||
|
||||
;;; fileio-tests.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue