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.
This commit is contained in:
Nicolas Goaziou 2011-07-30 09:14:38 +02:00
parent 226f8c873d
commit 8c6c6a4f3d
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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