Hide headline on disable. Expose headline enable/disable function as interactive.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 26 Jan 2017 23:13:41 +0200
changeset 746 73abbe6d4bd3
parent 745 4679b9e75798
child 747 81f299c26e9b
Hide headline on disable. Expose headline enable/disable function as interactive.
contrib/gadict.el
--- a/contrib/gadict.el	Thu Jan 26 23:08:44 2017 +0200
+++ b/contrib/gadict.el	Thu Jan 26 23:13:41 2017 +0200
@@ -87,12 +87,17 @@
 
 (defvar gadict-espeak-headline-timer nil)
 (defun gadict-espeak-headline-enable ()
+  "Enable headline with espeak IPA pronunciation."
+  (interactive)
   (unless gadict-espeak-headline-timer
     (setq gadict-espeak-headline-timer (run-with-idle-timer 1 t #'gadict-espeak-headline-display))))
 (defun gadict-espeak-headline-disable ()
+  "Enable headline with espeak IPA pronunciation."
+  (interactive)
   (when gadict-espeak-headline-timer
     (cancel-timer gadict-espeak-headline-timer))
-  (setq gadict-espeak-headline-timer nil))
+  (setq gadict-espeak-headline-timer nil)
+  (setq header-line-format nil))