Browse Source

Quoting: Make =http:a.b.com= work as a quoted string.

Carsten Dominik 16 years ago
parent
commit
538a536d0d
3 changed files with 10 additions and 1 deletions
  1. 4 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-exp.el
  3. 5 0
      lisp/org-macs.el

+ 4 - 0
lisp/ChangeLog

@@ -1,5 +1,9 @@
 2009-02-17  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp.el (org-export-normalize-links): Use new macro.
+
+	* org-macs.el (org-if-unprotected-at): New macro.
+
 	* org-agenda.el (org-agenda-show): Allow numerical prefix
 	arguments to specify how much context should be shown.
 	(org-agenda-cycle-show): New command, could be bound to SPC in

+ 1 - 1
lisp/org-exp.el

@@ -2050,7 +2050,7 @@ When it is nil, all comments will be removed."
     (goto-char (point-min))
     (while (re-search-forward re-plain-link nil t)
       (goto-char (1- (match-end 0)))
-      (org-if-unprotected
+      (org-if-unprotected-at (1+ (match-beginning 0))
        (let* ((s (concat (match-string 1) "[[" (match-string 2)
 			 ":" (match-string 3) "]]")))
 	 ;; added 'org-link face to links

+ 5 - 0
lisp/org-macs.el

@@ -110,6 +110,11 @@ We use a macro so that the test can happen at compilation time."
   `(unless (get-text-property (1- (point)) 'org-protected)
      ,@body))
 
+(defmacro org-if-unprotected-at (pos &rest body)
+  "Execute BODY if there is no `org-protected' text property at point-1."
+  `(unless (get-text-property ,pos 'org-protected)
+     ,@body))
+
 (defmacro org-with-remote-undo (_buffer &rest _body)
   "Execute BODY while recording undo information in two buffers."
   `(let ((_cline (org-current-line))