From 4f3b3ce3d9329884e6cb8c7f2a7bc5344b01e36f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 6 Aug 2015 14:57:23 +0200 Subject: [PATCH] Fix a docstring * lisp/org.el (org-get-tag-face): Fix docstring. Small refactoring. --- lisp/org.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b6f1da738..9dde1a1c8 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -6541,13 +6541,13 @@ When FACE-OR-COLOR is not a string, just return it." 'org-priority) 'font-lock-fontified t))))) -(defun org-get-tag-face (kwd) - "Get the right face for a TODO keyword KWD. -If KWD is a number, get the corresponding match group." - (if (numberp kwd) (setq kwd (match-string kwd))) - (or (org-face-from-face-or-color - 'tag 'org-tag (cdr (assoc kwd org-tag-faces))) - 'org-tag)) +(defun org-get-tag-face (tag) + "Get the right face for TAG. +If TAG is a number, get the corresponding match group." + (let ((tag (if (wholenump tag) (match-string tag) tag))) + (or (org-face-from-face-or-color + 'tag 'org-tag (cdr (assoc kwd org-tag-faces))) + 'org-tag))) (defun org-unfontify-region (beg end &optional maybe_loudly) "Remove fontification and activation overlays from links."