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

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

[nongnu] elpa/rust-mode 01452f4: Fix rust-electric-pair-skip-self-wrap


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 01452f4: Fix rust-electric-pair-skip-self-wrap
Date: Thu, 16 Dec 2021 15:58:23 -0500 (EST)

branch: elpa/rust-mode
commit 01452f41c15d25b37d0cd3968a04eb397ba2df73
Author: Roy Crihfield <roy@manteia.ltd>
Commit: brotzeit <brotzeitmacher@gmail.com>

    Fix rust-electric-pair-skip-self-wrap
    
    nil is a valid value for electric-pair-skip-self, so handle that case
---
 rust-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust-mode.el b/rust-mode.el
index 8fa31da..c252204 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1277,7 +1277,8 @@ This wraps the default defined by 
`electric-pair-inhibit-predicate'."
 This wraps the default defined by `electric-pair-skip-self'."
   (or
    (= ?> char)
-   (funcall (default-value 'electric-pair-skip-self) char)))
+   (let ((skip-self (default-value 'electric-pair-skip-self)))
+     (and skip-self (funcall skip-self char)))))
 
 (defun rust-ordinary-lt-gt-p ()
   "Test whether the `<' or `>' at point is an ordinary operator of some kind.



reply via email to

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