Clean up dispass-labels--refresh
* dispass.el (dispass-labels--refresh): Store information once and reuse.
This commit is contained in:
parent
41e2eb2b80
commit
688bee7ca1
1 changed files with 15 additions and 10 deletions
25
dispass.el
25
dispass.el
|
@ -254,16 +254,21 @@ thrown."
|
||||||
(while (re-search-forward
|
(while (re-search-forward
|
||||||
"\\(\\(?:\\sw\\|\\s_\\)+\\) .*length=\\([0-9]+\\) .*hash=\\(\\sw+\\)$"
|
"\\(\\(?:\\sw\\|\\s_\\)+\\) .*length=\\([0-9]+\\) .*hash=\\(\\sw+\\)$"
|
||||||
nil t)
|
nil t)
|
||||||
(add-to-list 'tmp-list `(,(match-string 1)
|
(let ((label (match-string 1))
|
||||||
[(,(match-string 1)
|
(length (match-string 2))
|
||||||
face link
|
(hashmethod (match-string 3)))
|
||||||
help-echo ,(concat "Generate passphrase for " (match-string 1))
|
(add-to-list 'tmp-list
|
||||||
follow-link t
|
`(,label
|
||||||
dispass-label ,(match-string 1)
|
[(,label
|
||||||
dispass-length ,(match-string 2)
|
face link
|
||||||
action dispass-from-button)
|
help-echo ,(concat "Generate passphrase for "
|
||||||
,(match-string 2)
|
label)
|
||||||
,(match-string 3)]))))
|
follow-link t
|
||||||
|
dispass-label ,label
|
||||||
|
dispass-length ,length
|
||||||
|
action dispass-from-button)
|
||||||
|
,length
|
||||||
|
,hashmethod])))))
|
||||||
(setq tabulated-list-entries tmp-list)))
|
(setq tabulated-list-entries tmp-list)))
|
||||||
|
|
||||||
(define-derived-mode dispass-labels-mode tabulated-list-mode "DisPass"
|
(define-derived-mode dispass-labels-mode tabulated-list-mode "DisPass"
|
||||||
|
|
Loading…
Reference in a new issue