summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-07-30 09:14:38 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2011-07-30 09:32:03 +0200
commit8c6c6a4f3d66b39c06f8ac6dfb1e2af0111da098 (patch)
treea08dbb05bf60ef1c5fe360de7c2d947a1dc3c3d3
parent226f8c873d629cc95295df7c27336b1b92da3863 (diff)
downloadorg-mode-8c6c6a4f3d66b39c06f8ac6dfb1e2af0111da098.tar.gz
Rename `org-in-regexps-block-p' to `org-between-regexps-p'
* lisp/org.el (org-between-regexps-p): previous name implied the function was related to blocks, which isn't mandatory. (org-narrow-to-block, org-in-block-p, org-indent-line-function): applied the rename. * lisp/ob-exp.el (org-babel-in-example-or-verbatim): applied rename. Also removed a white space.
-rw-r--r--lisp/ob-exp.el4
-rw-r--r--lisp/org.el8
2 files changed, 6 insertions, 6 deletions
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 9f60b85..15a8bba 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -166,13 +166,13 @@ has taken place."
Example and verbatim code include escaped portions of
an org-mode buffer code that should be treated as normal
org-mode text."
- (or (org-in-indented-comment-line)
+ (or (org-in-indented-comment-line)
(save-match-data
(save-excursion
(goto-char (point-at-bol))
(looking-at "[ \t]*:[ \t]")))
(org-in-verbatim-emphasis)
- (org-in-regexps-block-p "^[ \t]*#\\+begin_src" "^[ \t]*#\\+end_src")))
+ (org-between-regexps-p "^[ \t]*#\\+begin_src" "^[ \t]*#\\+end_src")))
(defvar org-babel-default-lob-header-args)
(defun org-babel-exp-lob-one-liners (start end)
diff --git a/lisp/org.el b/lisp/org.el
index dc84a0b..c7b28dd 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -7671,7 +7671,7 @@ If yes, remember the marker and the distance to BEG."
"Narrow buffer to the current block."
(interactive)
(let* ((case-fold-search t)
- (blockp (org-in-regexps-block-p "^[ \t]*#\\+begin_.*"
+ (blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*"
"^[ \t]*#\\+end_.*")))
(if blockp
(narrow-to-region (car blockp) (cdr blockp))
@@ -19061,7 +19061,7 @@ really on, so that the block visually is on the match."
(throw 'exit t)))
nil))))
-(defun org-in-regexps-block-p (start-re end-re &optional lim-up lim-down)
+(defun org-between-regexps-p (start-re end-re &optional lim-up lim-down)
"Non-nil when point is between matches of START-RE and END-RE.
Also return a non-nil value when point is on one of the matches.
@@ -19104,7 +19104,7 @@ NAMES is a list of strings containing names of blocks."
(lim-down (save-excursion (outline-next-heading))))
(mapc (lambda (name)
(let ((n (regexp-quote name)))
- (when (org-in-regexps-block-p
+ (when (org-between-regexps-p
(concat "^[ \t]*#\\+begin_" n)
(concat "^[ \t]*#\\+end_" n)
lim-up lim-down)
@@ -19449,7 +19449,7 @@ If point is in an inline task, mark that task instead."
(concat "^[ \t]*#\\+begin_" (downcase (match-string 1))) nil t)))
(setq column (org-get-indentation (match-string 0))))
((and (not (looking-at "[ \t]*#\\+begin_"))
- (org-in-regexps-block-p "^[ \t]*#\\+begin_" "[ \t]*#\\+end_"))
+ (org-between-regexps-p "^[ \t]*#\\+begin_" "[ \t]*#\\+end_"))
(save-excursion
(re-search-backward "^[ \t]*#\\+begin_\\([a-z]+\\)" nil t))
(setq column