diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2006-12-19 13:53:42 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2006-12-19 13:53:42 +0000 |
commit | 52c011b613b560ff8d6570c816a70e531e6bfbf2 (patch) | |
tree | 2897edee676d656ec73cfdf52ab71b11e0914052 /lib/bufhist.el | |
parent | 10cd6f2061e8c35a6f6cb0a07772cf6dad0de43f (diff) |
Support older version of define-minor-mode
Diffstat (limited to 'lib/bufhist.el')
-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) |