Make live-preview hook and kill-buffer-hooks buffer-local
commit002680d1123a83174f0fdab39d9ea82314c179a3
authorDanny McClanahan <danieldmcclanahan@gmail.com>
Tue, 5 Jan 2016 21:18:11 +0000 (5 16:18 -0500)
committerJason Blevins <jrblevin@sdf.org>
Tue, 5 Jan 2016 22:55:36 +0000 (5 17:55 -0500)
tree4700af09000100156ac4acb250845e806c721df0
parent037ccec16f20f60455e95a02080aa2b93ccb50c3
Make live-preview hook and kill-buffer-hooks buffer-local

Take global hooks and make them buffer-local.
markdown-live-preview-remove-on-kill applies to both the Markdown buffers and
the buffers used to preview the export, so it needs to be re-added in two
places, where the export-viewing buffer is created, and when markdown-mode is
turned on.

The test test-markdown-ext/live-preview-exports adequately covers whether
these hooks run.

[jrblevin@sdf.org: Squashed two commits and rebased.
Added GH-63 PR text to commit message for reference.]

Signed-off-by: Jason Blevins <jrblevin@sdf.org>
markdown-mode.el