Skip to content

Commit

Permalink
really shut up ert now
Browse files Browse the repository at this point in the history
  • Loading branch information
wyuenho committed Dec 7, 2024
1 parent 2d9f490 commit c827f45
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
17 changes: 0 additions & 17 deletions test/test-helper.el
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,6 @@
Set the value of this variable at the beginning of each test that uses
it.")

(unless (fboundp 'hash-table-keys)
(defun hash-table-keys (hash-table)
"Return a list of keys in HASH-TABLE."
(let (result)
(maphash (lambda (key value)
(setq result (append (list key) result)))
hash-table)
result))

(defun hash-table-values (hash-table)
"Return a list of values in HASH-TABLE."
(let (result)
(maphash (lambda (key value)
(setq result (append (list value) result)))
hash-table)
result)))

(defmacro purpose-with-empty-config (&rest body)
(declare (indent defun) (debug body))
`(let ((purpose--user-mode-purposes (make-hash-table))
Expand Down
3 changes: 1 addition & 2 deletions window-purpose-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ mode and MODE-CONF.
MODE-CONF is a hash table mapping modes to purposes."
(when (get-buffer buffer-or-name) ; check if buffer exists
(let* ((major-mode (purpose--buffer-major-mode buffer-or-name))
(derived-modes (purpose--iter-hash (lambda (mode &optional _) mode)
mode-conf))
(derived-modes (hash-table-keys mode-conf))
(derived-mode (apply #'derived-mode-p derived-modes)))
(when derived-mode
(gethash derived-mode mode-conf)))))
Expand Down
9 changes: 0 additions & 9 deletions window-purpose-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@ Example:



(defun purpose--iter-hash (function table)
"Like `maphash', but return a list the results of calling FUNCTION
for each entry in hash-table TABLE."
(let (results)
(maphash (lambda (key value)
(push (funcall function key value) results))
table)
results))

;; taken from http://emacs.stackexchange.com/a/7405/6533, credit to Jordon Biondo
(defun purpose--call-stack ()
"Return the current call stack frames."
Expand Down

0 comments on commit c827f45

Please sign in to comment.