• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/progmodes/

Lines Matching +defs:comment +defs:start +defs:skip

62 All Octave abbrevs start with a grave accent (`).")
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.")
208 (define-key map "`" 'octave-abbrev-start)
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)
258 ["Split Line at Point" octave-indent-new-comment-line 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.")
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)
539 (make-local-variable 'paragraph-start)
540 (setq paragraph-start (concat "\\s-*$\\|" page-delimiter))
542 (setq paragraph-separate paragraph-start)
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."
591 The block is taken to start at the first letter of the begin keyword and
597 (skip-syntax-forward "w")
606 The function is taken to start at the `f' of `function' and to end after
611 (octave-not-in-string-or-comment-p))
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)
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))
729 (skip-syntax-backward " ")
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))
793 Skips past all empty and comment lines. Default for ARG is 1.
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.
842 If on an empty or comment line, go to the end of that line.
883 (if (octave-not-in-string-or-comment-p)
951 (skip-syntax-forward "w"))
995 (if (and (octave-not-in-string-or-comment-p)
998 (skip-syntax-backward "w")
1022 (while (and (skip-syntax-forward "^<" eol)
1025 (skip-syntax-backward " ")
1047 (skip-syntax-forward "w"))
1051 (if (octave-not-in-string-or-comment-p)
1067 (and (< arg 0) (skip-syntax-backward "w"))
1068 (and (> arg 0) (skip-syntax-forward "w"))
1084 (skip-syntax-forward "w")
1106 (if (and (not (octave-in-comment-p))
1114 (skip-chars-backward "^ \t\n")
1119 ;; If we're in a comment line, don't break after the
1120 ;; comment chars
1122 (skip-syntax-backward " <")
1126 ;; If we're not in a comment line and just ahead the
1128 (if (and (not (octave-in-comment-p))
1135 (skip-chars-backward " \t")
1142 (skip-chars-backward " \t")
1146 (indent-new-comment-line t))
1150 (indent-new-comment-line t)))
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
1200 (not (octave-in-comment-p))))
1201 (setq comment-prefix (match-string 0)))
1208 comment-prefix
1212 comment-prefix
1215 (re-search-forward comment-prefix)
1221 (skip-chars-forward "^ \t\n")
1274 (and (consp first) (consp (event-start first))
1275 (eq (window-buffer (posn-window (event-start
1298 (delete-region (point) (progn (skip-chars-backward " \t") (point)))
1309 (if (not (octave-not-in-string-or-comment-p))
1327 (not (octave-not-in-string-or-comment-p)))
1336 (skip-syntax-backward " ")
1341 (defun octave-abbrev-start ()
1346 Note that all Octave mode abbrevs start with a grave accent."
1381 (prefix octave-block-comment-start))
1529 'octave-comment-char