Change hash(method) to algo(rithm)

To keep terminology in line with the internal workings of DisPass,
hash(method) should be replaced by algo or algorithm, depending on the
situation.
This commit is contained in:
Tom Willemsen 2013-01-08 00:40:32 +01:00
parent 0a8d1b6163
commit 322d83f441

View file

@ -136,7 +136,7 @@ an eye out for LABEL."
nil t) nil t)
(let ((label (match-string 1)) (let ((label (match-string 1))
(length (match-string 2)) (length (match-string 2))
(hashmethod (match-string 3))) (algo (match-string 3)))
(add-to-list 'result (add-to-list 'result
(list label (list label
`[(,label `[(,label
@ -147,7 +147,7 @@ an eye out for LABEL."
dispass-length ,length dispass-length ,length
action dispass-from-button) action dispass-from-button)
,length ,length
,hashmethod]))))) ,algo])))))
result)) result))
;;;###autoload ;;;###autoload
@ -170,8 +170,8 @@ an eye out for LABEL."
;; Labels management ;; Labels management
;;;###autoload ;;;###autoload
(defun dispass-add-label (label length hashtype) (defun dispass-add-label (label length algo)
"Add LABEL with length LENGTH and hashtype HASHTYPE to DisPass." "Add LABEL with length LENGTH and algorithm ALGO to DisPass."
(interactive (interactive
(list (read-from-minibuffer "Label: ") (list (read-from-minibuffer "Label: ")
(read-from-minibuffer (read-from-minibuffer
@ -180,8 +180,7 @@ an eye out for LABEL."
(symbol-name (read-from-minibuffer (symbol-name (read-from-minibuffer
"Algorithm (dispass1): " nil nil t nil "dispass1")))) "Algorithm (dispass1): " nil nil t nil "dispass1"))))
(shell-command (shell-command
(format "%s --add %s:%d:%s" dispass-labels-executable label length (format "%s --add %s:%d:%s" dispass-labels-executable label length algo)))
hashtype)))
;;;###autoload ;;;###autoload
(defun dispass-remove-label (label) (defun dispass-remove-label (label)
@ -217,7 +216,7 @@ thrown."
\\{dispass-labels-mode-map}" \\{dispass-labels-mode-map}"
(setq tabulated-list-format [("Label" 30 t) (setq tabulated-list-format [("Label" 30 t)
("Length" 6 nil) ("Length" 6 nil)
("Hash" 0 t)] ("Algorithm" 0 t)]
tabulated-list-sort-key '("Label" . nil)) tabulated-list-sort-key '("Label" . nil))
(add-hook 'tabulated-list-revert-hook 'dispass-labels--refresh) (add-hook 'tabulated-list-revert-hook 'dispass-labels--refresh)
(tabulated-list-init-header)) (tabulated-list-init-header))