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

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

[nongnu] elpa/xah-fly-keys 1b9c07644d: xah-delete-backward-char-or-brack


From: ELPA Syncer
Subject: [nongnu] elpa/xah-fly-keys 1b9c07644d: xah-delete-backward-char-or-bracket-text hack fix a bug. this is a mess to be figured out later. problem is, elisp syntax-ppss can't tell comment when at beginning of a 2 char comment.
Date: Tue, 28 Jun 2022 16:59:04 -0400 (EDT)

branch: elpa/xah-fly-keys
commit 1b9c07644d796add7113521e63fc1a1525d11719
Author: Xah Lee <xah@xahlee.org>
Commit: Xah Lee <xah@xahlee.org>

    xah-delete-backward-char-or-bracket-text hack fix a bug. this is a mess to 
be figured out later. problem is, elisp syntax-ppss can't tell comment when at 
beginning of a 2 char comment.
---
 xah-fly-keys.el | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index e8d5b8c3c6..568b6dced4 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee <xah@xahlee.org>
-;; Version: 17.15.20220627044859
+;; Version: 17.15.20220628130211
 ;; Created: 10 Sep 2013
 ;; Package-Requires: ((emacs "24.1"))
 ;; Keywords: convenience, emulations, vim, ergoemacs
@@ -633,26 +633,30 @@ Version: 2017-07-02 2022-06-23"
       (delete-region (region-beginning) (region-end))
     (cond
      ((looking-back "\\s)" 1)
-      (let ($isComment ($p0 (point)))
-        (backward-char)
-        (setq $isComment (nth 4 (syntax-ppss)))
-        (goto-char $p0)
-        (if $isComment
-            (if (forward-comment -1)
-                (kill-region (point) $p0)
-              (message "error GSNN2:parsing comment failed."))
+      (if (string-equal major-mode "xah-wolfram-mode")
+          (let ($isComment ($p0 (point)))
+            (backward-char)
+            (setq $isComment (nth 4 (syntax-ppss)))
+            (goto-char $p0)
+            (if $isComment
+                (if (forward-comment -1)
+                    (kill-region (point) $p0)
+                  (message "error GSNN2:parsing comment failed."))
+              (if current-prefix-arg
+                  (xah-delete-backward-bracket-pair)
+                (xah-delete-backward-bracket-text))))
+        (progn
           (if current-prefix-arg
               (xah-delete-backward-bracket-pair)
             (xah-delete-backward-bracket-text)))))
      ((looking-back "\\s(" 1)
       (message "left of cursor is opening bracket")
       (let ($pOpenBracketLeft
-            ($pOpenBracketRight (point)) $p1 $isComment)
+            ($pOpenBracketRight (point)) $isComment)
         (backward-char)
         (setq $pOpenBracketLeft (point))
         (goto-char $pOpenBracketRight)
         (forward-char)
-        (setq $p1 (point))
         (setq $isComment (nth 4 (syntax-ppss)))
         (if $isComment
             (progn



reply via email to

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