summaryrefslogtreecommitdiff
path: root/lisp/org/org-element.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-09-17 16:08:20 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-09-17 16:09:39 -0700
commit284c470ef752967fcd8bae6a450dc138462b1e49 (patch)
tree83e8bcfe4c756e741ee9d4ecdf80f6b8d0e73c91 /lisp/org/org-element.el
parentd149ff5233805c0a09b6067e0cf27549291cc83a (diff)
downloademacs-284c470ef752967fcd8bae6a450dc138462b1e49.tar.gz
Backslash cleanup in Elisp source files
This patch should not change behavior. It typically omits backslashes where they are redundant (e.g., in the string literal "^\$"). In a few places, insert backslashes where they make regular expressions clearer: e.g., replace "^\*" (equivalent to "^*") with "^\\*", which has the same effect as a regular expression. Also, use ‘\ %’ instead of ‘\%’ when avoiding confusion with SCCS IDs, and similarly use ‘\ $’ instead of ‘\$’ when avoiding confusion with RCS IDs, as that makes it clearer that the backslash is intended.
Diffstat (limited to 'lisp/org/org-element.el')
-rw-r--r--lisp/org/org-element.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index 573d7eeca2d..9f4cfa3ec66 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -4141,30 +4141,30 @@ Assuming TREE is a variable containing an Org buffer parse tree,
the following example will return a flat list of all `src-block'
and `example-block' elements in it:
- \(org-element-map tree \\='(example-block src-block) \\='identity)
+ (org-element-map tree \\='(example-block src-block) \\='identity)
The following snippet will find the first headline with a level
of 1 and a \"phone\" tag, and will return its beginning position:
- \(org-element-map tree \\='headline
- \(lambda (hl)
- \(and (= (org-element-property :level hl) 1)
- \(member \"phone\" (org-element-property :tags hl))
- \(org-element-property :begin hl)))
+ (org-element-map tree \\='headline
+ (lambda (hl)
+ (and (= (org-element-property :level hl) 1)
+ (member \"phone\" (org-element-property :tags hl))
+ (org-element-property :begin hl)))
nil t)
The next example will return a flat list of all `plain-list' type
elements in TREE that are not a sub-list themselves:
- \(org-element-map tree \\='plain-list \\='identity nil nil \\='plain-list)
+ (org-element-map tree \\='plain-list \\='identity nil nil \\='plain-list)
Eventually, this example will return a flat list of all `bold'
type objects containing a `latex-snippet' type object, even
looking into captions:
- \(org-element-map tree \\='bold
- \(lambda (b)
- \(and (org-element-map b \\='latex-snippet \\='identity nil t) b))
+ (org-element-map tree \\='bold
+ (lambda (b)
+ (and (org-element-map b \\='latex-snippet \\='identity nil t) b))
nil nil nil t)"
;; Ensure TYPES and NO-RECURSION are a list, even of one element.
(unless (listp types) (setq types (list types)))