branch: externals/realgud
commit 2bf62ee99f8f25a0870860bedb147f9f9705725f
Author: rocky <[email protected]>
Commit: rocky <[email protected]>
Better Emacs compatibility
---
test/bt-helper.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/bt-helper.el b/test/bt-helper.el
index 4f30b39..5ae0a2a 100644
--- a/test/bt-helper.el
+++ b/test/bt-helper.el
@@ -12,7 +12,10 @@
(defvar temp-cmdbuf)
(defvar temp-bt)
(defvar realgud-pat-hash)
-)
+ )
+
+(if (or (<= emacs-major-version 24))
+ (defalias 'font-lock-ensure 'font-lock-fontify-buffer))
(defun setup-bt-vars(debugger-name)
"Sets up globals temp-cmdbuf and temp-bt with command buffer
@@ -38,7 +41,8 @@ for DEBUGGER-NAME and initializes it to STRING"
(goto-char (point-min))
(setq buffer-read-only nil)
(insert string)
- (font-lock-fontify-buffer) ;; 24 doesn't have (font-lock-ensure)
+ (message "%s" emacs-version)
+ (font-lock-ensure)
;; Newer emacs's use:
(goto-char (point-min))
)