branch: externals/svg-tag-mode commit 81cb79335c06a7320db7f534daf0b3c5ec82b09c Author: Nicolas P. Rougier <nicolas.roug...@inria.fr> Commit: Nicolas P. Rougier <nicolas.roug...@inria.fr>
Added installation instructions --- README.org | 14 +++++++++++++- example.el | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 8775f518de..33c8df51cf 100644 --- a/README.org +++ b/README.org @@ -1,6 +1,18 @@ -*** SVG tag minor mode +** SVG tag minor mode (Emacs) A small minor mode to replace keywords or regular expression with SVG rounded box labels. See [[file:/example.el][example.el]] for example usage. +*** Installation + +#+begin_src elisp +(quelpa '(svg-tag-mode :repo "rougier/svg-tag-mode" + :fetcher github + :files ("svg-tag-mode.el"))) +#+end_src + +*** Demonstration + +Open [[file:/example.el][example.el]] and evaluate buffer + [[./screenshot.png]] diff --git a/example.el b/example.el index cc4c1343dc..51dcf098d3 100644 --- a/example.el +++ b/example.el @@ -14,6 +14,8 @@ ;; For a full copy of the GNU General Public License ;; see <http://www.gnu.org/licenses/>. +(require 'svg-tag-mode) + (defface svg-tag-note-face '((t :foreground "black" :background "white" :box "black" :family "Roboto Mono" :weight light :height 120)) @@ -42,6 +44,8 @@ ("\\(=[0-9a-zA-Z- ]+?=\\)" 1 `(face nil display ,(svg-tag-keyboard (match-string 0)))))) +(svg-tag-mode 1) + ;; A tag function using SVG to display a rounded box with outer and inner ;; padding and a controllable box radius. The resulting SVG is perfectly ;; aligned with regular text such that a =TAG= can be inserted and edited