emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 0a9885e 073/177: markup suffixed variable names, eg SUBEXP


From: João Távora
Subject: [elpa] master 0a9885e 073/177: markup suffixed variable names, eg SUBEXPth
Date: Sat, 28 Mar 2015 15:40:58 +0000

branch: master
commit 0a9885eb627303b2841fbd364176ea4811646303
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

    markup suffixed variable names, eg SUBEXPth
---
 doc/yas-doc-helper.el |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/doc/yas-doc-helper.el b/doc/yas-doc-helper.el
index fc3c1b5..d504f67 100755
--- a/doc/yas-doc-helper.el
+++ b/doc/yas-doc-helper.el
@@ -61,17 +61,20 @@
                      (format "*WARNING*: no doc for symbol =%s=" symbol)))
            (case-fold-search nil))
       ;; do some transformations on the body:
-      ;; ARG becomes =arg=
+      ;; ARGxxx becomes @<code>arg@</code>xxx
       ;; FOO becomes /foo/
       ;; `bar' becomes [[#bar][=bar=]]
       (setq body (replace-regexp-in-string
-                  "\\<[A-Z][A-Z-]+\\>"
+                  "\\<\\([A-Z][-A-Z0-9]+\\)\\(\\sw+\\)?\\>"
                   #'(lambda (match)
-                      (setq match (downcase match))
-                      (format (if (member match args)
-                                  "=%s=" "/%s/")
-                              match))
-                  body t)
+                      (let* ((match1 (downcase (match-string 1 match)))
+                             (suffix (match-string 2 match))
+                             (fmt (cond
+                                   ((member match1 args) "@<code>%s@</code>")
+                                   ((null suffix) "/%s/"))))
+                        (if fmt (format fmt match1)
+                          match)))
+                  body t t 1)
             body (replace-regexp-in-string
                   "`\\([a-z-]+\\)'"
                   #'(lambda (match)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]