• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:indent +defs:string

51 ;; the line ends in a quoted string, or has a # which should be a \#.
58 ;; zero are left there by perl-indent-exp; perl-beginning-of-function
60 ;; in 'sub ... {', or the equal sign in 'format ... ='; perl-indent-exp
71 ;; characters in the pattern string must be backslashed.
86 ;; doesn't understand, and thinks it is seeing a quoted string.
90 ;; but will trick perl-mode into starting a quoted string, which
112 (defvar font-lock-string-face)
133 (define-key map "\e\C-q" 'perl-indent-exp)
135 (define-key map "\t" 'perl-indent-command)
182 ;;("\\(--- .* ---\\|=== .* ===\\)" . font-lock-string-face)
186 ;; ("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
262 ;; check that it occurs inside a '..' string.
316 ;; Normal text, or comment, or docstring, or normal string.
390 (defcustom perl-indent-level 4
394 (put 'perl-indent-level 'safe-local-variable 'integerp)
396 "*Extra indent for lines not starting new statements."
400 "*Extra indent for substatements that start with open-braces.
416 (defcustom perl-indent-continued-arguments nil
422 (defcustom perl-tab-always-indent tab-always-indent
472 `perl-tab-always-indent'
473 Non-nil means TAB in Perl mode should always indent the current line,
477 either delete an empty comment, indent an existing comment, move
481 `perl-indent-level'
498 `perl-indent-continued-arguments'
502 perl-indent-level 5 8 0 2 4
523 (make-local-variable 'indent-line-function)
524 (setq indent-line-function 'perl-indent-line)
533 (make-local-variable 'comment-indent-function)
534 (setq comment-indent-function 'perl-comment-indent)
555 ;; This is used by indent-for-comment
556 ;; to decide how much to indent a comment in Perl code
558 (defun perl-comment-indent ()
569 (and (not arg) ; decide whether to indent
582 (progn ; must insert, indent, delete
584 (perl-indent-line)
600 (defun perl-indent-command (&optional arg)
603 With an argument, indent the current line, regardless of other options.
605 If `perl-tab-always-indent' is nil and point is not in the indentation
608 Otherwise, indent the current line. If point was within the indentation
620 (if arg ; If arg, just indent this line
621 (perl-indent-line "\f")
622 (if (and (not perl-tab-always-indent)
630 (perl-indent-line "\f\\|;?#" bof))))
633 (if (listp delta) ; if line starts in a quoted string
643 (if (= oldpnt eol) ; already at eol in a string
644 (message "In a string which starts with a %c."
648 (indent-for-comment))
658 (indent-for-comment) ; indent existing comment
665 (defun perl-indent-line (&optional nochange parse-start)
668 changed by, or (parse-state) if line starts in a quoted string."
672 beg indent shift-amt)
677 ((listp (setq indent (perl-calculate-indent bof))) indent)
681 (setq indent (perl-indent-new-calculate nil indent bof))
682 (- indent (current-column)))))
686 (indent-to indent)))
717 (defun perl-indent-new-calculate (&optional virtual default parse-start)
722 (max 1 (+ (or default (perl-calculate-indent parse-start))
728 (perl-indent-new-calculate
734 (+ (or default (perl-calculate-indent parse-start))
736 (or default (perl-calculate-indent parse-start))))
738 (defun perl-calculate-indent (&optional parse-start)
740 In usual case returns an integer: the column to indent to.
741 Returns (parse-state) if line starts inside a string.
744 (let ((indent-point (point))
752 ;; do with us because `indent-point' is past it. In this case
758 (> indent-point (save-excursion (forward-sexp 1) (point))))
760 (while (< (point) indent-point) ;repeat until right sexp
761 (setq state (parse-partial-sexp (point) indent-point 0))
767 (cond ((nth 3 state) state) ; In a quoted string?
772 ;; indent a little if this is a continuation line
779 ;; indent to just after the surrounding open.
794 (+ (current-column) perl-indent-level))
795 (if perl-indent-continued-arguments
796 (+ perl-indent-continued-arguments (current-indentation))
803 ;; indent perl-continued-statement-offset more than the
813 (if (save-excursion (goto-char indent-point)
821 ;; If no, find that first statement and indent like it.
835 ;; if it is before the line we want to indent.
836 (and (< (point) indent-point)
841 ;; indent it relative to line brace is on.
843 ;; start there too. If perl-indent-level is zero,
847 (+ (if (and (bolp) (zerop perl-indent-level))
849 perl-indent-level)
879 (defalias 'indent-perl-exp 'perl-indent-exp)
880 (defun perl-indent-exp ()
891 (message "Can't indent a format statement")
901 (setq delta (perl-indent-line nil (marker-position bof-mark)))
918 (indent-for-comment))))) ; indent existing comment