aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-06-16 13:10:52 +0300
committerEli Zaretskii2018-06-16 13:10:52 +0300
commit0a6a2fb1d0b02a5ac442cf6b344e35696aac7eb7 (patch)
treeb388527691ad118a3dfbfda1937f6115c02eb8ec
parent2461266be1ea68a8c79af61abe850bb5a2c65040 (diff)
downloademacs-0a6a2fb1d0b02a5ac442cf6b344e35696aac7eb7.tar.gz
emacs-0a6a2fb1d0b02a5ac442cf6b344e35696aac7eb7.zip
Improve documentation of several recent changes
* src/xfaces.c (merge_face_ref): Fix a typo in the commentary. (evaluate_face_filter, filter_face_ref): Minor copyedits in the commentary. * doc/lispref/display.texi (Face Remapping): * doc/lispref/text.texi (Special Properties): Document the ':filter' face specs and their effects. Document 'face-filters-always-match'. * doc/emacs/files.texi (Visiting): Document the new possibility to visit large files literally in response to question asked by Emacs. * etc/NEWS: Mention the new possibility to visit large files literally. * lisp/files.el (files--ask-user-about-large-file): Use "literally" instead of "raw", for consistency with find-file-literally. * doc/lispref/frames.texi (Input Focus): Tell explicitly that focus-change events are sometimes supported on TTY frames.
-rw-r--r--doc/emacs/files.texi5
-rw-r--r--doc/lispref/display.texi8
-rw-r--r--doc/lispref/frames.texi8
-rw-r--r--doc/lispref/text.texi17
-rw-r--r--etc/NEWS10
-rw-r--r--lisp/files.el10
-rw-r--r--src/xfaces.c8
7 files changed, 52 insertions, 14 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 7043bdc0688..f902baee9c2 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -206,7 +206,10 @@ saved it. If the file has changed, Emacs offers to reread it.
206 If you try to visit a file larger than 206 If you try to visit a file larger than
207@code{large-file-warning-threshold} (the default is 10000000, which is 207@code{large-file-warning-threshold} (the default is 10000000, which is
208about 10 megabytes), Emacs asks you for confirmation first. You can 208about 10 megabytes), Emacs asks you for confirmation first. You can
209answer @kbd{y} to proceed with visiting the file. Note, however, that 209answer @kbd{y} to proceed with visiting the file or @kbd{l} to visit
210the file literally (see below). Visiting large files literally speeds
211up navigation and editing of such files, because various
212potentially-expensive features are turned off. Note, however, that
210Emacs cannot visit files that are larger than the maximum Emacs buffer 213Emacs cannot visit files that are larger than the maximum Emacs buffer
211size, which is limited by the amount of memory Emacs can allocate and 214size, which is limited by the amount of memory Emacs can allocate and
212by the integers that Emacs can represent (@pxref{Buffers}). If you 215by the integers that Emacs can represent (@pxref{Buffers}). If you
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index ce7ec3ac10d..0ba7f0fd586 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2938,7 +2938,13 @@ the remapped face---it replaces the normal definition of @var{face},
2938instead of modifying it. 2938instead of modifying it.
2939 2939
2940If @code{face-remapping-alist} is buffer-local, its local value takes 2940If @code{face-remapping-alist} is buffer-local, its local value takes
2941effect only within that buffer. 2941effect only within that buffer. If @code{face-remapping-alist}
2942includes faces applicable only to certain windows, by using the
2943@w{@code{(:filtered (:window @var{param} @var{val}) @var{spec})}},
2944that face takes effect only in windows that match the filter
2945conditions (@pxref{Special Properties}). To turn off face filtering
2946temporarily, bind @code{face-filters-always-match} to a non-@code{nil}
2947value, then all face filters will match any window.
2942 2948
2943Note: face remapping is non-recursive. If @var{remapping} references 2949Note: face remapping is non-recursive. If @var{remapping} references
2944the same face name @var{face}, either directly or via the 2950the same face name @var{face}, either directly or via the
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 5e8b5b46d5d..6678644bec7 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2783,11 +2783,15 @@ could switch to a different terminal without switching back when
2783you're done. 2783you're done.
2784@end deffn 2784@end deffn
2785 2785
2786@cindex text-terminal focus notification
2786Emacs cooperates with the window system by arranging to select frames 2787Emacs cooperates with the window system by arranging to select frames
2787as the server and window manager request. When a window system 2788as the server and window manager request. When a window system
2788informs Emacs that one of its frames has been selected, Emacs 2789informs Emacs that one of its frames has been selected, Emacs
2789internally generates a @dfn{focus-in} event. Focus events are 2790internally generates a @dfn{focus-in} event. When an Emacs frame is
2790normally handled by @code{handle-focus-in}. 2791displayed on a text-terminal emulator, such as @command{xterm}, which
2792supports reporting of focus-change notification, the focus-in and
2793focus-out events are available even for text-mode frames. Focus
2794events are normally handled by @code{handle-focus-in}.
2791 2795
2792@deffn Command handle-focus-in event 2796@deffn Command handle-focus-in event
2793This function handles focus-in events from window systems and 2797This function handles focus-in events from window systems and
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index bb6ab04a927..ea9c82422ec 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3325,6 +3325,17 @@ foreground or background color, similar to @code{(:foreground
3325@var{color-name})} or @code{(:background @var{color-name})}. This 3325@var{color-name})} or @code{(:background @var{color-name})}. This
3326form is supported for backward compatibility only, and should be 3326form is supported for backward compatibility only, and should be
3327avoided. 3327avoided.
3328
3329@item
3330A cons cell of the form @w{@code{(:filtered @var{filter}
3331@var{face-spec})}}, that specifies the face given by @var{face-spec},
3332but only if @var{filter} matches when the face is used for display.
3333The @var{face-spec} can use any of the forms mentioned above. The
3334@var{filter} should be of the form @w{@code{(:window @var{param}
3335@var{value})}}, which matches for windows whose parameter @var{param}
3336is @code{eq} to @var{value}. If the variable
3337@code{face-filters-always-match} is non-@code{nil}, all face filters
3338are deemed to have matched.
3328@end itemize 3339@end itemize
3329 3340
3330Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by 3341Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by
@@ -3699,6 +3710,12 @@ string to display, which is passed through
3699The GNU Emacs Manual}) provides an example. 3710The GNU Emacs Manual}) provides an example.
3700@end defvar 3711@end defvar
3701 3712
3713@defvar face-filters-always-match
3714If this variable is non-@code{nil}, face filters that specify
3715attributes applied only when certain conditions are met will be deemed
3716to match always.
3717@end defvar
3718
3702@node Format Properties 3719@node Format Properties
3703@subsection Formatted Text Properties 3720@subsection Formatted Text Properties
3704 3721
diff --git a/etc/NEWS b/etc/NEWS
index e89402db131..cecd3f81f85 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -175,6 +175,13 @@ interface that's more like functions like @code{search-forward}.
175** More commands support noncontiguous rectangular regions, namely 175** More commands support noncontiguous rectangular regions, namely
176'upcase-dwim', 'downcase-dwim', 'replace-string', 'replace-regexp'. 176'upcase-dwim', 'downcase-dwim', 'replace-string', 'replace-regexp'.
177 177
178+++
179** When asked to visit a large file, Emacs now offers visiting it literally.
180Previously, Emacs would only ask for confirmation before visiting
181large files. Now it also offers a third alternative: to visit the
182file literally, as in 'find-file-literally', which speeds up
183navigation and editing of large files.
184
178 185
179* Changes in Specialized Modes and Packages in Emacs 27.1 186* Changes in Specialized Modes and Packages in Emacs 27.1
180 187
@@ -613,7 +620,8 @@ On terminal emulators that support the feature, Emacs can now support
613** Window-specific face remapping. 620** Window-specific face remapping.
614Face specifications (of the kind used in 'face-remapping-alist') 621Face specifications (of the kind used in 'face-remapping-alist')
615now support filters, allowing faces to vary between different windows 622now support filters, allowing faces to vary between different windows
616displaying the same buffer. 623displaying the same buffer. See the Info node "Face Remapping" of the
624Emacs Lisp Reference manual for more detail.
617 625
618+++ 626+++
619** New function assoc-delete-all. 627** New function assoc-delete-all.
diff --git a/lisp/files.el b/lisp/files.el
index 3921040fa9b..c4a68d04407 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2031,19 +2031,19 @@ think it does, because \"free\" is pretty hard to define in practice."
2031 (x-popup-dialog t `(,prompt 2031 (x-popup-dialog t `(,prompt
2032 ("Yes" . ?y) 2032 ("Yes" . ?y)
2033 ("No" . ?n) 2033 ("No" . ?n)
2034 ("Open in raw mode" . ?r))) 2034 ("Open literally" . ?l)))
2035 (read-char-choice 2035 (read-char-choice
2036 (concat prompt " (y)es or (n)o or (r)aw ") 2036 (concat prompt " (y)es or (n)o or (l)iterally ")
2037 '(?y ?Y ?n ?N ?r ?R))))) 2037 '(?y ?Y ?n ?N ?l ?L)))))
2038 (cond ((memq choice '(?y ?Y)) nil) 2038 (cond ((memq choice '(?y ?Y)) nil)
2039 ((memq choice '(?r ?R)) 'raw) 2039 ((memq choice '(?l ?L)) 'raw)
2040 (t 'abort)))))) 2040 (t 'abort))))))
2041 2041
2042(defun abort-if-file-too-large (size op-type filename &optional offer-raw) 2042(defun abort-if-file-too-large (size op-type filename &optional offer-raw)
2043 "If file SIZE larger than `large-file-warning-threshold', allow user to abort. 2043 "If file SIZE larger than `large-file-warning-threshold', allow user to abort.
2044OP-TYPE specifies the file operation being performed (for message 2044OP-TYPE specifies the file operation being performed (for message
2045to user). If OFFER-RAW is true, give user the additional option 2045to user). If OFFER-RAW is true, give user the additional option
2046to open the file in raw mode. If the user chooses this option, 2046to open the file literally. If the user chooses this option,
2047`abort-if-file-too-large' returns the symbol `raw'. Otherwise, it 2047`abort-if-file-too-large' returns the symbol `raw'. Otherwise, it
2048returns nil or exits non-locally." 2048returns nil or exits non-locally."
2049 (let ((choice (and large-file-warning-threshold size 2049 (let ((choice (and large-file-warning-threshold size
diff --git a/src/xfaces.c b/src/xfaces.c
index 265581cca88..31aa14b7102 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2193,7 +2193,7 @@ merge_named_face (struct window *w,
2193 (:window PARAMETER VALUE), which matches if the current window has 2193 (:window PARAMETER VALUE), which matches if the current window has
2194 a PARAMETER EQ to VALUE. 2194 a PARAMETER EQ to VALUE.
2195 2195
2196 This function returns true if the face filter matches and false if 2196 This function returns true if the face filter matches, and false if
2197 it doesn't or if the function encountered an error. If the filter 2197 it doesn't or if the function encountered an error. If the filter
2198 is invalid, set *OK to false and, if ERR_MSGS is true, log an error 2198 is invalid, set *OK to false and, if ERR_MSGS is true, log an error
2199 message. On success, *OK is untouched. */ 2199 message. On success, *OK is untouched. */
@@ -2247,12 +2247,12 @@ evaluate_face_filter (Lisp_Object filter, struct window *w,
2247 2247
2248/* Determine whether FACE_REF is a "filter" face specification (case 2248/* Determine whether FACE_REF is a "filter" face specification (case
2249 #4 in merge_face_ref). If it is, evaluate the filter, and if the 2249 #4 in merge_face_ref). If it is, evaluate the filter, and if the
2250 filter matches, return the filtered expression. If the filter does 2250 filter matches, return the filtered face spec. If the filter does
2251 not match, return `nil'. If FACE_REF is not a filtered face 2251 not match, return `nil'. If FACE_REF is not a filtered face
2252 specification, return FACE_REF. 2252 specification, return FACE_REF.
2253 2253
2254 On error, set *OK to false, having logged an error message if 2254 On error, set *OK to false, having logged an error message if
2255 ERR_MSGS is true, and return `nil'. 2255 ERR_MSGS is true, and return `nil'. Otherwise, *OK is not touched.
2256 2256
2257 W is either NULL or a window used to evaluate filters. If W is 2257 W is either NULL or a window used to evaluate filters. If W is
2258 NULL, no window-based face specification filter matches. 2258 NULL, no window-based face specification filter matches.
@@ -2319,7 +2319,7 @@ filter_face_ref (Lisp_Object face_ref,
2319 for compatibility with 20.2. 2319 for compatibility with 20.2.
2320 2320
2321 4. Conses of the form 2321 4. Conses of the form
2322 (:filter (:window PARAMETER VALUE) FACE-SPECIFICATION), 2322 (:filtered (:window PARAMETER VALUE) FACE-SPECIFICATION),
2323 which applies FACE-SPECIFICATION only if the 2323 which applies FACE-SPECIFICATION only if the
2324 given face attributes are being evaluated in the context of a 2324 given face attributes are being evaluated in the context of a
2325 window with a parameter named PARAMETER being EQ VALUE. 2325 window with a parameter named PARAMETER being EQ VALUE.