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

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

[elpa] externals/inspector 1ba760762a 1/4: Fontify strings


From: ELPA Syncer
Subject: [elpa] externals/inspector 1ba760762a 1/4: Fontify strings
Date: Thu, 16 Mar 2023 09:58:25 -0400 (EDT)

branch: externals/inspector
commit 1ba760762aaaace91a3d4ad0f746923dfffead4c
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>

    Fontify strings
    
    See issue #19
---
 inspector.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/inspector.el b/inspector.el
index cf718643b0..44e0fb183e 100644
--- a/inspector.el
+++ b/inspector.el
@@ -584,7 +584,7 @@ is expected to be used.")
 ;; NOTE: this is code extracted from 
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-fold-core.el#n1450
 (defun inspector--object-intervals (string)
   (if (fboundp 'object-intervals)
-                   (object-intervals string)
+      (object-intervals string)
     ;; Backward compatibility with Emacs <28.
     ;; FIXME: Is there any better way to do it?
     ;; Yes, it is a hack.
@@ -608,7 +608,8 @@ is expected to be used.")
 (cl-defmethod inspector-inspect-object ((string string))
   "Render inspector buffer for STRING."
   (inspector--insert-title "string")
-  (prin1 (substring-no-properties string) (current-buffer))
+  (insert (propertize (cl-prin1-to-string  (substring-no-properties string))
+                      'face 'font-lock-string-face))
   (let ((text-properties (inspector--object-intervals string)))
     (when text-properties
       (newline 2)



reply via email to

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