chiark / gitweb /
el/dot-emacs.el: Advice to fix `markdown-mode' to preserve match data.
[profile] / el / dot-emacs.el
index 2fb1520d6fd390ce7299018b939ae9f3155a6674..d657295da6c66160aceb1beb84af4068ab5f1d51 100644 (file)
@@ -226,6 +226,13 @@ (defmacro mdw-advise-to-inhibit-raise-frame (function)
 
 (mdw-advise-to-inhibit-raise-frame select-frame-set-input-focus)
 
+;; Bug fix for markdown-mode, which breaks point positioning during
+;; `query-replace'.
+(defadvice markdown-check-change-for-wiki-link
+    (around mdw-save-match activate compile)
+  "Save match data around the `markdown-mode' `after-change-functions' hook."
+  (save-match-data ad-do-it))
+
 ;; Transient mark mode hacks.
 
 (defadvice exchange-point-and-mark