Merge from origin/emacs-28

d53c999b4a Further vcs-cvs/rcs-responsible-p updates from master
dc3d1628ec ; * src/sysdep.c: Fix mistake in previous commit
855e15dbf1 Fix builds on older versions of macOS
9da744e450 Fix documentation of Outline minor mode options
a8bb12ab05 Improve discoverability of 'insert-directory-program'
3f166bdf44 ; * etc/PROBLEMS: Describe MS-Windows issues with fonts.  ...
803ac857ee Fix cursor motion under truncate-lines with Flymake fringe...

# Conflicts:
#	etc/PROBLEMS
#	lisp/outline.el
#	src/sysdep.c
This commit is contained in:
Eli Zaretskii 2022-04-16 13:58:31 -04:00
commit 44ba0270b7
12 changed files with 96 additions and 46 deletions

View file

@ -1049,6 +1049,15 @@ index 5504171..431adf8 100644
If you can't modify that file directly, copy it to the directory
~/.m17n.d/ (create it if it doesn't exist), and apply the patch.
** On Haiku, some proportionally-spaced fonts display with artifacting.
This is a Haiku bug: https://dev.haiku-os.org/ticket/17229, which can
be remedied by using a different font that does not exhibit this
problem, or by configuring Emacs '--with-be-cairo'.
So far, Bitstream Charter and Noto Sans have been known to exhibit
this problem, while Noto Sans Display is known to not do so.
** On MS-Windows, some characters display as boxes with hex code.
Also, some characters could display with wrong fonts.
@ -1062,14 +1071,20 @@ modern fonts are used, such as Noto Emoji or Ebrima.
The solution is to switch to a configuration that uses HarfBuzz as its
shaping engine, where these problems don't exist.
** On Haiku, some proportionally-spaced fonts display with artifacting.
** On MS-Windows, selecting some fonts as the default font doesn't work.
This is a Haiku bug: https://dev.haiku-os.org/ticket/17229, which can
be remedied by using a different font that does not exhibit this
problem, or by configuring Emacs '--with-be-cairo'.
This can happen if you select font variants such as "Light" or "Thin"
or "Semibold" or "Heavy", and some others. The APIs used by Emacs on
Windows to enumerate fonts in a font family consider only 4 font
variants to belong to the same family: Regular, Italic, Bold, and
Bold-Italic. All the other variants aren't returned by those APIs
when we request to list all the fonts in a family, and thus aren't
considered by Emacs to belong to the family. So any font variant that
is not one of those 4 will likely not work as expected; in most cases
Emacs will select some other font instead.
So far, Bitstream Charter and Noto Sans have been known to exhibit
this problem, while Noto Sans Display is known to not do so.
The only workaround is not to choose such font variants as the default
font when running Emacs on MS-Windows.
* Internationalization problems

View file

@ -1034,8 +1034,11 @@ If a directory or nothing is found at point, return nil."
;;;###autoload
(defun dired (dirname &optional switches)
"\"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it.
Optional second argument SWITCHES specifies the `ls' options used.
\(Interactively, use a prefix argument to be able to specify SWITCHES.)
Optional second argument SWITCHES specifies the options to be used
when invoking `insert-directory-program', usually `ls', which produces
the listing of the directory files and their attributes.
Interactively, a prefix argument will cause the command to prompt
for SWITCHES.
If DIRNAME is a string, Dired displays a list of files in DIRNAME (which
may also have shell wildcards appended to select certain files).

View file

@ -7325,7 +7325,9 @@ need to be passed verbatim to shell commands."
(defvar insert-directory-program (purecopy "ls")
"Absolute or relative name of the `ls' program used by `insert-directory'.")
"Absolute or relative name of the `ls'-like program.
This is used by `insert-directory' and `dired-insert-directory'
\(thus, also by `dired').")
(defcustom directory-free-space-program (purecopy "df")
"Program to get the amount of free space on a file system.

View file

@ -178,13 +178,22 @@ in the file it applies to.")
map))
(defcustom outline-minor-mode-cycle-filter nil
"Filter out positions on the heading available for cycling."
"Control where on a heading the visibility-cycling commands are bound to keys.
This option controls, in Outline minor mode, where on a heading typing
the key sequences bound to visibility-cycling commands like `outline-cycle'
and `outline-cycle-buffer' will invoke those commands. By default, you can
invoke these commands by typing `TAB' and `S-TAB' anywhere on a heading line,
but customizing this option can make those bindings be in effect only at
specific positions on the heading, like only at the line's beginning or
line's end. This allows these keys to be bound to their usual commands,
as determined by the major mode, elsewhere on the heading lines.
This option is only in effect when `outline-minor-mode-cycle' is non-nil."
:type '(choice (const :tag "Everywhere" nil)
(const :tag "At line beginning" bolp)
(const :tag "Not at line beginning"
(lambda () (not (bolp))))
(const :tag "At line end" eolp)
(function :tag "Custom filter"))
(function :tag "Custom filter function"))
:version "28.1")
(defvar outline-minor-mode-cycle)
@ -371,28 +380,33 @@ After that, changing the prefix key requires manipulating keymaps."
(set-default sym val)))
(defcustom outline-minor-mode-cycle nil
"Enable cycling of headings in `outline-minor-mode'.
When enabled, it puts a keymap with cycling keys on heading lines.
When point is on a heading line, then typing `TAB' cycles between `hide all',
`headings only' and `show all' (`outline-cycle'). Typing `S-TAB' on
a heading line cycles the whole buffer (`outline-cycle-buffer').
Typing these keys anywhere outside heading lines uses their default bindings."
"Enable visibility-cycling commands on headings in `outline-minor-mode'.
If enabled, typing `TAB' on a heading line cycles the visibility
state of that heading's body between `hide all', `headings only'
and `show all' (`outline-cycle'), and typing `S-TAB' on a heading
line likewise cycles the visibility state of the whole buffer
\(`outline-cycle-buffer').
Typing these keys anywhere outside heading lines invokes their default
bindings, per the current major mode."
:type 'boolean
:safe #'booleanp
:version "28.1")
(defcustom outline-minor-mode-highlight nil
"Highlight headings in `outline-minor-mode' using font-lock keywords.
Non-nil value works well only when outline font-lock keywords
don't conflict with the major mode's font-lock keywords.
When t, it puts outline faces only if there are no major mode's faces
on headings. When `override', it completely overwrites major mode's
faces with outline faces. When `append', it tries to append outline
faces to major mode's faces."
:type '(choice (const :tag "No highlighting" nil)
(const :tag "Overwrite major mode faces" override)
(const :tag "Append outline faces to major mode faces" append)
(const :tag "Highlight separately from major mode faces" t))
"Whether to highlight headings in `outline-minor-mode' using font-lock keywords.
This option controles whether `outline-minor-mode' will use its font-lock
keywords to highlight headings, which could potentially conflict with
font-lock faces defined by the major mode. Thus, a non-nil value will
work well only when there's no such conflict.
If the value is t, use outline faces only if there are no major mode's
font-lock faces on headings. When `override', completely overwrite major
mode's font-lock faces with outline faces. When `append', try to append
outline font-lock faces to those of major mode."
:type '(choice (const :tag "Do not use outline font-lock highlighting" nil)
(const :tag "Overwrite major mode font-lock faces" override)
(const :tag "Append outline font-lock faces to major mode's"
append)
(const :tag "Highlight with outline font-lock faces only if major mode doesn't" t))
:safe #'symbolp
:version "28.1")
@ -1521,11 +1535,14 @@ Return either 'hide-all, 'headings-only, or 'show-all."
(save-excursion (outline-end-of-subtree) (point)))))
(defun outline-cycle ()
"Cycle between `hide all', `headings only' and `show all'.
"Cycle visibility state of the current heading line's body.
`Hide all' means hide all subheadings and their bodies.
`Headings only' means show sub headings but not their bodies.
`Show all' means show all subheadings and their bodies."
This cycles the visibility of the current heading line's subheadings
and body between `hide all', `headings only' and `show all'.
`Hide all' means hide all the subheadings and their bodies.
`Headings only' means show the subheadings, but not their bodies.
`Show all' means show all the subheadings and their bodies."
(interactive)
(condition-case nil
(pcase (outline--cycle-state)
@ -1547,7 +1564,15 @@ Return either 'hide-all, 'headings-only, or 'show-all."
"Internal variable used for tracking buffer cycle state.")
(defun outline-cycle-buffer ()
"Cycle the whole buffer like in `outline-cycle'."
"Cycle visibility state of the body lines of the whole buffer.
This cycles the visibility of all the subheadings and bodies of all
the heading lines in the buffer. It cycles them between `hide all',
`headings only' and `show all'.
`Hide all' means hide all the buffer's subheadings and their bodies.
`Headings only' means show all the subheadings, but not their bodies.
`Show all' means show all the buffer's subheadings and their bodies."
(interactive)
(let (has-top-level)
(save-excursion

View file

@ -640,7 +640,7 @@ Returns nil if unable to find this information."
;; Could run `bzr status' in the directory and see if it succeeds, but
;; that's relatively expensive.
(defalias 'vc-bzr-responsible-p #'vc-bzr-root
"Return non-nil if FILE is (potentially) controlled by bzr.
"Return the directory if FILE is (potentially) controlled by bzr.
The criterion is that there is a `.bzr' directory in the same
or a superior directory.")

View file

@ -308,7 +308,7 @@ to the CVS command."
(vc-switches 'CVS 'register)))
(defun vc-cvs-responsible-p (file)
"Return non-nil if CVS thinks it is responsible for FILE."
"Return the directory if CVS thinks it is responsible for FILE."
(let ((dir (if (file-directory-p file)
file
(file-name-directory file))))

View file

@ -137,9 +137,9 @@ It should return a status of either 0 (no differences found), or
)
(defun vc-dav-responsible-p (url)
"Return non-nil if DAV considers itself `responsible' for URL."
"Return the URL if DAV considers itself `responsible' for URL."
;; Check for DAV support on the web server.
(and t url))
url)
;;; Unimplemented functions
;;

View file

@ -288,7 +288,7 @@ to the RCS command."
(match-string 1))))))
(defun vc-rcs-responsible-p (file)
"Return non-nil if RCS thinks it would be responsible for registering FILE."
"Return the directory if RCS thinks it would be responsible for FILE."
;; TODO: check for all the patterns in vc-rcs-master-templates
(let ((dir (if (file-directory-p file)
file

View file

@ -212,7 +212,7 @@ to the SCCS command."
(vc-sccs-do-command nil 0 "get" (vc-master-name file)))))
(defun vc-sccs-responsible-p (file)
"Return non-nil if SCCS thinks it would be responsible for registering FILE."
"Return the directory if SCCS thinks it would be responsible for FILE."
;; TODO: check for all the patterns in vc-sccs-master-templates
(or (and (file-directory-p
(expand-file-name "SCCS" (file-name-directory file)))

View file

@ -242,11 +242,13 @@ This function differs from vc-do-command in that it invokes `vc-src-program'."
(vc-src-command nil files "add"))
(defun vc-src-responsible-p (file)
"Return non-nil if SRC thinks it would be responsible for registering FILE."
(file-directory-p (expand-file-name ".src"
(if (file-directory-p file)
file
(file-name-directory file)))))
"Return the directory if SRC thinks it would be responsible for FILE."
(let ((dir (expand-file-name ".src"
(if (file-directory-p file)
file
(file-name-directory file)))))
(and (file-directory-p dir)
dir)))
(defun vc-src-checkin (files comment &optional _rev)
"SRC-specific version of `vc-backend-checkin'.

View file

@ -220,7 +220,7 @@
;;
;; - responsible-p (file)
;;
;; Return non-nil if this backend considers itself "responsible" for
;; Return the directory if this backend considers itself "responsible" for
;; FILE, which can also be a directory. This function is used to find
;; out what backend to use for registration of new files and for things
;; like change log generation. The default implementation always

View file

@ -2209,7 +2209,10 @@ whether or not it is currently displayed in some window. */)
}
else
it_overshoot_count =
!(it.method == GET_FROM_IMAGE || it.method == GET_FROM_STRETCH);
/* If image_id is negative, it's a fringe bitmap, which by
definition doesn't affect display in the text area. */
!((it.method == GET_FROM_IMAGE && it.image_id >= 0)
|| it.method == GET_FROM_STRETCH);
if (start_x_given)
{