Function: gud-expr-compound-sep
gud-expr-compound-sep is a byte-compiled function defined in
gud.el.gz.
Signature
(gud-expr-compound-sep SPAN-START SPAN-END)
Documentation
Scan from SPAN-START to SPAN-END for punctuation characters.
If -> is found, return ?.. If . is found, return ?..
If any other punctuation is found, return ??.
If no punctuation is found, return ?\s.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/gud.el.gz
(defun gud-expr-compound-sep (span-start span-end)
"Scan from SPAN-START to SPAN-END for punctuation characters.
If `->' is found, return `?.'. If `.' is found, return `?.'.
If any other punctuation is found, return `??'.
If no punctuation is found, return `?\\s'."
(let ((result ?\s)
(syntax))
(while (< span-start span-end)
(setq syntax (char-syntax (char-after span-start)))
(cond
((= syntax ?\s) t)
((= syntax ?.) (setq syntax (char-after span-start))
(cond
((= syntax ?.) (setq result ?.))
((and (= syntax ?-) (= (char-after (+ span-start 1)) ?>))
(setq result ?.)
(setq span-start (+ span-start 1)))
(t (setq span-start span-end)
(setq result ??)))))
(setq span-start (+ span-start 1)))
result))