Function: c-lineup-string-cont

c-lineup-string-cont is a byte-compiled function defined in cc-align.el.gz.

Signature

(c-lineup-string-cont LANGELEM)

Documentation

Line up a continued string under the one it continues.

A continued string in this sense is where a string literal follows directly after another one. E.g.:

result = prefix + "A message "
                  "string."; <- c-lineup-string-cont

In other situations, returns nil, to allow stacking with other line-up functions.

Works with: topmost-intro-cont, statement-cont, arglist-cont, arglist-cont-nonempty.

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-align.el.gz
(defun c-lineup-string-cont (_langelem)
  "Line up a continued string under the one it continues.
A continued string in this sense is where a string literal follows
directly after another one.  E.g.:

result = prefix + \"A message \"
                  \"string.\";      <- c-lineup-string-cont

In other situations, returns nil, to allow stacking with other
line-up functions.

Works with: topmost-intro-cont, statement-cont, arglist-cont,
arglist-cont-nonempty."
  (save-excursion
    (back-to-indentation)
    (and (looking-at "\\s\"")
	 (let ((quote (char-after)) pos)
	   (while (and (progn (c-backward-syntactic-ws)
			      (eq (char-before) quote))
		       (c-safe (c-backward-sexp) t)
		       (/= (setq pos (point)) (c-point 'boi))))
	   (when pos
	     (goto-char pos)
	     (vector (current-column)))))))