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

Lines Matching +defs:forward +defs:comment

97 (defvar octave-comment-char ?#
98 "Character to start an Octave comment.")
99 (defvar octave-comment-start
100 (string octave-comment-char ?\ )
101 "String to insert to start a new Octave in-line comment.")
102 (defvar octave-comment-start-skip "\\s<+\\s-*"
103 "Regexp to match the start of an Octave comment up to its body.")
213 (define-key map "\e;" 'octave-indent-for-comment)
214 (define-key map "\e\n" 'octave-indent-new-comment-line)
220 (define-key map "\C-c;" 'octave-comment-region)
227 (define-key map "\C-c\M-\C-n" 'octave-forward-block)
258 ["Split Line at Point" octave-indent-new-comment-line t])
260 ["Next Block" octave-forward-block t]
369 (defvar octave-block-comment-start
370 (concat (make-string 2 octave-comment-char) " ")
371 "String to insert to start a new Octave comment on an empty line.")
410 (defcustom octave-send-line-auto-forward t
411 "*Control auto-forward after sending to the inferior Octave process.
483 octave-send-line-auto-forward
526 (make-local-variable 'comment-start)
527 (setq comment-start octave-comment-start)
528 (make-local-variable 'comment-end)
529 (setq comment-end "")
530 (make-local-variable 'comment-column)
531 (setq comment-column 32)
532 (make-local-variable 'comment-start-skip)
533 (setq comment-start-skip "\\s<+\\s-*")
534 (make-local-variable 'comment-indent-function)
535 (setq comment-indent-function 'octave-comment-indent)
572 (defsubst octave-in-comment-p ()
573 "Returns t if point is inside an Octave comment, nil otherwise."
584 (defsubst octave-not-in-string-or-comment-p ()
585 "Returns t iff point is not inside an Octave string or comment."
597 (skip-syntax-forward "w")
599 (octave-forward-block)
611 (octave-not-in-string-or-comment-p))
615 (octave-forward-block)
621 (if (or (octave-in-comment-p)
633 (defun octave-comment-region (beg end &optional arg)
635 See `comment-region'."
637 (let ((comment-start (char-to-string octave-comment-char)))
638 (comment-region beg end arg)))
644 (octave-comment-region beg end (- arg)))
652 comment line with fixed goal golumn. In that case, returns a list whose
680 (if (octave-not-in-string-or-comment-p)
693 (forward-char)))
700 (octave-not-in-string-or-comment-p))
703 (octave-not-in-string-or-comment-p))
706 (octave-before-magic-comment-p))
709 (setq icol (list comment-column icol)))))
718 (defun octave-before-magic-comment-p ()
723 (defun octave-comment-indent ()
725 (octave-before-magic-comment-p))
731 comment-column))))
733 (defun octave-indent-for-comment ()
734 "Maybe insert and indent an Octave comment.
735 If there is no comment already on this line, create a code-level comment
736 \(started by two comment characters) if the line is empty, or an in-line
737 comment (started by one comment character) otherwise.
738 Point is left after the start of the comment which is properly aligned."
742 (insert octave-block-comment-start)
743 (indent-for-comment))
748 With optional ARG, use this as offset unless this line is a comment with
763 (defun octave-indent-new-comment-line ()
764 "Break Octave line at point, continuing comment if within one.
771 ((octave-in-comment-p)
772 (indent-new-comment-line))
792 "Move ARG lines of Octave code forward (backward if ARG is negative).
793 Skips past all empty and comment lines. Default for ARG is 1.
802 (setq n (forward-line inc))
805 (setq n (forward-line inc)))
810 "Move ARG lines of Octave code backward (forward if ARG is negative).
811 Skips past all empty and comment lines. Default for ARG is 1.
820 If on an empty or comment line, go to the beginning of that line.
838 (zerop (forward-line -1)))))))
842 If on an empty or comment line, go to the end of that line.
843 Otherwise, move forward to the end of the first Octave code line which
861 (zerop (forward-line 1)))))
879 (while (or (re-search-forward
883 (if (octave-not-in-string-or-comment-p)
897 (defun octave-forward-block (&optional arg)
898 "Move forward across one balanced Octave begin-end block.
908 Negative arg -N means move forward across N blocks."
911 (octave-forward-block (- arg)))
914 "Move forward down one begin-end block level of Octave code.
928 A negative argument means move forward but still to a less deep spot.
934 "Move forward out of one begin-end block level of Octave code.
951 (skip-syntax-forward "w"))
960 (octave-forward-block)
995 (if (and (octave-not-in-string-or-comment-p)
1022 (while (and (skip-syntax-forward "^<" eol)
1024 (not (forward-char 1))))
1039 move forward to Nth following beginning of a function.
1047 (skip-syntax-forward "w"))
1051 (if (octave-not-in-string-or-comment-p)
1059 "Move forward to the end of an Octave function.
1068 (and (> arg 0) (skip-syntax-forward "w"))
1073 (octave-forward-block)))
1084 (skip-syntax-forward "w")
1106 (if (and (not (octave-in-comment-p))
1118 (re-search-forward "[ \t]" opoint t))
1119 ;; If we're in a comment line, don't break after the
1120 ;; comment chars
1124 (re-search-forward "[ \t]" (line-end-position)
1126 ;; If we're not in a comment line and just ahead the
1128 (if (and (not (octave-in-comment-p))
1146 (indent-new-comment-line t))
1150 (indent-new-comment-line t)))
1160 (let ((end (progn (forward-paragraph) (point)))
1162 (forward-paragraph -1)
1163 (skip-chars-forward " \t\n")
1168 comment-prefix)
1184 ;; First check whether we need to combine non-empty comment lines
1186 (octave-in-comment-p)
1190 ;; This is a nonempty comment line which does not extend
1192 ;; comment line with the same comment prefix, try to
1196 ;; Get the comment prefix
1199 (while (and (re-search-forward "\\s<+")
1200 (not (octave-in-comment-p))))
1201 (setq comment-prefix (match-string 0)))
1205 (forward-line 1)
1208 comment-prefix
1212 comment-prefix
1215 (re-search-forward comment-prefix)
1221 (skip-chars-forward "^ \t\n")
1225 (forward-line 1)
1228 (forward-line 1)))))
1309 (if (not (octave-not-in-string-or-comment-p))
1327 (not (octave-not-in-string-or-comment-p)))
1381 (prefix octave-block-comment-start))
1481 If `octave-send-line-auto-forward' is non-nil, go to the next unsent
1492 (if octave-send-line-auto-forward
1506 (forward-sexp -1)
1529 'octave-comment-char
1535 'octave-send-line-auto-forward