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

Lines Matching +defs:first +defs:line

58 otherwise return the first suitable buffer in LIST.
282 and start at the first error.
332 (defun first-error (&optional n)
333 "Restart at the first error.
344 Finds and highlights the source line like \\[next-error], but does not
355 Finds and highlights the source line like \\[previous-error], but does not
361 (defvar next-error-follow-last-line nil)
372 (make-local-variable 'next-error-follow-last-line)))
377 (unless (equal next-error-follow-last-line (line-number-at-pos))
378 (setq next-error-follow-last-line (line-number-at-pos))
402 "Insert a newline, and move to left margin of the new line if it's blank.
410 ;; Inserting a newline at the end of a line produces better redisplay in
411 ;; try_window_id than inserting at the beginning of a line, and the textual
412 ;; result is the same. So, if we're at beginning of line, pretend to be at
413 ;; the end of the previous line.
447 ;; Also not if flag is true (it would fill wrong line);
462 ;; If the newline leaves the previous line blank,
463 ;; and we have a left margin, delete that from the blank line.
467 (beginning-of-line)
470 (delete-region (point) (progn (end-of-line) (point))))))
471 ;; Indent the line after the newline, except in one case:
472 ;; when we added the newline at the beginning of a line
486 (defun open-line (n)
489 on the new line if the line would have been blank.
503 (forward-line 1)
506 (end-of-line)))
508 (defun split-line (&optional arg)
509 "Split current line, moving portion beyond point vertically down.
510 If the current line starts with `fill-prefix', insert it on the new
511 line as well. With prefix ARG, don't insert `fill-prefix' on new line.
522 ;; Does this line start with it?
525 (beginning-of-line)
533 "Join this line to previous and fix up whitespace at join.
534 If there is a fill prefix, delete it from the beginning of this line.
535 With argument, join this line to following line."
537 (beginning-of-line)
538 (if arg (forward-line 1))
542 ;; If the second line started with the fill prefix,
552 (defalias 'join-line #'delete-indentation) ; easier to find
555 "On blank line, delete all surrounding blank lines, leaving just one.
556 On isolated blank line, delete that one.
557 On nonblank line, delete any immediately following blank lines."
561 (beginning-of-line)
563 ;; Set singleblank if there is just one blank line here.
568 (progn (forward-line -1)
573 (beginning-of-line)
574 (if singleblank (forward-line 1))
577 (progn (forward-line 1) (point))
579 ;; Delete following blank lines, unless the current line is blank
583 (end-of-line)
584 (forward-line 1)
587 (progn (beginning-of-line) (point))
590 ;; Delete the line, leaving point at eob.
596 All whitespace after the last non-whitespace character in a line is deleted.
604 (skip-syntax-backward "-" (save-excursion (forward-line 0) (point)))
613 Indentation is done using the value of `indent-line-function'.
623 "Reindent current line, insert newline, then indent the new line.
625 which means calling the current value of `indent-line-function'.
631 ;; Be careful to insert the newline before indenting the line.
644 If the first character you type after this command is an octal digit,
680 "Move forward ARG lines and position at first nonblank character."
682 (forward-line (or arg 1))
686 "Move backward ARG lines and position at first nonblank character."
688 (forward-line (- (or arg 1)))
692 "Move point to the first non-whitespace character on this line."
694 (beginning-of-line 1)
695 (skip-syntax-forward " " (line-end-position))
766 (if (and arg (not (consp arg))) (forward-line 1)))
792 ;; adjust it to the beginning of a line.
793 (cond ((and arg (not (consp arg))) (forward-line 1))
814 (defun goto-line (arg &optional buffer)
815 "Goto line ARG, counting from line 1 at beginning of buffer.
843 (list (read-from-minibuffer (format (if default "Goto line%s (%s): "
844 "Goto line%s: ")
856 ;; Move to the specified line number in that buffer.
862 (forward-line (1- arg)))))
870 (defun what-line ()
871 "Print the current buffer line number and narrowed line number of point."
874 (n (line-number-at-pos)))
880 (message "line %d (narrowed line %d)"
881 (+ n (line-number-at-pos start) -1) n))))))
887 and the greater of them is not at the start of a line."
904 (- (buffer-size) (forward-line (buffer-size)))))))
906 (defun line-number-at-pos (&optional pos)
907 "Return (narrowed) buffer line number at position POS.
916 (forward-line 0)
1670 ;; Return the first affected buffer position and the delta for an undo element
1710 ;; When the first undo batch in an undo list is longer than
1761 "Switch used to have the shell execute its command line argument.")
1883 ;; If will kill a process, query first.
1896 (setq mode-line-process '(":%s"))
2114 (setq mode-line-process
2343 a string. The buffer substring is passed to the first function
2403 The first argument, TEXT, is a string containing
2566 ;; Pass point first, then mark, because the order matters
2620 If you want to append the killed line to the last killed text,
2838 ;; kill-line and its subroutines.
2840 (defcustom kill-whole-line nil
2841 "*If non-nil, `kill-line' with no arg at beg of line kills the whole line."
2845 (defun kill-line (&optional arg)
2846 "Kill the rest of the current line; if no nonblanks there, kill thru newline.
2849 With zero argument, kills the text before point on the current line.
2854 To kill a whole line, when point is not at the beginning, type \
2855 \\[move-beginning-of-line] \\[kill-line] \\[kill-line].
2857 If `kill-whole-line' is non-nil, then this command kills the whole line
2858 including its terminating newline, when used at the beginning of a line
2859 with no argument. As a consequence, you can always kill a whole line
2860 by typing \\[move-beginning-of-line] \\[kill-line].
2862 If you want to append the killed line to the last killed text,
2863 use \\[append-next-kill] before \\[kill-line].
2866 the line, but put the line in the kill ring anyway. This means that
2879 (forward-visible-line (prefix-numeric-value arg))
2884 (end-of-visible-line) (point))))
2891 (and kill-whole-line (bolp)))
2892 (forward-visible-line 1)
2896 (defun kill-whole-line (&optional arg)
2897 "Kill current line.
2898 With prefix arg, kill that many lines starting from the current line.
2901 If arg is zero, kill current line but exclude the trailing newline."
2903 (if (and (> arg 0) (eobp) (save-excursion (forward-visible-line 0) (eobp)))
2905 (if (and (< arg 0) (bobp) (save-excursion (end-of-visible-line) (bobp)))
2918 (kill-region (point) (progn (forward-visible-line 0) (point))))
2919 (kill-region (point) (progn (end-of-visible-line) (point))))
2922 (kill-region (point) (progn (end-of-visible-line) (point))))
2924 (progn (forward-visible-line (1+ arg))
2929 (kill-region (point) (progn (forward-visible-line 0) (point))))
2931 (progn (forward-visible-line arg) (point))))))
2933 (defun forward-visible-line (arg)
2936 If ARG is zero, move to the beginning of the current line."
2941 (or (zerop (forward-line 1))
2970 (let ((first t))
2971 (while (or first (<= arg 0))
2972 (if first
2973 (beginning-of-line)
2974 (or (zerop (forward-line -1))
2986 (setq first nil))
3007 (defun end-of-visible-line ()
3008 "Move to end of current visible line."
3009 (end-of-line)
3026 (end-of-line)))
3158 (let ((beg (point))) (forward-line 1) (delete-region beg (point)))."
3173 "The list of former marks of the current buffer, most recent first.")
3183 "The list of saved global marks, most recent first.")
3401 (defcustom next-line-add-newlines nil
3402 "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error."
3407 (defun next-line (&optional arg try-vscroll)
3410 If there is no character in the target line exactly under the current column,
3411 the cursor is positioned after the character in that line which spans this
3412 column, or at the end of the line if it is not long enough.
3413 If there is no line in the buffer after this one, behavior depends on the
3414 value of `next-line-add-newlines'. If non-nil, it inserts a newline character
3415 to create a line, and moves the cursor to that line. Otherwise it moves the
3426 using `forward-line' instead. It is usually easier to use
3430 (if (and next-line-add-newlines (= arg 1))
3431 (if (save-excursion (end-of-line) (eobp))
3434 (end-of-line)
3436 (line-move arg nil nil try-vscroll))
3439 (line-move arg nil nil try-vscroll)
3441 (line-move arg nil nil try-vscroll)))
3444 (defun previous-line (&optional arg try-vscroll)
3447 If there is no character in the target line exactly over the current column,
3448 the cursor is positioned after the character in that line which spans this
3449 column, or at the end of the line if it is not long enough.
3459 `forward-line' with a negative argument instead. It is usually easier
3465 (line-move (- arg) nil nil try-vscroll)
3467 (line-move (- arg) nil nil try-vscroll))
3471 "*Non-nil means vertical motion starting at end of line keeps to ends of lines.
3472 This means moving to the end of each line moved onto.
3473 The beginning of a blank line does not count as the end of a line."
3490 (defcustom line-move-ignore-invisible t
3491 "*Non-nil means \\[next-line] and \\[previous-line] ignore invisible lines.
3496 (defun line-move-invisible-p (pos)
3506 (defun line-move-partial (arg noerror to-end)
3515 (let* ((lh (window-line-height -1))
3528 ;; If last line of window is fully visible, move forward.
3534 (or (nth 1 (window-line-height))
3546 ;; but also vscroll one line so redisplay wont recenter.
3551 (line-move-1 arg noerror to-end)
3553 ;; If there are lines above the last line, scroll-up one line.
3562 ;; This is like line-move-1 except that it also performs
3568 (defun line-move (arg &optional noerror to-end try-vscroll)
3570 ;; Only vscroll for single line moves
3575 (line-move-partial arg noerror to-end))
3577 (line-move-1 arg noerror to-end)))
3579 ;; This is the guts of next-line and previous-line.
3582 (defun line-move-1 (arg &optional noerror to-end)
3590 (if (not (memq last-command '(next-line previous-line)))
3593 ;; Don't count beg of empty line as end of line
3594 ;; unless we just did explicit end-of-line.
3595 (or (not (bolp)) (eq last-command 'move-end-of-line)))
3600 (not line-move-ignore-invisible))
3604 (progn (if (> arg 1) (forward-line (1- arg)))
3608 (end-of-line)
3609 (if (zerop (forward-line 1))
3611 (and (zerop (forward-line arg))
3624 (while (and (not (eobp)) (line-move-invisible-p (point)))
3626 ;; Move a line.
3627 ;; We don't use `end-of-line', since we want to escape
3631 (line-end-position))
3633 'inhibit-line-move-field-capture))
3642 (not (line-move-invisible-p (point))))
3645 (forward-line 1))
3657 ;; case, we should call beginning-of-line here.
3659 ;; continued line, the call to (vertical-motion -1)
3661 ;; to the same column in line-move-finish, and point
3663 (forward-line 0)
3671 (not (line-move-invisible-p (1- (point)))))
3672 (forward-line -1))
3680 ;; if our target is the middle of this line.
3683 (not (bobp)) (line-move-invisible-p (1- (point))))
3690 ;; at least go to end of line.
3691 (end-of-line))
3694 ;; at least go to beginning of line.
3695 (beginning-of-line))
3697 (line-move-finish (or goal-column temporary-goal-column)
3700 (defun line-move-finish (column opoint forward)
3708 (line-beg (save-excursion (beginning-of-line) (point)))
3709 (line-end
3710 ;; Compute the end of the line
3713 ;; Like end-of-line but ignores fields.
3715 (while (and (not (eobp)) (line-move-invisible-p (point)))
3721 (line-move-to-column column)
3724 ;; the middle of a continued line. When we get to
3725 ;; line-move-finish, point is at the start of a new *screen*
3726 ;; line but the same text line; then line-move-to-column would
3735 ;; Process intangibility within a line.
3749 ;; in the same line, use that as the destination.
3750 (if (<= (point) line-end)
3758 ;; allowable position if it is before the target line.
3759 (< line-beg (point))
3761 ;; allowable position if it is still after the target line.
3762 (<= (point) line-end))
3764 ;; As a last resort, use the end of the line.
3765 (setq new line-end))))
3780 'inhibit-line-move-field-capture))))
3782 ;; If all this moved us to a different line,
3783 ;; retry everything within that new line.
3784 (when (or (< (point) line-beg) (> (point) line-end))
3788 (defun line-move-to-column (col)
3794 (beginning-of-line)
3797 (when (and line-move-ignore-invisible
3798 (not (bolp)) (line-move-invisible-p (1- (point))))
3804 (line-move-invisible-p (point)))
3810 (line-move-to-column (+ (current-column) (- col normal-column)))
3816 (let ((line-beg (save-excursion (beginning-of-line) (point))))
3817 (while (and (not (bolp)) (line-move-invisible-p (1- (point))))
3818 (goto-char (previous-char-property-change (point) line-beg))))))))
3820 (defun move-end-of-line (arg)
3821 "Move point to end of current line as displayed.
3822 \(If there's an image in the line, this disregards newlines
3825 With argument ARG not nil or 1, move forward ARG - 1 lines first.
3835 (and (line-move arg t)
3838 (while (and (not (bobp)) (line-move-invisible-p (1- (point))))
3854 (defun move-beginning-of-line (arg)
3855 "Move point to beginning of current line as displayed.
3856 \(If there's an image in the line, this disregards newlines
3859 With argument ARG not nil or 1, move forward ARG - 1 lines first.
3866 start first-vis first-vis-field-value)
3870 (line-move (1- arg) t))
3872 ;; Move to beginning-of-line, ignoring fields and invisibles.
3874 (while (and (not (bobp)) (line-move-invisible-p (1- (point))))
3879 ;; Now find first visible char in the line
3880 (while (and (not (eobp)) (line-move-invisible-p (point)))
3882 (setq first-vis (point))
3885 (setq first-vis-field-value
3886 (constrain-to-field first-vis orig (/= arg 1) t nil))
3888 (goto-char (if (/= first-vis-field-value first-vis)
3890 first-vis-field-value
3902 "Set the current horizontal position as a goal for \\[next-line] and \\[previous-line].
3903 Those commands will move to this position in the line moved to
3906 so that \\[next-line] and \\[previous-line] resume vertical motion.
3981 If no argument and at end of line, the previous two chars are exchanged."
4032 "Exchange current line and previous line, leaving point after both.
4033 With argument ARG, takes previous line and moves it past ARG lines.
4034 With argument 0, interchanges line point is in with line mark is in."
4042 (setq arg (forward-line arg))
4047 (forward-line arg))))
4084 ;; FIXME: We first delete the two pieces of text, so markers that
4154 ;; Look for preceding word in same line.
4156 (save-excursion (beginning-of-line)
4159 ;; No preceding word in same line.
4160 ;; Look for following word in same line.
4163 (save-excursion (end-of-line)
4177 "*String for filling to insert at front of new line, or nil for none."
4190 (defvar comment-line-break-function 'comment-indent-new-line
4191 "*Mode-specific function which line breaks and continues a comment.
4210 (save-excursion (beginning-of-line)
4214 (save-excursion (unjustify-current-line)))
4230 ;; Determine where to split the line.
4234 (beginning-of-line)
4247 ;; There is no use breaking at end of line.
4256 (beginning-of-line)
4262 ;; Ok, we have a useful place to break the line. Do it.
4270 (funcall comment-line-break-function t)
4273 (funcall comment-line-break-function t)))
4277 (end-of-line 0)
4278 (justify-current-line justify nil t)))
4279 ;; If making the new line didn't reduce the hpos of
4280 ;; the end of the line, then give up now;
4284 ;; Justify last line.
4285 (justify-current-line justify t t)
4299 automatically breaks the line at a previous space.
4310 (force-mode-line-update)))
4314 "Automatically break line at a previous space, in insertion of text."
4374 (force-mode-line-update)
4385 "The string displayed in the mode line when in overwrite mode.")
4387 "The string displayed in the mode line when in binary overwrite mode.")
4394 end of a line, such characters extend the line. Before a tab,
4403 (force-mode-line-update))
4410 end of a line joins the line to the next, with the typed character
4425 (force-mode-line-update))
4427 (define-minor-mode line-number-mode
4430 When Line Number mode is enabled, the line number appears
4431 in the mode line.
4434 with very long lines; see variables `line-number-display-limit'
4435 and `line-number-display-limit-width'."
4436 :init-value t :global t :group 'mode-line)
4442 in the mode line."
4443 :global t :group 'mode-line)
4449 of the buffer appears in the mode line."
4450 :global t :group 'mode-line)
4507 open-paren-line-string)
4549 (setq open-paren-line-string
4550 ;; Show what precedes the open in its line, if anything.
4554 (buffer-substring (line-beginning-position)
4556 ;; Show what follows the open in its line, if anything.
4562 (line-end-position))
4563 ;; Otherwise show the previous nonblank line,
4571 (line-beginning-position))
4572 (progn (end-of-line)
4581 (substring-no-properties open-paren-line-string))))))))
4699 ;; Go to header delimiter line in a mail message, following RFC822 rules
4730 (forward-line 1)
4855 (force-mode-line-update))
5091 (defface completions-first-difference
5093 "Face put on the first uncommon character in completions in *Completions* buffer."
5105 ;; in order to make the first-differing character highlight work
5114 To put faces `completions-first-difference' and `completions-common-part'
5160 ;; Put faces on first uncommon characters and common parts.
5178 'font-lock-face 'completions-first-difference))))))
5205 (forward-line 1))))