/[emacs]/emacs/lisp/simple.el
ViewVC logotype

Diff of /emacs/lisp/simple.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.739 by kfstorm, Wed Jul 13 13:45:30 2005 UTC revision 1.740 by lektu, Wed Jul 20 22:26:27 2005 UTC
# Line 74  wait this many seconds after Emacs becom Line 74  wait this many seconds after Emacs becom
74  ;;; next-error support framework  ;;; next-error support framework
75    
76  (defgroup next-error nil  (defgroup next-error nil
77    "next-error support framework."    "`next-error' support framework."
78    :group 'compilation    :group 'compilation
79    :version "22.1")    :version "22.1")
80    
# Line 86  wait this many seconds after Emacs becom Line 86  wait this many seconds after Emacs becom
86    
87  (defcustom next-error-highlight 0.1  (defcustom next-error-highlight 0.1
88    "*Highlighting of locations in selected source buffers.    "*Highlighting of locations in selected source buffers.
89  If number, highlight the locus in next-error face for given time in seconds.  If number, highlight the locus in `next-error' face for given time in seconds.
90  If t, use persistent overlays fontified in next-error face.  If t, use persistent overlays fontified in `next-error' face.
91  If nil, don't highlight the locus in the source buffer.  If nil, don't highlight the locus in the source buffer.
92  If `fringe-arrow', indicate the locus by the fringe arrow."  If `fringe-arrow', indicate the locus by the fringe arrow."
93    :type '(choice (number :tag "Delay")    :type '(choice (number :tag "Delay")
# Line 99  If `fringe-arrow', indicate the locus by Line 99  If `fringe-arrow', indicate the locus by
99    
100  (defcustom next-error-highlight-no-select 0.1  (defcustom next-error-highlight-no-select 0.1
101    "*Highlighting of locations in non-selected source buffers.    "*Highlighting of locations in non-selected source buffers.
102  If number, highlight the locus in next-error face for given time in seconds.  If number, highlight the locus in `next-error' face for given time in seconds.
103  If t, use persistent overlays fontified in next-error face.  If t, use persistent overlays fontified in `next-error' face.
104  If nil, don't highlight the locus in the source buffer.  If nil, don't highlight the locus in the source buffer.
105  If `fringe-arrow', indicate the locus by the fringe arrow."  If `fringe-arrow', indicate the locus by the fringe arrow."
106    :type '(choice (number :tag "Delay")    :type '(choice (number :tag "Delay")
# Line 122  If `fringe-arrow', indicate the locus by Line 122  If `fringe-arrow', indicate the locus by
122  (add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position)  (add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position)
123    
124  (defvar next-error-last-buffer nil  (defvar next-error-last-buffer nil
125    "The most recent next-error buffer.    "The most recent `next-error' buffer.
126  A buffer becomes most recent when its compilation, grep, or  A buffer becomes most recent when its compilation, grep, or
127  similar mode is started, or when it is used with \\[next-error]  similar mode is started, or when it is used with \\[next-error]
128  or \\[compile-goto-error].")  or \\[compile-goto-error].")
# Line 143  to navigate in it.") Line 143  to navigate in it.")
143                                 &optional avoid-current                                 &optional avoid-current
144                                 extra-test-inclusive                                 extra-test-inclusive
145                                 extra-test-exclusive)                                 extra-test-exclusive)
146    "Test if BUFFER is a next-error capable buffer.    "Test if BUFFER is a `next-error' capable buffer.
147    
148  If AVOID-CURRENT is non-nil, treat the current buffer  If AVOID-CURRENT is non-nil, treat the current buffer
149  as an absolute last resort only.  as an absolute last resort only.
# Line 170  that buffer is rejected." Line 170  that buffer is rejected."
170  (defun next-error-find-buffer (&optional avoid-current  (defun next-error-find-buffer (&optional avoid-current
171                                           extra-test-inclusive                                           extra-test-inclusive
172                                           extra-test-exclusive)                                           extra-test-exclusive)
173    "Return a next-error capable buffer.    "Return a `next-error' capable buffer.
174  If AVOID-CURRENT is non-nil, treat the current buffer  If AVOID-CURRENT is non-nil, treat the current buffer
175  as an absolute last resort only.  as an absolute last resort only.
176    
# Line 223  that buffer is rejected." Line 223  that buffer is rejected."
223     (error "No next-error capable buffer found")))     (error "No next-error capable buffer found")))
224    
225  (defun next-error (&optional arg reset)  (defun next-error (&optional arg reset)
226    "Visit next next-error message and corresponding source code.    "Visit next `next-error' message and corresponding source code.
227    
228  If all the error messages parsed so far have been processed already,  If all the error messages parsed so far have been processed already,
229  the message buffer is checked for new ones.  the message buffer is checked for new ones.
# Line 264  See variables `compilation-parse-errors- Line 264  See variables `compilation-parse-errors-
264  (defalias 'next-match 'next-error)  (defalias 'next-match 'next-error)
265    
266  (defun previous-error (&optional n)  (defun previous-error (&optional n)
267    "Visit previous next-error message and corresponding source code.    "Visit previous `next-error' message and corresponding source code.
268    
269  Prefix arg N says how many error messages to move backwards (or  Prefix arg N says how many error messages to move backwards (or
270  forwards, if negative).  forwards, if negative).
# Line 282  This operates on the output from the \\[ Line 282  This operates on the output from the \\[
282    (next-error n t))    (next-error n t))
283    
284  (defun next-error-no-select (&optional n)  (defun next-error-no-select (&optional n)
285    "Move point to the next error in the next-error buffer and highlight match.    "Move point to the next error in the `next-error' buffer and highlight match.
286  Prefix arg N says how many error messages to move forwards (or  Prefix arg N says how many error messages to move forwards (or
287  backwards, if negative).  backwards, if negative).
288  Finds and highlights the source line like \\[next-error], but does not  Finds and highlights the source line like \\[next-error], but does not
# Line 293  select the source buffer." Line 293  select the source buffer."
293    (pop-to-buffer next-error-last-buffer))    (pop-to-buffer next-error-last-buffer))
294    
295  (defun previous-error-no-select (&optional n)  (defun previous-error-no-select (&optional n)
296    "Move point to the previous error in the next-error buffer and highlight match.    "Move point to the previous error in the `next-error' buffer and highlight match.
297  Prefix arg N says how many error messages to move backwards (or  Prefix arg N says how many error messages to move backwards (or
298  forwards, if negative).  forwards, if negative).
299  Finds and highlights the source line like \\[previous-error], but does not  Finds and highlights the source line like \\[previous-error], but does not
# Line 426  than the value of `fill-column' and ARG Line 426  than the value of `fill-column' and ARG
426    
427  (defun open-line (n)  (defun open-line (n)
428    "Insert a newline and leave point before it.    "Insert a newline and leave point before it.
429  If there is a fill prefix and/or a left-margin, insert them on the new line  If there is a fill prefix and/or a `left-margin', insert them
430  if the line would have been blank.  on the new line if the line would have been blank.
431  With arg N, insert N newlines."  With arg N, insert N newlines."
432    (interactive "*p")    (interactive "*p")
433    (let* ((do-fill-prefix (and fill-prefix (bolp)))    (let* ((do-fill-prefix (and fill-prefix (bolp)))
# Line 449  With arg N, insert N newlines." Line 449  With arg N, insert N newlines."
449  (defun split-line (&optional arg)  (defun split-line (&optional arg)
450    "Split current line, moving portion beyond point vertically down.    "Split current line, moving portion beyond point vertically down.
451  If the current line starts with `fill-prefix', insert it on the new  If the current line starts with `fill-prefix', insert it on the new
452  line as well.  With prefix ARG, don't insert fill-prefix on new line.  line as well.  With prefix ARG, don't insert `fill-prefix' on new line.
453    
454  When called from Lisp code, ARG may be a prefix string to copy."  When called from Lisp code, ARG may be a prefix string to copy."
455    (interactive "*P")    (interactive "*P")
# Line 647  Leave one space or none, according to th Line 647  Leave one space or none, according to th
647              (save-excursion (forward-char -1)              (save-excursion (forward-char -1)
648                              (looking-at "$\\|\\s(\\|\\s'")))                              (looking-at "$\\|\\s(\\|\\s'")))
649          nil          nil
650        (insert ?\ ))))        (insert ?\s))))
651    
652  (defun delete-horizontal-space (&optional backward-only)  (defun delete-horizontal-space (&optional backward-only)
653    "Delete all spaces and tabs around point.    "Delete all spaces and tabs around point.
# Line 671  If BACKWARD-ONLY is non-nil, only delete Line 671  If BACKWARD-ONLY is non-nil, only delete
671      (skip-chars-backward " \t")      (skip-chars-backward " \t")
672      (constrain-to-field nil orig-pos)      (constrain-to-field nil orig-pos)
673      (dotimes (i (or n 1))      (dotimes (i (or n 1))
674        (if (= (following-char) ?\ )        (if (= (following-char) ?\s)
675            (forward-char 1)            (forward-char 1)
676          (insert ?\ )))          (insert ?\s)))
677      (delete-region      (delete-region
678       (point)       (point)
679       (progn       (progn
# Line 1274  by the new completion." Line 1274  by the new completion."
1274  ;; For compatibility with the old subr of the same name.  ;; For compatibility with the old subr of the same name.
1275  (defun minibuffer-prompt-width ()  (defun minibuffer-prompt-width ()
1276    "Return the display width of the minibuffer prompt.    "Return the display width of the minibuffer prompt.
1277  Return 0 if current buffer is not a mini-buffer."  Return 0 if current buffer is not a minibuffer."
1278    ;; Return the width of everything before the field at the end of    ;; Return the width of everything before the field at the end of
1279    ;; the buffer; this should be 0 for normal buffers.    ;; the buffer; this should be 0 for normal buffers.
1280    (1- (minibuffer-prompt-end)))    (1- (minibuffer-prompt-end)))
# Line 2345  handler, if non-nil, is stored as a `yan Line 2345  handler, if non-nil, is stored as a `yan
2345    
2346  When the yank handler has a non-nil PARAM element, the original STRING  When the yank handler has a non-nil PARAM element, the original STRING
2347  argument is not used by `insert-for-yank'.  However, since Lisp code  argument is not used by `insert-for-yank'.  However, since Lisp code
2348  may access and use elements from the kill-ring directly, the STRING  may access and use elements from the kill ring directly, the STRING
2349  argument should still be a \"useful\" string for such uses."  argument should still be a \"useful\" string for such uses."
2350    (if (> (length string) 0)    (if (> (length string) 0)
2351        (if yank-handler        (if yank-handler
# Line 2684  and KILLP is t if a prefix arg was speci Line 2684  and KILLP is t if a prefix arg was speci
2684                (let ((col (current-column)))                (let ((col (current-column)))
2685                  (forward-char -1)                  (forward-char -1)
2686                  (setq col (- col (current-column)))                  (setq col (- col (current-column)))
2687                  (insert-char ?\  col)                  (insert-char ?\s col)
2688                  (delete-char 1)))                  (delete-char 1)))
2689            (forward-char -1)            (forward-char -1)
2690            (setq count (1- count))))))            (setq count (1- count))))))
# Line 4075  Just \\[universal-argument] as argument Line 4075  Just \\[universal-argument] as argument
4075        (setq arg (current-column)))        (setq arg (current-column)))
4076    (if (not (integerp arg))    (if (not (integerp arg))
4077        ;; Disallow missing argument; it's probably a typo for C-x C-f.        ;; Disallow missing argument; it's probably a typo for C-x C-f.
4078        (error "Set-fill-column requires an explicit argument")        (error "set-fill-column requires an explicit argument")
4079      (message "Fill column set to %d (was %d)" arg fill-column)      (message "Fill column set to %d (was %d)" arg fill-column)
4080      (setq fill-column arg)))      (setq fill-column arg)))
4081    
# Line 4155  with the character typed. Line 4155  with the character typed.
4155  typing characters do.  typing characters do.
4156    
4157  Note that binary overwrite mode is not its own minor mode; it is a  Note that binary overwrite mode is not its own minor mode; it is a
4158  specialization of overwrite-mode, entered by setting the  specialization of overwrite mode, entered by setting the
4159  `overwrite-mode' variable to `overwrite-mode-binary'."  `overwrite-mode' variable to `overwrite-mode-binary'."
4160    (interactive "P")    (interactive "P")
4161    (setq overwrite-mode    (setq overwrite-mode
# Line 4999  PREFIX is the string that represents thi Line 4999  PREFIX is the string that represents thi
4999       (define-key function-key-map (vector keypad) (vector normal))))       (define-key function-key-map (vector keypad) (vector normal))))
5000   '((kp-0 ?0) (kp-1 ?1) (kp-2 ?2) (kp-3 ?3) (kp-4 ?4)   '((kp-0 ?0) (kp-1 ?1) (kp-2 ?2) (kp-3 ?3) (kp-4 ?4)
5001     (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)     (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
5002     (kp-space ?\ )     (kp-space ?\s)
5003     (kp-tab ?\t)     (kp-tab ?\t)
5004     (kp-enter ?\r)     (kp-enter ?\r)
5005     (kp-multiply ?*)     (kp-multiply ?*)
# Line 5140  or by incrementing the N in an existing Line 5140  or by incrementing the N in an existing
5140  DISPLAY-FLAG non-nil means show the new buffer with `pop-to-buffer'.  DISPLAY-FLAG non-nil means show the new buffer with `pop-to-buffer'.
5141  This is always done when called interactively.  This is always done when called interactively.
5142    
5143  Optional last arg NORECORD non-nil means do not put this buffer at the  Optional third arg NORECORD non-nil means do not put this buffer at the
5144  front of the list of recently selected ones."  front of the list of recently selected ones."
5145    (interactive    (interactive
5146     (progn     (progn

Legend:
Removed from v.1.739  
changed lines
  Added in v.1.740

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26