emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 8579025 04/11: Remove delay-mode-hooks from ggtags-fontify


From: Leo Liu
Subject: [elpa] master 8579025 04/11: Remove delay-mode-hooks from ggtags-fontify-code
Date: Wed, 25 Jul 2018 12:34:46 -0400 (EDT)

branch: master
commit 8579025b9b89c53221c6c608b92a85734ffb0116
Author: Leo Liu <address@hidden>
Commit: Leo Liu <address@hidden>

    Remove delay-mode-hooks from ggtags-fontify-code
    
    which may interact badly with jit-lock-after-change causing eldoc to
    throw errors such as: eldoc error: (args-out-of-range 1 36).
---
 ggtags.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ggtags.el b/ggtags.el
index c9e79e7..b3ab1f6 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1,6 +1,6 @@
 ;;; ggtags.el --- emacs frontend to GNU Global source code tagging system  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2013-2016  Free Software Foundation, Inc.
+;; Copyright (C) 2013-2017  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
 ;; Version: 0.8.13
@@ -2053,17 +2053,17 @@ When finished invoke CALLBACK in BUFFER with process 
exit status."
     (string (cl-labels ((prepare-buffer ()
                           (with-current-buffer
                               (get-buffer-create " *Code-Fontify*")
-                            (delay-mode-hooks (funcall mode))
+                            (let ((inhibit-read-only t))
+                              (erase-buffer))
+                            (funcall mode)
                             (setq font-lock-mode t)
                             (funcall font-lock-function font-lock-mode)
                             (setq jit-lock-mode nil)
                             (current-buffer))))
               (with-current-buffer (prepare-buffer)
                 (let ((inhibit-read-only t))
-                  (erase-buffer)
                   (insert code)
-                  (font-lock-default-fontify-region
-                   (point-min) (point-max) nil))
+                  (font-lock-default-fontify-region (point-min) (point-max) 
nil))
                 (buffer-string))))))
 
 (defun ggtags-get-definition-default (defs)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]