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

Lines Matching +defs:indent +defs:string

52 (defvar inferior-octave-output-string nil)
100 (string octave-comment-char ?\ )
168 The string `function' and its name are given by the first and third
197 :type 'string
211 (define-key map "\n" 'octave-reindent-then-newline-and-indent)
212 (define-key map "\t" 'indent-according-to-mode)
213 (define-key map "\e;" 'octave-indent-for-comment)
214 (define-key map "\e\n" 'octave-indent-new-comment-line)
219 (define-key map "\M-\C-q" 'octave-indent-defun)
258 ["Split Line at Point" octave-indent-new-comment-line t])
270 ["Indent Function" octave-indent-defun t]
282 ["Indent Line" indent-according-to-mode t]
319 (defcustom octave-auto-indent nil
320 "*Non-nil means indent line after a semicolon or space in Octave mode."
370 (concat (make-string 2 octave-comment-char) " ")
379 (defcustom octave-continuation-string "\\"
380 "*Character string used for Octave continuation lines. Normally \\."
381 :type 'string
451 octave-auto-indent
452 Non-nil means indent current line after a semicolon or space.
456 Non-nil means auto-insert a newline and indent after a semicolon.
471 octave-continuation-string
523 (make-local-variable 'indent-line-function)
524 (setq indent-line-function 'octave-indent-line)
534 (make-local-variable 'comment-indent-function)
535 (setq comment-indent-function 'octave-comment-indent)
578 (defsubst octave-in-string-p ()
579 "Returns t if point is inside an Octave string, nil otherwise."
584 (defsubst octave-not-in-string-or-comment-p ()
585 "Returns t iff point is not inside an Octave string or comment."
611 (octave-not-in-string-or-comment-p))
620 (defun octave-maybe-insert-continuation-string ()
627 (insert (concat " " octave-continuation-string))))
630 (string-match "XEmacs\\|Lucid" emacs-version))
637 (let ((comment-start (char-to-string octave-comment-char)))
649 (defun calculate-octave-indent ()
651 Returns an integer (the column to indent to) unless the line is a
653 car is the column to indent to, and whose cdr is the current indentation
680 (if (octave-not-in-string-or-comment-p)
700 (octave-not-in-string-or-comment-p))
703 (octave-not-in-string-or-comment-p))
716 (if (string-match (match-string 0) "switch") 2 1))))
723 (defun octave-comment-indent ()
728 (calculate-octave-indent)
733 (defun octave-indent-for-comment ()
734 "Maybe insert and indent an Octave comment.
743 (indent-for-comment))
744 (indent-according-to-mode))
746 (defun octave-indent-line (&optional arg)
752 (let ((icol (calculate-octave-indent))
759 (indent-line-to icol)
763 (defun octave-indent-new-comment-line ()
765 If within code, insert `octave-continuation-string' before breaking the
766 line. If within a string, signal an error.
772 (indent-new-comment-line))
773 ((octave-in-string-p)
774 (error "Cannot split a code line inside a string"))
776 (insert (concat " " octave-continuation-string))
777 (octave-reindent-then-newline-and-indent))))
779 (defun octave-indent-defun ()
785 (indent-region (point) (mark) nil))
883 (if (octave-not-in-string-or-comment-p)
979 (indent-according-to-mode)
980 (octave-reindent-then-newline-and-indent))
984 (octave-reindent-then-newline-and-indent)
995 (if (and (octave-not-in-string-or-comment-p)
1023 (octave-in-string-p)
1051 (if (octave-not-in-string-or-comment-p)
1108 (setq fc (- fc (+ (length octave-continuation-string) 1))))
1127 ;; continuation string, don't break here.
1132 octave-continuation-string)
1145 (octave-maybe-insert-continuation-string)
1146 (indent-new-comment-line t))
1149 (octave-maybe-insert-continuation-string)
1150 (indent-new-comment-line t)))
1167 (ind (calculate-octave-indent))
1175 (octave-indent-line ind)
1201 (setq comment-prefix (match-string 0)))
1252 (string (buffer-substring-no-properties beg end))
1253 (completion (try-completion string octave-completion-alist)))
1256 (message "Can't find completion for \"%s\"" string)
1258 ((not (string= string completion))
1262 (let ((list (all-completions string octave-completion-alist))
1267 (display-completion-list list string))
1290 (defun octave-reindent-then-newline-and-indent ()
1291 "Reindent current Octave line, insert newline, and indent the new line.
1299 (indent-according-to-mode))
1301 (indent-according-to-mode))
1306 Reindent the line of `octave-auto-indent' is non-nil.
1309 (if (not (octave-not-in-string-or-comment-p))
1314 (if octave-auto-indent
1315 (indent-according-to-mode))
1318 (newline-and-indent))))
1323 Reindent the line of `octave-auto-indent' is non-nil."
1326 (if (and octave-auto-indent
1327 (not (octave-not-in-string-or-comment-p)))
1329 (indent-according-to-mode)
1334 (if (and octave-auto-indent
1338 (indent-according-to-mode))
1371 (let ((string (format "%s %s (%s)"
1373 ((string-equal vals "")
1375 ((string-match "[ ,]" vals)
1383 (insert "function" string)
1384 (indent-according-to-mode)
1386 (insert prefix "usage: " string)
1387 (reindent-then-newline-and-indent)
1389 (reindent-then-newline-and-indent)
1391 (indent-according-to-mode)
1395 (indent-according-to-mode))))
1415 (process-send-string inferior-octave-process "quit;\n")
1439 (string (buffer-substring-no-properties beg end))
1444 (while (not (string-equal string ""))
1445 (if (string-match "\n" string)
1446 (setq line (substring string 0 (match-beginning 0))
1447 string (substring string (match-end 0)))
1448 (setq line string string ""))
1459 (list inferior-octave-output-string))
1525 'octave-auto-indent
1531 'octave-continuation-string