Fork me on GitHub
#emacs
<
2023-07-27
>
vemv07:07:48

More of random thing to share, today I tweaked my docstring rendering thingy to remove backticks in docstrings, and render them in a different color. code in ๐Ÿงต if it helps anyone.

๐Ÿ‘ 6
2
vemv08:07:32

(defun replace-backtick-words (s)
  "Replace each backtick-delimited word in S with the same word, propertized with font-lock-comment-face."
  (let* ((input-string (propertize s 'face 'font-lock-string-face))
         (start 0))
    (while (string-match "`\\([^`]+\\)`" input-string start)
      (let* ((match-string (match-string 1 input-string))
             (propertized-match-string (propertize match-string 'face 'clojure-keyword-face)))
        (setq input-string (replace-match propertized-match-string t t input-string))
        (setq start (- (match-end 0)
                       ;; 2, because we removed two backticks:
                       2))))
    input-string))
generated by gpt4, I had to add a couple tweaks for it to actually work

๐Ÿ˜€ 4
Akiz12:08:53

Whats your theme? ๐ŸŽ‡

lilactown17:07:59

anyone ever tried to create something like EQL for elisp?

elken18:07:32

Which would do?

lilactown22:07:39

the cool thing about EQL is that it's pretty general; I think the goal would be to offer a unified query language for tools that need to do graph queries could adopt if they liked it