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

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

[nongnu] elpa/scad-mode 53aba7b6e9 09/47: Fix and simplify completion-at


From: ELPA Syncer
Subject: [nongnu] elpa/scad-mode 53aba7b6e9 09/47: Fix and simplify completion-at-point-function
Date: Sat, 12 Nov 2022 13:59:34 -0500 (EST)

branch: elpa/scad-mode
commit 53aba7b6e96be30a0b9f4783b5c688e71c7962b8
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Fix and simplify completion-at-point-function
    
    - Use when-let
    - 'no must be a symbol
---
 scad-mode.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/scad-mode.el b/scad-mode.el
index 47ec18649c..364ed3c422 100644
--- a/scad-mode.el
+++ b/scad-mode.el
@@ -224,11 +224,10 @@ Key bindings:
 
 (defun scad-completion-at-point ()
   "Completion at point function."
-  (let ((bounds (bounds-of-thing-at-point 'word)))
-    (when bounds
-      (list (car bounds) (cdr bounds)
-            scad-completions
-            :exclusive "no"))))
+  (when-let (bounds (bounds-of-thing-at-point 'word))
+    (list (car bounds) (cdr bounds)
+          scad-completions
+          :exclusive 'no)))
 
 (defun scad-open-current-buffer ()
   "Open current buffer with `scad-command'."



reply via email to

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