Compare commits
2 Commits
c03da09ede
...
829db15daa
Author | SHA1 | Date | |
---|---|---|---|
829db15daa | |||
56de583445 |
35
README.org
35
README.org
@ -4553,6 +4553,8 @@ configuration:
|
|||||||
#+caption: Setup ~eglot~ for ~julia-mode~.
|
#+caption: Setup ~eglot~ for ~julia-mode~.
|
||||||
#+name: lst:setup-eglot-jl
|
#+name: lst:setup-eglot-jl
|
||||||
#+begin_src emacs-lisp -n :results silent
|
#+begin_src emacs-lisp -n :results silent
|
||||||
|
;; How to invoke `imenu-add-menubar-index' automatically?
|
||||||
|
;; Neither advising `eglot' nor hooking major modes seems to work.
|
||||||
(when (ensure-package-installation 'eglot-jl)
|
(when (ensure-package-installation 'eglot-jl)
|
||||||
(eglot-jl-init))
|
(eglot-jl-init))
|
||||||
#+end_src
|
#+end_src
|
||||||
@ -4843,20 +4845,23 @@ silent]{(describe-variable 'no-littering-var-directory)}. Listing
|
|||||||
"(cdr (assoc 'slynk:*string-elision-length* slynk:*slynk-pprint-bindings*))"
|
"(cdr (assoc 'slynk:*string-elision-length* slynk:*slynk-pprint-bindings*))"
|
||||||
"Slynk \"string elision length\" getter command.")
|
"Slynk \"string elision length\" getter command.")
|
||||||
|
|
||||||
(defun slynk-command-set-sel (sel)
|
(defun slynk-command-set-sel (length)
|
||||||
"Slynk SEL \"string elision length\" setter command.
|
"Slynk LENGTH \"string elision length\" setter command.
|
||||||
SEL values must be positive integers to enable or `nil' to disable elision."
|
LENGTH values must be positive integers to enable or `nil' to disable elision."
|
||||||
(format "(setf %s %s)" slynk-command-get-sel sel))
|
(format "(setf %s %s)" slynk-command-get-sel length))
|
||||||
|
|
||||||
(defun slynk-get-sel ()
|
(defun slynk-get-sel ()
|
||||||
"Get the Slynk \"string-elision-length\"."
|
"Get the Slynk \"string-elision-length\"."
|
||||||
(cadr (sly-eval `(slynk:eval-and-grab-output ,slynk-command-get-sel))))
|
(cadr (sly-eval `(slynk:eval-and-grab-output ,slynk-command-get-sel))))
|
||||||
|
|
||||||
(defun slynk-set-sel (sel)
|
;; Most useful for Org source blocks.
|
||||||
"Set the Slynk \"string-elision-length\" SEL.
|
(defun slynk-set-sel (length)
|
||||||
SEL values must be positive integers to enable or `nil' to disable elision."
|
"Set the Slynk \"string-elision-length\" LENGTH.
|
||||||
(cadr (sly-eval `(slynk:eval-and-grab-output ,(slynk-command-set-sel sel)))))
|
LENGTH values must be positive integers to enable or `nil' to disable elision."
|
||||||
|
(cadr
|
||||||
|
(sly-eval `(slynk:eval-and-grab-output ,(slynk-command-set-sel length)))))
|
||||||
|
|
||||||
|
;; Most useful for interactive use.
|
||||||
(defun slynk-eval-sel-command (string)
|
(defun slynk-eval-sel-command (string)
|
||||||
"Evaluate the Slynk \"string-elision-length\" command STRING."
|
"Evaluate the Slynk \"string-elision-length\" command STRING."
|
||||||
(unless (sly-connected-p)
|
(unless (sly-connected-p)
|
||||||
@ -4869,14 +4874,14 @@ SEL values must be positive integers to enable or `nil' to disable elision."
|
|||||||
(interactive)
|
(interactive)
|
||||||
(slynk-eval-sel-command slynk-command-get-sel))
|
(slynk-eval-sel-command slynk-command-get-sel))
|
||||||
|
|
||||||
(defun slynk-set-string-elision-length (&optional sel)
|
(defun slynk-set-string-elision-length (&optional length)
|
||||||
"Set the Slynk \"string-elision-length\" by evaluating SEL.
|
"Set the Slynk \"string-elision-length\" LENGTH.
|
||||||
Valid SEL values are positive integers to enable or `nil' to disable elision."
|
Valid LENGTH values are positive integers to set or `nil' to reset."
|
||||||
(interactive "XSlynk string-elision-length (nil or sel > 0): ")
|
(interactive "X\ Slink string elision length: ")
|
||||||
(unless (or (null sel) (and (integerp sel) (> sel 0)))
|
(unless (or (null length) (and (integerp length) (> length 0)))
|
||||||
(user-error
|
(user-error
|
||||||
"Slynk `sel' must evaluate to `nil' or a positive integer (got `%S')" sel))
|
"Slynk `length' must be `nil' or a positive integer (got `%S')" length))
|
||||||
(slynk-eval-sel-command (slynk-command-set-sel sel))))
|
(slynk-eval-sel-command (slynk-command-set-sel length))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+caption[Script to dump a SBCL core for the Sly Common Lisp IDE]:
|
#+caption[Script to dump a SBCL core for the Sly Common Lisp IDE]:
|
||||||
|
Loading…
Reference in New Issue
Block a user