Function: ruby-verify-heredoc

ruby-verify-heredoc is a byte-compiled function defined in ruby-mode.el.gz.

Signature

(ruby-verify-heredoc &optional POS)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ruby-mode.el.gz
(defun ruby-verify-heredoc (&optional pos)
  (save-excursion
    (when pos (goto-char pos))
    ;; Not right after a symbol or prefix character.
    ;; Method names are only allowed when separated by
    ;; whitespace.  Not a limitation in Ruby, but it's hard for
    ;; us to do better.
    (when (not (memq (car (syntax-after (1- (point)))) '(2 3 6 10)))
      (or (not (memq (char-before) '(?\s ?\t)))
          (ignore (forward-word-strictly -1))
          (eq (char-before) ?_)
          (not (looking-at ruby-singleton-class-re))))))