branch: externals/phps-mode
commit 1bb2af276e29022c1f8be47e105d72afa34d21e2
Author: Christian Johansson <christ...@cvj.se>
Commit: Christian Johansson <christ...@cvj.se>

    Started on support for narrow-to-defun
---
 phps-mode.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/phps-mode.el b/phps-mode.el
index 6c681d3e41..c40503b025 100644
--- a/phps-mode.el
+++ b/phps-mode.el
@@ -52,7 +52,7 @@
 (require 'phps-mode-syntax-table)
 
 (defvar phps-mode-idle-interval 1
-  "Idle seconds before running the incremental lexer.")
+  "Idle seconds before running the incremental parser.")
 
 (defvar phps-mode-use-psr-2 t
   "Whether to use PSR-2 guidelines for white-space or not.")
@@ -206,6 +206,14 @@
    imenu-create-index-function
    #'phps-mode-lex-analyzer--imenu-create-index)
 
+  ;; Beginning and ending of defun:s
+  (setq-local
+   beginning-of-defun-function
+   #'phps-mode-lex-analyzer--beginning-of-defun)
+  (setq-local
+   end-of-defun-function
+   #'phps-mode-lex-analyzer--end-of-defun)
+
   ;; Should we follow PSR-2?
   (when phps-mode-use-psr-2
 

Reply via email to