Function: dcl-option-value-comment-line

dcl-option-value-comment-line is a byte-compiled function defined in dcl-mode.el.gz.

Signature

(dcl-option-value-comment-line OPTION-ASSOC)

Documentation

Guess a value for dcl-comment-line-regexp.

Must return a string.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/dcl-mode.el.gz
;;;-------------------------------------------------------------------------
(defun dcl-option-value-comment-line (_option-assoc)
  "Guess a value for `dcl-comment-line-regexp'.
Must return a string."
  ;; Should we set comment-start and comment-start-skip as well?
  ;; If someone wants `$!&' as a comment line, C-M-j won't work well if
  ;; they aren't set.
  ;; This must be done after the user has given the real value in
  ;; dcl-set-option.
  (format
   "%S"
   (save-excursion
     (beginning-of-line)
     ;; We could search for "^\\$.*!+[^ \t]*", but, as noted above, we
     ;; can't handle that case very good, so there is no point in
     ;; suggesting it.
     (if (looking-at "^\\$[^!\n]*!")
	 (let ((regexp (buffer-substring (match-beginning 0) (match-end 0))))
	   (concat "^" (regexp-quote regexp)))
       dcl-comment-line-regexp))))