diff options
| author | Eli Zaretskii | 2018-06-12 19:26:44 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-06-12 19:26:44 +0300 |
| commit | d93ba8ddeb30bca74b306b6e768f6d20416e1802 (patch) | |
| tree | 1bb1716f87e803e8b28218a67e4d891251672f09 | |
| parent | e9c189ccae342c63de2629c5a51d1f40d1a562b6 (diff) | |
| download | emacs-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.texi | 1 | ||||
| -rw-r--r-- | etc/NEWS | 30 | ||||
| -rw-r--r-- | lisp/frame.el | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 10 |
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 |
| @@ -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 | 594 | This works like 'delete-frame-functions', but runs after the frame to |
| 595 | has been made dead and removed from the frame list, simplifying | 595 | be 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 | 599 | The hooks 'focus-in-hook' and 'focus-out-hook' are now obsolete. |
| 601 | `after-focus-change-function' using `add-function' and inspect the | 600 | Instead, attach to 'after-focus-change-function' using 'add-function' |
| 602 | focus state of each frame using `frame-focus-state'. | 601 | and 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' | 605 | On 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 | 610 | Face specifications (of the kind used in 'face-remapping-alist') |
| 612 | the same buffer. | 611 | now support filters, allowing faces to vary between different windows |
| 612 | displaying 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. |
| 635 | For example (defun foo (&optional)) is no longer an error. This is | 635 | For example (defun foo (&optional)) is no longer an error. This is |
| 636 | sometimes convenient when writing macros. See the ChangeLog entry | 636 | sometimes convenient when writing macros. See the ChangeLog entry |
| 637 | titled "Allow `&rest' or `&optional' without following variable | 637 | titled "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 |
| 639 | versions. | 639 | versions. |
| 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. |
| 134 | If nil or omitted, FRAME defaults to the selected frame. | ||
| 135 | |||
| 134 | Return nil if the frame is definitely known not be focused, t if | 136 | Return nil if the frame is definitely known not be focused, t if |
| 135 | the frame is known to be focused, and 'unknown if we don't know. If | 137 | the frame is known to be focused, and `unknown' if we don't know." |
| 136 | FRAME 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 | ||
| 6606 | DEFUN ("internal-handle-focus-in", Finternal_handle_focus_in, | 6606 | DEFUN ("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. |
| 6609 | an artifical switch-frame event. */) | 6609 | This 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; |