Skip to content

Commit

Permalink
add element-region to yafolding-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
zenozeng committed Mar 5, 2017
1 parent 44da0af commit b40fd38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.cask/
.ecukes-failing-scenarios
10 changes: 7 additions & 3 deletions yafolding.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;; Author: Zeno Zeng <[email protected]>
;; keywords: folding
;; Time-stamp: <2016-07-23 16:39:30 Zeno Zeng>
;; Time-stamp: <2017-03-05 10:53:36 Zeno Zeng>
;; Version: 0.3.1


Expand Down Expand Up @@ -155,10 +155,14 @@ If given, toggle all entries that start at INDENT-LEVEL."
(defun yafolding-debug ()
"Show yafolding information of the current position."
(interactive)
(message "indentation: %d, indent level: %d, ingore current line: %s"
(message "indentation: %d, indent level: %d, ingore current line: %s, element-region: %d - %d, (L%d - L%d)"
(yafolding--current-indentation)
(yafolding-get-indent-level)
(yafolding-should-ignore-current-line-p)))
(yafolding-should-ignore-current-line-p)
(car (yafolding-get-element-region))
(car (cdr (yafolding-get-element-region)))
(line-number-at-pos (car (yafolding-get-element-region)))
(line-number-at-pos (car (cdr (yafolding-get-element-region))))))

(defun yafolding-get-element-region ()
"Get '(beg end) of current element."
Expand Down

0 comments on commit b40fd38

Please sign in to comment.