File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change 275275
276276(defun sil-mode-display-function-cfg ()
277277 (interactive )
278- ; ; First we need to find the previous '{' and then the next '}'
278+ ; ; First we need to find the previous '{' and then the next '}'.
279279 (save-mark-and-excursion
280- (let ((brace-start (search-backward " {" ))
281- (brace-end (search-forward " }" ))
282- (process-connection-type nil ))
283- (let ((p (start-process sil-mode-viewcfg-program-name
284- sil-mode-viewcfg-buffer-name
285- sil-mode-viewcfg-command
286- (concat " --renderer=" sil-mode-viewcfg-renderer))))
287- (process-send-region p brace-start brace-end)
280+ (let ((brace-start (re-search-backward " {\s *$" ))
281+ (brace-end (re-search-forward " ^} // end sil function '" nil t ))
282+ (process-connection-type nil ))
283+ ; ; See if we failed to find } // end sil function. If we did, search again
284+ ; ; for ^} itself and see if we find anything.
285+ (if (null brace-end)
286+ (setq brace-end (re-search-forward " ^}" )))
287+ (let ((p (start-process sil-mode-viewcfg-program-name
288+ sil-mode-viewcfg-buffer-name
289+ sil-mode-viewcfg-command
290+ (concat " --renderer=" sil-mode-viewcfg-renderer))))
291+ (process-send-region p brace-start brace-end)
288292 (process-send-eof p)))))
289293
290294; ;; Top Level Entry point
You can’t perform that action at this time.
0 commit comments