[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode 95e749e 028/405: Started with indentation fun
From: |
Stefan Monnier |
Subject: |
[elpa] externals/phps-mode 95e749e 028/405: Started with indentation function |
Date: |
Sat, 13 Jul 2019 09:59:33 -0400 (EDT) |
branch: externals/phps-mode
commit 95e749e69fbc68b705ade0a453846af47e7fb9ac
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Started with indentation function
---
phps-functions.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/phps-functions.el b/phps-functions.el
index 48aac15..9b8382a 100644
--- a/phps-functions.el
+++ b/phps-functions.el
@@ -38,7 +38,14 @@
(defun phps-mode/indent-line ()
"Indent line."
- )
+ (let ((data (phps-mode/lexer-get-point-data)))
+ (if (nth 0 data)
+ (progn
+ (message "inside scripting %s" data)
+ (indent-line-to (nth 1 data)))
+ (progn
+ (message "Outside scripting %s" data)
+ (indent-relative)))))
(defun phps-mode/indent-region ()
"Indent region."
@@ -47,7 +54,7 @@
(defun phps-mode/functions-init ()
"PHP specific init-cleanup routines."
- ;; (set (make-local-variable 'indent-line-function) #'phps-mode/indent-line)
+ (set (make-local-variable 'indent-line-function) #'phps-mode/indent-line)
;; (set (make-local-variable 'indent-line-function)
#'phps-mode/indent-region)
)
- [elpa] externals/phps-mode 31ca9d5 007/405: More cleaning up, (continued)
- [elpa] externals/phps-mode 31ca9d5 007/405: More cleaning up, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 79040dc 005/405: Some cleaning up, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 394f7ae 017/405: Fixed issue with empty strings before non-empty strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 41c4fbb 009/405: Lexer unit tests now working, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode be078dc 020/405: Updated readme, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode c4a8ca5 016/405: Free lexer tokens does not have properties anymore, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 8ed0716 022/405: Started with unit tests for getting point lexer data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode abcfd01 021/405: Started with function to gather current point data, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 2475734 018/405: Improved logic for single quoted strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 795053b 013/405: Lexer unit tests using start and ends as well, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 95e749e 028/405: Started with indentation function,
Stefan Monnier <=
- [elpa] externals/phps-mode 3202213 025/405: Added another unit test for lexer, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode bf59f0a 023/405: More unit tests for getting point lex information, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode de771b5 019/405: Added more unit tests, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode e3a060a 026/405: Handles script breaking single-line comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 7fa9fdb 024/405: More unit tests for lexing comments and doc comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 64a3ca8 014/405: Modified start and end for single and double quoted strings, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 3ea8c64 003/405: Added license, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode f6e3ce4 027/405: Added another test for comments, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 4fa9341 030/405: Started with unit tests for indentation, Stefan Monnier, 2019/07/13
- [elpa] externals/phps-mode 184dfa5 034/405: Indentation outside PHP now does nothing, Stefan Monnier, 2019/07/13