Skip to content

[sil-mode.el] Improve handling of box types by sil-mode-display-function-cfg #35173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions utils/sil-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,20 @@

(defun sil-mode-display-function-cfg()
(interactive)
;; First we need to find the previous '{' and then the next '}'
;; First we need to find the previous '{' and then the next '}'.
(save-mark-and-excursion
(let ((brace-start (search-backward "{"))
(brace-end (search-forward "}"))
(process-connection-type nil))
(let ((p (start-process sil-mode-viewcfg-program-name
sil-mode-viewcfg-buffer-name
sil-mode-viewcfg-command
(concat "--renderer=" sil-mode-viewcfg-renderer))))
(process-send-region p brace-start brace-end)
(let ((brace-start (re-search-backward "{\s*$"))
(brace-end (re-search-forward "^} // end sil function '" nil t))
(process-connection-type nil))
;; See if we failed to find } // end sil function. If we did, search again
;; for ^} itself and see if we find anything.
(if (null brace-end)
(setq brace-end (re-search-forward "^}")))
(let ((p (start-process sil-mode-viewcfg-program-name
sil-mode-viewcfg-buffer-name
sil-mode-viewcfg-command
(concat "--renderer=" sil-mode-viewcfg-renderer))))
(process-send-region p brace-start brace-end)
(process-send-eof p)))))

;;; Top Level Entry point
Expand Down