branch: elpa/scad-mode
commit 53aba7b6e96be30a0b9f4783b5c688e71c7962b8
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
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'."