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

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

[nongnu] elpa/meow 13733e105b: Add meow-next-thing-include-syntax option


From: ELPA Syncer
Subject: [nongnu] elpa/meow 13733e105b: Add meow-next-thing-include-syntax option.
Date: Sun, 3 Nov 2024 13:00:53 -0500 (EST)

branch: elpa/meow
commit 13733e105bcb0d131804ac6ee392cb8622b420f2
Author: DogLooksGood <doglooksgood@hotmail.com>
Commit: DogLooksGood <doglooksgood@hotmail.com>

    Add meow-next-thing-include-syntax option.
---
 meow-command.el | 11 ++++++++---
 meow-var.el     | 10 ++++++++++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/meow-command.el b/meow-command.el
index be870d06bc..448b59dcb0 100644
--- a/meow-command.el
+++ b/meow-command.el
@@ -885,7 +885,12 @@ those in INCLUDE-SYNTAX."
 If N is negative, select to the beginning of the previous Nth thing instead."
   (unless (equal type (cdr (meow--selection-type)))
     (meow--cancel-selection))
-  (unless include-syntax (setq include-syntax "'w_ "))
+  (unless include-syntax
+    (setq include-syntax
+          (let ((thing-include-syntax (alist-get thing 
meow-next-thing-include-syntax)))
+            (if (> n 0)
+                (car thing-include-syntax)
+              (cadr thing-include-syntax)))))
   (let* ((expand (equal (cons 'expand type) (meow--selection-type)))
          (_ (when expand
               (if (< n 0) (meow--direction-backward)
@@ -946,7 +951,7 @@ To select continuous symbols, use following approaches:
 A non-expandable word selection will be created.
 This command works similar to `meow-next-word'."
   (interactive "p")
-  (meow-next-thing meow-word-thing 'word (- n) "_w "))
+  (meow-next-thing meow-word-thing 'word (- n)))
 
 (defun meow-back-symbol (n)
   "Select to the beginning the previous Nth symbol.
@@ -954,7 +959,7 @@ This command works similar to `meow-next-word'."
 A non-expandable word selection will be created.
 This command works similar to `meow-next-symbol'."
   (interactive "p")
-  (meow-next-thing meow-symbol-thing 'symbol (- n) "_w "))
+  (meow-next-thing meow-symbol-thing 'symbol (- n)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; LINE SELECTION
diff --git a/meow-var.el b/meow-var.el
index f86b036a93..e5dc50cdc1 100644
--- a/meow-var.el
+++ b/meow-var.el
@@ -98,6 +98,16 @@ This will affect how selection is displayed."
   :group 'meow
   :type 'number)
 
+(defcustom meow-next-thing-include-syntax
+  '((word " _w" " _w")
+    (symbol " _w" " _w"))
+  "The syntax to include selecting with meow-next-THING.
+
+Each item is a (THING FORWARD_SYNTAX_TO_INCLUDE BACKWARD-SYNTAX_TO_INCLUDE)."
+  :group 'meow
+  :type '(list :key-type (symbol :tag "Thing")
+               :value-type (list string)))
+
 (defcustom meow-expand-hint-counts
   '((word . 30)
     (line . 30)



reply via email to

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