branch: externals-release/ement
commit ba6688c0e3bbbb14f780fc9ce60fb509131b798a
Author: Adam Porter <[email protected]>
Commit: Adam Porter <[email protected]>

    Fix: (ement--savehist-save-hook) Non-symbol commands in command-history
    
    Fixes #330.  Thanks to Alex Bennée (@stsquad) for reporting.
---
 README.org | 1 +
 ement.el   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 3b01d0cf11..317018f932 100644
--- a/README.org
+++ b/README.org
@@ -314,6 +314,7 @@ Ement.el doesn't support encrypted rooms natively, but it 
can be used transparen
 
 + Call ~eww-browse-url~ instead of ~browse-url~ in ~ement-room-browse-mxc~ 
(because the latter is not useful for authenticated media if the user has 
configured it to use a different browser).  
([[https://github.com/alphapapa/ement.el/pull/323][#323]].  Thanks to 
[[https://github.com/viiru-][Arto Jantunen]].)
 + Workaround change in ~magit-section~ that broke fontification in room-list 
and directory buffers.  (See 
[[https://github.com/alphapapa/ement.el/issues/331][#331]].)
++ Handle non-symbol commands in ~command-history~.  
([[https://github.com/alphapapa/ement.el/issues/330][#330]].  Thanks to 
[[https://github.com/stsquad][Alex Bennée]] for reporting.)
 
 ** 0.16
 
diff --git a/ement.el b/ement.el
index 23a162c1a8..e188c369e2 100644
--- a/ement.el
+++ b/ement.el
@@ -1095,7 +1095,8 @@ interactive arguments passed to the command, which in our 
case
 includes large data structures that should never be persisted!"
     (setf command-history
           (cl-remove-if (pcase-lambda (`(,command . ,_))
-                          (string-match-p (rx bos "ement-") (symbol-name 
command)))
+                          (cl-typecase command
+                            (symbol (string-match-p (rx bos "ement-") 
(symbol-name command)))))
                         command-history)))
   (cl-pushnew 'ement--savehist-save-hook savehist-save-hook))
 

Reply via email to