emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/posframe c07d5fd089 1/3: Check non-nullity of the buffe


From: ELPA Syncer
Subject: [elpa] externals/posframe c07d5fd089 1/3: Check non-nullity of the buffer
Date: Mon, 24 Jan 2022 04:58:05 -0500 (EST)

branch: externals/posframe
commit c07d5fd089161e6c8a8cd1d5ed571e60263b68ce
Author: Akira Komamura <akira.komamura@gmail.com>
Commit: Akira Komamura <akira.komamura@gmail.com>

    Check non-nullity of the buffer
    
    If BUFFER-OR-NAME is string and the buffer is nil,
    `posframe--find-existing-posframe' can return a buffer that has no
    `posframe-buffer' value.
    
    Thus it is necessary to check the value of buffer first.
---
 posframe.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index e29cc3ba54..ffd3f818cc 100644
--- a/posframe.el
+++ b/posframe.el
@@ -1003,7 +1003,8 @@ posframe is very very slowly, `posframe-hide' is more 
useful."
   "Delete posframe pertaining to BUFFER-OR-NAME.
 BUFFER-OR-NAME can be a buffer or a buffer name."
   (let* ((buffer (get-buffer buffer-or-name))
-         (posframe (posframe--find-existing-posframe buffer))
+         (posframe (when buffer
+                     (posframe--find-existing-posframe buffer)))
          ;; NOTE: `delete-frame' runs ‘delete-frame-functions’ before
          ;; actually deleting the frame, unless the frame is a
          ;; tooltip, posframe is a child-frame, but its function like



reply via email to

[Prev in Thread] Current Thread [Next in Thread]