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

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

[elpa] externals/phps-mode c11bcc5 360/405: More work on newline advice


From: Stefan Monnier
Subject: [elpa] externals/phps-mode c11bcc5 360/405: More work on newline advice
Date: Sat, 13 Jul 2019 10:00:48 -0400 (EDT)

branch: externals/phps-mode
commit c11bcc5e948ab8712d73f68853e49852e530453d
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    More work on newline advice
---
 phps-mode-functions.el      | 2 +-
 phps-mode-test-functions.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/phps-mode-functions.el b/phps-mode-functions.el
index 5584a67..e91e69a 100644
--- a/phps-mode-functions.el
+++ b/phps-mode-functions.el
@@ -804,11 +804,11 @@
 
 (defun phps-mode-functions-around-newline (old-function &rest arguments)
   "Call OLD-FUNCTION with ARGUMENTS and then shift indexes if the rest of the 
line is just whitespace."
+  (message "Running advice")
   (let ((old-pos (point))
         (new-pos)
         (looking-at-whitespace (looking-at-p "[\ \n\t\r]*\n")))
     (apply old-function arguments)
-    (message "Running advice")
     (if looking-at-whitespace
         (progn
           (setq new-pos (point))
diff --git a/phps-mode-test-functions.el b/phps-mode-test-functions.el
index 4052d76..517614b 100644
--- a/phps-mode-test-functions.el
+++ b/phps-mode-test-functions.el
@@ -863,7 +863,7 @@
    (should (equal (phps-mode-lexer-get-tokens)
                   '((T_OPEN_TAG 1 . 7) (T_VARIABLE 7 . 11) ("=" 12 . 13) 
(T_CONSTANT_ENCAPSED_STRING 14 . 19) (";" 19 . 20) (T_VARIABLE 22 . 27) ("=" 28 
. 29) (T_CONSTANT_ENCAPSED_STRING 30 . 35) (";" 35. 36))))
    (goto-char 21)
-   (newline-and-indent)
+   (newline)
    (should (equal (phps-mode-lexer-get-tokens)
                   '((T_OPEN_TAG 1 . 7) (T_VARIABLE 7 . 11) ("=" 12 . 13) 
(T_CONSTANT_ENCAPSED_STRING 14 . 19) (";" 19 . 20) (T_VARIABLE 23 . 28) ("=" 29 
. 30) (T_CONSTANT_ENCAPSED_STRING 31 . 36) (";" 36. 37))))))
 



reply via email to

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