Merge remote-tracking branch 'origin/master' into feature/android

This commit is contained in:
Po Lu 2023-08-06 21:45:44 +08:00
commit 7ffc5f86e4
11 changed files with 62 additions and 61 deletions

View file

@ -72,7 +72,10 @@ characters are those marked with W or F in that file. Zero-width
characters are not taken from EastAsianWidth.txt, they are those whose
Unicode General Category property is one of Mn, Me, or Cf, and also
Hangul jungseong and jongseong characters (a.k.a. "Jamo medial vowels"
and "Jamo final consonants").
and "Jamo final consonants"). The list of "ambiguous-width
characters" recorded in the ambiguous-width-chars table (around line
1400 of characters.el) should also be checked against the latest
Unicode data in EastAsianWidth.txt.
Any new scripts added by UnicodeData.txt will also need updates to
script-representative-chars defined in fontset.el, and also the list

View file

@ -5024,20 +5024,12 @@ really supports that color. When using X, you can ask for any defined
color on any kind of display, and you will get some result---typically,
the closest it can do. To determine whether a frame can really display
a certain color, use @code{color-supported-p} (see below).
@findex x-color-defined-p
This function used to be called @code{x-color-defined-p},
and that name is still supported as an alias.
@end defun
@defun defined-colors &optional frame
This function returns a list of the color names that are defined
and supported on frame @var{frame} (default, the selected frame).
If @var{frame} does not support colors, the value is @code{nil}.
@findex x-defined-colors
This function used to be called @code{x-defined-colors},
and that name is still supported as an alias.
@end defun
@defun color-supported-p color &optional frame background-p
@ -5089,10 +5081,6 @@ The color values are returned for @var{frame}'s display. If
@var{frame} is omitted or @code{nil}, the information is returned for
the selected frame's display. If the frame cannot display colors, the
value is @code{nil}.
@findex x-color-values
This function used to be called @code{x-color-values},
and that name is still supported as an alias.
@end defun
@defun color-name-to-rgb color &optional frame
@ -5277,10 +5265,7 @@ This function returns @code{t} if @var{display} has a mouse available,
@end defun
@defun display-color-p &optional display
@findex x-display-color-p
This function returns @code{t} if the screen is a color screen.
It used to be called @code{x-display-color-p}, and that name
is still supported as an alias.
@end defun
@defun display-grayscale-p &optional display

View file

@ -731,6 +731,11 @@ Instead, the Lisp reader approximates an infinity with the nearest
finite value, and a NaN with some other non-numeric object that
provokes an error if used numerically.
+++
** X color support compatibility aliases are now marked obsolete.
The compatibility aliases 'x-defined-colors', 'x-color-defined-p',
'x-color-values', and 'x-display-color-p' are now obsolete.
* Lisp Changes in Emacs 30.1

View file

@ -1976,7 +1976,9 @@ also be compiled."
(let ((directories (list default-directory))
(default-directory default-directory)
(ignore-files-regexp
(mapconcat #'identity byte-compile-ignore-files "\\|"))
(if byte-compile-ignore-files
(mapconcat #'identity byte-compile-ignore-files "\\|")
regexp-unmatchable))
(skip-count 0)
(fail-count 0)
(file-count 0)

View file

@ -4724,15 +4724,15 @@ Please, specify your level now: "))
(defun viper-submit-report ()
"Submit bug report on Viper."
(interactive)
(defvar x-display-color-p)
(defvar display-color-p)
(defvar viper-frame-parameters)
(defvar viper-minibuffer-emacs-face)
(defvar viper-minibuffer-vi-face)
(defvar viper-minibuffer-insert-face)
(let ((reporter-prompt-for-summary-p t)
(x-display-color-p (if (viper-window-display-p)
(x-display-color-p)
'non-x))
(display-color-p (if (viper-window-display-p)
(display-color-p)
'non-x))
(viper-frame-parameters (frame-parameters (selected-frame)))
(viper-minibuffer-emacs-face (if (viper-has-face-support-p)
(facep
@ -4790,7 +4790,7 @@ Please, specify your level now: "))
'viper-expert-level
'major-mode
'window-system
'x-display-color-p
'display-color-p
'viper-frame-parameters
'viper-minibuffer-vi-face
'viper-minibuffer-insert-face

View file

@ -1850,7 +1850,6 @@ If there is neither a user setting nor a default for FACE, return nil."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Frame-type independent color support.
;;; We keep the old x-* names as aliases for back-compatibility.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun defined-colors (&optional frame)
@ -1862,7 +1861,6 @@ If FRAME is nil, that stands for the selected frame."
(if (display-graphic-p frame)
(xw-defined-colors frame)
(mapcar 'car (tty-color-alist frame))))
(defalias 'x-defined-colors 'defined-colors)
(defun defined-colors-with-face-attributes (&optional frame foreground)
"Return a list of colors supported for a particular FRAME.
@ -1946,7 +1944,6 @@ If FRAME is omitted or nil, use the selected frame."
(if (display-graphic-p frame)
(xw-color-defined-p color frame)
(numberp (tty-color-translate color frame)))))
(defalias 'x-color-defined-p 'color-defined-p)
(declare-function xw-color-values "xfns.c" (color &optional frame))
@ -1974,8 +1971,6 @@ return value is nil."
(t
(tty-color-values color frame))))
(defalias 'x-color-values 'color-values)
(declare-function xw-display-color-p "xfns.c" (&optional terminal))
(defun display-color-p (&optional display)
@ -1986,7 +1981,6 @@ If omitted or nil, that stands for the selected frame's display."
(if (display-graphic-p display)
(xw-display-color-p display)
(tty-display-color-p display)))
(defalias 'x-display-color-p 'display-color-p)
(declare-function x-display-grayscale-p "xfns.c" (&optional terminal))
@ -3221,6 +3215,10 @@ also the same size as FACE on FRAME, or fail."
(define-obsolete-function-alias 'face-background-pixmap #'face-stipple "29.1")
(define-obsolete-function-alias 'set-face-background-pixmap #'set-face-stipple "29.1")
(define-obsolete-function-alias 'x-defined-colors #'defined-colors "30.1")
(define-obsolete-function-alias 'x-color-defined-p #'color-defined-p "30.1")
(define-obsolete-function-alias 'x-color-values #'color-values "30.1")
(define-obsolete-function-alias 'x-display-color-p #'display-color-p "30.1")
(provide 'faces)

View file

@ -6357,6 +6357,26 @@ non-nil and if FN fails due to a missing file or directory."
(apply fn args)
(file-missing (or no-such (signal (car err) (cdr err))))))
(defun delete-file (filename &optional trash)
"Delete file named FILENAME. If it is a symlink, remove the symlink.
If file has multiple names, it continues to exist with the other names.q
TRASH non-nil means to trash the file instead of deleting, provided
`delete-by-moving-to-trash' is non-nil.
When called interactively, TRASH is t if no prefix argument is given.
With a prefix argument, TRASH is nil."
(interactive (list (read-file-name
(if (and delete-by-moving-to-trash (null current-prefix-arg))
"Move file to trash: " "Delete file: ")
nil default-directory (confirm-nonexistent-file-or-buffer))
(null current-prefix-arg)))
(if (and (file-directory-p filename) (not (file-symlink-p filename)))
(signal 'file-error (list "Removing old name: is a directory" filename)))
(let* ((filename (expand-file-name filename)) (handler (find-file-name-handler filename 'delete-file)))
(cond (handler (funcall handler 'delete-file filename trash))
((and delete-by-moving-to-trash trash) (move-file-to-trash filename))
(t (delete-file-internal filename)))))
(defun delete-directory (directory &optional recursive trash)
"Delete the directory named DIRECTORY. Does not follow symlinks.
If RECURSIVE is non-nil, delete files in DIRECTORY as well, with

View file

@ -200,7 +200,8 @@ DEFAULT-MAP specifies the default key map for ICON-LIST."
"Create function NAME.
If FUNCTION exists, then NAME becomes an alias for FUNCTION.
Otherwise, create function NAME with ARG-LIST and BODY."
(declare (indent defun))
(declare (obsolete nil "30.1")
(indent defun))
(let ((defined-p (fboundp function)))
(if defined-p
`(defalias ',name ',function)

View file

@ -2565,38 +2565,13 @@ DEFUN ("delete-directory-internal", Fdelete_directory_internal,
return Qnil;
}
DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2,
"(list (read-file-name \
(if (and delete-by-moving-to-trash (null current-prefix-arg)) \
\"Move file to trash: \" \"Delete file: \") \
nil default-directory (confirm-nonexistent-file-or-buffer)) \
(null current-prefix-arg))",
DEFUN ("delete-file-internal", Fdelete_file_internal, Sdelete_file_internal, 1, 1, 0,
doc: /* Delete file named FILENAME. If it is a symlink, remove the symlink.
If file has multiple names, it continues to exist with the other names.
TRASH non-nil means to trash the file instead of deleting, provided
`delete-by-moving-to-trash' is non-nil.
When called interactively, TRASH is t if no prefix argument is given.
With a prefix argument, TRASH is nil. */)
(Lisp_Object filename, Lisp_Object trash)
If file has multiple names, it continues to exist with the other names. */)
(Lisp_Object filename)
{
Lisp_Object handler;
Lisp_Object encoded_file;
if (!NILP (Ffile_directory_p (filename))
&& NILP (Ffile_symlink_p (filename)))
xsignal2 (Qfile_error,
build_string ("Removing old name: is a directory"),
filename);
filename = Fexpand_file_name (filename, Qnil);
handler = Ffind_file_name_handler (filename, Qdelete_file);
if (!NILP (handler))
return call3 (handler, Qdelete_file, filename, trash);
if (delete_by_moving_to_trash && !NILP (trash))
return call1 (Qmove_file_to_trash, filename);
encoded_file = ENCODE_FILE (filename);
if (emacs_unlink (SSDATA (encoded_file)) != 0
@ -2832,7 +2807,7 @@ This is what happens in interactive use with M-x. */)
if (dirp)
call2 (Qdelete_directory, file, Qt);
else
Fdelete_file (file, Qnil);
call2 (Qdelete_file, file, Qnil);
return unbind_to (count, Qnil);
}
@ -6493,7 +6468,7 @@ syms_of_fileio (void)
DEFSYM (Qcopy_file, "copy-file");
DEFSYM (Qmake_directory_internal, "make-directory-internal");
DEFSYM (Qmake_directory, "make-directory");
DEFSYM (Qdelete_file, "delete-file");
DEFSYM (Qdelete_file_internal, "delete-file-internal");
DEFSYM (Qfile_name_case_insensitive_p, "file-name-case-insensitive-p");
DEFSYM (Qrename_file, "rename-file");
DEFSYM (Qadd_name_to_file, "add-name-to-file");
@ -6757,6 +6732,9 @@ This includes interactive calls to `delete-file' and
delete_by_moving_to_trash = 0;
DEFSYM (Qdelete_by_moving_to_trash, "delete-by-moving-to-trash");
/* Lisp function for interactive file delete with trashing */
DEFSYM (Qdelete_file, "delete-file");
/* Lisp function for moving files to trash. */
DEFSYM (Qmove_file_to_trash, "move-file-to-trash");
@ -6788,7 +6766,7 @@ This includes interactive calls to `delete-file' and
defsubr (&Scopy_file);
defsubr (&Smake_directory_internal);
defsubr (&Sdelete_directory_internal);
defsubr (&Sdelete_file);
defsubr (&Sdelete_file_internal);
defsubr (&Sfile_name_case_insensitive_p);
defsubr (&Srename_file);
defsubr (&Sadd_name_to_file);

View file

@ -7083,6 +7083,12 @@ This does not support external Emacs calls."
(string-equal
"mock" (file-remote-p ert-remote-temporary-file-directory 'method)))
(defun tramp--test-openbsd-p ()
"Check, whether the remote host runs OpenBSD."
;; We must refill the cache. `file-truename' does it.
(file-truename ert-remote-temporary-file-directory)
(ignore-errors (tramp-check-remote-uname tramp-test-vec "OpenBSD")))
(defun tramp--test-out-of-band-p ()
"Check, whether an out-of-band method is used."
(tramp-method-out-of-band-p tramp-test-vec 1))
@ -7403,6 +7409,7 @@ This requires restrictions of file name syntax."
(cond ((or (tramp--test-ange-ftp-p)
(tramp--test-container-p)
(tramp--test-gvfs-p)
(tramp--test-openbsd-p)
(tramp--test-rclone-p)
(tramp--test-sudoedit-p)
(tramp--test-windows-nt-or-smb-p))
@ -7485,7 +7492,8 @@ This requires restrictions of file name syntax."
"Автостопом по гала́ктике"
;; Use codepoints without a name. See Bug#31272.
;; Works on some Android systems only.
(unless (tramp--test-adb-p) "™›šbung")
(unless (or (tramp--test-adb-p) (tramp--test-openbsd-p))
"™›šbung")
;; Use codepoints from Supplementary Multilingual Plane (U+10000
;; to U+1FFFF).
"🌈🍒👋")

View file

@ -34,6 +34,7 @@
(declare-function treesit-parser-buffer "treesit.c")
(declare-function treesit-parser-language "treesit.c")
(declare-function treesit-pattern-expand "treesit.c")
(declare-function treesit-query-expand "treesit.c")
(declare-function treesit-query-compile "treesit.c")
(declare-function treesit-query-capture "treesit.c")