# HG changeset patch # User Oleksandr Gavenko # Date 1485465221 -7200 # Node ID 73abbe6d4bd31686be20b5f2ad7cecd456dc16bf # Parent 4679b9e75798c2c80dbddf583f48e9c1d51b6e74 Hide headline on disable. Expose headline enable/disable function as interactive. diff -r 4679b9e75798 -r 73abbe6d4bd3 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))