2022 Developer Survey is open! Take survey.

New answers tagged

2 votes
Accepted

Output the VAR name and its VALUE

Yes, the function you're looking for is format: (defun message-variable-t-nil-value (var) (let* ((val (and (boundp var) (symbol-value var))) (msg (format "The value of `%S' is now %...
user avatar
  • 69.2k
1 vote

Output the VAR name and its VALUE

Use format. It's the Lisp equivalent of C's printf. Unlike Common Lisp, Emacs Lisp's format specifications are similar to C's, with % as the special character. (defun show-value-of-variable (symbol) ...
user avatar

Top 50 recent answers are included