diff options
-rw-r--r-- | lib/bufhist.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/bufhist.el b/lib/bufhist.el index 34de7317..67941b7f 100644 --- a/lib/bufhist.el +++ b/lib/bufhist.el @@ -293,12 +293,21 @@ Commands:\\<bufhist-minor-mode-map> \\[bufhist-last] bufhist-last go to last (current) item in history. \\[bufhist-clear] bufhist-clear clear history. \\[bufhist-delete] bufhist-clear delete current item from history." - nil "" bufhist-minor-mode-map - :group 'bufhist + nil "" bufhist-minor-mode-map) + +; For newer versions of define-minor-mode we can use extra +; args above instead of hook function below: +; :group 'bufhist +; (if bufhist-mode +; (bufhist-init) +; (bufhist-exit))) +; This doesn't work, e.g. with XEmacs 21.4.15. + +(defun bufhist-toggle-fn () (if bufhist-mode (bufhist-init) (bufhist-exit))) - +(add-hook 'bufhist-mode-hook 'bufhist-toggle-fn) (provide 'bufhist) |