aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-06-12 19:26:44 +0300
committerEli Zaretskii2018-06-12 19:26:44 +0300
commitd93ba8ddeb30bca74b306b6e768f6d20416e1802 (patch)
tree1bb1716f87e803e8b28218a67e4d891251672f09
parente9c189ccae342c63de2629c5a51d1f40d1a562b6 (diff)
downloademacs-d93ba8ddeb30bca74b306b6e768f6d20416e1802.tar.gz
emacs-d93ba8ddeb30bca74b306b6e768f6d20416e1802.zip
; Assorted documentation fixes in recent changes
* etc/NEWS: Minor copyedits of recent entries. * src/keyboard.c (Finternal_handle_focus_in): * lisp/frame.el (frame-focus-state): Doc fixes. * doc/lispref/hooks.texi (Standard Hooks): Mention after-delete-frame-functions.
-rw-r--r--doc/lispref/hooks.texi1
-rw-r--r--etc/NEWS30
-rw-r--r--lisp/frame.el5
-rw-r--r--src/keyboard.c10
4 files changed, 24 insertions, 22 deletions
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index e374d02defb..0d50a293f26 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -124,6 +124,7 @@ The command loop runs this soon after @code{post-command-hook} (q.v.).
124@xref{Input Focus}. 124@xref{Input Focus}.
125 125
126@item delete-frame-functions 126@item delete-frame-functions
127@itemx after-delete-frame-functions
127@xref{Deleting Frames}. 128@xref{Deleting Frames}.
128 129
129@item delete-terminal-functions 130@item delete-terminal-functions
diff --git a/etc/NEWS b/etc/NEWS
index 52cedc4d401..50433eb7f28 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -590,26 +590,26 @@ manual for more details.
590* Lisp Changes in Emacs 27.1 590* Lisp Changes in Emacs 27.1
591 591
592+++ 592+++
593** New hook `after-delete-frame-functions'. Works like 593** New hook 'after-delete-frame-functions'.
594 `delete-frame-functions', but runs after the frame to be deleted 594This works like 'delete-frame-functions', but runs after the frame to
595 has been made dead and removed from the frame list, simplifying 595be deleted has been made dead and removed from the frame list.
596 some kinds of code.
597 596
598+++ 597+++
599** New focus state inspection interface: `focus-in-hook' and 598** New frame focus state inspection interface.
600 `focus-out-hook' are marked obsolete. Instead, attach to 599The hooks 'focus-in-hook' and 'focus-out-hook' are now obsolete.
601 `after-focus-change-function' using `add-function' and inspect the 600Instead, attach to 'after-focus-change-function' using 'add-function'
602 focus state of each frame using `frame-focus-state'. 601and inspect the focus state of each frame using 'frame-focus-state'.
603 602
604+++ 603+++
605** Emacs now requests and recognizes focus-change notifications from 604** Emacs now requests and recognizes focus-change notifications from TTYs.
606 terminals that support the feature, meaning that `focus-in-hook' 605On terminal emulators that support the feature, Emacs can now support
607 and `focus-out-hook' may run for TTY frames. 606'focus-in-hook' and 'focus-out-hook' for TTY frames.
608 607
609+++ 608+++
610** Face specifications (of the kind used in `face-remapping-alist') 609** Window-specific face remapping.
611 now support filters, allowing faces to vary between windows display 610Face specifications (of the kind used in 'face-remapping-alist')
612 the same buffer. 611now support filters, allowing faces to vary between different windows
612displaying the same buffer.
613 613
614+++ 614+++
615** New function assoc-delete-all. 615** New function assoc-delete-all.
@@ -634,7 +634,7 @@ backslash. For example:
634** Omitting variables after '&optional' and '&rest' is now allowed. 634** Omitting variables after '&optional' and '&rest' is now allowed.
635For example (defun foo (&optional)) is no longer an error. This is 635For example (defun foo (&optional)) is no longer an error. This is
636sometimes convenient when writing macros. See the ChangeLog entry 636sometimes convenient when writing macros. See the ChangeLog entry
637titled "Allow `&rest' or `&optional' without following variable 637titled "Allow '&rest' or '&optional' without following variable
638(Bug#29165)" for a full listing of which arglists are accepted across 638(Bug#29165)" for a full listing of which arglists are accepted across
639versions. 639versions.
640 640
diff --git a/lisp/frame.el b/lisp/frame.el
index 38f785901e7..7dbd346bd91 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -131,9 +131,10 @@ appended when the minibuffer frame is created."
131 131
132(defun frame-focus-state (&optional frame) 132(defun frame-focus-state (&optional frame)
133 "Return FRAME's last known focus state. 133 "Return FRAME's last known focus state.
134If nil or omitted, FRAME defaults to the selected frame.
135
134Return nil if the frame is definitely known not be focused, t if 136Return nil if the frame is definitely known not be focused, t if
135the frame is known to be focused, and 'unknown if we don't know. If 137the frame is known to be focused, and `unknown' if we don't know."
136FRAME is nil, query the selected frame."
137 (let* ((frame (or frame (selected-frame))) 138 (let* ((frame (or frame (selected-frame)))
138 (tty-top-frame (tty-top-frame frame))) 139 (tty-top-frame (tty-top-frame frame)))
139 (if (not tty-top-frame) 140 (if (not tty-top-frame)
diff --git a/src/keyboard.c b/src/keyboard.c
index 0d6a6ad56b8..12fc33787a3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6605,8 +6605,8 @@ has the same base event type and all the specified modifiers. */)
6605 6605
6606DEFUN ("internal-handle-focus-in", Finternal_handle_focus_in, 6606DEFUN ("internal-handle-focus-in", Finternal_handle_focus_in,
6607 Sinternal_handle_focus_in, 1, 1, 0, 6607 Sinternal_handle_focus_in, 1, 1, 0,
6608 doc: /* Internally handle focus-in events, possibly generating 6608 doc: /* Internally handle focus-in events.
6609an artifical switch-frame event. */) 6609This function potentially generates an artifical switch-frame event. */)
6610 (Lisp_Object event) 6610 (Lisp_Object event)
6611{ 6611{
6612 Lisp_Object frame; 6612 Lisp_Object frame;
@@ -6616,9 +6616,9 @@ an artifical switch-frame event. */)
6616 error ("invalid focus-in event"); 6616 error ("invalid focus-in event");
6617 6617
6618 /* Conceptually, the concept of window manager focus on a particular 6618 /* Conceptually, the concept of window manager focus on a particular
6619 frame and the Emacs selected frame shouldn't be related, but for a 6619 frame and the Emacs selected frame shouldn't be related, but for
6620 long time, we automatically switched the selected frame in response 6620 a long time, we automatically switched the selected frame in
6621 to focus events, so let's keep doing that. */ 6621 response to focus events, so let's keep doing that. */
6622 bool switching = (!EQ (frame, internal_last_event_frame) 6622 bool switching = (!EQ (frame, internal_last_event_frame)
6623 && !EQ (frame, selected_frame)); 6623 && !EQ (frame, selected_frame));
6624 internal_last_event_frame = frame; 6624 internal_last_event_frame = frame;