rolandwalker / button-lock

clickable text in Emacs
42 stars 6 forks source link

Why (global-button-lock-mode 1) not work? #11

Closed snowman closed 5 years ago

snowman commented 5 years ago
(setq url-button (button-lock-set-button
                  "hello"
                  'browse-url-at-mouse
                  :face 'link :face-policy 'prepend))

Not work with (global-button-lock-mode 1) But work with (button-lock-mode 1) in *scratch* buffer

snowman commented 5 years ago
(button-lock-set-button
 "DEV-[0-9]+"
 (lambda ()
   (interactive)
   (browse-url (concat "http://jira/browse/"
                       (buffer-substring
                        (previous-single-property-change (point) 'mouse-face)
                        (next-single-property-change (point) 'mouse-face)))))
 :face (list 'org-link))