;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/misc-incal.el (require 'cl-lib) (defun add-one-shot-hook (hook fun) (let ((name (cl-gensym))) (setf (symbol-function name) (lambda (&rest _) (remove-hook hook name) (funcall fun) )) (add-hook hook name) )) (defalias 'ps #'list-processes) (provide 'misc-incal)