Function: emacsql-show-sql
emacsql-show-sql is a byte-compiled function defined in emacsql.el.
Signature
(emacsql-show-sql STRING)
Documentation
Fontify and display the SQL expression in STRING.
Source Code
;; Defined in ~/.emacs.d/elpa/emacsql-20261001.1544/emacsql.el
(defun emacsql-show-sql (string)
"Fontify and display the SQL expression in STRING."
(let ((fontified
(with-temp-buffer
(insert string)
(sql-mode)
(with-no-warnings ;; autoloaded by previous line
(sql-highlight-sqlite-keywords))
(font-lock-ensure)
(emacsql--indent)
(buffer-string))))
(with-current-buffer (get-buffer-create emacsql-show-buffer-name)
(if (< (length string) fill-column)
(message "%s" fontified)
(let ((buffer-read-only nil))
(erase-buffer)
(insert fontified))
(special-mode)
(visual-line-mode)
(pop-to-buffer (current-buffer))))))