+;; 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))
+