Browse Source

org.el: Fix bug when matching the face property before following a link.

* org.el (org-return): Fix bug when matching the face property
before following a link.

Thanks to Paul Sexton for the analysis and the fix.
Bastien Guerry 7 years ago
parent
commit
6da350bf06
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -18287,8 +18287,9 @@ See the individual commands for more information."
 	    (org-indent-line-function)
 	  (org-indent-line-to ind)))))
    ((and org-return-follows-link
-	 (or (eq (get-text-property (point) 'face) 'org-link)
-	     (memq 'org-link (get-text-property (point) 'face))))
+         (let ((tprop (get-text-property (point) 'face)))
+	   (or (eq tprop 'org-link)
+	       (and (listp tprop) (memq 'org-link tprop)))))
     (call-interactively 'org-open-at-point))
    ((and (org-at-heading-p)
 	 (looking-at