From f323e507d04d854d6626e1971d740a22600f4c67 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 01:34:22 +0000 Subject: [PATCH 001/560] (setup_for_ellipsis, get_next_display_element): Set it->ellipsis_p to 1 or 0. (display_line): Record whether row ends in mid-ellipsis. (set_cursor_from_row): If ends in ellipsis. find start of it. (cursor_row_p): If PT's at the end of the ellipsis the row ends within, don't display cursor on this row. (BUFFER_POS_REACHED_P): We haven't reached the specified position if we're reading from something other than the buffer. --- src/xdisp.c | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 61ea98b37ef..91ef0249045 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3270,6 +3270,7 @@ setup_for_ellipsis (it, len) IT's face is restored in set_iterator_to_next. */ it->saved_face_id = it->face_id; it->method = next_element_from_display_vector; + it->ellipsis_p = 1; } @@ -4912,6 +4913,7 @@ get_next_display_element (it) it->current.dpvec_index = 0; it->saved_face_id = it->face_id; it->method = next_element_from_display_vector; + it->ellipsis_p = 0; } else { @@ -5062,6 +5064,7 @@ get_next_display_element (it) it->current.dpvec_index = 0; it->saved_face_id = it->face_id; it->method = next_element_from_display_vector; + it->ellipsis_p = 0; goto get_next; } } @@ -5703,10 +5706,11 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) saved_glyph_row = it->glyph_row; it->glyph_row = NULL; -#define BUFFER_POS_REACHED_P() \ - ((op & MOVE_TO_POS) != 0 \ - && BUFFERP (it->object) \ - && IT_CHARPOS (*it) >= to_charpos) +#define BUFFER_POS_REACHED_P() \ + ((op & MOVE_TO_POS) != 0 \ + && BUFFERP (it->object) \ + && IT_CHARPOS (*it) >= to_charpos \ + && it->method == next_element_from_buffer) while (1) { @@ -10812,6 +10816,18 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) glyph = cursor; x = cursor_x; } + else if (row->ends_in_ellipsis_p && glyph == end) + { + /* Scan back over the ellipsis glyphs, decrementing positions. */ + while (glyph > row->glyphs[TEXT_AREA] + && (glyph - 1)->charpos == last_pos) + glyph--, x -= glyph->pixel_width; + /* That loop always goes one position too far, + including the glyph before the ellipsis. + So scan forward over that one. */ + x += glyph->pixel_width; + glyph++; + } else if (string_start && (glyph == end || !BUFFERP (glyph->object) || last_pos > pt_old)) { @@ -14613,10 +14629,22 @@ cursor_row_p (w, row) /* If the row ends with a newline from a string, we don't want the cursor there (if the row is continued it doesn't end in a newline). */ - if (CHARPOS (row->end.string_pos) >= 0 - || MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)) + if (CHARPOS (row->end.string_pos) >= 0) cursor_row_p = row->continued_p; - + else if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row)) + { + /* If the row ends in middle of a real character, + and the line is continued, we want the cursor here. + That's because MATRIX_ROW_END_CHARPOS would equal + PT if PT is before the character. */ + if (!row->ends_in_ellipsis_p) + cursor_row_p = row->continued_p; + else + /* If the row ends in an ellipsis, then + MATRIX_ROW_END_CHARPOS will equal point after the invisible text. + We want that position to be displayed after the ellipsis. */ + cursor_row_p = 0; + } /* If the row ends at ZV, display the cursor at the end of that row instead of at the start of the row below. */ else if (row->ends_at_zv_p) @@ -15093,6 +15121,11 @@ display_line (it) /* Remember the position at which this line ends. */ row->end = it->current; + /* Record whether this row ends inside an ellipsis. */ + row->ends_in_ellipsis_p + = (it->method == next_element_from_display_vector + && it->ellipsis_p); + /* Save fringe bitmaps in this row. */ row->left_user_fringe_bitmap = it->left_user_fringe_bitmap; row->left_user_fringe_face_id = it->left_user_fringe_face_id; From b437860aadfd97807b3fcdee9c1e8808c03ba312 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 01:36:48 +0000 Subject: [PATCH 002/560] (struct it): New element ellipsis_p. (struct glyph_row): New element ends_in_ellipsis_p. --- src/ChangeLog | 13 +++++++++++++ src/dispextern.h | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 494f45f9af8..6e725eef287 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,19 @@ 2004-12-31 Richard M. Stallman + * xdisp.c (setup_for_ellipsis, get_next_display_element): + Set it->ellipsis_p to 1 or 0. + (display_line): Record whether row ends in mid-ellipsis. + (set_cursor_from_row): If ends in ellipsis. find start of it. + (cursor_row_p): If PT's at the end of the ellipsis the row + ends within, don't display cursor on this row. + + * dispextern.h (struct it): New element ellipsis_p. + (struct glyph_row): New element ends_in_ellipsis_p. + + * xdisp.c (BUFFER_POS_REACHED_P): We haven't reached the specified + position if we're reading from something other than the buffer. + * window.c (window_scroll_pixel_based): Only look at Vscroll_preserve_screen_position if the old PT can't be kept. (syms_of_window) : Doc fix. diff --git a/src/dispextern.h b/src/dispextern.h index c9d85065e78..a6f12a04b45 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -817,6 +817,9 @@ struct glyph_row /* 1 means this row currently shows the cursor in the right fringe. */ unsigned cursor_in_fringe_p : 1; + /* 1 means the last glyph in the row is part of an ellipsis. */ + unsigned ends_in_ellipsis_p : 1; + /* Non-zero means display a bitmap on X frames indicating that this the first line of the buffer. */ unsigned indicate_bob_p : 1; @@ -1825,6 +1828,10 @@ struct it Don't handle some `display' properties in these strings. */ unsigned string_from_display_prop_p : 1; + /* When METHOD == next_element_from_display_vector, + this is 1 if we're doing an ellipsis. Otherwise meaningless. */ + unsigned ellipsis_p : 1; + /* Display table in effect or null for none. */ struct Lisp_Char_Table *dp; From c734ae59326fb107e3b5d6078fd19d5f45451b67 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 03:51:46 +0000 Subject: [PATCH 003/560] (Timers): Update previous change. --- lispref/ChangeLog | 4 ++++ lispref/os.texi | 13 ++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index c245d26870d..5d727172dba 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2004-12-31 Richard M. Stallman + + * os.texi (Timers): Update previous change. + 2004-12-30 Kim F. Storm * display.texi (Line Height): Total line-height is now specified diff --git a/lispref/os.texi b/lispref/os.texi index 36d7f960850..ebc27224c96 100644 --- a/lispref/os.texi +++ b/lispref/os.texi @@ -1368,10 +1368,10 @@ because most timer functions don't do a lot of work. Indeed, for a timer to call a function that takes substantial time to run is likely to be annoying. - Timer functions should normally not alter the current buffer -contents, but it may be ok to alter some other buffer that exists for -special purposes. A general guideline is that if a buffer has undo -enabled, timers should not write in it. + It is usually a bad idea for timer functions to alter buffer +contents. When they do, they usually should call @code{undo-boundary} +both before and after changing the buffer, to separate the timer's +changes from user commands' changes. @deffn Command run-at-time time repeat function &rest args This sets up a timer that calls the function @var{function} with @@ -1486,11 +1486,6 @@ minutes, and even if there have been garbage collections and autosaves. input. Then it becomes idle again, and all the idle timers that are set up to repeat will subsequently run another time, one by one. - It is legitimate for an idle timer to edit the current buffer. If -it does, it should explicitly call @code{undo-boundary} once at the -beginning and once just before exiting, since Emacs won't do that -automatically for an idle timer. - @defun cancel-timer timer Cancel the requested action for @var{timer}, which should be a value previously returned by @code{run-at-time} or @code{run-with-idle-timer}. From 1f67b1dd31621352468427d4228639f062aa9bc4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 05:02:09 +0000 Subject: [PATCH 004/560] (Killing): Reorganize section. No more TeX-only text; put the node command at start of chapter. But the first section heading is used only in TeX. Rewrite the text to read better in this mode. (Graphical Kill): New subnode gets some of the text that used to be in the first section. --- man/killing.texi | 117 +++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/man/killing.texi b/man/killing.texi index 23ffd2b709a..8b629328a45 100644 --- a/man/killing.texi +++ b/man/killing.texi @@ -2,48 +2,47 @@ @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001,2004 @c Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. -@iftex + +@node Killing, Yanking, Mark, Top @chapter Killing and Moving Text - @dfn{Killing} means erasing text and copying it into the @dfn{kill -ring}, from which it can be retrieved by @dfn{yanking} it. Some systems -use the terms ``cutting'' and ``pasting'' for these operations. - - The most common way of moving or copying text within Emacs is to kill it -and later yank it elsewhere in one or more places. This is very safe -because Emacs remembers several recent kills, not just the last one. It -is versatile, because the many commands for killing syntactic units can -also be used for moving those units. But there are other ways of -copying text for special purposes. - - On terminals that support multiple windows for multiple applications, -the kill commands also provide a way to select text for other applications -to copy, and the Emacs yank commands can access selections made by -other programs. - - Emacs has only one kill ring for all buffers, so you can kill text in -one buffer and yank it in another buffer. - -@end iftex - @ifnottex @raisesections @end ifnottex -@node Killing, Yanking, Mark, Top + @dfn{Killing} means erasing text and copying it into the @dfn{kill +ring}, from which you can bring it back into the buffer by +@dfn{yanking} it. (Some systems use the terms ``cutting'' and +``pasting'' for these operations.) This is the most common way of +moving or copying text within Emacs. Killing and yanking is very safe +because Emacs remembers several recent kills, not just the last one. +It is versatile, because the many commands for killing syntactic units +can also be used for moving those units. But there are other ways of +copying text for special purposes. + +@iftex @section Deletion and Killing +@end iftex @cindex killing text @cindex cutting text @cindex deletion - Most commands which erase text from the buffer save it in the @dfn{kill -ring} so that you can move or copy it to other parts of the buffer. -These commands are known as @dfn{kill} commands. The rest of the -commands that erase text do not save it in the kill ring; they are known -as @dfn{delete} commands. (This distinction is made only for erasure of -text in the buffer.) If you do a kill or delete command by mistake, you -can use the @kbd{C-x u} (@code{undo}) command to undo it -(@pxref{Undo}). + Most commands which erase text from the buffer save it in the kill +ring. These commands are known as @dfn{kill} commands. The commands +that erase text but do not save it in the kill ring are known as +@dfn{delete} commands. The @kbd{C-x u} (@code{undo}) command +(@pxref{Undo}) can undo both kill and delete commands; the importance +of the kill ring is that you can also yank the text in a different +place or places. Emacs has only one kill ring for all buffers, so you +can kill text in one buffer and yank it in another buffer. + + The delete commands include @kbd{C-d} (@code{delete-char}) and +@key{DEL} (@code{delete-backward-char}), which delete only one +character at a time, and those commands that delete only spaces or +newlines. Commands that can erase significant amounts of nontrivial +data generally do a kill operation instead. The commands' names and +individual descriptions use the words @samp{kill} and @samp{delete} to +say which kind of operation they perform. @vindex kill-read-only-ok @cindex read-only text, killing @@ -52,34 +51,10 @@ kind of modification. But some users like to use the kill commands to copy read-only text into the kill ring, without actually changing it. Therefore, the kill commands work specially in a read-only buffer: they move over text, and copy it to the kill ring, without actually -deleting it from the buffer. Normally, Emacs beeps and prints an -error message when this happens. But if you set the variable -@code{kill-read-only-ok} to a non-@code{nil} value, it just prints a -message in the echo area, telling you what is happening. - - The delete commands include @kbd{C-d} (@code{delete-char}) and -@key{DEL} (@code{delete-backward-char}), which delete only one -character at a time, and those commands that delete only spaces or -newlines. Commands that can destroy significant amounts of nontrivial -data generally do a kill operation instead. The commands' names and -individual descriptions use the words @samp{kill} and @samp{delete} to -say which kind of operation they perform. - - On window systems, the most recent kill done in Emacs is also the -primary selection, if it is more recent than any selection you made in -another program. This means that the paste commands of other window -applications copy the text that you killed in Emacs. - -@cindex Delete Selection mode -@cindex mode, Delete Selection -@findex delete-selection-mode - Many window systems follow the convention that insertion while text -is selected deletes the selected text. You can make Emacs behave this -way by enabling Delete Selection mode, with @kbd{M-x -delete-selection-mode}, or using Custom. Another effect of this mode -is that @key{DEL}, @kbd{C-d} and some other keys, when a selection -exists, will kill the whole selection. It also enables Transient Mark -mode (@pxref{Transient Mark}). +deleting it from the buffer. Normally, kill commands beep and display +an error message when this happens. But if you set the variable +@code{kill-read-only-ok} to a non-@code{nil} value, they just print a +message in the echo area to explain why the text has not been erased. @menu * Deletion:: Commands for deleting small amounts of text and @@ -87,6 +62,8 @@ mode (@pxref{Transient Mark}). * Killing by Lines:: How to kill entire lines of text at one time. * Other Kill Commands:: Commands to kill large regions of text and syntactic units such as words and sentences. +* Graphical Kill:: The kill ring on graphical terminals: + yanking between applications. @end menu @need 1500 @@ -652,6 +629,28 @@ rectangle shifts right. @code{string-rectangle}, but inserts the string on each line, shifting the original text to the right. +@node Graphical Kill +@section Killing on Graphical Terminals + + On multi-window terminals, the most recent kill done in Emacs is +also the primary selection, if it is more recent than any selection +you made in another program. This means that the paste commands of +other applications with separate windows copy the text that you killed +in Emacs. In addition, Emacs yank commands treat other applications' +selections as part of the kill ring, so you can yank them into Emacs. + +@cindex Delete Selection mode +@cindex mode, Delete Selection +@findex delete-selection-mode + Many window systems follow the convention that insertion while text +is selected deletes the selected text. You can make Emacs behave this +way by enabling Delete Selection mode, with @kbd{M-x +delete-selection-mode}, or using Custom. Another effect of this mode +is that @key{DEL}, @kbd{C-d} and some other keys, when a selection +exists, will kill the whole selection. It also enables Transient Mark +mode (@pxref{Transient Mark}). + + @ifnottex @lowersections @end ifnottex From 6854d7a1f4f9e11149599f0e4d7843c5700437b9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 05:02:35 +0000 Subject: [PATCH 005/560] (Top): Update Killing submenu. --- man/ChangeLog | 11 +++++++++++ man/emacs.texi | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/man/ChangeLog b/man/ChangeLog index 5e00b01f526..5d8208aaf41 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,14 @@ +2005-01-01 Richard M. Stallman + + * emacs.texi (Top): Update Killing submenu. + + * killing.texi (Killing): Reorganize section. + No more TeX-only text; put the node command at start of chapter. + But the first section heading is used only in TeX. + Rewrite the text to read better in this mode. + (Graphical Kill): New subnode gets some of the text that + used to be in the first section. + 2004-12-31 Richard M. Stallman * dired.texi (Shell Commands in Dired): Delete the ? example. diff --git a/man/emacs.texi b/man/emacs.texi index 4e76ca5aca3..340bcd76516 100644 --- a/man/emacs.texi +++ b/man/emacs.texi @@ -278,13 +278,15 @@ The Mark and the Region * Mark Ring:: Previous mark positions saved so you can go back there. * Global Mark Ring:: Previous mark positions in various buffers. -Deletion and Killing +Killing * Deletion:: Commands for deleting small amounts of text and blank areas. * Killing by Lines:: How to kill entire lines of text at one time. * Other Kill Commands:: Commands to kill large regions of text and syntactic units such as words and sentences. +* Graphical Kill:: The kill ring on graphical terminals: + yanking between applications. Yanking From 41d0b0929ca5e9535b52422168a17055fb071a7d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 1 Jan 2005 13:07:59 +0000 Subject: [PATCH 006/560] *** empty log message *** --- lisp/ChangeLog | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0fab3f52791..8c84b370b49 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-01 Kim F. Storm + + * image.el (insert-sliced-image): Use t for line-height property. + 2004-12-31 Jay Belanger * calc/calc-store.el (calcVar-digit, calcVar-oper): Remove the need @@ -27,7 +31,7 @@ * progmodes/antlr-mode.el (antlr-mode): Use mode-require-final-newline. Delete old-Emacs compatibility code. (antlr-c-common-init): Function deleted. - + * net/snmp-mode.el (snmp-common-mode): Use mode-require-final-newline. * progmodes/vhdl-mode.el (vhdl-mode): Use mode-require-final-newline. * progmodes/simula.el (simula-mode): Use mode-require-final-newline. From 82dc617bfb55672c0581e5656beeb3e91036409a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 1 Jan 2005 13:08:33 +0000 Subject: [PATCH 007/560] (insert-sliced-image): Use t for line-height property. --- lisp/image.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/image.el b/lisp/image.el index 13fdf2f6e4c..9a6c93c04d1 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -263,7 +263,7 @@ The image is automatically split into ROW x COLS slices." (setq x (+ x dx)))) (setq x 0.0 y (+ y dy)) - (insert (propertize "\n" 'line-height 0))))) + (insert (propertize "\n" 'line-height t))))) From 6057489e9cf0f44d59fa596d988e1005ccd7d25b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 14:17:32 +0000 Subject: [PATCH 008/560] (Face Attributes): Describe hex color specs. --- lispref/display.texi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lispref/display.texi b/lispref/display.texi index 01ba338621b..b4254197e50 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -1636,7 +1636,7 @@ face name a special meaning in one frame if you wish. * Defining Faces:: How to define a face with @code{defface}. * Face Attributes:: What is in a face? * Attribute Functions:: Functions to examine and set face attributes. -* Merging Faces:: How Emacs combines the faces specified for a character. +* Displaying Faces:: How Emacs combines the faces specified for a character. * Font Selection:: Finding the best available font for a face. * Face Functions:: How to define and examine faces. * Auto Faces:: Hook for automatic face assignment. @@ -1941,10 +1941,14 @@ On a text-only terminal, slanted text is displayed as half-bright, if the terminal supports the feature. @item :foreground -Foreground color, a string. +Foreground color, a string. The value can be a system-defined color +name, or a hexadecimal color specification of the form +@samp{#@var{rr}@var{gg}@var{bb}}. (@samp{#000000} is black, +@samp{#ff0000} is red, @samp{#00ff00} is green, @samp{#0000ff} is +blue, and @samp{#ffffff} is white.) @item :background -Background color, a string. +Background color, a string, like the foreground color. @item :inverse-video Whether or not characters should be displayed in inverse video. The @@ -2265,8 +2269,8 @@ This function returns the @code{:underline} attribute of face @var{face}. This function returns the @code{:inverse-video} attribute of face @var{face}. @end defun -@node Merging Faces -@subsection Merging Faces for Display +@node Displaying Faces +@subsection Displaying Faces Here are the ways to specify which faces to use for display of text: From 4bbe6176dcfcf45521a4cba56d134a07d08bb30b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 14:18:22 +0000 Subject: [PATCH 009/560] (custom-face-attributes): Fix :help-echo strings for :foreground and :background. --- lisp/cus-face.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/cus-face.el b/lisp/cus-face.el index e3134e8f1ea..0f3f6018cfc 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -195,11 +195,11 @@ (:foreground (color :tag "Foreground" - :help-echo "Set foreground color.")) + :help-echo "Set foreground color (name or #RRGGBB hex spec).")) (:background (color :tag "Background" - :help-echo "Set background color.")) + :help-echo "Set background color (name or #RRGGBB hex spec).")) (:stipple (choice :tag "Stipple" From 3f68d7c8877606ae5ea1900b159e971bfb7cad57 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 14:20:10 +0000 Subject: [PATCH 010/560] (dired-view-command-alist): Variable deleted. (dired-view-file, dired-mouse-find-file-other-window): Delete the code to use it. --- lisp/ChangeLog | 11 +++++++++++ lisp/dired.el | 45 ++++----------------------------------------- 2 files changed, 15 insertions(+), 41 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8c84b370b49..d30176d1992 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2005-01-01 Richard M. Stallman + + * cus-face.el (custom-face-attributes): Fix :help-echo strings + for :foreground and :background. + +2004-12-31 Richard M. Stallman + + * dired.el (dired-view-command-alist): Variable deleted. + (dired-view-file, dired-mouse-find-file-other-window): + Delete the code to use it. + 2005-01-01 Kim F. Storm * image.el (insert-sliced-image): Use t for line-height property. diff --git a/lisp/dired.el b/lisp/dired.el index 037bf282eda..0341214a98e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -200,22 +200,6 @@ with the buffer narrowed to the listing." ;; Note this can't simply be run inside function `dired-ls' as the hook ;; functions probably depend on the dired-subdir-alist to be OK. -;; Fixme: This should use mailcap. -(defcustom dired-view-command-alist - '(("\\.\\(ps\\|ps_pages\\|eps\\)\\'" . "gv %s") - ("\\.pdf\\'" . "xpdf %s") - ;; ("\\.pod\\'" . "perldoc %s") - ("\\.\\(jpe?g\\|gif\\|png\\)\\'" . "eog %s") - ("\\.dvi\\'" . "xdvi %s")) - "Alist specifying how to view special types of files. -Each element has the form (REGEXP . SHELL-COMMAND). -When the file name matches REGEXP, `dired-view-file' -invokes SHELL-COMMAND to view the file, processing it through `format'. -Use `%s' in SHELL-COMMAND to specify where to put the file name." - :group 'dired - :type '(alist :key-type regexp :value-type string) - :version "21.4") - ;; Internal variables (defvar dired-marker-char ?* ; the answer is 42 @@ -1666,41 +1650,20 @@ Creates a buffer if necessary." (progn (select-window window) (dired-other-window file))) - (let (cmd) - ;; Look for some other way to view a certain file. - (dolist (elt dired-view-command-alist) - (if (string-match (car elt) file) - (setq cmd (cdr elt)))) - (if cmd - (call-process shell-file-name nil 0 nil - "-c" - (concat (format cmd (shell-quote-argument file)) - " &")) - (select-window window) - (find-file-other-window (file-name-sans-versions file t))))))) + (select-window window) + (find-file-other-window (file-name-sans-versions file t))))) (defun dired-view-file () "In Dired, examine a file in view mode, returning to dired when done. When file is a directory, show it in this buffer if it is inserted. -Some kinds of files are displayed using external viewer programs; -see `dired-view-command-alist'. Otherwise, display it in another buffer." +Otherwise, display it in another buffer." (interactive) (let ((file (dired-get-file-for-visit))) (if (file-directory-p file) (or (and (cdr dired-subdir-alist) (dired-goto-subdir file)) (dired file)) - (let (cmd) - ;; Look for some other way to view a certain file. - (dolist (elt dired-view-command-alist) - (if (string-match (car elt) file) - (setq cmd (cdr elt)))) - (if cmd - (call-process shell-file-name nil 0 nil - "-c" - (concat (format cmd (shell-quote-argument file)) - " &")) - (view-file file)))))) + (view-file file)))) (defun dired-find-file-other-window () "In Dired, visit this file or directory in another window." From 72e6f142bf3a325d1eb5b590f402d5ae6a0b61f1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 14:21:37 +0000 Subject: [PATCH 011/560] (set-face-background, set-face-foreground): Doc fix. --- lisp/faces.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 86fda8506d4..a234c902332 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -730,7 +730,9 @@ and `:slant'. When called interactively, prompt for the face and font." (defun set-face-background (face color &optional frame) "Change the background color of face FACE to COLOR (a string). FRAME nil or not specified means change face on all frames. -When called interactively, prompt for the face and color." +COLOR can be a system-defined color name (see `list-colors-display') +or a hex spec of the form #RRGGBB. +When called interactively, prompts for the face and color." (interactive (read-face-and-attribute :background)) (set-face-attribute face frame :background (or color 'unspecified))) @@ -738,7 +740,9 @@ When called interactively, prompt for the face and color." (defun set-face-foreground (face color &optional frame) "Change the foreground color of face FACE to COLOR (a string). FRAME nil or not specified means change face on all frames. -When called interactively, prompt for the face and color." +COLOR can be a system-defined color name (see `list-colors-display') +or a hex spec of the form #RRGGBB. +When called interactively, prompts for the face and color." (interactive (read-face-and-attribute :foreground)) (set-face-attribute face frame :foreground (or color 'unspecified))) From ee264870f880742284bb2c557cd0e2cf9b8b2e02 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 14:53:07 +0000 Subject: [PATCH 012/560] (Face Customization): Mention hex color specs. --- man/custom.texi | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/man/custom.texi b/man/custom.texi index d2eda054565..840711369ef 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -566,10 +566,15 @@ before the attribute name indicates whether the attribute is attribute by invoking that field. When the attribute is enabled, you can change the attribute value in the usual ways. - On a black-and-white display, the colors you can use for the -background are @samp{black}, @samp{white}, @samp{gray}, @samp{gray1}, -and @samp{gray3}. Emacs supports these shades of gray by using -background stipple patterns instead of a color. + For the colors, you can specify a color name (use @kbd{M-x +list-colors-display}) for a list of them) or a hexadecimal color +specification of the form @samp{#@var{rr}@var{gg}@var{bb}}. +(@samp{#000000} is black, @samp{#ff0000} is red, @samp{#00ff00} is +green, @samp{#0000ff} is blue, and @samp{#ffffff} is white.) On a +black-and-white display, the colors you can use for the background are +@samp{black}, @samp{white}, @samp{gray}, @samp{gray1}, and +@samp{gray3}. Emacs supports these shades of gray by using background +stipple patterns instead of a color. Setting, saving and resetting a face work like the same operations for options (@pxref{Changing an Option}). From 732bb9cede4fee3fe54f39ceec4ae6365e582a96 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 14:53:16 +0000 Subject: [PATCH 013/560] *** empty log message *** --- lisp/ChangeLog | 2 -- lispref/ChangeLog | 4 ++++ man/ChangeLog | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d30176d1992..f0daa4d93db 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,8 +3,6 @@ * cus-face.el (custom-face-attributes): Fix :help-echo strings for :foreground and :background. -2004-12-31 Richard M. Stallman - * dired.el (dired-view-command-alist): Variable deleted. (dired-view-file, dired-mouse-find-file-other-window): Delete the code to use it. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 5d727172dba..1591bffeb7a 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2005-01-01 Richard M. Stallman + + * display.texi (Face Attributes): Describe hex color specs. + 2004-12-31 Richard M. Stallman * os.texi (Timers): Update previous change. diff --git a/man/ChangeLog b/man/ChangeLog index 5d8208aaf41..67a1fe8d503 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,5 +1,7 @@ 2005-01-01 Richard M. Stallman + * custom.texi (Face Customization): Mention hex color specs. + * emacs.texi (Top): Update Killing submenu. * killing.texi (Killing): Reorganize section. From 132c96248b5cc28fdd729042f47e126e572d4aaa Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 1 Jan 2005 14:59:12 +0000 Subject: [PATCH 014/560] (Graphical Kill): Move up under node Killing, change @section to @subsection. --- man/ChangeLog | 5 +++++ man/killing.texi | 43 +++++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 67a1fe8d503..957a2279a2e 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-01 Andreas Schwab + + * killing.texi (Graphical Kill): Move up under node Killing, + change @section to @subsection. + 2005-01-01 Richard M. Stallman * custom.texi (Face Customization): Mention hex color specs. diff --git a/man/killing.texi b/man/killing.texi index 8b629328a45..ba136831adf 100644 --- a/man/killing.texi +++ b/man/killing.texi @@ -247,6 +247,27 @@ other buffers. Most of the kill commands move point across the text they copy in this way, so that successive kill commands build up a single kill ring entry as usual. +@node Graphical Kill +@subsection Killing on Graphical Terminals + + On multi-window terminals, the most recent kill done in Emacs is +also the primary selection, if it is more recent than any selection +you made in another program. This means that the paste commands of +other applications with separate windows copy the text that you killed +in Emacs. In addition, Emacs yank commands treat other applications' +selections as part of the kill ring, so you can yank them into Emacs. + +@cindex Delete Selection mode +@cindex mode, Delete Selection +@findex delete-selection-mode + Many window systems follow the convention that insertion while text +is selected deletes the selected text. You can make Emacs behave this +way by enabling Delete Selection mode, with @kbd{M-x +delete-selection-mode}, or using Custom. Another effect of this mode +is that @key{DEL}, @kbd{C-d} and some other keys, when a selection +exists, will kill the whole selection. It also enables Transient Mark +mode (@pxref{Transient Mark}). + @node Yanking, Accumulating Text, Killing, Top @section Yanking @cindex moving text @@ -629,28 +650,6 @@ rectangle shifts right. @code{string-rectangle}, but inserts the string on each line, shifting the original text to the right. -@node Graphical Kill -@section Killing on Graphical Terminals - - On multi-window terminals, the most recent kill done in Emacs is -also the primary selection, if it is more recent than any selection -you made in another program. This means that the paste commands of -other applications with separate windows copy the text that you killed -in Emacs. In addition, Emacs yank commands treat other applications' -selections as part of the kill ring, so you can yank them into Emacs. - -@cindex Delete Selection mode -@cindex mode, Delete Selection -@findex delete-selection-mode - Many window systems follow the convention that insertion while text -is selected deletes the selected text. You can make Emacs behave this -way by enabling Delete Selection mode, with @kbd{M-x -delete-selection-mode}, or using Custom. Another effect of this mode -is that @key{DEL}, @kbd{C-d} and some other keys, when a selection -exists, will kill the whole selection. It also enables Transient Mark -mode (@pxref{Transient Mark}). - - @ifnottex @lowersections @end ifnottex From a3a43b3be42be9db6a39db355ed65572c4671874 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sat, 1 Jan 2005 16:10:24 +0000 Subject: [PATCH 015/560] (Face Attributes): Correct xref to renamed node. --- lispref/ChangeLog | 4 ++++ lispref/display.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 1591bffeb7a..baddbd958fa 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2005-01-01 Luc Teirlinck + + * display.texi (Face Attributes): Correct xref to renamed node. + 2005-01-01 Richard M. Stallman * display.texi (Face Attributes): Describe hex color specs. diff --git a/lispref/display.texi b/lispref/display.texi index b4254197e50..344b00e7455 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -1890,7 +1890,7 @@ as if they had a light background. attributes}. This table lists all the face attributes, and what they mean. Note that in general, more than one face can be specified for a given piece of text; when that happens, the attributes of all the faces -are merged to specify how to display the text. @xref{Merging Faces}. +are merged to specify how to display the text. @xref{Displaying Faces}. In Emacs 21, any attribute in a face can have the value @code{unspecified}. This means the face doesn't specify that attribute. From 551b2a973611e1f7456ecb53441f4f8fe9edf6dd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 21:04:23 +0000 Subject: [PATCH 016/560] *** empty log message *** --- admin/FOR-RELEASE | 6 ------ 1 file changed, 6 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 8cc1ac9cbcf..797e0d6c277 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -62,12 +62,6 @@ further. I think in the near future we will see more of this problem, so it might be time to make anfe-ftp more intelligent. -** Mailabbrev should quote addresses to correspond to RFC 822. -See http://article.gmane.org/gmane.emacs.devel/27585 - -** The '@' character should not expand addresses in mailabbrev -See http://article.gmane.org/gmane.emacs.devel/27585 - ** Bug in url-http-parse-headers, reported in From: Vivek Dasmohapatra Date: Tue, 28 Sep 2004 16:13:13 +0100 From c430597dfc185d8b5ac65937176e33dcdcd61d0b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 1 Jan 2005 22:24:03 +0000 Subject: [PATCH 017/560] Typo. --- lisp/gnus/imap.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index 6ef8dfa5fe2..d14c673e7b9 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el @@ -1,5 +1,5 @@ ;;; imap.el --- imap library -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 ;; Free Software Foundation, Inc. ;; Author: Simon Josefsson @@ -69,7 +69,7 @@ ;; imap-message-append, imap-envelope-from ;; imap-body-lines ;; -;; It is my hope that theese commands should be pretty self +;; It is my hope that these commands should be pretty self ;; explanatory for someone that know IMAP. All functions have ;; additional documentation on how to invoke them. ;; @@ -325,7 +325,7 @@ for doing the actual authentication.") (defvar imap-error nil "Error codes from the last command.") -;; Internal constants. Change theese and die. +;; Internal constants. Change these and die. (defconst imap-default-port 143) (defconst imap-default-ssl-port 993) @@ -1456,7 +1456,7 @@ or 'unseen. The IMAP command tag is returned." (defun imap-fetch (uids props &optional receive nouidfetch buffer) "Fetch properties PROPS from message set UIDS from server in BUFFER. UIDS can be a string, number or a list of numbers. If RECEIVE -is non-nil return theese properties." +is non-nil return these properties." (with-current-buffer (or buffer (current-buffer)) (when (imap-ok-p (imap-send-command-wait (format "%sFETCH %s %s" (if nouidfetch "" "UID ") From f42a241b8e49696ac5b6512a43244f1680a9ea56 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jan 2005 22:29:54 +0000 Subject: [PATCH 018/560] (occur-1): If the output buffer is also an input, don't kill it, rename it. --- lisp/ChangeLog | 5 ++++ lisp/replace.el | 72 ++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0daa4d93db..1cdc9ba9cf5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2005-01-01 Richard M. Stallman + * replace.el (occur-1): If the output buffer is also an input, + don't kill it, rename it. + + * faces.el (set-face-background, set-face-foreground): Doc fix. + * cus-face.el (custom-face-attributes): Fix :help-echo strings for :foreground and :background. diff --git a/lisp/replace.el b/lisp/replace.el index 775ad0ffb05..8820a768006 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -736,9 +736,12 @@ Compatibility function for \\[next-error] invocations." (interactive "p") ;; we need to run occur-find-match from within the Occur buffer (with-current-buffer + ;; Choose the buffer and make it current. (if (next-error-buffer-p (current-buffer)) (current-buffer) - (next-error-find-buffer nil nil (lambda() (eq major-mode 'occur-mode)))) + (next-error-find-buffer nil nil + (lambda () + (eq major-mode 'occur-mode)))) (goto-char (cond (reset (point-min)) ((< argp 0) (line-beginning-position)) @@ -918,17 +921,20 @@ See also `multi-occur'." (defun occur-1 (regexp nlines bufs &optional buf-name) (unless buf-name (setq buf-name "*Occur*")) - (let ((occur-buf (get-buffer-create buf-name)) - (made-temp-buf nil) + (let (occur-buf (active-bufs (delq nil (mapcar #'(lambda (buf) (when (buffer-live-p buf) buf)) bufs)))) ;; Handle the case where one of the buffers we're searching is the - ;; *Occur* buffer itself. - (when (memq occur-buf bufs) - (setq occur-buf (with-current-buffer occur-buf - (clone-buffer "*Occur-temp*")) - made-temp-buf t)) + ;; output buffer. Just rename it. + (when (member buf-name (mapcar 'buffer-name active-bufs)) + (with-current-buffer (get-buffer buf-name) + (rename-uniquely))) + + ;; Now find or create the output buffer. + ;; If we just renamed that buffer, we will make a new one here. + (setq occur-buf (get-buffer-create buf-name)) + (with-current-buffer occur-buf (setq buffer-read-only nil) (occur-mode) @@ -948,12 +954,6 @@ See also `multi-occur'." (if (zerop count) "no" (format "%d" count)) (if (= count 1) "" "es") regexp)) - ;; If we had to make a temporary buffer, make it the *Occur* - ;; buffer now. - (when made-temp-buf - (with-current-buffer (get-buffer buf-name) - (kill-buffer (current-buffer))) - (rename-buffer buf-name)) (setq occur-revert-arguments (list regexp nlines bufs) buffer-read-only t) (if (> count 0) @@ -1258,6 +1258,27 @@ passed in. If LITERAL is set, no checking is done, anyway." (replace-match newtext fixedcase literal) noedit) +(defcustom query-replace-highlight t + "*Non-nil means to highlight matches during query replacement." + :type 'boolean + :group 'matching) + +(defcustom query-replace-lazy-highlight t + "*Controls the lazy-highlighting during query replacements. +When non-nil, all text in the buffer matching the current match +is highlighted lazily using isearch lazy highlighting (see +`isearch-lazy-highlight-initial-delay' and +`isearch-lazy-highlight-interval')." + :type 'boolean + :group 'matching + :version "21.4") + +(defface query-replace + '((t (:inherit isearch))) + "Face for highlighting query replacement matches." + :group 'matching + :version "21.4") + (defun perform-replace (from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end) @@ -1601,27 +1622,6 @@ make, or the user didn't cancel the call." (if (= replace-count 1) "" "s"))) (and keep-going stack))) -(defcustom query-replace-highlight t - "*Non-nil means to highlight matches during query replacement." - :type 'boolean - :group 'matching) - -(defcustom query-replace-lazy-highlight t - "*Controls the lazy-highlighting during query replacements. -When non-nil, all text in the buffer matching the current match -is highlighted lazily using isearch lazy highlighting (see -`isearch-lazy-highlight-initial-delay' and -`isearch-lazy-highlight-interval')." - :type 'boolean - :group 'matching - :version "21.4") - -(defface query-replace - '((t (:inherit isearch))) - "Face for highlighting query replacement matches." - :group 'matching - :version "21.4") - (defvar replace-overlay nil) (defun replace-highlight (beg end) @@ -1638,7 +1638,7 @@ is highlighted lazily using isearch lazy highlighting (see (when replace-overlay (delete-overlay replace-overlay)) (when query-replace-lazy-highlight - (isearch-lazy-highlight-cleanup isearch-lazy-highlight-cleanup) + (isearch-lazy-highlight-cleanup lazy-highlight-cleanup) (setq isearch-lazy-highlight-last-string nil))) ;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 From 4c759a327f3216d5c514e818d779d9678876ed43 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jan 2005 01:20:14 +0000 Subject: [PATCH 019/560] (copy-region-as-kill): Deactivate mark. --- lisp/ses.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ses.el b/lisp/ses.el index e10d8c6360e..2a952aab286 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1,6 +1,6 @@ ;;; ses.el -- Simple Emacs Spreadsheet -*- coding: utf-8 -*- -;; Copyright (C) 2002,03,04 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Jonathan Yavner ;; Maintainer: Jonathan Yavner @@ -2331,7 +2331,10 @@ hard to override how mouse-1 works." (eq (get-text-property beg 'read-only) 'ses) (eq (get-text-property (1- end) 'read-only) 'ses))) ad-do-it ;Normal copy-region-as-kill - (kill-new (ses-copy-region beg end)))) + (kill-new (ses-copy-region beg end)) + (if transient-mark-mode + (setq deactivate-mark t)) + nil)) (defun ses-copy-region (beg end) "Treat the region as rectangular. Convert the intangible attributes to From e5cb26a84c0385d2139b40ed7e8644f8f299e291 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jan 2005 01:20:33 +0000 Subject: [PATCH 020/560] (hack-local-variables): Cleanup prefix/suffix matching. --- lisp/files.el | 57 ++++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index d1340235ea5..cfee975066d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1,7 +1,7 @@ ;;; files.el --- file input and output commands for Emacs -;; Copyright (C) 1985,86,87,92,93,94,95,96,97,98,99,2000,01,02,03,2004 -;;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +;; 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF @@ -2218,31 +2218,27 @@ is specified, returning t if it is specified." buffer-file-name) (concat "buffer " (buffer-name)))))))))) - (let (prefix suffix beg - (enable-local-eval enable-local-eval)) - ;; The prefix is what comes before "local variables:" in its line. - ;; The suffix is what comes after "local variables:" in its line. - (skip-chars-forward " \t") - (or (eolp) - (setq suffix (buffer-substring (point) - (progn (end-of-line) (point))))) - (goto-char (match-beginning 0)) - (or (bolp) - (setq prefix - (buffer-substring (point) - (progn (beginning-of-line) (point))))) + (skip-chars-forward " \t") + (let ((enable-local-eval enable-local-eval) + ;; suffix is what comes after "local variables:" in its line. + (suffix + (concat + (regexp-quote (buffer-substring (point) (line-end-position))) + "$")) + ;; prefix is what comes before "local variables:" in its line. + (prefix + (concat "^" (regexp-quote + (buffer-substring (line-beginning-position) + (match-beginning 0))))) + beg) - (setq prefix (if prefix (regexp-quote prefix) "^")) - (if suffix (setq suffix (concat (regexp-quote suffix) "$"))) (forward-line 1) (let ((startpos (point)) endpos (thisbuf (current-buffer))) (save-excursion (if (not (re-search-forward - (concat (or prefix "") - "[ \t]*End:[ \t]*" - (or suffix "")) + (concat prefix "[ \t]*End:[ \t]*" suffix) nil t)) (error "Local variables list is not properly terminated")) (beginning-of-line) @@ -2251,20 +2247,17 @@ is specified, returning t if it is specified." (with-temp-buffer (insert-buffer-substring thisbuf startpos endpos) (goto-char (point-min)) - (subst-char-in-region (point) (point-max) - ?\^m ?\n) + (subst-char-in-region (point) (point-max) ?\^m ?\n) (while (not (eobp)) - ;; Discard the prefix, if any. - (if prefix - (if (looking-at prefix) - (delete-region (point) (match-end 0)) - (error "Local variables entry is missing the prefix"))) + ;; Discard the prefix. + (if (looking-at prefix) + (delete-region (point) (match-end 0)) + (error "Local variables entry is missing the prefix")) (end-of-line) - ;; Discard the suffix, if any. - (if suffix - (if (looking-back suffix) - (delete-region (match-beginning 0) (point)) - (error "Local variables entry is missing the suffix"))) + ;; Discard the suffix. + (if (looking-back suffix) + (delete-region (match-beginning 0) (point)) + (error "Local variables entry is missing the suffix")) (forward-line 1)) (goto-char (point-min)) From 4c6af0f6807c3d71c4b696de36ad4e184b25222d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jan 2005 01:26:15 +0000 Subject: [PATCH 021/560] *** empty log message *** --- lisp/ChangeLog | 88 +++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1cdc9ba9cf5..10db923c21b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-01 Stefan + + * files.el (hack-local-variables): Cleanup prefix/suffix matching. + + * ses.el (copy-region-as-kill): Deactivate mark. + 2005-01-01 Richard M. Stallman * replace.el (occur-1): If the output buffer is also an input, @@ -9,7 +15,7 @@ for :foreground and :background. * dired.el (dired-view-command-alist): Variable deleted. - (dired-view-file, dired-mouse-find-file-other-window): + (dired-view-file, dired-mouse-find-file-other-window): Delete the code to use it. 2005-01-01 Kim F. Storm @@ -82,12 +88,11 @@ 2004-12-31 Kenichi Handa * international/mule.el (buffer-file-coding-system-explicit): - Renamed for explicit-buffer-file-coding-system. - (after-insert-file-set-coding): Adjusted for the above change. + Rename for explicit-buffer-file-coding-system. + (after-insert-file-set-coding): Adjust for the above change. - * files.el (revert-buffer): Change - explicit-buffer-file-coding-system to - buffer-file-coding-system-explicit. + * files.el (revert-buffer): Change explicit-buffer-file-coding-system + to buffer-file-coding-system-explicit. (basic-save-buffer-1): Likewise. 2004-12-30 Richard M. Stallman @@ -111,9 +116,9 @@ (artist-get-first-non-nil-op): New function. (artist-get-last-non-nil-op): New function. (artist-mode-init): Call artist-get-last-non-nil-op to initialize - artist-prev-next-op-alist. + artist-prev-next-op-alist. (artist-mode-map): Add binding for C-mouse-4 and C-mouse-5 to - change drawing operation. + change drawing operation. 2004-12-30 Luc Teirlinck @@ -125,8 +130,8 @@ 2004-12-30 Jay Belanger - * calc/calc-store.el (calc-copy-variable): Fix mistyped variable - name. Change the way a variable is displayed in a message. + * calc/calc-store.el (calc-copy-variable): Fix mistyped variable name. + Change the way a variable is displayed in a message. * calc/calc-prog.el (calc-user-define-edit, calc-finish-macro-edit) (calc-user-define-permanent, calc-execute-kbd-macro): @@ -134,14 +139,14 @@ 2004-12-30 Kenichi Handa - * files.el (basic-save-buffer-1): Set - explicit-buffer-file-coding-system to last-coding-system-used. + * files.el (basic-save-buffer-1): + Set explicit-buffer-file-coding-system to last-coding-system-used. (revert-buffer): Pay attention to explicit-buffer-file-coding-system (not buffer-file-coding-system) on bind coding-system-for-read. - * international/mule.el (explicit-buffer-file-coding-system): New - buffer local variable. + * international/mule.el (explicit-buffer-file-coding-system): + New buffer local variable. (after-insert-file-set-coding): Set it to coding-system-for-read. 2004-12-29 Luc Teirlinck @@ -166,13 +171,12 @@ 2004-12-29 YAMAMOTO Mitsuharu * term/mac-win.el: Require x-dnd. - (mac-drag-n-drop): Sync with W32 version. Use x-dnd.el - functions. + (mac-drag-n-drop): Sync with W32 version. Use x-dnd.el functions. 2004-12-29 David Kastrup - * international/mule.el (decode-coding-inserted-region): Don't - barf if `buffer-undo-list' is already set to `t'. + * international/mule.el (decode-coding-inserted-region): + Don't barf if `buffer-undo-list' is already set to `t'. 2004-12-29 Jay Belanger @@ -225,8 +229,8 @@ 2004-12-27 YAMAMOTO Mitsuharu * term/mac-win.el: Sync with x-win.el. Rearrange the contents. - Call mac-clear-font-name-table if invoked on Mac OS 8/9. Call - x-open-connection on Mac OS X. + Call mac-clear-font-name-table if invoked on Mac OS 8/9. + Call x-open-connection on Mac OS X. 2004-12-27 Richard M. Stallman @@ -293,7 +297,7 @@ * simple.el (undo-list-saved): New variable (buffer-local). (undo): Set and test it. - (buffer-disable-undo): Moved here from buffer.c. + (buffer-disable-undo): Move here from buffer.c. Clear out undo-list-saved. * international/mule.el (decode-coding-inserted-region): @@ -316,7 +320,7 @@ `interactive' form as previous-matching-history-element. * ffap.el (ffap-string-at-point-mode-alist): Add "*" to url chars, - it can appear unencoded and has been seen from yahoo. + it can appear unencoded and has been seen from yahoo. 2004-12-27 Sergey Poznyakoff (tiny change) @@ -325,8 +329,8 @@ 2004-12-27 Kenichi Handa - * international/utf-8.el (utf-translate-cjk-load-tables): Bind - coding-system-for-read to nil while loading subst-*. + * international/utf-8.el (utf-translate-cjk-load-tables): + Bind coding-system-for-read to nil while loading subst-*. 2004-12-26 Jay Belanger @@ -383,8 +387,8 @@ 2004-12-21 Markus Rost - * calendar/diary-lib.el (mark-diary-entries): Set - mark-diary-entries-in-calendar only after checking for diary-file. + * calendar/diary-lib.el (mark-diary-entries): + Set mark-diary-entries-in-calendar only after checking for diary-file. 2004-12-21 Richard M. Stallman @@ -407,32 +411,29 @@ (calculator-string-to-number): New function, mostly moved and updated code from calculator-curnum-value. (calculator-curnum-value): Use it. - (calculator-paste): Use it, and update grabbing the - current-kill. + (calculator-paste): Use it, and update grabbing the current-kill. (calculator-rotate-displayer) (calculator-rotate-displayer-back): Toggle digit grouping when in radix mode, use calculator-message. - (calculator-displayer-prev, calculator-displayer-next): Change - digit group size when in radix mode. - (calculator-number-to-string): Renamed from + (calculator-displayer-prev, calculator-displayer-next): + Change digit group size when in radix mode. + (calculator-number-to-string): Rename from calculator-num-to-string. Now deals with digit grouping in radix mode. - (calculator-update-display, calculator-put-value): Use the new - name. + (calculator-update-display, calculator-put-value): Use the new name. (calculator-fact): Return a floating point number. (calculator-mode): Doc fix. 2004-12-20 Glenn Morris * calendar/calendar.el (view-other-diary-entries): Add autoload. - * calendar/diary-lib.el (view-other-diary-entries): Use - current-prefix-arg in interactive spec. + * calendar/diary-lib.el (view-other-diary-entries): + Use current-prefix-arg in interactive spec. 2004-12-19 Jay Belanger * calc/calc-aent.el (calcAlg-blank-matching-open): - Temporarily adjust the syntax of both delimiters of half-open - intervals. + Temporarily adjust the syntax of both delimiters of half-open intervals. 2004-12-19 Kim F. Storm @@ -542,7 +543,7 @@ 2004-12-16 Juri Linkov * help.el (function-called-at-point): - * help-fns.el (variable-at-point): As a last resort try striping + * help-fns.el (variable-at-point): As a last resort try stripping non-word prefixes and suffixes. * descr-text.el (describe-property-list): Don't treat syntax-table @@ -633,13 +634,13 @@ * simple.el (inhibit-mark-movement): Remove defvar. (beginning-of-buffer, end-of-buffer): Don't use it. - * emacs-lisp/lisp.el (beginning-of-defun, end-of-defun): Don't - use inhibit-mark-movement. + * emacs-lisp/lisp.el (beginning-of-defun, end-of-defun): + Don't use inhibit-mark-movement. * emulation/cua-base.el (cua--preserve-mark-commands): Remove. (cua--undo-push-mark): Remove. - (cua--pre-command-handler, cua--post-command-handler): Don't - fiddle with inhibit-mark-movement. + (cua--pre-command-handler, cua--post-command-handler): + Don't fiddle with inhibit-mark-movement. 2004-12-14 Juri Linkov @@ -651,8 +652,7 @@ 2004-12-13 Juri Linkov - * simple.el (next-error-buffer-p, next-error-find-buffer): - Doc fix. + * simple.el (next-error-buffer-p, next-error-find-buffer): Doc fix. * mail/supercite.el (sc-cite-frame-alist): Doc fix. (sc-cite-region, sc-uncite-region, sc-recite-region): From 81820b83fa9e8125e93ba581131a9c3470667d1b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 04:51:06 +0000 Subject: [PATCH 022/560] (calc-finish-macro-edit): Remove. (calc-edit-macro-repeats, calc-edit-macro-adjust-buffer, calc-edit-macro-command, calc-edit-macro-command-type, calc-edit-macro-combine-alg-ent, calc-edit-macro-combine-ext-command, calc-edit-macro-combine-var-name, calc-edit-macro-combine-digits, calc-edit-format-macro-buffer, calc-edit-macro-pre-finish-edit, calc-edit-macro-finish-edit): New functions. (calc-user-define-edit): Use new functions to edit named calc macros. --- lisp/calc/calc-prog.el | 334 +++++++++++++++++++++++++++++------------ 1 file changed, 241 insertions(+), 93 deletions(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index f4668d83d09..a4a7b7455cc 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -660,7 +660,6 @@ (list '\? (list (car last)) '("$$")))))))) part)) - (defun calc-user-define-invocation () (interactive) (or last-kbd-macro @@ -668,9 +667,8 @@ (setq calc-invocation-macro last-kbd-macro) (message "Use `M-# Z' to invoke this macro")) - -(defun calc-user-define-edit (prefix) - (interactive "P") ; but no calc-wrapper! +(defun calc-user-define-edit () + (interactive) ; but no calc-wrapper! (message "Edit definition of command: z-") (let* ((key (read-char)) (def (or (assq key (calc-user-key-map)) @@ -678,83 +676,27 @@ (assq (downcase key) (calc-user-key-map)) (error "No command defined for that key"))) (cmd (cdr def))) - (if (symbolp cmd) - (setq cmd (symbol-function cmd))) + (when (symbolp cmd) + (setq cmdname (symbol-name cmd)) + (setq cmd (symbol-function cmd))) (cond ((or (stringp cmd) (and (consp cmd) (eq (car-safe (nth 3 cmd)) 'calc-execute-kbd-macro))) - (if (and (>= (prefix-numeric-value prefix) 0) - (fboundp 'edit-kbd-macro) - (symbolp (cdr def)) - (eq major-mode 'calc-mode)) - (progn - (if (and (< (window-width) (frame-width)) - calc-display-trail) - (let ((win (get-buffer-window (calc-trail-buffer)))) - (if win - (delete-window win)))) - (edit-kbd-macro (cdr def) prefix nil - (function - (lambda (x) - (and calc-display-trail - (calc-wrapper - (calc-trail-display 1 t))))) - (function - (lambda (cmd) - (if (stringp (symbol-function cmd)) - (symbol-function cmd) - (let ((mac (nth 1 (nth 3 (symbol-function - cmd))))) - (if (vectorp mac) - (aref mac 1) - mac))))) - (function - (lambda (new cmd) - (if (stringp (symbol-function cmd)) - (fset cmd new) - (let ((mac (cdr (nth 3 (symbol-function - cmd))))) - (if (vectorp (car mac)) - (progn - (aset (car mac) 0 - (key-description new)) - (aset (car mac) 1 new)) - (setcar mac new)))))))) - (let ((keys (progn (and (fboundp 'edit-kbd-macro) - (edit-kbd-macro nil)) - (fboundp 'edmacro-parse-keys)))) - (calc-wrapper - (calc-edit-mode (list 'calc-finish-macro-edit - (list 'quote def) - keys) - t) - (if keys - (let (top - (fill-column 70) - (fill-prefix nil)) - (insert "Notations: RET, SPC, TAB, DEL, LFD, NUL" - ", C-xxx, M-xxx.\n\n") - (setq top (point)) - (insert (if (stringp cmd) - (key-description cmd) - (if (vectorp (nth 1 (nth 3 cmd))) - (aref (nth 1 (nth 3 cmd)) 0) - (key-description (nth 1 (nth 3 cmd))))) - "\n") - (if (>= (prog2 (forward-char -1) - (current-column) - (forward-char 1)) - (frame-width)) - (fill-region top (point)))) - (insert "Press C-q to quote control characters like RET" - " and TAB.\n" - (if (stringp cmd) - cmd - (if (vectorp (nth 1 (nth 3 cmd))) - (aref (nth 1 (nth 3 cmd)) 1) - (nth 1 (nth 3 cmd))))))) - (calc-show-edit-buffer) - (forward-line (if keys 2 1))))) + (let* ((mac (elt (nth 1 (nth 3 cmd)) 1)) + (str (edmacro-format-keys mac t)) + (macbeg)) + (calc-edit-mode + (list 'calc-edit-macro-finish-edit cmdname (nth 3 (nth 3 cmd))) + t "Calc Macro Edit Mode") + (goto-char (point-max)) + (insert "Original keys: " (elt (nth 1 (nth 3 cmd)) 0) "\n" ) + (setq macbeg (point)) + (insert str "\n") + (calc-edit-format-macro-buffer) + (calc-show-edit-buffer) + (goto-char (point-min)) + (search-forward "Original") + (forward-line 2))) (t (let* ((func (calc-stack-command-p cmd)) (defn (and func (symbolp func) @@ -770,22 +712,228 @@ (calc-show-edit-buffer)) (error "That command's definition cannot be edited"))))))) -(defun calc-finish-macro-edit (def keys) +;; Formatting the macro buffer + +(defun calc-edit-macro-repeats () + (goto-char (point-min)) + (while + (re-search-forward "^\\([0-9]+\\)\\*" nil t) + (setq num (string-to-int (match-string 1))) + (setq line (buffer-substring (point) (line-end-position))) + (goto-char (line-beginning-position)) + (kill-line 1) + (while (> num 0) + (insert line "\n") + (setq num (1- num))))) + +(defun calc-edit-macro-adjust-buffer () + (calc-edit-macro-repeats) + (goto-char (point-min)) + (while (re-search-forward "^RET$" nil t) + (delete-char 1)) + (goto-char (point-min)) + (while (and (re-search-forward "^$" nil t) + (not (= (point) (point-max)))) + (delete-char 1))) + +(defun calc-edit-macro-command () + "Return the command on the current line in a Calc macro editing buffer." + (let ((beg (line-beginning-position)) + (end (save-excursion + (if (search-forward ";;" (line-end-position) 1) + (forward-char -2)) + (skip-chars-backward " \t") + (point)))) + (buffer-substring beg end))) + +(defun calc-edit-macro-command-type () + "Return the type of command on the current line in a Calc macro editing buffer." + (let ((beg (save-excursion + (if (search-forward ";;" (line-end-position) t) + (progn + (skip-chars-forward " \t") + (point))))) + (end (save-excursion + (goto-char (line-end-position)) + (skip-chars-backward " \t") + (point)))) + (if beg + (buffer-substring beg end) + ""))) + +(defun calc-edit-macro-combine-alg-ent () + "Put an entire algebraic entry on a single line." + (let ((line (calc-edit-macro-command)) + (type (calc-edit-macro-command-type)) + curline + match) + (goto-char (line-beginning-position)) + (kill-line 1) + (setq curline (calc-edit-macro-command)) + (while (and curline + (not (string-equal "RET" curline)) + (not (setq match (string-match "" curline)))) + (setq line (concat line curline)) + (kill-line 1) + (setq curline (calc-edit-macro-command))) + (when match + (kill-line 1) + (setq line (concat line (substring curline 0 match)))) + (setq line (replace-regexp-in-string "SPC" " SPC " + (replace-regexp-in-string " " "" line))) + (insert line "\t\t\t") + (if (> (current-column) 24) + (delete-char -1)) + (insert ";; " type "\n") + (if match + (insert "RET\t\t\t;; calc-enter\n")))) + +(defun calc-edit-macro-combine-ext-command () + "Put an entire extended command on a single line." + (let ((cmdbeg (calc-edit-macro-command)) + (line "") + (type (calc-edit-macro-command-type)) + curline + match) + (goto-char (line-beginning-position)) + (kill-line 1) + (setq curline (calc-edit-macro-command)) + (while (and curline + (not (string-equal "RET" curline)) + (not (setq match (string-match "" curline)))) + (setq line (concat line curline)) + (kill-line 1) + (setq curline (calc-edit-macro-command))) + (when match + (kill-line 1) + (setq line (concat line (substring curline 0 match)))) + (setq line (replace-regexp-in-string " " "" line)) + (insert cmdbeg " " line "\t\t\t") + (if (> (current-column) 24) + (delete-char -1)) + (insert ";; " type "\n") + (if match + (insert "RET\t\t\t;; calc-enter\n")))) + +(defun calc-edit-macro-combine-var-name () + "Put an entire variable name on a single line." + (let ((line (calc-edit-macro-command)) + curline + match) + (goto-char (line-beginning-position)) + (kill-line 1) + (if (string-equal line "1") + (insert line "\t\t\t;; calc quick variable\n") + (setq curline (calc-edit-macro-command)) + (while (and curline + (not (string-equal "RET" curline)) + (not (setq match (string-match "" curline)))) + (setq line (concat line curline)) + (kill-line 1) + (setq curline (calc-edit-macro-command))) + (when match + (kill-line 1) + (setq line (concat line (substring curline 0 match)))) + (setq line (replace-regexp-in-string " " "" line)) + (insert line "\t\t\t") + (if (> (current-column) 24) + (delete-char -1)) + (insert ";; calc variable\n") + (if match + (insert "RET\t\t\t;; calc-enter\n"))))) + +(defun calc-edit-macro-combine-digits () + "Put an entire sequence of digits on a single line." + (let ((line (calc-edit-macro-command)) + curline) + (goto-char (line-beginning-position)) + (kill-line 1) + (while (string-equal (calc-edit-macro-command-type) "calcDigit-start") + (setq line (concat line (calc-edit-macro-command))) + (kill-line 1)) + (insert line "\t\t\t") + (if (> (current-column) 24) + (delete-char -1)) + (insert ";; calc digits\n"))) + +(defun calc-edit-format-macro-buffer () + "Rewrite the Calc macro editing buffer." + (calc-edit-macro-adjust-buffer) + (goto-char (point-min)) + (search-forward "Original keys:") (forward-line 1) - (if (and keys (looking-at "\n")) (forward-line 1)) - (let* ((true-str (buffer-substring (point) (point-max))) - (str true-str)) - (if keys (setq str (edmacro-parse-keys str))) - (if (symbolp (cdr def)) - (if (stringp (symbol-function (cdr def))) - (fset (cdr def) str) - (let ((mac (cdr (nth 3 (symbol-function (cdr def)))))) - (if (vectorp (car mac)) - (progn - (aset (car mac) 0 (if keys true-str (key-description str))) - (aset (car mac) 1 str)) - (setcar mac str)))) - (setcdr def str)))) + (insert "\n") + (skip-chars-forward " \t\n") + (let ((type (calc-edit-macro-command-type))) + (while (not (string-equal type "")) + (cond + ((or + (string-equal type "calc-algebraic-entry") + (string-equal type "calc-auto-algebraic-entry")) + (calc-edit-macro-combine-alg-ent)) + ((string-equal type "calc-execute-extended-command") + (calc-edit-macro-combine-ext-command)) + ((string-equal type "calcDigit-start") + (calc-edit-macro-combine-digits)) + ((or + (string-equal type "calc-store") + (string-equal type "calc-store-into") + (string-equal type "calc-store-neg") + (string-equal type "calc-store-plus") + (string-equal type "calc-store-minus") + (string-equal type "calc-store-div") + (string-equal type "calc-store-times") + (string-equal type "calc-store-power") + (string-equal type "calc-store-concat") + (string-equal type "calc-store-inv") + (string-equal type "calc-store-dec") + (string-equal type "calc-store-incr") + (string-equal type "calc-store-exchange") + (string-equal type "calc-unstore") + (string-equal type "calc-recall") + (string-equal type "calc-let") + (string-equal type "calc-permanent-variable")) + (forward-line 1) + (calc-edit-macro-combine-var-name)) + ((or + (string-equal type "calc-copy-variable") + (string-equal type "calc-declare-variable")) + (forward-line 1) + (calc-edit-macro-combine-var-name) + (calc-edit-macro-combine-var-name)) + (t (forward-line 1))) + (setq type (calc-edit-macro-command-type)))) + (goto-char (point-min))) + +;; Finish editing the macro + +(defun calc-edit-macro-pre-finish-edit () + (goto-char (point-min)) + (while (re-search-forward "\\(^\\| \\)RET\\($\\|\t\\| \\)" nil t) + (search-backward "RET") + (delete-char 3) + (insert ""))) + +(defun calc-edit-macro-finish-edit (cmdname key) + "Finish editing a Calc macro. +Redefine the corresponding command." + (interactive) + (let ((cmd (intern cmdname))) + (calc-edit-macro-pre-finish-edit) + (goto-char (point-max)) + (re-search-backward "^Original keys:") + (forward-line 1) + (let* ((str (buffer-substring (point) (point-max))) + (mac (edmacro-parse-keys str t))) + (if (= (length mac) 0) + (fmakunbound cmd) + (fset cmd + (list 'lambda '(arg) + '(interactive "P") + (list 'calc-execute-kbd-macro + (vector (key-description mac) + mac) + 'arg key))))))) (defun calc-finish-formula-edit (func) (let ((buf (current-buffer)) From 74857f836c38d8ab96c2d898cfeecdf165d3ebd2 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 05:01:08 +0000 Subject: [PATCH 023/560] (Programming Tutorial): Changed description of how to edit keyboard macros to match current behavior. --- man/calc.texi | 111 +++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 64 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index a33d9f935f5..2036c40d84f 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -6333,51 +6333,52 @@ then enter the real one in the edit command. @smallexample @group -1: 3 1: 3 Keyboard Macro Editor. - . . Original keys: 1 @key{RET} 2 + +1: 3 1: 3 Calc Macro Edit Mode. + . . Original keys: 1 2 + - type "1\r" - type "2" - calc-plus + 1 ;; calc digits + RET ;; calc-enter + 2 ;; calc digits + + ;; calc-plus C-x ( 1 @key{RET} 2 + C-x ) Z K h @key{RET} Z E h @end group @end smallexample @noindent -This shows the screen display assuming you have the @file{macedit} -keyboard macro editing package installed, which is usually the case -since a copy of @file{macedit} comes bundled with Calc. - A keyboard macro is stored as a pure keystroke sequence. The -@file{macedit} package (invoked by @kbd{Z E}) scans along the +@file{edmacro} package (invoked by @kbd{Z E}) scans along the macro and tries to decode it back into human-readable steps. -If a key or keys are simply shorthand for some command with a -@kbd{M-x} name, that name is shown. Anything that doesn't correspond -to a @kbd{M-x} command is written as a @samp{type} command. +Descriptions of the keystrokes are given as comments, which begin with +@samp{;;}, and which are ignored when the edited macro is saved. +Spaces and line breaks are also ignored when the edited macro is saved. +To enter a space into the macro, type @code{SPC}. All the special +characters @code{RET}, @code{LFD}, @code{TAB}, @code{SPC}, @code{DEL}, +and @code{NUL} must be written in all uppercase, as must the prefixes +@code{C-} and @code{M-}. Let's edit in a new definition, for computing harmonic numbers. -First, erase the three lines of the old definition. Then, type +First, erase the four lines of the old definition. Then, type in the new definition (or use Emacs @kbd{M-w} and @kbd{C-y} commands -to copy it from this page of the Info file; you can skip typing -the comments that begin with @samp{#}). +to copy it from this page of the Info file; you can of course skip +typing the comments, which begin with @samp{;;}). @smallexample -calc-kbd-push # Save local values (Z `) -type "0" # Push a zero -calc-store-into # Store it in variable 1 -type "1" -type "1" # Initial value for loop -calc-roll-down # This is the @key{TAB} key; swap initial & final -calc-kbd-for # Begin "for" loop... -calc-inv # Take reciprocal -calc-store-plus # Add to accumulator -type "1" -type "1" # Loop step is 1 -calc-kbd-end-for # End "for" loop -calc-recall # Now recall final accumulated value -type "1" -calc-kbd-pop # Restore values (Z ') +Z` ;; calc-kbd-push (Save local values) +0 ;; calc digits (Push a zero onto the stack) +st ;; calc-store-into (Store it in the following variable) +1 ;; calc quick variable (Quick variable q1) +1 ;; calc digits (Initial value for the loop) +TAB ;; calc-roll-down (Swap initial and final) +Z( ;; calc-kbd-for (Begin the "for" loop) +& ;; calc-inv (Take the reciprocal) +s+ ;; calc-store-plus (Add to the following variable) +1 ;; calc quick variable (Quick variable q1) +1 ;; calc digits (The loop step is 1) +Z) ;; calc-kbd-end-for (End the "for" loop) +sr ;; calc-recall (Recall the final accumulated value) +1 ;; calc quick variable (Quick variable q1) +Z' ;; calc-kbd-pop (Restore values) @end smallexample @noindent @@ -6392,15 +6393,12 @@ Press @kbd{C-c C-c} to finish editing and return to the Calculator. @end group @end smallexample -If you don't know how to write a particular command in @file{macedit} -format, you can always write it as keystrokes in a @code{type} command. -There is also a @code{keys} command which interprets the rest of the -line as standard Emacs keystroke names. In fact, @file{macedit} defines -a handy @code{read-kbd-macro} command which reads the current region -of the current buffer as a sequence of keystroke names, and defines that -sequence on the @kbd{X} (and @kbd{C-x e}) key. Because this is so -useful, Calc puts this command on the @kbd{M-# m} key. Try reading in -this macro in the following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at +The @file{edmacro} package defines a handy @code{read-kbd-macro} command +which reads the current region of the current buffer as a sequence of +keystroke names, and defines that sequence on the @kbd{X} +(and @kbd{C-x e}) key. Because this is so useful, Calc puts this +command on the @kbd{M-# m} key. Try reading in this macro in the +following form: Press @kbd{C-@@} (or @kbd{C-@key{SPC}}) at one end of the text below, then type @kbd{M-# m} at the other. @example @@ -30827,33 +30825,19 @@ Once you have bound your keyboard macro to a key, you can use @cindex Keyboard macros, editing The @kbd{Z E} (@code{calc-user-define-edit}) command on a key that has -been defined by a keyboard macro tries to use the @code{edit-kbd-macro} -command to edit the macro. This command may be found in the -@file{macedit} package, a copy of which comes with Calc. It decomposes -the macro definition into full Emacs command names, like @code{calc-pop} -and @code{calc-add}. Type @kbd{C-c C-c} to finish editing and update +been defined by a keyboard macro tries to use the @code{edmacro} package +edit the macro. Type @kbd{C-c C-c} to finish editing and update the definition stored on the key, or, to cancel the edit, kill the buffer with @kbd{C-x k}. - -If you give a negative numeric prefix argument to @kbd{Z E}, the keyboard -macro is edited in spelled-out keystroke form. For example, the editing -buffer might contain the nine characters @w{@samp{1 @key{RET} 2 +}}. When you press -@kbd{C-c C-c}, the @code{read-kbd-macro} feature of the @file{macedit} -package is used to reinterpret these key names. The -notations @code{RET}, @code{LFD}, @code{TAB}, @code{SPC}, @code{DEL}, and -@code{NUL} must be written in all uppercase, as must the prefixes @code{C-} -and @code{M-}. Spaces and line breaks are ignored. Other characters are +The special characters @code{RET}, @code{LFD}, @code{TAB}, @code{SPC}, +@code{DEL}, and @code{NUL} must be entered as these three character +sequences, written in all uppercase, as must the prefixes @code{C-} and +@code{M-}. Spaces and line breaks are ignored. Other characters are copied verbatim into the keyboard macro. Basically, the notation is the same as is used in all of this manual's examples, except that the manual -takes some liberties with spaces: When we say @kbd{' [1 2 3] @key{RET}}, we take -it for granted that it is clear we really mean @kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}, -which is what @code{read-kbd-macro} wants to see. - -If @file{macedit} is not available, @kbd{Z E} edits the keyboard macro -in ``raw'' form; the editing buffer simply contains characters like -@samp{1^M2+} (here @samp{^M} represents the carriage-return character). -Editing in this mode, you will have to use @kbd{C-q} to enter new -control characters into the buffer. +takes some liberties with spaces: When we say @kbd{' [1 2 3] @key{RET}}, +we take it for granted that it is clear we really mean +@kbd{' [1 @key{SPC} 2 @key{SPC} 3] @key{RET}}. @kindex M-# m @pindex read-kbd-macro @@ -30861,7 +30845,6 @@ The @kbd{M-# m} (@code{read-kbd-macro}) command reads an Emacs ``region'' of spelled-out keystrokes and defines it as the current keyboard macro. It is a convenient way to define a keyboard macro that has been stored in a file, or to define a macro without executing it at the same time. -The @kbd{M-# m} command works only if @file{macedit} is present. @node Conditionals in Macros, Loops in Macros, Naming Keyboard Macros, Keyboard Macros @subsection Conditionals in Keyboard Macros From 227c9573136338f841d66a390e0c9b0f7dba81e5 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 05:11:53 +0000 Subject: [PATCH 024/560] *** empty log message *** --- lisp/ChangeLog | 11 +++++++++++ man/ChangeLog | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10db923c21b..6357f20aecd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2005-01-01 Jay Belanger + + * calc/calc-prog.el (calc-finish-macro-edit): Remove. + (calc-edit-macro-repeats, calc-edit-macro-adjust-buffer) + (calc-edit-macro-command, calc-edit-macro-command-type) + (calc-edit-macro-combine-alg-ent, calc-edit-macro-combine-ext-command) + (calc-edit-macro-combine-var-name, calc-edit-macro-combine-digits) + (calc-edit-format-macro-buffer, calc-edit-macro-pre-finish-edit) + (calc-edit-macro-finish-edit): New functions. + (calc-user-define-edit): Use new functions to edit named calc macros. + 2005-01-01 Stefan * files.el (hack-local-variables): Cleanup prefix/suffix matching. diff --git a/man/ChangeLog b/man/ChangeLog index 957a2279a2e..5da39a2a4c8 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-01 Jay Belanger + + * calc.texi (Programming Tutorial): Changed description of how to + edit keyboard macros to match current behavior. + 2005-01-01 Andreas Schwab * killing.texi (Graphical Kill): Move up under node Killing, From f47864c02656a38b7c283034933f721609bff3a5 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 06:48:17 +0000 Subject: [PATCH 025/560] (calc-edit-user-syntax): Change title to edit mode to match new header. (calc-user-define-edit): Change titles to include names of commands. (calc-finish-formula-edit): Make sure to start reading formula after header. (calc-edit-macro-combine-variable-name): Check for all digits when looking for quick variable. --- lisp/calc/calc-prog.el | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index a4a7b7455cc..b171010e220 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -474,7 +474,7 @@ (let ((lang calc-language)) (calc-edit-mode (list 'calc-finish-user-syntax-edit (list 'quote lang)) t - (format "Editing %s-Mode Syntax Table" + (format "Editing %s-Mode Syntax Table. " (cond ((null lang) "Normal") ((eq lang 'tex) "TeX") (t (capitalize (symbol-name lang)))))) @@ -684,10 +684,12 @@ (eq (car-safe (nth 3 cmd)) 'calc-execute-kbd-macro))) (let* ((mac (elt (nth 1 (nth 3 cmd)) 1)) (str (edmacro-format-keys mac t)) - (macbeg)) + (macbeg) + (kys (nth 3 (nth 3 cmd)))) (calc-edit-mode - (list 'calc-edit-macro-finish-edit cmdname (nth 3 (nth 3 cmd))) - t "Calc Macro Edit Mode") + (list 'calc-edit-macro-finish-edit cmdname kys) + t (format "Editing keyboard macro (%s, bound to %s).\n" + cmdname kys)) (goto-char (point-max)) (insert "Original keys: " (elt (nth 1 (nth 3 cmd)) 0) "\n" ) (setq macbeg (point)) @@ -700,16 +702,24 @@ (t (let* ((func (calc-stack-command-p cmd)) (defn (and func (symbolp func) - (get func 'calc-user-defn)))) + (get func 'calc-user-defn))) + (kys (concat "z" (char-to-string (car def)))) + (intcmd (symbol-name (cdr def))) + (algcmd (substring (symbol-name func) 9))) (if (and defn (calc-valid-formula-func func)) (progn (calc-wrapper - (calc-edit-mode (list 'calc-finish-formula-edit - (list 'quote func))) + (calc-edit-mode + (list 'calc-finish-formula-edit (list 'quote func)) + nil + (format "Editing formula (%s, %s, bound to %s).\n" + intcmd algcmd kys)) (insert (math-showing-full-precision (math-format-nice-expr defn (frame-width))) "\n")) - (calc-show-edit-buffer)) + (calc-show-edit-buffer) + (goto-char (point-min)) + (forward-line 2)) (error "That command's definition cannot be edited"))))))) ;; Formatting the macro buffer @@ -822,7 +832,7 @@ match) (goto-char (line-beginning-position)) (kill-line 1) - (if (string-equal line "1") + (if (member line '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9")) (insert line "\t\t\t;; calc quick variable\n") (setq curline (calc-edit-macro-command)) (while (and curline @@ -936,6 +946,8 @@ Redefine the corresponding command." 'arg key))))))) (defun calc-finish-formula-edit (func) + (goto-char (point-min)) + (forward-line 2) (let ((buf (current-buffer)) (str (buffer-substring (point) (point-max))) (start (point)) From 2fa782854bba6a77d29737920193cd7ae74133d3 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 06:48:58 +0000 Subject: [PATCH 026/560] (calc-edit-variable): Change title to match new header. --- lisp/calc/calc-store.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index 574efbf37e6..b2cef4936a0 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -397,7 +397,7 @@ (setq calc-last-edited-variable var) (calc-edit-mode (list 'calc-finish-stack-edit (list 'quote var)) t - (concat "Editing " (calc-var-name var))) + (concat "Editing variable `" (calc-var-name var) "'. ")) (and value (insert (math-format-nice-expr value (frame-width)) "\n"))))) (calc-show-edit-buffer)) From 40688eba8c2f1f4d4839bb2d238c34697d1c1e69 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 06:49:36 +0000 Subject: [PATCH 027/560] (calc-edit-mode): Change default header. --- lisp/calc/calc-yank.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 2fdfab6c6f4..4c7d41e0f76 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -464,8 +464,8 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (let ((calc-edit-handler nil)) (calc-edit-finish t)) (message "(Cancelled)")) t t) - (insert (or title title "Calc Edit Mode") - ". Press `C-c C-c'" + (insert (or title title "Calc Edit Mode. ") + "Press `C-c C-c'" (if allow-ret "" " or RET") " to finish, `C-x k RET' to cancel.\n"))) (put 'calc-edit-mode 'mode-class 'special) From c5757d2e57183da7abeae8a934dfd9bec0c56300 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 06:56:51 +0000 Subject: [PATCH 028/560] *** empty log message *** --- lisp/ChangeLog | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6357f20aecd..a58b20c9343 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,14 @@ 2005-01-01 Jay Belanger - * calc/calc-prog.el (calc-finish-macro-edit): Remove. + * calc-yank.el (calc-edit-mode): Change default header. + + * calc-store.el (calc-edit-variable): Change title to match new + header. + + * calc/calc-prog.el (calc-edit-user-syntax): Change title to edit + mode to match new header. + (calc-user-define-edit): Change titles to include names of commands. + (calc-finish-macro-edit): Remove. (calc-edit-macro-repeats, calc-edit-macro-adjust-buffer) (calc-edit-macro-command, calc-edit-macro-command-type) (calc-edit-macro-combine-alg-ent, calc-edit-macro-combine-ext-command) From f405d1f5e5f2efdc1253e2e64c6b25ebec9ac1c5 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 07:22:44 +0000 Subject: [PATCH 029/560] (calc-edit-mode): Add a spacer line to the header. (calc-edit-finish, calc-show-edit-buffer): Handle the spacer line in the header. --- lisp/calc/calc-yank.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 4c7d41e0f76..ccb9a19ae51 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -467,7 +467,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (insert (or title title "Calc Edit Mode. ") "Press `C-c C-c'" (if allow-ret "" " or RET") - " to finish, `C-x k RET' to cancel.\n"))) + " to finish, `C-x k RET' to cancel.\n\n"))) (put 'calc-edit-mode 'mode-class 'special) (defun calc-show-edit-buffer () @@ -485,7 +485,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (delete-window win)))) (set-buffer-modified-p nil) (goto-char (point-min)) - (forward-line 1))) + (forward-line 2))) (defun calc-edit-return () (interactive) @@ -522,6 +522,8 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (goto-char (point-min)) (when (looking-at "Calc Edit\\|Editing ") (forward-line 1)) + (if (looking-at "^ *$") + (forward-line 1)) (if (buffer-modified-p) (eval calc-edit-handler)) (if one-window From 42a797def401f87066c2680f1bac599ec889612a Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 07:34:14 +0000 Subject: [PATCH 030/560] (calc-edit-user-formula, calc-finish-formula-edit): Handle extra line in header. --- lisp/ChangeLog | 7 +++++-- lisp/calc/calc-prog.el | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a58b20c9343..62cf2518772 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,13 +1,16 @@ 2005-01-01 Jay Belanger * calc-yank.el (calc-edit-mode): Change default header. - + (calc-edit-finish, calc-show-edit-buffer): Adjust to handle new + header. + * calc-store.el (calc-edit-variable): Change title to match new header. - * calc/calc-prog.el (calc-edit-user-syntax): Change title to edit + * calc/calc-prog.el (calc-edit-user-syntax): Change title in edit mode to match new header. (calc-user-define-edit): Change titles to include names of commands. + (calc-finish-formula-edit): Adjust to handle new header. (calc-finish-macro-edit): Remove. (calc-edit-macro-repeats, calc-edit-macro-adjust-buffer) (calc-edit-macro-command, calc-edit-macro-command-type) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index b171010e220..1ee3173848a 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -714,12 +714,12 @@ nil (format "Editing formula (%s, %s, bound to %s).\n" intcmd algcmd kys)) - (insert (math-showing-full-precision - (math-format-nice-expr defn (frame-width))) - "\n")) + (insert (math-showing-full-precision + (math-format-nice-expr defn (frame-width))) + "\n")) (calc-show-edit-buffer) (goto-char (point-min)) - (forward-line 2)) + (forward-line 3)) (error "That command's definition cannot be edited"))))))) ;; Formatting the macro buffer @@ -947,7 +947,7 @@ Redefine the corresponding command." (defun calc-finish-formula-edit (func) (goto-char (point-min)) - (forward-line 2) + (forward-line 3) (let ((buf (current-buffer)) (str (buffer-substring (point) (point-max))) (start (point)) From 72e53dcd4198a717d3ae7488500396d05ccb5e69 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 07:39:20 +0000 Subject: [PATCH 031/560] (calc-edit-mode): Make header in italic. --- lisp/calc/calc-yank.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index ccb9a19ae51..6f75613b014 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -464,10 +464,13 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (let ((calc-edit-handler nil)) (calc-edit-finish t)) (message "(Cancelled)")) t t) - (insert (or title title "Calc Edit Mode. ") - "Press `C-c C-c'" - (if allow-ret "" " or RET") - " to finish, `C-x k RET' to cancel.\n\n"))) + (insert (propertize + (concat + (or title title "Calc Edit Mode. ") + "Press `C-c C-c'" + (if allow-ret "" " or RET") + " to finish, `C-x k RET' to cancel.\n\n") + 'font-lock-face 'italic)))) (put 'calc-edit-mode 'mode-class 'special) (defun calc-show-edit-buffer () From f57a09620622809ecddcc571765f1b1b7eb9e563 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 17:04:37 +0000 Subject: [PATCH 032/560] (calc-edit-top): New variable. (calc-edit-mode): Set calc-edit-top to be the beginning of the edited object. Change header properties. (calc-edit-finish, calc-edit-finish-stack-object) (calc-edit-show-buffer): Use calc-edit-top to find the beginning of the edited object. --- lisp/calc/calc-yank.el | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 6f75613b014..53d5946e073 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -430,6 +430,7 @@ (defvar calc-edit-handler) (defvar calc-restore-trail) (defvar calc-allow-ret) +(defvar calc-edit-top) (defun calc-edit-mode (&optional handler allow-ret title) "Calculator editing mode. Press RET, LFD, or C-c C-c to finish. @@ -470,7 +471,9 @@ To cancel the edit, simply kill the *Calc Edit* buffer." "Press `C-c C-c'" (if allow-ret "" " or RET") " to finish, `C-x k RET' to cancel.\n\n") - 'font-lock-face 'italic)))) + 'font-lock-face 'italic 'read-only t 'rear-nonsticky t 'front-sticky t)) + (make-local-variable 'calc-edit-top) + (setq calc-edit-top (point)))) (put 'calc-edit-mode 'mode-class 'special) (defun calc-show-edit-buffer () @@ -487,8 +490,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (if win (delete-window win)))) (set-buffer-modified-p nil) - (goto-char (point-min)) - (forward-line 2))) + (goto-char calc-edit-top))) (defun calc-edit-return () (interactive) @@ -522,11 +524,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (set-buffer original) (not (eq major-mode 'calc-mode)))) (error "Original calculator buffer has been corrupted"))) - (goto-char (point-min)) - (when (looking-at "Calc Edit\\|Editing ") - (forward-line 1)) - (if (looking-at "^ *$") - (forward-line 1)) + (goto-char calc-edit-top) (if (buffer-modified-p) (eval calc-edit-handler)) (if one-window @@ -551,7 +549,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (defun calc-finish-stack-edit (num) (let ((buf (current-buffer)) - (str (buffer-substring (point) (point-max))) + (str (buffer-substring calc-edit-top (point-max))) (start (point)) pos) (if (and (integerp num) (> num 1)) From 519c0d007401464610626a407812488a57fa7640 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 17:05:45 +0000 Subject: [PATCH 033/560] (calc-finish-selection-edit): Use calc-edit-top for the beginning of the edited object. --- lisp/calc/calc-sel.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el index 7b45814f1e7..4ae0df5d3ba 100644 --- a/lisp/calc/calc-sel.el +++ b/lisp/calc/calc-sel.el @@ -677,10 +677,11 @@ ;; The variable calc-edit-disp-trail is local to calc-edit-finish, ;; in calc-yank.el. (defvar calc-edit-disp-trail) +(defvar calc-edit-top) (defun calc-finish-selection-edit (num sel reselect) (let ((buf (current-buffer)) - (str (buffer-substring (point) (point-max))) + (str (buffer-substring calc-edit-top (point-max))) (start (point))) (switch-to-buffer calc-original-buffer) (let ((val (math-read-expr str))) From 4091a1e2f1b6521ae24d7a40266726438a90c704 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 17:07:16 +0000 Subject: [PATCH 034/560] (calc-embedded-finish-edit): Use calc-edit-top for the beginning of the edited object. --- lisp/calc/calc-embed.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 067d233bf4a..cdab562dc21 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -308,10 +308,10 @@ This is not required to be present for user-written mode annotations.") (calc-show-edit-buffer)) (defvar calc-original-buffer) - +(defvar calc-edit-top) (defun calc-embedded-finish-edit (info) (let ((buf (current-buffer)) - (str (buffer-substring (point) (point-max))) + (str (buffer-substring calc-edit-top (point-max))) (start (point)) pos) (switch-to-buffer calc-original-buffer) From d3cfbc7d5b6d768a57466762d1fae50e127e0275 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 17:08:31 +0000 Subject: [PATCH 035/560] (calc-edit-macro-finish-edit, calc-finish-formula-edit) (calc-macro-repeats, calc-edit-macro-adjust-buffer) calc-edit-format-macro-buffer, calc-edit-macro-pre-finish-edit): Use calc-edit-top for the beginning of the edited object. (calc-user-define-edit): Change the header for editing macros. Remove unnecessary variable. --- lisp/calc/calc-prog.el | 45 ++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 1ee3173848a..b4901b5f8a0 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -684,21 +684,16 @@ (eq (car-safe (nth 3 cmd)) 'calc-execute-kbd-macro))) (let* ((mac (elt (nth 1 (nth 3 cmd)) 1)) (str (edmacro-format-keys mac t)) - (macbeg) (kys (nth 3 (nth 3 cmd)))) (calc-edit-mode (list 'calc-edit-macro-finish-edit cmdname kys) - t (format "Editing keyboard macro (%s, bound to %s).\n" - cmdname kys)) - (goto-char (point-max)) - (insert "Original keys: " (elt (nth 1 (nth 3 cmd)) 0) "\n" ) - (setq macbeg (point)) + t (format (concat + "Editing keyboard macro (%s, bound to %s).\n" + "Original keys: %s \n") + cmdname kys (elt (nth 1 (nth 3 cmd)) 0))) (insert str "\n") (calc-edit-format-macro-buffer) - (calc-show-edit-buffer) - (goto-char (point-min)) - (search-forward "Original") - (forward-line 2))) + (calc-show-edit-buffer))) (t (let* ((func (calc-stack-command-p cmd)) (defn (and func (symbolp func) @@ -717,15 +712,13 @@ (insert (math-showing-full-precision (math-format-nice-expr defn (frame-width))) "\n")) - (calc-show-edit-buffer) - (goto-char (point-min)) - (forward-line 3)) + (calc-show-edit-buffer)) (error "That command's definition cannot be edited"))))))) ;; Formatting the macro buffer (defun calc-edit-macro-repeats () - (goto-char (point-min)) + (goto-char calc-edit-top) (while (re-search-forward "^\\([0-9]+\\)\\*" nil t) (setq num (string-to-int (match-string 1))) @@ -738,10 +731,10 @@ (defun calc-edit-macro-adjust-buffer () (calc-edit-macro-repeats) - (goto-char (point-min)) + (goto-char calc-edit-top) (while (re-search-forward "^RET$" nil t) (delete-char 1)) - (goto-char (point-min)) + (goto-char calc-edit-top) (while (and (re-search-forward "^$" nil t) (not (= (point) (point-max)))) (delete-char 1))) @@ -869,11 +862,7 @@ (defun calc-edit-format-macro-buffer () "Rewrite the Calc macro editing buffer." (calc-edit-macro-adjust-buffer) - (goto-char (point-min)) - (search-forward "Original keys:") - (forward-line 1) - (insert "\n") - (skip-chars-forward " \t\n") + (goto-char calc-edit-top) (let ((type (calc-edit-macro-command-type))) (while (not (string-equal type "")) (cond @@ -913,27 +902,25 @@ (calc-edit-macro-combine-var-name)) (t (forward-line 1))) (setq type (calc-edit-macro-command-type)))) - (goto-char (point-min))) + (goto-char calc-edit-top)) ;; Finish editing the macro (defun calc-edit-macro-pre-finish-edit () - (goto-char (point-min)) + (goto-char calc-edit-top) (while (re-search-forward "\\(^\\| \\)RET\\($\\|\t\\| \\)" nil t) (search-backward "RET") (delete-char 3) (insert ""))) +(defvar calc-edit-top) (defun calc-edit-macro-finish-edit (cmdname key) "Finish editing a Calc macro. Redefine the corresponding command." (interactive) (let ((cmd (intern cmdname))) (calc-edit-macro-pre-finish-edit) - (goto-char (point-max)) - (re-search-backward "^Original keys:") - (forward-line 1) - (let* ((str (buffer-substring (point) (point-max))) + (let* ((str (buffer-substring calc-edit-top (point-max))) (mac (edmacro-parse-keys str t))) (if (= (length mac) 0) (fmakunbound cmd) @@ -946,10 +933,8 @@ Redefine the corresponding command." 'arg key))))))) (defun calc-finish-formula-edit (func) - (goto-char (point-min)) - (forward-line 3) (let ((buf (current-buffer)) - (str (buffer-substring (point) (point-max))) + (str (buffer-substring calc-edit-top (point-max))) (start (point)) (body (calc-valid-formula-func func))) (set-buffer calc-original-buffer) From 731da69580a702aff4f27c0af0d542ccf33de101 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 17:22:06 +0000 Subject: [PATCH 036/560] *** empty log message *** --- lisp/ChangeLog | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62cf2518772..b8502b35e3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,12 +1,30 @@ +2005-01-02 Jay Belanger + + * calc/calc-yank.el (calc-edit-top): New variable. + (calc-edit-mode): Set calc-edit-top to be the beginning of the edited + object. Change header properties. + (calc-edit-finish, calc-edit-finish-stack-object) + (calc-edit-show-buffer): Use calc-edit-top to find the beginning of the + edited object. + * calc/calc-sel.el (calc-finish-selection-edit): Use calc-edit-top + for the beginning of the edited object. + * calc/calc-embed.el (calc-embedded-finish-edit): Use calc-edit-top + for the beginning of the edited object. + * calc/calc-prog.el (calc-edit-macro-finish-edit) + (calc-finish-formula-edit, calc-macro-repeats) + (calc-edit-macro-adjust-buffer, calc-edit-format-macro-buffer) + (calc-edit-macro-pre-finish-edit): Use calc-edit-top for the + beginning of the edited object. + (calc-user-define-edit): Change the header for editing macros. + Remove unnecessary variable. + 2005-01-01 Jay Belanger - * calc-yank.el (calc-edit-mode): Change default header. + * calc/calc-yank.el (calc-edit-mode): Change default header. (calc-edit-finish, calc-show-edit-buffer): Adjust to handle new header. - - * calc-store.el (calc-edit-variable): Change title to match new + * calc/calc-store.el (calc-edit-variable): Change title to match new header. - * calc/calc-prog.el (calc-edit-user-syntax): Change title in edit mode to match new header. (calc-user-define-edit): Change titles to include names of commands. From 50292b6e31336aa5029def435ec7c317b729d15c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jan 2005 18:08:12 +0000 Subject: [PATCH 037/560] (hack-local-variables): Fix last change. --- lisp/ChangeLog | 4 ++ lisp/files.el | 154 ++++++++++++++++++++++++------------------------- 2 files changed, 81 insertions(+), 77 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8502b35e3d..5411336e86f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-02 Stefan + + * files.el (hack-local-variables): Fix last change. + 2005-01-02 Jay Belanger * calc/calc-yank.el (calc-edit-top): New variable. diff --git a/lisp/files.el b/lisp/files.el index cfee975066d..227bb781744 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2202,86 +2202,86 @@ is specified, returning t if it is specified." (save-excursion (goto-char (point-max)) (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move) - (if (let ((case-fold-search t)) - (and (search-forward "Local Variables:" nil t) - (or (eq enable-local-variables t) - mode-only - (and enable-local-variables - (save-window-excursion - (switch-to-buffer (current-buffer)) - (save-excursion - (beginning-of-line) - (set-window-start (selected-window) (point))) - (y-or-n-p (format "Set local variables as specified at end of %s? " - (if buffer-file-name - (file-name-nondirectory - buffer-file-name) - (concat "buffer " - (buffer-name)))))))))) - (skip-chars-forward " \t") - (let ((enable-local-eval enable-local-eval) - ;; suffix is what comes after "local variables:" in its line. - (suffix - (concat - (regexp-quote (buffer-substring (point) (line-end-position))) - "$")) - ;; prefix is what comes before "local variables:" in its line. - (prefix - (concat "^" (regexp-quote - (buffer-substring (line-beginning-position) - (match-beginning 0))))) - beg) + (when (let ((case-fold-search t)) + (and (search-forward "Local Variables:" nil t) + (or (eq enable-local-variables t) + mode-only + (and enable-local-variables + (save-window-excursion + (switch-to-buffer (current-buffer)) + (save-excursion + (beginning-of-line) + (set-window-start (selected-window) (point))) + (y-or-n-p (format "Set local variables as specified at end of %s? " + (if buffer-file-name + (file-name-nondirectory + buffer-file-name) + (concat "buffer " + (buffer-name)))))))))) + (skip-chars-forward " \t") + (let ((enable-local-eval enable-local-eval) + ;; suffix is what comes after "local variables:" in its line. + (suffix + (concat + (regexp-quote (buffer-substring (point) (line-end-position))) + "$")) + ;; prefix is what comes before "local variables:" in its line. + (prefix + (concat "^" (regexp-quote + (buffer-substring (line-beginning-position) + (match-beginning 0))))) + beg) - (forward-line 1) - (let ((startpos (point)) - endpos - (thisbuf (current-buffer))) - (save-excursion - (if (not (re-search-forward - (concat prefix "[ \t]*End:[ \t]*" suffix) - nil t)) - (error "Local variables list is not properly terminated")) - (beginning-of-line) - (setq endpos (point))) + (forward-line 1) + (let ((startpos (point)) + endpos + (thisbuf (current-buffer))) + (save-excursion + (if (not (re-search-forward + (concat prefix "[ \t]*End:[ \t]*" suffix) + nil t)) + (error "Local variables list is not properly terminated")) + (beginning-of-line) + (setq endpos (point))) - (with-temp-buffer - (insert-buffer-substring thisbuf startpos endpos) - (goto-char (point-min)) - (subst-char-in-region (point) (point-max) ?\^m ?\n) - (while (not (eobp)) - ;; Discard the prefix. - (if (looking-at prefix) - (delete-region (point) (match-end 0)) - (error "Local variables entry is missing the prefix")) - (end-of-line) - ;; Discard the suffix. - (if (looking-back suffix) - (delete-region (match-beginning 0) (point)) - (error "Local variables entry is missing the suffix")) - (forward-line 1)) - (goto-char (point-min)) + (with-temp-buffer + (insert-buffer-substring thisbuf startpos endpos) + (goto-char (point-min)) + (subst-char-in-region (point) (point-max) ?\^m ?\n) + (while (not (eobp)) + ;; Discard the prefix. + (if (looking-at prefix) + (delete-region (point) (match-end 0)) + (error "Local variables entry is missing the prefix")) + (end-of-line) + ;; Discard the suffix. + (if (looking-back suffix) + (delete-region (match-beginning 0) (point)) + (error "Local variables entry is missing the suffix")) + (forward-line 1)) + (goto-char (point-min)) - (while (not (eobp)) - ;; Find the variable name; strip whitespace. - (skip-chars-forward " \t") - (setq beg (point)) - (skip-chars-forward "^:\n") - (if (eolp) (error "Missing colon in local variables entry")) - (skip-chars-backward " \t") - (let* ((str (buffer-substring beg (point))) - (var (read str)) - val) - ;; Read the variable value. - (skip-chars-forward "^:") - (forward-char 1) - (setq val (read (current-buffer))) - (if mode-only - (if (eq var 'mode) - (setq mode-specified t)) - ;; Set the variable. "Variables" mode and eval are funny. - (with-current-buffer thisbuf - (hack-one-local-variable var val)))) - (forward-line 1))))))) + (while (not (eobp)) + ;; Find the variable name; strip whitespace. + (skip-chars-forward " \t") + (setq beg (point)) + (skip-chars-forward "^:\n") + (if (eolp) (error "Missing colon in local variables entry")) + (skip-chars-backward " \t") + (let* ((str (buffer-substring beg (point))) + (var (read str)) + val) + ;; Read the variable value. + (skip-chars-forward "^:") + (forward-char 1) + (setq val (read (current-buffer))) + (if mode-only + (if (eq var 'mode) + (setq mode-specified t)) + ;; Set the variable. "Variables" mode and eval are funny. + (with-current-buffer thisbuf + (hack-one-local-variable var val)))) + (forward-line 1))))))) (unless mode-only (run-hooks 'hack-local-variables-hook)) mode-specified)) From 5e39b98a2965ba20a68fd98aecb780f4d6246219 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jan 2005 22:00:07 +0000 Subject: [PATCH 038/560] (vc-arch-workfile-version): Handle the empty-branch case. --- lisp/ChangeLog | 5 +++-- lisp/vc-arch.el | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5411336e86f..4eebddf0dc0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-01-02 Stefan + * vc-arch.el (vc-arch-workfile-version): Handle the empty-branch case. + * files.el (hack-local-variables): Fix last change. 2005-01-02 Jay Belanger @@ -25,8 +27,7 @@ 2005-01-01 Jay Belanger * calc/calc-yank.el (calc-edit-mode): Change default header. - (calc-edit-finish, calc-show-edit-buffer): Adjust to handle new - header. + (calc-edit-finish, calc-show-edit-buffer): Adjust to handle new header. * calc/calc-store.el (calc-edit-variable): Change title to match new header. * calc/calc-prog.el (calc-edit-user-syntax): Change title in edit diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index 70dbdcc85f2..3ea023b41cb 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el @@ -1,6 +1,6 @@ ;;; vc-arch.el --- VC backend for the Arch version-control system -;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) @@ -270,7 +270,7 @@ Return non-nil if FILE is unchanged." (defun vc-arch-workfile-version (file) (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) (defbranch (vc-arch-default-version file))) - (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*\\)--.*\\)--.*\\)\\'" defbranch)) + (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*\\)\\(--.*\\)?\\)--.*\\)\\'" defbranch)) (let* ((archive (match-string 1 defbranch)) (category (match-string 4 defbranch)) (branch (match-string 3 defbranch)) From c771f3d67a0e0ee67f1c65960cab3b374971fb66 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jan 2005 22:07:52 +0000 Subject: [PATCH 039/560] (vc-arch-workfile-version): Fix last change. --- lisp/vc-arch.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index 3ea023b41cb..40ec2fb3884 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el @@ -270,7 +270,7 @@ Return non-nil if FILE is unchanged." (defun vc-arch-workfile-version (file) (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) (defbranch (vc-arch-default-version file))) - (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*\\)\\(--.*\\)?\\)--.*\\)\\'" defbranch)) + (when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*?\\)\\(?:--.*\\)?\\)--.*\\)\\'" defbranch)) (let* ((archive (match-string 1 defbranch)) (category (match-string 4 defbranch)) (branch (match-string 3 defbranch)) From 303b04121058f35726d088c600a9a0e006235e91 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 2 Jan 2005 22:52:23 +0000 Subject: [PATCH 040/560] (Fgarbage_collect): Don't truncate_undo_list on dead buffers. --- src/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index 429cdb5246a..a1ba6dfc513 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4683,7 +4683,7 @@ returns nil, because real GC can't be done. */) turned off in that buffer. Calling truncate_undo_list on Qt tends to return NULL, which effectively turns undo back on. So don't call truncate_undo_list if undo_list is Qt. */ - if (! EQ (nextb->undo_list, Qt)) + if (! NILP (nextb->name) && ! EQ (nextb->undo_list, Qt)) truncate_undo_list (nextb); /* Shrink buffer gaps, but skip indirect and dead buffers. */ From c45c149c3727ebd50f84a4c7cb06ec6be4ed5199 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 2 Jan 2005 23:11:26 +0000 Subject: [PATCH 041/560] (Electric-pop-up-window): Use fit-window-to-buffer instead of calculating the right size. --- lisp/ChangeLog | 6 ++++++ lisp/electric.el | 20 +++----------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4eebddf0dc0..4501a5db72c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-02 Richard M. Stallman + + * electric.el (Electric-pop-up-window): Use fit-window-to-buffer + instead of calculating the right size. + 2005-01-02 Stefan * vc-arch.el (vc-arch-workfile-version): Handle the empty-branch case. @@ -49,6 +54,7 @@ * ses.el (copy-region-as-kill): Deactivate mark. +>>>>>>> 1.6818 2005-01-01 Richard M. Stallman * replace.el (occur-1): If the output buffer is also an input, diff --git a/lisp/electric.el b/lisp/electric.el index 3d2bf140c8c..18a4d8388c5 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -144,31 +144,17 @@ (buf (get-buffer buffer)) (one-window (one-window-p t)) (pop-up-windows t) - (pop-up-frames nil) - (target-height) - (lines)) + (pop-up-frames nil)) (if (not buf) (error "Buffer %s does not exist" buffer) - (with-current-buffer buf - (setq lines (count-lines (point-min) (point-max))) - (setq target-height - (min (max (if max-height (min max-height (1+ lines)) (1+ lines)) - window-min-height) - (save-window-excursion - (delete-other-windows) - (1- (window-height (selected-window))))))) (cond ((and (eq (window-buffer win) buf)) (select-window win)) (one-window (pop-to-buffer buffer) - (setq win (selected-window)) - (enlarge-window (- target-height (window-height win)))) + (setq win (selected-window))) (t (switch-to-buffer buf))) - (if (and (not max-height) - (> target-height (window-height (selected-window)))) - (progn (goto-char (window-start win)) - (enlarge-window (- target-height (window-height win))))) + (fit-window-to-buffer win max-height) (goto-char (point-min)) win))) From 3625f6b741ad3f0a728224295f9112fa8211605b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jan 2005 23:14:23 +0000 Subject: [PATCH 042/560] (vc-svn-diff): Stay local if possible. From Karl Chen . --- lisp/ChangeLog | 3 +++ lisp/vc-svn.el | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4501a5db72c..605b099b558 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,9 @@ 2005-01-02 Stefan + * vc-svn.el (vc-svn-diff): Stay local if possible. + From Karl Chen . + * vc-arch.el (vc-arch-workfile-version): Handle the empty-branch case. * files.el (hack-local-variables): Fix last change. diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index cbb951d60b7..553024f636d 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -1,6 +1,6 @@ ;;; vc-svn.el --- non-resident support for Subversion version-control -;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: FSF (see vc.el for full credits) @@ -352,6 +352,10 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (defun vc-svn-diff (file &optional oldvers newvers buffer) "Get a difference report using SVN between two versions of FILE." (unless buffer (setq buffer "*vc-diff*")) + (if (and oldvers (equal oldvers (vc-workfile-version file))) + ;; Use nil rather than the current revision because svn handles it + ;; better (i.e. locally). + (setq oldvers nil)) (if (string= (vc-workfile-version file) "0") ;; This file is added but not yet committed; there is no master file. (if (or oldvers newvers) From 27af61fe6c2bb7e9e16ae864eb76dd3be2f6587e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 2 Jan 2005 23:43:51 +0000 Subject: [PATCH 043/560] (file-loadhist-lookup): New function. (file-provides, file-requires): Use it. --- lisp/loadhist.el | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 8cbe1d80cd3..76ef87ee845 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -51,9 +51,26 @@ a buffer with no associated file, or an `eval-region', return nil." (error "%S is not a currently loaded feature" feature) (car (feature-symbols feature)))) +(defun file-loadhist-lookup (file) + "Return the `load-history' element for FILE." + ;; First look for FILE as given. + (let ((symbols (assoc file load-history))) + ;; Try converting a library name to an absolute file name. + (and (null symbols) + (let ((absname (find-library-name file))) + (if (not (equal absname file)) + (setq symbols (cdr (assoc absname load-history)))))) + ;; Try converting an absolute file name to a library name. + (and (null symbols) (string-match "[.]el\\'" file) + (let ((libname (file-name-nondirectory file))) + (string-match "[.]el\\'" libname) + (setq libname (substring libname 0 (match-beginning 0))) + (setq symbols (cdr (assoc libname load-history))))) + symbols)) + (defun file-provides (file) "Return the list of features provided by FILE." - (let ((symbols (cdr (assoc file load-history))) + (let ((symbols (file-loadhist-lookup file)) provides) (mapc (lambda (x) (if (and (consp x) (eq (car x) 'provide)) @@ -63,7 +80,7 @@ a buffer with no associated file, or an `eval-region', return nil." (defun file-requires (file) "Return the list of features required by FILE." - (let ((symbols (cdr (assoc file load-history))) + (let ((symbols (file-loadhist-lookup file)) requires) (mapc (lambda (x) (if (and (consp x) (eq (car x) 'require)) From 19996af44a96f16399730a49a38c85a274bd5981 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 2 Jan 2005 23:46:12 +0000 Subject: [PATCH 044/560] *** empty log message *** --- lisp/ChangeLog | 3 +++ src/ChangeLog | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 605b099b558..fbaa3b10e50 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-01-02 Richard M. Stallman + * loadhist.el (file-loadhist-lookup): New function. + (file-provides, file-requires): Use it. + * electric.el (Electric-pop-up-window): Use fit-window-to-buffer instead of calculating the right size. diff --git a/src/ChangeLog b/src/ChangeLog index 6e725eef287..37477cba800 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-02 Richard M. Stallman + + * alloc.c (Fgarbage_collect): Don't truncate_undo_list on dead buffers. + 2004-12-31 Jan Dj,Ad(Brv * xterm.c (handle_one_xevent): Clear area in expose event for GTK. From 969be0336eeddc706fef1ca758a22e48a5facf23 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 3 Jan 2005 02:42:25 +0000 Subject: [PATCH 045/560] (basic-save-buffer-1): Fix previous change. --- lisp/ChangeLog | 2 ++ lisp/files.el | 29 ++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fbaa3b10e50..adf99fcfc7d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-01-02 Richard M. Stallman + * files.el (basic-save-buffer-1): Fix previous change. + * loadhist.el (file-loadhist-lookup): New function. (file-provides, file-requires): Use it. diff --git a/lisp/files.el b/lisp/files.el index 227bb781744..a4a102c9586 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1856,8 +1856,14 @@ mode function to use. FUNCTION will be called, unless it is nil. If the element has the form (REGEXP FUNCTION NON-NIL), then after calling FUNCTION (if it's not nil), we delete the suffix that matched -REGEXP and search the list again for another match.") +REGEXP and search the list again for another match. +If the file name matches `inhibit-first-line-modes-regexps', +then `auto-mode-alist' is not processed. + +See also `interpreter-mode-alist', which detects executable script modes +based on the interpreters they specify to run, +and `magic-mode-alist', which determines modes based on file contents.") (defvar interpreter-mode-alist ;; Note: The entries for the modes defined in cc-mode.el (awk-mode @@ -1902,11 +1908,13 @@ REGEXP and search the list again for another match.") ("guile" . scheme-mode) ("clisp" . lisp-mode))) "Alist mapping interpreter names to major modes. -This alist applies to files whose first line starts with `#!'. +This is used for files whose first lines match `auto-mode-interpreter-regexp'. Each element looks like (INTERPRETER . MODE). The car of each element is compared with the name of the interpreter specified in the first line. -If it matches, mode MODE is selected.") +If it matches, mode MODE is selected. + +See also `auto-mode-alist'.") (defvar inhibit-first-line-modes-regexps '("\\.tar\\'" "\\.tgz\\'") "List of regexps; if one matches a file name, don't look for `-*-'.") @@ -1935,12 +1943,14 @@ with that interpreter in `interpreter-mode-alist'.") (concat "\\(?:<\\?xml\\s +[^>]*>\\)?\\s *<" comment-re "*" "\\(?:!DOCTYPE\\s +[^>]*>\\s *<\\s *" comment-re "*\\)?" - "[Hh][Tt][Mm][Ll]")) . html-mode) + "[Hh][Tt][Mm][Ll]")) + . html-mode) ;; These two must come after html, because they are more general: ("<\\?xml " . xml-mode) (,(let* ((incomment-re "\\(?:[^-]\\|-[^-]\\)") (comment-re (concat "\\(?:!--" incomment-re "*-->\\s *<\\)"))) - (concat "\\s *<" comment-re "*!DOCTYPE ")) . sgml-mode) + (concat "\\s *<" comment-re "*!DOCTYPE ")) + . sgml-mode) ("%![^V]" . ps-mode) ("# xmcd " . conf-unix-mode)) "Alist of buffer beginnings vs. corresponding major mode functions. @@ -3264,11 +3274,12 @@ Before and after saving the buffer, this function runs ;; but inhibited if one of write-file-functions returns non-nil. ;; It returns a value (MODES . BACKUPNAME), like backup-buffer. (defun basic-save-buffer-1 () - (if save-buffer-coding-system - (let ((coding-system-for-write save-buffer-coding-system)) + (prog1 + (if save-buffer-coding-system + (let ((coding-system-for-write save-buffer-coding-system)) + (basic-save-buffer-2)) (basic-save-buffer-2)) - (basic-save-buffer-2)) - (setq buffer-file-coding-system-explicit last-coding-system-used)) + (setq buffer-file-coding-system-explicit last-coding-system-used))) ;; This returns a value (MODES . BACKUPNAME), like backup-buffer. (defun basic-save-buffer-2 () From 85aaa8d20de70bc95c0afde8755bd6cfbbe44e23 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 3 Jan 2005 03:20:06 +0000 Subject: [PATCH 046/560] *** empty log message *** --- admin/FOR-RELEASE | 16 ---------------- lisp/ChangeLog | 5 +++-- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 797e0d6c277..40fb0168793 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -183,22 +183,6 @@ interrupting I can get a backtrace, here's an example: Update: Maybe only reveals itself when compiled with GTK+ -** line-spacing and Electric-pop-up-window - -From: SAITO Takuya -Date: Mon, 31 May 2004 02:08:10 +0900 (JST) - -Electric-pop-up-window does not work well -if truncate long lines disabled and/or -`line-spacing' is set to positive integer. - -For example, start emacs -Q --line-spacing 1, and type M-` . -Then, the last line of *Completions* buffer is not visible. - -fit-window-to-buffer works well for me, so I guess -Electric-pop-up-window can use it. - - ** Partial highlighting of wrapped overlay From: Ralf Angeli diff --git a/lisp/ChangeLog b/lisp/ChangeLog index adf99fcfc7d..8b9639cef9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -8,10 +8,11 @@ * electric.el (Electric-pop-up-window): Use fit-window-to-buffer instead of calculating the right size. -2005-01-02 Stefan +2005-01-02 Karl Chen * vc-svn.el (vc-svn-diff): Stay local if possible. - From Karl Chen . + +2005-01-02 Stefan * vc-arch.el (vc-arch-workfile-version): Handle the empty-branch case. From ffbec9baad8c6b097fb3d0c932566e3a314b07b3 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 3 Jan 2005 03:23:31 +0000 Subject: [PATCH 047/560] *** empty log message *** --- etc/NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index caf2fdc1494..1e71282f3f1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -191,6 +191,9 @@ existing values. For example: will start up Emacs on an initial frame of 100x20 with red background, irrespective of geometry or background setting on the Windows registry. +** The terminal emulation code in term.el has been improved, it can +run most curses applications now. + ** New features in evaluation commands +++ From e922de02bb154b8142650c3404686544cb17d08a Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Mon, 3 Jan 2005 14:57:17 +0000 Subject: [PATCH 048/560] typo --- lisp/ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8b9639cef9b..ac78d4d7f9a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -63,7 +63,6 @@ * ses.el (copy-region-as-kill): Deactivate mark. ->>>>>>> 1.6818 2005-01-01 Richard M. Stallman * replace.el (occur-1): If the output buffer is also an input, From e169f939a59dee9a773116c9a6e40f6fb25b2511 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Mon, 3 Jan 2005 16:49:35 +0000 Subject: [PATCH 049/560] * macterm.c (x_new_font): Set FRAME_SPACE_WIDTH. (x_font_min_bounds, XLoadQueryFont): Use the correct font width metrics for max and min bounds. (x_load_font): Correctly calculate average font width metrics. --- src/ChangeLog | 7 +++++++ src/macterm.c | 52 +++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 37477cba800..30196b43ff5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-01-03 YAMAMOTO Mitsuharu + + * macterm.c (x_new_font): Set FRAME_SPACE_WIDTH. + (x_font_min_bounds, XLoadQueryFont): Use the correct font width + metrics for max and min bounds. + (x_load_font): Correctly calculate average font width metrics. + 2005-01-02 Richard M. Stallman * alloc.c (Fgarbage_collect): Don't truncate_undo_list on dead buffers. diff --git a/src/macterm.c b/src/macterm.c index 4df30e74386..dda0cc8311f 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -4952,7 +4952,8 @@ x_new_font (f, fontname) FRAME_BASELINE_OFFSET (f) = fontp->baseline_offset; FRAME_FONTSET (f) = -1; - FRAME_COLUMN_WIDTH (f) = FONT_WIDTH (FRAME_FONT (f)); + FRAME_COLUMN_WIDTH (f) = fontp->average_width; + FRAME_SPACE_WIDTH (f) = fontp->space_width; FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (FRAME_FONT (f)); compute_fringe_widths (f, 1); @@ -6475,12 +6476,8 @@ x_font_min_bounds (font, w, h) MacFontStruct *font; int *w, *h; { - /* - * TODO: Windows does not appear to offer min bound, only - * average and maximum width, and maximum height. - */ *h = FONT_HEIGHT (font); - *w = FONT_WIDTH (font); + *w = font->min_bounds.width; } @@ -6708,14 +6705,20 @@ XLoadQueryFont (Display *dpy, char *fontname) font->per_char = (XCharStruct *) xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1)); { - int c; + int c, min_width, max_width; + min_width = max_width = char_width; for (c = 0x20; c <= 0xff; c++) { - font->per_char[c - 0x20] = font->max_bounds; - font->per_char[c - 0x20].width = - font->per_char[c - 0x20].rbearing = CharWidth (c); + font->per_char[c - 0x20] = font->max_bounds; + char_width = CharWidth (c); + font->per_char[c - 0x20].width = char_width; + font->per_char[c - 0x20].rbearing = char_width; + min_width = min (min_width, char_width); + max_width = max (max_width, char_width); } + font->min_bounds.width = min_width; + font->max_bounds.width = max_width; } } @@ -6823,6 +6826,35 @@ x_load_font (f, fontname, size) fontp->name = (char *) xmalloc (strlen (font->fontname) + 1); bcopy (font->fontname, fontp->name, strlen (font->fontname) + 1); + if (font->min_bounds.width == font->max_bounds.width) + { + /* Fixed width font. */ + fontp->average_width = fontp->space_width = font->min_bounds.width; + } + else + { + XChar2b char2b; + XCharStruct *pcm; + + char2b.byte1 = 0x00, char2b.byte2 = 0x20; + pcm = mac_per_char_metric (font, &char2b, 0); + if (pcm) + fontp->space_width = pcm->width; + else + fontp->space_width = FONT_WIDTH (font); + + if (pcm) + { + int width = pcm->width; + for (char2b.byte2 = 33; char2b.byte2 <= 126; char2b.byte2++) + if ((pcm = mac_per_char_metric (font, &char2b, 0)) != NULL) + width += pcm->width; + fontp->average_width = width / 95; + } + else + fontp->average_width = FONT_WIDTH (font); + } + fontp->full_name = fontp->name; fontp->size = font->max_bounds.width; From e817f9a24842f7f949bd82d78d92fa86d139fd81 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Mon, 3 Jan 2005 16:56:28 +0000 Subject: [PATCH 050/560] (url-http-handle-authentication): Don't kill the current buffer. --- lisp/url/ChangeLog | 5 +++++ lisp/url/url-http.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 9bb5ef1c3e5..b3486e19acd 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2005-01-03 Klaus Straubinger (tiny change) + + * url-http.el (url-http-handle-authentication): + Don't kill the current buffer. + 2004-12-11 Stefan Monnier * url-handlers.el: Don't `require' everything eagerly. diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 8a7269e6bea..2608a85963a 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -322,8 +322,8 @@ This allows us to use `mail-fetch-field', etc." (let ((url-request-method url-http-method) (url-request-data url-http-data) (url-request-extra-headers url-http-extra-headers)) - (url-retrieve url url-callback-function url-callback-arguments)))) - (kill-buffer (current-buffer))))) + (url-retrieve url url-callback-function + url-callback-arguments))))))) (defun url-http-parse-response () "Parse just the response code." From 8a525646b0d1b78ecd3e36bf34f7002625814cf5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 3 Jan 2005 20:46:22 +0000 Subject: [PATCH 051/560] (perl-nochange, perl-calculate-indent): Don't confuse module-prefixed identifiers for labels. Reported by Juan-Leon Lahoz Garcia . --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/perl-mode.el | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac78d4d7f9a..7ad139850ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-03 Stefan Monnier + + * progmodes/perl-mode.el (perl-nochange, perl-calculate-indent): + Don't confuse module-prefixed identifiers for labels. + Reported by Juan-Leon Lahoz Garcia . + 2005-01-02 Richard M. Stallman * files.el (basic-save-buffer-1): Fix previous change. diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index c24e8046b66..eb630c2ed54 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -1,6 +1,6 @@ ;;; perl-mode.el --- Perl code editing commands for GNU Emacs -;; Copyright (C) 1990, 1994, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1994, 2003, 2005 Free Software Foundation, Inc. ;; Author: William F. Mann ;; Maintainer: FSF @@ -408,7 +408,7 @@ existing comment, moves to end-of-line, or if at end-of-line already, create a new comment." :type 'boolean) -(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:" +(defcustom perl-nochange ";?#\\|\f\\|\\s(\\|\\(\\w\\|\\s_\\)+:[^:]" "*Lines starting with this regular expression are not auto-indented." :type 'regexp) @@ -769,7 +769,7 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." (skip-chars-forward " \t\f\n") (cond ((looking-at ";?#") (forward-line 1) t) - ((looking-at "\\(\\w\\|\\s_\\)+:") + ((looking-at "\\(\\w\\|\\s_\\)+:[^:]") (save-excursion (end-of-line) (setq colon-line-end (point))) @@ -929,5 +929,5 @@ With argument, repeat that many times; negative args move backward." (provide 'perl-mode) -;;; arch-tag: 8c7ff68d-15f3-46a2-ade2-b7c41f176826 +;; arch-tag: 8c7ff68d-15f3-46a2-ade2-b7c41f176826 ;;; perl-mode.el ends here From 8ea5080e3587261d4188dbdeac4ed6ddf352f706 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 3 Jan 2005 21:00:07 +0000 Subject: [PATCH 052/560] (url-http-handle-authentication): Don't kill the current buffer. --- admin/FOR-RELEASE | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 40fb0168793..84c236fe426 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -32,6 +32,9 @@ invalid pointer from string_free_list. ** Fix up url-ldap.el. +** url/*.el has lots of `(declare (special ...))' which +are meaningless. What's that trying to do? + * BUGS ** Incomplete overlay mouse-face highlight bug (Ralf Angeli, Oct 18) @@ -62,42 +65,6 @@ further. I think in the near future we will see more of this problem, so it might be time to make anfe-ftp more intelligent. -** Bug in url-http-parse-headers, reported in -From: Vivek Dasmohapatra -Date: Tue, 28 Sep 2004 16:13:13 +0100 - -Fetching a url with url-retrieve can reult in an anrbitrary buffer -being killed if a 401 (or possibly a 407) result is encountered: - -url-http-parse-headers calls url-http-handle-authentication, -which can call url-retrieve. - -This results in the current buffer being killed, and a new http buffer -being generated. However, when the old http buffer is killed, emacs -picks the top buffer from the list as the new current buffer, so by the -time we get to the end of url-http-parse-headers, _that_ buffer is marked -as dead even though it is not necessarily a url buffer, so next time the -url libraries reap their dead buffers, an innocent bystander buffer is -killed instead (and an obsolete http buffer may be left lying around too). - -A possible fix (which I am currently using) is to call set-buffer -on the return value of url-http-parse-headers: - - (case url-http-response-status - (401 - ;; The request requires user authentication. The response - ;; MUST include a WWW-Authenticate header field containing a - ;; challenge applicable to the requested resource. The - ;; client MAY repeat the request with a suitable - ;; Authorization header field. - (url-mark-buffer-as-dead (current-buffer)) - (set-buffer (url-http-handle-authentication nil))) -etc .... - -which makes sure that it is the right http buffer that is current when -we come to mark the http buffers as dead. - - * GTK RELATED BUGS From 1b60b25ac3554a6b70f553f8d227acac9255b6e1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 3 Jan 2005 22:05:12 +0000 Subject: [PATCH 053/560] (find-variable-regexp): Avoid defface. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/find-func.el | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ad139850ba..f53277edaa4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-01-03 Stefan Monnier + * emacs-lisp/find-func.el (find-variable-regexp): Avoid defface. + * progmodes/perl-mode.el (perl-nochange, perl-calculate-indent): Don't confuse module-prefixed identifiers for labels. Reported by Juan-Leon Lahoz Garcia . diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index a70adb4d423..8b3125db50b 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -1,6 +1,6 @@ ;;; find-func.el --- find the definition of the Emacs Lisp function near point -;; Copyright (C) 1997, 1999, 2001, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001, 2004, 2005 Free Software Foundation, Inc. ;; Author: Jens Petersen ;; Maintainer: petersen@kurims.kyoto-u.ac.jp @@ -76,10 +76,10 @@ Please send improvements and fixes to the maintainer." :version "21.1") (defcustom find-variable-regexp - (concat"^\\s-*(def[^umag]\\(\\w\\|\\s_\\)+\\*?" find-function-space-re "%s\\(\\s-\\|$\\)") + (concat"^\\s-*(def[^fumag]\\(\\w\\|\\s_\\)+\\*?" find-function-space-re "%s\\(\\s-\\|$\\)") "The regexp used by `find-variable' to search for a variable definition. It should match right up to the variable name. The default value -avoids `defun', `defmacro', `defalias', `defadvice', `defgroup'. +avoids `defun', `defmacro', `defalias', `defadvice', `defgroup', `defface'. Please send improvements and fixes to the maintainer." :type 'regexp @@ -437,5 +437,5 @@ Point is saved if FUNCTION is in the current buffer." (provide 'find-func) -;;; arch-tag: 43ecd81c-74dc-4d9a-8f63-a61e55670d64 +;; arch-tag: 43ecd81c-74dc-4d9a-8f63-a61e55670d64 ;;; find-func.el ends here From a4d75ad7ceda7ed78eb6143b075e812a2ebb5eb1 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 3 Jan 2005 22:52:01 +0000 Subject: [PATCH 054/560] (w32_load_bdf_font): Set fontp->average_width and fontp->space_width to FONT_WIDTH so they are valid. --- src/w32bdf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/w32bdf.c b/src/w32bdf.c index 04739b8e846..092aff306dc 100644 --- a/src/w32bdf.c +++ b/src/w32bdf.c @@ -774,7 +774,10 @@ struct font_info *w32_load_bdf_font (struct frame *f, char *fontname, fontp->name = (char *) xmalloc (strlen (fontname) + 1); bcopy (fontname, fontp->name, strlen (fontname) + 1); fontp->full_name = fontp->name; - fontp->size = FONT_WIDTH (font); + /* FIXME: look at BDF spec to see if there are better ways of finding + average_width and space_width, hopefully that don't involve working out + the values for ourselves from the data. */ + fontp->size = fontp->average_width = fontp->space_width = FONT_WIDTH (font); fontp->height = FONT_HEIGHT (font); /* The slot `encoding' specifies how to map a character From 3aefd49fb9aa586941aa971730049857e41843b5 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 3 Jan 2005 22:52:51 +0000 Subject: [PATCH 055/560] (x_new_font): Set FRAME_COLUMN_WIDTH to fontp->average_width, not FONT_WIDTH. Set FRAME_SPACE_WIDTH to fontp->space_width. --- src/w32term.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/w32term.c b/src/w32term.c index 6e17b22ec5b..a0b00d58659 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -819,8 +819,7 @@ w32_reset_terminal_modes (void) /* Function prototypes of this page. */ -static XCharStruct *w32_per_char_metric P_ ((XFontStruct *, - wchar_t *, int)); +XCharStruct *w32_per_char_metric P_ ((XFontStruct *, wchar_t *, int)); static int w32_encode_char P_ ((int, wchar_t *, struct font_info *, int *)); @@ -957,7 +956,7 @@ w32_native_per_char_metric (font, char2b, font_type, pcm) } -static XCharStruct * +XCharStruct * w32_per_char_metric (font, char2b, font_type) XFontStruct *font; wchar_t *char2b; @@ -5290,7 +5289,8 @@ x_new_font (f, fontname) FRAME_BASELINE_OFFSET (f) = fontp->baseline_offset; FRAME_FONTSET (f) = -1; - FRAME_COLUMN_WIDTH (f) = FONT_WIDTH (FRAME_FONT (f)); + FRAME_COLUMN_WIDTH (f) = fontp->average_width; + FRAME_SPACE_WIDTH (f) = fontp->space_width; FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (FRAME_FONT (f)); compute_fringe_widths (f, 1); From ad5674f5a14ab073485f1301057ef5ec92e4b144 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Mon, 3 Jan 2005 22:53:30 +0000 Subject: [PATCH 056/560] (w32_load_system_font): Set FONT_WIDTH to maximum, not average width. Set fontp->average_width and fontp->space_width to their appropriate values. --- src/w32fns.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/w32fns.c b/src/w32fns.c index 08780e05b1f..b7115601553 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -64,6 +64,7 @@ extern double atof (); extern int w32_console_toggle_lock_key P_ ((int, Lisp_Object)); extern void w32_menu_display_help P_ ((HWND, HMENU, UINT, UINT)); extern void w32_free_menu_strings P_ ((HWND)); +extern XCharStruct *w32_per_char_metric P_ ((XFontStruct *, wchar_t *, int)); extern int quit_char; @@ -4544,7 +4545,7 @@ w32_load_system_font (f,fontname,size) /* Fill out details in lf according to the font that was actually loaded. */ lf.lfHeight = font->tm.tmInternalLeading - font->tm.tmHeight; - lf.lfWidth = font->tm.tmAveCharWidth; + lf.lfWidth = font->tm.tmMaxCharWidth; lf.lfWeight = font->tm.tmWeight; lf.lfItalic = font->tm.tmItalic; lf.lfCharSet = font->tm.tmCharSet; @@ -4592,6 +4593,24 @@ w32_load_system_font (f,fontname,size) fontp->name = (char *) xmalloc (strlen (fontname) + 1); bcopy (fontname, fontp->name, strlen (fontname) + 1); + if (lf.lfPitchAndFamily == FIXED_PITCH) + { + /* Fixed width font. */ + fontp->average_width = fontp->space_width = FONT_WIDTH (font); + } + else + { + wchar_t space = 32; + XCharStruct* pcm; + pcm = w32_per_char_metric (font, &space, ANSI_FONT); + if (pcm) + fontp->space_width = pcm->width; + else + fontp->space_width = FONT_WIDTH (font); + + fontp->average_width = font->tm.tmAveCharWidth; + } + charset = xlfd_charset_of_font (fontname); /* Cache the W32 codepage for a font. This makes w32_encode_char From a181a27fbe0ba6dab884d31d9b8db7b31967ed62 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 3 Jan 2005 23:43:34 +0000 Subject: [PATCH 057/560] (command-line): No longer load `custom-file'. --- lisp/startup.el | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index fee3fb7bd0f..672d20d5445 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -871,12 +871,6 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (sit-for 1)) (setq user-init-file source)))) - (when (stringp custom-file) - (unless (assoc custom-file load-history) - ;; If the .emacs file has set `custom-file' but hasn't - ;; loaded the file yet, let's load it. - (load custom-file t t))) - (unless inhibit-default-init (let ((inhibit-startup-message nil)) ;; Users are supposed to be told their rights. From 5aa971e3564cf8d6e695976d5a93b53caaedf118 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 3 Jan 2005 23:52:47 +0000 Subject: [PATCH 058/560] (custom-file): Doc fix for defcustom. (custom-file): The function no longer sets the variable `custom-file' to its return value. --- lisp/cus-edit.el | 70 +++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 5f3ffc6f8bf..7b427357981 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -3699,35 +3699,57 @@ The default is nil, which means to use your init file as specified by `user-init-file'. If the value is not nil, it should be an absolute file name. -To make this feature work, you'll need to put something in your -init file to specify the value of `custom-file'. Just -customizing the variable won't suffice, because Emacs won't know -which file to load unless the init file sets `custom-file'. +You can set this option through Custom, if you carefully read the +last paragraph below. However, usually it is simpler to write +something like the following in your init file: -When you change this variable, look in the previous custom file -\(usually your init file) for the forms `(custom-set-variables ...)' -and `(custom-set-faces ...)', and copy them (whichever ones you find) -to the new custom file. This will preserve your existing customizations." - :type '(choice (const :tag "Your Emacs init file" nil) file) +\(setq custom-file \"~/.emacs-custom.el\") +\(load custom-file) + +Note that both lines are necessary: the first line tells Custom to +save all customizations in this file, but does not load it. + +When you change this variable outside Custom, look in the +previous custom file \(usually your init file) for the +forms `(custom-set-variables ...)' and `(custom-set-faces ...)', +and copy them (whichever ones you find) to the new custom file. +This will preserve your existing customizations. + +If you save this option using Custom, Custom will write all +currently saved customizations, including the new one for this +option itself, into the file you specify, overwriting any +`custom-set-variables' and `custom-set-faces' forms already +present in that file. It will not delete any customizations from +the old custom file. You should do that manually if that is what you +want. You also have to put something like `\(load \"CUSTOM-FILE\") +in your init file, where CUSTOM-FILE is the actual name of the +file. Otherwise, Emacs will not load the file when it starts up, +and hence will not set `custom-file' to that file either." + :type '(choice (const :tag "Your Emacs init file" nil) + (file :format "%t:%v%d" + :doc + "Please read entire docstring below before setting \ +this through Custom. +Click om \"More\" \(or position point there and press RETURN) +if only the first line of the docstring is shown.")) :group 'customize) (defun custom-file () "Return the file name for saving customizations." - (setq custom-file - (or custom-file - (let ((user-init-file user-init-file) - (default-init-file - (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs"))) - (when (null user-init-file) - (if (or (file-exists-p default-init-file) - (and (eq system-type 'windows-nt) - (file-exists-p "~/_emacs"))) - ;; Started with -q, i.e. the file containing - ;; Custom settings hasn't been read. Saving - ;; settings there would overwrite other settings. - (error "Saving settings from \"emacs -q\" would overwrite existing customizations")) - (setq user-init-file default-init-file)) - user-init-file)))) + (or custom-file + (let ((user-init-file user-init-file) + (default-init-file + (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs"))) + (when (null user-init-file) + (if (or (file-exists-p default-init-file) + (and (eq system-type 'windows-nt) + (file-exists-p "~/_emacs"))) + ;; Started with -q, i.e. the file containing + ;; Custom settings hasn't been read. Saving + ;; settings there would overwrite other settings. + (error "Saving settings from \"emacs -q\" would overwrite existing customizations")) + (setq user-init-file default-init-file)) + user-init-file))) (defun custom-save-delete (symbol) "Visit `custom-file' and delete all calls to SYMBOL from it. From ed93087045317332eb41c976e4e799c11616ef57 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 4 Jan 2005 00:08:12 +0000 Subject: [PATCH 059/560] (Saving Customizations): Emacs no longer loads `custom-file' after .emacs in 21.4. (It never did in prior versions.) No longer mention customizing through Custom. --- man/custom.texi | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/man/custom.texi b/man/custom.texi index 840711369ef..90cc01393a9 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -487,21 +487,11 @@ set, saved or reset. The customization buffer normally saves customizations in @file{~/.emacs}. If you wish, you can save customizations in another file instead. To make this work, your @file{~/.emacs} should set -@code{custom-file} to the name of that file. If you are using Emacs -version 21.4 or later, Emacs loads the file right after your -@file{.emacs} if you did not load it already. In earlier versions, -you have to load the file in your @file{~/emacs}. If you customize -@code{custom-file} through the @samp{Customize} interface, you still -need to load it in your @file{.emacs}, but there is no need to set -it. For example: +@code{custom-file} to the name of that file and load it. For example: @example -;; @r{if not set through the @samp{Customize} interface:} -(setq custom-file "~/.emacs-custom") - -;; @r{in Emacs versions before 21.4 or if set through} -;; @r{the @samp{Customize} interface.} -(load "~/.emacs-custom") +(setq custom-file "~/.emacs-custom.el") +(load custom-file) @end example You can also use @code{custom-file} to specify different From 985a8e0f8a11f3b7d7fa7897aab6593a82648084 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 4 Jan 2005 00:09:21 +0000 Subject: [PATCH 060/560] *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ man/ChangeLog | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f53277edaa4..49062712c36 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-01-03 Luc Teirlinck + + * cus-edit.el (custom-file): Doc fix for defcustom. + (custom-file): The function no longer sets the variable + `custom-file' to its return value. + + * startup.el (command-line): No longer load `custom-file'. + 2005-01-03 Stefan Monnier * emacs-lisp/find-func.el (find-variable-regexp): Avoid defface. diff --git a/man/ChangeLog b/man/ChangeLog index 5da39a2a4c8..aa9859290ac 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,9 @@ +2005-01-03 Luc Teirlinck + + * custom.texi (Saving Customizations): Emacs no longer loads + `custom-file' after .emacs in 21.4. (It never did in prior + versions.) No longer mention customizing through Custom. + 2005-01-01 Jay Belanger * calc.texi (Programming Tutorial): Changed description of how to From b14f868ca5cb8d15d741c7e8b35e51f32b9bfa48 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 4 Jan 2005 00:44:02 +0000 Subject: [PATCH 061/560] *** empty log message *** --- src/ChangeLog | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 30196b43ff5..eff99c3bdd0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2005-01-03 Jason Rumney + + * w32bdf.c (w32_load_bdf_font): Set fontp->average_width and + fontp->space_width to FONT_WIDTH so they are valid. + + * w32fns.c (w32_load_system_font): Set FONT_WIDTH to maximum, not + average width. Set fontp->average_width and fontp->space_width to + their appropriate values. + + * w32term.c (x_new_font): Set FRAME_COLUMN_WIDTH to + fontp->average_width, not FONT_WIDTH. Set FRAME_SPACE_WIDTH to + fontp->space_width. + 2005-01-03 YAMAMOTO Mitsuharu * macterm.c (x_new_font): Set FRAME_SPACE_WIDTH. @@ -59,7 +72,7 @@ * xterm.c (x_new_font): Set FRAME_COLUMN_WIDTH to fontp->average_width, not FONT_WIDTH. Set FRAME_SPACE_WIDTH to - fontp-?space_width.. + fontp->space_width. (x_load_font): Calculate fontp->space_width and fontp->average_width. (x_term_init): Initialize dpyinfo->Xatom_AVERAGE_WIDTH. From d8ca23a0de8a965e1f72c5c2973f2126e8fd9702 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 4 Jan 2005 00:49:57 +0000 Subject: [PATCH 062/560] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index eff99c3bdd0..146eb219258 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -322,6 +322,10 @@ * gtkutil.c (xg_initialize): Install bindings for C-g so that dialogs and menus pop down. +2004-12-27 Kenichi Handa + + * coding.c (code_convert_region): Fix calculation of `ratio'. + 2004-12-25 Jan Dj,Ad(Brv * gtkutil.c (update_frame_tool_bar): Make the value of From c1bc6bb67e0e01fc17c672ed0f678077f890016e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 02:21:55 +0000 Subject: [PATCH 063/560] (lazy-highlight): Group renamed from isearch-lazy-... (lazy-highlight-cleanup, lazy-highlight-initial-delay) (lazy-highlight-interval, lazy-highlight-max-at-a-time) (lazy-highlight-face): Renamed from isearch-lazy-... Change all references to them. --- lisp/isearch.el | 125 +++++++++++++++++++++++++----------------------- 1 file changed, 65 insertions(+), 60 deletions(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index f94590ded2d..a87097f884e 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -155,6 +155,15 @@ command history." :type 'boolean :group 'isearch) +(defcustom isearch-lazy-highlight t + "*Controls the lazy-highlighting during incremental search. +When non-nil, all text in the buffer matching the current search +string is highlighted lazily (see `lazy-highlight-initial-delay' +and `lazy-highlight-interval')." + :type 'boolean + :group 'lazy-highlight + :group 'isearch) + (defvar isearch-mode-hook nil "Function(s) to call after starting up an incremental search.") @@ -199,6 +208,54 @@ Default value, nil, means edit the string instead." :type 'boolean :group 'isearch) +;;; Lazy highlight customization. +(defgroup lazy-highlight nil + "Lazy highlighting feature for matching strings." + :prefix "lazy-highlight-" + :version "21.1" + :group 'isearch + :group 'replace) + +(defcustom lazy-highlight-cleanup t + "*Controls whether to remove extra highlighting after a search. +If this is nil, extra highlighting can be \"manually\" removed with +\\[isearch-lazy-highlight-cleanup]." + :type 'boolean + :group 'lazy-highlight) + +(defcustom lazy-highlight-initial-delay 0.25 + "*Seconds to wait before beginning to lazily highlight all matches." + :type 'number + :group 'lazy-highlight) + +(defcustom lazy-highlight-interval 0 ; 0.0625 + "*Seconds between lazily highlighting successive matches." + :type 'number + :group 'lazy-highlight) + +(defcustom lazy-highlight-max-at-a-time 20 + "*Maximum matches to highlight at a time (for `lazy-highlight'). +Larger values may reduce isearch's responsiveness to user input; +smaller values make matches highlight slowly. +A value of nil means highlight all matches." + :type '(choice (const :tag "All" nil) + (integer :tag "Some")) + :group 'lazy-highlight) + +(defface lazy-highlight-face + '((((class color) (min-colors 88) (background light)) + (:background "paleturquoise")) + (((class color) (min-colors 88) (background dark)) + (:background "paleturquoise4")) + (((class color) (min-colors 16)) + (:background "turquoise3")) + (((class color) (min-colors 8)) + (:background "turquoise3")) + (t (:underline t))) + "Face for lazy highlighting of matches other than the current one." + :group 'isearch-faces + :group 'lazy-highlight) + ;; Define isearch-mode keymap. (defvar isearch-mode-map @@ -677,7 +734,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." ;; (setq pre-command-hook isearch-old-pre-command-hook) ; for lemacs (setq minibuffer-message-timeout isearch-original-minibuffer-message-timeout) (isearch-dehighlight t) - (isearch-lazy-highlight-cleanup isearch-lazy-highlight-cleanup) + (isearch-lazy-highlight-cleanup lazy-highlight-cleanup) (let ((found-start (window-start (selected-window))) (found-point (point))) (if isearch-window-configuration @@ -2227,46 +2284,6 @@ since they have special meaning in a regexp." ;; - the variable `isearch-invalid-regexp' is expected to be true ;; iff `isearch-string' is an invalid regexp. -(defgroup isearch-lazy-highlight nil - "Lazy highlighting feature for incremental search." - :prefix "isearch-lazy-highlight-" - :version "21.1" - :group 'isearch) - -(defcustom isearch-lazy-highlight t - "*Controls the lazy-highlighting during incremental searches. -When non-nil, all text in the buffer matching the current search -string is highlighted lazily (see `isearch-lazy-highlight-initial-delay' -and `isearch-lazy-highlight-interval')." - :type 'boolean - :group 'isearch-lazy-highlight) - -(defcustom isearch-lazy-highlight-cleanup t - "*Controls whether to remove extra highlighting after a search. -If this is nil, extra highlighting can be \"manually\" removed with -\\[isearch-lazy-highlight-cleanup]." - :type 'boolean - :group 'isearch-lazy-highlight) - -(defcustom isearch-lazy-highlight-initial-delay 0.25 - "*Seconds to wait before beginning to lazily highlight all matches." - :type 'number - :group 'isearch-lazy-highlight) - -(defcustom isearch-lazy-highlight-interval 0 ; 0.0625 - "*Seconds between lazily highlighting successive matches." - :type 'number - :group 'isearch-lazy-highlight) - -(defcustom isearch-lazy-highlight-max-at-a-time 20 - "*Maximum matches to highlight at a time (for `isearch-lazy-highlight'). -Larger values may reduce isearch's responsiveness to user input; -smaller values make matches highlight slowly. -A value of nil means highlight all matches." - :type '(choice (const :tag "All" nil) - (integer :tag "Some")) - :group 'isearch-lazy-highlight) - (defgroup isearch-faces nil "Lazy highlighting feature for incremental search." :version "21.1" @@ -2288,19 +2305,7 @@ A value of nil means highlight all matches." :group 'isearch-faces) (defvar isearch 'isearch) -(defface isearch-lazy-highlight-face - '((((class color) (min-colors 88) (background light)) - (:background "paleturquoise")) - (((class color) (min-colors 88) (background dark)) - (:background "paleturquoise4")) - (((class color) (min-colors 16)) - (:background "turquoise3")) - (((class color) (min-colors 8)) - (:background "turquoise3")) - (t (:underline t))) - "Face for lazy highlighting of Isearch matches other than the current one." - :group 'isearch-faces) -(defvar isearch-lazy-highlight-face 'isearch-lazy-highlight-face) +(defvar isearch-lazy-highlight-face 'lazy-highlight-face) (defvar isearch-lazy-highlight-overlays nil) (defvar isearch-lazy-highlight-wrapped nil) @@ -2316,11 +2321,11 @@ A value of nil means highlight all matches." (defun isearch-lazy-highlight-cleanup (&optional force) "Stop lazy highlighting and remove extra highlighting from current buffer. -FORCE non-nil means do it whether or not `isearch-lazy-highlight-cleanup' +FORCE non-nil means do it whether or not `lazy-highlight-cleanup' is nil. This function is called when exiting an incremental search if -`isearch-lazy-highlight-cleanup' is non-nil." +`lazy-highlight-cleanup' is non-nil." (interactive '(t)) - (if (or force isearch-lazy-highlight-cleanup) + (if (or force lazy-highlight-cleanup) (while isearch-lazy-highlight-overlays (delete-overlay (car isearch-lazy-highlight-overlays)) (setq isearch-lazy-highlight-overlays @@ -2330,7 +2335,7 @@ is nil. This function is called when exiting an incremental search if (setq isearch-lazy-highlight-timer nil))) (defun isearch-lazy-highlight-new-loop () - "Cleanup any previous `isearch-lazy-highlight' loop and begin a new one. + "Cleanup any previous `lazy-highlight' loop and begin a new one. This happens when `isearch-update' is invoked (which can cause the search string to change or the window to scroll)." (when (and (null executing-kbd-macro) @@ -2361,7 +2366,7 @@ search string to change or the window to scroll)." isearch-lazy-highlight-wrapped nil) (unless (equal isearch-string "") (setq isearch-lazy-highlight-timer - (run-with-idle-timer isearch-lazy-highlight-initial-delay nil + (run-with-idle-timer lazy-highlight-initial-delay nil 'isearch-lazy-highlight-update)))))) (defun isearch-lazy-highlight-search () @@ -2382,7 +2387,7 @@ Attempt to do the search exactly the way the pending isearch would." (defun isearch-lazy-highlight-update () "Update highlighting of other matches for current search." - (let ((max isearch-lazy-highlight-max-at-a-time) + (let ((max lazy-highlight-max-at-a-time) (looping t) nomore) (with-local-quit From 1766dac37ff8d010c3dde112d9e3066ec54a268c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 02:27:16 +0000 Subject: [PATCH 064/560] (query-replace-lazy-highlight): Doc fix. These were installed in the previous revision: (replace-dehighlight): Use lazy-highlight-cleanup. (query-replace-highlight, query-replace-lazy-highlight) (query-replace): Definitions moved up. --- lisp/replace.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index 8820a768006..33a30aa92d9 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1267,8 +1267,8 @@ passed in. If LITERAL is set, no checking is done, anyway." "*Controls the lazy-highlighting during query replacements. When non-nil, all text in the buffer matching the current match is highlighted lazily using isearch lazy highlighting (see -`isearch-lazy-highlight-initial-delay' and -`isearch-lazy-highlight-interval')." +`lazy-highlight-initial-delay' and +`lazy-highlight-interval')." :type 'boolean :group 'matching :version "21.4") From fa3c342659d5b6e668922c9242d74fd56dbd5a13 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 03:00:21 +0000 Subject: [PATCH 065/560] (window_scroll_pixel_based): Don't correct preserve_y for CURRENT_HEADER_LINE_HEIGHT when moving backwards. --- src/window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/window.c b/src/window.c index d42ff11d7dd..735bd99fd55 100644 --- a/src/window.c +++ b/src/window.c @@ -4688,7 +4688,8 @@ window_scroll_pixel_based (window, n, whole, noerror) ; else if (preserve_y >= 0) { - /* If we have a header line, take account of it. */ + /* If we have a header line, take account of it. + This is necessary because we set it.current_y to 0, above. */ if (WINDOW_WANTS_HEADER_LINE_P (w)) preserve_y -= CURRENT_HEADER_LINE_HEIGHT (w); @@ -4728,9 +4729,14 @@ window_scroll_pixel_based (window, n, whole, noerror) { SET_TEXT_POS_FROM_MARKER (start, w->start); start_display (&it, w, start); +#if 0 /* It's wrong to subtract this here + because we called start_display again + and did not alter it.current_y this time. */ + /* If we have a header line, take account of it. */ if (WINDOW_WANTS_HEADER_LINE_P (w)) preserve_y -= CURRENT_HEADER_LINE_HEIGHT (w); +#endif move_it_to (&it, -1, -1, preserve_y, -1, MOVE_TO_Y); SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); From d57c7572e8cdd551957880462859621acb7cdcba Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 03:00:45 +0000 Subject: [PATCH 066/560] *** empty log message *** --- lisp/ChangeLog | 16 +++++++++++++++- src/ChangeLog | 5 +++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 49062712c36..2e5080b3cd2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2005-01-03 Richard M. Stallman + + * replace.el (replace-dehighlight): Use lazy-highlight-cleanup. + (query-replace-highlight, query-replace-lazy-highlight) + (query-replace): Definitions moved up. Doc fix. + +2005-01-03 Richard M. Stallman + + * isearch.el (lazy-highlight): Group renamed from isearch-lazy-... + (lazy-highlight-cleanup, lazy-highlight-initial-delay) + (lazy-highlight-interval, lazy-highlight-max-at-a-time) + (lazy-highlight-face): Renamed from isearch-lazy-... + Change all references to them. + 2005-01-03 Luc Teirlinck * cus-edit.el (custom-file): Doc fix for defcustom. @@ -24,7 +38,7 @@ * electric.el (Electric-pop-up-window): Use fit-window-to-buffer instead of calculating the right size. -2005-01-02 Karl Chen +2005-01-02 Karl Chen (tiny change) * vc-svn.el (vc-svn-diff): Stay local if possible. diff --git a/src/ChangeLog b/src/ChangeLog index 146eb219258..8499b87d69d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-03 Richard M. Stallman + + * window.c (window_scroll_pixel_based): Don't correct preserve_y + for CURRENT_HEADER_LINE_HEIGHT when moving backwards. + 2005-01-03 Jason Rumney * w32bdf.c (w32_load_bdf_font): Set fontp->average_width and From d4bb773510c425c3c233cafee3d2304f00186d8d Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Tue, 4 Jan 2005 05:15:32 +0000 Subject: [PATCH 067/560] No longer require `cl'; `dolist' is standard. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/hideshow.el | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2e5080b3cd2..12f0848a01a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-04 Thien-Thi Nguyen + + * progmodes/hideshow.el: No longer require `cl'; `dolist' is standard. + 2005-01-03 Richard M. Stallman * replace.el (replace-dehighlight): Use lazy-highlight-cleanup. diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 07fcda385ef..6dcb619d629 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -233,7 +233,6 @@ ;;; Code: (require 'easymenu) -(eval-when-compile (require 'cl)) ;;--------------------------------------------------------------------------- ;; user-configurable variables From 01d2bd0234ac15607d4fca9ebbc057757cc0e587 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Tue, 4 Jan 2005 05:19:16 +0000 Subject: [PATCH 068/560] Update `Maintainer-Version' header comment; nfc. --- lisp/progmodes/hideshow.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 6dcb619d629..d4229cf44c6 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -5,7 +5,7 @@ ;; Author: Thien-Thi Nguyen ;; Dan Nicolaescu ;; Keywords: C C++ java lisp tools editing comments blocks hiding outlines -;; Maintainer-Version: 5.58.2.3 +;; Maintainer-Version: 5.58.2.4 ;; Time-of-Day-Author-Most-Likely-to-be-Recalcitrant: early morning ;; This file is part of GNU Emacs. From 8c399bc15fa89678df1aeaf0be874c4f0a2aae77 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 4 Jan 2005 14:46:41 +0000 Subject: [PATCH 069/560] (Rewrite rules): Remove an exercise (on 0^0) which is no longer applicable. --- man/calc.texi | 63 ++++++++------------------------------------------- 1 file changed, 9 insertions(+), 54 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 2036c40d84f..96b8d739385 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -5859,15 +5859,7 @@ is one or more non-sum terms separated by @samp{+} or @samp{-} signs, so that @expr{2 - 3 (x + y) + x y} is a sum of three terms.) @xref{Rewrites Answer 5, 5}. (@bullet{}) -(@bullet{}) @strong{Exercise 6.} Calc considers the form @expr{0^0} -to be ``indeterminate,'' and leaves it unevaluated (assuming Infinite -mode is not enabled). Some people prefer to define @expr{0^0 = 1}, -so that the identity @expr{x^0 = 1} can safely be used for all @expr{x}. -Find a way to make Calc follow this convention. What happens if you -now type @kbd{m i} to turn on Infinite mode? -@xref{Rewrites Answer 6, 6}. (@bullet{}) - -(@bullet{}) @strong{Exercise 7.} A Taylor series for a function is an +(@bullet{}) @strong{Exercise 6.} A Taylor series for a function is an infinite series that exactly equals the value of that function at values of @expr{x} near zero. @@ -5913,9 +5905,12 @@ on the stack, we want to be able to type @kbd{*} and get the result rearranged or if @kbd{a s} needs to be typed after rewriting. (This one is rather tricky; the solution at the end of this chapter uses 6 rewrite rules. Hint: The @samp{constant(x)} condition tests whether @samp{x} is -a number.) @xref{Rewrites Answer 7, 7}. (@bullet{}) +a number.) @xref{Rewrites Answer 6, 6}. (@bullet{}) + +Just for kicks, try adding the rule @code{2+3 := 6} to @code{EvalRules}. +What happens? (Be sure to remove this rule afterward, or you might get +a nasty surprise when you use Calc to balance your checkbook!) -@c [fix-ref Rewrite Rules] @xref{Rewrite Rules}, for the whole story on rewrite rules. @node Programming Tutorial, Answers to Exercises, Algebra Tutorial, Tutorial @@ -6643,8 +6638,7 @@ This section includes answers to all the exercises in the Calc tutorial. * Rewrites Answer 3:: Rewriting opt(a) + opt(b) x * Rewrites Answer 4:: Sequence of integers * Rewrites Answer 5:: Number of terms in sum -* Rewrites Answer 6:: Defining 0^0 = 1 -* Rewrites Answer 7:: Truncated Taylor series +* Rewrites Answer 6:: Truncated Taylor series * Programming Answer 1:: Fresnel's C(x) * Programming Answer 2:: Negate third stack element * Programming Answer 3:: Compute sin(x) / x, etc. @@ -9094,48 +9088,9 @@ Here we have taken advantage of the fact that earlier rules always match before later rules; @samp{nterms(x)} will only be tried if we already know that @samp{x} is not a sum. -@node Rewrites Answer 6, Rewrites Answer 7, Rewrites Answer 5, Answers to Exercises +@node Rewrites Answer 6, Programming Answer 1, Rewrites Answer 5, Answers to Exercises @subsection Rewrites Tutorial Exercise 6 -Just put the rule @samp{0^0 := 1} into @code{EvalRules}. For example, -before making this definition we have: - -@smallexample -@group -2: [-2, -1, 0, 1, 2] 1: [1, 1, 0^0, 1, 1] -1: 0 . - . - - v x 5 @key{RET} 3 - 0 V M ^ -@end group -@end smallexample - -@noindent -But then: - -@smallexample -@group -2: [-2, -1, 0, 1, 2] 1: [1, 1, 1, 1, 1] -1: 0 . - . - - U ' 0^0:=1 @key{RET} s t EvalRules @key{RET} V M ^ -@end group -@end smallexample - -Perhaps more surprisingly, this rule still works with Infinite mode -turned on. Calc tries @code{EvalRules} before any built-in rules for -a function. This allows you to override the default behavior of any -Calc feature: Even though Calc now wants to evaluate @expr{0^0} to -@code{nan}, your rule gets there first and evaluates it to 1 instead. - -Just for kicks, try adding the rule @code{2+3 := 6} to @code{EvalRules}. -What happens? (Be sure to remove this rule afterward, or you might get -a nasty surprise when you use Calc to balance your checkbook!) - -@node Rewrites Answer 7, Programming Answer 1, Rewrites Answer 6, Answers to Exercises -@subsection Rewrites Tutorial Exercise 7 - @noindent Here is a rule set that will do the job: @@ -9208,7 +9163,7 @@ for a way to do this in Calc, although for something as involved as this it would probably be better to write the formatting routine in Lisp.) -@node Programming Answer 1, Programming Answer 2, Rewrites Answer 7, Answers to Exercises +@node Programming Answer 1, Programming Answer 2, Rewrites Answer 6, Answers to Exercises @subsection Programming Tutorial Exercise 1 @noindent From 98e68e5eb8a75e0df45aa96e61e2f3cc9b1465c1 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 4 Jan 2005 14:58:16 +0000 Subject: [PATCH 070/560] *** empty log message *** --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index aa9859290ac..ffd8c70dc4a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-04 Jay Belanger + + * calc.texi (Rewrite rules): Remove an exercise (on 0^0) which is + no longer applicable. + 2005-01-03 Luc Teirlinck * custom.texi (Saving Customizations): Emacs no longer loads From 69ba53f79228c78cfa735d56df666ba721edab1c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 14:59:47 +0000 Subject: [PATCH 071/560] (sendmail-pre-abbrev-expand-hook): Don't expand if the character is @, period, dash, etc. (define-mail-abbrev): Quote names that contain problem characters. --- lisp/ChangeLog | 6 ++++++ lisp/mail/mailabbrev.el | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 12f0848a01a..28c6645506f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-04 Richard M. Stallman + + * mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook): + Don't expand if the character is @, period, dash, etc. + (define-mail-abbrev): Quote names that contain problem characters. + 2005-01-04 Thien-Thi Nguyen * progmodes/hideshow.el: No longer require `cl'; `dolist' is standard. diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 1b94f179f94..2f973cdfbb9 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -305,10 +305,19 @@ If DEFINITION contains multiple addresses, separate them with commas." end (string-match "\"[ \t,]*" definition start)) (setq end (string-match "[ \t,]+" definition start))) (setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start))) - (setq result (cons (substring definition start end) result)) - (setq start (and end - (/= (match-end 0) L) - (match-end 0)))) + (let ((tem (substring definition start end))) + ;; Advance the loop past this address. + (setq start (and end + (/= (match-end 0) L) + (match-end 0))) + ;; If the full name contains a problem character, quote it. + (when (string-match "\\(.+?\\)[ \t]*\\(<.*>\\)" tem) + (if (string-match "[^- !#$%&'*+/0-9=?A-Za-z^_`{|}~]" + (match-string 1 tem)) + (setq tem (replace-regexp-in-string + "\\(.+?\\)[ \t]*\\(<.*>\\)" "\"\\1\" \\2" + tem)))) + (push tem result))) (setq definition (mapconcat (function identity) (nreverse result) mail-alias-separator-string))) @@ -485,7 +494,9 @@ of a mail alias. The value is set up, buffer-local, when first needed.") ;; the usual syntax table. (or (and (integerp last-command-char) - (eq (char-syntax last-command-char) ?_)) + (or (eq (char-syntax last-command-char) ?_) + ;; Don't expand on @. + (memq last-command-char '(?@ ?. ?% ?! ?_ ?-)))) (let ((pre-abbrev-expand-hook nil)) ; That's us; don't loop. ;; Use this table so that abbrevs can have hyphens in them. (set-syntax-table mail-abbrev-syntax-table) @@ -610,7 +621,8 @@ Don't use this command in Lisp programs! (interactive "P") (if (looking-at "[ \t]*\n") (expand-abbrev)) (setq this-command 'end-of-buffer) - (end-of-buffer arg)) + (with-no-warnings + (end-of-buffer arg))) (eval-after-load "sendmail" '(progn From 11bd2f9c9b6e1d2af39f2aab177614086e5a0aa4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 4 Jan 2005 15:25:43 +0000 Subject: [PATCH 072/560] (insert-directory): Only look for error lines in inserted text. Don't move too far after processing --dired markers. --- lisp/files.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index a4a102c9586..cdaa7a5adb8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4560,7 +4560,7 @@ normally equivalent short `-D' option is just passed on to error-lines) ;; Find all the lines that are error messages, ;; and record the bounds of each one. - (goto-char (point-min)) + (goto-char beg) (while (< (point) linebeg) (or (eql (following-char) ?\s) (push (list (point) (line-end-position)) error-lines)) @@ -4586,11 +4586,9 @@ normally equivalent short `-D' option is just passed on to (end-of-line)))) (goto-char end) (beginning-of-line) - (delete-region (point) (progn (forward-line 2) (point)))) - (forward-line 1) + (delete-region (point) (progn (forward-line 1) (point)))) (if (looking-at "//DIRED-OPTIONS//") - (delete-region (point) (progn (forward-line 1) (point))) - (forward-line 1)))) + (delete-region (point) (progn (forward-line 1) (point)))))) ;; Now decode what read if necessary. (let ((coding (or coding-system-for-read From d198dfaa8df7fea8dd81f91f02346fc4f64493be Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 4 Jan 2005 15:31:32 +0000 Subject: [PATCH 073/560] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 28c6645506f..610d8aaca2a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-04 Andreas Schwab + + * files.el (insert-directory): Only look for error lines in + inserted text. Don't move too far after processing --dired + markers. + 2005-01-04 Richard M. Stallman * mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook): From d36756051300dde65a61dd35e94e6f2e64378c27 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 16:01:46 +0000 Subject: [PATCH 074/560] (Saving Customizations): Minor improvement. --- man/ChangeLog | 8 ++++++-- man/custom.texi | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index ffd8c70dc4a..81f1449fb10 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-04 Richard M. Stallman + + * custom.texi (Saving Customizations): Minor improvement. + 2005-01-04 Jay Belanger * calc.texi (Rewrite rules): Remove an exercise (on 0^0) which is @@ -6,8 +10,8 @@ 2005-01-03 Luc Teirlinck * custom.texi (Saving Customizations): Emacs no longer loads - `custom-file' after .emacs in 21.4. (It never did in prior - versions.) No longer mention customizing through Custom. + `custom-file' after .emacs. No longer mention customizing through + Custom. 2005-01-01 Jay Belanger diff --git a/man/custom.texi b/man/custom.texi index 90cc01393a9..bbde8b4aaf5 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -487,7 +487,8 @@ set, saved or reset. The customization buffer normally saves customizations in @file{~/.emacs}. If you wish, you can save customizations in another file instead. To make this work, your @file{~/.emacs} should set -@code{custom-file} to the name of that file and load it. For example: +@code{custom-file} to the name of that file. Then you should load the +file by calling @code{load}. For example: @example (setq custom-file "~/.emacs-custom.el") From a8e1052421f19afd51d1909f11997a6c94c004f8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 17:59:28 +0000 Subject: [PATCH 075/560] (change-log-font-lock-keywords): Don't match just "From". --- lisp/add-log.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/add-log.el b/lisp/add-log.el index 14a32e580c8..50be95d265a 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -248,7 +248,9 @@ Note: The search is conducted only within 10%, at the beginning of the file." ("<\\([^>\n]+\\)>\\(:\\| (\\)" (1 'change-log-function-face)) ;; ;; Acknowledgements. - ("\\(^\t\\| \\)\\(From\\|Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)" + ;; Don't include plain "From" because that is vague; + ;; we want to encourage people to say something more specific. + ("\\(^\t\\| \\)\\(Patch\\(es\\)? by\\|Report\\(ed by\\| from\\)\\|Suggest\\(ed by\\|ion from\\)\\)" 2 'change-log-acknowledgement-face)) "Additional expressions to highlight in Change Log mode.") From 60d1a807afa6ba357c6116bf6401a3e91fbbff8f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 18:01:45 +0000 Subject: [PATCH 076/560] *** empty log message *** --- etc/NEWS | 17 +++++++---------- lisp/ChangeLog | 4 ++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 1e71282f3f1..e100cf8caac 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -625,11 +625,6 @@ too. If you want to use just plain `*' as a wildcard, type `*""'; the doublequotes make no difference in the shell, but they prevent special treatment in `dired-do-shell-command'. -+++ -*** Dired's v command now runs external viewers to view certain -types of files. The variable `dired-view-command-alist' controls -what external viewers to use and when. - *** In Dired, the w command now copies the current line's file name into the kill ring. With a zero prefix arg, copies absolute file names. @@ -2429,6 +2424,13 @@ timing measurements of code (including the garbage collection component). ** `cfengine-mode' is a major mode for editing GNU Cfengine configuration files. +* Incompatible Lisp Changes in Emacs 21.4 + ++++ +** Mode line display ignores text properties as well as the +:propertize and :eval forms in the value of a variable whose +`risky-local-variable' property is nil. + * Lisp Changes in Emacs 21.4 +++ @@ -3852,11 +3854,6 @@ Reference manual for more detailed documentation. ** The new mode-line construct `(:propertize ELT PROPS...)' can be used to add text properties to mode-line elements. -+++ -** Mode line display ignores text properties as well as the -:propertize and :eval forms in the value of a variable whose -`risky-local-variable' property is nil. - +++ ** The new `%i' and `%I' constructs for `mode-line-format' can be used to display the size of the accessible part of the buffer on the mode diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 610d8aaca2a..c72040211ce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-04 Richard M. Stallman + + * add-log.el (change-log-font-lock-keywords): Don't match just "From". + 2005-01-04 Andreas Schwab * files.el (insert-directory): Only look for error lines in From a4338f5175a7eeefa3d0eb52da9a2916d073d4fd Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 4 Jan 2005 19:51:00 +0000 Subject: [PATCH 077/560] (Basic Tutorial, Programming Tutorial): Removed caveats for Lucid Emacs. --- man/ChangeLog | 5 +++++ man/calc.texi | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 81f1449fb10..504073cbe8f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-04 Jay Belanger + + * calc.texi (Basic Tutorial, Programming Tutorial): Remove caveats + for Lucid Emacs. + 2005-01-04 Richard M. Stallman * custom.texi (Saving Customizations): Minor improvement. diff --git a/man/calc.texi b/man/calc.texi index 96b8d739385..514b09d20dd 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -2331,9 +2331,8 @@ key. If you type a prefix key by accident, you can press @kbd{C-g} to cancel it. (In fact, you can press @kbd{C-g} to cancel almost anything in Emacs.) To get help on a prefix key, press that key followed by @kbd{?}. Some prefixes have several lines of help, -so you need to press @kbd{?} repeatedly to see them all. This may -not work under Lucid Emacs, but you can also type @kbd{h h} to -see all the help at once. +so you need to press @kbd{?} repeatedly to see them all. +You can also type @kbd{h h} to see all the help at once. Try pressing @kbd{t ?} now. You will see a line of the form, @@ -5924,9 +5923,6 @@ system. But Lisp and rewrite rules take a while to master, and often all you want to do is define a new function or repeat a command a few times. Calc has features that allow you to do these things easily. -(Note that the programming commands relating to user-defined keys -are not yet supported under Lucid Emacs 19.) - One very limited form of programming is defining your own functions. Calc's @kbd{Z F} command allows you to define a function name and key sequence to correspond to any formula. Programming commands use From 026cdede8576e1cb571b0674e4892a3d6a507fb6 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 4 Jan 2005 20:22:41 +0000 Subject: [PATCH 078/560] (refill_memory_reserve): Move. (emacs_blocked_free, emacs_blocked_malloc, emacs_blocked_realloc) (reset_malloc_hooks, uninterrupt_malloc) [SYNC_INPUT]: Don't define. --- src/ChangeLog | 6 ++++++ src/alloc.c | 38 +++++++++++++++++++++----------------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8499b87d69d..990c856fc38 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-01-04 Stefan Monnier + + * alloc.c (refill_memory_reserve): Move. + (emacs_blocked_free, emacs_blocked_malloc, emacs_blocked_realloc) + (reset_malloc_hooks, uninterrupt_malloc) [SYNC_INPUT]: Don't define. + 2005-01-03 Richard M. Stallman * window.c (window_scroll_pixel_based): Don't correct preserve_y diff --git a/src/alloc.c b/src/alloc.c index a1ba6dfc513..3723f9ea872 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -103,7 +103,7 @@ extern __malloc_size_t __malloc_extra_blocks; that the backend handles concurrent access to malloc within its own threads but Emacs code running in the main thread is not included in that control). - When UNBLOCK_INPUT is called, revoke_input_signal may be called. If this + When UNBLOCK_INPUT is called, reinvoke_input_signal may be called. If this happens in one of the backend threads we will have two threads that tries to run Emacs code at once, and the code is not prepared for that. To prevent that, we only call BLOCK/UNBLOCK from the main thread. */ @@ -1112,18 +1112,35 @@ allocate_buffer () return b; } + +#ifndef SYSTEM_MALLOC + +/* If we released our reserve (due to running out of memory), + and we have a fair amount free once again, + try to set aside another reserve in case we run out once more. + + This is called when a relocatable block is freed in ralloc.c. */ + +void +refill_memory_reserve () +{ + if (spare_memory == 0) + spare_memory = (char *) malloc ((size_t) SPARE_MEMORY); +} + /* Arranging to disable input signals while we're in malloc. This only works with GNU malloc. To help out systems which can't use GNU malloc, all the calls to malloc, realloc, and free elsewhere in the code should be inside a BLOCK_INPUT/UNBLOCK_INPUT - pairs; unfortunately, we have no idea what C library functions + pair; unfortunately, we have no idea what C library functions might call malloc, so we can't really protect them unless you're using GNU malloc. Fortunately, most of the major operating systems can use GNU malloc. */ -#ifndef SYSTEM_MALLOC +#ifndef SYNC_INPUT + #ifndef DOUG_LEA_MALLOC extern void * (*__malloc_hook) P_ ((size_t)); extern void * (*__realloc_hook) P_ ((void *, size_t)); @@ -1182,20 +1199,6 @@ emacs_blocked_free (ptr) } -/* If we released our reserve (due to running out of memory), - and we have a fair amount free once again, - try to set aside another reserve in case we run out once more. - - This is called when a relocatable block is freed in ralloc.c. */ - -void -refill_memory_reserve () -{ - if (spare_memory == 0) - spare_memory = (char *) malloc ((size_t) SPARE_MEMORY); -} - - /* This function is the malloc hook that Emacs uses. */ static void * @@ -1347,6 +1350,7 @@ uninterrupt_malloc () __realloc_hook = emacs_blocked_realloc; } +#endif /* not SYNC_INPUT */ #endif /* not SYSTEM_MALLOC */ From 59b568a702293eaf48248477ec25f38f81828bc1 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 4 Jan 2005 20:34:21 +0000 Subject: [PATCH 079/560] (Programming Tutorial): Mention that the user needs to be in the right mode to compute some functions. --- man/ChangeLog | 2 ++ man/calc.texi | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 504073cbe8f..f75f8ceac37 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -2,6 +2,8 @@ * calc.texi (Basic Tutorial, Programming Tutorial): Remove caveats for Lucid Emacs. + (Programming Tutorial): Mention that the user needs to be in the + right mode to compute some functions. 2005-01-04 Richard M. Stallman diff --git a/man/calc.texi b/man/calc.texi index 514b09d20dd..32ac9a5fc8d 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -5984,8 +5984,9 @@ which in algebraic notation is written like @samp{ninteg(f(t), t, 0, x)} with any integrand @samp{f(t)}. Define a @kbd{z s} command and @code{Si} function that implement this. You will need to edit the default argument list a bit. As a test, @samp{Si(1)} should return -0.946083. (Hint: @code{ninteg} will run a lot faster if you reduce -the precision to, say, six digits beforehand.) +0.946083. (If you don't get this answer, you might want to check that +Calc is in Radians mode. Also, @code{ninteg} will run a lot faster if +you reduce the precision to, say, six digits beforehand.) @xref{Programming Answer 1, 1}. (@bullet{}) The simplest way to do real ``programming'' of Emacs is to define a From 6bfb8bd66a890522ab6ad5964250920e6f144dbd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 20:36:28 +0000 Subject: [PATCH 080/560] (Man-fontify-manpage): Turn off undo generation. --- lisp/man.el | 82 +++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/lisp/man.el b/lisp/man.el index 735805f1bba..a384bf34e29 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -822,6 +822,7 @@ Same for the ANSI bold and normal escape sequences." (goto-char (point-min)) ;; Fontify ANSI escapes. (let ((faces nil) + (buffer-undo-list t) (start (point))) ;; http://www.isthe.com/chongo/tech/comp/ansi_escapes.html ;; suggests many codes, but we only handle: @@ -853,46 +854,47 @@ Same for the ANSI bold and normal escape sequences." (delete-region (match-beginning 0) (match-end 0)) (setq start (point)))) ;; Other highlighting. - (if (< (buffer-size) (position-bytes (point-max))) - ;; Multibyte characters exist. - (progn - (goto-char (point-min)) - (while (search-forward "__\b\b" nil t) - (backward-delete-char 4) - (put-text-property (point) (1+ (point)) 'face Man-underline-face)) - (goto-char (point-min)) - (while (search-forward "\b\b__" nil t) - (backward-delete-char 4) - (put-text-property (1- (point)) (point) 'face Man-underline-face)))) - (goto-char (point-min)) - (while (search-forward "_\b" nil t) - (backward-delete-char 2) - (put-text-property (point) (1+ (point)) 'face Man-underline-face)) - (goto-char (point-min)) - (while (search-forward "\b_" nil t) - (backward-delete-char 2) - (put-text-property (1- (point)) (point) 'face Man-underline-face)) - (goto-char (point-min)) - (while (re-search-forward "\\(.\\)\\(\b+\\1\\)+" nil t) - (replace-match "\\1") - (put-text-property (1- (point)) (point) 'face Man-overstrike-face)) - (goto-char (point-min)) - (while (re-search-forward "o\b\\+\\|\\+\bo" nil t) - (replace-match "o") - (put-text-property (1- (point)) (point) 'face 'bold)) - (goto-char (point-min)) - (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) - (replace-match "+") - (put-text-property (1- (point)) (point) 'face 'bold)) - (goto-char (point-min)) - ;; Try to recognize common forms of cross references. - (Man-highlight-references) - (Man-softhyphen-to-minus) - (goto-char (point-min)) - (while (re-search-forward Man-heading-regexp nil t) - (put-text-property (match-beginning 0) - (match-end 0) - 'face Man-overstrike-face)) + (let ((buffer-undo-list t)) + (if (< (buffer-size) (position-bytes (point-max))) + ;; Multibyte characters exist. + (progn + (goto-char (point-min)) + (while (search-forward "__\b\b" nil t) + (backward-delete-char 4) + (put-text-property (point) (1+ (point)) 'face Man-underline-face)) + (goto-char (point-min)) + (while (search-forward "\b\b__" nil t) + (backward-delete-char 4) + (put-text-property (1- (point)) (point) 'face Man-underline-face)))) + (goto-char (point-min)) + (while (search-forward "_\b" nil t) + (backward-delete-char 2) + (put-text-property (point) (1+ (point)) 'face Man-underline-face)) + (goto-char (point-min)) + (while (search-forward "\b_" nil t) + (backward-delete-char 2) + (put-text-property (1- (point)) (point) 'face Man-underline-face)) + (goto-char (point-min)) + (while (re-search-forward "\\(.\\)\\(\b+\\1\\)+" nil t) + (replace-match "\\1") + (put-text-property (1- (point)) (point) 'face Man-overstrike-face)) + (goto-char (point-min)) + (while (re-search-forward "o\b\\+\\|\\+\bo" nil t) + (replace-match "o") + (put-text-property (1- (point)) (point) 'face 'bold)) + (goto-char (point-min)) + (while (re-search-forward "[-|]\\(\b[-|]\\)+" nil t) + (replace-match "+") + (put-text-property (1- (point)) (point) 'face 'bold)) + (goto-char (point-min)) + ;; Try to recognize common forms of cross references. + (Man-highlight-references) + (Man-softhyphen-to-minus) + (goto-char (point-min)) + (while (re-search-forward Man-heading-regexp nil t) + (put-text-property (match-beginning 0) + (match-end 0) + 'face Man-overstrike-face))) (message "%s man page formatted" Man-arguments)) (defun Man-highlight-references () From 73a6a97294ddb173738541a1209690a9d9440154 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 4 Jan 2005 21:15:09 +0000 Subject: [PATCH 081/560] (display-battery-mode): Rename from display-battery. Handle the case where it gets turned off. --- etc/NEWS | 4 +++- lisp/ChangeLog | 10 +++++++--- lisp/battery.el | 17 ++++++++++------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e100cf8caac..b1f29619a2a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1,5 +1,6 @@ GNU Emacs NEWS -- history of user-visible changes. 2003-05-21 -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. See the end for copying conditions. Please send Emacs bug reports to bug-gnu-emacs@gnu.org. @@ -98,6 +99,7 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 +** display-battery has been replaced by display-battery-mode. ** calculator.el now has radix grouping mode, which is available when `calculator-output-radix' is non-nil. In this mode a separator character is used every few digits, making it easier to see byte diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c72040211ce..4f395c61ea3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-04 Stefan Monnier + + * battery.el (display-battery-mode): Rename from display-battery. + Handle the case where it gets turned off. + 2005-01-04 Richard M. Stallman * add-log.el (change-log-font-lock-keywords): Don't match just "From". @@ -5,8 +10,7 @@ 2005-01-04 Andreas Schwab * files.el (insert-directory): Only look for error lines in - inserted text. Don't move too far after processing --dired - markers. + inserted text. Don't move too far after processing --dired markers. 2005-01-04 Richard M. Stallman @@ -29,7 +33,7 @@ * isearch.el (lazy-highlight): Group renamed from isearch-lazy-... (lazy-highlight-cleanup, lazy-highlight-initial-delay) (lazy-highlight-interval, lazy-highlight-max-at-a-time) - (lazy-highlight-face): Renamed from isearch-lazy-... + (lazy-highlight-face): Rename from isearch-lazy-... Change all references to them. 2005-01-03 Luc Teirlinck diff --git a/lisp/battery.el b/lisp/battery.el index b8790450735..69bd68bb0b9 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -1,6 +1,6 @@ ;;; battery.el --- display battery status information -;; Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004 +;; Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Ralph Schleicher @@ -108,20 +108,23 @@ The text being displayed in the echo area is controlled by the variables "Battery status not available"))) ;;;###autoload -(defun display-battery () +(define-minor-mode display-battery-mode "Display battery status information in the mode line. The text being displayed in the mode line is controlled by the variables `battery-mode-line-format' and `battery-status-function'. The mode line will be updated automatically every `battery-update-interval' seconds." - (interactive) + :global t (setq battery-mode-line-string "") (or global-mode-string (setq global-mode-string '(""))) - (add-to-list 'global-mode-string 'battery-mode-line-string t) (and battery-update-timer (cancel-timer battery-update-timer)) - (setq battery-update-timer (run-at-time nil battery-update-interval - 'battery-update-handler)) - (battery-update)) + (if (not display-battery-mode) + (setq global-mode-string + (delq 'battery-mode-line-string global-mode-string)) + (add-to-list 'global-mode-string 'battery-mode-line-string t) + (setq battery-update-timer (run-at-time nil battery-update-interval + 'battery-update-handler)) + (battery-update))) (defun battery-update-handler () (battery-update) From e2ed433103e2ef2903f8bbf10000d894d2306905 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 4 Jan 2005 23:41:51 +0000 Subject: [PATCH 082/560] (customize): Make :link point to user doc. --- lisp/cus-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 7b427357981..055772f418a 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -243,7 +243,7 @@ (defgroup customize '((widgets custom-group)) "Customization of the Customization support." - :link '(custom-manual "(elisp)Customization") + :link '(custom-manual "(emacs)Easy Customization") :prefix "custom-" :group 'help) From 721d04ba97a7366489ec460c473883f771105482 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 5 Jan 2005 00:09:29 +0000 Subject: [PATCH 083/560] (Fformat_mode_line): Doc fix. --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 91ef0249045..02d95854078 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15971,7 +15971,7 @@ store_mode_line_string (string, lisp_string, copy_string, field_width, precision DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, 0, 4, 0, doc: /* Return the mode-line of selected window as a string. -First optional arg FORMAT specifies a different format string (see +First optional arg FORMAT specifies the mode line format (see `mode-line-format' for details) to use. If FORMAT is t, return the buffer's header-line. Second optional arg WINDOW specifies a different window to use as the context for the formatting. From dd496df6bc596b61391e296bedf577659bdd5132 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 5 Jan 2005 00:09:40 +0000 Subject: [PATCH 084/560] *** empty log message *** --- lisp/ChangeLog | 4 ++++ src/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f395c61ea3..2492b1e0669 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,10 @@ 2005-01-04 Richard M. Stallman + * cus-edit.el (customize): Make :link point to user doc. + + * man.el (Man-fontify-manpage): Turn off undo generation. + * add-log.el (change-log-font-lock-keywords): Don't match just "From". 2005-01-04 Andreas Schwab diff --git a/src/ChangeLog b/src/ChangeLog index 990c856fc38..cfc3bd01597 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-04 Richard M. Stallman + + * xdisp.c (Fformat_mode_line): Doc fix. + 2005-01-04 Stefan Monnier * alloc.c (refill_memory_reserve): Move. From 0acffda1d3f09f708ce4909c53576dcce57babc0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 5 Jan 2005 01:08:24 +0000 Subject: [PATCH 085/560] Doc fixes. (find-face-regexp): New variable. (find-function-regexp-alist): New variable. (find-function-C-source): Third arg is now TYPE. (find-function-search-for-symbol): Handle general TYPE. (find-function-read, find-function-do-it): Handle general TYPE. (find-definition-noselect, find-face): New functions. (function-at-point): Alias deleted. --- lisp/emacs-lisp/find-func.el | 163 +++++++++++++++++++++++------------ 1 file changed, 108 insertions(+), 55 deletions(-) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 8b3125db50b..d6cc8be7062 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -78,7 +78,8 @@ Please send improvements and fixes to the maintainer." (defcustom find-variable-regexp (concat"^\\s-*(def[^fumag]\\(\\w\\|\\s_\\)+\\*?" find-function-space-re "%s\\(\\s-\\|$\\)") "The regexp used by `find-variable' to search for a variable definition. -It should match right up to the variable name. The default value +Note it must contain a `%s' at the place where `format' +should insert the variable name. The default value avoids `defun', `defmacro', `defalias', `defadvice', `defgroup', `defface'. Please send improvements and fixes to the maintainer." @@ -86,6 +87,26 @@ Please send improvements and fixes to the maintainer." :group 'find-function :version "21.1") +(defcustom find-face-regexp + (concat"^\\s-*(defface" find-function-space-re "%s\\(\\s-\\|$\\)") + "The regexp used by `find-face' to search for a face definition. +Note it must contain a `%s' at the place where `format' +should insert the face name. + +Please send improvements and fixes to the maintainer." + :type 'regexp + :group 'find-function + :version "21.4") + +(defvar find-function-regexp-alist + '((nil . find-function-regexp) + (defvar . find-variable-regexp) + (defface . find-face-regexp)) + "Alist mapping definition types into regexp variables. +Each regexp variable's value should actually be a format string +to be used to substitute the desired symbol name into the regexp.") +(put 'find-function-regexp-alist 'risky-local-variable t) + (defcustom find-function-source-path nil "The default list of directories where `find-function' searches. @@ -136,9 +157,9 @@ See the functions `find-function' and `find-variable'." If nil, do not try to find the source code of functions and variables defined in C.") -(defun find-function-C-source (fun-or-var file variable-p) +(defun find-function-C-source (fun-or-var file type) "Find the source location where SUBR-OR-VAR is defined in FILE. -VARIABLE-P should be non-nil for a variable or nil for a subroutine." +TYPE should be nil to find a function, or `defvar' to find a variable." (unless find-function-C-source-directory (setq find-function-C-source-directory (read-directory-name "Emacs C source dir: " nil nil t))) @@ -146,12 +167,12 @@ VARIABLE-P should be non-nil for a variable or nil for a subroutine." (unless (file-readable-p file) (error "The C source file %s is not available" (file-name-nondirectory file))) - (unless variable-p + (unless type (setq fun-or-var (indirect-function fun-or-var))) (with-current-buffer (find-file-noselect file) (goto-char (point-min)) (unless (re-search-forward - (if variable-p + (if type (concat "DEFVAR[A-Z_]*[ \t\n]*([ \t\n]*\"" (regexp-quote (symbol-name fun-or-var)) "\"") @@ -175,10 +196,12 @@ VARIABLE-P should be non-nil for a variable or nil for a subroutine." (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf))))) ;;;###autoload -(defun find-function-search-for-symbol (symbol variable-p library) - "Search for SYMBOL. -If VARIABLE-P is nil, `find-function-regexp' is used, otherwise -`find-variable-regexp' is used. The search is done in library LIBRARY." +(defun find-function-search-for-symbol (symbol type library) + "Search for SYMBOL's definition of type TYPE in LIBRARY. +If TYPE is nil, look for a function definition. +Otherwise, TYPE specifies the kind of definition, +and it is interpreted via `find-function-regexp-alist'. +The search is done in the source for library LIBRARY." (if (null library) (error "Don't know where `%s' is defined" symbol)) ;; Some functions are defined as part of the construct @@ -186,14 +209,13 @@ If VARIABLE-P is nil, `find-function-regexp' is used, otherwise (while (and (symbolp symbol) (get symbol 'definition-name)) (setq symbol (get symbol 'definition-name))) (if (string-match "\\`src/\\(.*\\.c\\)\\'" library) - (find-function-C-source symbol (match-string 1 library) variable-p) + (find-function-C-source symbol (match-string 1 library) type) (if (string-match "\\.el\\(c\\)\\'" library) (setq library (substring library 0 (match-beginning 1)))) - (let* ((filename (find-library-name library))) + (let* ((filename (find-library-name library)) + (regexp-symbol (cdr (assq type find-function-regexp-alist)))) (with-current-buffer (find-file-noselect filename) - (let ((regexp (format (if variable-p - find-variable-regexp - find-function-regexp) + (let ((regexp (format (symbol-value regexp-symbol) (regexp-quote (symbol-name symbol)))) (case-fold-search)) (with-syntax-table emacs-lisp-mode-syntax-table @@ -245,55 +267,53 @@ in `load-path'." ((symbol-file function 'defun))))) (find-function-search-for-symbol function nil library)))) -(defalias 'function-at-point 'function-called-at-point) - -(defun find-function-read (&optional variable-p) +(defun find-function-read (&optional type) "Read and return an interned symbol, defaulting to the one near point. -If the optional VARIABLE-P is nil, then a function is gotten -defaulting to the value of the function `function-at-point', otherwise -a variable is asked for, with the default coming from -`variable-at-point'." - (let ((symb (funcall (if variable-p - 'variable-at-point - 'function-at-point))) +If TYPE is nil, insist on a symbol with a function definition. +Otherwise TYPE should be `defvar' or `defface'. +If TYPE is nil, defaults using `function-called-at-point', +otherwise uses `variable-at-point'." + (let ((symb (if (null type) + (function-called-at-point) + (if (eq type 'defvar) + (variable-at-point) + (variable-at-point t)))) + (predicate (cdr (assq type '((nil . fboundp) (defvar . boundp) + (defface . facep))))) + (prompt (cdr (assq type '((nil . "function") (defvar . "variable") + (defface . "face"))))) (enable-recursive-minibuffers t) val) (if (equal symb 0) (setq symb nil)) - (setq val (if variable-p - (completing-read - (concat "Find variable" - (if symb - (format " (default %s)" symb)) - ": ") - obarray 'boundp t nil) - (completing-read - (concat "Find function" - (if symb - (format " (default %s)" symb)) - ": ") - obarray 'fboundp t nil))) + (setq val (completing-read + (concat "Find " + prompt + (if symb + (format " (default %s)" symb)) + ": ") + obarray predicate t nil)) (list (if (equal val "") symb (intern val))))) -(defun find-function-do-it (symbol variable-p switch-fn) +(defun find-function-do-it (symbol type switch-fn) "Find Emacs Lisp SYMBOL in a buffer and display it. -If VARIABLE-P is nil, a function definition is searched for, otherwise -a variable definition is searched for. The start of a definition is -centered according to the variable `find-function-recenter-line'. -See also `find-function-after-hook' It is displayed with function SWITCH-FN. +TYPE is nil to search for a function definition, +or else `defvar' or `defface'. -Point is saved in the buffer if it is one of the current buffers." +The variable `find-function-recenter-line' controls how +to recenter the display. SWITCH-FN is the function to call +to display and select the buffer. +See also `find-function-after-hook'. + +Set mark before moving, if the buffer already existed." (let* ((orig-point (point)) (orig-buf (window-buffer)) (orig-buffers (buffer-list)) (buffer-point (save-excursion - (funcall (if variable-p - 'find-variable-noselect - 'find-function-noselect) - symbol))) + (find-definition-noselect symbol type))) (new-buf (car buffer-point)) (new-point (cdr buffer-point))) (when buffer-point @@ -310,8 +330,8 @@ Point is saved in the buffer if it is one of the current buffers." Finds the Emacs Lisp library containing the definition of the function near point (selected by `function-at-point') in a buffer and -places point before the definition. Point is saved in the buffer if -it is one of the current buffers. +places point before the definition. +Set mark before moving, if the buffer already existed. The library where FUNCTION is defined is searched for in `find-function-source-path', if non nil, otherwise in `load-path'. @@ -340,15 +360,15 @@ See `find-function' for more details." "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL. Finds the Emacs Lisp library containing the definition of SYMBOL -in a buffer and the point of the definition. The buffer is -not selected. +in a buffer, and the point of the definition. It does not switch +to the buffer or display it. The library where VARIABLE is defined is searched for in FILE or `find-function-source-path', if non nil, otherwise in `load-path'." (if (not variable) (error "You didn't specify a variable")) (let ((library (or file (symbol-file variable 'defvar)))) - (find-function-search-for-symbol variable 'variable library))) + (find-function-search-for-symbol variable 'defvar library))) ;;;###autoload (defun find-variable (variable) @@ -356,8 +376,9 @@ The library where VARIABLE is defined is searched for in FILE or Finds the Emacs Lisp library containing the definition of the variable near point (selected by `variable-at-point') in a buffer and -places point before the definition. Point is saved in the buffer if -it is one of the current buffers. +places point before the definition. + +Set mark before moving, if the buffer already existed. The library where VARIABLE is defined is searched for in `find-function-source-path', if non nil, otherwise in `load-path'. @@ -381,10 +402,42 @@ See `find-variable' for more details." (interactive (find-function-read 'variable)) (find-function-do-it variable t 'switch-to-buffer-other-frame)) +;;;###autoload +(defun find-definition-noselect (symbol type &optional file) + "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL. +TYPE says what type of definition: nil for a function, +`defvar' or `defface' for a variable or face. This functoin +does not switch to the buffer or display it. + +The library where SYMBOL is defined is searched for in FILE or +`find-function-source-path', if non nil, otherwise in `load-path'." + (if (not symbol) + (error "You didn't specify a symbol")) + (if (null type) + (find-function-noselect symbol) + (let ((library (or file (symbol-file symbol type)))) + (find-function-search-for-symbol symbol type library)))) + +;;;###autoload +(defun find-face (face) + "Find the definition of FACE. FACE defaults to the name near point. + +Finds the Emacs Lisp library containing the definition of the face +near point (selected by `variable-at-point') in a buffer and +places point before the definition. + +Set mark before moving, if the buffer already existed. + +The library where FACE is defined is searched for in +`find-function-source-path', if non nil, otherwise in `load-path'. +See also `find-function-recenter-line' and `find-function-after-hook'." + (interactive (find-function-read 'defface)) + (find-function-do-it face 'defface 'switch-to-buffer)) + ;;;###autoload (defun find-function-on-key (key) "Find the function that KEY invokes. KEY is a string. -Point is saved if FUNCTION is in the current buffer." +Set mark before moving, if the buffer already existed." (interactive "kFind function on key: ") (let (defn) (save-excursion From 20a514ceed5be18a60d1532e535e5119b7556929 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 5 Jan 2005 01:09:23 +0000 Subject: [PATCH 086/560] (variable-at-point): New arg ANY-SYMBOL. --- lisp/help-fns.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 522c1e2c19d..aaaff6903f2 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -463,9 +463,10 @@ face (according to `face-differs-from-default-p')." ;; Variables ;;;###autoload -(defun variable-at-point () +(defun variable-at-point (&optional any-symbol) "Return the bound variable symbol found around point. -Return 0 if there is no such symbol." +Return 0 if there is no such symbol. +If ANY-SYMBOL is non-nil, don't insist the symbol be bound." (or (condition-case () (with-syntax-table emacs-lisp-mode-syntax-table (save-excursion @@ -479,12 +480,12 @@ Return 0 if there is no such symbol." (error nil)) (let* ((str (find-tag-default)) (sym (if str (intern-soft str)))) - (if (and sym (boundp sym)) + (if (and sym (or any-symbol (boundp sym))) sym (save-match-data (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str)) (setq sym (intern-soft (match-string 1 str))) - (and (boundp sym) sym))))) + (and (or any-symbol (boundp sym)) sym))))) 0)) ;;;###autoload From 4829145ae3968cd905f9b20cab0a53b93cb777d4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 5 Jan 2005 01:10:24 +0000 Subject: [PATCH 087/560] (custom-declare-face): Record defface in current-load-list. --- lisp/ChangeLog | 16 ++++++++++++++++ lisp/cus-face.el | 1 + 2 files changed, 17 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2492b1e0669..7efce4fa93b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2005-01-04 Richard M. Stallman + + * cus-face.el (custom-declare-face): + Record defface in current-load-list. + + * help-fns.el (variable-at-point): New arg ANY-SYMBOL. + + * emacs-lisp/find-func.el: Doc fixes. + (find-face-regexp): New variable. + (find-function-regexp-alist): New variable. + (find-function-C-source): Third arg is now TYPE. + (find-function-search-for-symbol): Handle general TYPE. + (find-function-read, find-function-do-it): Handle general TYPE. + (find-definition-noselect, find-face): New functions. + (function-at-point): Alias deleted. + 2005-01-04 Stefan Monnier * battery.el (display-battery-mode): Rename from display-battery. diff --git a/lisp/cus-face.el b/lisp/cus-face.el index 0f3f6018cfc..33c8c995a4c 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -50,6 +50,7 @@ (make-face-x-resource-internal face)))) ;; Don't record SPEC until we see it causes no errors. (put face 'face-defface-spec spec) + (push (cons 'defface face) current-load-list) (when (and doc (null (face-documentation face))) (set-face-documentation face (purecopy doc))) (custom-handle-all-keywords face args 'custom-face) From ea118de12160ad6265bf6590bc274f61aee1a162 Mon Sep 17 00:00:00 2001 From: Stephen Eglen Date: Wed, 5 Jan 2005 13:16:22 +0000 Subject: [PATCH 088/560] Minor typos corrected, and some small re-wording. --- man/programs.texi | 50 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/man/programs.texi b/man/programs.texi index abe0083b39e..c4efcf67f6c 100644 --- a/man/programs.texi +++ b/man/programs.texi @@ -17,10 +17,10 @@ Find or move over top-level definitions (@pxref{Defuns}). Apply the usual indentation conventions of the language (@pxref{Program Indent}). @item -Insert, kill or align comments (@pxref{Comments}). -@item Balance parentheses (@pxref{Parentheses}). @item +Insert, kill or align comments (@pxref{Comments}). +@item Highlight program syntax (@pxref{Font Lock}). @end itemize @@ -81,7 +81,7 @@ and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}. @cindex PostScript mode The existing programming language major modes include Lisp, Scheme (a variant of Lisp) and the Scheme-based DSSSL expression language, Ada, -AWK, C, C++, Delphi (Object Pascal), Fortran (free format and fixed +ASM, AWK, C, C++, Delphi (Object Pascal), Fortran (free format and fixed format), Icon, IDL (CORBA), IDLWAVE, Java, Metafont (@TeX{}'s companion for font creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike, PostScript, Prolog, Simula, Tcl, and VHDL. There is @@ -316,11 +316,11 @@ buffer. @vindex which-func-modes To enable (or disable) Which Function mode, use the command @kbd{M-x which-function-mode}. This command is global; it applies to all -buffers, both existing ones and those yet to be created. However, -it only takes effect in certain major modes, those listed in the value of -@code{which-func-modes}. If the value is @code{t}, then Which -Function mode applies to all major modes that know how to support -it---in other words, all the major modes that support Imenu. +buffers, both existing ones and those yet to be created. However, it +takes effect in only certain major modes, those listed in the value of +@code{which-func-modes}. If the value is @code{t}, then Which Function +mode applies to all major modes that know how to support it---in other +words, all the major modes that support Imenu. @node Program Indent @section Indentation for Programs @@ -428,7 +428,7 @@ lines that start inside comments and strings. positioning point before the beginning of it and typing @kbd{C-M-q} (@code{indent-sexp} in Lisp mode, @code{c-indent-exp} in C mode; also bound to other suitable commands in other modes). The indentation of -the line where the grouping starts is not changed; therefore, this +the line where the grouping starts is not changed; therefore it changes only the relative indentation within the grouping, not its overall indentation. To correct that as well, type @key{TAB} first. @@ -638,7 +638,7 @@ expression in Lisp.}. @item C-M-f Move forward over a balanced expression (@code{forward-sexp}). @item C-M-b -Move backward over a balanced expression(@code{backward-sexp}). +Move backward over a balanced expression (@code{backward-sexp}). @item C-M-k Kill balanced expression forward (@code{kill-sexp}). @item C-M-t @@ -746,7 +746,7 @@ groupings are lists. @item C-M-n Move forward over a parenthetical group (@code{forward-list}). @item C-M-p -Move backward over a parenthetical group(@code{backward-list}). +Move backward over a parenthetical group (@code{backward-list}). @item C-M-u Move up in parenthesis structure (@code{backward-up-list}). @item C-M-d @@ -1142,7 +1142,7 @@ for ``w/o (without) man,'' since it doesn't use the @code{man} program.}. Unlike @kbd{M-x man}, it does not run any external programs to format and display the man pages; instead it does the job in Emacs Lisp, so it works on systems such as MS-Windows, where the -@code{man} program (and the other programs it uses) are not generally +@code{man} program (and other programs it uses) are not generally available. @kbd{M-x woman} prompts for a name of a manual page, and provides @@ -1259,9 +1259,9 @@ Hide the current block (@code{hs-hide-block}). @item C-c @@ C-s Show the current block (@code{hs-show-block}). @item C-c @@ C-c -Either hide or show the current block (@code{hs-toggle-hiding}) +Either hide or show the current block (@code{hs-toggle-hiding}). @item S-Mouse-2 -Either hide or show the block you click on (@code{hs-mouse-toggle-hiding}) +Either hide or show the block you click on (@code{hs-mouse-toggle-hiding}). @item C-c @@ C-M-h Hide all top-level blocks (@code{hs-hide-all}). @item C-c @@ C-M-s @@ -1282,7 +1282,7 @@ Non-@code{nil} says that @kbd{hs-hide-all} should hide comments too. @item hs-isearch-open Specifies what kind of hidden blocks to open in Isearch mode. -The value should be one of these four symbols. +The value should be one of these four symbols: @table @code @item code @@ -1958,16 +1958,15 @@ through 4. (Columns always count from 0 in GNU Emacs.) Line numbers of four digits or less are normally indented one space. The variable @code{fortran-line-number-indent} controls this; it specifies the maximum indentation a line number can have. Line numbers -are indented to right-justify them to end in column 4 unless that would -require more than this maximum indentation. The default value of the -variable is 1. +are right-justified to end in column 4 unless that would require more +than this maximum indentation. The default value of the variable is 1. @vindex fortran-electric-line-number Simply inserting a line number is enough to indent it according to these rules. As each digit is inserted, the indentation is recomputed. To turn off this feature, set the variable -@code{fortran-electric-line-number} to @code{nil}. Then inserting line -numbers is like inserting anything else. +@code{fortran-electric-line-number} to @code{nil}. + @node ForIndent Conv @subsubsection Syntactic Conventions @@ -2111,7 +2110,7 @@ Align the text as if it were a line of code, but with an additional @code{fortran-comment-line-extra-indent} columns of indentation. @item nil -Don't move text in full-line comments automatically at all. +Don't move text in full-line comments automatically. @end table @vindex fortran-comment-indent-char @@ -2223,12 +2222,13 @@ Fortran. @vindex fortran-column-ruler-fixed @vindex fortran-column-ruler-tabs - The text used to display the column ruler depends on the value of -the variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is + The text used to display the column ruler depends on the value of the +variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is @code{nil}, then the value of the variable @code{fortran-column-ruler-fixed} is used as the column ruler. -Otherwise, the variable @code{fortran-column-ruler-tab} is displayed. -By changing these variables, you can change the column ruler display. +Otherwise, the value of the variable @code{fortran-column-ruler-tab} is +displayed. By changing these variables, you can change the column ruler +display. @kindex C-c C-w @r{(Fortran mode)} @findex fortran-window-create-momentarily From 5d857788664b1e737a5639a73fe1225bcba01c28 Mon Sep 17 00:00:00 2001 From: Stephen Eglen Date: Wed, 5 Jan 2005 13:19:31 +0000 Subject: [PATCH 089/560] *** empty log message *** --- admin/FOR-RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 84c236fe426..fd8bc56431a 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -234,7 +234,7 @@ man/msdog.texi man/mule.texi "Luc Teirlinck" man/m-x.texi "Luc Teirlinck" man/picture.texi -man/programs.texi +man/programs.texi "Stephen Eglen" man/regs.texi "Luc Teirlinck" man/rmail.texi man/screen.texi "Luc Teirlinck" From bf6e87cb553f51f9b0fb73c61751f1171f10f565 Mon Sep 17 00:00:00 2001 From: Stephen Eglen Date: Wed, 5 Jan 2005 13:41:58 +0000 Subject: [PATCH 090/560] Fix typo in doc string of reftex-citation. --- lisp/textmodes/reftex-cite.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index e25464c798d..cfebdbdced1 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -597,7 +597,7 @@ to `reftex-cite-format' and inserted into the buffer. If NO-INSERT is non-nil, nothing is inserted, only the selected key returned. -FORAT-KEY can be used to pre-select a citation format. +FORMAT-KEY can be used to pre-select a citation format. When called with one or two `C-u' prefixes, first rescans the document. When called with a numeric prefix, make that many citations. When From 678d2655f946c36557bfd23e68aa65a57b9dead7 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 5 Jan 2005 16:36:19 +0000 Subject: [PATCH 091/560] Fix line-height and line-spacing docs. --- etc/NEWS | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index b1f29619a2a..7ecdea1367e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1830,7 +1830,7 @@ c-require-final-newline. That is a list of modes, and only those modes set require-final-newline. By default that's C, C++ and Objective-C. -The specified modes set require-final-newline based on +The specified modes set require-final-newline based on mode-require-final-newline, as usual. *** Format change for syntactic context elements. @@ -2619,7 +2619,7 @@ specified number of evenly sized slices (rows x columns). A newline may now have line-height and line-spacing text or overlay properties that control the height of the corresponding display row. -If the line-height property value is 0, the newline does not +If the line-height property value is t, the newline does not contribute to the height of the display row; instead the height of the newline glyph is reduced. Also, a line-spacing property on this newline is ignored. This can be used to tile small images or image @@ -2633,10 +2633,19 @@ If the line-height property value is a float, the minimum line height is calculated by multiplying the default frame line height by the given value. -If the line-height property value is a cons (RATIO . FACE), the +If the line-height property value is a cons (FACE . RATIO), the minimum line height is calculated as RATIO * height of named FACE. RATIO is int or float. If FACE is t, it specifies the current face. +If the line-height property value is a cons (nil . RATIO), the line +height is calculated as RATIO * actual height of the line's contents. + +If the line-height value is a cons (HEIGHT . TOTAL), HEIGHT specifies +the line height as described above, while TOTAL is any of the forms +described above and specifies the total height of the line, causing a +varying number of pixels to be inserted after the line to make it line +exactly that many pixels high. + If the line-spacing property value is an positive integer, the value is used as additional pixels to insert after the display line; this overrides the default frame line-spacing and any buffer local value of @@ -2645,11 +2654,6 @@ the line-spacing variable. If the line-spacing property may be a float or cons, the line spacing is calculated as specified above for the line-height property. -If the line-spacing value is a cons (total . SPACING) where SPACING is -any of the forms described above, the value of SPACING is used as the -total height of the line, i.e. a varying number of pixels are inserted -after each line to make each line exactly that many pixels high. - ** The buffer local line-spacing variable may now have a float value, which is used as a height relative to the default frame line height. From aed79377881ab46a38cef668f1df66461d47cd97 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 5 Jan 2005 17:09:28 +0000 Subject: [PATCH 092/560] (Programming Tutorial): Replace kbd command by appropriate characters for a keyboard macro. --- man/calc.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/calc.texi b/man/calc.texi index 32ac9a5fc8d..6d7d478d0b5 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -6396,7 +6396,7 @@ one end of the text below, then type @kbd{M-# m} at the other. @example @group Z ` 0 t 1 - 1 @key{TAB} + 1 TAB Z ( & s + 1 1 Z ) r 1 Z ' From e12029167de3212f4d9679693409ecd695942304 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 5 Jan 2005 17:16:34 +0000 Subject: [PATCH 093/560] *** empty log message *** --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index f75f8ceac37..f92db4c03c0 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-05 Jay Belanger + + * calc.texi (Programming Tutorial): Replace kbd command by + appropriate characters for a keyboard macro. + 2005-01-04 Jay Belanger * calc.texi (Basic Tutorial, Programming Tutorial): Remove caveats From 436c08c28835f5c0f7080a1ddd3a876f65e16145 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 5 Jan 2005 19:31:57 +0000 Subject: [PATCH 094/560] (find-variable, find-variable-other-window, find-variable-other-frame): Fix the TYPE args to find-function-read and find-function-do-it. (find-function): Doc fix. (find-function-at-point): Replace function-at-point alias. --- lisp/ChangeLog | 8 ++++++++ lisp/emacs-lisp/find-func.el | 16 ++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7efce4fa93b..730d199dc3b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-01-05 Richard M. Stallman + + * emacs-lisp/find-func.el (find-variable) + (find-variable-other-window, find-variable-other-frame): + Fix the TYPE args to find-function-read and find-function-do-it. + (find-function): Doc fix. + (find-function-at-point): Replace function-at-point alias. + 2005-01-04 Richard M. Stallman * cus-face.el (custom-declare-face): diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index d6cc8be7062..49e44ca5fee 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -329,7 +329,7 @@ Set mark before moving, if the buffer already existed." "Find the definition of the FUNCTION near point. Finds the Emacs Lisp library containing the definition of the function -near point (selected by `function-at-point') in a buffer and +near point (selected by `function-called-at-point') in a buffer and places point before the definition. Set mark before moving, if the buffer already existed. @@ -383,24 +383,24 @@ Set mark before moving, if the buffer already existed. The library where VARIABLE is defined is searched for in `find-function-source-path', if non nil, otherwise in `load-path'. See also `find-function-recenter-line' and `find-function-after-hook'." - (interactive (find-function-read 'variable)) - (find-function-do-it variable t 'switch-to-buffer)) + (interactive (find-function-read 'defvar)) + (find-function-do-it variable 'defvar 'switch-to-buffer)) ;;;###autoload (defun find-variable-other-window (variable) "Find, in another window, the definition of VARIABLE near point. See `find-variable' for more details." - (interactive (find-function-read 'variable)) - (find-function-do-it variable t 'switch-to-buffer-other-window)) + (interactive (find-function-read 'defvar)) + (find-function-do-it variable 'defvar 'switch-to-buffer-other-window)) ;;;###autoload (defun find-variable-other-frame (variable) "Find, in annother frame, the definition of VARIABLE near point. See `find-variable' for more details." - (interactive (find-function-read 'variable)) - (find-function-do-it variable t 'switch-to-buffer-other-frame)) + (interactive (find-function-read 'defvar)) + (find-function-do-it variable 'defvar 'switch-to-buffer-other-frame)) ;;;###autoload (defun find-definition-noselect (symbol type &optional file) @@ -465,7 +465,7 @@ Set mark before moving, if the buffer already existed." (defun find-function-at-point () "Find directly the function at point in the other window." (interactive) - (let ((symb (function-at-point))) + (let ((symb (function-called-at-point))) (when symb (find-function-other-window symb)))) From 4dbbcb46d91862a16b21651e0b95e5959ffdbfb8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 5 Jan 2005 20:49:11 +0000 Subject: [PATCH 095/560] (isearch-dehighlight): Remove unused arg `totally'. (isearch-update, isearch-done): Adjust calls accordingly. --- lisp/ChangeLog | 7 ++++++- lisp/isearch.el | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 730d199dc3b..f3a0a9aa31b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,12 @@ +2005-01-05 Stefan Monnier + + * isearch.el (isearch-dehighlight): Remove unused arg `totally'. + (isearch-update, isearch-done): Adjust calls accordingly. + 2005-01-05 Richard M. Stallman * emacs-lisp/find-func.el (find-variable) - (find-variable-other-window, find-variable-other-frame): + (find-variable-other-window, find-variable-other-frame): Fix the TYPE args to find-function-read and find-function-do-it. (find-function): Doc fix. (find-function-at-point): Replace function-at-point alias. diff --git a/lisp/isearch.el b/lisp/isearch.el index a87097f884e..8f2875d6726 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1,7 +1,7 @@ ;;; isearch.el --- incremental search minor mode ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999, -;; 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +;; 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte ;; Maintainer: FSF @@ -705,7 +705,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." (if (< isearch-other-end (point)) ; isearch-forward? (isearch-highlight isearch-other-end (point)) (isearch-highlight (point) isearch-other-end)) - (isearch-dehighlight nil)) + (isearch-dehighlight)) )) (setq ;; quit-flag nil not for isearch-mode isearch-adjusted nil @@ -733,7 +733,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." (setq overriding-terminal-local-map nil) ;; (setq pre-command-hook isearch-old-pre-command-hook) ; for lemacs (setq minibuffer-message-timeout isearch-original-minibuffer-message-timeout) - (isearch-dehighlight t) + (isearch-dehighlight) (isearch-lazy-highlight-cleanup lazy-highlight-cleanup) (let ((found-start (window-start (selected-window))) (found-point (point))) @@ -2220,7 +2220,7 @@ Can be changed via `isearch-search-fun-function' for special needs." (overlay-put isearch-overlay 'priority 1) ;higher than lazy overlays )))) -(defun isearch-dehighlight (totally) +(defun isearch-dehighlight () (when isearch-overlay (delete-overlay isearch-overlay))) From 2eec3e8edf086e6a89f81fa1591d9f25b0bc3344 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 5 Jan 2005 21:20:38 +0000 Subject: [PATCH 096/560] (uniquify-rationalize-file-buffer-names): Re-add an interactive spec. --- lisp/ChangeLog | 3 +++ lisp/uniquify.el | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3a0a9aa31b..a7f548cf0b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-01-05 Stefan Monnier + * uniquify.el (uniquify-rationalize-file-buffer-names): + Re-add an interactive spec. + * isearch.el (isearch-dehighlight): Remove unused arg `totally'. (isearch-update, isearch-done): Adjust calls accordingly. diff --git a/lisp/uniquify.el b/lisp/uniquify.el index b2da7971167..689dffb9618 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -1,6 +1,7 @@ ;;; uniquify.el --- unique buffer names dependent on file name -;; Copyright (c) 1989,95,96,97,2001,2003 Free Software Foundation, Inc. +;; Copyright (c) 1989, 1995, 1996, 1997, 2001, 2003, 2005 +;; Free Software Foundation, Inc. ;; Author: Dick King ;; Maintainer: FSF @@ -187,7 +188,12 @@ It actually holds the list of `uniquify-item's corresponding to the conflict.") If `uniquify-min-dir-content' > 0, always pulls that many file name elements. Arguments BASE, DIRNAME, and NEWBUF specify the new buffer that causes -this rationaliztion." +this rationalization." + (interactive + (list (if uniquify-managed + (uniquify-item-base (car uniquify-managed)) (buffer-name)) + (uniquify-buffer-file-name (current-buffer)) + (current-buffer))) (if (null dirname) (with-current-buffer newbuf (setq uniquify-managed nil)) (setq dirname (expand-file-name (directory-file-name dirname))) @@ -457,5 +463,5 @@ For use on `kill-buffer-hook'." (provide 'uniquify) -;;; arch-tag: e763faa3-56c9-4903-8eb8-26e1c45a0065 +;; arch-tag: e763faa3-56c9-4903-8eb8-26e1c45a0065 ;;; uniquify.el ends here From 9890ec7d19285475a18f191a695eaf4cd90ba6a3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 5 Jan 2005 21:49:02 +0000 Subject: [PATCH 097/560] (uniquify-rationalize-file-buffer-names): Fix corner case when renaming to the same name. --- lisp/ChangeLog | 2 ++ lisp/uniquify.el | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a7f548cf0b0..0583c16fcd4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * uniquify.el (uniquify-rationalize-file-buffer-names): Re-add an interactive spec. + (uniquify-rationalize-file-buffer-names): Fix corner case when renaming + to the same name. * isearch.el (isearch-dehighlight): Remove unused arg `totally'. (isearch-update, isearch-done): Adjust calls accordingly. diff --git a/lisp/uniquify.el b/lisp/uniquify.el index 689dffb9618..ea9094da78a 100644 --- a/lisp/uniquify.el +++ b/lisp/uniquify.el @@ -194,8 +194,10 @@ this rationalization." (uniquify-item-base (car uniquify-managed)) (buffer-name)) (uniquify-buffer-file-name (current-buffer)) (current-buffer))) - (if (null dirname) - (with-current-buffer newbuf (setq uniquify-managed nil)) + ;; Make sure we don't get confused by outdated uniquify-managed info in + ;; this buffer. + (with-current-buffer newbuf (setq uniquify-managed nil)) + (when dirname (setq dirname (expand-file-name (directory-file-name dirname))) (let ((fix-list (list (uniquify-make-item base dirname newbuf))) items) From fd4a9f8fae010f4f3d86f59f6427be31940991e5 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 6 Jan 2005 00:47:50 +0000 Subject: [PATCH 098/560] (encode_terminal_code): Fix buffer size computation. --- src/term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/term.c b/src/term.c index 4164a3bc0d3..23da2ac8704 100644 --- a/src/term.c +++ b/src/term.c @@ -1,5 +1,5 @@ /* Terminal control module for terminals described by TERMCAP - Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001, 2002 + Copyright (C) 1985, 86, 87, 93, 94, 95, 98, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -869,7 +869,7 @@ encode_terminal_code (src, src_len, coding) if (! STRING_MULTIBYTE (string)) string = string_to_multibyte (string); nbytes = buf - encode_terminal_buf; - if (nbytes + SBYTES (string) < encode_terminal_bufsize) + if (encode_terminal_bufsize < nbytes + SBYTES (string)) { encode_terminal_bufsize = nbytes + SBYTES (string); encode_terminal_buf = xrealloc (encode_terminal_buf, From 043bc640a7bf3719d83c8d4054905eb6492f84d6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 6 Jan 2005 00:58:07 +0000 Subject: [PATCH 099/560] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index cfc3bd01597..977b239287f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-05 Romain Francoise + + * term.c (encode_terminal_code): Fix buffer size computation. + 2005-01-04 Richard M. Stallman * xdisp.c (Fformat_mode_line): Doc fix. From e0e76ab914bc4d9e4933e11c622a43981be2a141 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Thu, 6 Jan 2005 02:53:39 +0000 Subject: [PATCH 100/560] * macfns.c: Include sys/param.h. [TARGET_API_MAC_CARBON] (mac_nav_event_callback): New declaration and function. [TARGET_API_MAC_CARBON] (Fx_file_dialog): Use MAXPATHLEN for size of filename string. Set event callback function when creating dialog boxes. Add code conversions for filenames. Don't dispose apple event descriptor record if failed to create it. * macterm.c: Include sys/param.h. [USE_CARBON_EVENTS] (mac_handle_window_event): Add handler for kEventWindowUpdate. (install_window_handler) [USE_CARBON_EVENTS]: Register it. (do_ae_open_documents) [TARGET_API_MAC_CARBON]: Get FSRef instead of FSSpec from apple event descriptor record. (do_ae_open_documents) [TARGET_API_MAC_CARBON]: Use MAXPATHLEN for size of filename string. [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Return error when a file dialog is in action. [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. Reject only when there are no filename items. Set background color before (un)highlighting the window below the dragged items. (XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update. --- src/ChangeLog | 26 ++++++++++++++++++++ src/macfns.c | 48 ++++++++++++++++++++++++++---------- src/macterm.c | 67 ++++++++++++++++++++++++++++++++++----------------- 3 files changed, 106 insertions(+), 35 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 977b239287f..d12787c92a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,29 @@ +2005-01-05 YAMAMOTO Mitsuharu + + * macfns.c: Include sys/param.h. + [TARGET_API_MAC_CARBON] (mac_nav_event_callback): New declaration + and function. + [TARGET_API_MAC_CARBON] (Fx_file_dialog): Use MAXPATHLEN for size + of filename string. Set event callback function when creating + dialog boxes. Add code conversions for filenames. Don't dispose + apple event descriptor record if failed to create it. + + * macterm.c: Include sys/param.h. + [USE_CARBON_EVENTS] (mac_handle_window_event): Add handler for + kEventWindowUpdate. + (install_window_handler) [USE_CARBON_EVENTS]: Register it. + (do_ae_open_documents) [TARGET_API_MAC_CARBON]: Get FSRef instead + of FSSpec from apple event descriptor record. + (do_ae_open_documents) [TARGET_API_MAC_CARBON]: Use MAXPATHLEN for + size of filename string. + [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. + [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Return error when a + file dialog is in action. + [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. Reject + only when there are no filename items. Set background color + before (un)highlighting the window below the dragged items. + (XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update. + 2005-01-05 Romain Francoise * term.c (encode_terminal_code): Fix buffer size computation. diff --git a/src/macfns.c b/src/macfns.c index f40e8354f35..9a8382e413c 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -55,6 +55,7 @@ static unsigned char gray_bits[] = { #include #include #include +#include #include #include @@ -4237,6 +4238,9 @@ Value is t if tooltip was open, nil otherwise. */) File selection dialog ***********************************************************************/ +static pascal void mac_nav_event_callback P_ ((NavEventCallbackMessage, + NavCBRecPtr, void *)); + /** There is a relatively standard way to do this using applescript to run a (choose file) method. However, this doesn't do "the right thing" @@ -4261,8 +4265,9 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) Lisp_Object file = Qnil; int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; - char filename[1001]; + char filename[MAXPATHLEN]; int default_filter_index = 1; /* 1: All Files, 2: Directories only */ + static NavEventUPP mac_nav_event_callbackUPP = NULL; GCPRO6 (prompt, dir, default_filename, mustmatch, file, only_dir_p); CHECK_STRING (prompt); @@ -4290,16 +4295,20 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) options.optionFlags |= kNavSelectAllReadableItem; if (!NILP(prompt)) { - message = cfstring_create_with_utf8_cstring (SDATA (prompt)); + message = + cfstring_create_with_utf8_cstring (SDATA (ENCODE_UTF_8 (prompt))); options.message = message; } /* Don't set the application, let it use default. options.clientName = CFSTR ("Emacs"); */ + if (mac_nav_event_callbackUPP == NULL) + mac_nav_event_callbackUPP = NewNavEventUPP (mac_nav_event_callback); + if (!NILP (only_dir_p)) - status = NavCreateChooseFolderDialog(&options, NULL, NULL, NULL, - &dialogRef); + status = NavCreateChooseFolderDialog(&options, mac_nav_event_callbackUPP, + NULL, NULL, &dialogRef); else if (NILP (mustmatch)) { /* This is a save dialog */ @@ -4310,20 +4319,22 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) if (!NILP(default_filename)) { saveName = - cfstring_create_with_utf8_cstring (SDATA (default_filename)); + cfstring_create_with_utf8_cstring (SDATA (ENCODE_UTF_8 + (default_filename))); options.saveFileName = saveName; options.optionFlags |= kNavSelectDefaultLocation; } status = NavCreatePutFileDialog(&options, 'TEXT', kNavGenericSignature, - NULL, NULL, &dialogRef); + mac_nav_event_callbackUPP, NULL, + &dialogRef); } else { /* This is an open dialog*/ status = NavCreateChooseFileDialog(&options, fileTypes, - NULL, NULL, NULL, NULL, - &dialogRef); + mac_nav_event_callbackUPP, NULL, + NULL, NULL, &dialogRef); } /* Set the default location and continue*/ @@ -4331,13 +4342,13 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) if (!NILP(dir)) { FSRef defLoc; AEDesc defLocAed; - status = FSPathMakeRef(SDATA(dir), &defLoc, NULL); + status = FSPathMakeRef(SDATA(ENCODE_FILE(dir)), &defLoc, NULL); if (status == noErr) { AECreateDesc(typeFSRef, &defLoc, sizeof(FSRef), &defLocAed); NavCustomControl(dialogRef, kNavCtlSetLocation, (void*) &defLocAed); + AEDisposeDesc(&defLocAed); } - AEDisposeDesc(&defLocAed); } status = NavDialogRun(dialogRef); @@ -4363,7 +4374,7 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) status = NavDialogGetReply(dialogRef, &reply); AECoerceDesc(&reply.selection, typeFSRef, &aed); AEGetDescData(&aed, (void *) &fsRef, sizeof (FSRef)); - FSRefMakePath(&fsRef, (UInt8 *) filename, 1000); + FSRefMakePath(&fsRef, (UInt8 *) filename, sizeof (filename)); AEDisposeDesc(&aed); if (reply.saveFileName) { @@ -4372,9 +4383,11 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) if (len && filename[len-1] != '/') filename[len++] = '/'; CFStringGetCString(reply.saveFileName, filename+len, - 1000-len, kCFStringEncodingUTF8); + sizeof (filename) - len, + kCFStringEncodingUTF8); } - file = DECODE_FILE(build_string (filename)); + file = DECODE_FILE (make_unibyte_string (filename, + strlen (filename))); NavDisposeReply(&reply); } break; @@ -4400,6 +4413,15 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) } +/* Need to register some event callback function for enabling drag and + drop in Navigation Service dialogs. */ +static pascal void +mac_nav_event_callback (selector, parms, data) + NavEventCallbackMessage selector; + NavCBRecPtr parms; + void *data ; +{ +} #endif /*********************************************************************** diff --git a/src/macterm.c b/src/macterm.c index dda0cc8311f..4d80fbac5fa 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -69,6 +69,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #include "keyboard.h" #include "frame.h" @@ -7867,6 +7868,14 @@ mac_handle_window_event (next_handler, event, data) switch (GetEventKind (event)) { + case kEventWindowUpdate: + result = CallNextEventHandler (next_handler, event); + if (result != eventNotHandledErr) + return result; + + do_window_update (wp); + break; + case kEventWindowBoundsChanging: result = CallNextEventHandler (next_handler, event); if (result != eventNotHandledErr) @@ -7924,7 +7933,8 @@ install_window_handler (window) { OSErr err = noErr; #if USE_CARBON_EVENTS - EventTypeSpec specs[] = {{kEventClassWindow, kEventWindowBoundsChanging}}; + EventTypeSpec specs[] = {{kEventClassWindow, kEventWindowUpdate}, + {kEventClassWindow, kEventWindowBoundsChanging}}; static EventHandlerUPP handle_window_event_UPP = NULL; if (handle_window_event_UPP == NULL) @@ -8019,24 +8029,28 @@ do_ae_open_documents(AppleEvent *message, AppleEvent *reply, long refcon) int i; /* AE file list is one based so just use that for indexing here. */ - for (i = 1; (err == noErr) && (i <= num_files_to_open); i++) + for (i = 1; i <= num_files_to_open; i++) { - FSSpec fs; - Str255 path_name, unix_path_name; #ifdef MAC_OSX FSRef fref; -#endif + char unix_path_name[MAXPATHLEN]; + + err = AEGetNthPtr (&the_desc, i, typeFSRef, &keyword, + &actual_type, &fref, sizeof (FSRef), + &actual_size); + if (err != noErr || actual_type != typeFSRef) + continue; + + if (FSRefMakePath (&fref, unix_path_name, sizeof (unix_path_name)) + == noErr) +#else + FSSpec fs; + Str255 path_name, unix_path_name; err = AEGetNthPtr(&the_desc, i, typeFSS, &keyword, &actual_type, (Ptr) &fs, sizeof (fs), &actual_size); - if (err != noErr) break; + if (err != noErr) continue; -#ifdef MAC_OSX - err = FSpMakeFSRef (&fs, &fref); - if (err != noErr) break; - - if (FSRefMakePath (&fref, unix_path_name, 255) == noErr) -#else if (path_from_vol_dir_name (path_name, 255, fs.vRefNum, fs.parID, fs.name) && mac_to_posix_pathname (path_name, unix_path_name, 255)) @@ -8072,18 +8086,21 @@ mac_do_track_drag (DragTrackingMessage message, WindowPtr window, FlavorFlags theFlags; OSErr result; + if (GetFrontWindowOfClass (kMovableModalWindowClass, false)) + return dragNotAcceptedErr; + switch (message) { case kDragTrackingEnterHandler: CountDragItems (theDrag, &items); - can_accept = 1; + can_accept = 0; for (index = 1; index <= items; index++) { GetDragItemReferenceNumber (theDrag, index, &theItem); result = GetFlavorFlags (theDrag, theItem, flavorTypeHFS, &theFlags); - if (result != noErr) + if (result == noErr) { - can_accept = 0; + can_accept = 1; break; } } @@ -8094,7 +8111,9 @@ mac_do_track_drag (DragTrackingMessage message, WindowPtr window, { RgnHandle hilite_rgn = NewRgn (); Rect r; + struct frame *f = mac_window_to_frame (window); + mac_set_backcolor (FRAME_BACKGROUND_PIXEL (f)); GetWindowPortBounds (window, &r); OffsetRect (&r, -r.left, -r.top); RectRgn (hilite_rgn, &r); @@ -8110,6 +8129,9 @@ mac_do_track_drag (DragTrackingMessage message, WindowPtr window, case kDragTrackingLeaveWindow: if (can_accept) { + struct frame *f = mac_window_to_frame (window); + + mac_set_backcolor (FRAME_BACKGROUND_PIXEL (f)); HideDragHilite (theDrag); SetThemeCursor (kThemeArrowCursor); } @@ -8133,9 +8155,11 @@ mac_do_receive_drag (WindowPtr window, void *handlerRefCon, OSErr result; ItemReference theItem; HFSFlavor data; - FSRef fref; Size size = sizeof (HFSFlavor); + if (GetFrontWindowOfClass (kMovableModalWindowClass, false)) + return dragNotAcceptedErr; + drag_and_drop_file_list = Qnil; GetDragMouse (theDrag, &mouse, 0L); CountDragItems (theDrag, &items); @@ -8147,11 +8171,11 @@ mac_do_receive_drag (WindowPtr window, void *handlerRefCon, if (result == noErr) { #ifdef MAC_OSX - FSRef frref; + FSRef fref; + char unix_path_name[MAXPATHLEN]; #else - Str255 path_name; + Str255 path_name, unix_path_name; #endif - Str255 unix_path_name; GetFlavorData (theDrag, theItem, flavorTypeHFS, &data, &size, 0L); #ifdef MAC_OSX /* Use Carbon routines, otherwise it converts the file name @@ -8169,8 +8193,6 @@ mac_do_receive_drag (WindowPtr window, void *handlerRefCon, strlen (unix_path_name)), drag_and_drop_file_list); } - else - continue; } /* If there are items in the list, construct an event and post it to the queue like an interrupt using kbd_buffer_store_event. */ @@ -8730,8 +8752,9 @@ XTread_socket (sd, expected, hold_quit) if (SendEventToEventTarget (eventRef, toolbox_dispatcher) != eventNotHandledErr) break; -#endif +#else do_window_update ((WindowPtr) er.message); +#endif break; case osEvt: From f1a262ed1464b9f0c5503ca27e57e5d7f0efba50 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 6 Jan 2005 03:58:33 +0000 Subject: [PATCH 101/560] (custom-set-variables, custom-theme-set-variables): Clarify documentation. --- lisp/custom.el | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/lisp/custom.el b/lisp/custom.el index 2ddd7ceb943..5fea8c5d12d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -710,44 +710,46 @@ in every Customization buffer.") (put 'custom-local-buffer 'permanent-local t) (defun custom-set-variables (&rest args) - "Initialize variables according to user preferences. -The settings are registered as theme `user'. + "Install user customizations of variable values specified in ARGS. +These settings are registered as theme `user'. The arguments should each be a list of the form: - (SYMBOL VALUE [NOW [REQUEST [COMMENT]]]) + (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) -The unevaluated VALUE is stored as the saved value for SYMBOL. -If NOW is present and non-nil, VALUE is also evaluated and bound as -the default value for the SYMBOL. +This stores EXP (without evaluating it) as the saved value for SYMBOL. +If NOW is present and non-nil, then also evaluate EXP and set +the default value for the SYMBOL to the value of EXP. -REQUEST is a list of features we must 'require for SYMBOL. +REQUEST is a list of features we must require in order to +handle SYMBOL properly. COMMENT is a comment string about SYMBOL." (apply 'custom-theme-set-variables 'user args)) (defun custom-theme-set-variables (theme &rest args) - "Initialize variables according to settings specified by args. -Records the settings as belonging to THEME. + "Initialize variables for theme THEME according to settings in ARGS. +Each of the arguments in ARGS should be a list of this form: -The arguments should be a list where each entry has the form: + (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) - (SYMBOL VALUE [NOW [REQUEST [COMMENT]]]) +This stores EXP (without evaluating it) as the saved value for SYMBOL. +If NOW is present and non-nil, then also evaluate EXP and set +the default value for the SYMBOL to the value of EXP. -The unevaluated VALUE is stored as the saved value for SYMBOL. -If NOW is present and non-nil, VALUE is also evaluated and bound as -the default value for the SYMBOL. -REQUEST is a list of features we must 'require for SYMBOL. +REQUEST is a list of features we must require in order to +handle SYMBOL properly. COMMENT is a comment string about SYMBOL. Several properties of THEME and SYMBOL are used in the process: -If THEME property `theme-immediate' is non-nil, this is equivalent of -providing the NOW argument to all symbols in the argument list: SYMBOL -is bound to the evaluated VALUE. The only difference is SYMBOL property +If THEME's property `theme-immediate' is non-nil, this is equivalent of +providing the NOW argument to all symbols in the argument list: +evaluate each EXP and set the corresponding SYMBOL. However, +there's a difference in the handling of SYMBOL's property `force-value': if NOW is non-nil, SYMBOL's property `force-value' is set to the symbol `rogue', else if THEME's property `theme-immediate' is non-nil, -FACE's property `force-face' is set to the symbol `immediate'. +SYMBOL's property `force-value' is set to the symbol `immediate'. -VALUE itself is saved unevaluated as SYMBOL property `saved-value' and +EXP itself is saved unevaluated as SYMBOL property `saved-value' and in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (custom-check-theme theme) (let ((immediate (get theme 'theme-immediate))) From e3cde0c787627ef741bb02669132b9953d05b3cd Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 6 Jan 2005 04:44:57 +0000 Subject: [PATCH 102/560] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-12 Remove "-face" suffix from lazy-highlight face name 2005-01-06 Miles Bader * lisp/isearch.el (lazy-highlight): Renamed from `lazy-highlight-face'. (isearch-lazy-highlight-face): Use new name. --- lisp/ChangeLog | 5 +++++ lisp/isearch.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0583c16fcd4..6647463a81c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Miles Bader + + * isearch.el (lazy-highlight): Renamed from `lazy-highlight-face'. + (isearch-lazy-highlight-face): Use new name. + 2005-01-05 Stefan Monnier * uniquify.el (uniquify-rationalize-file-buffer-names): diff --git a/lisp/isearch.el b/lisp/isearch.el index 8f2875d6726..3a7ca9c5576 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -242,7 +242,7 @@ A value of nil means highlight all matches." (integer :tag "Some")) :group 'lazy-highlight) -(defface lazy-highlight-face +(defface lazy-highlight '((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) (((class color) (min-colors 88) (background dark)) @@ -2264,7 +2264,7 @@ since they have special meaning in a regexp." ;; When active, *every* match for the current search string is ;; highlighted: the current one using the normal isearch match color -;; and all the others using `isearch-lazy-highlight-face'. The extra +;; and all the others using `isearch-lazy-highlight'. The extra ;; highlighting makes it easier to anticipate where the cursor will ;; land each time you press C-s or C-r to repeat a pending search. ;; Highlighting of these additional matches happens in a deferred @@ -2305,7 +2305,7 @@ since they have special meaning in a regexp." :group 'isearch-faces) (defvar isearch 'isearch) -(defvar isearch-lazy-highlight-face 'lazy-highlight-face) +(defvar isearch-lazy-highlight-face 'lazy-highlight) (defvar isearch-lazy-highlight-overlays nil) (defvar isearch-lazy-highlight-wrapped nil) From 2c987fc2c104db5c9416cf353345ea74b6f3be5d Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 6 Jan 2005 06:54:28 +0000 Subject: [PATCH 103/560] (isearch-lazy-highlight-update): Rename `isearch-lazy-highlight-interval' to `lazy-highlight-interval'. --- lisp/isearch.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index 3a7ca9c5576..3867a6d42d1 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2446,7 +2446,7 @@ Attempt to do the search exactly the way the pending isearch would." (goto-char (window-end))))))) (unless nomore (setq isearch-lazy-highlight-timer - (run-at-time isearch-lazy-highlight-interval nil + (run-at-time lazy-highlight-interval nil 'isearch-lazy-highlight-update))))))))) (defun isearch-resume (search regexp word forward message case-fold) From b49018ff4e7a51c9b41a1c37837d7aec85a1eb3a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 6 Jan 2005 07:02:50 +0000 Subject: [PATCH 104/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6647463a81c..cdcfe6e477d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Juri Linkov + + * isearch.el (isearch-lazy-highlight-update): Rename + `isearch-lazy-highlight-interval' to `lazy-highlight-interval'. + 2005-01-06 Miles Bader * isearch.el (lazy-highlight): Renamed from `lazy-highlight-face'. From 0a54d76e113c13b31fc61ee86781d5c8e077876d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 6 Jan 2005 17:42:58 +0000 Subject: [PATCH 105/560] (Emulating Mode Line): format-mode-line requires 1 arg. --- lispref/modes.texi | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lispref/modes.texi b/lispref/modes.texi index 2abb8a9c0d9..299579a10af 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1736,24 +1736,22 @@ It is normally @code{nil}, so that ordinary buffers have no header line. the text that would appear in a mode line or header line based on certain mode-line specification. -@defun format-mode-line &optional format window no-props buffer +@defun format-mode-line format &optional window no-props buffer This function formats a line of text according to @var{format} as if it were generating the mode line for @var{window}, but instead of displaying the text in the mode line or the header line, it returns -the text as a string. - -If @var{format} is @code{nil}, that means to use -@code{mode-line-format} and return the text that would appear in the -mode line. If @var{format} is @code{t}, that means to use -@code{header-line-format} so as to return the text that would appear -in the header line (@code{""} if the window has no header line). -The argument @var{window} defaults to the selected window. +the text as a string. The argument @var{window} defaults to the +selected window. If @var{buffer} is non-@code{nil}, all the +information used is taken from @var{buffer}; by default, it comes from +@var{window}'s buffer. The value string normally has text properties that correspond to the faces, keymaps, etc., that the mode line would have. If @var{no-props} is non-@code{nil}, the value has no text properties. -If @var{buffer} is non-@code{nil}, all the information used is taken -from @var{buffer}; by default,it comes from @var{window}'s buffer. + +For example, @code{(format-mode-line header-line-format)} returns the +text that would appear in the selected window's header line (@code{""} +if it has no header line). @end defun @node Imenu From a5c813314904b0ce2e1e1df48b3d262a615330d6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 6 Jan 2005 17:44:04 +0000 Subject: [PATCH 106/560] (Timers): Clarify previous change. --- lispref/os.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lispref/os.texi b/lispref/os.texi index ebc27224c96..0a6e0aa3642 100644 --- a/lispref/os.texi +++ b/lispref/os.texi @@ -1371,7 +1371,8 @@ to be annoying. It is usually a bad idea for timer functions to alter buffer contents. When they do, they usually should call @code{undo-boundary} both before and after changing the buffer, to separate the timer's -changes from user commands' changes. +changes from user commands' changes and prevent a single undo entry +from growing to be quite large. @deffn Command run-at-time time repeat function &rest args This sets up a timer that calls the function @var{function} with From de968ddbdd931d1f21bc98c9b117b2b1e447d451 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 6 Jan 2005 17:45:23 +0000 Subject: [PATCH 107/560] (Special Properties): Minor change. --- lispref/ChangeLog | 8 ++++++++ lispref/text.texi | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index baddbd958fa..0e422423656 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,11 @@ +2005-01-06 Richard M. Stallman + + * text.texi (Special Properties): Minor change. + + * os.texi (Timers): Clarify previous change. + + * modes.texi (Emulating Mode Line): format-mode-line requires 1 arg. + 2005-01-01 Luc Teirlinck * display.texi (Face Attributes): Correct xref to renamed node. diff --git a/lispref/text.texi b/lispref/text.texi index 1daad58ee7f..b6e6c9670e0 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -2826,7 +2826,7 @@ then each element can be any of these possibilities; A face name (a symbol or string). @item -Starting in Emacs 21, a property list of face attributes. This has the +A property list of face attributes. This has the form (@var{keyword} @var{value} @dots{}), where each @var{keyword} is a face attribute name and @var{value} is a meaningful value for that attribute. With this feature, you do not need to create a face each From 8a6fd2a78da54b117d9965bce0efc209f7c589d6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 6 Jan 2005 17:47:18 +0000 Subject: [PATCH 108/560] (Fformat_mode_line): First arg now required. --- src/xdisp.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 02d95854078..a7802d5321b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15969,14 +15969,13 @@ store_mode_line_string (string, lisp_string, copy_string, field_width, precision DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, - 0, 4, 0, + 1, 4, 0, doc: /* Return the mode-line of selected window as a string. -First optional arg FORMAT specifies the mode line format (see -`mode-line-format' for details) to use. If FORMAT is t, return -the buffer's header-line. Second optional arg WINDOW specifies a -different window to use as the context for the formatting. -If third optional arg NO-PROPS is non-nil, string is not propertized. -Fourth optional arg BUFFER specifies which buffer to use. */) +First arg FORMAT specifies the mode line format (see `mode-line-format' for +details) to use. Second optional arg WINDOW specifies a different window to +use as the context for the formatting. If third optional arg NO-PROPS is +non-nil, string is not propertized. Fourth optional arg BUFFER specifies +which buffer to use. */) (format, window, no_props, buffer) Lisp_Object format, window, no_props, buffer; { @@ -16002,16 +16001,6 @@ Fourth optional arg BUFFER specifies which buffer to use. */) set_buffer_internal_1 (XBUFFER (buffer)); } - if (NILP (format) || EQ (format, Qt)) - { - face_id = (NILP (format) - ? CURRENT_MODE_LINE_FACE_ID (w) - : HEADER_LINE_FACE_ID); - format = (NILP (format) - ? current_buffer->mode_line_format - : current_buffer->header_line_format); - } - init_iterator (&it, w, -1, -1, NULL, face_id); if (NILP (no_props)) From c738837928f8dc2f05c8d1cefa5c130316a1482f Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 6 Jan 2005 18:14:08 +0000 Subject: [PATCH 109/560] Make sure the proper macro definitions are available when compiling. --- lisp/calc/calc-units.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index d473b02c0a6..e8a3abfe958 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -30,6 +30,8 @@ (require 'calc-ext) (require 'calc-macs) +(eval-when-compile + (require 'calc-alg)) ;;; Units operations. From 4c07596d8dab47d5f1189de83cccde18b9b2d517 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Thu, 6 Jan 2005 18:30:41 +0000 Subject: [PATCH 110/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cdcfe6e477d..dbc1027fed2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Jay Belanger + + * calc/calc-units.el: Make sure the proper macro definitions are + available when compiling. + 2005-01-06 Juri Linkov * isearch.el (isearch-lazy-highlight-update): Rename From d7975e20a0079d6159815aceb804126d0f153ac4 Mon Sep 17 00:00:00 2001 From: John Paul Wallington Date: Thu, 6 Jan 2005 21:58:17 +0000 Subject: [PATCH 111/560] Update copyright. Update commentary to mention rx syntax support. --- lisp/emacs-lisp/re-builder.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 77a12167c30..019a45213c8 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -1,6 +1,6 @@ ;;; re-builder.el --- building Regexps with visual feedback -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. ;; Author: Detlev Zundel ;; Keywords: matching, lisp, tools @@ -61,12 +61,12 @@ ;; even the auto updates go all the way. Forcing an update overrides ;; this limit allowing an easy way to see all matches. -;; Currently `re-builder' understands four different forms of input, -;; namely `read', `string', `sregex' and `lisp-re' syntax. Read +;; Currently `re-builder' understands five different forms of input, +;; namely `read', `string', `rx', `sregex' and `lisp-re' syntax. Read ;; syntax and string syntax are both delimited by `"'s and behave ;; according to their name. With the `string' syntax there's no need ;; to escape the backslashes and double quotes simplifying the editing -;; somewhat. The other two allow editing of symbolic regular +;; somewhat. The other three allow editing of symbolic regular ;; expressions supported by the packages of the same name. (`lisp-re' ;; is a package by me and its support may go away as it is nearly the ;; same as the `sregex' package in Emacs) From 771069f89db38f115d56b41e3f60465b779be2a4 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 6 Jan 2005 22:00:36 +0000 Subject: [PATCH 112/560] (completion-list-mode-map): Map follow-link to mouse-face. --- lisp/simple.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 735c65948bf..565a6cba8ee 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3590,7 +3590,7 @@ With argument, do this that many times." The place mark goes is the same place \\[forward-word] would move to with the same argument. Interactively, if this command is repeated -or (in Transient Mark mode) if the mark is active, +or (in Transient Mark mode) if the mark is active, it marks the next ARG words after the ones already marked." (interactive "P\np") (cond ((and allow-extend @@ -4328,6 +4328,7 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." (or completion-list-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-2] 'mouse-choose-completion) + (define-key map [follow-link] 'mouse-face) (define-key map [down-mouse-2] nil) (define-key map "\C-m" 'choose-completion) (define-key map "\e\e\e" 'delete-completion-window) From 2bac7f1784d7c13f60089b81e60cc64634759842 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 6 Jan 2005 22:00:56 +0000 Subject: [PATCH 113/560] (Man-xref-man-page, Man-xref-header-file) (Man-xref-normal-file): Add follow-link property. --- lisp/man.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/man.el b/lisp/man.el index a384bf34e29..e9503ca883a 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -415,13 +415,15 @@ Otherwise, the value is whatever the function ;; buttons (define-button-type 'Man-xref-man-page 'action (lambda (button) (man-follow (button-label button))) - 'help-echo "RET, mouse-2: display this man page") + 'follow-link t + 'help-echo "mouse-2, RET: display this man page") (define-button-type 'Man-xref-header-file 'action (lambda (button) (let ((w (button-get button 'Man-target-string))) (unless (Man-view-header-file w) (error "Cannot find header file: %s" w)))) + 'follow-link t 'help-echo "mouse-2: display this header file") (define-button-type 'Man-xref-normal-file @@ -433,6 +435,7 @@ Otherwise, the value is whatever the function (view-file f) (error "Cannot read a file: %s" f)) (error "Cannot find a file: %s" f)))) + 'follow-link t 'help-echo "mouse-2: display this file") From c35b0c6bc3bc05ef4dd0b44b9c477a223625d3d2 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 6 Jan 2005 22:01:38 +0000 Subject: [PATCH 114/560] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ src/ChangeLog | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dbc1027fed2..9be77b5d0c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-06 Kim F. Storm + + * simple.el (completion-list-mode-map): Map follow-link to mouse-face. + + * man.el (Man-xref-man-page, Man-xref-header-file) + (Man-xref-normal-file): Add follow-link property. + 2005-01-06 Jay Belanger * calc/calc-units.el: Make sure the proper macro definitions are diff --git a/src/ChangeLog b/src/ChangeLog index d12787c92a3..7b8e2a320eb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,20 @@ +2005-01-06 Kim F. Storm + + * fringe.c (fringe_faces): Change to Lisp_Object pointer. + (draw_fringe_bitmap_1): Lookup user defined fringe faces here. + (destroy_fringe_bitmap): Set fringe_faces element to nil. + (Fdefine_fringe_bitmap, init_fringe): Change allocation of + fringe_faces array and init elements to nil. + (Fset_fringe_bitmap_face): Set fringe_faces to face name instead of + non-persistent face id. + (mark_fringe_data): New function for GC. + + * alloc.c (mark_fringe_data): Declare extern. + (Fgarbage_collect): Call mark_fringe_data. + + * alloc.c (overrun_check_free): Invalidate freed memory if + XMALLOC_CLEAR_FREE_MEMORY is defined. + 2005-01-05 YAMAMOTO Mitsuharu * macfns.c: Include sys/param.h. From 454d797353104c296f2a4d805c1b924a8792c3aa Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 6 Jan 2005 22:02:32 +0000 Subject: [PATCH 115/560] (mark_fringe_data): Declare extern. (Fgarbage_collect): Call mark_fringe_data. (overrun_check_free): Invalidate freed memory if XMALLOC_CLEAR_FREE_MEMORY is defined. --- src/alloc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/alloc.c b/src/alloc.c index 3723f9ea872..57ffd0b0ed9 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -309,6 +309,7 @@ static void mark_glyph_matrix P_ ((struct glyph_matrix *)); static void mark_face_cache P_ ((struct face_cache *)); #ifdef HAVE_WINDOW_SYSTEM +extern void mark_fringe_data P_ ((void)); static void mark_image P_ ((struct image *)); static void mark_image_cache P_ ((struct frame *)); #endif /* HAVE_WINDOW_SYSTEM */ @@ -704,9 +705,14 @@ overrun_check_free (block) val + osize, XMALLOC_OVERRUN_CHECK_SIZE)) abort (); +#ifdef XMALLOC_CLEAR_FREE_MEMORY + val -= XMALLOC_OVERRUN_CHECK_SIZE; + memset (val, 0xff, osize + XMALLOC_OVERRUN_CHECK_SIZE*2); +#else bzero (val + osize, XMALLOC_OVERRUN_CHECK_SIZE); val -= XMALLOC_OVERRUN_CHECK_SIZE; bzero (val, XMALLOC_OVERRUN_CHECK_SIZE); +#endif } free (val); @@ -4799,6 +4805,10 @@ returns nil, because real GC can't be done. */) } mark_backtrace (); +#ifdef HAVE_WINDOW_SYSTEM + mark_fringe_data (); +#endif + #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES mark_stack (); #endif From 49ce2dbd86e867c5320964ecb8e9d0edb8ef94fa Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 6 Jan 2005 22:03:00 +0000 Subject: [PATCH 116/560] (fringe_faces): Change to Lisp_Object pointer. (draw_fringe_bitmap_1): Lookup user defined fringe faces here. (destroy_fringe_bitmap): Set fringe_faces element to nil. (Fdefine_fringe_bitmap, init_fringe): Change allocation of fringe_faces array and init elements to nil. (Fset_fringe_bitmap_face): Set fringe_faces to face name instead of non-persistent face id. (mark_fringe_data): New function for GC. --- src/fringe.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/src/fringe.c b/src/fringe.c index 37b3a2cb0ac..e8b8cedee4c 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -446,7 +446,7 @@ struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] = }; static struct fringe_bitmap **fringe_bitmaps; -static unsigned *fringe_faces; +static Lisp_Object *fringe_faces; static int max_fringe_bitmaps; static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS; @@ -547,7 +547,13 @@ draw_fringe_bitmap_1 (w, row, left_p, overlay, which) } if (face_id == DEFAULT_FACE_ID) - face_id = fringe_faces[which]; + { + Lisp_Object face; + + if ((face = fringe_faces[which], NILP (face)) + || (face_id = lookup_named_face (f, face, 'A', 1), face_id < 0)) + face_id = FRINGE_FACE_ID; + } fb = fringe_bitmaps[which]; if (fb == NULL) @@ -574,7 +580,8 @@ draw_fringe_bitmap_1 (w, row, left_p, overlay, which) if (p.face == NULL) { - /* Why does this happen? ++kfs */ + /* This could happen after clearing face cache. + But it shouldn't happen anymore. ++kfs */ return; } @@ -1073,7 +1080,7 @@ destroy_fringe_bitmap (n) { struct fringe_bitmap **fbp; - fringe_faces[n] = FRINGE_FACE_ID; + fringe_faces[n] = Qnil; fbp = &fringe_bitmaps[n]; if (*fbp && (*fbp)->dynamic) @@ -1294,12 +1301,12 @@ If BITMAP already exists, the existing definition is replaced. */) = ((struct fringe_bitmap **) xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof (struct fringe_bitmap *))); fringe_faces - = (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (unsigned)); + = (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object)); for (; i < max_fringe_bitmaps; i++) { fringe_bitmaps[i] = NULL; - fringe_faces[i] = FRINGE_FACE_ID; + fringe_faces[i] = Qnil; } } } @@ -1357,10 +1364,8 @@ If FACE is nil, reset face to default fringe face. */) if (face_id < 0) error ("No such face"); } - else - face_id = FRINGE_FACE_ID; - fringe_faces[n] = face_id; + fringe_faces[n] = face; return Qnil; } @@ -1434,6 +1439,18 @@ You must (require 'fringe) to use fringe bitmap symbols in your programs." */); Vfringe_bitmaps = Qnil; } +/* Garbage collection hook */ + +void +mark_fringe_data () +{ + int i; + + for (i = 0; i < max_fringe_bitmaps; i++) + if (!NILP (fringe_faces[i])) + mark_object (fringe_faces[i]); +} + /* Initialize this module when Emacs starts. */ void @@ -1455,12 +1472,12 @@ init_fringe () fringe_bitmaps = (struct fringe_bitmap **) xmalloc (max_fringe_bitmaps * sizeof (struct fringe_bitmap *)); fringe_faces - = (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (unsigned)); + = (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (Lisp_Object)); for (i = 0; i < max_fringe_bitmaps; i++) { fringe_bitmaps[i] = NULL; - fringe_faces[i] = FRINGE_FACE_ID; + fringe_faces[i] = Qnil; } } From c69955553a30457e422118dd485e2530f0ad1ae1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 6 Jan 2005 22:40:30 +0000 Subject: [PATCH 117/560] (Changing load-path): Fix typo. --- man/faq.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/faq.texi b/man/faq.texi index 6ca849d7b1e..b2a8b40155f 100644 --- a/man/faq.texi +++ b/man/faq.texi @@ -1583,7 +1583,7 @@ directory @var{/dir/subdir} to the load path like this: To do this relative to your home directory: @lisp -(setq load-path (cons "~/mysubdir/" load-path) +(setq load-path (cons "~/mysubdir/" load-path)) @end lisp @node Using an already running Emacs process, Compiler error messages, Changing load-path, Common requests From 762566f3a1641cde8d558bcfedee160f92df7898 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 6 Jan 2005 22:40:46 +0000 Subject: [PATCH 118/560] *** empty log message *** --- admin/FOR-RELEASE | 19 ++++++++++++------- man/ChangeLog | 4 ++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index fd8bc56431a..cace5cbdd46 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -11,6 +11,9 @@ To be done by Sergey Poznyakoff . gracefully if something isn't supported over Tramp. To be done by Andre Spiegel . +** define-minor-mode should not put :require into defcustom. +See msg from rms to emacs-devel on 21 Dec. + * FATAL ERRORS ** Investigate face cache related crash. @@ -196,9 +199,10 @@ set. ** Check the Emacs manual. -Each manual section should be proof-read by at least two people. -After each file name, on the same line or the following line, come the -names of the people who have checked it. +Each manual section should be checked for factual correctness +regarding recent changes by at least two people. After each file +name, on the same line or the following line, come the names of the +people who have checked it. SECTION READERS @@ -234,7 +238,7 @@ man/msdog.texi man/mule.texi "Luc Teirlinck" man/m-x.texi "Luc Teirlinck" man/picture.texi -man/programs.texi "Stephen Eglen" +man/programs.texi man/regs.texi "Luc Teirlinck" man/rmail.texi man/screen.texi "Luc Teirlinck" @@ -247,9 +251,10 @@ man/xresources.texi ** Check the Emacs Lisp manual. -Each manual section should be proof-read by at least two people. -After each file name, on the same line or the following line, come the -names of the people who have checked it. +Each manual section should be checked for factual correctness +regarding recent changes by at least two people. After each file +name, on the same line or the following line, come the names of the +people who have checked it. SECTION READERS ---------------------------------- diff --git a/man/ChangeLog b/man/ChangeLog index f92db4c03c0..264db9c29dd 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-06 Hiroshi Fujishima (tiny change) + + * faq.texi (Changing load-path): Fix typo. + 2005-01-05 Jay Belanger * calc.texi (Programming Tutorial): Replace kbd command by From c7ce7fc43b68369e18de0ccc5ded610823b8c1da Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 7 Jan 2005 02:52:29 +0000 Subject: [PATCH 119/560] (find-face-definition): Renamed from find-face. --- lisp/ChangeLog | 8 ++++++++ lisp/emacs-lisp/find-func.el | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9be77b5d0c3..eb17386d567 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Richard M. Stallman + + * emacs-lisp/find-func.el (find-face-definition): + Renamed from find-face. + 2005-01-06 Kim F. Storm * simple.el (completion-list-mode-map): Map follow-link to mouse-face. @@ -32,6 +37,9 @@ 2005-01-05 Richard M. Stallman + * custom.el (custom-set-variables, custom-theme-set-variables): + Clarify documentation. + * emacs-lisp/find-func.el (find-variable) (find-variable-other-window, find-variable-other-frame): Fix the TYPE args to find-function-read and find-function-do-it. diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 49e44ca5fee..7e2ac5aa883 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -418,8 +418,10 @@ The library where SYMBOL is defined is searched for in FILE or (let ((library (or file (symbol-file symbol type)))) (find-function-search-for-symbol symbol type library)))) +;; For symmetry, this should be called find-face; but some programs +;; assume that, if that name is defined, it means something else. ;;;###autoload -(defun find-face (face) +(defun find-face-definition (face) "Find the definition of FACE. FACE defaults to the name near point. Finds the Emacs Lisp library containing the definition of the face From 112d84efad57869bf65e1ee002dadb0c42e40308 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 7 Jan 2005 06:16:20 +0000 Subject: [PATCH 120/560] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-17 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-83 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-84 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-2 Merge from miles@gnu.org--gnu-2004 2005-01-05 Reiner Steib * lisp/gnus/spam.el (spam-face): New face. Don't use `gnus-splash-face' which is unreadable in some setups. 2005-01-06 Katsumi Yamaoka * man/message.texi (Reply): `message-reply-to-function' should return a list. Suggested by ARISAWA Akihiro . --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/spam.el | 14 +++++++++++++- man/ChangeLog | 5 +++++ man/message.texi | 17 ++++++++--------- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 46a1449ce79..4eee8bcbbfc 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2005-01-05 Reiner Steib + + * spam.el (spam-face): New face. Don't use `gnus-splash-face' + which is unreadable in some setups. + 2004-12-27 Simon Josefsson * mm-bodies.el (mm-body-encoding): Don't permit 7-bit to be used diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index a0b28340717..9a55ba9f318 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -298,7 +298,19 @@ All unmarked article in such group receive the spam mark on group entry." :type '(radio (const nil) regexp) :group 'spam) -(defcustom spam-face 'gnus-splash-face +(defface spam-face + '((((class color) (type tty) (background dark)) + (:foreground "gray80" :background "gray50")) + (((class color) (type tty) (background light)) + (:foreground "gray50" :background "gray80")) + (((class color) (background dark)) + (:foreground "ivory2")) + (((class color) (background light)) + (:foreground "ivory4")) + (t :inverse-video t)) + "Face for spam-marked articles.") + +(defcustom spam-face 'spam-face "Face for spam-marked articles." :type 'face :group 'spam) diff --git a/man/ChangeLog b/man/ChangeLog index 264db9c29dd..83eeaaf3129 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 Katsumi Yamaoka + + * message.texi (Reply): `message-reply-to-function' should return + a list. Suggested by ARISAWA Akihiro . + 2005-01-06 Hiroshi Fujishima (tiny change) * faq.texi (Changing load-path): Fix typo. diff --git a/man/message.texi b/man/message.texi index 4d4f7af2a07..5e488b0e7cf 100644 --- a/man/message.texi +++ b/man/message.texi @@ -146,16 +146,15 @@ If you want the replies to go to the @code{Sender} instead of the This function will be called narrowed to the head of the article that is being replied to. -As you can see, this function should return a string if it has an -opinion as to what the To header should be. If it does not, it should -just return @code{nil}, and the normal methods for determining the To -header will be used. +As you can see, this function should return a list. In this case, it +returns @code{((To . "Whom"))} if it has an opinion as to what the To +header should be. If it does not, it should just return @code{nil}, and +the normal methods for determining the To header will be used. -This function can also return a list. In that case, each list element -should be a cons, where the @sc{car} should be the name of a header -(e.g. @code{Cc}) and the @sc{cdr} should be the header value -(e.g. @samp{larsi@@ifi.uio.no}). All these headers will be inserted into -the head of the outgoing mail. +Each list element should be a cons, where the @sc{car} should be the +name of a header (e.g. @code{Cc}) and the @sc{cdr} should be the header +value (e.g. @samp{larsi@@ifi.uio.no}). All these headers will be +inserted into the head of the outgoing mail. @node Wide Reply From a6fffcdcb75633c40d7af4c2a8cfcf513f34dd89 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Fri, 7 Jan 2005 07:11:24 +0000 Subject: [PATCH 121/560] * macterm.c (XLoadQueryFont): Correctly handle 0 size font widths that are returned from some Japanese fonts. --- src/ChangeLog | 5 +++++ src/macterm.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7b8e2a320eb..38317b9e8f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-06 YAMAMOTO Mitsuharu + + * macterm.c (XLoadQueryFont): Correctly handle 0 size + font widths that are returned from some Japanese fonts. + 2005-01-06 Kim F. Storm * fringe.c (fringe_faces): Change to Lisp_Object pointer. diff --git a/src/macterm.c b/src/macterm.c index 4d80fbac5fa..566f0c5b04b 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -6715,14 +6715,19 @@ XLoadQueryFont (Display *dpy, char *fontname) char_width = CharWidth (c); font->per_char[c - 0x20].width = char_width; font->per_char[c - 0x20].rbearing = char_width; - min_width = min (min_width, char_width); - max_width = max (max_width, char_width); - } + /* Some Japanese fonts (in SJIS encoding) return 0 as the + character width of 0x7f. */ + if (char_width > 0) + { + min_width = min (min_width, char_width); + max_width = max (max_width, char_width); + } + } font->min_bounds.width = min_width; font->max_bounds.width = max_width; } } - + TextFont (old_fontnum); /* restore previous font number, size and face */ TextSize (old_fontsize); TextFace (old_fontface); From f9a23a6f5b4642c66181155a9066e293688d77b2 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 7 Jan 2005 13:12:32 +0000 Subject: [PATCH 122/560] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 38317b9e8f6..f78945f644b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-07 Kim F. Storm + + * xdisp.c (set_iterator_to_next): Fix 2004-12-13 change. + Set stop_charpos to current charpos instead of 0. + 2005-01-06 YAMAMOTO Mitsuharu * macterm.c (XLoadQueryFont): Correctly handle 0 size From 60227bf44ec8a72c2e448adad24b2971f951ea5b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 7 Jan 2005 13:13:05 +0000 Subject: [PATCH 123/560] (set_iterator_to_next): Fix 2004-12-13 change. Set stop_charpos to current charpos instead of 0. --- src/xdisp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index a7802d5321b..e4c231c3083 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5187,9 +5187,6 @@ set_iterator_to_next (it, reseat_p) it->dpvec = NULL; it->current.dpvec_index = -1; - /* Recheck faces after display vector */ - it->stop_charpos = 0; - /* Skip over characters which were displayed via IT->dpvec. */ if (it->dpvec_char_len < 0) reseat_at_next_visible_line_start (it, 1); @@ -5198,6 +5195,9 @@ set_iterator_to_next (it, reseat_p) it->len = it->dpvec_char_len; set_iterator_to_next (it, reseat_p); } + + /* Recheck faces after display vector */ + it->stop_charpos = IT_CHARPOS (*it); } } else if (it->method == next_element_from_string) From 1bc9c7ed8b140a10f1e263091882f41aa6615b1d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 7 Jan 2005 16:12:34 +0000 Subject: [PATCH 124/560] Whitespace/comment change. --- lisp/help-fns.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index aaaff6903f2..9acadaa2fa6 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -216,6 +216,14 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"." (intern (upcase name)))))) arglist))) +;;; Could be this, if we make symbol-file do the work below. +;;; (defun help-C-file-name (subr-or-var kind) +;;; "Return the name of the C file where SUBR-OR-VAR is defined. +;;; KIND should be `var' for a variable or `subr' for a subroutine." +;;; (symbol-file (if (symbolp subr-or-var) subr-or-var +;;; (subr-name subr-or-var)) +;;; (if (eq kind 'var) 'defvar 'defun))) + (defun help-C-file-name (subr-or-var kind) "Return the name of the C file where SUBR-OR-VAR is defined. KIND should be `var' for a variable or `subr' for a subroutine." @@ -231,8 +239,8 @@ KIND should be `var' for a variable or `subr' for a subroutine." (let ((file (catch 'loop (while t (let ((pnt (search-forward (concat "" name "\n")))) - (re-search-backward "S\\(.*\\)") - (let ((file (match-string 1))) + (re-search-backward "S\\(.*\\)") + (let ((file (match-string 1))) (if (member file build-files) (throw 'loop file) (goto-char pnt)))))))) From ff59904afeadf91b9b0c101d273a46e5571fba9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 7 Jan 2005 16:59:57 +0000 Subject: [PATCH 125/560] * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar) (xg_tool_bar_callback, xg_tool_bar_help_callback) (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler warning. * xselect.c (x_get_foreign_selection, x_fill_property_data) (Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with XFLOAT_DATA to get extract number from Lisp object. --- src/ChangeLog | 11 +++++++++++ src/gtkutil.c | 19 ++++++++++++------- src/xselect.c | 10 +++++----- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f78945f644b..9e3c5e56559 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2005-01-07 Jan Dj,Ad(Brv + + * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar) + (xg_tool_bar_callback, xg_tool_bar_help_callback) + (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler + warning. + + * xselect.c (x_get_foreign_selection, x_fill_property_data) + (Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with + XFLOAT_DATA to get extract number from Lisp object. + 2005-01-07 Kim F. Storm * xdisp.c (set_iterator_to_next): Fix 2004-12-13 change. diff --git a/src/gtkutil.c b/src/gtkutil.c index 22919230a65..686168badda 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2850,7 +2850,7 @@ xg_gtk_scroll_destroy (widget, data) gpointer data; { gpointer p; - int id = (int)data; + int id = (int) (EMACS_INT) data; /* The EMACS_INT cast avoids a warning. */ p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA); if (p) xfree (p); @@ -2920,10 +2920,11 @@ xg_create_scroll_bar (f, bar, scroll_callback, scroll_bar_name) "value-changed", scroll_callback, (gpointer) bar); + /* The EMACS_INT cast avoids a warning. */ g_signal_connect (G_OBJECT (wscroll), "destroy", G_CALLBACK (xg_gtk_scroll_destroy), - (gpointer) scroll_id); + (gpointer) (EMACS_INT) scroll_id); /* Connect to button press and button release to detect if any scroll bar has the pointer. */ @@ -3112,7 +3113,8 @@ xg_tool_bar_callback (w, client_data) GtkWidget *w; gpointer client_data; { - int idx = (int)client_data; + /* The EMACS_INT cast avoids a warning. */ + int idx = (int) (EMACS_INT) client_data; FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object key, frame; struct input_event event; @@ -3209,7 +3211,8 @@ xg_tool_bar_help_callback (w, event, client_data) GdkEventCrossing *event; gpointer client_data; { - int idx = (int)client_data; + /* The EMACS_INT cast avoids a warning. */ + int idx = (int) (EMACS_INT) client_data; FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object help, frame; @@ -3452,11 +3455,12 @@ update_frame_tool_bar (f) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); + /* The EMACS_INT cast avoids a warning. */ gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget), 0, 0, 0, w, GTK_SIGNAL_FUNC (xg_tool_bar_callback), - (gpointer)i); + (gpointer) (EMACS_INT) i); /* Save the image so we can see if an update is needed when this function is called again. */ @@ -3486,14 +3490,15 @@ update_frame_tool_bar (f) rather than the GtkButton specific signals "enter" and "leave", so we can have only one callback. The event will tell us what kind of event it is. */ + /* The EMACS_INT cast avoids a warning. */ g_signal_connect (G_OBJECT (w), "enter-notify-event", G_CALLBACK (xg_tool_bar_help_callback), - (gpointer)i); + (gpointer) (EMACS_INT) i); g_signal_connect (G_OBJECT (w), "leave-notify-event", G_CALLBACK (xg_tool_bar_help_callback), - (gpointer)i); + (gpointer) (EMACS_INT) i); } } else diff --git a/src/xselect.c b/src/xselect.c index 38547ea6bbf..5dd63b9c735 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1383,7 +1383,7 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp) else if (INTEGERP (time_stamp)) requestor_time = (Time) XUINT (time_stamp); else if (FLOATP (time_stamp)) - requestor_time = (Time) XFLOAT (time_stamp); + requestor_time = (Time) XFLOAT_DATA (time_stamp); else error ("TIME_STAMP must be cons or number"); } @@ -2468,7 +2468,7 @@ x_check_property_data (data) DPY is the display use to look up X atoms. DATA is a Lisp list of values to be converted. RET is the C array that contains the converted values. It is assumed - it is big enough to hol all values. + it is big enough to hold all values. FORMAT is 8, 16 or 32 and gives the size in bits for each C value to be stored in RET. */ @@ -2492,7 +2492,7 @@ x_fill_property_data (dpy, data, ret, format) if (INTEGERP (o)) val = (CARD32) XFASTINT (o); else if (FLOATP (o)) - val = (CARD32) XFLOAT (o); + val = (CARD32) XFLOAT_DATA (o); else if (CONSP (o)) val = (CARD32) cons_to_long (o); else if (STRINGP (o)) @@ -2597,7 +2597,7 @@ If the value is 0 or the atom is not known, return the empty string. */) if (INTEGERP (value)) atom = (Atom) XUINT (value); else if (FLOATP (value)) - atom = (Atom) XFLOAT (value); + atom = (Atom) XFLOAT_DATA (value); else if (CONSP (value)) atom = (Atom) cons_to_long (value); else @@ -2729,7 +2729,7 @@ are ignored. */) else if (INTEGERP (dest)) wdest = (Window) XFASTINT (dest); else if (FLOATP (dest)) - wdest = (Window) XFLOAT (dest); + wdest = (Window) XFLOAT_DATA (dest); else if (CONSP (dest)) { if (! NUMBERP (XCAR (dest)) || ! NUMBERP (XCDR (dest))) From 150f39ee71b962c1970fad22cd1d4a6726eca09d Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Fri, 7 Jan 2005 20:18:59 +0000 Subject: [PATCH 126/560] (desktop-restore-eager, desktop-lazy-verbose, desktop-lazy-idle-delay): New customizable variables. (desktop-buffer-args-list): New variable. (desktop-append-buffer-args): New function. (desktop-save): Call desktop-append-buffer-args for some buffers. (desktop-lazy-create-buffer): New function. (desktop-idle-create-buffers): New function. (desktop-read): Add message about buffers to restore lazily. (desktop-lazy-abort): New command. (desktop-clear): Call desktop-lazy-abort. (desktop-lazy-complete): New command. --- lisp/desktop.el | 123 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 113 insertions(+), 10 deletions(-) diff --git a/lisp/desktop.el b/lisp/desktop.el index 1e4fa67d199..18bb638c045 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -198,7 +198,7 @@ Feature: Saving `kill-ring' implies saving `kill-ring-yank-pointer'." search-ring-yank-pointer regexp-search-ring regexp-search-ring-yank-pointer) - "List of global variables to clear by `desktop-clear'. + "List of global variables that `desktop-clear' will clear. An element may be variable name (a symbol) or a cons cell of the form \(VAR . FORM). Symbols are set to nil and for cons cells VAR is set to the value obtained by evaluateing FORM." @@ -267,6 +267,27 @@ Possible values are: :group 'desktop :version "21.4") +(defcustom desktop-restore-eager t + "Number of buffers to restore immediately. +Remaining buffers are restored lazily (when Emacs is idle). +If value is t, all buffers are restored immediately." + :type '(choise (const t) integer) + :group 'desktop + :version "21.4") + +(defcustom desktop-lazy-verbose t + "Verbose reporting of lazily created buffers." + :type 'boolean + :group 'desktop + :version "21.4") + +(defcustom desktop-lazy-idle-delay 5 + "Idle delay before starting to create buffers. +See `desktop-restore-eager'." + :type 'integer + :group 'desktop + :version "21.4") + ;;;###autoload (defvar desktop-save-buffer nil "When non-nil, save buffer status in desktop file. @@ -365,6 +386,7 @@ This kills all buffers except for internal ones and those matching `desktop-clear-preserve-buffers'. Furthermore, it clears the variables listed in `desktop-globals-to-clear'." (interactive) + (desktop-lazy-abort) (dolist (var desktop-globals-to-clear) (if (symbolp var) (eval `(setq-default ,var nil)) @@ -625,6 +647,7 @@ See also `desktop-base-file-name'." (setq locals (cdr locals))) ll))) (buffer-list))) + (eager desktop-restore-eager) (buf (get-buffer-create "*desktop*"))) (set-buffer buf) (erase-buffer) @@ -645,14 +668,21 @@ See also `desktop-base-file-name'." (insert "\n;; Buffer section -- buffers listed in same order as in buffer list:\n") (mapc #'(lambda (l) - (if (apply 'desktop-save-buffer-p l) - (progn - (insert "(desktop-create-buffer " desktop-file-version) - (mapc #'(lambda (e) - (insert "\n " (desktop-value-to-string e))) - l) - (insert ")\n\n")))) - info) + (when (apply 'desktop-save-buffer-p l) + (insert "(" + (if (or (not (integerp eager)) + (unless (zerop eager) + (setq eager (1- eager)) + t)) + "desktop-create-buffer" + "desktop-append-buffer-args") + " " + desktop-file-version) + (mapc #'(lambda (e) + (insert "\n " (desktop-value-to-string e))) + l) + (insert ")\n\n"))) + info) (setq default-directory dirname) (when (file-exists-p filename) (delete-file filename)) (let ((coding-system-for-write 'emacs-mule)) @@ -670,6 +700,11 @@ This function also sets `desktop-dirname' to nil." (when (file-exists-p filename) (delete-file filename))))) +(defvar desktop-buffer-args-list nil + "List of args for `desktop-create-buffer'.") + +(defvar desktop-lazy-timer nil) + ;; ---------------------------------------------------------------------------- ;;;###autoload (defun desktop-read (&optional dirname) @@ -706,6 +741,7 @@ It returns t if a desktop file was loaded, nil otherwise." (let ((desktop-first-buffer nil) (desktop-buffer-ok-count 0) (desktop-buffer-fail-count 0)) + (setq desktop-lazy-timer nil) ;; Evaluate desktop buffer. (load (expand-file-name desktop-base-file-name desktop-dirname) t t t) ;; `desktop-create-buffer' puts buffers at end of the buffer list. @@ -717,11 +753,15 @@ It returns t if a desktop file was loaded, nil otherwise." (run-hooks 'desktop-delay-hook) (setq desktop-delay-hook nil) (run-hooks 'desktop-after-read-hook) - (message "Desktop: %d buffer%s restored%s." + (message "Desktop: %d buffer%s restored%s%s." desktop-buffer-ok-count (if (= 1 desktop-buffer-ok-count) "" "s") (if (< 0 desktop-buffer-fail-count) (format ", %d failed to restore" desktop-buffer-fail-count) + "") + (if desktop-buffer-args-list + (format ", %d to restore lazily" + (length desktop-buffer-args-list)) "")) t) ;; No desktop file found. @@ -917,6 +957,69 @@ directory DIRNAME." (cons 'case-replace cr) (cons 'overwrite-mode (car mim))))) +(defun desktop-append-buffer-args (&rest args) + "Append ARGS at end of `desktop-buffer-args-list' +ARGS must be an argument list for `desktop-create-buffer'." + (setq desktop-buffer-args-list (nconc desktop-buffer-args-list (list args))) + (unless desktop-lazy-timer + (setq desktop-lazy-timer + (run-with-idle-timer desktop-lazy-idle-delay t 'desktop-idle-create-buffers)))) + +(defun desktop-lazy-create-buffer () + "Pop args from `desktop-buffer-args-list', create buffer and bury it." + (when desktop-buffer-args-list + (let* ((remaining (length desktop-buffer-args-list)) + (args (pop desktop-buffer-args-list)) + (buffer-name (nth 2 args)) + (msg (format "Desktop lazily opening %s (%s remaining)..." + buffer-name remaining))) + (when desktop-lazy-verbose + (message msg)) + (let ((desktop-first-buffer nil) + (desktop-buffer-ok-count 0) + (desktop-buffer-fail-count 0)) + (apply 'desktop-create-buffer args) + (run-hooks 'desktop-delay-hook) + (setq desktop-delay-hook nil) + (bury-buffer (get-buffer buffer-name)) + (when desktop-lazy-verbose + (message "%s%s" msg (if (> desktop-buffer-ok-count 0) "done" "failed"))))))) + +(defun desktop-idle-create-buffers () + "Create buffers until the user does something, then stop. +If there are no buffers left to create, kill the timer." + (let ((repeat 1)) + (while (and repeat desktop-buffer-args-list) + (save-window-excursion + (desktop-lazy-create-buffer)) + (setq repeat (sit-for 0.2)) + (unless desktop-buffer-args-list + (cancel-timer desktop-lazy-timer) + (setq desktop-lazy-timer nil) + (message "Lazy desktop load complete") + (sit-for 3) + (message ""))))) + +(defun desktop-lazy-complete () + "Run the desktop load to completion." + (interactive) + (let ((desktop-lazy-verbose t)) + (while desktop-buffer-args-list + (save-window-excursion + (desktop-lazy-create-buffer))) + (message "Lazy desktop load complete"))) + +(defun desktop-lazy-abort () + "Abort lazy loading of the desktop." + (interactive) + (when desktop-lazy-timer + (cancel-timer desktop-lazy-timer) + (setq desktop-lazy-timer nil)) + (when desktop-buffer-args-list + (setq desktop-buffer-args-list nil) + (when (interactive-p) + (message "Lazy desktop load aborted")))) + ;; ---------------------------------------------------------------------------- ;; When `desktop-save-mode' is non-nil and "--no-desktop" is not specified on the ;; command line, we do the rest of what it takes to use desktop, but do it From 200d028b30fd8b67999c087eb50a84ba6fe8a5aa Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Fri, 7 Jan 2005 20:25:00 +0000 Subject: [PATCH 127/560] Describe desktop package lazy restore feature. --- etc/NEWS | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 7ecdea1367e..d3688cf36fd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -397,20 +397,30 @@ saving. *** Buffers are saved in the desktop file in the same order as that in the buffer list. +*** The desktop package can be customized to restore only some buffers immediately, +remaining buffers are restored lazily (when Emacs is idle). + *** New commands: - desktop-revert reverts to the last loaded desktop. - desktop-change-dir kills current desktop and loads a new. - desktop-save-in-desktop-dir saves desktop in the directory from which it was loaded. + - desktop-lazy-complete runs the desktop load to completion. + - desktop-lazy-abort aborts lazy loading of the desktop. *** New customizable variables: - desktop-save. Determins whether the desktop should be saved when it is killed. - - desktop-file-name-format. + - desktop-file-name-format. Format in which desktop file names should be saved. - desktop-path. List of directories in which to lookup the desktop file. - - desktop-locals-to-save. - - desktop-globals-to-clear. - - desktop-clear-preserve-buffers-regexp. + - desktop-locals-to-save. List of local variables to save. + - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear. + - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear' + should not delete. + - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are + restored lazily (when Emacs is idle). + - desktop-lazy-verbose. Verbose reporting of lazily created buffers. + - desktop-lazy-idle-delay. Idle delay before starting to create buffers. *** New command line option --no-desktop From 9abb41ebcbc01ec50cc1c5fab913cb003a16e052 Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Fri, 7 Jan 2005 20:26:30 +0000 Subject: [PATCH 128/560] *** empty log message *** --- etc/ChangeLog | 4 ++++ lisp/ChangeLog | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index f0123a8b90d..6b0cdc9de3d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-01-07 Lars Hansen + + * NEWS: Describe desktop package lazy restore feature. + 2004-12-21 Richard M. Stallman * DISTRIB: Don't say "freeware". diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb17386d567..034374789cc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2005-01-07 Lars Hansen + + * desktop.el (desktop-restore-eager, desktop-lazy-verbose, + desktop-lazy-idle-delay): New customizable variables. + (desktop-buffer-args-list): New variable. + (desktop-append-buffer-args): New function. + (desktop-save): Call desktop-append-buffer-args for some buffers. + (desktop-lazy-create-buffer): New function. + (desktop-idle-create-buffers): New function. + (desktop-read): Add message about buffers to restore lazily. + (desktop-lazy-abort): New command. + (desktop-clear): Call desktop-lazy-abort. + (desktop-lazy-complete): New command. + 2005-01-06 Richard M. Stallman * emacs-lisp/find-func.el (find-face-definition): From 9b85e63d346b2e4de1295228356d4e2ea49a3ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 7 Jan 2005 20:50:46 +0000 Subject: [PATCH 129/560] * xmenu.c (create_and_show_popup_menu): Pass zero as button to gtk_menu_popup if not for_click, so callbacks for the menu are called. --- src/ChangeLog | 3 +++ src/xmenu.c | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9e3c5e56559..8a267b46d14 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2005-01-07 Jan Dj,Ad(Brv + * xmenu.c (create_and_show_popup_menu): Pass zero as button to + gtk_menu_popup if not for_click, so callbacks for the menu are called. + * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar) (xg_tool_bar_callback, xg_tool_bar_help_callback) (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler diff --git a/src/xmenu.c b/src/xmenu.c index f9c2dc4bd1b..57f184e121f 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2454,10 +2454,6 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) G_CALLBACK (menu_highlight_callback)); xg_crazy_callback_abort = 0; - for (i = 0; i < 5; i++) - if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) - break; - if (! for_click) { /* Not invoked by a click. pop up at x/y. */ @@ -2470,8 +2466,16 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) popup_x_y.x = x; popup_x_y.y = y; popup_x_y.f = f; - } + i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */ + } + else + { + for (i = 0; i < 5; i++) + if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) + break; + } + /* Display the menu. */ gtk_widget_show_all (menu); gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0); From fcda0a6649a68af8c18bb789190a39480a92dcb1 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 8 Jan 2005 05:57:11 +0000 Subject: [PATCH 130/560] (calc-settings-file): Change default value. Suggested by cgw in a comment in calc-mode.el. --- lisp/calc/calc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index f93c2e899b5..a0bd5aaff11 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -206,8 +206,8 @@ (require 'calc-macs) ;;;###autoload -(defvar calc-settings-file user-init-file - "*File in which to record permanent settings; default is `user-init-file'.") +(defvar calc-settings-file (convert-standard-filename "~/.calc.el") + "*File in which to record permanent settings.") (defvar calc-bug-address "belanger@truman.edu" "Address of the author of Calc, for use by `report-calc-bug'.") From c5a15067e5ac011f41cfe28b3dd89573f7238102 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 8 Jan 2005 05:58:05 +0000 Subject: [PATCH 131/560] (calc-settings-file-name): Compare calc-settings-file to user-init-file instead of ~/.emacs. Replace ~/.emacs in a prompt by calc-settings-file. --- lisp/calc/calc-mode.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index dfc488d49dd..389b52385b6 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -309,25 +309,22 @@ (defun calc-settings-file-name (name &optional arg) (interactive (list (read-file-name (format "Settings file name (normally %s): " - (abbreviate-file-name (or user-init-file - "~/.emacs")))) + (abbreviate-file-name calc-settings-file))) current-prefix-arg)) (calc-wrapper (setq arg (if arg (prefix-numeric-value arg) 0)) - (if (equal name "") + (if (string-equal (file-name-nondirectory name) "") (message "Calc settings file is \"%s\"" calc-settings-file) (if (< (math-abs arg) 2) (let ((list calc-mode-var-list)) (while list (set (car (car list)) (nth 1 (car list))) (setq list (cdr list))))) - ;; FIXME: we should use ~/.calc or so in order to avoid - ;; reexecuting ~/.emacs (it's not always idempotent) -cgw 2001.11.12 (setq calc-settings-file name) (or (and calc-settings-file - (string-match "\\.emacs" calc-settings-file) - (> arg 0)) + (equal user-init-file calc-settings-file) + (> arg 0)) (< arg 0) (load name t) (message "New file"))))) From 16085693e463ae35ae329b4d9904db70af72cf53 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 8 Jan 2005 06:17:44 +0000 Subject: [PATCH 132/560] (General Mode Commands, Installation): Change to reflect new default value of calc-settings-file. --- man/calc.texi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 6d7d478d0b5..2c09ef8ad6a 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -12268,22 +12268,22 @@ options are available; @pxref{Mode Settings in Embedded Mode}. @kindex m F @pindex calc-settings-file-name The @kbd{m F} (@code{calc-settings-file-name}) command allows you to -choose a different place than your @file{.emacs} file for @kbd{m m}, -@kbd{Z P}, and similar commands to save permanent information. +choose a different file than the current value of @code{calc-settings-file} +for @kbd{m m}, @kbd{Z P}, and similar commands to save permanent information. You are prompted for a file name. All Calc modes are then reset to their default values, then settings from the file you named are loaded if this file exists, and this file becomes the one that Calc will use in the future for commands like @kbd{m m}. The default settings -file name is @file{~/.emacs}. You can see the current file name by +file name is @file{~/.calc.el}. You can see the current file name by giving a blank response to the @kbd{m F} prompt. See also the discussion of the @code{calc-settings-file} variable; @pxref{Installation}. -If the file name you give contains the string @samp{.emacs} anywhere -inside it, @kbd{m F} will not automatically load the new file. This -is because you are presumably switching to your @file{~/.emacs} file, -which may contain other things you don't want to reread. You can give +If the file name you give is your user init file (typically +@file{~/.emacs}), @kbd{m F} will not automatically load the new file. This +is because your user init file may contain other things you don't want +to reread. You can give a numeric prefix argument of 1 to @kbd{m F} to force it to read the -file no matter what its name. Conversely, an argument of @mathit{-1} tells +file no matter what. Conversely, an argument of @mathit{-1} tells @kbd{m F} @emph{not} to read the new file. An argument of 2 or @mathit{-2} tells @kbd{m F} not to reset the modes to their defaults beforehand, which is useful if you intend your new file to have a variant of the @@ -34497,8 +34497,8 @@ the same side, best if you plan to be binding single-sided pages. Another variable you might want to set is @code{calc-settings-file}, which holds the file name in which commands like @kbd{m m} and @kbd{Z P} store ``permanent'' definitions. The default value for this variable -is @code{"~/.emacs"}. If @code{calc-settings-file} does not contain -@code{".emacs"} as a substring, and if the variable +is @code{"~/.calc.el"}. If @code{calc-settings-file} is not your user +init file (typically @file{~/.emacs}) and if the variable @code{calc-loaded-settings-file} is @code{nil}, then Calc will automatically load your settings file (if it exists) the first time Calc is invoked. From a4dfc830e04f9f01cc359e5b0b40ec5f39a3406b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 8 Jan 2005 07:12:32 +0000 Subject: [PATCH 133/560] *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ man/ChangeLog | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 034374789cc..ab44fcc5612 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2005-01-08 Jay Belanger + + * calc/calc.el (calc-settings-file): Change default value. + Suggested by cgw in a comment in calc-mode.el. + + * calc/calc-mode.el (calc-settings-file-name): + Compare calc-settings-file to user-init-file instead of ~/.emacs. + Replace ~/.emacs in a prompt by calc-settings-file. + 2005-01-07 Lars Hansen * desktop.el (desktop-restore-eager, desktop-lazy-verbose, diff --git a/man/ChangeLog b/man/ChangeLog index 83eeaaf3129..e0de2c18558 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-08 Jay Belanger + + * calc.texi (General Mode Commands, Installation): Change to + reflect new default value of calc-settings-file. + 2005-01-06 Katsumi Yamaoka * message.texi (Reply): `message-reply-to-function' should return From e091085739f5088043e65a10b6b6b423f4e2f354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 8 Jan 2005 16:49:14 +0000 Subject: [PATCH 134/560] * xterm.h (struct x_output): New member, toolbar_detached. * gtkutil.c (xg_create_frame_widgets): Set initial tool bar height to 38. (xg_tool_bar_detach_callback): Set toolbar_detached to 1. (xg_tool_bar_attach_callback): Set toolbar_detached to 0. (xg_create_tool_bar): Initialize toolbar_detached. (update_frame_tool_bar): Only set FRAME_TOOLBAR_HEIGHT (f) if toolbar_detached is zero. --- src/ChangeLog | 12 ++++++++++++ src/gtkutil.c | 13 ++++++++++--- src/xterm.h | 2 ++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8a267b46d14..2326957d4e0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2005-01-08 Jan Dj,Ad(Brv + + * xterm.h (struct x_output): New member, toolbar_detached. + + * gtkutil.c (xg_create_frame_widgets): Set initial tool bar height to + 38. + (xg_tool_bar_detach_callback): Set toolbar_detached to 1. + (xg_tool_bar_attach_callback): Set toolbar_detached to 0. + (xg_create_tool_bar): Initialize toolbar_detached. + (update_frame_tool_bar): Only set FRAME_TOOLBAR_HEIGHT (f) if + toolbar_detached is zero. + 2005-01-07 Jan Dj,Ad(Brv * xmenu.c (create_and_show_popup_menu): Pass zero as button to diff --git a/src/gtkutil.c b/src/gtkutil.c index 686168badda..39d5e768dda 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -756,7 +756,7 @@ xg_create_frame_widgets (f) So we cheat a bit by setting a height that is what it will have later on when tool bar items are added. */ if (FRAME_EXTERNAL_TOOL_BAR (f) && f->n_tool_bar_items == 0) - FRAME_TOOLBAR_HEIGHT (f) = 34; + FRAME_TOOLBAR_HEIGHT (f) = 38; /* We don't want this widget double buffered, because we draw on it @@ -3156,6 +3156,8 @@ xg_tool_bar_detach_callback (wbox, w, client_data) if (f) { + FRAME_X_OUTPUT (f)->toolbar_detached = 1; + /* When detaching a tool bar, not everything dissapear. There are a few pixels left that are used to drop the tool bar back into place. */ @@ -3187,11 +3189,13 @@ xg_tool_bar_attach_callback (wbox, w, client_data) { GtkRequisition req; + FRAME_X_OUTPUT (f)->toolbar_detached = 0; + gtk_widget_size_request (w, &req); FRAME_TOOLBAR_HEIGHT (f) = req.height; /* The height has changed, resize outer widget and set columns - rows to what we had before detaching the tool bar. */ + rows to what we had before attaching the tool bar. */ xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f)); } } @@ -3305,6 +3309,8 @@ xg_create_tool_bar (f) x->toolbar_widget = gtk_toolbar_new (); x->handlebox_widget = gtk_handle_box_new (); + x->toolbar_detached = 0; + gtk_container_add (GTK_CONTAINER (x->handlebox_widget), x->toolbar_widget); @@ -3537,7 +3543,8 @@ update_frame_tool_bar (f) } gtk_widget_size_request (x->toolbar_widget, &new_req); - if (old_req.height != new_req.height) + if (old_req.height != new_req.height + && ! FRAME_X_OUTPUT (f)->toolbar_detached) { FRAME_TOOLBAR_HEIGHT (f) = new_req.height; xg_resize_outer_widget (f, FRAME_COLS (f), FRAME_LINES (f)); diff --git a/src/xterm.h b/src/xterm.h index 2f71f644217..2c24dcd592c 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -499,6 +499,8 @@ struct x_output GtkWidget *toolbar_widget; /* The handle box that makes the tool bar detachable. */ GtkWidget *handlebox_widget; + /* Non-zero if the tool bar is detached. */ + int toolbar_detached; /* The last size hints set. */ GdkGeometry size_hints; From 7716b93b2470dd6c0775bf43b5c028972e5b0cf9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 8 Jan 2005 18:58:33 +0000 Subject: [PATCH 135/560] *** empty log message *** --- lisp/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab44fcc5612..c9c35e121a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -9,8 +9,8 @@ 2005-01-07 Lars Hansen - * desktop.el (desktop-restore-eager, desktop-lazy-verbose, - desktop-lazy-idle-delay): New customizable variables. + * desktop.el (desktop-restore-eager, desktop-lazy-verbose) + (desktop-lazy-idle-delay): New customizable variables. (desktop-buffer-args-list): New variable. (desktop-append-buffer-args): New function. (desktop-save): Call desktop-append-buffer-args for some buffers. From 1f38760073c03a82ff6340f9ef190aa82f639d7a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 8 Jan 2005 20:05:58 +0000 Subject: [PATCH 136/560] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c9c35e121a8..8b8d602f5b3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-08 Kim F. Storm + + * info.el (Info-mode-map, Info-next-link-keymap) + (Info-prev-link-keymap, Info-up-link-keymap): + Map follow-link to mouse-face. + (Info-fontify-node): Add "mouse-2: " prefix to tooltip. + 2005-01-08 Jay Belanger * calc/calc.el (calc-settings-file): Change default value. From 3c1498ace84a3c0ca7549c662e6dd0487b6e4749 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 8 Jan 2005 20:06:23 +0000 Subject: [PATCH 137/560] (Info-mode-map, Info-next-link-keymap) (Info-prev-link-keymap, Info-up-link-keymap): Map follow-link to mouse-face. (Info-fontify-node): Add "mouse-2: " prefix to tooltip. --- lisp/info.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/info.el b/lisp/info.el index 750f302d422..5e8e6ed8340 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2913,6 +2913,7 @@ if point is in a menu item description, follow that menu item." (define-key Info-mode-map "," 'Info-index-next) (define-key Info-mode-map "\177" 'Info-scroll-down) (define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node) + (define-key Info-mode-map [follow-link] 'mouse-face) ) (defun Info-check-pointer (item) @@ -3453,6 +3454,7 @@ Preserve text properties." (define-key keymap [header-line mouse-2] 'Info-next) (define-key keymap [header-line down-mouse-1] 'ignore) (define-key keymap [mouse-2] 'Info-next) + (define-key keymap [follow-link] 'mouse-face) keymap) "Keymap to put on the Next link in the text or the header line.") @@ -3462,6 +3464,7 @@ Preserve text properties." (define-key keymap [header-line mouse-2] 'Info-prev) (define-key keymap [header-line down-mouse-1] 'ignore) (define-key keymap [mouse-2] 'Info-prev) + (define-key keymap [follow-link] 'mouse-face) keymap) "Keymap to put on the Prev link in the text or the header line.") @@ -3472,6 +3475,7 @@ Preserve text properties." (define-key keymap [header-line mouse-2] 'Info-up) (define-key keymap [header-line down-mouse-1] 'ignore) (define-key keymap [mouse-2] 'Info-up) + (define-key keymap [follow-link] 'mouse-face) keymap) "Keymap to put on the Up link in the text or the header line.") @@ -3506,7 +3510,7 @@ Preserve text properties." (put-text-property tbeg nend 'mouse-face 'highlight) (put-text-property tbeg nend 'help-echo - (concat "Go to node " + (concat "mouse-2: Go to node " (buffer-substring nbeg nend))) ;; Always set up the text property keymap. ;; It will either be used in the buffer From 6bbfeec558c35adffa9945f26f0c112ed6e822e6 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 8 Jan 2005 20:35:45 +0000 Subject: [PATCH 138/560] (calc-mode): Remove the extension from `calc-settings-file' for loading. --- lisp/calc/calc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index a0bd5aaff11..635cb75520f 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1028,7 +1028,7 @@ Notations: 3.14e6 3.14 * 10^6 (equal calc-settings-file user-init-file) (progn (setq calc-loaded-settings-file t) - (load calc-settings-file t))) ; t = missing-ok + (load (file-name-sans-extension calc-settings-file) t))) ; t = missing-ok (let ((p command-line-args)) (while p (and (equal (car p) "-f") From 3b8463590b37fa9c6f90f15d42014cea224e87c1 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 8 Jan 2005 20:45:53 +0000 Subject: [PATCH 139/560] Changed references to .emacs to Calc init file. --- man/calc.texi | 87 +++++++++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 2c09ef8ad6a..172fffa035a 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -12247,16 +12247,18 @@ the @emph{appearance} or @emph{interpretation} of the stack's contents. @cindex Continuous memory @cindex Saving mode settings @cindex Permanent mode settings -@cindex @file{.emacs} file, mode settings -You can save all of the current mode settings in your @file{.emacs} file -with the @kbd{m m} (@code{calc-save-modes}) command. This will cause -Emacs to reestablish these modes each time it starts up. The modes saved -in the file include everything controlled by the @kbd{m} and @kbd{d} -prefix keys, the current precision and binary word size, whether or not -the trail is displayed, the current height of the Calc window, and more. -The current interface (used when you type @kbd{M-# M-#}) is also saved. -If there were already saved mode settings in the file, they are replaced. -Otherwise, the new mode information is appended to the end of the file. +@cindex Calc init file, mode settings +You can save all of the current mode settings in your Calc init file +(the file given by the variable @code{calc-settings-file}, typically +@file{~/.calc.el}) with the @kbd{m m} (@code{calc-save-modes}) command. +This will cause Emacs to reestablish these modes each time it starts up. +The modes saved in the file include everything controlled by the @kbd{m} +and @kbd{d} prefix keys, the current precision and binary word size, +whether or not the trail is displayed, the current height of the Calc +window, and more. The current interface (used when you type @kbd{M-# +M-#}) is also saved. If there were already saved mode settings in the +file, they are replaced. Otherwise, the new mode information is +appended to the end of the file. @kindex m R @pindex calc-mode-record-mode @@ -15872,7 +15874,7 @@ No line breaking (@kbd{d b}). Selections show deep structure (@kbd{j b}; @pxref{Making Selections}). @item Save -Record modes in @file{~/.emacs} (@kbd{m R}; @pxref{General Mode Commands}). +Record modes in @file{~/.calc.el} (@kbd{m R}; @pxref{General Mode Commands}). @item Local Record modes in Embedded buffer (@kbd{m R}). @@ -27759,13 +27761,14 @@ possible to create user-defined temperature units. @kindex u p @pindex calc-permanent-units -@cindex @file{.emacs} file, user-defined units +@cindex Calc init file, user-defined units The @kbd{u p} (@code{calc-permanent-units}) command stores the user-defined -units in your @file{.emacs} file, so that the units will still be -available in subsequent Emacs sessions. If there was already a set of -user-defined units in your @file{.emacs} file, it is replaced by the -new set. (@xref{General Mode Commands}, for a way to tell Calc to use -a different file instead of @file{.emacs}.) +units in your Calc init file (the file given by the variable +@code{calc-settings-file}, typically @file{~/.calc.el}), so that the +units will still be available in subsequent Emacs sessions. If there +was already a set of user-defined units in your Calc init file, it +is replaced by the new set. (@xref{General Mode Commands}, for a way to +tell Calc to use a different file for the Calc init file.) @node Store and Recall, Graphics, Units, Top @chapter Storing and Recalling @@ -28150,14 +28153,15 @@ names rather than prompting for the variable name. @pindex calc-permanent-variable @cindex Storing variables @cindex Permanent variables -@cindex @file{.emacs} file, variables +@cindex Calc init file, variables The @kbd{s p} (@code{calc-permanent-variable}) command saves a -variable's value permanently in your @file{.emacs} file, so that its -value will still be available in future Emacs sessions. You can -re-execute @w{@kbd{s p}} later on to update the saved value, but the -only way to remove a saved variable is to edit your @file{.emacs} file +variable's value permanently in your Calc init file (the file given by +the variable @code{calc-settings-file}, typically @file{~/.calc.el}), so +that its value will still be available in future Emacs sessions. You +can re-execute @w{@kbd{s p}} later on to update the saved value, but the +only way to remove a saved variable is to edit your calc init file by hand. (@xref{General Mode Commands}, for a way to tell Calc to -use a different file instead of @file{.emacs}.) +use a different file for the Calc init file.) If you do not specify the name of a variable to save (i.e., @kbd{s p @key{RET}}), all Calc variables with defined values @@ -28176,7 +28180,7 @@ the values of all Calc variables into a specified buffer. The variables are written with the prefix @code{var-} in the form of Lisp @code{setq} commands which store the values in string form. You can place these commands -in your @file{.emacs} buffer if you wish, though in this case it +in your Calc init file (or @file{.emacs}) if you wish, though in this case it would be easier to use @kbd{s p @key{RET}}. (Note that @kbd{s i} omits the same set of variables as @w{@kbd{s p @key{RET}}}; the difference is that @kbd{s i} will store the variables in any buffer, and it also @@ -28363,7 +28367,7 @@ Software Foundation's machine @samp{prep.ai.mit.edu}.) @vindex calc-gnuplot-name If you have GNUPLOT installed on your system but Calc is unable to find it, you may need to set the @code{calc-gnuplot-name} variable -in your @file{.emacs} file. You may also need to set some Lisp +in your Calc init file or @file{.emacs}. You may also need to set some Lisp variables to show Calc how to run GNUPLOT on your system; these are described under @kbd{g D} and @kbd{g O} below. If you are using the X window system, Calc will configure GNUPLOT for you @@ -30418,7 +30422,8 @@ on it in order to get it to notice the new annotation. Two more mode-recording modes selectable by @kbd{m R} are @code{Save} (which works even outside of Embedded mode), in which mode settings -are recorded permanently in your Emacs startup file @file{~/.emacs} +are recorded permanently in your Calc init file (the file given by the +variable @code{calc-settings-file}, typically @file{~/.calc.el}) rather than by annotating the current document, and no-recording mode (where there is no symbol like @code{Save} or @code{Local} in the mode line), in which mode-changing commands do not leave any @@ -30434,8 +30439,8 @@ for @code{Save} have no effect. You can modify Embedded mode's behavior by setting various Lisp variables described here. Use @kbd{M-x set-variable} or @kbd{M-x edit-options} to adjust a variable on the fly, or -put a suitable @code{setq} statement in your @file{~/.emacs} -file to set a variable permanently. (Another possibility would +put a suitable @code{setq} statement in your Calc init file (or +@file{~/.emacs}) to set a variable permanently. (Another possibility would be to use a file-local variable annotation at the end of the file; @pxref{File Variables, , Local Variables in Files, emacs, the Emacs manual}.) @@ -30673,15 +30678,16 @@ key we defined above. @pindex calc-user-define-permanent @cindex Storing user definitions @cindex Permanent user definitions -@cindex @file{.emacs} file, user-defined commands +@cindex Calc init file, user-defined commands The @kbd{Z P} (@code{calc-user-define-permanent}) command makes a key binding permanent so that it will remain in effect even in future Emacs sessions. (It does this by adding a suitable bit of Lisp code into -your @file{.emacs} file.) For example, @kbd{Z P s} would register -our @code{sincos} command permanently. If you later wish to unregister -this command you must edit your @file{.emacs} file by hand. -(@xref{General Mode Commands}, for a way to tell Calc to use a -different file instead of @file{.emacs}.) +your Calc init file; that is, the file given by the variable +@code{calc-settings-file}, typically @file{~/.calc.el}.) For example, +@kbd{Z P s} would register our @code{sincos} command permanently. If +you later wish to unregister this command you must edit your Calc init +file by hand. (@xref{General Mode Commands}, for a way to tell Calc to +use a different file for the Calc init file.) The @kbd{Z P} command also saves the user definition, if any, for the command bound to the key. After @kbd{Z F} and @kbd{Z C}, a given user @@ -31396,12 +31402,17 @@ step of @code{myfact} could have been written :"n * myfact(n-1)" @end example +A good place to put your @code{defmath} commands is your Calc init file +(the file given by @code{calc-settings-file}, typically +@file{~/.calc.el}), which will not be loaded until Calc starts. If a file named @file{.emacs} exists in your home directory, Emacs reads and executes the Lisp forms in this file as it starts up. While it may -seem like a good idea to put your favorite @code{defmath} commands here, +seem reasonable to put your favorite @code{defmath} commands there, this has the unfortunate side-effect that parts of the Calculator must be loaded in to process the @code{defmath} commands whether or not you will -actually use the Calculator! A better effect can be had by writing +actually use the Calculator! If you want to put the @code{defmath} +commands there (for example, if you redefine @code{calc-settings-file} +to be @file{.emacs}), a better effect can be had by writing @example (put 'calc-define 'thing '(progn @@ -34354,7 +34365,7 @@ text. (In fact it may still have leftover text from a previous @defvar calc-mode-save-hook This hook is called by the @code{calc-save-modes} command, after Calc's own mode features have been inserted into the -@file{.emacs} buffer and just before the ``End of mode settings'' +Calc init file and just before the ``End of mode settings'' message is inserted. @end defvar @@ -35845,7 +35856,7 @@ as Calc variables. Add a @samp{var-} prefix to get the name of the corresponding Lisp variable. The remaining variables are Lisp variables suitable for @code{setq}ing -in your @file{.emacs} file. +in your Calc init file or @file{.emacs} file. @printindex vr From 3aba853a93499baa8ba0afb649713368aed60d5a Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sat, 8 Jan 2005 21:04:11 +0000 Subject: [PATCH 140/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ man/ChangeLog | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8b8d602f5b3..ce59835ecdf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-08 Jay Belanger + + * calc/calc.el (calc-mode): Remove the extension from the + `calc-settings-file' file name when loading it. + 2005-01-08 Kim F. Storm * info.el (Info-mode-map, Info-next-link-keymap) diff --git a/man/ChangeLog b/man/ChangeLog index e0de2c18558..8892f439753 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,7 +1,7 @@ 2005-01-08 Jay Belanger - * calc.texi (General Mode Commands, Installation): Change to - reflect new default value of calc-settings-file. + * calc.texi: Change throughout to reflect new default value of + calc-settings-file. 2005-01-06 Katsumi Yamaoka From 8d3e54757a883634d016a7683367adf59ba2e2a1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 9 Jan 2005 00:30:53 +0000 Subject: [PATCH 141/560] Comment changes. --- lisp/emacs-lisp/autoload.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 196786e9179..0a75a43827e 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -135,7 +135,7 @@ or macro definition or a defcustom)." (defun autoload-trim-file-name (file) - ;; Returns a relative pathname of FILE + ;; Returns a relative file path for FILE ;; starting from the directory that loaddefs.el is in. ;; That is normally a directory in load-path, ;; which means Emacs will be able to find FILE when it looks. @@ -273,7 +273,7 @@ are used." output-end) ;; If the autoload section we create here uses an absolute - ;; pathname for FILE in its header, and then Emacs is installed + ;; file name for FILE in its header, and then Emacs is installed ;; under a different path on another system, ;; `update-autoloads-here' won't be able to find the files to be ;; autoloaded. So, if FILE is in the same directory or a From 8bcc4f6b4945d215cf86b744456682153e183444 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 9 Jan 2005 01:57:30 +0000 Subject: [PATCH 142/560] (Query Replace): Mention faces query-replace and lazy-highlight. (Incremental Search): Update isearch highlighting info. --- man/search.texi | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/man/search.texi b/man/search.texi index 2cc273fd4a4..1e4d9ea53c6 100644 --- a/man/search.texi +++ b/man/search.texi @@ -219,7 +219,8 @@ activating it, and does so only if the mark is not already active. @kbd{M-%} typed in incremental search invokes @code{query-replace} or @code{query-replace-regexp} (depending on search mode) with the -current search string used as the string to replace. +current search string used as the string to replace. @xref{Query +Replace}. @cindex lazy search highlighting @vindex isearch-lazy-highlight @@ -231,11 +232,11 @@ other matches helps indicate which match is the current one. If you don't like this feature, you can turn it off by setting @code{isearch-lazy-highlight} to @code{nil}. -@vindex isearch-lazy-highlight-face @cindex faces for highlighting search matches You can control how this highlighting looks by customizing the faces -@code{isearch} (used for the current match) and -@code{isearch-lazy-highlight-face} (for all the other matches). +@code{isearch} (used for the current match) and @code{lazy-highlight} +(for all the other matches). The latter is also used for other matches +inside @code{query-replace}. @vindex isearch-mode-map To customize the special characters that incremental search understands, @@ -1153,6 +1154,14 @@ word-delimiter characters. @kindex C-M-% @findex query-replace-regexp @kbd{C-M-%} performs regexp search and replace (@code{query-replace-regexp}). +It works like @code{replace-regexp} except that it queries +like @code{query-replace}. + +@cindex faces for highlighting query replace + These commands highlight the current match using the face +@code{query-replace}. They highlight other matches using +@code{lazy-highlight} just like incremental search (@pxref{Incremental +Search}). The characters you can type when you are shown a match for the string or regexp are: From b6c735af3fd1b762b75ceb101b5ff50b4e9a6179 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 9 Jan 2005 01:58:58 +0000 Subject: [PATCH 143/560] (Faces): isearch-lazy-highlight-face renamed to lazy-highlight. --- man/display.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/display.texi b/man/display.texi index 4194e626d72..0e39360d38a 100644 --- a/man/display.texi +++ b/man/display.texi @@ -120,9 +120,9 @@ This face is used for highlighting portions of text, in various modes. For example, mouse-sensitive text is highlighted using this face. @item isearch This face is used for highlighting Isearch matches. -@item isearch-lazy-highlight-face -This face is used for lazy highlighting of Isearch matches other than -the current one. +@item lazy-highlight +This face is used for lazy highlighting of Isearch and Query Replace +matches other than the current one. @item region This face is used for displaying a selected region (when Transient Mark mode is enabled---see below). From 888ca1e7e2d4faf1e21fced06e0a447e0ad3cd95 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 9 Jan 2005 02:05:04 +0000 Subject: [PATCH 144/560] (struct it): New member dpvec_face_id. (merge_into_realized_face): Add prototype. --- src/dispextern.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dispextern.h b/src/dispextern.h index a6f12a04b45..ccb6bc6d0c4 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1847,6 +1847,9 @@ struct it means that no such character is involved. */ int dpvec_char_len; + /* Face id to use for all characters in display vector. -1 if unused. */ + int dpvec_face_id; + /* Face id of the iterator saved in case a glyph from dpvec contains a face. The face is restored when all glyphs from dpvec have been delivered. */ @@ -2757,6 +2760,8 @@ int face_at_buffer_position P_ ((struct window *, int, int, int, int *, int, int)); int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int, int, int *, enum face_id, int)); +int merge_into_realized_face P_ ((struct frame *, Lisp_Object, + int, int)); int compute_char_face P_ ((struct frame *, int, Lisp_Object)); void free_all_realized_faces P_ ((Lisp_Object)); extern Lisp_Object Qforeground_color, Qbackground_color; From fd998c7f54a69da63e3b588c7c8faf2d27d6c83e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 9 Jan 2005 02:05:20 +0000 Subject: [PATCH 145/560] (merge_into_realized_face): New function. Used to merge escape-glyph face or face from display table into current face. --- src/xfaces.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/xfaces.c b/src/xfaces.c index b980467882c..c6dff0bae7f 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -7687,6 +7687,53 @@ face_at_string_position (w, string, pos, bufpos, region_beg, } +/* Merge a face into a realized face. + + F is frame where faces are (to be) realized. + + FACE_NAME is named face to merge, or if nil, + FACE_ID is face_id of realized face to merge. + + BASE_FACE_ID is realized face to merge into. + + Return new face. +*/ + +int +merge_into_realized_face (f, face_name, face_id, base_face_id) + struct frame *f; + Lisp_Object face_name; + int face_id, base_face_id; +{ + Lisp_Object attrs[LFACE_VECTOR_SIZE]; + struct face *base_face; + + base_face = FACE_FROM_ID (f, base_face_id); + if (!base_face) + return base_face_id; + + /* Begin with attributes from the base face. */ + bcopy (base_face->lface, attrs, sizeof attrs); + + if (!NILP (face_name)) + { + if (!merge_named_face (f, face_name, attrs, 0)) + return base_face_id; + } + else + { + struct face *face; + face = FACE_FROM_ID (f, face_id); + if (!face) + return base_face_id; + merge_face_vectors (f, face->lface, attrs, 0); + } + + /* Look up a realized face with the given face attributes, + or realize a new one for ASCII characters. */ + return lookup_face (f, attrs, 0, NULL); +} + /*********************************************************************** Tests From fe1c200654a56b604a061441c572fd065183622d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 9 Jan 2005 02:05:41 +0000 Subject: [PATCH 146/560] (Vshow_nonbreak_escape): New lisp var. (syms_of_xdisp): DEFVAR_LISP it. (escape_glyph_face): Remove var. (redisplay_window): Don't initialize it. (setup_for_ellipsis, get_next_display_element): Set it->dpvec_face_id to -1. (get_next_display_element): Test Vshow_nonbreak_escape. Do not setup escape_glyph_face. Properly merge escape-glyph face or face from display table with current face for escape and control characters. Set it->dpvec_face_id to relevant face id instead of adding it to each element of display vector. (next_element_from_display_vector): If it->dpvec_face_id is set, use that instead of lface_id from glyph itself. --- src/xdisp.c | 193 +++++++++++++++++++++++++++++----------------------- 1 file changed, 108 insertions(+), 85 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index e4c231c3083..be0baecd76b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -318,6 +318,10 @@ extern Lisp_Object Qcursor; Lisp_Object Vshow_trailing_whitespace; +/* Non-nil means escape non-break space and hyphens. */ + +Lisp_Object Vshow_nonbreak_escape; + #ifdef HAVE_WINDOW_SYSTEM extern Lisp_Object Voverflow_newline_into_fringe; @@ -345,7 +349,6 @@ Lisp_Object Qtrailing_whitespace; /* Name and number of the face used to highlight escape glyphs. */ Lisp_Object Qescape_glyph; -int escape_glyph_face; /* The symbol `image' which is the car of the lists used to represent images in Lisp. */ @@ -3265,6 +3268,7 @@ setup_for_ellipsis (it, len) it->dpvec_char_len = len; it->current.dpvec_index = 0; + it->dpvec_face_id = -1; /* Remember the current face id in case glyphs specify faces. IT's face is restored in set_iterator_to_next. */ @@ -4911,6 +4915,7 @@ get_next_display_element (it) it->dpvec = v->contents; it->dpend = v->contents + v->size; it->current.dpvec_index = 0; + it->dpvec_face_id = -1; it->saved_face_id = it->face_id; it->method = next_element_from_display_vector; it->ellipsis_p = 0; @@ -4945,8 +4950,8 @@ get_next_display_element (it) ? ((it->c >= 127 && it->len == 1) || !CHAR_PRINTABLE_P (it->c) - || it->c == 0x8ad - || it->c == 0x8a0) + || (!NILP (Vshow_nonbreak_escape) + && (it->c == 0x8ad || it->c == 0x8a0))) : (it->c >= 127 && (!unibyte_display_via_language_environment || it->c == unibyte_char_to_multibyte (it->c))))) @@ -4958,21 +4963,8 @@ get_next_display_element (it) display. Then, set IT->dpvec to these glyphs. */ GLYPH g; int ctl_len; - int face_id = escape_glyph_face; - - /* Find the face id if `escape-glyph' unless we recently did. */ - if (face_id < 0) - { - Lisp_Object tem = Fget (Qescape_glyph, Qface); - if (INTEGERP (tem)) - face_id = XINT (tem); - else - face_id = 0; - /* If there's overflow, use 0 instead. */ - if (FAST_GLYPH_FACE (FAST_MAKE_GLYPH (0, face_id)) != face_id) - face_id = 0; - escape_glyph_face = face_id; - } + int face_id, lface_id; + GLYPH escape_glyph; if (it->c < 128 && it->ctl_arrow_p) { @@ -4980,57 +4972,84 @@ get_next_display_element (it) if (it->dp && INTEGERP (DISP_CTRL_GLYPH (it->dp)) && GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp)))) - g = XINT (DISP_CTRL_GLYPH (it->dp)); + { + g = XINT (DISP_CTRL_GLYPH (it->dp)); + lface_id = FAST_GLYPH_FACE (g); + if (lface_id) + { + g = FAST_GLYPH_CHAR (g); + /* The function returns -1 if lface_id is invalid. */ + face_id = ascii_face_of_lisp_face (it->f, lface_id); + if (face_id >= 0) + face_id = merge_into_realized_face (it->f, Qnil, + face_id, it->face_id); + } + } else - g = FAST_MAKE_GLYPH ('^', face_id); - XSETINT (it->ctl_chars[0], g); + { + /* Merge the escape-glyph face into the current face. */ + face_id = merge_into_realized_face (it->f, Qescape_glyph, + 0, it->face_id); + g = '^'; + } - g = FAST_MAKE_GLYPH (it->c ^ 0100, face_id); + XSETINT (it->ctl_chars[0], g); + g = it->c ^ 0100; XSETINT (it->ctl_chars[1], g); ctl_len = 2; + goto display_control; } - else if (it->c == 0x8a0 || it->c == 0x8ad) - { - /* Set IT->ctl_chars[0] to the glyph for `\\'. */ - if (it->dp - && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) - && GLYPH_CHAR_VALID_P (XINT (DISP_ESCAPE_GLYPH (it->dp)))) - g = XINT (DISP_ESCAPE_GLYPH (it->dp)); - else - g = FAST_MAKE_GLYPH ('\\', face_id); - XSETINT (it->ctl_chars[0], g); - g = FAST_MAKE_GLYPH (it->c == 0x8ad ? '-' : ' ', face_id); - XSETINT (it->ctl_chars[1], g); - ctl_len = 2; + if (it->dp + && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) + && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) + { + escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); + lface_id = FAST_GLYPH_FACE (escape_glyph); + if (lface_id) + { + escape_glyph = FAST_GLYPH_CHAR (escape_glyph); + /* The function returns -1 if lface_id is invalid. */ + face_id = ascii_face_of_lisp_face (it->f, lface_id); + if (face_id >= 0) + face_id = merge_into_realized_face (it->f, Qnil, + face_id, it->face_id); + } } else { - unsigned char str[MAX_MULTIBYTE_LENGTH]; - int len; - int i; - GLYPH escape_glyph; + /* Merge the escape-glyph face into the current face. */ + face_id = merge_into_realized_face (it->f, Qescape_glyph, + 0, it->face_id); + escape_glyph = '\\'; + } - /* Set IT->ctl_chars[0] to the glyph for `\\'. */ - if (it->dp - && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) - && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) - escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); - else - escape_glyph = FAST_MAKE_GLYPH ('\\', face_id); + if (it->c == 0x8a0 || it->c == 0x8ad) + { + XSETINT (it->ctl_chars[0], escape_glyph); + g = it->c == 0x8ad ? '-' : ' '; + XSETINT (it->ctl_chars[1], g); + ctl_len = 2; + goto display_control; + } - if (SINGLE_BYTE_CHAR_P (it->c)) - str[0] = it->c, len = 1; - else - { - len = CHAR_STRING_NO_SIGNAL (it->c, str); - if (len < 0) - { - /* It's an invalid character, which - shouldn't happen actually, but due to - bugs it may happen. Let's print the char - as is, there's not much meaningful we can - do with it. */ + { + unsigned char str[MAX_MULTIBYTE_LENGTH]; + int len; + int i; + + /* Set IT->ctl_chars[0] to the glyph for `\\'. */ + if (SINGLE_BYTE_CHAR_P (it->c)) + str[0] = it->c, len = 1; + else + { + len = CHAR_STRING_NO_SIGNAL (it->c, str); + if (len < 0) + { + /* It's an invalid character, which shouldn't + happen actually, but due to bugs it may + happen. Let's print the char as is, there's + not much meaningful we can do with it. */ str[0] = it->c; str[1] = it->c >> 8; str[2] = it->c >> 16; @@ -5039,29 +5058,28 @@ get_next_display_element (it) } } - for (i = 0; i < len; i++) - { - XSETINT (it->ctl_chars[i * 4], escape_glyph); - /* Insert three more glyphs into IT->ctl_chars for - the octal display of the character. */ - g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0', - face_id); - XSETINT (it->ctl_chars[i * 4 + 1], g); - g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0', - face_id); - XSETINT (it->ctl_chars[i * 4 + 2], g); - g = FAST_MAKE_GLYPH ((str[i] & 7) + '0', - face_id); - XSETINT (it->ctl_chars[i * 4 + 3], g); - } - ctl_len = len * 4; - } + for (i = 0; i < len; i++) + { + XSETINT (it->ctl_chars[i * 4], escape_glyph); + /* Insert three more glyphs into IT->ctl_chars for + the octal display of the character. */ + g = ((str[i] >> 6) & 7) + '0'; + XSETINT (it->ctl_chars[i * 4 + 1], g); + g = ((str[i] >> 3) & 7) + '0'; + XSETINT (it->ctl_chars[i * 4 + 2], g); + g = (str[i] & 7) + '0'; + XSETINT (it->ctl_chars[i * 4 + 3], g); + } + ctl_len = len * 4; + } + display_control: /* Set up IT->dpvec and return first character from it. */ it->dpvec_char_len = it->len; it->dpvec = it->ctl_chars; it->dpend = it->dpvec + ctl_len; it->current.dpvec_index = 0; + it->dpvec_face_id = face_id; it->saved_face_id = it->face_id; it->method = next_element_from_display_vector; it->ellipsis_p = 0; @@ -5277,7 +5295,6 @@ next_element_from_display_vector (it) if (INTEGERP (*it->dpvec) && GLYPH_CHAR_VALID_P (XFASTINT (*it->dpvec))) { - int lface_id; GLYPH g; g = XFASTINT (it->dpvec[it->current.dpvec_index]); @@ -5287,13 +5304,18 @@ next_element_from_display_vector (it) /* The entry may contain a face id to use. Such a face id is the id of a Lisp face, not a realized face. A face id of zero means no face is specified. */ - lface_id = FAST_GLYPH_FACE (g); - if (lface_id) + if (it->dpvec_face_id >= 0) + it->face_id = it->dpvec_face_id; + else { - /* The function returns -1 if lface_id is invalid. */ - int face_id = ascii_face_of_lisp_face (it->f, lface_id); - if (face_id >= 0) - it->face_id = face_id; + int lface_id = FAST_GLYPH_FACE (g); + if (lface_id) + { + /* The function returns -1 if lface_id is invalid. */ + int face_id = ascii_face_of_lisp_face (it->f, lface_id); + if (face_id >= 0) + it->face_id = face_id; + } } } else @@ -11664,9 +11686,6 @@ redisplay_window (window, just_this_one_p) *w->desired_matrix->method = 0; #endif - /* Force this to be looked up again for each redisp of each window. */ - escape_glyph_face = -1; - specbind (Qinhibit_point_motion_hooks, Qt); reconsider_clip_changes (w, buffer); @@ -22339,6 +22358,10 @@ wide as that tab on the display. */); The face used for trailing whitespace is `trailing-whitespace'. */); Vshow_trailing_whitespace = Qnil; + DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape, + doc: /* *Non-nil means display escape character before non-break space and hyphen. */); + Vshow_trailing_whitespace = Qt; + DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, doc: /* *The pointer shape to show in void text areas. Nil means to show the text pointer. Other options are `arrow', `text', From 8ab2c119c23ef0f81e59d379343c16f70521978f Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 9 Jan 2005 02:12:43 +0000 Subject: [PATCH 147/560] *** empty log message *** --- etc/NEWS | 8 ++++++++ src/ChangeLog | 25 ++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index d3688cf36fd..28584409e11 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -99,7 +99,15 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 +** Control characters and escape glyphs are now shown in the new +escape-glyph face. + +** Non-breaking space and hyphens are now prefixed with an escape +character, unless the new user variable `show-nonbreak-escape' is set +to nil. + ** display-battery has been replaced by display-battery-mode. + ** calculator.el now has radix grouping mode, which is available when `calculator-output-radix' is non-nil. In this mode a separator character is used every few digits, making it easier to see byte diff --git a/src/ChangeLog b/src/ChangeLog index 2326957d4e0..2635af04ee5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,26 @@ +2005-01-09 Kim F. Storm + + * dispextern.h (struct it): New member dpvec_face_id. + (merge_into_realized_face): Add prototype. + + * xfaces.c (merge_into_realized_face): New function. Used to + merge escape-glyph face or face from display table into current face. + + * xdisp.c (Vshow_nonbreak_escape): New lisp var. + (syms_of_xdisp): DEFVAR_LISP it. + (escape_glyph_face): Remove var. + (redisplay_window): Don't initialize it. + (setup_for_ellipsis, get_next_display_element): + Set it->dpvec_face_id to -1. + (get_next_display_element): Test Vshow_nonbreak_escape. + Do not setup escape_glyph_face. + Properly merge escape-glyph face or face from display table with + current face for escape and control characters. Set + it->dpvec_face_id to relevant face id instead of adding it to each + element of display vector. + (next_element_from_display_vector): If it->dpvec_face_id is set, + use that instead of lface_id from glyph itself. + 2005-01-08 Jan Dj,Ad(Brv * xterm.h (struct x_output): New member, toolbar_detached. @@ -21,7 +44,7 @@ warning. * xselect.c (x_get_foreign_selection, x_fill_property_data) - (Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with + (Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with XFLOAT_DATA to get extract number from Lisp object. 2005-01-07 Kim F. Storm From 03e31a1a3e9c2ed558ad6aa6d1d74e751f75f231 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 9 Jan 2005 02:45:24 +0000 Subject: [PATCH 148/560] (customize): Delete :link. --- lisp/ChangeLog | 4 ++++ lisp/cus-edit.el | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce59835ecdf..485aa4ce7e1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-08 Richard M. Stallman + + * cus-edit.el (customize): Delete :link. + 2005-01-08 Jay Belanger * calc/calc.el (calc-mode): Remove the extension from the diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 055772f418a..8a60163181a 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -243,7 +243,6 @@ (defgroup customize '((widgets custom-group)) "Customization of the Customization support." - :link '(custom-manual "(emacs)Easy Customization") :prefix "custom-" :group 'help) From 0ba9bc53bd2a17a1c18bfc862a214c5eb61557a7 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 9 Jan 2005 13:31:53 +0000 Subject: [PATCH 149/560] (desktop-restore-eager): Fix typo in type. --- lisp/ChangeLog | 4 ++++ lisp/desktop.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 485aa4ce7e1..2b7b196c2fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-09 David Kastrup + + * desktop.el (desktop-restore-eager): Fix typo in type. + 2005-01-08 Richard M. Stallman * cus-edit.el (customize): Delete :link. diff --git a/lisp/desktop.el b/lisp/desktop.el index 18bb638c045..77c7a1f076f 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -271,7 +271,7 @@ Possible values are: "Number of buffers to restore immediately. Remaining buffers are restored lazily (when Emacs is idle). If value is t, all buffers are restored immediately." - :type '(choise (const t) integer) + :type '(choice (const t) integer) :group 'desktop :version "21.4") From 6c8e75541ecd56a6e215e219d3bf697872127b9a Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 9 Jan 2005 15:48:20 +0000 Subject: [PATCH 150/560] (defcalcmodevar): New macro. (calc-mode-var-list-restore-default-values, calc-mode-var-list-restore-saved-values): New functions. (calc-mode-var-list): Use defcalcmodevar to define it. (calc-always-load-extensions, calc-line-numbering) (calc-line-breaking, calc-display-just, calc-display-origin) (calc-number-radix, calc-leading-zeros, calc-group-digits) (calc-group-char, calc-point-char, calc-frac-format) (calc-prefer-frac, calc-hms-format, calc-date-format) (calc-float-format, calc-full-float-format, calc-complex-format) (calc-complex-mode, calc-infinite-mode, calc-display-strings) (calc-matrix-just, calc-break-vectors, calc-full-vectors) (calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets) (calc-matrix-brackets, calc-language, calc-language-option) (calc-left-label, calc-right-label, calc-word-size) (calc-previous-modulo, calc-simplify-mode, calc-auto-recompute) (calc-display-raw, calc-internal-prec, calc-angle-mode) (calc-algebraic-mode, calc-incomplete-algebraic-mode) (calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix) (calc-window-height, calc-display-trail, calc-show-selections) (calc-use-selections, calc-assoc-selections, calc-display-working-message) (calc-auto-why, calc-timing, calc-mode-save-mode) (calc-standard-date-formats, calc-autorange-units, calc-was-keypad-mode) (calc-full-mode, calc-user-parse-tables, calc-gnuplot-default-device) (calc-gnuplot-default-output, calc-gnuplot-print-device) (calc-gnuplot-print-output, calc-gnuplot-geometry) (calc-graph-default-resolution, calc-graph-default-resolution-3d) (calc-invocation-macro, calc-show-banner): Use defcalcmodevar to declare them and set their default values. --- lisp/calc/calc.el | 354 +++++++++++++++++++++------------------------- 1 file changed, 159 insertions(+), 195 deletions(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 635cb75520f..eac19b9ca94 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -241,128 +241,100 @@ scientific notation in calc-mode.") (defvar calc-loaded-settings-file nil "t if `calc-settings-file' has been loaded yet.") -(defvar calc-always-load-extensions) -(defvar calc-line-numbering) -(defvar calc-line-breaking) -(defvar calc-display-just) -(defvar calc-display-origin) -(defvar calc-number-radix) -(defvar calc-leading-zeros) -(defvar calc-group-digits) -(defvar calc-group-char) -(defvar calc-point-char) -(defvar calc-frac-format) -(defvar calc-prefer-frac) -(defvar calc-hms-format) -(defvar calc-date-format) -(defvar calc-float-format) -(defvar calc-full-float-format) -(defvar calc-complex-format) -(defvar calc-complex-mode) -(defvar calc-infinite-mode) -(defvar calc-display-strings) -(defvar calc-matrix-just) -(defvar calc-break-vectors) -(defvar calc-full-vectors) -(defvar calc-full-trail-vectors) -(defvar calc-vector-commas) -(defvar calc-vector-brackets) -(defvar calc-matrix-brackets) -(defvar calc-language) -(defvar calc-language-option) -(defvar calc-left-label) -(defvar calc-right-label) -(defvar calc-word-size) -(defvar calc-previous-modulo) -(defvar calc-simplify-mode) -(defvar calc-auto-recompute) -(defvar calc-display-raw) -(defvar calc-internal-prec) -(defvar calc-angle-mode) -(defvar calc-algebraic-mode) -(defvar calc-incomplete-algebraic-mode) -(defvar calc-symbolic-mode) -(defvar calc-matrix-mode) -(defvar calc-shift-prefix) -(defvar calc-window-height) -(defvar calc-display-trail) -(defvar calc-show-selections) -(defvar calc-use-selections) -(defvar calc-assoc-selections) -(defvar calc-display-working-message) -(defvar calc-auto-why) -(defvar calc-timing) -(defvar calc-mode-save-mode) -(defvar calc-standard-date-formats) -(defvar calc-autorange-units) -(defvar calc-was-keypad-mode) -(defvar calc-full-mode) -(defvar calc-user-parse-tables) -(defvar calc-gnuplot-default-device) -(defvar calc-gnuplot-default-output) -(defvar calc-gnuplot-print-device) -(defvar calc-gnuplot-print-output) -(defvar calc-gnuplot-geometry) -(defvar calc-graph-default-resolution) -(defvar calc-graph-default-resolution-3d) -(defvar calc-invocation-macro) -(defvar calc-show-banner) -(defconst calc-mode-var-list '( - (calc-always-load-extensions nil - "If non-nil, load the calc-ext module automatically when calc is loaded.") +(defvar calc-mode-var-list '() + "List of variables used in customizing GNU Calc.") - (calc-line-numbering t - "If non-nil, display line numbers in Calculator stack.") +(defmacro defcalcmodevar (var defval &optional doc) + `(progn + (defvar ,var ,defval ,doc) + (add-to-list 'calc-mode-var-list (list (quote ,var) ,defval)))) - (calc-line-breaking t - "If non-nil, break long values across multiple lines in Calculator stack.") +(defun calc-mode-var-list-restore-default-values () + (mapcar (function (lambda (v) (set (car v) (nth 1 v)))) + calc-mode-var-list)) - (calc-display-just nil - "If nil, stack display is left-justified. +(defun calc-mode-var-list-restore-saved-values () + (let ((newvarlist '())) + (save-excursion + (let (pos) + (set-buffer (find-file-noselect (substitute-in-file-name + calc-settings-file))) + (goto-char (point-min)) + (when (and (search-forward ";;; Mode settings stored by Calc" nil t) + (progn + (forward-line 1) + (setq pos (point)) + (search-forward "\n;;; End of mode settings" nil t))) + (beginning-of-line) + (calc-mode-var-list-restore-default-values) + (eval-region pos (point)) + (let ((varlist calc-mode-var-list)) + (while varlist + (let ((var (car varlist))) + (setq newvarlist + (cons (list (car var) (symbol-value (car var))) + newvarlist))) + (setq varlist (cdr varlist))))))) + (if newvarlist + (mapcar (function (lambda (v) (set (car v) (nth 1 v)))) + newvarlist) + (calc-mode-var-list-restore-default-values)))) + +(defcalcmodevar calc-always-load-extensions nil + "If non-nil, load the calc-ext module automatically when calc is loaded.") + +(defcalcmodevar calc-line-numbering t + "If non-nil, display line numbers in Calculator stack.") + +(defcalcmodevar calc-line-breaking t + "If non-nil, break long values across multiple lines in Calculator stack.") + +(defcalcmodevar calc-display-just nil + "If nil, stack display is left-justified. If `right', stack display is right-justified. If `center', stack display is centered.") - (calc-display-origin nil - "Horizontal origin of displayed stack entries. +(defcalcmodevar calc-display-origin nil + "Horizontal origin of displayed stack entries. In left-justified mode, this is effectively indentation. (Default 0). In right-justified mode, this is effectively window width. In centered mode, center of stack entry is placed here.") - (calc-number-radix 10 - "Radix for entry and display of numbers in calc-mode, 2-36.") +(defcalcmodevar calc-number-radix 10 + "Radix for entry and display of numbers in calc-mode, 2-36.") - (calc-leading-zeros nil - "If non-nil, leading zeros are provided to pad integers to calc-word-size.") +(defcalcmodevar calc-leading-zeros nil + "If non-nil, leading zeros are provided to pad integers to calc-word-size.") - (calc-group-digits nil - "If non-nil, group digits in large displayed integers by inserting spaces. +(defcalcmodevar calc-group-digits nil + "If non-nil, group digits in large displayed integers by inserting spaces. If an integer, group that many digits at a time. If t, use 4 for binary and hex, 3 otherwise.") - (calc-group-char "," - "The character (in the form of a string) to be used for grouping digits. +(defcalcmodevar calc-group-char "," + "The character (in the form of a string) to be used for grouping digits. This is used only when calc-group-digits mode is on.") - (calc-point-char "." - "The character (in the form of a string) to be used as a decimal point.") +(defcalcmodevar calc-point-char "." + "The character (in the form of a string) to be used as a decimal point.") - (calc-frac-format (":" nil) - "Format of displayed fractions; a string of one or two of \":\" or \"/\".") +(defcalcmodevar calc-frac-format '(":" nil) + "Format of displayed fractions; a string of one or two of \":\" or \"/\".") - (calc-prefer-frac nil - "If non-nil, prefer fractional over floating-point results.") +(defcalcmodevar calc-prefer-frac nil + "If non-nil, prefer fractional over floating-point results.") - (calc-hms-format "%s@ %s' %s\"" - "Format of displayed hours-minutes-seconds angles, a format string. +(defcalcmodevar calc-hms-format "%s@ %s' %s\"" + "Format of displayed hours-minutes-seconds angles, a format string. String must contain three %s marks for hours, minutes, seconds respectively.") - (calc-date-format ((H ":" mm C SS pp " ") - Www " " Mmm " " D ", " YYYY) - "Format of displayed date forms.") +(defcalcmodevar calc-date-format '((H ":" mm C SS pp " ") + Www " " Mmm " " D ", " YYYY) + "Format of displayed date forms.") - (calc-float-format (float 0) - "Format to use for display of floating-point numbers in calc-mode. +(defcalcmodevar calc-float-format '(float 0) + "Format to use for display of floating-point numbers in calc-mode. Must be a list of one of the following forms: (float 0) Floating point format, display full precision. (float N) N > 0: Floating point format, at most N significant figures. @@ -375,54 +347,54 @@ Must be a list of one of the following forms: (eng N) N > 0: Engineering notation, N significant figures. (eng -N) -N < 0: Engineering notation, calc-internal-prec - N figs.") - (calc-full-float-format (float 0) - "Format to use when full precision must be displayed.") +(defcalcmodevar calc-full-float-format '(float 0) + "Format to use when full precision must be displayed.") - (calc-complex-format nil - "Format to use for display of complex numbers in calc-mode. Must be one of: +(defcalcmodevar calc-complex-format nil + "Format to use for display of complex numbers in calc-mode. Must be one of: nil Use (x, y) form. i Use x + yi form. j Use x + yj form.") - (calc-complex-mode cplx - "Preferred form, either `cplx' or `polar', for complex numbers.") +(defcalcmodevar calc-complex-mode 'cplx + "Preferred form, either `cplx' or `polar', for complex numbers.") - (calc-infinite-mode nil - "If nil, 1 / 0 is left unsimplified. +(defcalcmodevar calc-infinite-mode nil + "If nil, 1 / 0 is left unsimplified. If 0, 1 / 0 is changed to inf (zeros are considered positive). Otherwise, 1 / 0 is changed to uinf (undirected infinity).") - (calc-display-strings nil - "If non-nil, display vectors of byte-sized integers as strings.") +(defcalcmodevar calc-display-strings nil + "If non-nil, display vectors of byte-sized integers as strings.") - (calc-matrix-just center - "If nil, vector elements are left-justified. +(defcalcmodevar calc-matrix-just 'center + "If nil, vector elements are left-justified. If `right', vector elements are right-justified. If `center', vector elements are centered.") - (calc-break-vectors nil - "If non-nil, display vectors one element per line.") +(defcalcmodevar calc-break-vectors nil + "If non-nil, display vectors one element per line.") - (calc-full-vectors t - "If non-nil, display long vectors in full. If nil, use abbreviated form.") +(defcalcmodevar calc-full-vectors t + "If non-nil, display long vectors in full. If nil, use abbreviated form.") - (calc-full-trail-vectors t - "If non-nil, display long vectors in full in the trail.") +(defcalcmodevar calc-full-trail-vectors t + "If non-nil, display long vectors in full in the trail.") - (calc-vector-commas "," - "If non-nil, separate elements of displayed vectors with this string.") +(defcalcmodevar calc-vector-commas "," + "If non-nil, separate elements of displayed vectors with this string.") - (calc-vector-brackets "[]" - "If non-nil, surround displayed vectors with these characters.") +(defcalcmodevar calc-vector-brackets "[]" + "If non-nil, surround displayed vectors with these characters.") - (calc-matrix-brackets (R O) - "A list of code-letter symbols that control \"big\" matrix display. +(defcalcmodevar calc-matrix-brackets '(R O) + "A list of code-letter symbols that control \"big\" matrix display. If `R' is present, display inner brackets for matrices. If `O' is present, display outer brackets for matrices (above/below). If `C' is present, display outer brackets for matrices (centered).") - (calc-language nil - "Language or format for entry and display of stack values. Must be one of: +(defcalcmodevar calc-language nil + "Language or format for entry and display of stack values. Must be one of: nil Use standard Calc notation. flat Use standard Calc notation, one-line format. big Display formulas in 2-d notation (enter w/std notation). @@ -435,23 +407,23 @@ If `C' is present, display outer brackets for matrices (centered).") math Use Mathematica(tm) notation. maple Use Maple notation.") - (calc-language-option nil - "Numeric prefix argument for the command that set `calc-language'.") +(defcalcmodevar calc-language-option nil + "Numeric prefix argument for the command that set `calc-language'.") - (calc-left-label "" - "Label to display at left of formula.") +(defcalcmodevar calc-left-label "" + "Label to display at left of formula.") - (calc-right-label "" - "Label to display at right of formula.") +(defcalcmodevar calc-right-label "" + "Label to display at right of formula.") - (calc-word-size 32 - "Minimum number of bits per word, if any, for binary operations in calc-mode.") +(defcalcmodevar calc-word-size 32 + "Minimum number of bits per word, if any, for binary operations in calc-mode.") - (calc-previous-modulo nil - "Most recently used value of M in a modulo form.") +(defcalcmodevar calc-previous-modulo nil + "Most recently used value of M in a modulo form.") - (calc-simplify-mode nil - "Type of simplification applied to results. +(defcalcmodevar calc-simplify-mode nil + "Type of simplification applied to results. If `none', results are not simplified when pushed on the stack. If `num', functions are simplified only when args are constant. If nil, only fast simplifications are applied. @@ -460,69 +432,69 @@ If `alg', `math-simplify' is applied. If `ext', `math-simplify-extended' is applied. If `units', `math-simplify-units' is applied.") - (calc-auto-recompute t - "If non-nil, recompute evalto's automatically when necessary.") +(defcalcmodevar calc-auto-recompute t + "If non-nil, recompute evalto's automatically when necessary.") - (calc-display-raw nil - "If non-nil, display shows unformatted Lisp exprs. (For debugging)") +(defcalcmodevar calc-display-raw nil + "If non-nil, display shows unformatted Lisp exprs.(defcalcmodevar For debugging)") - (calc-internal-prec 12 - "Number of digits of internal precision for calc-mode calculations.") +(defcalcmodevar calc-internal-prec 12 + "Number of digits of internal precision for calc-mode calculations.") - (calc-angle-mode deg - "If deg, angles are in degrees; if rad, angles are in radians. +(defcalcmodevar calc-angle-mode 'deg + "If deg, angles are in degrees; if rad, angles are in radians. If hms, angles are in degrees-minutes-seconds.") - (calc-algebraic-mode nil - "If non-nil, numeric entry accepts whole algebraic expressions. +(defcalcmodevar calc-algebraic-mode nil + "If non-nil, numeric entry accepts whole algebraic expressions. If nil, algebraic expressions must be preceded by \"'\".") - (calc-incomplete-algebraic-mode nil - "Like calc-algebraic-mode except only affects ( and [ keys.") +(defcalcmodevar calc-incomplete-algebraic-mode nil + "Like calc-algebraic-mode except only affects ( and [ keys.") - (calc-symbolic-mode nil - "If non-nil, inexact numeric computations like sqrt(2) are postponed. +(defcalcmodevar calc-symbolic-mode nil + "If non-nil, inexact numeric computations like sqrt(2) are postponed. If nil, computations on numbers always yield numbers where possible.") - (calc-matrix-mode nil - "If `matrix', variables are assumed to be matrix-valued. +(defcalcmodevar calc-matrix-mode nil + "If `matrix', variables are assumed to be matrix-valued. If a number, variables are assumed to be NxN matrices. If `scalar', variables are assumed to be scalar-valued. If nil, symbolic math routines make no assumptions about variables.") - (calc-shift-prefix nil - "If non-nil, shifted letter keys are prefix keys rather than normal meanings.") +(defcalcmodevar calc-shift-prefix nil + "If non-nil, shifted letter keys are prefix keys rather than normal meanings.") - (calc-window-height 7 - "Initial height of Calculator window.") +(defcalcmodevar calc-window-height 7 + "Initial height of Calculator window.") - (calc-display-trail t - "If non-nil, M-x calc creates a window to display Calculator trail.") +(defcalcmodevar calc-display-trail t + "If non-nil, M-x calc creates a window to display Calculator trail.") - (calc-show-selections t - "If non-nil, selected sub-formulas are shown by obscuring rest of formula. +(defcalcmodevar calc-show-selections t + "If non-nil, selected sub-formulas are shown by obscuring rest of formula. If nil, selected sub-formulas are highlighted by obscuring the sub-formulas.") - (calc-use-selections t - "If non-nil, commands operate only on selected portions of formulas. +(defcalcmodevar calc-use-selections t + "If non-nil, commands operate only on selected portions of formulas. If nil, selections displayed but ignored.") - (calc-assoc-selections t - "If non-nil, selection hides deep structure of associative formulas.") +(defcalcmodevar calc-assoc-selections t + "If non-nil, selection hides deep structure of associative formulas.") - (calc-display-working-message lots - "If non-nil, display \"Working...\" for potentially slow Calculator commands.") +(defcalcmodevar calc-display-working-message 'lots + "If non-nil, display \"Working...\" for potentially slow Calculator commands.") - (calc-auto-why maybe - "If non-nil, automatically execute a \"why\" command to explain odd results.") +(defcalcmodevar calc-auto-why 'maybe + "If non-nil, automatically execute a \"why\" command to explain odd results.") - (calc-timing nil - "If non-nil, display timing information on each slow command.") +(defcalcmodevar calc-timing nil + "If non-nil, display timing information on each slow command.") - (calc-mode-save-mode local) +(defcalcmodevar calc-mode-save-mode 'local) - (calc-standard-date-formats - ("N" +(defcalcmodevar calc-standard-date-formats + '("N" "Www Mmm D, YYYY" "D Mmm YYYY<, h:mm:SS>" "Www Mmm BD< hh:mm:ss> YYYY" @@ -533,40 +505,32 @@ If nil, selections displayed but ignored.") "j<, h:mm:SS>" "YYddd< hh:mm:ss>")) - (calc-autorange-units nil) +(defcalcmodevar calc-autorange-units nil) - (calc-was-keypad-mode nil) +(defcalcmodevar calc-was-keypad-mode nil) - (calc-full-mode nil) +(defcalcmodevar calc-full-mode nil) - (calc-user-parse-tables nil) +(defcalcmodevar calc-user-parse-tables nil) - (calc-gnuplot-default-device "default") +(defcalcmodevar calc-gnuplot-default-device "default") - (calc-gnuplot-default-output "STDOUT") +(defcalcmodevar calc-gnuplot-default-output "STDOUT") - (calc-gnuplot-print-device "postscript") +(defcalcmodevar calc-gnuplot-print-device "postscript") - (calc-gnuplot-print-output "auto") +(defcalcmodevar calc-gnuplot-print-output "auto") - (calc-gnuplot-geometry nil) +(defcalcmodevar calc-gnuplot-geometry nil) - (calc-graph-default-resolution 15) +(defcalcmodevar calc-graph-default-resolution 15) - (calc-graph-default-resolution-3d 5) +(defcalcmodevar calc-graph-default-resolution-3d 5) - (calc-invocation-macro nil) +(defcalcmodevar calc-invocation-macro nil) - (calc-show-banner t - "*If non-nil, show a friendly greeting above the stack.")) - "List of variables (and default values) used in customizing GNU Calc.") - -(mapcar (function (lambda (v) - (or (boundp (car v)) - (set (car v) (nth 1 v))) - (if (nth 2 v) - (put (car v) 'variable-documentation (nth 2 v))))) - calc-mode-var-list) +(defcalcmodevar calc-show-banner t + "*If non-nil, show a friendly greeting above the stack.") (defconst calc-local-var-list '(calc-stack calc-stack-top From 9ab8041d24fe2d1144ccbad3c1644b7f0e7b3576 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 9 Jan 2005 15:55:08 +0000 Subject: [PATCH 151/560] (calc-reset): Restore saved values of variables instead of default values (restore default values with a 0 argument). --- lisp/calc/calc-ext.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 89588b4ea74..80e801ab2b7 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1240,20 +1240,22 @@ calc-kill calc-kill-region calc-yank)))) (defun calc-reset (arg) (interactive "P") + (setq arg (if arg (prefix-numeric-value arg) nil)) (save-excursion (or (eq major-mode 'calc-mode) (calc-create-buffer)) (if calc-embedded-info (calc-embedded nil)) - (or arg - (setq calc-stack nil)) + (unless (and arg (> (abs arg) 0)) + (setq calc-stack nil)) (setq calc-undo-list nil calc-redo-list nil) (let (calc-stack calc-user-parse-tables calc-standard-date-formats calc-invocation-macro) (mapcar (function (lambda (v) (set v nil))) calc-local-var-list) - (mapcar (function (lambda (v) (set (car v) (nth 1 v)))) - calc-mode-var-list)) + (if (and arg (<= arg 0)) + (calc-mode-var-list-restore-default-values) + (calc-mode-var-list-restore-saved-values))) (calc-set-language nil nil t) (calc-mode) (calc-flush-caches t) From d7347600d1a88ed1fa453a95fc7da175c011930b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 9 Jan 2005 15:56:21 +0000 Subject: [PATCH 152/560] (Basic Commands): Describe new behavior of calc-reset. --- man/calc.texi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 172fffa035a..84934dfedda 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -9981,11 +9981,16 @@ height of the Calc window. @kindex M-# 0 @pindex calc-reset The @kbd{M-# 0} command (@code{calc-reset}; that's @kbd{M-#} followed -by a zero) resets the Calculator to its default state. This clears -the stack, resets all the modes, clears the caches (@pxref{Caches}), -and so on. (It does @emph{not} erase the values of any variables.) -With a numeric prefix argument, @kbd{M-# 0} preserves the contents -of the stack but resets everything else. +by a zero) resets the Calculator to its initial state. This clears +the stack, resets all the modes to their initial values (the values +that were saved with @kbd{m m} (@code{calc-save-modes})), clears the +caches (@pxref{Caches}), and so on. (It does @emph{not} erase the +values of any variables.) With an argument of 0, Calc will be reset to +its default state; namely, the modes will be given their default values. +With a positive prefix argument, @kbd{M-# 0} preserves the contents of +the stack but resets everything else to its initial state; with a +negative prefix argument, @kbd{M-# 0} preserves the contents of the +stack but resets everything else to its default state. @pindex calc-version The @kbd{M-x calc-version} command displays the current version number From 809c26be25e03f577f8cb7d52849d2eb91ac143e Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 9 Jan 2005 16:24:30 +0000 Subject: [PATCH 153/560] *** empty log message *** --- lisp/ChangeLog | 37 +++++++++++++++++++++++++++++++++++++ man/ChangeLog | 4 ++++ 2 files changed, 41 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2b7b196c2fa..f39e967f557 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,40 @@ +2005-01-09 Jay Belanger + + * calc/calc.el (defcalcmodevar): New macro. + (calc-mode-var-list-restore-default-values) + (calc-mode-var-list-restore-saved-values): New functions. + (calc-mode-var-list): Use defcalcmodevar to define it. + (calc-always-load-extensions, calc-line-numbering) + (calc-line-breaking, calc-display-just, calc-display-origin) + (calc-number-radix, calc-leading-zeros, calc-group-digits) + (calc-group-char, calc-point-char, calc-frac-format) + (calc-prefer-frac, calc-hms-format, calc-date-format) + (calc-float-format, calc-full-float-format, calc-complex-format) + (calc-complex-mode, calc-infinite-mode, calc-display-strings) + (calc-matrix-just, calc-break-vectors, calc-full-vectors) + (calc-full-trail-vectors, calc-vector-commas, calc-vector-brackets) + (calc-matrix-brackets, calc-language, calc-language-option) + (calc-left-label, calc-right-label, calc-word-size) + (calc-previous-modulo, calc-simplify-mode, calc-auto-recompute) + (calc-display-raw, calc-internal-prec, calc-angle-mode) + (calc-algebraic-mode, calc-incomplete-algebraic-mode) + (calc-symbolic-mode, calc-matrix-mode, calc-shift-prefix) + (calc-window-height, calc-display-trail, calc-show-selections) + (calc-use-selections, calc-assoc-selections) + (calc-display-working-message, calc-auto-why, calc-timing) + (calc-mode-save-mode, calc-standard-date-formats, calc-autorange-units) + (calc-was-keypad-mode, calc-full-mode, calc-user-parse-tables) + (calc-gnuplot-default-device, calc-gnuplot-default-output) + (calc-gnuplot-print-device, calc-gnuplot-print-output) + (calc-gnuplot-geometry, calc-graph-default-resolution) + (calc-graph-default-resolution-3d, calc-invocation-macro) + (calc-show-banner): Use defcalcmodevar to declare them and set + their default values. + + * calc/calc-ext.el (calc-reset): Restore saved values of variables + instead of default values (but restore default values if there is + an argument of 0). + 2005-01-09 David Kastrup * desktop.el (desktop-restore-eager): Fix typo in type. diff --git a/man/ChangeLog b/man/ChangeLog index 8892f439753..20449bc45ef 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-09 Jay Belanger + + * calc.texi (Basic Commands): Describe new behavior of calc-reset. + 2005-01-08 Jay Belanger * calc.texi: Change throughout to reflect new default value of From f6d3493798e8c2c22662753c58a3df7d2fe46c3e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 9 Jan 2005 18:03:01 +0000 Subject: [PATCH 154/560] Fix last change -- initialize Vshow_nonbreak_escape instead of Vshow_trailing_whitespace. --- src/xdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index be0baecd76b..9bf37e21776 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -22360,7 +22360,7 @@ The face used for trailing whitespace is `trailing-whitespace'. */); DEFVAR_LISP ("show-nonbreak-escape", &Vshow_nonbreak_escape, doc: /* *Non-nil means display escape character before non-break space and hyphen. */); - Vshow_trailing_whitespace = Qt; + Vshow_nonbreak_escape = Qt; DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, doc: /* *The pointer shape to show in void text areas. From f1d1d46a52739c06b484d13964e6ae9521492281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 9 Jan 2005 21:27:28 +0000 Subject: [PATCH 155/560] (vc-allow-async-revert): New user option. (vc-disable-async-diff): New internal variable. (vc-revert-buffer): Use them to disable asynchronous diff. --- lisp/vc.el | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/lisp/vc.el b/lisp/vc.el index 64de0351922..4a26b88c0e3 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -152,7 +152,7 @@ ;; have such a brief-comparison feature, the default implementation of ;; this function can be used, which delegates to a full ;; vc-BACKEND-diff. (Note that vc-BACKEND-diff must not run -;; asynchronously in this case.) +;; asynchronously in this case, see variable `vc-disable-async-diff'.) ;; ;; - mode-line-string (file) ;; @@ -566,6 +566,15 @@ specific to any particular backend." :group 'vc :version "21.1") +(defcustom vc-allow-async-revert nil + "*Specifies whether the diff during \\[vc-revert-buffer] may be asynchronous. +Enabling this option means that you can confirm a revert operation even +if the local changes in the file have not been found and displayed yet." + :type '(choice (const :tag "No" nil) + (const :tag "Yes" t)) + :group 'vc + :version "21.4") + ;;;###autoload (defcustom vc-checkout-hook nil "*Normal hook (list of functions) run after checking out a file. @@ -714,6 +723,11 @@ The keys are \(BUFFER . BACKEND\). See also `vc-annotate-get-backend'.") (defvar vc-parent-buffer-name nil) (put 'vc-parent-buffer-name 'permanent-local t) +(defvar vc-disable-async-diff nil + "VC sets this to t locally to disable some async diff operations. +Backends that offer asynchronous diffs should respect this variable +in their implementation of vc-BACKEND-diff.") + (defvar vc-log-file) (defvar vc-log-version) @@ -2435,11 +2449,13 @@ changes found in the master file; use \\[universal-argument] \\[vc-next-action] (unless (yes-or-no-p "File seems up-to-date. Revert anyway? ") (error "Revert canceled"))) (unless (vc-workfile-unchanged-p file) + (message "Finding changes...") ;; vc-diff selects the new window, which is not what we want: ;; if the new window is on another frame, that'd require the user ;; moving her mouse to answer the yes-or-no-p question. - (let ((win (save-selected-window - (setq status (vc-diff nil t)) (selected-window)))) + (let* ((vc-disable-async-diff (not vc-allow-async-revert)) + (win (save-selected-window + (setq status (vc-diff nil t)) (selected-window)))) (vc-exec-after `(message nil)) (when status (unwind-protect From 92bafc3058d62344610c2584f1f83edab56d4f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 9 Jan 2005 21:28:53 +0000 Subject: [PATCH 156/560] (vc-cvs-diff): Don't diff asynchronously if vc-disable-async-diff is t. --- lisp/vc-cvs.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 22346cab68c..2bca3fb90b1 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el @@ -548,7 +548,9 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (append (vc-switches nil 'diff) '("/dev/null"))) ;; Even if it's empty, it's locally modified. 1) - (let* ((async (and (vc-stay-local-p file) (fboundp 'start-process))) + (let* ((async (and (not vc-disable-async-diff) + (vc-stay-local-p file) + (fboundp 'start-process))) (status (apply 'vc-cvs-command (or buffer "*vc-diff*") (if async 'async 1) file "diff" From 160a154482df404ae37d64abfcc3d81b5bce23f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 9 Jan 2005 21:29:27 +0000 Subject: [PATCH 157/560] (vc-arch-diff): Don't diff asynchronously if vc-disable-async-diff is t. --- lisp/vc-arch.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el index 40ec2fb3884..b821928c539 100644 --- a/lisp/vc-arch.el +++ b/lisp/vc-arch.el @@ -377,7 +377,7 @@ Return non-nil if FILE is unchanged." (setq newvers nil)) (if newvers (error "Diffing specific revisions not implemented.") - (let* ((async (fboundp 'start-process)) + (let* ((async (and (not vc-disable-async-diff) (fboundp 'start-process))) ;; Run the command from the root dir. (default-directory (vc-arch-root file)) (status From fb7454e809b19673030c2fc9640e6f0b768737f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 9 Jan 2005 21:29:54 +0000 Subject: [PATCH 158/560] (vc-mcvs-diff): Don't diff asynchronously if vc-disable-async-diff is t. --- lisp/vc-mcvs.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc-mcvs.el b/lisp/vc-mcvs.el index ea577489239..aca8bcd66f0 100644 --- a/lisp/vc-mcvs.el +++ b/lisp/vc-mcvs.el @@ -446,7 +446,9 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (append (vc-switches nil 'diff) '("/dev/null"))) ;; Even if it's empty, it's locally modified. 1) - (let* ((async (and (vc-stay-local-p file) (fboundp 'start-process))) + (let* ((async (and (not vc-disable-async-diff) + (vc-stay-local-p file) + (fboundp 'start-process))) ;; Run the command from the root dir so that `mcvs filt' returns ;; valid relative names. (default-directory (vc-mcvs-root file)) From 2d4e93b91e2a7c7d71124d466dea7fe40572ff9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 9 Jan 2005 21:30:56 +0000 Subject: [PATCH 159/560] (vc-svn-diff): Don't diff asynchronously if vc-disable-async-diff is t. --- lisp/vc-svn.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 553024f636d..f783066b39b 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -372,7 +372,8 @@ The changes are between FIRST-VERSION and SECOND-VERSION." (if vc-svn-diff-switches (vc-switches 'SVN 'diff) (list "-x" (mapconcat 'identity (vc-switches nil 'diff) " ")))) - (async (and (vc-stay-local-p file) + (async (and (not vc-disable-async-diff) + (vc-stay-local-p file) (or oldvers newvers) ; Svn diffs those locally. (fboundp 'start-process)))) (apply 'vc-svn-command buffer From 5fbf7903eefda5964a96b5f328e5dd6934f5e740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Spiegel?= Date: Sun, 9 Jan 2005 21:33:58 +0000 Subject: [PATCH 160/560] # --- lisp/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f39e967f557..5c10e40e37a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2005-01-09 Andre Spiegel + + * vc.el (vc-allow-async-revert): New user option. + (vc-disable-async-diff): New internal variable. + (vc-revert-buffer): Use them to disable asynchronous diff. + + * vc-cvs.el, vc-arch.el, vc-svn.el, vc-mcvs.el (vc-cvs-diff, + vc-arch-diff, vc-svn-diff, vc-mcvs-diff): Don't diff + asynchronously if vc-disable-async-diff is t. + 2005-01-09 Jay Belanger * calc/calc.el (defcalcmodevar): New macro. From 1481127614cecb8cc7ce80acb9db6200c5a42dc7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 9 Jan 2005 22:13:11 +0000 Subject: [PATCH 161/560] Minor touch up. --- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 9bf37e21776..77f12166088 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1,6 +1,6 @@ /* Display generation from window structure and buffer text. - Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. From f1ed747e1074335bbc39cc58680e67c3d4b27824 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 10 Jan 2005 04:07:04 +0000 Subject: [PATCH 162/560] (calc-mode-var-list-restore-saved-values): Make sure settings file exists before accessing it. --- lisp/calc/calc.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index eac19b9ca94..a578a8666b8 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -257,15 +257,17 @@ scientific notation in calc-mode.") (defun calc-mode-var-list-restore-saved-values () (let ((newvarlist '())) (save-excursion - (let (pos) - (set-buffer (find-file-noselect (substitute-in-file-name - calc-settings-file))) - (goto-char (point-min)) - (when (and (search-forward ";;; Mode settings stored by Calc" nil t) - (progn - (forward-line 1) - (setq pos (point)) - (search-forward "\n;;; End of mode settings" nil t))) + (let (pos + (file (substitute-in-file-name calc-settings-file))) + (when (and + (file-regular-p file) + (set-buffer (find-file-noselect file)) + (goto-char (point-min)) + (search-forward ";;; Mode settings stored by Calc" nil t) + (progn + (forward-line 1) + (setq pos (point)) + (search-forward "\n;;; End of mode settings" nil t))) (beginning-of-line) (calc-mode-var-list-restore-default-values) (eval-region pos (point)) From 3579f0c2bcdbae7273b59d8fff0228816db732c2 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 10 Jan 2005 04:27:09 +0000 Subject: [PATCH 163/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c10e40e37a..df1affc2c0e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-09 Jay Belanger + + * calc/calc.el (calc-mode-var-list-restore-saved-values): + Make sure settings file exists before accessing it. + 2005-01-09 Andre Spiegel * vc.el (vc-allow-async-revert): New user option. From 7f72c3db5a74a0bcfed1ed19c00ef014bb9612e8 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 10 Jan 2005 05:01:27 +0000 Subject: [PATCH 164/560] (calc-embedded-subst): Replace math-multi-subst-rec, which is only supposed to be called by math-multi-subst, by math-multi-subst. --- lisp/ChangeLog | 4 ++++ lisp/calc/calc-embed.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df1affc2c0e..e5e5cc56f8a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,10 @@ * calc/calc.el (calc-mode-var-list-restore-saved-values): Make sure settings file exists before accessing it. + * calc/calc-embed.el (calc-embedded-subst): + Replace math-multi-subst-rec, which is only supposed to be called + by math-multi-subst, by math-multi-subst. + 2005-01-09 Andre Spiegel * vc.el (vc-allow-async-revert): New user option. diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index cdab562dc21..db1acfcb145 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -885,7 +885,7 @@ The command \\[yank] can retrieve it from there." (list 'calcFunc-assign (nth 1 x) (calc-embedded-subst (nth 2 x))) - (calc-normalize (math-evaluate-expr-rec (math-multi-subst-rec x)))))) + (calc-normalize (math-evaluate-expr-rec (math-multi-subst x nil nil)))))) (defun calc-embedded-eval-get-var (var base) (let ((entry base) From e4edc5cd31cad3720c03f59e145dc9c5d66c4d57 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Mon, 10 Jan 2005 11:56:07 +0000 Subject: [PATCH 165/560] (Electric-buffer-menu-mode): Preserve value of buffer-local var header-line-format. --- lisp/ChangeLog | 5 +++++ lisp/ebuff-menu.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5e5cc56f8a..17a16d0cfb9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-10 Thien-Thi Nguyen + + * ebuff-menu.el (Electric-buffer-menu-mode): + Preserve value of buffer-local var header-line-format. + 2005-01-09 Jay Belanger * calc/calc.el (calc-mode-var-list-restore-saved-values): diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 2bfbace4c4b..bfac2afe6e9 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -149,7 +149,9 @@ Letters do not insert themselves; instead, they are commands. Entry to this mode via command `electric-buffer-list' calls the value of `electric-buffer-menu-mode-hook'." - (kill-all-local-variables) + (let ((saved header-line-format)) + (kill-all-local-variables) + (setq header-line-format saved)) (use-local-map electric-buffer-menu-mode-map) (setq mode-name "Electric Buffer Menu") (setq mode-line-buffer-identification "Electric Buffer List") From 57a230b140ee7ddb0fb36730c968a75a4c0576cc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 10 Jan 2005 13:29:50 +0000 Subject: [PATCH 166/560] *** empty log message *** --- src/ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2635af04ee5..21208459b47 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2005-01-10 Kim F. Storm + + * dispextern.h (merge_faces): Rename from merge_into_realized_face. + + * xfaces.c (merge_faces): Rename from merge_into_realized_face. + Callers changed. + Add support to merge with lisp face id too (if face_name is t). + + * xdisp.c (get_next_display_element, next_element_from_display_vector): + Don't lookup lface_id from display table glyphs here; instead use + merge_faces to merge the lisp face id into current face. + 2005-01-09 Kim F. Storm * dispextern.h (struct it): New member dpvec_face_id. From a2858aae1cac104ee18fe557089a03c2a0003337 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 10 Jan 2005 13:30:46 +0000 Subject: [PATCH 167/560] (merge_faces): Rename from merge_into_realized_face. --- src/dispextern.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index ccb6bc6d0c4..53ae50f3c2a 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2760,8 +2760,7 @@ int face_at_buffer_position P_ ((struct window *, int, int, int, int *, int, int)); int face_at_string_position P_ ((struct window *, Lisp_Object, int, int, int, int, int *, enum face_id, int)); -int merge_into_realized_face P_ ((struct frame *, Lisp_Object, - int, int)); +int merge_faces P_ ((struct frame *, Lisp_Object, int, int)); int compute_char_face P_ ((struct frame *, int, Lisp_Object)); void free_all_realized_faces P_ ((Lisp_Object)); extern Lisp_Object Qforeground_color, Qbackground_color; From 539f1217675895e849df3cee5c95a9ea4e36071e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 10 Jan 2005 13:34:53 +0000 Subject: [PATCH 168/560] (get_next_display_element, next_element_from_display_vector): Don't lookup lface_id from display table glyphs here; instead use merge_faces to merge the lisp face id into current face. --- src/xdisp.c | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 77f12166088..600e01a13e1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4978,18 +4978,15 @@ get_next_display_element (it) if (lface_id) { g = FAST_GLYPH_CHAR (g); - /* The function returns -1 if lface_id is invalid. */ - face_id = ascii_face_of_lisp_face (it->f, lface_id); - if (face_id >= 0) - face_id = merge_into_realized_face (it->f, Qnil, - face_id, it->face_id); + face_id = merge_faces (it->f, Qt, lface_id, + it->face_id); } } else { /* Merge the escape-glyph face into the current face. */ - face_id = merge_into_realized_face (it->f, Qescape_glyph, - 0, it->face_id); + face_id = merge_faces (it->f, Qescape_glyph, 0, + it->face_id); g = '^'; } @@ -5009,18 +5006,15 @@ get_next_display_element (it) if (lface_id) { escape_glyph = FAST_GLYPH_CHAR (escape_glyph); - /* The function returns -1 if lface_id is invalid. */ - face_id = ascii_face_of_lisp_face (it->f, lface_id); - if (face_id >= 0) - face_id = merge_into_realized_face (it->f, Qnil, - face_id, it->face_id); + face_id = merge_faces (it->f, Qt, lface_id, + it->face_id); } } else { /* Merge the escape-glyph face into the current face. */ - face_id = merge_into_realized_face (it->f, Qescape_glyph, - 0, it->face_id); + face_id = merge_faces (it->f, Qescape_glyph, 0, + it->face_id); escape_glyph = '\\'; } @@ -5309,13 +5303,9 @@ next_element_from_display_vector (it) else { int lface_id = FAST_GLYPH_FACE (g); - if (lface_id) - { - /* The function returns -1 if lface_id is invalid. */ - int face_id = ascii_face_of_lisp_face (it->f, lface_id); - if (face_id >= 0) - it->face_id = face_id; - } + if (lface_id > 0) + it->face_id = merge_faces (it->f, Qt, lface_id, + it->saved_face_id); } } else From dc91a0ed800ec66f7bdcdd67e59b8565fd52be45 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 10 Jan 2005 13:35:11 +0000 Subject: [PATCH 169/560] (merge_faces): Rename from merge_into_realized_face. Callers changed. Add support to merge with lisp face id too (if face_name is t). --- src/xfaces.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index c6dff0bae7f..7aa66735db6 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -7691,16 +7691,19 @@ face_at_string_position (w, string, pos, bufpos, region_beg, F is frame where faces are (to be) realized. - FACE_NAME is named face to merge, or if nil, - FACE_ID is face_id of realized face to merge. + FACE_NAME is named face to merge. + + If FACE_NAME is nil, FACE_ID is face_id of realized face to merge. + + If FACE_NAME is t, FACE_ID is lface_id of face to merge. BASE_FACE_ID is realized face to merge into. - Return new face. + Return new face id. */ int -merge_into_realized_face (f, face_name, face_id, base_face_id) +merge_faces (f, face_name, face_id, base_face_id) struct frame *f; Lisp_Object face_name; int face_id, base_face_id; @@ -7712,6 +7715,17 @@ merge_into_realized_face (f, face_name, face_id, base_face_id) if (!base_face) return base_face_id; + if (EQ (face_name, Qt)) + { + if (face_id < 0 || face_id >= lface_id_to_name_size) + return base_face_id; + face_name = lface_id_to_name[face_id]; + face_id = lookup_derived_face (f, face_name, 0, base_face_id); + if (face_id >= 0) + return face_id; + return base_face_id; + } + /* Begin with attributes from the base face. */ bcopy (base_face->lface, attrs, sizeof attrs); @@ -7723,6 +7737,8 @@ merge_into_realized_face (f, face_name, face_id, base_face_id) else { struct face *face; + if (face_id < 0) + return base_face_id; face = FACE_FROM_ID (f, face_id); if (!face) return base_face_id; From 24193b8ddfeffe9a8bfc8f6756e522061ce79dc0 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 10 Jan 2005 16:54:15 +0000 Subject: [PATCH 170/560] (calc-reset): Don't adjust the window height if the window takes up the whole height of the frame. --- lisp/calc/calc-ext.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 80e801ab2b7..2806db82b13 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1263,7 +1263,11 @@ calc-kill calc-kill-region calc-yank)))) (calc-wrapper (let ((win (get-buffer-window (current-buffer)))) (calc-realign 0) - (if win + ;; Adjust the window height if the window is visible, but doesn't + ;; take up the whole height of the frame. + (if (and + win + (< (window-height win) (1- (frame-height)))) (let ((height (- (window-height win) 2))) (set-window-point win (point)) (or (= height calc-window-height) From b748957a3a3fe178769826d3f12ca653fa3f3069 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 10 Jan 2005 17:30:03 +0000 Subject: [PATCH 171/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 17a16d0cfb9..c614d8f8273 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-10 Jay Belanger + + * calc/calc-ext.el (calc-reset): Don't adjust the window height if + the window takes up the whole height of the frame. + 2005-01-10 Thien-Thi Nguyen * ebuff-menu.el (Electric-buffer-menu-mode): From 054af0fd87413d2f9c826df25b571e7334385dad Mon Sep 17 00:00:00 2001 From: Stephen Eglen Date: Mon, 10 Jan 2005 18:30:55 +0000 Subject: [PATCH 172/560] Re-read for factual correctness; some lisp functions had changed, and a few minor additions were made to the text. --- man/programs.texi | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/man/programs.texi b/man/programs.texi index c4efcf67f6c..9852bf88153 100644 --- a/man/programs.texi +++ b/man/programs.texi @@ -365,7 +365,7 @@ This key, if the keyboard has it, is another way to enter @kbd{C-j}. The basic indentation command is @key{TAB}, which gives the current line the correct indentation as determined from the previous lines. The function that @key{TAB} runs depends on the major mode; it is -@code{indent-for-tab-command} +@code{lisp-indent-line} in Lisp mode, @code{c-indent-command} in C mode, etc. These functions understand the syntax and conventions of different languages, but they all do conceptually the same job: @key{TAB} in any programming-language major mode @@ -411,7 +411,7 @@ you have several commands available. @table @kbd @item C-M-q -Reindent all the lines within one parenthetical grouping(@code{indent-sexp}). +Reindent all the lines within one parenthetical grouping(@code{indent-sexp}) . @item C-M-\ Reindent all lines in the region (@code{indent-region}). @item C-u @key{TAB} @@ -426,7 +426,7 @@ lines that start inside comments and strings. @findex indent-sexp You can reindent the contents of a single parenthetical grouping by positioning point before the beginning of it and typing @kbd{C-M-q} -(@code{indent-sexp} in Lisp mode, @code{c-indent-exp} in C mode; also +(@code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode; also bound to other suitable commands in other modes). The indentation of the line where the grouping starts is not changed; therefore it changes only the relative indentation within the grouping, not its @@ -455,6 +455,7 @@ to them. region sideways, like @code{indent-rigidly} does (@pxref{Indentation Commands}). It doesn't alter the indentation of lines that start inside a string, unless the region also starts inside that string. +The prefix arg specifies the number of columns to indent. @node Lisp Indent @subsection Customizing Lisp Indentation @@ -797,8 +798,9 @@ as in @samp{[x)}---a warning message is displayed in the echo area. @vindex blink-matching-paren @vindex blink-matching-paren-distance @vindex blink-matching-delay - Three variables control parenthesis match display. -@code{blink-matching-paren} turns the feature on or off: @code{nil} + Three variables control parenthesis match display: + + @code{blink-matching-paren} turns the feature on or off: @code{nil} disables it, but the default is @code{t} to enable match display. @code{blink-matching-delay} says how many seconds to leave the @@ -1220,8 +1222,9 @@ v} uses the symbol name around or adjacent to point as its default. mode constantly displays in the echo area the argument list for the function being called at point. (In other words, it finds the function call that point is contained in, and displays the argument -list of that function.) Eldoc mode applies in Emacs Lisp and Lisp -Interaction modes only. Use the command @kbd{M-x eldoc-mode} to +list of that function.) If point is over a documented variable, it +shows the variable's docstring. Eldoc mode applies in Emacs Lisp and +Lisp Interaction modes only. Use the command @kbd{M-x eldoc-mode} to enable or disable this feature. @node Hideshow @@ -1735,8 +1738,8 @@ click on @samp{[A]pply these settings} (or go to that buffer and type @findex c-show-syntactic-information @kindex C-c C-s @r{(C mode)} Display the syntactic information about the current source line -(@code{c-show-syntactic-information}). This is the information that -directs how the line is indented. +(@code{c-show-syntactic-information}). This information directs how +the line is indented. @item M-x cwarn-mode @itemx M-x global-cwarn-mode @@ -2063,7 +2066,7 @@ unless you have said in advance to do so. To do this, set the variable @table @kbd @item M-; -Align comment or insert new comment (@code{fortran-comment-indent}). +Align comment or insert new comment (@code{fortran-indent-comment}). @item C-x ; Applies to nonstandard @samp{!} comments only. @@ -2074,7 +2077,7 @@ into real code (@code{fortran-comment-region}). @end table @kbd{M-;} in Fortran mode is redefined as the command -@code{fortran-comment-indent}. Like the usual @kbd{M-;} command, this +@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this recognizes any kind of existing comment and aligns its text appropriately; if there is no existing comment, a comment is inserted and aligned. But inserting and aligning comments are not the same in Fortran mode as in From bac2d9367c096a849b320bb0f104f69c471822aa Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 11 Jan 2005 00:11:30 +0000 Subject: [PATCH 173/560] *** empty log message *** --- lispref/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 0e422423656..eab17527421 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,11 @@ +2005-01-11 Kim F. Storm + + * display.texi (Button Properties, Button Buffer Commands): + Mention mouse-1 binding. + + * text.texi (Text Properties): Add "Enable Mouse-1" to submenu. + (Enabling Mouse-1 to Follow Links): New subsection. + 2005-01-06 Richard M. Stallman * text.texi (Special Properties): Minor change. From 5304c40bc2eaeccefd3a2f14d10ce8ce135bdb13 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 11 Jan 2005 00:11:43 +0000 Subject: [PATCH 174/560] (Button Properties, Button Buffer Commands): Mention mouse-1 binding. --- lispref/display.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lispref/display.texi b/lispref/display.texi index 344b00e7455..e96a6047455 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -4049,8 +4049,9 @@ the usual Emacs @code{highlight} face. @kindex keymap @r{(button property)} The button's keymap, defining bindings active within the button region. By default this is the usual button region keymap, stored -in the variable @code{button-map}, which defines @key{RET} and -@key{mouse-2} to invoke the button. +in the variable @code{button-map}, which defines @key{RET}, +@key{mouse-1} (if @var{mouse-1-click-follows-link} is set), +and @key{mouse-2} to invoke the button. @item type @kindex type @r{(button property)} @@ -4234,7 +4235,8 @@ These are commands and functions for locating and operating on buttons in an Emacs buffer. @code{push-button} is the command that a user uses to actually `push' -a button, and is bound by default in the button itself to @key{RET} +a button, and is bound by default in the button itself to @key{RET}, +to @key{mouse-1} (if @var{mouse-1-click-follows-link} is set), and to @key{mouse-2} using a region-specific keymap. Commands that are useful outside the buttons itself, such as @code{forward-button} and @code{backward-button} are additionally From 9bcb9ab086fb6a5468bcba98299568f30518df82 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 11 Jan 2005 00:12:09 +0000 Subject: [PATCH 175/560] (Text Properties): Add "Enable Mouse-1" to submenu. (Enabling Mouse-1 to Follow Links): New subsection. --- lispref/text.texi | 106 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/lispref/text.texi b/lispref/text.texi index b6e6c9670e0..e74303bb5dc 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -2431,6 +2431,8 @@ along with the characters; this includes such diverse functions as only when text is examined. * Clickable Text:: Using text properties to make regions of text do something when you click on them. +* Enabling Mouse-1 to Follow Links:: + How to make @key{mouse-1} follow a link. * Fields:: The @code{field} property defines fields within the buffer. * Not Intervals:: Why text properties do not use @@ -3388,6 +3390,110 @@ clickable pieces of text. Also, the major mode definition (or the global definition) remains available for the rest of the text in the buffer. +@node Enabling Mouse-1 to Follow Links +@subsection Enabling Mouse-1 to Follow Links +@cindex follow links + + Traditionally, Emacs uses a @key{mouse-1} click to set point and a +@key{mouse-2} click to follow a link, whereas most other applications +use a @key{mouse-1} click for both purposes, depending on whether you +click outside or inside a link. + + Starting with Emacs release 21.4, the user visible behaviour of a +@key{mouse-1} click on a link has been changed to match this +context-sentitive dual behaviour. The user can customize this +behaviour through the variable @code{mouse-1-click-follows-link}. + + However, at the Lisp level, @key{mouse-2} is still used as the +action for the clickable text corresponding to the link, and the +clickable text must be explicitly marked as a link for a @key{mouse-1} +click to follow the link. + + There are several methods that can be used to identify a clickable +text as a link: + +@table @asis +@item follow-link property + + If the clickable text has a non-nil @code{follow-link} text or overlay +property, the value of that property determines what to do. + +@item follow-link event + + If there is a binding for the @code{follow-link} event, either on +the clickable text or in the local keymap, the binding of that event +determines whether the mouse click position is inside a link: + +@table @asis +@item mouse-face + + If the binding is @code{mouse-face}, the mouse click position is +inside a link if there is a non-nil @code{mouse-face} property at +that position. A value of @code{t} is used to determine what to do next. + +For example, here is how @key{mouse-1} are setup in info mode: + +@example +(define-key Info-mode-map [follow-link] 'mouse-face) +@end example + +@item a function + + If the binding is a function, @var{func}, the mouse click position, +@var{pos}, is inside a link if the call @code{(@var{func} @var{pos})} +returns non-@code{nil}. The return value from that call determines +what to do next. + +For example, here is how pcvs enables @key{mouse-1} on file names only: + +@example +(define-key map [follow-link] + (lambda (pos) + (if (eq (get-char-property pos 'face) 'cvs-filename-face) t))) +@end example + +@item anthing else + + If the binding is anything else, the binding determines what to do. +@end table + +@end table + +@noindent +The resulting value determined above is interpreted as follows: + +@table @asis +@item a string + + If the value is a string, the @key{mouse-1} event is translated into +the first character of the string, i.e. the action of the @key{mouse-1} +click is the local or global binding of that character. + +@item a vector + + If the value is is a vector, the @key{mouse-1} event is translated +into the first element of that vector, i.e. the action of the +@key{mouse-1} click is the local or global binding of that event. + +@item anthing else + + For any other non-nil valule, the @key{mouse-1} event is translated +into a @key{mouse-2} event at the same position. +@end table + + To use @key{mouse-1} on a button defined with @code{define-button-type}, +give the button a @code{follow-link} property with a value as +specified above to determine how to follow the link. + + To use @key{mouse-1} on a widget defined with @code{define-widget}, +give the widget a @code{:follow-link} property with a value +as specified above to determine how to follow the link. + +@defun mouse-on-link-p pos +@tindex mouse-on-link-p +Return non-@code{nil} if @var{pos} is on a link in the current buffer. +@end defun + @node Fields @subsection Defining and Using Fields @cindex fields From 980bb32d09c795f419fc7c0b7525def865e3177a Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 11 Jan 2005 05:06:00 +0000 Subject: [PATCH 176/560] (calc-reset): Reset when inside an embedded calculator; only reset when point is inside a calculator. --- lisp/calc/calc-ext.el | 82 +++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 2806db82b13..280c3ca634b 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1241,41 +1241,53 @@ calc-kill calc-kill-region calc-yank)))) (defun calc-reset (arg) (interactive "P") (setq arg (if arg (prefix-numeric-value arg) nil)) - (save-excursion - (or (eq major-mode 'calc-mode) - (calc-create-buffer)) - (if calc-embedded-info - (calc-embedded nil)) - (unless (and arg (> (abs arg) 0)) - (setq calc-stack nil)) - (setq calc-undo-list nil - calc-redo-list nil) - (let (calc-stack calc-user-parse-tables calc-standard-date-formats - calc-invocation-macro) - (mapcar (function (lambda (v) (set v nil))) calc-local-var-list) - (if (and arg (<= arg 0)) - (calc-mode-var-list-restore-default-values) - (calc-mode-var-list-restore-saved-values))) - (calc-set-language nil nil t) - (calc-mode) - (calc-flush-caches t) - (run-hooks 'calc-reset-hook)) - (calc-wrapper - (let ((win (get-buffer-window (current-buffer)))) - (calc-realign 0) - ;; Adjust the window height if the window is visible, but doesn't - ;; take up the whole height of the frame. - (if (and - win - (< (window-height win) (1- (frame-height)))) - (let ((height (- (window-height win) 2))) - (set-window-point win (point)) - (or (= height calc-window-height) - (let ((swin (selected-window))) - (select-window win) - (enlarge-window (- calc-window-height height)) - (select-window swin))))))) - (message "(Calculator reset)")) + (cond + ((and + calc-embedded-info + (equal (aref calc-embedded-info 0) (current-buffer)) + (<= (point) (aref calc-embedded-info 5)) + (>= (point) (aref calc-embedded-info 4))) + (let ((cbuf (aref calc-embedded-info 1)) + (calc-embedded-quiet t)) + (save-window-excursion + (calc-embedded nil) + (set-buffer cbuf) + (calc-reset arg)) + (calc-embedded nil))) + ((eq major-mode 'calc-mode) + (save-excursion + (unless (and arg (> (abs arg) 0)) + (setq calc-stack nil)) + (setq calc-undo-list nil + calc-redo-list nil) + (let (calc-stack calc-user-parse-tables calc-standard-date-formats + calc-invocation-macro) + (mapcar (function (lambda (v) (set v nil))) calc-local-var-list) + (if (and arg (<= arg 0)) + (calc-mode-var-list-restore-default-values) + (calc-mode-var-list-restore-saved-values))) + (calc-set-language nil nil t) + (calc-mode) + (calc-flush-caches t) + (run-hooks 'calc-reset-hook)) + (calc-wrapper + (let ((win (get-buffer-window (current-buffer)))) + (calc-realign 0) + ;; Adjust the window height if the window is visible, but doesn't + ;; take up the whole height of the frame. + (if (and + win + (< (window-height win) (1- (frame-height)))) + (let ((height (- (window-height win) 2))) + (set-window-point win (point)) + (or (= height calc-window-height) + (let ((swin (selected-window))) + (select-window win) + (enlarge-window (- calc-window-height height)) + (select-window swin))))))) + (message "(Calculator reset)")) + (t + (message "(Not inside a Calc buffer)")))) ;; What a pain; scroll-left behaves differently when called non-interactively. (defun calc-scroll-left (n) From 10907497c4a0d1d77b5e7ce2eae39951066e9c8b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 11 Jan 2005 05:24:37 +0000 Subject: [PATCH 177/560] *** empty log message *** --- lisp/ChangeLog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c614d8f8273..80233015b2b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,9 @@ 2005-01-10 Jay Belanger - * calc/calc-ext.el (calc-reset): Don't adjust the window height if - the window takes up the whole height of the frame. + * calc/calc-ext.el (calc-reset): Reset when inside embedded + calculator; only reset when point is inside a calculator. Don't + adjust the window height if the window takes up the whole height + of the frame. 2005-01-10 Thien-Thi Nguyen From 9110611347a2a4b7c166db0bd753b14d891d0fd8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 11 Jan 2005 08:36:26 +0000 Subject: [PATCH 178/560] (Button Properties): Add follow-link keyword. --- lispref/display.texi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lispref/display.texi b/lispref/display.texi index e96a6047455..686c98db6e2 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -4064,6 +4064,10 @@ usually specified using the @code{:type} keyword argument. A string displayed by the Emacs tool-tip help system; by default, @code{"mouse-2, RET: Push this button"}. +@item follow-link +@kindex follow-link @r{(button property)} +The follow-link property, defining how a @key{mouse-1} click behaves +on this button, @xref{Enabling Mouse-1 to Follow Links}. @item button @kindex button @r{(button property)} All buttons have a non-@code{nil} @code{button} property, which may be useful @@ -4755,7 +4759,7 @@ display by sending @var{string} to the terminal. screen) to attract the user's attention. Be conservative about how often you do this; frequent bells can become irritating. Also be careful not to use just beeping when signaling an error is more -appropriate. (@xref{Errors}.) +appropriate. (@pxref{Errors}.) @defun ding &optional do-not-terminate @cindex keyboard macro termination From 93381d62cb42aa22de55bc8513be9a5a71aa1158 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 11 Jan 2005 08:36:58 +0000 Subject: [PATCH 179/560] *** empty log message *** --- lispref/ChangeLog | 2 +- man/ChangeLog | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index eab17527421..03f2d8bef04 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,7 +1,7 @@ 2005-01-11 Kim F. Storm * display.texi (Button Properties, Button Buffer Commands): - Mention mouse-1 binding. + Mention mouse-1 binding. Add follow-link keyword. * text.texi (Text Properties): Add "Enable Mouse-1" to submenu. (Enabling Mouse-1 to Follow Links): New subsection. diff --git a/man/ChangeLog b/man/ChangeLog index 20449bc45ef..c10a26895db 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-11 Kim F. Storm + + * widget.texi (Basic Types): Add :follow-link keyword. + 2005-01-09 Jay Belanger * calc.texi (Basic Commands): Describe new behavior of calc-reset. From d3ceff9134643dbac15099219dcac175e3b0c2b8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 11 Jan 2005 08:37:15 +0000 Subject: [PATCH 180/560] (Basic Types): Add :follow-link keyword. --- man/widget.texi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/man/widget.texi b/man/widget.texi index 7e1d920cc62..497d2ca5a69 100644 --- a/man/widget.texi +++ b/man/widget.texi @@ -10,7 +10,7 @@ @c %**end of header @copying -Copyright @copyright{} 2000, 2002, 2003 Free Software Foundation, Inc. +Copyright @copyright{} 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -593,6 +593,11 @@ is either a string to display, a function of one argument, the widget, which should return a string to display, or a form that evaluates to such a string. +@vindex follow-link@r{ keyword} +@item :follow-link +Specifies how to interpret a @key{mouse-1} click on the widget. +@xref{Enabling Mouse-1 to Follow Links,,, elisp, the Emacs Lisp Reference Manual}. + @vindex indent@r{ keyword} @item :indent An integer indicating the absolute number of spaces to indent children From fbd8dc8a0d448042c362edf2e475a0109548870e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 11 Jan 2005 15:36:57 +0000 Subject: [PATCH 181/560] (mouse-drag-mode-line-1, mouse-drag-vertical-line, mouse-drag-region) (mouse-drag-region-1, mouse-drag-secondary): Ignore select-window events rather than fiddle with mouse-autoselect-window. --- lisp/ChangeLog | 23 +++++++++++++++-------- lisp/mouse.el | 23 +++++++++++------------ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 80233015b2b..2188f13d7ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,15 @@ +2005-01-11 Stefan Monnier + + * mouse.el (mouse-drag-mode-line-1, mouse-drag-vertical-line) + (mouse-drag-region, mouse-drag-region-1, mouse-drag-secondary): + Ignore select-window events rather than fiddle with + mouse-autoselect-window. + 2005-01-10 Jay Belanger * calc/calc-ext.el (calc-reset): Reset when inside embedded - calculator; only reset when point is inside a calculator. Don't - adjust the window height if the window takes up the whole height + calculator; only reset when point is inside a calculator. + Don't adjust the window height if the window takes up the whole height of the frame. 2005-01-10 Thien-Thi Nguyen @@ -25,8 +32,8 @@ (vc-disable-async-diff): New internal variable. (vc-revert-buffer): Use them to disable asynchronous diff. - * vc-cvs.el, vc-arch.el, vc-svn.el, vc-mcvs.el (vc-cvs-diff, - vc-arch-diff, vc-svn-diff, vc-mcvs-diff): Don't diff + * vc-cvs.el, vc-arch.el, vc-svn.el, vc-mcvs.el (vc-cvs-diff) + (vc-arch-diff, vc-svn-diff, vc-mcvs-diff): Don't diff asynchronously if vc-disable-async-diff is t. 2005-01-09 Jay Belanger @@ -112,7 +119,7 @@ 2005-01-06 Richard M. Stallman * emacs-lisp/find-func.el (find-face-definition): - Renamed from find-face. + Rename from find-face. 2005-01-06 Kim F. Storm @@ -128,12 +135,12 @@ 2005-01-06 Juri Linkov - * isearch.el (isearch-lazy-highlight-update): Rename - `isearch-lazy-highlight-interval' to `lazy-highlight-interval'. + * isearch.el (isearch-lazy-highlight-update): + Rename `isearch-lazy-highlight-interval' to `lazy-highlight-interval'. 2005-01-06 Miles Bader - * isearch.el (lazy-highlight): Renamed from `lazy-highlight-face'. + * isearch.el (lazy-highlight): Rename from `lazy-highlight-face'. (isearch-lazy-highlight-face): Use new name. 2005-01-05 Stefan Monnier diff --git a/lisp/mouse.el b/lisp/mouse.el index 63e0f6c9d91..ea6aa90e3c7 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1,6 +1,6 @@ ;;; mouse.el --- window system-independent mouse support -;; Copyright (C) 1993, 94, 95, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1993, 94, 95, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -397,7 +397,6 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." (start-nwindows (count-windows t)) (old-selected-window (selected-window)) (minibuffer (frame-parameter nil 'minibuffer)) - (mouse-autoselect-window nil) should-enlarge-minibuffer event mouse y top bot edges wconfig growth) (track-mouse (progn @@ -435,7 +434,7 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." (cond ((integerp event) (setq done t)) - ((eq (car event) 'switch-frame) + ((memq (car event) '(switch-frame select-window)) nil) ((not (memq (car event) '(mouse-movement scroll-bar-movement))) @@ -582,7 +581,7 @@ resized by dragging their header-line." ;; unknown event. (cond ((integerp event) (setq done t)) - ((eq (car event) 'switch-frame) + ((memq (car event) '(switch-frame select-window)) nil) ((not (memq (car event) '(mouse-movement scroll-bar-movement))) @@ -754,10 +753,9 @@ remains active. Otherwise, it remains until the next input event. If the click is in the echo area, display the `*Messages*' buffer." (interactive "e") - (let ((w (posn-window (event-start start-event))) - (mouse-autoselect-window nil)) - (if (not (or (not (window-minibuffer-p w)) - (minibuffer-window-active-p w))) + (let ((w (posn-window (event-start start-event)))) + (if (and (window-minibuffer-p w) + (not (minibuffer-window-active-p w))) (save-excursion (read-event) (set-buffer "*Messages*") @@ -858,8 +856,8 @@ at the same position." (while (progn (setq event (read-event)) (or (mouse-movement-p event) - (eq (car-safe event) 'switch-frame))) - (if (eq (car-safe event) 'switch-frame) + (memq (car-safe event) '(switch-frame select-window)))) + (if (memq (car-safe event) '(switch-frame select-window)) nil (setq end (event-end event) end-point (posn-point end)) @@ -1153,6 +1151,7 @@ If MODE is 2 then do the same for lines." (move-overlay mouse-drag-overlay (point) (mark t))) (catch 'mouse-show-mark ;; In this loop, execute scroll bar and switch-frame events. + ;; Should we similarly handle `select-window' events? --Stef ;; Also ignore down-events that are undefined. (while (progn (setq event (read-event)) (setq events (append events (list event))) @@ -1476,9 +1475,9 @@ The function returns a non-nil value if it creates a secondary selection." (while (progn (setq event (read-event)) (or (mouse-movement-p event) - (eq (car-safe event) 'switch-frame))) + (memq (car-safe event) '(switch-frame select-window)))) - (if (eq (car-safe event) 'switch-frame) + (if (memq (car-safe event) '(switch-frame select-window)) nil (setq end (event-end event) end-point (posn-point end)) From 4493ea9446d2998913b7655d8122cd267332b224 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 11 Jan 2005 21:55:09 +0000 Subject: [PATCH 182/560] * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm, * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm, * toolbar/fwd_arrow.xpm, toolbar/fwd_arrow.pbm: New icons. --- lisp/toolbar/back_arrow.pbm | Bin 0 -> 185 bytes lisp/toolbar/back_arrow.xpm | 57 +++++++++++++++++++++++++++ lisp/toolbar/fwd_arrow.pbm | Bin 0 -> 185 bytes lisp/toolbar/fwd_arrow.xpm | 70 +++++++++++++++++++++++++++++++++ lisp/toolbar/lc-back_arrow.xpm | 33 ++++++++++++++++ lisp/toolbar/lc-fwd_arrow.xpm | 32 +++++++++++++++ 6 files changed, 192 insertions(+) create mode 100644 lisp/toolbar/back_arrow.pbm create mode 100644 lisp/toolbar/back_arrow.xpm create mode 100644 lisp/toolbar/fwd_arrow.pbm create mode 100644 lisp/toolbar/fwd_arrow.xpm create mode 100644 lisp/toolbar/lc-back_arrow.xpm create mode 100644 lisp/toolbar/lc-fwd_arrow.xpm diff --git a/lisp/toolbar/back_arrow.pbm b/lisp/toolbar/back_arrow.pbm new file mode 100644 index 0000000000000000000000000000000000000000..7f9b8975d2f2b3fe8b064cc120cab88631bd7cea GIT binary patch literal 185 zcmWGA;Zjy`4svx2@ei_6hzL^%OD!tS%+FIW)-yCnR8R;?EwfTEG}1S+)VDNI& c #98AF74", +", c #9BB572", +"< c #9BAA87", +"1 c #9CAF84", +"2 c #A4B690", +"3 c #A8BCA6", +"4 c #ADBDA0", +"5 c #AFC394", +"6 c #BAD09D", +"7 c #B5C3A9", +"8 c #BED2A3", +"9 c #D5E1C6", +"0 c #FFFFFF", +"q c None", +"qqqqqqqqqqqqqqqqqqqqqqqq", +"qqqqqqqqqqqqqqqqqqqqqqqq", +"qqqqqqqqqqqqqqqqqqqqqqqq", +"qqqqqqqqqq qqqqqqqqqqqqq", +"qqqqqqqqq qqqqqqqqqqqqq", +"qqqqqqqq 9 qqqqqqqqqqqqq", +"qqqqqqq 96 qqqqqqqqqq", +"qqqqqq 968664% qqqqqqqqq", +"qqqqq 966666663 qqqqqqqq", +"qqqq <666666666* qqqqqqq", +"qqqqq X@@@@@@;67 qqqqqq", +"qqqqqq .@@@@@@=6$ qqqqqq", +"qqqqqqq .@ X@,2 qqqqqq", +"qqqqqqqq X q +-6 qqqqqq", +"qqqqqqqqq qq @6 qqqqqq", +"qqqqqqqqqq qqq -: qqqqqq", +"qqqqqqqqqqqqqq >o qqqqqq", +"qqqqqqqqqqqqqq 5 qqqqqqq", +"qqqqqqqqqqqqq 1O qqqqqqq", +"qqqqqqqqqqqq &# qqqqqqqq", +"qqqqqqqqqqqqq qqqqqqqqq", +"qqqqqqqqqqqqqqqqqqqqqqqq", +"qqqqqqqqqqqqqqqqqqqqqqqq", +"qqqqqqqqqqqqqqqqqqqqqqqq"}; diff --git a/lisp/toolbar/fwd_arrow.pbm b/lisp/toolbar/fwd_arrow.pbm new file mode 100644 index 0000000000000000000000000000000000000000..e08e6fa35db54576aafe33fabf8d9088ed471d47 GIT binary patch literal 185 zcmYj}y$XU*07gG=KZ8?`@IgbhsP`s>QegBW4Vs8ZqY_3!RH!uj2t87dR+Dr%>p79F zkGY9=>*N@_Jf%#FsxBXQ&JAhhWL&&lN@Xg?bZkze(C0I6&R0r9&HmHmTF^fP(WGV+ z2Hcmorl`7`G%Q`&RJM+eJ}?9Zz_Nwsp{0gV51GJ6tXi>vxIk c #98AF74", +", c #9BB572", +"< c #919889", +"1 c #92998C", +"2 c #939A8D", +"3 c #99A28F", +"4 c #9BAA87", +"5 c #9CAF84", +"6 c #A4B690", +"7 c #A8BCA6", +"8 c #ADBDA0", +"9 c #AFC394", +"0 c #BAD09D", +"q c #B5C3A9", +"w c #BED2A3", +"e c #BFD3A6", +"r c #C2D5AA", +"t c #C5D7AE", +"y c #C8D9B2", +"u c #CDDCBC", +"i c #D1DFBE", +"p c #D2E0BF", +"a c #D3E0C1", +"s c #D4E0C5", +"d c #D5E1C6", +"f c #FFFFFF", +"g c None", +"gggggggggggggggggggggggg", +"gggggggggggggggggggggggg", +"gggggggggggggggggggggggg", +"ggggggggggggg gggggggggg", +"ggggggggggggg ggggggggg", +"ggggggggggggg 2 gggggggg", +"gggggggggg 02 ggggggg", +"ggggggggg &6riw03 gggggg", +"gggggggg 7suat000< ggggg", +"ggggggg *saie000004 gggg", +"gggggg qs;@@@@@@X ggggg", +"gggggg $y=@@@@@@. gggggg", +"gggggg 6,@X @. ggggggg", +"gggggg 0@+ g X gggggggg", +"gggggg 0@ gg ggggggggg", +"gggggg :- ggg gggggggggg", +"gggggg o> gggggggggggggg", +"ggggggg 9 gggggggggggggg", +"ggggggg O5 ggggggggggggg", +"gggggggg #& gggggggggggg", +"ggggggggg ggggggggggggg", +"gggggggggggggggggggggggg", +"gggggggggggggggggggggggg", +"gggggggggggggggggggggggg"}; diff --git a/lisp/toolbar/lc-back_arrow.xpm b/lisp/toolbar/lc-back_arrow.xpm new file mode 100644 index 00000000000..05a797c7a65 --- /dev/null +++ b/lisp/toolbar/lc-back_arrow.xpm @@ -0,0 +1,33 @@ +/* XPM */ +static char *back_arrow_xpm[] = { +"24 24 6 1", +" c #000000", +". c #000100", +"X c #6B6B66", +"o c #87AF85", +"O c #FFFFFF", +"+ c None", +"++++++++++++++++++++++++", +"++++++++++++++++++++++++", +"++++++++++++++++++++++++", +"++++++++++ +++++++++++++", +"+++++++++ .+++++++++++++", +"++++++++ O.+++++++++++++", +"+++++++ Oo . ++++++++++", +"++++++ Ooooooo +++++++++", +"+++++ Ooooooooo ++++++++", +"++++ ooooooooooo.+++++++", +"+++++ oooooooooo..++++++", +"++++++.oooooooooo.++++++", +"+++++++.oo.. oooo.++++++", +"++++++++.o.+ ooo.++++++", +"+++++++++..++..oo.++++++", +"++++++++++.+++.oo.++++++", +"++++++++++++++.oo.++++++", +"++++++++++++++.o.+++++++", +"+++++++++++++.oX.+++++++", +"++++++++++++.oo.++++++++", +"+++++++++++++..+++++++++", +"++++++++++++++++++++++++", +"++++++++++++++++++++++++", +"++++++++++++++++++++++++"}; diff --git a/lisp/toolbar/lc-fwd_arrow.xpm b/lisp/toolbar/lc-fwd_arrow.xpm new file mode 100644 index 00000000000..284b8c9bee7 --- /dev/null +++ b/lisp/toolbar/lc-fwd_arrow.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char *fwd_arrow_xpm[] = { +"24 24 5 1", +" c #000000", +". c #000100", +"X c #87AF85", +"o c #FFFFFF", +"O c None", +"OOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOO OOOOOOOOOO", +"OOOOOOOOOOOOO OOOOOOOOO", +"OOOOOOOOOOOOO X OOOOOOOO", +"OOOOOOOOOO . XX.OOOOOOO", +"OOOOOOOOO oXXXXXX.OOOOOO", +"OOOOOOOO.oXXXXXXXX.OOOOO", +"OOOOOOO.oXXXXXXXXXX.OOOO", +"OOOOOO..XXXXXXXXXX.OOOOO", +"OOOOOO.XXXXXXXXXX.OOOOOO", +"OOOOOO.XXXX. XX.OOOOOOO", +"OOOOOO.XXX..O X OOOOOOOO", +"OOOOOO.XX..OO. OOOOOOOOO", +"OOOOOO.XX.OOO.OOOOOOOOOO", +"OOOOOO.XX.OOOOOOOOOOOOOO", +"OOOOOOO.X.OOOOOOOOOOOOOO", +"OOOOOOO.XX.OOOOOOOOOOOOO", +"OOOOOOOO.XX.OOOOOOOOOOOO", +"OOOOOOOOO..OOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOO", +"OOOOOOOOOOOOOOOOOOOOOOOO"}; From 424b9d3e7da2acf96f39a06e68600fcb82a2a18e Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 11 Jan 2005 21:57:46 +0000 Subject: [PATCH 183/560] (Info-history-forward): New variable. (Info-select-node): Reset Info-history-forward to nil. (Info-last): Turn into defalias. (Info-history-back): Rename from Info-last. Add current node to Info-history-forward. (Info-history-forward): New fun. (Info-mode-map): Replace Info-last by Info-history-back. Bind Info-history-forward to "r". (Info-mode-menu): Replace Info-last by Info-history-back. Fix menu item text. Add menu item for Info-history-forward. (info-tool-bar-map): Replace Info-last by Info-history-back. Replace its icon "undo" by "back_arrow". Add icon "fwd_arrow" for Info-history-forward. (Info-mode): Replace Info-last by Info-history-back in docstring. Add local variable Info-history-forward. (Info-goto-emacs-command-node): Replace Info-last by Info-history-back. --- lisp/ChangeLog | 25 ++++++++++++++++++++++++- lisp/info.el | 51 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 65 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2188f13d7ac..1d8e6518c56 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2005-01-11 Juri Linkov + + * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm, + * toolbar/lc-back_arrow.xpm, toolbar/lc-fwd_arrow.xpm, + * toolbar/fwd_arrow.xpm, toolbar/fwd_arrow.pbm: New icons. + + * info.el (Info-history-forward): New variable. + (Info-select-node): Reset Info-history-forward to nil. + (Info-last): Turn into defalias. + (Info-history-back): Rename from Info-last. + Add current node to Info-history-forward. + (Info-history-forward): New fun. + (Info-mode-map): Replace Info-last by Info-history-back. + Bind Info-history-forward to "r". + (Info-mode-menu): Replace Info-last by Info-history-back. + Fix menu item text. Add menu item for Info-history-forward. + (info-tool-bar-map): Replace Info-last by Info-history-back. + Replace its icon "undo" by "back_arrow". Add icon "fwd_arrow" + for Info-history-forward. + (Info-mode): Replace Info-last by Info-history-back in docstring. + Add local variable Info-history-forward. + (Info-goto-emacs-command-node): Replace Info-last by Info-history-back. + 2005-01-11 Stefan Monnier * mouse.el (mouse-drag-mode-line-1, mouse-drag-vertical-line) @@ -3224,7 +3247,7 @@ * menu-bar.el (menu-bar-files-menu): Make "Open File..." call find-file-existing. Add "New File..." that calls find-file. - * diropen.pbm diropen.xpm: New files. + * diropen.pbm, diropen.xpm: New files. * toolbar/tool-bar.el (tool-bar-setup): Tool bar item dired uses icon diropen. New tool bar item find-file-existing uses icon open. diff --git a/lisp/info.el b/lisp/info.el index 5e8e6ed8340..4fcbdeb6330 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -47,6 +47,10 @@ "Stack of info nodes user has visited. Each element of list is a list (FILENAME NODENAME BUFFERPOS).") +(defvar Info-history-forward nil + "Stack of info nodes user has visited with `Info-history-back' command. +Each element of list is a list (FILENAME NODENAME BUFFERPOS).") + (defvar Info-history-list nil "List of all info nodes user has visited. Each element of list is a list (FILENAME NODENAME).") @@ -1295,7 +1299,8 @@ any double quotes or backslashes must be escaped (\\\",\\\\)." ;; Add a new unique history item to full history list (let ((new-history (list Info-current-file Info-current-node))) (setq Info-history-list - (cons new-history (delete new-history Info-history-list)))) + (cons new-history (delete new-history Info-history-list))) + (setq Info-history-forward nil)) (if (not (eq Info-fontify-maximum-menu-size nil)) (Info-fontify-node)) (Info-display-images-node) @@ -1731,18 +1736,38 @@ If SAME-FILE is non-nil, do not move to a different Info file." (goto-char p) (Info-restore-point Info-history)))) -(defun Info-last () - "Go back to the last node visited." +(defun Info-history-back () + "Go back in the history to the last node visited." (interactive) (or Info-history (error "This is the first Info node you looked at")) - (let (filename nodename opoint) + (let ((history-forward + (cons (list Info-current-file Info-current-node (point)) + Info-history-forward)) + filename nodename opoint) (setq filename (car (car Info-history))) (setq nodename (car (cdr (car Info-history)))) (setq opoint (car (cdr (cdr (car Info-history))))) (setq Info-history (cdr Info-history)) (Info-find-node filename nodename) (setq Info-history (cdr Info-history)) + (setq Info-history-forward history-forward) + (goto-char opoint))) + +(defalias 'Info-last 'Info-history-back) + +(defun Info-history-forward () + "Go forward in the history of visited nodes." + (interactive) + (or Info-history-forward + (error "This is the last Info node you looked at")) + (let ((history-forward (cdr Info-history-forward)) + filename nodename opoint) + (setq filename (car (car Info-history-forward))) + (setq nodename (car (cdr (car Info-history-forward)))) + (setq opoint (car (cdr (cdr (car Info-history-forward))))) + (Info-find-node filename nodename) + (setq Info-history-forward history-forward) (goto-char opoint))) ;;;###autoload @@ -2894,12 +2919,13 @@ if point is in a menu item description, follow that menu item." (define-key Info-mode-map "g" 'Info-goto-node) (define-key Info-mode-map "h" 'Info-help) (define-key Info-mode-map "i" 'Info-index) - (define-key Info-mode-map "l" 'Info-last) + (define-key Info-mode-map "l" 'Info-history-back) (define-key Info-mode-map "L" 'Info-history) (define-key Info-mode-map "m" 'Info-menu) (define-key Info-mode-map "n" 'Info-next) (define-key Info-mode-map "p" 'Info-prev) (define-key Info-mode-map "q" 'Info-exit) + (define-key Info-mode-map "r" 'Info-history-forward) (define-key Info-mode-map "s" 'Info-search) (define-key Info-mode-map "S" 'Info-search-case-sensitively) ;; For consistency with Rmail. @@ -2952,8 +2978,10 @@ if point is in a menu item description, follow that menu item." :help "Search for another occurrence of regular expression"] ["Go to Node..." Info-goto-node :help "Go to a named node"] - ["Last" Info-last :active Info-history - :help "Go to the last node you were at"] + ["Back in history" Info-history-back :active Info-history + :help "Go back in history to the last node you were at"] + ["Forward in history" Info-history-forward :active Info-history-forward + :help "Go forward in history"] ["History" Info-history :active Info-history-list :help "Go to menu of visited nodes"] ["Table of Contents" Info-toc @@ -2981,7 +3009,8 @@ if point is in a menu item description, follow that menu item." (tool-bar-local-item-from-menu 'Info-prev "left_arrow" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-next "right_arrow" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-up "up_arrow" map Info-mode-map) - (tool-bar-local-item-from-menu 'Info-last "undo" map Info-mode-map) + (tool-bar-local-item-from-menu 'Info-history-back "back_arrow" map Info-mode-map) + (tool-bar-local-item-from-menu 'Info-history-forward "fwd_arrow" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-top-node "home" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-index "index" map Info-mode-map) (tool-bar-local-item-from-menu 'Info-goto-node "jump_to" map Info-mode-map) @@ -3101,7 +3130,8 @@ Selecting other nodes: Picking a menu item causes another node to be selected. \\[Info-directory] Go to the Info directory node. \\[Info-follow-reference] Follow a cross reference. Reads name of reference. -\\[Info-last] Move to the last node you were at. +\\[Info-history-back] Move back in history to the last node you were at. +\\[Info-history-forward] Move forward in history to the node you returned from after using \\[Info-history-back]. \\[Info-history] Go to menu of visited nodes. \\[Info-toc] Go to table of contents of the current Info file. \\[Info-top-node] Go to the Top node of this file. @@ -3158,6 +3188,7 @@ Advanced commands: (make-local-variable 'Info-tag-table-buffer) (setq Info-tag-table-buffer nil) (make-local-variable 'Info-history) + (make-local-variable 'Info-history-forward) (make-local-variable 'Info-index-alternatives) (setq header-line-format (if Info-use-header-line @@ -3369,7 +3400,7 @@ COMMAND must be a symbol or string." (message "Found %d other entr%s. Use %s to see %s." (1- num-matches) (if (> num-matches 2) "ies" "y") - (substitute-command-keys "\\[Info-last]") + (substitute-command-keys "\\[Info-history-back]") (if (> num-matches 2) "them" "it"))))) (error "Couldn't find documentation for %s" command)))) From dc25712992115aa778954660544e366b6df35f5b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 11 Jan 2005 21:59:47 +0000 Subject: [PATCH 184/560] Info-history-forward --- etc/NEWS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 28584409e11..921c598f67a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -680,7 +680,7 @@ multiple files, and C-x d passes it to `dired'. ** Info mode: *** A numeric prefix argument of `info' selects an Info buffer -with the number appended to the *info* buffer name. +with the number appended to the *info* buffer name (e.g. "*info*<2>"). *** Regexp isearch (C-M-s and C-M-r) can search through multiple nodes. Failed isearch wraps to the top/final node. @@ -689,6 +689,10 @@ Failed isearch wraps to the top/final node. `Info-search-backward', and `Info-search-next' which repeats the last search without prompting for a new search string. +*** New command `Info-history-forward' (bound to r and new toolbar icon) +moves forward in history to the node you returned from after using +`Info-history-back' (renamed from `Info-last'). + *** New command `Info-history' (bound to L) displays a menu of visited nodes. *** New command `Info-toc' (bound to T) creates a node with table of contents From 6daf3e15717468c2a8e9147869dbb58a2b30af8f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 11 Jan 2005 22:44:53 +0000 Subject: [PATCH 185/560] (Multi-line Indent): Fix previous change. (Fortran Autofill): Simplify description of fortran-auto-fill-mode. --- man/ChangeLog | 14 ++++++++++++++ man/programs.texi | 24 ++++++++++-------------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index c10a26895db..9b9505559ca 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-11 Richard M. Stallman + + * programs.texi (Multi-line Indent): Fix previous change. + (Fortran Autofill): Simplify description of fortran-auto-fill-mode. + 2005-01-11 Kim F. Storm * widget.texi (Basic Types): Add :follow-link keyword. @@ -6,6 +11,15 @@ * calc.texi (Basic Commands): Describe new behavior of calc-reset. +2005-01-08 Richard M. Stallman + + * display.texi (Faces): isearch-lazy-highlight-face renamed to + lazy-highlight. + + * search.texi (Query Replace): Mention faces query-replace + and lazy-highlight. + (Incremental Search): Update isearch highlighting info. + 2005-01-08 Jay Belanger * calc.texi: Change throughout to reflect new default value of diff --git a/man/programs.texi b/man/programs.texi index 9852bf88153..b48a55777a5 100644 --- a/man/programs.texi +++ b/man/programs.texi @@ -317,7 +317,7 @@ buffer. To enable (or disable) Which Function mode, use the command @kbd{M-x which-function-mode}. This command is global; it applies to all buffers, both existing ones and those yet to be created. However, it -takes effect in only certain major modes, those listed in the value of +takes effect only in certain major modes, those listed in the value of @code{which-func-modes}. If the value is @code{t}, then Which Function mode applies to all major modes that know how to support it---in other words, all the major modes that support Imenu. @@ -411,7 +411,7 @@ you have several commands available. @table @kbd @item C-M-q -Reindent all the lines within one parenthetical grouping(@code{indent-sexp}) . +Reindent all the lines within one parenthetical grouping (@code{indent-pp-sexp}). @item C-M-\ Reindent all lines in the region (@code{indent-region}). @item C-u @key{TAB} @@ -423,12 +423,12 @@ lines that start inside comments and strings. @end table @kindex C-M-q -@findex indent-sexp +@findex indent-pp-sexp You can reindent the contents of a single parenthetical grouping by positioning point before the beginning of it and typing @kbd{C-M-q} (@code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode; also bound to other suitable commands in other modes). The indentation of -the line where the grouping starts is not changed; therefore it +the line where the grouping starts is not changed; therefore this changes only the relative indentation within the grouping, not its overall indentation. To correct that as well, type @key{TAB} first. @@ -2167,14 +2167,11 @@ splitting happens when you type @key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran indentation commands. @findex fortran-auto-fill-mode - @kbd{M-x fortran-auto-fill-mode} turns Fortran Auto Fill mode on if it -was off, or off if it was on. This command works the same as @kbd{M-x -auto-fill-mode} does for normal Auto Fill mode (@pxref{Filling}). A -positive numeric argument turns Fortran Auto Fill mode on, and a -negative argument turns it off. You can see when Fortran Auto Fill mode -is in effect by the presence of the word @samp{Fill} in the mode line, -inside the parentheses. Fortran Auto Fill mode is a minor mode, turned -on or off for each buffer individually. @xref{Minor Modes}. + @kbd{M-x fortran-auto-fill-mode} toggles Fortran Auto Fill mode, +which is a variant of normal Auto Fill mode (@pxref{Filling}) designed +for Fortran programs. Fortran Auto Fill mode is a buffer-local minor +mode (@pxref{Minor Modes}). When Fortran Auto Fill mode is in effect, +the word @samp{Fill} appears in the mode line inside the parentheses. @vindex fortran-break-before-delimiters Fortran Auto Fill mode breaks lines at spaces or delimiters when the @@ -2185,8 +2182,7 @@ The line break comes after the delimiter if the variable @code{fortran-break-before-delimiters} is @code{nil}. Otherwise (and by default), the break comes before the delimiter. - By default, Fortran Auto Fill mode is not enabled. If you want this -feature turned on permanently, add a hook function to + To enable this mode permanently, add a hook function to @code{fortran-mode-hook} to execute @code{(fortran-auto-fill-mode 1)}. @xref{Hooks}. From bca92193e42e31279529e2601a23bc7ad5523485 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 11 Jan 2005 23:03:01 +0000 Subject: [PATCH 186/560] (search-highlight, isearch, isearch-lazy-highlight): Bring together isearch highlight related options. (lazy-highlight): Replace group `replace' by `matching'. (lazy-highlight-cleanup, lazy-highlight-initial-delay) (lazy-highlight-interval, lazy-highlight-max-at-a-time) (lazy-highlight): Add aliases to old names isearch-lazy-highlight-... and declare them obsolete. (lazy-highlight-face): Rename from isearch-lazy-highlight-face. (isearch-faces): Remove defgroup. (isearch-overlay, isearch-highlight, isearch-dehighlight): Move isearch highlighting code closer to lazy highlighting code. --- lisp/isearch.el | 129 +++++++++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 62 deletions(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index 3867a6d42d1..6aae4b32533 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -120,11 +120,6 @@ a tab, a carriage return (control-M), a newline, and `]+'." :type 'regexp :group 'isearch) -(defcustom search-highlight t - "*Non-nil means incremental search highlights the current match." - :type 'boolean - :group 'isearch) - (defcustom search-invisible 'open "If t incremental search can match hidden text. nil means don't match invisible text. @@ -155,15 +150,6 @@ command history." :type 'boolean :group 'isearch) -(defcustom isearch-lazy-highlight t - "*Controls the lazy-highlighting during incremental search. -When non-nil, all text in the buffer matching the current search -string is highlighted lazily (see `lazy-highlight-initial-delay' -and `lazy-highlight-interval')." - :type 'boolean - :group 'lazy-highlight - :group 'isearch) - (defvar isearch-mode-hook nil "Function(s) to call after starting up an incremental search.") @@ -208,13 +194,46 @@ Default value, nil, means edit the string instead." :type 'boolean :group 'isearch) +;;; isearch highlight customization. + +(defcustom search-highlight t + "*Non-nil means incremental search highlights the current match." + :type 'boolean + :group 'isearch) + +(defface isearch + '((((class color) (min-colors 88) (background light)) + ;; The background must not be too dark, for that means + ;; the character is hard to see when the cursor is there. + (:background "magenta2" :foreground "lightskyblue1")) + (((class color) (min-colors 88) (background dark)) + (:background "palevioletred2" :foreground "brown4")) + (((class color) (min-colors 16)) + (:background "magenta4" :foreground "cyan1")) + (((class color) (min-colors 8)) + (:background "magenta4" :foreground "cyan1")) + (t (:inverse-video t))) + "Face for highlighting Isearch matches." + :group 'isearch) +(defvar isearch 'isearch) + +(defcustom isearch-lazy-highlight t + "*Controls the lazy-highlighting during incremental search. +When non-nil, all text in the buffer matching the current search +string is highlighted lazily (see `lazy-highlight-initial-delay' +and `lazy-highlight-interval')." + :type 'boolean + :group 'lazy-highlight + :group 'isearch) + ;;; Lazy highlight customization. + (defgroup lazy-highlight nil "Lazy highlighting feature for matching strings." :prefix "lazy-highlight-" :version "21.1" :group 'isearch - :group 'replace) + :group 'matching) (defcustom lazy-highlight-cleanup t "*Controls whether to remove extra highlighting after a search. @@ -222,16 +241,22 @@ If this is nil, extra highlighting can be \"manually\" removed with \\[isearch-lazy-highlight-cleanup]." :type 'boolean :group 'lazy-highlight) +(defvaralias 'isearch-lazy-highlight-cleanup 'lazy-highlight-cleanup) +(make-obsolete-variable 'isearch-lazy-highlight-cleanup 'lazy-highlight-cleanup) (defcustom lazy-highlight-initial-delay 0.25 "*Seconds to wait before beginning to lazily highlight all matches." :type 'number :group 'lazy-highlight) +(defvaralias 'isearch-lazy-highlight-initial-delay 'lazy-highlight-initial-delay) +(make-obsolete-variable 'isearch-lazy-highlight-initial-delay 'lazy-highlight-initial-delay) (defcustom lazy-highlight-interval 0 ; 0.0625 "*Seconds between lazily highlighting successive matches." :type 'number :group 'lazy-highlight) +(defvaralias 'isearch-lazy-highlight-interval 'lazy-highlight-interval) +(make-obsolete-variable 'isearch-lazy-highlight-interval 'lazy-highlight-interval) (defcustom lazy-highlight-max-at-a-time 20 "*Maximum matches to highlight at a time (for `lazy-highlight'). @@ -241,6 +266,8 @@ A value of nil means highlight all matches." :type '(choice (const :tag "All" nil) (integer :tag "Some")) :group 'lazy-highlight) +(defvaralias 'isearch-lazy-highlight-max-at-a-time 'lazy-highlight-max-at-a-time) +(make-obsolete-variable 'isearch-lazy-highlight-max-at-a-time 'lazy-highlight-max-at-a-time) (defface lazy-highlight '((((class color) (min-colors 88) (background light)) @@ -253,8 +280,11 @@ A value of nil means highlight all matches." (:background "turquoise3")) (t (:underline t))) "Face for lazy highlighting of matches other than the current one." - :group 'isearch-faces :group 'lazy-highlight) +(put 'isearch-lazy-highlight-face 'face-alias 'lazy-highlight) +(defvar lazy-highlight-face 'lazy-highlight) +(defvaralias 'isearch-lazy-highlight-face 'lazy-highlight-face) +(make-obsolete-variable 'isearch-lazy-highlight-face 'lazy-highlight-face) ;; Define isearch-mode keymap. @@ -2203,31 +2233,8 @@ Can be changed via `isearch-search-fun-function' for special needs." (setq isearch-hidden t))))))) -;; Highlighting - -(defvar isearch-overlay nil) - -(defun isearch-highlight (beg end) - (unless (null search-highlight) - (cond (isearch-overlay - ;; Overlay already exists, just move it. - (move-overlay isearch-overlay beg end (current-buffer))) - - (t - ;; Overlay doesn't exist, create it. - (setq isearch-overlay (make-overlay beg end)) - (overlay-put isearch-overlay 'face isearch) - (overlay-put isearch-overlay 'priority 1) ;higher than lazy overlays - )))) - -(defun isearch-dehighlight () - (when isearch-overlay - (delete-overlay isearch-overlay))) - - ;; General utilities - (defun isearch-no-upper-case-p (string regexp-flag) "Return t if there are no upper case chars in STRING. If REGEXP-FLAG is non-nil, disregard letters preceded by `\\' (but not `\\\\') @@ -2259,6 +2266,27 @@ since they have special meaning in a regexp." (append char-or-events unread-command-events))) +;; Highlighting + +(defvar isearch-overlay nil) + +(defun isearch-highlight (beg end) + (unless (null search-highlight) + (cond (isearch-overlay + ;; Overlay already exists, just move it. + (move-overlay isearch-overlay beg end (current-buffer))) + + (t + ;; Overlay doesn't exist, create it. + (setq isearch-overlay (make-overlay beg end)) + (overlay-put isearch-overlay 'face isearch) + (overlay-put isearch-overlay 'priority 1) ;higher than lazy overlays + )))) + +(defun isearch-dehighlight () + (when isearch-overlay + (delete-overlay isearch-overlay))) + ;; isearch-lazy-highlight feature ;; by Bob Glickstein @@ -2284,29 +2312,6 @@ since they have special meaning in a regexp." ;; - the variable `isearch-invalid-regexp' is expected to be true ;; iff `isearch-string' is an invalid regexp. -(defgroup isearch-faces nil - "Lazy highlighting feature for incremental search." - :version "21.1" - :group 'isearch) - -(defface isearch - '((((class color) (min-colors 88) (background light)) - ;; The background must not be too dark, for that means - ;; the character is hard to see when the cursor is there. - (:background "magenta2" :foreground "lightskyblue1")) - (((class color) (min-colors 88) (background dark)) - (:background "palevioletred2" :foreground "brown4")) - (((class color) (min-colors 16)) - (:background "magenta4" :foreground "cyan1")) - (((class color) (min-colors 8)) - (:background "magenta4" :foreground "cyan1")) - (t (:inverse-video t))) - "Face for highlighting Isearch matches." - :group 'isearch-faces) -(defvar isearch 'isearch) - -(defvar isearch-lazy-highlight-face 'lazy-highlight) - (defvar isearch-lazy-highlight-overlays nil) (defvar isearch-lazy-highlight-wrapped nil) (defvar isearch-lazy-highlight-start nil) From afd33362f4ba845bb6a80c1116a9a82fe32ebfff Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 11 Jan 2005 23:05:16 +0000 Subject: [PATCH 187/560] (query-replace-lazy-highlight): Add lazy-highlight group. (query-replace-highlight, query-replace-lazy-highlight) (query-replace): Move definitions to the beginning of the file. --- lisp/ChangeLog | 18 ++++++++++++++++++ lisp/replace.el | 42 +++++++++++++++++++++--------------------- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1d8e6518c56..96d8bcc5b06 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2005-01-12 Juri Linkov + + * isearch.el (search-highlight, isearch, isearch-lazy-highlight): + Bring together isearch highlight related options. + (lazy-highlight): Replace group `replace' by `matching'. + (lazy-highlight-cleanup, lazy-highlight-initial-delay) + (lazy-highlight-interval, lazy-highlight-max-at-a-time) + (lazy-highlight): Add aliases to old names isearch-lazy-highlight-... + and declare them obsolete. + (lazy-highlight-face): Rename from isearch-lazy-highlight-face. + (isearch-faces): Remove defgroup. + (isearch-overlay, isearch-highlight, isearch-dehighlight): + Move isearch highlighting code closer to lazy highlighting code. + + * replace.el (query-replace-lazy-highlight): Add lazy-highlight group. + (query-replace-highlight, query-replace-lazy-highlight) + (query-replace): Move definitions to the beginning of the file. + 2005-01-11 Juri Linkov * toolbar/back_arrow.xpm, toolbar/back_arrow.pbm, diff --git a/lisp/replace.el b/lisp/replace.el index 33a30aa92d9..3520f3e2268 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -64,6 +64,27 @@ strings or patterns." :group 'matching :version "21.4") +(defcustom query-replace-highlight t + "*Non-nil means to highlight matches during query replacement." + :type 'boolean + :group 'matching) + +(defcustom query-replace-lazy-highlight t + "*Controls the lazy-highlighting during query replacements. +When non-nil, all text in the buffer matching the current match +is highlighted lazily using isearch lazy highlighting (see +`lazy-highlight-initial-delay' and `lazy-highlight-interval')." + :type 'boolean + :group 'lazy-highlight + :group 'matching + :version "21.4") + +(defface query-replace + '((t (:inherit isearch))) + "Face for highlighting query replacement matches." + :group 'matching + :version "21.4") + (defun query-replace-descr (string) (mapconcat 'isearch-text-char-description string "")) @@ -1258,27 +1279,6 @@ passed in. If LITERAL is set, no checking is done, anyway." (replace-match newtext fixedcase literal) noedit) -(defcustom query-replace-highlight t - "*Non-nil means to highlight matches during query replacement." - :type 'boolean - :group 'matching) - -(defcustom query-replace-lazy-highlight t - "*Controls the lazy-highlighting during query replacements. -When non-nil, all text in the buffer matching the current match -is highlighted lazily using isearch lazy highlighting (see -`lazy-highlight-initial-delay' and -`lazy-highlight-interval')." - :type 'boolean - :group 'matching - :version "21.4") - -(defface query-replace - '((t (:inherit isearch))) - "Face for highlighting query replacement matches." - :group 'matching - :version "21.4") - (defun perform-replace (from-string replacements query-flag regexp-flag delimited-flag &optional repeat-count map start end) From 30cec4ee1350be1e1791b1994181330e7cb4a5d3 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 11 Jan 2005 23:06:42 +0000 Subject: [PATCH 188/560] Add back_arrow.xpm and fwd_arrow.xpm. --- lisp/toolbar/README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/toolbar/README b/lisp/toolbar/README index f7c8cb033b4..4bf1700dd91 100644 --- a/lisp/toolbar/README +++ b/lisp/toolbar/README @@ -5,4 +5,6 @@ The following icons are from GTK+ 2.x: paste.xpm preferences.xpm print.xpm right_arrow.xpm save.xpm saveas.xpm search.xpm spell.xpm undo.xpm up_arrow.xpm + back_arrow.xpm and fwd_arrow.xpm are slightly modified undo and redo. + They are not part of Emacs, but distributed and used by Emacs. From 066a23af25db3836c7dcc4d7f43ee63a2bb9b1dc Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 11 Jan 2005 23:53:35 +0000 Subject: [PATCH 189/560] (list-colors-display): Add new arg buffer-name. Use it. Fix docstring. Replace code for identifying duplicate colors by the name with call to `list-colors-duplicates' which identifies duplicate colors by the value unless the color is one of special Windows colors. Set truncate-lines to t. Print sorted duplicate color names on each line. Indent to 22 \(the longest color name in rgb.txt) instead of 20. Optimize. (list-colors-duplicates): New function. (facemenu-color-name-equal): Delete function. --- lisp/ChangeLog | 12 ++++++ lisp/facemenu.el | 98 ++++++++++++++++++++++++------------------------ 2 files changed, 61 insertions(+), 49 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96d8bcc5b06..a4c4c0d030e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2005-01-12 Juri Linkov + + * facemenu.el (list-colors-display): Add new arg buffer-name. + Use it. Fix docstring. Replace code for identifying duplicate + colors by the name with call to `list-colors-duplicates' which + identifies duplicate colors by the value unless the color + is one of special Windows colors. Set truncate-lines to t. + Print sorted duplicate color names on each line. Indent to 22 + \(the longest color name in rgb.txt) instead of 20. Optimize. + (list-colors-duplicates): New function. + (facemenu-color-name-equal): Delete function. + 2005-01-12 Juri Linkov * isearch.el (search-highlight, isearch, isearch-lazy-highlight): diff --git a/lisp/facemenu.el b/lisp/facemenu.el index c6cce457fe6..7179523eec8 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -471,50 +471,66 @@ These special properties include `invisible', `intangible' and `read-only'." col))) ;;;###autoload -(defun list-colors-display (&optional list) +(defun list-colors-display (&optional list buffer-name) "Display names of defined colors, and show what they look like. If the optional argument LIST is non-nil, it should be a list of -colors to display. Otherwise, this command computes a list -of colors that the current display can handle." +colors to display. Otherwise, this command computes a list of +colors that the current display can handle. If the optional +argument BUFFER-NAME is nil, it defaults to *Colors*." (interactive) (when (and (null list) (> (display-color-cells) 0)) - (setq list (defined-colors)) - ;; Delete duplicate colors. - - ;; Identify duplicate colors by the name rather than the color - ;; value. For example, on MS-Windows, logical colors are added to - ;; the list that might have the same value but have different - ;; names and meanings. For example, `SystemMenuText' (the color - ;; w32 uses for the text in menu entries) and `SystemWindowText' - ;; (the default color w32 uses for the text in windows and - ;; dialogs) may be the same display color and be adjacent in the - ;; list. Detecting duplicates by name insures that both of these - ;; colors remain despite identical color values. - (let ((l list)) - (while (cdr l) - (if (facemenu-color-name-equal (car l) (car (cdr l))) - (setcdr l (cdr (cdr l))) - (setq l (cdr l))))) + (setq list (list-colors-duplicates (defined-colors))) (when (memq (display-visual-class) '(gray-scale pseudo-color direct-color)) ;; Don't show more than what the display can handle. (let ((lc (nthcdr (1- (display-color-cells)) list))) (if lc (setcdr lc nil))))) - (with-output-to-temp-buffer "*Colors*" + (with-output-to-temp-buffer (or buffer-name "*Colors*") (save-excursion (set-buffer standard-output) - (let (s) - (while list - (setq s (point)) - (insert (car list)) - (indent-to 20) - (put-text-property s (point) 'face - (cons 'background-color (car list))) - (setq s (point)) - (insert " " (car list) "\n") - (put-text-property s (point) 'face - (cons 'foreground-color (car list))) - (setq list (cdr list))))))) + (setq truncate-lines t) + (dolist (color list) + (if (consp color) + (if (cdr color) + (setq color (sort color (lambda (a b) + (string< (downcase a) + (downcase b)))))) + (setq color (list color))) + (put-text-property + (prog1 (point) + (insert (car color)) + (indent-to 22)) + (point) + 'face (cons 'background-color (car color))) + (put-text-property + (prog1 (point) + (insert " " (if (cdr color) + (mapconcat 'identity (cdr color) ", ") + (car color)) + "\n")) + (point) + 'face (cons 'foreground-color (car color))))))) + +(defun list-colors-duplicates (&optional list) + "Return a list of colors with grouped duplicate colors. +If a color has no duplicates, then the element of the returned list +has the form '(COLOR-NAME). The element of the returned list with +duplicate colors has the form '(COLOR-NAME DUPLICATE-COLOR-NAME ...). +This function uses the predicate `facemenu-color-equal' to compare +color names. If the optional argument LIST is non-nil, it should +be a list of colors to display. Otherwise, this function uses +a list of colors that the current display can handle." + (let* ((list (mapcar 'list (or list (defined-colors)))) + (l list)) + (while (cdr l) + (if (and (facemenu-color-equal (car (car l)) (car (car (cdr l)))) + (not (and (boundp 'w32-default-color-map) + (not (assoc (car (car l)) w32-default-color-map))))) + (progn + (setcdr (car l) (cons (car (car (cdr l))) (cdr (car l)))) + (setcdr l (cdr (cdr l)))) + (setq l (cdr l)))) + list)) (defun facemenu-color-equal (a b) "Return t if colors A and B are the same color. @@ -525,22 +541,6 @@ determine the correct answer." (cond ((equal a b) t) ((equal (color-values a) (color-values b))))) -(defun facemenu-color-name-equal (a b) - "Return t if colors A and B are the same color. -A and B should be strings naming colors. These names are -downcased, stripped of spaces and the string `grey' is turned -into `gray'. This accommodates alternative spellings of colors -found commonly in the list. It returns nil if the colors differ." - (progn - (setq a (replace-regexp-in-string "grey" "gray" - (replace-regexp-in-string " " "" - (downcase a))) - b (replace-regexp-in-string "grey" "gray" - (replace-regexp-in-string " " "" - (downcase b)))) - - (equal a b))) - (defun facemenu-add-face (face &optional start end) "Add FACE to text between START and END. If START is nil or START to END is empty, add FACE to next typed character From 987d1819c1486eb76d341ba22c8152fd07c89005 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 12 Jan 2005 00:33:00 +0000 Subject: [PATCH 190/560] * facemenu.el (list-colors-print): New function created from code in list-colors-display. Print #RRGGBB at the window right edge. (list-colors-display): When temp-buffer-show-function is not defined, call list-colors-print from temp-buffer-show-hook to get the right value of window-width in list-colors-print after the buffer is displayed. --- lisp/ChangeLog | 7 ++++++ lisp/facemenu.el | 57 ++++++++++++++++++++++++++++++------------------ 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4c4c0d030e..bfd88a6e9f7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -10,6 +10,13 @@ (list-colors-duplicates): New function. (facemenu-color-name-equal): Delete function. + * facemenu.el (list-colors-print): New function created from code + in list-colors-display. Print #RRGGBB at the window right edge. + (list-colors-display): When temp-buffer-show-function is not + defined, call list-colors-print from temp-buffer-show-hook + to get the right value of window-width in list-colors-print + after the buffer is displayed. + 2005-01-12 Juri Linkov * isearch.el (search-highlight, isearch, isearch-lazy-highlight): diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 7179523eec8..127b8fe608b 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -489,27 +489,42 @@ argument BUFFER-NAME is nil, it defaults to *Colors*." (save-excursion (set-buffer standard-output) (setq truncate-lines t) - (dolist (color list) - (if (consp color) - (if (cdr color) - (setq color (sort color (lambda (a b) - (string< (downcase a) - (downcase b)))))) - (setq color (list color))) - (put-text-property - (prog1 (point) - (insert (car color)) - (indent-to 22)) - (point) - 'face (cons 'background-color (car color))) - (put-text-property - (prog1 (point) - (insert " " (if (cdr color) - (mapconcat 'identity (cdr color) ", ") - (car color)) - "\n")) - (point) - 'face (cons 'foreground-color (car color))))))) + (if temp-buffer-show-function + (list-colors-print list) + ;; Call list-colors-print from temp-buffer-show-hook + ;; to get the right value of window-width in list-colors-print + ;; after the buffer is displayed. + (add-hook 'temp-buffer-show-hook + (lambda () (list-colors-print list)) nil t))))) + +(defun list-colors-print (list) + (dolist (color list) + (if (consp color) + (if (cdr color) + (setq color (sort color (lambda (a b) + (string< (downcase a) + (downcase b)))))) + (setq color (list color))) + (put-text-property + (prog1 (point) + (insert (car color)) + (indent-to 22)) + (point) + 'face (cons 'background-color (car color))) + (put-text-property + (prog1 (point) + (insert " " (if (cdr color) + (mapconcat 'identity (cdr color) ", ") + (car color))) + (indent-to (max (- (window-width) 8) 44)) + (insert (apply 'format " #%02x%02x%02x" + (mapcar (lambda (c) (lsh c -8)) + (color-values (car color))))) + + (insert "\n")) + (point) + 'face (cons 'foreground-color (car color)))) + (goto-char (point-min))) (defun list-colors-duplicates (&optional list) "Return a list of colors with grouped duplicate colors. From 0137bae6053ee443661d6b11a0cf7e383593b5fb Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 12 Jan 2005 00:42:57 +0000 Subject: [PATCH 191/560] (pop-mark): Move deactivate-mark out of conditional part to deactivate the active mark regardless of the state of the mark ring. --- lisp/simple.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 565a6cba8ee..bdc51546a84 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3008,10 +3008,10 @@ Does not set point. Does nothing if mark ring is empty." (when mark-ring (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker))))) (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer)) - (deactivate-mark) (move-marker (car mark-ring) nil) (if (null (mark t)) (ding)) - (setq mark-ring (cdr mark-ring)))) + (setq mark-ring (cdr mark-ring))) + (deactivate-mark)) (defalias 'exchange-dot-and-mark 'exchange-point-and-mark) (defun exchange-point-and-mark (&optional arg) From aac42a1b2cce228247ab21646cab881ecdf62221 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 12 Jan 2005 00:52:33 +0000 Subject: [PATCH 192/560] (desktop-save): Add `mode: emacs-lisp' to the local variables line in desktop files. --- lisp/ChangeLog | 7 +++++++ lisp/desktop.el | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bfd88a6e9f7..62138a3166c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -17,6 +17,13 @@ to get the right value of window-width in list-colors-print after the buffer is displayed. + * simple.el (pop-mark): Move deactivate-mark out of conditional + part to deactivate the active mark regardless of the state of the + mark ring. + + * desktop.el (desktop-save): Add `mode: emacs-lisp' to the local + variables line in desktop files. + 2005-01-12 Juri Linkov * isearch.el (search-highlight, isearch, isearch-lazy-highlight): diff --git a/lisp/desktop.el b/lisp/desktop.el index 77c7a1f076f..aaa24874579 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -653,7 +653,7 @@ See also `desktop-base-file-name'." (erase-buffer) (insert - ";; -*- coding: emacs-mule; -*-\n" + ";; -*- mode: emacs-lisp; coding: emacs-mule; -*-\n" desktop-header ";; Created " (current-time-string) "\n" ";; Desktop file format version " desktop-file-version "\n" From 1b8d07559d30c3ce3229f7119ee9f06177ec8224 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jan 2005 04:24:20 +0000 Subject: [PATCH 193/560] (type-break-mode): Fix previous change. --- lisp/type-break.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/type-break.el b/lisp/type-break.el index b51a74ea37e..7a387bfe062 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -389,6 +389,9 @@ problems." (and (interactive-p) (message "Type Break mode is already enabled"))) (type-break-mode + (with-current-buffer (find-file-noselect type-break-file-name 'nowarn) + (setq buffer-save-without-query t)) + (or global-mode-string (setq global-mode-string '(""))) (or (assq 'type-break-mode-line-message-mode @@ -433,7 +436,6 @@ problems." (do-auto-save) (with-current-buffer (find-file-noselect type-break-file-name 'nowarn) - (setq buffer-save-without-query t) (set-buffer-modified-p nil) (unlock-buffer) (kill-this-buffer)) From 5ba8f83ded4394bf48a034330181edb50638526a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jan 2005 05:03:22 +0000 Subject: [PATCH 194/560] (Frequire): Record in load-history unconditionally. --- src/fns.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fns.c b/src/fns.c index b163223803c..3f92a0e0bfb 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3443,6 +3443,10 @@ The normal messages at start and end of loading FILENAME are suppressed. */) CHECK_SYMBOL (feature); + /* Record the presence of `require' in this file + even if the feature specified is already loaded. */ + LOADHIST_ATTACH (Fcons (Qrequire, feature)); + tem = Fmemq (feature, Vfeatures); if (NILP (tem)) @@ -3450,8 +3454,6 @@ The normal messages at start and end of loading FILENAME are suppressed. */) int count = SPECPDL_INDEX (); int nesting = 0; - LOADHIST_ATTACH (Fcons (Qrequire, feature)); - /* This is to make sure that loadup.el gives a clear picture of what files are preloaded and when. */ if (! NILP (Vpurify_flag)) From 43facb76534c54d334b5e396ec624aff3a9c01bc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jan 2005 05:06:46 +0000 Subject: [PATCH 195/560] (Fformat_mode_line): New arg FACE specifies a default face property for characters that don't specify one. --- src/xdisp.c | 49 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 600e01a13e1..7c3eb3cb378 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15978,27 +15978,50 @@ store_mode_line_string (string, lisp_string, copy_string, field_width, precision DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, - 1, 4, 0, + 1, 5, 0, doc: /* Return the mode-line of selected window as a string. First arg FORMAT specifies the mode line format (see `mode-line-format' for -details) to use. Second optional arg WINDOW specifies a different window to -use as the context for the formatting. If third optional arg NO-PROPS is -non-nil, string is not propertized. Fourth optional arg BUFFER specifies -which buffer to use. */) - (format, window, no_props, buffer) - Lisp_Object format, window, no_props, buffer; +details) to use. Second (optional) arg WINDOW specifies the window to +use as the context for the formatting (default is the selected window). + +If third (optional) arg NO-PROPS is non-nil, the value string has +no text properties. The fourth (optional) arg BUFFER specifies +which buffer to use (default, the current buffer). + +Fifth (optional) arg FACE specifies the face property to put +on all characters for which no face is specified. +t means whatever face the window's mode line currently uses +\(either `mode-line' or `mode-line-inactive', depending). +nil means the default is no face property. */) + (format, window, no_props, buffer, face) + Lisp_Object format, window, no_props, buffer, face; { struct it it; int len; struct window *w; struct buffer *old_buffer = NULL; - enum face_id face_id = DEFAULT_FACE_ID; + enum face_id face_id; if (NILP (window)) window = selected_window; CHECK_WINDOW (window); w = XWINDOW (window); + if (EQ (face, Qt)) + face = (EQ (window, selected_window) ? Qmode_line : Qmode_line_inactive); + + if (!NILP (face)) + { + Lisp_Object tem = Fget (face, Qface); + if (INTEGERP (tem)) + face_id = XINT (tem); + else + { + face = Qnil; + face_id = DEFAULT_FACE_ID; + } + } + if (NILP (buffer)) buffer = w->buffer; @@ -16010,14 +16033,16 @@ which buffer to use. */) set_buffer_internal_1 (XBUFFER (buffer)); } + if (NILP (format) || EQ (format, Qt)) + face_id = (NILP (format) + ? CURRENT_MODE_LINE_FACE_ID (w) + : HEADER_LINE_FACE_ID); + init_iterator (&it, w, -1, -1, NULL, face_id); if (NILP (no_props)) { - mode_line_string_face - = (face_id == MODE_LINE_FACE_ID ? Qmode_line - : face_id == MODE_LINE_INACTIVE_FACE_ID ? Qmode_line_inactive - : face_id == HEADER_LINE_FACE_ID ? Qheader_line : Qnil); + mode_line_string_face = face; mode_line_string_face_prop = (NILP (mode_line_string_face) ? Qnil From 0fee24ae7c39ea52ad0088c0732d36f8f26490c2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jan 2005 05:11:05 +0000 Subject: [PATCH 196/560] (Emulating Mode Line): Doc FACE arg in format-header-line. --- lispref/modes.texi | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lispref/modes.texi b/lispref/modes.texi index 299579a10af..ebedbc520b8 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1736,7 +1736,7 @@ It is normally @code{nil}, so that ordinary buffers have no header line. the text that would appear in a mode line or header line based on certain mode-line specification. -@defun format-mode-line format &optional window no-props buffer +@defun format-mode-line format &optional window no-props buffer face This function formats a line of text according to @var{format} as if it were generating the mode line for @var{window}, but instead of displaying the text in the mode line or the header line, it returns @@ -1746,12 +1746,20 @@ information used is taken from @var{buffer}; by default, it comes from @var{window}'s buffer. The value string normally has text properties that correspond to the -faces, keymaps, etc., that the mode line would have. If -@var{no-props} is non-@code{nil}, the value has no text properties. +faces, keymaps, etc., that the mode line would have. And any character +for which no @code{face} property is specified gets a default +value which is usually @var{face}. (If @var{face} is @code{t}, +that stands for either @code{mode-line} if @var{window} is selected, +otherwise @code{mode-line-inactive}.) + +However, if @var{no-props} is non-@code{nil}, the value has no text +properties. For example, @code{(format-mode-line header-line-format)} returns the text that would appear in the selected window's header line (@code{""} -if it has no header line). +if it has no header line). @code{(format-mode-line header-line-format +nil nil nil 'header-line)} returns the same text, with each character +carrying the face that it will have in the header line itself. @end defun @node Imenu From cf6e4adce84a6d2e70eb752dcb26d613006c227a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jan 2005 05:11:56 +0000 Subject: [PATCH 197/560] (Beeping): Fix Texinfo usage. --- lispref/display.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/display.texi b/lispref/display.texi index 686c98db6e2..17e4bc57ea0 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -4759,7 +4759,7 @@ display by sending @var{string} to the terminal. screen) to attract the user's attention. Be conservative about how often you do this; frequent bells can become irritating. Also be careful not to use just beeping when signaling an error is more -appropriate. (@pxref{Errors}.) +appropriate. (@xref{Errors}.) @defun ding &optional do-not-terminate @cindex keyboard macro termination From b503de7617324d063b726d144aea4f7b7efafff4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jan 2005 05:14:03 +0000 Subject: [PATCH 198/560] (Enabling Mouse-1 to Follow Links): Rewrite. --- lispref/text.texi | 119 +++++++++++++++++++++++----------------------- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/lispref/text.texi b/lispref/text.texi index e74303bb5dc..5c7b11953a3 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -3394,57 +3394,54 @@ buffer. @subsection Enabling Mouse-1 to Follow Links @cindex follow links - Traditionally, Emacs uses a @key{mouse-1} click to set point and a -@key{mouse-2} click to follow a link, whereas most other applications -use a @key{mouse-1} click for both purposes, depending on whether you -click outside or inside a link. + The normal Emacs command for activating text in read-only buffers is +@key{Mouse-2}, which includes following textual links. However, most +graphical applications use @key{Mouse-1} for following links. For +compatibility, @key{Mouse-1} follows links in Emacs too, when you +click on a link quickly without moving the mouse. The user can +customize this behaviour through the variable +@code{mouse-1-click-follows-link}. - Starting with Emacs release 21.4, the user visible behaviour of a -@key{mouse-1} click on a link has been changed to match this -context-sentitive dual behaviour. The user can customize this -behaviour through the variable @code{mouse-1-click-follows-link}. - - However, at the Lisp level, @key{mouse-2} is still used as the -action for the clickable text corresponding to the link, and the -clickable text must be explicitly marked as a link for a @key{mouse-1} -click to follow the link. - - There are several methods that can be used to identify a clickable -text as a link: + To define text as a link at the Lisp level, you should bind +@key{Mouse-2} to a command to follow the link. Then, to indicate +that @key{Mouse-1} should also follow the link, here is what you do: @table @asis -@item follow-link property - - If the clickable text has a non-nil @code{follow-link} text or overlay +@item @code{follow-link} property +If the clickable text has a non-@code{nil} @code{follow-link} text or overlay property, the value of that property determines what to do. -@item follow-link event - - If there is a binding for the @code{follow-link} event, either on +@item @code{follow-link} event +If there is a binding for the @code{follow-link} event, either on the clickable text or in the local keymap, the binding of that event -determines whether the mouse click position is inside a link: +determines whether the mouse click position is inside a link. +@end table + + Regardless of where the @code{follow-link} value comes from, that +value is used according to the following table to determine whether +the given position is inside a link, and (if so) to compute an +@dfn{action code} saying how @key{Mouse-1} should handle the link. @table @asis -@item mouse-face +@item @code{mouse-face} +If the value is @code{mouse-face}, a position is inside a link if +there is a non-@code{nil} @code{mouse-face} property at that position. +The action code is always @code{t}. - If the binding is @code{mouse-face}, the mouse click position is -inside a link if there is a non-nil @code{mouse-face} property at -that position. A value of @code{t} is used to determine what to do next. - -For example, here is how @key{mouse-1} are setup in info mode: +For example, here is how Info mode handles @key{Mouse-1}: @example (define-key Info-mode-map [follow-link] 'mouse-face) @end example @item a function +If the value is a function, @var{func}, then a position @var{pos} is +inside a link if @code{(@var{func} @var{pos})} evaluates to +non-@code{nil}. The value returned by @var{func} serves as the action +code. - If the binding is a function, @var{func}, the mouse click position, -@var{pos}, is inside a link if the call @code{(@var{func} @var{pos})} -returns non-@code{nil}. The return value from that call determines -what to do next. - -For example, here is how pcvs enables @key{mouse-1} on file names only: +For example, here is how pcvs enables @key{Mouse-1} to follow links on +file names only: @example (define-key map [follow-link] @@ -3452,46 +3449,48 @@ For example, here is how pcvs enables @key{mouse-1} on file names only: (if (eq (get-char-property pos 'face) 'cvs-filename-face) t))) @end example -@item anthing else - - If the binding is anything else, the binding determines what to do. -@end table - +@item anything else +If the value is anything else, it is the action code. @end table @noindent -The resulting value determined above is interpreted as follows: +Here's how the action code determines what @key{Mouse-1} should do: @table @asis @item a string - - If the value is a string, the @key{mouse-1} event is translated into -the first character of the string, i.e. the action of the @key{mouse-1} -click is the local or global binding of that character. +If the action code is a string, the @key{Mouse-1} event is translated +into the first character of the string, i.e., the action of the +@key{Mouse-1} click is the local or global binding of that character. +Thus, if the action code is @code{"foo"}, @key{Mouse-1} translates +into @kbd{f}. @item a vector +If the action code is is a vector, the @key{Mouse-1} event is +translated into the first element of that vector, i.e,. the action of +the @key{Mouse-1} click is the local or global binding of that event. +Thus, if the action code is @code{[?f ?o ?o]}, @key{Mouse-1} +translates into @kbd{f}. - If the value is is a vector, the @key{mouse-1} event is translated -into the first element of that vector, i.e. the action of the -@key{mouse-1} click is the local or global binding of that event. - -@item anthing else - - For any other non-nil valule, the @key{mouse-1} event is translated -into a @key{mouse-2} event at the same position. +@item anything else +For any other non-@code{nil} action code, the @code{mouse-1} event is +translated into a @code{mouse-2} event at the same position. @end table - To use @key{mouse-1} on a button defined with @code{define-button-type}, -give the button a @code{follow-link} property with a value as -specified above to determine how to follow the link. + To define @key{Mouse-1} to activate a button defined with +@code{define-button-type}, give the button a @code{follow-link} +property with a value as specified above to determine how to follow +the link. +@c ??? That is not clear. This needs an example or an xref. - To use @key{mouse-1} on a widget defined with @code{define-widget}, -give the widget a @code{:follow-link} property with a value -as specified above to determine how to follow the link. + To define @key{Mouse-1} on a widget defined with +@code{define-widget}, give the widget a @code{:follow-link} property +with a value as specified above to determine how to follow the link. +@c ??? That is not clear. This needs an example or an xref. @defun mouse-on-link-p pos @tindex mouse-on-link-p -Return non-@code{nil} if @var{pos} is on a link in the current buffer. +This function returns non-@code{nil} if position @var{pos} in the +current buffer is on a link. @end defun @node Fields From 28f94a3454ace838b06d8bcdd86248d2b87ca57b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 12 Jan 2005 05:14:15 +0000 Subject: [PATCH 199/560] *** empty log message *** --- lisp/ChangeLog | 6 +++++- lispref/ChangeLog | 8 ++++++++ src/ChangeLog | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62138a3166c..6d40d409e3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -72,6 +72,10 @@ Ignore select-window events rather than fiddle with mouse-autoselect-window. +2005-01-11 Matthew Mundell + + * type-break.el (type-break-mode): Fix previous change. + 2005-01-10 Jay Belanger * calc/calc-ext.el (calc-reset): Reset when inside embedded @@ -4396,7 +4400,7 @@ (dired-move-to-end-of-filename): Make the " -> " search more specific. (dired-buffers-for-dir): Remove unused var `pattern'. -2004-09-28 Matthew Mundell (tiny change) +2004-09-28 Matthew Mundell * calendar/diary-lib.el (list-diary-entries): Save diary buffer from diary display excursion. Store diary buffer's point for diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 03f2d8bef04..7ff405b3206 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,11 @@ +2005-01-12 Richard M. Stallman + + * text.texi (Enabling Mouse-1 to Follow Links): Redo prev. change. + + * display.texi (Beeping): Fix Texinfo usage. + + * modes.texi (Emulating Mode Line): Doc FACE arg in format-header-line. + 2005-01-11 Kim F. Storm * display.texi (Button Properties, Button Buffer Commands): diff --git a/src/ChangeLog b/src/ChangeLog index 21208459b47..a9ae3348179 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-01-12 Richard M. Stallman + + * xdisp.c (Fformat_mode_line): New arg FACE specifies a default + face property for characters that don't specify one. + + * fns.c (Frequire): Record in load-history unconditionally. + 2005-01-10 Kim F. Storm * dispextern.h (merge_faces): Rename from merge_into_realized_face. @@ -64,6 +71,10 @@ * xdisp.c (set_iterator_to_next): Fix 2004-12-13 change. Set stop_charpos to current charpos instead of 0. +2005-01-06 Nick Roberts + + * xdisp.c (Fformat_mode_line): First arg now required. + 2005-01-06 YAMAMOTO Mitsuharu * macterm.c (XLoadQueryFont): Correctly handle 0 size From a1c9fd1979349f5ae51ea7600f5c299e349be751 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 12 Jan 2005 06:12:34 +0000 Subject: [PATCH 200/560] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d40d409e3d..c3411719f68 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-12 Nick Roberts + + * xt-mouse.el (xterm-mouse-translate, xterm-mouse-event): Enable + mouse clicks on mode-line, header-line and margin. + (event-type): Give mouse event symbols an 'event-kind property + with value 'mouse-click. + 2005-01-12 Juri Linkov * facemenu.el (list-colors-display): Add new arg buffer-name. From bf31a09320c3ec079e8cbb035f20533e8bfa5b7e Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 12 Jan 2005 06:13:08 +0000 Subject: [PATCH 201/560] (xterm-mouse-translate, xterm-mouse-event): Enable mouse clicks on mode-line, header-line and margin. (event-type): Give mouse event symbols an 'event-kind property with value 'mouse-click. --- lisp/xt-mouse.el | 50 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 19b58475a93..de93456ad5a 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -43,14 +43,17 @@ ;; Support multi-click -- somehow. -;; Clicking on the mode-line does not work, although it should. - ;;; Code: (define-key function-key-map "\e[M" 'xterm-mouse-translate) (defvar xterm-mouse-last) +;; Mouse events symbols must have an 'event-kind property with +;; the value 'mouse-click. +(dolist (event-type '(mouse-1 mouse-2 mouse-3)) + (put event-type 'event-kind 'mouse-click)) + (defun xterm-mouse-translate (event) "Read a click and release event from XTerm." (save-excursion @@ -78,7 +81,7 @@ (click-where (nth 1 click-data))) (if (memq down-binding '(nil ignore)) (if (and (symbolp click-where) - (not (eq 'menu-bar click-where))) + (consp click-where)) (vector (list click-where click-data) click) (vector click)) (setq unread-command-events @@ -92,10 +95,9 @@ 0 (list (intern (format "drag-mouse-%d" (+ 1 xterm-mouse-last))) - down-data click-data)) - ))) + down-data click-data))))) (if (and (symbolp down-where) - (not (eq 'menu-bar down-where))) + (consp down-where)) (vector (list down-where down-data) down) (vector down)))))))) @@ -124,30 +126,6 @@ (let* ((type (- (xterm-mouse-event-read) #o40)) (x (- (xterm-mouse-event-read) #o40 1)) (y (- (xterm-mouse-event-read) #o40 1)) - (point (cons x y)) - (window (window-at x y)) - (where (if window - (coordinates-in-window-p point window) - 'menu-bar)) - (pos (if (consp where) - (progn - (select-window window) - (goto-char (window-start window)) - (move-to-window-line (- - (cdr where) - (if (or header-line-format - default-header-line-format) - 1 - 0))) - (move-to-column (- (+ (car where) (current-column) - (if (string-match "\\` \\*Minibuf" - (buffer-name)) - (- (minibuffer-prompt-width)) - 0) - (max 0 (1- (window-hscroll)))) - left-margin-width)) - (point)) - where)) (mouse (intern ;; For buttons > 3, the release-event looks ;; differently (see xc/programs/xterm/button.c, @@ -159,12 +137,16 @@ (format "mouse-%d" (+ 1 xterm-mouse-last))) (t (setq xterm-mouse-last type) - (format "down-mouse-%d" (+ 1 type))))))) + (format "down-mouse-%d" (+ 1 type)))))) + (w (window-at x y))) (setq xterm-mouse-x x xterm-mouse-y y) - (list mouse - (list window pos point - (/ (nth 2 (current-time)) 1000))))) + (if w + (list mouse (posn-at-x-y x (if menu-bar-mode (- y 1) y) w)) + (list mouse + (append (list nil 'menu-bar) + (nthcdr 2 (posn-at-x-y + x (if menu-bar-mode (- y 1) y) w))))))) ;;;###autoload (define-minor-mode xterm-mouse-mode From 1e801ac3bedcb50db2103288c5d49be8d076cee8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 12 Jan 2005 10:16:45 +0000 Subject: [PATCH 202/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3411719f68..8ecf42089e1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-12 Kim F. Storm + + * mouse.el (mouse-on-link-p): Change functionality and doc + string to comply with latest description in lisp ref. + 2005-01-12 Nick Roberts * xt-mouse.el (xterm-mouse-translate, xterm-mouse-event): Enable From a0ec7b7fd7547511c5c06c8a72e644004189ae55 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 12 Jan 2005 10:17:02 +0000 Subject: [PATCH 203/560] (mouse-on-link-p): Change functionality and doc string to comply with latest description in lisp ref. --- lisp/mouse.el | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index ea6aa90e3c7..53bfc38d508 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -771,21 +771,22 @@ If the click is in the echo area, display the `*Messages*' buffer." A clickable link is identified by one of the following methods: -1) If the character at POS has a non-nil `follow-link' text or -overlay property, the value of that property is returned. +If the character at POS has a non-nil `follow-link' text or +overlay property, use the value of that property as action code, +or if there is a local key-binding or a keybinding at position +POS for the `follow-link' event, use the binding of that event as +action code. -2) If there is a local key-binding or a keybinding at position -POS for the `follow-link' event, the binding of that event -determines whether POS is inside a link: +The action code is used to determine whether POS is inside a link: -- If the binding is `mouse-face', POS is inside a link if there +- If the action code is `mouse-face', POS is inside a link if there is a non-nil `mouse-face' property at POS. Return t in this case. -- If the binding is a function, FUNC, POS is inside a link if +- If the action code is a function, FUNC, POS is inside a link if the call \(FUNC POS) returns non-nil. Return the return value from that call. -- Otherwise, return the binding of the `follow-link' binding. +- Otherwise, return the action code itself. The return value is interpreted as follows: @@ -799,16 +800,17 @@ click is the local or global binding of that event. - Otherwise, the mouse-1 event is translated into a mouse-2 event at the same position." - (or (get-char-property pos 'follow-link) - (save-excursion - (goto-char pos) - (let ((b (key-binding [follow-link] nil t))) - (cond - ((eq b 'mouse-face) - (and (get-char-property pos 'mouse-face) t)) - ((functionp b) - (funcall b pos)) - (t b)))))) + (let ((action + (or (get-char-property pos 'follow-link) + (save-excursion + (goto-char pos) + (key-binding [follow-link] nil t))))) + (cond + ((eq action 'mouse-face) + (and (get-char-property pos 'mouse-face) t)) + ((functionp action) + (funcall action pos)) + (t action)))) (defun mouse-drag-region-1 (start-event) (mouse-minibuffer-check start-event) From b41a40196b340cd97700dacbdfc90d7c8393eb38 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 12 Jan 2005 10:54:02 +0000 Subject: [PATCH 204/560] More doc fixes. --- lisp/mouse.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 53bfc38d508..edf75753062 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -771,22 +771,24 @@ If the click is in the echo area, display the `*Messages*' buffer." A clickable link is identified by one of the following methods: -If the character at POS has a non-nil `follow-link' text or -overlay property, use the value of that property as action code, -or if there is a local key-binding or a keybinding at position -POS for the `follow-link' event, use the binding of that event as -action code. +- If the character at POS has a non-nil `follow-link' text or +overlay property, use the value of that property determines what +to do. -The action code is used to determine whether POS is inside a link: +- If there is a local key-binding or a keybinding at position POS +for the `follow-link' event, the binding of that event determines +what to do. -- If the action code is `mouse-face', POS is inside a link if there +The resulting value determine whether POS is inside a link: + +- If the value is `mouse-face', POS is inside a link if there is a non-nil `mouse-face' property at POS. Return t in this case. -- If the action code is a function, FUNC, POS is inside a link if +- If the value is a function, FUNC, POS is inside a link if the call \(FUNC POS) returns non-nil. Return the return value from that call. -- Otherwise, return the action code itself. +- Otherwise, return the value itself. The return value is interpreted as follows: From fcda5138f2d4af0eb142c5c27c61d2364f3e3222 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 12 Jan 2005 14:31:52 +0000 Subject: [PATCH 205/560] (calc-describe-key): Use temporary info buffer to create a Calc summary. --- lisp/calc/calc-help.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 087c42d295c..eb0cba79cd8 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -178,15 +178,15 @@ C-w Describe how there is no warranty for Calc." (if (= (buffer-size) 0) (progn (message "Reading Calc summary from manual...") - (save-window-excursion - (save-excursion - (calc-info-goto-node "Summary") - (goto-char (point-min)) - (forward-line 1) - (copy-to-buffer "*Calc Summary*" - (point) (point-max)) - (if Info-history - (Info-last)))))) + (require 'info nil t) + (with-temp-buffer + (Info-mode) + (Info-goto-node "(Calc)Summary") + (goto-char (point-min)) + (forward-line 1) + (copy-to-buffer "*Calc Summary*" + (point) (point-max))) + (setq buffer-read-only t))) (goto-char (point-min)) (setq case-fold-search nil) (re-search-forward "^\\(.*\\)\\[\\.\\. a b") From f5340eb76a8b557ae4408cda5c95f9fa686eb0f7 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 12 Jan 2005 14:52:11 +0000 Subject: [PATCH 206/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8ecf42089e1..e202eb2e01a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-12 Jay Belanger + + * calc/calc-help.el (calc-describe-key): Use temporary info buffer + to create a Calc summary. + 2005-01-12 Kim F. Storm * mouse.el (mouse-on-link-p): Change functionality and doc From 37181fc463f4357642ca7eab41d283d84b00c1ef Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 12 Jan 2005 15:32:26 +0000 Subject: [PATCH 207/560] *** empty log message *** --- lispref/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 7ff405b3206..257310dc801 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,12 @@ +2005-01-12 Kim F. Storm + + * text.texi (Links and Mouse-1): Rename section from Enabling + Mouse-1 to Following Links. Change xrefs. + Add examples for define-button-type and define-widget. + + * display.texi (Button Properties, Button Buffer Commands): + Clarify mouse-1 and follow-link functionality. + 2005-01-12 Richard M. Stallman * text.texi (Enabling Mouse-1 to Follow Links): Redo prev. change. From 5364b27cbf68a7a221bb005c797ff1fc800a6d35 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 12 Jan 2005 15:32:47 +0000 Subject: [PATCH 208/560] (Links and Mouse-1): Rename section from Enabling Mouse-1 to Following Links. Change xrefs. Add examples for define-button-type and define-widget. --- lispref/text.texi | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/lispref/text.texi b/lispref/text.texi index 5c7b11953a3..9807fda05dd 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -2431,8 +2431,7 @@ along with the characters; this includes such diverse functions as only when text is examined. * Clickable Text:: Using text properties to make regions of text do something when you click on them. -* Enabling Mouse-1 to Follow Links:: - How to make @key{mouse-1} follow a link. +* Links and Mouse-1:: How to make @key{Mouse-1} follow a link. * Fields:: The @code{field} property defines fields within the buffer. * Not Intervals:: Why text properties do not use @@ -3390,9 +3389,10 @@ clickable pieces of text. Also, the major mode definition (or the global definition) remains available for the rest of the text in the buffer. -@node Enabling Mouse-1 to Follow Links -@subsection Enabling Mouse-1 to Follow Links +@node Links and Mouse-1 +@subsection Links and Mouse-1 @cindex follow links +@cindex mouse-1 The normal Emacs command for activating text in read-only buffers is @key{Mouse-2}, which includes following textual links. However, most @@ -3402,9 +3402,10 @@ click on a link quickly without moving the mouse. The user can customize this behaviour through the variable @code{mouse-1-click-follows-link}. - To define text as a link at the Lisp level, you should bind -@key{Mouse-2} to a command to follow the link. Then, to indicate -that @key{Mouse-1} should also follow the link, here is what you do: + To define text as a link at the Lisp level, you should bind the +@code{mouse-2} event to a command to follow the link. Then, to +indicate that @key{Mouse-1} should also follow the link, here is what +you do: @table @asis @item @code{follow-link} property @@ -3479,13 +3480,30 @@ translated into a @code{mouse-2} event at the same position. To define @key{Mouse-1} to activate a button defined with @code{define-button-type}, give the button a @code{follow-link} property with a value as specified above to determine how to follow -the link. -@c ??? That is not clear. This needs an example or an xref. +the link. For example, here is how Help mode handles @key{Mouse-1}: + +@smallexample +(define-button-type 'help-xref + 'follow-link t + 'action #'help-button-action) +@end smallexample To define @key{Mouse-1} on a widget defined with @code{define-widget}, give the widget a @code{:follow-link} property with a value as specified above to determine how to follow the link. -@c ??? That is not clear. This needs an example or an xref. + +For example, here is how the @code{link} widget specifies that +a @key{Mouse-1} click shall be translated to @key{RET}: + +@smallexample +(define-widget 'link 'item + "An embedded link." + :button-prefix 'widget-link-prefix + :button-suffix 'widget-link-suffix + :follow-link "\C-m" + :help-echo "Follow the link." + :format "%[%t%]") +@end smallexample @defun mouse-on-link-p pos @tindex mouse-on-link-p From 51d40dab5df28baaa8456035552c717849b4e22e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 12 Jan 2005 15:33:00 +0000 Subject: [PATCH 209/560] (Button Properties, Button Buffer Commands): Clarify mouse-1 and follow-link functionality. --- lispref/display.texi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lispref/display.texi b/lispref/display.texi index 17e4bc57ea0..7b0e72c753f 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -4049,9 +4049,8 @@ the usual Emacs @code{highlight} face. @kindex keymap @r{(button property)} The button's keymap, defining bindings active within the button region. By default this is the usual button region keymap, stored -in the variable @code{button-map}, which defines @key{RET}, -@key{mouse-1} (if @var{mouse-1-click-follows-link} is set), -and @key{mouse-2} to invoke the button. +in the variable @code{button-map}, which defines @key{RET} and +@key{mouse-2} to invoke the button. @item type @kindex type @r{(button property)} @@ -4066,8 +4065,9 @@ A string displayed by the Emacs tool-tip help system; by default, @item follow-link @kindex follow-link @r{(button property)} -The follow-link property, defining how a @key{mouse-1} click behaves -on this button, @xref{Enabling Mouse-1 to Follow Links}. +The follow-link property, defining how a @key{Mouse-1} click behaves +on this button, @xref{Links and Mouse-1}. + @item button @kindex button @r{(button property)} All buttons have a non-@code{nil} @code{button} property, which may be useful @@ -4239,8 +4239,7 @@ These are commands and functions for locating and operating on buttons in an Emacs buffer. @code{push-button} is the command that a user uses to actually `push' -a button, and is bound by default in the button itself to @key{RET}, -to @key{mouse-1} (if @var{mouse-1-click-follows-link} is set), +a button, and is bound by default in the button itself to @key{RET} and to @key{mouse-2} using a region-specific keymap. Commands that are useful outside the buttons itself, such as @code{forward-button} and @code{backward-button} are additionally @@ -4248,6 +4247,10 @@ available in the keymap stored in @code{button-buffer-map}; a mode which uses buttons may want to use @code{button-buffer-map} as a parent keymap for its keymap. +If the button has a non-@code{nil} @code{follow-link} property, and +@var{mouse-1-click-follows-link} is set, a @key{Mouse-1} click will +also activate the @code{push-button} command. + @deffn Command push-button &optional pos use-mouse-action @tindex push-button Perform the action specified by a button at location @var{pos}. From 9deb0abaf8a49aa96d65cbf69091750a02a35159 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Wed, 12 Jan 2005 16:07:42 +0000 Subject: [PATCH 210/560] Fixed typo in Commentary section. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/elint.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e202eb2e01a..9a8a56f2e64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-12 Reiner Steib + + * emacs-lisp/elint.el: Fixed typo in Commentary section. + 2005-01-12 Jay Belanger * calc/calc-help.el (calc-describe-key): Use temporary info buffer diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 9454bfc9da3..d4967a7cd06 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -29,7 +29,7 @@ ;; mispellings and undefined variables, although it can also catch ;; function calls with the wrong number of arguments. -;; Before using, call `elint-initialize' to set up som argument +;; Before using, call `elint-initialize' to set up some argument ;; data. This takes a while. Then call elint-current-buffer or ;; elint-defun to lint a buffer or a defun. From 808882608af70b6993de814cba46ee23f74bcaca Mon Sep 17 00:00:00 2001 From: John Paul Wallington Date: Wed, 12 Jan 2005 22:49:19 +0000 Subject: [PATCH 211/560] (custom-declare-variable): Just put symbol instead of (defvar . symbol) on `current-load-list'. --- lisp/ChangeLog | 5 +++++ lisp/custom.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9a8a56f2e64..c1840d8ead7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-12 Johan Bockg,Ae(Brd + + * custom.el (custom-declare-variable): Just put symbol instead + of (defvar . symbol) on `current-load-list'. + 2005-01-12 Reiner Steib * emacs-lisp/elint.el: Fixed typo in Commentary section. diff --git a/lisp/custom.el b/lisp/custom.el index 5fea8c5d12d..e7aba88f72a 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -168,7 +168,7 @@ set to nil, as the value is no longer rogue." ;; Do the actual initialization. (unless custom-dont-initialize (funcall initialize symbol default))) - (push (cons 'defvar symbol) current-load-list) + (push symbol current-load-list) (run-hooks 'custom-define-hook) symbol) From e2244c1dd9d0d1d872fc2f0f9fd1b6079ad30951 Mon Sep 17 00:00:00 2001 From: John Paul Wallington Date: Wed, 12 Jan 2005 23:14:00 +0000 Subject: [PATCH 212/560] *** empty log message *** --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1840d8ead7..211cd322d86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,7 @@ 2005-01-12 Johan Bockg,Ae(Brd * custom.el (custom-declare-variable): Just put symbol instead - of (defvar . symbol) on `current-load-list'. + of (defvar . symbol) in `current-load-list'. 2005-01-12 Reiner Steib From 8253213c1029505f4ca6a8ff3f2e338579c1099c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 13 Jan 2005 04:33:05 +0000 Subject: [PATCH 213/560] (ispell-unified-chars-table): New variable. (ispell-get-decoded-string): New function. (ispell-get-casechars, ispell-get-not-casechars) (ispell-get-otherchars): Call ispell-get-decoded-string. --- lisp/textmodes/ispell.el | 51 +++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index f3a7616bfd6..0c4aeb1bd24 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1074,15 +1074,54 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs." (decode-coding-string str (ispell-get-coding-system)) str)) +(put 'ispell-unified-chars-table 'char-table-extra-slots 0) + +;; Char-table that maps an Unicode character (charset: +;; latin-iso8859-1, mule-unicode-0100-24ff, mule-unicode-2500-34ff) to +;; a string in which all equivalent characters are listed. + +(defconst ispell-unified-chars-table + (let ((table (make-char-table 'ispell-unified-chars-table))) + (map-char-table + #'(lambda (c v) + (if (and v (/= c v)) + (let ((unified (or (aref table v) (string v)))) + (aset table v (concat unified (string c)))))) + ucs-mule-8859-to-mule-unicode) + table)) + +;; Return a string decoded from Nth element of the current dictionary +;; while splice equivalent characters into the string. This splicing +;; is done only if the string is a regular expression of the form +;; "[...]" because, otherwise, splicing will result in incorrect +;; regular expression matching. + +(defun ispell-get-decoded-string (n) + (let* ((slot (assoc ispell-dictionary ispell-dictionary-alist)) + (str (nth n slot))) + (when (and (> (length str) 0) + (not (multibyte-string-p str))) + (setq str (ispell-decode-string str)) + (if (and (= (aref str 0) ?\[) + (eq (string-match "\\]" str) (1- (length str)))) + (setq str + (string-as-multibyte + (mapconcat + #'(lambda (c) + (let ((unichar (aref ucs-mule-8859-to-mule-unicode c))) + (if unichar + (aref ispell-unified-chars-table unichar) + (string c)))) + str "")))) + (setcar (nthcdr n slot) str)) + str)) + (defun ispell-get-casechars () - (ispell-decode-string - (nth 1 (assoc ispell-dictionary ispell-dictionary-alist)))) + (ispell-get-decoded-string 1)) (defun ispell-get-not-casechars () - (ispell-decode-string - (nth 2 (assoc ispell-dictionary ispell-dictionary-alist)))) + (ispell-get-decoded-string 2)) (defun ispell-get-otherchars () - (ispell-decode-string - (nth 3 (assoc ispell-dictionary ispell-dictionary-alist)))) + (ispell-get-decoded-string 3)) (defun ispell-get-many-otherchars-p () (nth 4 (assoc ispell-dictionary ispell-dictionary-alist))) (defun ispell-get-ispell-args () From 7573e36da24a2ef77db43bdd47bd1c28cd5fa58b Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 13 Jan 2005 04:38:31 +0000 Subject: [PATCH 214/560] *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 211cd322d86..5ae38147b3e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2005-01-13 Kenichi Handa + + * textmodes/ispell.el: These changes are to fix misalignment error + caused by equivalent characters of different Emacs charsets. + (ispell-unified-chars-table): New variable. + (ispell-get-decoded-string): New function. + (ispell-get-casechars, ispell-get-not-casechars) + (ispell-get-otherchars): Call ispell-get-decoded-string. + 2005-01-12 Johan Bockg,Ae(Brd * custom.el (custom-declare-variable): Just put symbol instead From 910f60b1656b526b77633077b15107949aea8655 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 13 Jan 2005 08:02:42 +0000 Subject: [PATCH 215/560] (Active Keymaps): Fix overriding-local-map description. --- lispref/ChangeLog | 4 ++++ lispref/keymaps.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 257310dc801..ba92593909e 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2005-01-13 Francis Litterio (tiny change) + + * keymaps.texi (Active Keymaps): Fix overriding-local-map description. + 2005-01-12 Kim F. Storm * text.texi (Links and Mouse-1): Rename section from Enabling diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index 089d29fc4ee..670184859f6 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -566,7 +566,7 @@ the order specified by @code{minor-mode-map-alist}; if they do not supply a binding for the key, Emacs searches the local map; if that too has no binding, Emacs then searches the global map. However, if @code{overriding-local-map} is non-@code{nil}, Emacs searches that map -first, before the global map. +first, before the minor mode maps. @cindex major mode keymap Since every buffer that uses the same major mode normally uses the From 8d3ef989116a671ea49debcd3cc9ed3d68491564 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 13 Jan 2005 09:36:01 +0000 Subject: [PATCH 216/560] (Fformat_mode_line): Fix last change. Remove NO_PROPS arg (specify 0 for FACE instead). Reorder arg list. Doc fix. --- src/xdisp.c | 70 ++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 7c3eb3cb378..2facc873743 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15978,54 +15978,55 @@ store_mode_line_string (string, lisp_string, copy_string, field_width, precision DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line, - 1, 5, 0, - doc: /* Return the mode-line of selected window as a string. -First arg FORMAT specifies the mode line format (see `mode-line-format' for -details) to use. Second (optional) arg WINDOW specifies the window to -use as the context for the formatting (default is the selected window). + 1, 4, 0, + doc: /* Format a string out of a mode line format specification. +First arg FORMAT specifies the mode line format (see `mode-line-format' +for details) to use. -If third (optional) arg NO-PROPS is non-nil, the value string has -no text properties. The fourth (optional) arg BUFFER specifies -which buffer to use (default, the current buffer). - -Fifth (optional) arg FACE specifies the face property to put +Optional second arg FACE specifies the face property to put on all characters for which no face is specified. t means whatever face the window's mode line currently uses \(either `mode-line' or `mode-line-inactive', depending). -nil means the default is no face property. */) - (format, window, no_props, buffer, face) - Lisp_Object format, window, no_props, buffer, face; +nil means the default is no face property. +If FACE is an integer, the value string has no text properties. + +Optional third and fourth args WINDOW and BUFFER specify the window +and buffer to use as the context for the formatting (defaults +are the selected window and the window's buffer). */) + (format, face, window, buffer) + Lisp_Object format, face, window, buffer; { struct it it; int len; struct window *w; struct buffer *old_buffer = NULL; - enum face_id face_id; + int face_id = -1; + int no_props = INTEGERP (face); if (NILP (window)) window = selected_window; CHECK_WINDOW (window); w = XWINDOW (window); - if (EQ (face, Qt)) - face = (EQ (window, selected_window) ? Qmode_line : Qmode_line_inactive); + if (NILP (buffer)) + buffer = w->buffer; + CHECK_BUFFER (buffer); + + if (NILP (format)) + return build_string (""); + + if (no_props) + face = Qnil; if (!NILP (face)) { - Lisp_Object tem = Fget (face, Qface); - if (INTEGERP (tem)) - face_id = XINT (tem); - else - { - face = Qnil; - face_id = DEFAULT_FACE_ID; - } + if (EQ (face, Qt)) + face = (EQ (window, selected_window) ? Qmode_line : Qmode_line_inactive); + face_id = lookup_named_face (XFRAME (WINDOW_FRAME (w)), face, 0, 0); } - if (NILP (buffer)) - buffer = w->buffer; - - CHECK_BUFFER (buffer); + if (face_id < 0) + face_id = DEFAULT_FACE_ID; if (XBUFFER (buffer) != current_buffer) { @@ -16033,20 +16034,13 @@ nil means the default is no face property. */) set_buffer_internal_1 (XBUFFER (buffer)); } - if (NILP (format) || EQ (format, Qt)) - face_id = (NILP (format) - ? CURRENT_MODE_LINE_FACE_ID (w) - : HEADER_LINE_FACE_ID); - init_iterator (&it, w, -1, -1, NULL, face_id); - if (NILP (no_props)) + if (!no_props) { mode_line_string_face = face; - mode_line_string_face_prop - = (NILP (mode_line_string_face) ? Qnil - : Fcons (Qface, Fcons (mode_line_string_face, Qnil))); + = (NILP (face) ? Qnil : Fcons (Qface, Fcons (face, Qnil))); /* We need a dummy last element in mode_line_string_list to indicate we are building the propertized mode-line string. @@ -16069,7 +16063,7 @@ nil means the default is no face property. */) if (old_buffer) set_buffer_internal_1 (old_buffer); - if (NILP (no_props)) + if (!no_props) { Lisp_Object str; mode_line_string_list = Fnreverse (mode_line_string_list); From f75a592e8a32362c5dde4fc5d0d2db0dc4969f65 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 13 Jan 2005 09:39:09 +0000 Subject: [PATCH 217/560] *** empty log message *** --- lispref/ChangeLog | 4 ++++ src/ChangeLog | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index ba92593909e..7346688747e 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2005-01-13 Kim F. Storm + + * modes.texi (Emulating Mode Line): Update format-mode-line entry. + 2005-01-13 Francis Litterio (tiny change) * keymaps.texi (Active Keymaps): Fix overriding-local-map description. diff --git a/src/ChangeLog b/src/ChangeLog index a9ae3348179..fef0ab1e1e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-13 Kim F. Storm + + * xdisp.c (Fformat_mode_line): Fix last change. Remove NO_PROPS arg + (specify 0 for FACE instead). Reorder arg list. Doc fix. + 2005-01-12 Richard M. Stallman * xdisp.c (Fformat_mode_line): New arg FACE specifies a default From f2dfc8562962fe0e1bcf31260238348665937c4c Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 13 Jan 2005 09:39:32 +0000 Subject: [PATCH 218/560] (Emulating Mode Line): Update format-mode-line entry. --- lispref/modes.texi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lispref/modes.texi b/lispref/modes.texi index ebedbc520b8..24cf95d6985 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1736,7 +1736,7 @@ It is normally @code{nil}, so that ordinary buffers have no header line. the text that would appear in a mode line or header line based on certain mode-line specification. -@defun format-mode-line format &optional window no-props buffer face +@defun format-mode-line format &optional face window buffer This function formats a line of text according to @var{format} as if it were generating the mode line for @var{window}, but instead of displaying the text in the mode line or the header line, it returns @@ -1752,13 +1752,12 @@ value which is usually @var{face}. (If @var{face} is @code{t}, that stands for either @code{mode-line} if @var{window} is selected, otherwise @code{mode-line-inactive}.) -However, if @var{no-props} is non-@code{nil}, the value has no text -properties. +However, if @var{face} is an integer, the value has no text properties. For example, @code{(format-mode-line header-line-format)} returns the text that would appear in the selected window's header line (@code{""} if it has no header line). @code{(format-mode-line header-line-format -nil nil nil 'header-line)} returns the same text, with each character +'header-line)} returns the same text, with each character carrying the face that it will have in the header line itself. @end defun From 0b5bb6b748cd95970b3c1d89de04b32e5834b6d9 Mon Sep 17 00:00:00 2001 From: Stephen Eglen Date: Thu, 13 Jan 2005 11:35:05 +0000 Subject: [PATCH 219/560] *** empty log message *** --- admin/FOR-RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index cace5cbdd46..daaeb27b80e 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -238,7 +238,7 @@ man/msdog.texi man/mule.texi "Luc Teirlinck" man/m-x.texi "Luc Teirlinck" man/picture.texi -man/programs.texi +man/programs.texi "Stephen Eglen" man/regs.texi "Luc Teirlinck" man/rmail.texi man/screen.texi "Luc Teirlinck" From 944b2ab6ca2ac4ef00b13f147978e03b10ef3701 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 13 Jan 2005 14:35:11 +0000 Subject: [PATCH 220/560] (url-retrieve-synchronously): Use accept-process-output rather than sit-for. --- lisp/url/ChangeLog | 5 +++++ lisp/url/url.el | 42 +++++++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index b3486e19acd..19f39265251 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2005-01-13 Stefan Monnier + + * url.el (url-retrieve-synchronously): Use accept-process-output rather + than sit-for. + 2005-01-03 Klaus Straubinger (tiny change) * url-http.el (url-http-handle-authentication): diff --git a/lisp/url/url.el b/lisp/url/url.el index f94e965129a..a9fd46bc23a 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -1,6 +1,7 @@ ;;; url.el --- Uniform Resource Locator retrieval tool -;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc. +;; Copyright (c) 1996, 1997, 1998, 1999, 2001, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Bill Perry ;; Keywords: comm, data, processes, hypermedia @@ -169,26 +170,25 @@ no further processing). URL is either a string or a parsed URL." (url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer)) (setq retrieval-done t asynch-buffer (current-buffer))))) - (if (not asynch-buffer) - ;; We do not need to do anything, it was a mailto or something - ;; similar that takes processing completely outside of the URL - ;; package. - nil - (while (not retrieval-done) - (url-debug 'retrieval "Spinning in url-retrieve-synchronously: %S (%S)" - retrieval-done asynch-buffer) - ;; Quoth Stef: - ;; It turns out that the problem seems to be that the (sit-for - ;; 0.1) below doesn't actually process the data: instead it - ;; returns immediately because there is keyboard input - ;; waiting, so we end up spinning endlessly waiting for the - ;; process to finish while not letting it finish. - - ;; However, raman claims that it blocks Emacs with Emacspeak - ;; for unexplained reasons. Put back for his benefit until - ;; someone can understand it. - ;; (sleep-for 0.1) - (sit-for 0.1)) + (let ((proc (and asynch-buffer (get-buffer-process asynch-buffer)))) + (if (null proc) + ;; We do not need to do anything, it was a mailto or something + ;; similar that takes processing completely outside of the URL + ;; package. + nil + (while (not retrieval-done) + (url-debug 'retrieval + "Spinning in url-retrieve-synchronously: %S (%S)" + retrieval-done asynch-buffer) + ;; We used to use `sit-for' here, but in some cases it wouldn't + ;; work because apparently pending keyboard input would always + ;; interrupt it before it got a chance to handle process input. + ;; `sleep-for' was tried but it lead to other forms of + ;; hanging. --Stef + (unless (accept-process-output proc) + ;; accept-process-output returned nil, maybe because the process + ;; exited (and may have been replaced with another). + (setq proc (get-buffer-process asynch-buffer))))) asynch-buffer))) (defun url-mm-callback (&rest ignored) From ed8031f295502477f3bf14cf1b99d2a9b821736e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 13 Jan 2005 14:51:57 +0000 Subject: [PATCH 221/560] (sgml-fill-nobreak): New fun. (sgml-mode): Use it. (sgml-get-context): Better keep track of implicitly closed tags. --- lisp/ChangeLog | 10 +++++-- lisp/textmodes/sgml-mode.el | 52 +++++++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 19 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ae38147b3e..d5d9cbe0829 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-13 Stefan Monnier + + * textmodes/sgml-mode.el (sgml-fill-nobreak): New fun. + (sgml-mode): Use it. + (sgml-get-context): Better keep track of implicitly closed tags. + 2005-01-13 Kenichi Handa * textmodes/ispell.el: These changes are to fix misalignment error @@ -28,8 +34,8 @@ 2005-01-12 Nick Roberts - * xt-mouse.el (xterm-mouse-translate, xterm-mouse-event): Enable - mouse clicks on mode-line, header-line and margin. + * xt-mouse.el (xterm-mouse-translate, xterm-mouse-event): + Enable mouse clicks on mode-line, header-line and margin. (event-type): Give mouse event symbols an 'event-kind property with value 'mouse-click. diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index dd606a53434..9e18dbc0651 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -1,6 +1,6 @@ ;;; sgml-mode.el --- SGML- and HTML-editing modes -;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004 +;; Copyright (C) 1992, 1995, 1996, 1998, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: James Clark @@ -394,6 +394,14 @@ Otherwise, it is set to be buffer-local when the file has (concat "<" face ">")) (error "Face not configured for %s mode" mode-name))) +(defun sgml-fill-nobreak () + ;; Don't break between a tag name and its first argument. + (save-excursion + (skip-chars-backward " \t") + (and (not (zerop (skip-syntax-backward "w_"))) + (skip-chars-backward "/?!") + (eq (char-before) ?<)))) + ;;;###autoload (define-derived-mode sgml-mode text-mode "SGML" "Major mode for editing SGML documents. @@ -424,6 +432,7 @@ Do \\[describe-key] on the following bindings to discover what they do. (set (make-local-variable 'paragraph-separate) (concat paragraph-start "$")) (set (make-local-variable 'adaptive-fill-regexp) "[ \t]*") + (add-hook 'fill-nobreak-predicate 'sgml-fill-nobreak nil t) (set (make-local-variable 'indent-line-function) 'sgml-indent-line) (set (make-local-variable 'comment-start) "") @@ -1140,17 +1149,19 @@ immediately enclosing the current position. Point is assumed to be outside of any tag. If we discover that it's not the case, the first tag returned is the one inside which we are." (let ((here (point)) + (stack nil) (ignore nil) (context nil) tag-info) ;; CONTEXT keeps track of the tag-stack - ;; IGNORE keeps track of the nesting level of point relative to the - ;; first (outermost) tag on the context. This is the list of - ;; enclosing start-tags we'll have to ignore. + ;; STACK keeps track of the end tags we've seen (and thus the start-tags + ;; we'll have to ignore) when skipping over matching open..close pairs. + ;; IGNORE is a list of tags that can be ignored because they have been + ;; closed implicitly. (skip-chars-backward " \t\n") ; Make sure we're not at indentation. (while (and (not (eq until 'now)) - (or ignore + (or stack (not (if until (eq until 'empty) context)) (not (sgml-at-indentation-p)) (and context @@ -1174,24 +1185,25 @@ not the case, the first tag returned is the one inside which we are." ;; start-tag ((eq (sgml-tag-type tag-info) 'open) (cond - ((null ignore) - (if (and context - (sgml-unclosed-tag-p (sgml-tag-name tag-info)) - (eq t (compare-strings - (sgml-tag-name tag-info) nil nil - (sgml-tag-name (car context)) nil nil t))) + ((null stack) + (if (member-ignore-case (sgml-tag-name tag-info) ignore) ;; There was an implicit end-tag. nil - (push tag-info context))) + (push tag-info context) + ;; We're changing context so the tags implicitly closed inside + ;; the previous context aren't implicitly closed here any more. + ;; [ Well, actually it depends, but we don't have the info about + ;; when it doesn't and when it does. --Stef ] + (setq ignore nil))) ((eq t (compare-strings (sgml-tag-name tag-info) nil nil - (car ignore) nil nil t)) - (setq ignore (cdr ignore))) + (car stack) nil nil t)) + (setq stack (cdr stack))) (t ;; The open and close tags don't match. (if (not sgml-xml-mode) (unless (sgml-unclosed-tag-p (sgml-tag-name tag-info)) (message "Unclosed tag <%s>" (sgml-tag-name tag-info)) - (let ((tmp ignore)) + (let ((tmp stack)) ;; We could just assume that the tag is simply not closed ;; but it's a bad assumption when tags *are* closed but ;; not properly nested. @@ -1202,13 +1214,19 @@ not the case, the first tag returned is the one inside which we are." (setq tmp (cdr tmp))) (if (cdr tmp) (setcdr tmp (cddr tmp))))) (message "Unmatched tags <%s> and " - (sgml-tag-name tag-info) (pop ignore)))))) + (sgml-tag-name tag-info) (pop stack))))) + + (if (and (null stack) (sgml-unclosed-tag-p (sgml-tag-name tag-info))) + ;; This is a top-level open of an implicitly closed tag, so any + ;; occurrence of such an open tag at the same level can be ignored + ;; because it's been implicitly closed. + (push (sgml-tag-name tag-info) ignore))) ;; end-tag ((eq (sgml-tag-type tag-info) 'close) (if (sgml-empty-tag-p (sgml-tag-name tag-info)) (message "Spurious : empty tag" (sgml-tag-name tag-info)) - (push (sgml-tag-name tag-info) ignore))) + (push (sgml-tag-name tag-info) stack))) )) ;; return context From 5a45dd33e3d545e7bc790dfa1d7a15e2605a4857 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 19:43:09 +0000 Subject: [PATCH 222/560] (syms_of_keyboard): Doc fix. --- src/keyboard.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 1c6f3f7c5f5..4a99ee1bc19 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11269,14 +11269,15 @@ The elements of the list are event types that may have menu bar bindings. */); doc: /* Per-terminal keymap that overrides all other local keymaps. If this variable is non-nil, it is used as a keymap instead of the buffer's local map, and the minor mode keymaps and text property keymaps. -It also overrides `overriding-local-map'. +It also replaces `overriding-local-map'. + This variable is intended to let commands such as `universal-argument' set up a different keymap for reading the next command. */); DEFVAR_LISP ("overriding-local-map", &Voverriding_local_map, doc: /* Keymap that overrides all other local keymaps. -If this variable is non-nil, it is used as a keymap instead of the -buffer's local map, and the minor mode keymaps and text property keymaps. */); +If this variable is non-nil, it is used as a keymap--replacing the +buffer's local map, the minor mode keymaps, and char property keymaps. */); Voverriding_local_map = Qnil; DEFVAR_LISP ("overriding-local-map-menu-flag", &Voverriding_local_map_menu_flag, From ef8f2df66a7486e7a52c2df55f106f7a4c2959f6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 19:45:51 +0000 Subject: [PATCH 223/560] Whitespace change. --- lisp/help-macro.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/help-macro.el b/lisp/help-macro.el index a36eed86d01..3a7cf0898cb 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el @@ -121,7 +121,7 @@ and then returns." (if three-step-help (progn (setq key (let ((overriding-local-map local-map)) - (read-key-sequence nil))) + (read-key-sequence nil))) ;; Make the HELP key translate to C-h. (if (lookup-key function-key-map key) (setq key (lookup-key function-key-map key))) From d64cdc59724b7caca47913d5beb2b4a54f7b7c91 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 19:49:53 +0000 Subject: [PATCH 224/560] (Fcurrent_active_maps): Ignore Voverriding_local_map if Voverriding_terminal_local_map is non-nil. --- src/keymap.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index 99883415914..f5675d563ee 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1486,10 +1486,13 @@ OLP if non-nil indicates that we should obey `overriding-local-map' and if (!NILP (olp)) { - if (!NILP (Voverriding_local_map)) - keymaps = Fcons (Voverriding_local_map, keymaps); if (!NILP (current_kboard->Voverriding_terminal_local_map)) keymaps = Fcons (current_kboard->Voverriding_terminal_local_map, keymaps); + /* The doc said that overriding-terminal-local-map should + override overriding-local-map. The code used them both, + but it seems clearer to use just one. rms, jan 2005. */ + else if (!NILP (Voverriding_local_map)) + keymaps = Fcons (Voverriding_local_map, keymaps); } if (NILP (XCDR (keymaps))) { @@ -1497,16 +1500,20 @@ OLP if non-nil indicates that we should obey `overriding-local-map' and Lisp_Object *maps; int nmaps, i; + /* This usually returns the buffer's local map, + but that can be overridden by a `local-map' property. */ local = get_local_map (PT, current_buffer, Qlocal_map); if (!NILP (local)) keymaps = Fcons (local, keymaps); + /* Now put all the minor mode keymaps on the list. */ nmaps = current_minor_maps (0, &maps); for (i = --nmaps; i >= 0; i--) if (!NILP (maps[i])) keymaps = Fcons (maps[i], keymaps); + /* This returns nil unless there is a `keymap' property. */ local = get_local_map (PT, current_buffer, Qkeymap); if (!NILP (local)) keymaps = Fcons (local, keymaps); From d43f4539cc450f6cd13a9c7318fe9bece41ae5da Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 19:53:58 +0000 Subject: [PATCH 225/560] (Commands): Clarification. --- man/commands.texi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/man/commands.texi b/man/commands.texi index 54ec50acfe8..cc8537c1271 100644 --- a/man/commands.texi +++ b/man/commands.texi @@ -222,13 +222,15 @@ this effect @emph{because} it is bound to that command. If you rebind forward by words instead. Rebinding keys is a common method of customization.@refill - In the rest of this manual, we usually ignore this subtlety to keep -things simple. To give the information needed for customization, we -state the name of the command which really does the work in parentheses + In the rest of this manual, we usually ignore this distinction to +keep things simple. We will often speak of keys like @kbd{C-n} as +commands, even though strictly speaking a key is bound to some +command. To give the information needed for customization, we state +the name of the command which really does the work in parentheses after mentioning the key that runs it. For example, we will say that ``The command @kbd{C-n} (@code{next-line}) moves point vertically -down,'' meaning that @code{next-line} is a command that moves vertically -down, and @kbd{C-n} is a key that is normally bound to it. +down,'' meaning that @code{next-line} is a command that moves +vertically down, and @kbd{C-n} is a key that is normally bound to it. While we are on the subject of information for customization only, it's a good time to tell you about @dfn{variables}. Often the From cf819102fc70595984c96c4e3c0dcaa0c4402cc4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 19:59:22 +0000 Subject: [PATCH 226/560] (Links and Mouse-1): Clarify text. --- lispref/text.texi | 57 ++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/lispref/text.texi b/lispref/text.texi index 9807fda05dd..970b8f0eec1 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -3403,29 +3403,29 @@ customize this behaviour through the variable @code{mouse-1-click-follows-link}. To define text as a link at the Lisp level, you should bind the -@code{mouse-2} event to a command to follow the link. Then, to -indicate that @key{Mouse-1} should also follow the link, here is what -you do: +@code{mouse-2} event to a command to follow the link. Then, to indicate that +@key{Mouse-1} should also follow the link, you should specify a +@code{follow-link} condition either as a text property or as a key +binding: @table @asis @item @code{follow-link} property If the clickable text has a non-@code{nil} @code{follow-link} text or overlay -property, the value of that property determines what to do. +property, that specifies the condition. @item @code{follow-link} event -If there is a binding for the @code{follow-link} event, either on -the clickable text or in the local keymap, the binding of that event -determines whether the mouse click position is inside a link. +If there is a binding for the @code{follow-link} event, either on the +clickable text or in the local keymap, the binding is the condition. @end table - Regardless of where the @code{follow-link} value comes from, that -value is used according to the following table to determine whether -the given position is inside a link, and (if so) to compute an -@dfn{action code} saying how @key{Mouse-1} should handle the link. + Regardless of how you set the @code{follow-link} condition, its +value is used as follows to determine whether the given position is +inside a link, and (if so) to compute an @dfn{action code} saying how +@key{Mouse-1} should handle the link. @table @asis @item @code{mouse-face} -If the value is @code{mouse-face}, a position is inside a link if +If the condition is @code{mouse-face}, a position is inside a link if there is a non-@code{nil} @code{mouse-face} property at that position. The action code is always @code{t}. @@ -3436,10 +3436,10 @@ For example, here is how Info mode handles @key{Mouse-1}: @end example @item a function -If the value is a function, @var{func}, then a position @var{pos} is -inside a link if @code{(@var{func} @var{pos})} evaluates to -non-@code{nil}. The value returned by @var{func} serves as the action -code. +If the condition is a valid function, @var{func}, then a position +@var{pos} is inside a link if @code{(@var{func} @var{pos})} evaluates +to non-@code{nil}. The value returned by @var{func} serves as the +action code. For example, here is how pcvs enables @key{Mouse-1} to follow links on file names only: @@ -3451,26 +3451,23 @@ file names only: @end example @item anything else -If the value is anything else, it is the action code. +If the condition value is anything else, then the position is inside a +link and the condition itself is the action code. Clearly you should +only specify this kind of condition on the text that constitutes a +link. @end table @noindent -Here's how the action code determines what @key{Mouse-1} should do: +The action code tells @key{Mouse-1} how to follow the link: @table @asis @item a string -If the action code is a string, the @key{Mouse-1} event is translated -into the first character of the string, i.e., the action of the -@key{Mouse-1} click is the local or global binding of that character. -Thus, if the action code is @code{"foo"}, @key{Mouse-1} translates -into @kbd{f}. - -@item a vector -If the action code is is a vector, the @key{Mouse-1} event is -translated into the first element of that vector, i.e,. the action of -the @key{Mouse-1} click is the local or global binding of that event. -Thus, if the action code is @code{[?f ?o ?o]}, @key{Mouse-1} -translates into @kbd{f}. +If the action code is a string or vector, the @key{Mouse-1} event is +translated into the first element of the string or vector; i.e., the +action of the @key{Mouse-1} click is the local or global binding of +that character. Thus, if the action code is @code{"foo"}, +@key{Mouse-1} translates into @kbd{f}. If it is @code{[foo]}, +@key{Mouse-1} translates into @key{foo}. @item anything else For any other non-@code{nil} action code, the @code{mouse-1} event is From d38edfc317e7ba351b8f4fc208022350054121b6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 20:02:09 +0000 Subject: [PATCH 227/560] (Active Keymaps): Rewrite the text, and update the descriptions of overriding-local-map and overriding-terminal-local-map. --- lispref/keymaps.texi | 68 +++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index 670184859f6..db280fb9034 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -532,41 +532,46 @@ string for the keymap. The prompt string should be given for menu keymaps @cindex global keymap @cindex local keymap - Emacs normally contains many keymaps; at any given time, just a few of -them are @dfn{active} in that they participate in the interpretation -of user input. These are the global keymap, the current buffer's -local keymap, and the keymaps of any enabled minor modes. + Emacs normally contains many keymaps; at any given time, just a few +of them are @dfn{active} in that they participate in the +interpretation of user input. All the active keymaps are used +together to determine what command to execute when a key is entered. +Emacs searches these keymaps one by one, in a standard order, until it +finds a binding in one of the keymaps. (Searching a single keymap for a +binding is called @dfn{key lookup}; see @ref{Key Lookup}.) + + Normally the active keymaps are the @code{keymap} property keymap, +the keymaps of any enabled minor modes, the current buffer's local +keymap, and the global keymap, in that order. Therefore, Emacs +searches for each input key sequence in all these keymaps. The @dfn{global keymap} holds the bindings of keys that are defined regardless of the current buffer, such as @kbd{C-f}. The variable @code{global-map} holds this keymap, which is always active. - Each buffer may have another keymap, its @dfn{local keymap}, which may -contain new or overriding definitions for keys. The current buffer's -local keymap is always active except when @code{overriding-local-map} -overrides it. Text properties can specify an alternative local map for -certain parts of the buffer; see @ref{Special Properties}. + Each buffer may have another keymap, its @dfn{local keymap}, which +may contain new or overriding definitions for keys. The current +buffer's local keymap is always active except when +@code{overriding-local-map} overrides it. The @code{local-map} text +or overlay property can specify an alternative local keymap for certain +parts of the buffer; see @ref{Special Properties}. Each minor mode can have a keymap; if it does, the keymap is active -when the minor mode is enabled. +when the minor mode is enabled. Modes for emulation can specify +additional active keymaps through the variable +@code{emulation-mode-map-alists}. - The variable @code{overriding-local-map}, if non-@code{nil}, specifies -another local keymap that overrides the buffer's local map and all the -minor mode keymaps. Modes for emulation can specify additional -active keymaps through the variable @code{emulation-mode-map-alists}. + The highest precedence normal keymap comes from the @code{keymapo} +text or overlay property. If that is non-@code{nil}, it is the first +keymap to be processed, in normal circumstances. - All the active keymaps are used together to determine what command to -execute when a key is entered. Emacs searches these maps one by one, in -order of decreasing precedence, until it finds a binding in one of the -maps. The procedure for searching a single keymap is called @dfn{key -lookup}; see @ref{Key Lookup}. - - Normally, Emacs first searches for the key in the minor mode maps, in -the order specified by @code{minor-mode-map-alist}; if they do not -supply a binding for the key, Emacs searches the local map; if that too -has no binding, Emacs then searches the global map. However, if -@code{overriding-local-map} is non-@code{nil}, Emacs searches that map -first, before the minor mode maps. + However, there are also special circumstances, ways programs can +substitute other keymaps for some of those. The variable +@code{overriding-local-map}, if non-@code{nil}, specifies a keymap +that replaces all the usual active keymaps except the global keymap. +Another way to do this is with @code{overriding-terminal-local-map}; +it operates on a per-terminal basis. These variables are documented +below. @cindex major mode keymap Since every buffer that uses the same major mode normally uses the @@ -575,7 +580,7 @@ change to the local keymap of a buffer (using @code{local-set-key}, for example) is seen also in the other buffers that share that keymap. The local keymaps that are used for Lisp mode and some other major -modes exist even if they have not yet been used. These local maps are +modes exist even if they have not yet been used. These local keymaps are the values of variables such as @code{lisp-mode-map}. For most major modes, which are less frequently used, the local keymap is constructed only when the mode is used for the first time in a session. @@ -594,7 +599,7 @@ keyboard input to commands. The global keymap is normally this keymap. The default global keymap is a full keymap that binds @code{self-insert-command} to all of the printing characters. -It is normal practice to change the bindings in the global map, but you +It is normal practice to change the bindings in the global keymap, but you should not assign this variable any value other than the keymap it starts out with. @end defvar @@ -701,10 +706,9 @@ all buffers. @defvar overriding-local-map If non-@code{nil}, this variable holds a keymap to use instead of the -buffer's local keymap, text property or overlay keymaps, and instead -of all the minor mode keymaps. This keymap, if any, overrides all -other maps that would have been active, except for the current global -map. +buffer's local keymap, any text property or overlay keymaps, and any +minor mode keymaps. This keymap, if specified, overrides all other +maps that would have been active, except for the current global map. @end defvar @defvar overriding-terminal-local-map From 2e36c3b0f8878ba262da6fba5a235beea8a3b91d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 20:06:32 +0000 Subject: [PATCH 228/560] Comment change. --- lisp/mouse.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/mouse.el b/lisp/mouse.el index edf75753062..7d94b678ca2 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -757,6 +757,7 @@ If the click is in the echo area, display the `*Messages*' buffer." (if (and (window-minibuffer-p w) (not (minibuffer-window-active-p w))) (save-excursion + ;; Swallow the up-event. (read-event) (set-buffer "*Messages*") (goto-char (point-max)) From b23475d215fe117a6a95aea283106c67628dc016 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 20:09:54 +0000 Subject: [PATCH 229/560] Add entries of some well known and widely used packages. --- etc/MORE.STUFF | 69 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF index 4dcdafe8152..f5da8954c9b 100644 --- a/etc/MORE.STUFF +++ b/etc/MORE.STUFF @@ -34,7 +34,7 @@ The Emacs Wiki has an area for storing elisp files You might find bug-fixes or enhancements in these places. - * Ada: + * Ada-mode: * Battery and Info Look: @@ -80,6 +80,8 @@ You might find bug-fixes or enhancements in these places. * Iswitchb: + * MH-E: + * PC Selection: * PS mode: @@ -133,6 +135,12 @@ Several are for Debian GNU/Linux in particular. emacs-mule, say by adding `("\\.bbdb\\'" . emacs-mule)' to `file-coding-system-alist' for non-ASCII characters.] + * Boxquote: + + * CEDET: Collection of Emacs Development Environment Tools, including + EIEIO, Semantic, Speedbar, EDE, and COGRE: + + * CJK-emacs: Converting MULE-encoded text to TeX: and mirrors of the `CTAN' TeX archives. @@ -140,14 +148,13 @@ Several are for Debian GNU/Linux in particular. * Dismal: spreadsheet: + * ECB: Emacs Code Browser: + * EDB: database: * Ee: categorizing information manager: - * EIEIO (object system), ETalk (interface to Internet talk): - - * EFS: enhanced version of ange-ftp: Version 1.16 is said not to work properly with Emacs 20. @@ -156,12 +163,25 @@ Several are for Debian GNU/Linux in particular. From GNU distribution mirrors. (Much of this functionality is now in Emacs.) + * EMacro: + EMacro is a portable configuration file that configures itself. + * Emacs statistical system (ESS): statistical programming within Emacs * Emacspeak -- A Speech Output Subsystem For Emacs: + * Emacs-w3m : + A simple Emacs interface to w3m, which is a text-mode + WWW browser + + * Emacs Wiki Mode: + A wiki-like publishing tool and personal information manager + + * ERC: IRC client: + + * Gnuserv: Enhanced emacsclient/emacsserver. See also @@ -184,7 +204,7 @@ Several are for Debian GNU/Linux in particular. Provides an interactive environment for manipulating an inferior process running some form of Lisp. - * JDE: + * JDEE: Provides a Java development environment for Emacs. * Mule-UCS: Universal enCoding System: @@ -195,10 +215,25 @@ Several are for Debian GNU/Linux in particular. `utf-translate-cjk' turned on. * Mailcrypt: - + PGP and GPG support. PGP isn't free software, but GPG, the GNU Privacy Guard, is a free replacement . + * Mew: + A MIME mail reader for Emacs/XEmacs. + + * MMM Mode: + MMM Mode is an emacs add-on package providing a minor mode that + allows Multiple Major Modes to coexist in one buffer. + + * nXML Mode: New mode for XML: + + nXML mode is an addon for GNU Emacs, which makes GNU Emacs into a + powerful XML editor. + + * Planner Mode: + + * Pointers to MIME packages: @@ -208,6 +243,18 @@ Several are for Debian GNU/Linux in particular. * PSGML: DTD-aware serious SGML/XML editing. + * Quack: + Quack enhances Emacs support for Scheme + + * Remember: + + + * Session: + Session Management for Emacs. + + * SLIME: The Superior Lisp Interaction Mode for Emacs: + + * Tamago: Chinese/Japanese/Korean input method Emacs Lisp package to provide input methods for CJK characters. @@ -216,6 +263,8 @@ Several are for Debian GNU/Linux in particular. Wnn6, SJ3 Ver.2 + * Tiny Tools: + * VM (View Mail): Alternative mail reader. There is a VM newsgroup: @@ -224,6 +273,14 @@ Several are for Debian GNU/Linux in particular. and a W3 development mail list/newsgroup . + * Wanderlust: + Yet Another Message Interface on Emacsen. Wanderlust is a mail/news + reader supporting IMAP4rev1 for emacsen. + + * WhizzyTex: + WhizzyTeX provides a minor mode for Emacs or XEmacs, a (bash) + shell-script daemon and some LaTeX macros. + * X-Symbol: Quasi-WYSIWYG editing of TeX & al. (It will be improved to take better advantage of Emacs 21 features.) From 20d6de825243c2495ae87a3274ae65cea023d8a4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Jan 2005 20:10:26 +0000 Subject: [PATCH 230/560] *** empty log message *** --- etc/ChangeLog | 4 ++++ lispref/ChangeLog | 7 +++++++ man/ChangeLog | 4 ++++ src/ChangeLog | 7 +++++++ 4 files changed, 22 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 6b0cdc9de3d..c5521f5a053 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-01-13 Cheng Gao + + * MORE.STUFF: Add entries of some well known and widely used packages. + 2005-01-07 Lars Hansen * NEWS: Describe desktop package lazy restore feature. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 7346688747e..183fdb11ce4 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,10 @@ +2005-01-13 Richard M. Stallman + + * keymaps.texi (Active Keymaps): Rewrite the text, and update the + descriptions of overriding-local-map and overriding-terminal-local-map. + + * text.texi (Links and Mouse-1): Clarify text. + 2005-01-13 Kim F. Storm * modes.texi (Emulating Mode Line): Update format-mode-line entry. diff --git a/man/ChangeLog b/man/ChangeLog index 9b9505559ca..6d4265195f8 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-13 Richard M. Stallman + + * commands.texi (Commands): Clarification. + 2005-01-11 Richard M. Stallman * programs.texi (Multi-line Indent): Fix previous change. diff --git a/src/ChangeLog b/src/ChangeLog index fef0ab1e1e9..ae4c8fd4c5d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-01-13 Richard M. Stallman + + * keymap.c (Fcurrent_active_maps): Ignore Voverriding_local_map + if Voverriding_terminal_local_map is non-nil. + + * keyboard.c (syms_of_keyboard): Doc fix. + 2005-01-13 Kim F. Storm * xdisp.c (Fformat_mode_line): Fix last change. Remove NO_PROPS arg From 8ed9e36a4dcd3158cd839f7a2fe0209c0a3f0010 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 13 Jan 2005 23:19:47 +0000 Subject: [PATCH 231/560] (Active Keymaps): Correct typo. --- lispref/keymaps.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index db280fb9034..b3ae0d8808e 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -561,7 +561,7 @@ when the minor mode is enabled. Modes for emulation can specify additional active keymaps through the variable @code{emulation-mode-map-alists}. - The highest precedence normal keymap comes from the @code{keymapo} + The highest precedence normal keymap comes from the @code{keymap} text or overlay property. If that is non-@code{nil}, it is the first keymap to be processed, in normal circumstances. From 5ca75c83ef58d012acef2a4bea01281cc5c0fa89 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 14 Jan 2005 07:35:58 +0000 Subject: [PATCH 232/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5d9cbe0829..1819c20b58a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-14 Nick Roberts + + * xt-mouse.el (xterm-mouse-event): Compute window co-ordinates + more carefully. + 2005-01-13 Stefan Monnier * textmodes/sgml-mode.el (sgml-fill-nobreak): New fun. From fcd9df1bf09a63ee2c7b39966f360e37d557fb71 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 14 Jan 2005 07:36:50 +0000 Subject: [PATCH 233/560] (xterm-mouse-event): Compute window co-ordinates more carefully. --- lisp/xt-mouse.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index de93456ad5a..5709834ab91 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -138,15 +138,17 @@ (t (setq xterm-mouse-last type) (format "down-mouse-%d" (+ 1 type)))))) - (w (window-at x y))) + (w (window-at x y)) + (ltrb (window-edges w)) + (left (nth 0 ltrb)) + (top (nth 1 ltrb))) + (setq xterm-mouse-x x xterm-mouse-y y) (if w - (list mouse (posn-at-x-y x (if menu-bar-mode (- y 1) y) w)) + (list mouse (posn-at-x-y (- x left) (- y top) w)) (list mouse - (append (list nil 'menu-bar) - (nthcdr 2 (posn-at-x-y - x (if menu-bar-mode (- y 1) y) w))))))) + (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w))))))) ;;;###autoload (define-minor-mode xterm-mouse-mode From 6ac8a822ecbcf7757da066e17ed6a157f4ebc109 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 14 Jan 2005 09:35:10 +0000 Subject: [PATCH 234/560] *** empty log message *** --- lispref/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 183fdb11ce4..3e2849ea859 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2005-01-14 Kim F. Storm + + * text.texi (Links and Mouse-1): Fix string and vector item. + 2005-01-13 Richard M. Stallman * keymaps.texi (Active Keymaps): Rewrite the text, and update the From 1b1c49e1b3d20b1f4222cdd22371cc1b235fa7d8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 14 Jan 2005 09:35:32 +0000 Subject: [PATCH 235/560] (Links and Mouse-1): Fix string and vector item. --- lispref/text.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lispref/text.texi b/lispref/text.texi index 970b8f0eec1..338be03baf1 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -3461,11 +3461,11 @@ link. The action code tells @key{Mouse-1} how to follow the link: @table @asis -@item a string +@item a string or vector If the action code is a string or vector, the @key{Mouse-1} event is translated into the first element of the string or vector; i.e., the action of the @key{Mouse-1} click is the local or global binding of -that character. Thus, if the action code is @code{"foo"}, +that character or symbol. Thus, if the action code is @code{"foo"}, @key{Mouse-1} translates into @kbd{f}. If it is @code{[foo]}, @key{Mouse-1} translates into @key{foo}. From f3c18bd097dfc12ce31e3002c1b1743ffa811f1f Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:12:03 +0000 Subject: [PATCH 236/560] 2005-01-14 Carsten Dominik * reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes %m and %M, fixed bug with %F by adding save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition * reftex-index.el (reftex-index-next-phrase): Added slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' (reftex-display-index): New argument redo (reftex-index-rescan): Added 'redo to arguments of `reftex-display-index' (reftex-index-Rescan, reftex-index-revert) (reftex-index-switch-index-tag): Added 'redo to arguments of `reftex-display-index' (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive indexing. Fixed bug with matching is there is a quote before or after the word. * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. * reftex-vars.el (reftex-cite-format-builtin): Added optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option * reftex-toc.el (reftex-toc-find-section): Added push-mark before changing the position in the buffer. * reftex.el (reftex-prefix-to-typekey-alist): New variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist --- lisp/textmodes/reftex-auc.el | 4 +- lisp/textmodes/reftex-cite.el | 149 +++++++++++++++++++++++++++++--- lisp/textmodes/reftex-dcr.el | 4 +- lisp/textmodes/reftex-global.el | 4 +- lisp/textmodes/reftex-index.el | 45 +++++----- lisp/textmodes/reftex-parse.el | 4 +- lisp/textmodes/reftex-ref.el | 97 +++++++++++++-------- lisp/textmodes/reftex-sel.el | 18 ++-- lisp/textmodes/reftex-toc.el | 9 +- lisp/textmodes/reftex-vars.el | 108 +++++++++++++++++++---- lisp/textmodes/reftex.el | 19 +++- 11 files changed, 351 insertions(+), 110 deletions(-) diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el index 534e4e7b27b..93cd0757b4e 100644 --- a/lisp/textmodes/reftex-auc.el +++ b/lisp/textmodes/reftex-auc.el @@ -1,8 +1,8 @@ ;;; reftex-auc.el --- RefTeX's interface to AUCTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index cfebdbdced1..54dc46eac4f 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -1,8 +1,8 @@ ;;; reftex-cite.el --- creating citations with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. @@ -49,11 +49,11 @@ TAB Enter citation key with completion. RET Accept current entry (also on mouse-2) and create \\cite macro. m / u Mark/Unmark the entry. + e / E Create BibTeX file with all (marked/unmarked) entries a / A Put all (marked) entries into one/many \\cite commands.") ;; Find bibtex files - (defmacro reftex-with-special-syntax-for-bib (&rest body) `(let ((saved-syntax (syntax-table))) (unwind-protect @@ -311,8 +311,8 @@ (not (stringp (car al1)))))) (defun reftex-bib-sort-year (e1 e2) - (< (string-to-int (cdr (assoc "year" e1))) - (string-to-int (cdr (assoc "year" e2))))) + (< (string-to-int (or (cdr (assoc "year" e1)) "0")) + (string-to-int (or (cdr (assoc "year" e2)) "0")))) (defun reftex-bib-sort-year-reverse (e1 e2) (> (string-to-int (or (cdr (assoc "year" e1)) "0")) @@ -597,12 +597,13 @@ to `reftex-cite-format' and inserted into the buffer. If NO-INSERT is non-nil, nothing is inserted, only the selected key returned. -FORMAT-KEY can be used to pre-select a citation format. +FORAT-KEY can be used to pre-select a citation format. -When called with one or two `C-u' prefixes, first rescans the document. -When called with a numeric prefix, make that many citations. When -called with point inside the braces of a `\\cite' command, it will -add another key, ignoring the value of `reftex-cite-format'. +When called with a `C-u' prefix, prompt for optional arguments in +cite macros. When called with a numeric prefix, make that many +citations. When called with point inside the braces of a `\\cite' +command, it will add another key, ignoring the value of +`reftex-cite-format'. The regular expression uses an expanded syntax: && is interpreted as `and'. Thus, `aaaa&&bbb' matches entries which contain both `aaaa' and `bbb'. @@ -618,7 +619,7 @@ While entering the regexp, completion on knows citation keys is possible. ;; Thus look for the scanning info only if in reftex-mode. (when reftex-mode - (reftex-access-scan-info current-prefix-arg)) + (reftex-access-scan-info nil)) ;; Call reftex-do-citation, but protected (unwind-protect @@ -629,11 +630,14 @@ While entering the regexp, completion on knows citation keys is possible. ;; This really does the work of reftex-citation. (let* ((format (reftex-figure-out-cite-format arg no-insert format-key)) + (start 0) (docstruct-symbol reftex-docstruct-symbol) (selected-entries (reftex-offer-bib-menu)) (insert-entries selected-entries) entry string cite-view) + (when (stringp selected-entries) + (error selected-entries)) (unless selected-entries (error "Quit")) (if (stringp selected-entries) @@ -646,6 +650,7 @@ While entering the regexp, completion on knows citation keys is possible. (when (eq (car selected-entries) 'concat) ;; All keys go into a single command - we need to trick a little + ;; FIXME: Unfortunately, this meens that commenting does not work right. (pop selected-entries) (let ((concat-keys (mapconcat 'car selected-entries ","))) (setq insert-entries @@ -655,7 +660,7 @@ While entering the regexp, completion on knows citation keys is possible. ;; We shall insert this into the buffer... (message "Formatting...") - + (while (setq entry (pop insert-entries)) ;; Format the citation and insert it (setq string (if reftex-format-cite-function @@ -663,6 +668,24 @@ While entering the regexp, completion on knows citation keys is possible. (reftex-get-bib-field "&key" entry) format) (reftex-format-citation entry format))) + (when (or (eq reftex-cite-prompt-optional-args t) + (and reftex-cite-prompt-optional-args + (equal arg '(4)))) + (let ((start 0) (nth 0) value) + (while (setq start (string-match "\\[\\]" string start)) + (setq value (read-string (format "Optional argument %d: " + (setq nth (1+ nth))))) + (setq string (replace-match (concat "[" value "]") t t string)) + (setq start (1+ start))))) + ;; Should we cleanup empty optional arguments? + ;; if the first is empty, it can be removed. If the second is empty, + ;; it has to go. + (when reftex-cite-cleanup-optional-args + (cond + ((string-match "\\[\\]\\(\\[[a-zA-Z0-9., ]+\\]\\)" string) + (setq string (replace-match "\\1" nil nil string))) + ((string-match "\\[\\]\\[\\]" string) + (setq string (replace-match "" t t string))))) (insert string)) ;; Reposition cursor? @@ -842,6 +865,17 @@ While entering the regexp, completion on knows citation keys is possible. (mapcar 'car (nreverse reftex-select-marked)) found-list))) (throw 'done t)) + ((eq key ?e) + ;; Take all (marked), and push the symbol 'concat + (reftex-extract-bib-file found-list reftex-select-marked) + (setq selected-entries "BibTeX database file created") + (throw 'done t)) + ((eq key ?E) + ;; Take all (marked), and push the symbol 'concat + (reftex-extract-bib-file found-list reftex-select-marked + 'complement) + (setq selected-entries "BibTeX database file created") + (throw 'done t)) ((or (eq key ?\C-m) (eq key 'return)) ;; Take selected @@ -882,6 +916,29 @@ While entering the regexp, completion on knows citation keys is possible. (ding) found-list))) +(defun reftex-extract-bib-file (all &optional marked complement) + ;; Limit FOUND-LIST with more regular expressions + (let ((file (read-file-name "File to create: "))) + (find-file-other-window file) + (if (> (buffer-size) 0) + (unless (yes-or-no-p + (format "Overwrite non-empty file %s? " file)) + (error "Abort"))) + (erase-buffer) + (setq all (delq nil + (mapcar + (lambda (x) + (if marked + (if (or (and (assoc x marked) (not complement)) + (and (not (assoc x marked)) complement)) + (cdr (assoc "&entry" x)) + nil) + (cdr (assoc "&entry" x)))) + all))) + (insert (mapconcat 'identity all "\n\n")) + (save-buffer) + (goto-char (point-min)))) + (defun reftex-insert-bib-matches (list) ;; Insert the bib matches and number them correctly (let ((mouse-face @@ -1043,5 +1100,73 @@ While entering the regexp, completion on knows citation keys is possible. (select-window win))) +;;; Global BibTeX file +(defun reftex-all-used-citation-keys () + (reftex-access-scan-info) + (let ((files (reftex-all-document-files)) file keys kkk kk k) + (save-excursion + (while (setq file (pop files)) + (set-buffer (reftex-get-file-buffer-force file 'mark)) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (while (re-search-forward "^[^%\n\r]*\\\\\\(bibentry\\|[a-zA-Z]*cite[a-zA-Z]*\\)\\(\\[[^\\]]*\\]\\)?{\\([^}]+\\)}" nil t) + (setq kk (match-string-no-properties 3)) + (while (string-match "%.*\n?" kk) + (setq kk (replace-match "" t t kk))) + (setq kk (split-string kk "[, \t\r\n]+")) + (while (setq k (pop kk)) + (or (member k keys) + (setq keys (cons k keys))))))))) + (reftex-kill-temporary-buffers) + keys)) + +(defun reftex-create-bibtex-file (bibfile) + "Create a new BibTeX database file with all entries referenced in document. +The command prompts for a filename and writes the collected entries to +that file. Only entries referenced in the current document with +any \\cite-like macros are used. +The sequence in the new file is the same as it was in the old database." + (interactive "FNew BibTeX file: ") + (let ((keys (reftex-all-used-citation-keys)) + (files (reftex-get-bibfile-list)) + file key entries beg end entry) + (save-excursion + (while (setq file (pop files)) + (set-buffer (reftex-get-file-buffer-force file 'mark)) + (reftex-with-special-syntax-for-bib + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (while (re-search-forward + "^[ \t]*@[a-zA-Z]+[ \t]*{\\([^ \t\r\n]+\\)," + nil t) + (setq key (match-string 1) + beg (match-beginning 0) + end (progn + (goto-char (match-beginning 1)) + (condition-case nil + (up-list 1) + (error (goto-char (match-end 0)))) + (point))) + (when (member key keys) + (setq entry (buffer-substring beg end) + entries (cons entry entries) + keys (delete key keys))))))))) + (find-file-other-window bibfile) + (if (> (buffer-size) 0) + (unless (yes-or-no-p + (format "Overwrite non-empty file %s? " bibfile)) + (error "Abort"))) + (erase-buffer) + (insert (mapconcat 'identity (reverse entries) "\n\n")) + (goto-char (point-min)) + (save-buffer) + (message "%d entries extracted and copied to new database" + (length entries)))) + + ;;; arch-tag: d53d0a5a-ab32-4b52-a846-2a7c3527cd89 ;;; reftex-cite.el ends here diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index dc47a5e7564..e832465cf17 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el @@ -1,8 +1,8 @@ ;;; reftex-dcr.el --- viewing cross references and citations with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index 84b4c7c67f5..d4d91b476e9 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -1,8 +1,8 @@ ;;; reftex-global.el --- operations on entire documents with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index 71b3b624770..cb02f2e056f 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -1,8 +1,8 @@ ;;; reftex-index.el --- index support with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. @@ -360,7 +360,7 @@ _ ^ Add/Remove parent key (to make this item a subitem). (reftex-highlight 0 (match-beginning 0) (match-end 0) (current-buffer))) match)) -(defun reftex-display-index (&optional tag overriding-restriction +(defun reftex-display-index (&optional tag overriding-restriction redo &rest locations) "Display a buffer with an index compiled from the current document. When the document has multiple indices, first prompts for the correct one. @@ -387,7 +387,7 @@ With prefix 3, restrict index to region." (calling-file (buffer-file-name)) (restriction (or overriding-restriction - (and (interactive-p) + (and (not redo) (reftex-get-restriction current-prefix-arg docstruct)))) (locations ;; See if we are on an index macro as initial position @@ -427,7 +427,7 @@ With prefix 3, restrict index to region." (if restriction (setq reftex-index-restriction-indicator (car restriction) reftex-index-restriction-data (cdr restriction)) - (if (interactive-p) + (if (not redo) (setq reftex-index-restriction-indicator nil reftex-index-restriction-data nil))) (when (= (buffer-size) 0) @@ -703,7 +703,7 @@ The function will go to the section where the entry at point was defined." (error "Don't know which file to rescan. Try `C-u r'") (switch-to-buffer (reftex-get-file-buffer-force file)) (setq current-prefix-arg '(4)) - (reftex-display-index index-tag nil line))) + (reftex-display-index index-tag nil 'redo line))) (reftex-index-Rescan)) (reftex-kill-temporary-buffers))) (defun reftex-index-Rescan (&rest ignore) @@ -714,7 +714,7 @@ The function will go to the section where the entry at point was defined." (switch-to-buffer (reftex-get-file-buffer-force reftex-last-index-file)) (setq current-prefix-arg '(16)) - (reftex-display-index index-tag nil line))) + (reftex-display-index index-tag nil 'redo line))) (defun reftex-index-revert (&rest ignore) "Regenerate the *Index* from the internal lists. No reparsing os done." (interactive) @@ -727,14 +727,14 @@ The function will go to the section where the entry at point was defined." (reftex-erase-buffer buf) (setq current-prefix-arg nil reftex-last-follow-point 1) - (reftex-display-index index-tag nil data line))) + (reftex-display-index index-tag nil 'redo data line))) (defun reftex-index-switch-index-tag (&rest ignore) "Switch to a different index of the same document." (interactive) (switch-to-buffer (reftex-get-file-buffer-force reftex-last-index-file)) (setq current-prefix-arg nil) - (reftex-display-index)) + (reftex-display-index nil nil 'redo)) (defun reftex-index-restrict-to-section (&optional force) "Restrict index to entries defined in same document sect. as entry at point." @@ -1352,23 +1352,23 @@ Here are all local bindings. (if (re-search-forward reftex-index-phrases-phrase-regexp12 nil t) (progn (goto-char (match-beginning 0)) - (reftex-index-this-phrase)) + (reftex-index-this-phrase 'slave)) (error "No more phrase lines after point")))) -(defun reftex-index-this-phrase () +(defun reftex-index-this-phrase (&optional slave) "Index the phrase in the current line. Does a global search and replace in the entire document. At each match, the user will be asked to confirm the replacement." (interactive) - (if (interactive-p) (reftex-index-phrases-parse-header t)) + (if (not slave) (reftex-index-phrases-parse-header t)) (save-excursion (beginning-of-line) (cond ((looking-at reftex-index-phrases-comment-regexp) - (if (interactive-p) (error "Comment line"))) + (if (not slave) (error "Comment line"))) ((looking-at "^[ \t]*$") - (if (interactive-p) (error "Empty line"))) + (if (not slave) (error "Empty line"))) ((looking-at reftex-index-phrases-macrodef-regexp) - (if (interactive-p) (error "Macro definition line"))) + (if (not slave) (error "Macro definition line"))) ((looking-at reftex-index-phrases-phrase-regexp12) ;; This is a phrase (let* ((char (if (not (equal (match-string 1) "")) @@ -1429,7 +1429,7 @@ Calls `reftex-index-this-phrase' on each line in the region." (goto-char beg) (while (not (or (eobp) (>= (point) end))) - (save-excursion (reftex-index-this-phrase)) + (save-excursion (reftex-index-this-phrase 'slave)) (beginning-of-line 2))) (defun reftex-index-phrases-parse-header (&optional get-files) @@ -1736,12 +1736,15 @@ With optional arg ALLOW-NEWLINE, allow single newline between words." "\\([ \t]*\\(\n[ \t]*\\)?\\|[ \t]\\)" "\\([ \t]+\\)"))) (concat (if (and as-words (string-match "\\`\\w" (car words))) - "\\<" "") - (mapconcat (lambda (w) (regexp-quote (downcase w))) + "\\(\\<\\|[`']\\)" "") + (mapconcat (lambda (w) (regexp-quote + (if reftex-index-phrases-case-fold-search + (downcase w) + w))) words space-re) (if (and as-words (string-match "\\w\\'" (nth (1- (length words)) words))) - "\\>" "")))) + "\\(\\>\\|'\\)" "")))) (defun reftex-index-simplify-phrase (phrase) "Make phrase single spaces and single line." @@ -1825,6 +1828,8 @@ both ends." (unwind-protect (while (re-search-forward re nil t) (catch 'next-match + (if (reftex-in-comment) + (throw 'next-match nil)) (if (and (fboundp reftex-index-verify-function) (not (funcall reftex-index-verify-function))) (throw 'next-match nil)) @@ -1925,7 +1930,7 @@ both ends." (reftex-unhighlight 0)))) (defun reftex-index-phrase-match-is-indexed (beg end) - ;; CHeck if match is in an argument of an index macro, or if an + ;; Check if match is in an argument of an index macro, or if an ;; index macro is directly attached to the match. (save-excursion (goto-char end) diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 534775bf5a5..630c7101725 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -1,8 +1,8 @@ ;;; reftex-parse.el --- parser functions for RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index 2d4935aedde..43095e2d684 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el @@ -1,8 +1,8 @@ ;;; reftex-ref.el --- code to create labels and references with RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. @@ -96,14 +96,27 @@ If optional BOUND is an integer, limit backward searches to that point." (defun reftex-label-info (label &optional file bound derive env-or-mac) ;; Return info list on LABEL at point. - (let* ((env-or-mac (or env-or-mac (reftex-label-location bound))) - (typekey (nth 1 (assoc env-or-mac reftex-env-or-mac-alist))) + (let* ((prefix (if (string-match "^[a-zA-Z0-9]+:" label) + (match-string 0 label))) + (typekey (cdr (assoc prefix reftex-prefix-to-typekey-alist))) (file (or file (buffer-file-name))) - (parse (nth 2 (assoc env-or-mac reftex-env-or-mac-alist))) - (text (reftex-short-context env-or-mac parse reftex-location-start - derive)) + (trust reftex-trust-label-prefix) (in-comment (reftex-in-comment))) - (list label typekey text file in-comment))) + (if (and typekey + (cond ((eq trust t) t) + ((null trust) nil) + ((stringp trust) (string-match trust typekey)) + ((listp trust) (member typekey trust)) + (t nil))) + (list label typekey + (reftex-nicify-text (reftex-context-substring)) + file in-comment) + (let* ((env-or-mac (or env-or-mac (reftex-label-location bound))) + (typekey (nth 1 (assoc env-or-mac reftex-env-or-mac-alist))) + (parse (nth 2 (assoc env-or-mac reftex-env-or-mac-alist))) + (text (reftex-short-context env-or-mac parse reftex-location-start + derive))) + (list label typekey text file in-comment))))) ;;; Creating labels --------------------------------------------------------- @@ -296,35 +309,43 @@ also applies `reftex-translate-to-ascii-function' to the string." (while (string-match "\\%\\([a-zA-Z]\\)" prefix num) (setq letter (match-string 1 prefix)) (setq replace - (cond - ((equal letter "f") - (file-name-sans-extension - (file-name-nondirectory (buffer-file-name)))) - ((equal letter "F") - (let ((masterdir (file-name-directory (reftex-TeX-master-file))) - (file (file-name-sans-extension (buffer-file-name)))) - (if (string-match (concat "\\`" (regexp-quote masterdir)) - file) - (substring file (length masterdir)) - file))) - ((equal letter "u") - (or (user-login-name) "")) - ((equal letter "S") - (let* (macro level-exp level) - (save-excursion - (save-match-data - (when (re-search-backward reftex-section-regexp nil t) - (setq macro (reftex-match-string 2) - level-exp (cdr (assoc macro reftex-section-levels-all)) - level (if (symbolp level-exp) - (abs (save-match-data - (funcall level-exp))) - (abs level-exp)))) - (cdr (or (assoc macro reftex-section-prefixes) - (assoc level reftex-section-prefixes) - (assq t reftex-section-prefixes) - (list t "sec:"))))))) - (t ""))) + (save-match-data + (cond + ((equal letter "f") + (file-name-sans-extension + (file-name-nondirectory (buffer-file-name)))) + ((equal letter "F") + (let ((masterdir (file-name-directory (reftex-TeX-master-file))) + (file (file-name-sans-extension (buffer-file-name)))) + (if (string-match (concat "\\`" (regexp-quote masterdir)) + file) + (substring file (length masterdir)) + file))) + ((equal letter "m") + (file-name-sans-extension + (file-name-nondirectory (reftex-TeX-master-file)))) + ((equal letter "M") + (file-name-nondirectory + (substring (file-name-directory (reftex-TeX-master-file)) + 0 -1))) + ((equal letter "u") + (or (user-login-name) "")) + ((equal letter "S") + (let* (macro level-exp level) + (save-excursion + (save-match-data + (when (re-search-backward reftex-section-regexp nil t) + (setq macro (reftex-match-string 2) + level-exp (cdr (assoc macro reftex-section-levels-all)) + level (if (symbolp level-exp) + (abs (save-match-data + (funcall level-exp))) + (abs level-exp)))) + (cdr (or (assoc macro reftex-section-prefixes) + (assoc level reftex-section-prefixes) + (assq t reftex-section-prefixes) + (list t "sec:"))))))) + (t "")))) (setq num (1- (+ (match-beginning 1) (length replace))) prefix (replace-match replace nil nil prefix))) prefix))) @@ -449,7 +470,7 @@ When called with 2 C-u prefix args, disable magic word recognition." ;; remove ~ if we do already have a space (when (and (= ?~ (string-to-char form)) - (member (preceding-char) '(?\ ?\t ?\n ?. ?~))) + (member (preceding-char) '(?\ ?\t ?\n ?~))) (setq form (substring form 1))) ;; do we have a special format? (setq reftex-format-ref-function diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index 3074e83b681..8b0ebb2ca2b 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el @@ -1,8 +1,8 @@ ;;; reftex-sel.el --- the selection modes for RefTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. @@ -607,13 +607,11 @@ Useful for large TOC's." (setq ovl (make-overlay boe eoe)) (push (list data ovl separator) reftex-select-marked) (overlay-put ovl 'face reftex-select-mark-face) - (if (featurep 'xemacs) - ;; before-string property is broken in Emacs - (overlay-put ovl 'before-string - (if separator - (format "*%c%d* " separator - (length reftex-select-marked)) - (format "*%d* " (length reftex-select-marked))))) + (overlay-put ovl 'before-string + (if separator + (format "*%c%d* " separator + (length reftex-select-marked)) + (format "*%d* " (length reftex-select-marked)))) (message "Entry has mark no. %d" (length reftex-select-marked)))) (defun reftex-select-mark-comma () @@ -725,7 +723,7 @@ Useful for large TOC's." (define-key reftex-select-label-map (car x) (cdr x))) ;; Specific bindings in reftex-select-bib-map -(loop for key across "grRaA" do +(loop for key across "grRaAeE" do (define-key reftex-select-bib-map (vector (list key)) (list 'lambda '() "Press `?' during selection to find out about this key." diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index 8d217f08dfb..0f0b72332b8 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -2,7 +2,7 @@ ;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. @@ -754,13 +754,13 @@ if these sets are sorted blocks in the alist." "Make sure all files of the document are being visited by buffers, and that the scanning info is absolutely up to date. We do this by rescanning with reftex-keep-temporary-buffers bound to t. -The variable PRO-OR-DE is assumed to be dynamically scoped into this function. +The variable PRO-OR-DE is assumed to be dynamically scoped into thes function. When finished, we exit with an error message." (let ((reftex-keep-temporary-buffers t)) (reftex-toc-Rescan) (reftex-toc-restore-region start-line mark-line) (throw 'exit - "TOC had to be updated first. Please check selection and repeat the command."))) + (format "TOC had to be updated first. Please check selection and repeat the command." pro-or-de)))) (defun reftex-toc-rename-label () "Rename the currently selected label in the *TOC* buffer. @@ -868,6 +868,7 @@ label prefix determines the wording of a reference." ((and (markerp marker) (marker-buffer marker)) ;; Buffer is still live and we have the marker. Should be easy. (switch-to-buffer-other-window (marker-buffer marker)) + (push-mark nil) (goto-char (marker-position marker)) (or (looking-at (regexp-quote literal)) (looking-at (reftex-make-regexp-allow-for-ctrl-m literal)) @@ -1088,4 +1089,4 @@ always show the current section in connection with the option ;;; arch-tag: 92400ce2-0b86-4c89-a606-4ed71acea17e -;;; reftex-toc.el ends here \ No newline at end of file +;;; reftex-toc.el ends here diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 53357342c51..a7c0cb1c1ad 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1,8 +1,8 @@ ;;; reftex-vars.el --- configuration variables for RefTeX -;; Copyright (c) 1997, 1998, 1999, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; This file is part of GNU Emacs. @@ -128,13 +128,13 @@ distribution. Mixed-case symbols are convenience aliases.") (defconst reftex-cite-format-builtin '((default "Default macro \\cite{%l}" - "\\cite{%l}") + "\\cite[]{%l}") (natbib "The Natbib package" - ((?\C-m . "\\cite{%l}") - (?t . "\\citet{%l}") - (?T . "\\citet*{%l}") - (?p . "\\citep{%l}") - (?P . "\\citep*{%l}") + ((?\C-m . "\\cite[][]{%l}") + (?t . "\\citet[][]{%l}") + (?T . "\\citet*[][]{%l}") + (?p . "\\citep[][]{%l}") + (?P . "\\citep*[][]{%l}") (?e . "\\citep[e.g.][]{%l}") (?s . "\\citep[see][]{%l}") (?a . "\\citeauthor{%l}") @@ -157,8 +157,8 @@ distribution. Mixed-case symbols are convenience aliases.") (bibentry "The Bibentry package" "\\bibentry{%l}") (harvard "The Harvard package" - ((?\C-m . "\\cite{%l}") - (?p . "\\cite{%l}") + ((?\C-m . "\\cite[]{%l}") + (?p . "\\cite[]{%l}") (?t . "\\citeasnoun{%l}") (?n . "\\citeasnoun{%l}") (?s . "\\possessivecite{%l}") @@ -166,17 +166,17 @@ distribution. Mixed-case symbols are convenience aliases.") (?y . "\\citeyear{%l}") (?a . "\\citename{%l}"))) (chicago "The Chicago package" - ((?\C-m . "\\cite{%l}") - (?t . "\\citeN{%l}") + ((?\C-m . "\\cite[]{%l}") + (?t . "\\citeN[]{%l}") (?T . "\\shortciteN{%l}") - (?p . "\\cite{%l}") + (?p . "\\cite[]{%l}") (?P . "\\shortcite{%l}") (?a . "\\citeA{%l}") (?A . "\\shortciteA{%l}") (?y . "\\citeyear{%l}"))) (astron "The Astron package" - ((?\C-m . "\\cite{%l}") - (?p . "\\cite{%l}" ) + ((?\C-m . "\\cite[]{%l}") + (?p . "\\cite[]{%l}" ) (?t . "%2a (\\cite{%l})"))) (author-year "Do-it-yourself Author-year" ((?\C-m . "\\cite{%l}") @@ -484,6 +484,8 @@ LABEL-PREFIX empty string. The prefix may contain the following `%' escapes: %f Current file name with directory and extension stripped. %F Current file name relative to directory of master file. + %m Master file name, directory and extension stripped. + %M Directory name (without path) where master file is located. %u User login name, on systems which support this. %S A section prefix derived with variable `reftex-section-prefixes'. @@ -631,6 +633,43 @@ the final regular expression - so %s will be replaced with the environment or macro." :group 'reftex-defining-label-environments :type '(repeat (cons (symbol) (regexp)))) + +(defcustom reftex-trust-label-prefix nil + "Non-nil means, trust the label prefix when determining label type. +It is customary to use special label prefixes to distinguish different label +types. The label prefixes have no syntactic meaning in LaTeX (unless +special packages like fancyref) are being used. RefTeX can and by +default does parse around each label to detect the correct label type, +but this process can be slow when a document contains thousands of +labels. If you use label prefixes consistently, you may speed up +document parsing by setting this variable to a non-nil value. RefTeX +will then compare the label prefix with the prefixes found in +`reftex-label-alist' and derive the correct label type in this way. +Possible values for this option are: + +t This means to trust any label prefixes found. +regexp If a regexp, only prefixes matched by the regexp are trusted. +list List of accepted prefixes, as strings. The colon is part of + the prefix, e.g. (\"fn:\" \"eqn:\" \"item:\"). +nil Never trust a label prefix. + +The only disadvantage of using this feature is that the label context +displayed in the label selection buffer along with each label is +simply some text after the label definition. This is no problem if you +place labels keeping this in mind (e.g. *before* the equation, *at +the beginning* of a fig/tab caption ...). Anyway, it is probably best +to use the regexp or the list value types to fine-tune this feature. +For example, if your document contains thousands of footnotes with +labels fn:xxx, you may want to set this variable to the value \"^fn:$\" or +\(\"fn:\"). Then RefTeX will still do extensive parsing for any +non-footnote labels." + :group 'reftex-defining-label-environments + :type '(choice + (const :tag "Always" t) + (const :tag "Never" nil) + (regexp) + (repeat :tag "List" + (string :tag "prefix (with colon)")))) (defcustom reftex-special-environment-functions nil "List of functions to be called when trying to figure out current environment. @@ -1010,6 +1049,9 @@ display, and for (setq reftex-comment-citations t). %< as a special operator kills punctuation and space around it after the string has been formatted. +A pair of square brackets indicates an optional argument, and RefTeX +will prompt for the values of these arguments. + Beware that all this only works with BibTeX database files. When citations are made from the \\bibitems in an explicit thebibliography environment, only %l is available. @@ -1042,6 +1084,42 @@ E.g.: (setq reftex-cite-format 'natbib)" (cons (character :tag "Key character" ?\r) (string :tag "Format string" ""))))) +(defcustom reftex-cite-prompt-optional-args 'maybe + "*Non-nil means, prompt for empty optional arguments in cite macros. +When an entry in `reftex-cite-format' ist given with square brackets to +indicate optional arguments (for example \\cite[][]{%l}), RefTeX can +prompt for values. Possible values are: + +nil Never prompt for optional arguments +t Always prompt +maybe Prompt only if `reftex-citation' was called with C-u prefix arg + +Unnecessary empty optional arguments are removed before insertion into +the buffer. See `reftex-cite-cleanup-optional-args'." + :group 'reftex-citation-support + :type '(choice + (const :tag "Always" t) + (const :tag "When called with prefix arg" maybe) + (const :tag "Never" nil))) + +(defcustom reftex-cite-cleanup-optional-args t + "*Non-nil means, remove unnecessary empty optional arguments in cite macros. +The cite macros provided by some packages (for example +natbib) allow specifying two optional arguments, one for a prefix to +the citation, and a second for a postfix. When only one optional +argument is given, it is interpreted as postfix. When this option is +t, RefTeX removes unnecessary empty optional arguments from the cite +macro before insertion. For example, it will change + \\cite[][]{Jones} -> \\cite{Jones} + \\cite[][Chapter 1]{Jones} -> \\cite[Chapter 1]{Jones} + \\cite[see][]{Jones} -> \\cite[see][]{Jones} + \\cite[see][Chapter 1]{Jones} -> \\cite{Jones} +Is is possible that other packages have other conventions about which +optional argument is interpreted how - that is why this cleaning up +can be turned off." + :group 'reftex-citation-support + :type 'boolean) + (defcustom reftex-comment-citations nil "*Non-nil means add a comment for each citation describing the full entry. The comment is formatted according to `reftex-cite-comment-format'." diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index c00400a7b96..e177805e9c4 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1,8 +1,8 @@ ;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX -;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003, 2004 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: 4.21 +;; Version: 4.26 ;; Keywords: tex ;; This file is part of GNU Emacs. @@ -300,7 +300,7 @@ ;;; Define the formal stuff for a minor mode named RefTeX. ;;; -(defconst reftex-version "RefTeX version 4.21" +(defconst reftex-version "RefTeX version 4.26" "Version string for RefTeX.") (defvar reftex-mode nil @@ -669,6 +669,8 @@ the label information is recompiled on next use." ;; Alist relating magic words to a label type. (defvar reftex-words-to-typekey-alist nil) +;; Alist relating label prefixes to a label type. +(defvar reftex-prefix-to-typekey-alist nil) ;; The last list-of-labels entry used in a reference. (defvar reftex-last-used-reference (list nil nil nil nil)) @@ -750,6 +752,7 @@ the label information is recompiled on next use." reftex-typekey-to-format-alist reftex-typekey-to-prefix-alist reftex-words-to-typekey-alist + reftex-prefix-to-typekey-alist reftex-type-query-prompt reftex-type-query-help @@ -904,6 +907,8 @@ This enforces rescanning the buffer on next use." macro verify repeat nindex tag key toc-level toc-levels) (setq reftex-words-to-typekey-alist nil + reftex-prefix-to-typekey-alist + '(("sec:" . "s") ("cha:" . "s") ("chap:" . "s")) reftex-typekey-list nil reftex-typekey-to-format-alist nil reftex-typekey-to-prefix-alist nil @@ -945,6 +950,10 @@ This enforces rescanning the buffer on next use." ;; Note a new typekey (if typekey (add-to-list 'reftex-typekey-list typekey)) + (if (and typekey prefix + (not (assoc prefix reftex-prefix-to-typekey-alist))) + (add-to-list 'reftex-prefix-to-typekey-alist + (cons prefix typekey))) (if (and typekey prefix (not (assoc typekey reftex-typekey-to-prefix-alist))) (add-to-list 'reftex-typekey-to-prefix-alist @@ -1676,6 +1685,7 @@ When DIE is non-nil, throw an error if file not found." "Make a citation using BibTeX database files." t) (autoload 'reftex-default-bibliography "reftex-cite") (autoload 'reftex-bib-or-thebib "reftex-cite") +(autoload 'reftex-create-bibtex-file "reftex-cite") ;;; ========================================================================= ;;; @@ -2439,6 +2449,7 @@ IGNORE-WORDS List of words which should be removed from the string." ["Restore from File" (reftex-access-parse-file 'restore) t]) ("Global Actions" ["Search Whole Document" reftex-search-document t] + ["Search Again" tags-loop-continue t] ["Replace in Document" reftex-query-replace-document t] ["Grep on Document" reftex-grep-document t] "--" @@ -2447,6 +2458,8 @@ IGNORE-WORDS List of words which should be removed from the string." ["Change Label and Refs" reftex-change-label t] ["Renumber Simple Labels" reftex-renumber-simple-labels t] "--" + ["Create BibTeX File" reftex-create-bibtex-file t] + "--" ["Create TAGS File" reftex-create-tags-file t] "--" ["Save Document" reftex-save-all-document-buffers t]) From af41e1415a3001c78161f069cc67a07cd9386f13 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:14:35 +0000 Subject: [PATCH 237/560] RefTeX upgraded to version 4.26 --- lisp/ChangeLog | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1819c20b58a..64647c7fbf0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,48 @@ + +2005-01-14 Carsten Dominik + + * reftex-cite.el (reftex-bib-sort-year): Catch the case if the + year is not given. + + * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes + %m and %M, fixed bug with %F by adding save-match-data. + (reftex-reference): Removed ?. from list of spaces. + (reftex-label-info): Added automatic label prefix recognition + + * reftex-index.el (reftex-index-next-phrase): Added slave + parameter to call of `reftex-index-this-phrase' + (reftex-index-this-phrase): New optional argument + (reftex-index-region-phrases): Added slave parameter to call of + `reftex-index-this-phrase' + (reftex-display-index): New argument redo + (reftex-index-rescan): Added 'redo to arguments of + `reftex-display-index' + (reftex-index-Rescan, reftex-index-revert) + (reftex-index-switch-index-tag): Added 'redo to arguments of + `reftex-display-index' + (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive + indexing. Fixed bug with matching is there is a quote before or + after the word. + + * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when + collecting citation keys in lines with comments. + (reftex-citation): Prefix argument no longer rescans the document, + but forces prompting for optional arguments of cite macros. + (reftex-do-citation): Prompting for optional arguments + implemented. + + * reftex-vars.el (reftex-cite-format-builtin): Added optional + arguments to most cite commands. + (reftex-cite-cleanup-optional-args): New option + (reftex-cite-prompt-optional-args): New option. + (reftex-trust-label-prefix): New option + + * reftex-toc.el (reftex-toc-find-section): Added push-mark before + changing the position in the buffer. + + * reftex.el (reftex-prefix-to-typekey-alist): New variable + (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist + 2005-01-14 Nick Roberts * xt-mouse.el (xterm-mouse-event): Compute window co-ordinates From cd19b06c33ce3400228d7bebd3115da24c00ab35 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:16:38 +0000 Subject: [PATCH 238/560] version 4.26 --- man/reftex.texi | 2085 +++++++++++++++++++++++++++-------------------- 1 file changed, 1191 insertions(+), 894 deletions(-) diff --git a/man/reftex.texi b/man/reftex.texi index 9ce77b35dc2..a2eb8a63bc7 100644 --- a/man/reftex.texi +++ b/man/reftex.texi @@ -1,25 +1,49 @@ \input texinfo @c -*-texinfo-*- @c %**start of header -@setfilename ../info/reftex +@setfilename reftex @settitle RefTeX User Manual +@dircategory Emacs +@direntry +* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. +@end direntry @synindex ky cp @syncodeindex vr cp @syncodeindex fn cp -@set VERSION 4.19 -@set EDITION 4.19 -@set DATE August 2002 -@c %**end of header -@copying +@c Version and Contact Info +@set VERSION 4.24 +@set EDITION 4.24 +@set DATE August 2004 +@set AUCTEXSITE @uref{http://www.nongnu.org/auctex/,AUCTeX distribution site} +@set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/,maintainers webpage} +@set MAINTAINER Carsten Dominik +@set MAINTAINEREMAIL @email{dominik@@science.uva.nl} +@set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer} +@set XEMACSFTP @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs ftp site}. +@c %**end of header +@finalout + +@c Macro definitions + +@c Subheadings inside a table. Need a difference between info and the rest. +@macro tablesubheading{text} +@ifinfo +@subsubheading \text\ +@end ifinfo +@ifnotinfo +@item @b{\text\} +@end ifnotinfo +@end macro + +@ifinfo This file documents @b{Ref@TeX{}}, a package to do labels, references, citations and indices for LaTeX documents with Emacs. This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for -@b{Ref@TeX{}} @value{VERSION}. +@b{Ref@TeX{}} @value{VERSION} Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. -@quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no @@ -36,27 +60,7 @@ This document is part of a collection distributed under the GNU Free Documentation License. If you want to distribute this document separately from the collection, you can do so by adding a copy of the license to the document, as described in section 6 of the license. -@end quotation -@end copying - -@dircategory Emacs -@direntry -* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. -@end direntry - -@finalout - -@c Macro definitions - -@c Subheadings inside a table. Need a difference between info and the rest. -@macro tablesubheading{text} -@ifinfo -@subsubheading \text\ @end ifinfo -@ifnotinfo -@item @b{\text\} -@end ifnotinfo -@end macro @titlepage @title Ref@TeX{} User Manual @@ -65,21 +69,44 @@ license to the document, as described in section 6 of the license. @author by Carsten Dominik @page -@vskip 0pt plus 1filll -@insertcopying +Copyright @copyright{} 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +@sp 2 +This is edition @value{EDITION} of the @cite{Ref@TeX{} User Manual} for +@b{Ref@TeX{}} version @value{VERSION}, @value{DATE}. + +@sp 2 + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU +Manual'', and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License'' in the Emacs manual. + +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' + +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. @end titlepage +@page @ifnottex @node Top,,,(dir) @b{Ref@TeX{}} is a package for managing Labels, References, -Citations and index entries with GNU Emacs.@refill +Citations and index entries with GNU Emacs. Don't be discouraged by the size of this manual, which covers @b{Ref@TeX{}} in great depth. All you need to know to use @b{Ref@TeX{}} can be summarized on two pages (@pxref{RefTeX in a Nutshell}). You can go back later to other parts of this document when -needed.@refill +needed. @menu * Introduction:: Quick-Start information. @@ -116,7 +143,7 @@ Introduction * Installation:: How to install and activate RefTeX. * RefTeX in a Nutshell:: A brief summary and quick guide. - + Labels and References * Creating Labels:: @@ -145,6 +172,7 @@ Citations * Citation Info:: View the corresponding database entry. * Chapterbib and Bibunits:: Multiple bibliographies in a Document. * Citations Outside LaTeX:: How to make citations in Emails etc. +* BibTeX Database Subsets:: Extract parts of a big database. Index Support @@ -196,7 +224,7 @@ and @code{\index}. Using these macros usually requires looking up different parts of the document and searching through BibTeX database files. @b{Ref@TeX{}} automates these time--consuming tasks almost entirely. It also provides functions to display the structure of a -document and to move around in this structure quickly.@refill +document and to move around in this structure quickly. @iftex Don't be discouraged by the size of this manual, which covers @b{Ref@TeX{}} @@ -217,17 +245,15 @@ reports or suggestions. @section Installation @cindex Installation -@b{Ref@TeX{}} is bundled and pre--installed with Emacs since version 20.2. -It was also bundled and pre--installed with XEmacs 19.16--20.x. XEmacs -21.x users want to install the corresponding plug-in package which is -available from the -@uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs ftp site}. See -the XEmacs 21.x documentation on package installation for -details.@refill +@b{Ref@TeX{}} is bundled and pre--installed with Emacs since version +20.2. It was also bundled and pre--installed with XEmacs 19.16--20.x. +XEmacs 21.x users want to install the corresponding plug-in package +which is available from the @value{XEMACSFTP}. See the XEmacs 21.x +documentation on package installation for details. Users of earlier Emacs distributions (including Emacs 19) can get a copy of the @b{Ref@TeX{}} distribution from the maintainers web-page. -@xref{Imprint}, for more information.@refill +@xref{Imprint}, for more information. @section Environment @cindex Finding files @@ -254,7 +280,7 @@ read @ref{Finding Files}. @vindex latex-mode-hook To turn @b{Ref@TeX{}} Mode on and off in a particular buffer, use @kbd{M-x reftex-mode}. To turn on @b{Ref@TeX{}} Mode for all LaTeX -files, add the following lines to your @file{.emacs} file:@refill +files, add the following lines to your @file{.emacs} file: @example (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode @@ -275,7 +301,7 @@ files, add the following lines to your @file{.emacs} file:@refill a table of contents of the document. This buffer can display sections, labels and index entries defined in the document. From the buffer, you can jump quickly to every part of your document. Press @kbd{?} to get -help.@refill +help. @item @b{Labels and References}@* @b{Ref@TeX{}} helps to create unique labels @@ -283,11 +309,11 @@ and to find the correct key for references quickly. It distinguishes labels for different environments, knows about all standard environments (and many others), and can be configured to recognize any additional labeled environments you have defined yourself (variable -@code{reftex-label-alist}).@refill +@code{reftex-label-alist}). @itemize @bullet @item -@b{Creating Labels}@* +@b{Creating Labels}@* Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point. @b{Ref@TeX{}} will either @itemize @minus @@ -295,20 +321,20 @@ Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point. derive a label from context (default for section labels) @item prompt for a label string (default for figures and tables) or -@item +@item insert a simple label made of a prefix and a number (all other -environments)@refill +environments) @end itemize @noindent Which labels are created how is configurable with the variable -@code{reftex-insert-label-flags}.@refill +@code{reftex-insert-label-flags}. @item @b{Referencing Labels}@* To make a reference, type @kbd{C-c )} (@code{reftex-reference}). This shows an outline of the document with all labels of a certain type (figure, equation,...) and some label context. Selecting a label inserts a @code{\ref@{@var{label}@}} macro -into the original buffer.@refill +into the original buffer. @end itemize @item @@ -319,7 +345,7 @@ specified in the @code{\bibliography} command) and pull out a list of matches for you to choose from. The list is @emph{formatted} and sorted. The selected article is referenced as @samp{\cite@{@var{key}@}} (see the variable @code{reftex-cite-format} if you want to insert -different macros).@refill +different macros). @item @b{Index Support}@* @@ -328,7 +354,7 @@ entries into an alphabetically sorted @file{*Index*} buffer which you can use to check and edit the entries. @b{Ref@TeX{}} knows about the standard index macros and can be configured to recognize any additional macros you have defined (@code{reftex-index-macros}). Multiple indices -are supported.@refill +are supported. @itemize @bullet @item @@ -337,20 +363,20 @@ To index the current selection or the word at point, type @kbd{C-c /} (@code{reftex-index-selection-or-word}). The default macro @code{reftex-index-default-macro} will be used. For a more complex entry type @kbd{C-c <} (@code{reftex-index}), select any of the index macros -and enter the arguments with completion.@refill +and enter the arguments with completion. @item @b{The Index Phrases File (Delayed Indexing)}@* Type @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) to add the current word or selection to a special @emph{index phrase file}. @b{Ref@TeX{}} can later search the document for occurrences of these -phrases and let you interactively index the matches.@refill +phrases and let you interactively index the matches. @item @b{Displaying and Editing the Index}@* To display the compiled index in a special buffer, type @kbd{C-c >} (@code{reftex-display-index}). From that buffer you can check and edit -all entries.@refill +all entries. @end itemize @page @@ -360,10 +386,10 @@ When point is on the @var{key} argument of a cross--referencing macro @code{\index}, and variations) or inside a BibTeX database entry, you can press @kbd{C-c &} (@code{reftex-view-crossref}) to display corresponding locations in the document and associated BibTeX database -files.@refill @* +files. @* When the enclosing macro is @code{\cite} or @code{\ref} and no other message occupies the echo area, information about the citation or label -will automatically be displayed in the echo area.@refill +will automatically be displayed in the echo area. @item @b{Multifile Documents}@* @@ -371,7 +397,7 @@ Multifile Documents are fully supported. The included files must have a file variable @code{TeX-master} or @code{tex-main-file} pointing to the master file. @b{Ref@TeX{}} provides cross-referencing information from all parts of the document, and across document borders -(@file{xr.sty}).@refill +(@file{xr.sty}). @item @b{Document Parsing}@* @b{Ref@TeX{}} needs to parse the document in @@ -380,14 +406,14 @@ once and updates its list internally when @code{reftex-label} and @code{reftex-index} are used. To enforce reparsing, call any of the commands described above with a raw @kbd{C-u} prefix, or press the @kbd{r} key in the label selection buffer, the table of contents -buffer, or the index buffer.@refill +buffer, or the index buffer. @item @b{AUCTeX} @* If your major LaTeX mode is AUCTeX, @b{Ref@TeX{}} can cooperate with it (see variable @code{reftex-plug-into-AUCTeX}). AUCTeX contains style files which trigger appropriate settings in @b{Ref@TeX{}}, so that for many of the popular LaTeX packages no -additional customizations will be necessary.@refill +additional customizations will be necessary. @item @b{Useful Settings}@* @@ -397,7 +423,7 @@ To integrate RefTeX with AUCTeX, use @end lisp To make your own LaTeX macro definitions known to @b{Ref@TeX{}}, -customize the variables@refill +customize the variables @example @code{reftex-label-alist} @r{(for label macros/environments)} @code{reftex-section-levels} @r{(for sectioning commands)} @@ -407,7 +433,7 @@ customize the variables@refill @end example If you have a large number of macros defined, you may want to write an AUCTeX style file to support them with both AUCTeX and -@b{Ref@TeX{}}.@refill +@b{Ref@TeX{}}. @item @b{Where Next?}@* Go ahead and use @b{Ref@TeX{}}. Use its menus until you have picked up the key bindings. For an overview of what you @@ -415,12 +441,13 @@ can do in each of the different special buffers, press @kbd{?}. Read the manual if you get stuck, of if you are curious what else might be available. The first part of the manual explains in a tutorial way how to use and customize @b{Ref@TeX{}}. The second -part is a command and variable reference.@refill +part is a command and variable reference. @end enumerate @node Table of Contents, Labels and References, Introduction, Top @chapter Table of Contents @cindex @file{*toc*} buffer +@cindex Structure editing @cindex Table of contents buffer @findex reftex-toc @kindex C-c = @@ -429,16 +456,16 @@ Pressing the keys @kbd{C-c =} pops up a buffer showing the table of contents of the document. By default, this @file{*toc*} buffer shows only the sections of a document. Using the @kbd{l} and @kbd{i} keys you can display all labels and index entries defined in the document as -well.@refill +well. With the cursor in any of the lines denoting a location in the document, simple key strokes will display the corresponding part in -another window, jump to that location, or perform other actions.@refill +another window, jump to that location, or perform other actions. @kindex ? Here is a list of special commands in the @file{*toc*} buffer. A summary of this information is always available by pressing -@kbd{?}.@refill +@kbd{?}. @table @kbd @@ -458,19 +485,19 @@ Goto previous entry in the table of context. @item C-c C-n Goto next section heading. Useful when many labels and index entries -separate section headings.@refill +separate section headings. @item C-c C-p Goto previous section heading. @item N z Jump to section N, using the prefix arg. For example, @kbd{3 z} jumps -to section 3.@refill +to section 3. @tablesubheading{Access to document locations} @item @key{SPC} Show the corresponding location in another window. This command does -@emph{not} select that other window.@refill +@emph{not} select that other window. @item @key{TAB} Goto the location in another window. @@ -478,13 +505,13 @@ Goto the location in another window. @item @key{RET} Go to the location and hide the @file{*toc*} buffer. This will restore the window configuration before @code{reftex-toc} (@kbd{C-c =}) was -called.@refill +called. @item mouse-2 @vindex reftex-highlight-selection Clicking with mouse button 2 on a line has the same effect as @key{RET}. See also variable @code{reftex-highlight-selection}, @ref{Options -(Fontification)}.@refill +(Fontification)}. @item f @vindex reftex-toc-follow-mode @@ -496,25 +523,51 @@ cursor motion. The default for this flag can be set with the variable @code{reftex-toc-follow-mode}. Note that only context in files already visited is shown. @b{Ref@TeX{}} will not visit a file just for follow mode. See, however, the variable -@code{reftex-revisit-to-follow}.@refill +@code{reftex-revisit-to-follow}. @item . Show calling point in another window. This is the point from where @code{reftex-toc} was last called. @page +@tablesubheading{Promotion and Demotion} + +@item < +Promote the current section. This will convert @code{\section} to +@code{\chapter}, @code{\subsection} to @code{\section} etc. If there is +an active region, all sections in the region will be promoted, including +the one at point. To avoid mistakes, @b{Ref@TeX{}} requires a fresh +document scan before executing this command - if necessary, it will +automatically do this scan and ask the user to repeat the promotion +command. + +@item > +Demote the current section. This is the opposite of promotion. It will +convert @code{\chapter} to @code{\section} etc. If there is an active +region, all sections in the region will be demoted, including the one at +point. + +@item M-% +Rename the label at point. While generally not recommended, this can be +useful when a package like @file{fancyref} is used where the label +prefix determines the wording of a reference. After a +promotion/demotion it may be necessary to change a few labels from +@samp{sec:xyz} to @samp{cha:xyz} or vice versa. This command can be +used to do this - it launches a query replace to rename the definition +and all references of a label. + @tablesubheading{Exiting} @item q Hide the @file{*toc*} buffer, return to the position where -@code{reftex-toc} was last called.@refill +@code{reftex-toc} was last called. @item k Kill the @file{*toc*} buffer, return to the position where -@code{reftex-toc} was last called.@refill +@code{reftex-toc} was last called. @item C-c > Switch to the @file{*Index*} buffer of this document. With prefix -@samp{2}, restrict the index to the section at point in the @file{*toc*} +@samp{2}, restrict the index to the section at point in the @file{*toc*} buffer. @tablesubheading{Controlling what gets displayed} @@ -527,13 +580,13 @@ arg (e.g @kbd{3 t}), ignore all toc entries with level greater than @var{arg} (3 in this case). Chapters are level 1, sections are level 2. The mode line @samp{T<>} indicator shows the current value. The default depth can be configured with the variable -@code{reftex-toc-max-level}.@refill +@code{reftex-toc-max-level}. @item F @vindex reftex-toc-include-file-boundaries Toggle the display of the file borders of a multifile document in the @file{*toc*} buffer. The default for this flag can be set with the -variable @code{reftex-toc-include-file-boundaries}.@refill +variable @code{reftex-toc-include-file-boundaries}. @item l @vindex reftex-toc-include-labels @@ -542,7 +595,7 @@ for this flag can be set with the variable @code{reftex-toc-include-labels}. When called with a prefix argument, @b{Ref@TeX{}} will prompt for a label type and include only labels of the selected type in the @file{*toc*} buffer. The mode line @samp{L<>} -indicator shows which labels are included.@refill +indicator shows which labels are included. @item i @vindex reftex-toc-include-index-entries @@ -550,48 +603,58 @@ Toggle the display of index entries in the @file{*toc*} buffer. The default for this flag can be set with the variable @code{reftex-toc-include-index-entries}. When called with a prefix argument, @b{Ref@TeX{}} will prompt for a specific index and include -only entries in the selected index in the @file{*toc*} buffer. The mode -line @samp{I<>} indicator shows which index is used.@refill +only entries in the selected index in the @file{*toc*} buffer. The mode +line @samp{I<>} indicator shows which index is used. @item c @vindex reftex-toc-include-context Toggle the display of label and index context in the @file{*toc*} buffer. The default for this flag can be set with the variable -@code{reftex-toc-include-context}.@refill +@code{reftex-toc-include-context}. @tablesubheading{Updating the buffer} @item g Rebuild the @file{*toc*} buffer. This does @emph{not} rescan the -document.@refill +document. @item r @vindex reftex-enable-partial-scans Reparse the LaTeX document and rebuild the @file{*toc*} buffer. When -@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this -location is defined in, not the entire document.@refill +@code{reftex-enable-partial-scans} is non-nil, rescan only the file this +location is defined in, not the entire document. @item C-u r Reparse the @emph{entire} LaTeX document and rebuild the @file{*toc*} -buffer.@refill +buffer. @item x Switch to the @file{*toc*} buffer of an external document. When the current document is using the @code{xr} package (@pxref{xr (LaTeX package)}), @b{Ref@TeX{}} will switch to one of the external -documents.@refill +documents. + + +@tablesubheading{Automatic recentering} + +@item d +Toggle the display of a dedicated frame displaying just the @file{*toc*} +buffer. Follow mode and visiting locations will not work that frame, +but automatic recentering will make this frame always show your current +editing location in the document (see below). @item a Toggle the automatic recentering of the @file{*toc*} buffer. When this option is on, moving around in the document will cause the @file{*toc*} -to always highlight the current section. This can be enabled by default -with the variable @code{reftex-auto-recenter-toc}. +to always highlight the current section. By default, this option is +active while the dedicated @file{*TOC*} frame exists. See also the +variable @code{reftex-auto-recenter-toc}. @end table @vindex reftex-toc-map In order to define additional commands for the @file{*toc*} buffer, the -keymap @code{reftex-toc-map} may be used.@refill +keymap @code{reftex-toc-map} may be used. @findex reftex-toc-recenter @vindex reftex-auto-recenter-toc @@ -605,13 +668,15 @@ section from which @code{reftex-toc} was called will be highlighted. The command @kbd{C-c -} (@code{reftex-toc-recenter}) will only redisplay the @file{*toc*} buffer and highlight the correct line without actually selecting the @file{*toc*} window. This can be useful to quickly find -out where in the document you currently are. If you want the TOC buffer -to show the current section automatically whenever you stop typing, try +out where in the document you currently are. You can also automate this +by asking RefTeX to keep track of your current editing position in the +TOC. The TOC window will then be updated whenever you stop typing for +more than @code{reftex-idle-time} seconds. By default this works only +with the dedicated @file{*TOC*} frame. But you can also force automatic +recentering of the TOC window on the current frame with @lisp (setq reftex-auto-recenter-toc t) @end lisp -When this is turned on, the toc buffer will be recentered whenever Emacs -is idle for more than @code{reftex-idle-time} seconds. @cindex Sectioning commands @@ -641,17 +706,17 @@ document. When writing a document, any part of it can be marked with a label, like @samp{\label@{mark@}}. LaTeX records the current value of a certain counter when a label is defined. Later references to this label (like @samp{\ref@{mark@}}) will produce the recorded value of the -counter.@refill +counter. Labels can be used to mark sections, figures, tables, equations, footnotes, items in enumerate lists etc. LaTeX is context sensitive in doing this: A label defined in a figure environment automatically -records the figure counter, not the section counter.@refill +records the figure counter, not the section counter. Several different environments can share a common counter and therefore a common label category. E.g. labels in both @code{equation} and @code{eqnarray} environments record the value of the same counter - the -equation counter.@refill +equation counter. @menu * Creating Labels:: @@ -677,7 +742,7 @@ In order to create a label in a LaTeX document, press @kbd{C-c (} and will figure out the environment it currently is in and adapt the label to that environment. A label usually consists of a short prefix indicating the type of the label and a unique mark. @b{Ref@TeX{}} has -3 different modes to create this mark.@refill +3 different modes to create this mark. @enumerate @item @@ -698,7 +763,7 @@ change things: @code{reftex-translate-to-ascii-function}, where the section heading is used to construct a label. In fact, @b{Ref@TeX{}}'s default settings use this method only for section labels. You will be asked to confirm the derived label, or edit -it.@refill +it. @item We may also use a simple unique number to identify a label. This is @@ -709,7 +774,7 @@ tends to write documents with many equations and finds it impossible to come up with good names for each of them. These simple labels are inserted without query, and are therefore very fast. Good descriptive names are not really necessary as @b{Ref@TeX{}} will provide context to -reference a label (@pxref{Referencing Labels}).@refill +reference a label (@pxref{Referencing Labels}). @item The third method is to ask the user for a label. This is most @@ -719,13 +784,13 @@ tables. Of course, one can enter the label directly by typing the full @samp{\label@{mark@}}. The advantage of using @code{reftex-label} anyway is that @b{Ref@TeX{}} will know that a new label has been defined. It will then not be necessary to rescan the document in order to access -this label later.@refill +this label later. @end enumerate @vindex reftex-insert-label-flags If you want to change the way certain labels are created, check out the variable @code{reftex-insert-label-flags} (@pxref{Options (Creating -Labels)}).@refill +Labels)}). If you are using AUCTeX to write your LaTeX documents, you can set it up to delegate the creation of labels to @@ -741,16 +806,25 @@ set it up to delegate the creation of labels to @kindex C-c ) @findex reftex-reference +@vindex reftex-trust-label-prefix +@b{Ref@TeX{}} scans the document in order to find all labels. To make +referencing labels easier, it assigns to each label a category, the +@emph{label type} (for example section, table, figure, equation, etc.). +In order to determine the label type, RefTeX parses around each label +to see in what kind of environments it is located. You can speed up +the parsing by using type-specific prefixes for labels and configuring +the variable @code{reftex-trust-label-prefix}. + Referencing Labels is really at the heart of @b{Ref@TeX{}}. Press @kbd{C-c )} in order to reference a label (reftex-reference). This will start a selection process and finally insert the complete @samp{\ref@{label@}} -into the buffer.@refill +into the buffer. First, @b{Ref@TeX{}} will determine the label category which is required. Often that can be figured out from context. For example, if you write @samp{As shown in eq.} and the press @kbd{C-c )}, @b{Ref@TeX{}} knows that an equation label is going to be referenced. If it cannot figure -out what label category is needed, it will query for one.@refill +out what label category is needed, it will query for one. You will then be presented with a label selection menu. This is a special buffer which contains an outline of the document along with all @@ -759,7 +833,7 @@ there will be one line of context of the label definition, which is some text in the buffer near the label definition. Usually this is sufficient to identify the label. If you are unsure about a certain label, pressing @key{SPC} will show the label definition point in -another window.@refill +another window. In order to reference a label, move to cursor to the correct label and press @key{RET}. You can also reference several labels with a single @@ -769,7 +843,7 @@ key (see below). @kindex ? Here is a list of special commands in the selection buffer. A summary of this information is always available from the selection process by -pressing @kbd{?}.@refill +pressing @kbd{?}. @@ -790,7 +864,7 @@ Go to previous label. @item b Jump back to the position where you last left the selection buffer. -Normally this should get you back to the last referenced label.@refill +Normally this should get you back to the last referenced label. @item C-c C-n Goto next section heading. @@ -799,13 +873,13 @@ Goto next section heading. Goto previous section heading. @item N z -Jump to section N, using the prefix arg. For example @kbd{3 z} jumps to -section 3.@refill +Jump to section N, using the prefix arg. For example @kbd{3 z} jumps to +section 3. @tablesubheading{Displaying Context} @item @key{SPC} Show the surroundings of the definition of the current label in another -window. See also the @kbd{f} key.@refill +window. See also the @kbd{f} key. @item f @vindex reftex-revisit-to-follow @@ -814,23 +888,23 @@ always display the full context of the current label. This is similar to pressing @key{SPC} after each cursor motion. Note that only context in files already visited is shown. @b{RefTeX} will not visit a file just for follow mode. See, however, the variable -@code{reftex-revisit-to-follow}.@refill +@code{reftex-revisit-to-follow}. @item . Show insertion point in another window. This is the point from where you -called @code{reftex-reference}.@refill +called @code{reftex-reference}. @tablesubheading{Selecting a label and creating the reference} @item @key{RET} Insert a reference to the label at point into the buffer from which the selection process was started. When entries have been marked, @key{RET} -references all marked labels.@refill +references all marked labels. @item mouse-2 @vindex reftex-highlight-selection Clicking with mouse button 2 on a label will accept it like @key{RET} would. See also variable @code{reftex-highlight-selection}, @ref{Options -(Misc)}.@refill +(Misc)}. @vindex reftex-multiref-punctuation @item m - + , @@ -853,11 +927,11 @@ Unmark a marked entry. @item a Accept the marked entries and put all labels as a comma-separated list into one @emph{single} @code{\ref} macro. Some packages like -@file{saferef.sty} support multiple references in this way.@refill +@file{saferef.sty} support multiple references in this way. @item l Use the last referenced label(s) again. This is equivalent to moving to -that label and pressing @key{RET}.@refill +that label and pressing @key{RET}. @item @key{TAB} Enter a label with completion. This may also be a label which does not @@ -871,7 +945,7 @@ Toggle between @code{\ref} and @code{\vref} macro for references. The @code{\vref} macro is defined in the @code{varioref} LaTeX package. With this key you can force @b{Ref@TeX{}} to insert a @code{\vref} macro. The current state of this flag is displayed by the @samp{S<>} -indicator in the mode line of the selection buffer.@refill +indicator in the mode line of the selection buffer. @item V @cindex @code{fancyref}, LaTeX package @@ -889,39 +963,39 @@ selection buffer. @item q Exit the selection process without inserting any reference into the -buffer.@refill +buffer. @tablesubheading{Controlling what gets displayed} @vindex reftex-label-menu-flags -The defaults for the following flags can be configured with the variable +The defaults for the following flags can be configured with the variable @code{reftex-label-menu-flags} (@pxref{Options (Referencing Labels)}). @item c Toggle the display of the one-line label definition context in the -selection buffer.@refill +selection buffer. @item F Toggle the display of the file borders of a multifile document in the -selection buffer.@refill +selection buffer. @item t Toggle the display of the table of contents in the selection buffer. -With prefix @var{arg}, change the maximum level of toc entries displayed -to @var{arg}. Chapters are level 1, section are level 2.@refill +With prefix @var{arg}, change the maximum level of toc entries displayed +to @var{arg}. Chapters are level 1, section are level 2. @item # -Toggle the display of a label counter in the selection buffer.@refill +Toggle the display of a label counter in the selection buffer. @item % Toggle the display of labels hidden in comments in the selection buffers. Sometimes, you may have commented out parts of your document. If these parts contain label definitions, @b{Ref@TeX{}} can still display -and reference these labels.@refill +and reference these labels. @tablesubheading{Updating the buffer} @item g Update the menu. This will rebuilt the menu from the internal label -list, but not reparse the document (see @kbd{r}).@refill +list, but not reparse the document (see @kbd{r}). @item r @vindex reftex-enable-partial-scans @@ -929,27 +1003,27 @@ Reparse the document to update the information on all labels and rebuild the menu. If the variable @code{reftex-enable-partial-scans} is non-@code{nil} and your document is a multifile document, this will reparse only a part of the document (the file in which the label at -point was defined).@refill +point was defined). @item C-u r Reparse the @emph{entire} document. @item s Switch the label category. After prompting for another label category, -a menu for that category will be shown.@refill +a menu for that category will be shown. @item x Reference a label from an external document. With the LaTeX package @code{xr} it is possible to reference labels defined in another document. This key will switch to the label menu of an external document and let you select a label from there (@pxref{xr (LaTeX -package),,xr}).@refill +package),,xr}). @end table @vindex reftex-select-label-map In order to define additional commands for the selection process, the -keymap @code{reftex-select-label-map} may be used.@refill +keymap @code{reftex-select-label-map} may be used. @node Builtin Label Environments, Defining Label Environments, Referencing Labels, Labels and References @section Builtin Label Environments @@ -963,7 +1037,7 @@ keymap @code{reftex-select-label-map} may be used.@refill with a label (i.e. which carry their own counters). By default, @b{Ref@TeX{}} recognizes all labeled environments and macros discussed in @cite{The LaTeX Companion by Goossens, Mittelbach & Samarin, Addison-Wesley -1994.}. These are:@refill +1994.}. These are: @itemize @minus @item @@ -979,7 +1053,7 @@ LaTeX Companion by Goossens, Mittelbach & Samarin, Addison-Wesley @cindex LaTeX core @code{figure}, @code{figure*}, @code{table}, @code{table*}, @code{equation}, @code{eqnarray}, @code{enumerate}, the @code{\footnote} macro (this is -the LaTeX core stuff)@refill +the LaTeX core stuff) @item @cindex AMS-LaTeX @cindex @code{amsmath}, LaTeX package @@ -994,7 +1068,7 @@ the LaTeX core stuff)@refill @cindex @code{subequations}, AMS-LaTeX environment @code{align}, @code{gather}, @code{multline}, @code{flalign}, @code{alignat}, @code{xalignat}, @code{xxalignat}, @code{subequations} -(from AMS-LaTeX's @file{amsmath.sty} package)@refill +(from AMS-LaTeX's @file{amsmath.sty} package) @item @cindex @code{endnote}, LaTeX package @cindex LaTeX packages, @code{endnote} @@ -1039,7 +1113,7 @@ the @code{\endnote} macro (from @file{endnotes.sty}) @cindex @code{subfigure}, LaTeX environment @cindex @code{subfigure*}, LaTeX environment @code{subfigure}, @code{subfigure*}, the @code{\subfigure} macro -(@file{subfigure.sty})@refill +(@file{subfigure.sty}) @item @cindex @code{supertab}, LaTeX package @cindex LaTeX packages, @code{supertab} @@ -1054,7 +1128,7 @@ the @code{\endnote} macro (from @file{endnotes.sty}) If you want to use other labeled environments, defined with @code{\newtheorem}, @b{Ref@TeX{}} needs to be configured to recognize -them (@pxref{Defining Label Environments}).@refill +them (@pxref{Defining Label Environments}). @node Defining Label Environments, Reference Info, Builtin Label Environments, Labels and References @section Defining Label Environments @@ -1077,7 +1151,7 @@ Here we will discuss a few examples, in order to make things clearer. It can also be instructive to look at the constant @code{reftex-label-alist-builtin} which contains the entries for all the builtin environments and macros (@pxref{Builtin Label -Environments}).@refill +Environments}). @menu * Theorem and Axiom:: Defined with @code{\newenvironment}. @@ -1096,7 +1170,7 @@ Environments}).@refill @cindex @code{\newtheorem} Suppose you are using @code{\newtheorem} in LaTeX in order to define two -new environments, @code{theorem} and @code{axiom}@refill +new environments, @code{theorem} and @code{axiom} @example \newtheorem@{axiom@}@{Axiom@} @@ -1128,7 +1202,7 @@ The type indicator characters @code{?a} and @code{?h} are used for prompts when @b{Ref@TeX{}} queries for a label type. @code{?h} was chosen for @code{theorem} since @code{?t} is already taken by @code{table}. Note that also @code{?s}, @code{?f}, @code{?e}, -@code{?i}, @code{?n} are already used for standard environments.@refill +@code{?i}, @code{?n} are already used for standard environments. @noindent The labels for Axioms and Theorems will have the prefixes @samp{ax:} and @@ -1149,28 +1223,28 @@ labels for the new environments. @noindent The @samp{~\ref@{%s@}} is a format string indicating how to insert -references to these labels.@refill +references to these labels. @noindent -The next item indicates how to grab context of the label definition.@refill +The next item indicates how to grab context of the label definition. @itemize @minus @item @code{t} means to get it from a default location (from the beginning of a @code{\macro} or after the @code{\begin} statement). @code{t} is -@emph{not} a good choice for eqnarray and similar environments.@refill +@emph{not} a good choice for eqnarray and similar environments. @item -@code{nil} means to use the text right after the label definition.@refill +@code{nil} means to use the text right after the label definition. @item For more complex ways of getting context, see the variable @code{reftex-label-alist} (@ref{Options (Defining Label -Environments)}).@refill +Environments)}). @end itemize The following list of strings is used to guess the correct label type from the word before point when creating a reference. E.g. if you write: @samp{As we have shown in Theorem} and then press @kbd{C-c )}, @b{Ref@TeX{}} will know that you are looking for a theorem label and -restrict the menu to only these labels without even asking.@refill +restrict the menu to only these labels without even asking. The final item in each entry is the level at which the environment should produce entries in the table of context buffer. If the number is @@ -1178,11 +1252,11 @@ positive, the environment will produce numbered entries (like @code{\section}), if it is negative the entries will be unnumbered (like @code{\section*}). Use this only for environments which structure the document similar to sectioning commands. For everything else, omit the -item.@refill +item. To do the same configuration with @code{customize}, you need to click on the @code{[INS]} button twice to create two templates and fill them in -like this:@refill +like this: @example Reftex Label Alist: [Hide] @@ -1218,7 +1292,7 @@ the new environments to work, you might want to add the letters @samp{a} and @samp{h} to some of the flags in the variables @code{reftex-insert-label-flags} (@pxref{Options (Creating Labels)}) and @code{reftex-label-menu-flags} (@pxref{Options (Referencing -Labels)}).@refill +Labels)}). @node Quick Equation, Figure Wrapper, Theorem and Axiom , Defining Label Environments @@ -1252,7 +1326,7 @@ The first element in this list is now the macro with empty braces as an an equation label, the different @code{nil} elements indicate to use the default values for equations. The @samp{1} as the fifth element indicates that the context of the label definition should be the 1st -argument of the macro.@refill +argument of the macro. Here is again how this would look in the customization buffer: @@ -1295,7 +1369,7 @@ which would be called like Now we need to tell @b{Ref@TeX{}} that the 4th argument of the @code{\myfig} macro @emph{is itself} a figure label, and where to find -the context.@refill +the context. @lisp (setq reftex-label-alist @@ -1308,19 +1382,19 @@ indicates that this is a figure label which will be listed together with labels from normal figure environments. The @code{nil} entries for prefix and reference format mean to use the defaults for figure labels. The @samp{3} for the context method means to grab the 3rd macro argument -- the caption.@refill +- the caption. As a side effect of this configuration, @code{reftex-label} will now insert the required naked label (without the @code{\label} macro) when point is directly after the opening parenthesis of a @code{\myfig} macro -argument.@refill +argument. Again, here the configuration in the customization buffer: @example [INS] [DEL] Package or Detailed : [Value Menu] Detailed: Environment or \macro : [Value Menu] String: \myfig[]@{@}@{@}@{*@}@{@} - Type specification : [Value Menu] Char : f + Type specification : [Value Menu] Char : f Label prefix string : [Value Menu] Default Label reference format: [Value Menu] Default Context method : [Value Menu] Macro arg nr: 3 @@ -1341,7 +1415,7 @@ want to add some magic words, for another language. Changing only the information associated with a label category is done by giving @code{nil} for the environment name and then specify the items you want to define. Here is an example which adds German magic words to all -predefined label categories.@refill +predefined label categories. @lisp (setq reftex-label-alist @@ -1370,7 +1444,7 @@ do this: @end lisp @b{Ref@TeX{}} has also a predefined symbol for this special purpose. The -following is equivalent to the line above.@refill +following is equivalent to the line above. @lisp (setq reftex-label-alist '(AMSTeX)) @@ -1378,7 +1452,7 @@ following is equivalent to the line above.@refill Note that this is automatically done by the @file{amsmath.el} style file of AUCTeX (@pxref{Style Files}) - so if you use AUCTeX, -this configuration will not be necessary.@refill +this configuration will not be necessary. @node Non-Standard Environments, Putting it Together, Using \eqref, Defining Label Environments @subsection Non-standard Environments @@ -1397,7 +1471,7 @@ it must return a buffer position indicating the start of this environment. The return value must be @code{nil} on failure to detect the environment. The function is called with one argument @var{bound}. If non-@code{nil}, @var{bound} is a boundary for backwards searches -which should be observed. We will discuss two examples.@refill +which should be observed. We will discuss two examples. @cindex LaTeX commands, abbreviated @@ -1409,7 +1483,7 @@ to search backward for these macros. When the first match is @code{\be}, point is in this environment and the function must return the beginning of the match. To avoid scanning too far, we can also look for empty lines which cannot occur inside an equation environment. -Here is the setup:@refill +Here is the setup: @lisp ;; Setup entry in reftex-label-alist, using all defaults for equations @@ -1417,7 +1491,7 @@ Here is the setup:@refill (defun detect-be-ee (bound) ;; Search backward for the macros or an empty line - (if (re-search-backward + (if (re-search-backward "\\(^[ \t]*\n\\|\\\\ee\\>\\)\\|\\(\\\\be\\>\\)" bound t) (if (match-beginning 2) (match-beginning 2) ; Return start of environment @@ -1429,7 +1503,7 @@ Here is the setup:@refill @cindex LaTeX packages, @code{linguex} A more complex example is the @file{linguex.sty} package which defines list macros @samp{\ex.}, @samp{\a.}, @samp{\b.} etc. for lists which are -terminated by @samp{\z.} or by an empty line.@refill +terminated by @samp{\z.} or by an empty line. @example \ex. \label@{ex:12@} Some text in an exotic language ... @@ -1456,14 +1530,14 @@ for @b{Ref@TeX{}}. (defun detect-linguex (bound) (let ((cnt 0)) (catch 'exit - (while + (while ;; Search backward for all possible delimiters (re-search-backward (concat "\\(^[ \t]*\n\\)\\|\\(\\\\z\\.\\)\\|" "\\(\\ex[ig]?\\.\\)\\|\\(\\\\a\\.\\)") nil t) ;; Check which delimiter was matched. - (cond + (cond ((match-beginning 1) ;; empty line terminates all - return nil (throw 'exit nil)) @@ -1519,7 +1593,7 @@ message. @b{Ref@TeX{}} can also display the label definition corresponding to a @code{\ref} macro, or all reference locations corresponding to a @code{\label} macro. @xref{Viewing Cross-References}, for more -information.@refill +information. @node xr (LaTeX package), varioref (LaTeX package), Reference Info, Labels and References @section @code{xr}: Cross-Document References @@ -1532,7 +1606,7 @@ information.@refill The LaTeX package @code{xr} makes it possible to create references to labels defined in external documents. The preamble of a document using -@code{xr} will contain something like this:@refill +@code{xr} will contain something like this: @example \usepackage@{xr@} @@ -1543,18 +1617,18 @@ labels defined in external documents. The preamble of a document using @noindent and we can make references to any labels defined in these external documents by using the prefixes @samp{V1-} and @samp{V3-}, -respectively.@refill +respectively. @b{Ref@TeX{}} can be used to create such references as well. Start the referencing process normally, by pressing @kbd{C-c )}. Select a label type if necessary. When you see the label selection buffer, pressing @kbd{x} will switch to the label selection buffer of one of the external documents. You may then select a label as before and @b{Ref@TeX{}} will -insert it along with the required prefix.@refill +insert it along with the required prefix. For this kind of inter-document cross-references, saving of parsing information and the use of multiple selection buffers can mean a large -speed-up (@pxref{Optimizations}).@refill +speed-up (@pxref{Optimizations}). @node varioref (LaTeX package), fancyref (LaTeX package), xr (LaTeX package), Labels and References @section @code{varioref}: Variable Page References @@ -1572,7 +1646,7 @@ always use @code{\vref}, you may want to make it the default by customizing the variable @code{reftex-vref-is-default}. If this toggling seems too inconvenient, you can also use the command @code{reftex-varioref-vref}@footnote{bind it to @kbd{C-c v}.}. -Or use AUCTeX to create your macros (@pxref{AUCTeX}).@refill +Or use AUCTeX to create your macros (@pxref{AUCTeX}). @node fancyref (LaTeX package), , varioref (LaTeX package), Labels and References @section @code{fancyref}: Fancy Cross References @@ -1594,7 +1668,7 @@ shows the current status of this switch. If this cycling seems inconvenient, you can also use the commands @code{reftex-fancyref-fref} and @code{reftex-fancyref-Fref}@footnote{bind them to @kbd{C-c f} and @kbd{C-c F}.}. Or use AUCTeX to create your macros -(@pxref{AUCTeX}).@refill +(@pxref{AUCTeX}). @node Citations, Index Support, Labels and References, Top @chapter Citations @@ -1605,7 +1679,7 @@ Citations in LaTeX are done with the @code{\cite} macro or variations of it. The argument of the macro is a citation key which identifies an article or book in either a BibTeX database file or in an explicit @code{thebibliography} environment in the document. @b{Ref@TeX{}}'s -support for citations helps to select the correct key quickly.@refill +support for citations helps to select the correct key quickly. @menu * Creating Citations:: How to create them. @@ -1613,6 +1687,7 @@ support for citations helps to select the correct key quickly.@refill * Citation Info:: View the corresponding database entry. * Chapterbib and Bibunits:: Multiple bibliographies in a Document. * Citations Outside LaTeX:: How to make citations in Emails etc. +* BibTeX Database Subsets:: Extract parts of a big database. @end menu @node Creating Citations, Citation Styles, , Citations @@ -1628,7 +1703,7 @@ In order to create a citation, press @kbd{C-c [}. @b{Ref@TeX{}} then prompts for a regular expression which will be used to search through the database and present the list of matches to choose from in a selection process similar to that for selecting labels -(@pxref{Referencing Labels}).@refill +(@pxref{Referencing Labels}). The regular expression uses an extended syntax: @samp{&&} defines a logic @code{and} for regular expressions. For example @@ -1638,7 +1713,7 @@ Einstein. When entering the regular expression, you can complete on known citation keys. RefTeX also offers a default when prompting for a regular expression. This default is the word before the cursor or the word before the current @samp{\cite} command. Sometimes this may be a -good search key.@refill +good search key. @cindex @code{\bibliography} @cindex @code{thebibliography}, LaTeX environment @@ -1653,12 +1728,12 @@ If you do not use BibTeX, but the document contains an explicit information from there. Note that in this case the information presented in the selection buffer will just be a copy of relevant @code{\bibitem} entries, not the structured listing available with -BibTeX database files.@refill +BibTeX database files. @kindex ? In the selection buffer, the following keys provide special commands. A summary of this information is always available from the selection -process by pressing @kbd{?}.@refill +process by pressing @kbd{?}. @table @kbd @tablesubheading{General} @@ -1678,24 +1753,24 @@ Go to previous article. @tablesubheading{Access to full database entries} @item @key{SPC} Show the database entry corresponding to the article at point, in -another window. See also the @kbd{f} key.@refill +another window. See also the @kbd{f} key. @item f Toggle follow mode. When follow mode is active, the other window will always display the full database entry of the current article. This is equivalent to pressing @key{SPC} after each cursor motion. With BibTeX -entries, follow mode can be rather slow.@refill +entries, follow mode can be rather slow. @tablesubheading{Selecting entries and creating the citation} @item @key{RET} Insert a citation referencing the article at point into the buffer from -which the selection process was started.@refill +which the selection process was started. @item mouse-2 @vindex reftex-highlight-selection Clicking with mouse button 2 on a citation will accept it like @key{RET} would. See also variable @code{reftex-highlight-selection}, @ref{Options -(Misc)}.@refill +(Misc)}. @item m Mark the current entry. When one or several entries are marked, @@ -1707,11 +1782,21 @@ Unmark a marked entry. @item a Accept all (marked) entries in the selection buffer and create a single -@code{\cite} macro referring to them.@refill +@code{\cite} macro referring to them. @item A Accept all (marked) entries in the selection buffer and create a -separate @code{\cite} macro for each of it.@refill +separate @code{\cite} macro for each of it. + +@item e +Create a new BibTeX database file which contains all @i{marked} entries +in the selection buffer. If no entries are marked, all entries are +selected. + +@item E +Create a new BibTeX database file which contains all @i{unmarked} +entries in the selection buffer. If no entries are marked, all entries +are selected. @item @key{TAB} Enter a citation key with completion. This may also be a key which does @@ -1719,30 +1804,30 @@ not yet exist. @item . Show insertion point in another window. This is the point from where you -called @code{reftex-citation}.@refill +called @code{reftex-citation}. @tablesubheading{Exiting} @item q Exit the selection process without inserting a citation into the -buffer.@refill +buffer. @tablesubheading{Updating the buffer} @item g Start over with a new regular expression. The full database will be -rescanned with the new expression (see also @kbd{r}).@refill +rescanned with the new expression (see also @kbd{r}). @c FIXME: Should we use something else here? r is usually rescan! @item r Refine the current selection with another regular expression. This will @emph{not} rescan the entire database, but just the already selected -entries.@refill +entries. @end table @vindex reftex-select-bib-map In order to define additional commands for this selection process, the -keymap @code{reftex-select-bib-map} may be used.@refill +keymap @code{reftex-select-bib-map} may be used. @node Citation Styles, Citation Info, Creating Citations, Citations @section Citation Styles @@ -1782,11 +1867,15 @@ SELECT A CITATION FORMAT [y] \citeyear@{%l@} @end example +@vindex reftex-cite-prompt-optional-args +If cite formats contain empty paris of square brackets, RefTeX can +will prompt for values of these optional arguments if you call the +@code{reftex-citation} command with a @kbd{C-u} prefix. Following the most generic of these packages, @code{natbib}, the builtin citation packages always accept the @kbd{t} key for a @emph{textual} -citation (like: @code{Jones et al. (1997) have shown...}) as well as +citation (like: @code{Jones et al. (1997) have shown...}) as well as the @kbd{p} key for a parenthetical citation (like: @code{As shown -earlier (Jones et al, 1997)}).@refill +earlier (Jones et al, 1997)}). To make one of these styles the default, customize the variable @code{reftex-cite-format} or put into @file{.emacs}: @@ -1798,7 +1887,7 @@ To make one of these styles the default, customize the variable You can also use AUCTeX style files to automatically set the citation style based on the @code{usepackage} commands in a given document. @xref{Style Files}, for information on how to set up the style -files correctly.@refill +files correctly. @node Citation Info, Chapterbib and Bibunits, Citation Styles, Citations, Top @section Citation Info @@ -1819,7 +1908,7 @@ only displayed if the echo area is not occupied by a different message. @b{Ref@TeX{}} can also display the @code{\bibitem} or BibTeX database entry corresponding to a @code{\cite} macro, or all citation locations corresponding to a @code{\bibitem} or BibTeX database entry. -@xref{Viewing Cross-References}.@refill +@xref{Viewing Cross-References}. @node Chapterbib and Bibunits, Citations Outside LaTeX, Citation Info, Citations @section Chapterbib and Bibunits @@ -1836,7 +1925,7 @@ separate file (as it is required for @code{chapterbib} anyway). Then you have multiple bibliographies within a @emph{single file}, this may or may not be the case. -@node Citations Outside LaTeX, , Chapterbib and Bibunits, Citations +@node Citations Outside LaTeX, BibTeX Database Subsets, Chapterbib and Bibunits, Citations @section Citations outside LaTeX @cindex Citations outside LaTeX @vindex reftex-default-bibliography @@ -1850,7 +1939,7 @@ Setting the variable @code{reftex-cite-format} to the symbol @code{locally} does a decent job of putting all relevant information about a citation directly into the buffer. Here is the lisp code to add the @kbd{C-c [} binding to the mail buffer. It also provides a local -binding for @code{reftex-cite-format}.@refill +binding for @code{reftex-cite-format}. @lisp (add-hook 'mail-setup-hook @@ -1861,6 +1950,34 @@ binding for @code{reftex-cite-format}.@refill (reftex-citation)))))) @end lisp +@node BibTeX Database Subsets, , Citations Outside LaTeX, Citations +@section Database Subsets +@cindex BibTeX database subsets +@findex reftex-create-bibtex-file + +@b{Ref@TeX{}} offers two ways to create a new BibTeX database file. + +The first option produces a file which contains only the entries +actually referenced in the current document. This can be useful if +the database in only meant for a single document and you want to clean +it of old and unused ballast. It can also be useful while writing a +document together with collaborators, in order to avoid sending around +the entire (possibly very large) database. To create the file, use +@kbd{M-x reftex-create-bibtex-file}, also available from the menu +under @code{Ref->Global Actions->Create Bibtex File}. The command will +prompt for a BibTeX file name and write the extracted entries to that +file. + +The second option makes use of the selection process started by the +command @kbd{C-c [} (@pxref{Creating Citations}). This command uses a +regular expression to select entries, and lists them in a formatted +selection buffer. After pressing the @kbd{e} key (mnemonics: Export), +the command will prompt for the name of a new BibTeX file and write +the selected entries to that file. You can also first mark some +entries in the selection buffer with the @kbd{m} key and then export +either the @i{marked} entries (with the @kbd{e} key) or the +@i{unmarked} entries (with the @kbd{E} key). + @node Index Support, Viewing Cross-References, Citations, Top @chapter Index Support @cindex Index Support @@ -1875,7 +1992,7 @@ Index entries are created with the @code{\index@{@var{entry}@}} macro. All entries defined in a document are written out to the @file{.aux} file. A separate tool must be used to convert this information into a nicely formatted index. Tools used with LaTeX include @code{MakeIndex} -and @code{xindy}.@refill +and @code{xindy}. Indexing is a very difficult task. It must follow strict conventions to make the index consistent and complete. There are basically two @@ -1893,7 +2010,7 @@ to define special purpose macros which define an item and at the same time make an index entry, possibly with special formatting to make the reference page in the index bold or underlined. To make @b{Ref@TeX{}} support for indexing possible, these special macros must be added to -@b{Ref@TeX{}}'s configuration (@pxref{Defining Index Macros}).@refill +@b{Ref@TeX{}}'s configuration (@pxref{Defining Index Macros}). @item The rest of the index is often just a collection of where in the @@ -1901,7 +2018,7 @@ document certain words or phrases are being used. This part is difficult to develop along with the document, because consistent entries for each occurrence are needed and are best selected when the document is ready. @b{Ref@TeX{}} supports this with an @emph{index phrases file} -which collects phrases and helps indexing the phrases globally.@refill +which collects phrases and helps indexing the phrases globally. @end enumerate Before you start, you need to make sure that @b{Ref@TeX{}} knows about @@ -1913,7 +2030,7 @@ argument, and @b{Ref@TeX{}} needs to be configured for those. A sufficiently new version of AUCTeX (9.10c or later) will do this automatically. If you really don't use AUCTeX (you should!), this configuration needs to be done by hand with the menu (@code{Ref->Index -Style}), or globally for all your documents with@refill +Style}), or globally for all your documents with @lisp (setq reftex-index-macros '(multind)) @r{or} @@ -1957,7 +2074,7 @@ available index macros and for its arguments. Completion will be available for the index entry and, if applicable, the index tag. The index tag is a string identifying one of multiple indices. With the @file{multind} and @file{index} packages, this tag is the first argument -to the redefined @code{\index} macro.@refill +to the redefined @code{\index} macro. @node The Index Phrases File, Displaying and Editing the Index, Creating Index Entries, Index Support @section The Index Phrases File @@ -1977,7 +2094,7 @@ of the available index macros. This list is initialized from @code{reftex-index-macros} (@pxref{Defining Index Macros}). You can edit the header as needed, but if you define new LaTeX indexing macros, don't forget to add them to @code{reftex-index-macros} as well. Here is -a phrase file header example:@refill +a phrase file header example: @example % -*- mode: reftex-index-phrases -*- @@ -1999,7 +2116,7 @@ indicates if @var{word} is indexed by the macro as @samp{\index@{@var{word}@}@var{word}} (@var{repeat} = @code{t}). In the above example it is assumed that the macro @code{\index*@{@var{word}@}} already typesets its argument in the text, so that it is unnecessary to -repeat @var{word} outside the macro.@refill +repeat @var{word} outside the macro. @menu * Collecting Phrases:: Collecting from document or external. @@ -2015,13 +2132,13 @@ repeat @var{word} outside the macro.@refill Phrases for indexing can be collected while writing the document. The command @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) -copies the current selection (if active) or the word near point into the +copies the current selection (if active) or the word near point into the phrases buffer. It then selects this buffer, so that the phrase line can be edited. To return to the LaTeX document, press @kbd{C-c C-c} (@code{reftex-index-phrases-save-and-return}). You can also prepare the list of index phrases in a different way and -copy it into the phrases file. For example you might want to start from +copy it into the phrases file. For example you might want to start from a word list of the document and remove all words which should not be indexed. @@ -2030,7 +2147,7 @@ The phrase lines in the phrase buffer must have a specific format. format. A phrase line looks like this: @example -[@var{key}] @var{phrase} [ @var{arg}[&&@var{arg}]... [ || @var{arg}]...] +[@var{key}] @var{phrase} [ @var{arg}[&&@var{arg}]... [ || @var{arg}]...] @end example @code{} stands for white space containing at least one @key{TAB}. @@ -2049,7 +2166,7 @@ index entries, separate the different index arguments with @samp{ && able to choose at each match between several different index arguments, separate them with @samp{ || }@footnote{@samp{||} with optional spaces, see @code{reftex-index-phrases-logical-or-regexp}.}. Here is an -example:@refill +example: @example %-------------------------------------------------------------------- @@ -2071,7 +2188,7 @@ occurrence of @samp{Mars} you will be able choose between indexing it as a subitem of @samp{Planets}, @samp{Gods} or @samp{Chocolate Bars}. Finally, every occurrence of @samp{Pluto} will be indexed as @samp{\index@{Planets!Pluto@}\index@{Kuiper Belt Objects!Pluto@}Pluto} -and will therefore create two different index entries.@refill +and will therefore create two different index entries. @node Consistency Checks, Global Indexing, Collecting Phrases, The Index Phrases File @subsection Consistency Checks @@ -2087,13 +2204,13 @@ alphabetically - this is done with the command @kbd{C-c C-s} buffer alphabetically by search phrase. If you want to group certain phrases and only sort within the groups, insert empty lines between the groups. Sorting will only change the sequence of phrases within each -group (see the variable @code{reftex-index-phrases-sort-in-blocks}).@refill +group (see the variable @code{reftex-index-phrases-sort-in-blocks}). @kindex C-c C-i A useful command is @kbd{C-c C-i} (@code{reftex-index-phrases-info}) which lists information about the phrase at point, including an example of how the index entry will look like and the number of expected matches -in the document.@refill +in the document. @kindex C-c C-t Another important check is to find out if there are double or @@ -2104,7 +2221,7 @@ second phrase will not match because of the index macro inserted before (@code{reftex-index-find-next-conflict-phrase}) finds the next phrase in the buffer which is either duplicate or a subphrase of another phrase. In order to check the whole buffer like this, start at the beginning and -execute this command repeatedly.@refill +execute this command repeatedly. @node Global Indexing, , Consistency Checks, The Index Phrases File @subsection Global Indexing @@ -2119,13 +2236,13 @@ There are several commands which start indexing: @kbd{C-c C-x} acts on the current phrase line, @kbd{C-c C-r} on all lines in the current region and @kbd{C-c C-a} on all phrase lines in the buffer. It is probably good to do indexing in small chunks since your concentration -may not last long enough to do everything in one go.@refill +may not last long enough to do everything in one go. @b{Ref@TeX{}} will start at the first phrase line and search the phrase globally in the whole document. At each match it will stop, compute the replacement string and offer you the following choices@footnote{Windows -users: Restrict yourself to the described keys during indexing. Pressing -@key{Help} at the indexing prompt can apparently hang Emacs.}:@refill +users: Restrict yourself to the described keys during indexing. Pressing +@key{Help} at the indexing prompt can apparently hang Emacs.}: @table @kbd @item y @@ -2177,7 +2294,7 @@ this match is already indexed. A match is considered indexed if it is either the argument of an index macro, or if an index macro is directly (without whitespace separation) before or after the match. Index macros are those configured in @code{reftex-index-macros}. Intended for -re-indexing a documents after changes have been made.@refill +re-indexing a documents after changes have been made. @end table Even though indexing should be the last thing you do to a document, you @@ -2185,7 +2302,7 @@ are bound to make changes afterwards. Indexing then has to be applied to the changed regions. The command @code{reftex-index-phrases-apply-to-region} is designed for this purpose. When called from a LaTeX document with active region, it will -apply @code{reftex-index-all-phrases} to the current region.@refill +apply @code{reftex-index-all-phrases} to the current region. @node Displaying and Editing the Index, Builtin Index Macros, The Index Phrases File, Index Support @section Displaying and Editing the Index @@ -2201,7 +2318,7 @@ In order to compile and display the index, press @kbd{C-c >}. If the document uses multiple indices, @b{Ref@TeX{}} will ask you to select one. Then, all index entries will be sorted alphabetically and displayed in a special buffer, the @file{*Index*} buffer. From that -buffer you can check and edit each entry.@refill +buffer you can check and edit each entry. The index can be restricted to the current section or the region. Then only entries in that part of the document will go into the compiled @@ -2210,7 +2327,7 @@ index. To restrict to the current section, use a numeric prefix region, make the region active and use a numeric prefix @samp{3} (press @kbd{C-u 3 C-c >}). From within the @file{*Index*} buffer the restriction can be moved from one section to the next by pressing the -@kbd{<} and @kbd{>} keys.@refill +@kbd{<} and @kbd{>} keys. One caveat: @b{Ref@TeX{}} finds the definition point of an index entry by searching near the buffer position where it had found to macro during @@ -2220,12 +2337,12 @@ rescan the buffer to ensure the correspondence between the @file{*Index*} buffer and the definition locations. It is therefore advisable to rescan the document (with @kbd{r} or @kbd{C-u r}) frequently while editing the index from the @file{*Index*} -buffer.@refill +buffer. @kindex ? Here is a list of special commands available in the @file{*Index*} buffer. A summary of this information is always available by pressing -@kbd{?}.@refill +@kbd{?}. @table @kbd @tablesubheading{General} @@ -2238,25 +2355,25 @@ Prefix argument. @tablesubheading{Moving around} @item ! A..Z Pressing any capital letter will jump to the corresponding section in -the @file{*Index*} buffer. The exclamation mark is special and jumps to +the @file{*Index*} buffer. The exclamation mark is special and jumps to the first entries alphabetically sorted below @samp{A}. These are -usually non-alphanumeric characters.@refill +usually non-alphanumeric characters. @item n -Go to next entry.@refill +Go to next entry. @item p -Go to previous entry.@refill +Go to previous entry. @tablesubheading{Access to document locations} @item @key{SPC} -Show the place in the document where this index entry is defined.@refill +Show the place in the document where this index entry is defined. @item @key{TAB} Go to the definition of the current index entry in another -window.@refill +window. @item @key{RET} Go to the definition of the current index entry and hide the -@file{*Index*} buffer window.@refill +@file{*Index*} buffer window. @item f @vindex reftex-index-follow-mode @@ -2268,20 +2385,20 @@ cursor motion. The default for this flag can be set with the variable @code{reftex-index-follow-mode}. Note that only context in files already visited is shown. @b{Ref@TeX{}} will not visit a file just for follow mode. See, however, the variable -@code{reftex-revisit-to-follow}.@refill +@code{reftex-revisit-to-follow}. @tablesubheading{Entry editing} @item e Edit the current index entry. In the minibuffer, you can edit the -index macro which defines this entry.@refill +index macro which defines this entry. @item C-k Kill the index entry. Currently not implemented because I don't know -how to implement an @code{undo} function for this.@refill +how to implement an @code{undo} function for this. @item * Edit the @var{key} part of the entry. This is the initial part of the -entry which determines the location of the entry in the index.@refill +entry which determines the location of the entry in the index. @item | Edit the @var{attribute} part of the entry. This is the part after the @@ -2289,82 +2406,82 @@ vertical bar. With @code{MakeIndex}, this part is an encapsulating macro. With @code{xindy}, it is called @emph{attribute} and is a property of the index entry that can lead to special formatting. When called with @kbd{C-u} prefix, kill the entire @var{attribute} -part.@refill +part. @item @@ Edit the @var{visual} part of the entry. This is the part after the @samp{@@} which is used by @code{MakeIndex} to change the visual appearance of the entry in the index. When called with @kbd{C-u} -prefix, kill the entire @var{visual} part.@refill +prefix, kill the entire @var{visual} part. @item ( Toggle the beginning of page range property @samp{|(} of the -entry.@refill +entry. @item ) -Toggle the end of page range property @samp{|)} of the entry.@refill +Toggle the end of page range property @samp{|)} of the entry. @item _ Make the current entry a subentry. This command will prompt for the -superordinate entry and insert it.@refill +superordinate entry and insert it. @item ^ -Remove the highest superordinate entry. If the current entry is a +Remove the highest superordinate entry. If the current entry is a subitem (@samp{aaa!bbb!ccc}), this function moves it up the hierarchy -(@samp{bbb!ccc}).@refill +(@samp{bbb!ccc}). @tablesubheading{Exiting} @item q -Hide the @file{*Index*} buffer.@refill +Hide the @file{*Index*} buffer. @item k -Kill the @file{*Index*} buffer.@refill +Kill the @file{*Index*} buffer. @item C-c = -Switch to the Table of Contents buffer of this document.@refill +Switch to the Table of Contents buffer of this document. @tablesubheading{Controlling what gets displayed} @item c @vindex reftex-index-include-context Toggle the display of short context in the @file{*Index*} buffer. The default for this flag can be set with the variable -@code{reftex-index-include-context}.@refill +@code{reftex-index-include-context}. @item @} Restrict the index to a single document section. The corresponding section number will be displayed in the @code{R<>} indicator in the -mode line and in the header of the @file{*Index*} buffer.@refill +mode line and in the header of the @file{*Index*} buffer. @item @{ -Widen the index to contain all entries of the document.@refill +Widen the index to contain all entries of the document. @item < When the index is currently restricted, move the restriction to the -previous section.@refill +previous section. @item > When the index is currently restricted, move the restriction to the -next section.@refill +next section. @tablesubheading{Updating the buffer} @item g Rebuild the @file{*Index*} buffer. This does @emph{not} rescan the document. However, it sorts the entries again, so that edited entries -will move to the correct position.@refill +will move to the correct position. @item r @vindex reftex-enable-partial-scans Reparse the LaTeX document and rebuild the @file{*Index*} buffer. When -@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this -location is defined in, not the entire document.@refill +@code{reftex-enable-partial-scans} is non-nil, rescan only the file this +location is defined in, not the entire document. @item C-u r Reparse the @emph{entire} LaTeX document and rebuild the @file{*Index*} -buffer.@refill +buffer. @item s Switch to a different index (for documents with multiple -indices).@refill +indices). @end table @@ -2427,7 +2544,7 @@ quick identification of these macros when @b{Ref@TeX{}} inserts new index entries with @code{reftex-index}. These codes need to be unique. @code{?i}, @code{?I}, and @code{?g} are reserved for the @code{\index}, @code{\index*}, and @code{\glossary} macros, -respectively. +respectively. The following string is empty unless your macro adds a superordinate entry to the index key - this is the case for the @code{\astobj} macro. @@ -2450,14 +2567,14 @@ Repeat: Macro with args: \ix@{*@} Index Tag : [Value Menu] String: idx Access Key : x - Key Prefix : + Key Prefix : Exclusion hook : nil Repeat Outside : [Toggle] off (nil) [INS] [DEL] List: Macro with args: \nindex@{*@} Index Tag : [Value Menu] String: name Access Key : n - Key Prefix : + Key Prefix : Exclusion hook : nil Repeat Outside : [Toggle] off (nil) [INS] [DEL] List: @@ -2481,7 +2598,7 @@ This would be done like this which specifies that the macro identified with the character @code{?x} (the @code{\ix} macro) should be used for indexing phrases and words already in the buffer with @kbd{C-c /} (@code{reftex-index-selection-or-word}). -The index tag is "idx".@refill +The index tag is "idx". @node Viewing Cross-References, RefTeXs Menu, Index Support, Top @chapter Viewing Cross--References @@ -2495,13 +2612,13 @@ if two document locations are linked, @b{Ref@TeX{}} can display the matching location(s) in another window. The @code{\label} and @code{\ref} macros are one way of establishing such a link. Also, a @code{\cite} macro is linked to the corresponding @code{\bibitem} macro or a BibTeX -database entry.@refill +database entry. The feature is invoked by pressing @kbd{C-c &} (@code{reftex-view-crossref}) while point is on the @var{key} argument of a macro involved in cross--referencing. You can also click with @kbd{S-mouse-2} on the macro argument. Here is what will happen for -individual classes of macros:@refill +individual classes of macros: @table @asis @@ -2512,7 +2629,7 @@ variants@footnote{all macros that start with @samp{ref} or end with @samp{ref} or @samp{refrange}} of the @code{\ref} macro are active for cross--reference display. This works also for labels defined in an external document when the current document refers to them through the -@code{xr} interface (@pxref{xr (LaTeX package)}).@refill +@code{xr} interface (@pxref{xr (LaTeX package)}). @item @code{\label} @cindex @code{\label} @@ -2521,20 +2638,20 @@ Display a document location which references this label. Pressing @kbd{C-c &} several times moves through the entire document and finds all locations. Not only the @code{\label} macro but also other macros with label arguments (as configured with @code{reftex-label-alist}) are -active for cross--reference display.@refill +active for cross--reference display. @item @code{\cite} @cindex @code{\cite} Display the corresponding BibTeX database entry or @code{\bibitem}. All usual variants@footnote{all macros that either start or end with @samp{cite}} of the @code{\cite} macro are active for cross--reference -display.@refill +display. @item @code{\bibitem} @cindex @code{\bibitem} Display a document location which cites this article. Pressing @kbd{C-c &} several times moves through the entire document and finds -all locations.@refill +all locations. @item BibTeX @cindex BibTeX buffer, viewing cite locations from @@ -2544,21 +2661,21 @@ document where the database entry at point is cited will be displayed. On first use, @b{Ref@TeX{}} will prompt for a buffer which belongs to the document you want to search. Subsequent calls will use the same document, until you break this link with a prefix argument to @kbd{C-c -&}.@refill +&}. @item @code{\index} @cindex @code{\index} Display other locations in the document which are marked by an index macro with the same key argument. Along with the standard @code{\index} and @code{\glossary} macros, all macros configured in -@code{reftex-index-macros} will be recognized.@refill +@code{reftex-index-macros} will be recognized. @end table @vindex reftex-view-crossref-extra While the display of cross referencing information for the above mentioned macros is hard--coded, you can configure additional relations in the variable @code{reftex-view-crossref-extra}. - + @iftex @chapter All the Rest @end iftex @@ -2572,7 +2689,7 @@ in the variable @code{reftex-view-crossref-extra}. which support this. From this menu you can access all of @b{Ref@TeX{}}'s commands and a few of its options. There is also a @code{Customize} submenu which can be used to access @b{Ref@TeX{}}'s -entire set of options.@refill +entire set of options. @node Key Bindings, Faces, RefTeXs Menu, Top @section Default Key Bindings @@ -2609,10 +2726,10 @@ Here is a summary of the available key bindings. Note that the @kbd{S-mouse-2} binding is only provided if this key is not already used by some other package. @b{Ref@TeX{}} will not override an -existing binding to @kbd{S-mouse-2}.@refill +existing binding to @kbd{S-mouse-2}. Personally, I also bind some functions in the users @kbd{C-c} map for -easier access.@refill +easier access. @c FIXME: Do we need bindings for the Index macros here as well? @c C-c i C-c I or so???? @@ -2658,7 +2775,7 @@ the ones defined in @file{font-lock.el}. Therefore, @b{Ref@TeX{}} will use faces only when @code{font-lock} is loaded. This seems to be reasonable because people who like faces will very likely have it loaded. If you wish to turn off fontification or change the involved -faces, see @ref{Options (Fontification)}.@refill +faces, see @ref{Options (Fontification)}. @node Multifile Documents, Language Support, AUCTeX, Top @section Multifile Documents @@ -2666,7 +2783,7 @@ faces, see @ref{Options (Fontification)}.@refill @cindex Documents, spread over files The following is relevant when working with documents spread over many -files:@refill +files: @itemize @bullet @item @@ -2674,7 +2791,7 @@ files:@refill several (multifile) documents at the same time without conflicts. @b{Ref@TeX{}} provides functions to run @code{grep}, @code{search} and @code{query-replace} on all files which are part of a multifile -document.@refill +document. @item @vindex tex-main-file @@ -2683,7 +2800,7 @@ All files belonging to a multifile document should define a File Variable (@code{TeX-master} for AUCTeX or @code{tex-main-file} for the standard Emacs LaTeX mode) containing the name of the master file. For example, to set the file variable @code{TeX-master}, include something -like the following at the end of each TeX file:@refill +like the following at the end of each TeX file: @example %%% Local Variables: *** @@ -2703,14 +2820,14 @@ this comment automatically. For more details see the documentation of the AUCTeX (@pxref{Multifile,,,auctex, The AUC TeX User Manual}), the documentation about the Emacs (La)TeX mode (@pxref{TeX Print,,,emacs, The GNU Emacs Manual}) and the Emacs documentation on File Variables -(@pxref{File Variables,,,emacs, The GNU Emacs Manual}).@refill +(@pxref{File Variables,,,emacs, The GNU Emacs Manual}). @item The context of a label definition must be found in the same file as the label itself in order to be processed correctly by @b{Ref@TeX{}}. The only exception is that section labels referring to a section statement outside the current file can still use that section title as -context.@refill +context. @end itemize @node Language Support, Finding Files, Multifile Documents, Top @@ -2748,7 +2865,7 @@ see @ref{Adding Magic Words}. @vindex reftex-multiref-punctuation @vindex reftex-cite-punctuation -@item +@item @b{Ref@TeX{}} inserts ``punctuation'' for multiple references and for the author list in citations. Some of this may be language dependent. See the variables @code{reftex-multiref-punctuation} and @@ -2802,7 +2919,7 @@ variables and configure @b{Ref@TeX{}} to use them instead: Specify the full search path directly in @b{Ref@TeX{}}'s variables. @lisp -(setq reftex-texpath-environment-variables +(setq reftex-texpath-environment-variables '("./inp:/home/cd/tex//:/usr/local/tex//")) (setq reftex-bibpath-environment-variables '("/home/cd/tex/lit/")) @@ -2820,7 +2937,7 @@ command depends upon the version of that program. (setq reftex-use-external-file-finders t) (setq reftex-external-file-finders '(("tex" . "kpsewhich -format=.tex %f") - ("bib" . "kpsewhich -format=.bib %f"))) + ("bib" . "kpsewhich -format=.bib %f"))) @end lisp @end itemize @@ -2835,9 +2952,9 @@ the new extension must also be known to AUCTeX via the variable @code{TeX-file-extension}. For example: @lisp -(setq reftex-file-extensions +(setq reftex-file-extensions '(("nw" "tex" ".tex" ".ltx") ("bib" ".bib"))) -(setq TeX-file-extensions +(setq TeX-file-extensions '( "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo")) @end lisp @@ -2853,7 +2970,7 @@ books, where some of it still might be useful.} Implementing the principle of least surprises, the default settings of @b{Ref@TeX{}} ensure a safe ride for beginners and casual users. However, when using @b{Ref@TeX{}} for a large project and/or on a small computer, -there are ways to improve speed or memory usage.@refill +there are ways to improve speed or memory usage. @itemize @bullet @item @@ -2887,7 +3004,7 @@ table-of-contents buffer will only prompt scanning of the file in which the label or section macro near the cursor was defined. Re-parsing of the entire document is still available by using @kbd{C-u C-u} as a prefix, or the capital @kbd{R} key in the menus. To use this feature, -try@refill +try @vindex reftex-enable-partial-scans @lisp @@ -2906,13 +3023,32 @@ for storing information about a document with master file @file{MASTER.tex}. It is written automatically when you kill a buffer in @code{reftex-mode} or when you exit Emacs. The information is restored when you begin working with a document in a new editing -session. To use this feature, put into @file{.emacs}:@refill +session. To use this feature, put into @file{.emacs}: @vindex reftex-save-parse-info @lisp (setq reftex-save-parse-info t) @end lisp +@item +@b{Identifying label types by prefix}@* +@cindex Parse information, saving to a file +@vindex reftex-trust-label-prefix +@b{Ref@TeX{}} normally parses around each label to check in which +environment this label is located, in order to assign a label type to +the label. If your document contains thousands of labels, document +parsing will take considerable time. If you have been using label prefixes +like tab: and fn: consistently, you can tell @b{Ref@TeX{}} to get the +label type directly from the prefix, without additional parsing. This +will be faster and also allow labels to end up in the correct category +if for some reason it is not possible to derive the correct type from +context. For example, to enable this feature for footnote and +equation labels, use + +@lisp +(setq reftex-trust-label-prefix '("fn:" "eq:")) +@end lisp + @item @b{Automatic Document Scans}@* @cindex Automatic document scans @@ -2927,7 +3063,7 @@ document. If this gets into your way, it can be turned off with @b{Ref@TeX{}} will then occasionally annotate new labels in the selection buffer, saying that their position in the label list in uncertain. A -manual document scan will fix this.@refill +manual document scan will fix this. @item @b{Multiple Selection Buffers}@* @@ -2941,7 +3077,7 @@ from one selection to the next. These buffers are updated automatically only when a new label has been added in the buffers category with @code{reftex-label}. Updating the buffer takes as long as recreating it - so the time saving is limited to cases where no new labels of that -category have been added. To turn on this feature, use@refill +category have been added. To turn on this feature, use @vindex reftex-use-multiple-selection-buffers @lisp @@ -2953,7 +3089,7 @@ category have been added. To turn on this feature, use@refill You can also inhibit the automatic updating entirely. Then the selection buffer will always pop up very fast, but may not contain the most recently defined labels. You can always update the buffer by hand, -with the @kbd{g} key. To get this behavior, use instead@refill +with the @kbd{g} key. To get this behavior, use instead @vindex reftex-auto-update-selection-buffers @lisp @@ -2976,7 +3112,7 @@ with the @kbd{g} key. To get this behavior, use instead@refill @end lisp @node AUCTeX, Multifile Documents, Faces, Top -@section AUC@TeX{} +@section @w{AUC @TeX{}} @cindex @code{AUCTeX}, Emacs package @cindex Emacs packages, @code{AUCTeX} @@ -2984,8 +3120,7 @@ AUCTeX is without doubt the best major mode for editing TeX and LaTeX files with Emacs (@pxref{Top,AUCTeX,,auctex, The AUCTeX User Manual}). If AUCTeX is not part of your Emacs distribution, you can get it@footnote{XEmacs 21.x users may want to install the corresponding -XEmacs package.} by ftp from the -@uref{ftp://ftp.gnu.org/pub/gnu/auctex,AUCTeX distribution site}. +XEmacs package.} by ftp from the @value{AUCTEXSITE}. @menu * AUCTeX-RefTeX Interface:: How both packages work together @@ -3002,7 +3137,7 @@ using @b{Ref@TeX{}}'s commands directly, you can then also use them indirectly as part of the AUCTeX environment@footnote{@b{Ref@TeX{}} 4.0 and AUCTeX 9.10c will be needed for all of this to work. Parts of it work also with earlier -versions.}. The interface is turned on with@refill +versions.}. The interface is turned on with @lisp (setq reftex-plug-into-AUCTeX t) @@ -3046,7 +3181,7 @@ will offer its default label which is derived from the section title. @item @b{AUCTeX tells @b{Ref@TeX{}} about new sections}@* When creating a new section with @kbd{C-c C-s}, @b{Ref@TeX{}} will not -have to rescan the buffer in order to see it.@refill +have to rescan the buffer in order to see it. @item @findex reftex-arg-label @@ -3070,7 +3205,7 @@ old functionality when you later decide to turn off the interface.} and supplies the macro arguments with @b{Ref@TeX{}'s} mechanisms. For example, when you type @kbd{C-c @key{RET} ref @key{RET}}, @b{Ref@TeX{}} will supply its label selection process (@pxref{Referencing -Labels}).@refill +Labels}). @item @b{@b{Ref@TeX{}} tells AUCTeX about new labels, citation-- and index keys}@* @@ -3088,16 +3223,16 @@ commands of a document (@pxref{Style Files,,,auctex}). Support for defines macros or environments connected with labels, citations, or the index. Many style files (e.g. @file{amsmath.el} or @file{natbib.el}) distributed with AUCTeX already support @b{Ref@TeX{}} in this -way.@refill +way. Before calling a @b{Ref@TeX{}} function, the style hook should always test for the availability of the function, so that the style file will -also work for people who do not use @b{Ref@TeX{}}. @refill +also work for people who do not use @b{Ref@TeX{}}. Additions made with style files in the way described below remain local to the current document. For example, if one package uses AMSTeX, the style file will make @b{Ref@TeX{}} switch over to @code{\eqref}, but -this will not affect other documents.@refill +this will not affect other documents. @findex reftex-add-label-environments @findex reftex-add-to-label-alist @@ -3107,7 +3242,7 @@ function @code{reftex-add-to-label-alist} which is still available as an alias for compatibility.} which defines additions to @code{reftex-label-alist}. The argument taken by this function must have the same format as @code{reftex-label-alist}. The @file{amsmath.el} -style file of AUCTeX for example contains the following:@refill +style file of AUCTeX for example contains the following: @lisp @group @@ -3121,7 +3256,7 @@ style file of AUCTeX for example contains the following:@refill @noindent @findex LaTeX-add-environments, @r{AUCTeX} while a package @code{myprop} defining a @code{proposition} environment -with @code{\newtheorem} might use@refill +with @code{\newtheorem} might use @lisp @group @@ -3139,7 +3274,7 @@ with @code{\newtheorem} might use@refill Similarly, a style hook may contain a call to @code{reftex-set-cite-format} to set the citation format. The style file @file{natbib.el} for the Natbib citation style does switch -@b{Ref@TeX{}}'s citation format like this:@refill +@b{Ref@TeX{}}'s citation format like this: @lisp (TeX-add-style-hook "natbib" @@ -3148,7 +3283,7 @@ file @file{natbib.el} for the Natbib citation style does switch (reftex-set-cite-format 'natbib)))) @end lisp -@findex reftex-add-index-macros +@findex reftex-add-index-macros The hook may contain a call to @code{reftex-add-index-macros} to define additional @code{\index}-like macros. The argument must have the same format as @code{reftex-index-macros}. It may be a symbol, to @@ -3210,14 +3345,14 @@ support for that: @code{reftex-view-crossref} (bound to @kbd{C-c highlighting is provided (among other things) by Peter S. Galbraith's @file{bib-cite.el}. There is some overlap in the functionalities of Bib-cite and @b{Ref@TeX{}}. Bib-cite.el comes bundled with -AUCTeX.@refill +AUCTeX. Bib-cite version 3.06 and later can be configured so that bib-cite's mouse functions use @b{Ref@TeX{}} for displaying references and citations. This can be useful in particular when working with the LaTeX @code{xr} package or with an explicit @code{thebibliography} environment (rather than BibTeX). Bib-cite cannot handle those, but @b{Ref@TeX{}} does. To -make use of this feature, try@refill +make use of this feature, try @vindex bib-cite-use-reftex-view-crossref @lisp @@ -3234,13 +3369,13 @@ make use of this feature, try@refill @b{LaTeX commands}@* @cindex LaTeX commands, not found @code{\input}, @code{\include}, and @code{\section} (etc.) statements -have to be first on a line (except for white space).@refill +have to be first on a line (except for white space). @item @b{Commented regions}@* @cindex Labels, commented out @b{Ref@TeX{}} sees also labels in regions commented out and will refuse to -make duplicates of such labels. This is considered to be a feature.@refill +make duplicates of such labels. This is considered to be a feature. @item @b{Wrong section numbers}@* @@ -3248,7 +3383,7 @@ make duplicates of such labels. This is considered to be a feature.@refill @vindex reftex-enable-partial-scans When using partial scans (@code{reftex-enable-partial-scans}), the section numbers in the table of contents may eventually become wrong. A full -scan will fix this.@refill +scan will fix this. @item @b{Local settings}@* @@ -3263,7 +3398,7 @@ documents, you should use AUCTeX and set up style files with calls to @code{reftex-add-label-environments}, @code{reftex-set-cite-format}, @code{reftex-add-index-macros}, and @code{reftex-add-section-levels}. Settings made with these functions remain local to the current -document. @xref{AUCTeX}.@refill +document. @xref{AUCTeX}. @item @b{Funny display in selection buffer}@* @@ -3282,21 +3417,21 @@ literally for speed reasons. Then both short context and section headings may look different from what you usually see on your screen. In rare cases @code{reftex-toc} may have problems to jump to an affected section heading. There are three possible ways to deal with -this:@refill +this: @itemize @minus @item @vindex reftex-keep-temporary-buffers @code{(setq reftex-keep-temporary-buffers t)}@* This implies that @b{Ref@TeX{}} will load all parts of a multifile -document into Emacs (i.e. there won't be any temporary buffers).@refill +document into Emacs (i.e. there won't be any temporary buffers). @item @vindex reftex-initialize-temporary-buffers @code{(setq reftex-initialize-temporary-buffers t)}@* This means full initialization of temporary buffers. It involves -a penalty when the same unvisited file is used for lookup often.@refill +a penalty when the same unvisited file is used for lookup often. @item Set @code{reftex-initialize-temporary-buffers} to a list of hook -functions doing a minimal initialization.@refill +functions doing a minimal initialization. @end itemize @vindex reftex-refontify-context See also the variable @code{reftex-refontify-context}. @@ -3332,7 +3467,7 @@ The first line is just a normal configuration for a macro. For the argument (which really is a second argument to the macro @code{\begin}) as a label of type @code{?p}. Argument count for this macro starts only after the @samp{@{step+@}}, also when specifying how to get -context.@refill +context. @item @b{Idle timers in XEmacs}@* @@ -3352,7 +3487,7 @@ this bug gets fixed, a real idle timer can be requested with @cindex Key bindings, problems with Viper mode @findex viper-harness-minor-mode With @i{Viper} mode prior to Vipers version 3.01, you need to protect -@b{Ref@TeX{}}'s keymaps with@refill +@b{Ref@TeX{}}'s keymaps with @lisp (viper-harness-minor-mode "reftex") @@ -3373,19 +3508,19 @@ With @i{Viper} mode prior to Vipers version 3.01, you need to protect @b{Ref@TeX{}} was written by @i{Carsten Dominik} @email{dominik@@science.uva.nl}, with contributions by @i{Stephen -Eglen}. @b{Ref@TeX{}} is currently maintained by @refill +Eglen}. @b{Ref@TeX{}} is currently maintained by @noindent -Carsten Dominik @email{dominik@@science.uva.nl} +Carsten Dominik If you have questions about @b{Ref@TeX{}}, there are several Usenet groups which have competent readers: @code{comp.emacs}, -@code{gnu.emacs.help}, @code{comp.emacs.xemacs}, @code{comp.text.tex}. -You can also write directly to the maintainer. +@code{gnu.emacs.help}, @code{comp.emacs.xemacs}, @code{comp.text.tex}, +@code{de.comp.text.tex}. You can also write directly to the +maintainer. If you find a bug in @b{Ref@TeX{}} or its documentation, or if you want -to contribute code or ideas, please -@uref{mailto:dominik@@science.uva.nl,contact the maintainer}. Remember +to contribute code or ideas, please @value{MAINTAINERCONTACT}. Remember to provide all necessary information such as version numbers of Emacs and @b{Ref@TeX{}}, and the relevant part of your configuration in @file{.emacs}. When reporting a bug which throws an exception, please @@ -3394,31 +3529,30 @@ include a backtrace if you know how to produce one. @b{Ref@TeX{}} is bundled and pre-installed with Emacs since version 20.2. It was also bundled and pre-installed with XEmacs 19.16--20.x. XEmacs 21.x users want to install the corresponding plugin package which is -available from the XEmacs @code{ftp} site. See the XEmacs 21.x -documentation on package installation for details.@refill +available from the @value{XEMACSFTP}. See the XEmacs 21.x +documentation on package installation for details. Users of earlier Emacs distributions (including Emacs 19) can get a -@b{Ref@TeX{}} distribution from the -@uref{http://www.strw.leidenuniv.nl/~dominik/Tools/,maintainers -webpage}. Note that the Emacs 19 version supports many but not all -features described in this manual.@refill +@b{Ref@TeX{}} distribution from the @value{MAINTAINERSITE}. Note that +the Emacs 19 version supports many but not all features described in +this manual. Thanks to the people on the Net who have used @b{Ref@TeX{}} and helped developing it with their reports. In particular thanks to @i{Fran Burstall, Alastair Burt, Lars Clausen, Soren Dayton, Stephen Eglen, Karl -Eichwalder, Erik Frik, Erik Frisk, Peter Galbraith, Kai Grossjohann, -Frank Harrell, Stephan Heuel, Alan Ho, Lute Kamstra, Dieter Kraft, -Adrian Lanz, Rory Molinari, Stefan Monnier, Laurent Mugnier, Sudeep -Kumar Palat, Daniel Polani, Alan Shutko, Robin Socha, Richard Stanton, -Allan Strand, Jan Vroonhof, Christoph Wedler, Alan Williams, Roland -Winkler, Eli Zaretskii}.@refill +Eichwalder, Erik Frisk, Peter Galbraith, Kai Grossjohann, Frank Harrell, +Peter Heslin, Stephan Heuel, Alan Ho, Lute Kamstra, Dieter Kraft, David +Kastrup, Adrian Lanz, Rory Molinari, Stefan Monnier, Laurent Mugnier, +Sudeep Kumar Palat, Daniel Polani, Alan Shutko, Robin Socha, Richard +Stanton, Allan Strand, Jan Vroonhof, Christoph Wedler, Alan Williams, +Roland Winkler, Hans-Christoph Wirth, Eli Zaretskii}. The @code{view-crossref} feature was inspired by @i{Peter Galbraith's} -@file{bib-cite.el}.@refill +@file{bib-cite.el}. -Finally thanks to @i{Uwe Bolick} who first got me (some years ago) into +Finally thanks to @i{Uwe Bolick} who first got me interested in supporting LaTeX labels and references with an editor (which was -MicroEmacs at the time).@refill +MicroEmacs at the time). @node Commands, Options, Imprint, Top @chapter Commands @@ -3431,7 +3565,7 @@ menu. See @xref{Key Bindings}. @deffn Command reftex-toc Show the table of contents for the current document. When called with -one ore two @kbd{C-u} prefixes, rescan the document first.@refill +one ore two @kbd{C-u} prefixes, rescan the document first. @end deffn @deffn Command reftex-label @@ -3450,17 +3584,17 @@ expression, scans the buffers with BibTeX entries (taken from the @code{\bibliography} command or a @code{thebibliography} environment) and offers the matching entries for selection. The selected entry is formatted according to @code{reftex-cite-format} and inserted into the -buffer.@refill @* -When called with one or two @kbd{C-u} prefixes, first rescans the -document. When called with a numeric prefix, make that many citations. +buffer. @* +When called with a @kbd{C-u} prefixe, prompt for optional arguments in +cite macros. When called with a numeric prefix, make that many citations. When called with point inside the braces of a @code{\cite} command, it will add another key, ignoring the value of -@code{reftex-cite-format}.@refill @* +@code{reftex-cite-format}. @* The regular expression uses an expanded syntax: @samp{&&} is interpreted as @code{and}. Thus, @samp{aaaa&&bbb} matches entries which contain both @samp{aaaa} and @samp{bbb}. While entering the regexp, completion on knows citation keys is possible. @samp{=} is a good regular -expression to match all entries in all files.@refill +expression to match all entries in all files. @end deffn @deffn Command reftex-index @@ -3468,7 +3602,7 @@ Query for an index macro and insert it along with its arguments. The index macros available are those defined in @code{reftex-index-macro} or by a call to @code{reftex-add-index-macros}, typically from an AUCTeX style file. @b{Ref@TeX{}} provides completion for the index tag and the -index key, and will prompt for other arguments.@refill +index key, and will prompt for other arguments. @end deffn @deffn Command reftex-index-selection-or-word @@ -3480,7 +3614,7 @@ user have a chance to edit the index entry. When called with 2 @kbd{C-u} as prefix, also ask for the index macro and other stuff. When called inside TeX math mode as determined by the @file{texmathp.el} library which is part of AUCTeX, the string is first processed with the -@code{reftex-index-math-format}, which see.@refill +@code{reftex-index-math-format}, which see. @end deffn @deffn Command reftex-index-phrase-selection-or-word @@ -3507,7 +3641,7 @@ When the document has multiple indices, first prompts for the correct one. When index support is turned off, offer to turn it on. With one or two @kbd{C-u} prefixes, rescan document first. With prefix 2, restrict index to current document section. -With prefix 3, restrict index to active region.@refill +With prefix 3, restrict index to active region. @end deffn @deffn Command reftex-view-crossref @@ -3532,25 +3666,25 @@ this function several times find successive citation locations. @deffn Command reftex-create-tags-file Create TAGS file by running @code{etags} on the current document. The TAGS file is also immediately visited with -@code{visit-tags-table}.@refill +@code{visit-tags-table}. @end deffn @deffn Command reftex-grep-document Run grep query through all files related to this document. With prefix arg, force to rescan document. -No active TAGS table is required.@refill +No active TAGS table is required. @end deffn @deffn Command reftex-search-document Regexp search through all files of the current document. Starts always in the master file. Stops when a match is found. -No active TAGS table is required.@refill +No active TAGS table is required. @end deffn @deffn Command reftex-query-replace-document Run a query-replace-regexp of @var{from} with @var{to} over the entire document. With prefix arg, replace only word-delimited matches. No -active TAGS table is required.@refill +active TAGS table is required. @end deffn @deffn Command reftex-goto-label @@ -3563,7 +3697,7 @@ another window. @deffn Command reftex-change-label Query replace @var{from} with @var{to} in all @code{\label} and @code{\ref} commands. Works on the entire multifile document. No -active TAGS table is required.@refill +active TAGS table is required. @end deffn @deffn Command reftex-renumber-simple-labels @@ -3575,11 +3709,19 @@ labels will be changed as well. For this, @b{Ref@TeX{}} looks at the arguments of any macros which either start or end with the string @samp{ref}. This command should be used with care, in particular in multifile documents. You should not use it if another document refers -to this one with the @code{xr} package.@refill +to this one with the @code{xr} package. @end deffn @deffn Command reftex-find-duplicate-labels -Produce a list of all duplicate labels in the document.@refill +Produce a list of all duplicate labels in the document. +@end deffn + +@deffn Command reftex-create-bibtex-file +Create a new BibTeX database file with all entries referenced in document. +The command prompts for a filename and writes the collected entries to +that file. Only entries referenced in the current document with +any @code{\cite}-like macros are used. +The sequence in the new file is the same as it was in the old database. @end deffn @deffn Command reftex-customize @@ -3607,7 +3749,7 @@ Here is a complete list of @b{Ref@TeX{}}'s configuration variables. All variables have customize support - so if you are not familiar with Emacs Lisp (and even if you are) you might find it more comfortable to use @code{customize} to look at and change these variables. @kbd{M-x -reftex-customize} will get you there.@refill +reftex-customize} will get you there. @menu * Options (Table of Contents):: @@ -3643,16 +3785,21 @@ Standard LaTeX needs 7, default is 12. Commands and levels used for defining sections in the document. The @code{car} of each cons cell is the name of the section macro. The @code{cdr} is a number indicating its level. A negative level means the -same as the positive value, but the section will never get a -number. The @code{cdr} may also be a function which then has to return -the level.@refill +same as the positive value, but the section will never get a number. +The @code{cdr} may also be a function which then has to return the +level. This list is also used for promotion and demption of sectioning +commands. If you are using a document class which has several sets of +sectioning commands, promotion only works correctly if this list is +sorted first by set, then within each set by level. The promotion +commands always select the nearest entry with the correct new level. + @end defopt @defopt reftex-toc-max-level The maximum level of toc entries which will be included in the TOC. Section headings with a bigger level will be ignored. In RefTeX, chapters are level 1, sections level 2 etc. This variable can be -changed from within the @file{*toc*} buffer with the @kbd{t} key.@refill +changed from within the @file{*toc*} buffer with the @kbd{t} key. @end defopt @defopt reftex-part-resets-chapter @@ -3664,11 +3811,21 @@ chapter counter and also do not show up in chapter numbers. @end defopt @defopt reftex-auto-recenter-toc -Non-@code{nil} means, initially turn automatic recentering of toc on. -When active, the @file{*TOC*} buffer will always show the section you -are currently working in. Recentering happens whenever Emacs is idle -for more than `reftex-idle-time' seconds. -This feature can be turned on and off from the menu +Non-@code{nil} means, turn automatic recentering of @file{*TOC*} window on. +When active, the @file{*TOC*} window will always show the section you +are currently working in. Recentering happens whenever Emacs is idle for +more than @code{reftex-idle-time} seconds. + +Value @code{t} means, turn on immediately when RefTeX gets started. Then, +recentering will work for any toc window created during the session. + +Value @code{frame} (the default) means, turn automatic recentering on +only while the dedicated TOC frame does exist, and do the recentering +only in that frame. So when creating that frame (with @kbd{d} key in an +ordinary TOC window), the automatic recentering is turned on. When the +frame gets destroyed, automatic recentering is turned off again. + +This feature can be turned on and off from the menu (Ref->Options). @end defopt @@ -3677,10 +3834,8 @@ Non-@code{nil} means, create TOC window by splitting window horizontally. The default is to split vertically. @end defopt -@defopt reftex-toc-split-windows-horizontally-fraction -Fraction of the horizontal width of the frame to be used for TOC window. -Only relevant when @code{reftex-toc-split-windows-horizontally} is -non-@code{nil}. +@defopt reftex-toc-split-windows-fraction +Fraction of the width or height of the frame to be used for TOC window. @end defopt @defopt reftex-toc-keep-other-windows @@ -3688,19 +3843,19 @@ Non-@code{nil} means, split the selected window to display the @file{*toc*} buffer. This helps to keep the window configuration, but makes the @file{*toc*} small. When @code{nil}, all other windows except the selected one will be deleted, so that the @file{*toc*} window fills -half the frame.@refill +half the frame. @end defopt @defopt reftex-toc-include-file-boundaries Non-@code{nil} means, include file boundaries in @file{*toc*} buffer. This flag can be toggled from within the @file{*toc*} buffer with the -@kbd{i} key.@refill +@kbd{i} key. @end defopt @defopt reftex-toc-include-labels Non-@code{nil} means, include labels in @file{*toc*} buffer. This flag can be toggled from within the @file{*toc*} buffer with the @kbd{l} -key.@refill +key. @end defopt @defopt reftex-toc-include-index-entries @@ -3713,7 +3868,7 @@ This flag can be toggled from within the @file{*toc*} buffer with the Non-@code{nil} means, include context with labels in the @file{*toc*} buffer. Context will only be shown if the labels are visible as well. This flag can be toggled from within the @file{*toc*} buffer with the -@kbd{c} key.@refill +@kbd{c} key. @end defopt @defopt reftex-toc-follow-mode @@ -3721,17 +3876,17 @@ Non-@code{nil} means, point in @file{*toc*} buffer (the table-of-contents buffer) will cause other window to follow. The other window will show the corresponding part of the document. This flag can be toggled from within the @file{*toc*} buffer with the @kbd{f} -key.@refill +key. @end defopt @deffn {Normal Hook} reftex-toc-mode-hook Normal hook which is run when a @file{*toc*} buffer is -created.@refill +created. @end deffn @deffn Keymap reftex-toc-map The keymap which is active in the @file{*toc*} buffer. -(@pxref{Table of Contents}).@refill +(@pxref{Table of Contents}). @end deffn @node Options (Defining Label Environments), Options (Creating Labels), Options (Table of Contents), Options @@ -3742,7 +3897,7 @@ The keymap which is active in the @file{*toc*} buffer. @defopt reftex-default-label-alist-entries Default label alist specifications. It is a list of symbols with associations in the constant @code{reftex-label-alist-builtin}. -@code{LaTeX} should always be the last entry.@refill +@code{LaTeX} should always be the last entry. @end defopt @defopt reftex-label-alist @@ -3750,7 +3905,7 @@ Set this variable to define additions and changes to the defaults in @code{reftex-default-label-alist-entries}. The only things you @emph{must not} change is that @code{?s} is the type indicator for section labels, and @key{SPC} for the @code{any} label type. These are -hard-coded at other places in the code.@refill +hard-coded at other places in the code. The value of the variable must be a list of items. Each item is a list itself and has the following structure: @@ -3763,7 +3918,7 @@ itself and has the following structure: Each list entry describes either an environment carrying a counter for use with @code{\label} and @code{\ref}, or a LaTeX macro defining a label as (or inside) one of its arguments. The elements of each list -entry are:@refill +entry are: @table @asis @item @var{env-or-macro} @@ -3772,10 +3927,10 @@ Name of the environment (like @samp{table}) or macro (like @samp{\myfig[]@{@}@{@}@{*@}@{@}}. Use square brackets for optional arguments, a star to mark the label argument, if any. The macro does not have to have a label argument - you could also use -@samp{\label@{...@}} inside one of its arguments.@refill +@samp{\label@{...@}} inside one of its arguments. Special names: @code{section} for section labels, @code{any} to define a -group which contains all labels.@refill +group which contains all labels. This may also be a function to do local parsing and identify point to be in a non-standard label environment. The function must take an @@ -3783,11 +3938,11 @@ argument @var{bound} and limit backward searches to this value. It should return either nil or a cons cell @code{(@var{function} . @var{position})} with the function symbol and the position where the special environment starts. See the Info documentation for an -example.@refill +example. Finally this may also be @code{nil} if the entry is only meant to change some settings associated with the type indicator character (see -below).@refill +below). @item @var{type-key} Type indicator character, like @code{?t}, must be a printable ASCII @@ -3798,35 +3953,37 @@ list, to cover cases in which different environments carry the same label type (like @code{equation} and @code{eqnarray}). If the type indicator is @code{nil} and the macro has a label argument @samp{@{*@}}, the macro defines neutral labels just like @code{\label}. In this case -the reminder of this entry is ignored.@refill +the reminder of this entry is ignored. @item @var{label-prefix} Label prefix string, like @samp{tab:}. The prefix is a short string used as the start of a label. It may be the empty string. The prefix -may contain the following @samp{%} escapes:@refill +may contain the following @samp{%} escapes: @example %f Current file name, directory and extension stripped. %F Current file name relative to master file directory. +%m Master file name, directory and extension stripped. +%M Directory name (without path) where master file is located. %u User login name, on systems which support this. %S A section prefix derived with variable @code{reftex-section-prefixes}. @end example @noindent Example: In a file @file{intro.tex}, @samp{eq:%f:} will become -@samp{eq:intro:}.@refill +@samp{eq:intro:}. @item @var{reference-format} Format string for reference insert in buffer. @samp{%s} will be replaced by the label. When the format starts with @samp{~}, this @samp{~} will only be inserted when the character before point is -@emph{not} a whitespace.@refill +@emph{not} a whitespace. @item @var{context-method} Indication on how to find the short context. @itemize @minus @item -If @code{nil}, use the text following the @samp{\label@{...@}} macro.@refill +If @code{nil}, use the text following the @samp{\label@{...@}} macro. @item If @code{t}, use @itemize @minus @@ -3835,32 +3992,32 @@ the section heading for section labels. @item text following the @samp{\begin@{...@}} statement of environments (not a good choice for environments like eqnarray or enumerate, where one has -several labels in a single environment).@refill +several labels in a single environment). @item text after the macro name (starting with the first arg) for -macros.@refill +macros. @end itemize @item If an integer, use the nth argument of the macro. As a special case, -1000 means to get text after the last macro argument.@refill +1000 means to get text after the last macro argument. @item If a string, use as regexp to search @emph{backward} from the label. Context is then the text following the end of the match. E.g. putting this to @samp{\\caption[[@{]} will use the caption in a figure or table environment. @samp{\\begin@{eqnarray@}\|\\\\} works for -eqnarrays.@refill +eqnarrays. @item If any of @code{caption}, @code{item}, @code{eqnarray-like}, @code{alignat-like}, this symbol will internally be translated into an appropriate regexp (see also the variable -@code{reftex-default-context-regexps}).@refill +@code{reftex-default-context-regexps}). @item If a function, call this function with the name of the environment/macro as argument. On call, point will be just after the @code{\label} macro. The function is expected to return a suitable context string. It should throw an exception (error) when failing to find context. As an example, here is a function returning the 10 chars following the label macro as -context:@refill +context: @example (defun my-context-function (env-or-mac) @@ -3875,7 +4032,7 @@ menu, and to derive a label string. If you want to use a different method for each of these, specify them as a dotted pair. E.g. @code{(nil . t)} uses the text after the label (@code{nil}) for display, and text from the default position (@code{t}) to derive a label -string. This is actually used for section labels.@refill +string. This is actually used for section labels. @item @var{magic-word-list} List of magic words which identify a reference to be of this type. If @@ -3883,7 +4040,7 @@ the word before point is equal to one of these words when calling @code{reftex-reference}, the label list offered will be automatically restricted to labels of the correct type. If the first element of this word--list is the symbol `regexp', the strings are interpreted as regular -expressions.@refill +expressions. @item @var{toc-level} The integer level at which this environment should be added to the table @@ -3892,11 +4049,11 @@ will number the entries mixed with the sectioning commands of the same level. A negative value will make unnumbered entries. Useful only for theorem-like environments which structure the document. Will be ignored for macros. When omitted or @code{nil}, no TOC entries will be -made.@refill +made. @end table If the type indicator characters of two or more entries are the same, -@b{Ref@TeX{}} will use@refill +@b{Ref@TeX{}} will use @itemize @minus @item the first non-@code{nil} format and prefix @@ -3907,7 +4064,7 @@ the magic words of all involved entries. Any list entry may also be a symbol. If that has an association in @code{reftex-label-alist-builtin}, the @code{cddr} of that association is spliced into the list. However, builtin defaults should normally be set -with the variable @code{reftex-default-label-alist-entries}.@refill +with the variable @code{reftex-default-label-alist-entries}. @end defopt @defopt reftex-section-prefixes @@ -3924,7 +4081,39 @@ names like @samp{chapter}, integer section levels (as given in Alist with default regular expressions for finding context. The emacs lisp form @w{@code{(format regexp (regexp-quote environment))}} is used to calculate the final regular expression - so @samp{%s} will be -replaced with the environment or macro.@refill +replaced with the environment or macro. +@end defopt + +@defopt reftex-trust-label-prefix +Non-@code{nil} means, trust the label prefix when determining label type. +It is customary to use special label prefixes to distinguish different label +types. The label prefixes have no syntactic meaning in LaTeX (unless +special packages like fancyref) are being used. RefTeX can and by +default does parse around each label to detect the correct label type, +but this process can be slow when a document contains thousands of +labels. If you use label prefixes consistently, you may speed up +document parsing by setting this variable to a non-nil value. RefTeX +will then compare the label prefix with the prefixes found in +`reftex-label-alist' and derive the correct label type in this way. +Possible values for this option are: + +@example +t @r{This means to trust any label prefixes found.} +regexp @r{If a regexp, only prefixes matched by the regexp are trusted.} +list @r{List of accepted prefixes, as strings. The colon is part of} + @r{the prefix, e.g. ("fn:" "eqn:" "item:").} +nil @r{Never trust a label prefix.} +@end example +The only disadvantage of using this feature is that the label context +displayed in the label selection buffer along with each label is +simply some text after the label definition. This is no problem if you +place labels keeping this in mind (e.g. @i{before} the equation, @i{at +the beginning} of a fig/tab caption ...). Anyway, it is probably best +to use the regexp or the list value types to fine-tune this feature. +For example, if your document contains thousands of footnotes with +labels fn:xxx, you may want to set this variable to the value "^fn:$" or +("fn:"). Then RefTeX will still do extensive parsing for any +non-footnote labels. @end defopt @node Options (Creating Labels), Options (Referencing Labels), Options (Defining Label Environments), Options @@ -3945,14 +4134,14 @@ the section heading. The conversion of the context to a legal label is governed by the specifications given in @code{reftex-derive-label-parameters}. If @var{derive} is @code{nil}, the default label will consist of the prefix and a unique number, like -@samp{eq:23}.@refill +@samp{eq:23}. If @var{prompt} is @code{t}, the user will be prompted for a label string. When @var{prompt} is @code{nil}, the default label will be -inserted without query.@refill +inserted without query. So the combination of @var{derive} and @var{prompt} controls label -insertion. Here is a table describing all four possibilities:@refill +insertion. Here is a table describing all four possibilities: @example @group @@ -3970,12 +4159,12 @@ letters indicating the label types for which it should be true. Thus, the combination may be set differently for each label type. The default settings @samp{"s"} and @samp{"sft"} mean: Derive section labels from headings (with confirmation). Prompt for figure and table labels. Use -simple labels without confirmation for everything else.@refill +simple labels without confirmation for everything else. The available label types are: @code{s} (section), @code{f} (figure), @code{t} (table), @code{i} (item), @code{e} (equation), @code{n} (footnote), @code{N} (endnote) plus any definitions in -@code{reftex-label-alist}.@refill +@code{reftex-label-alist}. @end defopt @deffn Hook reftex-format-label-function @@ -3983,13 +4172,13 @@ If non-@code{nil}, should be a function which produces the string to insert as a label definition. The function will be called with two arguments, the @var{label} and the @var{default-format} (usually @samp{\label@{%s@}}). It should return the string to insert into the -buffer.@refill +buffer. @end deffn @deffn Hook reftex-string-to-label-function Function to turn an arbitrary string into a legal label. @b{Ref@TeX{}}'s default function uses the variable -@code{reftex-derive-label-parameters}.@refill +@code{reftex-derive-label-parameters}. @end deffn @deffn Hook reftex-translate-to-ascii-function @@ -3998,12 +4187,12 @@ derive a label from it. The intended application is to convert ISO or Mule characters into something legal in labels. The default function @code{reftex-latin1-to-ascii} removes the accents from Latin-1 characters. X-Symbol (>=2.6) sets this variable to the much more -general @code{x-symbol-translate-to-ascii}.@refill +general @code{x-symbol-translate-to-ascii}. @end deffn @defopt reftex-derive-label-parameters Parameters for converting a string into a label. This variable is a -list of the following items:@refill +list of the following items: @table @asis @item @var{nwords} Number of words to use. @@ -4030,16 +4219,16 @@ Regexp matching characters not legal in labels. @end defopt @defopt reftex-abbrev-parameters -Parameters for abbreviation of words. A list of four parameters.@refill +Parameters for abbreviation of words. A list of four parameters. @table @asis @item @var{min-chars} Minimum number of characters remaining after abbreviation. @item @var{min-kill} -Minimum number of characters to remove when abbreviating words.@refill +Minimum number of characters to remove when abbreviating words. @item @var{before} -Character class before abbrev point in word.@refill +Character class before abbrev point in word. @item @var{after} -Character class after abbrev point in word.@refill +Character class after abbrev point in word. @end table @end defopt @@ -4052,21 +4241,21 @@ Character class after abbrev point in word.@refill List of flags governing the label menu makeup. The flags are: @table @asis @item @var{table-of-contents} -Show the labels embedded in a table of context.@refill +Show the labels embedded in a table of context. @item @var{section-numbers} -Include section numbers (like 4.1.3) in table of contents.@refill +Include section numbers (like 4.1.3) in table of contents. @item @var{counters} -Show counters. This just numbers the labels in the menu.@refill +Show counters. This just numbers the labels in the menu. @item @var{no-context} -Non-@code{nil} means do @emph{not} show the short context.@refill +Non-@code{nil} means do @emph{not} show the short context. @item @var{follow} -Follow full context in other window.@refill +Follow full context in other window. @item @var{show-commented} -Show labels from regions which are commented out.@refill +Show labels from regions which are commented out. @item @var{match-everywhere} -Obsolete flag.@refill +Obsolete flag. @item @var{show-files} -Show begin and end of included files.@refill +Show begin and end of included files. @end table Each of these flags can be set to @code{t} or @code{nil}, or to a string @@ -4074,15 +4263,15 @@ of type letters indicating the label types for which it should be true. These strings work like character classes in regular expressions. Thus, setting one of the flags to @samp{"sf"} makes the flag true for section and figure labels, @code{nil} for everything else. Setting it to -@samp{"^sf"} makes it the other way round.@refill +@samp{"^sf"} makes it the other way round. The available label types are: @code{s} (section), @code{f} (figure), @code{t} (table), @code{i} (item), @code{e} (equation), @code{n} -(footnote), plus any definitions in @code{reftex-label-alist}.@refill +(footnote), plus any definitions in @code{reftex-label-alist}. Most options can also be switched from the label menu itself - so if you decide here to not have a table of contents in the label menu, you can -still get one interactively during selection from the label menu.@refill +still get one interactively during selection from the label menu. @end defopt @defopt reftex-multiref-punctuation @@ -4092,7 +4281,7 @@ associates the 3 marking characters @samp{,-+} with prefix strings to be inserted into the buffer before the corresponding @code{\ref} macro. This is used to string together whole reference sets, like @samp{eqs. 1,2,3-5,6 and 7} in a single call to -@code{reftex-reference}.@refill +@code{reftex-reference}. @end defopt @defopt reftex-vref-is-default @@ -4102,7 +4291,7 @@ macro between @code{\ref} and @code{\vref}. The value of this variable determines the default which is active when entering the selection process. Instead of @code{nil} or @code{t}, this may also be a string of type letters indicating the label types for which it should be -true.@refill +true. @end defopt @defopt reftex-fref-is-default @@ -4123,11 +4312,11 @@ special commands to insert @code{\vref} and @code{\fref} references, so even if you set this, your setting will be ignored by the special commands. The function will be called with two arguments, the @var{label} and the @var{default-format} (usually @samp{~\ref@{%s@}}). -It should return the string to insert into the buffer.@refill +It should return the string to insert into the buffer. @end deffn @defopt reftex-level-indent -Number of spaces to be used for indentation per section level.@refill +Number of spaces to be used for indentation per section level. @end defopt @defopt reftex-guess-label-type @@ -4137,29 +4326,29 @@ cursor and compare it with the magic words given in @code{reftex-label-alist}. When it finds a match, @b{Ref@TeX{}} will immediately offer the correct label menu - otherwise it will prompt you for a label type. If you set this variable to @code{nil}, @b{Ref@TeX{}} -will always prompt for a label type.@refill +will always prompt for a label type. @end defopt @deffn {Normal Hook} reftex-display-copied-context-hook Normal Hook which is run before context is displayed anywhere. Designed -for @w{@code{X-Symbol}}, but may have other uses as well.@refill +for @w{@code{X-Symbol}}, but may have other uses as well. @end deffn @deffn Hook reftex-pre-refontification-functions @code{X-Symbol} specific hook. Probably not useful for other purposes. The functions get two arguments, the buffer from where the command started and a symbol indicating in what context the hook is -called.@refill +called. @end deffn @deffn {Normal Hook} reftex-select-label-mode-hook Normal hook which is run when a selection buffer enters -@code{reftex-select-label-mode}.@refill +@code{reftex-select-label-mode}. @end deffn @deffn Keymap reftex-select-label-map The keymap which is active in the labels selection process -(@pxref{Referencing Labels}).@refill +(@pxref{Referencing Labels}). @end deffn @node Options (Creating Citations), Options (Index Support), Options (Referencing Labels), Options @@ -4176,7 +4365,7 @@ List of regular expressions to exclude files in @code{\\bibliography@{..@}}. File names matched by any of these regexps will not be parsed. Intended for files which contain only @code{@@string} macro definitions and the like, which are ignored by -@b{Ref@TeX{}} anyway.@refill +@b{Ref@TeX{}} anyway. @end defopt @defopt reftex-default-bibliography @@ -4185,12 +4374,12 @@ When @code{reftex-citation} is called from a document with neither a @samp{\bibliography@{...@}} statement nor a @code{thebibliography} environment, @b{Ref@TeX{}} will scan these files instead. Intended for using @code{reftex-citation} in non-LaTeX files. The files will be -searched along the BIBINPUTS or TEXBIB path.@refill +searched along the BIBINPUTS or TEXBIB path. @end defopt @defopt reftex-sort-bibtex-matches Sorting of the entries found in BibTeX databases by reftex-citation. -Possible values:@refill +Possible values: @example nil @r{Do not sort entries.} author @r{Sort entries by author name.} @@ -4203,10 +4392,10 @@ reverse-year @r{Sort entries by decreasing year.} The format of citations to be inserted into the buffer. It can be a string, an alist or a symbol. In the simplest case this is just the string @samp{\cite@{%l@}}, which is also the default. See the definition of -@code{reftex-cite-format-builtin} for more complex examples.@refill +@code{reftex-cite-format-builtin} for more complex examples. If @code{reftex-cite-format} is a string, it will be used as the format. -In the format, the following percent escapes will be expanded.@refill +In the format, the following percent escapes will be expanded. @table @code @item %l @@ -4219,7 +4408,7 @@ Like %a, but abbreviate more than 2 authors like Jones et al. First author name only. @item %e Works like @samp{%a}, but on list of editor names. (@samp{%2e} and -@samp{%E} work a well).@refill +@samp{%E} work a well). @end table It is also possible to access all other BibTeX database fields: @@ -4235,71 +4424,91 @@ It is also possible to access all other BibTeX database fields: @noindent Usually, only @samp{%l} is needed. The other stuff is mainly for the -echo area display, and for @code{(setq reftex-comment-citations t)}.@refill +echo area display, and for @code{(setq reftex-comment-citations t)}. @samp{%<} as a special operator kills punctuation and space around it -after the string has been formatted.@refill +after the string has been formatted. + +A pair of square brackets indicates an optional argument, and RefTeX +will prompt for the values of these arguments. Beware that all this only works with BibTeX database files. When citations are made from the @code{\bibitems} in an explicit -@code{thebibliography} environment, only @samp{%l} is available.@refill +@code{thebibliography} environment, only @samp{%l} is available. If @code{reftex-cite-format} is an alist of characters and strings, the user will be prompted for a character to select one of the possible -format strings.@refill +format strings. In order to configure this variable, you can either set @code{reftex-cite-format} directly yourself or set it to the @emph{symbol} of one of the predefined styles. The predefined symbols are those which have an association in the constant @code{reftex-cite-format-builtin}) E.g.: @code{(setq reftex-cite-format -'natbib)}.@refill +'natbib)}. @end defopt @deffn Hook reftex-format-cite-function - If non-@code{nil}, should be a function which produces the string to insert as a citation. Note that the citation format can also be changed with the variable @code{reftex-cite-format}. The function will be called with two arguments, the @var{citation-key} and the @var{default-format} (taken from @code{reftex-cite-format}). It should -return the string to insert into the buffer.@refill +return the string to insert into the buffer. @end deffn +@defopt reftex-cite-prompt-optional-args +Non-@code{nil} means, prompt for empty optional arguments in cite macros. +When an entry in @code{reftex-cite-format} ist given with square brackets to +indicate optional arguments (for example @samp{\\cite[][]@{%l@}}), RefTeX can +prompt for values. Possible values are: +@example +nil @r{Never prompt for optional arguments} +t @r{Always prompt} +maybe @r{Prompt only if @code{reftex-citation} was called with C-u prefix arg}@end example +Unnecessary empty optional arguments are removed before insertion into +the buffer. See @code{reftex-cite-cleanup-optional-args}. +@end defopt + +@defopt reftex-cite-cleanup-optional-args +Non-@code{nil} means, remove empty optional arguments from cite macros +if possible. +@end defopt + @defopt reftex-comment-citations Non-@code{nil} means add a comment for each citation describing the full entry. The comment is formatted according to -@code{reftex-cite-comment-format}.@refill +@code{reftex-cite-comment-format}. @end defopt @defopt reftex-cite-comment-format Citation format used for commented citations. Must @emph{not} contain @samp{%l}. See the variable @code{reftex-cite-format} for possible -percent escapes.@refill +percent escapes. @end defopt @defopt reftex-cite-punctuation Punctuation for formatting of name lists in citations. This is a list -of 3 strings.@refill +of 3 strings. @enumerate @item normal names separator, like @samp{, } in Jones, Brown and Miller @item final names separator, like @samp{ and } in Jones, Brown and Miller @item -The @samp{et al.} string, like @samp{ @{\it et al.@}} in +The @samp{et al.} string, like @samp{ @{\it et al.@}} in Jones @{\it et al.@} @end enumerate @end defopt @deffn {Normal Hook} reftex-select-bib-mode-hook Normal hook which is run when a selection buffer enters -@code{reftex-select-bib-mode}.@refill +@code{reftex-select-bib-mode}. @end deffn @deffn Keymap reftex-select-bib-map The keymap which is active in the citation-key selection process -(@pxref{Creating Citations}).@refill +(@pxref{Creating Citations}). @end deffn @node Options (Index Support), Options (Viewing Cross-References), Options (Creating Citations), Options @@ -4313,12 +4522,12 @@ is resource intensive and the internal structure holding the parsed information can become quite big. Therefore it can be turned off. When this is @code{nil} and you execute a command which requires index support, you will be asked for confirmation to turn it on and rescan the -document.@refill +document. @end defopt @defopt reftex-index-special-chars List of special characters in index entries, given as strings. These -correspond to the @code{MakeIndex} keywords +correspond to the @code{MakeIndex} keywords @code{(@var{level} @var{encap} @var{actual} @var{quote} @var{escape})}. @end defopt @@ -4331,35 +4540,35 @@ is @var{macro} is the macro. Arguments should be denoted by empty braces, as for example in @samp{\index[]@{*@}}. Use square brackets to denote -optional arguments. The star marks where the index key is.@refill +optional arguments. The star marks where the index key is. @var{index-tag} is a short name of the index. @samp{idx} and @samp{glo} are reserved for the default index and the glossary. Other indices can be defined as well. If this is an integer, the Nth argument of the -macro holds the index tag.@refill +macro holds the index tag. @var{key} is a character which is used to identify the macro for input with @code{reftex-index}. @samp{?i}, @samp{?I}, and @samp{?g} are -reserved for default index and glossary.@refill +reserved for default index and glossary. @var{prefix} can be a prefix which is added to the @var{key} part of the index entry. If you have a macro @code{\newcommand@{\molec@}[1]@{#1\index@{Molecules!#1@}}, this prefix -should be @samp{Molecules!}.@refill +should be @samp{Molecules!}. @var{exclude} can be a function. If this function exists and returns a -non-@code{nil} value, the index entry at point is ignored. This was +non-nil value, the index entry at point is ignored. This was implemented to support the (deprecated) @samp{^} and @samp{_} shortcuts -in the LaTeX2e @code{index} package.@refill +in the LaTeX2e @code{index} package. @var{repeat}, if non-@code{nil}, means the index macro does not typeset the entry in the text, so that the text has to be repeated outside the index macro. Needed for @code{reftex-index-selection-or-word} and for -indexing from the phrase buffer.@refill +indexing from the phrase buffer. The final entry may also be a symbol. It must have an association in the variable @code{reftex-index-macros-builtin} to specify the main -indexing package you are using. Legal values are currently@refill +indexing package you are using. Legal values are currently @example default @r{The LaTeX default - unnecessary to specify this one} multind @r{The multind.sty package} @@ -4383,7 +4592,7 @@ This is a list with @code{(@var{macro-key} @var{default-tag})}. @var{tag} argument. When this is @code{nil} and a @var{tag} is needed, @b{Ref@TeX{}} will ask for it. When this is the empty string and the TAG argument of the index macro is optional, the TAG argument will be -omitted.@refill +omitted. @end defopt @defopt reftex-index-default-tag @@ -4391,7 +4600,7 @@ Default index tag. When working with multiple indexes, RefTeX queries for an index tag when creating index entries or displaying a specific index. This variable controls the default offered for these queries. The default can be selected with @key{RET} during selection or -completion. Legal values of this variable are:@refill +completion. Legal values of this variable are: @example nil @r{Do not provide a default index} "tag" @r{The default index tag given as a string, e.g. "idx"} @@ -4405,7 +4614,7 @@ Format of index entries when copied from inside math mode. When the index key copied from the buffer is processed with this format string through the @code{format} function. This can be used to add the math delimiters (e.g. @samp{$}) to the string. Requires the -@file{texmathp.el} library which is part of AUCTeX.@refill +@file{texmathp.el} library which is part of AUCTeX. @end defopt @defopt reftex-index-phrase-file-extension @@ -4420,7 +4629,7 @@ this operator, each part will generate an index macro. So each match of the search phrase will produce @emph{several} different index entries. Make sure this does no match things which are not separators. This logical @samp{and} has higher priority than the logical @samp{or} -specified in @code{reftex-index-phrases-logical-or-regexp}.@refill +specified in @code{reftex-index-phrases-logical-or-regexp}. @end defopt @defopt reftex-index-phrases-logical-or-regexp @@ -4431,7 +4640,7 @@ match of the search phrase. The first index arg will be the default. A number key @kbd{1}--@kbd{9} must be pressed to switch to another. Make sure this does no match things which are not separators. The logical @samp{and} specified in @code{reftex-index-phrases-logical-or-regexp} -has higher priority than this logical @samp{or}.@refill +has higher priority than this logical @samp{or}. @end defopt @defopt reftex-index-phrases-search-whole-words @@ -4443,7 +4652,7 @@ at one of these points, no word boundary is required there. @defopt reftex-index-phrases-case-fold-search Non-@code{nil} means, searching for index phrases will ignore -case.@refill +case. @end defopt @defopt reftex-index-verify-function @@ -4459,7 +4668,7 @@ particular when indexing an already processed document again, this will even be the norm. When this variable is non-@code{nil}, @b{Ref@TeX{}} checks if the match is an index macro argument, or if an index macro is directly before or after the phrase. If that is the -case, that match will be ignored.@refill +case, that match will be ignored. @end defopt @defopt reftex-index-phrases-wrap-long-lines @@ -4468,7 +4677,7 @@ Inserting indexing commands in a line makes the line longer - often so long that it does not fit onto the screen. When this variable is non-@code{nil}, newlines will be added as necessary before and/or after the indexing command to keep lines short. However, the matched text -phrase and its index command will always end up on a single line.@refill +phrase and its index command will always end up on a single line. @end defopt @defopt reftex-index-phrases-sort-prefers-entry @@ -4476,7 +4685,7 @@ Non-@code{nil} means when sorting phrase lines, the explicit index entry is used. Phrase lines in the phrases buffer contain a search phrase, and sorting is normally based on these. Some phrase lines also have an explicit index argument specified. When this variable is -non-@code{nil}, the index argument will be used for sorting.@refill +non-@code{nil}, the index argument will be used for sorting. @end defopt @defopt reftex-index-phrases-sort-in-blocks @@ -4491,7 +4700,7 @@ Keymap for the Index Phrases buffer. @defopt reftex-index-phrases-mode-hook Normal hook which is run when a buffer is put into -@code{reftex-index-phrases-mode}.@refill +@code{reftex-index-phrases-mode}. @end defopt @defopt reftex-index-section-letters @@ -4501,7 +4710,7 @@ significant, the index will be sorted by whatever the sort function thinks is correct. In addition to these letters, @b{Ref@TeX{}} will create a group @samp{!} which contains all entries sorted below the lowest specified letter. In the @file{*Index*} buffer, pressing any of -these capital letters or @kbd{!} will jump to that section.@refill +these capital letters or @kbd{!} will jump to that section. @end defopt @defopt reftex-index-include-context @@ -4519,7 +4728,7 @@ buffer with the @kbd{f} key. @deffn Keymap reftex-index-map The keymap which is active in the @file{*Index*} buffer -(@pxref{Index Support}).@refill +(@pxref{Index Support}). @end deffn @node Options (Viewing Cross-References), Options (Finding Files), Options (Index Support), Options @@ -4533,7 +4742,7 @@ This is used when `reftex-view-crossref' is called with point in an argument of a macro. Note that crossref viewing for citations, references (both ways) and index entries is hard-coded. This variable is only to configure additional structures for which crossreference -viewing can be useful. Each entry has the structure +viewing can be useful. Each entry has the structure @example (@var{macro-re} @var{search-re} @var{highlight}). @end example @@ -4552,18 +4761,18 @@ message is being displayed, the echo area will display information about that cross reference. You can also set the variable to the symbol @code{window}. In this case a small temporary window is used for the display. This feature can be turned on and off from the menu -(Ref->Options).@refill +(Ref->Options). @end defopt @defopt reftex-idle-time -Time (secs) Emacs has to be idle before automatic crossref display -or toc recentering is done.@refill +Time (secs) Emacs has to be idle before automatic crossref display +or toc recentering is done. @end defopt @defopt reftex-cite-view-format Citation format used to display citation info in the message area. See the variable @code{reftex-cite-format} for possible percent -escapes.@refill +escapes. @end defopt @defopt reftex-revisit-to-echo @@ -4571,7 +4780,7 @@ Non-@code{nil} means, automatic citation display will revisit files if necessary. When nil, citation display in echo area will only be active for cached echo strings (see @code{reftex-cache-cite-echo}), or for BibTeX database files which are already visited by a live associated -buffers.@refill +buffers. @end defopt @defopt reftex-cache-cite-echo @@ -4588,11 +4797,11 @@ scans. In order to clear it, use @kbd{M-x reftex-reset-mode}. @defopt reftex-texpath-environment-variables List of specifications how to retrieve the search path for TeX files. -Several entries are possible.@refill +Several entries are possible. @itemize @minus @item If an element is the name of an environment variable, its content is -used.@refill +used. @item If an element starts with an exclamation mark, it is used as a command to retrieve the path. A typical command with the kpathsearch library @@ -4607,11 +4816,11 @@ be expanded recursively. See also @code{reftex-use-external-file-finders}. @defopt reftex-bibpath-environment-variables List of specifications how to retrieve the search path for BibTeX -files. Several entries are possible.@refill +files. Several entries are possible. @itemize @minus @item If an element is the name of an environment variable, its content is -used.@refill +used. @item If an element starts with an exclamation mark, it is used as a command to retrieve the path. A typical command with the kpathsearch library @@ -4626,7 +4835,7 @@ be expanded recursively. See also @code{reftex-use-external-file-finders}. @defopt reftex-file-extensions Association list with file extensions for different file types. -This is a list of items, each item is like: +This is a list of items, each item is like: @code{(@var{type} . (@var{def-ext} @var{other-ext} ...))} @example @var{type}: @r{File type like @code{"bib"} or @code{"tex"}.} @@ -4634,7 +4843,7 @@ This is a list of items, each item is like: @var{other-ext}: @r{Any number of other legal extensions for this file type.} @end example When a files is searched and it does not have any of the legal extensions, -we try the default extension first, and then the naked file name.@refill +we try the default extension first, and then the naked file name. @end defopt @defopt reftex-search-unrecursed-path-first @@ -4645,7 +4854,7 @@ option is @code{nil}, the subdirectories of @samp{./} are searched before @samp{/tex/}. This is mainly for speed - most of the time the recursive path is for the system files and not for the user files. Set this to @code{nil} if the default makes @b{Ref@TeX{}} finding files with -equal names in wrong sequence.@refill +equal names in wrong sequence. @end defopt @defopt reftex-use-external-file-finders @@ -4667,7 +4876,7 @@ string containing the external program to use with any arguments. @code{%f} will be replaced by the name of the file to be found. Note that these commands will be executed directly, not via a shell. Only relevant when @code{reftex-use-external-file-finders} is -non-@code{nil}.@refill +non-@code{nil}. @end defopt @page @@ -4679,17 +4888,17 @@ non-@code{nil}.@refill @defopt reftex-keep-temporary-buffers Non-@code{nil} means, keep buffers created for parsing and lookup. @b{Ref@TeX{}} sometimes needs to visit files related to the current -document. We distinguish files visited for@refill +document. We distinguish files visited for @table @asis @item PARSING Parts of a multifile document loaded when (re)-parsing the -document.@refill +document. @item LOOKUP BibTeX database files and TeX files loaded to find a reference, to -display label context, etc.@refill +display label context, etc. @end table The created buffers can be kept for later use, or be thrown away -immediately after use, depending on the value of this variable:@refill +immediately after use, depending on the value of this variable: @table @code @item nil @@ -4698,13 +4907,13 @@ Throw away as much as possible. Keep everything. @item 1 Throw away buffers created for parsing, but keep the ones created for -lookup.@refill +lookup. @end table If a buffer is to be kept, the file is visited normally (which is potentially slow but will happen only once). If a buffer is to be thrown away, the initialization of the buffer depends upon the variable -@code{reftex-initialize-temporary-buffers}.@refill +@code{reftex-initialize-temporary-buffers}. @end defopt @defopt reftex-initialize-temporary-buffers @@ -4713,7 +4922,7 @@ temporarily. When @code{nil}, @b{Ref@TeX{}} may turn off find-file hooks and other stuff to briefly visit a file. When @code{t}, the full default initializations are done (@code{find-file-hook} etc.). Instead of @code{t} or @code{nil}, this variable may also be a list of hook -functions to do a minimal initialization.@refill +functions to do a minimal initialization. @end defopt @defopt reftex-no-include-regexps @@ -4731,7 +4940,7 @@ commands, or with the @kbd{r} key in menus. When this option is or the file associated with the label or section heading near point in a menu. Requesting re-parsing of an entire multifile document then requires a @kbd{C-u C-u} prefix or the capital @kbd{R} key in -menus.@refill +menus. @end defopt @defopt reftex-save-parse-info @@ -4742,10 +4951,10 @@ used to save the information. When this variable is @code{t}, @item accessing the parsing information for the first time in an editing session will read that file (if available) instead of parsing the -document.@refill +document. @item exiting Emacs or killing a buffer in reftex-mode will cause a new -version of the file to be written.@refill +version of the file to be written. @end itemize @end defopt @@ -4766,7 +4975,7 @@ type. These buffers are kept from one selection to the next and need not to be created for each use - so the menu generally comes up faster. The selection buffers will be erased (and therefore updated) automatically when new labels in its category are added. See the -variable @code{reftex-auto-update-selection-buffers}.@refill +variable @code{reftex-auto-update-selection-buffers}. @end defopt @defopt reftex-auto-update-selection-buffers @@ -4777,7 +4986,7 @@ force an update upon next use. When @code{nil}, the buffers are left alone and have to be updated by hand, with the @kbd{g} key from the label selection process. The value of this variable will only have any effect when @code{reftex-use-multiple-selection-buffers} is -non-@code{nil}.@refill +non-@code{nil}. @end defopt @node Options (Fontification), Options (Misc), Options (Optimizations), Options @@ -4789,13 +4998,13 @@ non-@code{nil}.@refill Non-@code{nil} means, use fonts in label menu and on-the-fly help. Font-lock must be loaded as well to actually get fontified display. After changing this option, a rescan may be necessary to -activate it.@refill +activate it. @end defopt @defopt reftex-refontify-context Non-@code{nil} means, re-fontify the context in the label menu with font-lock. This slightly slows down the creation of the label menu. It -is only necessary when you definitely want the context fontified.@refill +is only necessary when you definitely want the context fontified. This option may have 3 different values: @table @code @@ -4805,9 +5014,9 @@ Never refontify. Always refontify. @item 1 Refontify when necessary, e.g. with old versions of the x-symbol -package.@refill +package. @end table -The option is ignored when @code{reftex-use-fonts} is @code{nil}.@refill +The option is ignored when @code{reftex-use-fonts} is @code{nil}. @end defopt @defopt reftex-highlight-selection @@ -4817,7 +5026,7 @@ Non-@code{nil} means, highlight selected text in selection and keys in the selection and @file{*toc*} buffers act on. However, if you mainly use the mouse to select an item, you may find it nice to have mouse-triggered highlighting @emph{instead} or @emph{as well}. The -variable may have one of these values:@refill +variable may have one of these values: @example nil @r{No highlighting.} @@ -4827,16 +5036,16 @@ both @r{Both cursor and mouse trigger highlighting.} @end example Changing this variable requires to rebuild the selection and *toc* -buffers to become effective (keys @kbd{g} or @kbd{r}).@refill +buffers to become effective (keys @kbd{g} or @kbd{r}). @end defopt @defopt reftex-cursor-selected-face Face name to highlight cursor selected item in toc and selection buffers. -See also the variable @code{reftex-highlight-selection}.@refill +See also the variable @code{reftex-highlight-selection}. @end defopt @defopt reftex-mouse-selected-face Face name to highlight mouse selected item in toc and selection buffers. -See also the variable @code{reftex-highlight-selection}.@refill +See also the variable @code{reftex-highlight-selection}. @end defopt @defopt reftex-file-boundary-face Face name for file boundaries in selection buffer. @@ -4885,13 +5094,13 @@ Face name for index entries. @defopt reftex-extra-bindings Non-@code{nil} means, make additional key bindings on startup. These extra bindings are located in the users @samp{C-c letter} -map. @xref{Key Bindings}.@refill +map. @xref{Key Bindings}. @end defopt @defopt reftex-plug-into-AUCTeX Plug-in flags for AUCTeX interface. This variable is a list of 5 boolean flags. When a flag is non-@code{nil}, @b{Ref@TeX{}} -will@refill +will @example - supply labels in new sections and environments (flag 1) @@ -4920,7 +5129,7 @@ Non-@code{nil} means, allow arguments of macros to be detached by whitespace. When this is @code{t}, the @samp{aaa} in @w{@samp{\bbb [xxx] @{aaa@}}} will be considered an argument of @code{\bb}. Note that this will be the case even if @code{\bb} is defined with zero or one -argument.@refill +argument. @end defopt @node Keymaps and Hooks, Changes, Options, Top @@ -4938,14 +5147,14 @@ Normal hook which is being run when loading @file{reftex.el}. @end deffn @deffn {Normal Hook} reftex-mode-hook -Normal hook which is being run when turning on @b{Ref@TeX{}} mode.@refill +Normal hook which is being run when turning on @b{Ref@TeX{}} mode. @end deffn Furthermore, the 4 modes used for referencing labels, creating citations, the table of contents buffer and the phrases buffer have their own keymaps and mode hooks. See the respective sections. There are many more hooks which are described in the relevant sections about -options for a specific part of @b{Ref@TeX{}}.@refill +options for a specific part of @b{Ref@TeX{}}. @node Changes, , Keymaps and Hooks, Top @chapter Changes @@ -4953,296 +5162,396 @@ options for a specific part of @b{Ref@TeX{}}.@refill Here is a list of recent changes to @b{Ref@TeX{}}. +@noindent @b{Version 4.26} +@itemize @bullet +@item +Bug fixes only. +@end itemize + +@noindent @b{Version 4.25} +@itemize @bullet +@item +Fixed bug with @samp{%F} in a label prefix. Added new escapes +@samp{%m} and @samp{%M} for mater file name and master directory. +@end itemize + +@noindent @b{Version 4.24} +@itemize @bullet +@item +Inserting citation commands now prompts for optional arguments +when called with a prefix argument. Related new options are +@code{reftex-cite-prompt-optional-args} and +@code{reftex-cite-cleanup-optional-args}. +@item +New option @code{reftex-trust-label-prefix}. Configure this variable +if you'd like RefTeX to base its classification of labels on prefixes. +This can speed-up document parsing, but may in some cases reduce the +quality of the context used by RefTeX to describe a label. +@item +Fixed bug in @code{reftex-create-bibtex-file} when @code{reftex-comment-citations} +is non-nil. +@item +Fixed bugs in indexing: Case-sensitive search, quotes before and/or +after words. Disabbled indexing in comment lines. +@end itemize + +@noindent @b{Version 4.22} +@itemize @bullet +@item +New command @code{reftex-create-bibtex-file} to create a new database +with all entries referenced in the current document. +@item +New keys @kbd{e} and @kbd{E} allow to produce a BibTeX database file +from entries marked in a citation selection buffer. +@end itemize + +@noindent @b{Version 4.21} +@itemize @bullet +@item +Renaming labels from the toc buffer with key @kbd{M-%}. +@end itemize + +@noindent @b{Version 4.20} +@itemize @bullet +@item +Structure editing capabilities. The command keys @kbd{<} and @kbd{>} in +the TOC buffer promote/demote the section at point or all sections in +the current region. +@item +New option @code{reftex-toc-split-windows-fraction} to set the size of +the window used by the TOC. This makes the old variable +@code{reftex-toc-split-windows-horizontally-fraction} obsolete. +@item +A dedicated frame can show the TOC with the current section +always automatically highlighted. The frame is created and +deleted from the toc buffer with the @kbd{d} key. +@end itemize + +@noindent @b{Version 4.19} +@itemize @bullet +@item +New command `reftex-toc-recenter' (@kbd{C-c -}) which shows the current +section in the TOC buffer without selecting the TOC window. +@item +Recentering happens automatically in idle time when the option +@code{reftex-auto-recenter-toc} is turned on. +@item +Fixed several bugs related to automatic cursor positioning in the TOC +buffer. +@item +The highlight in the TOC buffer stays when the focus moves to a +different window. +@item +New command `reftex-goto-label'. +@item +Part numbers are no longer included in chapter numbers, and a new +part does not reset the chapter counter. See new option +@code{reftex-part-resets-chapter}. +@end itemize + +@noindent @b{Version 4.18} +@itemize @bullet +@item +@code{reftex-citation} uses the word before the cursor as a default +search string. +@item +Simplified several regular expressions for speed. +@item +Better support for chapterbib. +@end itemize + +@noindent @b{Version 4.17} +@itemize @bullet +@item +The toc window can be split off horizontally. See new options +@code{reftex-toc-split-windows-horizontally}, +@code{reftex-toc-split-windows-horizontally-fraction}. +@item +It is possible to specify a function which verifies an index match +during global indexing. See new option @code{reftex-index-verify-function}. +@item +The macros which input a file in LaTeX (like \input, \include) can +be configured. See new option @code{reftex-include-file-commands}. +@item +The macros which specify the bibliography file (like \bibliography) can +be configured. See new option @code{reftex-bibliography-commands}. +@item +The regular expression used to search for the \bibliography macro has +been relaxed to allow for @samp{@{\bibliography@{...@}@}} needed by +chapterbib. +@item +Small bug fixes. +@end itemize + +@noindent @b{Version 4.15} +@itemize @bullet +@item +Fixed bug with parsing of BibTeX files, when fields contain quotes or +unmatched parenthesis. +@item +Small bug fixes. +@item +Improved interaction with Emacs LaTeX mode. +@end itemize + +@noindent @b{Version 4.12} +@itemize @bullet +@item +Support for @file{bibentry} citation style. +@end itemize + +@noindent @b{Version 4.11} +@itemize @bullet +@item +Fixed bug which would parse @samp{\Section} just like @samp{\section}. +@end itemize + +@noindent @b{Version 4.10} +@itemize @bullet +@item +Renamed @file{reftex-vcr.el} to @file{reftex-dcr.el} because of conflict +with @file{reftex-vars.el} on DOS machines. +@item +New options @code{reftex-parse-file-extension} and +@code{reftex-index-phrase-file-extension}. +@end itemize + +@noindent [.....] @ignore -@noindent @b{Version 1.00} +@noindent @b{Version 4.09} @itemize @bullet @item -released on 7 Jan 1997. +New option @code{reftex-toc-max-level} to limit the depth of the toc. +New key binding @kbd{t} in the @file{*toc*} buffer to change this +setting. +@item +RefTeX maintains an @file{Index Phrases} file in which phrases can be +collected. When the document is ready, RefTeX can search all +these phrases and assist indexing all matches. +@item +The variables @code{reftex-index-macros} and +@code{reftex-index-default-macro} have changed their syntax slightly. +The @var{repeat} parameter has move from the latter to the former. +Also calls to @code{reftex-add-index-macros} from AUCTeX style files +need to be adapted. +@item +The variable @code{reftex-section-levels} no longer contains the +default stuff which has been moved to a constant. +@item +Environments like theorems can be placed into the TOC by putting +entries for @samp{"begin@{theorem@}"} in +@code{reftex-setion-levels}. @end itemize -@noindent @b{Version 1.04} +@noindent @b{Version 4.06} @itemize @bullet @item -Macros as wrappers, AMSTeX support, delayed context parsing for -new labels.@refill +@code{reftex-section-levels} can contain a function to compute the level +of a sectioning command. +@item +Multiple @code{thebibliography} environments recognized. @end itemize -@noindent @b{Version 1.05} +@noindent @b{Version 4.04} @itemize @bullet @item -XEmacs port. +New option @code{reftex-index-default-tag} implements a default for queries. @end itemize -@noindent @b{Version 1.07} +@noindent @b{Version 4.02} @itemize @bullet @item -@b{Ref@TeX{}} gets its own menu. +macros ending in @samp{refrange} are considered to contain references. +@item +Index entries made with @code{reftex-index-selection-or-word} in TeX +math mode automatically get enclosing @samp{$} to preserve math mode. See +new option @code{reftex-index-math-format}. Requires AUCTeX. @end itemize -@noindent @b{Version 1.09} +@noindent @b{Version 4.01} @itemize @bullet @item -Support for @code{tex-main-file}, an analogue for -@code{TeX-master}.@refill +New command @code{reftex-index-globally} to index a word in many +places in the document. Also available from the index buffer with +@kbd{&}. @item -MS-DOS support. +The first item in a @code{reftex-label-alist} entry may now also be a parser +function to do non-standard parsing. +@item +@code{reftex-auto-view-crossref} no longer interferes with +@code{pop-up-frames} (patch from Stefan Monnier). @end itemize -@noindent @b{Version 2.00} +@noindent @b{Version 4.00} @itemize @bullet @item -Labels can be derived from context (default for sections). +RefTeX has been split into several smaller files which are autoloaded on +demand. @item -Configuration of label insertion and label referencing revised. +Index support, along with many new options. @item -Crossref fields in BibTeX database entries. +The selection of keys for @code{\ref} and @code{\cite} now allows to +select multiple items by marking entries with the @kbd{m} key. @item -@code{reftex-toc} introduced (thanks to Stephen Eglen). +Fancyref support. @end itemize -@noindent @b{Version 2.03} +@noindent @b{Version 3.43} @itemize @bullet @item -@code{figure*}, @code{table*}, @code{sidewaysfigure/table} added to -default environments.@refill +Viewing cross-references generalized. Now works on @code{\label}, +@code{\ref}, @code{\cite}, @code{\bibitem}, @code{\index}, variations of +these, and from BibTeX buffers. @item -@code{reftex-bibfile-ignore-list} introduced (thanks to Rory Molinari). +New option @code{reftex-view-crossref-extra}. @item -New functions @code{reftex-arg-label}, @code{reftex-arg-ref}, -@code{reftex-arg-cite}.@refill +Support for the additional sectioning commands @code{\addchap} and +@code{\addsec} which are defined in the LaTeX KOMA-Script classes. @item -Emacs/XEmacs compatibility reworked. XEmacs 19.15 now is -required.@refill +Files in @code{reftex-default-bibliography} will be searched along +@code{BIBINPUTS} path. @item -@code{reftex-add-to-label-alist} (to be called from AUCTeX style -files).@refill -@item -Finding context with a hook function. -@item -Sorting BibTeX entries (new variable: -@code{reftex-sort-bibtex-matches}). +Reading a parse file now checks consistency. @end itemize -@noindent @b{Version 2.05} +@noindent @b{Version 3.42} @itemize @bullet @item -Support for @file{custom.el}. +File search further refined. New option @code{reftex-file-extensions}. @item -New function @code{reftex-grep-document} (thanks to Stephen Eglen). +@file{*toc*} buffer can show the file boundaries of a multifile +document, all labels and associated context. New keys @kbd{i}, @kbd{l}, +and @kbd{c}. New options @code{reftex-toc-include-labels}, +@code{reftex-toc-include-context}, +@code{reftex-toc-include-file-boundaries}. @end itemize -@noindent @b{Version 2.07} +@noindent @b{Version 3.41} @itemize @bullet @item -New functions @code{reftex-search-document}, -@code{reftex-query-replace-document}. +New options @code{reftex-texpath-environment-variables}, +@code{reftex-use-external-file-finders}, +@code{reftex-external-file-finders}, +@code{reftex-search-unrecursed-path-first}. +@item +@emph{kpathsearch} support. See new options and +@code{reftex-bibpath-environment-variables}. @end itemize -@noindent @b{Version 2.11} +@noindent @b{Version 3.38} @itemize @bullet @item -Submitted for inclusion to Emacs and XEmacs. +@code{reftex-view-crossref} no longer moves to find a macro. Point has +to be on the macro argument. @end itemize -@noindent @b{Version 2.14} +@noindent @b{Version 3.36} @itemize @bullet @item -Variable @code{reftex-plug-into-AUCTeX} simplifies cooperation with -AUCTeX.@refill +New value @code{window} for option @code{reftex-auto-view-crossref}. @end itemize -@noindent @b{Version 2.17} +@noindent @b{Version 3.35} @itemize @bullet @item -Label prefix expands % escapes with current file name and other stuff. -@item -Citation format now with % escapes. This is not backward -compatible!@refill -@item -TEXINPUTS variable recognized when looking for input files. -@item -Context can be the nth argument of a macro.@refill -@item -Searching in the select buffer is now possible (@kbd{C-s} and -@kbd{C-r}).@refill -@item -Display and derive-label can use two different context methods. -@item -AMSmath @code{xalignat} and @code{xxalignat} added. +ISO 8859 Latin-1 chars are converted to ASCII to derive better labels. +This takes back the related changes in 3.34 for safety reasons. @end itemize -@noindent @b{Version 3.00} +@noindent @b{Version 3.34} @itemize @bullet @item -@b{Ref@TeX{}} should work better for very large projects: +Additional flag in @code{reftex-derive-label-parameters} do make only +lowercase labels (default @code{t}). @item -The new parser works without creating a master buffer. +All @file{.rel} files have a final newline to avoid queries. @item -Rescanning can be limited to a part of a multifile document. -@item -Information from the parser can be stored in a file. -@item -@b{Ref@TeX{}} can deal with macros having a naked label as an argument. -@item -Macros may have white space and newlines between arguments. -@item -Multiple identical section headings no longer confuse -@code{reftex-toc}.@refill -@item -@b{Ref@TeX{}} should work correctly in combination with buffer-altering -packages like outline, folding, x-symbol, iso-cvt, isotex, etc.@refill -@item -All labeled environments discussed in @emph{The LaTeX Companion} by -Goossens, Mittelbach & Samarin, Addison-Wesley 1994) are part of -@b{Ref@TeX{}}'s defaults.@refill +Single byte representations of accented European letters (ISO-8859-1) +are now legal in labels. @end itemize -@noindent @b{Version 3.03} +@noindent @b{Version 3.33} @itemize @bullet @item -Support for the LaTeX package @code{xr}, for inter-document -references.@refill -@item -A few (minor) Mule-related changes. -@item -Fixed bug which could cause @emph{huge} @file{.rel} files. -@item -Search for input and @file{.bib} files with recursive path definitions. +Multiple selection buffers are now hidden buffers (they start with a +SPACE). +@item +Fixed bug with file search when TEXINPUTS environment variable is empty. @end itemize -@noindent @b{Version 3.04} +@noindent @b{Version 3.30} @itemize @bullet @item -Fixed BUG in the @emph{xr} support. +In @code{reftex-citation}, the regular expression used to scan BibTeX +files can be specified using completion on known citation keys. +@item +New keys @kbd{a} and @kbd{A} in BibTeX selection process to cite @emph{all} +entries. +@item +New command @code{reftex-renumber-simple-labels} to renumber simple +labels like @samp{eq:13} sequentially through a document. @end itemize -@noindent @b{Version 3.05} +@noindent @b{Version 3.28} @itemize @bullet @item -Compatibility code now first checks for XEmacs feature. +Auto view crossref for XEmacs uses @code{post-command-hook} to restart the +timer, since itimer restart is not reliable. +@item +Option @code{reftex-bibfile-ignore-list} renamed to @code{-regexps}. +@item +Expansion of recursive tex and bib path rewritten. +@item +Fixed problem where @b{Ref@TeX{}} did not scan unsaved buffers. +@item +Fixed bug with section numbering after *-red sections. @end itemize -@noindent @b{Version 3.07} +@noindent @b{Version 3.27} @itemize @bullet @item -@code{Ref} menu improved. +Macros can define @emph{neutral} labels, just like @code{\label} +itself. +@item +New option @code{reftex-allow-detached-macro-args}, default @code{nil}! @end itemize -@noindent @b{Version 3.10} +@noindent @b{Version 3.26} @itemize @bullet @item -Fixed a bug which made reftex 3.07 fail on [X]Emacs version 19. +[X]Emacs 19 no longer supported. Use 3.22 for Emacs 19. @item -Removed unimportant code which caused OS/2 Emacs to crash. +New hooks @code{reftex-translate-to-ascii-function}, +@code{reftex-string-to-label-function}. @item -All customization variables now accessible from menu. +Made sure automatic crossref display will not visit/scan files. @end itemize -@noindent @b{Version 3.11} +@noindent @b{Version 3.25} @itemize @bullet @item -Fixed bug which led to naked label in (e.g.) footnotes. +Echoing of citation info caches the info for displayed entries. +New option @code{reftex-cache-cite-echo}. @item -Added scroll-other-window functions to RefTeX-Select. +@kbd{M-x reftex-reset-mode} now also removes the file with parsing +info. +@item +Default of @code{reftex-revisit-to-follow} changed to nil. @end itemize -@noindent @b{Version 3.12} +@noindent @b{Version 3.24} @itemize @bullet @item -There are 3 new keymaps for customization: @code{reftex-toc-map}, -@code{reftex-select-label-map}, @code{reftex-select-bib-map}. +New option @code{reftex-revisit-to-echo}. @item -Refontification uses more standard font-lock stuff. +Interface with X-Symbol (>=2.6) is now complete and stable. @item -When no BibTeX database files are specified, citations can also use -@code{\bibitem} entries from a @code{thebibliography} environment.@refill -@end itemize - -@noindent @b{Version 3.14} -@itemize @bullet +Adapted to new outline, which uses overlays. @item -Selection buffers can be kept between selections: this is faster. -See new variable @code{reftex-use-multiple-selection-buffers}.@refill +File names in @code{\bibliography} may now have the @code{.bib} +extension. @item -Prefix interpretation of reftex-view-crossref changed. -@item -Support for the @code{varioref} package (@kbd{v} key in selection -buffer).@refill -@end itemize - -@noindent @b{Version 3.16} -@itemize @bullet -@item -New hooks @code{reftex-format-label-function}, -@code{reftex-format-ref-function}, @code{reftex-format-cite-function}.@refill -@item -TeXInfo documentation completed. -@item -Some restrictions in Label inserting and referencing removed. -@item -New variable @code{reftex-default-bibliography}. -@end itemize - -@noindent @b{Version 3.17} -@itemize @bullet -@item -Additional bindings in selection and @file{*toc*} buffers. @kbd{g} -redefined. -@item -New command @code{reftex-save-all-document-buffers}. -@item -Magic word matching made more intelligent. -@item -Selection process can switch to completion (with @key{TAB}). -@item -@code{\appendix} is now recognized and influences section numbering. -@item -File commentary shortened considerably (use Info documentation). -@item -New option @code{reftex-no-include-regexps} to skip some include files. -@item -New option @code{reftex-revisit-to-follow}. -@end itemize - -@noindent @b{Version 3.18} -@itemize @bullet -@item -The selection now uses a recursive edit, much like minibuffer input. -This removes all restrictions during selection. E.g. you can now -switch buffers at will, use the mouse etc.@refill -@item -New option @code{reftex-highlight-selection}. -@item -@kbd{mouse-2} can be used to select in selection and @file{*toc*} -buffers.@refill -@item -Fixed some problems regarding the interaction with VIPER mode. -@item -Follow-mode is now only used after point motion. -@item -@b{Ref@TeX{}} now finally does not fontify temporary files anymore. -@end itemize - -@noindent @b{Version 3.19} -@itemize @bullet -@item -Fixed bug with AUCTeX @code{TeX-master}. -@end itemize - -@noindent @b{Version 3.21} -@itemize @bullet -@item -New options for all faces used by @b{Ref@TeX{}}. They're in the -customization group @code{reftex-fontification-configurations}.@refill -@end itemize - -@noindent @b{Version 3.22} -@itemize @bullet -@item -Fixed bug with empty context strings. -@item -@code{reftex-mouse-view-crossref} is now bound by default at -@kbd{S-mouse-2}.@refill +Fixed Bug with parsing "single file" from master file buffer. @end itemize @noindent @b{Version 3.23} @@ -5250,7 +5559,7 @@ Fixed bug with empty context strings. @item Parse files @file{MASTER.rel} made compatible between Emacs and XEmacs. @item -@code{kill-emacs-hook} and @code{kill-buffer-hook} now write the parse +@code{kill-emacs-hook} and @code{kill-buffer-hook} now write the parse file. @item The cursor inside a @code{\ref} or @code{\cite} macro can now trigger @@ -5278,311 +5587,302 @@ Fixed bug with syntax table and context refontification. Safety-net for name change of @code{font-lock-reference-face}. @end itemize -@noindent @b{Version 3.24} +@noindent @b{Version 3.22} @itemize @bullet @item -New option @code{reftex-revisit-to-echo}. +Fixed bug with empty context strings. @item -Interface with X-Symbol (>=2.6) is now complete and stable. -@item -Adapted to new outline, which uses overlays. -@item -File names in @code{\bibliography} may now have the @code{.bib} -extension.@refill -@item -Fixed Bug with parsing "single file" from master file buffer. +@code{reftex-mouse-view-crossref} is now bound by default at +@kbd{S-mouse-2}. @end itemize -@noindent @b{Version 3.25} +@noindent @b{Version 3.21} @itemize @bullet @item -Echoing of citation info caches the info for displayed entries. -New option @code{reftex-cache-cite-echo}.@refill -@item -@kbd{M-x reftex-reset-mode} now also removes the file with parsing -info.@refill -@item -Default of @code{reftex-revisit-to-follow} changed to nil. +New options for all faces used by @b{Ref@TeX{}}. They're in the +customization group @code{reftex-fontification-configurations}. @end itemize -@noindent @b{Version 3.26} +@noindent @b{Version 3.19} @itemize @bullet @item -[X]Emacs 19 no longer supported. Use 3.22 for Emacs 19. -@item -New hooks @code{reftex-translate-to-ascii-function}, -@code{reftex-string-to-label-function}.@refill -@item -Made sure automatic crossref display will not visit/scan files. +Fixed bug with AUCTeX @code{TeX-master}. @end itemize -@noindent @b{Version 3.27} +@noindent @b{Version 3.18} @itemize @bullet @item -Macros can define @emph{neutral} labels, just like @code{\label} -itself.@refill +The selection now uses a recursive edit, much like minibuffer input. +This removes all restrictions during selection. E.g. you can now +switch buffers at will, use the mouse etc. @item -New option @code{reftex-allow-detached-macro-args}, default @code{nil}! +New option @code{reftex-highlight-selection}. +@item +@kbd{mouse-2} can be used to select in selection and @file{*toc*} +buffers. +@item +Fixed some problems regarding the interaction with VIPER mode. +@item +Follow-mode is now only used after point motion. +@item +@b{Ref@TeX{}} now finally does not fontify temporary files anymore. @end itemize -@noindent @b{Version 3.28} +@noindent @b{Version 3.17} @itemize @bullet @item -Auto view crossref for XEmacs uses @code{post-command-hook} to restart the -timer, since itimer restart is not reliable.@refill +Additional bindings in selection and @file{*toc*} buffers. @kbd{g} +redefined. @item -Option @code{reftex-bibfile-ignore-list} renamed to @code{-regexps}. +New command @code{reftex-save-all-document-buffers}. @item -Expansion of recursive tex and bib path rewritten. +Magic word matching made more intelligent. @item -Fixed problem where @b{Ref@TeX{}} did not scan unsaved buffers. +Selection process can switch to completion (with @key{TAB}). @item -Fixed bug with section numbering after *-red sections. +@code{\appendix} is now recognized and influences section numbering. +@item +File commentary shortened considerably (use Info documentation). +@item +New option @code{reftex-no-include-regexps} to skip some include files. +@item +New option @code{reftex-revisit-to-follow}. @end itemize -@noindent @b{Version 3.30} +@noindent @b{Version 3.16} @itemize @bullet @item -In @code{reftex-citation}, the regular expression used to scan BibTeX -files can be specified using completion on known citation keys. +New hooks @code{reftex-format-label-function}, +@code{reftex-format-ref-function}, @code{reftex-format-cite-function}. @item -New keys @kbd{a} and @kbd{A} in BibTeX selection process to cite @emph{all} -entries. +TeXInfo documentation completed. @item -New command @code{reftex-renumber-simple-labels} to renumber simple -labels like @samp{eq:13} sequentially through a document. +Some restrictions in Label inserting and referencing removed. +@item +New variable @code{reftex-default-bibliography}. @end itemize -@noindent @b{Version 3.33} + +@noindent @b{Version 3.14} @itemize @bullet @item -Multiple selection buffers are now hidden buffers (they start with a -SPACE). +Selection buffers can be kept between selections: this is faster. +See new variable @code{reftex-use-multiple-selection-buffers}. @item -Fixed bug with file search when TEXINPUTS environment variable is empty. +Prefix interpretation of reftex-view-crossref changed. +@item +Support for the @code{varioref} package (@kbd{v} key in selection +buffer). @end itemize -@noindent @b{Version 3.34} + +@noindent @b{Version 3.12} @itemize @bullet @item -Additional flag in @code{reftex-derive-label-parameters} do make only -lowercase labels (default @code{t}). +There are 3 new keymaps for customization: @code{reftex-toc-map}, +@code{reftex-select-label-map}, @code{reftex-select-bib-map}. @item -All @file{.rel} files have a final newline to avoid queries. +Refontification uses more standard font-lock stuff. @item -Single byte representations of accented European letters (ISO-8859-1) -are now legal in labels. +When no BibTeX database files are specified, citations can also use +@code{\bibitem} entries from a @code{thebibliography} environment. @end itemize -@noindent @b{Version 3.35} + +@noindent @b{Version 3.11} @itemize @bullet @item -ISO 8859 Latin-1 chars are converted to ASCII to derive better labels. -This takes back the related changes in 3.34 for safety reasons.@refill +Fixed bug which led to naked label in (e.g.) footnotes. +@item +Added scroll-other-window functions to RefTeX-Select. @end itemize -@noindent @b{Version 3.36} + +@noindent @b{Version 3.10} @itemize @bullet @item -New value @code{window} for option @code{reftex-auto-view-crossref}. +Fixed a bug which made reftex 3.07 fail on [X]Emacs version 19. +@item +Removed unimportant code which caused OS/2 Emacs to crash. +@item +All customization variables now accessible from menu. @end itemize -@noindent @b{Version 3.38} + +@noindent @b{Version 3.07} @itemize @bullet @item -@code{reftex-view-crossref} no longer moves to find a macro. Point has -to be on the macro argument. +@code{Ref} menu improved. @end itemize -@noindent @b{Version 3.41} + +@noindent @b{Version 3.05} @itemize @bullet @item -New options @code{reftex-texpath-environment-variables}, -@code{reftex-use-external-file-finders}, -@code{reftex-external-file-finders}, -@code{reftex-search-unrecursed-path-first}. -@item -@emph{kpathsearch} support. See new options and -@code{reftex-bibpath-environment-variables}. +Compatibility code now first checks for XEmacs feature. @end itemize -@noindent @b{Version 3.42} + +@noindent @b{Version 3.04} @itemize @bullet @item -File search further refined. New option @code{reftex-file-extensions}. -@item -@file{*toc*} buffer can show the file boundaries of a multifile -document, all labels and associated context. New keys @kbd{i}, @kbd{l}, -and @kbd{c}. New options @code{reftex-toc-include-labels}, -@code{reftex-toc-include-context}, -@code{reftex-toc-include-file-boundaries}. @refill +Fixed BUG in the @emph{xr} support. @end itemize -@noindent @b{Version 3.43} + +@noindent @b{Version 3.03} @itemize @bullet @item -Viewing cross-references generalized. Now works on @code{\label}, -@code{\ref}, @code{\cite}, @code{\bibitem}, @code{\index}, variations of -these, and from BibTeX buffers.@refill +Support for the LaTeX package @code{xr}, for inter-document +references. @item -New option @code{reftex-view-crossref-extra}.@refill +A few (minor) Mule-related changes. @item -Support for the additional sectioning commands @code{\addchap} and -@code{\addsec} which are defined in the LaTeX KOMA-Script classes.@refill +Fixed bug which could cause @emph{huge} @file{.rel} files. @item -Files in @code{reftex-default-bibliography} will be searched along -@code{BIBINPUTS} path.@refill -@item -Reading a parse file now checks consistency. +Search for input and @file{.bib} files with recursive path definitions. @end itemize -@noindent @b{Version 4.00} + +@noindent @b{Version 3.00} @itemize @bullet @item -RefTeX has been split into several smaller files which are autoloaded on -demand. +@b{Ref@TeX{}} should work better for very large projects: @item -Index support, along with many new options. +The new parser works without creating a master buffer. @item -The selection of keys for @code{\ref} and @code{\cite} now allows to -select multiple items by marking entries with the @kbd{m} key. +Rescanning can be limited to a part of a multifile document. @item -Fancyref support. +Information from the parser can be stored in a file. +@item +@b{Ref@TeX{}} can deal with macros having a naked label as an argument. +@item +Macros may have white space and newlines between arguments. +@item +Multiple identical section headings no longer confuse +@code{reftex-toc}. +@item +@b{Ref@TeX{}} should work correctly in combination with buffer-altering +packages like outline, folding, x-symbol, iso-cvt, isotex, etc. +@item +All labeled environments discussed in @emph{The LaTeX Companion} by +Goossens, Mittelbach & Samarin, Addison-Wesley 1994) are part of +@b{Ref@TeX{}}'s defaults. @end itemize -@noindent @b{Version 4.01} + +@noindent @b{Version 2.17} @itemize @bullet @item -New command @code{reftex-index-globally} to index a word in many -places in the document. Also available from the index buffer with -@kbd{&}. +Label prefix expands % escapes with current file name and other stuff. @item -The first item in a @code{reftex-label-alist} entry may now also be a parser -function to do non-standard parsing. +Citation format now with % escapes. This is not backward +compatible! @item -@code{reftex-auto-view-crossref} no longer interferes with -@code{pop-up-frames} (patch from Stefan Monnier). +TEXINPUTS variable recognized when looking for input files. +@item +Context can be the nth argument of a macro. +@item +Searching in the select buffer is now possible (@kbd{C-s} and +@kbd{C-r}). +@item +Display and derive-label can use two different context methods. +@item +AMSmath @code{xalignat} and @code{xxalignat} added. @end itemize -@noindent @b{Version 4.02} + +@noindent @b{Version 2.14} @itemize @bullet @item -macros ending in @samp{refrange} are considered to contain references. -@item -Index entries made with @code{reftex-index-selection-or-word} in TeX -math mode automatically get enclosing @samp{$} to preserve math mode. See -new option @code{reftex-index-math-format}. Requires AUCTeX. +Variable @code{reftex-plug-into-AUCTeX} simplifies cooperation with +AUCTeX. @end itemize -@noindent @b{Version 4.04} + +@noindent @b{Version 2.11} @itemize @bullet @item -New option @code{reftex-index-default-tag} implements a default for queries. +Submitted for inclusion to Emacs and XEmacs. @end itemize -@noindent @b{Version 4.06} + +@noindent @b{Version 2.07} @itemize @bullet @item -@code{reftex-section-levels} can contain a function to compute the level -of a sectioning command. -@item -Multiple @code{thebibliography} environments recognized. +New functions @code{reftex-search-document}, +@code{reftex-query-replace-document}. @end itemize -@noindent @b{Version 4.09} + +@noindent @b{Version 2.05} @itemize @bullet @item -New option @code{reftex-toc-max-level} to limit the depth of the toc. -New key binding @kbd{t} in the @file{*toc*} buffer to change this -setting.@refill +Support for @file{custom.el}. @item -RefTeX maintains an @file{Index Phrases} file in which phrases can be -collected. When the document is ready, RefTeX can search all -these phrases and assist indexing all matches.@refill -@item -The variables @code{reftex-index-macros} and -@code{reftex-index-default-macro} have changed their syntax slightly. -The @var{repeat} parameter has move from the latter to the former. -Also calls to @code{reftex-add-index-macros} from AUCTeX style files -need to be adapted.@refill -@item -The variable @code{reftex-section-levels} no longer contains the -default stuff which has been moved to a constant.@refill -@item -Environments like theorems can be placed into the TOC by putting -entries for @samp{"begin@{theorem@}"} in -@code{reftex-setion-levels}.@refill +New function @code{reftex-grep-document} (thanks to Stephen Eglen). @end itemize -@noindent @b{Version 4.10} + +@noindent @b{Version 2.03} @itemize @bullet @item -Renamed @file{reftex-vcr.el} to @file{reftex-dcr.el} because of conflict -with @file{reftex-vars.el} on DOS machines. +@code{figure*}, @code{table*}, @code{sidewaysfigure/table} added to +default environments. @item -New options @code{reftex-parse-file-extension} and -@code{reftex-index-phrase-file-extension}. +@code{reftex-bibfile-ignore-list} introduced (thanks to Rory Molinari). +@item +New functions @code{reftex-arg-label}, @code{reftex-arg-ref}, +@code{reftex-arg-cite}. +@item +Emacs/XEmacs compatibility reworked. XEmacs 19.15 now is +required. +@item +@code{reftex-add-to-label-alist} (to be called from AUCTeX style +files). +@item +Finding context with a hook function. +@item +Sorting BibTeX entries (new variable: +@code{reftex-sort-bibtex-matches}). @end itemize -@noindent @b{Version 4.11} + +@noindent @b{Version 2.00} @itemize @bullet @item -Fixed bug which would parse @samp{\Section} just like @samp{\section}. +Labels can be derived from context (default for sections). +@item +Configuration of label insertion and label referencing revised. +@item +Crossref fields in BibTeX database entries. +@item +@code{reftex-toc} introduced (thanks to Stephen Eglen). @end itemize -@noindent @b{Version 4.12} + +@noindent @b{Version 1.09} @itemize @bullet @item -Support for @file{bibentry} citation style. +Support for @code{tex-main-file}, an analogue for +@code{TeX-master}. +@item +MS-DOS support. @end itemize -@noindent @b{Version 4.15} + +@noindent @b{Version 1.07} @itemize @bullet @item -Fixed bug with parsing of BibTeX files, when fields contain quotes or -unmatched parenthesis. +@b{Ref@TeX{}} gets its own menu. +@end itemize + +@noindent @b{Version 1.05} +@itemize @bullet @item -Small bug fixes. +XEmacs port. +@end itemize + +@noindent @b{Version 1.04} +@itemize @bullet @item -Improved interaction with Emacs LaTeX mode. +Macros as wrappers, AMSTeX support, delayed context parsing for +new labels. @end itemize @end ignore -@noindent @b{Version 4.17} + +@noindent @b{Version 1.00} @itemize @bullet @item -The toc window can be split off horizontally. See new options -@code{reftex-toc-split-windows-horizontally}, -@code{reftex-toc-split-windows-horizontally-fraction}. -@item -It is possible to specify a function which verifies an index match -during global indexing. See new option @code{reftex-index-verify-function}. -@item -The macros which input a file in LaTeX (like \input, \include) can -be configured. See new option @code{reftex-include-file-commands}. -@item -The macros which specify the bibliography file (like \bibliography) can -be configured. See new option @code{reftex-bibliography-commands}. -@item -The regular expression used to search for the \bibliography macro has -been relaxed to allow for @samp{@{\bibliography@{...@}@}} needed by -chapterbib. -@item -Small bug fixes. -@end itemize -@noindent @b{Version 4.18} -@itemize @bullet -@item -@code{reftex-citation} uses the word before the cursor as a default -search string. -@item -Simplified several regular expressions for speed. -@item -Better support for chapterbib. -@end itemize -@noindent @b{Version 4.19} -@itemize @bullet -@item -New command `reftex-toc-recenter' (@kbd{C-c -}) which shows the current -section in the TOC buffer without selecting the TOC window. -@item -Recentering happens automatically in idle time when the option -@code{reftex-auto-recenter-toc} is turned on. -@item -Fixed several bugs related to automatic cursor positioning in the TOC -buffer. -@item -The highlight in the TOC buffer stays when the focus moves to a -different window. -@item -New command `reftex-goto-label'. -@item -Part numbers are no longer included in chapter numbers, and a new -part does not reset the chapter counter. See new option -@code{reftex-part-resets-chapter}. +released on 7 Jan 1997. @end itemize + + + + @node Index, , , Top @unnumbered Index @printindex cp @@ -5591,6 +5891,3 @@ part does not reset the chapter counter. See new option @contents @bye -@ignore - arch-tag: 1e055774-0576-4b1b-b47f-550d0961fd43 -@end ignore From 099fc2c9b1da5ef9f7a49e29e2416e3a35e3e47b Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:18:12 +0000 Subject: [PATCH 239/560] Fixed typo in reftex log --- lisp/ChangeLog | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 64647c7fbf0..a702dc3d89a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,16 +1,17 @@ 2005-01-14 Carsten Dominik - * reftex-cite.el (reftex-bib-sort-year): Catch the case if the - year is not given. + * textmodes/reftex-cite.el (reftex-bib-sort-year): Catch the case + if the year is not given. - * reftex-ref.el (reftex-replace-prefix-escapes): Added new escapes - %m and %M, fixed bug with %F by adding save-match-data. + * textmodes/reftex-ref.el (reftex-replace-prefix-escapes): Added + new escapes %m and %M, fixed bug with %F by adding + save-match-data. (reftex-reference): Removed ?. from list of spaces. (reftex-label-info): Added automatic label prefix recognition - * reftex-index.el (reftex-index-next-phrase): Added slave - parameter to call of `reftex-index-this-phrase' + * textmodes/reftex-index.el (reftex-index-next-phrase): Added + slave parameter to call of `reftex-index-this-phrase' (reftex-index-this-phrase): New optional argument (reftex-index-region-phrases): Added slave parameter to call of `reftex-index-this-phrase' @@ -24,23 +25,24 @@ indexing. Fixed bug with matching is there is a quote before or after the word. - * reftex-cite.el (reftex-all-used-citation-keys): Fix bug when - collecting citation keys in lines with comments. + * textmodes/reftex-cite.el (reftex-all-used-citation-keys): Fix + bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. (reftex-do-citation): Prompting for optional arguments implemented. - * reftex-vars.el (reftex-cite-format-builtin): Added optional - arguments to most cite commands. + * textmodes/reftex-vars.el (reftex-cite-format-builtin): Added + optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. (reftex-trust-label-prefix): New option - * reftex-toc.el (reftex-toc-find-section): Added push-mark before - changing the position in the buffer. + * textmodes/reftex-toc.el (reftex-toc-find-section): Added + push-mark before changing the position in the buffer. - * reftex.el (reftex-prefix-to-typekey-alist): New variable + * textmodes/reftex.el (reftex-prefix-to-typekey-alist): New + variable (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist 2005-01-14 Nick Roberts From 880d0c354f8a9e3939ed8c472e041362b6b3491b Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:21:54 +0000 Subject: [PATCH 240/560] corrected setfilename --- man/reftex.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/reftex.texi b/man/reftex.texi index a2eb8a63bc7..d0bfe59e47f 100644 --- a/man/reftex.texi +++ b/man/reftex.texi @@ -1,6 +1,6 @@ \input texinfo @c -*-texinfo-*- @c %**start of header -@setfilename reftex +@setfilename ../info/reftex @settitle RefTeX User Manual @dircategory Emacs @direntry From 791d856fac4b758075baac06b26f9be9d7cf8806 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:47:42 +0000 Subject: [PATCH 241/560] 2005-01-14 Carsten Dominik * org.el (org-show-following-heading): New option. (org-show-hierarchy-above): Use `org-show-following-heading'. * org.el (orgtbl-optimized): New option (orgtbl-mode): New command, a minor mode. (orgtbl-mode-map): New variable. (turn-on-orgtbl, orgtbl-mode, orgtbl-make-binding) (orgtbl-error, orgtbl-self-insert-command) (orgtbl-delete-backward-char, orgtbl-delete-char): New functions. * org.el (org-mode): `org-table-may-need-update' is now a local variable in each org-mode buffer. * org.el (org-set-regexps-and-options): Renamed from `org-set-regexps'. Added checking for STARTUP keyword. (org-get-current-options): Added STARTUP options. (org-table-insert-row): Mode mode intelligent about when realignment is needed. (org-self-insert-command, org-delete-backward-char, org-delete-char): New commands. (org-enable-table-editor): new default value `optimized'. (org-table-blank-field): Support blanking regions if active. --- lisp/ChangeLog | 25 ++ lisp/textmodes/org.el | 605 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 582 insertions(+), 48 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a702dc3d89a..4cc298e29a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,28 @@ +2005-01-14 Carsten Dominik + + * textmodes/org.el (org-show-following-heading): New option. + (org-show-hierarchy-above): Use `org-show-following-heading'. + + * textmodes/org.el (orgtbl-optimized): New option + (orgtbl-mode): New command, a minor mode. + (orgtbl-mode-map): New variable. + (turn-on-orgtbl, orgtbl-mode, orgtbl-make-binding) + (orgtbl-error, orgtbl-self-insert-command) + (orgtbl-delete-backward-char, orgtbl-delete-char): New functions. + + * textmodes/org.el (org-mode): `org-table-may-need-update' is now + a local variable in each org-mode buffer. + + * textmodes/org.el (org-set-regexps-and-options): Renamed from + `org-set-regexps'. Added checking for STARTUP keyword. + (org-get-current-options): Added STARTUP options. + (org-table-insert-row): Mode mode intelligent about when + realignment is needed. + (org-self-insert-command, org-delete-backward-char, + org-delete-char): New commands. + (org-enable-table-editor): new default value `optimized'. + (org-table-blank-field): Support blanking regions if active. + 2005-01-14 Carsten Dominik diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index fc1ffb329d9..2488ad7fcf2 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -1,14 +1,14 @@ ;; org.el --- Outline-based notes management and organizer - -;; Copyright (c) 2003, 2004 Free Software Foundation - +;; Carstens outline-mode for keeping track of everything. +;; Copyright (c) 2004 Free Software Foundation +;; ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 3.03 - +;; Version: 3.04 (internal CVS version is $Revision: 1.106 $) +;; ;; This file is part of GNU Emacs. - +;; ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) @@ -23,9 +23,7 @@ ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Carsten's outline-mode for keeping track of everything. ;; ;;; Commentary: ;; @@ -59,6 +57,8 @@ ;; (autoload 'org-diary "org" "Diary entries from Org mode") ;; (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t) ;; (autoload 'org-store-link "org" "Store a link to the current location" t) +;; (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t) +;; (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode") ;; (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) ;; (define-key global-map "\C-cl" 'org-store-link) ;; (define-key global-map "\C-ca" 'org-agenda) @@ -79,9 +79,18 @@ ;; ;; Changes: ;; ------- +;; Version 3.04 +;; - Table editor optimized to need fewer realignments, and to keep +;; table shape when typing in fields. +;; - A new minor mode, orgtbl-mode, introduces the Org-mode table editor +;; into arbitrary major modes. +;; - Fixed bug with realignment in XEmacs. +;; - Startup options can be set with special #+STARTUP line. +;; - Heading following a match in org-occur can be suppressed. +;; ;; Version 3.03 ;; - Copyright transfer to the FSF. -;; - Effect of C-u and C-u C-u in org-timeline interchanged. +;; - Effect of C-u and C-u C-u in org-timeline swapped. ;; - Timeline now always contains today, and `.' jumps to it. ;; - Table editor: ;; - cut and paste of regtangular regions in tables @@ -204,7 +213,7 @@ ;;; Customization variables -(defvar org-version "3.03" +(defvar org-version "3.04" "The version number of the file org.el.") (defun org-version (arg) (interactive "P") @@ -402,11 +411,11 @@ lisp variable `state'." "Matches the SCHEDULED keyword together with a time stamp.") (make-variable-buffer-local 'org-scheduled-time-regexp) -(defun org-set-regexps () +(defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (eq major-mode 'org-mode) (let ((re (org-make-options-regexp - '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO"))) + '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" "STARTUP"))) (splitre "[ \t]+") kwds int key value cat) (save-restriction @@ -426,7 +435,17 @@ lisp variable `state'." kwds (append kwds (org-split-string value splitre)))) ((equal key "TYP_TODO") (setq int 'type - kwds (append kwds (org-split-string value splitre))))) + kwds (append kwds (org-split-string value splitre)))) + ((equal key "STARTUP") + (let ((opts (org-split-string value splitre)) + (set '(("fold" org-startup-folded t) + ("nofold" org-startup-folded nil) + ("dlcheck" org-startup-with-deadline-check t) + ("nodlcheck" org-startup-with-deadline-check nil))) + l var val) + (while (setq l (assoc (pop opts) set)) + (setq var (nth 1 l) val (nth 2 l)) + (set (make-local-variable var) val))))) ))) (and cat (set (make-local-variable 'org-category) cat)) (and kwds (set (make-local-variable 'org-todo-keywords) kwds)) @@ -465,8 +484,6 @@ lisp variable `state'." (concat "\\<" org-scheduled-string " *<\\([^>]+\\)>")) (org-set-font-lock-defaults))) -;(add-hook 'hack-local-variables-hook 'org-set-regexps) - (defgroup org-time nil "Options concerning time stamps and deadlines in Org-mode." :tag "Org Time" @@ -540,7 +557,7 @@ When nil, always start on the current day." :type 'number) (defcustom org-agenda-include-all-todo t - "Non-nil means, the multifile agenda will always contain alm TODO entries. + "Non-nil means, the multifile agenda will always contain all TODO entries. When nil, date-less entries will only be shown if `org-agenda' is called with a prefix argument. When non-nil, the TODO entries will be listed at the top of the agenda, before @@ -639,6 +656,18 @@ t Everywhere except in headlines" "Formats for `format-time-string' which are used for time stamps. It is not recommended to change this constant.") +(defcustom org-show-following-heading t + "Non-nil means, show heading following match in `org-occur'. +When doing an `org-occur' it is useful to show the headline which +follows the match, even if they do not match the regexp. This makes it +easier to edit directly inside the sparse tree. However, if you use +org-occur mainly as an overview, the following headlines are +unnecessary clutter." + :group 'org-structure + :type 'boolean) + + + (defgroup org-link nil "Options concerning links in Org-mode." :tag "Org Link" @@ -845,11 +874,34 @@ When nil, new notes will be filed to the end of a file or entry." :tag "Org Table" :group 'org) -(defcustom org-enable-table-editor t +(defcustom org-enable-table-editor 'optimized "Non-nil means, lines starting with \"|\" are handled by the table editor. -When nil, such lines will be treated like ordinary lines." +When nil, such lines will be treated like ordinary lines. + +When equal to the symbol `optimized', the table editor will be optimized to +do the following +- Use automatic overwrite mode in front of whitespace in table fields. + This make the structure of the table stay in tact as long as the edited + field does not exceed the column width. +- Minimize the number of realigns. Normally, the table is aligned each time + TAB or RET are pressed to move to another field. With optimization this + happens only if changes to a field might have changed the column width. +Optimization requires replacing the functions `self-insert-command', +`delete-char', and `backward-delete-char' in Org-mode buffers, with a +slight (in fact: unnoticable) speed impact for normal typing. Org-mode is +very good at guessing when a re-align will be necessary, but you can always +force one with `C-c C-c'. + +I you would like to use the optimized version in Org-mode, but the un-optimized +version in OrgTbl-mode, see the variable `orgtbl-optimized'. + +This variable can be used to turn on and off the table editor during a session, +but in order to toggle optimization, a restart is required." :group 'org-table - :type 'boolean) + :type '(choice + (const :tag "off" nil) + (const :tag "on" t) + (const :tag "on, optimized" optimized))) (defcustom org-table-default-size "5x2" "The default size for newly created tables, Columns x Rows." @@ -1295,6 +1347,8 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (eval-when-compile (defvar zmacs-regions) (defvar org-transient-mark-mode) + (defvar org-old-auto-fill-inhibit-regexp) + (defvar orgtbl-mode-menu) (defvar org-html-entities) (defvar org-goto-start-pos) (defvar org-cursor-color) @@ -1351,7 +1405,7 @@ messages (Gnus), BBDB entries, and any files related to the project. For printing and sharing of notes, an Org-mode file (or a part of it) can be exported as a well-structured ASCII or HTML file. -+ The following commands are available: +The following commands are available: \\{org-mode-map}" (interactive "P") @@ -1363,10 +1417,12 @@ can be exported as a well-structured ASCII or HTML file. (org-install-agenda-files-menu) (setq outline-regexp "\\*+") (if org-startup-truncated (setq truncate-lines t)) - (org-set-regexps) + (org-set-regexps-and-options) (set (make-local-variable 'font-lock-unfontify-region-function) 'org-unfontify-region) ;; Activate before-change-function + (set (make-local-variable 'org-table-may-need-update) t) + (make-local-hook 'before-change-functions) ;; needed for XEmacs (add-hook 'before-change-functions 'org-before-change-function nil 'local) ;; Inhibit auto-fill for headers, tables and fixed-width lines. @@ -1540,7 +1596,9 @@ can be exported as a well-structured ASCII or HTML file. ((org-at-table-p 'any) ;; Enter the table or move to the next field in the table (or (org-table-recognize-table.el) - (org-table-next-field))) + (progn + (org-table-justify-field-maybe) + (org-table-next-field)))) (arg ;; Global cycling @@ -1765,9 +1823,9 @@ or nil." (defvar org-ignore-region nil "To temporary disable the active region.") -(defun org-insert-heading () +(defun org-insert-heading (arg) "Insert a new heading with same depth at point." - (interactive) + (interactive "P") (let* ((head (save-excursion (condition-case nil (org-back-to-heading) @@ -2271,14 +2329,14 @@ that the match should indeed be shown." (message "%d match(es) for regexp %s" cnt regexp)) cnt)) - (defun org-show-hierarchy-above () "Make sure point and the headings hierarchy above is visible." (if (org-on-heading-p t) (org-flag-heading nil) ; only show the heading (org-show-hidden-entry)) ; show entire entry (save-excursion - (and (outline-next-heading) + (and org-show-following-heading + (outline-next-heading) (org-flag-heading nil))) ; show the next heading (save-excursion ; show all higher headings (while (condition-case nil @@ -2361,7 +2419,7 @@ Otherwise, only the date will be included. All parts of a date not specified by the user will be filled in from the current date/time. So if you press just return without typing anything, the time stamp will represent the current date/time. If there is already a timestamp -at the cursoe, it will be modified." +at the cursor, it will be modified." (interactive "P") (let ((fmt (if arg (cdr org-time-stamp-formats) (car org-time-stamp-formats))) @@ -2798,7 +2856,11 @@ If there is already a time stamp at the cursor position, update it." ;;;###autoload (defun org-agenda-mode () - "Mode for time-sorted view on action items in Org-mode files." + "Mode for time-sorted view on action items in Org-mode files. + +The following commands are available: + +\\{org-agenda-mode-map}" (interactive) (kill-all-local-variables) (setq major-mode 'org-agenda-mode) @@ -3118,7 +3180,7 @@ NDAYS defaults to `org-agenda-ndays'." (defun org-check-agenda-file (file) "Make sure FILE exists. If not, ask user what to do." ;; FIXME: this does not correctly change the menus - ;; Could be fixed by explicitly going to the buffer, maybe. + ;; Could probably be fixed by explicitly going to the buffer. (when (not (file-exists-p file)) (message "non-existent file %s. [R]emove from agenda-files or [A]bort?" file) @@ -4507,7 +4569,6 @@ RET at beg-of-buf -> Append to file as level 2 headline RET on headline -> Store as sublevel entry to current headline / -> before/after current headline, same headings level") -;; FIXME: Document C-u C-c C-c ;;;###autoload (defun org-remember-handler () "Store stuff from remember.el into an org file. @@ -4796,6 +4857,21 @@ Such a file can be imported into a spreadsheet program like Excel." (save-buffer)) (kill-buffer buf))) +(defvar org-table-aligned-begin-marker (make-marker) + "Marker at the beginning of the table last aligned. +Used to check if cursor still is in that table, to minimize realignment.") +(defvar org-table-aligned-end-marker (make-marker) + "Marker at the end of the table last aligned. +Used to check if cursor still is in that table, to minimize realignment.") +(defvar org-table-last-alignment nil + "List of flags for flushright alignment, from the last re-algnment. +This is being used to correctly align a single field after TAB or RET.") +;; FIXME: The following is currently not used. +(defvar org-table-last-column-widths nil + "List of max width of ffields in each column. +This is being used to correctly align a single field after TAB or RET.") + + (defun org-table-align (&optional arg) "Align the table at point by aligning all vertical bars." (interactive "P") @@ -4866,6 +4942,8 @@ Such a file can be imported into a spreadsheet program like Excel." (push (>= frac org-table-number-fraction) typenums)) (setq lengths (nreverse lengths) typenums (nreverse typenums)) + (setq org-table-last-alignment typenums + org-table-last-column-widths lengths) ;; Compute the formats needed for output of the table (setq rfmt (concat indent "|") hfmt (concat indent "|")) (while (setq l (pop lengths)) @@ -4884,13 +4962,14 @@ Such a file can be imported into a spreadsheet program like Excel." ;; Replace the old one (delete-region beg end) (move-marker end nil) + (move-marker org-table-aligned-begin-marker (point)) (insert new) + (move-marker org-table-aligned-end-marker (point)) ;; Try to move to the old location (approximately) (goto-line linepos) (set-window-start (selected-window) winstart 'noforce) (org-table-goto-column colpos) (setq org-table-may-need-update nil) - ;; (message "Aligning table...done") (if (org-in-invisibility-spec-p '(org-table)) (org-table-add-invisible-to-vertical-lines)) )) @@ -4920,6 +4999,35 @@ With argument TABLE-TYPE, go to the end of a table.el-type table." (goto-char (match-beginning 0))) (point-marker))) +(defun org-table-justify-field-maybe () + "Justify the current field, text to left, number to right." + (cond + (org-table-may-need-update) ; Realignment will happen anyway, don't bother + ((org-at-table-hline-p) + ;; This is pretty stupid, but I don't know how to deal with hlines + (setq org-table-may-need-update t)) + ((or (not (equal (marker-buffer org-table-aligned-begin-marker) + (current-buffer))) + (< (point) org-table-aligned-begin-marker) + (>= (point) org-table-aligned-end-marker)) + ;; This is not the same table, force a full re-align + (setq org-table-may-need-update t)) + (t ;; realign the current field, based on previous full realign + (let* ((pos (point)) s org-table-may-need-update + (col (org-table-current-column)) + (num (nth (1- col) org-table-last-alignment)) + l f) + (when (> col 0) + (skip-chars-backward "^|\n") + (if (looking-at " *\\([^|\n]*?\\) *|") + (progn + (setq s (match-string 1) + l (max 1 (- (match-end 0) (match-beginning 0) 3))) + (setq f (format (if num " %%%ds |" " %%-%ds |") l)) + (replace-match (format f s t t))) + (setq org-table-may-need-update t)) + (goto-char pos)))))) + (defun org-table-next-field (&optional arg) "Go to the next field in the current table. Before doing so, re-align the table if necessary." @@ -5013,18 +5121,21 @@ I.e. not on a hline or before the first or after the last column?" (error "Not in table data field"))) (defun org-table-blank-field () - "Blank the current table field." + "Blank the current table field or active region." (interactive) (org-table-check-inside-data-field) - (skip-chars-backward "^|") - (backward-char 1) - (if (looking-at "|[^|]+") - (let* ((pos (match-beginning 0)) - (match (match-string 0)) - (len (length match))) - (replace-match (concat "|" (make-string (1- len) ?\ ))) - (goto-char (+ 2 pos)) - (substring match 1)))) + (if (and (interactive-p) (org-region-active-p)) + (let (org-table-clip) + (org-table-cut-region)) + (skip-chars-backward "^|") + (backward-char 1) + (if (looking-at "|[^|]+") + (let* ((pos (match-beginning 0)) + (match (match-string 0)) + (len (length match))) + (replace-match (concat "|" (make-string (1- len) ?\ ))) + (goto-char (+ 2 pos)) + (substring match 1))))) (defun org-table-get-field (&optional n replace) "Return the value of the field in column N of current row. @@ -5199,6 +5310,15 @@ However, when FORCE is non-nil, create new columns if necessary." (org-table-goto-column colpos)) (org-table-align)) +(defun org-table-move-column-right () + "Move column to the right." + (interactive) + (org-table-move-column nil)) +(defun org-table-move-column-left () + "Move column to the left." + (interactive) + (org-table-move-column 'left)) + (defun org-table-move-column (&optional left) "Move the current column to the right. With arg LEFT, move to the left." (interactive "P") @@ -5230,6 +5350,15 @@ However, when FORCE is non-nil, create new columns if necessary." (org-table-goto-column colpos)) (org-table-align)) +(defun org-table-move-row-down () + "Move table row down." + (interactive) + (org-table-move-row nil)) +(defun org-table-move-row-up () + "Move table row down." + (interactive) + (org-table-move-row 'up)) + (defun org-table-move-row (&optional up) "Move the current table line down. With arg UP, move it up." (interactive "P") @@ -5263,11 +5392,12 @@ With prefix ARG, insert below the current line." (setq line (mapcar (lambda (x) (if (member x '(?| ?+)) ?| ?\ )) line)) (setq line (mapcar (lambda (x) (if (equal x ?|) ?| ?\ )) line))) (beginning-of-line (if arg 2 1)) - (apply 'insert line) - (insert "\n") + (let (org-table-may-need-update) + (apply 'insert-before-markers line) + (insert-before-markers "\n")) (beginning-of-line 0) (re-search-forward "| ?" (point-at-eol) t) - (org-table-align))) + (and org-table-may-need-update (org-table-align)))) (defun org-table-insert-hline (&optional arg) "Insert a horizontal-line below the current line into the table. @@ -5788,6 +5918,271 @@ separator line)." (setq ndown 0))) (org-table-align))) +;;; The orgtbl minor mode + +;; Define a minor mode which can be used in other modes in order to +;; integrate the org-mode table editor. + +;; This is really a hack, because the org-mode table editor uses several +;; keys which normally belong to the major mode, for example the TAB and +;; RET keys. Here is how it works: The minor mode defines all the keys +;; necessary to operate the table editor, but wraps the commands into a +;; function which tests if the cursor is currently inside a table. If that +;; is the case, the table editor command is executed. However, when any of +;; those keys is used outside a table, the function uses `key-binding' to +;; look up if the key has an associated command in another currently active +;; keymap (minor modes, major mode, global), and executes that command. +;; There might be problems if any of the keys used by the table editor is +;; otherwise used as a prefix key. + +;; Another challenge is that the key binding for TAB can be tab or \C-i, +;; likewise the binding for RET can be return or \C-m. Orgtbl-mode +;; addresses this by checking explicitly for both bindings. + +;; The optimized version (see variable `orgtbl-optimized') takes over +;; all keys which are bound to `self-insert-command' in the *global map*. +;; Some modes bind other commands to simple characters, for example +;; AUCTeX binds the double quote to `Tex-insert-quote'. With orgtbl-mode +;; active, this binding is ignored inside tables and replaced with a +;; modified self-insert. + +(defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) + "Non-nil means, use the optimized table editor version for orgtbl-mode. +In the optimized version, the table editor takes over all simple keys that +normally just insert a character. In tables, the characters are inserted +in a way to minimize disturbing the table structure (i.e. in overwrite mode +for empty fields). Outside tables, the correct binding of the keys is +restored. + +The default for this option is t if the optimized version is also used in +Org-mode. See the variable `org-enable-table-editor' for details. Changing +this variable requires a restart of Emacs to become effective." + :group 'org-table + :type 'boolean) + +(defvar orgtbl-mode nil + "Variable controlling orgtbl-mode, a minor mode enabling the org-mode +table editor iin arbitrary modes.") +(make-variable-buffer-local 'orgtbl-mode) + +(defvar orgtbl-mode-map (make-sparse-keymap) + "Keymap for orgtbl-mode.") + +;;;###autoload +(defun turn-on-orgtbl () + "Unconditionally turn on orgtbl-mode." + (orgtbl-mode 1)) + +;;;###autoload +(defun orgtbl-mode (&optional arg) + "The org-mode table editor as a minor mode for use in other modes." + (interactive) + (setq orgtbl-mode + (if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode))) + (if orgtbl-mode + (progn + (set (make-local-variable (quote org-table-may-need-update)) t) + (make-local-hook (quote before-change-functions)) + (add-hook 'before-change-functions 'org-before-change-function + nil 'local) + (set (make-local-variable 'org-old-auto-fill-inhibit-regexp) + auto-fill-inhibit-regexp) + (set (make-local-variable 'auto-fill-inhibit-regexp) + (if auto-fill-inhibit-regexp + (concat "\\([ \t]*|\\|" auto-fill-inhibit-regexp) + "[ \t]*|")) + (easy-menu-add orgtbl-mode-menu) + (run-hooks (quote orgtbl-mode-hook))) + (setq auto-fill-inhibit-regexp org-old-auto-fill-inhibit-regexp) + (remove-hook 'before-change-functions 'org-before-change-function t) + (easy-menu-remove orgtbl-mode-menu) + (force-mode-line-update 'all))) + +;; Install it as a minor mode. +(put 'orgtbl-mode :included t) +(put 'orgtbl-mode :menu-tag "Org Table Mode") +(add-minor-mode 'orgtbl-mode " OrgTbl" orgtbl-mode-map) + +(defun orgtbl-make-binding (fun &rest keys) + "Create a function for binding in the table minor mode." + (list 'lambda '(arg) '(interactive "p") + (list 'if + '(org-at-table-p) + (list 'call-interactively (list 'quote fun)) + (list 'let '(orgtbl-mode) + (list 'call-interactively + (append '(or) + (mapcar (lambda (k) + (list 'key-binding k)) + keys) + '('orgtbl-error))))))) + +(defun orgtbl-error () + "Error when there is no default binding for a table key." + (interactive) + (error "This key is has no function outside tables")) + +;; Keybindings for the minor mode +(let ((bindings + '(([(meta shift left)] org-table-delete-column) + ([(meta left)] org-table-move-column-left) + ([(meta right)] org-table-move-column-right) + ([(meta shift right)] org-table-insert-column) + ([(meta shift up)] org-table-kill-row) + ([(meta shift down)] org-table-insert-row) + ([(meta up)] org-table-move-row-up) + ([(meta down)] org-table-move-row-down) + ("\C-c\C-w" org-table-cut-region) + ("\C-c\M-w" org-table-copy-region) + ("\C-c\C-y" org-table-paste-rectangle) + ("\C-c-" org-table-insert-hline) + ([(shift tab)] org-table-previous-field) + ("\C-c\C-c" org-table-align) + ([(return)] org-table-next-row) + ([(shift return)] org-table-copy-from-above) + ([(meta return)] org-table-wrap-region) + ("\C-c\C-q" org-table-wrap-region) + ("\C-c?" org-table-current-column) + ("\C-c " org-table-blank-field) + ("\C-c+" org-table-sum) + ("\C-c|" org-table-toggle-vline-visibility) + ("\C-c=" org-table-eval-formula))) + elt key fun cmd) + (while (setq elt (pop bindings)) + (setq key (car elt) + fun (nth 1 elt) + cmd (orgtbl-make-binding fun key)) + (define-key orgtbl-mode-map key cmd))) + +;; Special treatment needed for TAB and RET +;(define-key orgtbl-mode-map [(return)] +; (orgtbl-make-binding 'org-table-next-row [(return)] "\C-m")) +;(define-key orgtbl-mode-map "\C-m" +; (orgtbl-make-binding 'org-table-next-row "\C-m" [(return)])) +;(define-key orgtbl-mode-map [(tab)] +; (orgtbl-make-binding 'org-table-next-field [(tab)] "\C-i")) +;(define-key orgtbl-mode-map "\C-i" +; (orgtbl-make-binding 'org-table-next-field "\C-i" [(tab)])) + +(define-key orgtbl-mode-map [(return)] + (orgtbl-make-binding 'orgtbl-ret [(return)] "\C-m")) +(define-key orgtbl-mode-map "\C-m" + (orgtbl-make-binding 'orgtbl-ret "\C-m" [(return)])) +(define-key orgtbl-mode-map [(tab)] + (orgtbl-make-binding 'orgtbl-tab [(tab)] "\C-i")) +(define-key orgtbl-mode-map "\C-i" + (orgtbl-make-binding 'orgtbl-tab "\C-i" [(tab)])) + +(when orgtbl-optimized + ;; If the user wants maximum table support, we need to hijack + ;; some standard editing functions + (substitute-key-definition 'self-insert-command 'orgtbl-self-insert-command + orgtbl-mode-map global-map) + (substitute-key-definition 'delete-char 'orgtbl-delete-char + orgtbl-mode-map global-map) + (substitute-key-definition 'delete-backward-char 'orgtbl-delete-backward-char + orgtbl-mode-map global-map) + (define-key org-mode-map "|" 'self-insert-command)) + +(defun orgtbl-tab () + "Justification and field motion for orgtbl-mode." + (interactive) + (org-table-justify-field-maybe) + (org-table-next-field)) + +(defun orgtbl-ret () + "Justification and field motion for orgtbl-mode." + (interactive) + (org-table-justify-field-maybe) + (org-table-next-row)) + +(defun orgtbl-self-insert-command (N) + "Like `self-insert-command', use overwrite-mode for whitespace in tables. +If the cursor is in a table looking at whitespace, the whitespace is +overwritten, and the table is not marked as requiring realignment." + (interactive "p") + (if (and (org-at-table-p) + (eq N 1) + (looking-at "[^|\n]* +|")) + (let (org-table-may-need-update (pos (point))) + (goto-char (1- (match-end 0))) + (delete-backward-char 1) + (goto-char (match-beginning 0)) + (self-insert-command N)) + (setq org-table-may-need-update t) + (let (orgtbl-mode) + (call-interactively (key-binding (vector last-input-event)))))) + +(defun orgtbl-delete-backward-char (N) + "Like `delete-backward-char', insert whitespace at field end in tables. +When deleting backwards, in tables this function will insert whitespace in +front of the next \"|\" separator, to keep the table aligned. The table will +still be marked for re-alignment, because a narrow field may lead to a +reduced column width." + (interactive "p") + (if (and (org-at-table-p) + (eq N 1) + (looking-at ".*?|")) + (let ((pos (point))) + (backward-delete-char N) + (skip-chars-forward "^|") + (insert " ") + (goto-char (1- pos))) + (message "%s" last-input-event) (sit-for 1) + (delete-backward-char N))) + +(defun orgtbl-delete-char (N) + "Like `delete-char', but insert whitespace at field end in tables. +When deleting characters, in tables this function will insert whitespace in +front of the next \"|\" separator, to keep the table aligned. The table +will still be marked for re-alignment, because a narrow field may lead to +a reduced column width." + (interactive "p") + (if (and (org-at-table-p) + (eq N 1)) + (if (looking-at ".*?|") + (let ((pos (point))) + (replace-match (concat + (substring (match-string 0) 1 -1) + " |")) + (goto-char pos))) + (delete-char N))) + +(easy-menu-define orgtbl-mode-menu orgtbl-mode-map "OrgTbl menu" + '("Tbl" + ["Align" org-ctrl-c-ctrl-c :active (org-at-table-p) :keys "C-c C-c"] + ["Next field" org-cycle :active (org-at-table-p) :keys "TAB"] + ["Previous Field" org-shifttab :active (org-at-table-p) :keys "S-TAB"] + ["Next row" org-return :active (org-at-table-p) :keys "RET"] + "--" + ["Blank field" org-table-blank-field :active (org-at-table-p) :keys "C-c SPC"] + ["Copy field from above" + org-table-copy-from-above :active (org-at-table-p) :keys "S-RET"] + "--" + ("Column" + ["Move column left" org-metaleft :active (org-at-table-p) :keys "M-"] + ["Move column right" org-metaright :active (org-at-table-p) :keys "M-"] + ["Delete column" org-shiftmetaleft :active (org-at-table-p) :keys "M-S-"] + ["Insert column" org-shiftmetaright :active (org-at-table-p) :keys "M-S-"]) + ("Row" + ["Move row up" org-metaup :active (org-at-table-p) :keys "M-"] + ["Move row down" org-metadown :active (org-at-table-p) :keys "M-"] + ["Delete row" org-shiftmetaup :active (org-at-table-p) :keys "M-S-"] + ["Insert row" org-shiftmetadown :active (org-at-table-p) :keys "M-S-"] + "--" + ["Insert hline" org-table-insert-hline :active (org-at-table-p) :keys "C-c -"]) + ("Rectangle" + ["Copy rectangle" org-copy-special :active (org-at-table-p) :keys "C-c M-w"] + ["Cut rectangle" org-cut-special :active (org-at-table-p) :keys "C-c C-w"] + ["Paste rectangle" org-paste-special :active (org-at-table-p) :keys "C-c C-y"] + ["Fill rectangle" org-table-wrap-region :active (org-at-table-p) :keys "C-c C-q"]) + "--" + ["Which column?" org-table-current-column :active (org-at-table-p) :keys "C-c ?"] + ["Sum column/rectangle" org-table-sum + :active (or (org-at-table-p) (org-region-active-p)) :keys "C-c +"] + ["Eval formula" org-table-eval-formula :active (org-at-table-p) :keys "C-c ="] + )) + ;;; Exporting (defconst org-level-max 20) @@ -6300,6 +6695,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff." #+CATEGORY: %s #+SEQ_TODO: %s #+TYP_TODO: %s +#+STARTUP: %s %s " (buffer-name) (user-full-name) user-mail-address org-export-default-language org-export-headline-levels @@ -6318,7 +6714,10 @@ Does include HTML export options as well as TODO and CATEGORY stuff." "TODO FEEDBACK VERIFY DONE") (if (equal org-todo-interpretation 'type) (mapconcat 'identity org-todo-keywords " ") - "Me Jason Marie DONE"))) + "Me Jason Marie DONE") + (if org-startup-folded "fold" "nofold") + (if org-startup-with-deadline-check "dlcheck" "nodlcheck") + )) (defun org-insert-export-options-template () "Insert into the buffer a template with information for exporting." @@ -7025,6 +7424,7 @@ When LEVEL is non-nil, increase section numbers on that level." (define-key org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c) (define-key org-mode-map [(return)] 'org-return) (define-key org-mode-map [(shift return)] 'org-table-copy-from-above) +(define-key org-mode-map [(meta return)] 'org-meta-return) (define-key org-mode-map [(control up)] 'org-move-line-up) (define-key org-mode-map [(control down)] 'org-move-line-down) (define-key org-mode-map "\C-c?" 'org-table-current-column) @@ -7041,6 +7441,105 @@ When LEVEL is non-nil, increase section numbers on that level." (define-key org-mode-map "\C-c\C-xh" 'org-export-as-html) (define-key org-mode-map "\C-c\C-x\C-h" 'org-export-as-html-and-open) + +;; FIXME: Do we really need to save match data in these commands? +;; I would like to remove it in order to minimize impact. +;; Self-insert already does not preserve it. How much resources does this take??? + +(defsubst org-table-p () + (if (and (eq major-mode 'org-mode) font-lock-mode) + (eq (get-text-property (point) 'face) 'org-table-face) + (save-match-data (org-at-table-p)))) + +(defun org-self-insert-command (N) + "Like `self-insert-command', use overwrite-mode for whitespace in tables. +If the cursor is in a table looking at whitespace, the whitespace is +overwritten, and the table is not marked as requiring realignment." + (interactive "p") + (if (and (org-table-p) + (eq N 1) + (looking-at "[^|\n]* +|")) + (let (org-table-may-need-update (pos (point))) + (goto-char (1- (match-end 0))) + (delete-backward-char 1) + (goto-char (match-beginning 0)) + (self-insert-command N)) + (setq org-table-may-need-update t) + (self-insert-command N))) + +;; FIXME: +;; The following two functions might still be optimized to trigger +;; re-alignment less frequently. Right now they raise the flag each time +;; (through before-change-functions). Here is how this could be minimized: +;; Basically, check if the non-white field width before deletion is +;; equal to the column width. If yes, the delete should trigger a +;; re-align. I have not implemented this so far because it is not so +;; easy, requires grabbing the field etc. So it may finally have some +;; impact on typing performance which we don't want. + +;; The defsubst is only a draft, untested... + +;; Maybe it is not so important to get rid of realigns - maybe the most +;; important aspect is to keep the table look noce as long as possible, +;; which is already achieved... + +;(defsubst org-check-delete-triggers-realign () +; (let ((pos (point))) +; (skip-chars-backward "^|\n") +; (and (looking-at " *\\(.*?\\) *|") +; (= (nth (1- (org-table-current-column)) +; org-table-last-column-widths) +; (- (match-end 1) (match-beginning 1))) +; (setq org-table-may-need-update t)))) + +(defun org-delete-backward-char (N) + "Like `delete-backward-char', insert whitespace at field end in tables. +When deleting backwards, in tables this function will insert whitespace in +front of the next \"|\" separator, to keep the table aligned. The table will +still be marked for re-alignment, because a narrow field may lead to a +reduced column width." + (interactive "p") + (if (and (org-table-p) + (eq N 1) + (looking-at ".*?|")) + (let ((pos (point))) + (backward-delete-char N) + (skip-chars-forward "^|") + (insert " ") + (goto-char (1- pos))) + (backward-delete-char N))) + +(defun org-delete-char (N) + "Like `delete-char', but insert whitespace at field end in tables. +When deleting characters, in tables this function will insert whitespace in +front of the next \"|\" separator, to keep the table aligned. The table +will still be marked for re-alignment, because a narrow field may lead to +a reduced column width." + (interactive "p") + (if (and (org-table-p) + (eq N 1)) + (if (looking-at ".*?|") + (let ((pos (point))) + (replace-match (concat + (substring (match-string 0) 1 -1) + " |")) + (goto-char pos))) + (delete-char N))) + +;; How to do this: Measure non-white length of current string +;; If equal to column width, we should realign. + +(when (eq org-enable-table-editor 'optimized) + ;; If the user wants maximum table support, we need to hijack + ;; some standard editing functions + (substitute-key-definition 'self-insert-command 'org-self-insert-command + org-mode-map global-map) + (substitute-key-definition 'delete-char 'org-delete-char + org-mode-map global-map) + (substitute-key-definition 'delete-backward-char 'org-delete-backward-char + org-mode-map global-map) + (define-key org-mode-map "|" 'self-insert-command)) + (defun org-shiftcursor-error () "Throw an error because Shift-Cursor command was applied in wrong context." (error "This command is only active in tables and on headlines.")) @@ -7173,9 +7672,18 @@ the automatic table editor has been turned off." "Call `org-table-next-row' or `newline'." (interactive "P") (cond - ((org-at-table-p) (org-table-next-row)) + ((org-at-table-p) + (org-table-justify-field-maybe) + (org-table-next-row)) (t (newline)))) +(defun org-meta-return (&optional arg) + "Call `org-insert-heading' or `org-table-wrap-region'." + (interactive "P") + (cond + ((org-at-table-p) + (org-table-wrap-region arg)) + (t (org-insert-heading arg)))) ;;; Menu entries @@ -7245,7 +7753,7 @@ the automatic table editor has been turned off." ["Check Deadlines this file" org-check-deadlines t] ["Timeline current file" org-timeline t] "--" - ["Adenda (multifile)" org-agenda-overview t]) + ["Adenda (multifile)" org-agenda t]) ("File List for Agenda") "--" ("Hyperlinks" @@ -7586,6 +8094,7 @@ When ENTRY is non-nil, show the entire entry." (run-hooks 'org-load-hook) +;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd + ;;; org.el ends here -;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd From 70745859f2282195ff7d9d594866c6f9cf237975 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:50:29 +0000 Subject: [PATCH 242/560] version 3.04 --- man/org.texi | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/man/org.texi b/man/org.texi index c35784e2580..3f5e430f5eb 100644 --- a/man/org.texi +++ b/man/org.texi @@ -1,9 +1,9 @@ \input texinfo @c %**start of header -@setfilename ../info/org +@setfilename org @settitle Org Mode Manual -@set VERSION 3.03 +@set VERSION 3.04 @set DATE December 2004 @dircategory Emacs @@ -119,6 +119,7 @@ Tables * Built-in table editor:: Simple tables * table.el:: Complex tables +* orgtbl-mode:: The table editor as minor mode Hyperlinks @@ -202,6 +203,17 @@ different levels and in different ways, for example @r{@bullet{} as a full agenda and planner with deadlines and work scheduling} @end example +The Org-mode table editor can be used integrated into any major mode +by activating the minor Ortbl-mode. + +There is a website for Org-mode which provides links to the newest +version of Org-mode, as well as additional information, screen shots +and example files. This page is located at +@uref{http://www.astro.uva.nl/~dominik/Tools/org/}. + + +@page + @node Installation, , Summary, Introduction @section Installation @cindex installation @@ -223,12 +235,13 @@ Then copy the following lines into @file{.emacs}. The last two lines define @emph{global} keys for the commands @command{org-store-link} and @command{org-agenda} - please choose suitable keys yourself. -@c FIXME: autoloads not necessary when part of emacs @lisp (autoload 'org-mode "org" "Org mode" t) (autoload 'org-diary "org" "Diary entries from Org mode") (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t) (autoload 'org-store-link "org" "Store a link to the current location" t) +(autoload 'orgtbl-mode "org" "Org tables as a minor mode" t) +(autoload 'turn-on-orgtbl "org" "Org tables as a minor mode") (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) (define-key global-map "\C-cl" 'org-store-link) (define-key global-map "\C-ca" 'org-agenda) @@ -656,6 +669,7 @@ with the Emacs table.el package. @menu * Built-in table editor:: Simple tables * table.el:: Complex tables +* orgtbl-mode:: The table editor as minor mode @end menu @node Built-in table editor, table.el, Tables, Tables @@ -855,7 +869,7 @@ it off with @noindent The only table command which then still works is @kbd{C-c C-c} to do a manual re-align. -@node table.el, , Built-in table editor, Tables +@node table.el, orgtbl-mode, Built-in table editor, Tables @section The @file{table.el} package @kindex C-c C-c @cindex table editor, table.el @@ -879,6 +893,20 @@ format. See the documentation string of the command possible. @end table +@node orgtbl-mode, , table.el, Tables +@section The Orgtbl minor mode +@cindex orgtbl-mode +@cindex Minor mode for tables + +If you like the intuitive way the Org-mode table editor works, you +might want to use it also in other modes like text-mode or mail-mode. +The minor mode Orgtbl-mode make this possible. You can always toggle +the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for +example in mail mode, use +@lisp +(add-hook 'mail-mode-hook 'turn-on-orgtbl) +@end lisp + @node Hyperlinks, Timestamps, Tables, Top @chapter Hyperlinks @cindex hyperlinks @@ -1084,7 +1112,7 @@ example: @cindex deadline If a time stamp is preceded by the word @samp{DEADLINE:}, the task (most likely a TODO item) is supposed to be finished on that date, and -it will be listed then In addition, the compilation for the +it will be listed then. In addition, the compilation for the @emph{current day} will carry a warning about the approaching or missed deadline, starting @code{org-deadline-warning-days} before the due date, and continuing until the entry is marked DONE. An example: From a92f67e14e1c4cec0871acb3bb9fbfe8cf235261 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 10:50:53 +0000 Subject: [PATCH 243/560] Fixed typo in setfilename --- man/org.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/org.texi b/man/org.texi index 3f5e430f5eb..d461e9c1020 100644 --- a/man/org.texi +++ b/man/org.texi @@ -1,6 +1,6 @@ \input texinfo @c %**start of header -@setfilename org +@setfilename ../info/org @settitle Org Mode Manual @set VERSION 3.04 From a25f766aa391b708a1e98e8471d767358048cac3 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 14 Jan 2005 12:11:15 +0000 Subject: [PATCH 244/560] (Fposn_at_x_y): Add optional arg WHOLE. --- src/keyboard.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 4a99ee1bc19..fb52c7e9f61 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -6846,7 +6846,7 @@ input_available_signal (signo) #else SIGNAL_THREAD_CHECK (signo); #endif - + if (input_available_clear_time) EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); @@ -10518,17 +10518,19 @@ The elements of this list correspond to the arguments of return Flist (sizeof (val) / sizeof (val[0]), val); } -DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 3, 0, +DEFUN ("posn-at-x-y", Fposn_at_x_y, Sposn_at_x_y, 2, 4, 0, doc: /* Return position information for pixel coordinates X and Y. By default, X and Y are relative to text area of the selected window. Optional third arg FRAME_OR_WINDOW non-nil specifies frame or window. +If optional fourth arg WHOLE is non-nil, X is relative to the left +edge of the window. The return value is similar to a mouse click position: (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) The `posn-' functions access elements of such lists. */) - (x, y, frame_or_window) - Lisp_Object x, y, frame_or_window; + (x, y, frame_or_window, whole) + Lisp_Object x, y, frame_or_window, whole; { if (NILP (frame_or_window)) frame_or_window = selected_window; @@ -10541,7 +10543,10 @@ The `posn-' functions access elements of such lists. */) w = XWINDOW (frame_or_window); XSETINT (x, (WINDOW_TO_FRAME_PIXEL_X (w, XINT (x)) - + window_box_left_offset (w, TEXT_AREA))); + + (NILP (whole) + ? window_box_left_offset (w, TEXT_AREA) + : - (WINDOW_LEFT_SCROLL_BAR_COLS (w) + * WINDOW_FRAME_COLUMN_WIDTH (w))))); XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XINT (y))); frame_or_window = w->frame; } @@ -10569,7 +10574,7 @@ The `posn-' functions access elements of such lists. */) tem = Fpos_visible_in_window_p (pos, window, Qt); if (!NILP (tem)) - tem = Fposn_at_x_y (XCAR (tem), XCAR (XCDR (tem)), window); + tem = Fposn_at_x_y (XCAR (tem), XCAR (XCDR (tem)), window, Qnil); return tem; } From 88948d55b15b3f6e5730ea69e597818c8b01103f Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 14 Jan 2005 12:15:17 +0000 Subject: [PATCH 245/560] *** empty log message *** --- lispref/ChangeLog | 2 ++ src/ChangeLog | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 3e2849ea859..635ca735e55 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,5 +1,7 @@ 2005-01-14 Kim F. Storm + * commands.texi (Accessing Events): Add WHOLE arg to posn-at-x-y. + * text.texi (Links and Mouse-1): Fix string and vector item. 2005-01-13 Richard M. Stallman diff --git a/src/ChangeLog b/src/ChangeLog index ae4c8fd4c5d..e707c61b83f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-14 Kim F. Storm + + * keyboard.c (Fposn_at_x_y): Add optional arg WHOLE. + 2005-01-13 Richard M. Stallman * keymap.c (Fcurrent_active_maps): Ignore Voverriding_local_map From cfa284c450931ec8b27c34022b016d96dc3014fd Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 14 Jan 2005 12:15:33 +0000 Subject: [PATCH 246/560] (Accessing Events): Add WHOLE arg to posn-at-x-y. --- lispref/commands.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lispref/commands.texi b/lispref/commands.texi index fb0eabe272b..b1bc552db36 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -1843,12 +1843,15 @@ This function returns a position list for position @var{pos} in @var{window}. @end defun -@defun posn-at-x-y x y &optional frame-or-window +@defun posn-at-x-y x y &optional frame-or-window whole This function returns position information corresponding to pixel coordinates @var{x} and @var{y} in a specified frame or window, @var{frame-or-window}, which defaults to the selected window. The coordinates @var{x} and @var{y} are relative to the frame or window used. +If @var{whole} is @code{nil}, the coordinates are relative +to the window text area, otherwise they are relative to +the entire window area including scroll bars, margins and fringes. @end defun These functions are useful for decoding scroll bar events. From 81bdc71881257942f735f888eba45830e30032a0 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 13:05:35 +0000 Subject: [PATCH 247/560] Fixed a few things in the file herder which I accidentially change during the last update. --- lisp/textmodes/org.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 2488ad7fcf2..e0514f66afc 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -1,14 +1,14 @@ ;; org.el --- Outline-based notes management and organizer ;; Carstens outline-mode for keeping track of everything. -;; Copyright (c) 2004 Free Software Foundation -;; +;; Copyright (c) 2003, 2004 Free Software Foundation + ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 3.04 (internal CVS version is $Revision: 1.106 $) -;; +;; Version: 3.04 + ;; This file is part of GNU Emacs. -;; + ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) From 7d7dac8c936dfd193f3aee9e65554ba3c5380d0d Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 14 Jan 2005 13:08:16 +0000 Subject: [PATCH 248/560] *** empty log message *** --- lisp/ChangeLog | 1 + lisp/textmodes/org.el | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4cc298e29a1..5bc8aada7de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,7 @@ * textmodes/org.el (org-show-following-heading): New option. (org-show-hierarchy-above): Use `org-show-following-heading'. + (org-cycle): Documentation fix. * textmodes/org.el (orgtbl-optimized): New option (orgtbl-mode): New command, a minor mode. diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index e0514f66afc..80ff7637365 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -1563,7 +1563,7 @@ The following commands are available: (defvar org-cycle-global-status nil) (defvar org-cycle-subtree-status nil) (defun org-cycle (&optional arg) - "Visibility cycling for outline(-minor)-mode. + "Visibility cycling for org-mode. - When this function is called with a prefix argument, rotate the entire buffer through 3 states (global cycling) From 64819146e92620ce3327204d53969e49845770e0 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 15 Jan 2005 02:30:02 +0000 Subject: [PATCH 249/560] Changes from arch/CVS synchronization --- man/reftex.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man/reftex.texi b/man/reftex.texi index d0bfe59e47f..b3c2f25c58a 100644 --- a/man/reftex.texi +++ b/man/reftex.texi @@ -5891,3 +5891,6 @@ released on 7 Jan 1997. @contents @bye +@ignore + arch-tag: 1e055774-0576-4b1b-b47f-550d0961fd43 +@end ignore From 3c86abc0b617b1984a47e4245f56ee078679ae5c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 11:48:58 +0000 Subject: [PATCH 250/560] Fix commit conflicts. --- man/ChangeLog | 7 ------- 1 file changed, 7 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 6d4265195f8..f0c5307a52b 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -117,10 +117,6 @@ * basic.texi (Moving Point): C-e now runs move-end-of-line. (Undo): Doc undo-outer-limit. -2004-12-11 Richard M. Stallman - - * Makefile.in (MAKEINFO): Add --force. - 2004-12-20 Jay Belanger * calc.texi (Types Tutorial): Emphasize that you can't divide by @@ -146,7 +142,6 @@ the standard "The GNU Emacs Manual" in fifth argument of @xref's. (Dealing with HTTP documents): @inforef->@xref. ->>>>>>> 1.412 2004-12-15 Juri Linkov * mark.texi (Transient Mark, Mark Ring): M-< and other @@ -163,7 +158,6 @@ * calc.texi: Fix some TeX definitions. ->>>>>>> 1.407 2004-12-12 Juri Linkov * misc.texi (FFAP): Add C-x C-r, C-x C-v, C-x C-d, @@ -177,7 +171,6 @@ * mark.texi (Marking Objects): Marking commands also extend the region when mark is active in Transient Mark mode. ->>>>>>> 1.403 2004-12-09 Luc Teirlinck * reftex.texi (Imprint): Remove erroneous @value's. From 8b3a75ac8f9fb619b3136a811b34e9d36ec4e2b8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 12:39:25 +0000 Subject: [PATCH 251/560] (ebrowse-class-in-tree): Return the tail of the tree rather than the element found, thus enabling the tree to be setcar'd. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/ebrowse.el | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5bc8aada7de..567b5c5c9d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-15 Alan Mackenzie + + * ebrowse.el (ebrowse-class-in-tree): Return the tail of the tree + rather than the element found, thus enabling the tree to be + setcar'd. + 2005-01-14 Carsten Dominik * textmodes/org.el (org-show-following-heading): New option. diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 478ce403b31..bf11ea28514 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -780,16 +780,16 @@ The class tree is found in the buffer-local variable `ebrowse--tree-obarray'." (defun ebrowse-class-in-tree (class tree) "Search for a class with name CLASS in TREE. -Return the class found, if any. This function is used during the load -phase where classes appended to a file replace older class -information." +If CLASS is found, return the tail of TREE starting at CLASS. This function +is used during the load phase where classes appended to a file replace older +class information." (let ((tclass (ebrowse-ts-class class)) found) (while (and tree (not found)) - (let ((root (car tree))) - (when (string= (ebrowse-qualified-class-name (ebrowse-ts-class root)) + (let ((root-ptr tree)) + (when (string= (ebrowse-qualified-class-name (ebrowse-ts-class (car root-ptr))) (ebrowse-qualified-class-name tclass)) - (setq found root)) + (setq found root-ptr)) (setq tree (cdr tree)))) found)) @@ -903,10 +903,10 @@ and TREE is a list of `ebrowse-ts' structures forming the class tree." (let ((gc-cons-threshold 2000000)) (while (not (progn (skip-chars-forward " \t\n\r") (eobp))) (let* ((root (read (current-buffer))) - (old-root (ebrowse-class-in-tree root tree))) + (old-root-ptr (ebrowse-class-in-tree root tree))) (ebrowse-show-progress "Reading data" (null tree)) - (if old-root - (setf (car old-root) root) + (if old-root-ptr + (setcar old-root-ptr root) (push root tree))))) (garbage-collect) (list header tree))) From f79b331a48a9e8391e30d3cd624afc20f1b136b6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 12:46:54 +0000 Subject: [PATCH 252/560] (woman-dired-define-key-maybe): If KEY is undefined, lookup-key might return nil; handle that. --- lisp/ChangeLog | 5 +++++ lisp/woman.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 567b5c5c9d5..9339bc1f87b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-15 Stephen Eglen (tiny change) + + * woman.el (woman-dired-define-key-maybe): If KEY is undefined, + lookup-key might return nil; handle that. + 2005-01-15 Alan Mackenzie * ebrowse.el (ebrowse-class-in-tree): Return the tail of the tree diff --git a/lisp/woman.el b/lisp/woman.el index 610590a2972..e4b29374a05 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1491,7 +1491,8 @@ Also make each path-info component into a list. (defsubst woman-dired-define-key-maybe (key) "If KEY is undefined in Dired, bind it to command `woman-dired-find-file'." - (if (eq (lookup-key dired-mode-map key) 'undefined) + (if (or (eq (lookup-key dired-mode-map key) 'undefined) + (null (lookup-key dired-mode-map key))) (woman-dired-define-key key))) (defun woman-dired-define-keys () From a7ed85f05bac17e3b52cb49853b3ad43e5dd2795 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 13:06:55 +0000 Subject: [PATCH 253/560] (type-break-file-name): Doc update as per the above. (type-break-mode, type-break-file-time, type-break-file-keystroke-count) (type-break-choose-file): Don't store data in or load data from the file if none specified. --- lisp/ChangeLog | 8 ++++++++ lisp/type-break.el | 26 +++++++++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9339bc1f87b..324c00cd3ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-01-15 Jorgen Schaefer (tiny change) + + * type-break.el (type-break-mode, type-break-file-time) + (type-break-file-keystroke-count, type-break-choose-file): Don't + store data in or load data from the file if type-break-file-name + is nil. + (type-break-file-name): Doc update as per the above. + 2005-01-15 Stephen Eglen (tiny change) * woman.el (woman-dired-define-key-maybe): If KEY is undefined, diff --git a/lisp/type-break.el b/lisp/type-break.el index 7a387bfe062..3a0b8b5adcc 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -229,7 +229,8 @@ key is pressed." :group 'type-break) (defcustom type-break-file-name (convert-standard-filename "~/.type-break") - "*Name of file used to save state across sessions." + "*Name of file used to save state across sessions. +If this is nil, no data will be saved across sessions." :type 'file :group 'type-break) @@ -402,7 +403,9 @@ problems." (type-break-keystroke-reset) (type-break-mode-line-countdown-or-break nil) - (setq type-break-time-last-break (type-break-get-previous-time)) + (setq type-break-time-last-break + (or (type-break-get-previous-time) + (current-time))) ;; schedule according to break time from session file (type-break-schedule @@ -434,11 +437,12 @@ problems." (type-break-mode-line-countdown-or-break nil) (type-break-cancel-schedule) (do-auto-save) - (with-current-buffer (find-file-noselect type-break-file-name - 'nowarn) - (set-buffer-modified-p nil) - (unlock-buffer) - (kill-this-buffer)) + (when type-break-file-name + (with-current-buffer (find-file-noselect type-break-file-name + 'nowarn) + (set-buffer-modified-p nil) + (unlock-buffer) + (kill-this-buffer))) (and (interactive-p) (message "Type Break mode is disabled"))))) type-break-mode) @@ -498,7 +502,8 @@ variable of the same name." (defun type-break-file-time (&optional time) "File break time in `type-break-file-name', unless the file is locked." - (if (not (stringp (file-locked-p type-break-file-name))) + (if (and type-break-file-name + (not (stringp (file-locked-p type-break-file-name)))) (with-current-buffer (find-file-noselect type-break-file-name 'nowarn) (let ((inhibit-read-only t)) @@ -509,7 +514,8 @@ variable of the same name." (defun type-break-file-keystroke-count () "File keystroke count in `type-break-file-name', unless the file is locked." - (if (not (stringp (file-locked-p type-break-file-name))) + (if (and type-break-file-name + (not (stringp (file-locked-p type-break-file-name)))) ;; Prevent deactivation of the mark in some other buffer. (let (deactivate-mark) (with-current-buffer (find-file-noselect type-break-file-name @@ -536,6 +542,8 @@ return TIME, else return nil." (defun type-break-choose-file () "Return file to read from." (cond + ((not type-break-file-name) + nil) ((and (file-exists-p type-break-auto-save-file-name) (file-readable-p type-break-auto-save-file-name)) type-break-auto-save-file-name) From 3ac99cedff5d00350c4a031f07fe650cbd340e35 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 13:13:13 +0000 Subject: [PATCH 254/560] Mention the new feature of type-break whereby type-break-file-name can be set to nil. --- etc/NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 921c598f67a..6fde609a2be 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -106,6 +106,12 @@ escape-glyph face. character, unless the new user variable `show-nonbreak-escape' is set to nil. +--- +** The type-break package now allows `type-break-file-name' to be nil +and if so, doesn't store any data across sessions. This is handy if +you don't want the .type-break file in your home directory or are +annoyed by the need for interaction when you kill Emacs. + ** display-battery has been replaced by display-battery-mode. ** calculator.el now has radix grouping mode, which is available when From 8905403474b5dab954f58f2be0ca3e3095bbec75 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 13:52:26 +0000 Subject: [PATCH 255/560] Correct translation and the Dutch text (typos). More consistent use of terminology. --- etc/TUTORIAL.nl | 1030 ++++++++++++++++++++++++----------------------- 1 file changed, 519 insertions(+), 511 deletions(-) diff --git a/etc/TUTORIAL.nl b/etc/TUTORIAL.nl index 989f8334fd1..d02ddce4eb2 100644 --- a/etc/TUTORIAL.nl +++ b/etc/TUTORIAL.nl @@ -1,35 +1,35 @@ -Copyright (c) 1985 Free Software Foundation, Inc; Zie de voorwaarden onderaan. -Je leest nu de Emacs uitleg, zoals vertaald door Pieter Schoenmakers. +Copyright (c) 1985, 2004, 2005 Free Software Foundation, Inc; Zie de voorwaarden onderaan. +Je leest nu de Emacs-inleiding, zoals vertaald door Pieter Schoenmakers. -De meeste Emacs commando's gebruiken de CONTROL toets (soms CTRL of CTL -genaamd) en/of de META toets (soms genaamd EDIT of ALT). In plaats van +De meeste Emacs-commando's gebruiken de CONTROL-toets (soms CTRL of CTL +genaamd) en/of de META-toets (soms genaamd EDIT of ALT). In plaats van steeds de volledige naam te noemen, gebruiken we de volgende afkortingen: - C- betekent: houd de CONTROL toets ingedrukt en type de toets - Dus C-f wordt: houd de CONTROL toets ingedrukt en type f. - M- betekent: houd de META, EDIT of ALT toets ingedrukt en type de + C- betekent: houd de CONTROL-toets ingedrukt en tik de toets + Dus C-f wordt: houd de CONTROL-toets ingedrukt en tik f. + M- betekent: houd de META-, EDIT- of ALT-toets ingedrukt en tik de toets . Als er geen toets META, EDIT of ALT is, kun je ook - eerst de ESC toets typen, gevolgd door . We refereren aan + eerst de ESC-toets tikken, gevolgd door . We verwijzen naar de ESC toets als . -BELANGRIJK: om Emacs te verlaten, type C-x C-c (twee tekens). -De tekens ">>" tegen de linker kantlijn nodigen je uit om een +BELANGRIJK: om Emacs te verlaten, tik C-x C-c (twee tekens). +De tekens ">>" tegen de linkerkantlijn nodigen je uit om een bepaald commando te proberen. Bijvoorbeeld: <> ->> Type nu C-v (volgend scherm) om naar het volgende scherm te gaan. - (Geef nu het commando door de control toets ingedrukt te houden - terwijl je de v typt.) +>> Tik nu C-v (volgend scherm) om naar het volgende scherm te gaan. + (Geef nu het commando door de CONTROL-toets ingedrukt te houden + terwijl je de v tikt.) Vanaf nu moet je dit steeds herhalen als je klaar bent met het lezen van een scherm. -Merk op dat er een tweeregelige overlap is als je van een scherm naar -het volgende scherm gaat; dit zorgt voor continuïteit bij het lezen van +Merk op dat er een overlapping van twee regels is als je van een scherm naar +het volgende gaat; dat zorgt voor continuïteit bij het lezen van de tekst. -Het eerste wat je moet weten is hoe je naar verschillende plaatsen in de -tekst kunt bewegen. Je weet al hoe je een scherm vooruit moet gaan: met -C-v. Om een scherm terug te gaan, type M-v (houd de META toets ingedrukt -en type v, of type v als je geen META, EDIT of ALT toets hebt). +Het eerste wat je moet weten, is hoe je je naar verschillende plaatsen in de +tekst kan bewegen. Je weet al hoe je een scherm vooruit moet gaan: met +C-v. Om een scherm terug te gaan, tik je M-v (houd de META-toets ingedrukt +en tik v, of tik -v als je geen META, EDIT of ALT toets hebt). >> Probeer nu een paar keer M-v, steeds gevolgd door C-v. @@ -43,22 +43,24 @@ De volgende commando's zijn handig om volledige schermen te bekijken: M-v ga een scherm terug C-l maak het scherm schoon en teken alle tekst opnieuw, waarbij de regel waarop de cursor - staat op het midden van het scherm terecht - komt. (C-l is control-L, niet control-1.) + staat, op het midden van het scherm terecht + komt. (C-l is CONTROL-L, niet CONTROL-1.) ->> Kijk waar de cursor is en onthoud de tekst in zijn omgeving. - Type C-l. - Zoek de cursor en merk op dat 'ie nog steeds bij dezelfde tekst staat. +>> Kijk waar de cursor staat, en onthoud de tekst errond. + Tik C-l. + Zoek de cursor en merk op dat hij nog steeds bij dezelfde tekst staat. * BASISCOMMANDO'S CURSORBEWEGINGEN ---------------------------------- -Het is handig om per scherm te bewegen, maar hoe beweeg je nu +Het is handig om je per scherm te bewegen, maar hoe beweeg je je nu naar een specifieke plaats op het scherm? -Er is een aantal manieren waarop je dit kunt doen. De basismanier is -m.b.v de commando's C-p, C-b, C-f en C-n. Elk van deze commando's +Er is een aantal manieren waarop je dit kan doen. Je kan de +pijltjestoetsen gebruiken, maar het is efficïenter om je handen in de +standaardhouding te laten, en de commando's C-p, C-b, C-f en C-n te +gebruiken. Elk van deze commando's verplaatst de cursor precies een regel of teken in een bepaalde richting op het scherm. Hier volgt een figuur met de vier commando's en de richting waarin ze de cursor bewegen: @@ -71,85 +73,86 @@ richting waarin ze de cursor bewegen: : volgende regel, C-n ->> Verplaats, m.b.v. C-n of C-p, de cursor naar de middelste regel van - de figuur. Type dan C-l om de hele figuur in het midden van het +>> Verplaats, met C-n of C-p, de cursor naar de middelste regel van + de figuur. Tik dan C-l om de hele figuur in het midden van het centrum te plaatsen. Met een beetje kennis van het Engels zijn deze commando's gemakkelijk te -onthouden: de P komt van previous (vorige), de N van next (volgende), de -B van backward (achteruit) en de F van forward (vooruit). Dit zijn de -basiscommando's om de cursor te bewegen, dus je zult ze CONTINUE -gebruiken: Het is slim als je ze nu leert te gebruiken. +onthouden: de p komt van "previous" (vorige), de n van "next" (volgende), de +b van "backward" (achteruit) en de f van "forward" (vooruit). Dit zijn de +basiscommando's om de cursor te bewegen, dus je zult ze VOORTDUREND +gebruiken: het is vooruitziend als je ze nu leert te gebruiken. ->> Type een paar keer C-n om de cursor op deze regel te krijgen. +>> Tik een paar keer C-n om de cursor op deze regel te krijgen. ->> Beweeg binnen de regel met C-f (herhaaldelijk) en terug omhoog met C-p +>> Beweeg je binnen de regel met C-f (herhaaldelijk) en terug omhoog met C-p. Let op wat C-p doet als de cursor midden in een regel staat. -Elke regel eindigt met een Newline teken (het Engelse `new line' betekent -`nieuwe regel'); dit teken scheidt elke regel van de volgende. De laatste -regel in een bestand moet eigenlijk ook met een Newline eindigen (maar dat -is niet noodzakelijk voor Emacs ). +Elke regel eindigt met een Newline-teken (het Engelse "new line" betekent +"nieuwe regel"); dit teken scheidt elke regel van de volgende. De laatste +regel in een bestand zou eigenlijk ook met een Newline moeten eindigen (maar dat +is niet noodzakelijk voor Emacs). ->> Type het commando C-b terwijl de cursor aan het begin van een regel - staat. De cursor zal naar het eind van de vorige regel bewegen, +>> Probeer C-b aan het begin van een regel. + De cursor zal zich naar het eind van de vorige regel bewegen, omdat je achteruit over het Newline teken gaat. -Net als C-b kan ook C-f over Newline tekens heen bewegen. +Net als C-b kan ook C-f zich over Newline-tekens heen bewegen. ->> Type nog een aantal keren het commando C-b, zodat je door krijgt waar de +>> Tik nog een aantal keren het commando C-b, zodat je een gevoel krijgt waar de cursor is. - Type dan enkele keren C-f om de cursor terug naar het einde van de regel + Tik dan enkele keren C-f om de cursor terug naar het einde van de regel te bewegen. - Een C-f commnado beweegt de cursor dan naar de volgende regel. + Een verder C-f commando beweegt de cursor dan naar de volgende regel. -Wanneer je de cursor voorbij het begin of het einde van het scherm beweegt -zal de tekst over het scherm heen schuiven. Dit heet `scrollen', of -`schuiven' in goed Nederlands. Door te scrollen zorgt Emacs ervoor dat de -cursor de gewenste beweging kan doen zonder dat de cursor van het scherm +Wanneer je de cursor voorbij het begin of het einde van het scherm beweegt, +zal de tekst over het scherm heen schuiven. Dit heet "scrollen", of +"schuiven" in goed Nederlands. Door te scrollen zorgt Emacs ervoor dat de +cursor de gewenste beweging kan maken zonder dat de cursor van het scherm af beweegt. >> Probeer de cursor voorbij de onderkant van het scherm te bewegen met C-n en zie wat er gebeurt. -Als beweging op letterteken te langzaam gaat, kun je de cursor ook per -woord bewegen. M-f (Meta-f) beweegt de cursor een woord vooruit en M-b +Als de beweging per teken te langzaam gaat, kan je de cursor ook per +woord bewegen. M-f (META-f) beweegt de cursor een woord vooruit en M-b een woord achteruit. ->> Type enkele keren M-f en M-b. +>> Tik enkele keren M-f en M-b. -Als je midden in een woord staat beweegt M-f de cursor naar het eind van -het woord. Als je op een witte ruimte tussen woorden staat beweegt M-f de +Als je midden in een woord staat, beweegt M-f de cursor naar het eind van +het woord. Als je op een witte ruimte tussen twee woorden staat, beweegt M-f de cursor naar het eind van het volgende woord. Het commando M-b beweegt -analoog, de andere kant op. +de cursor analoog de andere kant op. ->> Type enkele keren M-f en M-b en daar tussendoor enkele keren C-f en C-b, +>> Tik enkele keren M-f en M-b en daar tussendoor een paar maal C-f en C-b, zodat je ziet wat M-f en M-b doen vanaf bepaalde plaatsen in een woord en tussen twee woorden. -Merk op dat er een analogie zit tussen enerzijds C-f en C-b en -anderzijds M-f en M-b. Het is bij veel commando's zo dat Meta tekens +Merk op dat er een analogie bestaat tussen enerzijds C-f en C-b en +anderzijds M-f en M-b. Het is bij veel commando's zo dat META-tekens gebruikt worden om iets te doen in eenheden van de taal (woorden, -zinnen, alinea's) terwijl Control tekens te maken hebben met dingen die -los staan van wat je aan het editten bent (tekens, regels, etc). +zinnen, alinea's) terwijl Control-tekens te maken hebben met dingen die +los staan van wat je aan het editeren bent (tekens, regels, enz.). Deze analogie gaat ook op voor regels en zinnen: C-a en C-e bewegen de cursor naar het begin of eind van een regel, terwijl met M-a, -respectievelijk M-e, de cursor naar het begin of eind van een zin gaat. +respectievelijk M-e, de cursor naar het begin, respectievelijk het eind, +van een zin gaat. ->> Type enkele keren C-a en dan enkele keren C-e. - Type enkele keren M-a en dan enkele keren M-e. +>> Tik enkele keren C-a, en dan een enkele keren C-e. + Tik een paar maal M-a, en dan enkele keren M-e. -Zie hoe herhaalde C-a commando's niets doen, terwijl herhaalde M-a -commando's steeds een zin terug bewegen. Alhoewel ze niet volledig -overeenkomen is het gedrag van allebei niet onnatuurlijk. +Bemerk hoe herhaalde C-a commando's niets doen, terwijl herhaalde M-a +commando's de cursor steeds een zin achteruit bewegen. Alhoewel ze niet volledig +overeenkomen, is het gedrag van beide heel natuurlijk. -De plaats van de cursor in de tekst wordt `punt' genoemd (zonder -lidwoord, `point' in het Engels). Anders gezegd: de cursor laat op het -scherm de plek zien waarop punt in de tekst staat. +De plaats van de cursor in de tekst wordt "punt" genoemd (zonder +lidwoord, "point" in het Engels). Anders gezegd: de cursor laat op het +scherm de plek zien waar punt in de tekst staat. -Nu volgt een samenvatting van eenvoudige cursorbewegingsoperaties, -inclusief die commando's die per woord of zin bewegen: +Nu volgt een samenvatting van eenvoudige cursorbewegingen, +met inbegrip van de commando's die de cursor per woord of zin bewegen: C-f ga een teken vooruit C-b ga een teken achteruit @@ -167,439 +170,444 @@ inclusief die commando's die per woord of zin bewegen: M-e ga vooruit naar het eind van de zin >> Probeer al deze commando's een paar keer als oefening. - Deze commando's worden het frequentst gebruikt. + Deze commando's worden het vaakst gebruikt. -Er zijn nog twee belangrijk cursorbewegingsoperaties: M-< -(Meta kleiner-dan) beweegt de cursor naar het begin van het bestand, -en M-> (Meta groter-dan) beweegt de cursor naar het eind. +Er zijn nog twee belangrijke cursorbewegingen: M-< +(META kleiner-dan) beweegt de cursor naar het begin van het bestand, +en M-> (META groter-dan) beweegt hem naar het eind. -Op de meeste toetsenborden zit de '<' boven de komma, zodat je de Shift -toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om het '<' -teken in te typen. Op deze toetsenborden moet je ook de shift gebruiken -om M-< in te typen: zonder shift zou je M-, (Meta komma) typen. +Op de meeste toetsenborden zit de '<' boven de komma, zodat je de +Shift-toets (ook wel bekend als de hoofdlettertoets) moet gebruiken om het +'<'-teken in te tikken. Op deze toetsenborden moet je ook de shift +gebruiken om M-< in te tikken: zonder shift zou je M-, (META komma) tikken. ->> Type nu M-< om naar het begin van dit bestand te gaan. +>> Tik nu M-< om naar het begin van dit bestand te gaan. Gebruik daarna C-v om hier weer terug te komen. ->> Type nu M-> om naar het eind van het bestand te springen. +>> Tik nu M-> om naar het eind van het bestand te springen. Gebruik daarna M-v om hier weer terug te komen. -Als je toetsenbord pijltjestoetsen heeft kun je ook die gebruiken om de -cursor te verplaatsen. We raden je aan om C-b, C-f, C-n en C-p op zijn -minst te leren, om drie redenen. Ten eerste werken ze op alle +Als je toetsenbord pijltjestoetsen heeft, kan je die ook gebruiken om de +cursor te verplaatsen. We raden je aan om C-b, C-f, C-n en C-p +te leren, om drie redenen. Ten eerste werken ze op alle toetsenborden, ook die zonder pijltjestoetsen. Ten tweede zul je merken -dat, wanneer je eenmaal wat ervaring hebt opgedaan in het omgaan met -Emacs, het gebruik van deze CTRL tekens sneller gaat dan het werken met -pijltjestoetsen (omdat je handen in de typehouding kunnen blijven). Ten -derde, als je eenmaal gewend bent aan deze commando's met CTRL tekens, -kun je makkelijk andere geavanceerde cursorbewegingscommando's leren. +dat wanneer je eenmaal wat ervaring hebt opgedaan in de omgang met +Emacs, het gebruik van de CTRL-tekens sneller is dan werken met de +pijltjestoetsen (omdat je handen in de normale tikpositie kunnen blijven). Ten +derde, als je eenmaal gewend bent aan deze commando's met CTRL-tekens, +kan je makkelijk andere gevorderde cursorbewegingscommando's leren. -De meeste Emacs commando's accepteren een numeriek argument. Voor de +De meeste Emacs-commando's accepteren een numeriek argument. Voor de meeste commando's is dit argument het aantal keren dat het commando -herhaald moet worden. Je geeft dit numerieke argument aan, dat vooraf -gegaan wordt door het commando C-u, de cijfers van het getal te typen. -Als je toetsenbord een META (of EDIT of ALT) toets heeft, is er ook -een andere manier om het getal aan te geven: type de cijfers terwijl +herhaald moet worden. Je geeft dit numerieke argument aan met C-u en +vervolgens de cijfers van het getal, vóór het commando. +Als je toetsenbord een META- (of EDIT- of ALT-) toets hebt, is er ook +een andere manier om het getal aan te geven: tik de cijfers terwijl je de META toets ingedrukt houdt. We raden je aan de C-u manier te -leren omdat die werkt op elk willekeurig toetsenbord. +leren omdat die beschikbaar is op elke terminal. Bijvoorbeeld, C-u 8 C-f beweegt de cursor 8 plaatsen naar voren. ->> Probeer eens om met C-n of C-p en één numeriek argument de cursor +>> Probeer eens om met C-n of C-p en een numeriek argument de cursor met slechts een commando naar een regel in de buurt van deze zin te bewegen. Voor de meeste commando's is het numerieke argument het aantal keren dat -het commando herhaald moet worden. Voor sommige commando's betekent het -echter iets anders, en C-v en M-v vallen hier ook onder. Met een numeriek +het commando herhaald moet worden. Voor sommige commando's betekent het +echter iets anders. Verschillende commando's (die je totnogtoe niet +geleerd hebt) gebruiken het als een vlag -- de aanwezigheid van een +prefix-argument, ongeacht zijn waarde, maakt dat het commando iets anders +doet. + +C-v en M-v vormen een andere uitzondering. Met een numeriek argument verschuiven deze commando's de tekst het aangegeven aantal regels in plaats van (bijna) een heel scherm. Bijvoorbeeld, C-u 4 C-v verschuift de tekst 4 regels. >> Probeer nu C-u 8 C-v. -Als het goed is is de tekst daarmee 8 regels opgeschoven. Als je weer -terug omlaag wil scrollen kun je een argument aan M-v geven. +Daarmee zou je tekst 8 regels opgeschoven moeten zijn. Als je terug +omlaag wil scrollen, kan je M-v een argument geven. -Als je een windowing systeem gebruikt, zoals X Windows, dan zou je een -lange rechthoek moeten zien aan de linkerkant van het Emacs window. Deze -rechthoek heet een scrollbar (misschien is `verschuifbalk' een goede -vertaling). Je kunt de tekst scrollen door met de muis in de scrollbar te -klikken. +Als je een scherm met vensters gebruikt, zoals X Windows of MS-Windows, +zou je een grote rechthoek moeten zien aan de linkerkant van het +Emacs-venster. Deze rechthoek heet een schuifbalk ("scrollbar"). Je kan +de tekst scrollen door met de muis in de schuifbalk te klikken. ->> Klik met de middelste muisknop bovenaan het donkere gebied in de - scrollbar. Dit zou de tekst moeten scrollen naar een positie die +>> Klik met de middelste muisknop bovenaan het heldere gebied in de + schuifbalk. Dit zou de tekst moeten verschuiven naar een positie die afhankelijk is van hoe hoog of laag je klikt. ->> Beweeg de muis heen en weer terwijl je de middelste muisknop ingedrukt - houdt. Je zult zien dat de tekst met de muis mee heen en weer scrollt. +>> Beweeg de muis op en neer terwijl je de middelste muisknop ingedrukt + houdt. Je zal zien dat de tekst met de muis mee heen en weer scrollt. * ALS EMACS HANGT ----------------- -Als Emacs niet meer op commando's reageert kun je haar veilig onderbreken -door C-g te typen. Je kunt C-g gebruiken om een commando te stoppen als -het te lang duurt om het uit te voeren. +Als Emacs niet meer op commando's reageert, kan je het veilig onderbreken +door C-g te tikken. Je kan C-g gebruiken om een commando te stoppen als +het te lang duurt om uit te voeren. -Je kunt C-g ook gebruiken om een numeriek argument weg te gooien of -om het begin van een commando dat je niet wilt afmaken te vergeten. +Je kan C-g ook gebruiken om een numeriek argument te verwijderen of om het +begin van een commando dat je niet wilt afmaken, te verwijderen. ->> Type nu C-u 100 om een numeriek argument te maken met de waarde 100, en - type dan C-g. Type vervolgens C-f. Als het goed is is de cursor maar - één positie verplaatst, omdat je het argument weggegooid hebt met C-g. +>> Tik nu C-u 100 om een numeriek argument te maken met de waarde 100, en + tik dan C-g. Tik vervolgens C-f. Het zou de cursor maar + één positie mogen verplaatsen, omdat je het argument verwijderd hebt met C-g. -Als je per ongeluk een typt kun je dat ongedaan maken met het +Als je per ongeluk een tikt, kan je dat ongedaan maken met het commando C-g. * ONMOGELIJKE COMMANDO'S ------------------------ -Sommige Emacs commando's zijn onmogelijk gemaakt zodat beginnende -gebruikers ze niet per ongeluk kunnen uitvoeren. +Sommige Emacs-commando's zijn uitgeschakeld zodat beginnende gebruikers ze +niet per ongeluk kunnen uitvoeren. -Als je één van de onmogelijke commando's intypt laat Emacs uitleg zien -over het commando dat je gegeven hebt en vraagt of je het werkelijk uit -wilt voeren. +Als je een van de uitgeschakelde commando's intikt, laat Emacs uitleg zien +over het commando dat je gegeven hebt, en vraagt of je het werkelijk wil +uitvoeren. -Wanneer je het commando echt wilt uitvoeren, type dan Spatie (de -spatiebalk) als antwoord op de vraag. Normaliter wil je het commando niet -uitvoeren en beantwoord je de vraag met "n" (van `no' of `nee'). +Wanneer je het commando echt wil uitvoeren, tik dan Spatie (de +spatiebalk) als antwoord op de vraag. Normaal wil je het commando niet +uitvoeren en beantwoord je de vraag met "n" (van "no" of "nee"). ->> Type C-x C-l (een onmogelijk commando), - en type dan n als antwoord op de vraag. +>> Tik C-x C-l (een uitgeschakeld commando), + en tik dan n als antwoord op de vraag. * VENSTERS ---------- Emacs kan meerdere vensters laten zien, elk venster met zijn eigen tekst. -We zullen later uitleggen hoe je met meerdere vensters om kunt gaan. Op +We zullen later uitleggen hoe je met meerdere vensters om kan gaan. Op dit moment willen we slechts uitleggen hoe je van extra vensters af kunt -komen en terug kunt keren naar simpelweg editten met 1 venster. Het is +komen en terug kan keren naar eenvoudig editeren met één venster. Het is eenvoudig: - C-x 1 een enkel venster (i.e. gooi alle andere vensters weg) + C-x 1 een enkel venster (dat wil zeggen: verwijder alle andere vensters) -Het commando is Control-x gevolgd door het cijfer 1. C-x 1 vergroot het +Het commando is CONTROL-x gevolgd door het cijfer 1. C-x 1 vergroot het venster waar de cursor in staat tot het hele scherm. Alle andere vensters -worden weggegooid. +worden verwijderd. ->> Zet de cursor op deze regel en type C-u 0 C-l. ->> Type nu Control-h k Control-f. - Zie hoe dit venster kleiner wordt, terwijl een nieuw venster verschijnt +>> Zet de cursor op deze regel en tik C-u 0 C-l. +>> Tik nu Control-h k Control-f. + Zie hoe dit venster kleiner is geworden, terwijl een nieuw venster verschijnt om de documentatie van het Control-f commando te laten zien. ->> Type nu C-x 1 en zie het documentatievenster verdwijnen. +>> Tik nu C-x 1 en zie het documentatievenster verdwijnen. * TOEVOEGEN EN WEGHALEN ----------------------- -Als je tekst toe wilt voegen type je die eenvoudigweg in. Tekens die je -kunt zien, zoals A, 7, *, en dergelijke, worden door Emacs als tekst -geïnterpreteerd en meteen aan de tekst. Type (de `volgende regel' -toets) om een Newline toe te voegen en dus een nieuwe regel te beginnen. +Als je tekst toe wil voegen, tik je die eenvoudigweg in. Tekens die je +kan zien, zoals A, 7, * en dergelijke, worden door Emacs als tekst +geïnterpreteerd en meteen aan de tekst toegevoegd. Tik (de +"volgende regel"-toets) om een Newline toe te voegen en dus een nieuwe +regel te beginnen. -Je kunt het laatste teken dat je intypte weghalen door te typen. - is een toets op het toetsenbord--dezelfde toets die je normaal -gesproken gebruikt, buiten Emacs, om het laatst ingetypte teken te wissen. -Het is meestal een grote toets, een paar rijen boven de toets, +Je kan het laatste teken dat je hebt ingetikt weghalen door te tikken. + is een toets op het toetsenbord -- dezelfde toets die je normaal +gesproken gebruikt, buiten Emacs, om het laatst ingetikte teken te wissen. +Het is meestal een grote toets, een paar rijen boven de -toets, waar "Delete", "Del" of "Backspace" op staat. Als er op die grote toets "Backspace" staat, dan is dat degene die je gebruikt voor . Er kan op een andere plaats ook nog een andere toets zijn waarop "Delete" staat, maar dat is niet . -In het algemeen haalt het teken dat juist voor de cursorpositie -staat weg. +In het algemeen haalt het teken weg dat juist voor de cursorpositie +staat. ->> Probeer dit nu: type een paar letters en haal ze weer weg door een paar +>> Probeer dit nu: tik een paar letters en haal ze weer weg door een paar keer op te drukken. Maak je niet druk over het feit dat dit - bestand verandert; je zult niets veranderen aan de originele versie van - deze uitleg. Je zit slechts je eigen kopie te wijzigen. + bestand verandert; je zal niets veranderen aan de originele versie van + deze inleiding. Je zit slechts je eigen kopie te wijzigen. -Als een regel tekst te lang wordt om de regel op het scherm te laten -zien dan gaat de regel verder op een volgende schermregel. Een backslash -("\") in de rechtermarge laat dan zien dat de regel op de volgende -schermregel verder gaat. +Als een regel tekst te lang wordt om helemaal op het scherm getoond +te worden, dan gaat hij verder op de volgende schermregel. Een backslash +("\") in de rechtermarge (of, als je een scherm met vensters +gebruikt, een kleine gebogen pijl) laat dan zien dat de regel op de +volgende schermregel verder gaat. >> Voeg nu tekst toe totdat je de rechter kantlijn raakt, en blijf - toevoegen. Je zult zien dat er een vervolgregel verschijnt. + toevoegen. Je zal zien dat er een vervolgregel verschijnt. ->> Type weer enkele keren om zoveel tekens weg te halen tot +>> Tik weer enkele keren om zoveel tekens weg te halen tot de regel weer op een schermregel past. De vervolgregel zal verdwijnen. -Je kunt een Newline weggooien als elk ander teken. Als je een Newline -weggooit voeg je de twee regels waar de Newline tussen staat samen tot een +Je kan een Newline zoals elk ander teken verwijderen. Als je een Newline +verwijdert, voeg je de twee regels waar de Newline tussen staat samen tot een enkele regel. Als de regel die het resultaat is van deze operatie niet op -een schermregel past zal hij getoond worden met een vervolgregel. +een schermregel past, zal hij getoond worden met een vervolgregel. ->> Beweeg de cursor naar het begin van een regel en type . Dit +>> Beweeg de cursor naar het begin van een regel en tik . Dit voegt de huidige en vorige regel samen. ->> Type om de Newline die je net weggooide weer toe te voegen. +>> Tik om de Newline die je net verwijderd hebt weer toe te voegen. -Je herinnert je dat je bij de meeste Emacs commando's het aantal keren dat -iets herhaald moet worden, op kunt geven. Dit geldt ook voor gewone tekens. -Als je een gewoon teken herhaalt wordt dat teken herhaaldelijk toegevoegd. +Je herinnert je dat je bij de meeste Emacs-commando's het aantal keren op kan +geven, dat ze herhaald moeten worden. Dit geldt ook voor gewone tekens. +Als je een gewoon teken herhaalt, wordt dat teken herhaaldelijk toegevoegd. ->> Probeer dat nu: type C-u 8 * om ******** toe te voegen. +>> Probeer dat nu: tik C-u 8 * om ******** toe te voegen. -Je hebt nu de basismanier geleerd om iets in Emacs te typen en fouten te -corrigeren. Je kunt tekst ook per woord of regel weggooien. Hier volgt +Je hebt nu de eenvoudigste manier geleerd om iets in Emacs te tikken en fouten te +verbeteren. Je kan tekst ook per woord of regel verwijderen. Hier volgt een samenvatting van de commando's om tekst te verwijderen: haal het teken weg dat voor de cursor staat - C-d haal het teken weg dat achter de cursor staat + C-d haal het teken weg dat achter de cursor staat - M- gooi het woord weg dat voor de cursor staat - M-d gooi het woord weg dat achter de cursor staat + M- verwijder het woord dat voor de cursor staat + M-d verwijder het woord dat achter de cursor staat - C-k gooi alles weg van de cursor tot het eind van de regel - M-k gooi alles weg van de cursor tot het eind van de zin + C-k verwijder alles van de cursor tot het eind van de regel + M-k verwijder alles van de cursor tot het eind van de zin -Merk op dat en C-d met M- en M-d de analogie die begon -met C-f en M-f verder trekken (waarbij we voor het gemak even vergeten dat +Merk op dat en C-d, met M- en M-d de analogie verder +trekken, die begon met C-f en M-f (waarbij we voor het gemak even vergeten dat niet echt een control teken is). C-k en M-k lijken enigzins op C-e en M-e in hun relatie tot regels en zinnen. -Als je meer dan een enkel teken tegelijk weghaalt bewaart Emacs de tekst -die je weggooit zodat je hem weer terug kunt halen. Weggegooide tekst -terughalen heet "yanken". Je kunt weggegooide tekst terugbrengen op de -plaats waar je hem hebt weggegooid of op een andere plaats in de tekst. -Je kunt ook meerdere keren yanken om er meedere kopieën van te maken. Het +Als je meer dan een enkel teken tegelijk weghaalt, bewaart Emacs de tekst +die je verwijdert, zodat je hem weer terug kan halen. Verwijderde tekst +terughalen heet "yanken". Je kan verwijderde tekst terugbrengen op de +plaats waar je hem hebt verwijderd of op een andere plaats in de tekst. +Je kan ook meerdere keren yanken om er meedere kopieën van te maken. Het yank-commando is C-y. -Merk op dat er een verschil is tussen het weghalen en weggooien van iets: -iets dat je hebt weggooid kun je terugbrengen, maar iets dat je hebt -weggehaald niet. (In het Engels is het verschil tussen `killing' en -`deleting' duidelijker dan tussen de Nederlandse vertaling `weggooien' en -`weghalen'.) In het algemeen geldt dat de commando's die meer tekst dan -een enkel teken, Newline of spatie verwijderen deze tekst bewaren zodat die +Merk op dat er een verschil is tussen iets weghalen en iets verwijderen: +iets dat je hebt verwijderd, kan je terugbrengen, maar iets dat je hebt +weggehaald niet. (In het Engels is het verschil tussen "killing" en +"deleting" duidelijker dan tussen de Nederlandse vertalingen "verwijderen" en +"weghalen".) In het algemeen geldt dat de commando's die meer tekst dan +een enkel teken, Newline of spatie verwijderen, deze tekst bewaren zodat hij geyankt kan worden, terwijl dat niet geldt voor commando's die slechts een enkel teken weghalen. >> Zet de cursor op het begin van een regel die niet leeg is. - Type C-k om de tekst op die regel weg te gooien. ->> Type C-k een tweede keer. Nu gooit dit commando het Newline teken - weg. + Tik C-k om de tekst op die regel te verwijderen. +>> Tik C-k een tweede keer. Nu verwijdert dit commando het Newline-teken. -Merk op hoe een enkel C-k commando de inhoud van een regel weggooit, een +Merk op hoe een enkel C-k commando de inhoud van een regel verwijdert, een tweede C-k commando de regel zelf zodat alle volgende regels een regel -omhoog komen. Het numerieke argument is voor C-k bijzonder: het aangegeven -aantal regels zal worden weggegooid, inclusief de inhoud. Dit is meer dan -simpelweg herhaling: C-u 2 C-k gooit twee regels weg, terwijl tweemaal -C-k typen dat niet doet. +omhoog komen. Het numerieke argument is voor C-k bijzonder: het aangegeven +aantal regels zal worden verwijderd, inclusief de inhoud. Dit is meer dan +simpelweg herhaling: C-u 2 C-k verwijdert twee regels, terwijl tweemaal +C-k tikken dat niet doet. -Om de laatst weggegooide tekst terug te halen naar de plaats waar de -cursor nu op staat (te yanken), type C-y. +Om de laatst verwijderde tekst terug te halen naar de plaats waar de +cursor nu op staat (te yanken), tik C-y. ->> Probeer het nu: type C-y om de tekst te yanken. +>> Probeer het nu: tik C-y om de tekst te yanken. Het is alsof je met C-y iets uit de prullenbak haalt wat je net had -weggegooid. Merk op dat verschillende C-k's achter elkaar alle regels -die weggegooid worden bij elkaar bewaart zodat een enkele C-y die regels +verwijderd. Merk op dat verschillende C-k's achter elkaar alle regels +die verwijderd worden, bij elkaar bewaart zodat een enkele C-y die regels in een keer terugbrengt. ->> Probeer het nu: type C-k een paar keer. +>> Probeer het nu: tik C-k een paar keer. -Om de weggegooide tekst terug te halen: +Om de verwijderde tekst terug te halen: ->> Type C-y. Beweeg de cursor enkele regels naar beneden en type weer C-y. - Je ziet nu hoe je tekst kunt kopiëren. +>> Tik C-y. Beweeg de cursor enkele regels naar beneden en tik weer C-y. + Je ziet nu hoe je tekst kan kopiëren. -Wat nu te doen als je tekst terug wilt brengen, maar je hebt intussen al -iets anders weggegooid? C-y zou datgene terugbrengen wat je het -recentst hebt weggegooid. Gelukkig is de voorgaande tekst niet verloren -gegaan. Je kunt die tekst terughalen met M-y. Nadat je C-y hebt getypt +Wat moet je doen als je wat tekst terug wilt brengen, maar je intussen +al iets anders verwijderd hebt? C-y zou datgene terugbrengen wat je het +recentst hebt verwijderd. Gelukkig is de voorgaande tekst niet verloren +gegaan. Je kunt die tekst terughalen met M-y. Nadat je C-y hebt getikt om de recentst weggegooide tekst terug te halen, vervangt M-y die tekst met de tekst die je daarvoor had weggegooid. Je kunt M-y herhalen om -tekst terug te halen die je reeds langer geleden hebt weggegooid. Als -je de tekst te pakken hebt die je zocht hoef je niets te doen om die -daar te houden. Je kunt gewoon verder werken en de teruggehaalde tekst +tekst terug te halen die je al langer geleden hebt weggegooid. Als +je de tekst te pakken hebt die je zocht, hoef je niets te doen om die +daar te houden. Je kan gewoon verder werken en de teruggehaalde tekst met rust laten. -Als je M-y vaak genoeg typt kom je terug waar je begon, bij de recentst -weggegooide tekst. +Als je M-y vaak genoeg tikt kom je terug waar je begon, bij de laatst +verwijderde tekst. ->> Gooi een regel weg, beweeg de cursor wat, en gooi nog een regel weg. - Type C-y om de tweede regel die je weggooide terug te halen. - Type nog een M-y en die regel wordt vervangen door de eerste regel - die je weggooide. - Type nog enkele keren M-y en zie wat er langs komt. Herhaal dit tot de +>> Verwijder een regel, beweeg de cursor wat, en verwijder nog een regel. + Tik C-y om de tweede regel die je verwijderde, terug te halen. + Tik nog een M-y en die regel wordt vervangen door de eerste regel + die je verwijderde. + Tik nog enkele keren M-y en zie wat er langs komt. Herhaal dit tot de tweede regel weer langs komt, en dan nog een paar keer. - Je kunt ook experimenteren met positieve en negatieve argumenten aan + Je kan ook experimenteren met positieve en negatieve argumenten bij M-y. * HERSTELLEN ------------ -Als je de tekst veranderd hebt en als je daar toch niet tevreden mee bent, -dan kun je de verandering ongedaan maken met het herstel commando, C-x u. +Als je de tekst veranderd hebt en je daar toch niet tevreden mee bent, +dan kan je de verandering ongedaan maken met het herstelcommando, C-x u. Normaal gesproken herstelt C-x u de veranderingen die het gevolg zijn van -een enkel commando; door herhaaldelijk C-x u te typen, worden steeds +een enkel commando; door herhaaldelijk C-x u te tikken, worden steeds eerdere commando's hersteld. Er zijn echter twee uitzonderingen: commando's die de tekst niet wijzigen, zoals cursorbewegingen, worden overgeslagen, en commando's die simpelweg -de ingetypte letter aan de tekst toevoegen worden meestal gegroepeerd +het ingetikte teken aan de tekst toevoegen, worden meestal gegroepeerd in groepjes van maximaal 20 tekens, zodat je minder vaak het commando -C-x u hoeft te typen om het toevoegen van tekst te herstellen. +C-x u hoeft te tikken om teksttoevoegingen te herstellen. >> Gooi deze regel weg met C-k; met C-x u zou hij weer moeten verschijnen. C-_ is een alternatief voor C-x u. Het levert exact hetzelfde resultaat -op, maar het is makkelijker om dat een paar keer achter elkaar te typen. -Een nadeel van C-_ is dat op sommige toetsenborden het intypen ervan -niet triviaal is. Dat is ook de reden voor het alternatief, C-x u. Op -sommige terminals kun je C-_ typen door te doen alsof je C-/ typt. +op, maar is makkelijker om een paar keer achter elkaar te tikken. Een +nadeel van C-_ is dat op sommige toetsenborden het intikken ervan niet +gebruiksvriendelijk is. Dat is ook de reden voor het alternatief, C-x u. +Op sommige terminals kan je C-_ tikken door "/" te tikken terwijl je de +CONTROL-toets ingedrukt houdt. -Een numeriek argument aan C-_ of C-x u duidt het aantal herhalingen aan. +Een numeriek argument bij C-_ of C-x u duidt het aantal herhalingen aan. * BESTANDEN ----------- -Om een tekst die je gemaakt of veranderd hebt op te slaan moet je de -tekst in een bestand bewaren (`to save a file' in het Engels). Als je -dat niet doet ben je die veranderingen kwijt op het moment dat je uit -Emacs gaat. Je kunt een bestand veranderen door het bestand te `bezoeken'. -(Ook wel `vinden'; `finding' of `visiting' in het Engels.) +Om een tekst die je gemaakt of veranderd hebt op te slaan, moet je de tekst +in een bestand stoppen ("to save a file" in het Engels). Als je dat niet +doet, ben je die veranderingen kwijt op het moment dat je Emacs verlaat. +Je kan een bestand veranderen door het bestand te "bezoeken". (Ook wel +"vinden"; "finding" of "visiting" in het Engels.) -Het bezoeken van een bestand betekent dat je de inhoud van dat bestand -in Emacs ziet. Het lijkt er dan op alsof je het bestand aan het -veranderen bent. Echter, deze veranderingen zijn slechts tijdelijk -zolang je het bestand niet bewaart. Op deze manier kun je nooit per -ongeluk een half gewijzigd bestand op het systeem achterlaten. Zelfs -als je het bestand bewaart, zorgt Emacs ervoor dat het originele -bestand onder een gewijzigde naam nog steeds beschikbaar is, voor het -geval je later besluit dat de veranderingen toch niet zo'n goed plan -waren. +Een bestand bezoeken betekent dat je de inhoud van dat bestand in +Emacs ziet. Het lijkt er dan op alsof je het bestand aan het veranderen +bent. Deze veranderingen zijn echter slechts tijdelijk zolang je het +bestand niet opslaat. Op deze manier kan je nooit per ongeluk een half +gewijzigd bestand op het systeem achterlaten. Zelfs als je het bestand +opslaat, zorgt Emacs ervoor dat het originele bestand onder een gewijzigde +naam nog steeds beschikbaar is, voor het geval je later besluit dat de +veranderingen toch niet zo goed waren. -In de buurt van de onderkant van het scherm zie je een regel die begint en +Bij de onderkant van het scherm zie je een regel die begint en eindigt met streepjes, met aan het begin "--:-- TUTORIAL.nl" of iets dergelijks. Dit deel van het scherm laat normaal de naam van het bestand zien dat je op dat moment bezoekt. Op dit moment bezoek je een bestand dat "TUTORIAL.nl" heet; het is je eigen kopie van de Nederlandstalige -Emacs uitleg (`tutorial' in het Engels). Als je in Emacs een bestand +Emacs-inleiding ("tutorial" in het Engels). Als je in Emacs een bestand bezoekt dan staat de naam van het bestand altijd op deze plaats. -De commando's om een bestand te bezoeken of te bewaren zijn anders dan de +De commando's om een bestand te bezoeken of op te slaan zijn anders dan de commando's die je tot nu toe geleerd hebt; ze bestaan namelijk uit twee tekens. Beide commando's beginnen met het teken Control-x. Er zijn een heleboel commando's die met Control-x beginnen. Veel van die commando's -hebben te maken met bestanden, buffers, en daaraan gerelateerde zaken. +hebben te maken met bestanden, buffers, en gelijkaardige dingen. Dergelijke commando's bestaan uit twee, drie of vier tekens. -Nog iets bijzonders aan het commando om een bestand te bezoeken is dat -je aan moet geven welk bestand je wilt. Dit heet dat het commando "een +Nog iets bijzonders aan het commando om een bestand te bezoeken, is dat je +aan moet geven welk bestand je wil. Dit heet dat het commando "een argument van de gebruiker vraagt"; in dit geval de naam van het bestand. Nadat je het commando - C-x C-f bezoek bestand (met de f van `find file') + C-x C-f bezoek bestand (met de f van "find file") -hebt getypt vraagt Emacs om de naam van het bestand. De naam die je -intypt verschijnt op de onderste regel van het scherm. Wanneer die regel -voor dit soort invoer gebruikt wordt, heet ze de minibuffer. Je kunt de -gebruikelijke Emacs commando's gebruiken om de filename in te typen. +hebt getikt vraagt Emacs om de naam van het bestand. De naam die je +intikt verschijnt op de onderste regel van het scherm. Wanneer die regel +voor dit soort invoer gebruikt wordt, heet hij de minibuffer. Je kan gewone +Emacs commando's gebruiken om de bestandsnaam te veranderen. -Tijdens het invoeren van de naam van het bestand (of willekeurig wat -voor minibuffer invoer) kun je het commando afbreken met C-g. +Tijdens het invoeren van de bestandsnaam (of om het even welke +invoer in de minibuffer) kan je het commando afbreken met C-g. ->> Type C-x C-f gevolgd door C-g. Dit commando breekt de minibuffer af en +>> Tik C-x C-f gevolgd door C-g. Dit commando breekt de minibuffer af en ook het C-x C-f commando dat van de minibuffer gebruik maakte. - Netto resultaat is dat je geen bestand bezoekt. + Het resultaat is dat je geen bestand bezoekt. -Als je de naam van een bestand hebt ingevoerd, type dan om het -af te sluiten. Hierna gaat het C-x C-f commando aan het werk en haalt +Als je de naam van een bestand hebt ingevoerd, tik dan om het +commando af te sluiten. Hierna gaat het C-x C-f commando aan het werk en haalt het bestand op dat je aangegeven hebt. Als het C-x C-f commando daarmee -klaar is,verdwijnt de minibuffer. +klaar is, verdwijnt de minibuffer. -Na korte tijd verschijnt de inhoud van het bestand op het scherm en kun -je de inhoud wijzigen. Als je de wijzigingen op wilt slaan, type dan het +Na korte tijd verschijnt de inhoud van het bestand op het scherm en kan +je de inhoud wijzigen. Als je de wijzigingen op wilt slaan, tik dan het commando - C-x C-s bewaar bestand (met de s van `save file') + C-x C-s sla bestand op (met de s van "save file") -Dit commando bewaart de tekst zoals Emacs die nu heeft in het bestand. -De eerstekeer dat je dit doet bewaart Emacs het originele bestand onder een -andere naam zodat het nog niet verloren is. De nieuwe naam bestaat uit de -oude naam gevolgd door een "~". +Dit commando slaat de tekst zoals Emacs die nu heeft in het bestand op. +De eerste keer dat je dit doet, slaat Emacs het originele bestand onder een +andere naam op, zodat het niet verloren gaat. De nieuwe naam bestaat uit de +oude bestandsnaam gevolgd door een "~". -Als Emacs klaar is het bestand te bewaren laat ze de naam van het bestand -zien. Het is een goede gewoonte een bestand redelijk vaak te bewaren +Als Emacs het bestand heeft opgeslagen, laat het de naam van het +bestand zien. Het is een goede gewoonte een bestand regelmatig te op te slaan zodat er niet teveel werk verloren gaat als het systeem hangt of crasht. ->> Type C-x C-s, om je kopie van deze uitleg te bewaren. Als het goed is +>> Tik C-x C-s, om je kopie van deze inleiding op te slaan. Als het goed is verschijnt "Wrote ...TUTORIAL" op de onderste schermregel. OPMERKING: Op sommige systemen gebeurt er helemaal niets als je C-x C-s -typt, en daarna ook niets meer. Dit komt door een eigenschap van de -machine waarop je werkt die te maken heeft met `flow control'. Met C-s -stopt de `flow' en komt niets meer van wat je typt bij Emacs terecht. Om -deze situatie te herstellen, type C-q. Lees daarna de "Spontaneous Entry -to Incremental Search" sectie in het Emacs handboek over hoe om te gaan -met deze situatie. +tikt, en daarna ook niets meer. Dit komt door een eigenschap van de +machine waarop je werkt die te maken heeft met "flow control". Met C-s +stopt de "flow" en komt niets meer van wat je tikt bij Emacs terecht. Om +deze situatie te herstellen, tik C-q. Lees daarna het hoofdstuk +"Spontaneous Entry to Incremental Search" in het Emacs-handboek over hoe +je moet omgaan met deze situatie. -Je kunt een bestaand bestand bezoeken, om het te bekijken of het te -wijzigen. Je kunt ook een bestand bezoeken dat nog niet bestaat. Dit is -dé manier om met Emacs een nieuw bestand te maken: bezoek het bestand, dat -initieel leeg zal zijn, en voeg tekst toe. Zodra je de tekst bewaart -wordt het bestand werkelijk gecreëerd, met de tekst als inhoud. Vanaf dat +Je kan een bestaand bestand bezoeken om het te bekijken of het te +wijzigen. Je kan ook een bestand bezoeken dat nog niet bestaat. Dit is +de manier om met Emacs een nieuw bestand te maken: bezoek het bestand, dat +eerst leeg zal zijn, en voeg tekst toe. Zodra je de tekst opslaat, wordt +het bestand werkelijk gecreëerd, met de tekst als inhoud. Vanaf dat moment ben je dus bezig met een bestaand bestand. * BUFFERS --------- -Als je een tweede bestand bezoekt met C-x C-f blijft het eerste bestand -gewoon in Emacs. Je kunt naar dat bestand terug door het gewoon nog een -keer te bezoeken met C-x C-f. Op deze manier kun je een behoorlijk aantal +Als je een tweede bestand bezoekt met C-x C-f, blijft het eerste bestand +gewoon in Emacs. Je kan naar dat bestand terug door het gewoon nog een +keer te bezoeken met C-x C-f. Op deze manier kan je een behoorlijk aantal bestanden in Emacs krijgen. ->> Creëer een bestand dat "foo" heet door te typen: C-f C-f foo - . Voeg hieraan wat tekst toe en bewaar "foo" - door C-x C-s te typen. Type hierna C-x C-f TUTORIAL om - weer hier, in de uitleg, terug te komen. +>> Creëer een bestand dat "foo" heet door te tikken: C-f C-f foo + . Voeg hieraan wat tekst toe, wijzig hem, en sla "foo" op + door C-x C-s te tikken. Tik hierna C-x C-f TUTORIAL om + weer hier, in de inleiding, terug te komen. Emacs bewaart intern de tekst van elk bestand in een ding dat een "buffer" genoemd wordt. Als je een bestand bezoekt wordt er een nieuwe buffer -gemaakt. Om een lijst van de huidige buffers te zien, type +gemaakt. Om een lijst van de huidige buffers te zien, tik C-x C-b laat de bufferlijst zien >> Probeer C-x C-b nu. -Zie dat elke buffer een naam heeft en mogelijk ook een bestandsnaam; dit +Bemerk dat elke buffer een naam heeft en mogelijk ook een bestandsnaam; dit is de naam van het bestand waarmee de buffer overeenkomt. Sommige buffers hebben niets met een bestand te maken. Bijvoorbeeld, de buffer die "*Buffer List*" heet heeft geen bestand. Die buffer is de buffer die de lijst bevat die door C-x C-b gemaakt wordt. ALLE tekst die je in een Emacs venster ziet is altijd onderdeel van een of andere buffer. ->> Type C-x 1 om de bufferlijst te verwijderen. +>> Tik C-x 1 om de bufferlijst te verwijderen. Als je de tekst van het ene bestand verandert en dan een ander bestand -bezoekt dan wordt het eerste bestand niet bewaard. De wijzigingen blijven +bezoekt, wordt het eerste bestand niet opgeslagen. De wijzigingen blijven in Emacs, in de buffer die bij het bestand hoort. Het creëren of -modificeren van de buffer van het tweede bestand heeft geen effect op de +veranderen van de buffer van het tweede bestand heeft geen effect op de eerste buffer. Dit is erg nuttig, maar betekent ook dat er een eenvoudige manier nodig is om het eerste bestand te bewaren. Het zou erg vervelend zijn om er eerst naar terug te moeten gaan met C-x C-f om het dan te kunnen bewaren met C-x C-s. Dus hebben we het commando: - C-x s bewaar een paar buffers + C-x s sla een paar buffers op C-x s vraagt voor elke buffer die veranderingen heeft die nog niet opgeslagen zijn, of je de buffer wilt bewaren. ->> Voeg wat tekst toe en type C-x s. +>> Voeg wat tekst toe en tik C-x s. Emacs vraagt nu of je de buffer die TUTORIAL.nl heet wilt bewaren. - Beantwoord deze vraag positief door een "y" in te typen (de y van + Beantwoord deze vraag positief door een "y" in te tikken (de y van "yes", Engels voor "ja"). @@ -609,28 +617,28 @@ opgeslagen zijn, of je de buffer wilt bewaren. Er zijn veel meer Emacs commando's dan er op de toetsen van het toetsenbord passen, zelfs als we hun aantal kunnen vergroten door de control of meta toets te gebruiken. Emacs lost dit probleem op met het X -commando (met de X van eXtensie of uitbreiding). Het X commando komt in -twee smaken voor: +commando (met de X van eXtensie of uitbreiding). Het X commando komt voor in +twee smaken: - C-x teken eXtensie; wordt gevolgd door een teken - M-x genaamd commando eXtensie; wordt gevolgd door een naam. + C-x Tekenuitbreiding. Bevolgd door een teken. + M-x Commando-naam-uitbreiding. Wordt gevolgd door een naam. Deze commando's zijn in het algemeen nuttig, maar worden minder gebruikt -dan de commando's die tot nu toe uitgelegd zijn. Je hebt al twee van deze +dan de commando's die je tot nu toe al geleerd hebt. Je hebt al twee van deze commando's gezien: C-x C-f om een bestand te bezoeken, en C-x C-s om het te bewaren. Een ander voorbeeld is het commando om Emacs te verlaten: dit is C-x C-c. (Maak je geen zorgen over het verloren gaan van veranderingen -die niet bewaard zijn; C-x C-c vraagt of je veranderde buffers wilt -bewaren voordat Emacs daadwerkelijk eindigt.) +die niet opgeslagen zijn; C-x C-c vraagt of je veranderde buffers wilt +bewaren voordat Emacs helemaal eindigt.) C-z is het commando om Emacs *tijdelijk* te verlaten, zodat je daarna weer -terug kunt keren in dezelfde Emacs sessie. +terug kan keren in dezelfde Emacs-sessie. Op systemen die deze mogelijkheid bieden, zet C-z Emacs stil: je komt weer -terug in de shell, maar Emacs is nog aanwezig. In de meeste shells kun je +terug in de shell, maar Emacs is nog aanwezig. In de meeste shells kan je Emacs weer activeren met het "fg" commando, of met "%emacs". -Op systemen die niet de mogelijkheid bieden om programma's stil te zetten +Op systemen die niet de mogelijkheid bieden om programma's stil te zetten, creëert C-z een subshell onder Emacs om je zo in de gelegenheid te stellen andere programma's uit te voeren en daarna weer in Emacs terug te keren; Emacs wordt dus niet werkelijk verlaten. In dit geval is het @@ -639,7 +647,7 @@ Emacs terug te keren. Het moment om C-x C-c te gebruiken is wanneer je uit gaat loggen. Het is ook het juiste commando om Emacs te beëindigen wanneer Emacs opgestart -was door een mail programma of iets dergelijks, aangezien die misschien +was door een mail-programma of iets dergelijks, aangezien die misschien niet met een stilgezette Emacs om kunnen gaan. Normaal gezien is het echter beter Emacs stil te zetten met C-z dan om Emacs te verlaten, behalve als je uit wilt loggen natuurlijk. @@ -648,278 +656,278 @@ Er bestaan vele C-x commando's. Hier is een lijst van degene die je nu al kent: C-x C-f bezoek bestand - C-x C-s bewaar bestand + C-x C-s sla bestand op C-x C-b laat bufferlijst zien C-x C-c verlaat Emacs C-x u herstel -Commando's waaraan een uitgebreid commando wordt toegevoegd, worden nog -minder vaak gebruikt, of worden alleen onder bepaalde omstandigheden gebruikt. +Commando-naam-bevelen worden nog minder vaak gebruikt, of alleen onder bepaalde omstandigheden. Een voorbeeld is het commando replace-string, dat in de hele tekst een string -vervangt door een andere string (`to replace' betekent `vervangen'). -Als je M-x typt echoot Emacs onderaan het scherm `M-x' en moet je de naam van -het commando intypen, in dit geval "replace-string". Als je gewoon -"repl s" typt maakt Emacs de naam zelf af. Beëindig het commando +vervangt door een andere string ("to replace" betekent "vervangen"). +Als je M-x tikt, toont Emacs onderaan het scherm "M-x" en moet je de naam van +het commando intikken, in dit geval "replace-string". Als je gewoon +"repl s" tikt maakt Emacs de naam zelf af. Beëindig het commando met . Het replace-string commando heeft twee argumenten nodig: de string die vervangen moet worden en de string waarmee die vervangen moet worden. Je sluit elk argument af met . ->> Plaats de cursor op de lege regel twee regels onder deze. - Type dan M-x repl sgewijzigdveranderd. +>> Plaats de cursor op de lege regel twee regels onder deze regel. + Tik dan M-x repl sgewijzigdveranderd. - Zie hoe deze regel daardoor gewijzigd is. Je hebt elke keer dat het woord -"g-e-w-i-j-z-i-g-d" voor kwam, vervangen door "veranderd"; beginnend op + Zie hoe deze regel daardoor gewijzigd is. Je hebt elk voorkomen van + het woord g-e-w-i-j-z-i-g-d vervangen door "veranderd"; te beginnen op de plek waar de cursor staat. * AUTOMATISCH BEWAREN --------------------- -Als je een bestand veranderd hebt maar het nog niet bewaard hebt, zouden +Als je een bestand veranderd hebt maar het nog niet opgeslagen hebt, zouden de veranderingen verloren kunnen gaan als het systeem zou hangen of -herstarten. Om je hiertegen te beschermen bewaart Emacs om de zoveel tijd -de veranderde tekst automatisch. De naam van het bestand waarin de tekst -automatisch bewaard wordt begint en eindigt met een #. Bijvoorbeeld, als -je het bestand "hello.c" aan het bewerken bent dan wordt de tekst -automatisch bewaard in een bestand dat "#hello.c#" heet. Zodra je het -bestand werkelijk bewaart, wordt het automatisch bewaarde bestand weer -weggegooid. +herstarten. Om je hiertegen te beschermen, slaat Emacs regelmatig +de veranderde tekst automatisch op. De naam van het bestand waarin de +tekst automatisch wordt opgeslagen begint en eindigt met een #. +Bijvoorbeeld, als je het bestand "hello.c" aan het editeren bent, wordt +de tekst automatisch opgeslagen in een bestand dat "#hello.c#" heet. Zodra +je het bestand werkelijk opslaat, wordt het automatisch opgeslagen bestand +verwijderd. -Als de computer crasht kun je de automatisch bewaarde tekst terugkrijgen -door de file normaal te bezoeken (de originele file, niet de automatisch -bewaarde), gevolgd door M-x recover file. Als Emacs vraagt om -bevestiging, antwoord dan:"yes", en de automatisch bewaarde +Als de computer crasht, kan je de automatisch opgeslagen tekst terugkrijgen +door het bestand gewoon te bezoeken (het originele bestand, niet het automatisch +opgeslagen), gevolgd door M-x recover-file. Als Emacs vraagt om +bevestiging, antwoord dan met yes en de automatisch opgeslagen informatie wordt teruggehaald. -* ECHO GEBIED +* ECHO-GEBIED ------------- -Als je een commando langzaam intypt echoot Emacs de tekens aan de -onderkant van het scherm, in een deel dat het "echo gebied" genoemd wordt. +Als je een commando langzaam intikt, toont Emacs de tekens aan de +onderkant van het scherm in een deel dat het "echo-gebied" genoemd wordt. Dit gebied omvat de onderste regel van het scherm. -* MODE-REGEL ------------- +* MODUS-REGEL +------------- -De regel direct boven het echo gebied heet de "mode-regel". De mode-regel +De regel direct boven het echo gebied heet de "modusregel". De modusregel ziet er ongeveer zo uit: --**-Emacs: TUTORIAL.nl (Fundamental)--68%------------------------ Deze regel geeft interessante informatie over Emacs en de tekst die -je aan het bewerken bent. +je aan het editeren bent. Je weet al wat de bestandsnaam betekent: het is de naam van het bestand dat je bezoekt. -NN%-- geeft je huidige positie in de tekst aan: NN procent van de tekst bevindt zich boven het scherm. Als het bestand vanaf het begin op het scherm staat, staat er --Top-- in plaats van --00%--. Als het laatste stuk tekst op het scherm staat, zal er --Bot-- staan (van -`bottom', `onderkant' in het Nederlands). Als de tekst zo klein is dat die -volledig op het scherm past staat --All-- in de mode-regel. +"bottom", "onderkant" in het Nederlands). Als de tekst zo klein is dat hij +volledig op het scherm past staat --All-- in de modus-regel. -De sterretjes aan het begin betekenen dat je de tekst gemodificeerd hebt. -Direct na het bezoeken of bewaren staan er gewoon streepjes. +De sterretjes aan het begin betekenen dat je de tekst veranderd hebt. +Direct na het bezoeken of opslaan staan er gewoon streepjes. -In de mode-regel staat tussen haakjes in welke mode je aan het werken -bent. Tenzij een andere mode gewenst is, zit je in de "Fundamental" mode -zoals nu (`fundamental' is `basis' in het Nederlands). Een dergelijke -mode heet een hoofdmode (`major mode' in het Engels). +In de modusregel staat tussen haakjes in welke modus je aan het werken +bent. De standaardmodus is de "Fundamental" modus, die je nu gebruikt +("fundamental" is "basis" in het Nederlands). Een dergelijke +modus heet een hoofdmodus ("major mode" in het Engels). -Emacs heeft verschillende hoofdmodes. Sommige daarvan zijn bedoeld voor -het bewerken van verschillende talen of soorten tekst, zoals bijvoorbeeld -Lisp mode, Text mode, etc. Op elk moment is er altijd precies een mode -actief, en de naam daarvan staat in de mode-regel, op de plaats waar nu +Emacs heeft verschillende hoofdmodi. Sommige daarvan zijn bedoeld voor +het editeren van verschillende talen of soorten tekst, zoals bijvoorbeeld +Lisp modus, Text modus, etc. Op elk moment is er altijd precies een modus +actief, en de naam daarvan staat in de modusregel, op de plaats waar nu "Fundamental" staat. -Het komt voor dat sommige commado's zich in verschillende modes anders -gedragen. Zo bestaat er een commando om een commentaar in een programma te -typen, en aangezien elke programmeertaal een ander idee heeft over hoe -commentaar eruit moet zien, moet elke hoofdmode op een andere manier het -commentaar beginnen. Elke hoofdmode is de naam van een uitgebreid commando, -en met dat commando schakel je om naar die hoofdmode. Zo is bijvoorbeeld -M-x fundamental-mode het commando om naar de basismode om te schakelen. +Elke hoofdmodus zorgt ervoor dat sommige commando's zich anders gedragen. +Zo bestaat er een commando om een commentaar in een programma te tikken, en +aangezien elke programmeertaal een ander idee heeft over hoe commentaar +eruit moet zien, moet elke hoofdmodus op een andere manier het commentaar +beginnen. Elke hoofdmodus is de naam van een uitgebreid commando, en met +dat commando schakel je om naar die hoofdmodus. Zo is bijvoorbeeld +M-x fundamental-mode het commando om naar de basismodus om te schakelen. -Als je Nederlandse of Engelse tekst wil gaan bewerken, zoals bijvoorbeeld -dit bestand, kun je beter "text mode" gebruiken, de mode om tekst in een -gewone taal te bewerken: +Als je Nederlandse of Engelse tekst wil gaan editeren, zoals bijvoorbeeld +dit bestand, kan je beter "Text mode" gebruiken, de modus om tekst in een +gewone taal te editeren: ->> Type M-x text-mode. +>> Tik M-x text-mode. Wees gerust; geen van de commando's die je geleerd hebt zorgen voor -grondige veranderingen in Emacs. Een van de dingen die je kunt merken is +grondige veranderingen in Emacs. Een van de dingen die je kan merken, is bijvoorbeeld dat M-f en M-b nu apostrofs als onderdeel van een woord -beschouwen. In de vorige, Fundamental, mode behandelen M-f en M-b de +beschouwen. In de vorige modus (Fundamental) behandelen M-f en M-b de apostrof als ruimte tussen twee woorden. -Het is gebruikelijk dat hoofdmodes dergelijke subtiele verschillen hebben. -De meeste commando's doen dus min of meer hetzelfde in elke hoofdmode. +Het is gebruikelijk dat hoofdmodi dergelijke subtiele verschillen hebben. +De meeste commando's doen dus min of meer hetzelfde in elke hoofdmodus. -Met het commando C-h m kun je de documentatie over de huidige hoofdmode +Met het commando C-h m kan je de documentatie over de huidige hoofdmodus lezen. >> Gebruik C-u C-v een paar keer om deze zin in de buurt van de bovenkant van het scherm te krijgen. ->> Type C-h m om te zien hoe Text mode verschilt van Fundamental mode. ->> Type C-x 1 om de documentatie van het scherm te verwijderen. +>> Tik C-h m om te zien hoe de tekstmodus verschilt van de basismodus. +>> Tik C-x 1 om de documentatie van het scherm te verwijderen. -Hoofdmodes heten hoofdmodes omdat er ook bijmodes zijn. Bijmodes zijn -geen alternatieven voor hoofdmodes; het zijn slechts kleine modificaties -daarvan. Elke bijmode kan aan- of uitgezet worden, onafhankelijk van -andere bijmodes en onafhankelijk van de hoofdmode. Je kunt dus nul, een, -of willekeurig veel minor modes gebruiken. +Hoofdmodi heten zo omdat er ook bijmodi zijn. Bijmodi zijn +geen alternatieven voor hoofdmodi; het zijn slechts kleine aanpassingen +daarvan. Elke bijmodus kan aan- of uitgezet worden, onafhankelijk van +andere bijmodi en onafhankelijk van de hoofdmodus. Het is dus mogelijk geen bijmodi, één bijmodus +of een willekeurige combinatie van bijmodi te gebruiken. -Een nuttige bijmode voor het bewerken van tekst in een natuurlijke taal, -zoals Nederlands, is Auto Fill mode (`auto fill' betekent automatisch -uitvullen). Wanneer deze mode aanstaat breekt Emacs automatisch een regel -tussen twee woorden af als de regel anders te lang zou worden. +Een nuttige bijmodus voor het editeren van tekst in een natuurlijke taal, +zoals het Nederlands, is Auto Fill modus ("auto fill" betekent automatisch +uitvullen). Wanneer deze modus aanstaat, breekt Emacs automatisch een +regel tussen twee woorden af als de regel te lang wordt. -Je kunt Auto Fill mode aanzetten met M-x auto-fill-mode. Als deze -mode al aanstaat, kun je hem uitzetten met M-x auto-fill-mode. -Als de mode uitstaat zet dit commando de mode aan; als ze aanstaat zet dit -commando de mode uit. Het commando zet de mode steeds aan en uit zet (`to -toggle' in het Engels). +Je kan Auto Fill modus aanzetten met M-x auto-fill-mode. Als deze +modus al aanstaat, kan je hem uitzetten met M-x auto-fill-mode. +Als de modus uitstaat, zet dit commando de modus aan; als ze aanstaat, zet +dit commando de modus uit. We zeggen dat het commando de modus "schakelt" +("to toggle" in het Engels). ->> Type nu M-x auto-fill-mode. Type nu vele malen asdf op een - regel zodat je kunt zien dat de regel in tweeën gesplitst wordt. Er - moeten wel spaties tussen de woorden staan, omdat de Auto Fill mode - alleen op spaties de regel afbreekt. +>> Tik nu M-x auto-fill-mode. Tik nu vele malen "asdf " op een + regel zodat je kan zien dat de regel in tweeën gesplitst wordt. Er + moeten wel spaties tussen de woorden staan, omdat de Auto Fill modus + de regel alleen op spaties breekt. -De rechter kantlijn staat meestal op 70 tekens, maar die kun je veranderen +De rechterkantlijn staat meestal op 70 tekens, maar die kan je veranderen met het C-x f commando. Dit commando accepteert een numeriek argument om de gewenste kantlijn te verkrijgen. ->> Type C-x f met 20 als argument (C-u 20 C-x f). - Type wat tekst en zie dat Emacs de regels afbreekt bij 20 tekens. - Zet de kantlijn nu terug op 70, dus met C-u 70 C-x f. +>> Tik C-x f met 20 als argument (C-u 20 C-x f). + Tik wat tekst en zie dat Emacs de regels afbreekt bij 20 tekens. + Zet de kantlijn nu terug op 70, dus met met C-u 70 C-x f. -Als je de tekst midden in een regel verandert vult Auto Fill mode +Als je de tekst midden in een regel verandert vult Auto Fill modus de regel niet opnieuw. -Om een alinea opnieuw te vullen, type M-q (Meta-q) terwijl de +Om een alinea opnieuw te vullen, tik M-q (META-q) terwijl de cursor in de alinea staat. ->> Plaats de cursor in de voorgaande alinea en type M-q. +>> Plaats de cursor in de voorgaande alinea en tik M-q. * ZOEKEN -------- -Emacs kan strings zoeken (een string is een rij tekens), zowel volgend op -de cursorpositie, als eraan voorafgaand. Het zoeken van een string +Emacs kan tekenreeksen ("strings") zoeken, zowel volgend op +de cursorpositie, als eraan voorafgaand. Het zoeken naar een string verplaatst de cursor naar de volgende plaats waar de gezochte string voorkomt. Het zoekcommando van Emacs is anders dan de zoekcommando's van de meeste tekstverwerkers; het zoekt incrementeel. Dit betekent dat het zoeken -gebeurt tijdens het intypen van de gezochte string. +gebeurt tijdens het intikken van de gezochte string. -Het commando om vooruit zoeken te starten is C-s (met de `s' van `to -search', i.e. zoeken); C-r start het zoeken achteruit (met de `r' van -`reverse' of achteruit). WACHT nog even met ze te proberen. +Het commando om het voorwaarts zoeken te starten is C-s (met de "s" van "to +search", zoeken); C-r start het achterwaarts zoeken (met de "r" van +"reverse" of achteruit). MAAR WACHT! Probeer ze nu nog niet. -Als je C-s typt verschijnt de string "I-search" in het echo gebied. Dit -betekent dat Emacs bezig is met een `incremental search' (incrementele -zoekopdracht) en wacht op het intypen van de zoekstring. beëindigt +Als je C-s tikt verschijnt de string "I-search" in het echo-gebied. Dit +betekent dat Emacs bezig is met een "incremental search" (incrementele +zoekopdracht) en wacht op het intikken van de zoekstring. beëindigt het zoeken. ->> Type nu C-s om het zoeken te starten. Type nu, LANGZAAM, één letter per - keer, het woord `cursor', met een pauze na elke letter zodat je kunt +>> Tik nu C-s om het zoeken te starten. Tik nu, LANGZAAM, één letter per + keer, het woord "cursor", met een pauze na elke letter zodat je kan zien wat er met de cursor gebeurt. Je hebt nu eenmaal naar het woord - `cursor' gezocht. ->> Type nogmaals C-s, om het volgende woord `cursor' te zoeken ->> Type nu viermaal en let op de cursorbewegingen. ->> Type om het zoeken te beëindigen. + "cursor" gezocht. +>> Tik nogmaals C-s, om naar het volgende voorkomen van het woord "cursor" te + zoeken. +>> Tik nu viermaal en let op de cursorbewegingen. +>> Tik om het zoeken te beëindigen. Zag je wat er gebeurde? Tijdens incrementeel zoeken probeert Emacs naar -de eerste plek te gaan waar de string staat die je tot dan toe getypt -hebt. Om naar de volgende plek te gaan, type je C-s nog een keer. Als er -geen volgende plek is gevonden piept Emacs en vertelt je dat de zoekopdracht -is beëindigd. (`failing' in het Engels); met C-g kun je het zoeken afbreken. +de eerste plek te gaan waar de string staat die je tot dan toe getikt +hebt. Om naar de volgende plek te gaan, tik je C-s nog een keer. Als er +geen volgende plek is gevonden, biept Emacs en vertelt je dat de zoekopdracht +niets gevonden heeft ("is failing" in het Engels). C-g zou het zoeken ook afbreken. -Als je tijdens incrementeel zoeken typt, zul je zien dat het -laatste teken dat je in de zoekstring typte weggehaald wordt en dat het +Als je tijdens incrementeel zoeken tikt, zal je zien dat het +laatste teken dat je aan de zoekstring toegevoegd hebt, weggehaald wordt en dat het zoeken teruggaat naar de voorgaande plaats. Als je bijvoorbeeld begint -met zoeken en je typt een "c" dan ga je naar de plaats waar de "c" het -eerst voorkomt. Type je vervolgens een "u" dan gaat de cursor naar de -plaats waar de string "cu" het eerst voorkomt". Als je nu typt, dan -wordt de "u" van de zoekstring afgehaald en gaat de cursor terug naar de -plaats waar hij stond voordat je de "u" intypte, i.e. de plaats waar "c" het -eerst voorkomt. +met zoeken en je tikt een "c", dan ga je naar de plaats waar de "c" het +eerst voorkomt. Tik je vervolgens een "u", dan gaat de cursor naar de +plaats waar de string "cu" het eerst voorkomt. Als je nu tikt, dan +wordt de "u" van de zoekstring afgehaald, en gaat de cursor terug naar de +plaats waar hij stond voordat je de "u" intikte, namelijk daar waar "c" het +eerst voorkwam. -Als je tijdens een zoekoperatie een control- of meta-teken intypt dan +Als je tijdens een zoekoperatie een CONTROL- of META-teken intikt, dan wordt het zoeken beëindigd. Er zijn een paar uitzonderingen, namelijk tekens die tijdens zoeken een speciale betekenis hebben, zoals C-s en C-r. Met C-s begin je te zoeken naar de plaats waar de zoekstring voor het eerst voorkomt NA de huidige cursorpositie. Als je iets wilt zoeken dat eerder in -de tekst moet voorkomen, gebruik dan C-r i.p.v. C-s. Alles wat we nu weten -over C-s geldt ook voor C-r, alleen de zoekrichting is omgedraaid. +de tekst moet voorkomen, gebruik dan C-r in plaats van C-s. Alles wat we nu weten +over C-s geldt ook voor C-r, alleen is de zoekrichting omgedraaid. * MEERDERE VENSTERS ------------------- Een van Emacs' aardige eigenschappen is dat je meerdere vensters op het -scherm kunt laten zien. +scherm kan laten zien. ->> Zet de cursor op deze regel en type C-u 0 C-l. +>> Zet de cursor op deze regel en tik C-u 0 C-l. ->> Type C-x 2 om het scherm in twee vensters op te splitsen. - Beide vensters laten deze uitleg zien; de cursor blijft in het +>> Tik C-x 2 om het scherm in twee vensters op te splitsen. + Beide vensters laten deze inleiding zien; de cursor blijft in het bovenste venster. ->> Type C-M-v om de tekst in het onderste venster te verschuiven. - (Als je geen Meta toets hebt, type dan ESC C-v.) +>> Tik C-M-v om de tekst in het onderste venster te verschuiven. + (Als je geen META-toets hebt, tik dan ESC C-v.) ->> Type C-x o (met de `o' van `other'; `ander' in het Nederlands) +>> Tik C-x o (met de o van "other"; "ander" in het Nederlands) om de cursor naar het andere venster te verplaatsen. ->> Verschuif de tekst in het onderste venster, m.b.v. C-v en M-v. - Zorg ervoor dat je deze uitleg in het bovenste venster leest. +>> Verschuif de tekst in het onderste venster, met C-v en M-v. + Zorg ervoor dat je deze inleiding in het bovenste venster leest. ->> Type weer C-x o om de cursor weer in het bovenste venster +>> Tik weer C-x o om de cursor weer in het bovenste venster te zetten. De cursor staat weer precies op de plaats waar hij stond toen je het venster verliet. -Je kunt C-x o blijven gebruiken om van venster naar venster te gaan. Elk -venster heeft zijn eigen cursorpositie; de cursor is altijd maar zichtbaar +Je kan C-x o blijven gebruiken om van venster naar venster te gaan. Elk +venster heeft zijn eigen cursorpositie; de cursor is altijd enkel zichtbaar in een daarvan. Alle normale commando's hebben betrekking op het venster -waarin de cursor staat. Dit venster is het `geselecteerde venster' -(`selected window' in het Engels). +waarin de cursor staat. Dit venster is het "geselecteerde venster" +("selected window" in het Engels). -Het C-M-v commando is erg nuttig wanneer je tekst aan het bewerken bent in +Het C-M-v commando is erg nuttig wanneer je tekst aan het editeren bent in het ene venster, terwijl je het andere venster als referentie gebruikt. -Je kunt de cursor dan altijd in het venster houden waarin je bezig bent, +Je kan de cursor dan altijd in het venster houden waarin je bezig bent, terwijl je met C-M-v door de tekst in het andere venster loopt. -C-M-v is een voorbeeld van een CONTROL-META teken. Als je een echte META -toets hebt kun je C-M-v intypen door zowel CTRL als META ingedrukt te -houden terwijl je v typt. Het maakt niet uit in welke volgorde je de CTRL -en META indrukt; het gaat erom welke toetsen ingedrukt zijn terwijl je typt. +C-M-v is een voorbeeld van een CONTROL-META teken. Als je een echte +META-toets hebt kan je C-M-v intikken door zowel CTRL als META ingedrukt te +houden terwijl je v tikt. Het maakt niet uit in welke volgorde je CTRL en +META indrukt; het gaat erom welke toetsen ingedrukt zijn terwijl je tikt. -Als je geen echte META toets hebt kun je ESC gebruiken; de volgorde maakt -dan wel uit. Je moet dan ESC typen, gevolgd door CTRL-v; CTRL-ESC v zal -niet werken. Dit komt doordat ESC zelf een teken is, terwijl CTRL en META -dat niet zijn. +Als je geen echte META-toets hebt kan je ESC gebruiken; de volgorde is dan +wel belangrijk. Je moet dan eerst ESC tikken, gevolgd door CTRL-v; +CTRL-ESC v zal niet werken. Dit komt doordat ESC zelf een teken is, +terwijl CTRL en META dat niet zijn. ->> Type C-x 1 (in het bovenste venster) om het onderste venster te laten +>> Tik C-x 1 (in het bovenste venster) om het onderste venster te laten verdwijnen. -(Als je C-x 1 typt in het onderste venster laat je het bovenste -verdwijnen. C-x 1 betekent zoveel als `ik wil maar 1 venster, -en wel dat venster waar de cursor nu in staat.') +(Als je C-x 1 tikt in het onderste venster laat je het bovenste +verdwijnen. C-x 1 betekent zoveel als "ik wil maar 1 venster, +en wel dat venster waar de cursor nu in staat.") Hier is nog een manier om twee venster te krijgen die elk een andere tekst laten zien: ->> Type C-x 4 C-f gevolgd door de naam van een van je bestanden, gevolgd +>> Tik C-x 4 C-f gevolgd door de naam van een van je bestanden, gevolgd door . Het opgegeven bestand zal in het onderste venster verschijnen, en de cursor zal in dat venster staan. ->> Type C-x o om terug naar het bovenste venster te gaan, en C-x 1 om +>> Tik C-x o om terug naar het bovenste venster te gaan, en C-x 1 om het onderste venster te laten verdwijnen. @@ -927,15 +935,15 @@ laten zien: ------------------------------ Soms kom je in Emacs in een recursief bewerkingsniveau terecht (Engels: -`recursive editing level'). Dit is te zien in de moderegel aan de rechte -haken die om de haakjes van de naam van de hoofdmode staan. Dan staat er +"recursive editing level"). Dit is te zien in de modusregel aan de vierkante +haken die om de haakjes van de naam van de hoofdmodus staan. Dan staat er bijvoorbeeld [(Fundamental)] in plaats van (Fundamental). -Type ESC ESC ESC Om uit een recursief bewerkingsniveau te komen. Dit is -een generiek `ontsnappingscommando'. Je kunt het ook gebruiken om extra -vensters weg te gooien of om uit de minibuffer te komen. +Tik ESC ESC ESC Om uit een recursief bewerkingsniveau te komen. Dit is +een algemeen "ontsnappingscommando". Je kan het ook gebruiken om extra +vensters te verwijderen of om uit de minibuffer te komen. ->> Type M-x om in een minibuffer te komen, en type dan ESC ESC ESC +>> Tik M-x om in een minibuffer te komen, en tik dan ESC ESC ESC om er weer uit te komen. C-g is niet bruikbaar om uit een recursief bewerkingsniveau te komen. De @@ -946,127 +954,127 @@ het recursieve bewerkingsniveau. * MEER INFORMATIE ----------------- -We hebben geprobeerd je met deze uitleg precies genoeg informatie te geven -om met Emacs te beginnen. De mogelijkheden van Emacs zijn zo legio dat -het onmogelijk is nu alles uit te leggen. Emacs heeft zoveel nuttige -mogelijkheden dat je er meer over zou kunnen willen leren. Emacs heeft +We hebben geprobeerd je met deze inleiding precies genoeg informatie te leveren +om met Emacs te beginnen werken. De mogelijkheden van Emacs zijn zo groot dat +het onmogelijk is nu alles uit te leggen. Het kan zijn dat je meer over +Emacs wil leren omdat het zoveel nuttige mogelijkheden heeft. Emacs heeft commando's om documentatie te laten zien over Emacs commando's. Deze -`helpcommando's' beginnen allemaal met C-h: `het Hulpteken'. +"helpcommando's" beginnen allemaal met C-h: "het Hulpteken". -Om hulp te krijgen, type C-h, gevolgd door een teken om aan te duiden -welke hulp je wilt. Als je het echt niet meer weet, type C-h ? en Emacs -vertelt welke hulp het allemaal te bieden heeft. Als je C-h hebt getypt -maar van gedachten veranderd bent, type je gewoon C-g om het af te breken. +Om hulp te krijgen tik je C-h, gevolgd door een teken om aan te duiden +welke hulp je wilt. Als je het echt niet meer weet, tik C-h ? en Emacs +vertelt welke hulp het allemaal te bieden heeft. Als je C-h hebt getikt +maar van gedachten veranderd bent, tik je gewoon C-g om het af te breken. -(Op sommige computers is de betekenis van C-h veranderd. Dat is een -slecht plan, zeker als die verandering op alle gebruikers invloed heeft, -en is dus een geldige reden om je beklag te doen bij de systeembeheerder -of helpdesk. Als C-h intussen niet een bericht onderaan het scherm laat -zien over mogelijke hulp, probeer dan de F1 toets (functietoets 1) of -gebruik M-x help RET.) +(In sommige installaties wordt de betekenis van C-h veranderd. Dat is geen goed +idee, zeker als die verandering op alle gebruikers invloed heeft, en is +een geldige reden om je beklag te doen bij de systeembeheerder of de +helpdesk. Als C-h intussen niet een bericht onderaan het scherm laat zien +over mogelijke hulp, probeer dan de F1 toets (functietoets 1) of gebruik +M-x help RET.) -De eenvoudigste hulp is C-h c. Type C-h, het teken `c' en een teken of +De eenvoudigste hulp is C-h c. Tik C-h, het teken "c" en een teken of uitgebreid commando, en Emacs laat een zeer korte beschrijving van het commando zien. ->> Type C-h c Control-p. +>> Tik C-h c Control-p. De beschrijving die getoond wordt zou zoiets moeten zijn als C-p runs the command previous-line (Nederlands: C-p voert het commando previous-line uit.) -Dit commando vertelt je `de naam van de functie'. Functies worden vooral +Dit commando vertelt je "de naam van de functie". Functies worden vooral gebruikt om Emacs uit te breiden of aan de wensen van de gebruiker aan te passen. Aangezien functienamen gekozen zijn om aan te geven wat de -functie doet, zijn ze ook geschikt als erg korte documentatie; genoeg om +functie doet, zijn ze ook geschikt als heel korte documentatie; genoeg om je te herinneren aan wat de commando's die je al geleerd hebt betekenen. -Uitgebreide commando's zoals C-x C-s en (als je geen META, EDIT or ALT -toets hebt) v kunnen ook getypt worden na C-h c. +Uitgebreide commando's zoals C-x C-s en (als je geen META-, EDIT- of +ALT-toets hebt) v kunnen ook getikt worden na C-h c. -Om meer informatie over een commando te krijgen, type C-h k in plaats van +Om meer informatie over een commando te krijgen, tik C-h k in plaats van C-h c. ->> Type C-h k Control-p. +>> Tik C-h k C-p. -Dit laat de documentatie van de functie zien, inclusief de naam van de -functies, in een apart venster. Als je klaar bent met lezen, type C-x 1 -om van dat venster af te komen. Je hoeft dat natuurlijk niet meteen te -doen. Je kunt ook eerst wat anders doen voordat je C-x 1 typt. +Dit laat de documentatie van de functie, inclusief de naam van de functie, +in een apart venster zien. Als je klaar bent met lezen, tik C-x 1 om van +dat venster af te komen. Je hoeft dat natuurlijk niet meteen te doen. Je +kan ook eerst wat anders doen voordat je C-x 1 tikt. Hier zijn nog wat nuttige mogelijkheden van C-h: C-h f Beschrijf een functie. Je moet de naam van de functie - intypen. + intikken. ->> Type C-h f previous-line +>> Tik C-h f previous-line Dit laat alle informatie zien die Emacs heeft over de functie die het C-p commando implementeert. - C-h a Commando Apropos. Type een woord in en Emacs zal een + C-h a Commando Apropos. Tik een woord in en Emacs zal een lijst van alle commando's laten zien waarin dat woord voorkomt. Al deze commando's kunnen aangeroepen worden met M-x. Bij sommige commando's staat met welke tekens dit commando direct uitgevoerd kan worden. ->> Type C-h a file. +>> Tik C-h a file. -Dit laat in een ander venster alle M-x commando's zien met `file' in hun -naam. Je zult teken-commando's zien als C-x C-f naast de overeenkomende +Dit laat in een ander venster alle M-x commando's zien met "file" in hun +naam. Je zal teken-commando's zien als C-x C-f naast de overeenkomende commandonaam zoals find-file. ->> Type C-M-v herhaaldelijk om de tekst in het hulpvenster te verschuiven. +>> Tik C-M-v herhaaldelijk om de tekst in het hulpvenster te verschuiven. ->> Type C-x 1 om het hulpvenster weg te gooien. +>> Tik C-x 1 om het hulpvenster te verwijderen. * CONCLUSIE ----------- Denk eraan dat je met C-x C-c gebruikt om Emacs te verlaten. Om tijdelijk -een shell te krijgen en daarna weer in Emacs terug te komen, type C-x. +een shell te krijgen en daarna weer in Emacs terug te komen, tik C-z. -De bedoeling van deze uitleg is dat ze begrijpelijk is voor alle nieuwe -Emacs gebruikers. Als je dus iets onduidelijks bent tegengekomen blijf -dan niet zitten en maak jezelf geen verwijten. Klaag erover! +De bedoeling van deze inleiding is dat ze begrijpelijk is voor alle nieuwe +Emacs-gebruikers. Als je dus iets onduidelijks bent tegengekomen, blijf +dan niet zitten en maak jezelf geen verwijten. Doe je beklag! * KOPIËREN ----------- -(De Engelse versie van) deze uitleg is voorafgegaan door een lange reeks -van Emacs tutorials, die begon met de uitleg die Stuart Cracraft schreef +(De Engelse versie van) deze inleiding is voorafgegaan door een lange reeks +van Emacs-inleidingen, die begon met de inleiding die Stuart Cracraft schreef voor de originele Emacs. Deze Nederlandse vertaling is gemaakt door Pieter Schoenmakers op basis van de GNU Emacs 20.2 -TUTORIAL. +TUTORIAL, en verbeterd en verbeterd door Frederik Fouvry. (Wat nu volgt is een vertaling naar het Nederlands van de condities voor -gebruik en verspreiding van deze uitleg. Deze vertaling is niet +gebruik en verspreiding van deze inleiding. Deze vertaling is niet gecontroleerd door een jurist. Er kunnen derhalve geen rechten aan de vertaling worden ontleend, en de vertaling wordt gevolgd door het Engelse origineel.) -Deze versie van de uitleg valt onder copyright, net als GNU Emacs. -Je mag deze uitleg distribueren onder bepaalde condities: +Deze versie van de inleiding valt onder copyright, net als GNU Emacs. +Je mag deze inleiding verdelen onder bepaalde voorwaarden: Copyright (c) 1985, 1996, 1997 Free Software Foundation Iedereen mag letterlijke kopieën van dit document, zowel ontvangen als - verspreiden, op elke medium, vooropgesteld dat de copyrightmelding en - toestemmingsmelding niet aangetast worden en dat de verspreider aan de + verspreiden, op elk medium, vooropgesteld dat de copyrightvermelding en + de toestemmingsmelding niet veranderd worden en dat de verspreider aan de ontvanger dezelfde distributierechten verleent als aan hem verleend - door deze melding. + worden door deze melding. - Toestemming wordt verleend om gemodificeerde versies van dit document, - of delen daarvan, te verspreiden, onder bovenstaande condities, - vooropgesteld dat ze ook duidelijk melding maken van degene die als - laatste modificaties doorgevoerd heeft. + Toestemming wordt verleend om veranderde versies van dit document, + of delen daarvan, te verspreiden, onder bovenstaande voorwaarden, + vooropgesteld dat ze ook duidelijk vermelden wie als + laatste veranderingen aangebracht heeft. -De condities voor het kopiëren van Emacs zelf zijn complexer dan dit, +De condities voor het kopiëren van Emacs zelf zijn ingewikkelder dan dit, maar gebaseerd op dezelfde gedachte. Lees het bestand COPYING en geef vervolgens kopieën van Emacs aan al je vrienden. Help bij het uitroeien -van softwarebeschermingspolitiek (`software eigendom') door vrije software +van softwarebeschermingspolitiek ("eigendom") door vrije software te gebruiken, te schrijven en te delen! (Engels origineel van de copyrightmelding en condities: From 3b90e93257232129b3d1243df018e3d731f2b883 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:00:03 +0000 Subject: [PATCH 256/560] (c-mode/symbol): Add ^` to prefix, and change suffix to space, $ or '$, to correctly position point when going to @table style constants like DBL_MAX. --- lisp/info-look.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/info-look.el b/lisp/info-look.el index bc886f0320c..40bfaef4732 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -634,8 +634,15 @@ Return nil if there is nothing appropriate in the buffer near point." :regexp "\\(struct \\|union \\|enum \\)?[_a-zA-Z][_a-zA-Z0-9]*" :doc-spec '(("(libc)Function Index" nil "^[ \t]+-+ \\(Function\\|Macro\\): .*\\<" "\\>") + ;; prefix/suffix has to match things like + ;; " -- Macro: int F_DUPFD" + ;; " -- Variable: char * tzname [2]" + ;; "`DBL_MAX'" (texinfo @table) + ;; suffix "\\>" is not used because that sends DBL_MAX to + ;; DBL_MAX_EXP ("_" is a non-word char) ("(libc)Variable Index" nil - "^[ \t]+-+ \\(Variable\\|Macro\\): .*\\<" "\\>") + "^\\([ \t]+-+ \\(Variable\\|Macro\\): .*\\<\\|`\\)" + "\\( \\|'?$\\)") ("(libc)Type Index" nil "^[ \t]+-+ Data Type: \\<" "\\>") ("(termcap)Var Index" nil From 5754a69e2e4e05ee1048181871a12837fd7e8d5f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:05:13 +0000 Subject: [PATCH 257/560] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 324c00cd3ba..ff71b8a1734 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-15 Kevin Ryde + + * info-look.el (c-mode/symbol): Add ^` to prefix, and change + suffix to space, $ or '$, to correctly position point when going + to @table style constants like DBL_MAX. + 2005-01-15 Jorgen Schaefer (tiny change) * type-break.el (type-break-mode, type-break-file-time) From 2d3eadf205f23f7866907d58d3ee75f84f2176af Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:05:47 +0000 Subject: [PATCH 258/560] Fix Copyright years. --- lisp/info-look.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/info-look.el b/lisp/info-look.el index 40bfaef4732..4fc2c6b4c63 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -1,7 +1,7 @@ ;;; info-look.el --- major-mode-sensitive Info index lookup facility ;; An older version of this was known as libc.el. -;; Copyright (C) 1995,96,97,98,99,2001,03,04 Free Software Foundation, Inc. +;; Copyright (C) 1995,96,97,98,99,2001,03,04,05 Free Software Foundation, Inc. ;; Author: Ralph Schleicher ;; (did not show signs of life (Nov 2001) -stef) From 1086788e9298994ae121b82a11a8c09510cad5e7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:27:41 +0000 Subject: [PATCH 259/560] Updated to work with movemail from GNU Mailutils (rmail-pop-password, rmail-pop-password-required): Moved to rmail-obsolete group. (rmail-set-pop-password): Renamed to rmail-set-remote-password. All callers updated. (rmail-get-pop-password): Renamed to rmail-get-remote-password. Take an argument specifying whether it is POP or IMAP mailbox we are using. All callers updated. (rmail-pop-password-error): Renamed to rmail-remote-password-error. Added mailutils-specific error message. (rmail-movemail-search-path) (rmail-movemail-variant-in-use): New variables. (rmail-remote-password, rmail-remote-password-required): New customization variables. (rmail-probe,rmail-autodetect, rmail-movemail-variant-p): New functions (rmail-parse-url): New function. (rmail-get-new-mail, rmail-insert-inbox-text): Updated for use with GNU mailutils movemail. --- lisp/mail/rmail.el | 305 +++++++++++++++++++++++++++++++++------------ 1 file changed, 223 insertions(+), 82 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index b913a73ab7f..a2b6a693ab9 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1,6 +1,6 @@ ;;; rmail.el --- main code of "RMAIL" mail reader for Emacs -;; Copyright (C) 1985,86,87,88,93,94,95,96,97,98,2000, 01, 2004 +;; Copyright (C) 1985,86,87,88,93,94,95,96,97,98,2000,01,2004,2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -91,6 +91,9 @@ :prefix "rmail-edit-" :group 'rmail) +(defgroup rmail-obsolete nil + "Rmail obsolete customization variables." + :group 'rmail) (defcustom rmail-movemail-program nil "If non-nil, name of program for fetching new mail." @@ -98,15 +101,46 @@ :type '(choice (const nil) string)) (defcustom rmail-pop-password nil - "*Password to use when reading mail from a POP server, if required." + "*Password to use when reading mail from POP server. Please, use rmail-remote-password instead." :type '(choice (string :tag "Password") (const :tag "Not Required" nil)) - :group 'rmail-retrieve) + :group 'rmail-obsolete) (defcustom rmail-pop-password-required nil - "*Non-nil if a password is required when reading mail using POP." + "*Non-nil if a password is required when reading mail from a POP server. Please, use rmail-remote-password-required instead." :type 'boolean - :group 'rmail-retrieve) + :group 'rmail-obsolete) + +(defcustom rmail-remote-password nil + "*Password to use when reading mail from a remote server. This setting is ignored for mailboxes whose URL already contains a password." + :type '(choice (string :tag "Password") + (const :tag "Not Required" nil)) + :set-after '(rmail-pop-password) + :set #'(lambda (symbol value) + (set-default symbol + (if (and (not value) + (boundp 'rmail-pop-password) + rmail-pop-password) + rmail-pop-password + value)) + (setq rmail-pop-password nil)) + :group 'rmail-retrieve + :version "21.3.50.1") + +(defcustom rmail-remote-password-required nil + "*Non-nil if a password is required when reading mail from a remote server." + :type 'boolean + :set-after '(rmail-pop-password-required) + :set #'(lambda (symbol value) + (set-default symbol + (if (and (not value) + (boundp 'rmail-pop-password-required) + rmail-pop-password-required) + rmail-pop-password-required + value)) + (setq rmail-pop-password-required nil)) + :group 'rmail-retrieve + :version "21.3.50.1") (defcustom rmail-movemail-flags nil "*List of flags to pass to movemail. @@ -116,13 +150,14 @@ or `-k' to enable Kerberos authentication." :group 'rmail-retrieve :version "20.3") -(defvar rmail-pop-password-error "invalid usercode or password\\| -unknown user name or bad password" - "Regular expression matching incorrect-password POP server error messages. +(defvar rmail-remote-password-error "invalid usercode or password\\| +unknown user name or bad password\\|Authentication failed\\|MU_ERR_AUTH_FAILURE" + "Regular expression matching incorrect-password POP or IMAP server error +messages. If you get an incorrect-password error that this expression does not match, please report it with \\[report-emacs-bug].") -(defvar rmail-encoded-pop-password nil) +(defvar rmail-encoded-remote-password nil) (defcustom rmail-preserve-inbox nil "*Non-nil if incoming mail should be left in the user's inbox, @@ -130,6 +165,67 @@ rather than deleted, after it is retrieved." :type 'boolean :group 'rmail-retrieve) +(defcustom rmail-movemail-search-path nil + "*List of directories to search for movemail (in addition to `exec-path')." + :group 'rmail-retrieve + :type '(repeat (directory))) + +(defun rmail-probe (prog) + "Determine what flavor of movemail PROG is by executing it with --version +command line option and analyzing its output." + (with-temp-buffer + (let ((tbuf (current-buffer))) + (buffer-disable-undo tbuf) + (call-process prog nil tbuf nil "--version") + (if (not (buffer-modified-p tbuf)) + ;; Should not happen... + nil + (goto-char (point-min)) + (cond + ((looking-at ".*movemail: invalid option") + 'emacs) ;; Possibly... + ((looking-at "movemail (GNU Mailutils .*)") + 'mailutils) + (t + ;; FIXME: + 'emacs)))))) + +(defun rmail-autodetect () + "Determine and return the flavor of `movemail' program in use. If +rmail-movemail-program is set, use it. Otherwise, look for `movemail' +in the path constructed by appending rmail-movemail-search-path, +exec-path and exec-directory." + (if rmail-movemail-program + (rmail-probe rmail-movemail-program) + (catch 'scan + (dolist (dir (append rmail-movemail-search-path exec-path + (list exec-directory))) + (when (and dir (file-accessible-directory-p dir)) + (let ((progname (expand-file-name "movemail" dir))) + (when (and (not (file-directory-p progname)) + (file-executable-p progname)) + (let ((x (rmail-probe progname))) + (when x + (setq rmail-movemail-program progname) + (throw 'scan x)))))))))) + +(defvar rmail-movemail-variant-in-use nil + "The movemail variant currently in use. Known variants are: + + `emacs' Means any implementation, compatible with the native Emacs one. + This is the default; + `mailutils' Means GNU mailutils implementation, capable of handling full +mail URLs as the source mailbox;") + +;;;###autoload +(defun rmail-movemail-variant-p (&rest variants) + "Return t if the current movemail variant is any of VARIANTS. +Currently known variants are 'emacs and 'mailutils." + (when (not rmail-movemail-variant-in-use) + ;; Autodetect + (setq rmail-movemail-variant-in-use (rmail-autodetect))) + (not (null (member rmail-movemail-variant-in-use variants)))) + ;;;###autoload (defcustom rmail-dont-reply-to-names nil "\ *A regexp specifying addresses to prune from a reply message. @@ -1516,6 +1612,40 @@ It returns t if it got any new messages." ;; Don't leave the buffer screwed up if we get a disk-full error. (or found (rmail-show-message))))) +(defun rmail-parse-url (file) + "Parse the supplied URL. Return (list MAILBOX-NAME REMOTE PASSWORD GOT-PASSWORD) +WHERE MAILBOX-NAME is the name of the mailbox suitable as argument to the +actual version of `movemail', REMOTE is non-nil if MAILBOX-NAME refers to +a remote mailbox, PASSWORD is the password if it should be +supplied as a separate argument to `movemail' or nil otherwise, GOT-PASSWORD +is non-nil if the user has supplied the password interactively. +" + (if (string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file) + (let (got-password supplied-password + (proto (match-string 1 file)) + (user (match-string 3 file)) + (pass (match-string 5 file)) + (host (substring file (or (match-end 2) + (+ 3 (match-end 1)))))) + (if (not pass) + (when rmail-remote-password-required + (setq got-password (not (rmail-have-password))) + (setq supplied-password (rmail-get-remote-password + (string-equal proto "imap"))))) + + (if (rmail-movemail-variant-p 'emacs) + (if (string-equal proto "pop") + (list (concat "po:" user ":" host) + t + (or pass supplied-password) + got-password) + (error "Emacs movemail does not support %s protocol" proto)) + (list file + (or (string-equal proto "pop") (string-equal proto "imap")) + supplied-password + got-password))) + (list file nil nil nil))) + (defun rmail-insert-inbox-text (files renamep) ;; Detect a locked file now, so that we avoid moving mail ;; out of the real inbox file. (That could scare people.) @@ -1524,10 +1654,15 @@ It returns t if it got any new messages." (file-name-nondirectory buffer-file-name))) (let (file tofile delete-files movemail popmail got-password password) (while files - ;; Handle POP mailbox names specially; don't expand as filenames + ;; Handle remote mailbox names specially; don't expand as filenames ;; in case the userid contains a directory separator. (setq file (car files)) - (setq popmail (string-match "^po:" file)) + (let ((url-data (rmail-parse-url file))) + (setq file (nth 0 url-data)) + (setq popmail (nth 1 url-data)) + (setq password (nth 2 url-data)) + (setq got-password (nth 3 url-data))) + (if popmail (setq renamep t) (setq file (file-truename @@ -1535,7 +1670,12 @@ It returns t if it got any new messages." (setq tofile (expand-file-name ;; Generate name to move to from inbox name, ;; in case of multiple inboxes that need moving. - (concat ".newmail-" (file-name-nondirectory file)) + (concat ".newmail-" + (file-name-nondirectory + (if (memq system-type '(windows-nt cygwin)) + ;; cannot have "po:" in file name + (substring file 3) + file))) ;; Use the directory of this rmail file ;; because it's a nuisance to use the homedir ;; if that is on a full disk and this rmail @@ -1560,18 +1700,7 @@ It returns t if it got any new messages." (setq file (expand-file-name (user-login-name) file))))) (cond (popmail - (if rmail-pop-password-required - (progn (setq got-password (not (rmail-have-password))) - (setq password (rmail-get-pop-password)))) - (if (memq system-type '(windows-nt cygwin)) - ;; cannot have "po:" in file name - (setq tofile - (expand-file-name - (concat ".newmail-pop-" - (file-name-nondirectory (substring file 3))) - (file-name-directory - (expand-file-name buffer-file-name))))) - (message "Getting mail from post office ...")) + (message "Getting mail from the remote server ...")) ((and (file-exists-p tofile) (/= 0 (nth 7 (file-attributes tofile)))) (message "Getting mail from %s..." tofile)) @@ -1603,50 +1732,59 @@ It returns t if it got any new messages." (write-region (point) (point) file) (file-error nil)))) (t - (let ((errors nil)) - (unwind-protect - (save-excursion - (setq errors (generate-new-buffer " *rmail loss*")) - (buffer-disable-undo errors) - (let ((args - (append - (list (or rmail-movemail-program - (expand-file-name "movemail" - exec-directory)) - nil errors nil) - (if rmail-preserve-inbox - (list "-p") - nil) - rmail-movemail-flags - (list file tofile) - (if password (list password) nil)))) - (apply 'call-process args)) - (if (not (buffer-modified-p errors)) - ;; No output => movemail won - nil - (set-buffer errors) - (subst-char-in-region (point-min) (point-max) - ?\n ?\ ) - (goto-char (point-max)) - (skip-chars-backward " \t") - (delete-region (point) (point-max)) - (goto-char (point-min)) - (if (looking-at "movemail: ") - (delete-region (point-min) (match-end 0))) - (beep t) - (message "movemail: %s" - (buffer-substring (point-min) - (point-max))) - ;; If we just read the password, most likely it is - ;; wrong. Otherwise, see if there is a specific - ;; reason to think that the problem is a wrong passwd. - (if (or got-password - (re-search-forward rmail-pop-password-error - nil t)) - (rmail-set-pop-password nil)) - (sit-for 3) - nil)) - (if errors (kill-buffer errors)))))) + (with-temp-buffer + (let ((errors (current-buffer))) + (buffer-disable-undo errors) + (let ((args + (append + (list (or rmail-movemail-program + (expand-file-name "movemail" + exec-directory)) + nil errors nil) + (if rmail-preserve-inbox + (list "-p") + nil) + (if (rmail-movemail-variant-p 'mailutils) + (append (list "--emacs") rmail-movemail-flags) + rmail-movemail-flags) + (list file tofile) + (if password (list password) nil)))) + (apply 'call-process args)) + (if (not (buffer-modified-p errors)) + ;; No output => movemail won + nil + (set-buffer errors) + (subst-char-in-region (point-min) (point-max) + ?\n ?\ ) + (goto-char (point-max)) + (skip-chars-backward " \t") + (delete-region (point) (point-max)) + (goto-char (point-min)) + (if (looking-at "movemail: ") + (delete-region (point-min) (match-end 0))) + (beep t) + ;; If we just read the password, most likely it is + ;; wrong. Otherwise, see if there is a specific + ;; reason to think that the problem is a wrong passwd. + (if (or got-password + (re-search-forward rmail-remote-password-error + nil t)) + (rmail-set-remote-password nil)) + + ;; If using Mailutils, remove initial error code + ;; abbreviation + (when (rmail-movemail-variant-p 'mailutils) + (goto-char (point-min)) + (when (looking-at "[A-Z][A-Z0-9_]*:") + (delete-region (point-min) (match-end 0)))) + + (message "movemail: %s" + (buffer-substring (point-min) + (point-max))) + + (sit-for 3) + nil))))) + ;; At this point, TOFILE contains the name to read: ;; Either the alternate name (if we renamed) ;; or the actual inbox (if not renaming). @@ -3834,27 +3972,30 @@ TEXT and INDENT are not used." ; nor is it meant to be. ;;;###autoload -(defun rmail-set-pop-password (password) - "Set PASSWORD to be used for retrieving mail from a POP server." +(defun rmail-set-remote-password (password) + "Set PASSWORD to be used for retrieving mail from a POP or IMAP server." (interactive "sPassword: ") (if password - (setq rmail-encoded-pop-password + (setq rmail-encoded-remote-password (rmail-encode-string password (emacs-pid))) - (setq rmail-pop-password nil) - (setq rmail-encoded-pop-password nil))) + (setq rmail-remote-password nil) + (setq rmail-encoded-remote-password nil))) -(defun rmail-get-pop-password () - "Get the password for retrieving mail from a POP server. If none +(defun rmail-get-remote-password (imap) + "Get the password for retrieving mail from a POP or IMAP server. If none has been set, then prompt the user for one." - (if (not rmail-encoded-pop-password) - (progn (if (not rmail-pop-password) - (setq rmail-pop-password (read-passwd "POP password: "))) - (rmail-set-pop-password rmail-pop-password) - (setq rmail-pop-password nil))) - (rmail-encode-string rmail-encoded-pop-password (emacs-pid))) + (when (not rmail-encoded-remote-password) + (if (not rmail-remote-password) + (setq rmail-remote-password + (read-passwd (if imap + "IMAP password: " + "POP password: ")))) + (rmail-set-remote-password rmail-remote-password) + (setq rmail-remote-password nil)) + (rmail-encode-string rmail-encoded-remote-password (emacs-pid))) (defun rmail-have-password () - (or rmail-pop-password rmail-encoded-pop-password)) + (or rmail-remote-password rmail-encoded-remote-password)) (defun rmail-encode-string (string mask) "Encode STRING with integer MASK, by taking the exclusive OR of the From ea20444b9b492e4f895409618bc4e5cd08498b3f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:30:48 +0000 Subject: [PATCH 260/560] Document support for GNU mailutils in rmail.el. --- man/rmail.texi | 208 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 187 insertions(+), 21 deletions(-) diff --git a/man/rmail.texi b/man/rmail.texi index 23eef5abec8..d9654a88e50 100644 --- a/man/rmail.texi +++ b/man/rmail.texi @@ -37,7 +37,10 @@ visiting a proper Rmail file. * Digest: Rmail Digest. Extracting the messages from a digest message. * Out of Rmail:: Converting an Rmail file to mailbox format. * Rot13: Rmail Rot13. Reading messages encoded in the rot13 code. -* Movemail: Movemail. More details of fetching new mail. +* Movemail:: More details of fetching new mail. +* Remote Mailboxes:: Retrieving Mail from Remote Mailboxes. +* Other Mailbox Formats:: Retrieving Mail from Local Mailboxes in + Various Formats @end menu @node Rmail Basics @@ -1152,9 +1155,116 @@ rot13-other-window}. This displays the current buffer in another window which applies the code when displaying the text. @node Movemail -@section @code{movemail} and POP +@section @code{movemail} program @cindex @code{movemail} program + When invoked for the first time, Rmail attempts to locate +@code{movemail} program and determine its version. There are +two versions of @code{movemail} program: the native one, shipped with +GNU Emacs (we will refer to it as @samp{emacs version}) and the one +coming from GNU mailutils (@xref{movemail,,,mailutils,GNU mailutils}, +we will refer to it as @samp{mailutils version}). Both versions are +compatible with each other in the sense that they support the same +command line syntax and the same basic subset of options. However, +the @samp{mailutils} version offers a much richer set of +features. + +The @samp{Emacs version} of @code{movemail} is able to retrieve mail from usual +UNIX mailbox formats and from remote mailboxes using the POP3 protocol. + +The @samp{Mailutils version} is able to handle a wide set of mailbox +formats, such as plain UNIX mailboxes, @code{maildir} and @code{MH} +mailboxes, etc. It is able to retrieve remote mail using POP3 or IMAP4 +protocol. In the latter case, @code{mailutils movemail} can be +instructed to retrieve mail using a TLS encrypted channel. + +The @samp{Mailutils movemail} accepts mailbox argument in the @acronym{URL} +form. The detailed description of mailbox @acronym{URL}s can be found +in @ref{URL,,,mailutils,Mailbox URL Formats}. In short, a +@acronym{URL} is: + +@smallexample +@var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name} +@end smallexample + +@noindent +where square brackets denote optional elements. + +@table @var +@item proto +Specifies the @dfn{mailbox protocol}, or @dfn{format} to +use. The exact semantics of the rest of @acronym{URL} elements depends +on the actual value of @var{proto}. + +@item user +User name to access the remote mailbox. + +@item password +User password to access the remote mailbox. + +@item host-or-file-name +Hostname of the remote server for remote mailboxes or file name of a +local mailbox. +@end table + +@var{Proto} can be one of: + +@table @asis +@item mbox +Usual UNIX mailbox format. In this case, neither @var{user} nor +@var{pass} are used, and @var{host-or-file-name} denotes the file name of +the mailbox file, e.g., @code{mbox://var/spool/mail/smith}. + +@item mh +A local mailbox in the @acronym{MH} format. @var{User} and +@var{pass} are not used. @var{Host-or-file-name} denotes the name of +@acronym{MH} folder, e.g., @code{mh://Mail/inbox}. + +@item maildir +A local mailbox in the @acronym{maildir} format. @var{User} and +@var{pass} are not used, and @var{host-or-file-name} denotes the name of +@code{maildir} mailbox, e.g., @code{maildir://mail/inbox}. + +@item file +Any local mailbox format. Its actual format is detected automatically +by @code{movemail}. + +@item pop +A remote mailbox to be accessed via POP3 protocol. @var{User} +specifies the remote user name to use, @var{pass} may be used to +specify the user password, @var{host-or-file-name} is the name or IP +address of the remote mail server to connect to; e.g., +@code{pop://smith:guessme@@remote.server.net}. + +@item imap +A remote mailbox to be accessed via IMAP4 protocol. @var{User} +specifies the remote user name to use, @var{pass} may be used to +specify the user password, @var{host-or-file-name} is the name or IP +address of the remote mail server to connect to; +e.g., @code{imap://smith:guessme@@remote.server.net}. +@end table + +Alternatively, the mailbox may be specified as a file name of the +mailbox to use. This is equivalent to specifying the @samp{file} protocol: + +@smallexample +/var/spool/mail/user @equiv{} file://var/spool/mail/user +@end smallexample + +@vindex rmail-movemail-program +@vindex rmail-movemail-search-path + To determine which version of @code{movemail} is being used, Rmail +examines the value of @code{rmail-movemail-program} variable. If it +is set, its value is used as a full path to the @code{movemail} binary. +Otherwise, Rmail searches for @code{movemail} in the list of directories +constructed by appending the values of @code{rmail-movemail-search-path} and +@code{exec-path} to @code{exec-directory}. + +@node Remote Mailboxes +@section Retrieving Mail from Remote Mailboxes +@pindex movemail + + @vindex rmail-preserve-inbox When getting new mail, Rmail first copies the new mail from the inbox file to the Rmail file; then it saves the Rmail file; then it truncates @@ -1175,7 +1285,6 @@ file. If there is a crash at the wrong time, this file continues to exist, and Rmail will use it again the next time it gets new mail from that inbox. -@pindex movemail If Rmail is unable to convert the data in @file{~/.newmail-@var{inboxname}} into Babyl format, it renames the file to @file{~/RMAILOSE.@var{n}} (@var{n} is an integer chosen to make the @@ -1186,30 +1295,68 @@ You should look at the file, find whatever message confuses Rmail the corrected file. Some sites use a method called POP for accessing users' inbox data -instead of storing the data in inbox files. @code{movemail} can work -with POP if you compile it with the macro @code{MAIL_USE_POP} defined. -(You can achieve that by specifying @samp{--with-pop} when you run -@code{configure} during the installation of Emacs.) -@code{movemail} only works with POP3, not with older +instead of storing the data in inbox files. The @code{Emacs +movemail} can work with POP if you compile it with the macro +@code{MAIL_USE_POP} defined. (You can achieve that by specifying +@samp{--with-pop} when you run @code{configure} during the +installation of Emacs.) + +The @code{Mailutils movemail} by default supports POP, unless configured +with @samp{--disable-pop} option. + +Both versions of @code{movemail} only work with POP3, not with older versions of POP. @cindex @env{MAILHOST} environment variable -@cindex POP inboxes - Assuming you have compiled and installed @code{movemail} -appropriately, you can specify a POP inbox by using a ``file name'' of -the form @samp{po:@var{username}}, in the inbox list of an Rmail file. -@code{movemail} handles such a name by opening a connection to the POP -server. The @env{MAILHOST} environment variable specifies the machine -to look for the server on; alternatively, you can specify the POP server -host name as part of the mailbox name using the syntax -@samp{po:@var{username}:@var{hostname}}. +@cindex POP mailboxes + No matter which flavor of @code{movemail} you use, you can specify +POP inbox by using POP @dfn{URL} (@pxref{Movemail}). A POP +@acronym{URL} is a ``file name'' of the form +@samp{pop://@var{username}@@@var{hostname}}, where +@var{hostname} is the host name or IP address of the remote mail +server and @var{username} is the user name on that server. +Additionally, you may specify the password in the mailbox @acronym{URL}: +@samp{pop://@var{username}:@var{password}@@@var{hostname}}. In this +case, @var{password} takes preference over the one set by +@code{rmail-remote-password}. This is especially useful if you have +several remote mailboxes with different passwords. + For backward compatibility Rmail also supports two alternative ways +of specifying remote POP mailboxes. Specifying inbox name in the form +@samp{po:@var{username}:@var{hostname}} is equivalent to +@samp{pop://@var{username}@@@var{hostname}}. Alternatively, you may set +a ``file name'' of @samp{po:@var{username}} in the inbox list of an +Rmail file. @code{Movemail} will handle such a name by opening a +connection to the POP server. The @env{MAILHOST} environment variable +will in this case specify the machine to look for the server on. + +@cindex IMAP mailboxes + Another method for accessing remote mailboxes is IMAP. This method is +supported only by the @code{mailutils movemail}. To specify an IMAP +mailbox in the inbox list, use the following mailbox @acronym{URL}: +@samp{imap://@var{username}[:@var{password}]@@@var{hostname}}. The +@var{password} part is optional, as descrbed above. + +@vindex rmail-remote-password +@vindex rmail-remote-password-required @vindex rmail-pop-password @vindex rmail-pop-password-required - Accessing mail via POP may require a password. If the variable -@code{rmail-pop-password} is non-@code{nil}, it specifies the password -to use for POP. Alternatively, if @code{rmail-pop-password-required} is -non-@code{nil}, then Rmail asks you for the password to use. + Accessing a remote mailbox may require a password. Rmail uses the +following algorithm to retrieve it: + +@enumerate +@item If the @var{password} is present in mailbox URL (see above), it +is used. +@item If the variable @code{rmail-remote-password} is +non-@code{nil}, its value is used. +@item Otherwise, if @code{rmail-remote-password-required} is +non-@code{nil}, then Rmail will ask you for the password to use. +@item Otherwise Rmail assumes no password is required. +@end enumerate + + For compatibility with previous versions, @code{rmail-pop-password} +and @code{rmail-pop-password-required} may be used instead of +@code{rmail-remote-password} and @code{rmail-remote-password-required}. @vindex rmail-movemail-flags If you need to pass additional command-line flags to @code{movemail}, @@ -1231,6 +1378,25 @@ received, you can tell @code{movemail} to reverse the order of downloaded messages by adding the @samp{-r} flag to @code{rmail-movemail-flags}. +@cindex TLS encryption (Rmail) + @code{Mailutils movemail} supports TLS encryption. If you wish to +use it, add the @samp{--tls} flag to @code{rmail-movemail-flags}. + +@node Other Mailbox Formats +@section Retrieving Mail from Local Mailboxes in Various Formats + + If your incoming mail is stored on a local machine in a format other +than UNIX mailbox, you will need the @code{mailutils movemail} to retrieve +it. @xref{Movemail}, for the detailed description of @code{movemail} +versions. + + For example, to retrieve mail from a @code{maildir} inbox located in +@file{/var/spool/mail/in}, you would set the following in Rmail inbox list: + +@smallexample +maildir://var/spool/mail/in +@end smallexample + @ignore arch-tag: 034965f6-38df-47a2-a9f1-b8bc8ab37e23 @end ignore From 43805352f135435165b5c1ee2b589e1aac9ae121 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:31:22 +0000 Subject: [PATCH 261/560] *** empty log message *** --- etc/ChangeLog | 5 +++++ lisp/ChangeLog | 23 +++++++++++++++++++++++ man/ChangeLog | 4 ++++ 3 files changed, 32 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index c5521f5a053..b9e9fa20a6e 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2005-01-15 Frederik Fouvry + + * TUTORIAL.nl: Correct translation and the Dutch text (typos). + More consistent use of terminology. + 2005-01-13 Cheng Gao * MORE.STUFF: Add entries of some well known and widely used packages. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ff71b8a1734..ab130e2c09b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2005-01-15 Sergey Poznyakoff + + * mail/rmail.el: Updated to work with movemail from GNU Mailutils + (rmail-pop-password, rmail-pop-password-required): Moved to + rmail-obsolete group. + (rmail-set-pop-password): Renamed to rmail-set-remote-password. + All callers updated. + (rmail-get-pop-password): Renamed to rmail-get-remote-password. + Take an argument specifying whether it is POP or IMAP mailbox we + are using. All callers updated. + (rmail-pop-password-error): Renamed to + rmail-remote-password-error. Added mailutils-specific error + message. + (rmail-movemail-search-path) + (rmail-movemail-variant-in-use): New variables. + (rmail-remote-password, rmail-remote-password-required): New + customization variables. + (rmail-probe,rmail-autodetect, rmail-movemail-variant-p): New + functions. + (rmail-parse-url): New function. + (rmail-get-new-mail, rmail-insert-inbox-text): Updated for use + with GNU mailutils movemail. + 2005-01-15 Kevin Ryde * info-look.el (c-mode/symbol): Add ^` to prefix, and change diff --git a/man/ChangeLog b/man/ChangeLog index f0c5307a52b..0f4646e0d73 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-15 Sergey Poznyakoff + + * man/rmail.texi: Document support for GNU mailutils in rmail.el. + 2005-01-13 Richard M. Stallman * commands.texi (Commands): Clarification. From 38be61d50045ef6979a768639bc59e0c4e1e6160 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:34:29 +0000 Subject: [PATCH 262/560] Fix last change. --- man/rmail.texi | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/man/rmail.texi b/man/rmail.texi index d9654a88e50..3cfa1802a88 100644 --- a/man/rmail.texi +++ b/man/rmail.texi @@ -1264,7 +1264,6 @@ constructed by appending the values of @code{rmail-movemail-search-path} and @section Retrieving Mail from Remote Mailboxes @pindex movemail - @vindex rmail-preserve-inbox When getting new mail, Rmail first copies the new mail from the inbox file to the Rmail file; then it saves the Rmail file; then it truncates @@ -1345,13 +1344,17 @@ mailbox in the inbox list, use the following mailbox @acronym{URL}: following algorithm to retrieve it: @enumerate -@item If the @var{password} is present in mailbox URL (see above), it -is used. -@item If the variable @code{rmail-remote-password} is -non-@code{nil}, its value is used. -@item Otherwise, if @code{rmail-remote-password-required} is -non-@code{nil}, then Rmail will ask you for the password to use. -@item Otherwise Rmail assumes no password is required. +@item +If the @var{password} is present in mailbox URL (see above), it is +used. +@item +If the variable @code{rmail-remote-password} is non-@code{nil}, its +value is used. +@item +Otherwise, if @code{rmail-remote-password-required} is non-@code{nil}, +then Rmail will ask you for the password to use. +@item +Otherwise, Rmail assumes no password is required. @end enumerate For compatibility with previous versions, @code{rmail-pop-password} From ad8f7f494f69b7705953475ba9cb68797a9172da Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Jan 2005 14:37:32 +0000 Subject: [PATCH 263/560] Document support for GNU mailutils. --- etc/NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 6fde609a2be..84e04a61cbd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2121,6 +2121,14 @@ displays a buffer menu. This option turns the buffer menu off. --- ** Rmail now displays 5-digit message ids in its summary buffer. ++++ +** Support for `movemail' from GNU mailutils was added to Rmail. +This version of `movemail' allows to read mail from a wide range of +mailbox formats, including remote POP3 and IMAP4 mailboxes with or +without TLS encryption. If GNU mailutils is installed on the system +and its version of `movemail' can be found in exec-path, it will be +used instead of the native one. + --- ** On MS Windows, the "system caret" now follows the cursor. This enables Emacs to work better with programs that need to track From bdd5fa993233b9c57af2068bdbdd54a792d10981 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:07:21 +0000 Subject: [PATCH 264/560] (sh-mode-map): Bind C-c C-\. (sh-backslash-column, sh-backslash-align): New variables. (sh-backslash-region, sh-append-backslash): New functions. --- lisp/progmodes/sh-script.el | 82 +++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index bcabc505a49..019a19ed007 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -448,6 +448,7 @@ This is buffer-local in every such buffer.") (define-key map "\C-c=" 'sh-set-indent) (define-key map "\C-c<" 'sh-learn-line-indent) (define-key map "\C-c>" 'sh-learn-buffer-indent) + (define-key map "\C-c\C-\\" 'sh-backslash-region) (define-key map "=" 'sh-assignment) (define-key map "\C-c+" 'sh-add) @@ -1183,6 +1184,16 @@ This is for the rc shell." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) +(defcustom sh-backslash-column 48 + "*Column in which `sh-backslash-region' inserts backslashes." + :type 'integer + :group 'sh) + +(defcustom sh-backslash-align t + "*If non-nil, `sh-backslash-region' will align backslashes." + :type 'boolean + :group 'sh) + ;; Internal use - not designed to be changed by the user: (defun sh-mkword-regexpr (word) @@ -3547,6 +3558,77 @@ The document is bounded by `sh-here-document-word'." (if (re-search-forward sh-end-of-command nil t) (goto-char (match-end 1)))) +;; Backslashification. Stolen from make-mode.el. + +(defun sh-backslash-region (from to delete-flag) + "Insert, align, or delete end-of-line backslashes on the lines in the region. +With no argument, inserts backslashes and aligns existing backslashes. +With an argument, deletes the backslashes. + +This function does not modify the last line of the region if the region ends +right at the start of the following line; it does not modify blank lines +at the start of the region. So you can put the region around an entire +shell command and conveniently use this command." + (interactive "r\nP") + (save-excursion + (goto-char from) + (let ((column sh-backslash-column) + (endmark (make-marker))) + (move-marker endmark to) + ;; Compute the smallest column number past the ends of all the lines. + (if sh-backslash-align + (progn + (if (not delete-flag) + (while (< (point) to) + (end-of-line) + (if (= (preceding-char) ?\\) + (progn (forward-char -1) + (skip-chars-backward " \t"))) + (setq column (max column (1+ (current-column)))) + (forward-line 1))) + ;; Adjust upward to a tab column, if that doesn't push + ;; past the margin. + (if (> (% column tab-width) 0) + (let ((adjusted (* (/ (+ column tab-width -1) tab-width) + tab-width))) + (if (< adjusted (window-width)) + (setq column adjusted)))))) + ;; Don't modify blank lines at start of region. + (goto-char from) + (while (and (< (point) endmark) (eolp)) + (forward-line 1)) + ;; Add or remove backslashes on all the lines. + (while (and (< (point) endmark) + ;; Don't backslashify the last line + ;; if the region ends right at the start of the next line. + (save-excursion + (forward-line 1) + (< (point) endmark))) + (if (not delete-flag) + (sh-append-backslash column) + (sh-delete-backslash)) + (forward-line 1)) + (move-marker endmark nil)))) + +(defun sh-append-backslash (column) + (end-of-line) + ;; Note that "\\\\" is needed to get one backslash. + (if (= (preceding-char) ?\\) + (progn (forward-char -1) + (delete-horizontal-space) + (indent-to column (if sh-backslash-align nil 1))) + (indent-to column (if sh-backslash-align nil 1)) + (insert "\\"))) + +(defun sh-delete-backslash () + (end-of-line) + (or (bolp) + (progn + (forward-char -1) + (if (looking-at "\\\\") + (delete-region (1+ (point)) + (progn (skip-chars-backward " \t") (point))))))) + (provide 'sh-script) ;;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937 From 56abefac4fea4294b2ab948977bf75d7debfb849 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:08:46 +0000 Subject: [PATCH 265/560] (just-one-space): Argument specifies number of spaces. (eval-expression-print-format): Avoid warning about edebug-active. --- lisp/simple.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index bdc51546a84..82ec0e6f7f2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -647,15 +647,16 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point." (skip-chars-backward " \t") (constrain-to-field nil orig-pos))))) -(defun just-one-space () - "Delete all spaces and tabs around point, leaving one space." - (interactive "*") +(defun just-one-space (n) + "Delete all spaces and tabs around point, leaving one space (or N spaces)." + (interactive "*p") (let ((orig-pos (point))) (skip-chars-backward " \t") (constrain-to-field nil orig-pos) - (if (= (following-char) ? ) - (forward-char 1) - (insert ? )) + (dotimes (i n) + (if (= (following-char) ?\ ) + (forward-char 1) + (insert ?\ ))) (delete-region (point) (progn @@ -899,7 +900,7 @@ display the result of expression evaluation." (if (and (integerp value) (or (not (memq this-command '(eval-last-sexp eval-print-last-sexp))) (eq this-command last-command) - (and (boundp 'edebug-active) edebug-active))) + (if (boundp 'edebug-active) edebug-active))) (let ((char-string (if (or (and (boundp 'edebug-active) edebug-active) (memq this-command '(eval-last-sexp eval-print-last-sexp))) @@ -4115,7 +4116,7 @@ specification for `play-sound'." (play-sound sound))) (define-key global-map "\e\e\e" 'keyboard-escape-quit) - + (defcustom read-mail-command 'rmail "*Your preference for a mail reading package. This is used by some keybindings which support reading mail. @@ -4257,7 +4258,7 @@ Each action has the form (FUNCTION . ARGS)." (list nil nil nil current-prefix-arg)) (compose-mail to subject other-headers continue 'switch-to-buffer-other-frame yank-action send-actions)) - + (defvar set-variable-value-history nil "History of values entered with `set-variable'.") @@ -4320,7 +4321,7 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." ;; Force a thorough redisplay for the case that the variable ;; has an effect on the display, like `tab-width' has. (force-mode-line-update)) - + ;; Define the major mode for lists of completions. (defvar completion-list-mode-map nil From 5f7bccdad82c81f8a78b2953ec854e43ee1e9350 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:09:16 +0000 Subject: [PATCH 266/560] (imenu--split-menu): Copy menulist before sorting. (imenu--generic-function): Use START, not BEG, as pos of definition. --- lisp/imenu.el | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lisp/imenu.el b/lisp/imenu.el index af617498b07..6ee72a88bc4 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -532,7 +532,7 @@ A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).") (push item keep-at-top) (setq menulist (delq item menulist)))) (if imenu-sort-function - (setq menulist (sort menulist imenu-sort-function))) + (setq menulist (sort (copy-sequence menulist) imenu-sort-function))) (if (> (length menulist) imenu-max-items) (setq menulist (mapcar @@ -817,32 +817,30 @@ depending on PATTERNS." (setq start (point)) (goto-char (match-end index)) (setq beg (match-beginning index)) - (goto-char beg) + ;; Go to the start of the match. + ;; That's the official position of this definition. + (goto-char start) (imenu-progress-message prev-pos nil t) ;; Add this sort of submenu only when we've found an ;; item for it, avoiding empty, duff menus. (unless (assoc menu-title index-alist) (push (list menu-title) index-alist)) (if imenu-use-markers - (setq beg (copy-marker beg))) + (setq start (copy-marker start))) (let ((item (if function (nconc (list (match-string-no-properties index) - beg function) + start function) rest) (cons (match-string-no-properties index) - beg))) + start))) ;; This is the desired submenu, ;; starting with its title (or nil). (menu (assoc menu-title index-alist))) ;; Insert the item unless it is already present. (unless (member item (cdr menu)) (setcdr menu - (cons item (cdr menu))))) - ;; Move to the start of the entire match, - ;; to ensure we keep moving backwards - ;; as long as the match is nonempty. - (goto-char start)))) + (cons item (cdr menu)))))))) (set-syntax-table old-table))) (imenu-progress-message prev-pos 100 t) ;; Sort each submenu by position. From 5b0102e26a3eeb2136a1155b97912879ab68c6f6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:10:12 +0000 Subject: [PATCH 267/560] (tar-extract): Bind buffer-undo-list to t. --- lisp/tar-mode.el | 119 ++++++++++++++++++++++++----------------------- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 42dcc0f7a26..6bf2df15874 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -715,66 +715,67 @@ appear on disk when you save the tar-file's buffer." (set-buffer-multibyte nil) (save-excursion (set-buffer buffer) - (if enable-multibyte-characters - (progn - ;; We must avoid unibyte->multibyte conversion. - (set-buffer-multibyte nil) - (insert-buffer-substring tar-buffer start end) - (set-buffer-multibyte t)) - (insert-buffer-substring tar-buffer start end)) - (goto-char (point-min)) - (setq buffer-file-name new-buffer-file-name) - (setq buffer-file-truename - (abbreviate-file-name buffer-file-name)) - ;; We need to mimic the parts of insert-file-contents - ;; which determine the coding-system and decode the text. - (let ((coding - (or coding-system-for-read - (and set-auto-coding-function - (save-excursion - (funcall set-auto-coding-function - name (- (point-max) (point))))))) - (multibyte enable-multibyte-characters) - (detected (detect-coding-region - (point-min) - (min (+ (point-min) 16384) (point-max)) t))) - (if coding - (or (numberp (coding-system-eol-type coding)) - (vectorp (coding-system-eol-type detected)) - (setq coding (coding-system-change-eol-conversion - coding - (coding-system-eol-type detected)))) - (setq coding - (or (find-new-buffer-file-coding-system detected) - (let ((file-coding - (find-operation-coding-system - 'insert-file-contents buffer-file-name))) - (if (consp file-coding) - (setq file-coding (car file-coding)) - file-coding))))) - (if (or (eq coding 'no-conversion) - (eq (coding-system-type coding) 5)) - (setq multibyte (set-buffer-multibyte nil))) - (or multibyte + (let ((buffer-undo-list t)) + (if enable-multibyte-characters + (progn + ;; We must avoid unibyte->multibyte conversion. + (set-buffer-multibyte nil) + (insert-buffer-substring tar-buffer start end) + (set-buffer-multibyte t)) + (insert-buffer-substring tar-buffer start end)) + (goto-char (point-min)) + (setq buffer-file-name new-buffer-file-name) + (setq buffer-file-truename + (abbreviate-file-name buffer-file-name)) + ;; We need to mimic the parts of insert-file-contents + ;; which determine the coding-system and decode the text. + (let ((coding + (or coding-system-for-read + (and set-auto-coding-function + (save-excursion + (funcall set-auto-coding-function + name (- (point-max) (point))))))) + (multibyte enable-multibyte-characters) + (detected (detect-coding-region + (point-min) + (min (+ (point-min) 16384) (point-max)) t))) + (if coding + (or (numberp (coding-system-eol-type coding)) + (vectorp (coding-system-eol-type detected)) + (setq coding (coding-system-change-eol-conversion + coding + (coding-system-eol-type detected)))) (setq coding - (coding-system-change-text-conversion - coding 'raw-text))) - (decode-coding-region (point-min) (point-max) coding) - (set-buffer-file-coding-system coding)) - ;; Set the default-directory to the dir of the - ;; superior buffer. - (setq default-directory - (save-excursion - (set-buffer tar-buffer) - default-directory)) - (normal-mode) ; pick a mode. - (rename-buffer bufname) - (make-local-variable 'tar-superior-buffer) - (make-local-variable 'tar-superior-descriptor) - (setq tar-superior-buffer tar-buffer) - (setq tar-superior-descriptor descriptor) - (setq buffer-read-only read-only-p) - (set-buffer-modified-p nil) + (or (find-new-buffer-file-coding-system detected) + (let ((file-coding + (find-operation-coding-system + 'insert-file-contents buffer-file-name))) + (if (consp file-coding) + (setq file-coding (car file-coding)) + file-coding))))) + (if (or (eq coding 'no-conversion) + (eq (coding-system-type coding) 5)) + (setq multibyte (set-buffer-multibyte nil))) + (or multibyte + (setq coding + (coding-system-change-text-conversion + coding 'raw-text))) + (decode-coding-region (point-min) (point-max) coding) + (set-buffer-file-coding-system coding)) + ;; Set the default-directory to the dir of the + ;; superior buffer. + (setq default-directory + (save-excursion + (set-buffer tar-buffer) + default-directory)) + (normal-mode) ; pick a mode. + (rename-buffer bufname) + (make-local-variable 'tar-superior-buffer) + (make-local-variable 'tar-superior-descriptor) + (setq tar-superior-buffer tar-buffer) + (setq tar-superior-descriptor descriptor) + (setq buffer-read-only read-only-p) + (set-buffer-modified-p nil)) (tar-subfile-mode 1)) (set-buffer tar-buffer)) (narrow-to-region (point-min) tar-header-offset) From 997690966921597b32ed2f0330df4890ecac1bb6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:10:59 +0000 Subject: [PATCH 268/560] (occur-accumulate-lines, occur-engine): Avoid warnings. --- lisp/replace.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index 3520f3e2268..82b2a993fdb 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -823,9 +823,10 @@ If the value is nil, don't highlight the buffer names specially." (setq count (+ count (if forwardp -1 1))) (setq beg (line-beginning-position) end (line-end-position)) - (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode + (if (and keep-props (if (boundp 'jit-lock-mode) jit-lock-mode) (text-property-not-all beg end 'fontified t)) - (jit-lock-fontify-now beg end)) + (if (fboundp 'jit-lock-fontify-now) + (jit-lock-fontify-now beg end))) (push (funcall (if keep-props #'buffer-substring @@ -1029,9 +1030,11 @@ See also `multi-occur'." endpt (line-end-position))) (setq marker (make-marker)) (set-marker marker matchbeg) - (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode + (if (and keep-props + (if (boundp 'jit-lock-mode) jit-lock-mode) (text-property-not-all begpt endpt 'fontified t)) - (jit-lock-fontify-now begpt endpt)) + (if (fboundp 'jit-lock-fontify-now) + (jit-lock-fontify-now begpt endpt))) (setq curstring (buffer-substring begpt endpt)) ;; Depropertize the string, and maybe ;; highlight the matches From 5a77048aef1ab0dc4a18a02fbf852f4a509e9b93 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:11:33 +0000 Subject: [PATCH 269/560] (indent-pp-sexp): Doc fix. --- lisp/emacs-lisp/lisp-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index f4364c38e8d..f181f3683f0 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1125,7 +1125,8 @@ ENDPOS is encountered." (set-marker endmark nil)))) (defun indent-pp-sexp (&optional arg) - "Indent each line of the list or, with prefix ARG, pretty-printify the list." + "Indent each line of the list starting just after point, or prettyprint it. +A prefix argument specifies pretty-printing." (interactive "P") (if arg (save-excursion From d4b6c2e3326c888da19e2be60899a27ef8a16f0a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 18:16:44 +0000 Subject: [PATCH 270/560] (lm-with-file): Use Lisp mode in temp buffer. In non-temp buffer, switch syntax table temporarily. --- lisp/ChangeLog | 27 +++++++++++++++++++++++++++ lisp/emacs-lisp/lisp-mnt.el | 7 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab130e2c09b..1def811c5c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,30 @@ +2005-01-15 Richard M. Stallman + + * emacs-lisp/lisp-mnt.el (lm-with-file): Use Lisp mode in temp buffer. + In non-temp buffer, switch syntax table temporarily. + + * emacs-lisp/lisp-mode.el (indent-pp-sexp): Doc fix. + + * replace.el (occur-accumulate-lines, occur-engine): Avoid warnings. + + * tar-mode.el (tar-extract): Bind buffer-undo-list to t. + + * imenu.el (imenu--split-menu): Copy menulist before sorting. + (imenu--generic-function): Use START, not BEG, as pos of definition. + + * simple.el (just-one-space): Argument specifies number of spaces. + + * simple.el (eval-expression-print-format): Avoid warning + about edebug-active. + +2005-01-15 "James R. Van Zandt" (Tiny change) + + * progmodes/sh-script.el: Code copied from make-mode.el + with small changes, + (sh-mode-map): Bind C-c C-\. + (sh-backslash-column, sh-backslash-align): New variables. + (sh-backslash-region, sh-append-backslash): New functions. + 2005-01-15 Sergey Poznyakoff * mail/rmail.el: Updated to work with movemail from GNU Mailutils diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 671f3c8ce2a..701da1c4dec 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -304,9 +304,14 @@ If FILE is nil, execute BODY in the current buffer." (if ,filesym (with-temp-buffer (insert-file-contents ,filesym) + (lisp-mode) ,@body) (save-excursion - ,@body))))) + ;; Switching major modes is too drastic, so just switch + ;; temporarily to the Lisp mode syntax table. + (with-syntax-table lisp-mode-syntax-table + ,@body)))))) + (put 'lm-with-file 'lisp-indent-function 1) (put 'lm-with-file 'edebug-form-spec t) From 5092b64401d41a879f2f59b2a813a58b8f71c263 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 15 Jan 2005 23:09:32 +0000 Subject: [PATCH 271/560] (Defining Images): Mention DATA-P arg of create-image. --- lispref/display.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lispref/display.texi b/lispref/display.texi index 7b0e72c753f..375db424122 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -3788,10 +3788,12 @@ background color. The functions @code{create-image}, @code{defimage} and @code{find-image} provide convenient ways to create image descriptors. -@defun create-image file &optional type &rest props +@defun create-image file-or-data &optional type data-p &rest props @tindex create-image This function creates and returns an image descriptor which uses the -data in @var{file}. +data in @var{file-or-data}. @var{file-or-data} can be a file name or +a string containing the image data; @var{data-p} should be @code{nil} +for the former case, non-@code{nil} for the latter case. The optional argument @var{type} is a symbol specifying the image type. If @var{type} is omitted or @code{nil}, @code{create-image} tries to @@ -3802,7 +3804,7 @@ The remaining arguments, @var{props}, specify additional image properties---for example, @example -(create-image "foo.xpm" 'xpm :heuristic-mask t) +(create-image "foo.xpm" 'xpm nil :heuristic-mask t) @end example The function returns @code{nil} if images of this type are not From 9cdd488421a5154daac4be814bbc20d7b37a6d25 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sun, 16 Jan 2005 00:10:18 +0000 Subject: [PATCH 272/560] * macfns.c (x_set_foreground_color, x_set_background_color): Sync with xfns.c. (mac_window, x_create_tip_frame): Use XSetWindowBackground. * macterm.c (XSetBackground, XSetWindowBackground): New functions. * macterm.h (XSetBackground, XSetWindowBackground): Add externs. --- src/ChangeLog | 8 ++++++++ src/macfns.c | 42 ++++++++++++++++++++++++++++++++++++-- src/macterm.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/macterm.h | 2 ++ 4 files changed, 106 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e707c61b83f..07beb35f685 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2005-01-15 YAMAMOTO Mitsuharu + + * macfns.c (x_set_foreground_color, x_set_background_color): Sync + with xfns.c. + (mac_window, x_create_tip_frame): Use XSetWindowBackground. + * macterm.c (XSetBackground, XSetWindowBackground): New functions. + * macterm.h (XSetBackground, XSetWindowBackground): Add externs. + 2005-01-14 Kim F. Storm * keyboard.c (Fposn_at_x_y): Add optional arg WHOLE. diff --git a/src/macfns.c b/src/macfns.c index 9a8382e413c..2b223dfdfb5 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -1385,6 +1385,7 @@ x_set_foreground_color (f, arg, oldval) struct frame *f; Lisp_Object arg, oldval; { + struct mac_output *mac = f->output_data.mac; unsigned long fg, old_fg; fg = x_decode_color (f, arg, BLACK_PIX_DEFAULT (f)); @@ -1393,10 +1394,28 @@ x_set_foreground_color (f, arg, oldval) if (FRAME_MAC_WINDOW (f) != 0) { + Display *dpy = FRAME_MAC_DISPLAY (f); + + BLOCK_INPUT; + XSetForeground (dpy, mac->normal_gc, fg); + XSetBackground (dpy, mac->reverse_gc, fg); + + if (mac->cursor_pixel == old_fg) + { + unload_color (f, mac->cursor_pixel); + mac->cursor_pixel = fg; + XSetBackground (dpy, mac->cursor_gc, mac->cursor_pixel); + } + + UNBLOCK_INPUT; + update_face_from_frame_parameter (f, Qforeground_color, arg); + if (FRAME_VISIBLE_P (f)) redraw_frame (f); } + + unload_color (f, old_fg); } void @@ -1404,11 +1423,24 @@ x_set_background_color (f, arg, oldval) struct frame *f; Lisp_Object arg, oldval; { - FRAME_BACKGROUND_PIXEL (f) - = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); + struct mac_output *mac = f->output_data.mac; + unsigned long bg; + + bg = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); + unload_color (f, FRAME_BACKGROUND_PIXEL (f)); + FRAME_BACKGROUND_PIXEL (f) = bg; if (FRAME_MAC_WINDOW (f) != 0) { + Display *dpy = FRAME_MAC_DISPLAY (f); + + BLOCK_INPUT; + XSetBackground (dpy, mac->normal_gc, bg); + XSetForeground (dpy, mac->reverse_gc, bg); + XSetWindowBackground (dpy, FRAME_MAC_WINDOW (f), bg); + XSetForeground (dpy, mac->cursor_gc, bg); + + UNBLOCK_INPUT; update_face_from_frame_parameter (f, Qbackground_color, arg); if (FRAME_VISIBLE_P (f)) @@ -2297,6 +2329,10 @@ mac_window (f) /* so that update events can find this mac_output struct */ f->output_data.mac->mFP = f; /* point back to emacs frame */ + if (FRAME_MAC_WINDOW (f)) + XSetWindowBackground (FRAME_MAC_DISPLAY(f), FRAME_MAC_WINDOW (f), + FRAME_BACKGROUND_PIXEL (f)); + validate_x_resource_name (); /* x_set_name normally ignores requests to set the name if the @@ -3856,6 +3892,8 @@ x_create_tip_frame (dpyinfo, parms, text) #endif { FRAME_MAC_WINDOW (f) = tip_window; + XSetWindowBackground (FRAME_MAC_DISPLAY(f), tip_window, + FRAME_BACKGROUND_PIXEL (f)); SetWRefCon (tip_window, (long) f->output_data.mac); /* so that update events can find this mac_output struct */ f->output_data.mac->mFP = f; diff --git a/src/macterm.c b/src/macterm.c index 566f0c5b04b..0dc530cda8e 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -1091,6 +1091,62 @@ XSetForeground (display, gc, color) } +/* Mac replacement for XSetBackground. */ + +void +XSetBackground (display, gc, color) + Display *display; + GC gc; + unsigned long color; +{ + gc->background = color; +} + + +/* Mac replacement for XSetWindowBackground. */ + +void +XSetWindowBackground (display, w, color) + Display *display; + WindowPtr w; + unsigned long color; +{ +#if !TARGET_API_MAC_CARBON + AuxWinHandle aw_handle; + CTabHandle ctab_handle; + ColorSpecPtr ct_table; + short ct_size; +#endif + RGBColor bg_color; + + bg_color.red = RED16_FROM_ULONG (color); + bg_color.green = GREEN16_FROM_ULONG (color); + bg_color.blue = BLUE16_FROM_ULONG (color); + +#if TARGET_API_MAC_CARBON + SetWindowContentColor (w, &bg_color); +#else + if (GetAuxWin (w, &aw_handle)) + { + ctab_handle = (*aw_handle)->awCTable; + HandToHand ((Handle *) &ctab_handle); + ct_table = (*ctab_handle)->ctTable; + ct_size = (*ctab_handle)->ctSize; + while (ct_size > -1) + { + if (ct_table->value == 0) + { + ct_table->rgb = bg_color; + CTabChanged (ctab_handle); + SetWinColor (w, (WCTabHandle) ctab_handle); + } + ct_size--; + } + } +#endif +} + + /* Mac replacement for XSetFont. */ static void diff --git a/src/macterm.h b/src/macterm.h index fd6b066af4c..f32b13000e6 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -602,6 +602,8 @@ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, unsigned int)); extern void XFreePixmap P_ ((Display *, Pixmap)); extern void XSetForeground P_ ((Display *, GC, unsigned long)); +extern void XSetBackground P_ ((Display *, GC, unsigned long)); +extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, int, int)); extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); From 42afbcda13137806a3fd51c466526e29026947b9 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sun, 16 Jan 2005 00:17:25 +0000 Subject: [PATCH 273/560] * macfns.c (Fx_file_dialog): Save As dialog includes only the file name in the text box. --- src/ChangeLog | 5 +++++ src/macfns.c | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 07beb35f685..a8dd700f7d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-15 Steven Tamm + + * macfns.c (Fx_file_dialog): Save As dialog includes only the + file name in the text box. + 2005-01-15 YAMAMOTO Mitsuharu * macfns.c (x_set_foreground_color, x_set_background_color): Sync diff --git a/src/macfns.c b/src/macfns.c index 2b223dfdfb5..33da9091575 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -4356,9 +4356,12 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */) if (!NILP(default_filename)) { - saveName = - cfstring_create_with_utf8_cstring (SDATA (ENCODE_UTF_8 - (default_filename))); + Lisp_Object utf8 = ENCODE_UTF_8 (default_filename); + char *begPtr = SDATA(utf8); + char *filePtr = begPtr + SBYTES(utf8); + while (filePtr != begPtr && !IS_DIRECTORY_SEP(filePtr[-1])) + filePtr--; + saveName = cfstring_create_with_utf8_cstring (filePtr); options.saveFileName = saveName; options.optionFlags |= kNavSelectDefaultLocation; } From 743d0696815e14252284e5b11ba7f40feeb652c9 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sun, 16 Jan 2005 00:31:53 +0000 Subject: [PATCH 274/560] * macterm.c (Vmac_use_core_graphics): defined (syms_of_macterm): Added mac-use-core-graphics (mac_draw_string_common): Use core graphics text rendering if mac-use-core-graphics is enabled. --- src/ChangeLog | 5 +++++ src/macterm.c | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a8dd700f7d5..6f67d5e49fc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2005-01-15 Steven Tamm + * macterm.c (Vmac_use_core_graphics): defined + (syms_of_macterm): Added mac-use-core-graphics + (mac_draw_string_common): Use core graphics text rendering if + mac-use-core-graphics is enabled. + * macfns.c (Fx_file_dialog): Save As dialog includes only the file name in the text box. diff --git a/src/macterm.c b/src/macterm.c index 0dc530cda8e..4a1593309ba 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -101,6 +101,10 @@ Boston, MA 02111-1307, USA. */ Lisp_Object Vx_toolkit_scroll_bars; +/* If Non-nil, the text will be rendered using Core Graphics text rendering which may anti-alias the text. */ +Lisp_Object Vmac_use_core_graphics; + + /* Non-zero means that a HELP_EVENT has been generated since Emacs start. */ @@ -725,6 +729,13 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, int nchars, mode, bytes_per_char; { SetPortWindowPort (w); +#ifdef MAC_OSX + UInt32 textFlags, savedFlags; + if (!NILP(Vmac_use_core_graphics)) { + textFlags = kQDUseCGTextRendering; + savedFlags = SwapQDTextFlags(textFlags); + } +#endif mac_set_colors (gc); @@ -735,6 +746,10 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, MoveTo (x, y); DrawText (buf, 0, nchars * bytes_per_char); +#ifdef MAC_OSX + if (!NILP(Vmac_use_core_graphics)) + SwapQDTextFlags(savedFlags); +#endif } @@ -9901,8 +9916,17 @@ Toolbox for processing before Emacs sees it. */); doc: /* If non-nil, the Mac \"Control\" key is passed on to the Mac Toolbox for processing before Emacs sees it. */); Vmac_pass_control_to_system = Qt; + + DEFVAR_LISP ("mac-pass-control-to-system", &Vmac_pass_control_to_system, + doc: /* If non-nil, the Mac \"Control\" key is passed on to the Mac +Toolbox for processing before Emacs sees it. */); + Vmac_pass_control_to_system = Qt; #endif + DEFVAR_LISP ("mac-use-core-graphics", &Vmac_use_core_graphics, + doc: /* If non-nil, the text will be rendered using Core Graphics text rendering which may anti-alias the text. */); + Vmac_use_core_graphics = Qnil; + DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, doc: /* One of the Text Encoding Base constant values defined in the Basic Text Constants section of Inside Macintosh - Text Encoding From 0530c67988156d503943a1a0d88fbe75e0c04cbc Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sun, 16 Jan 2005 00:39:04 +0000 Subject: [PATCH 275/560] Changed name from mac-use-core-graphics to mac-allow-anti-aliasing --- src/ChangeLog | 7 ++++--- src/macterm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6f67d5e49fc..eb87729133d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,9 +1,10 @@ 2005-01-15 Steven Tamm - * macterm.c (Vmac_use_core_graphics): defined - (syms_of_macterm): Added mac-use-core-graphics + * macterm.c (Vmac_use_core_graphics): defined for + mac-allow-anti-aliasing + (syms_of_macterm): Added mac-allow-anti-aliasing (mac_draw_string_common): Use core graphics text rendering if - mac-use-core-graphics is enabled. + mac-allow-anti-aliasing is enabled. * macfns.c (Fx_file_dialog): Save As dialog includes only the file name in the text box. diff --git a/src/macterm.c b/src/macterm.c index 4a1593309ba..11ec9166832 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -9923,7 +9923,7 @@ Toolbox for processing before Emacs sees it. */); Vmac_pass_control_to_system = Qt; #endif - DEFVAR_LISP ("mac-use-core-graphics", &Vmac_use_core_graphics, + DEFVAR_LISP ("mac-allow-anti-aliasing", &Vmac_use_core_graphics, doc: /* If non-nil, the text will be rendered using Core Graphics text rendering which may anti-alias the text. */); Vmac_use_core_graphics = Qnil; From 42187e99f8adc31d93d027b9017160731aab8972 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sun, 16 Jan 2005 02:37:50 +0000 Subject: [PATCH 276/560] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-40 Fix regressions from latest reftex update In the latest update to reftex from upstream, some changes in Emacs CVS (mostly maintenance stuff -- typos, whitespace, etc) were apparently lost. This changeset re-applies them. --- lisp/textmodes/reftex-cite.el | 4 +- lisp/textmodes/reftex-toc.el | 4 +- man/reftex.texi | 211 ++++++++++++++++------------------ 3 files changed, 100 insertions(+), 119 deletions(-) diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 54dc46eac4f..6369f9637db 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -597,7 +597,7 @@ to `reftex-cite-format' and inserted into the buffer. If NO-INSERT is non-nil, nothing is inserted, only the selected key returned. -FORAT-KEY can be used to pre-select a citation format. +FORMAT-KEY can be used to pre-select a citation format. When called with a `C-u' prefix, prompt for optional arguments in cite macros. When called with a numeric prefix, make that many @@ -660,7 +660,7 @@ While entering the regexp, completion on knows citation keys is possible. ;; We shall insert this into the buffer... (message "Formatting...") - + (while (setq entry (pop insert-entries)) ;; Format the citation and insert it (setq string (if reftex-format-cite-function diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index 0f0b72332b8..ed9746f8a69 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -754,13 +754,13 @@ if these sets are sorted blocks in the alist." "Make sure all files of the document are being visited by buffers, and that the scanning info is absolutely up to date. We do this by rescanning with reftex-keep-temporary-buffers bound to t. -The variable PRO-OR-DE is assumed to be dynamically scoped into thes function. +The variable PRO-OR-DE is assumed to be dynamically scoped into this function. When finished, we exit with an error message." (let ((reftex-keep-temporary-buffers t)) (reftex-toc-Rescan) (reftex-toc-restore-region start-line mark-line) (throw 'exit - (format "TOC had to be updated first. Please check selection and repeat the command." pro-or-de)))) + "TOC had to be updated first. Please check selection and repeat the command."))) (defun reftex-toc-rename-label () "Rename the currently selected label in the *TOC* buffer. diff --git a/man/reftex.texi b/man/reftex.texi index b3c2f25c58a..21090caf2ea 100644 --- a/man/reftex.texi +++ b/man/reftex.texi @@ -2,10 +2,6 @@ @c %**start of header @setfilename ../info/reftex @settitle RefTeX User Manual -@dircategory Emacs -@direntry -* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. -@end direntry @synindex ky cp @syncodeindex vr cp @syncodeindex fn cp @@ -21,6 +17,41 @@ @set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer} @set XEMACSFTP @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs ftp site}. @c %**end of header + +@copying +This file documents @b{Ref@TeX{}}, a package to do labels, references, +citations and indices for LaTeX documents with Emacs. + +This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for +@b{Ref@TeX{}} @value{VERSION} + +Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.1 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover texts being ``A GNU +Manual'', and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License'' in the Emacs manual. + +(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify +this GNU Manual, like GNU software. Copies published by the Free +Software Foundation raise funds for GNU development.'' + +This document is part of a collection distributed under the GNU Free +Documentation License. If you want to distribute this document +separately from the collection, you can do so by adding a copy of the +license to the document, as described in section 6 of the license. +@end quotation +@end copying + +@dircategory Emacs +@direntry +* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. +@end direntry + @finalout @c Macro definitions @@ -35,33 +66,6 @@ @end ifnotinfo @end macro -@ifinfo -This file documents @b{Ref@TeX{}}, a package to do labels, references, -citations and indices for LaTeX documents with Emacs. - -This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for -@b{Ref@TeX{}} @value{VERSION} - -Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or -any later version published by the Free Software Foundation; with no -Invariant Sections, with the Front-Cover texts being ``A GNU -Manual'', and with the Back-Cover Texts as in (a) below. A copy of the -license is included in the section entitled ``GNU Free Documentation -License'' in the Emacs manual. - -(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify -this GNU Manual, like GNU software. Copies published by the Free -Software Foundation raise funds for GNU development.'' - -This document is part of a collection distributed under the GNU Free -Documentation License. If you want to distribute this document -separately from the collection, you can do so by adding a copy of the -license to the document, as described in section 6 of the license. -@end ifinfo - @titlepage @title Ref@TeX{} User Manual @subtitle Support for LaTeX labels, references, citations and index entries with GNU Emacs @@ -69,32 +73,9 @@ license to the document, as described in section 6 of the license. @author by Carsten Dominik @page -Copyright @copyright{} 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - -@sp 2 -This is edition @value{EDITION} of the @cite{Ref@TeX{} User Manual} for -@b{Ref@TeX{}} version @value{VERSION}, @value{DATE}. - -@sp 2 - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or -any later version published by the Free Software Foundation; with no -Invariant Sections, with the Front-Cover texts being ``A GNU -Manual'', and with the Back-Cover Texts as in (a) below. A copy of the -license is included in the section entitled ``GNU Free Documentation -License'' in the Emacs manual. - -(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify -this GNU Manual, like GNU software. Copies published by the Free -Software Foundation raise funds for GNU development.'' - -This document is part of a collection distributed under the GNU Free -Documentation License. If you want to distribute this document -separately from the collection, you can do so by adding a copy of the -license to the document, as described in section 6 of the license. +@vskip 0pt plus 1filll +@insertcopying @end titlepage -@page @ifnottex @node Top,,,(dir) @@ -143,7 +124,7 @@ Introduction * Installation:: How to install and activate RefTeX. * RefTeX in a Nutshell:: A brief summary and quick guide. - + Labels and References * Creating Labels:: @@ -313,7 +294,7 @@ additional labeled environments you have defined yourself (variable @itemize @bullet @item -@b{Creating Labels}@* +@b{Creating Labels}@* Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point. @b{Ref@TeX{}} will either @itemize @minus @@ -321,7 +302,7 @@ Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point. derive a label from context (default for section labels) @item prompt for a label string (default for figures and tables) or -@item +@item insert a simple label made of a prefix and a number (all other environments) @end itemize @@ -441,7 +422,7 @@ can do in each of the different special buffers, press @kbd{?}. Read the manual if you get stuck, of if you are curious what else might be available. The first part of the manual explains in a tutorial way how to use and customize @b{Ref@TeX{}}. The second -part is a command and variable reference. +part is a command and variable reference. @end enumerate @node Table of Contents, Labels and References, Introduction, Top @@ -567,7 +548,7 @@ Kill the @file{*toc*} buffer, return to the position where @item C-c > Switch to the @file{*Index*} buffer of this document. With prefix -@samp{2}, restrict the index to the section at point in the @file{*toc*} +@samp{2}, restrict the index to the section at point in the @file{*toc*} buffer. @tablesubheading{Controlling what gets displayed} @@ -603,7 +584,7 @@ Toggle the display of index entries in the @file{*toc*} buffer. The default for this flag can be set with the variable @code{reftex-toc-include-index-entries}. When called with a prefix argument, @b{Ref@TeX{}} will prompt for a specific index and include -only entries in the selected index in the @file{*toc*} buffer. The mode +only entries in the selected index in the @file{*toc*} buffer. The mode line @samp{I<>} indicator shows which index is used. @item c @@ -621,7 +602,7 @@ document. @item r @vindex reftex-enable-partial-scans Reparse the LaTeX document and rebuild the @file{*toc*} buffer. When -@code{reftex-enable-partial-scans} is non-nil, rescan only the file this +@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this location is defined in, not the entire document. @item C-u r @@ -873,7 +854,7 @@ Goto next section heading. Goto previous section heading. @item N z -Jump to section N, using the prefix arg. For example @kbd{3 z} jumps to +Jump to section N, using the prefix arg. For example @kbd{3 z} jumps to section 3. @tablesubheading{Displaying Context} @@ -967,7 +948,7 @@ buffer. @tablesubheading{Controlling what gets displayed} @vindex reftex-label-menu-flags -The defaults for the following flags can be configured with the variable +The defaults for the following flags can be configured with the variable @code{reftex-label-menu-flags} (@pxref{Options (Referencing Labels)}). @item c @@ -980,7 +961,7 @@ selection buffer. @item t Toggle the display of the table of contents in the selection buffer. -With prefix @var{arg}, change the maximum level of toc entries displayed +With prefix @var{arg}, change the maximum level of toc entries displayed to @var{arg}. Chapters are level 1, section are level 2. @item # @@ -1394,7 +1375,7 @@ Again, here the configuration in the customization buffer: @example [INS] [DEL] Package or Detailed : [Value Menu] Detailed: Environment or \macro : [Value Menu] String: \myfig[]@{@}@{@}@{*@}@{@} - Type specification : [Value Menu] Char : f + Type specification : [Value Menu] Char : f Label prefix string : [Value Menu] Default Label reference format: [Value Menu] Default Context method : [Value Menu] Macro arg nr: 3 @@ -1491,7 +1472,7 @@ Here is the setup: (defun detect-be-ee (bound) ;; Search backward for the macros or an empty line - (if (re-search-backward + (if (re-search-backward "\\(^[ \t]*\n\\|\\\\ee\\>\\)\\|\\(\\\\be\\>\\)" bound t) (if (match-beginning 2) (match-beginning 2) ; Return start of environment @@ -1530,14 +1511,14 @@ for @b{Ref@TeX{}}. (defun detect-linguex (bound) (let ((cnt 0)) (catch 'exit - (while + (while ;; Search backward for all possible delimiters (re-search-backward (concat "\\(^[ \t]*\n\\)\\|\\(\\\\z\\.\\)\\|" "\\(\\ex[ig]?\\.\\)\\|\\(\\\\a\\.\\)") nil t) ;; Check which delimiter was matched. - (cond + (cond ((match-beginning 1) ;; empty line terminates all - return nil (throw 'exit nil)) @@ -1873,7 +1854,7 @@ will prompt for values of these optional arguments if you call the @code{reftex-citation} command with a @kbd{C-u} prefix. Following the most generic of these packages, @code{natbib}, the builtin citation packages always accept the @kbd{t} key for a @emph{textual} -citation (like: @code{Jones et al. (1997) have shown...}) as well as +citation (like: @code{Jones et al. (1997) have shown...}) as well as the @kbd{p} key for a parenthetical citation (like: @code{As shown earlier (Jones et al, 1997)}). @@ -2132,13 +2113,13 @@ repeat @var{word} outside the macro. Phrases for indexing can be collected while writing the document. The command @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) -copies the current selection (if active) or the word near point into the +copies the current selection (if active) or the word near point into the phrases buffer. It then selects this buffer, so that the phrase line can be edited. To return to the LaTeX document, press @kbd{C-c C-c} (@code{reftex-index-phrases-save-and-return}). You can also prepare the list of index phrases in a different way and -copy it into the phrases file. For example you might want to start from +copy it into the phrases file. For example you might want to start from a word list of the document and remove all words which should not be indexed. @@ -2147,7 +2128,7 @@ The phrase lines in the phrase buffer must have a specific format. format. A phrase line looks like this: @example -[@var{key}] @var{phrase} [ @var{arg}[&&@var{arg}]... [ || @var{arg}]...] +[@var{key}] @var{phrase} [ @var{arg}[&&@var{arg}]... [ || @var{arg}]...] @end example @code{} stands for white space containing at least one @key{TAB}. @@ -2241,7 +2222,7 @@ may not last long enough to do everything in one go. @b{Ref@TeX{}} will start at the first phrase line and search the phrase globally in the whole document. At each match it will stop, compute the replacement string and offer you the following choices@footnote{Windows -users: Restrict yourself to the described keys during indexing. Pressing +users: Restrict yourself to the described keys during indexing. Pressing @key{Help} at the indexing prompt can apparently hang Emacs.}: @table @kbd @@ -2355,7 +2336,7 @@ Prefix argument. @tablesubheading{Moving around} @item ! A..Z Pressing any capital letter will jump to the corresponding section in -the @file{*Index*} buffer. The exclamation mark is special and jumps to +the @file{*Index*} buffer. The exclamation mark is special and jumps to the first entries alphabetically sorted below @samp{A}. These are usually non-alphanumeric characters. @item n @@ -2365,7 +2346,7 @@ Go to previous entry. @tablesubheading{Access to document locations} @item @key{SPC} -Show the place in the document where this index entry is defined. +Show the place in the document where this index entry is defined. @item @key{TAB} Go to the definition of the current index entry in another @@ -2416,19 +2397,19 @@ prefix, kill the entire @var{visual} part. @item ( Toggle the beginning of page range property @samp{|(} of the -entry. +entry. @item ) -Toggle the end of page range property @samp{|)} of the entry. +Toggle the end of page range property @samp{|)} of the entry. @item _ Make the current entry a subentry. This command will prompt for the superordinate entry and insert it. @item ^ -Remove the highest superordinate entry. If the current entry is a +Remove the highest superordinate entry. If the current entry is a subitem (@samp{aaa!bbb!ccc}), this function moves it up the hierarchy -(@samp{bbb!ccc}). +(@samp{bbb!ccc}). @tablesubheading{Exiting} @item q @@ -2472,7 +2453,7 @@ will move to the correct position. @item r @vindex reftex-enable-partial-scans Reparse the LaTeX document and rebuild the @file{*Index*} buffer. When -@code{reftex-enable-partial-scans} is non-nil, rescan only the file this +@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this location is defined in, not the entire document. @item C-u r @@ -2481,7 +2462,7 @@ buffer. @item s Switch to a different index (for documents with multiple -indices). +indices). @end table @@ -2544,7 +2525,7 @@ quick identification of these macros when @b{Ref@TeX{}} inserts new index entries with @code{reftex-index}. These codes need to be unique. @code{?i}, @code{?I}, and @code{?g} are reserved for the @code{\index}, @code{\index*}, and @code{\glossary} macros, -respectively. +respectively. The following string is empty unless your macro adds a superordinate entry to the index key - this is the case for the @code{\astobj} macro. @@ -2567,14 +2548,14 @@ Repeat: Macro with args: \ix@{*@} Index Tag : [Value Menu] String: idx Access Key : x - Key Prefix : + Key Prefix : Exclusion hook : nil Repeat Outside : [Toggle] off (nil) [INS] [DEL] List: Macro with args: \nindex@{*@} Index Tag : [Value Menu] String: name Access Key : n - Key Prefix : + Key Prefix : Exclusion hook : nil Repeat Outside : [Toggle] off (nil) [INS] [DEL] List: @@ -2675,7 +2656,7 @@ and @code{\glossary} macros, all macros configured in While the display of cross referencing information for the above mentioned macros is hard--coded, you can configure additional relations in the variable @code{reftex-view-crossref-extra}. - + @iftex @chapter All the Rest @end iftex @@ -2865,7 +2846,7 @@ see @ref{Adding Magic Words}. @vindex reftex-multiref-punctuation @vindex reftex-cite-punctuation -@item +@item @b{Ref@TeX{}} inserts ``punctuation'' for multiple references and for the author list in citations. Some of this may be language dependent. See the variables @code{reftex-multiref-punctuation} and @@ -2919,7 +2900,7 @@ variables and configure @b{Ref@TeX{}} to use them instead: Specify the full search path directly in @b{Ref@TeX{}}'s variables. @lisp -(setq reftex-texpath-environment-variables +(setq reftex-texpath-environment-variables '("./inp:/home/cd/tex//:/usr/local/tex//")) (setq reftex-bibpath-environment-variables '("/home/cd/tex/lit/")) @@ -2937,7 +2918,7 @@ command depends upon the version of that program. (setq reftex-use-external-file-finders t) (setq reftex-external-file-finders '(("tex" . "kpsewhich -format=.tex %f") - ("bib" . "kpsewhich -format=.bib %f"))) + ("bib" . "kpsewhich -format=.bib %f"))) @end lisp @end itemize @@ -2952,9 +2933,9 @@ the new extension must also be known to AUCTeX via the variable @code{TeX-file-extension}. For example: @lisp -(setq reftex-file-extensions +(setq reftex-file-extensions '(("nw" "tex" ".tex" ".ltx") ("bib" ".bib"))) -(setq TeX-file-extensions +(setq TeX-file-extensions '( "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo")) @end lisp @@ -3112,7 +3093,7 @@ with the @kbd{g} key. To get this behavior, use instead @end lisp @node AUCTeX, Multifile Documents, Faces, Top -@section @w{AUC @TeX{}} +@section AUC@TeX{} @cindex @code{AUCTeX}, Emacs package @cindex Emacs packages, @code{AUCTeX} @@ -3283,7 +3264,7 @@ file @file{natbib.el} for the Natbib citation style does switch (reftex-set-cite-format 'natbib)))) @end lisp -@findex reftex-add-index-macros +@findex reftex-add-index-macros The hook may contain a call to @code{reftex-add-index-macros} to define additional @code{\index}-like macros. The argument must have the same format as @code{reftex-index-macros}. It may be a symbol, to @@ -3417,7 +3398,7 @@ literally for speed reasons. Then both short context and section headings may look different from what you usually see on your screen. In rare cases @code{reftex-toc} may have problems to jump to an affected section heading. There are three possible ways to deal with -this: +this: @itemize @minus @item @vindex reftex-keep-temporary-buffers @@ -3467,7 +3448,7 @@ The first line is just a normal configuration for a macro. For the argument (which really is a second argument to the macro @code{\begin}) as a label of type @code{?p}. Argument count for this macro starts only after the @samp{@{step+@}}, also when specifying how to get -context. +context. @item @b{Idle timers in XEmacs}@* @@ -3589,7 +3570,7 @@ When called with a @kbd{C-u} prefixe, prompt for optional arguments in cite macros. When called with a numeric prefix, make that many citations. When called with point inside the braces of a @code{\cite} command, it will add another key, ignoring the value of -@code{reftex-cite-format}. @* +@code{reftex-cite-format}. @* The regular expression uses an expanded syntax: @samp{&&} is interpreted as @code{and}. Thus, @samp{aaaa&&bbb} matches entries which contain both @samp{aaaa} and @samp{bbb}. While entering the regexp, completion @@ -4343,7 +4324,7 @@ called. @deffn {Normal Hook} reftex-select-label-mode-hook Normal hook which is run when a selection buffer enters -@code{reftex-select-label-mode}. +@code{reftex-select-label-mode}. @end deffn @deffn Keymap reftex-select-label-map @@ -4496,14 +4477,14 @@ normal names separator, like @samp{, } in Jones, Brown and Miller @item final names separator, like @samp{ and } in Jones, Brown and Miller @item -The @samp{et al.} string, like @samp{ @{\it et al.@}} in +The @samp{et al.} string, like @samp{ @{\it et al.@}} in Jones @{\it et al.@} @end enumerate @end defopt @deffn {Normal Hook} reftex-select-bib-mode-hook Normal hook which is run when a selection buffer enters -@code{reftex-select-bib-mode}. +@code{reftex-select-bib-mode}. @end deffn @deffn Keymap reftex-select-bib-map @@ -4527,7 +4508,7 @@ document. @defopt reftex-index-special-chars List of special characters in index entries, given as strings. These -correspond to the @code{MakeIndex} keywords +correspond to the @code{MakeIndex} keywords @code{(@var{level} @var{encap} @var{actual} @var{quote} @var{escape})}. @end defopt @@ -4557,7 +4538,7 @@ index entry. If you have a macro should be @samp{Molecules!}. @var{exclude} can be a function. If this function exists and returns a -non-nil value, the index entry at point is ignored. This was +non-@code{nil} value, the index entry at point is ignored. This was implemented to support the (deprecated) @samp{^} and @samp{_} shortcuts in the LaTeX2e @code{index} package. @@ -4742,7 +4723,7 @@ This is used when `reftex-view-crossref' is called with point in an argument of a macro. Note that crossref viewing for citations, references (both ways) and index entries is hard-coded. This variable is only to configure additional structures for which crossreference -viewing can be useful. Each entry has the structure +viewing can be useful. Each entry has the structure @example (@var{macro-re} @var{search-re} @var{highlight}). @end example @@ -4765,7 +4746,7 @@ display. This feature can be turned on and off from the menu @end defopt @defopt reftex-idle-time -Time (secs) Emacs has to be idle before automatic crossref display +Time (secs) Emacs has to be idle before automatic crossref display or toc recentering is done. @end defopt @@ -4835,7 +4816,7 @@ be expanded recursively. See also @code{reftex-use-external-file-finders}. @defopt reftex-file-extensions Association list with file extensions for different file types. -This is a list of items, each item is like: +This is a list of items, each item is like: @code{(@var{type} . (@var{def-ext} @var{other-ext} ...))} @example @var{type}: @r{File type like @code{"bib"} or @code{"tex"}.} @@ -5262,7 +5243,7 @@ Better support for chapterbib. @noindent @b{Version 4.17} @itemize @bullet -@item +@item The toc window can be split off horizontally. See new options @code{reftex-toc-split-windows-horizontally}, @code{reftex-toc-split-windows-horizontally-fraction}. @@ -5323,9 +5304,9 @@ New options @code{reftex-parse-file-extension} and @item New option @code{reftex-toc-max-level} to limit the depth of the toc. New key binding @kbd{t} in the @file{*toc*} buffer to change this -setting. +setting. @item -RefTeX maintains an @file{Index Phrases} file in which phrases can be +RefTeX maintains an @file{Index Phrases} file in which phrases can be collected. When the document is ready, RefTeX can search all these phrases and assist indexing all matches. @item @@ -5340,7 +5321,7 @@ default stuff which has been moved to a constant. @item Environments like theorems can be placed into the TOC by putting entries for @samp{"begin@{theorem@}"} in -@code{reftex-setion-levels}. +@code{reftex-setion-levels}. @end itemize @noindent @b{Version 4.06} @@ -5385,7 +5366,7 @@ function to do non-standard parsing. @noindent @b{Version 4.00} @itemize @bullet @item -RefTeX has been split into several smaller files which are autoloaded on +RefTeX has been split into several smaller files which are autoloaded on demand. @item Index support, along with many new options. @@ -5430,9 +5411,9 @@ and @kbd{c}. New options @code{reftex-toc-include-labels}, @itemize @bullet @item New options @code{reftex-texpath-environment-variables}, -@code{reftex-use-external-file-finders}, -@code{reftex-external-file-finders}, -@code{reftex-search-unrecursed-path-first}. +@code{reftex-use-external-file-finders}, +@code{reftex-external-file-finders}, +@code{reftex-search-unrecursed-path-first}. @item @emph{kpathsearch} support. See new options and @code{reftex-bibpath-environment-variables}. @@ -5475,7 +5456,7 @@ are now legal in labels. @item Multiple selection buffers are now hidden buffers (they start with a SPACE). -@item +@item Fixed bug with file search when TEXINPUTS environment variable is empty. @end itemize @@ -5559,7 +5540,7 @@ Fixed Bug with parsing "single file" from master file buffer. @item Parse files @file{MASTER.rel} made compatible between Emacs and XEmacs. @item -@code{kill-emacs-hook} and @code{kill-buffer-hook} now write the parse +@code{kill-emacs-hook} and @code{kill-buffer-hook} now write the parse file. @item The cursor inside a @code{\ref} or @code{\cite} macro can now trigger From a2d5fca0444b5e1a83d8c84f21674f2ba48d0a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 16 Jan 2005 09:17:02 +0000 Subject: [PATCH 277/560] * keyboard.c (READABLE_EVENTS_DO_TIMERS_NOW) (READABLE_EVENTS_FILTER_EVENTS) (READABLE_EVENTS_IGNORE_SQUEEZABLES): New flags for readable_events. get_filtered_input_pending, readable_filtered_events): Removed. (tracking_off): Call readable_events and get_input_pending with flag READABLE_EVENTS_DO_TIMERS_NOW. (readable_events): Move code from old readable_filtered_events here, but check new READABLE_EVENTS_* in argument flags instead of previous two boolean arguments do_timers_now and filter_events. If we are doing mouse tracking and the mouse moved, return only if READABLE_EVENTS_IGNORE_SQUEEZABLES is not set in flags. (swallow_events): Call get_input_pending with flag READABLE_EVENTS_DO_TIMERS_NOW. (get_input_pending): Move code from old get_filtered_input_pending here. Replace boolean arguments do_timers_now, filter_events with flags, and pass flags to readable_events. Document new READABLE_EVENTS_* flags. (detect_input_pending_ignore_squeezables): New function. (detect_input_pending_run_timers): Call get_input_pending with flag READABLE_EVENTS_DO_TIMERS_NOW. (Finput_pending_p): Call get_input_pending with flags READABLE_EVENTS_DO_TIMERS_NOW and READABLE_EVENTS_FILTER_EVENTS. * dispnew.c (update_window, update_frame_1): Replace calls to detect_input_pending with detect_input_pending_ignore_squeezables so that redisplay is not paused if the event queue contains only mouse movements. * lisp.h: Declare detect_input_pending_ignore_squeezables. --- src/ChangeLog | 32 +++++++++++++++++ src/dispnew.c | 8 ++--- src/keyboard.c | 93 ++++++++++++++++++++++++-------------------------- src/lisp.h | 1 + 4 files changed, 81 insertions(+), 53 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index eb87729133d..57be0b86123 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,35 @@ +2005-01-16 YAMAMOTO Mitsuharu + + * keyboard.c (READABLE_EVENTS_DO_TIMERS_NOW) + (READABLE_EVENTS_FILTER_EVENTS) + (READABLE_EVENTS_IGNORE_SQUEEZABLES): New flags for readable_events. + get_filtered_input_pending, readable_filtered_events): Removed. + (tracking_off): Call readable_events and get_input_pending with + flag READABLE_EVENTS_DO_TIMERS_NOW. + (readable_events): Move code from old readable_filtered_events here, + but check new READABLE_EVENTS_* in argument flags instead of previous + two boolean arguments do_timers_now and filter_events. + If we are doing mouse tracking and the mouse moved, return only if + READABLE_EVENTS_IGNORE_SQUEEZABLES is not set in flags. + (swallow_events): Call get_input_pending with flag + READABLE_EVENTS_DO_TIMERS_NOW. + (get_input_pending): Move code from old get_filtered_input_pending + here. Replace boolean arguments do_timers_now, filter_events with + flags, and pass flags to readable_events. Document new + READABLE_EVENTS_* flags. + (detect_input_pending_ignore_squeezables): New function. + (detect_input_pending_run_timers): Call get_input_pending with flag + READABLE_EVENTS_DO_TIMERS_NOW. + (Finput_pending_p): Call get_input_pending with flags + READABLE_EVENTS_DO_TIMERS_NOW and READABLE_EVENTS_FILTER_EVENTS. + + * dispnew.c (update_window, update_frame_1): Replace calls to + detect_input_pending with detect_input_pending_ignore_squeezables + so that redisplay is not paused if the event queue contains only + mouse movements. + + * lisp.h: Declare detect_input_pending_ignore_squeezables. + 2005-01-15 Steven Tamm * macterm.c (Vmac_use_core_graphics): defined for diff --git a/src/dispnew.c b/src/dispnew.c index 78ca0e39109..ff26a4dc66c 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4075,7 +4075,7 @@ update_window (w, force_p) if (redisplay_dont_pause) force_p = 1; else - detect_input_pending (); + detect_input_pending_ignore_squeezables (); /* If forced to complete the update, or if no input is pending, do the update. */ @@ -4149,7 +4149,7 @@ update_window (w, force_p) scrolling large windows with repeated scroll-up commands will too quickly pause redisplay. */ if (!force_p && ++n_updated % preempt_count == 0) - detect_input_pending (); + detect_input_pending_ignore_squeezables (); changed_p |= update_window_line (w, vpos, &mouse_face_overwritten_p); @@ -5093,7 +5093,7 @@ update_frame_1 (f, force_p, inhibit_id_p) if (redisplay_dont_pause) force_p = 1; - else if (!force_p && detect_input_pending ()) + else if (!force_p && detect_input_pending_ignore_squeezables ()) { pause = 1; goto do_pause; @@ -5149,7 +5149,7 @@ update_frame_1 (f, force_p, inhibit_id_p) } if ((i - 1) % preempt_count == 0) - detect_input_pending (); + detect_input_pending_ignore_squeezables (); update_frame_line (f, i); } diff --git a/src/keyboard.c b/src/keyboard.c index fb52c7e9f61..3b7d2aac981 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -646,14 +646,17 @@ static EMACS_TIME timer_last_idleness_start_time; /* Global variable declarations. */ +/* Flags for readable_events. */ +#define READABLE_EVENTS_DO_TIMERS_NOW (1 << 0) +#define READABLE_EVENTS_FILTER_EVENTS (1 << 1) +#define READABLE_EVENTS_IGNORE_SQUEEZABLES (1 << 2) + /* Function for init_keyboard to call with no args (if nonzero). */ void (*keyboard_init_hook) (); static int read_avail_input P_ ((int)); static void get_input_pending P_ ((int *, int)); -static void get_filtered_input_pending P_ ((int *, int, int)); static int readable_events P_ ((int)); -static int readable_filtered_events P_ ((int, int)); static Lisp_Object read_char_x_menu_prompt P_ ((int, Lisp_Object *, Lisp_Object, int *)); static Lisp_Object read_char_x_menu_prompt (); @@ -3441,10 +3444,11 @@ tracking_off (old_value) input has been processed. If the only input available was the sort that we have just disabled, then we need to call redisplay. */ - if (!readable_events (1)) + if (!readable_events (READABLE_EVENTS_DO_TIMERS_NOW)) { redisplay_preserve_echo_area (6); - get_input_pending (&input_pending, 1); + get_input_pending (&input_pending, + READABLE_EVENTS_DO_TIMERS_NOW); } } return Qnil; @@ -3496,20 +3500,19 @@ some_mouse_moved () /* Return true iff there are any events in the queue that read-char would return. If this returns false, a read-char would block. */ static int -readable_filtered_events (do_timers_now, filter_events) - int do_timers_now; - int filter_events; +readable_events (flags) + int flags; { - if (do_timers_now) - timer_check (do_timers_now); + if (flags & READABLE_EVENTS_DO_TIMERS_NOW) + timer_check (1); - /* If the buffer contains only FOCUS_IN_EVENT events, - and FILTER_EVENTS is nonzero, report it as empty. */ + /* If the buffer contains only FOCUS_IN_EVENT events, and + READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */ if (kbd_fetch_ptr != kbd_store_ptr) { int have_live_event = 1; - if (filter_events) + if (flags & READABLE_EVENTS_FILTER_EVENTS) { struct input_event *event; @@ -3530,7 +3533,8 @@ readable_filtered_events (do_timers_now, filter_events) } #ifdef HAVE_MOUSE - if (!NILP (do_mouse_tracking) && some_mouse_moved ()) + if (!(flags & READABLE_EVENTS_IGNORE_SQUEEZABLES) + && !NILP (do_mouse_tracking) && some_mouse_moved ()) return 1; #endif if (single_kboard) @@ -3548,15 +3552,6 @@ readable_filtered_events (do_timers_now, filter_events) return 0; } -/* Return true iff there are any events in the queue that read-char - would return. If this returns false, a read-char would block. */ -static int -readable_events (do_timers_now) - int do_timers_now; -{ - return readable_filtered_events (do_timers_now, 0); -} - /* Set this for debugging, to have a way to get out */ int stop_character; @@ -4227,7 +4222,7 @@ swallow_events (do_display) } old_timers_run = timers_run; - get_input_pending (&input_pending, 1); + get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW); if (timers_run != old_timers_run && do_display) redisplay_preserve_echo_area (7); @@ -6519,18 +6514,20 @@ lucid_event_type_list_p (object) but works even if FIONREAD does not exist. (In fact, this may actually read some input.) - If DO_TIMERS_NOW is nonzero, actually run timer events that are ripe. - If FILTER_EVENTS is nonzero, ignore internal events (FOCUS_IN_EVENT). */ + If READABLE_EVENTS_DO_TIMERS_NOW is set in FLAGS, actually run + timer events that are ripe. + If READABLE_EVENTS_FILTER_EVENTS is set in FLAGS, ignore internal + events (FOCUS_IN_EVENT). + If READABLE_EVENTS_IGNORE_SQUEEZABLES is set in FLAGS, ignore mouse + movements. */ static void -get_filtered_input_pending (addr, do_timers_now, filter_events) +get_input_pending (addr, flags) int *addr; - int do_timers_now; - int filter_events; + int flags; { /* First of all, have we already counted some input? */ - *addr = (!NILP (Vquit_flag) - || readable_filtered_events (do_timers_now, filter_events)); + *addr = (!NILP (Vquit_flag) || readable_events (flags)); /* If input is being read as it arrives, and we have none, there is none. */ if (*addr > 0 || (interrupt_input && ! interrupts_deferred)) @@ -6538,23 +6535,7 @@ get_filtered_input_pending (addr, do_timers_now, filter_events) /* Try to read some input and see how much we get. */ gobble_input (0); - *addr = (!NILP (Vquit_flag) - || readable_filtered_events (do_timers_now, filter_events)); -} - -/* Store into *addr a value nonzero if terminal input chars are available. - Serves the purpose of ioctl (0, FIONREAD, addr) - but works even if FIONREAD does not exist. - (In fact, this may actually read some input.) - - If DO_TIMERS_NOW is nonzero, actually run timer events that are ripe. */ - -static void -get_input_pending (addr, do_timers_now) - int *addr; - int do_timers_now; -{ - get_filtered_input_pending (addr, do_timers_now, 0); + *addr = (!NILP (Vquit_flag) || readable_events (flags)); } /* Interface to read_avail_input, blocking SIGIO or SIGALRM if necessary. */ @@ -9871,6 +9852,18 @@ detect_input_pending () return input_pending; } +/* Return nonzero if input events other than mouse movements are + pending. */ + +int +detect_input_pending_ignore_squeezables () +{ + if (!input_pending) + get_input_pending (&input_pending, READABLE_EVENTS_IGNORE_SQUEEZABLES); + + return input_pending; +} + /* Return nonzero if input events are pending, and run any pending timers. */ int @@ -9880,7 +9873,7 @@ detect_input_pending_run_timers (do_display) int old_timers_run = timers_run; if (!input_pending) - get_input_pending (&input_pending, 1); + get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW); if (old_timers_run != timers_run && do_display) { @@ -9929,7 +9922,9 @@ if there is a doubt, the value is t. */) if (!NILP (Vunread_command_events) || unread_command_char != -1) return (Qt); - get_filtered_input_pending (&input_pending, 1, 1); + get_input_pending (&input_pending, + READABLE_EVENTS_DO_TIMERS_NOW + | READABLE_EVENTS_FILTER_EVENTS); return input_pending > 0 ? Qt : Qnil; } diff --git a/src/lisp.h b/src/lisp.h index f6db53f2ff8..49acb225e1e 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2906,6 +2906,7 @@ EXFUN (Fevent_convert_list, 1); EXFUN (Fread_key_sequence, 5); EXFUN (Fset_input_mode, 4); extern int detect_input_pending P_ ((void)); +extern int detect_input_pending_ignore_squeezables P_ ((void)); extern int detect_input_pending_run_timers P_ ((int)); extern void safe_run_hooks P_ ((Lisp_Object)); extern void cmd_error_internal P_ ((Lisp_Object, char *)); From 50af5100a6e0234668d100ca5d4cb3479436b8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sun, 16 Jan 2005 09:59:03 +0000 Subject: [PATCH 278/560] * fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning fringe_faces, cast result from xmalloc/xrealloc to Lisp_Object *. --- src/ChangeLog | 5 +++++ src/fringe.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 57be0b86123..159e64daf67 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-16 Jan Dj,Ad(Brv + + * fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning + fringe_faces, cast result from xmalloc/xrealloc to Lisp_Object *. + 2005-01-16 YAMAMOTO Mitsuharu * keyboard.c (READABLE_EVENTS_DO_TIMERS_NOW) diff --git a/src/fringe.c b/src/fringe.c index e8b8cedee4c..9e9d6be081c 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1301,7 +1301,7 @@ If BITMAP already exists, the existing definition is replaced. */) = ((struct fringe_bitmap **) xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof (struct fringe_bitmap *))); fringe_faces - = (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object)); + = (Lisp_Object *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object)); for (; i < max_fringe_bitmaps; i++) { @@ -1472,7 +1472,7 @@ init_fringe () fringe_bitmaps = (struct fringe_bitmap **) xmalloc (max_fringe_bitmaps * sizeof (struct fringe_bitmap *)); fringe_faces - = (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (Lisp_Object)); + = (Lisp_Object *) xmalloc (max_fringe_bitmaps * sizeof (Lisp_Object)); for (i = 0; i < max_fringe_bitmaps; i++) { From 01917a18b40405b2cb7eaf279e8db13875c9c5be Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 16 Jan 2005 13:18:31 +0000 Subject: [PATCH 279/560] Sync with Tramp 2.0.47. --- lisp/ChangeLog | 46 ++++++++++++++++++++++ lisp/net/tramp-smb.el | 57 ++++----------------------- lisp/net/tramp-util.el | 68 +++++++++++++++++++++++++++++++- lisp/net/tramp-vc.el | 9 +++-- lisp/net/tramp.el | 88 ++++++++++++++++++++++++++++++++---------- lisp/net/trampver.el | 2 +- man/ChangeLog | 7 ++++ man/tramp.texi | 32 ++++++++++++++- man/trampver.texi | 2 +- 9 files changed, 233 insertions(+), 78 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1def811c5c5..d3ee155e0fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,49 @@ +2005-01-16 Michael Albinus + + Sync with Tramp 2.0.47. + + * tramp.el (tramp-operation-not-permitted-regexp) New defcustom, + catching keep-date problems in cp/scp operations. + (tramp-handle-copy-file): Don't call `set-file-modes' + unconditionally. Specialized functions should know better what is + necessary. This improves performance a little bit, and the + functions could catch errors with `cp -p' and `scp -p'. + (tramp-do-copy-or-rename-file-via-buffer) + (tramp-do-copy-or-rename-file-out-of-band): Call `set-file-modes' + when appropriate. + (tramp-do-copy-or-rename-file-directly): Mask `cp -p' error. Call + `set-file-modes' when appropriate. + (tramp-action-out-of-band): Mask `scp -p' error. Reported by Isak + Johnsson + (tramp-get-buffer, tramp-get-debug-buffer): Discard the undo list + of both Tramp buffer and debug buffer. Reported by Joakim Verona + + (tramp-file-name-for-operation): Mark `shell-command' as magic for + Emacs only. + + * tramp-util.el (tramp-minor-mode): New minor mode. Add it to + `find-file-hooks' and `dired-mode-hook'. + (tramp-minor-mode-map): Respective map. Add remapping for + `compile' and `recompile'. + (tramp-remap-command, tramp-recompile): New defuns. + (tramp-compile): Enable `tramp-minor-mode' and `compilation-mode' + in buffer "*Compilation*". Call the commands asynchronously. + + * tramp-vc.el (tramp-vc-do-command, tramp-vc-do-command-new) + (tramp-vc-simple-command): Call `tramp-handle-shell-command' but + `shell-command', because it isn't magic in XEmacs. Reported by + Adrian Aichner . + + * tramp-smb.el (tramp-smb-file-name-handler-alist): Add entry for + `substitute-in-file-name. + (tramp-smb-handle-substitute-in-file-name): New defun. + (tramp-smb-advice-PC-do-completion): Delete advice. + +2005-01-16 Kai Grossjohann + + * tramp.el (tramp-wait-for-output): Fix typo in echo processing. + Fix error in deleting region. + 2005-01-15 Richard M. Stallman * emacs-lisp/lisp-mnt.el (lm-with-file): Use Lisp mode in temp buffer. diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index d0a7cf7b65f..6fa0433a574 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -172,7 +172,7 @@ This variable is local to each buffer.") (set-file-modes . tramp-smb-not-handled) (set-visited-file-modtime . tramp-smb-not-handled) (shell-command . tramp-smb-not-handled) - ;; `substitute-in-file-name' performed by default handler + (substitute-in-file-name . tramp-smb-handle-substitute-in-file-name) (unhandled-file-name-directory . tramp-handle-unhandled-file-name-directory) (vc-registered . tramp-smb-not-handled) (verify-visited-file-modtime . tramp-smb-not-handled) @@ -617,6 +617,13 @@ WILDCARD and FULL-DIRECTORY-P are not handled." (delete-file filename)) +(defun tramp-smb-handle-substitute-in-file-name (filename) + "Like `handle-substitute-in-file-name' for tramp files. +Catches errors for shares like \"C$/\", which are common in Microsoft Windows." + (condition-case nil + (tramp-run-real-handler 'substitute-in-file-name (list filename)) + (error filename))) + (defun tramp-smb-handle-write-region (start end filename &optional append visit lockname confirm) "Like `write-region' for tramp files." @@ -1084,54 +1091,6 @@ Return the difference in the format of a time value." (- (+ (if borrow 65536 0) (cadr t1)) (cadr t2))))) -;; `PC-do-completion' touches the returning "$$" by `substitute-in-file-name'. -;; Must be corrected. - -(defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion) - "Changes \"$\" back to \"$$\" in minibuffer." - (if (funcall PC-completion-as-file-name-predicate) - - (progn - ;; Substitute file names - (let* ((beg (or (and (functionp 'minibuffer-prompt-end) ; Emacs 21 - (funcall 'minibuffer-prompt-end)) - (point-min))) - (end (point-max)) - (str (substitute-in-file-name (buffer-substring beg end)))) - (delete-region beg end) - (insert str) - (ad-set-arg 2 (point))) - - ;; Do `PC-do-completion' without substitution - (let* (save) - (fset 'save (symbol-function 'substitute-in-file-name)) - (unwind-protect - (progn - (fset 'substitute-in-file-name (symbol-function 'identity)) - ad-do-it) - (fset 'substitute-in-file-name (symbol-function 'save)))) - - ;; Expand "$" - (let* ((beg (or (and (functionp 'minibuffer-prompt-end) ; Emacs 21 - (funcall 'minibuffer-prompt-end)) - (point-min))) - (end (point-max)) - (str (buffer-substring beg end))) - (delete-region beg end) - (insert (if (string-match "\\(\\$\\)\\(/\\|$\\)" str) - (replace-match "$$" nil nil str 1) - str)))) - - ;; No file names. Behave unchanged. - ad-do-it)) - -;; Activate advice. Recent Emacsen don't need that. -(when (functionp 'PC-do-completion) - (condition-case nil - (substitute-in-file-name "C$/") - (error - (ad-activate 'PC-do-completion)))) - (provide 'tramp-smb) ;;; TODO: diff --git a/lisp/net/tramp-util.el b/lisp/net/tramp-util.el index 2d828d27c51..1cd7f14dcd6 100644 --- a/lisp/net/tramp-util.el +++ b/lisp/net/tramp-util.el @@ -1,9 +1,9 @@ ;;; -*- coding: iso-2022-7bit; -*- ;;; tramp-util.el --- Misc utility functions to use with Tramp -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -;; Author: Kai Gro,A_(Bjohann +;; Author: kai.grossjohann@gmx.net ;; Keywords: comm, extensions, processes ;; This file is free software; you can redistribute it and/or modify @@ -32,6 +32,60 @@ (require 'compile) (require 'tramp) +;; Define a Tramp minor mode. It's intention is to redefine some keys for Tramp +;; specific functions, like compilation. +;; The key remapping works since Emacs 21.4 only. Unknown for XEmacs. + +(when (fboundp 'define-minor-mode) + + (defvar tramp-minor-mode-map (make-sparse-keymap) + "Keymap for Tramp minor mode.") + + (define-minor-mode tramp-minor-mode "Tramp minor mode for utility functions." + :group 'tramp + :global nil + :init-value nil + :lighter " Tramp" + :keymap tramp-minor-mode-map + (setq tramp-minor-mode + (and tramp-minor-mode (tramp-tramp-file-p default-directory)))) + + (add-hook 'find-file-hooks 'tramp-minor-mode t) + (add-hook 'dired-mode-hook 'tramp-minor-mode t) + + (defun tramp-remap-command (old-command new-command) + "Replaces bindings of OLD-COMMAND by NEW-COMMAND. +If remapping functionality for keymaps is defined, this happens for all +bindings. Otherwise, only bindings active during invocation are taken +into account. XEmacs menubar bindings are not changed by this." + (if (functionp 'command-remapping) + ;; Emacs 21.4 + (eval + `(define-key tramp-minor-mode-map [remap ,old-command] new-command)) + ;; previous Emacs 21 versions. + (mapcar + '(lambda (x) + (define-key tramp-minor-mode-map x new-command)) + (where-is-internal old-command)))) + + (tramp-remap-command 'compile 'tramp-compile) + (tramp-remap-command 'recompile 'tramp-recompile) + + ;; XEmacs has an own mimic for menu entries + (when (fboundp 'add-menu-button) + (funcall 'add-menu-button + '("Tools" "Compile") + ["Compile..." + (command-execute (if tramp-minor-mode 'tramp-compile 'compile)) + :active (fboundp 'compile)]) + (funcall 'add-menu-button + '("Tools" "Compile") + ["Repeat Compilation" + (command-execute (if tramp-minor-mode 'tramp-recompile 'recompile)) + :active (fboundp 'compile)]))) + +;; Utility functions. + (defun tramp-compile (command) "Compile on remote host." (interactive @@ -49,6 +103,16 @@ (setq default-directory d))) (tramp-handle-shell-command command (get-buffer "*Compilation*")) (pop-to-buffer (get-buffer "*Compilation*")) + (tramp-minor-mode 1) + (compilation-minor-mode 1)) + +(defun tramp-recompile () + "Re-compile on remote host." + (interactive) + (save-some-buffers (not compilation-ask-about-save) nil) + (tramp-handle-shell-command compile-command (get-buffer "*Compilation*")) + (pop-to-buffer (get-buffer "*Compilation*")) + (tramp-minor-mode 1) (compilation-minor-mode 1)) (provide 'tramp-util) diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el index 3cc54eda650..c2a9ae737df 100644 --- a/lisp/net/tramp-vc.el +++ b/lisp/net/tramp-vc.el @@ -130,7 +130,8 @@ See `vc-do-command' for more information." (save-excursion (save-window-excursion ;; Actually execute remote command - (shell-command + ;; `shell-command' cannot be used; it isn't magic in XEmacs. + (tramp-handle-shell-command (mapconcat 'tramp-shell-quote-argument (cons command squeezed) " ") t) ;;(tramp-wait-for-output) @@ -190,7 +191,8 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (let ((w32-quote-process-args t)) (when (eq okstatus 'async) (message "Tramp doesn't do async commands, running synchronously.")) - (setq status (shell-command + ;; `shell-command' cannot be used; it isn't magic in XEmacs. + (setq status (tramp-handle-shell-command (mapconcat 'tramp-shell-quote-argument (cons command squeezed) " ") t)) (when (or (not (integerp status)) @@ -285,7 +287,8 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (save-excursion (save-window-excursion ;; Actually execute remote command - (shell-command + ;; `shell-command' cannot be used; it isn't magic in XEmacs. + (tramp-handle-shell-command (mapconcat 'tramp-shell-quote-argument (append (list command) args (list localname)) " ") (get-buffer-create"*vc-info*")) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 34572e98674..90bc30744c7 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1,7 +1,7 @@ ;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*- ;;; tramp.el --- Transparent Remote Access, Multiple Protocol -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: kai.grossjohann@gmx.net ;; Keywords: comm, processes @@ -912,6 +912,15 @@ The answer will be provided by `tramp-action-terminal', which see." :group 'tramp :type 'regexp) +(defcustom tramp-operation-not-permitted-regexp + (concat "\\(" "preserving times.*" "\\|" "set mode" "\\)" ":\\s-*" + (regexp-opt '("Operation not permitted") t)) + "Regular expression matching keep-date problems in (s)cp operations. +Copying has been performed successfully already, so this message can +be ignored safely." + :group 'tramp + :type 'regexp) + (defcustom tramp-process-alive-regexp "" "Regular expression indicating a process has finished. @@ -2500,7 +2509,7 @@ if the remote host can't provide the modtime." (fa2 (file-attributes file2))) (if (and (not (equal (nth 5 fa1) '(0 0))) (not (equal (nth 5 fa2) '(0 0)))) - (< 0 (tramp-time-diff (nth 5 fa1) (nth 5 fa2))) + (> 0 (tramp-time-diff (nth 5 fa2) (nth 5 fa1))) ;; If one of them is the dont-know value, then we can ;; still try to run a shell command on the remote host. ;; However, this only works if both files are Tramp @@ -2822,10 +2831,8 @@ if the remote host can't provide the modtime." ;; At least one file a tramp file? (if (or (tramp-tramp-file-p filename) (tramp-tramp-file-p newname)) - (let ((modes (file-modes filename))) - (tramp-do-copy-or-rename-file - 'copy filename newname ok-if-already-exists keep-date) - (set-file-modes newname modes)) + (tramp-do-copy-or-rename-file + 'copy filename newname ok-if-already-exists keep-date) (tramp-run-real-handler 'copy-file (list filename newname ok-if-already-exists keep-date)))) @@ -2973,8 +2980,9 @@ KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." (when keep-date (when (and (not (null modtime)) (not (equal modtime '(0 0)))) - (tramp-touch newname modtime)) - (set-file-modes newname (file-modes filename)))) + (tramp-touch newname modtime))) + ;; Set the mode. + (set-file-modes newname (file-modes filename))) ;; If the operation was `rename', delete the original file. (unless (eq op 'copy) (delete-file filename)))) @@ -2994,15 +3002,34 @@ If KEEP-DATE is non-nil, preserve the time stamp when copying." "Unknown operation `%s', must be `copy' or `rename'" op))))) (save-excursion - (tramp-barf-unless-okay + (tramp-send-command multi-method method user host (format "%s %s %s" cmd (tramp-shell-quote-argument localname1) - (tramp-shell-quote-argument localname2)) - nil 'file-error - "Copying directly failed, see buffer `%s' for details." - (buffer-name))))) + (tramp-shell-quote-argument localname2))) + (tramp-wait-for-output) + (goto-char (point-min)) + (unless + (or + (and (eq op 'copy) keep-date + ;; Mask cp -f error. + (re-search-forward tramp-operation-not-permitted-regexp nil t)) + (zerop (tramp-send-command-and-check + multi-method method user host nil nil))) + (pop-to-buffer (current-buffer)) + (signal 'file-error + (format "Copying directly failed, see buffer `%s' for details." + (buffer-name))))) + ;; Set the mode. + ;; CCC: Maybe `chmod --reference=localname1 localname2' could be used + ;; where available? + (unless (or (eq op 'rename) keep-date) + (set-file-modes + (tramp-make-tramp-file-name multi-method method user host localname2) + (file-modes + (tramp-make-tramp-file-name + multi-method method user host localname1)))))) (defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date) "Invoke rcp program to copy. @@ -3122,7 +3149,11 @@ be a local filename. The method used must be an out-of-band method." tramp-actions-copy-out-of-band)) (kill-buffer trampbuf) (tramp-message - 5 "Transferring %s to file %s...done" filename newname)) + 5 "Transferring %s to file %s...done" filename newname) + + ;; Set the mode. + (unless keep-date + (set-file-modes newname (file-modes filename)))) ;; If the operation was `rename', delete the original file. (unless (eq op 'copy) @@ -4074,7 +4105,9 @@ ARGS are the arguments OPERATION has been called with." (if (bufferp (nth 0 args)) (nth 0 args) (current-buffer)))) ; COMMAND ((member operation - (list 'dired-call-process 'shell-command + (list 'dired-call-process-command + ; Emacs only + 'shell ; Post Emacs 21.3 only 'process-file ; XEmacs only @@ -4908,7 +4941,10 @@ USER the array of user names, HOST the array of host names." (defun tramp-get-buffer (multi-method method user host) "Get the connection buffer to be used for USER at HOST using METHOD." - (get-buffer-create (tramp-buffer-name multi-method method user host))) + (with-current-buffer + (get-buffer-create (tramp-buffer-name multi-method method user host)) + (setq buffer-undo-list t) + (current-buffer))) (defun tramp-debug-buffer-name (multi-method method user host) "A name for the debug buffer for USER at HOST using METHOD." @@ -4922,7 +4958,11 @@ USER the array of user names, HOST the array of host names." (defun tramp-get-debug-buffer (multi-method method user host) "Get the debug buffer for USER at HOST using METHOD." - (get-buffer-create (tramp-debug-buffer-name multi-method method user host))) + (with-current-buffer + (get-buffer-create + (tramp-debug-buffer-name multi-method method user host)) + (setq buffer-undo-list t) + (current-buffer))) (defun tramp-find-executable (multi-method method user host progname dirlist ignore-tilde) @@ -5214,8 +5254,16 @@ The terminal type can be configured with `tramp-terminal-type'." ((or (and (memq (process-status p) '(stop exit)) (not (zerop (process-exit-status p)))) (memq (process-status p) '(signal))) - (tramp-message 9 "Process has died.") - (throw 'tramp-action 'process-died)) + ;; `scp' could have copied correctly, but set modes could have failed. + ;; This can be ignored. + (goto-char (point-min)) + (if (re-search-forward tramp-operation-not-permitted-regexp nil t) + (progn + (tramp-message 10 "'set mode' error ignored.") + (tramp-message 9 "Process has finished.") + (throw 'tramp-action 'ok)) + (tramp-message 9 "Process has died.") + (throw 'tramp-action 'process-died))) (t nil))) ;; The following functions are specifically for multi connections. @@ -6336,7 +6384,7 @@ Sends COMMAND, then waits 30 seconds for shell prompt." (save-excursion (goto-char start-point) (when (looking-at (regexp-quote tramp-last-cmd)) - (delete-region (point) (forward-line 1))))) + (delete-region (point) (progn (forward-line 1) (point)))))) ;; Add output to debug buffer if appropriate. (when tramp-debug-buffer (append-to-buffer diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 866d6e5647d..a4aced24257 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -30,7 +30,7 @@ ;; are auto-frobbed from configure.ac, so you should edit that file and run ;; "autoconf && ./configure" to change them. -(defconst tramp-version "2.0.46" +(defconst tramp-version "2.0.47" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" diff --git a/man/ChangeLog b/man/ChangeLog index 0f4646e0d73..546589a509b 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,10 @@ +2005-01-16 Michael Albinus + + Sync with Tramp 2.0.47. + + * tramp.texi (Compilation): New section, describing compilation of + remote files. + 2005-01-15 Sergey Poznyakoff * man/rmail.texi: Document support for GNU mailutils in rmail.el. diff --git a/man/tramp.texi b/man/tramp.texi index e8577af4982..ac6fb4d5436 100644 --- a/man/tramp.texi +++ b/man/tramp.texi @@ -25,8 +25,8 @@ @end macro @copying -Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004 Free Software -Foundation, Inc. +Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free +Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -192,6 +192,7 @@ Using @value{tramp} * Multi-hop filename syntax:: Multi-hop filename conventions. * Filename completion:: Filename completion. * Dired:: Dired. +* Compilation:: Compile remote files. The inner workings of remote version control @@ -1690,6 +1691,7 @@ minute you have already forgotten that you hit that key! * Multi-hop filename syntax:: Multi-hop filename conventions. * Filename completion:: Filename completion. * Dired:: Dired. +* Compilation:: Compile remote files. @end menu @@ -1885,6 +1887,32 @@ present, than filename completion. Dired has its own cache mechanism and will only fetch the directory listing once. +@node Compilation +@section Compile remote files +@cindex compile +@cindex recompile + +@value{tramp} provides commands for compilation of files on remote +machines. In order to get them loaded, you need to require +@file{tramp-util.el}: + +@lisp +(require 'tramp-util) +@end lisp + +Afterwards, you can use the commands @code{tramp-compile} and +@code{tramp-recompile} instead of @code{compile} and @code{recompile}, +respectively; @inforef{Compilation, ,@value{emacsdir}}. This does not +work for the @option{ftp} and @option{smb} methods. + +The corresponding key bindings and menu entries calling these commands +are redefined automatically for buffers associated with remote files. + +After finishing the compilation, you can use the usual commands like +@code{previous-error}, @code{next-error} and @code{first-error} for +navigation in the @file{*Compilation*} buffer. + + @node Bug Reports @chapter Reporting Bugs and Problems @cindex bug reports diff --git a/man/trampver.texi b/man/trampver.texi index 45cbefb72ac..87b1dc8ebd1 100644 --- a/man/trampver.texi +++ b/man/trampver.texi @@ -4,7 +4,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.0.46 +@set trampver 2.0.47 @c Other flags from configuration @set prefix /usr/local From fc2ff44b4732cc4a2e6d1c293d5531a4723dc0e8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 16 Jan 2005 16:18:12 +0000 Subject: [PATCH 280/560] (mac_draw_string_common): Fix compilation on OSX 10.1. --- src/ChangeLog | 4 ++++ src/macterm.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 159e64daf67..ba0115d079a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-16 Andreas Schwab + + * macterm.c (mac_draw_string_common): Fix compilation on OSX 10.1. + 2005-01-16 Jan Dj,Ad(Brv * fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning diff --git a/src/macterm.c b/src/macterm.c index 11ec9166832..ae2555ae286 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -1,5 +1,5 @@ /* Implementation of GUI terminal on the Mac OS. - Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -729,7 +729,7 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, int nchars, mode, bytes_per_char; { SetPortWindowPort (w); -#ifdef MAC_OSX +#ifdef MAC_OS_X_VERSION_10_2 UInt32 textFlags, savedFlags; if (!NILP(Vmac_use_core_graphics)) { textFlags = kQDUseCGTextRendering; @@ -746,7 +746,7 @@ mac_draw_string_common (display, w, gc, x, y, buf, nchars, mode, MoveTo (x, y); DrawText (buf, 0, nchars * bytes_per_char); -#ifdef MAC_OSX +#ifdef MAC_OS_X_VERSION_10_2 if (!NILP(Vmac_use_core_graphics)) SwapQDTextFlags(savedFlags); #endif From 5ddd7664e9b52a6f98cad3fe626fefb7ff3c22b3 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sun, 16 Jan 2005 17:52:09 +0000 Subject: [PATCH 281/560] * macterm.c (mac_to_x_fontname): Removed spurious argument. --- src/ChangeLog | 4 ++++ src/macterm.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ba0115d079a..394d5bd11ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-16 Steven Tamm + + * macterm.c (mac_to_x_fontname): Removed spurious argument. + 2005-01-16 Andreas Schwab * macterm.c (mac_draw_string_common): Fix compilation on OSX 10.1. diff --git a/src/macterm.c b/src/macterm.c index ae2555ae286..9e454f25ceb 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -5930,7 +5930,7 @@ decode_mac_font_name (name, size, scriptcode) static char * -mac_to_x_fontname (name, size, style, scriptcode, encoding_base) +mac_to_x_fontname (name, size, style, scriptcode) char *name; int size; Style style; From e24531b776e6092d1895a80065a7a0e4a6e1fce1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 16 Jan 2005 19:18:31 +0000 Subject: [PATCH 282/560] (syms_of_macterm) : Doc fix. --- src/ChangeLog | 20 ++++++++++++-------- src/macterm.c | 6 ++++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 394d5bd11ef..7f0cb64b2c5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-16 Kim F. Storm + + * macterm.c (syms_of_macterm) : Doc fix. + 2005-01-16 Steven Tamm * macterm.c (mac_to_x_fontname): Removed spurious argument. @@ -14,9 +18,9 @@ 2005-01-16 YAMAMOTO Mitsuharu * keyboard.c (READABLE_EVENTS_DO_TIMERS_NOW) - (READABLE_EVENTS_FILTER_EVENTS) - (READABLE_EVENTS_IGNORE_SQUEEZABLES): New flags for readable_events. - get_filtered_input_pending, readable_filtered_events): Removed. + (READABLE_EVENTS_FILTER_EVENTS, READABLE_EVENTS_IGNORE_SQUEEZABLES): + New flags for readable_events. + (get_filtered_input_pending, readable_filtered_events): Removed. (tracking_off): Call readable_events and get_input_pending with flag READABLE_EVENTS_DO_TIMERS_NOW. (readable_events): Move code from old readable_filtered_events here, @@ -26,7 +30,7 @@ READABLE_EVENTS_IGNORE_SQUEEZABLES is not set in flags. (swallow_events): Call get_input_pending with flag READABLE_EVENTS_DO_TIMERS_NOW. - (get_input_pending): Move code from old get_filtered_input_pending + (get_input_pending): Move code from old get_filtered_input_pending here. Replace boolean arguments do_timers_now, filter_events with flags, and pass flags to readable_events. Document new READABLE_EVENTS_* flags. @@ -38,16 +42,16 @@ * dispnew.c (update_window, update_frame_1): Replace calls to detect_input_pending with detect_input_pending_ignore_squeezables - so that redisplay is not paused if the event queue contains only + so that redisplay is not paused if the event queue contains only mouse movements. * lisp.h: Declare detect_input_pending_ignore_squeezables. 2005-01-15 Steven Tamm - * macterm.c (Vmac_use_core_graphics): defined for - mac-allow-anti-aliasing - (syms_of_macterm): Added mac-allow-anti-aliasing + * macterm.c (Vmac_use_core_graphics): Declare variable for + mac-allow-anti-aliasing. + (syms_of_macterm): DEFVAR_LISP and initialize it. (mac_draw_string_common): Use core graphics text rendering if mac-allow-anti-aliasing is enabled. diff --git a/src/macterm.c b/src/macterm.c index 9e454f25ceb..ebebb129bb8 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -6798,7 +6798,7 @@ XLoadQueryFont (Display *dpy, char *fontname) font->max_bounds.width = max_width; } } - + TextFont (old_fontnum); /* restore previous font number, size and face */ TextSize (old_fontsize); TextFace (old_fontface); @@ -9924,7 +9924,9 @@ Toolbox for processing before Emacs sees it. */); #endif DEFVAR_LISP ("mac-allow-anti-aliasing", &Vmac_use_core_graphics, - doc: /* If non-nil, the text will be rendered using Core Graphics text rendering which may anti-alias the text. */); + doc: /* If non-nil, allow anti-aliasing. +The text will be rendered using Core Graphics text rendering which +may anti-alias the text. */); Vmac_use_core_graphics = Qnil; DEFVAR_INT ("mac-keyboard-text-encoding", &mac_keyboard_text_encoding, From 86cf6b94ed87d3d62c833d70adf5e0c695a8ea05 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 16 Jan 2005 23:24:31 +0000 Subject: [PATCH 283/560] (Autoinserting): Fix small error. --- man/autotype.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/autotype.texi b/man/autotype.texi index 16e88851c4b..9d88443e891 100644 --- a/man/autotype.texi +++ b/man/autotype.texi @@ -400,7 +400,7 @@ directory for which Emacs could determine no specialized mode In Lisp (@pxref{(emacs)Init File}) you can use the function @code{define-auto-insert} to add to or modify @code{auto-insert-alist}. See its documentation with @kbd{C-h f -auto-insert-alist}. +define-auto-insert}. @vindex auto-insert The variable @code{auto-insert} says what to do when @code{auto-insert} is From cd7e5dd67d8b2a04e48a01714f7f5e7d87c97d4d Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 17 Jan 2005 02:44:58 +0000 Subject: [PATCH 284/560] (Changing Key Bindings): `suppress-keymap' now uses command remapping. --- lispref/ChangeLog | 5 +++++ lispref/keymaps.texi | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 635ca735e55..e31f6530afa 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2005-01-16 Luc Teirlinck + + * keymaps.texi (Changing Key Bindings): `suppress-keymap' now uses + command remapping. + 2005-01-14 Kim F. Storm * commands.texi (Accessing Events): Add WHOLE arg to posn-at-x-y. diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index b3ae0d8808e..8b2644c4fbb 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -1266,9 +1266,10 @@ map @defun suppress-keymap keymap &optional nodigits @cindex @code{self-insert-command} override This function changes the contents of the full keymap @var{keymap} by -making all the printing characters undefined. More precisely, it binds -them to the command @code{undefined}. This makes ordinary insertion of -text impossible. @code{suppress-keymap} returns @code{nil}. +remapping @code{self-insert-command} to the command @code{undefined} +(@pxref{Remapping Commands}). This has the effect of undefining all +printing characters, thus making ordinary insertion of text impossible. +@code{suppress-keymap} returns @code{nil}. If @var{nodigits} is @code{nil}, then @code{suppress-keymap} defines digits to run @code{digit-argument}, and @kbd{-} to run From 977284ccb18100f3b3660799b7d2f507bea4c28b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 17 Jan 2005 08:28:01 +0000 Subject: [PATCH 285/560] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 7f0cb64b2c5..b277cf5b454 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-17 Kim F. Storm + + * dispnew.c (mode_line_string, marginal_area_string): Fix + off-by-one error in search for glyph. + 2005-01-16 Kim F. Storm * macterm.c (syms_of_macterm) : Doc fix. From cfde341f3bf4214108cb2aede40ad6f6c1783d23 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 17 Jan 2005 08:28:28 +0000 Subject: [PATCH 286/560] (mode_line_string, marginal_area_string): Fix off-by-one error in search for glyph. --- src/dispnew.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index ff26a4dc66c..1c3c56de80b 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5842,7 +5842,7 @@ mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height) it's the one we were looking for. */ glyph = row->glyphs[TEXT_AREA]; end = glyph + row->used[TEXT_AREA]; - for (x0 = *x; glyph < end && x0 > glyph->pixel_width; ++glyph) + for (x0 = *x; glyph < end && x0 >= glyph->pixel_width; ++glyph) x0 -= glyph->pixel_width; *x = glyph - row->glyphs[TEXT_AREA]; if (glyph < end) @@ -5934,7 +5934,7 @@ marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height) glyph = row->glyphs[area]; end = glyph + row->used[area]; - for (x0 = *x - x0; glyph < end && x0 > glyph->pixel_width; ++glyph) + for (x0 = *x - x0; glyph < end && x0 >= glyph->pixel_width; ++glyph) x0 -= glyph->pixel_width; *x = glyph - row->glyphs[area]; if (glyph < end) From 4177462350116d7facbc09850f2692097ef7b4a0 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 17 Jan 2005 09:50:59 +0000 Subject: [PATCH 287/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3ee155e0fa..880f6413508 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-17 Nick Roberts + + * xt-mouse.el (xterm-mouse-event): Set new optional fourth arg in + posn-x-y to t to access left-margin. + 2005-01-16 Michael Albinus Sync with Tramp 2.0.47. From 30598da5fb164cb4fe10d8453073be07213d184e Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 17 Jan 2005 09:54:56 +0000 Subject: [PATCH 288/560] (xterm-mouse-event): Set new optional fourth arg in posn-x-y to t to access left-margin. --- lisp/ChangeLog | 2 +- lisp/xt-mouse.el | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 880f6413508..ad42bc95756 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,7 @@ 2005-01-17 Nick Roberts * xt-mouse.el (xterm-mouse-event): Set new optional fourth arg in - posn-x-y to t to access left-margin. + posn-at-x-y to t to access left-margin. 2005-01-16 Michael Albinus diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 5709834ab91..131f95db7d0 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -1,6 +1,6 @@ ;;; xt-mouse.el --- support the mouse when emacs run in an xterm -;; Copyright (C) 1994, 2000, 2001 Free Software Foundation +;; Copyright (C) 1994, 2000, 2001, 2005 Free Software Foundation ;; Author: Per Abrahamsen ;; Keywords: mouse, terminals @@ -24,7 +24,7 @@ ;;; Commentary: -;; Enable mouse support when running inside an xterm or Linux console. +;; Enable mouse support when running inside an xterm. ;; This is actually useful when you are running X11 locally, but is ;; working on remote machine over a modem line or through a gateway. @@ -32,15 +32,15 @@ ;; It works by translating xterm escape codes into generic emacs mouse ;; events so it should work with any package that uses the mouse. -;; The xterm mouse escape codes are supposedly also supported by the -;; Linux console, but I have not been able to verify this. - ;; You don't have to turn off xterm mode to use the normal xterm mouse ;; functionality, it is still available by holding down the SHIFT key ;; when you press the mouse button. ;;; Todo: +;; The xterm mouse escape codes are supposedly also supported by the +;; Linux console, but I have not been able to verify this. + ;; Support multi-click -- somehow. ;;; Code: @@ -146,9 +146,9 @@ (setq xterm-mouse-x x xterm-mouse-y y) (if w - (list mouse (posn-at-x-y (- x left) (- y top) w)) + (list mouse (posn-at-x-y (- x left) (- y top) w t)) (list mouse - (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w))))))) + (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t))))))) ;;;###autoload (define-minor-mode xterm-mouse-mode From 32073b07e374f15f967ff683e60602d25851c569 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 17 Jan 2005 10:18:56 +0000 Subject: [PATCH 289/560] (org-version): Unnecessary prefix arg removed. --- lisp/textmodes/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 80ff7637365..1ff21ea1ce0 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -215,8 +215,8 @@ (defvar org-version "3.04" "The version number of the file org.el.") -(defun org-version (arg) - (interactive "P") +(defun org-version () + (interactive) (message "Org-mode version %s" org-version)) ;; The following two constants are for compatibility with different From aea3bdb1215bb559537d719c889c4b05c58742f9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 17 Jan 2005 10:55:49 +0000 Subject: [PATCH 290/560] *** empty log message *** --- lisp/ChangeLog | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ad42bc95756..efc80316d14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-17 Kim F. Storm + + * simple.el (just-one-space): Make arg optional. + 2005-01-17 Nick Roberts * xt-mouse.el (xterm-mouse-event): Set new optional fourth arg in @@ -75,7 +79,7 @@ (sh-mode-map): Bind C-c C-\. (sh-backslash-column, sh-backslash-align): New variables. (sh-backslash-region, sh-append-backslash): New functions. - + 2005-01-15 Sergey Poznyakoff * mail/rmail.el: Updated to work with movemail from GNU Mailutils From 68c16b5994a2e054aa67dc2af1579effef241dc8 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 17 Jan 2005 10:56:07 +0000 Subject: [PATCH 291/560] (just-one-space): Make arg optional. --- lisp/simple.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 82ec0e6f7f2..82dd693ad34 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -647,13 +647,13 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point." (skip-chars-backward " \t") (constrain-to-field nil orig-pos))))) -(defun just-one-space (n) +(defun just-one-space (&optional n) "Delete all spaces and tabs around point, leaving one space (or N spaces)." (interactive "*p") (let ((orig-pos (point))) (skip-chars-backward " \t") (constrain-to-field nil orig-pos) - (dotimes (i n) + (dotimes (i (or n 1)) (if (= (following-char) ?\ ) (forward-char 1) (insert ?\ ))) From 4042dc25935c1dcfae0863cd833982562deb1dc2 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Mon, 17 Jan 2005 17:32:30 +0000 Subject: [PATCH 292/560] * textmodes/tex-mode.el (tex-start-shell): Adding -i to the tex-shell cause to force interactivity when using pipes. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/tex-mode.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index efc80316d14..29f41e413e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-17 Steven Tamm + + * textmodes/tex-mode.el (tex-start-shell): Adding -i to the + tex-shell cause to force interactivity when using pipes. + 2005-01-17 Kim F. Storm * simple.el (just-one-space): Make arg optional. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index bac2ed6f800..51be21527d6 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1495,7 +1495,8 @@ Mark is left at original location." (make-comint "tex-shell" (or tex-shell-file-name (getenv "ESHELL") shell-file-name) - nil) + nil + "-i") (let ((proc (get-process "tex-shell"))) (set-process-sentinel proc 'tex-shell-sentinel) (set-process-query-on-exit-flag proc nil) From 6455508dc3eb01373365d9a81d769820e674cae7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 17 Jan 2005 21:18:35 +0000 Subject: [PATCH 293/560] (mode-line-mode-menu): Use bound-and-true-p for all the non-preloaded variables. --- lisp/bindings.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/bindings.el b/lisp/bindings.el index a29f320a69f..2c33619fd00 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1,7 +1,7 @@ ;;; bindings.el --- define standard key bindings and some variables -;; Copyright (C) 1985,86,87,92,93,94,95,96,99,2000, 2001 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996, 1999, 2000, +;; 2001, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -403,7 +403,7 @@ Menu of mode operations in the mode line.") :button (:toggle . line-number-mode))) (define-key mode-line-mode-menu [highlight-changes-mode] `(menu-item ,(purecopy "Highlight changes (Chg)") highlight-changes-mode - :button (:toggle . highlight-changes-mode))) + :button (:toggle . (bound-and-true-p highlight-changes-mode)))) (define-key mode-line-mode-menu [hide-ifdef-mode] `(menu-item ,(purecopy "Hide ifdef (Ifdef)") hide-ifdef-mode :button (:toggle . (bound-and-true-p hide-ifdef-mode)))) @@ -421,10 +421,10 @@ Menu of mode operations in the mode line.") :button (:toggle . column-number-mode))) (define-key mode-line-mode-menu [auto-revert-tail-mode] `(menu-item ,(purecopy "Auto revert tail (Tail)") auto-revert-tail-mode - :button (:toggle . auto-revert-tail-mode))) + :button (:toggle . (bound-and-true-p auto-revert-tail-mode)))) (define-key mode-line-mode-menu [auto-revert-mode] `(menu-item ,(purecopy "Auto revert (ARev)") auto-revert-mode - :button (:toggle . auto-revert-mode))) + :button (:toggle . (bound-and-true-p auto-revert-mode)))) (define-key mode-line-mode-menu [auto-fill-mode] `(menu-item ,(purecopy "Auto fill (Fill)") auto-fill-mode :button (:toggle . auto-fill-function))) @@ -1018,5 +1018,5 @@ language you are using." ;; no-update-autoloads: t ;; End: -;;; arch-tag: 23b5c7e6-e47b-49ed-8c6c-ed213c5fffe0 +;; arch-tag: 23b5c7e6-e47b-49ed-8c6c-ed213c5fffe0 ;;; bindings.el ends here From 67476fca4fbf43b7045df65c91ffe860b99124e2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 17 Jan 2005 21:24:46 +0000 Subject: [PATCH 294/560] (highlight-changes-mode): Don't autoload. --- lisp/ChangeLog | 103 +++++++++++++++++++++++----------------------- lisp/hilit-chg.el | 6 +-- 2 files changed, 54 insertions(+), 55 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29f41e413e5..9838f48bac8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-17 Stefan Monnier + + * hilit-chg.el (highlight-changes-mode): Don't autoload. + + * bindings.el (mode-line-mode-menu): Use bound-and-true-p for all the + non-preloaded variables. + 2005-01-17 Steven Tamm * textmodes/tex-mode.el (tex-start-shell): Adding -i to the @@ -25,8 +32,8 @@ (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-out-of-band): Call `set-file-modes' when appropriate. - (tramp-do-copy-or-rename-file-directly): Mask `cp -p' error. Call - `set-file-modes' when appropriate. + (tramp-do-copy-or-rename-file-directly): Mask `cp -p' error. + Call `set-file-modes' when appropriate. (tramp-action-out-of-band): Mask `scp -p' error. Reported by Isak Johnsson (tramp-get-buffer, tramp-get-debug-buffer): Discard the undo list @@ -88,24 +95,22 @@ 2005-01-15 Sergey Poznyakoff * mail/rmail.el: Updated to work with movemail from GNU Mailutils - (rmail-pop-password, rmail-pop-password-required): Moved to + (rmail-pop-password, rmail-pop-password-required): Move to rmail-obsolete group. - (rmail-set-pop-password): Renamed to rmail-set-remote-password. + (rmail-set-pop-password): Rename to rmail-set-remote-password. All callers updated. - (rmail-get-pop-password): Renamed to rmail-get-remote-password. + (rmail-get-pop-password): Rename to rmail-get-remote-password. Take an argument specifying whether it is POP or IMAP mailbox we are using. All callers updated. - (rmail-pop-password-error): Renamed to - rmail-remote-password-error. Added mailutils-specific error - message. + (rmail-pop-password-error): Rename to + rmail-remote-password-error. Added mailutils-specific error message. (rmail-movemail-search-path) (rmail-movemail-variant-in-use): New variables. - (rmail-remote-password, rmail-remote-password-required): New - customization variables. - (rmail-probe,rmail-autodetect, rmail-movemail-variant-p): New - functions. + (rmail-remote-password, rmail-remote-password-required): + New customization variables. + (rmail-probe,rmail-autodetect, rmail-movemail-variant-p): New funs. (rmail-parse-url): New function. - (rmail-get-new-mail, rmail-insert-inbox-text): Updated for use + (rmail-get-new-mail, rmail-insert-inbox-text): Update for use with GNU mailutils movemail. 2005-01-15 Kevin Ryde @@ -117,8 +122,8 @@ 2005-01-15 Jorgen Schaefer (tiny change) * type-break.el (type-break-mode, type-break-file-time) - (type-break-file-keystroke-count, type-break-choose-file): Don't - store data in or load data from the file if type-break-file-name + (type-break-file-keystroke-count, type-break-choose-file): + Don't store data in or load data from the file if type-break-file-name is nil. (type-break-file-name): Doc update as per the above. @@ -130,8 +135,7 @@ 2005-01-15 Alan Mackenzie * ebrowse.el (ebrowse-class-in-tree): Return the tail of the tree - rather than the element found, thus enabling the tree to be - setcar'd. + rather than the element found, thus enabling the tree to be setcar'd. 2005-01-14 Carsten Dominik @@ -149,62 +153,59 @@ * textmodes/org.el (org-mode): `org-table-may-need-update' is now a local variable in each org-mode buffer. - * textmodes/org.el (org-set-regexps-and-options): Renamed from + * textmodes/org.el (org-set-regexps-and-options): Rename from `org-set-regexps'. Added checking for STARTUP keyword. - (org-get-current-options): Added STARTUP options. + (org-get-current-options): Add STARTUP options. (org-table-insert-row): Mode mode intelligent about when realignment is needed. - (org-self-insert-command, org-delete-backward-char, - org-delete-char): New commands. - (org-enable-table-editor): new default value `optimized'. + (org-self-insert-command, org-delete-backward-char, org-delete-char): + New commands. + (org-enable-table-editor): New default value `optimized'. (org-table-blank-field): Support blanking regions if active. - 2005-01-14 Carsten Dominik * textmodes/reftex-cite.el (reftex-bib-sort-year): Catch the case if the year is not given. - * textmodes/reftex-ref.el (reftex-replace-prefix-escapes): Added - new escapes %m and %M, fixed bug with %F by adding + * textmodes/reftex-ref.el (reftex-replace-prefix-escapes): + Add new escapes %m and %M, fixed bug with %F by adding save-match-data. - (reftex-reference): Removed ?. from list of spaces. - (reftex-label-info): Added automatic label prefix recognition + (reftex-reference): Remove ?. from list of spaces. + (reftex-label-info): Add automatic label prefix recognition. - * textmodes/reftex-index.el (reftex-index-next-phrase): Added - slave parameter to call of `reftex-index-this-phrase' - (reftex-index-this-phrase): New optional argument - (reftex-index-region-phrases): Added slave parameter to call of - `reftex-index-this-phrase' - (reftex-display-index): New argument redo - (reftex-index-rescan): Added 'redo to arguments of - `reftex-display-index' + * textmodes/reftex-index.el (reftex-index-next-phrase): + Add slave parameter to call of `reftex-index-this-phrase'. + (reftex-index-this-phrase): New optional argument. + (reftex-index-region-phrases): Add slave parameter to call of + `reftex-index-this-phrase'. + (reftex-display-index): New argument redo. + (reftex-index-rescan): Add 'redo to arguments of + `reftex-display-index'. (reftex-index-Rescan, reftex-index-revert) - (reftex-index-switch-index-tag): Added 'redo to arguments of - `reftex-display-index' - (reftex-index-make-phrase-regexp): Fixed bug with case-sensitive - indexing. Fixed bug with matching is there is a quote before or + (reftex-index-switch-index-tag): Add 'redo to arguments of + `reftex-display-index'. + (reftex-index-make-phrase-regexp): Fix bug with case-sensitive + indexing. Fix bug with matching is there is a quote before or after the word. - * textmodes/reftex-cite.el (reftex-all-used-citation-keys): Fix - bug when collecting citation keys in lines with comments. + * textmodes/reftex-cite.el (reftex-all-used-citation-keys): + Fix bug when collecting citation keys in lines with comments. (reftex-citation): Prefix argument no longer rescans the document, but forces prompting for optional arguments of cite macros. - (reftex-do-citation): Prompting for optional arguments - implemented. + (reftex-do-citation): Prompting for optional arguments implemented. - * textmodes/reftex-vars.el (reftex-cite-format-builtin): Added - optional arguments to most cite commands. + * textmodes/reftex-vars.el (reftex-cite-format-builtin): + Add optional arguments to most cite commands. (reftex-cite-cleanup-optional-args): New option (reftex-cite-prompt-optional-args): New option. - (reftex-trust-label-prefix): New option + (reftex-trust-label-prefix): New option. - * textmodes/reftex-toc.el (reftex-toc-find-section): Added - push-mark before changing the position in the buffer. + * textmodes/reftex-toc.el (reftex-toc-find-section): + Add push-mark before changing the position in the buffer. - * textmodes/reftex.el (reftex-prefix-to-typekey-alist): New - variable - (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist + * textmodes/reftex.el (reftex-prefix-to-typekey-alist): New variable. + (reftex-compile-variables): Compute reftex-prefix-to-typekey-alist. 2005-01-14 Nick Roberts diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el index 6c2c7e26ea0..f670079e7d7 100644 --- a/lisp/hilit-chg.el +++ b/lisp/hilit-chg.el @@ -1,6 +1,6 @@ ;;; hilit-chg.el --- minor mode displaying buffer changes with special face -;; Copyright (C) 1998, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000, 2005 Free Software Foundation, Inc. ;; Author: Richard Sharman ;; Keywords: faces @@ -392,8 +392,6 @@ Otherwise, this list will be constructed when needed from ;; These shouldn't be changed! -;; Autoload for the benefit of `make-mode-line-mouse-sensitive'. -;;;###autoload (defvar highlight-changes-mode nil) (defvar hilit-chg-list nil) (defvar hilit-chg-string " ??") @@ -1163,5 +1161,5 @@ from `global-highlight-changes' when turning on global Highlight Changes mode." (provide 'hilit-chg) -;;; arch-tag: de00301d-5bad-44da-aa82-e0e010b0c463 +;; arch-tag: de00301d-5bad-44da-aa82-e0e010b0c463 ;;; hilit-chg.el ends here From dd60a465fbc6039e025165624147f5ef993f42d1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 17 Jan 2005 23:48:10 +0000 Subject: [PATCH 295/560] (backward-kill-sexp, kill-sexp): Doc fixes. --- lisp/emacs-lisp/lisp.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 69938255112..d19eace5824 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -140,18 +140,18 @@ A negative argument means move backward but still to a less deep spot." (setq arg (- arg inc))))) (defun kill-sexp (&optional arg) - "Kill the sexp (balanced expression) following the cursor. -With ARG, kill that many sexps after the cursor. -Negative arg -N means kill N sexps before the cursor." + "Kill the sexp (balanced expression) following point. +With ARG, kill that many sexps after point. +Negative arg -N means kill N sexps before point." (interactive "p") (let ((opoint (point))) (forward-sexp (or arg 1)) (kill-region opoint (point)))) (defun backward-kill-sexp (&optional arg) - "Kill the sexp (balanced expression) preceding the cursor. -With ARG, kill that many sexps before the cursor. -Negative arg -N means kill N sexps after the cursor." + "Kill the sexp (balanced expression) preceding point. +With ARG, kill that many sexps before point. +Negative arg -N means kill N sexps after point." (interactive "p") (kill-sexp (- (or arg 1)))) From 053be11a8844e0dbc448e7b9a977fb815b438c2f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 17 Jan 2005 23:49:20 +0000 Subject: [PATCH 296/560] Comment change. --- lisp/textmodes/tex-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 51be21527d6..ce34138d5fb 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1496,6 +1496,7 @@ Mark is left at original location." "tex-shell" (or tex-shell-file-name (getenv "ESHELL") shell-file-name) nil + ;; Specify an interactive shell, to make sure it prompts. "-i") (let ((proc (get-process "tex-shell"))) (set-process-sentinel proc 'tex-shell-sentinel) From b64e46503fdc4dc3e5a8613660a5c71b1bb1eaaa Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 17 Jan 2005 23:50:23 +0000 Subject: [PATCH 297/560] (decipher-mode): Don't call decipher-read-alphabet if buffer is empty. --- lisp/play/decipher.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el index 7c08856da80..00bcbbf13c5 100644 --- a/lisp/play/decipher.el +++ b/lisp/play/decipher.el @@ -305,7 +305,8 @@ The most useful commands are: (setq case-fold-search nil)) ;Case is significant when searching (use-local-map decipher-mode-map) (set-syntax-table decipher-mode-syntax-table) - (decipher-read-alphabet) + (unless (= (point-min) (point-max)) + (decipher-read-alphabet)) (set (make-local-variable 'font-lock-defaults) '(decipher-font-lock-keywords t)) ;; Make the buffer writable when we exit Decipher mode: From 52a7f9bd2a3c656cccc022913192de65c85e8b23 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 17 Jan 2005 23:51:34 +0000 Subject: [PATCH 298/560] (grep-find): Copy from `grep' the condition for calling grep-compute-defaults. --- lisp/progmodes/grep.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 04fcae78ea6..8efa48aaa48 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -527,7 +527,8 @@ This command uses a special history list for its arguments, so you can easily repeat a find command." (interactive (progn - (unless grep-find-command + (unless (and grep-command + (or (not grep-use-null-device) (eq grep-use-null-device t))) (grep-compute-defaults)) (if grep-find-command (list (read-from-minibuffer "Run find (like this): " From 444919be4b4c7cd67a592860d46f78fe959afda0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 17 Jan 2005 23:52:58 +0000 Subject: [PATCH 299/560] *** empty log message *** --- etc/NEWS | 3 +++ lisp/ChangeLog | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 84e04a61cbd..208ad805596 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -99,6 +99,9 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 +** M-SPC (just-one-space) when given a numeric argument N +converts whitespace around point to N spaces. + ** Control characters and escape glyphs are now shown in the new escape-glyph face. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9838f48bac8..060d8af504e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2005-01-17 Richard M. Stallman + + * progmodes/grep.el (grep-find): Copy from `grep' the condition + for calling grep-compute-defaults. + + * play/decipher.el (decipher-mode): Don't call decipher-read-alphabet + if buffer is empty. + + * emacs-lisp/lisp.el (backward-kill-sexp, kill-sexp): Doc fixes. + 2005-01-17 Stefan Monnier * hilit-chg.el (highlight-changes-mode): Don't autoload. From 0a926c02d7f4cc65ef6ac33a706c182ba17f5920 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 18 Jan 2005 00:00:59 +0000 Subject: [PATCH 300/560] *** empty log message *** --- etc/NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 208ad805596..bdbc8cc7a81 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2467,6 +2467,12 @@ configuration files. * Incompatible Lisp Changes in Emacs 21.4 ++++ +** `suppress-keymap' now works by remapping `self-insert-command' to +the command `undefined'. (In earlier Emacs versions, it used +`substitute-key-definition' to rebind self inserting characters to +`undefined'.) + +++ ** Mode line display ignores text properties as well as the :propertize and :eval forms in the value of a variable whose From 2d4430a8eb6b2291fcda99aa281dae72dbc123a8 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 18 Jan 2005 00:11:43 +0000 Subject: [PATCH 301/560] (decode_coding_iso2022): Translate invalid codes if translation-table is specified. --- src/coding.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coding.c b/src/coding.c index 400210f4cd4..79e32fbed60 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2208,6 +2208,8 @@ decode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes) DECODE_COMPOSITION_END ('1'); src = src_base; c = *src++; + if (! NILP (translation_table)) + c = translate_char (translation_table, c, 0, 0, 0); EMIT_CHAR (c); } From 677159ce53a7d115a8671d0a9e0bfa9503e37f5b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 18 Jan 2005 00:13:00 +0000 Subject: [PATCH 302/560] *** empty log message *** --- src/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b277cf5b454..cc879e37892 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-01-18 Kim F. Storm + + * xdisp.c (back_to_previous_visible_line_start): Undo 2004-12-28 + change. If handle_display_prop indicates newline is replaced by + image or text, move back to start of relevant overlay or interval + and continue scan from there. Simplify. + 2005-01-17 Kim F. Storm * dispnew.c (mode_line_string, marginal_area_string): Fix From 6512b56dff62bbbe8dffad58d7299a7f9e90653a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 18 Jan 2005 00:13:24 +0000 Subject: [PATCH 303/560] (back_to_previous_visible_line_start): Undo 2004-12-28 change. If handle_display_prop indicates newline is replaced by image or text, move back to start of relevant overlay or interval and continue scan from there. Simplify. --- src/xdisp.c | 69 +++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 2facc873743..bf06bba7df3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4573,51 +4573,52 @@ static void back_to_previous_visible_line_start (it) struct it *it; { - int visible_p = 0; - - /* Go back one newline if not on BEGV already. */ - if (IT_CHARPOS (*it) > BEGV) - back_to_previous_line_start (it); - - /* Move over lines that are invisible because of selective display - or text properties. */ - while (IT_CHARPOS (*it) > BEGV - && !visible_p) + while (IT_CHARPOS (*it) > BEGV) { - visible_p = 1; + back_to_previous_line_start (it); + if (IT_CHARPOS (*it) <= BEGV) + break; /* If selective > 0, then lines indented more than that values are invisible. */ if (it->selective > 0 && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), (double) it->selective)) /* iftc */ - visible_p = 0; - else - { - Lisp_Object prop; + continue; - /* Check the newline before point for invisibility. */ - prop = Fget_char_property (make_number (IT_CHARPOS (*it) - 1), + /* Check the newline before point for invisibility. */ + { + Lisp_Object prop; + prop = Fget_char_property (make_number (IT_CHARPOS (*it) - 1), Qinvisible, it->window); - if (TEXT_PROP_MEANS_INVISIBLE (prop)) - visible_p = 0; - } + if (TEXT_PROP_MEANS_INVISIBLE (prop)) + continue; + } -#if 0 - /* Commenting this out fixes the bug described in - http://www.math.ku.dk/~larsh/emacs/emacs-loops-on-large-images/test-case.txt. */ - if (visible_p) - { - struct it it2 = *it; + /* If newline has a display property that replaces the newline with something + else (image or text), find start of overlay or interval and continue search + from that point. */ + { + struct it it2 = *it; + int pos = IT_CHARPOS (*it); + int beg, end; + Lisp_Object val, overlay; - if (handle_display_prop (&it2) == HANDLED_RETURN) - visible_p = 0; - } -#endif - - /* Back one more newline if the current one is invisible. */ - if (!visible_p) - back_to_previous_line_start (it); + if (handle_display_prop (&it2) == HANDLED_RETURN + && !NILP (val = get_char_property_and_overlay + (make_number (pos), Qdisplay, Qnil, &overlay)) + && (OVERLAYP (overlay) + ? (beg = OVERLAY_POSITION (OVERLAY_START (overlay))) + : get_property_and_range (pos, Qdisplay, &val, &beg, &end, Qnil))) + { + if (beg < BEGV) + beg = BEGV; + IT_CHARPOS (*it) = beg; + IT_BYTEPOS (*it) = buf_charpos_to_bytepos (current_buffer, beg); + continue; + } + } + break; } xassert (IT_CHARPOS (*it) >= BEGV); From 1cdb070738a63748975931fb7c5003b352f5b9ac Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 18 Jan 2005 00:14:18 +0000 Subject: [PATCH 304/560] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index cc879e37892..dcf93ef39a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-18 Kenichi Handa + + * coding.c (decode_coding_iso2022): Translate invalid codes if + translation-table is specified. + 2005-01-18 Kim F. Storm * xdisp.c (back_to_previous_visible_line_start): Undo 2004-12-28 From 6869a82445b6a8ffe0c67177a81f8c53dc6c5312 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 18 Jan 2005 01:00:41 +0000 Subject: [PATCH 305/560] *** empty log message *** --- etc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index b9e9fa20a6e..3396f201870 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-01-18 Nick Roberts + + * DEBUG: Suggest separate terminal for debug session. + 2005-01-15 Frederik Fouvry * TUTORIAL.nl: Correct translation and the Dutch text (typos). From 8ef597fe7957953034c4a75abdcca3b5002c2d1b Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 18 Jan 2005 01:01:29 +0000 Subject: [PATCH 306/560] Suggest separate terminal for debug session. --- etc/DEBUG | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/DEBUG b/etc/DEBUG index abb49143a05..cbe79ee3ab6 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -62,6 +62,11 @@ use the set command until the inferior process has been started. Put a breakpoint early in `main', or suspend the Emacs, to get an opportunity to do the set command. +When Emacs is running in a terminal, it is useful to use a separate terminal +for the debug session. This can be done by starting Emacs as usual, then +attaching to it from gdb with the `attach' command which is explained in the +node "Attach" of the GDB manual. + ** Examining Lisp object values. When you have a live process to debug, and it has not encountered a @@ -115,7 +120,7 @@ called frame. First, use these commands: b set_frame_buffer_list r -q -Then when Emacs it hits the breakpoint: +Then Emacs hits the breakpoint: (gdb) p frame $1 = 139854428 From 48e7c397f3debc587e8605ddeb41a78d95572c16 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 18 Jan 2005 04:52:55 +0000 Subject: [PATCH 307/560] (calc-edit-mode): Inhibit read-only when erasing buffer. --- lisp/calc/calc-yank.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 53d5946e073..339dfd838a4 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -460,7 +460,8 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (setq calc-restore-trail (get-buffer-window (calc-trail-buffer))) (make-local-variable 'calc-allow-ret) (setq calc-allow-ret allow-ret) - (erase-buffer) + (let ((inhibit-read-only t)) + (erase-buffer)) (add-hook 'kill-buffer-hook (lambda () (let ((calc-edit-handler nil)) (calc-edit-finish t)) From 538a5f8b53aabb200b7e0e8dbaf3ab56fa36478b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 18 Jan 2005 05:13:23 +0000 Subject: [PATCH 308/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 060d8af504e..b0d95ddabe9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-17 Jay Belanger + + * calc/calc-yank.el (calc-edit-mode): Inhibit read-only when + erasing buffer. + 2005-01-17 Richard M. Stallman * progmodes/grep.el (grep-find): Copy from `grep' the condition From 83c7f8065ce04ced5cfa8954189bfb2c1eed1b08 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 18 Jan 2005 11:26:47 +0000 Subject: [PATCH 309/560] *** empty log message *** --- lisp/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0d95ddabe9..4553732d4ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2005-01-19 Nick Roberts + + * progmodes/gdb-ui.el (gdb-put-string): Copy/create strings so + that enable/disabled state of breakpoints is shown correctly in + fringe and on ttys. + (gdb-put-breakpoint-icon, gdb-info-breakpoints-custom): + Add breakpoint information as text properties. + (gdb-mouse-toggle-breakpoint): + Rename to gdb-mouse-set-clear-breakpoint. + (gdb-mouse-toggle-breakpoint): New function. Enable/disable + breakpoints in the margin. + (gdb-remove-strings): Simplify. + 2005-01-17 Jay Belanger * calc/calc-yank.el (calc-edit-mode): Inhibit read-only when From b6d0e4dad049bd1c3ea3a153c6cb8cebf04ea714 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 18 Jan 2005 11:28:19 +0000 Subject: [PATCH 310/560] (gdb-put-string): Copy/create strings so that enable/disabled state of breakpoints is shown correctly in fringe and on ttys. (gdb-put-breakpoint-icon, gdb-info-breakpoints-custom): Add breakpoint information as text properties. (gdb-mouse-toggle-breakpoint): Rename to gdb-mouse-set-clear-breakpoint. (gdb-mouse-toggle-breakpoint): New function. Enable/disable breakpoints in the margin. (gdb-remove-strings): Simplify. --- lisp/progmodes/gdb-ui.el | 125 +++++++++++++++++++++++++-------------- 1 file changed, 82 insertions(+), 43 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index aef997d2a66..ad081c2ac9e 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -33,24 +33,28 @@ ;; Emacs 21 such as the fringe/display margin for breakpoints, and the toolbar ;; (see the GDB Graphical Interface section in the Emacs info manual). -;; Start the debugger with M-x gdba. +;; By default, M-x gdb will start the debugger. However, if you have customised +;; gud-gdb-command-name, then start it with M-x gdba. -;; This file has evolved from gdba.el from GDB 5.0 written by Tom Lord and Jim -;; Kingdon and uses GDB's annotation interface. You don't need to know about -;; annotations to use this mode as a debugger, but if you are interested -;; developing the mode itself, then see the Annotations section in the GDB -;; info manual. +;; This file has evolved from gdba.el that was included with GDB 5.0 and +;; written by Tom Lord and Jim Kingdon. It uses GDB's annotation interface. +;; You don't need to know about annotations to use this mode as a debugger, +;; but if you are interested developing the mode itself, then see the +;; Annotations section in the GDB info manual. ;; ;; GDB developers plan to make the annotation interface obsolete. A new ;; interface called GDB/MI (machine interface) has been designed to replace ;; it. Some GDB/MI commands are used in this file through the CLI command -;; 'interpreter mi '. A file called gdb-mi.el is included in the -;; GDB repository for future releases (6.2 onwards) that uses GDB/MI as the -;; primary interface to GDB. It is still under development and is part of a -;; process to migrate Emacs from annotations to GDB/MI. +;; 'interpreter mi '. A file called gdb-mi.el is included with +;; GDB (6.2 onwards) that uses GDB/MI as the primary interface to GDB. It is +;; still under development and is part of a process to migrate Emacs from +;; annotations to GDB/MI. ;; ;; Known Bugs: ;; +;; TODO: +;; Use tree-widget.el instead of the speedbar for watch-expressions? +;; Mark breakpoint locations on scroll-bar of source buffer? ;;; Code: @@ -169,13 +173,13 @@ detailed description of this mode. (defvar gdb-debug-log nil) (defcustom gdb-enable-debug-log nil - "Non-nil means record the process input and output in `gdb-debug-log'." + "Non-nil means record the process input and output in `gdb-debug-log'." :type 'boolean :group 'gud :version "21.4") (defcustom gdb-use-inferior-io-buffer nil - "Non-nil means display output from the inferior in a separate buffer." + "Non-nil means display output from the inferior in a separate buffer." :type 'boolean :group 'gud :version "21.4") @@ -210,9 +214,13 @@ detailed description of this mode. "\C-u" "Continue to current line or address.") (define-key gud-minor-mode-map [left-margin mouse-1] - 'gdb-mouse-toggle-breakpoint) + 'gdb-mouse-set-clear-breakpoint) (define-key gud-minor-mode-map [left-fringe mouse-1] + 'gdb-mouse-set-clear-breakpoint) + (define-key gud-minor-mode-map [left-margin mouse-3] 'gdb-mouse-toggle-breakpoint) +; (define-key gud-minor-mode-map [left-fringe mouse-3] +; 'gdb-mouse-toggle-breakpoint) (setq comint-input-sender 'gdb-send) ;; @@ -281,7 +289,7 @@ detailed description of this mode. (Info-goto-node "(emacs)GDB Graphical Interface")) (defconst gdb-var-create-regexp -"name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"") + "name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"") (defun gdb-var-create-handler (expr) (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) @@ -328,7 +336,7 @@ detailed description of this mode. `(lambda () (gdb-var-list-children-handler ,varnum))))) (defconst gdb-var-list-children-regexp -"name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"") + "name=\"\\(.*?\\)\",exp=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\"") (defun gdb-var-list-children-handler (varnum) (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer) @@ -1038,7 +1046,8 @@ happens to be appropriate." (defvar gdb-cdir nil "Compilation directory.") -(defconst breakpoint-xpm-data "/* XPM */ +(defconst breakpoint-xpm-data + "/* XPM */ static char *magick[] = { /* columns rows colors chars-per-pixel */ \"10 10 2 1\", @@ -1059,7 +1068,7 @@ static char *magick[] = { "XPM data used for breakpoint icon.") (defconst breakpoint-enabled-pbm-data -"P1 + "P1 10 10\", 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 @@ -1074,7 +1083,7 @@ static char *magick[] = { "PBM data used for enabled breakpoint icon.") (defconst breakpoint-disabled-pbm-data -"P1 + "P1 10 10\", 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 @@ -1116,8 +1125,7 @@ static char *magick[] = { ;;-put breakpoint icons in relevant margins (even those set in the GUD buffer) (defun gdb-info-breakpoints-custom () - (let ((flag)) - ;; + (let ((flag) (bptno)) ;; remove all breakpoint-icons in source buffers but not assembler buffer (dolist (buffer (buffer-list)) (with-current-buffer buffer @@ -1131,12 +1139,13 @@ static char *magick[] = { (forward-line 1) (if (looking-at "[^\t].*breakpoint") (progn - (looking-at "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)") - (setq flag (char-after (match-beginning 1))) + (looking-at "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)") + (setq bptno (match-string 1)) + (setq flag (char-after (match-beginning 2))) (beginning-of-line) (if (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t) (progn - (looking-at "\\(\\S-*\\):\\([0-9]+\\)") + (looking-at "\\(\\S-+\\):\\([0-9]+\\)") (let ((line (match-string 2)) (buffer-read-only nil) (file (match-string 1))) (add-text-properties (point-at-bol) (point-at-eol) @@ -1153,12 +1162,12 @@ static char *magick[] = { ;; only want one breakpoint icon at each location (save-excursion (goto-line (string-to-number line)) - (gdb-put-breakpoint-icon (eq flag ?y))))))))) + (gdb-put-breakpoint-icon (eq flag ?y) bptno)))))))) (end-of-line))))) (if (gdb-get-buffer 'gdb-assembler-buffer) (gdb-assembler-custom))) -(defun gdb-mouse-toggle-breakpoint (event) - "Toggle breakpoint in left fringe/margin with mouse click." +(defun gdb-mouse-set-clear-breakpoint (event) + "Set/clear breakpoint in left fringe/margin with mouse click." (interactive "e") (mouse-minibuffer-check event) (let ((posn (event-end event))) @@ -1172,6 +1181,31 @@ static char *magick[] = { (gud-remove nil) (gud-break nil))))))) +(defun gdb-mouse-toggle-breakpoint (event) + "Enable/disable breakpoint in left fringe/margin with mouse click." + (interactive "e") + (mouse-minibuffer-check event) + (let ((posn (event-end event))) + (if (numberp (posn-point posn)) + (with-selected-window (posn-window posn) + (save-excursion + (goto-char (posn-point posn)) + (if +; (or + (posn-object posn) +; (eq (car (fringe-bitmaps-at-pos (posn-point posn))) +; 'breakpoint)) + (gdb-enqueue-input + (list + (let ((bptno (get-text-property + 0 'gdb-bptno (car (posn-string posn))))) + (concat + (if (get-text-property + 0 'gdb-enabled (car (posn-string posn))) + "disable " + "enable ") + bptno "\n")) 'ignore)))))))) + (defun gdb-breakpoints-buffer-name () (with-current-buffer gud-comint-buffer (concat "*breakpoints of " (gdb-get-target-string) "*"))) @@ -1227,7 +1261,7 @@ static char *magick[] = { 'gdbmi-invalidate-breakpoints)) (defun gdb-toggle-breakpoint () - "Enable/disable the breakpoint at current line." + "Enable/disable breakpoint at current line." (interactive) (save-excursion (beginning-of-line 1) @@ -1707,7 +1741,7 @@ of the inferior. Non-nil means display the layout shown for :version "21.4") (defun gdb-many-windows (arg) -"Toggle the number of windows in the basic arrangement." + "Toggle the number of windows in the basic arrangement." (interactive "P") (setq gdb-many-windows (if (null arg) @@ -1777,14 +1811,15 @@ buffers." PUTSTRING is displayed by putting an overlay into the current buffer with a `before-string' STRING that has a `display' property whose value is PUTSTRING." - (let ((gdb-string "x") + (let ((string (make-string 1 ?x)) (buffer (current-buffer))) + (setq putstring (copy-sequence putstring)) (let ((overlay (make-overlay pos pos buffer)) (prop (or dprop (list (list 'margin 'left-margin) putstring)))) - (put-text-property 0 (length gdb-string) 'display prop gdb-string) + (put-text-property 0 (length string) 'display prop string) (overlay-put overlay 'put-break t) - (overlay-put overlay 'before-string gdb-string)))) + (overlay-put overlay 'before-string string)))) ;;from remove-images (defun gdb-remove-strings (start end &optional buffer) @@ -1793,25 +1828,27 @@ Remove only strings that were put in BUFFER with calls to `gdb-put-string'. BUFFER nil or omitted means use the current buffer." (unless buffer (setq buffer (current-buffer))) - (let ((overlays (overlays-in start end))) - (while overlays - (let ((overlay (car overlays))) + (dolist (overlay (overlays-in start end)) (when (overlay-get overlay 'put-break) - (delete-overlay overlay))) - (setq overlays (cdr overlays))))) + (delete-overlay overlay)))) -(defun gdb-put-breakpoint-icon (enabled) +(defun gdb-put-breakpoint-icon (enabled bptno) (let ((start (progn (beginning-of-line) (- (point) 1))) - (end (progn (end-of-line) (+ (point) 1)))) + (end (progn (end-of-line) (+ (point) 1))) + (putstring (if enabled "B" "b"))) + (if enabled (add-text-properties + 0 1 `(gdb-bptno ,bptno gdb-enabled t) putstring) + (add-text-properties + 0 1 `(gdb-bptno ,bptno gdb-enabled nil) putstring)) (gdb-remove-breakpoint-icons start end) (if (display-images-p) (if (>= (car (window-fringes)) 8) (gdb-put-string nil (1+ start) `(left-fringe breakpoint - ,(if enabled - 'breakpoint-enabled-bitmap-face - 'breakpoint-disabled-bitmap-face))) + ,(if enabled + 'breakpoint-enabled-bitmap-face + 'breakpoint-disabled-bitmap-face))) (when (< left-margin-width 2) (save-current-buffer (setq left-margin-width 2) @@ -1838,7 +1875,9 @@ BUFFER nil or omitted means use the current buffer." (:type pbm :data ,breakpoint-disabled-pbm-data :ascent 100)))))) - (+ start 1) nil 'left-margin)) + (+ start 1) + putstring + 'left-margin)) (when (< left-margin-width 2) (save-current-buffer (setq left-margin-width 2) @@ -1846,7 +1885,7 @@ BUFFER nil or omitted means use the current buffer." (set-window-margins (get-buffer-window (current-buffer) 0) left-margin-width right-margin-width)))) - (gdb-put-string (if enabled "B" "b") (1+ start))))) + (gdb-put-string putstring (1+ start))))) (defun gdb-remove-breakpoint-icons (start end &optional remove-margin) (gdb-remove-strings start end) From 81f498dcef1a506461d112b98d82147e0c4def9f Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 18 Jan 2005 12:39:33 +0000 Subject: [PATCH 311/560] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index dcf93ef39a2..f1549e67436 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-18 Kim F. Storm + + * xdisp.c (fast_find_position): Backtrack to find first row if + charpos is inside a display overlay that spans multiple lines. + 2005-01-18 Kenichi Handa * coding.c (decode_coding_iso2022): Translate invalid codes if From c6576d9d7a06f7072b9824572dd04c5e083fdd50 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 18 Jan 2005 12:39:51 +0000 Subject: [PATCH 312/560] (fast_find_position): Backtrack to find first row if charpos is inside a display overlay that spans multiple lines. --- src/xdisp.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index bf06bba7df3..b0e2039a8c9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20603,6 +20603,28 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) past_end = 1; } + /* If whole rows or last part of a row came from a display overlay, + row_containing_pos will skip over such rows because their end pos + equals the start pos of the overlay or interval. Backtrack if we + have a STOP object and previous row's end glyph came from STOP. */ + if (!NILP (stop)) + { + struct glyph_row *prev = row-1; + while ((prev = row - 1, prev >= first) + && MATRIX_ROW_END_CHARPOS (prev) == charpos + && prev->used[TEXT_AREA] > 0) + { + end = prev->glyphs[TEXT_AREA]; + glyph = end + prev->used[TEXT_AREA]; + while (--glyph >= end + && INTEGERP (glyph->object)); + if (glyph < end + || !EQ (stop, glyph->object)) + break; + row = prev; + } + } + *x = row->x; *y = row->y; *vpos = MATRIX_ROW_VPOS (row, w->current_matrix); From a348a963d388bd99b572ae2519a408d621a1f384 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 18 Jan 2005 12:41:55 +0000 Subject: [PATCH 313/560] Fix last change. --- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index b0e2039a8c9..d280124504d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20618,8 +20618,8 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) glyph = end + prev->used[TEXT_AREA]; while (--glyph >= end && INTEGERP (glyph->object)); - if (glyph < end - || !EQ (stop, glyph->object)) + if (glyph >= end + && !EQ (stop, glyph->object)) break; row = prev; } From 87954aeb75e8da1b263d5b0bc69f1e710c3ddec3 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 18 Jan 2005 12:46:04 +0000 Subject: [PATCH 314/560] Fixed Partial highlighting of wrapped overlay bug reported by Ralf Angeli. --- admin/FOR-RELEASE | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index daaeb27b80e..d6d9060dbf1 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -40,8 +40,6 @@ are meaningless. What's that trying to do? * BUGS -** Incomplete overlay mouse-face highlight bug (Ralf Angeli, Oct 18) - ** Ange-ftp should ignore irrelevant IPv6 errors: Message-Id: <4121-Tue23Mar2004165249+0100-piet@cs.uu.nl> @@ -153,32 +151,6 @@ interrupting I can get a backtrace, here's an example: Update: Maybe only reveals itself when compiled with GTK+ -** Partial highlighting of wrapped overlay - -From: Ralf Angeli -Date: Mon, 18 Oct 2004 19:09:19 +0200 - -If you put - -(let* ((length (+ (- (window-width) (current-column)) 40)) - (start (point)) - (end (+ (point) length)) - (string (make-string length ?x)) - ov) - (insert string) - (setq ov (make-overlay start end)) - (overlay-put ov 'mouse-face 'highlight) - (overlay-put ov 'display string)) - -into the *scratch* buffer and type `C-x C-e' with point at the last -parenthesis, you will get a string which does not fit into the line -and has to be wrapped. If you move over it with your mouse, you -should see that only the part on the second line is being highlighted. -The full string is highlighted only if the 'display property is not -set. - - - * DOCUMENTATION ** Document Custom Themes. From 67b9b71fc8a51f37dba1bc7adf0d47e8e929c86a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 18 Jan 2005 18:21:58 +0000 Subject: [PATCH 315/560] (sh-here-doc-open-re): Don't allow `|' or other funny chars in the end-of-here-doc marker. --- lisp/ChangeLog | 9 +++++++-- lisp/progmodes/sh-script.el | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4553732d4ec..330d448d0b1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-18 Stefan Monnier + + * progmodes/sh-script.el (sh-here-doc-open-re): Don't allow | or other + funny chars in the end-of-here-doc marker. + 2005-01-19 Nick Roberts * progmodes/gdb-ui.el (gdb-put-string): Copy/create strings so @@ -5,9 +10,9 @@ fringe and on ttys. (gdb-put-breakpoint-icon, gdb-info-breakpoints-custom): Add breakpoint information as text properties. - (gdb-mouse-toggle-breakpoint): + (gdb-mouse-toggle-breakpoint): Rename to gdb-mouse-set-clear-breakpoint. - (gdb-mouse-toggle-breakpoint): New function. Enable/disable + (gdb-mouse-toggle-breakpoint): New function. Enable/disable breakpoints in the margin. (gdb-remove-strings): Simplify. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 019a19ed007..1e21d10cdc1 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1,6 +1,6 @@ ;;; sh-script.el --- shell-script editing commands for Emacs -;; Copyright (C) 1993, 94, 95, 96, 97, 1999, 2001, 03, 2004 +;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer @@ -838,7 +838,7 @@ See `sh-feature'.") (defconst sh-st-symbol (string-to-syntax "_")) (defconst sh-here-doc-syntax (string-to-syntax "|")) ;; generic string -(defconst sh-here-doc-open-re "<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\|\\s_\\)+\\).*\\(\n\\)") +(defconst sh-here-doc-open-re "<<-?\\s-*\\\\?\\(\\(?:['\"][^'\"]+['\"]\\|\\sw\\)+\\).*\\(\n\\)") (defvar sh-here-doc-markers nil) (make-variable-buffer-local 'sh-here-doc-markers) @@ -3631,5 +3631,5 @@ shell command and conveniently use this command." (provide 'sh-script) -;;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937 +;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937 ;;; sh-script.el ends here From 650cb9f1357b4c60735abc6e17c53895b9cecccb Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 18 Jan 2005 18:30:39 +0000 Subject: [PATCH 316/560] (calc-display-raw): Fix docstring. --- lisp/calc/calc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index a578a8666b8..ba5cda831e1 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -438,7 +438,7 @@ If `units', `math-simplify-units' is applied.") "If non-nil, recompute evalto's automatically when necessary.") (defcalcmodevar calc-display-raw nil - "If non-nil, display shows unformatted Lisp exprs.(defcalcmodevar For debugging)") + "If non-nil, display shows unformatted Lisp exprs. (For debugging)") (defcalcmodevar calc-internal-prec 12 "Number of digits of internal precision for calc-mode calculations.") From adeeafe5d2d44ef4a7888f79b0def1036632a3e9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 18 Jan 2005 18:34:10 +0000 Subject: [PATCH 317/560] (syms_of_emacs): Improve docstring of `system-type'. --- src/emacs.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 0c8ac5bae79..a0d404bc5ca 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1,6 +1,6 @@ /* Fully extensible Emacs, running on Unix, intended for GNU. - Copyright (C) 1985,86,87,93,94,95,97,98,1999,2001,02,03,2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2001, + 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -2430,7 +2430,16 @@ syms_of_emacs () Many arguments are deleted from the list as they are processed. */); DEFVAR_LISP ("system-type", &Vsystem_type, - doc: /* Value is symbol indicating type of operating system you are using. */); ++ doc: /* Value is symbol indicating type of operating system you are using. ++Special values: ++ `gnu/linux' compiled for a GNU/Linux system. ++ `darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...). ++ `macos' compiled for Mac OS 9. ++ `ms-dos' compiled as an MS-DOS application. ++ `windows-nt' compiled as a native W32 application. ++ `cygwin' compiled using the Cygwin library. ++ `vax-vms' or `axp-vms': compiled for a (Open)VMS system. ++Anything else indicates some sort of Unix system. */); Vsystem_type = intern (SYSTEM_TYPE); DEFVAR_LISP ("system-configuration", &Vsystem_configuration, From 926787bea1175eaba471430d08b1210e492168a7 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 18 Jan 2005 18:34:30 +0000 Subject: [PATCH 318/560] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 330d448d0b1..11485d19251 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-18 Jay Belanger + + * calc/calc.el (calc-display-raw): Fix docstring. + 2005-01-18 Stefan Monnier * progmodes/sh-script.el (sh-here-doc-open-re): Don't allow | or other From 14b495ffb1fc5d9bf47b9eec56b8a2f1cc588690 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 18 Jan 2005 20:50:43 +0000 Subject: [PATCH 319/560] (blink-matching-open): Strip extra info from syntax. --- lisp/simple.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 82dd693ad34..fbcb776c7dc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1,7 +1,7 @@ ;;; simple.el --- basic editing commands for Emacs ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004 +;; 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -4001,7 +4001,7 @@ when it is off screen)." (setq matching-paren (let ((syntax (syntax-after blinkpos))) (and (consp syntax) - (eq (car syntax) 4) + (eq (logand (car syntax) 255) 4) (cdr syntax))) mismatch (or (null matching-paren) From 664ca704c3342cf3de365d70646730224fd7902c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 18 Jan 2005 23:20:18 +0000 Subject: [PATCH 320/560] (ispell-looking-at): New function. (ispell-process-line): Use ispell-looking-at to compare the ispell output and the buffer contents. --- lisp/ChangeLog | 6 ++++++ lisp/textmodes/ispell.el | 18 +++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 11485d19251..ed93ba934f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-19 Kenichi Handa + + * textmodes/ispell.el (ispell-looking-at): New function. + (ispell-process-line): Use ispell-looking-at to compare the ispell + output and the buffer contents. + 2005-01-18 Jay Belanger * calc/calc.el (calc-display-raw): Fix docstring. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0c4aeb1bd24..2e8b1ab93c6 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1091,7 +1091,7 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs." table)) ;; Return a string decoded from Nth element of the current dictionary -;; while splice equivalent characters into the string. This splicing +;; while splicing equivalent characters into the string. This splicing ;; is done only if the string is a regular expression of the form ;; "[...]" because, otherwise, splicing will result in incorrect ;; regular expression matching. @@ -2794,6 +2794,15 @@ Point is placed at end of skipped region." string)) +(defun ispell-looking-at (string) + (let ((coding (ispell-get-coding-system)) + (len (length string))) + (and (<= (+ (point) len) (point-max)) + (equal (encode-coding-string string coding) + (encode-coding-string (buffer-substring-no-properties + (point) (+ (point) len)) + coding))))) + ;;; Avoid error messages when compiling for these dynamic variables. (eval-when-compile (defvar start) @@ -2842,12 +2851,7 @@ Returns the sum shift due to changes in word replacements." ;; Alignment cannot be tracked and this error will occur when ;; `query-replace' makes multiple corrections on the starting line. - (if (/= (+ word-len (point)) - (progn - ;; NB: Search can fail with Mule coding systems that don't - ;; display properly. Ignore the error in this case? - (search-forward (car poss) (+ word-len (point)) t) - (point))) + (or (ispell-looking-at (car poss)) ;; This occurs due to filter pipe problems (error (concat "Ispell misalignment: word " "`%s' point %d; probably incompatible versions") From 27c8be45853e36f389baf79457b4bdf9b47b2cbd Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 19 Jan 2005 00:08:10 +0000 Subject: [PATCH 321/560] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index f1549e67436..b8f53389dc5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-19 Kim F. Storm + + * fns.c (sweep_weak_table): Advance prev pointer when we keep a pair. + 2005-01-18 Kim F. Storm * xdisp.c (fast_find_position): Backtrack to find first row if From d278cde036f9fa0f56b5a0b49baf498f13ebf332 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 19 Jan 2005 00:08:30 +0000 Subject: [PATCH 322/560] (sweep_weak_table): Advance prev pointer when we keep a pair. --- src/fns.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/fns.c b/src/fns.c index 3f92a0e0bfb..9a3121a3391 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4836,6 +4836,10 @@ sweep_weak_table (h, remove_entries_p) h->count = make_number (XFASTINT (h->count) - 1); } + else + { + prev = idx; + } } else { From d9dfc855a4899cdfab373d9751a4d33e1c46dcde Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 19 Jan 2005 05:12:36 +0000 Subject: [PATCH 323/560] (calc-execute-kbd-macro): Ignore calc-keep-arg-flag. --- lisp/calc/calc-prog.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index b4901b5f8a0..33d183b5c8c 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -1124,6 +1124,8 @@ Redefine the corresponding command." (calc-execute-kbd-macro last-kbd-macro arg)) (defun calc-execute-kbd-macro (mac arg &rest prefix) + (if calc-keep-args-flag + (calc-keep-args)) (if (and (vectorp mac) (> (length mac) 0) (stringp (aref mac 0))) (setq mac (or (aref mac 1) (aset mac 1 (progn (and (fboundp 'edit-kbd-macro) From 11e81923fc22fb4833f9518624d6611df99916e2 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 19 Jan 2005 05:55:53 +0000 Subject: [PATCH 324/560] (Keep Arguments): Mention that keeping arguments doesn't work with keyboard macros. --- man/calc.texi | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 84934dfedda..b3e499a8f8f 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -12186,16 +12186,16 @@ arguments from the stack. For example, after @kbd{2 @key{RET} 3 +}, the stack contains the sole number 5, but after @kbd{2 @key{RET} 3 K +}, the stack contains the arguments and the result: @samp{2 3 5}. -This works for all commands that take arguments off the stack. As -another example, @kbd{K a s} simplifies a formula, pushing the -simplified version of the formula onto the stack after the original -formula (rather than replacing the original formula). - -Note that you could get the same effect by typing @kbd{@key{RET} a s}, -copying the formula and then simplifying the copy. One difference -is that for a very large formula the time taken to format the -intermediate copy in @kbd{@key{RET} a s} could be noticeable; @kbd{K a s} -would avoid this extra work. +With the exception of keyboard macros, this works for all commands that +take arguments off the stack. (To avoid potentially unpleasant behavior, +keyboard macros ignore the @kbd{K} prefix.) As another example, @kbd{K +a s} simplifies a formula, pushing the simplified version of the formula +onto the stack after the original formula (rather than replacing the +original formula). Note that you could get the same effect by typing +@kbd{@key{RET} a s}, copying the formula and then simplifying the copy. +One difference is that for a very large formula the time taken to format +the intermediate copy in @kbd{@key{RET} a s} could be noticeable; @kbd{K +a s} would avoid this extra work. Even stack manipulation commands are affected. @key{TAB} works by popping two values and pushing them back in the opposite order, @@ -12208,13 +12208,6 @@ original argument you could use either @kbd{' sin($1)} or @kbd{K ' sin($)}. @xref{Algebraic Entry}. Also, the @kbd{s s} command is effectively the same as @kbd{K s t}. @xref{Storing Variables}. -Keyboard macros may interact surprisingly with the @kbd{K} prefix. -If you have defined a keyboard macro to be, say, @samp{Q +} to add -one number to the square root of another, then typing @kbd{K X} will -execute @kbd{K Q +}, probably not what you expected. The @kbd{K} -prefix will apply to just the first command in the macro rather than -the whole macro. - If you execute a command and then decide you really wanted to keep the argument, you can press @kbd{M-@key{RET}} (@code{calc-last-args}). This command pushes the last arguments that were popped by any command From 1ff85bebc13713b0680f4d8d4500a646a9130d81 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 19 Jan 2005 05:58:28 +0000 Subject: [PATCH 325/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ man/ChangeLog | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ed93ba934f6..a3c401a583e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Jay Belanger + + * calc/calc-prog.el (calc-execute-kbd-macro): + Ignore calc-keep-arg-flag. + 2005-01-19 Kenichi Handa * textmodes/ispell.el (ispell-looking-at): New function. diff --git a/man/ChangeLog b/man/ChangeLog index 546589a509b..e3f04332cf6 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Jay Belanger + + * calc.texi (Keep Arguments): Mention that keeping arguments + doesn't work with keyboard macros. + 2005-01-16 Michael Albinus Sync with Tramp 2.0.47. From 2c60b6d3c0cdacc9e9ac391b3823a4f21f22144c Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 19 Jan 2005 06:55:17 +0000 Subject: [PATCH 326/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a3c401a583e..6d53a10d40d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Nick Roberts + + * progmodes/gdb-ui.el (gdb-put-breakpoint-icon): Add help-echo for + breakpoint image symbol in margin. + 2005-01-19 Jay Belanger * calc/calc-prog.el (calc-execute-kbd-macro): From f30943417b9d10cb624616fe516afd113ebde324 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 19 Jan 2005 06:55:57 +0000 Subject: [PATCH 327/560] (gdb-put-breakpoint-icon): Add help-echo for breakpoint image symbol in margin. --- lisp/progmodes/gdb-ui.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index ad081c2ac9e..993d440cd0c 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1836,6 +1836,9 @@ BUFFER nil or omitted means use the current buffer." (let ((start (progn (beginning-of-line) (- (point) 1))) (end (progn (end-of-line) (+ (point) 1))) (putstring (if enabled "B" "b"))) + (add-text-properties + 0 1 '(help-echo "mouse-1: set/clear bkpt, mouse-3: enable/disable bkpt") + putstring) (if enabled (add-text-properties 0 1 `(gdb-bptno ,bptno gdb-enabled t) putstring) (add-text-properties From 77db5cf358c7f1d1a2aef83056a0314da95c94b7 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 19 Jan 2005 10:05:04 +0000 Subject: [PATCH 328/560] *** empty log message *** --- src/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b8f53389dc5..25fabe8458f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2005-01-19 Kim F. Storm + * xdisp.c (note_mode_line_or_margin_highlight): Fix :pointer + image property. + * fns.c (sweep_weak_table): Advance prev pointer when we keep a pair. 2005-01-18 Kim F. Storm From 9c25f170b68fef783c3a67cb33e28f7cc60f53b0 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 19 Jan 2005 10:05:28 +0000 Subject: [PATCH 329/560] (note_mode_line_or_margin_highlight): Fix :pointer image property. --- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index d280124504d..96313405860 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21086,9 +21086,9 @@ note_mode_line_or_margin_highlight (w, x, y, area) help_echo_pos = charpos; } } - if (NILP (pointer)) - pointer = Fsafe_plist_get (XCDR (object), QCpointer); } + if (NILP (pointer)) + pointer = Fsafe_plist_get (XCDR (object), QCpointer); } if (STRINGP (string)) From 7679290d6ea68280dc4f6665156f178ec3bdcbc1 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 19 Jan 2005 16:49:06 +0000 Subject: [PATCH 330/560] (calc-fancy-prefix-other-key): Don't clear flags if the last command was a tab or M-tab. --- lisp/ChangeLog | 5 +++++ lisp/calc/calc-ext.el | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d53a10d40d..0a801ad992f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Jay Belanger + + * calc/calc-ext.el (calc-fancy-prefix-other-key): Don't clear + flags if the last command was a tab or M-tab. + 2005-01-19 Nick Roberts * progmodes/gdb-ui.el (gdb-put-breakpoint-icon): Add help-echo for diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 280c3ca634b..059dab35767 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1394,9 +1394,12 @@ calc-kill calc-kill-region calc-yank)))) (defun calc-fancy-prefix-other-key (arg) (interactive "P") - (if (or (not (integerp last-command-char)) - (and (>= last-command-char 0) (< last-command-char ? ) - (not (eq last-command-char meta-prefix-char)))) + (if (and + (not (eq last-command-char 'tab)) + (not (eq last-command-char 'M-tab)) + (or (not (integerp last-command-char)) + (and (>= last-command-char 0) (< last-command-char ? ) + (not (eq last-command-char meta-prefix-char))))) (calc-wrapper)) ; clear flags if not a Calc command. (calc-unread-command) (setq overriding-terminal-local-map nil)) From 8423891cfdd1958e2ca0599ee4ff9b965cac4669 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 19 Jan 2005 16:58:06 +0000 Subject: [PATCH 331/560] (Keep arguments): Clarify the effect of keeping arguments on keyboard macros. --- man/calc.texi | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index b3e499a8f8f..6278d5a8d97 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -12188,14 +12188,16 @@ the stack contains the arguments and the result: @samp{2 3 5}. With the exception of keyboard macros, this works for all commands that take arguments off the stack. (To avoid potentially unpleasant behavior, -keyboard macros ignore the @kbd{K} prefix.) As another example, @kbd{K -a s} simplifies a formula, pushing the simplified version of the formula -onto the stack after the original formula (rather than replacing the -original formula). Note that you could get the same effect by typing -@kbd{@key{RET} a s}, copying the formula and then simplifying the copy. -One difference is that for a very large formula the time taken to format -the intermediate copy in @kbd{@key{RET} a s} could be noticeable; @kbd{K -a s} would avoid this extra work. +a @kbd{K} prefix before a keyboard macro will be ignored. A @kbd{K} +prefix called @emph{within} the keyboard macro will still take effect.) +As another example, @kbd{K a s} simplifies a formula, pushing the +simplified version of the formula onto the stack after the original +formula (rather than replacing the original formula). Note that you +could get the same effect by typing @kbd{@key{RET} a s}, copying the +formula and then simplifying the copy. One difference is that for a very +large formula the time taken to format the intermediate copy in +@kbd{@key{RET} a s} could be noticeable; @kbd{K a s} would avoid this +extra work. Even stack manipulation commands are affected. @key{TAB} works by popping two values and pushing them back in the opposite order, From 17c90a9e65944b394a619f57dce33c5e8c04f549 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 19 Jan 2005 17:21:44 +0000 Subject: [PATCH 332/560] (calc-user-define-edit): Put original formula in formula editing buffer. --- lisp/ChangeLog | 3 +++ lisp/calc/calc-prog.el | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a801ad992f..cf269a770e9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,9 @@ * calc/calc-ext.el (calc-fancy-prefix-other-key): Don't clear flags if the last command was a tab or M-tab. + * calc/calc-prog.el (calc-user-define-edit): Put original formula + in formula editing buffer. + 2005-01-19 Nick Roberts * progmodes/gdb-ui.el (gdb-put-breakpoint-icon): Add help-echo for diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 33d183b5c8c..a37f3c5cedd 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -702,15 +702,17 @@ (intcmd (symbol-name (cdr def))) (algcmd (substring (symbol-name func) 9))) (if (and defn (calc-valid-formula-func func)) - (progn + (let ((niceexpr (math-format-nice-expr defn (frame-width)))) (calc-wrapper (calc-edit-mode (list 'calc-finish-formula-edit (list 'quote func)) nil - (format "Editing formula (%s, %s, bound to %s).\n" - intcmd algcmd kys)) + (format (concat + "Editing formula (%s, %s, bound to %s).\n" + "Original formula: %s\n") + intcmd algcmd kys niceexpr)) (insert (math-showing-full-precision - (math-format-nice-expr defn (frame-width))) + niceexpr) "\n")) (calc-show-edit-buffer)) (error "That command's definition cannot be edited"))))))) From 551ffc2715dbabbd4dbdc59fd806bdaf70db2b22 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Wed, 19 Jan 2005 19:09:04 +0000 Subject: [PATCH 333/560] * configure.in: Check for . * configure: Regenerate. --- ChangeLog | 5 + configure | 547 +++++++++++++++++++++++++++++++++------------------ configure.in | 3 +- 3 files changed, 365 insertions(+), 190 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07fbab11854..416c288669d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Steven Tamm + + * configure.in: Check for . + * configure: Regenerate. + 2004-12-11 Kim F. Storm * Makefile.in (info): Undo 2004-12-05 change. diff --git a/configure b/configure index e80559cce4d..fbbe63f8c2d 100755 --- a/configure +++ b/configure @@ -984,7 +984,7 @@ esac else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd "$ac_popdir" + cd $ac_popdir done fi @@ -3250,7 +3250,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3308,7 +3309,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3424,7 +3426,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3478,7 +3481,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3523,7 +3527,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3567,7 +3572,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4200,7 +4206,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4476,7 +4483,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4505,7 +4513,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4575,7 +4584,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4627,7 +4637,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4698,7 +4709,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4750,7 +4762,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4820,7 +4833,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4990,7 +5004,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5059,7 +5074,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5213,7 +5229,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5268,12 +5285,14 @@ fi + for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ - sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h + sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ + sys/utsname.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -5306,7 +5325,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5448,7 +5468,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5567,7 +5588,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5732,7 +5754,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5795,7 +5818,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5868,7 +5892,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5954,7 +5979,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6027,7 +6053,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6097,7 +6124,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6156,7 +6184,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6225,7 +6254,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6286,7 +6316,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6352,7 +6383,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6498,7 +6530,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6562,7 +6595,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6627,7 +6661,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6673,7 +6708,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6747,7 +6783,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6812,7 +6849,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6856,7 +6894,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6927,7 +6966,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6977,7 +7017,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7048,7 +7089,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7098,7 +7140,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7169,7 +7212,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7219,7 +7263,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7290,7 +7335,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7340,7 +7386,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7411,7 +7458,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7461,7 +7509,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7548,7 +7597,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7654,7 +7704,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7714,7 +7765,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7838,7 +7890,6 @@ fi echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 -ac_path_x_has_been_run=yes # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -7931,7 +7982,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for a specified header file. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -8005,7 +8056,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8065,12 +8117,8 @@ else # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - # It might be that x_includes is empty (headers are found in the - # standard search path. Then output the corresponding message - ac_out_x_includes=$x_includes - test "x$x_includes" = x && ac_out_x_includes="in standard search path" - echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6 + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then @@ -8234,7 +8282,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8329,7 +8378,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8388,7 +8438,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8472,7 +8523,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8656,7 +8708,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8908,7 +8961,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8975,7 +9029,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9044,7 +9099,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9129,7 +9185,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9206,7 +9263,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9260,7 +9318,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9329,7 +9388,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9433,7 +9493,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9500,7 +9561,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9570,7 +9632,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9810,7 +9873,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10332,7 +10396,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10404,7 +10469,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10486,7 +10552,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10565,7 +10632,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10639,7 +10707,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10707,7 +10776,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10776,7 +10846,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10900,7 +10971,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10996,7 +11068,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11076,7 +11149,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11144,7 +11218,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11289,7 +11364,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11398,7 +11474,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11543,7 +11620,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11650,7 +11728,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11804,7 +11883,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11879,7 +11959,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12027,7 +12108,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12104,7 +12186,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12251,7 +12334,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12327,7 +12411,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12470,7 +12555,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12638,7 +12724,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12783,7 +12870,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12859,7 +12947,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12922,7 +13011,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13003,7 +13093,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13144,7 +13235,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13289,7 +13381,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13365,7 +13458,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13438,7 +13532,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13593,7 +13688,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13659,7 +13755,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13918,7 +14015,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13985,7 +14083,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14137,7 +14236,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14321,7 +14421,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14648,7 +14749,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14749,7 +14851,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14822,7 +14925,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14901,7 +15005,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14970,7 +15075,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15038,7 +15144,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15112,7 +15219,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15216,7 +15324,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15291,7 +15400,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15443,7 +15553,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15511,7 +15622,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15688,7 +15800,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15764,7 +15877,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15918,7 +16032,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16069,7 +16184,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16220,7 +16336,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16362,7 +16479,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16406,7 +16524,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16552,7 +16671,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16596,7 +16716,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16661,7 +16782,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16724,7 +16846,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16826,7 +16949,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -16895,7 +17019,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17002,7 +17127,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17105,7 +17231,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17181,7 +17308,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17285,7 +17413,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17377,7 +17506,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17442,7 +17572,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17508,7 +17639,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17618,7 +17750,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17683,7 +17816,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17763,7 +17897,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17836,7 +17971,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17909,7 +18045,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -17982,7 +18119,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18056,7 +18194,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18128,7 +18267,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18203,7 +18343,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18275,7 +18416,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18348,7 +18490,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18498,7 +18641,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18644,7 +18788,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18790,7 +18935,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -18947,7 +19093,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19093,7 +19240,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19239,7 +19387,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19397,7 +19546,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19555,7 +19705,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19744,7 +19895,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19817,7 +19969,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19885,7 +20038,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19931,7 +20085,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20005,7 +20160,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20069,7 +20225,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20207,7 +20364,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20268,7 +20426,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20413,7 +20572,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20569,7 +20729,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20740,7 +20901,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20808,7 +20970,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20993,7 +21156,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21286,7 +21450,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21351,7 +21516,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21414,7 +21580,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21480,7 +21647,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21521,7 +21689,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21588,7 +21757,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22717,6 +22887,11 @@ esac *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -22755,12 +22930,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;} fi;; esac done` || { (exit 1); exit 1; } - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub diff --git a/configure.in b/configure.in index 9c1c08a7fbb..0be1a465962 100644 --- a/configure.in +++ b/configure.in @@ -1449,7 +1449,8 @@ dnl checks for header files AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ - sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h) + sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ + sys/utsname.h) AC_MSG_CHECKING(if personality LINUX32 can be set) AC_TRY_COMPILE([#include ], [personality (PER_LINUX32)], From 3bb9abc888338017c27ac6e2347bb35d89084e64 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Wed, 19 Jan 2005 19:09:42 +0000 Subject: [PATCH 334/560] * editfns.c (Voperating_system_release): Added. (init_editfns): Assign new variable operating-system-release based on call to uname if available. * config.h: Regenerated. --- src/config.in | 3 +++ src/editfns.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/config.in b/src/config.in index 87e37e65ef2..34ba3a061df 100644 --- a/src/config.in +++ b/src/config.in @@ -598,6 +598,9 @@ Boston, MA 02111-1307, USA. */ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UN_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VLIMIT_H diff --git a/src/editfns.c b/src/editfns.c index 45b7caa280b..6641c990a4f 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -34,6 +34,10 @@ Boston, MA 02111-1307, USA. */ #include #endif +#ifdef HAVE_SYS_UTSNAME_H +#include +#endif + /* systime.h includes which, on some systems, is required for ; thus systime.h must be included before */ @@ -106,6 +110,7 @@ Lisp_Object Vsystem_name; Lisp_Object Vuser_real_login_name; /* login name of current user ID */ Lisp_Object Vuser_full_name; /* full name of current user */ Lisp_Object Vuser_login_name; /* user name from LOGNAME or USER */ +Lisp_Object Voperating_system_release; /* Operating System Release */ /* Symbol for the text property used to mark fields. */ @@ -170,6 +175,16 @@ init_editfns () Vuser_full_name = build_string (p); else if (NILP (Vuser_full_name)) Vuser_full_name = build_string ("unknown"); + +#ifdef HAVE_SYS_UTSNAME_H + { + struct utsname uts; + uname (&uts); + Voperating_system_release = build_string (uts.release); + } +#else + Voperating_system_release = Qnil; +#endif } DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0, @@ -4293,6 +4308,9 @@ functions if all the text being accessed has this property. */); DEFVAR_LISP ("user-real-login-name", &Vuser_real_login_name, doc: /* The user's name, based upon the real uid only. */); + DEFVAR_LISP ("operating-system-release", &Voperating_system_release, + doc: /* The release of the operating system Emacs is running on. */); + defsubr (&Spropertize); defsubr (&Schar_equal); defsubr (&Sgoto_char); From 8db8a5cf5fe726b504372fd2e6bb7ab685657e7b Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Wed, 19 Jan 2005 19:14:01 +0000 Subject: [PATCH 335/560] * term/mac-win.el (process-connection-type): Use new operating-system-release variable to use ptys on Darwin 7 (OSX 10.3) when using carbon build. --- lisp/ChangeLog | 6 ++++++ lisp/term/mac-win.el | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cf269a770e9..f7eb4f9749c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-19 Steven Tamm + + * term/mac-win.el (process-connection-type): Use new + operating-system-release variable to use ptys on Darwin 7 (OSX + 10.3) when using carbon build. + 2005-01-19 Jay Belanger * calc/calc-ext.el (calc-fancy-prefix-other-key): Don't clear diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 4b3c7531e5a..519e8a5f076 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1696,8 +1696,9 @@ Switch to a buffer editing the last file dropped." ;; Tell Emacs to use pipes instead of pty's for processes because the ;; latter sometimes lose characters. Pty support is compiled in since -;; ange-ftp will not work without it. -(setq process-connection-type nil) +;; ange-ftp will not work without it. Fixed with darwin 7 (OS X 10.3). +(setq process-connection-type + (not (string-match "^[0-6]\\." operating-system-release))) ;; Assume that fonts are always scalable on the Mac. This sometimes ;; results in characters with jagged edges. However, without it, From 3d6a4b2d4409dc59f431fd964b1cf6a15d621009 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 19 Jan 2005 23:16:39 +0000 Subject: [PATCH 336/560] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 25fabe8458f..0caca2a353b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-20 Kim F. Storm + + * indent.c (Fvertical_motion): Temporarily disable selective display. + 2005-01-19 Kim F. Storm * xdisp.c (note_mode_line_or_margin_highlight): Fix :pointer From 8fd7aa51de09980366ad249ef80081ef0763d3ef Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 19 Jan 2005 23:17:00 +0000 Subject: [PATCH 337/560] (Fvertical_motion): Temporarily disable selective display. --- src/indent.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/indent.c b/src/indent.c index 49ee90b6360..46ee5ce2bf4 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2071,6 +2071,7 @@ whether or not it is currently displayed in some window. */) else { int it_start; + int oselective; SET_TEXT_POS (pt, PT, PT_BYTE); start_display (&it, w, pt); @@ -2084,7 +2085,11 @@ whether or not it is currently displayed in some window. */) it_start = IT_CHARPOS (it); reseat_at_previous_visible_line_start (&it); it.current_x = it.hpos = 0; + /* Temporarily disable selective display so we don't move too far */ + oselective = it.selective; + it.selective = 0; move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); + it.selective = oselective; /* Move back if we got too far. This may happen if truncate-lines is on and PT is beyond right margin. */ From aa56124af51e80c65bfc143326aedaa96ec0e028 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 19 Jan 2005 23:44:48 +0000 Subject: [PATCH 338/560] (dotimes-with-progress-reporter): New macro. --- lisp/subr.el | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 5e4e321d909..f338e47ea56 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1,7 +1,7 @@ ;;; subr.el --- basic lisp subroutines for Emacs ;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1999, 2000, 2001, 2002, 2003, -;; 2004 Free Software Foundation, Inc. +;; 2004, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -2711,7 +2711,7 @@ you call it." (defun make-progress-reporter (message min-value max-value &optional current-value min-change min-time) - "Return progress reporter object usage with `progress-reporter-update'. + "Return progress reporter object to be used with `progress-reporter-update'. MESSAGE is shown in the echo area. When at least 1% of operation is complete, the exact percentage will be appended to the @@ -2800,5 +2800,32 @@ change the displayed message." "Print reporter's message followed by word \"done\" in echo area." (message "%sdone" (aref (cdr reporter) 3))) +(defmacro dotimes-with-progress-reporter (spec message &rest body) + "Loop a certain number of times and report progress in the echo area. +Evaluate BODY with VAR bound to successive integers running from +0, inclusive, to COUNT, exclusive. Then evaluate RESULT to get +the return value (nil if RESULT is omitted). + +At each iteration MESSAGE followed by progress percentage is +printed in the echo area. After the loop is finished, MESSAGE +followed by word \"done\" is printed. This macro is a +convenience wrapper around `make-progress-reporter' and friends. + +\(fn (VAR COUNT [RESULT]) MESSAGE BODY...)" + (declare (indent 2) (debug ((symbolp form &optional form) form body))) + (let ((temp (make-symbol "--dotimes-temp--")) + (temp2 (make-symbol "--dotimes-temp2--")) + (start 0) + (end (nth 1 spec))) + `(let ((,temp ,end) + (,(car spec) ,start) + (,temp2 (make-progress-reporter ,message ,start ,end))) + (while (< ,(car spec) ,temp) + ,@body + (progress-reporter-update ,temp2 + (setq ,(car spec) (1+ ,(car spec))))) + (progress-reporter-done ,temp2) + nil ,@(cdr (cdr spec))))) + ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc ;;; subr.el ends here From 7c018923b03fb5907df95a72336ca535f1f6b4e0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 19 Jan 2005 23:46:31 +0000 Subject: [PATCH 339/560] (ses-dotimes-msg): Remove macro. Use `dotimes-with-progress-reporter' instead. --- lisp/ChangeLog | 12 ++++++++++-- lisp/ses.el | 47 ++++++++++++++++------------------------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f7eb4f9749c..05a6915355f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-10 Paul Pogonyshev + + * subr.el (dotimes-with-progress-reporter): New macro. + + * ses.el (ses-dotimes-msg): Remove macro. + Use `dotimes-with-progress-reporter' instead. + 2005-01-19 Steven Tamm * term/mac-win.el (process-connection-type): Use new @@ -34,6 +41,8 @@ 2005-01-18 Stefan Monnier + * simple.el (blink-matching-open): Strip extra info from syntax. + * progmodes/sh-script.el (sh-here-doc-open-re): Don't allow | or other funny chars in the end-of-here-doc marker. @@ -6362,8 +6371,7 @@ * progmodes/cperl-mode.el (cperl-mode): Adapt defun-prompt-regexp so that it is more understanding of whitespace. - * xml.el (xml-maybe-do-ns, xml-parse-tag): Produce elements in the - form + * xml.el (xml-maybe-do-ns, xml-parse-tag): Produce elements in the form (("ns" . "element") (attr-list) children) instead of ((:ns . "element") (attr-list) children) in order to reduce the number of symbols used. diff --git a/lisp/ses.el b/lisp/ses.el index 2a952aab286..49d4f49d94a 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -405,26 +405,6 @@ for safety. This is a macro to prevent propagate-on-load viruses." (setq ses--header-row row) t) -(defmacro ses-dotimes-msg (spec msg &rest body) - "(ses-dotimes-msg (VAR LIMIT) MSG BODY...): Like `dotimes', but -a message is emitted using MSG every second or so during the loop." - (let ((msgvar (make-symbol "msg")) - (limitvar (make-symbol "limit")) - (var (car spec)) - (limit (cadr spec))) - `(let ((,limitvar ,limit) - (,msgvar ,msg)) - (setq ses-start-time (float-time)) - (message ,msgvar) - (setq ,msgvar (concat ,msgvar " (%d%%)")) - (dotimes (,var ,limitvar) - (ses-time-check ,msgvar '(/ (* ,var 100) ,limitvar)) - ,@body) - (message nil)))) - -(put 'ses-dotimes-msg 'lisp-indent-function 2) -(def-edebug-spec ses-dotimes-msg ((symbolp form) form body)) - (defmacro ses-dorange (curcell &rest body) "Execute BODY repeatedly, with the variables `row' and `col' set to each cell in the range specified by CURCELL. The range is available in the @@ -1218,7 +1198,8 @@ the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR to each symbol." (let (reform) (let (mycell newval) - (ses-dotimes-msg (row ses--numrows) "Relocating formulas..." + (dotimes-with-progress-reporter + (row ses--numrows) "Relocating formulas..." (dotimes (col ses--numcols) (setq ses-relocate-return nil mycell (ses-get-cell row col) @@ -1246,7 +1227,8 @@ to each symbol." (cond ((and (<= rowincr 0) (<= colincr 0)) ;;Deletion of rows and/or columns - (ses-dotimes-msg (row (- ses--numrows minrow)) "Relocating variables..." + (dotimes-with-progress-reporter + (row (- ses--numrows minrow)) "Relocating variables..." (setq myrow (+ row minrow)) (dotimes (col (- ses--numcols mincol)) (setq mycol (+ col mincol) @@ -1262,7 +1244,8 @@ to each symbol." (let ((disty (1- ses--numrows)) (distx (1- ses--numcols)) myrow mycol) - (ses-dotimes-msg (row (- ses--numrows minrow)) "Relocating variables..." + (dotimes-with-progress-reporter + (row (- ses--numrows minrow)) "Relocating variables..." (setq myrow (- disty row)) (dotimes (col (- ses--numcols mincol)) (setq mycol (- distx col) @@ -1475,7 +1458,7 @@ Narrows the buffer to show only the print area. Gives it `read-only' and (put-text-property (point-min) (1+ (point-min)) 'front-sticky t) ;;Create intangible properties, which also indicate which cell the text ;;came from. - (ses-dotimes-msg (row ses--numrows) "Finding cells..." + (dotimes-with-progress-reporter (row ses--numrows) "Finding cells..." (dotimes (col ses--numcols) (setq pos end sym (ses-cell-symbol row col)) @@ -1724,7 +1707,7 @@ print area if NONARROW is nil." ;;find the data area when inserting or deleting *skip* values for cells (dotimes (row ses--numrows) (insert-and-inherit ses--blank-line)) - (ses-dotimes-msg (row ses--numrows) "Reprinting..." + (dotimes-with-progress-reporter (row ses--numrows) "Reprinting..." (if (eq (ses-cell-value row 0) '*skip*) ;;Column deletion left a dangling skip (ses-set-cell row 0 'value nil)) @@ -1809,11 +1792,13 @@ cells." ;;Reconstruct reference lists. (let (x yrow ycol) ;;Delete old reference lists - (ses-dotimes-msg (row ses--numrows) "Deleting references..." + (dotimes-with-progress-reporter + (row ses--numrows) "Deleting references..." (dotimes (col ses--numcols) (ses-set-cell row col 'references nil))) ;;Create new reference lists - (ses-dotimes-msg (row ses--numrows) "Computing references..." + (dotimes-with-progress-reporter + (row ses--numrows) "Computing references..." (dotimes (col ses--numcols) (dolist (ref (ses-formula-references (ses-cell-formula row col))) (setq x (ses-sym-rowcol ref) @@ -2073,7 +2058,7 @@ before current one." (ses-set-parameter 'ses--numrows (+ ses--numrows count)) ;;Insert each row (ses-goto-print row 0) - (ses-dotimes-msg (x count) "Inserting row..." + (dotimes-with-progress-reporter (x count) "Inserting row..." ;;Create a row of empty cells. The `symbol' fields will be set by ;;the call to ses-relocate-all. (setq newrow (make-vector ses--numcols nil)) @@ -2162,7 +2147,7 @@ If COL is specified, the new column(s) get the specified WIDTH and PRINTER (ses-create-cell-variable-range 0 (1- ses--numrows) ses--numcols (+ ses--numcols count -1)) ;;Insert each column. - (ses-dotimes-msg (x count) "Inserting column..." + (dotimes-with-progress-reporter (x count) "Inserting column..." ;;Create a column of empty cells. The `symbol' fields will be set by ;;the call to ses-relocate-all. (ses-adjust-print-width col (1+ width)) @@ -2220,7 +2205,7 @@ from the current one." (ses-begin-change) (ses-set-parameter 'ses--numcols (- ses--numcols count)) (ses-adjust-print-width col (- width)) - (ses-dotimes-msg (row ses--numrows) "Deleting column..." + (dotimes-with-progress-reporter (row ses--numrows) "Deleting column..." ;;Delete lines from cell data area (ses-goto-data row col) (ses-delete-line count) @@ -2469,7 +2454,7 @@ formulas are to be inserted without relocation." (colincr (- (cdr rowcol) (cdr first))) (pos 0) myrow mycol x) - (ses-dotimes-msg (row needrows) "Yanking..." + (dotimes-with-progress-reporter (row needrows) "Yanking..." (setq myrow (+ row (car rowcol))) (dotimes (col needcols) (setq mycol (+ col (cdr rowcol)) From f0d3d9feb068b5bff633efaf355c31706caaa94f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 19 Jan 2005 23:47:35 +0000 Subject: [PATCH 340/560] Add dotimes-with-progress-reporter. --- etc/NEWS | 6 +++--- lispref/display.texi | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index bdbc8cc7a81..753855b46e3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2512,9 +2512,9 @@ back the match can start; this is a way to keep it from taking too long. +++ ** New functions `make-progress-reporter', `progress-reporter-update', -`progress-reporter-force-update' and `progress-reporter-done' provide -a simple and efficient way for a command to present progress messages -for the user. +`progress-reporter-force-update', `progress-reporter-done', and +`dotimes-with-progress-reporter' provide a simple and efficient way for +a command to present progress messages for the user. --- ** To manipulate the File menu using easy-menu, you must specify the diff --git a/lispref/display.texi b/lispref/display.texi index 375db424122..f24432615e4 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002 -@c Free Software Foundation, Inc. +@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, +@c 2002, 2005 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/display @node Display, Calendar, Processes, Top @@ -633,6 +633,22 @@ never print it, there are many good reasons for this not to happen. Secondly, ``done'' is more explicit. @end defun +@defmac dotimes-with-progress-reporter (var count [result]) message body... +This is a convenience macro that works the same way as @code{dotimes} +does, but also reports loop progress using the functions described +above. It allows you to save some typing. + +You can rewrite the example in the beginning of this node using +this macro this way: + +@example +(dotimes-with-progress-reporter + (k 500) + "Collecting some mana for Emacs..." + (sit-for 0.01)) +@end example +@end defmac + @node Invisible Text @section Invisible Text From 66c226bf5a1e8289b0ce676d5e4225810a11af91 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 20 Jan 2005 14:23:23 +0000 Subject: [PATCH 341/560] (handle-select-window): Don't switch window when we're in the minibuffer. --- lisp/ChangeLog | 5 +++++ lisp/window.el | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05a6915355f..5abd6512e46 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-20 Stefan Monnier + + * window.el (handle-select-window): Don't switch window when we're + in the minibuffer. + 2005-01-10 Paul Pogonyshev * subr.el (dotimes-with-progress-reporter): New macro. diff --git a/lisp/window.el b/lisp/window.el index 5ec752f3f23..5768436eaae 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -1,6 +1,6 @@ ;;; window.el --- GNU Emacs window commands aside from those written in C -;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004 +;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004, 2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -631,6 +631,12 @@ and the buffer that is killed or buried is the one in that window." (interactive "e") (let ((window (posn-window (event-start event)))) (if (and (window-live-p window) + ;; Don't switch if we're currently in the minibuffer. + ;; This tries to work around problems where the minibuffer gets + ;; unselected unexpectedly, and where you then have to move + ;; your mouse all the way down to the minibuffer to select it. + (not (window-minibuffer-p (selected-window))) + ;; Don't switch to a minibuffer window unless it's active. (or (not (window-minibuffer-p window)) (minibuffer-window-active-p window))) (select-window window)))) @@ -643,5 +649,5 @@ and the buffer that is killed or buried is the one in that window." (define-key ctl-x-map "+" 'balance-windows) (define-key ctl-x-4-map "0" 'kill-buffer-and-window) -;;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9 +;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9 ;;; window.el ends here From c310aca4a74ce5409602b91466d94a5a4fbccfbb Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 20 Jan 2005 15:21:45 +0000 Subject: [PATCH 342/560] *** empty log message *** --- src/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 0caca2a353b..d14994fc3f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2005-01-20 Kim F. Storm + * xterm.c (x_draw_glyph_string_box): Fix last_x for full width rows. + Thanks to Chong Yidong for debugging this. + + * macterm.c (x_draw_glyph_string_box): Likewise. + + * w32term.c (x_draw_glyph_string_box): Likewise. + * indent.c (Fvertical_motion): Temporarily disable selective display. 2005-01-19 Kim F. Storm From 82ead4b1427e6804c18ed7acb7c8e99a93059af0 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 20 Jan 2005 15:23:22 +0000 Subject: [PATCH 343/560] (x_draw_glyph_string_box): Fix last_x for full width rows. --- src/macterm.c | 12 +++--------- src/w32term.c | 12 +++--------- src/xterm.c | 14 ++++---------- 3 files changed, 10 insertions(+), 28 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index ebebb129bb8..24aaa52947b 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -2642,15 +2642,9 @@ x_draw_glyph_string_box (s) struct glyph *last_glyph; Rect clip_rect; - last_x = window_box_right (s->w, s->area); - if (s->row->full_width_p - && !s->w->pseudo_window_p) - { - last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w); - if (s->area != RIGHT_MARGIN_AREA - || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w)) - last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w); - } + last_x = ((s->row->full_width_p && !s->w->pseudo_window_p) + ? WINDOW_RIGHT_EDGE_X (s->w) + : window_box_right (s->w, s->area)); /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img diff --git a/src/w32term.c b/src/w32term.c index a0b00d58659..838e1f57222 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1921,15 +1921,9 @@ x_draw_glyph_string_box (s) struct glyph *last_glyph; RECT clip_rect; - last_x = window_box_right (s->w, s->area); - if (s->row->full_width_p - && !s->w->pseudo_window_p) - { - last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w); - if (s->area != RIGHT_MARGIN_AREA - || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w)) - last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w); - } + last_x = ((s->row->full_width_p && !s->w->pseudo_window_p) + ? WINDOW_RIGHT_EDGE_X (s->w) + : window_box_right (s->w, s->area)); /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img diff --git a/src/xterm.c b/src/xterm.c index 0dafcfb0101..3e54a46c714 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2127,15 +2127,9 @@ x_draw_glyph_string_box (s) struct glyph *last_glyph; XRectangle clip_rect; - last_x = window_box_right (s->w, s->area); - if (s->row->full_width_p - && !s->w->pseudo_window_p) - { - last_x += WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH (s->w); - if (s->area != RIGHT_MARGIN_AREA - || WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (s->w)) - last_x += WINDOW_RIGHT_FRINGE_WIDTH (s->w); - } + last_x = ((s->row->full_width_p && !s->w->pseudo_window_p) + ? WINDOW_RIGHT_EDGE_X (s->w) + : window_box_right (s->w, s->area)); /* The glyph that may have a right box line. */ last_glyph = (s->cmp || s->img @@ -4329,7 +4323,7 @@ xg_scroll_callback (widget, data) } if (part >= 0) - { + { window_being_scrolled = bar->window; last_scroll_bar_part = part; x_send_scroll_bar_event (bar->window, part, portion, whole); From 62fc9b0f7dbd714ac924a84b1f02863eb3856db1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 20 Jan 2005 15:37:13 +0000 Subject: [PATCH 344/560] *** empty log message *** --- src/ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d14994fc3f2..d69409965f1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2005-01-20 Kim F. Storm + * alloc.c (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean. + * xterm.c (x_draw_glyph_string_box): Fix last_x for full width rows. Thanks to Chong Yidong for debugging this. From b059de99a9a3ad624d9652287ca24826609e0f37 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 20 Jan 2005 15:37:41 +0000 Subject: [PATCH 345/560] (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean. --- src/alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index 57ffd0b0ed9..34b6068d847 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -143,11 +143,11 @@ static __malloc_size_t bytes_used_when_full; #define MARK_STRING(S) ((S)->size |= ARRAY_MARK_FLAG) #define UNMARK_STRING(S) ((S)->size &= ~ARRAY_MARK_FLAG) -#define STRING_MARKED_P(S) ((S)->size & ARRAY_MARK_FLAG) +#define STRING_MARKED_P(S) (((S)->size & ARRAY_MARK_FLAG) != 0) #define VECTOR_MARK(V) ((V)->size |= ARRAY_MARK_FLAG) #define VECTOR_UNMARK(V) ((V)->size &= ~ARRAY_MARK_FLAG) -#define VECTOR_MARKED_P(V) ((V)->size & ARRAY_MARK_FLAG) +#define VECTOR_MARKED_P(V) (((V)->size & ARRAY_MARK_FLAG) != 0) /* Value is the number of bytes/chars of S, a pointer to a struct Lisp_String. This must be used instead of STRING_BYTES (S) or From a15252fdfb18b102d25c3c90e866036073a1c3de Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Thu, 20 Jan 2005 18:13:48 +0000 Subject: [PATCH 346/560] * editfns.c (Voperating_system_release): Added. (init_editfns): Assign new variable operating-system-release based on call to uname if available. (get_operating_system_release): Added function to allow c-level access to operating system release. * config.h: Regenerated. * s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or less. (MIN_PTY_KERNEL_VERSION): Defined minimum kernel version for using ptys as '7'. * term/mac-win.el (process-connection-type): Removed. Controlled now by s/darwin.h:PTY_ITERATION. --- lisp/ChangeLog | 5 +++++ lisp/term/mac-win.el | 8 +++----- src/ChangeLog | 15 +++++++++++++++ src/editfns.c | 9 +++++++++ src/s/darwin.h | 16 ++++++++++++++++ 5 files changed, 48 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5abd6512e46..6db1db5f854 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-20 Steven Tamm + + * term/mac-win.el (process-connection-type): Removed. + Controlled now by s/darwin.h:PTY_ITERATION. + 2005-01-20 Stefan Monnier * window.el (handle-select-window): Don't switch window when we're diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 519e8a5f076..a7ded41103e 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1694,11 +1694,9 @@ Switch to a buffer editing the last file dropped." (if (string= default-directory "/") (cd "~")) -;; Tell Emacs to use pipes instead of pty's for processes because the -;; latter sometimes lose characters. Pty support is compiled in since -;; ange-ftp will not work without it. Fixed with darwin 7 (OS X 10.3). -(setq process-connection-type - (not (string-match "^[0-6]\\." operating-system-release))) +;; Darwin 6- pty breakage is now controlled from the C code so that +;; it applies to all builds on darwin. See s/darwin.h PTY_ITERATION. +;; (setq process-connection-type t) ;; Assume that fonts are always scalable on the Mac. This sometimes ;; results in characters with jagged edges. However, without it, diff --git a/src/ChangeLog b/src/ChangeLog index d69409965f1..4b33af4bc4a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2005-01-20 Steven Tamm + + * editfns.c (Voperating_system_release): Added. + (init_editfns): Assign new variable operating-system-release + based on call to uname if available. + (get_operating_system_release): Added function to + allow c-level access to operating system release. + + * config.h: Regenerated. + + * s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or + less. + (MIN_PTY_KERNEL_VERSION): Defined minimum kernel version for + using ptys as '7'. + 2005-01-20 Kim F. Storm * alloc.c (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean. diff --git a/src/editfns.c b/src/editfns.c index 6641c990a4f..a6cd2c0e16b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1364,6 +1364,15 @@ get_system_name () return ""; } +char * +get_operating_system_release() +{ + if (STRINGP (Voperating_system_release)) + return (char *) SDATA (Voperating_system_release); + else + return ""; +} + DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, doc: /* Return the process ID of Emacs, as an integer. */) () diff --git a/src/s/darwin.h b/src/s/darwin.h index 9f78405a43c..d8da3e3174c 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -107,6 +107,22 @@ Boston, MA 02111-1307, USA. */ #define HAVE_PTYS + +/* + * PTYs only work correctly on Darwin 7 or higher. So make PTY_ITERATION + * Test the operating system release and only allow PTYs if it is greater + * than 7. + */ +#define MIN_PTY_KERNEL_VERSION '7' +#define PTY_ITERATION \ + char *release = get_operating_system_release(); \ + if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION \ + && release[1] == '.')) \ + return -1; \ + for (c = FIRST_PTY_LETTER; c <= 'z'; c++) \ + for (i = 0; i < 16; i++) + + /* * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate * The 4.2 opendir, etc., library functions. From 2cf2fc27c89fdfc244416eebcdc30ca7c1234561 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 00:26:39 +0000 Subject: [PATCH 347/560] Comment changes. --- lisp/case-table.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/case-table.el b/lisp/case-table.el index 1936977c779..094c1d6e62a 100644 --- a/lisp/case-table.el +++ b/lisp/case-table.el @@ -110,6 +110,8 @@ word constituents." (setq lc (set-case-syntax-1 lc)) (aset table uc lc) (aset table lc lc) + ;; Clear out the extra slots so that they will be + ;; recomputed from the main (downcase) table. (set-char-table-extra-slot table 0 nil) (set-char-table-extra-slot table 1 nil) (set-char-table-extra-slot table 2 nil) @@ -124,6 +126,8 @@ It also modifies `standard-syntax-table'. SYNTAX should be \" \", \"w\", \".\" or \"_\"." (setq c (set-case-syntax-1 c)) (aset table c c) + ;; Clear out the extra slots so that they will be + ;; recomputed from the main (downcase) table. (set-char-table-extra-slot table 0 nil) (set-char-table-extra-slot table 1 nil) (set-char-table-extra-slot table 2 nil) From 0e73312bedf881fd3c7b6aa9306eacd1a3b966d3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 00:30:56 +0000 Subject: [PATCH 348/560] (xgetptr, xgetint, xgettype): Copy $arg0 into a temp variable. --- src/.gdbinit | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/.gdbinit b/src/.gdbinit index 6adb9f3fa02..440fa858244 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -35,20 +35,23 @@ handle 2 noprint pass # debugging. handle SIGALRM ignore -# Set up a mask to use. -# This should be EMACS_INT, but in some cases that is a macro. -# long ought to work in all cases right now. +# $valmask and $tagmask are mask values set up by the xreload macro below. +# Use $bugfix so that the value isn't a constant. +# Using a constant runs into GDB bugs sometimes. define xgetptr - set $ptr = (gdb_use_union ? $arg0.u.val : $arg0 & $valmask) | gdb_data_seg_bits + set $bugfix = $arg0 + set $ptr = (gdb_use_union ? $bugfix.u.val : $bugfix & $valmask) | gdb_data_seg_bits end define xgetint - set $int = gdb_use_union ? $arg0.s.val : (gdb_use_lsb ? $arg0 : $arg0 << gdb_gctypebits) >> gdb_gctypebits + set $bugfix = $arg0 + set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits end define xgettype - set $type = gdb_use_union ? $arg0.s.type : (enum Lisp_Type) (gdb_use_lsb ? $arg0 & $tagmask : $arg0 >> gdb_valbits) + set $bugfix = $arg0 + set $type = gdb_use_union ? $bugfix.s.type : (enum Lisp_Type) (gdb_use_lsb ? $bugfix & $tagmask : $bugfix >> gdb_valbits) end # Set up something to print out s-expressions. From 7f3e88596faedd51438f86487504ed6093a9a483 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 00:31:40 +0000 Subject: [PATCH 349/560] (access_keymap): Protect from bad value of meta_prefix_char. --- src/keymap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/keymap.c b/src/keymap.c index f5675d563ee..ff7836ce23b 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -528,6 +528,10 @@ access_keymap (map, idx, t_ok, noinherit, autoload) struct gcpro gcpro1; Lisp_Object meta_map; GCPRO1 (map); + /* A strange value in which Meta is set would cause + infinite recursion. Protect against that. */ + if (meta_prefix_char & CHAR_META) + meta_prefix_char = make_number (27); meta_map = get_keymap (access_keymap (map, meta_prefix_char, t_ok, noinherit, autoload), 0, autoload); From 674a954a1deba3f9a5a382f2bfe4a0b48e71e204 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 00:32:36 +0000 Subject: [PATCH 350/560] (Fmessage): If arg is "", return "" (as before). --- src/editfns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editfns.c b/src/editfns.c index a6cd2c0e16b..0587d66bb0f 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3135,7 +3135,7 @@ usage: (message STRING &rest ARGS) */) && SBYTES (args[0]) == 0)) { message (0); - return Qnil; + return args[0]; } else { From 6f771c32b0b66240cbb2214e6977ba072155fd16 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 00:33:07 +0000 Subject: [PATCH 351/560] *** empty log message *** --- etc/TODO | 4 ++++ lispref/ChangeLog | 4 ++++ man/ChangeLog | 24 ++++++++++++++++++++++-- src/ChangeLog | 9 +++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/etc/TODO b/etc/TODO index 95f7fa8f469..e8845c03ee1 100644 --- a/etc/TODO +++ b/etc/TODO @@ -20,6 +20,10 @@ to the FSF. ** Redefine define-generic-mode as a macro, so the compiler sees the definitions it generates. +** Change the way define-minor-mode handles autoloading. + It should not generate :require. Or :require in defcustom + should not be recorded in the user's custom-set-variables call. + * Important features: ** Provide user-friendly ways to list all available font families, diff --git a/lispref/ChangeLog b/lispref/ChangeLog index e31f6530afa..12b67ac30b3 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -3,6 +3,10 @@ * keymaps.texi (Changing Key Bindings): `suppress-keymap' now uses command remapping. +2005-01-15 Richard M. Stallman + + * display.texi (Defining Images): Mention DATA-P arg of create-image. + 2005-01-14 Kim F. Storm * commands.texi (Accessing Events): Add WHOLE arg to posn-at-x-y. diff --git a/man/ChangeLog b/man/ChangeLog index e3f04332cf6..f2015a33187 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,8 +1,16 @@ +2005-01-20 Richard M. Stallman + + * calendar.texi (Time Intervals): Delete special stuff for MS-DOS. + 2005-01-19 Jay Belanger * calc.texi (Keep Arguments): Mention that keeping arguments doesn't work with keyboard macros. +2005-01-16 Richard M. Stallman + + * autotype.texi (Autoinserting): Fix small error. + 2005-01-16 Michael Albinus Sync with Tramp 2.0.47. @@ -11,8 +19,20 @@ remote files. 2005-01-15 Sergey Poznyakoff - - * man/rmail.texi: Document support for GNU mailutils in rmail.el. + + * man/rmail.texi (Movemail): Explain differences + between standard and mailutils versions of movemail. + Describe command line and configuration options introduced + with the latter. + Explain the notion of mailbox URL, provide examples and + cross-references to mailutils documentation. + Describe various methods of specifying mailbox names, + user names and user passwords for rmail. + (Remote Mailboxes): New section. Describe + how movemail handles remote mailboxes. Describe configuration + options used to control its behavior. + (Other Mailbox Formats): Explain handling of various mailbox + formats. 2005-01-13 Richard M. Stallman diff --git a/src/ChangeLog b/src/ChangeLog index 4b33af4bc4a..105e2f296f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2005-01-20 Richard M. Stallman + + * editfns.c (Fmessage): If arg is "", return "" (as before). + + * keymap.c (access_keymap): Protect from bad value of meta_prefix_char. + + * .gdbinit (xgetptr, xgetint, xgettype): Copy $arg0 into a temp + variable. + 2005-01-20 Steven Tamm * editfns.c (Voperating_system_release): Added. From 3a91dd3e50cd2c2bc919dc55fa7abeca7a8cb47d Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 21 Jan 2005 05:43:09 +0000 Subject: [PATCH 352/560] (calc-fancy-prefix-other-key): Set prefix arg. --- lisp/calc/calc-ext.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 059dab35767..8d3be3b8505 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1401,6 +1401,7 @@ calc-kill calc-kill-region calc-yank)))) (and (>= last-command-char 0) (< last-command-char ? ) (not (eq last-command-char meta-prefix-char))))) (calc-wrapper)) ; clear flags if not a Calc command. + (setq prefix-arg arg) (calc-unread-command) (setq overriding-terminal-local-map nil)) From 7ec35700c346fc0f90f0ce513dbbce5826f29885 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Fri, 21 Jan 2005 05:52:26 +0000 Subject: [PATCH 353/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6db1db5f854..d000ba48a7c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-20 Jay Belanger + + * calc/calc-ext.el (calc-fancy-prefix-other-key): Set prefix arg + for called function. + 2005-01-20 Steven Tamm * term/mac-win.el (process-connection-type): Removed. From eee141ce6922778f818abd153b728c7b15832b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 21 Jan 2005 05:59:21 +0000 Subject: [PATCH 354/560] * gtkutil.c (xg_tool_bar_detach_callback): Remove unused variable bw. (xg_get_file_name): Move declaration ofx_use_old_gtk_file_dialog to start of function for older compilers. --- src/ChangeLog | 6 ++++++ src/gtkutil.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 105e2f296f2..3405cbac1f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-01-21 Jan Dj,Ad(Brv + + * gtkutil.c (xg_tool_bar_detach_callback): Remove unused variable bw. + (xg_get_file_name): Move declaration ofx_use_old_gtk_file_dialog to + start of function for older compilers. + 2005-01-20 Richard M. Stallman * editfns.c (Fmessage): If arg is "", return "" (as before). diff --git a/src/gtkutil.c b/src/gtkutil.c index 39d5e768dda..aecc4e2eaea 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1312,6 +1312,7 @@ xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p) char *fn = 0; int filesel_done = 0; xg_get_file_func func; + extern int x_use_old_gtk_file_dialog; #if defined (HAVE_GTK_AND_PTHREAD) && defined (__SIGRTMIN) /* I really don't know why this is needed, but without this the GLIBC add on @@ -1321,7 +1322,6 @@ xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p) #endif /* HAVE_GTK_AND_PTHREAD */ #ifdef HAVE_GTK_FILE_BOTH - extern int x_use_old_gtk_file_dialog; if (x_use_old_gtk_file_dialog) w = xg_get_file_with_selection (f, prompt, default_filename, @@ -3161,7 +3161,6 @@ xg_tool_bar_detach_callback (wbox, w, client_data) /* When detaching a tool bar, not everything dissapear. There are a few pixels left that are used to drop the tool bar back into place. */ - int bw = gtk_container_get_border_width (GTK_CONTAINER (wbox)); FRAME_TOOLBAR_HEIGHT (f) = 2; /* The height has changed, resize outer widget and set columns From 2ff1dec97facba8512f1b731f8c91a5b833117a8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 21 Jan 2005 10:26:26 +0000 Subject: [PATCH 355/560] =?UTF-8?q?2005-01-21=20=20Ren=EF=BF=BDyllingstad?= =?UTF-8?q?=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * pcomplete.el: define pcomplete-read-event instead of read-event, since it's not a complete read-event implementation --- lisp/ChangeLog | 5 +++++ lisp/pcomplete.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d000ba48a7c..b78aa00b925 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-21 Ren,Ai(B Kyllingstad + + * pcomplete.el: define pcomplete-read-event instead of read-event, + since it's not a complete read-event implementation + 2005-01-20 Jay Belanger * calc/calc-ext.el (calc-fancy-prefix-other-key): Set prefix arg diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index f4b796dd1a7..b01bef39664 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -946,8 +946,10 @@ generate the completions list. This means that the hook (unless (fboundp 'event-matches-key-specifier-p) (defalias 'event-matches-key-specifier-p 'eq)) -(unless (fboundp 'read-event) - (defsubst read-event (&optional prompt) +(if (fboundp 'read-event) + (defsubst pcomplete-read-event (&optional prompt) + (read-event prompt)) + (defsubst pcomplete-read-event (&optional prompt) (aref (read-key-sequence prompt) 0))) (unless (fboundp 'event-basic-type) @@ -969,7 +971,7 @@ Typing SPC flushes the help buffer." (prog1 (catch 'done (while (with-current-buffer (get-buffer "*Completions*") - (setq event (read-event))) + (setq event (pcomplete-read-event))) (cond ((event-matches-key-specifier-p event ? ) (set-window-configuration pcomplete-last-window-config) From 6a8a289211955fb659b6bd47fd8c3a75f9deeb6d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 20:49:30 +0000 Subject: [PATCH 356/560] (Time Intervals): Delete special stuff for MS-DOS. --- man/calendar.texi | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/man/calendar.texi b/man/calendar.texi index 8ebe7c4b3d7..ba4b582bbec 100644 --- a/man/calendar.texi +++ b/man/calendar.texi @@ -1540,14 +1540,12 @@ tells Emacs that the current interval is over. @vindex timeclock-file @findex timeclock-reread-log The timeclock functions work by accumulating the data in a file -called @file{.timelog} in your home directory. (On MS-DOS, this file -is called @file{_timelog}, since an initial period is not allowed in -file names on MS-DOS.) You can specify a different name for this file -by customizing the variable @code{timeclock-file}. If you edit the -timeclock file manually, or if you change the value of any of -timeclock's customizable variables, you should run the command -@kbd{M-x timeclock-reread-log} to update the data in Emacs from the -file. +called @file{.timelog} in your home directory. You can specify a +different name for this file by customizing the variable +@code{timeclock-file}. If you edit the timeclock file manually, or if +you change the value of any of timeclock's customizable variables, you +should run the command @kbd{M-x timeclock-reread-log} to update the +data in Emacs from the file. @ignore arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92 From 7f08b80e335a9d40acc5275c4d5ce2a6e64c407a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 20:51:52 +0000 Subject: [PATCH 357/560] (Fcopy_file): Doc fix. --- src/fileio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index a3bb5aab62e..e8a4ad09101 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2390,10 +2390,10 @@ Signals a `file-already-exists' error if file NEWNAME already exists, unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil. A number as third arg means request confirmation if NEWNAME already exists. This is what happens in interactive use with M-x. -Fourth arg KEEP-TIME non-nil means give the new file the same +Always sets the file modes of the output file to match the input file. +Fourth arg KEEP-TIME non-nil means give the output file the same last-modified time as the old one. (This works on only some systems.) -A prefix arg makes KEEP-TIME non-nil. -Also set the file modes of the target file to match the source file. */) +A prefix arg makes KEEP-TIME non-nil. */) (file, newname, ok_if_already_exists, keep_time) Lisp_Object file, newname, ok_if_already_exists, keep_time; { From f95a20e78ded0423ddaca0c3b60de42989465c5d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 21 Jan 2005 20:53:02 +0000 Subject: [PATCH 358/560] *** empty log message *** --- etc/TODO | 6 ++++++ src/ChangeLog | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/etc/TODO b/etc/TODO index e8845c03ee1..fd061904889 100644 --- a/etc/TODO +++ b/etc/TODO @@ -75,6 +75,12 @@ to the FSF. * Other features we would like: +** A function to check for customizable options that have been + set but not saved, and ask the user whether to save them. + This could go in kill-emacs-query-functions, to remind people + to save their changes. If the user says yes, show them + in a Custom buffer using customize-customized. + ** ange-ftp *** understand sftp *** Use MLS for ange-ftp-insert-directory if a list of files is specified. diff --git a/src/ChangeLog b/src/ChangeLog index 3405cbac1f0..f095ec14981 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-21 Richard M. Stallman + + * fileio.c (Fcopy_file): Doc fix. + 2005-01-21 Jan Dj,Ad(Brv * gtkutil.c (xg_tool_bar_detach_callback): Remove unused variable bw. From 568931f03e8b24fc9efc77a52d824de8b4a7aa85 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 21 Jan 2005 21:07:50 +0000 Subject: [PATCH 359/560] *** empty log message *** --- etc/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 3396f201870..e0b95106201 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-01-22 Nick Roberts + + * TODO: Add entry for toolbar on ttys. + 2005-01-18 Nick Roberts * DEBUG: Suggest separate terminal for debug session. From d87fbfb08be5375104a0de259104eeeeab072ff6 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 21 Jan 2005 21:13:33 +0000 Subject: [PATCH 360/560] Add entry for toolbar on ttys. --- etc/TODO | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/TODO b/etc/TODO index fd061904889..bca0f9a12cb 100644 --- a/etc/TODO +++ b/etc/TODO @@ -328,6 +328,9 @@ to the FSF. "japanese". Currently, most Japanese users are using external packages (e.g. tamago, anthy) or an input method via XIM. +** Provide the toolbar on ttys. This could map a bit like tmm-menubar + for the menubar and buttons could look a bit like those used by customize. + * Internal changes ** Replace gmalloc.c with the modified Doug Lea code from the current From d0d0434fc31db95c42d02b2ce861b26652261129 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 22 Jan 2005 01:15:38 +0000 Subject: [PATCH 361/560] *** empty log message *** --- etc/NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 753855b46e3..45939ab9b15 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -99,6 +99,9 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. * Changes in Emacs 21.4 +** Emacs now responds to mouse-clicks on the mode-line, header-line and +display margin, when run in an xterm. + ** M-SPC (just-one-space) when given a numeric argument N converts whitespace around point to N spaces. From f15f5495d9403a19900402965ad3d34f78562ffa Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 01:41:36 +0000 Subject: [PATCH 362/560] (pos_visible_p): Replace FULLY arg by RTOP and RBOT args to return number of partially invisible pixels at top and bottom of the dislay row at POS. --- src/xdisp.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 96313405860..a2f687cfb87 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1243,15 +1243,16 @@ line_bottom_y (it) } -/* Return 1 if position CHARPOS is visible in window W. Set *FULLY to - 1 if POS is visible and the line containing POS is fully visible. +/* Return 1 if position CHARPOS is visible in window W. + If visible, set *X and *Y to pixel coordinates of top left corner. + Set *RTOP and *RBOT to pixel height of an invisible area of glyph at POS. EXACT_MODE_LINE_HEIGHTS_P non-zero means compute exact mode-line and header-lines heights. */ int -pos_visible_p (w, charpos, fully, x, y, exact_mode_line_heights_p) +pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) struct window *w; - int charpos, *fully, *x, *y, exact_mode_line_heights_p; + int charpos, *x, *y, *rtop, *rbot, exact_mode_line_heights_p; { struct it it; struct text_pos top; @@ -1264,7 +1265,7 @@ pos_visible_p (w, charpos, fully, x, y, exact_mode_line_heights_p) set_buffer_internal_1 (XBUFFER (w->buffer)); } - *fully = visible_p = 0; + visible_p = 0; SET_TEXT_POS_FROM_MARKER (top, w->start); /* Compute exact mode line heights, if requested. */ @@ -1295,14 +1296,16 @@ pos_visible_p (w, charpos, fully, x, y, exact_mode_line_heights_p) if (top_y < window_top_y) visible_p = bottom_y > window_top_y; else if (top_y < it.last_visible_y) - { visible_p = 1; - *fully = bottom_y <= it.last_visible_y; - } if (visible_p && x) { *x = it.current_x; *y = max (top_y + it.max_ascent - it.ascent, window_top_y); + if (rtop) + { + *rtop = max (0, window_top_y - top_y); + *rbot = max (0, bottom_y - it.last_visible_y); + } } } else if (it.current_y + it.max_ascent + it.max_descent > it.last_visible_y) @@ -1319,6 +1322,11 @@ pos_visible_p (w, charpos, fully, x, y, exact_mode_line_heights_p) move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); *x = it2.current_x; *y = it2.current_y + it2.max_ascent - it2.ascent; + if (rtop) + { + *rtop = 0; + *rbot = max (0, (it2.current_y + it2.max_ascent + it2.max_descent) - it.last_visible_y); + } } } } From e56263e5264fb804da004bf51d649e6b7240c5f3 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 01:41:47 +0000 Subject: [PATCH 363/560] (auto_window_vscroll_p): New boolean. (syms_of_window): DEFVAR_BOOL it. (Fpos_visible_in_window_p): Extend return value to include RTOP and RBOT values if FULLY is nil. (window_scroll_pixel_based): Adjust vscroll for partially visible rows if auto_window_vscroll_p is set. (Fset_window_vscroll): Do nothing if vscroll is not modified. --- src/window.c | 70 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 13 deletions(-) diff --git a/src/window.c b/src/window.c index 735bd99fd55..85376dd7b50 100644 --- a/src/window.c +++ b/src/window.c @@ -124,6 +124,11 @@ Lisp_Object Vother_window_scroll_buffer; Lisp_Object Vtemp_buffer_show_function; +/* Non-zero means line and page scrolling on tall lines (with images) + does partial scrolling by modifying window-vscroll. */ + +int auto_window_vscroll_p; + /* Non-zero means to use mode-line-inactive face in all windows but the selected-window and the minibuffer-scroll-window when the minibuffer is active. */ @@ -328,9 +333,11 @@ If POS is only out of view because of horizontal scrolling, return non-nil. POS defaults to point in WINDOW; WINDOW defaults to the selected window. If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, -return value is a list (X Y FULLY) where X and Y are the pixel coordinates -relative to the top left corner of the window, and FULLY is t if the -character after POS is fully visible and nil otherwise. */) +return value is a list (X Y FULLY [RTOP RBOT]) where X and Y are the pixel +coordinates relative to the top left corner of the window, and FULLY is t if the +character after POS is fully visible and nil otherwise. If FULLY is nil, +RTOP and RBOT are the number of pixels invisible at the top and bottom row +of the window. */) (pos, window, partially) Lisp_Object pos, window, partially; { @@ -339,7 +346,7 @@ character after POS is fully visible and nil otherwise. */) register struct buffer *buf; struct text_pos top; Lisp_Object in_window = Qnil; - int fully_p = 1; + int rtop, rbot, fully_p = 1; int x, y; w = decode_window (window); @@ -362,14 +369,19 @@ character after POS is fully visible and nil otherwise. */) && posint <= BUF_ZV (buf) && CHARPOS (top) >= BUF_BEGV (buf) && CHARPOS (top) <= BUF_ZV (buf) - && pos_visible_p (w, posint, &fully_p, &x, &y, NILP (partially)) - && (!NILP (partially) || fully_p)) + && pos_visible_p (w, posint, &x, &y, &rtop, &rbot, NILP (partially)) + && (fully_p = !rtop && !rbot, (!NILP (partially) || fully_p))) in_window = Qt; if (!NILP (in_window) && !NILP (partially)) in_window = Fcons (make_number (x), Fcons (make_number (y), - Fcons (fully_p ? Qt : Qnil, Qnil))); + Fcons (fully_p ? Qt : Qnil, + (fully_p + ? Qnil + : Fcons (make_number (rtop), + Fcons (make_number (rbot), + Qnil)))))); return in_window; } @@ -4564,6 +4576,31 @@ window_scroll_pixel_based (window, n, whole, noerror) start = it.current.pos; } + else if (auto_window_vscroll_p) + { + if (NILP (XCAR (XCDR (XCDR (tem))))) + { + int px; + int dy = WINDOW_FRAME_LINE_HEIGHT (w); + if (whole) + dy = window_box_height (w) - next_screen_context_lines * dy; + dy *= n; + + if (n < 0 && (px = XINT (Fnth (make_number (3), tem))) > 0) + { + px = max (0, -w->vscroll - min (px, -dy)); + Fset_window_vscroll (window, make_number (px), Qt); + return; + } + if (n > 0 && (px = XINT (Fnth (make_number (4), tem))) > 0) + { + px = max (0, -w->vscroll + min (px, dy)); + Fset_window_vscroll (window, make_number (px), Qt); + return; + } + } + Fset_window_vscroll (window, make_number (0), Qt); + } /* If scroll_preserve_screen_position is non-nil, we try to set point in the same window line as it is now, so get that line. */ @@ -6335,13 +6372,16 @@ If PIXELS-P is non-nil, the return value is VSCROLL. */) : XFLOATINT (vscroll)); w->vscroll = min (w->vscroll, 0); - /* Adjust glyph matrix of the frame if the virtual display - area becomes larger than before. */ - if (w->vscroll < 0 && w->vscroll < old_dy) - adjust_glyphs (f); + if (w->vscroll != old_dy) + { + /* Adjust glyph matrix of the frame if the virtual display + area becomes larger than before. */ + if (w->vscroll < 0 && w->vscroll < old_dy) + adjust_glyphs (f); - /* Prevent redisplay shortcuts. */ - XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; + /* Prevent redisplay shortcuts. */ + XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; + } } return Fwindow_vscroll (window, pixels_p); @@ -6653,6 +6693,10 @@ is displayed in the `mode-line' face. */); doc: /* *Non-nil means `display-buffer' should make a separate frame. */); pop_up_frames = 0; + DEFVAR_BOOL ("auto-window-vscroll", &auto_window_vscroll_p, + doc: /* *Non-nil means to automatically adjust `window-vscroll' to view tall lines. */); + auto_window_vscroll_p = 1; + DEFVAR_BOOL ("display-buffer-reuse-frames", &display_buffer_reuse_frames, doc: /* *Non-nil means `display-buffer' should reuse frames. If the buffer in question is already displayed in a frame, raise that frame. */); From f9e697040d10847042d9f99859485555d16417cb Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 01:41:59 +0000 Subject: [PATCH 364/560] (pos_visible_p): Fix prototype. --- src/lisp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lisp.h b/src/lisp.h index 49acb225e1e..c0408ddf6e3 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2464,7 +2464,7 @@ extern void syms_of_xdisp P_ ((void)); extern void init_xdisp P_ ((void)); extern Lisp_Object safe_eval P_ ((Lisp_Object)); extern int pos_visible_p P_ ((struct window *, int, int *, - int *, int *, int)); + int *, int *, int *, int)); /* Defined in vm-limit.c. */ extern void memory_warnings P_ ((POINTER_TYPE *, void (*warnfun) ())); From d00e399ac9e1c0184a888846ea3fcd511edb7a82 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 01:43:55 +0000 Subject: [PATCH 365/560] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ src/ChangeLog | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b78aa00b925..62a2b85bb81 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-22 Kim F. Storm + + * simple.el (line-move-1): Rename from line-move. + (line-move): New function that adjusts vscroll for partially + visible rows, and calls line-move-1 otherwise. + 2005-01-21 Ren,Ai(B Kyllingstad * pcomplete.el: define pcomplete-read-event instead of read-event, diff --git a/src/ChangeLog b/src/ChangeLog index f095ec14981..00f8e15aff2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2005-01-22 Kim F. Storm + + * window.c (auto_window_vscroll_p): New boolean. + (syms_of_window): DEFVAR_BOOL it. + (Fpos_visible_in_window_p): Extend return value to include RTOP + and RBOT values if FULLY is nil. + (window_scroll_pixel_based): Adjust vscroll for partially visible + rows if auto_window_vscroll_p is set. + (Fset_window_vscroll): Do nothing if vscroll is not modified. + + * xdisp.c (pos_visible_p): Replace FULLY arg by RTOP and RBOT args + to return number of partially invisible pixels at top and bottom + of the dislay row at POS. + + * lisp.h (pos_visible_p): Fix prototype. + 2005-01-21 Richard M. Stallman * fileio.c (Fcopy_file): Doc fix. @@ -23,7 +39,7 @@ (init_editfns): Assign new variable operating-system-release based on call to uname if available. (get_operating_system_release): Added function to - allow c-level access to operating system release. + allow c-level access to operating system release. * config.h: Regenerated. From 16c2f92f01ba1eb18a8f5fcfc9efb4243848a512 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 01:44:56 +0000 Subject: [PATCH 366/560] (line-move-1): Rename from line-move. (line-move): New function that adjusts vscroll for partially visible rows, and calls line-move-1 otherwise. --- lisp/simple.el | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index fbcb776c7dc..e2476577fe3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3179,10 +3179,31 @@ Outline mode sets this." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) +;; Perform vertical scrolling of tall images if necessary. +(defun line-move (arg &optional noerror to-end) + (if auto-window-vscroll + (let ((forward (> arg 0)) + (pvis (pos-visible-in-window-p (window-start) nil t))) + (if (and pvis (null (nth 2 pvis)) + (> (nth (if forward 4 3) pvis) 0)) + (set-window-vscroll nil + (if forward + (+ (window-vscroll nil t) + (min (nth 4 pvis) + (* (frame-char-height) arg))) + (max 0 + (- (window-vscroll nil t) + (min (nth 3 pvis) + (* (frame-char-height) (- arg)))))) + t) + (set-window-vscroll nil 0) + (line-move-1 arg noerror to-end))) + (line-move-1 arg noerror to-end))) + ;; This is the guts of next-line and previous-line. ;; Arg says how many lines to move. ;; The value is t if we can move the specified number of lines. -(defun line-move (arg &optional noerror to-end) +(defun line-move-1 (arg &optional noerror to-end) ;; Don't run any point-motion hooks, and disregard intangibility, ;; for intermediate positions. (let ((inhibit-point-motion-hooks t) From 1da1887d4c4c84159b90cca89a5b5cf8f59e0c98 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jan 2005 10:36:05 +0000 Subject: [PATCH 367/560] (top level): Call (message "") via progn, so that eudc-options-file is loaded. --- lisp/ChangeLog | 5 +++++ lisp/net/eudc.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62a2b85bb81..2fb1794a812 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-22 Toby Allsopp (tiny change) + + * net/eudc.el (top level): Call (message "") via progn, so that + eudc-options-file is loaded. + 2005-01-22 Kim F. Storm * simple.el (line-move-1): Rename from line-move. diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index bcdd1d195bf..2e6b1625146 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1214,7 +1214,7 @@ queries the server for the existing fields and displays a corresponding form." ;;; Load the options file (if (and (not noninteractive) (and (locate-library eudc-options-file) - (message "")) ; Remove modeline message + (progn (message "") t)) ; Remove modeline message (not (featurep 'eudc-options-file))) (load eudc-options-file)) From b338e7499d4aab3d0a41717281919252e955052a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jan 2005 10:37:25 +0000 Subject: [PATCH 368/560] Fix punctiation. --- man/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index f2015a33187..7182e5c8336 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -28,8 +28,8 @@ cross-references to mailutils documentation. Describe various methods of specifying mailbox names, user names and user passwords for rmail. - (Remote Mailboxes): New section. Describe - how movemail handles remote mailboxes. Describe configuration + (Remote Mailboxes): New section. Describe + how movemail handles remote mailboxes. Describe configuration options used to control its behavior. (Other Mailbox Formats): Explain handling of various mailbox formats. From cc7fe910c26e0bee80f5d843824f74b7bd5bb57b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jan 2005 10:41:29 +0000 Subject: [PATCH 369/560] (type-break-mode): Add a test for type-break-file-name being non-nil. --- lisp/type-break.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/type-break.el b/lisp/type-break.el index 3a0b8b5adcc..0585e5bc61d 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -390,8 +390,9 @@ problems." (and (interactive-p) (message "Type Break mode is already enabled"))) (type-break-mode - (with-current-buffer (find-file-noselect type-break-file-name 'nowarn) - (setq buffer-save-without-query t)) + (when type-break-file-name + (with-current-buffer (find-file-noselect type-break-file-name 'nowarn) + (setq buffer-save-without-query t))) (or global-mode-string (setq global-mode-string '(""))) From cfdd484fc73d924c8e5d7061544542a582be29aa Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jan 2005 10:52:28 +0000 Subject: [PATCH 370/560] (url-http-parse-headers): Reset url-http-data to nil, like for the 303 response. --- lisp/url/url-http.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 2608a85963a..3a0fbf6ecd6 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -459,7 +459,7 @@ should be shown to the user." (url-http-debug "Converting `%s' request to `GET' because of REDIRECT(%d)" url-http-method url-http-response-status) (setq url-http-method "GET" - url-request-data nil))) + url-http-data nil))) (303 ;; The response to the request can be found under a different ;; URI and SHOULD be retrieved using a GET method on that From 1a8461d34c0cb22da8d4f32ebb8fb29111e493c3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jan 2005 10:53:39 +0000 Subject: [PATCH 371/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ lisp/url/ChangeLog | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2fb1794a812..d5b86e7c145 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-22 Eli Zaretskii + + * type-break.el (type-break-mode): Add a test for + type-break-file-name being non-nil. + 2005-01-22 Toby Allsopp (tiny change) * net/eudc.el (top level): Call (message "") via progn, so that diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 19f39265251..593bf37eb78 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2005-01-22 Klaus Straubinger (tiny change) + + * url-http.el (url-http-parse-headers): Reset url-http-data to + nil, like for the 303 response. + 2005-01-13 Stefan Monnier * url.el (url-retrieve-synchronously): Use accept-process-output rather From 557724a8715a9445fdb5815403c46afef3bdf2eb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 22 Jan 2005 10:55:38 +0000 Subject: [PATCH 372/560] Fix last entry. --- lisp/url/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 593bf37eb78..6dac2389e71 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,7 +1,7 @@ 2005-01-22 Klaus Straubinger (tiny change) - * url-http.el (url-http-parse-headers): Reset url-http-data to - nil, like for the 303 response. + * url-http.el (url-http-parse-headers) <302>: Reset url-http-data + to nil, like for the 303 response. 2005-01-13 Stefan Monnier From 3d4d788a38060b1bb2435a57876d4065eb005b5b Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 22 Jan 2005 15:43:56 +0000 Subject: [PATCH 373/560] * NEWS: Mention alias `find-grep' for `grep-find'. * progmodes/grep.el: Add alias `find-grep' for `grep-find'. * building.texi (Grep Searching): Mention alias `find-grep' for `grep-find'. --- etc/ChangeLog | 4 ++++ etc/NEWS | 4 ++++ lisp/ChangeLog | 4 ++++ lisp/progmodes/grep.el | 3 +++ man/ChangeLog | 5 +++++ man/building.texi | 12 +++++++----- 6 files changed, 27 insertions(+), 5 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index e0b95106201..4a3c7039363 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2005-01-22 David Kastrup + + * NEWS: Mention alias `find-grep' for `grep-find'. + 2005-01-22 Nick Roberts * TODO: Add entry for toolbar on ttys. diff --git a/etc/NEWS b/etc/NEWS index 45939ab9b15..d486365dd91 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -358,6 +358,10 @@ can be saved and automatically revisited with the new Grep mode. *** Grep commands now have their own submenu and customization group. ++++ +*** `grep-find' is now also available under the name `find-grep' where +people knowing `find-grep-dired' would probably expect it. + *** The new variables `grep-window-height', `grep-auto-highlight', and `grep-scroll-output' can be used to override the corresponding compilation mode settings for grep commands. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d5b86e7c145..1b0181b63fb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-22 David Kastrup + + * progmodes/grep.el: Add alias `find-grep' for `grep-find'. + 2005-01-22 Eli Zaretskii * type-break.el (type-break-mode): Add a test for diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 8efa48aaa48..a3b1ab3abdd 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -542,6 +542,9 @@ easily repeat a find command." (let ((null-device nil)) ; see grep (grep command-args)))) +;;;###autoload +(defalias 'find-grep 'grep-find) + (defun grep-expand-command-macros (command &optional regexp files dir excl case-fold) "Patch grep COMMAND replacing , etc." (setq command diff --git a/man/ChangeLog b/man/ChangeLog index 7182e5c8336..cbcf03a7f43 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-22 David Kastrup + + * building.texi (Grep Searching): Mention alias `find-grep' for + `grep-find'. + 2005-01-20 Richard M. Stallman * calendar.texi (Time Intervals): Delete special stuff for MS-DOS. diff --git a/man/building.texi b/man/building.texi index db352ada9c7..cd42a4ef79d 100644 --- a/man/building.texi +++ b/man/building.texi @@ -51,6 +51,7 @@ Invoke a compiler with the same command as in the last invocation of Run @code{grep} asynchronously under Emacs, with matching lines listed in the buffer named @samp{*grep*}. @item M-x grep-find +@item M-x find-grep Run @code{grep} via @code{find}, with user-specified arguments, and collect output in the buffer named @samp{*grep*}. @item M-x kill-compilation @@ -166,11 +167,12 @@ the tag (@pxref{Tags}) around point, and puts that into the default @code{grep} command. @findex grep-find - The command @kbd{M-x grep-find} is similar to @kbd{M-x grep}, but it -supplies a different initial default for the command---one that runs -both @code{find} and @code{grep}, so as to search every file in a -directory tree. See also the @code{find-grep-dired} command, -in @ref{Dired and Find}. +@findex find-grep + The command @kbd{M-x grep-find} (also available as @kbd{M-x +find-grep}) is similar to @kbd{M-x grep}, but it supplies a different +initial default for the command---one that runs both @code{find} and +@code{grep}, so as to search every file in a directory tree. See also +the @code{find-grep-dired} command, in @ref{Dired and Find}. @node Compilation Mode @section Compilation Mode From d9e7c622607bc74214ad5f9aa0eaa64d7a4eba55 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sat, 22 Jan 2005 15:54:04 +0000 Subject: [PATCH 374/560] * s/darwin.h: Removed PTY_ITERATION from here. (DARWIN): Defined. * process.c (init_process): Default process-connection-type to nil on darwin 6 or less, t if it is 7 or higher. This way the broken pty behavior is still allowed on darwin 6 for interactive processes for people that know what they are doing. --- src/ChangeLog | 9 +++++++++ src/process.c | 14 ++++++++++++++ src/s/darwin.h | 22 +++++++++------------- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 00f8e15aff2..8cf79218c3e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2005-01-22 Steven Tamm + + * s/darwin.h: Removed PTY_ITERATION from here. + (DARWIN): Defined. + * process.c (init_process): Default process-connection-type to + nil on darwin 6 or less, t if it is 7 or higher. This way the + broken pty behavior is still allowed on darwin 6 for interactive + processes for people that know what they are doing. + 2005-01-22 Kim F. Storm * window.c (auto_window_vscroll_p): New boolean. diff --git a/src/process.c b/src/process.c index 6134d3131bc..9b8b086ec7e 100644 --- a/src/process.c +++ b/src/process.c @@ -187,6 +187,7 @@ extern Lisp_Object QCfilter; #include "syswait.h" extern void set_waiting_for_input P_ ((EMACS_TIME *)); +extern char *get_operating_system_release (); #ifndef USE_CRT_DLL extern int errno; @@ -6704,6 +6705,19 @@ init_process () Fprovide (intern ("make-network-process"), subfeatures); } #endif /* HAVE_SOCKETS */ + +#ifdef DARWIN + /* PTYs are broken on Darwin < 6, but are sometimes useful for interactive + processes. As such, we only change the default value. */ + if (initialized) + { + char *release = get_operating_system_release(); + if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION + && release[1] == '.')) { + Vprocess_connection_type = Qnil; + } + } +#endif } void diff --git a/src/s/darwin.h b/src/s/darwin.h index d8da3e3174c..5b162ea08a3 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -37,6 +37,10 @@ Boston, MA 02111-1307, USA. */ #define BSD_SYSTEM /* #define VMS */ +#ifndef DARWIN +#define DARWIN 1 +#endif + /* MAC_OS is used to conditionally compile code common to both MAC_OS8 and MAC_OSX. */ #ifdef MAC_OSX @@ -103,25 +107,17 @@ Boston, MA 02111-1307, USA. */ /* * Define HAVE_PTYS if the system supports pty devices. + * Note: PTYs are broken on darwin <6. Use at your own risk. */ #define HAVE_PTYS - -/* - * PTYs only work correctly on Darwin 7 or higher. So make PTY_ITERATION - * Test the operating system release and only allow PTYs if it is greater - * than 7. +/** + * PTYs only work correctly on Darwin 7 or higher. So make the + * default for process-connection-type dependent on the kernel + * version. */ #define MIN_PTY_KERNEL_VERSION '7' -#define PTY_ITERATION \ - char *release = get_operating_system_release(); \ - if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION \ - && release[1] == '.')) \ - return -1; \ - for (c = FIRST_PTY_LETTER; c <= 'z'; c++) \ - for (i = 0; i < 16; i++) - /* * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate From ddff82cf89b20912729a1483da3f28608b44115a Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 22 Jan 2005 21:07:03 +0000 Subject: [PATCH 375/560] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-47 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-4 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-5 Update from CVS: exi/gnus-faq.texi ([4.1]): Typo. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-6 Update from CVS 2005-01-20 Katsumi Yamaoka * lisp/gnus/mm-decode.el (mm-insert-part): Switch the multibyteness of data which will be inserted according to the multibyteness of a buffer rather than the type of contents. Suggested by ARISAWA Akihiro . 2005-01-16 Xavier Maillard (tiny change) * man/gnus-faq.texi ([4.1]): Typo. --- lisp/gnus/ChangeLog | 7 +++++++ lisp/gnus/mm-decode.el | 27 +++++---------------------- man/ChangeLog | 4 ++++ man/gnus-faq.texi | 4 ++-- 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4eee8bcbbfc..77a600427e2 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2005-01-20 Katsumi Yamaoka + + * mm-decode.el (mm-insert-part): Switch the multibyteness of data + which will be inserted according to the multibyteness of a buffer + rather than the type of contents. Suggested by ARISAWA Akihiro + . + 2005-01-05 Reiner Steib * spam.el (spam-face): New face. Don't use `gnus-splash-face' diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index b167ea7d104..569890b8097 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1,5 +1,5 @@ ;;; mm-decode.el --- Functions for decoding MIME things -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -1032,27 +1032,10 @@ external if displayed external." (defun mm-insert-part (handle) "Insert the contents of HANDLE in the current buffer." - (let ((cur (current-buffer))) - (save-excursion - (if (member (mm-handle-media-supertype handle) '("text" "message")) - (with-temp-buffer - (insert-buffer-substring (mm-handle-buffer handle)) - (prog1 - (mm-decode-content-transfer-encoding - (mm-handle-encoding handle) - (mm-handle-media-type handle)) - (let ((temp (current-buffer))) - (set-buffer cur) - (insert-buffer-substring temp)))) - (mm-with-unibyte-buffer - (insert-buffer-substring (mm-handle-buffer handle)) - (prog1 - (mm-decode-content-transfer-encoding - (mm-handle-encoding handle) - (mm-handle-media-type handle)) - (let ((temp (current-buffer))) - (set-buffer cur) - (insert-buffer-substring temp)))))))) + (save-excursion + (insert (if (mm-multibyte-p) + (mm-string-as-multibyte (mm-get-part handle)) + (mm-get-part handle))))) (defun mm-file-name-delete-whitespace (file-name) "Remove all whitespace characters from FILE-NAME." diff --git a/man/ChangeLog b/man/ChangeLog index cbcf03a7f43..1eb82ac520f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-16 Xavier Maillard (tiny change) + + * gnus-faq.texi ([4.1]): Typo. + 2005-01-22 David Kastrup * building.texi (Grep Searching): Mention alias `find-grep' for diff --git a/man/gnus-faq.texi b/man/gnus-faq.texi index 280280a401e..42266aa4646 100644 --- a/man/gnus-faq.texi +++ b/man/gnus-faq.texi @@ -1,6 +1,6 @@ @c Insert "\input texinfo" at 1st line before texing this file alone. @c -*-texinfo-*- -@c Copyright (C) 1995, 2001, 2003, 2004 Free Software Foundation, Inc. +@c Copyright (C) 1995, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. @setfilename gnus-faq.info @c Frequently Asked Questions, FAQ - Introduction, Emacs for Heathens, Top @@ -857,7 +857,7 @@ Answer: If you enter the group by saying @samp{RET} - in summary buffer with point over the group, only unread and ticked messages are loaded. Say + in group buffer with point over the group, only unread and ticked messages are loaded. Say @samp{C-u RET} instead to load all available messages. If you want only the e.g. 300 newest say @samp{C-u 300 RET} From fc8f881d53016307ebd54a7e4c023c8d7fa18b98 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sat, 22 Jan 2005 23:49:06 +0000 Subject: [PATCH 376/560] (xw-defined-colors) Remove debug message. --- lisp/term/w32-win.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index cea1d3f77b8..e49f3ddb2e6 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -1050,7 +1050,6 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") (all-colors (or color-map-colors x-colors)) (this-color nil) (defined-colors nil)) - (message "Defining colors...") (while all-colors (setq this-color (car all-colors) all-colors (cdr all-colors)) From a354b72c97fe4c7d87264683d0ff7b3e42a4c1bc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 23:54:43 +0000 Subject: [PATCH 377/560] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 8cf79218c3e..e012abeadbe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-23 Kim F. Storm + + * xdisp.c (pos_visible_p): Return 0 if non-interactive. + 2005-01-22 Steven Tamm * s/darwin.h: Removed PTY_ITERATION from here. From a2962d06decc92e4f2289ad6023a375d1fa8d591 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 22 Jan 2005 23:55:00 +0000 Subject: [PATCH 378/560] (pos_visible_p): Return 0 if non-interactive. --- src/xdisp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index a2f687cfb87..17ee38f6fc0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1256,16 +1256,18 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) { struct it it; struct text_pos top; - int visible_p; + int visible_p = 0; struct buffer *old_buffer = NULL; + if (noninteractive) + return visible_p; + if (XBUFFER (w->buffer) != current_buffer) { old_buffer = current_buffer; set_buffer_internal_1 (XBUFFER (w->buffer)); } - visible_p = 0; SET_TEXT_POS_FROM_MARKER (top, w->start); /* Compute exact mode line heights, if requested. */ From e1c7e69af9ed3532f78ad5716ea30a7f3d9aea77 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Sun, 23 Jan 2005 00:01:51 +0000 Subject: [PATCH 379/560] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b0181b63fb..d55cf9dcb64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-22 Jason Rumney + + * term/w32-win.el (xw-defined-colors): Remove debug-message. + 2005-01-22 David Kastrup * progmodes/grep.el: Add alias `find-grep' for `grep-find'. From bed83ee4dd0caeb301232cf56dcc8e7f62406bba Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 00:50:24 +0000 Subject: [PATCH 380/560] (window_scroll_pixel_based): Force moving to next line if scrolling doesn't move start point, e.g. if looking at tall image. --- src/window.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/window.c b/src/window.c index 85376dd7b50..ef3d38c1554 100644 --- a/src/window.c +++ b/src/window.c @@ -4628,8 +4628,16 @@ window_scroll_pixel_based (window, n, whole, noerror) if (dy <= 0) move_it_vertically_backward (&it, -dy); else if (dy > 0) - move_it_to (&it, ZV, -1, it.current_y + dy, -1, - MOVE_TO_POS | MOVE_TO_Y); + { + int start_pos = IT_CHARPOS (it); + move_it_to (&it, ZV, -1, it.current_y + dy, -1, + MOVE_TO_POS | MOVE_TO_Y); + /* Ensure we actually does move, e.g. in case we are currently + looking at an image that is taller that the window height. */ + while (start_pos == IT_CHARPOS (it) + && start_pos < ZV) + move_it_by_lines (&it, 1, 1); + } } else move_it_by_lines (&it, n, 1); From 78465f3a8c37972ebff48b6c961196472fceef16 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 00:50:52 +0000 Subject: [PATCH 381/560] (pos_visible_p): Fix calculation of y. Clear last_height before calling line_bottom_y to get real height. --- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 17ee38f6fc0..f1877c494cb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1292,7 +1292,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) if (IT_CHARPOS (it) >= charpos) { int top_y = it.current_y; - int bottom_y = line_bottom_y (&it); + int bottom_y = (last_height = 0, line_bottom_y (&it)); int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w); if (top_y < window_top_y) @@ -1302,7 +1302,7 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, exact_mode_line_heights_p) if (visible_p && x) { *x = it.current_x; - *y = max (top_y + it.max_ascent - it.ascent, window_top_y); + *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); if (rtop) { *rtop = max (0, window_top_y - top_y); From 5c20cae25beb7029f0b43e96103da93cec31a781 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 00:53:10 +0000 Subject: [PATCH 382/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ src/ChangeLog | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d55cf9dcb64..e51cba7485b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-23 Kim F. Storm + + * simple.el (line-move): Fix last change. Check partial + visibility at point rather than at window-start. + 2005-01-22 Jason Rumney * term/w32-win.el (xw-defined-colors): Remove debug-message. diff --git a/src/ChangeLog b/src/ChangeLog index e012abeadbe..2055f66f473 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,11 @@ 2005-01-23 Kim F. Storm + * window.c (window_scroll_pixel_based): Force moving to next line + if scrolling doesn't move start point, e.g. if looking at tall image. + * xdisp.c (pos_visible_p): Return 0 if non-interactive. + Clear last_height before calling line_bottom_y to get real height. + Fix calculation of y. 2005-01-22 Steven Tamm From 860ea5165a57cdeb1e66b0886ac7bac4fc88d6a0 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 00:53:32 +0000 Subject: [PATCH 383/560] (line-move): Fix last change. Check partial visibility at point rather than at window-start. --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index e2476577fe3..02ce351c50b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3183,7 +3183,7 @@ Outline mode sets this." (defun line-move (arg &optional noerror to-end) (if auto-window-vscroll (let ((forward (> arg 0)) - (pvis (pos-visible-in-window-p (window-start) nil t))) + (pvis (pos-visible-in-window-p (point) nil t))) (if (and pvis (null (nth 2 pvis)) (> (nth (if forward 4 3) pvis) 0)) (set-window-vscroll nil From 6b3d88f70e0a915ce1377f7c0f0428c0c0e127c5 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 13:11:00 +0000 Subject: [PATCH 384/560] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2055f66f473..10f2930b7de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2005-01-23 Kim F. Storm + * window.c (Fpos_visible_in_window_p): Simplify return value for + for partially visible rows. + (window_scroll_pixel_based): Adapt to that change. + * window.c (window_scroll_pixel_based): Force moving to next line if scrolling doesn't move start point, e.g. if looking at tall image. From 5b1ba1e3304c28668adcf1891458348fb25e8c50 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 13:13:03 +0000 Subject: [PATCH 385/560] * window.c (Fpos_visible_in_window_p): Simplify return value for partially visible rows. (window_scroll_pixel_based): Adapt to that change. --- src/window.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/window.c b/src/window.c index ef3d38c1554..bdc105da3ed 100644 --- a/src/window.c +++ b/src/window.c @@ -333,11 +333,10 @@ If POS is only out of view because of horizontal scrolling, return non-nil. POS defaults to point in WINDOW; WINDOW defaults to the selected window. If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, -return value is a list (X Y FULLY [RTOP RBOT]) where X and Y are the pixel -coordinates relative to the top left corner of the window, and FULLY is t if the -character after POS is fully visible and nil otherwise. If FULLY is nil, -RTOP and RBOT are the number of pixels invisible at the top and bottom row -of the window. */) +return value is a list (X Y PARTIAL) where X and Y are the pixel coordinates +relative to the top left corner of the window. PARTIAL is nil if the character +after POS is fully visible; otherwise it is a cons (RTOP . RBOT) where RTOP +and RBOT are the number of pixels invisible at the top and bottom of the row. */) (pos, window, partially) Lisp_Object pos, window, partially; { @@ -376,12 +375,10 @@ of the window. */) if (!NILP (in_window) && !NILP (partially)) in_window = Fcons (make_number (x), Fcons (make_number (y), - Fcons (fully_p ? Qt : Qnil, - (fully_p - ? Qnil - : Fcons (make_number (rtop), - Fcons (make_number (rbot), - Qnil)))))); + Fcons ((fully_p ? Qnil + : Fcons (make_number (rtop), + make_number (rbot))), + Qnil))); return in_window; } @@ -4578,7 +4575,7 @@ window_scroll_pixel_based (window, n, whole, noerror) } else if (auto_window_vscroll_p) { - if (NILP (XCAR (XCDR (XCDR (tem))))) + if (tem = XCAR (XCDR (XCDR (tem))), CONSP (tem)) { int px; int dy = WINDOW_FRAME_LINE_HEIGHT (w); @@ -4586,13 +4583,13 @@ window_scroll_pixel_based (window, n, whole, noerror) dy = window_box_height (w) - next_screen_context_lines * dy; dy *= n; - if (n < 0 && (px = XINT (Fnth (make_number (3), tem))) > 0) + if (n < 0 && (px = XINT (XCAR (tem))) > 0) { px = max (0, -w->vscroll - min (px, -dy)); Fset_window_vscroll (window, make_number (px), Qt); return; } - if (n > 0 && (px = XINT (Fnth (make_number (4), tem))) > 0) + if (n > 0 && (px = XINT (XCDR (tem))) > 0) { px = max (0, -w->vscroll + min (px, dy)); Fset_window_vscroll (window, make_number (px), Qt); From 257a694c19b6d1b3369820a9c06a807f52087026 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 13:28:16 +0000 Subject: [PATCH 386/560] * simple.el (line-move): Adapt to new return value from pos-visible-in-window-p. --- lisp/simple.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 02ce351c50b..3db2a418f3b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3183,17 +3183,17 @@ Outline mode sets this." (defun line-move (arg &optional noerror to-end) (if auto-window-vscroll (let ((forward (> arg 0)) - (pvis (pos-visible-in-window-p (point) nil t))) - (if (and pvis (null (nth 2 pvis)) - (> (nth (if forward 4 3) pvis) 0)) + (part (nth 2 (pos-visible-in-window-p (point) nil t)))) + (if (and (consp part) + (> (setq part (if forward (cdr part) (car part))) 0)) (set-window-vscroll nil (if forward (+ (window-vscroll nil t) - (min (nth 4 pvis) + (min part (* (frame-char-height) arg))) (max 0 (- (window-vscroll nil t) - (min (nth 3 pvis) + (min part (* (frame-char-height) (- arg)))))) t) (set-window-vscroll nil 0) From 41ad5140cdaa904f489bab8acdb4520d00c8992a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 13:30:22 +0000 Subject: [PATCH 387/560] (Window Start): Fix `pos-visible-in-window-p' return value. Third element FULLY replaced by PARTIAL which specifies number of invisible pixels if row is only partially visible. (Textual Scrolling): Mention auto-window-vscroll. (Vertical Scrolling): New defvar auto-window-vscroll. --- lispref/windows.texi | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/lispref/windows.texi b/lispref/windows.texi index 636d1d745cc..5041fb5b2df 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi @@ -1345,10 +1345,12 @@ non-@code{nil} anyway. @xref{Horizontal Scrolling}. If @var{position} is visible, @code{pos-visible-in-window-p} returns @code{t} if @var{partially} is @code{nil}; if @var{partially} is non-@code{nil}, it returns a list of the form @code{(@var{x} @var{y} -@var{fully})}, where @var{x} and @var{y} are the pixel coordinates -relative to the top left corner of the window, and @var{fully} is -@code{t} if the character after @var{position} is fully visible and -@code{nil} otherwise. +@var{partial})}, where @var{x} and @var{y} are the pixel coordinates +relative to the top left corner of the window, and @var{partial} is +@code{nil} if the character after @var{position} is fully visible; +otherwise it is a cons @code{(@var{rtop} . @var{rbot})} where the +@var{rtop} and @var{rbot} specify the number of invisible pixels at +the top and bottom of the row at @var{position}. Here is an example: @@ -1397,6 +1399,12 @@ names that fit the user's point of view. buffer is different from the buffer that is displayed in the selected window. @xref{Current Buffer}. + If the window contains a row which is taller than the height of the +window (for example in the presense of a large image), the scroll +functions will adjust the window vscroll to scroll the partially +visible row. To disable this feature, Lisp code may bind the variable +`auto-window-vscroll' to @code{nil} (@pxref{Vertical Scrolling}). + @deffn Command scroll-up &optional count This function scrolls the text in the selected window upward @var{count} lines. If @var{count} is negative, scrolling is actually @@ -1622,6 +1630,13 @@ If @var{pixels-p} is non-@code{nil}, @var{lines} specifies a number of pixels. In this case, the return value is @var{lines}. @end defun +@defvar auto-window-vscroll +If this variable is non-@code{nil}, the line-move, scroll-up, and +scroll-down functions will automatically modify the window vscroll to +scroll through display rows that are taller that the height of the +window, for example in the presense of large images. +@end defvar + @node Horizontal Scrolling @section Horizontal Scrolling @cindex horizontal scrolling From 8f958b40ccfca8cf0c090849d75c4f42e126706a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 23 Jan 2005 13:31:53 +0000 Subject: [PATCH 388/560] *** empty log message *** --- etc/NEWS | 7 +++++++ lisp/ChangeLog | 3 +++ lispref/ChangeLog | 8 ++++++++ src/ChangeLog | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index d486365dd91..299ac3d9a04 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2487,6 +2487,13 @@ the command `undefined'. (In earlier Emacs versions, it used * Lisp Changes in Emacs 21.4 ++++ +** The line-move, scroll-up, and scroll-down functions will now +modify the window vscroll to scroll through display rows that are +taller that the height of the window, for example in the presense of +large images. To disable this feature, Lisp code may bind the new +variable `auto-window-vscroll' to nil. + +++ ** If a buffer sets buffer-save-without-query to non-nil, save-some-buffers will always save that buffer without asking diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e51cba7485b..04af671bb87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-01-23 Kim F. Storm + * simple.el (line-move): Adapt to new return value from + pos-visible-in-window-p. + * simple.el (line-move): Fix last change. Check partial visibility at point rather than at window-start. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 12b67ac30b3..c871d5aad87 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,11 @@ +2005-01-23 Kim F. Storm + + * windows.texi (Window Start): Fix `pos-visible-in-window-p' + return value. Third element FULLY replaced by PARTIAL which + specifies number of invisible pixels if row is only partially visible. + (Textual Scrolling): Mention auto-window-vscroll. + (Vertical Scrolling): New defvar auto-window-vscroll. + 2005-01-16 Luc Teirlinck * keymaps.texi (Changing Key Bindings): `suppress-keymap' now uses diff --git a/src/ChangeLog b/src/ChangeLog index 10f2930b7de..536195baa0a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,7 @@ 2005-01-23 Kim F. Storm * window.c (Fpos_visible_in_window_p): Simplify return value for - for partially visible rows. + partially visible rows. (window_scroll_pixel_based): Adapt to that change. * window.c (window_scroll_pixel_based): Force moving to next line From bd6a8278adac29297a853a8f8d4651dd1f715932 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 23 Jan 2005 16:56:11 +0000 Subject: [PATCH 389/560] Simplify code. --- lisp/ChangeLog | 4 ++ lisp/term/w32-win.el | 93 +++++++++++++------------------------------- 2 files changed, 31 insertions(+), 66 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04af671bb87..4575a3dc301 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-23 Stefan Monnier + + * term/w32-win.el: Simplify code. + 2005-01-23 Kim F. Storm * simple.el (line-move): Adapt to new return value from diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index e49f3ddb2e6..69e5c0e793b 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -1,6 +1,6 @@ ;;; w32-win.el --- parse switches controlling interface with W32 window system -;; Copyright (C) 1993, 1994, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Kevin Gallo ;; Keywords: terminals @@ -139,50 +139,26 @@ the last file dropped is selected." "Handle SWITCH of the form \"-switch value\" or \"-switch\"." (let ((aelt (assoc switch command-line-x-option-alist))) (if aelt - (let ((param (nth 3 aelt)) - (value (nth 4 aelt))) - (if value - (setq default-frame-alist - (cons (cons param value) - default-frame-alist)) - (setq default-frame-alist - (cons (cons param - (car x-invocation-args)) - default-frame-alist) - x-invocation-args (cdr x-invocation-args))))))) + (push (cons (nth 3 aelt) (or (nth 4 aelt) (pop x-invocation-args))) + default-frame-alist)))) (defun x-handle-numeric-switch (switch) "Handle SWITCH of the form \"-switch n\"." (let ((aelt (assoc switch command-line-x-option-alist))) (if aelt - (let ((param (nth 3 aelt))) - (setq default-frame-alist - (cons (cons param - (string-to-int (car x-invocation-args))) - default-frame-alist) - x-invocation-args - (cdr x-invocation-args)))))) + (push (cons (nth 3 aelt) (string-to-int (pop x-invocation-args))) + default-frame-alist)))) ;; Handle options that apply to initial frame only (defun x-handle-initial-switch (switch) (let ((aelt (assoc switch command-line-x-option-alist))) (if aelt - (let ((param (nth 3 aelt)) - (value (nth 4 aelt))) - (if value - (setq initial-frame-alist - (cons (cons param value) - initial-frame-alist)) - (setq initial-frame-alist - (cons (cons param - (car x-invocation-args)) - initial-frame-alist) - x-invocation-args (cdr x-invocation-args))))))) + (push (cons (nth 3 aelt) (or (nth 4 aelt) (pop x-invocation-args))) + initial-frame-alist)))) (defun x-handle-iconic (switch) "Make \"-iconic\" SWITCH apply only to the initial frame." - (setq initial-frame-alist - (cons '(visibility . icon) initial-frame-alist))) + (push '(visibility . icon) initial-frame-alist)) (defun x-handle-xrm-switch (switch) "Handle the \"-xrm\" SWITCH." @@ -226,18 +202,15 @@ the last file dropped is selected." ;; to the option's operand; set the name of the initial frame, too. (or (consp x-invocation-args) (error "%s: missing argument to `%s' option" (invocation-name) switch)) - (setq x-resource-name (car x-invocation-args) - x-invocation-args (cdr x-invocation-args)) - (setq initial-frame-alist (cons (cons 'name x-resource-name) - initial-frame-alist))) + (setq x-resource-name (pop x-invocation-args)) + (push (cons 'name x-resource-name) initial-frame-alist)) (defvar x-display-name nil "The display name specifying server and frame.") (defun x-handle-display (switch) "Handle the \"-display\" SWITCH." - (setq x-display-name (car x-invocation-args) - x-invocation-args (cdr x-invocation-args))) + (setq x-display-name (pop x-invocation-args))) (defun x-handle-args (args) "Process the X-related command line options in ARGS. @@ -281,7 +254,7 @@ This returns ARGS with the arguments that have been processed removed." (cons argval x-invocation-args))) (funcall handler this-switch)) (funcall handler this-switch)) - (setq args (cons orig-this-switch args))))) + (push orig-this-switch args)))) (nconc (nreverse args) x-invocation-args)) ;; @@ -1046,15 +1019,10 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") (defun xw-defined-colors (&optional frame) "Internal function called by `defined-colors', which see." (or frame (setq frame (selected-frame))) - (let* ((color-map-colors (mapcar (lambda (clr) (car clr)) w32-color-map)) - (all-colors (or color-map-colors x-colors)) - (this-color nil) - (defined-colors nil)) - (while all-colors - (setq this-color (car all-colors) - all-colors (cdr all-colors)) + (let ((defined-colors nil)) + (dolist (this-color (or (mapcar 'car w32-color-map) x-colors)) (and (color-supported-p this-color frame t) - (setq defined-colors (cons this-color defined-colors)))) + (push this-color defined-colors))) defined-colors)) @@ -1076,13 +1044,10 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp") ;;; Make sure we have a valid resource name. (or (stringp x-resource-name) - (let (i) - (setq x-resource-name (invocation-name)) - - ;; Change any . or * characters in x-resource-name to hyphens, - ;; so as not to choke when we use it in X resource queries. - (while (setq i (string-match "[.*]" x-resource-name)) - (aset x-resource-name i ?-)))) + (setq x-resource-name + ;; Change any . or * characters in x-resource-name to hyphens, + ;; so as not to choke when we use it in X resource queries. + (replace-regexp-in-string "[.*]" "-" (invocation-name)))) ;; For the benefit of older Emacses (19.27 and earlier) that are sharing ;; the same lisp directory, don't pass the third argument unless we seem @@ -1166,21 +1131,17 @@ See the documentation of `create-fontset-from-fontset-spec for the format.") (setq initial-frame-alist (append initial-frame-alist parsed)) ;; The size parms apply to all frames. (if (assq 'height parsed) - (setq default-frame-alist - (cons (cons 'height (cdr (assq 'height parsed))) - default-frame-alist))) + (push (cons 'height (cdr (assq 'height parsed))) + default-frame-alist)) (if (assq 'width parsed) - (setq default-frame-alist - (cons (cons 'width (cdr (assq 'width parsed))) - default-frame-alist)))))) + (push (cons 'width (cdr (assq 'width parsed))) + default-frame-alist))))) ;; Check the reverseVideo resource. (let ((case-fold-search t)) (let ((rv (x-get-resource "reverseVideo" "ReverseVideo"))) - (if (and rv - (string-match "^\\(true\\|yes\\|on\\)$" rv)) - (setq default-frame-alist - (cons '(reverse . t) default-frame-alist))))) + (if (and rv (string-match "^\\(true\\|yes\\|on\\)$" rv)) + (push '(reverse . t) default-frame-alist)))) (defun x-win-suspend-error () "Report an error when a suspend is attempted." @@ -1244,7 +1205,7 @@ font dialog to get the matching FONTS. Otherwise use a pop-up menu (and chosen-font (list chosen-font))) (x-popup-menu last-nonmenu-event - ;; Append list of fontsets currently defined. + ;; Append list of fontsets currently defined. ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles (if (fboundp 'new-fontset) (append w32-fixed-font-alist (list (generate-fontset-menu))))))) @@ -1268,5 +1229,5 @@ font dialog to get the matching FONTS. Otherwise use a pop-up menu (tiff "libtiff3.dll" "libtiff.dll") (gif "libungif.dll"))) -;;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166 +;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166 ;;; w32-win.el ends here From 9bb99df69185f6c105ee3a214e606f68a3483e5e Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 23 Jan 2005 20:44:12 +0000 Subject: [PATCH 390/560] (insert-directory): Take care of empty directory, listed without -a switch. --- lisp/ChangeLog | 5 ++++ lisp/files.el | 77 ++++++++++++++++++++++++++++---------------------- 2 files changed, 48 insertions(+), 34 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4575a3dc301..f0c3b802ac1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-23 Luc Teirlinck + + * files.el (insert-directory): Take care of empty directory, + listed without -a switch. + 2005-01-23 Stefan Monnier * term/w32-win.el: Simplify code. diff --git a/lisp/files.el b/lisp/files.el index cdaa7a5adb8..841332b957a 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4550,45 +4550,54 @@ normally equivalent short `-D' option is just passed on to (when (if (stringp switches) (string-match "--dired\\>" switches) (member "--dired" switches)) + ;; The following overshoots by one line for an empty + ;; directory listed with "--dired", but without "-a" + ;; switch, where the ls output contains a + ;; "//DIRED-OPTIONS//" line, but no "//DIRED//" line. + ;; We take care of that case later. (forward-line -2) (when (looking-at "//SUBDIRED//") (delete-region (point) (progn (forward-line 1) (point))) (forward-line -1)) - (when (looking-at "//DIRED//") - (let ((end (line-end-position)) - (linebeg (point)) - error-lines) - ;; Find all the lines that are error messages, - ;; and record the bounds of each one. - (goto-char beg) - (while (< (point) linebeg) - (or (eql (following-char) ?\s) - (push (list (point) (line-end-position)) error-lines)) - (forward-line 1)) - (setq error-lines (nreverse error-lines)) - ;; Now read the numeric positions of file names. - (goto-char linebeg) - (forward-word 1) - (forward-char 3) - (while (< (point) end) - (let ((start (insert-directory-adj-pos + (if (looking-at "//DIRED//") + (let ((end (line-end-position)) + (linebeg (point)) + error-lines) + ;; Find all the lines that are error messages, + ;; and record the bounds of each one. + (goto-char beg) + (while (< (point) linebeg) + (or (eql (following-char) ?\s) + (push (list (point) (line-end-position)) error-lines)) + (forward-line 1)) + (setq error-lines (nreverse error-lines)) + ;; Now read the numeric positions of file names. + (goto-char linebeg) + (forward-word 1) + (forward-char 3) + (while (< (point) end) + (let ((start (insert-directory-adj-pos + (+ beg (read (current-buffer))) + error-lines)) + (end (insert-directory-adj-pos (+ beg (read (current-buffer))) - error-lines)) - (end (insert-directory-adj-pos - (+ beg (read (current-buffer))) - error-lines))) - (if (memq (char-after end) '(?\n ?\ )) - ;; End is followed by \n or by " -> ". - (put-text-property start end 'dired-filename t) - ;; It seems that we can't trust ls's output as to - ;; byte positions of filenames. - (put-text-property beg (point) 'dired-filename nil) - (end-of-line)))) - (goto-char end) - (beginning-of-line) - (delete-region (point) (progn (forward-line 1) (point)))) - (if (looking-at "//DIRED-OPTIONS//") - (delete-region (point) (progn (forward-line 1) (point)))))) + error-lines))) + (if (memq (char-after end) '(?\n ?\ )) + ;; End is followed by \n or by " -> ". + (put-text-property start end 'dired-filename t) + ;; It seems that we can't trust ls's output as to + ;; byte positions of filenames. + (put-text-property beg (point) 'dired-filename nil) + (end-of-line)))) + (goto-char end) + (beginning-of-line) + (delete-region (point) (progn (forward-line 1) (point)))) + ;; Take care of the case where the ls output contains a + ;; "//DIRED-OPTIONS//"-line, but no "//DIRED//"-line + ;; and we went one line too far back (see above). + (forward-line 1)) + (if (looking-at "//DIRED-OPTIONS//") + (delete-region (point) (progn (forward-line 1) (point))))) ;; Now decode what read if necessary. (let ((coding (or coding-system-for-read From ac94d5f447ce6777f9764942a44ac974a91b4c8f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 23 Jan 2005 20:57:03 +0000 Subject: [PATCH 391/560] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0c3b802ac1..987ac9d0bdc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-24 Nick Roberts + + * progmodes/gdb-ui.el (gdb-goto-breakpoint, gdb-frames-select) + (gdb-threads-select): Change to also accept mouse events. + (gdb-mouse-goto-breakpoint, gdb-frames-mouse-select) + (gdb-threads-mouse-select): Delete. + 2005-01-23 Luc Teirlinck * files.el (insert-directory): Take care of empty directory, From f2fc1724a8569223120333218b2094a7f1114863 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sun, 23 Jan 2005 20:57:41 +0000 Subject: [PATCH 392/560] (gdb-goto-breakpoint, gdb-frames-select) (gdb-threads-select): Change to also accept mouse events. (gdb-mouse-goto-breakpoint, gdb-frames-mouse-select) (gdb-threads-mouse-select): Delete. --- lisp/progmodes/gdb-ui.el | 45 ++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 993d440cd0c..1827589387e 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1243,7 +1243,7 @@ static char *magick[] = { (define-key map "d" 'gdb-delete-breakpoint) (define-key map "q" 'kill-this-buffer) (define-key map "\r" 'gdb-goto-breakpoint) - (define-key map [mouse-2] 'gdb-mouse-goto-breakpoint) + (define-key map [mouse-2] 'gdb-goto-breakpoint) map)) (defun gdb-breakpoints-mode () @@ -1291,9 +1291,10 @@ static char *magick[] = { (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore)) (error "Not recognized as break/watchpoint line"))) -(defun gdb-goto-breakpoint () +(defun gdb-goto-breakpoint (&optional event) "Display the breakpoint location specified at current line." - (interactive) + (interactive (list last-input-event)) + (if event (mouse-set-point event)) (save-excursion (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) @@ -1311,14 +1312,8 @@ static char *magick[] = { (goto-line (string-to-number line)) (set-window-point window (point)))))) (error "Not recognized as break/watchpoint line")))) - -(defun gdb-mouse-goto-breakpoint (event) - "Display the breakpoint location that you click on." - (interactive "e") - (mouse-set-point event) - (gdb-goto-breakpoint)) -;; + ;; Frames buffer. This displays a perpetually correct bactracktrace ;; (from the command `where'). ;; @@ -1372,7 +1367,7 @@ static char *magick[] = { (suppress-keymap map) (define-key map "q" 'kill-this-buffer) (define-key map "\r" 'gdb-frames-select) - (define-key map [mouse-2] 'gdb-frames-mouse-select) + (define-key map [mouse-2] 'gdb-frames-select) map)) (defun gdb-frames-mode () @@ -1396,20 +1391,15 @@ static char *magick[] = { (n (or (and pos (match-string-no-properties 1)) "0"))) n))) -(defun gdb-frames-select () +(defun gdb-frames-select (&optional event) "Select the frame and display the relevant source." - (interactive) + (interactive (list last-input-event)) + (if event (mouse-set-point event)) (gdb-enqueue-input (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n") 'ignore)) (gud-display-frame)) - -(defun gdb-frames-mouse-select (event) - "Select the frame you click on and display the relevant source." - (interactive "e") - (mouse-set-point event) - (gdb-frames-select)) -;; + ;; Threads buffer. This displays a selectable thread list. ;; (gdb-set-buffer-rules 'gdb-threads-buffer @@ -1454,7 +1444,7 @@ static char *magick[] = { (suppress-keymap map) (define-key map "q" 'kill-this-buffer) (define-key map "\r" 'gdb-threads-select) - (define-key map [mouse-2] 'gdb-threads-mouse-select) + (define-key map [mouse-2] 'gdb-threads-select) map)) (defun gdb-threads-mode () @@ -1474,20 +1464,15 @@ static char *magick[] = { (re-search-backward "^\\s-*\\([0-9]*\\)" nil t) (match-string-no-properties 1))) -(defun gdb-threads-select () +(defun gdb-threads-select (&optional event) "Select the thread and display the relevant source." - (interactive) + (interactive (list last-input-event)) + (if event (mouse-set-point event)) (gdb-enqueue-input (list (concat "thread " (gdb-get-thread-number) "\n") 'ignore)) (gud-display-frame)) - -(defun gdb-threads-mouse-select (event) - "Select the thread you click on and display the relevant source." - (interactive "e") - (mouse-set-point event) - (gdb-threads-select)) -;; + ;; Registers buffer. ;; (gdb-set-buffer-rules 'gdb-registers-buffer From 04138be8a5ec7fe737916e171c7e3fec7d23c0e4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 23 Jan 2005 22:01:59 +0000 Subject: [PATCH 393/560] (refill-post-command-function): Add `indent-new-comment-line' and `reindent-then-newline-and-indent' to the list of functions that we should be careful not to undo. (refill-late-fill-paragraph-function): Remove. (refill-saved-state): New var. (refill-mode): Use it to save fill-paragraph-function. Save also the value of auto-fill-function. --- lisp/ChangeLog | 8 ++++ lisp/textmodes/refill.el | 84 ++++++++++++++++++++-------------------- 2 files changed, 50 insertions(+), 42 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 987ac9d0bdc..53f6d66471b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -12,6 +12,14 @@ 2005-01-23 Stefan Monnier + * textmodes/refill.el (refill-post-command-function): + Add `indent-new-comment-line' and `reindent-then-newline-and-indent' + to the list of functions that we should be careful not to undo. + (refill-late-fill-paragraph-function): Remove. + (refill-saved-state): New var. + (refill-mode): Use it to save fill-paragraph-function. + Save also the value of auto-fill-function. + * term/w32-win.el: Simplify code. 2005-01-23 Kim F. Storm diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el index 60b64e9a9f2..9979f4a3e27 100644 --- a/lisp/textmodes/refill.el +++ b/lisp/textmodes/refill.el @@ -1,6 +1,6 @@ ;;; refill.el --- `auto-fill' by refilling paragraphs on changes -;; Copyright (C) 2000, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc. ;; Author: Dave Love ;; Maintainer: Miles Bader @@ -85,6 +85,8 @@ ;;; Code: +(eval-when-compile (require 'cl)) + (defgroup refill nil "Refilling paragraphs on changes." :group 'fill) @@ -169,40 +171,36 @@ complex processing.") "Post-command function to do refilling (conditionally)." (when refill-doit ; there was a change ;; There's probably scope for more special cases here... - (if (eq this-command 'self-insert-command) - ;; Treat self-insertion commands specially, since they don't - ;; always reset `refill-doit' -- for self-insertion commands that - ;; *don't* cause a refill, we want to leave it turned on so that - ;; any subsequent non-modification command will cause a refill. - (when (aref auto-fill-chars (char-before)) - ;; Respond to the same characters as auto-fill (other than - ;; newline, covered below). - (refill-fill-paragraph-at refill-doit) - (setq refill-doit nil)) - (cond - ((or (eq this-command 'quoted-insert) - (eq this-command 'fill-paragraph) - (eq this-command 'fill-region)) - nil) - ((or (eq this-command 'newline) - (eq this-command 'newline-and-indent) - (eq this-command 'open-line)) - ;; Don't zap what was just inserted. - (save-excursion - (beginning-of-line) ; for newline-and-indent - (skip-chars-backward "\n") - (save-restriction - (narrow-to-region (point-min) (point)) - (refill-fill-paragraph-at refill-doit))) - (widen) - (save-excursion - (skip-chars-forward "\n") - (save-restriction - (narrow-to-region (line-beginning-position) (point-max)) - (refill-fill-paragraph-at refill-doit)))) - (t - (refill-fill-paragraph-at refill-doit))) - (setq refill-doit nil)))) + (case this-command + (self-insert-command + ;; Treat self-insertion commands specially, since they don't + ;; always reset `refill-doit' -- for self-insertion commands that + ;; *don't* cause a refill, we want to leave it turned on so that + ;; any subsequent non-modification command will cause a refill. + (when (aref auto-fill-chars (char-before)) + ;; Respond to the same characters as auto-fill (other than + ;; newline, covered below). + (refill-fill-paragraph-at refill-doit) + (setq refill-doit nil))) + ((quoted-insert fill-paragraph fill-region) nil) + ((newline newline-and-indent open-line indent-new-comment-line + reindent-then-newline-and-indent) + ;; Don't zap what was just inserted. + (save-excursion + (beginning-of-line) ; for newline-and-indent + (skip-chars-backward "\n") + (save-restriction + (narrow-to-region (point-min) (point)) + (refill-fill-paragraph-at refill-doit))) + (widen) + (save-excursion + (skip-chars-forward "\n") + (save-restriction + (narrow-to-region (line-beginning-position) (point-max)) + (refill-fill-paragraph-at refill-doit)))) + (t + (refill-fill-paragraph-at refill-doit))) + (setq refill-doit nil))) (defun refill-pre-command-function () "Pre-command function to do refilling (conditionally)." @@ -213,7 +211,7 @@ complex processing.") (refill-fill-paragraph-at refill-doit) (setq refill-doit nil))) -(defvar refill-late-fill-paragraph-function nil) +(defvar refill-saved-state nil) ;;;###autoload (define-minor-mode refill-mode @@ -228,16 +226,18 @@ refilling if they would cause auto-filling." (when refill-ignorable-overlay (delete-overlay refill-ignorable-overlay) (kill-local-variable 'refill-ignorable-overlay)) - (when (local-variable-p 'refill-late-fill-paragraph-function) - (setq fill-paragraph-function refill-late-fill-paragraph-function) - (kill-local-variable 'refill-late-fill-paragraph-function)) + (when (local-variable-p 'refill-saved-state) + (dolist (x refill-saved-state) + (set (make-local-variable (car x)) (cdr x))) + (kill-local-variable 'refill-saved-state)) (if refill-mode (progn (add-hook 'after-change-functions 'refill-after-change-function nil t) (add-hook 'post-command-hook 'refill-post-command-function nil t) (add-hook 'pre-command-hook 'refill-pre-command-function nil t) - (set (make-local-variable 'refill-late-fill-paragraph-function) - fill-paragraph-function) + (set (make-local-variable 'refill-saved-state) + (mapcar (lambda (s) (cons s (symbol-value s))) + '(fill-paragraph-function auto-fill-function))) ;; This provides the test for recursive paragraph filling. (set (make-local-variable 'fill-paragraph-function) 'refill-fill-paragraph) @@ -257,5 +257,5 @@ refilling if they would cause auto-filling." (provide 'refill) -;;; arch-tag: 2c4ce9e8-1daa-4a3b-b6f8-fd6ac5bf6138 +;; arch-tag: 2c4ce9e8-1daa-4a3b-b6f8-fd6ac5bf6138 ;;; refill.el ends here From e01732fa581edf49fa1d7f48dac9708dfcf6f602 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 23 Jan 2005 22:18:26 +0000 Subject: [PATCH 394/560] (Fcurrent_column): Doc fix. --- src/indent.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/indent.c b/src/indent.c index 46ee5ce2bf4..a810dd3189b 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1,6 +1,6 @@ /* Indentation functions. - Copyright (C) 1985,86,87,88,93,94,95,98,2000,01,02,03,2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 2000, 2001, + 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -340,7 +340,9 @@ will have a variable width) Ignores finite width of frame, which means that this function may return values greater than (frame-width). Whether the line is visible (if `selective-display' is t) has no effect; -however, ^M is treated as end of line when `selective-display' is t. */) +however, ^M is treated as end of line when `selective-display' is t. +Text that has an invisible property is considered as having width 0, unless +`buffer-invisibility-spec' specifies that it is replaced by an ellipsis. */) () { Lisp_Object temp; From e1a050dc633d258694f847c7119019ef2ea1eb69 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 24 Jan 2005 00:21:38 +0000 Subject: [PATCH 395/560] (encoded-kbd-iso2022-single-shift): Fix setting of the element of encoded-kbd-iso2022-invocations. --- lisp/ChangeLog | 5 +++++ lisp/international/encoded-kb.el | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53f6d66471b..ebf953caacd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-24 Kenichi Handa + + * international/encoded-kb.el (encoded-kbd-iso2022-single-shift): + Fix setting of the element of encoded-kbd-iso2022-invocations. + 2005-01-24 Nick Roberts * progmodes/gdb-ui.el (gdb-goto-breakpoint, gdb-frames-select) diff --git a/lisp/international/encoded-kb.el b/lisp/international/encoded-kb.el index cba2f0e45b9..aa6d35c340f 100644 --- a/lisp/international/encoded-kb.el +++ b/lisp/international/encoded-kb.el @@ -126,9 +126,7 @@ The following key sequence may cause multilingual text insertion." (defun encoded-kbd-iso2022-single-shift (ignore) (let ((char (encoded-kbd-last-key))) - (aset encoded-kbd-iso2022-invocations 2 - (aref encoded-kbd-iso2022-designations - (if (= char ?\216) 2 3)))) + (aset encoded-kbd-iso2022-invocations 2 (if (= char ?\216) 2 3))) "") (defun encoded-kbd-self-insert-iso2022-7bit (ignore) From 4383585418d7d6675aef3fbab2a82fe2007f5476 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 24 Jan 2005 12:39:14 +0000 Subject: [PATCH 396/560] Update AUCTeX version info. --- man/ChangeLog | 4 ++++ man/faq.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/man/ChangeLog b/man/ChangeLog index 1eb82ac520f..63e3591265e 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-24 David Kastrup + + * faq.texi: Update AUCTeX version info. + 2005-01-16 Xavier Maillard (tiny change) * gnus-faq.texi ([4.1]): Typo. diff --git a/man/faq.texi b/man/faq.texi index b2a8b40155f..061441fe994 100644 --- a/man/faq.texi +++ b/man/faq.texi @@ -4000,7 +4000,7 @@ User Manual}, and @email{dak@@gnu.org, David Kastrup} @item Latest version -11.52 +11.54 @item Distribution @uref{ftp://ftp.gnu.org/pub/gnu/auctex/} From f2417699a5b06e972e5f2cedd05d756c38b0841f Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 24 Jan 2005 13:17:37 +0000 Subject: [PATCH 397/560] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 536195baa0a..3dc45c96ef5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-24 Kim F. Storm + + * xdisp.c (redisplay_window): Only try to make cursor line fully + visible once (to avoid redisplay loop). + 2005-01-23 Kim F. Storm * window.c (Fpos_visible_in_window_p): Simplify return value for From 6f67f013b6238a7c0b9a6904eea8cd912aa62d2e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 24 Jan 2005 13:22:07 +0000 Subject: [PATCH 398/560] (redisplay_window): Only try to make cursor line fully visible once (to avoid redisplay loop). --- src/ChangeLog | 5 +++++ src/xdisp.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3dc45c96ef5..f2678e68ef5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2005-01-24 Kim F. Storm + * window.c (window_scroll_pixel_based): Fix scrolling in the wrong + direction if window height was smaller than next-screen-context-lines. + Now always scroll at least one line in the requested direction. + Ensure that we actually do scroll backwards when requested to do so. + * xdisp.c (redisplay_window): Only try to make cursor line fully visible once (to avoid redisplay loop). diff --git a/src/xdisp.c b/src/xdisp.c index f1877c494cb..afcc4844ab2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -12231,6 +12231,8 @@ redisplay_window (window, just_this_one_p) /* If centering point failed to make the whole line visible, put point at the top instead. That has to make the whole line visible, if it can be done. */ + if (centering_position == 0) + goto done; clear_glyph_matrix (w->desired_matrix); centering_position = 0; goto point_at_top; From e856c2162b0b024acf8dd316c5e47b3f938a0fb1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 24 Jan 2005 13:22:29 +0000 Subject: [PATCH 399/560] (window_scroll_pixel_based): Fix scrolling in the wrong direction if window height was smaller than next-screen-context-lines. Now always scroll at least one line in the requested direction. Ensure that we actually do scroll backwards when requested to do so. --- src/window.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/window.c b/src/window.c index bdc105da3ed..07b197cef75 100644 --- a/src/window.c +++ b/src/window.c @@ -4580,7 +4580,9 @@ window_scroll_pixel_based (window, n, whole, noerror) int px; int dy = WINDOW_FRAME_LINE_HEIGHT (w); if (whole) - dy = window_box_height (w) - next_screen_context_lines * dy; + dy = max ((window_box_height (w) + - next_screen_context_lines * dy), + dy); dy *= n; if (n < 0 && (px = XINT (XCAR (tem))) > 0) @@ -4615,18 +4617,26 @@ window_scroll_pixel_based (window, n, whole, noerror) start_display (&it, w, start); if (whole) { - int screen_full = (window_box_height (w) - - next_screen_context_lines * FRAME_LINE_HEIGHT (it.f)); - int dy = n * screen_full; + int start_pos = IT_CHARPOS (it); + int dy = WINDOW_FRAME_LINE_HEIGHT (w); + dy = max ((window_box_height (w) + - next_screen_context_lines * dy), + dy) * n; /* Note that move_it_vertically always moves the iterator to the start of a line. So, if the last line doesn't have a newline, we would end up at the start of the line ending at ZV. */ if (dy <= 0) - move_it_vertically_backward (&it, -dy); + { + move_it_vertically_backward (&it, -dy); + /* Ensure we actually does move, e.g. in case we are currently + looking at an image that is taller that the window height. */ + while (start_pos == IT_CHARPOS (it) + && start_pos > BEGV) + move_it_by_lines (&it, -1, 1); + } else if (dy > 0) { - int start_pos = IT_CHARPOS (it); move_it_to (&it, ZV, -1, it.current_y + dy, -1, MOVE_TO_POS | MOVE_TO_Y); /* Ensure we actually does move, e.g. in case we are currently From 8c2da0fa6ca49777fdcc7266cbdfe7d0e0a024d0 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Mon, 24 Jan 2005 17:59:36 +0000 Subject: [PATCH 400/560] * dispextern.h (struct glyph_string): New members clip_head and clip_tail. * xdisp.c (get_glyph_string_clip_rect): Restrict horizontal clip region to the area between clip_head and clip_tail. (draw_glyphs): Record the area that need to be actually redrawn to the new variables clip_head and clip_tail when there are overhangs. Set values of these variables to the corresponding members in struct glyph_string. Refine x coordinates for * macgui.h (STORE_XCHARSETSTRUCT): New macro. * macterm.c (mac_compute_glyph_string_overhangs): Implement with QDTextBounds. (x_draw_glyph_string): Don't fill the background of the successor of a glyph with a right overhang if the successor will draw a cursor. (XLoadQueryFont): Obtain font metrics using QDTextBounds. (x_redisplay_interface): Add entry for compute_glyph_string_overhangs. --- src/dispextern.h | 5 +++ src/macgui.h | 7 ++++ src/macterm.c | 105 ++++++++++++++++++++++++++++++++--------------- src/xdisp.c | 34 ++++++++++++++- 4 files changed, 117 insertions(+), 34 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index 53ae50f3c2a..89a8fe39aeb 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1193,6 +1193,11 @@ struct glyph_string /* Slice */ struct glyph_slice slice; + /* Non-null means the horizontal clipping region starts from the + left edge of *clip_head, and ends with the right edge of + *clip_tail, not including their overhangs. */ + struct glyph_string *clip_head, *clip_tail; + struct glyph_string *next, *prev; }; diff --git a/src/macgui.h b/src/macgui.h index 1e1447dfaa8..cb157bb8c25 100644 --- a/src/macgui.h +++ b/src/macgui.h @@ -92,6 +92,13 @@ typedef struct _XCharStruct int descent; } XCharStruct; +#define STORE_XCHARSTRUCT(xcs, w, bds) \ + ((xcs).width = (w), \ + (xcs).lbearing = (bds).left, \ + (xcs).rbearing = (bds).right, \ + (xcs).ascent = -(bds).top, \ + (xcs).descent = (bds).bottom) + struct MacFontStruct { char *fontname; diff --git a/src/macterm.c b/src/macterm.c index 24aaa52947b..60eee6a4a84 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -1991,20 +1991,33 @@ static void mac_compute_glyph_string_overhangs (s) struct glyph_string *s; { -#if 0 - /* MAC_TODO: XTextExtents16 does nothing yet... */ + Rect r; + MacFontStruct *font = s->font; - if (s->cmp == NULL - && s->first_glyph->type == CHAR_GLYPH) + TextFont (font->mac_fontnum); + TextSize (font->mac_fontsize); + TextFace (font->mac_fontface); + + if (s->two_byte_p) + QDTextBounds (s->nchars * 2, (char *)s->char2b, &r); + else { - XCharStruct cs; - int direction, font_ascent, font_descent; - XTextExtents16 (s->font, s->char2b, s->nchars, &direction, - &font_ascent, &font_descent, &cs); - s->right_overhang = cs.rbearing > cs.width ? cs.rbearing - cs.width : 0; - s->left_overhang = cs.lbearing < 0 ? -cs.lbearing : 0; + int i; + char *buf = xmalloc (s->nchars); + + if (buf == NULL) + SetRect (&r, 0, 0, 0, 0); + else + { + for (i = 0; i < s->nchars; ++i) + buf[i] = s->char2b[i].byte2; + QDTextBounds (s->nchars, buf, &r); + xfree (buf); + } } -#endif + + s->right_overhang = r.right > s->width ? r.right - s->width : 0; + s->left_overhang = r.left < 0 ? -r.left : 0; } @@ -3072,10 +3085,12 @@ x_draw_glyph_string (s) { int relief_drawn_p = 0; - /* If S draws into the background of its successor, draw the - background of the successor first so that S can draw into it. - This makes S->next use XDrawString instead of XDrawImageString. */ - if (s->next && s->right_overhang && !s->for_overlaps_p) + /* If S draws into the background of its successor that does not + draw a cursor, draw the background of the successor first so that + S can draw into it. This makes S->next use XDrawString instead + of XDrawImageString. */ + if (s->next && s->right_overhang && !s->for_overlaps_p + && s->next->hl != DRAW_CURSOR) { xassert (s->next->img == NULL); x_set_glyph_string_gc (s->next); @@ -6756,30 +6771,40 @@ XLoadQueryFont (Display *dpy, char *fontname) returns 15 for 12-point Monaco! */ char_width = CharWidth ('m'); - font->max_bounds.rbearing = char_width; - font->max_bounds.lbearing = 0; - font->max_bounds.width = char_width; - font->max_bounds.ascent = the_fontinfo.ascent; - font->max_bounds.descent = the_fontinfo.descent; + if (is_two_byte_font) + { + font->per_char = NULL; - font->min_bounds = font->max_bounds; + if (fontface & italic) + font->max_bounds.rbearing = char_width + 1; + else + font->max_bounds.rbearing = char_width; + font->max_bounds.lbearing = 0; + font->max_bounds.width = char_width; + font->max_bounds.ascent = the_fontinfo.ascent; + font->max_bounds.descent = the_fontinfo.descent; - if (is_two_byte_font || CharWidth ('m') == CharWidth ('i')) - font->per_char = NULL; + font->min_bounds = font->max_bounds; + } else { font->per_char = (XCharStruct *) xmalloc (sizeof (XCharStruct) * (0xff - 0x20 + 1)); { - int c, min_width, max_width; + int c, min_width, max_width; + Rect char_bounds, min_bounds, max_bounds; + char ch; min_width = max_width = char_width; + SetRect (&min_bounds, -32767, -32767, 32767, 32767); + SetRect (&max_bounds, 0, 0, 0, 0); for (c = 0x20; c <= 0xff; c++) { - font->per_char[c - 0x20] = font->max_bounds; - char_width = CharWidth (c); - font->per_char[c - 0x20].width = char_width; - font->per_char[c - 0x20].rbearing = char_width; + ch = c; + char_width = CharWidth (ch); + QDTextBounds (1, &ch, &char_bounds); + STORE_XCHARSTRUCT (font->per_char[c - 0x20], + char_width, char_bounds); /* Some Japanese fonts (in SJIS encoding) return 0 as the character width of 0x7f. */ if (char_width > 0) @@ -6787,9 +6812,25 @@ XLoadQueryFont (Display *dpy, char *fontname) min_width = min (min_width, char_width); max_width = max (max_width, char_width); } - } - font->min_bounds.width = min_width; - font->max_bounds.width = max_width; + if (!EmptyRect (&char_bounds)) + { + SetRect (&min_bounds, + max (min_bounds.left, char_bounds.left), + max (min_bounds.top, char_bounds.top), + min (min_bounds.right, char_bounds.right), + min (min_bounds.bottom, char_bounds.bottom)); + UnionRect (&max_bounds, &char_bounds, &max_bounds); + } + } + STORE_XCHARSTRUCT (font->min_bounds, min_width, min_bounds); + STORE_XCHARSTRUCT (font->max_bounds, max_width, max_bounds); + if (min_width == max_width + && max_bounds.left >= 0 && max_bounds.right <= max_width) + { + /* Fixed width and no overhangs. */ + xfree (font->per_char); + font->per_char = NULL; + } } } @@ -9693,7 +9734,7 @@ static struct redisplay_interface x_redisplay_interface = 0, /* destroy_fringe_bitmap */ mac_per_char_metric, mac_encode_char, - NULL, /* mac_compute_glyph_string_overhangs */ + mac_compute_glyph_string_overhangs, x_draw_glyph_string, mac_define_frame_cursor, mac_clear_frame_area, diff --git a/src/xdisp.c b/src/xdisp.c index afcc4844ab2..5f09fcc68b6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1786,6 +1786,24 @@ get_glyph_string_clip_rect (s, nr) r.height = s->row->visible_height; } + if (s->clip_head) + if (r.x < s->clip_head->x) + { + if (r.width >= s->clip_head->x - r.x) + r.width -= s->clip_head->x - r.x; + else + r.width = 0; + r.x = s->clip_head->x; + } + if (s->clip_tail) + if (r.x + r.width > s->clip_tail->x + s->clip_tail->background_width) + { + if (s->clip_tail->x + s->clip_tail->background_width >= r.x) + r.width = s->clip_tail->x + s->clip_tail->background_width - r.x; + else + r.width = 0; + } + /* If S draws overlapping rows, it's sufficient to use the top and bottom of the window for clipping because this glyph string intentionally draws over other lines. */ @@ -18233,6 +18251,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p) { struct glyph_string *head, *tail; struct glyph_string *s; + struct glyph_string *clip_head = NULL, *clip_tail = NULL; int last_x, area_width; int x_reached; int i, j; @@ -18301,6 +18320,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p) start = i; compute_overhangs_and_x (t, head->x, 1); prepend_glyph_string_lists (&head, &tail, h, t); + clip_head = head; } /* Prepend glyph strings for glyphs in front of the first glyph @@ -18313,6 +18333,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p) i = left_overwriting (head); if (i >= 0) { + clip_head = head; BUILD_GLYPH_STRINGS (i, start, h, t, DRAW_NORMAL_TEXT, dummy_x, last_x); for (s = h; s; s = s->next) @@ -18332,6 +18353,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p) DRAW_NORMAL_TEXT, x, last_x); compute_overhangs_and_x (h, tail->x + tail->width, 0); append_glyph_string_lists (&head, &tail, h, t); + clip_tail = tail; } /* Append glyph strings for glyphs following the last glyph @@ -18342,6 +18364,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p) i = right_overwriting (tail); if (i >= 0) { + clip_tail = tail; BUILD_GLYPH_STRINGS (end, i, h, t, DRAW_NORMAL_TEXT, x, last_x); for (s = h; s; s = s->next) @@ -18349,6 +18372,12 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p) compute_overhangs_and_x (h, tail->x + tail->width, 0); append_glyph_string_lists (&head, &tail, h, t); } + if (clip_head || clip_tail) + for (s = head; s; s = s->next) + { + s->clip_head = clip_head; + s->clip_tail = clip_tail; + } } /* Draw all strings. */ @@ -18362,8 +18391,9 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps_p) completely. */ && !overlaps_p) { - int x0 = head ? head->x : x; - int x1 = tail ? tail->x + tail->background_width : x; + int x0 = clip_head ? clip_head->x : (head ? head->x : x); + int x1 = (clip_tail ? clip_tail->x + clip_tail->background_width + : (tail ? tail->x + tail->background_width : x)); int text_left = window_box_left (w, TEXT_AREA); x0 -= text_left; From 4d904fa0b23037b001f9349a467845c85efb33ba Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Mon, 24 Jan 2005 18:00:43 +0000 Subject: [PATCH 401/560] * dispextern.h (struct glyph_string): New members clip_head and clip_tail. * xdisp.c (get_glyph_string_clip_rect): Restrict horizontal clip region to the area between clip_head and clip_tail. (draw_glyphs): Record the area that need to be actually redrawn to the new variables clip_head and clip_tail when there are overhangs. Set values of these variables to the corresponding members in struct glyph_string. Refine x coordinates for notice_overwritten_cursor using clip_head and clip_tail. * macgui.h (STORE_XCHARSETSTRUCT): New macro. * macterm.c (mac_compute_glyph_string_overhangs): Implement with QDTextBounds. (x_draw_glyph_string): Don't fill the background of the successor of a glyph with a right overhang if the successor will draw a cursor. (XLoadQueryFont): Obtain font metrics using QDTextBounds. (x_redisplay_interface): Add entry for compute_glyph_string_overhangs. --- src/ChangeLog | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index f2678e68ef5..de7978371b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,27 @@ +2005-01-24 YAMAMOTO Mitsuharu + + * dispextern.h (struct glyph_string): New members clip_head and + clip_tail. + + * xdisp.c (get_glyph_string_clip_rect): Restrict horizontal clip + region to the area between clip_head and clip_tail. + (draw_glyphs): Record the area that need to be actually redrawn to + the new variables clip_head and clip_tail when there are + overhangs. Set values of these variables to the corresponding + members in struct glyph_string. Refine x coordinates for + notice_overwritten_cursor using clip_head and clip_tail. + + * macgui.h (STORE_XCHARSETSTRUCT): New macro. + + * macterm.c (mac_compute_glyph_string_overhangs): Implement with + QDTextBounds. + (x_draw_glyph_string): Don't fill the background of the successor + of a glyph with a right overhang if the successor will draw a + cursor. + (XLoadQueryFont): Obtain font metrics using QDTextBounds. + (x_redisplay_interface): Add entry for + compute_glyph_string_overhangs. + 2005-01-24 Kim F. Storm * window.c (window_scroll_pixel_based): Fix scrolling in the wrong From dacb2f7013c28d5265e079a1f4c0e6536a4699ca Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 24 Jan 2005 18:23:33 +0000 Subject: [PATCH 402/560] (calc-declare-variable): Use calc-var-name to display variable name. --- lisp/ChangeLog | 5 +++++ lisp/calc/calc-store.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ebf953caacd..902f9da4e1c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-24 Jay Belanger + + * calc/calc-store.el (calc-declare-variable): Use calc-var-name to + display variable name. + 2005-01-24 Kenichi Handa * international/encoded-kb.el (encoded-kbd-iso2022-single-shift): diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index b2cef4936a0..52f0cc0272d 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -482,7 +482,7 @@ (setq rp nil))) (not rp))))) (calc-unread-command ?\C-a) - (setq decl (read-string (format "Declare: %s to be: " var) + (setq decl (read-string (format "Declare: %s to be: " (calc-var-name var)) (and rp (math-format-flat-expr (nth 2 (car dp)) 0)))) (setq decl (and (string-match "[^ \t]" decl) From 6adb6f01302f35954f3b50bbf8ae8d94af268792 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 24 Jan 2005 20:44:39 +0000 Subject: [PATCH 403/560] *** empty log message *** --- src/ChangeLog | 15 +++++++++------ src/xdisp.c | 6 +++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index de7978371b5..4fa9eb8adab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,13 @@ +2005-01-24 Kim F. Storm + + * xdisp.c (move_it_by_lines): If we move forward after going too + far back, cancel move if end position is same as start position. + 2005-01-24 YAMAMOTO Mitsuharu * dispextern.h (struct glyph_string): New members clip_head and clip_tail. - + * xdisp.c (get_glyph_string_clip_rect): Restrict horizontal clip region to the area between clip_head and clip_tail. (draw_glyphs): Record the area that need to be actually redrawn to @@ -10,17 +15,15 @@ overhangs. Set values of these variables to the corresponding members in struct glyph_string. Refine x coordinates for notice_overwritten_cursor using clip_head and clip_tail. - + * macgui.h (STORE_XCHARSETSTRUCT): New macro. * macterm.c (mac_compute_glyph_string_overhangs): Implement with QDTextBounds. (x_draw_glyph_string): Don't fill the background of the successor - of a glyph with a right overhang if the successor will draw a - cursor. + of a glyph with a right overhang if the successor will draw a cursor. (XLoadQueryFont): Obtain font metrics using QDTextBounds. - (x_redisplay_interface): Add entry for - compute_glyph_string_overhangs. + (x_redisplay_interface): Add entry for compute_glyph_string_overhangs. 2005-01-24 Kim F. Storm diff --git a/src/xdisp.c b/src/xdisp.c index 5f09fcc68b6..d7c32be09ea 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6413,11 +6413,15 @@ move_it_by_lines (it, dvpos, need_y_p) it->current_y -= it2.current_y; it->current_x = it->hpos = 0; - /* If we moved too far, move IT some lines forward. */ + /* If we moved too far back, move IT some lines forward. */ if (it2.vpos > -dvpos) { int delta = it2.vpos + dvpos; + it2 = *it; move_it_to (it, -1, -1, -1, it->vpos + delta, MOVE_TO_VPOS); + /* Move back again if we got too far ahead. */ + if (IT_CHARPOS (*it) >= start_charpos) + *it = it2; } } } From 2fc3738c631acb7016ddd98a81a6b11e6edb3405 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 25 Jan 2005 00:38:46 +0000 Subject: [PATCH 404/560] (ispell-dictionary-alist-4): Rewrite the CASECHARS and NOT-CASECHARS regular expressions of the "nederlands" and "nederlands8" dictionaries to prevent a "Range striding over charsets" error. --- lisp/ChangeLog | 7 +++++++ lisp/textmodes/ispell.el | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 902f9da4e1c..46e67c9725c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-24 Lute Kamstra + + * textmodes/ispell.el (ispell-dictionary-alist-4): Rewrite the + CASECHARS and NOT-CASECHARS regular expressions of the + "nederlands" and "nederlands8" dictionaries to prevent a "Range + striding over charsets" error. + 2005-01-24 Jay Belanger * calc/calc-store.el (calc-declare-variable): Use calc-var-name to diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 2e8b1ab93c6..11e81f0ad70 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -591,12 +591,12 @@ and then re-start emacs." "[^A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]" "[-]" nil ("-B" "-d" "italian") "~tex" iso-8859-1) ("nederlands" ; Nederlands.aff - "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" - "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" + "[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" + "[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[']" t ("-C") nil iso-8859-1) ("nederlands8" ; Dutch8.aff - "[A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" - "[^A-Za-z\300-\305\307\310-\317\322-\326\331-\334\340-\345\347\350-\357\361\362-\366\371-\374]" + "[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" + "[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]" "[']" t ("-C") nil iso-8859-1))) From b70001a19220e31e26379ffea49f77270ad25904 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 25 Jan 2005 01:26:57 +0000 Subject: [PATCH 405/560] (x_error_quitter): No longer static, and moved after x_error_handler. --- src/xterm.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 3e54a46c714..63783de4f4f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7766,12 +7766,30 @@ x_connection_closed (dpy, error_message) error ("%s", error_msg); } +/* This is the first-level handler for X protocol errors. + It calls x_error_quitter or x_error_catcher. */ + +static int +x_error_handler (display, error) + Display *display; + XErrorEvent *error; +{ + if (! NILP (x_error_message_string)) + x_error_catcher (display, error); + else + x_error_quitter (display, error); + return 0; +} /* This is the usual handler for X protocol errors. It kills all frames on the display that we got the error for. If that was the only one, it prints an error message and kills Emacs. */ -static void +/* This is not static because we want to put a breakpoint on it. + It is after x_error_handler so that it won't get inlined in + x_error_handler. */ + +void x_error_quitter (display, error) Display *display; XErrorEvent *error; @@ -7788,21 +7806,6 @@ x_error_quitter (display, error) } -/* This is the first-level handler for X protocol errors. - It calls x_error_quitter or x_error_catcher. */ - -static int -x_error_handler (display, error) - Display *display; - XErrorEvent *error; -{ - if (! NILP (x_error_message_string)) - x_error_catcher (display, error); - else - x_error_quitter (display, error); - return 0; -} - /* This is the handler for X IO errors, always. It kills all frames on the display that we lost touch with. If that was the only one, it prints an error message and kills Emacs. */ From 29099c2f2b06559662d20c3d9bb954477c2de5c2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 25 Jan 2005 01:59:39 +0000 Subject: [PATCH 406/560] *** empty log message *** --- admin/FOR-RELEASE | 5 +---- src/ChangeLog | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index d6d9060dbf1..30d50c74fd8 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -4,9 +4,6 @@ Tasks needed before the next release. ** Face remapping. -** Make Rmail find the best version of movemail. -To be done by Sergey Poznyakoff . - ** Make VC-over-Tramp work where possible, or at least fail gracefully if something isn't supported over Tramp. To be done by Andre Spiegel . @@ -184,7 +181,7 @@ man/anti.texi man/basic.texi "Luc Teirlinck" man/buffers.texi "Luc Teirlinck" man/building.texi "Ted Zlatanov" -man/calendar.texi +man/calendar.texi Joakim Verona man/cmdargs.texi man/commands.texi "Luc Teirlinck" man/custom.texi diff --git a/src/ChangeLog b/src/ChangeLog index 4fa9eb8adab..6fae79c4e2b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-24 Richard M. Stallman + + * xterm.c (x_error_quitter): No longer static, and moved after + x_error_handler. + 2005-01-24 Kim F. Storm * xdisp.c (move_it_by_lines): If we move forward after going too From fe86084221cd13a23761628671421b156a50cb4c Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Tue, 25 Jan 2005 03:36:37 +0000 Subject: [PATCH 407/560] (help-at-pt-display-when-idle): Add autoload cookie. --- lisp/ChangeLog | 4 ++++ lisp/help-at-pt.el | 1 + 2 files changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46e67c9725c..bbd99a78ecb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-24 Luc Teirlinck + + * help-at-pt.el (help-at-pt-display-when-idle): Add autoload cookie. + 2005-01-24 Lute Kamstra * textmodes/ispell.el (ispell-dictionary-alist-4): Rewrite the diff --git a/lisp/help-at-pt.el b/lisp/help-at-pt.el index 2266c8d5a2a..53af1bdd579 100644 --- a/lisp/help-at-pt.el +++ b/lisp/help-at-pt.el @@ -146,6 +146,7 @@ This is done by setting a timer, if none is currently active." (run-with-idle-timer help-at-pt-timer-delay t #'help-at-pt-maybe-display)))) +;;;###autoload (defcustom help-at-pt-display-when-idle 'never "*Automatically show local help on point-over. If the value is t, the string obtained from any `kbd-help' or From 60fc9395a3197f00a2fa702ef61794ea1dd1b3e1 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 25 Jan 2005 10:25:49 +0000 Subject: [PATCH 408/560] *** empty log message *** --- lisp/ChangeLog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bbd99a78ecb..f6779c54457 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2005-01-21 Carsten Dominik + + * textmodes/reftex-global.el (reftex-isearch-push-state-function) + (reftex-isearch-pop-state-function) + (reftex-isearch-isearch-search) + (reftex-isearch-switch-to-next-file, reftex-isearch-turn-off) + (reftex-isearch-turn-on, reftex-isearch-minor-mode): New functions. + + * textmodes/reftex.el (reftex-mode-menu): Add entry for reftex + isearch minor mode. + + 2005-01-24 Luc Teirlinck * help-at-pt.el (help-at-pt-display-when-idle): Add autoload cookie. @@ -90,6 +102,7 @@ * term/mac-win.el (process-connection-type): Removed. Controlled now by s/darwin.h:PTY_ITERATION. +>>>>>>> 1.6921 2005-01-20 Stefan Monnier * window.el (handle-select-window): Don't switch window when we're @@ -310,6 +323,7 @@ * ebrowse.el (ebrowse-class-in-tree): Return the tail of the tree rather than the element found, thus enabling the tree to be setcar'd. +>>>>>>> 1.6903 2005-01-14 Carsten Dominik * textmodes/org.el (org-show-following-heading): New option. From a17f6c51a1947cd27a386960ccda7099da34d831 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 25 Jan 2005 10:29:49 +0000 Subject: [PATCH 409/560] documented `reftex-isearch-minor-mode' --- man/reftex.texi | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/man/reftex.texi b/man/reftex.texi index 21090caf2ea..7de16dcb0e1 100644 --- a/man/reftex.texi +++ b/man/reftex.texi @@ -3520,13 +3520,15 @@ this manual. Thanks to the people on the Net who have used @b{Ref@TeX{}} and helped developing it with their reports. In particular thanks to @i{Fran -Burstall, Alastair Burt, Lars Clausen, Soren Dayton, Stephen Eglen, Karl -Eichwalder, Erik Frisk, Peter Galbraith, Kai Grossjohann, Frank Harrell, -Peter Heslin, Stephan Heuel, Alan Ho, Lute Kamstra, Dieter Kraft, David -Kastrup, Adrian Lanz, Rory Molinari, Stefan Monnier, Laurent Mugnier, -Sudeep Kumar Palat, Daniel Polani, Alan Shutko, Robin Socha, Richard -Stanton, Allan Strand, Jan Vroonhof, Christoph Wedler, Alan Williams, -Roland Winkler, Hans-Christoph Wirth, Eli Zaretskii}. +Burstall, Alastair Burt, Lars Clausen, Soren Dayton, Stephen Eglen, +Karl Eichwalder, Erik Frisk, Peter Galbraith, Kai Grossjohann, Frank +Harrell, Peter Heslin, Stephan Heuel, Alan Ho, Lute Kamstra, Dieter +Kraft, David Kastrup, Adrian Lanz, Juri Linkov, Rory Molinari, Stefan +Monnier, Laurent Mugnier, Dan Nicolaescu, Sudeep Kumar Palat, Daniel +Polani, Alan Shutko, Robin Socha, Richard Stanton, Allan Strand, Jan +Vroonhof, Christoph Wedler, Alan Williams, Roland Winkler, +Hans-Christoph Wirth, Eli Zaretskii}. + The @code{view-crossref} feature was inspired by @i{Peter Galbraith's} @file{bib-cite.el}. @@ -3668,6 +3670,12 @@ document. With prefix arg, replace only word-delimited matches. No active TAGS table is required. @end deffn +@deffn Command reftex-isearch-minor-mode +Toggle a minor mode which enables incremental search to work globally +on the entire multifile document. Files will be searched in th +sequence they appear in the document. +@end deffn + @deffn Command reftex-goto-label Prompt for a label (with completion) and jump to the location of this label. Optional prefix argument @var{other-window} goes to the label in From 640d0c89af45fe4d08b6ee5eff9043f0efdc99e0 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 25 Jan 2005 12:43:50 +0000 Subject: [PATCH 410/560] *** empty log message *** --- lisp/ChangeLog | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6779c54457..4972476169e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,15 +1,13 @@ -2005-01-21 Carsten Dominik - +2005-01-24 Carsten Dominik + * textmodes/reftex-global.el (reftex-isearch-push-state-function) - (reftex-isearch-pop-state-function) - (reftex-isearch-isearch-search) + (reftex-isearch-pop-state-function, reftex-isearch-isearch-search) (reftex-isearch-switch-to-next-file, reftex-isearch-turn-off) (reftex-isearch-turn-on, reftex-isearch-minor-mode): New functions. * textmodes/reftex.el (reftex-mode-menu): Add entry for reftex isearch minor mode. - 2005-01-24 Luc Teirlinck * help-at-pt.el (help-at-pt-display-when-idle): Add autoload cookie. From 31df23f5679c6483840b74f246880236b6d27dbf Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Tue, 25 Jan 2005 17:26:11 +0000 Subject: [PATCH 411/560] (bibtex-format-entry): Use `bibtex-empty-field-re' only on the text of fields, not on entire field lines. (bibtex-autofill-entry): Use `bibtex-empty-field-re' on a string, not on part of a buffer. (bibtex-empty-field-re): Don't match nonempty field text strings like "{letters\\macro{}more letters}". Clarify docstring. (bibtex-sort-entry-class, bibtex-autokey-titleword-ignore) (bibtex-entry-offset, bibtex-parse-association) (bibtex-parse-field-name): Fix typos in docstrings. (bibtex-field-list, bibtex-find-crossref): Fix typos in error messages. --- lisp/ChangeLog | 21 +++++++++++++++++++-- lisp/textmodes/bibtex.el | 29 ++++++++++++++++------------- 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4972476169e..6eaff11c580 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2005-01-25 Roland Winkler + + * textmodes/bibtex.el (bibtex-format-entry): Use + `bibtex-empty-field-re' only on the text of fields, not on entire + field lines. + (bibtex-autofill-entry): Use `bibtex-empty-field-re' on a string, + not on part of a buffer. + +2005-01-25 Lute Kamstra + + * textmodes/bibtex.el (bibtex-empty-field-re): Don't match + nonempty field text strings like "{letters\\macro{}more letters}". + Clarify docstring. + (bibtex-sort-entry-class, bibtex-autokey-titleword-ignore) + (bibtex-entry-offset, bibtex-parse-association) + (bibtex-parse-field-name): Fix typos in docstrings. + (bibtex-field-list, bibtex-find-crossref): Fix typos in error + messages. + 2005-01-24 Carsten Dominik * textmodes/reftex-global.el (reftex-isearch-push-state-function) @@ -100,7 +119,6 @@ * term/mac-win.el (process-connection-type): Removed. Controlled now by s/darwin.h:PTY_ITERATION. ->>>>>>> 1.6921 2005-01-20 Stefan Monnier * window.el (handle-select-window): Don't switch window when we're @@ -321,7 +339,6 @@ * ebrowse.el (ebrowse-class-in-tree): Return the tail of the tree rather than the element found, thus enabling the tree to be setcar'd. ->>>>>>> 1.6903 2005-01-14 Carsten Dominik * textmodes/org.el (org-show-following-heading): New option. diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index c5209456f83..fc677b3de44 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -173,7 +173,7 @@ See also `bibtex-sort-ignore-string-entries'." If value of `bibtex-maintain-sorted-entries' is `entry-class' entries are ordered according to the classes they belong to. Each class contains a list of entry names. An entry `catch-all' applies -to all entries not explicitely mentioned." +to all entries not explicitly mentioned." :group 'BibTeX :type '(repeat (choice :tag "Class" (const :tag "catch-all" (catch-all)) @@ -654,7 +654,7 @@ See `bibtex-generate-autokey' for details." '("A" "An" "On" "The" "Eine?" "Der" "Die" "Das" "[^A-Z].*" ".*[^A-Z0-9].*") "Determines words from the title that are not to be used in the key. -Each item of the list is a regexp. If a word of the title matchs a +Each item of the list is a regexp. If a word of the title matches a regexp from that list, it is not included in the title part of the key. See `bibtex-generate-autokey' for details." :group 'bibtex-autokey @@ -730,7 +730,7 @@ and must return a string (the key to use)." (defcustom bibtex-entry-offset 0 "Offset for BibTeX entries. -Added to the value of all other variables which determine colums." +Added to the value of all other variables which determine columns." :group 'bibtex :type 'integer) @@ -1115,9 +1115,8 @@ The CDRs of the elements are t for header keys and nil for crossref keys.") t)) "Regexp matching the name of any valid BibTeX entry (including string).") - -(defconst bibtex-empty-field-re "\"\"\\|{}" - "Regexp matching an empty field.") +(defconst bibtex-empty-field-re "\\`\\(\"\"\\|{}\\)\\'" + "Regexp matching the text part (as a string) of an empty field.") (defconst bibtex-font-lock-syntactic-keywords `((,(concat "^[ \t]*\\(" (substring bibtex-comment-start 0 1) "\\)" @@ -1179,7 +1178,7 @@ ARG is ignored." "Parse a string of the format . The functions PARSE-LHS and PARSE-RHS are used to parse the corresponding substrings. These functions are expected to return nil if parsing is not -successfull. If both functions return non-nil, a pair containing the returned +successful. If both functions return non-nil, a pair containing the returned values of the functions PARSE-LHS and PARSE-RHS is returned." (save-match-data (save-excursion @@ -1196,7 +1195,7 @@ values of the functions PARSE-LHS and PARSE-RHS is returned." If the field name is found, return a triple consisting of the position of the very first character of the match, the actual starting position of the name part and end position of the match. Move point to end of field name. -If `bibtex-autoadd-commas' is non-nil add missing comma at end of preceeding +If `bibtex-autoadd-commas' is non-nil add missing comma at end of preceding BibTeX field as necessary." (cond ((looking-at ",[ \t\n]*") (let ((start (point))) @@ -1875,7 +1874,7 @@ Formats current entry according to variable `bibtex-entry-format'." (if opt-alt (+ beg-name 3) beg-name) end-name)) (empty-field (string-match bibtex-empty-field-re (buffer-substring-no-properties - beg-field end-field))) + beg-text end-text))) deleted) ;; We have more elegant high-level functions for several @@ -2824,7 +2823,7 @@ and `bibtex-user-optional-fields'." (let ((e (assoc-string entry-type bibtex-entry-field-alist t)) required optional) (unless e - (error "Bibtex entry type %s not defined" entry-type)) + (error "BibTeX entry type %s not defined" entry-type)) (if (and (member-ignore-case entry-type bibtex-include-OPTcrossref) (nth 2 e)) (setq required (nth 0 (nth 2 e)) @@ -2960,9 +2959,13 @@ entry (for example, the year parts of the keys)." (while (setq bounds (bibtex-parse-field bibtex-field-name)) (let ((text (assoc-string (bibtex-name-in-field bounds t) other t))) - (goto-char (bibtex-start-of-text-in-field bounds)) - (if (not (and (looking-at bibtex-empty-field-re) text)) + (if (not (and text + (string-match bibtex-empty-field-re + (buffer-substring-no-properties + (bibtex-start-of-text-in-field bounds) + (bibtex-end-of-text-in-field bounds))))) (goto-char (bibtex-end-of-field bounds)) + (goto-char (bibtex-start-of-text-in-field bounds)) (delete-region (point) (bibtex-end-of-text-in-field bounds)) (insert (cdr text))))) ;; Finally try to update the text based on the difference between @@ -3269,7 +3272,7 @@ entry and SPLIT is t." (bibtex-reposition-window) (beginning-of-line) (if (and eqb (> pnt pos)) - (error "The referencing entry must preceed the crossrefed entry!"))) + (error "The referencing entry must precede the crossrefed entry!"))) ;; `bibtex-find-crossref' is called noninteractively during ;; clean-up of an entry. Then it is not possible to check ;; whether the current entry and the crossrefed entry have From 5d4ba9da90a6e4e401bc9b7dee2483049e84aea7 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 26 Jan 2005 08:28:06 +0000 Subject: [PATCH 412/560] * textmodes/reftex.el (reftex-mode-menu): Add entry for reftex isearch minor mode. --- lisp/textmodes/reftex.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index e177805e9c4..318279b1377 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2487,7 +2487,9 @@ IGNORE-WORDS List of words which should be removed from the string." "--" "MISC" ["AUC TeX Interface" reftex-toggle-plug-into-AUCTeX - :style toggle :selected reftex-plug-into-AUCTeX]) + :style toggle :selected reftex-plug-into-AUCTeX] + ["isearch whole document" reftex-isearch-minor-mode + :style toggle :selected reftex-isearch-minor-mode]) ("Reference Style" ["Default" (setq reftex-vref-is-default nil reftex-fref-is-default nil) From 0072e19e631a50efef487e02ac3434a429ddc8f6 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 26 Jan 2005 08:28:31 +0000 Subject: [PATCH 413/560] * textmodes/reftex-global.el (reftex-isearch-push-state-function) (reftex-isearch-pop-state-function, reftex-isearch-isearch-search) (reftex-isearch-switch-to-next-file, reftex-isearch-turn-off) (reftex-isearch-turn-on, reftex-isearch-minor-mode): New functions. --- lisp/textmodes/reftex-global.el | 126 ++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index d4d91b476e9..d3ef2dcb788 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -338,5 +338,131 @@ Also checks if buffers visiting the files are in read-only mode." (buffer-name buf))) (error "Abort")))))) +(defun reftex-isearch-wrap-function () + (if (not isearch-word) + (switch-to-buffer + (funcall isearch-next-buffer-function (current-buffer) t))) + (goto-char (if isearch-forward (point-min) (point-max)))) + +(defun reftex-isearch-push-state-function () + `(lambda (cmd) + (reftex-isearch-pop-state-function cmd ,(current-buffer)))) + +(defun reftex-isearch-pop-state-function (cmd buffer) + (switch-to-buffer buffer)) + +(defun reftex-isearch-isearch-search (string bound noerror) + (let ((nxt-buff nil) + (search-fun + (cond + (isearch-word + (if isearch-forward 'word-search-forward 'word-search-backward)) + (isearch-regexp + (if isearch-forward 're-search-forward 're-search-backward)) + (t + (if isearch-forward 'search-forward 'search-backward))))) + (or + (funcall search-fun string bound noerror) + (unless bound + (condition-case nil + (when isearch-next-buffer-function + (while (not (funcall search-fun string bound noerror)) + (cond + (isearch-forward + (setq nxt-buff + (funcall isearch-next-buffer-function + (current-buffer))) + (if (not nxt-buff) + (progn + (error "Wrap forward")) + (switch-to-buffer nxt-buff) + (goto-char (point-min)))) + (t + (setq nxt-buff + (funcall isearch-next-buffer-function + (current-buffer))) + (if (not nxt-buff) + (progn + (error "Wrap backward")) + (switch-to-buffer nxt-buff) + (goto-char (point-max)))))) + (point)) + (error nil)))))) + +;;; This function is called when isearch reaches the end of a +;;; buffer. For reftex what we want to do is not wrap to the +;;; beginning, but switch to the next buffer in the logical order of +;;; the document. This function looks through list of files in the +;;; document (reftex-all-document-files), searches for the current +;;; buffer and switches to the next/previous one in the logical order +;;; of the document. If WRAPP is true then wrap the search to the +;;; beginning/end of the file list, depending of the search direction. +(defun reftex-isearch-switch-to-next-file (crt-buf &optional wrapp) + (reftex-access-scan-info) + (let* ((cb (buffer-file-name crt-buf)) + (flist (reftex-all-document-files)) + (orig-flist flist)) + (when flist + (if wrapp + (unless isearch-forward + (setq flist (last flist))) + (unless isearch-forward + (setq flist (nreverse (copy-list flist))) + (setq orig-flist flist)) + (while (not (string= (car flist) cb)) + (setq flist (cdr flist))) + (setq flist (cdr flist))) + (when flist + (find-file (car flist)))))) + +;;;###autoload +(defvar reftex-isearch-minor-mode nil) +(make-variable-buffer-local 'reftex-isearch-minor-mode) + +;;;###autoload +(defun reftex-isearch-minor-mode (&optional arg) + "When on, isearch searches the whole document, not only the current file. +This minor mode allows isearch to search through all the files of +the current TeX document. + +With no argument, this command toggles +`reftex-isearch-minor-mode'. With a prefix argument ARG, turn +`reftex-isearch-minor-mode' on iff ARG is positive." + (interactive "P") + (let ((old-reftex-isearch-minor-mode reftex-isearch-minor-mode)) + (setq reftex-isearch-minor-mode + (not (or (and (null arg) reftex-isearch-minor-mode) + (<= (prefix-numeric-value arg) 0)))) + (unless (eq reftex-isearch-minor-mode old-reftex-isearch-minor-mode) + (if reftex-isearch-minor-mode + (progn + (dolist (crt-buf (buffer-list)) + (with-current-buffer crt-buf + (when reftex-mode + (set (make-local-variable 'isearch-wrap-function) + 'reftex-isearch-wrap-function) + (set (make-local-variable 'isearch-search-fun-function) + (lambda () 'reftex-isearch-isearch-search)) + (set (make-local-variable 'isearch-push-state-function) + 'reftex-isearch-push-state-function) + (set (make-local-variable 'isearch-next-buffer-function) + 'reftex-isearch-switch-to-next-file) + (setq reftex-isearch-minor-mode t)))) + (add-hook 'reftex-mode-hook 'reftex-isearch-minor-mode)) + (dolist (crt-buf (buffer-list)) + (with-current-buffer crt-buf + (when reftex-mode + (kill-local-variable 'isearch-wrap-function) + (kill-local-variable 'isearch-search-fun-function) + (kill-local-variable 'isearch-push-state-function) + (kill-local-variable 'isearch-next-buffer-function) + (setq reftex-isearch-minor-mode nil)))) + (remove-hook 'reftex-mode-hook 'reftex-isearch-minor-mode))) + ;; Force modeline redisplay. + (set-buffer-modified-p (buffer-modified-p)))) + +(add-minor-mode 'reftex-isearch-minor-mode "/I" nil nil + 'reftex-isearch-minor-mode) + ;;; arch-tag: 2dbf7633-92c8-4340-8656-7aa019d0f80d ;;; reftex-global.el ends here From 889f36418f495a3a45c484730a1f3aa592cc08ff Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 27 Jan 2005 00:16:00 +0000 Subject: [PATCH 414/560] *** empty log message *** --- src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 6fae79c4e2b..78cf11d1d90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-01-27 Kim F. Storm + + * xdisp.c (get_glyph_string_clip_rect): Always show a cursor + glyph, even when row is only partially visible and actual cursor + position is not visible. + 2005-01-24 Richard M. Stallman * xterm.c (x_error_quitter): No longer static, and moved after From 999f5a607e17b7565b90ff4161bebc113f65ada9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 27 Jan 2005 00:16:28 +0000 Subject: [PATCH 415/560] (get_glyph_string_clip_rect): Always show a cursor glyph, even when row is only partially visible and actual cursor position is not visible. --- src/xdisp.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index d7c32be09ea..e83004d1741 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1837,7 +1837,7 @@ get_glyph_string_clip_rect (s, nr) if (s->hl == DRAW_CURSOR) { struct glyph *glyph = s->first_glyph; - int height; + int height, max_y; if (s->x > r.x) { @@ -1846,13 +1846,26 @@ get_glyph_string_clip_rect (s, nr) } r.width = min (r.width, glyph->pixel_width); - /* Don't draw cursor glyph taller than our actual glyph. */ - height = max (FRAME_LINE_HEIGHT (s->f), glyph->ascent + glyph->descent); - if (height < r.height) + /* If r.y is below window bottom, ensure that we still see a cursor. */ + height = min (glyph->ascent + glyph->descent, + min (FRAME_LINE_HEIGHT (s->f), s->row->visible_height)); + max_y = window_text_bottom_y (s->w) - height; + max_y = WINDOW_TO_FRAME_PIXEL_Y (s->w, max_y); + if (s->ybase - glyph->ascent > max_y) { - int max_y = r.y + r.height; - r.y = min (max_y, s->ybase + glyph->descent - height); - r.height = min (max_y - r.y, height); + r.y = max_y; + r.height = height; + } + else + { + /* Don't draw cursor glyph taller than our actual glyph. */ + height = max (FRAME_LINE_HEIGHT (s->f), glyph->ascent + glyph->descent); + if (height < r.height) + { + max_y = r.y + r.height; + r.y = min (max_y, max (r.y, s->ybase + glyph->descent - height)); + r.height = min (max_y - r.y, height); + } } } From 3bf93f74020a5df8e1449b7aecb130e667c78af7 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 27 Jan 2005 02:45:20 +0000 Subject: [PATCH 416/560] (all): Add `undo-outer-limit'. --- lisp/ChangeLog | 4 ++++ lisp/cus-start.el | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6eaff11c580..b5247f7cbfe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-26 Luc Teirlinck + + * cus-start.el (all): Add `undo-outer-limit'. + 2005-01-25 Roland Winkler * textmodes/bibtex.el (bibtex-format-entry): Use diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 12ffd93fefd..fc293734495 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -41,6 +41,17 @@ (gc-cons-threshold alloc integer) (undo-limit undo integer) (undo-strong-limit undo integer) + (undo-outer-limit undo + (choice integer + (const :tag "No limit" + :format "%t\n%d" + :doc + "With this choice, \ +the undo info for the current command never gets discarded. +This should only be chosen under exceptional circumstances, +since it could result in memory overflow and make Emacs crash." + nil)) + "21.4") (garbage-collection-messages alloc boolean) ;; buffer.c (mode-line-format modeline sexp) ;Hard to do right. From 56366094d765e90c933bf6fc88e16bda25ebad87 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 27 Jan 2005 08:58:52 +0000 Subject: [PATCH 417/560] (Initial Options): Add a cross reference to `Init File'. Mention the `-Q' option at the `--no-site-file' option. --- man/ChangeLog | 5 +++++ man/cmdargs.texi | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 63e3591265e..0e4f2a88bbf 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-01-26 Lute Kamstra + + * cmdargs.texi (Initial Options): Add a cross reference to `Init + File'. Mention the `-Q' option at the `--no-site-file' option. + 2005-01-24 David Kastrup * faq.texi: Update AUCTeX version info. diff --git a/man/cmdargs.texi b/man/cmdargs.texi index b06aac4bdb6..960f2d0bd65 100644 --- a/man/cmdargs.texi +++ b/man/cmdargs.texi @@ -169,8 +169,9 @@ sections. Some initial options affect the loading of init files. The normal actions of Emacs are to first load @file{site-start.el} if it exists, then your own init file @file{~/.emacs} if it exists, and finally -@file{default.el} if it exists; certain options prevent loading of some -of these files or substitute other files for them. +@file{default.el} if it exists. @xref{Init File}. Certain options +prevent loading of some of these files or substitute other files for +them. @table @samp @item -t @var{device} @@ -257,8 +258,8 @@ changed with the @kbd{M-x customize} command and its variants. @opindex --no-site-file @cindex @file{site-start.el} file, not loading Do not load @file{site-start.el}. The options @samp{-q}, @samp{-u} -and @samp{--batch} have no effect on the loading of this file---this is -the only option that blocks it. +and @samp{--batch} have no effect on the loading of this file---this +option and @samp{-Q} are the only options that block it. @item -Q @opindex -Q From 6b626913b849a9ab143d932f609ad60b5bdc6b2f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 27 Jan 2005 14:47:33 +0000 Subject: [PATCH 418/560] (standard-display-european-internal): Don't fiddle with latin-1 non-break space any more since it's now special cased in the C code. Don't "do&undo" setting for 160 (especially, don't undo incorrectly). --- lisp/ChangeLog | 16 +++++++++----- lisp/international/mule-cmds.el | 37 ++++++++++----------------------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b5247f7cbfe..9fb3abb4aad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,11 +1,18 @@ +2005-01-27 Stefan Monnier + + * international/mule-cmds.el (standard-display-european-internal): + Don't fiddle with latin-1 non-break space any more since it's now + special cased in the C code. + Don't "do&undo" setting for 160 (especially, don't undo incorrectly). + 2005-01-26 Luc Teirlinck * cus-start.el (all): Add `undo-outer-limit'. 2005-01-25 Roland Winkler - * textmodes/bibtex.el (bibtex-format-entry): Use - `bibtex-empty-field-re' only on the text of fields, not on entire + * textmodes/bibtex.el (bibtex-format-entry): + Use `bibtex-empty-field-re' only on the text of fields, not on entire field lines. (bibtex-autofill-entry): Use `bibtex-empty-field-re' on a string, not on part of a buffer. @@ -18,8 +25,7 @@ (bibtex-sort-entry-class, bibtex-autokey-titleword-ignore) (bibtex-entry-offset, bibtex-parse-association) (bibtex-parse-field-name): Fix typos in docstrings. - (bibtex-field-list, bibtex-find-crossref): Fix typos in error - messages. + (bibtex-field-list, bibtex-find-crossref): Fix typos in error messages. 2005-01-24 Carsten Dominik @@ -120,7 +126,7 @@ 2005-01-20 Steven Tamm - * term/mac-win.el (process-connection-type): Removed. + * term/mac-win.el (process-connection-type): Remove. Controlled now by s/darwin.h:PTY_ITERATION. 2005-01-20 Stefan Monnier diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 75b0d5ed227..cf004fe5ebf 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1,6 +1,6 @@ ;;; mule-cmds.el --- commands for mulitilingual environment -*-coding: iso-2022-7bit -*- -;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. @@ -1865,12 +1865,14 @@ specifies the character set for the major languages of Western Europe." ;; different there. (or (and (eq window-system 'pc) (not default-enable-multibyte-characters)) (progn - ;; Make non-line-break space display as a plain space. - ;; Most X fonts do the wrong thing for code 160. - (aset standard-display-table 160 [32]) - ;; With luck, non-Latin-1 fonts are more recent and so don't - ;; have this bug. - (aset standard-display-table (make-char 'latin-iso8859-1 160) [32]) + ;; Most X fonts used to do the wrong thing for latin-1 code 160. + (unless (and (eq window-system 'x) + ;; XFree86 4 has fixed the fonts. + (string= "The XFree86 Project, Inc" (x-server-vendor)) + (> (aref (number-to-string (nth 2 (x-server-version))) 0) + ?3)) + ;; Make non-line-break space display as a plain space. + (aset standard-display-table 160 [32])) ;; Most Windows programs send out apostrophes as \222. Most X fonts ;; don't contain a character at that position. Map it to the ASCII ;; apostrophe. [This is actually RIGHT SINGLE QUOTATION MARK, @@ -1878,23 +1880,7 @@ specifies the character set for the major languages of Western Europe." ;; fonts probably have the appropriate glyph at this position, ;; so they could use standard-display-8bit. It's better to use a ;; proper windows-1252 coding system. --fx] - (aset standard-display-table 146 [39]) - ;; XFree86 4 has changed most of the fonts from their designed - ;; versions such that `' no longer appears as balanced quotes. - ;; Assume it has iso10646 fonts installed, so we can display - ;; balanced quotes. - (when (and (eq window-system 'x) - (string= "The XFree86 Project, Inc" (x-server-vendor)) - (> (aref (number-to-string (nth 2 (x-server-version))) 0) - ?3)) - ;; We suppress these setting for the moment because the - ;; above assumption is wrong. - ;; (aset standard-display-table ?' [?$,1ry(B]) - ;; (aset standard-display-table ?` [?$,1rx(B]) - ;; The fonts don't have the relevant bug. - (aset standard-display-table 160 nil) - (aset standard-display-table (make-char 'latin-iso8859-1 160) - nil))))) + (aset standard-display-table 146 [39])))) (defun set-language-environment-coding-systems (language-name &optional eol-type) @@ -1955,8 +1941,7 @@ of `buffer-file-coding-system' set by this function." (setq language-name (symbol-name language-name))) (dolist (feature (get-language-info language-name 'features)) (require feature)) - (let ((doc (get-language-info language-name 'documentation)) - pos) + (let ((doc (get-language-info language-name 'documentation))) (help-setup-xref (list #'describe-language-environment language-name) (interactive-p)) (with-output-to-temp-buffer (help-buffer) From 760ebc9b6c671a6254bd1270e8e18d4ffbc662e0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 27 Jan 2005 15:36:25 +0000 Subject: [PATCH 419/560] *** empty log message *** --- admin/FOR-RELEASE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 30d50c74fd8..22d36fe42fd 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -11,6 +11,8 @@ To be done by Andre Spiegel . ** define-minor-mode should not put :require into defcustom. See msg from rms to emacs-devel on 21 Dec. +** Update Speedbar. + * FATAL ERRORS ** Investigate face cache related crash. From 043f7f73332e93e9c147eb94406b054c26b89272 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 27 Jan 2005 17:00:38 +0000 Subject: [PATCH 420/560] (x_error_quitter): Add a prototype. Make it static again. --- src/ChangeLog | 119 ++++++++++++++++++++++++-------------------------- src/xterm.c | 13 +++--- 2 files changed, 64 insertions(+), 68 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 78cf11d1d90..6c8e1cfc4b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-27 Stefan Monnier + + * xterm.c (x_error_quitter): Add a prototype. Make it static again. + 2005-01-27 Kim F. Storm * xdisp.c (get_glyph_string_clip_rect): Always show a cursor @@ -62,7 +66,7 @@ 2005-01-22 Steven Tamm * s/darwin.h: Removed PTY_ITERATION from here. - (DARWIN): Defined. + (DARWIN): Define. * process.c (init_process): Default process-connection-type to nil on darwin 6 or less, t if it is 7 or higher. This way the broken pty behavior is still allowed on darwin 6 for interactive @@ -105,17 +109,16 @@ 2005-01-20 Steven Tamm - * editfns.c (Voperating_system_release): Added. + * editfns.c (Voperating_system_release): Add. (init_editfns): Assign new variable operating-system-release based on call to uname if available. - (get_operating_system_release): Added function to + (get_operating_system_release): Add function to allow c-level access to operating system release. * config.h: Regenerated. - * s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or - less. - (MIN_PTY_KERNEL_VERSION): Defined minimum kernel version for + * s/darwin.h (PTY_ITERATION): Don't allow PTYs on darwin 6 or less. + (MIN_PTY_KERNEL_VERSION): Define minimum kernel version for using ptys as '7'. 2005-01-20 Kim F. Storm @@ -157,8 +160,8 @@ 2005-01-17 Kim F. Storm - * dispnew.c (mode_line_string, marginal_area_string): Fix - off-by-one error in search for glyph. + * dispnew.c (mode_line_string, marginal_area_string): + Fix off-by-one error in search for glyph. 2005-01-16 Kim F. Storm @@ -166,7 +169,7 @@ 2005-01-16 Steven Tamm - * macterm.c (mac_to_x_fontname): Removed spurious argument. + * macterm.c (mac_to_x_fontname): Remove spurious argument. 2005-01-16 Andreas Schwab @@ -182,7 +185,7 @@ * keyboard.c (READABLE_EVENTS_DO_TIMERS_NOW) (READABLE_EVENTS_FILTER_EVENTS, READABLE_EVENTS_IGNORE_SQUEEZABLES): New flags for readable_events. - (get_filtered_input_pending, readable_filtered_events): Removed. + (get_filtered_input_pending, readable_filtered_events): Remove. (tracking_off): Call readable_events and get_input_pending with flag READABLE_EVENTS_DO_TIMERS_NOW. (readable_events): Move code from old readable_filtered_events here, @@ -222,8 +225,8 @@ 2005-01-15 YAMAMOTO Mitsuharu - * macfns.c (x_set_foreground_color, x_set_background_color): Sync - with xfns.c. + * macfns.c (x_set_foreground_color, x_set_background_color): + Sync with xfns.c. (mac_window, x_create_tip_frame): Use XSetWindowBackground. * macterm.c (XSetBackground, XSetWindowBackground): New functions. * macterm.h (XSetBackground, XSetWindowBackground): Add externs. @@ -280,8 +283,8 @@ (get_next_display_element): Test Vshow_nonbreak_escape. Do not setup escape_glyph_face. Properly merge escape-glyph face or face from display table with - current face for escape and control characters. Set - it->dpvec_face_id to relevant face id instead of adding it to each + current face for escape and control characters. + Set it->dpvec_face_id to relevant face id instead of adding it to each element of display vector. (next_element_from_display_vector): If it->dpvec_face_id is set, use that instead of lface_id from glyph itself. @@ -305,8 +308,7 @@ * gtkutil.c (xg_gtk_scroll_destroy, xg_create_scroll_bar) (xg_tool_bar_callback, xg_tool_bar_help_callback) - (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler - warning. + (update_frame_tool_bar): Cast to EMACS_INT to avoid compiler warning. * xselect.c (x_get_foreign_selection, x_fill_property_data) (Fx_get_atom_name, Fx_send_client_event): Replace XFLOAT with @@ -364,8 +366,8 @@ [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Likewise. [TARGET_API_MAC_CARBON] (mac_do_receive_drag): Return error when a file dialog is in action. - [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. Reject - only when there are no filename items. Set background color + [TARGET_API_MAC_CARBON] (mac_do_track_drag): Likewise. + Reject only when there are no filename items. Set background color before (un)highlighting the window below the dragged items. (XTread_socket) [!USE_CARBON_EVENTS]: Don't call do_window_update. @@ -449,8 +451,7 @@ * fileio.c (Finsert_file_contents): Don't use current_buffer->buffer_file_coding_system even if REPLACE is - non-nil. Call Qafter_insert_file_set_coding with the second arg - VISIT. + non-nil. Call Qafter_insert_file_set_coding with the second arg VISIT. * fontset.h (struct font_info): New members space_width and average_width. @@ -463,8 +464,7 @@ * xterm.c (x_new_font): Set FRAME_COLUMN_WIDTH to fontp->average_width, not FONT_WIDTH. Set FRAME_SPACE_WIDTH to fontp->space_width. - (x_load_font): Calculate fontp->space_width and - fontp->average_width. + (x_load_font): Calculate fontp->space_width and fontp->average_width. (x_term_init): Initialize dpyinfo->Xatom_AVERAGE_WIDTH. * xdisp.c (x_produce_glyphs): Calculate tab width by @@ -473,8 +473,7 @@ 2004-12-29 Sanghyuk Suh * macterm.c (SelectionRange): Add Xcode position apple event struct. - (do_ae_open_documents): Handle Xcode-style file position open - events. + (do_ae_open_documents): Handle Xcode-style file position open events. 2004-12-29 Luc Teirlinck @@ -500,11 +499,11 @@ init_mac_drag_n_drop. (mac_do_track_drag): New function and declaration. (install_window_handler): Return OSErr value. - (install_window_handler) [TARGET_API_MAC_CARBON]: Register - handlers for tracking/receiving drag-and-drop items. + (install_window_handler) [TARGET_API_MAC_CARBON]: + Register handlers for tracking/receiving drag-and-drop items. (do_ae_open_documents): Generate unibyte strings for filenames. - (mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise. Reject - only non-filename items. Set event modifiers. Set return value. + (mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise. + Reject only non-filename items. Set event modifiers, and return value. 2004-12-28 Dan Nicolaescu @@ -528,8 +527,8 @@ * xmenu.c (popup_get_selection): Only pop down dialogs on C-g and Escape. (popup_get_selection): Remove parameter down_on_keypress. - (create_and_show_popup_menu, create_and_show_dialog): Remove - parameter down_on_keypress to popup_get_selection. + (create_and_show_popup_menu, create_and_show_dialog): + Remove parameter down_on_keypress to popup_get_selection. 2004-12-27 YAMAMOTO Mitsuharu @@ -546,8 +545,8 @@ * frame.c (x_set_frame_parameters, x_report_frame_params) (x_set_fullscreen): Remove #ifndef HAVE_CARBON. - (x_set_border_width, Vdefault_frame_scroll_bars): Change - HAVE_CARBON to MAC_OS. + (x_set_border_width, Vdefault_frame_scroll_bars): + Change HAVE_CARBON to MAC_OS. * image.c [MAC_OS]: Include sys/stat.h. [MAC_OS && !MAC_OSX]: Include sys/param.h, ImageCompression.h, and @@ -555,8 +554,7 @@ * mac.c [!MAC_OSX] (mac_wait_next_event): Add extern. [!MAC_OSX] (select): Use mac_wait_next_event. - [!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to - Vexec_suffixes. + [!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to Vexec_suffixes. [!MAC_OSX] (select, run_mac_command): Change `#ifdef TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'. (mac_clear_font_name_table): Add extern. @@ -575,21 +573,19 @@ * macfns.c (mac_initialized): Remove extern. (stricmp): Put in #if 0. All callers changed to use xstricmp in xfaces.c. - (strnicmp): Decrement `n' at the end of each loop, not the - beginning. - (check_mac): Use the term "Mac native windows" instead of "Mac - OS". + (strnicmp): Decrement `n' at the end of each loop, not the beginning. + (check_mac): Use the term "Mac native windows" instead of "Mac OS". (check_x_display_info, x_display_info_for_name): Sync with xfns.c. (mac_get_rdb_resource): New function (from w32reg.c). (x_get_string_resource): Use it. (install_window_handler): Add extern. (mac_window): New function. - (Fx_create_frame): Use it instead of make_mac_frame. Set - parameter for Qfullscreen. Call x_wm_set_size_hint. + (Fx_create_frame): Use it instead of make_mac_frame. + Set parameter for Qfullscreen. Call x_wm_set_size_hint. (Fx_open_connection, Fx_close_connection): New defuns. (syms_of_macfns): Defsubr them. - (x_create_tip_frame) [TARGET_API_MAC_CARBON]: Add - kWindowNoUpdatesAttribute to the window attribute. + (x_create_tip_frame) [TARGET_API_MAC_CARBON]: + Add kWindowNoUpdatesAttribute to the window attribute. (x_create_tip_frame) [!TARGET_API_MAC_CARBON]: Use NewCWindow. (x_create_tip_frame): Don't call ShowWindow. (Fx_show_tip): Call ShowWindow. @@ -598,8 +594,7 @@ (mac_frame_parm_handlers): Set handlers for Qfullscreen. (syms_of_macfns) [MAC_OSX]: Initialize mac_in_use to 0. - * macgui.h [!MAC_OSX]: Don't include Controls.h. Include - Windows.h. + * macgui.h [!MAC_OSX]: Don't include Controls.h. Include Windows.h. (Window): Typedef to WindowPtr and move outside `#if TARGET_API_MAC_CARBON'. (XSizeHints): New struct. @@ -618,8 +613,7 @@ (x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window if the position is neither user-specified nor program-specified. (x_free_frame_resources): Free size_hints. - (x_wm_set_size_hint): Allocate size_hints if needed. Set - size_hints. + (x_wm_set_size_hint): Allocate size_hints if needed. Set size_hints. (mac_clear_font_name_table): New function. (mac_do_list_fonts): Initialize font_name_table if needed. (x_list_fonts): Don't initialize font_name_table. Add BLOCK_INPUT @@ -633,8 +627,7 @@ (do_window_update): Add BeginUpdate/EndUpdate for the tooltip window. Use UpdateControls. Get the rectangle that should be updated and restrict the target of expose_frame to it. - (do_grow_window): Set minimum height/width according to - size_hints. + (do_grow_window): Set minimum height/width according to size_hints. (do_grow_window) [TARGET_API_MAC_CARBON]: Use ResizeWindow. (do_zoom_window): Don't use x_set_window_size. [USE_CARBON_EVENTS] (mac_handle_window_event): New function. @@ -646,10 +639,10 @@ (XTread_socket) [!USE_CARBON_EVENTS]: Use mac_wait_next_event. Update mouse_region when mouse is moved. (make_mac_frame): Remove. - (make_mac_terminal_frame): Put in #ifdef MAC_OS8. Initialize - mouse pointer shapes. Change values of f->left_pos and - f->top_pos. Don't use make_mac_frame. Use NewCWindow. Don't - call ShowWindow. + (make_mac_terminal_frame): Put in #ifdef MAC_OS8. + Initialize mouse pointer shapes. Change values of f->left_pos and + f->top_pos. Don't use make_mac_frame. Use NewCWindow. + Don't call ShowWindow. (mac_initialize_display_info) [MAC_OSX]: Create mac_id_name from Vinvocation_name and Vsystem_name. (mac_make_rdb): New function (from w32term.c). @@ -672,17 +665,17 @@ 2004-12-27 Richard M. Stallman - * buffer.c (Fbuffer_disable_undo): Deleted (moved to simple.el). + * buffer.c (Fbuffer_disable_undo): Delete (move to simple.el). (syms_of_buffer): Don't defsubr it. * process.c (list_processes_1): Set undo_list instead of calling Fbuffer_disable_undo. - * xdisp.c (single_display_spec_string_p): Renamed from + * xdisp.c (single_display_spec_string_p): Rename from single_display_prop_string_p. - (single_display_spec_intangible_p): Renamed from + (single_display_spec_intangible_p): Rename from single_display_prop_intangible_p. - (handle_single_display_spec): Renamed from handle_single_display_prop. + (handle_single_display_spec): Rename from handle_single_display_prop. Rewritten to be easier to understand. Change in load-history format. Functions now get (defun . NAME), @@ -766,7 +759,7 @@ * alloc.c (Fgarbage_collect): Update call to truncate_undo_list. Call that at the very start. - (undo_limit, undo_strong_limit, undo_outer_limit): Moved to undo.c. + (undo_limit, undo_strong_limit, undo_outer_limit): Move to undo.c. (syms_of_alloc): Don't define undo-limit, undo-strong-limit and undo-outer-limit here. @@ -801,8 +794,8 @@ 2004-12-18 YAMAMOTO Mitsuharu - * macterm.c (endif, x_font_name_to_mac_font_name): Use - maccentraleurroman instead of maccentraleuropean + * macterm.c (endif, x_font_name_to_mac_font_name): + Use maccentraleurroman instead of maccentraleuropean (mac_c_string_match, mac_do_list_fonts): Speed up font search by quickly finding a specific font without needing regexps. @@ -828,8 +821,8 @@ * sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK. - * process.c (send_process_trap, sigchld_handler): Call - SIGNAL_THREAD_CHECK. + * process.c (send_process_trap, sigchld_handler): + Call SIGNAL_THREAD_CHECK. * data.c (arith_error): Call SIGNAL_THREAD_CHECK. @@ -919,7 +912,7 @@ * alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC. -2004-12-07 Stefan +2004-12-07 Stefan Monnier * eval.c (init_eval_once): Increase max_specpdl_size to 1000. @@ -2072,7 +2065,7 @@ * window.c (Fspecial_display_p): Doc fix. -2004-10-15 Stefan +2004-10-15 Stefan Monnier * doc.c (Fsubstitute_command_keys): Fix remap-handling. Don't ignore menus, because where-is-internal already does it for us. diff --git a/src/xterm.c b/src/xterm.c index 63783de4f4f..49e635c0fa3 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1,6 +1,6 @@ /* X Communication module for terminals which understand the X protocol. - Copyright (C) 1989, 93, 94, 95, 96, 97, 98, 1999, 2000,01,02,03,04 - Free Software Foundation, Inc. + Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, + 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -7766,6 +7766,10 @@ x_connection_closed (dpy, error_message) error ("%s", error_msg); } +/* We specifically use it before defining it, so that gcc doesn't inline it, + otherwise gdb doesn't know how to properly put a breakpoint on it. */ +static void x_error_quitter (Display *display, XErrorEvent *error); + /* This is the first-level handler for X protocol errors. It calls x_error_quitter or x_error_catcher. */ @@ -7785,11 +7789,10 @@ x_error_handler (display, error) It kills all frames on the display that we got the error for. If that was the only one, it prints an error message and kills Emacs. */ -/* This is not static because we want to put a breakpoint on it. - It is after x_error_handler so that it won't get inlined in +/* It is after x_error_handler so that it won't get inlined in x_error_handler. */ -void +static void x_error_quitter (display, error) Display *display; XErrorEvent *error; From caf533af494279767953f859b793357fd2c4cae6 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 27 Jan 2005 22:32:41 +0000 Subject: [PATCH 421/560] *** empty log message *** --- src/ChangeLog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 6c8e1cfc4b0..cd258fa08bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2005-01-27 Kim F. Storm + + * xdisp.c (get_phys_cursor_geometry): New function to calculate + phys cursor position and size for hollow cursor. Position is + aligned with get_glyph_string_clip_rect and ensures that a hollow + cursor is shown, even when the actual glyph is not visible. + + * dispextern.h (get_phys_cursor_geometry): Add prototype. + + * xterm.c (x_clip_to_row): Ensure y >= 0. + (x_draw_hollow_cursor): Use get_phys_cursor_geometry. + + * w32term.c (x_draw_hollow_cursor): Use get_phys_cursor_geometry. + + * macterm.c (x_draw_hollow_cursor): Use get_phys_cursor_geometry. + 2005-01-27 Stefan Monnier * xterm.c (x_error_quitter): Add a prototype. Make it static again. From 4f5d66403882708ed3a2fc45db6bd39c2c7e760e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 27 Jan 2005 22:33:01 +0000 Subject: [PATCH 422/560] (get_phys_cursor_geometry): Add prototype. --- src/dispextern.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dispextern.h b/src/dispextern.h index 89a8fe39aeb..3b72e54b6d1 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2644,6 +2644,8 @@ extern void x_fix_overlapping_area P_ ((struct window *, struct glyph_row *, extern void draw_phys_cursor_glyph P_ ((struct window *, struct glyph_row *, enum draw_glyphs_face)); +extern int get_phys_cursor_geometry P_ ((struct window *, struct glyph_row *, + struct glyph *, int *)); extern void erase_phys_cursor P_ ((struct window *)); extern void display_and_set_cursor P_ ((struct window *, int, int, int, int, int)); From 4d91ce74c7a8eb5a2edca77925f2999bf2acd23d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 27 Jan 2005 22:33:39 +0000 Subject: [PATCH 423/560] (x_draw_hollow_cursor): Use get_phys_cursor_geometry. --- src/macterm.c | 25 +++---------------------- src/w32term.c | 30 ++++-------------------------- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index 60eee6a4a84..9304a2d62f9 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -4731,29 +4731,10 @@ x_draw_hollow_cursor (w, row) if (cursor_glyph == NULL) return; - /* Compute the width of the rectangle to draw. If on a stretch - glyph, and `x-stretch-block-cursor' is nil, don't draw a - rectangle as wide as the glyph, but use a canonical character - width instead. */ - wd = cursor_glyph->pixel_width - 1; - if (cursor_glyph->type == STRETCH_GLYPH - && !x_stretch_cursor_p) - wd = min (FRAME_COLUMN_WIDTH (f), wd); - w->phys_cursor_width = wd; - - /* Compute frame-relative coordinates from window-relative - coordinates. */ + /* Compute frame-relative coordinates for phys cursor. */ x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y); - - /* Compute the proper height and ascent of the rectangle, based - on the actual glyph. Using the full height of the row looks - bad when there are tall images on that row. */ - h = max (min (FRAME_LINE_HEIGHT (f), row->height), - cursor_glyph->ascent + cursor_glyph->descent); - if (h < row->height) - y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; - h--; + y = get_phys_cursor_geometry (w, row, cursor_glyph, &h); + wd = w->phys_cursor_width; /* The foreground of cursor_gc is typically the same as the normal background color, which can cause the cursor box to be invisible. */ diff --git a/src/w32term.c b/src/w32term.c index 838e1f57222..738f676ceaf 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4937,7 +4937,7 @@ x_draw_hollow_cursor (w, row) struct frame *f = XFRAME (WINDOW_FRAME (w)); HDC hdc; RECT rect; - int wd, h; + int h; struct glyph *cursor_glyph; HBRUSH hb = CreateSolidBrush (f->output_data.w32->cursor_pixel); @@ -4947,34 +4947,12 @@ x_draw_hollow_cursor (w, row) if (cursor_glyph == NULL) return; - /* Compute frame-relative coordinates from window-relative - coordinates. */ + /* Compute frame-relative coordinates for phys cursor. */ rect.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - rect.top = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) - + row->ascent - w->phys_cursor_ascent); - - /* Compute the proper height and ascent of the rectangle, based - on the actual glyph. Using the full height of the row looks - bad when there are tall images on that row. */ - h = max (min (FRAME_LINE_HEIGHT (f), row->height), - cursor_glyph->ascent + cursor_glyph->descent); - if (h < row->height) - rect.top += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; - h--; - + rect.top = get_phys_cursor_geometry (w, row, cursor_glyph, &h); rect.bottom = rect.top + h; + rect.right = rect.left + w->phys_cursor_width; - /* Compute the width of the rectangle to draw. If on a stretch - glyph, and `x-stretch-block-cursor' is nil, don't draw a - rectangle as wide as the glyph, but use a canonical character - width instead. */ - wd = cursor_glyph->pixel_width; /* TODO: Why off by one compared with X? */ - if (cursor_glyph->type == STRETCH_GLYPH - && !x_stretch_cursor_p) - wd = min (FRAME_COLUMN_WIDTH (f), wd); - w->phys_cursor_width = wd; - - rect.right = rect.left + wd; hdc = get_frame_dc (f); /* Set clipping, draw the rectangle, and reset clipping again. */ w32_clip_to_row (w, row, TEXT_AREA, hdc); From 2049265a5b75d5d5b4899116c27dfaafdbcd13e3 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 27 Jan 2005 22:33:52 +0000 Subject: [PATCH 424/560] (get_phys_cursor_geometry): New function to calculate phys cursor position and size for hollow cursor. Position is aligned with get_glyph_string_clip_rect and ensures that a hollow cursor is shown, even when the actual glyph is not visible. --- src/xdisp.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index e83004d1741..aec14bcadde 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1876,6 +1876,64 @@ get_glyph_string_clip_rect (s, nr) #endif } + +/* EXPORT: + Return the position and height of the phys cursor in window W. + Set w->phys_cursor_width to width of phys cursor. +*/ + +int +get_phys_cursor_geometry (w, row, glyph, heightp) + struct window *w; + struct glyph_row *row; + struct glyph *glyph; + int *heightp; +{ + struct frame *f = XFRAME (WINDOW_FRAME (w)); + int x, y, wd, h, h0, y0; + + /* Compute the width of the rectangle to draw. If on a stretch + glyph, and `x-stretch-block-cursor' is nil, don't draw a + rectangle as wide as the glyph, but use a canonical character + width instead. */ + wd = glyph->pixel_width - 1; +#ifdef HAVE_NTGUI + wd++; /* Why? */ +#endif + if (glyph->type == STRETCH_GLYPH + && !x_stretch_cursor_p) + wd = min (FRAME_COLUMN_WIDTH (f), wd); + w->phys_cursor_width = wd; + + y = w->phys_cursor.y + row->ascent - glyph->ascent; + + /* If y is below window bottom, ensure that we still see a cursor. */ + h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height); + + h = max (h0, glyph->ascent + glyph->descent); + h0 = min (h0, glyph->ascent + glyph->descent); + + y0 = WINDOW_HEADER_LINE_HEIGHT (w); + if (y < y0) + { + h = max (h - (y0 - y) + 1, h0); + y = y0 - 1; + } + else + { + y0 = window_text_bottom_y (w) - h0; + if (y > y0) + { + h += y - y0; + y = y0; + } + } + + *heightp = h - 1; + return WINDOW_TO_FRAME_PIXEL_Y (w, y); +} + + #endif /* HAVE_WINDOW_SYSTEM */ From dbd8ee19133e033e98ced28b52bd05eaf1e19dda Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 27 Jan 2005 22:34:05 +0000 Subject: [PATCH 425/560] (x_clip_to_row): Ensure y >= 0. (x_draw_hollow_cursor): Use get_phys_cursor_geometry. --- src/xterm.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 49e635c0fa3..2db3379a264 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7150,7 +7150,7 @@ x_clip_to_row (w, row, area, gc) window_box (w, area, &window_x, &window_y, &window_width, 0); clip_rect.x = window_x; - clip_rect.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); + clip_rect.y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, row->y)); clip_rect.y = max (clip_rect.y, window_y); clip_rect.width = window_width; clip_rect.height = row->visible_height; @@ -7180,29 +7180,10 @@ x_draw_hollow_cursor (w, row) if (cursor_glyph == NULL) return; - /* Compute the width of the rectangle to draw. If on a stretch - glyph, and `x-stretch-block-cursor' is nil, don't draw a - rectangle as wide as the glyph, but use a canonical character - width instead. */ - wd = cursor_glyph->pixel_width - 1; - if (cursor_glyph->type == STRETCH_GLYPH - && !x_stretch_cursor_p) - wd = min (FRAME_COLUMN_WIDTH (f), wd); - w->phys_cursor_width = wd; - - /* Compute frame-relative coordinates from window-relative - coordinates. */ + /* Compute frame-relative coordinates for phys cursor. */ x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - y = WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y); - - /* Compute the proper height and ascent of the rectangle, based - on the actual glyph. Using the full height of the row looks - bad when there are tall images on that row. */ - h = max (min (FRAME_LINE_HEIGHT (f), row->height), - cursor_glyph->ascent + cursor_glyph->descent); - if (h < row->height) - y += row->ascent /* - w->phys_cursor_ascent */ + cursor_glyph->descent - h; - h--; + y = get_phys_cursor_geometry (w, row, cursor_glyph, &h); + wd = w->phys_cursor_width; /* The foreground of cursor_gc is typically the same as the normal background color, which can cause the cursor box to be invisible. */ From b9fbc167a866c541c2a69509b2e32e4d403187cf Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 02:20:38 +0000 Subject: [PATCH 426/560] Avoid unnecessary use of locate-library. --- lisp/ChangeLog | 2 ++ lisp/speedbar.el | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9fb3abb4aad..eb59386e0c0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-01-27 Stefan Monnier + * speedbar.el: Avoid unnecessary use of locate-library. + * international/mule-cmds.el (standard-display-european-internal): Don't fiddle with latin-1 non-break space any more since it's now special cased in the C code. diff --git a/lisp/speedbar.el b/lisp/speedbar.el index c182dffdba7..a8f74de0b11 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1,6 +1,7 @@ ;;; speedbar.el --- quick access to files and tags in a frame -;;; Copyright (C) 1996, 97, 98, 99, 2000, 01 Free Software Foundation +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2005 +;; Free Software Foundation ;; Author: Eric M. Ludlam ;; Version: 0.11a @@ -170,6 +171,8 @@ ;; - More functions to create buttons and options ;; - Timeout directories we haven't visited in a while. +;;; Code: + (require 'assoc) (require 'easymenu) @@ -201,7 +204,6 @@ :prefix "speedbar-" :group 'speedbar) -;;; Code: (defvar speedbar-initial-expansion-mode-alist '(("buffers" speedbar-buffer-easymenu-definition speedbar-buffers-key-map speedbar-buffer-buttons) @@ -373,7 +375,7 @@ is attached to." (symbol :tag "Property") (sexp :tag "Value")))) -(defcustom speedbar-use-imenu-flag (stringp (locate-library "imenu")) +(defcustom speedbar-use-imenu-flag (fboundp 'imenu) "*Non-nil means use imenu for file parsing. nil to use etags. XEmacs prior to 20.4 doesn't support imenu, therefore the default is to use etags instead. Etags support is not as robust as imenu support." @@ -3749,7 +3751,7 @@ functions to do caching and flushing if appropriate." nil -(eval-when-compile (if (locate-library "imenu") (require 'imenu))) +(eval-when-compile (condition-case nil (require 'imenu) (error nil))) (defun speedbar-fetch-dynamic-imenu (file) "Load FILE into a buffer, and generate tags using Imenu. @@ -4359,5 +4361,5 @@ If we have an image associated with it, use that image." ;; run load-time hooks (run-hooks 'speedbar-load-hook) -;;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5 +;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5 ;;; speedbar.el ends here From 2d65673fc14d611dbead03799512303324ba44fc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 28 Jan 2005 16:11:30 +0000 Subject: [PATCH 427/560] Add more keywords. --- lisp/ChangeLog | 4 ++++ lisp/descr-text.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb59386e0c0..dd0ed80e435 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-01-28 Eli Zaretskii + + * descr-text.el: Add more keywords. + 2005-01-27 Stefan Monnier * speedbar.el: Avoid unnecessary use of locate-library. diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 726d3e6e5d8..514958484b2 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -1,10 +1,10 @@ ;;; descr-text.el --- describe text mode -;; Copyright (c) 1994, 1995, 1996, 2001, 2002, 2003, 2004 +;; Copyright (c) 1994, 1995, 1996, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Boris Goldowsky -;; Keywords: faces +;; Keywords: faces, i18n, Unicode, multilingual ;; This file is part of GNU Emacs. From 996f9cdebb49d38bd5b0718d1a0f9f2479ef077a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 16:25:10 +0000 Subject: [PATCH 428/560] (access_keymap): YAILOM. --- src/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index ff7836ce23b..260d7232bb0 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1,6 +1,6 @@ /* Manipulation of keymaps - Copyright (C) 1985, 86,87,88,93,94,95,98,99, 2000, 01, 2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1998, 1999, 2000, + 2001, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -530,7 +530,7 @@ access_keymap (map, idx, t_ok, noinherit, autoload) GCPRO1 (map); /* A strange value in which Meta is set would cause infinite recursion. Protect against that. */ - if (meta_prefix_char & CHAR_META) + if (XINT (meta_prefix_char) & CHAR_META) meta_prefix_char = make_number (27); meta_map = get_keymap (access_keymap (map, meta_prefix_char, t_ok, noinherit, autoload), From f9475d97eec72a62b179f98eb086a406f6c44101 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 16:27:13 +0000 Subject: [PATCH 429/560] (eval-defun-1): Make sure `defvar' always sets the default value. --- lisp/emacs-lisp/lisp-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index f181f3683f0..86c3ac1bab4 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1,6 +1,6 @@ ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands -;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2003, 2004 +;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -602,7 +602,7 @@ Reinitialize the face according to the `defface' specification." (boundp (cadr form))) ;; Force variable to be re-set. `(progn (defvar ,(nth 1 form) nil ,@(nthcdr 3 form)) - (setq ,(nth 1 form) ,(nth 2 form)))) + (setq-default ,(nth 1 form) ,(nth 2 form)))) ;; `defcustom' is now macroexpanded to ;; `custom-declare-variable' with a quoted value arg. ((and (eq (car form) 'custom-declare-variable) From f5d01350c3c6b5a50d4324cd1e894fb3fdd71f2f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 16:27:25 +0000 Subject: [PATCH 430/560] (message-beginning-of-line): Change the behavior when invoked between BOL and : so that it first moves backward. --- lisp/gnus/message.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 113547741c0..d88fd54b144 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1,5 +1,5 @@ ;;; message.el --- composing mail and news messages -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -800,7 +800,7 @@ variable isn't used." ;; is nil. See: http://article.gmane.org/gmane.emacs.gnus.general/51138 (defcustom message-generate-headers-first '(references) "Which headers should be generated before starting to compose a message. -If `t', generate all required headers. This can also be a list of headers to +If t, generate all required headers. This can also be a list of headers to generate. The variables `message-required-news-headers' and `message-required-mail-headers' specify which headers to generate. @@ -5295,10 +5295,10 @@ outside the message header or if the option `message-beginning-of-line' is nil. If point is in the message header and on a (non-continued) header -line, move point to the beginning of the header value. If point -is already there, move point to beginning of line. Therefore, -repeated calls will toggle point between beginning of field and -beginning of line." +line, move point to the beginning of the header value or the beginning of line, +whichever is closer. If point is already at beginning of line, move point to +beginning of header value. Therefore, repeated calls will toggle point +between beginning of field and beginning of line." (interactive "p") (let ((zrs 'zmacs-region-stays)) (when (and (interactive-p) (boundp zrs)) @@ -5309,9 +5309,9 @@ beginning of line." (bol (progn (beginning-of-line n) (point))) (eol (gnus-point-at-eol)) (eoh (re-search-forward ": *" eol t))) - (if (or (not eoh) (equal here eoh)) - (goto-char bol) - (goto-char eoh))) + (goto-char + (if (and eoh (or (< eoh here) (= bol here))) + eoh bol))) (beginning-of-line n))) (defun message-buffer-name (type &optional to group) @@ -6880,5 +6880,5 @@ regexp VARSTR." ;; coding: iso-8859-1 ;; End: -;;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 +;; arch-tag: 94b32cac-4504-4b6c-8181-030ebf380ee0 ;;; message.el ends here From 5c243ee4377a8c2328167147ddec963a1ba988de Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 16:29:27 +0000 Subject: [PATCH 431/560] *** empty log message *** --- lisp/gnus/ChangeLog | 12 ++++++++---- src/ChangeLog | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 77a600427e2..86e279685c1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2005-01-28 Stefan Monnier + + * message.el (message-beginning-of-line): Change the behavior when + invoked between BOL and : so that it first moves backward. + 2005-01-20 Katsumi Yamaoka * mm-decode.el (mm-insert-part): Switch the multibyteness of data @@ -14,8 +19,7 @@ * mm-bodies.el (mm-body-encoding): Don't permit 7-bit to be used when mm-use-ultra-safe-encoding is enabled (e.g., for PGP/MIME) - and we have trailing white space. Reported by Werner Koch - . + and we have trailing white space. Reported by Werner Koch . 2004-12-17 Kim F. Storm @@ -58,8 +62,8 @@ 2004-12-13 Katsumi Yamaoka - * gnus-group.el (gnus-group-make-rss-group): Use - gnus-group-make-group instead of gnus-group-unsubscribe-group. + * gnus-group.el (gnus-group-make-rss-group): + Use gnus-group-make-group instead of gnus-group-unsubscribe-group. * gnus-start.el (gnus-setup-news): Honor user's setting to gnus-message-archive-method. Suggested by Lute Kamstra diff --git a/src/ChangeLog b/src/ChangeLog index cd258fa08bd..6030a3a4886 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-28 Stefan Monnier + + * keymap.c (access_keymap): YAILOM. + 2005-01-27 Kim F. Storm * xdisp.c (get_phys_cursor_geometry): New function to calculate @@ -518,8 +522,13 @@ (install_window_handler) [TARGET_API_MAC_CARBON]: Register handlers for tracking/receiving drag-and-drop items. (do_ae_open_documents): Generate unibyte strings for filenames. +<<<<<<< ChangeLog + (mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise. + Reject only non-filename items. Set event modifiers and return value. +======= (mac_do_receive_drag) [TARGET_API_MAC_CARBON] : Likewise. Reject only non-filename items. Set event modifiers, and return value. +>>>>>>> 1.4187 2004-12-28 Dan Nicolaescu @@ -629,7 +638,12 @@ (x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window if the position is neither user-specified nor program-specified. (x_free_frame_resources): Free size_hints. +<<<<<<< ChangeLog + (x_wm_set_size_hint): Allocate size_hints if needed. + Set size_hints. +======= (x_wm_set_size_hint): Allocate size_hints if needed. Set size_hints. +>>>>>>> 1.4187 (mac_clear_font_name_table): New function. (mac_do_list_fonts): Initialize font_name_table if needed. (x_list_fonts): Don't initialize font_name_table. Add BLOCK_INPUT @@ -681,7 +695,11 @@ 2004-12-27 Richard M. Stallman +<<<<<<< ChangeLog + * buffer.c (Fbuffer_disable_undo): Delete (moved to simple.el). +======= * buffer.c (Fbuffer_disable_undo): Delete (move to simple.el). +>>>>>>> 1.4187 (syms_of_buffer): Don't defsubr it. * process.c (list_processes_1): Set undo_list instead From 2a4960f909c831e16dc4e85fec39652f9a601bed Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 17:07:57 +0000 Subject: [PATCH 432/560] (describe-char-unicodedata-file): Docstring fix. --- lisp/descr-text.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 514958484b2..5ab2fec4fad 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -217,7 +217,7 @@ otherwise." (defcustom describe-char-unicodedata-file nil "Location of Unicode data file. This is the UnicodeData.txt file from the Unicode consortium, used for -diagnostics. If it is non-nil `describe-char-after' will print data +diagnostics. If it is non-nil `describe-char' will print data looked up from it. This facility is mostly of use to people doing multilingual development. From f7105ede2ef431b621e556c7d09ab9beb957467f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 18:42:30 +0000 Subject: [PATCH 433/560] (customize-group-other-window, custom-buffer-create-other-window): Don't override special-display-*. --- lisp/cus-edit.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 8a60163181a..89206c77e76 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1,6 +1,7 @@ ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages ;; -;; Copyright (C) 1996,97,1999,2000,01,02,03,2004 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen ;; Maintainer: FSF @@ -898,8 +899,6 @@ then prompt for the MODE to customize." (let ( ;; Copied from `custom-buffer-create-other-window'. (pop-up-windows t) - (special-display-buffer-names nil) - (special-display-regexps nil) (same-window-buffer-names nil) (same-window-regexps nil)) (pop-to-buffer name)) @@ -1246,8 +1245,6 @@ SYMBOL is a customization option, and WIDGET is a widget for editing that option." (unless name (setq name "*Customization*")) (let ((pop-up-windows t) - (special-display-buffer-names nil) - (special-display-regexps nil) (same-window-buffer-names nil) (same-window-regexps nil)) (pop-to-buffer (custom-get-fresh-buffer name)) @@ -4187,5 +4184,5 @@ if that value is non-nil." (provide 'cus-edit) -;;; arch-tag: 64533aa4-1b1a-48c3-8812-f9dc718e8a6f +;; arch-tag: 64533aa4-1b1a-48c3-8812-f9dc718e8a6f ;;; cus-edit.el ends here From e4105348b2aa19be95a5cc98405b00ce967c34dd Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 18:55:14 +0000 Subject: [PATCH 434/560] (custom-mode-map): Make it dense. --- lisp/cus-edit.el | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 89206c77e76..989a9f16840 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4069,23 +4069,23 @@ The format is suitable for use with `easy-menu-define'." ;;; The Custom Mode. -(defvar custom-mode-map nil - "Keymap for `custom-mode'.") - -(unless custom-mode-map +(defvar custom-mode-map ;; This keymap should be dense, but a dense keymap would prevent inheriting ;; "\r" bindings from the parent map. - (setq custom-mode-map (make-sparse-keymap)) - (set-keymap-parent custom-mode-map widget-keymap) - (suppress-keymap custom-mode-map) - (define-key custom-mode-map " " 'scroll-up) - (define-key custom-mode-map "\177" 'scroll-down) - (define-key custom-mode-map "\C-x\C-s" 'Custom-save) - (define-key custom-mode-map "q" 'Custom-buffer-done) - (define-key custom-mode-map "u" 'Custom-goto-parent) - (define-key custom-mode-map "n" 'widget-forward) - (define-key custom-mode-map "p" 'widget-backward) - (define-key custom-mode-map [mouse-1] 'Custom-move-and-invoke)) + ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. + (let ((map (make-keymap))) + (set-keymap-parent map widget-keymap) + (suppress-keymap map) + (define-key map " " 'scroll-up) + (define-key map "\177" 'scroll-down) + (define-key map "\C-x\C-s" 'Custom-save) + (define-key map "q" 'Custom-buffer-done) + (define-key map "u" 'Custom-goto-parent) + (define-key map "n" 'widget-forward) + (define-key map "p" 'widget-backward) + (define-key map [mouse-1] 'Custom-move-and-invoke) + map) + "Keymap for `custom-mode'.") (defun Custom-move-and-invoke (event) "Move to where you click, and if it is an active field, invoke it." From 150bbae7a4e01c02d3daba544083c10e95494b0b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 28 Jan 2005 18:57:45 +0000 Subject: [PATCH 435/560] (scheme-mode-variables): Set comment-add. (dsssl-mode): Use define-derived-mode. (scheme-mode-initialize): Remove. (scheme-mode): Use run-mode-hooks. --- lisp/progmodes/scheme.el | 48 ++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 13dd790b6a0..bf0f18d5bba 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -1,6 +1,7 @@ ;;; scheme.el --- Scheme (and DSSSL) editing mode -;; Copyright (C) 1986, 87, 88, 97, 1998 Free Software Foundation, Inc. +;; Copyright (C) 1986, 1987, 1988, 1997, 1998, 2005 +;; Free Software Foundation, Inc. ;; Author: Bill Rozas ;; Adapted-by: Dave Love @@ -144,6 +145,7 @@ (setq outline-regexp ";;; \\|(....") (make-local-variable 'comment-start) (setq comment-start ";") + (set (make-local-variable 'comment-add) 1) (make-local-variable 'comment-start-skip) ;; Look within the line for a ; following an even number of backslashes ;; after either a non-backslash or the line beginning. @@ -171,17 +173,11 @@ (defvar scheme-mode-line-process "") -(defvar scheme-mode-map nil - "Keymap for Scheme mode. -All commands in `lisp-mode-shared-map' are inherited by this map.") - -(unless scheme-mode-map - (let ((map (make-sparse-keymap "Scheme"))) - (setq scheme-mode-map (make-sparse-keymap)) - (set-keymap-parent scheme-mode-map lisp-mode-shared-map) - (define-key scheme-mode-map [menu-bar] (make-sparse-keymap)) - (define-key scheme-mode-map [menu-bar scheme] - (cons "Scheme" map)) +(defvar scheme-mode-map + (let ((smap (make-sparse-keymap)) + (map (make-sparse-keymap "Scheme"))) + (set-keymap-parent smap lisp-mode-shared-map) + (define-key smap [menu-bar scheme] (cons "Scheme" map)) (define-key map [run-scheme] '("Run Inferior Scheme" . run-scheme)) (define-key map [uncomment-region] '("Uncomment Out Region" . (lambda (beg end) @@ -192,7 +188,10 @@ All commands in `lisp-mode-shared-map' are inherited by this map.") (define-key map [indent-line] '("Indent Line" . lisp-indent-line)) (put 'comment-region 'menu-enable 'mark-active) (put 'uncomment-region 'menu-enable 'mark-active) - (put 'indent-region 'menu-enable 'mark-active))) + (put 'indent-region 'menu-enable 'mark-active) + smap) + "Keymap for Scheme mode. +All commands in `lisp-mode-shared-map' are inherited by this map.") ;; Used by cmuscheme (defun scheme-mode-commands (map) @@ -222,14 +221,11 @@ Entry to this mode calls the value of `scheme-mode-hook' if that value is non-nil." (interactive) (kill-all-local-variables) - (scheme-mode-initialize) - (scheme-mode-variables) - (run-hooks 'scheme-mode-hook)) - -(defun scheme-mode-initialize () (use-local-map scheme-mode-map) (setq major-mode 'scheme-mode) - (setq mode-name "Scheme")) + (setq mode-name "Scheme") + (scheme-mode-variables) + (run-mode-hooks 'scheme-mode-hook)) (defgroup scheme nil "Editing Scheme code" @@ -346,7 +342,7 @@ See `run-hooks'." "Default expressions to highlight in Scheme modes.") ;;;###autoload -(defun dsssl-mode () +(define-derived-mode dsssl-mode scheme-mode "DSSSL" "Major mode for editing DSSSL code. Editing commands are similar to those of `lisp-mode'. @@ -357,20 +353,16 @@ Blank lines separate paragraphs. Semicolons start comments. Entering this mode runs the hooks `scheme-mode-hook' and then `dsssl-mode-hook' and inserts the value of `dsssl-sgml-declaration' if that variable's value is a string." - (interactive) - (kill-all-local-variables) - (use-local-map scheme-mode-map) - (scheme-mode-initialize) (make-local-variable 'page-delimiter) (setq page-delimiter "^;;;" ; ^L not valid SGML char major-mode 'dsssl-mode mode-name "DSSSL") ;; Insert a suitable SGML declaration into an empty buffer. + ;; FIXME: This should use `auto-insert-alist' instead. (and (zerop (buffer-size)) (stringp dsssl-sgml-declaration) (not buffer-read-only) (insert dsssl-sgml-declaration)) - (scheme-mode-variables) (setq font-lock-defaults '(dsssl-font-lock-keywords nil t (("+-*/.<>=?$%_&~^:" . "w")) beginning-of-defun @@ -378,9 +370,7 @@ that variable's value is a string." (set (make-local-variable 'imenu-case-fold-search) nil) (setq imenu-generic-expression dsssl-imenu-generic-expression) (set (make-local-variable 'imenu-syntax-alist) - '(("+-*/.<>=?$%_&~^:" . "w"))) - (run-hooks 'scheme-mode-hook) - (run-hooks 'dsssl-mode-hook)) + '(("+-*/.<>=?$%_&~^:" . "w")))) ;; Extra syntax for DSSSL. This isn't separated from Scheme, but ;; shouldn't cause much trouble in scheme-mode. @@ -558,5 +548,5 @@ that variable's value is a string." (provide 'scheme) -;;; arch-tag: a8f06bc1-ad11-42d2-9e36-ce651df37a90 +;; arch-tag: a8f06bc1-ad11-42d2-9e36-ce651df37a90 ;;; scheme.el ends here From c7c87573946cab9307993dbdb0866a1e9d78b015 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 28 Jan 2005 21:48:09 +0000 Subject: [PATCH 436/560] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd0ed80e435..ba56b2688e0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-29 Nick Roberts + + * progmodes/gdb-ui.el (gdb-info-breakpoints-custom) + (gdb-goto-breakpoint): Make breakpoint handling work on template + functions in C++. Reported by Martin Reed + 2005-01-28 Eli Zaretskii * descr-text.el: Add more keywords. From 14788d12b0a9b2fddd2e88f5d15afed8e2b9862d Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 28 Jan 2005 21:48:48 +0000 Subject: [PATCH 437/560] (gdb-info-breakpoints-custom) (gdb-goto-breakpoint): Make breakpoint handling work on template functions in C++. Reported by Martin Reed --- lisp/progmodes/gdb-ui.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 1827589387e..a89f4b1694f 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1143,7 +1143,7 @@ static char *magick[] = { (setq bptno (match-string 1)) (setq flag (char-after (match-beginning 2))) (beginning-of-line) - (if (re-search-forward "in\\s-+\\S-+\\s-+at\\s-+" nil t) + (if (re-search-forward "in.*at\\s-+" nil t) (progn (looking-at "\\(\\S-+\\):\\([0-9]+\\)") (let ((line (match-string 2)) (buffer-read-only nil) @@ -1298,7 +1298,7 @@ static char *magick[] = { (save-excursion (beginning-of-line 1) (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (looking-at ".*in\\s-+\\S-+\\s-+at\\s-+\\(\\S-*\\):\\([0-9]+\\)") + (looking-at ".*in.*at\\s-+\\(\\S-*\\):\\([0-9]+\\)") (looking-at "[0-9]+\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)")) (let ((line (match-string 2)) From aba1948af5107ad44c467e4f97792af5ce75a7d7 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 28 Jan 2005 23:52:19 +0000 Subject: [PATCH 438/560] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-58 Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-7 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-8 - miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-11 Update from CVS 2005-01-28 Katsumi Yamaoka * lisp/gnus/gnus-art.el (gnus-article-setup-buffer): Kill and re-create the article buffer when editing of the article is discarded. (gnus-article-prepare): Revert. 2005-01-28 Katsumi Yamaoka * lisp/gnus/gnus-art.el (gnus-article-prepare): Remove message-strip-forbidden-properties from the local hook. 2005-01-24 Katsumi Yamaoka * lisp/gnus/mml.el (mml-generate-mime-1): Convert string into unibyte when inserting " *mml*" buffer's contents into a unibyte temp buffer. 2005-01-28 Lars Magne Ingebrigtsen * man/gnus.texi: Some edits based on comments from David Abrahams. 2005-01-24 Katsumi Yamaoka * man/gnus.texi (RSS): Fix the keystroke. --- lisp/gnus/ChangeLog | 16 +++++++ lisp/gnus/gnus-art.el | 19 +++++--- lisp/gnus/mml.el | 6 ++- man/ChangeLog | 8 ++++ man/gnus.texi | 103 ++++++++++++++++++++++++------------------ 5 files changed, 98 insertions(+), 54 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 86e279685c1..2fbab6bea54 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -3,6 +3,22 @@ * message.el (message-beginning-of-line): Change the behavior when invoked between BOL and : so that it first moves backward. +2005-01-28 Katsumi Yamaoka + + * gnus-art.el (gnus-article-setup-buffer): Kill and re-create the + article buffer when editing of the article is discarded. + (gnus-article-prepare): Revert. + +2005-01-28 Katsumi Yamaoka + + * gnus-art.el (gnus-article-prepare): Remove + message-strip-forbidden-properties from the local hook. + +2005-01-24 Katsumi Yamaoka + + * mml.el (mml-generate-mime-1): Convert string into unibyte when + inserting " *mml*" buffer's contents into a unibyte temp buffer. + 2005-01-20 Katsumi Yamaoka * mm-decode.el (mm-insert-part): Switch the multibyteness of data diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7450fee69ee..8a81176a5f6 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1,5 +1,5 @@ ;;; gnus-art.el --- article mode commands for Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -3743,14 +3743,19 @@ commands: (mm-enable-multibyte) (setq major-mode 'gnus-original-article-mode) (make-local-variable 'gnus-original-article)) - (if (get-buffer name) + (if (and (get-buffer name) + (with-current-buffer name + (if gnus-article-edit-mode + (if (y-or-n-p "Article mode edit in progress; discard? ") + (progn + (set-buffer-modified-p nil) + (gnus-kill-buffer name) + (message "") + nil) + (error "Action aborted")) + t))) (save-excursion (set-buffer name) - (when (and gnus-article-edit-mode - (buffer-modified-p) - (not - (y-or-n-p "Article mode edit in progress; discard? "))) - (error "Action aborted")) (set (make-local-variable 'gnus-article-edit-mode) nil) (when gnus-article-mime-handles (mm-destroy-parts gnus-article-mime-handles) diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 8efaede70e0..f774e53499a 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -1,5 +1,5 @@ ;;; mml.el --- A package for parsing and validating MML documents -;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 +;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -472,7 +472,9 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (mm-with-unibyte-buffer (cond ((cdr (assq 'buffer cont)) - (insert-buffer-substring (cdr (assq 'buffer cont)))) + (insert (with-current-buffer (cdr (assq 'buffer cont)) + (mm-with-unibyte-current-buffer + (buffer-string))))) ((and (setq filename (cdr (assq 'filename cont))) (not (equal (cdr (assq 'nofile cont)) "yes"))) (let ((coding-system-for-read mm-binary-coding-system)) diff --git a/man/ChangeLog b/man/ChangeLog index 0e4f2a88bbf..5f69fc7d856 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,11 @@ +2005-01-28 Lars Magne Ingebrigtsen + + * gnus.texi: Some edits based on comments from David Abrahams. + +2005-01-24 Katsumi Yamaoka + + * gnus.texi (RSS): Fix the keystroke. + 2005-01-26 Lute Kamstra * cmdargs.texi (Initial Options): Add a cross reference to `Init diff --git a/man/gnus.texi b/man/gnus.texi index b0feef1bf25..d2812890a1c 100644 --- a/man/gnus.texi +++ b/man/gnus.texi @@ -391,25 +391,25 @@ the program. @end iftex @menu -* Starting Up:: Finding news can be a pain. -* Group Buffer:: Selecting, subscribing and killing groups. -* Summary Buffer:: Reading, saving and posting articles. -* Article Buffer:: Displaying and handling articles. -* Composing Messages:: Information on sending mail and news. -* Select Methods:: Gnus reads all messages from various select methods. -* Scoring:: Assigning values to articles. -* Various:: General purpose settings. -* The End:: Farewell and goodbye. -* Appendices:: Terminology, Emacs intro, @acronym{FAQ}, History, Internals. -* Index:: Variable, function and concept index. -* Key Index:: Key Index. +* Starting Up:: Finding news can be a pain. +* Group Buffer:: Selecting, subscribing and killing groups. +* Summary Buffer:: Reading, saving and posting articles. +* Article Buffer:: Displaying and handling articles. +* Composing Messages:: Information on sending mail and news. +* Select Methods:: Gnus reads all messages from various select methods. +* Scoring:: Assigning values to articles. +* Various:: General purpose settings. +* The End:: Farewell and goodbye. +* Appendices:: Terminology, Emacs intro, @acronym{FAQ}, History, Internals. +* Index:: Variable, function and concept index. +* Key Index:: Key Index. Other related manuals -* Message:(message). Composing messages. -* Emacs-MIME:(emacs-mime). Composing messages; @acronym{MIME}-specific parts. -* Sieve:(sieve). Managing Sieve scripts in Emacs. -* PGG:(pgg). @acronym{PGP/MIME} with Gnus. +* Message:(message). Composing messages. +* Emacs-MIME:(emacs-mime). Composing messages; @acronym{MIME}-specific parts. +* Sieve:(sieve). Managing Sieve scripts in Emacs. +* PGG:(pgg). @acronym{PGP/MIME} with Gnus. @detailmenu --- The Detailed Node Listing --- @@ -951,17 +951,16 @@ If you puzzle at any terms used in this manual, please refer to the terminology section (@pxref{Terminology}). @menu -* Finding the News:: Choosing a method for getting news. -* The First Time:: What does Gnus do the first time you start it? -* The Server is Down:: How can I read my mail then? -* Slave Gnusae:: You can have more than one Gnus active at a time. -* Fetching a Group:: Starting Gnus just to read a group. -* New Groups:: What is Gnus supposed to do with new groups? -* Changing Servers:: You may want to move from one server to another. -* Startup Files:: Those pesky startup files---@file{.newsrc}. -* Auto Save:: Recovering from a crash. -* The Active File:: Reading the active file over a slow line Takes Time. -* Startup Variables:: Other variables you might change. +* Finding the News:: Choosing a method for getting news. +* The First Time:: What does Gnus do the first time you start it? +* The Server is Down:: How can I read my mail then? +* Slave Gnusae:: You can have more than one Gnus active at a time. +* New Groups:: What is Gnus supposed to do with new groups? +* Changing Servers:: You may want to move from one server to another. +* Startup Files:: Those pesky startup files---@file{.newsrc}. +* Auto Save:: Recovering from a crash. +* The Active File:: Reading the active file over a slow line Takes Time. +* Startup Variables:: Other variables you might change. @end menu @@ -992,7 +991,8 @@ If you want to read directly from the local spool, say: If you can use a local spool, you probably should, as it will almost certainly be much faster. But do not use the local spool if your -server is running Leafnode; in this case, use @code{(nntp "localhost")}. +server is running Leafnode (which is a simple, standalone private news +server); in this case, use @code{(nntp "localhost")}. @vindex gnus-nntpserver-file @cindex NNTPSERVER @@ -1051,8 +1051,8 @@ you would typically set this variable to @section The First Time @cindex first time usage -If no startup files exist, Gnus will try to determine what groups should -be subscribed by default. +If no startup files exist (@pxref{Startup Files}), Gnus will try to +determine what groups should be subscribed by default. @vindex gnus-default-subscribed-newsgroups If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus @@ -1139,16 +1139,6 @@ file. If you answer ``yes'', the unsaved changes to the master will be incorporated into the slave. If you answer ``no'', the slave may see some messages as unread that have been read in the master. -@node Fetching a Group -@section Fetching a Group -@cindex fetching a group - -@findex gnus-fetch-group -It is sometimes convenient to be able to just say ``I want to read this -group and I don't care whether Gnus has been started or not''. This is -perhaps more useful for people who write code than for users, but the -command @code{gnus-fetch-group} provides this functionality in any case. -It takes the group name as a parameter. @node New Groups @@ -1400,8 +1390,10 @@ cache for all groups). @cindex .newsrc.el @cindex .newsrc.eld -Now, you all know about the @file{.newsrc} file. All subscription -information is traditionally stored in this file. +Most common Unix news readers use a shared startup file called +@file{.newsrc}. This file contains all the information about what +groups are subscribed, and which articles in these groups have been +read. Things got a bit more complicated with @sc{gnus}. In addition to keeping the @file{.newsrc} file updated, it also used a file called @@ -1426,8 +1418,10 @@ the file and save some space, as well as exiting from Gnus faster. However, this will make it impossible to use other newsreaders than Gnus. But hey, who would want to, right? Similarly, setting @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the -@file{.newsrc} file and any @file{.newsrc-SERVER} files, which is -convenient if you have a tendency to use Netscape once in a while. +@file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be +convenient if you use a different news reader occasionally, and you +want to read a different subset of the available groups with that +news reader. @vindex gnus-save-killed-list If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus @@ -15884,7 +15878,7 @@ Use @kbd{G R} from the summary buffer to subscribe to a feed---you will be prompted for the location of the feed. An easy way to get started with @code{nnrss} is to say something like -the following in the group buffer: @kbd{B nnrss RET y}, then +the following in the group buffer: @kbd{B nnrss RET RET y}, then subscribe to groups. The following @code{nnrss} variables can be altered: @@ -20607,6 +20601,7 @@ four days, Gnus will decay the scores four times, for instance. * Undo:: Some actions can be undone. * Predicate Specifiers:: Specifying predicates. * Moderation:: What to do if you're a moderator. +* Fetching a Group:: Starting Gnus just to read a group. * Image Enhancements:: Modern versions of Emacs/XEmacs can display images. * Fuzzy Matching:: What's the big fuzz? * Thwarting Email Spam:: A how-to on avoiding unsolicited commercial email. @@ -21878,6 +21873,18 @@ To use moderation mode in these two groups, say: @end lisp +@node Fetching a Group +@section Fetching a Group +@cindex fetching a group + +@findex gnus-fetch-group +It is sometimes convenient to be able to just say ``I want to read this +group and I don't care whether Gnus has been started or not''. This is +perhaps more useful for people who write code than for users, but the +command @code{gnus-fetch-group} provides this functionality in any case. +It takes the group name as a parameter. + + @node Image Enhancements @section Image Enhancements @@ -26575,6 +26582,12 @@ The act of asking the server for info on a group and computing the number of unread articles is called @dfn{activating the group}. Un-activated groups are listed with @samp{*} in the group buffer. +@item spool +@cindex spool +News servers store their articles locally in one fashion or other. +One old-fashioned storage method is to have just one file per +article. That's called a ``traditional spool''. + @item server @cindex server A machine one can connect to and get news (or mail) from. From 88cc5da7a59989a18b6e5f4fc66a8149051bc002 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 29 Jan 2005 06:54:40 +0000 Subject: [PATCH 439/560] *** empty log message *** --- lisp/ChangeLog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba56b2688e0..04c850fffda 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,7 +2,9 @@ * progmodes/gdb-ui.el (gdb-info-breakpoints-custom) (gdb-goto-breakpoint): Make breakpoint handling work on template - functions in C++. Reported by Martin Reed + functions in C++. Reported by Martin Reed + (gdb-assembler-custom): Update to recognise breakpoint information + added on 2005-01-19. 2005-01-28 Eli Zaretskii From 190def626e1f80076ee355c4fd02d107f1252424 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 29 Jan 2005 06:55:14 +0000 Subject: [PATCH 440/560] (gdb-info-breakpoints-custom) (gdb-goto-breakpoint): Make breakpoint handling work on template functions in C++. Reported by Martin Reed (gdb-assembler-custom): Update to recognise breakpoint information added on 2005-01-19. --- lisp/progmodes/gdb-ui.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index a89f4b1694f..2769023605e 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -1902,7 +1902,7 @@ BUFFER nil or omitted means use the current buffer." (defun gdb-assembler-custom () (let ((buffer (gdb-get-buffer 'gdb-assembler-buffer)) - (pos 1) (address) (flag)) + (pos 1) (address) (flag) (bptno)) (with-current-buffer buffer (if (not (equal gdb-current-address "main")) (progn @@ -1924,16 +1924,17 @@ BUFFER nil or omitted means use the current buffer." (if (looking-at "[^\t].*breakpoint") (progn (looking-at - "[0-9]*\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*0x\\(\\S-*\\)") - (setq flag (char-after (match-beginning 1))) - (setq address (match-string 2)) + "\\([0-9]+\\)\\s-+\\S-+\\s-+\\S-+\\s-+\\(.\\)\\s-+0x\\(\\S-+\\)") + (setq bptno (match-string 1)) + (setq flag (char-after (match-beginning 2))) + (setq address (match-string 3)) ;; remove leading 0s from output of info break. (if (string-match "^0+\\(.*\\)" address) (setq address (match-string 1 address))) (with-current-buffer buffer (goto-char (point-min)) (if (re-search-forward address nil t) - (gdb-put-breakpoint-icon (eq flag ?y)))))))) + (gdb-put-breakpoint-icon (eq flag ?y) bptno))))))) (if (not (equal gdb-current-address "main")) (set-window-point (get-buffer-window buffer 0) pos)))) From 5eb8942bad5e33a6d9b29c51f8cd1eac1e553ea0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Jan 2005 13:22:21 +0000 Subject: [PATCH 441/560] (widget-specify-button): If mouse pointer shape cannot be changed, use mouse face instead. --- lisp/wid-edit.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 5e67255eac9..16de985fa3c 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -391,7 +391,11 @@ new value.") (overlay-put overlay 'evaporate t) ;; We want to avoid the face with image buttons. (unless (widget-get widget :suppress-face) - (overlay-put overlay 'face (widget-apply widget :button-face-get))) + (overlay-put overlay 'face (widget-apply widget :button-face-get)) + ; Text terminals cannot change mouse pointer shape, so use mouse + ; face instead. + (or (display-graphic-p) + (overlay-put overlay 'mouse-face widget-mouse-face))) (overlay-put overlay 'pointer 'hand) (overlay-put overlay 'follow-link follow-link) (overlay-put overlay 'help-echo help-echo))) From 9172ffcd36b3a7891d04cddfa19dacef110fc7f4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Jan 2005 13:55:46 +0000 Subject: [PATCH 442/560] (Type Keywords): Uncomment the xref to the help-echo property documentation. --- lispref/customize.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/customize.texi b/lispref/customize.texi index 8ad0312e4ea..225a487af9b 100644 --- a/lispref/customize.texi +++ b/lispref/customize.texi @@ -983,7 +983,7 @@ the echo area. In addition, @var{motion-doc} is used as the mouse @code{help-echo} string and may actually be a function or form evaluated to yield a help string. If it is a function, it is called with one argument, the widget. -@c @xref{Text help-echo}. +@xref{Text help-echo}. @item :match @var{function} Specify how to decide whether a value matches the type. The From d94f2aab083f7c32708ee29615cc6a4601e149fe Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Jan 2005 13:58:04 +0000 Subject: [PATCH 443/560] (Overlay Properties): Fix the index entry for help-echo overlay property. --- lispref/display.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/display.texi b/lispref/display.texi index f24432615e4..bccab7323e7 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -1209,7 +1209,7 @@ or shorter, higher or lower, wider or narrower, or replaced with an image. @xref{Display Property}. @item help-echo -@kindex help-echo @r{(text property)} +@kindex help-echo @r{(overlay property)} If an overlay has a @code{help-echo} property, then when you move the mouse onto the text in the overlay, Emacs displays a help string in the echo area, or in the tooltip window. For details see @ref{Text From ef6938c57d14f39c46b7b235117a90555f7a62c3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Jan 2005 14:02:43 +0000 Subject: [PATCH 444/560] (Special Properties) : Use `pos' consistently in description of the help-echo property. Use @code{nil} instead of @var{nil}. --- lispref/text.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lispref/text.texi b/lispref/text.texi index 338be03baf1..785e7b99467 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -2892,10 +2892,10 @@ Manual}). If the value of the @code{help-echo} property is a function, that function is called with three arguments, @var{window}, @var{object} and -@var{position} and should return a help string or @var{nil} for +@var{pos} and should return a help string or @code{nil} for none. The first argument, @var{window} is the window in which the help was found. The second, @var{object}, is the buffer, overlay or -string which had the @code{help-echo} property. The @var{position} +string which had the @code{help-echo} property. The @var{pos} argument is as follows: @itemize @bullet{} From 16bbbfd864154333809fd679d099c729b703ee6e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Jan 2005 14:04:57 +0000 Subject: [PATCH 445/560] (Misc Events): Describe the help-echo event. --- lispref/commands.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lispref/commands.texi b/lispref/commands.texi index b1bc552db36..293d72783c5 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -1547,6 +1547,21 @@ The usual way to handle this event is by visiting these files. This kind of event is generated, at present, only on some kinds of systems. +@cindex @code{help-echo} event +@item help-echo +This kind of event is generated when a mouse pointer moves onto a +portion of buffer text which has a @code{help-echo} text property. +The generated event has this form: + +@example + (help-echo @var{frame} @var{help} @var{window} @var{object} @var{pos}) +@end example + +@noindent +The precise meaning of the event parameters and the way these +parameters are used to display the help-echo text are described in +@ref{Text help-echo}. + @cindex @code{usr1-signal} event @cindex @code{usr2-signal} event @item usr1-signal From 28d986b971b61e745ce7d3ef9b63e2b4ad3426f0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Jan 2005 14:05:34 +0000 Subject: [PATCH 446/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ lispref/ChangeLog | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04c850fffda..4699f639d57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-29 Eli Zaretskii + + * wid-edit.el (widget-specify-button): If mouse pointer shape + cannot be changed, use mouse face instead. + 2005-01-29 Nick Roberts * progmodes/gdb-ui.el (gdb-info-breakpoints-custom) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index c871d5aad87..c0ce2c6ff0f 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,17 @@ +2005-01-29 Eli Zaretskii + + * commands.texi (Misc Events): Describe the help-echo event. + + * text.texi (Special Properties) : Use `pos' + consistently in description of the help-echo property. Use + @code{nil} instead of @var{nil}. + + * display.texi (Overlay Properties): Fix the index entry for + help-echo overlay property. + + * customize.texi (Type Keywords): Uncomment the xref to the + help-echo property documentation. + 2005-01-23 Kim F. Storm * windows.texi (Window Start): Fix `pos-visible-in-window-p' From cf63e6fa17ead6154ec0f4253e9e8a27618100da Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Jan 2005 15:52:07 +0000 Subject: [PATCH 447/560] (compilation-start): Bind buffer-read-only to nil before invoking call-process. Reset buffer's modified flag after fontifying it in the no-async branch. --- lisp/ChangeLog | 4 ++++ lisp/progmodes/compile.el | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4699f639d57..0ac939a0d6a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2005-01-29 Eli Zaretskii + * progmodes/compile.el (compilation-start): Bind buffer-read-only + to nil before invoking call-process. Reset buffer's modified flag + after fontifying it in the no-async branch. + * wid-edit.el (widget-specify-button): If mouse pointer shape cannot be changed, use mouse face instead. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 601eb03946e..7b401da794e 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -985,8 +985,9 @@ Returns the compilation buffer created." (setq mode-line-process ":run") (force-mode-line-update) (sit-for 0) ; Force redisplay - (let ((status (call-process shell-file-name nil outbuf nil "-c" - command))) + (let* ((buffer-read-only nil) ; call-process needs to modify outbuf + (status (call-process shell-file-name nil outbuf nil "-c" + command))) (cond ((numberp status) (compilation-handle-exit 'exit status (if (zerop status) @@ -1003,6 +1004,7 @@ exited abnormally with code %d\n" ;; fontified, so fontify it now. (let ((font-lock-verbose nil)) ; shut up font-lock messages (font-lock-fontify-buffer)) + (set-buffer-modified-p nil) (message "Executing `%s'...done" command))) ;; Now finally cd to where the shell started make/grep/... (setq default-directory thisdir)) From 17a60964b9c06d379c2460005b8ad7f6b4f90d63 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 16:56:30 +0000 Subject: [PATCH 448/560] (popmail): Don't use Errmsg as format string. --- lib-src/movemail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib-src/movemail.c b/lib-src/movemail.c index a634e2966d7..46c47a97bd6 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -789,7 +789,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order) mbx_delimit_begin (mbf); if (pop_retr (server, i, mbf) != OK) { - error (Errmsg, 0, 0); + error ("%s", Errmsg, 0); close (mbfi); return EXIT_FAILURE; } From 2da637a5386439117b24b3eccd1e4138a06dfa81 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 16:58:34 +0000 Subject: [PATCH 449/560] (comint-insert-input): Undo previous changes; use last-input-event in interactive spec. --- lisp/comint.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index 9f93fe75b1f..f96da7fa0fd 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -788,7 +788,9 @@ buffer. The hook `comint-exec-hook' is run after each exec." (defun comint-insert-input (&optional event) "In a Comint buffer, set the current input to the previous input at point." - (interactive "e") + ;; This doesn't use "e" because it is supposed to work + ;; for events without parameters. + (interactive (list last-input-event)) (if event (mouse-set-point event)) (let ((pos (point))) (if (not (eq (get-char-property pos 'field) 'input)) From 6887bce515f7406765dda3bd8fc65d65a9cf207b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:16:31 +0000 Subject: [PATCH 450/560] (Fprimitive_undo): Handle (FUNNAME . ARGS) by calling FUNNAME. --- src/undo.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/undo.c b/src/undo.c index df4b8d08cd6..ac7b4d8935e 100644 --- a/src/undo.c +++ b/src/undo.c @@ -519,7 +519,7 @@ Return what remains of the list. */) } else if (EQ (car, Qnil)) { - /* Element (nil prop val beg . end) is property change. */ + /* Element (nil PROP VAL BEG . END) is property change. */ Lisp_Object beg, end, prop, val; prop = Fcar (cdr); @@ -543,6 +543,18 @@ Return what remains of the list. */) Fgoto_char (car); Fdelete_region (car, cdr); } + else if (SYMBOLP (car)) + { + Lisp_Object oldlist = current_buffer->undo_list; + /* Element (FUNNAME . ARGS) means call FUNNAME to undo. */ + apply1 (car, cdr); + /* Make sure this produces at least one undo entry, + so the test in `undo' for continuing an undo series + will work right. */ + if (EQ (oldlist, current_buffer->undo_list)) + current_buffer->undo_list + = Fcons (list2 (Qcdr, Qnil), current_buffer->undo_list); + } else if (STRINGP (car) && INTEGERP (cdr)) { /* Element (STRING . POS) means STRING was deleted. */ @@ -589,7 +601,7 @@ Return what remains of the list. */) UNGCPRO; return unbind_to (count, list); } - + void syms_of_undo () { From 96b3faf8920dd28418fd817c821c3eb0291ecc4d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:16:47 +0000 Subject: [PATCH 451/560] *** empty log message *** --- etc/NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 299ac3d9a04..9d24c5dc32c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2474,6 +2474,11 @@ configuration files. * Incompatible Lisp Changes in Emacs 21.4 +** An element of buffer-undo-list can now have the form (FUNNAME . +ARGS), where FUNNAME is a symbol other than t or nil. That stands for +a high-level change that should be undone by evaluating (apply FUNNAME +ARGS). + +++ ** `suppress-keymap' now works by remapping `self-insert-command' to the command `undefined'. (In earlier Emacs versions, it used From 48bbe3a8eba84f124709927bb274eb28d7ff8473 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:18:06 +0000 Subject: [PATCH 452/560] Comment change. --- src/casetab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/casetab.c b/src/casetab.c index 6fc2d415fde..5ba025e2b5a 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Written by Howard Gayle. See chartab.c for details. */ +/* Written by Howard Gayle. */ #include #include "lisp.h" From c6c7dc03495f90238258538535515790208a45b3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:18:57 +0000 Subject: [PATCH 453/560] (syms_of_buffer) : Doc fix. --- src/buffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/buffer.c b/src/buffer.c index b3bcb68c281..2ca4332bca2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5782,6 +5782,8 @@ An entry (nil PROPERTY VALUE BEG . END) indicates that a text property was modified between BEG and END. PROPERTY is the property name, and VALUE is the old value. +An entry (FUN-NAME . ARGS) means undo the change with (apply FUN-NAME ARGS). + An entry (MARKER . DISTANCE) indicates that the marker MARKER was adjusted in position by the offset DISTANCE (an integer). From 6f95a835181f3352c524e2cc5c48dd7648fd6e9d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:21:12 +0000 Subject: [PATCH 454/560] (widget-button-click): Shorten the range of the track-mouse binding. --- lisp/wid-edit.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 16de985fa3c..f89095fd7fc 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -915,14 +915,14 @@ Recommended as a parent keymap for modes using widgets.") ;; until we receive a release event. Highlight/ ;; unhighlight the button the mouse was initially ;; on when we move over it. - (let ((track-mouse t)) - (save-excursion - (when face ; avoid changing around image - (overlay-put overlay - 'face widget-button-pressed-face) - (overlay-put overlay - 'mouse-face widget-button-pressed-face)) - (unless (widget-apply button :mouse-down-action event) + (save-excursion + (when face ; avoid changing around image + (overlay-put overlay + 'face widget-button-pressed-face) + (overlay-put overlay + 'mouse-face widget-button-pressed-face)) + (unless (widget-apply button :mouse-down-action event) + (let ((track-mouse t)) (while (not (widget-button-release-event-p event)) (setq event (read-event) pos (widget-event-point event)) @@ -937,13 +937,13 @@ Recommended as a parent keymap for modes using widgets.") 'mouse-face widget-button-pressed-face)) (overlay-put overlay 'face face) - (overlay-put overlay 'mouse-face mouse-face)))) + (overlay-put overlay 'mouse-face mouse-face))))) - ;; When mouse is released over the button, run - ;; its action function. - (when (and pos - (eq (get-char-property pos 'button) button)) - (widget-apply-action button event)))) + ;; When mouse is released over the button, run + ;; its action function. + (when (and pos + (eq (get-char-property pos 'button) button)) + (widget-apply-action button event))) (overlay-put overlay 'face face) (overlay-put overlay 'mouse-face mouse-face)))) From a7fe694c133749bc7f736fcd078a9f33fa1b4287 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:24:41 +0000 Subject: [PATCH 455/560] (undo): Fix the test for continuing a series of undos. (undo-more): Set pending-undo-list to t when we reach end. (pending-undo-list): defvar moved up. --- lisp/simple.el | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 3db2a418f3b..b195874e2f6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1235,6 +1235,10 @@ Return 0 if current buffer is not a mini-buffer." (defvar undo-no-redo nil "If t, `undo' doesn't go through redo entries.") +(defvar pending-undo-list nil + "Within a run of consecutive undo commands, list remaining to be undone. +t if we undid all the way to the end of it.") + (defun undo (&optional arg) "Undo some previous changes. Repeat this command to undo more changes. @@ -1258,14 +1262,15 @@ as an argument limits undo to changes within the current region." (setq this-command 'undo-start) (unless (and (eq last-command 'undo) - ;; If something (a timer or filter?) changed the buffer - ;; since the previous command, don't continue the undo seq. - (let ((list buffer-undo-list)) - (while (eq (car list) nil) - (setq list (cdr list))) - ;; If the last undo record made was made by undo - ;; it shows nothing else happened in between. - (gethash list undo-equiv-table))) + (or (eq pending-undo-list t) + ;; If something (a timer or filter?) changed the buffer + ;; since the previous command, don't continue the undo seq. + (let ((list buffer-undo-list)) + (while (eq (car list) nil) + (setq list (cdr list))) + ;; If the last undo record made was made by undo + ;; it shows nothing else happened in between. + (gethash list undo-equiv-table)))) (setq undo-in-region (if transient-mark-mode mark-active (and arg (not (numberp arg))))) (if undo-in-region @@ -1340,9 +1345,6 @@ Contrary to `undo', this will not redo a previous undo." ;; no idea whereas to bind it. Any suggestion welcome. -stef ;; (define-key ctl-x-map "U" 'undo-only) -(defvar pending-undo-list nil - "Within a run of consecutive undo commands, list remaining to be undone.") - (defvar undo-in-progress nil "Non-nil while performing an undo. Some change-hooks test this variable to do something different.") @@ -1351,12 +1353,14 @@ Some change-hooks test this variable to do something different.") "Undo back N undo-boundaries beyond what was already undone recently. Call `undo-start' to get ready to undo recent changes, then call `undo-more' one or more times to undo them." - (or pending-undo-list + (or (listp pending-undo-list) (error (format "No further undo information%s" (if (and transient-mark-mode mark-active) " for region" "")))) (let ((undo-in-progress t)) - (setq pending-undo-list (primitive-undo count pending-undo-list)))) + (setq pending-undo-list (primitive-undo count pending-undo-list)) + (if (null pending-undo-list) + (setq pending-undo-list t)))) ;; Deep copy of a list (defun undo-copy-list (list) From b29b5c248bf4c9114c16826f3c5e9f4b1033b5d9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:26:39 +0000 Subject: [PATCH 456/560] (delete-rectangle-line, delete-extract-rectangle-line) (open-rectangle, delete-whitespace-rectangle-line) (clear-rectangle-line): If FILL, pass t instead of FILL for move-to-column's 3nd arg. --- lisp/rect.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/rect.el b/lisp/rect.el index 6d9cd6a2aaa..e53198bc753 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -127,14 +127,14 @@ the function is called." )) (defun delete-rectangle-line (startcol endcol fill) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (delete-region (point) (progn (move-to-column endcol 'coerce) (point))))) (defun delete-extract-rectangle-line (startcol endcol lines fill) (let ((pt (point-at-eol))) - (if (< (move-to-column startcol (or fill 'coerce)) startcol) + (if (< (move-to-column startcol (if fill t 'coerce)) startcol) (setcdr lines (cons (spaces-string (- endcol startcol)) (cdr lines))) ;; else @@ -284,13 +284,13 @@ on the right side of the rectangle." (goto-char start)) (defun open-rectangle-line (startcol endcol fill) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (unless (and (not fill) (= (point) (point-at-eol))) (indent-to endcol)))) (defun delete-whitespace-rectangle-line (startcol endcol fill) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (unless (= (point) (point-at-eol)) (delete-region (point) (progn (skip-syntax-forward " ") (point)))))) @@ -371,7 +371,7 @@ rectangle which were empty." (defun clear-rectangle-line (startcol endcol fill) (let ((pt (point-at-eol))) - (when (= (move-to-column startcol (or fill 'coerce)) startcol) + (when (= (move-to-column startcol (if fill t 'coerce)) startcol) (if (and (not fill) (<= (save-excursion (goto-char pt) (current-column)) endcol)) (delete-region (point) pt) From 5a0c1883d4226873ef1a55b6943afd6e93b4af77 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:27:13 +0000 Subject: [PATCH 457/560] (Man-getpage-in-background): Disable undo in Man buffer. --- lisp/man.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/man.el b/lisp/man.el index e9503ca883a..02661c55517 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -697,6 +697,7 @@ all sections related to a subject, put something appropriate into the (setq buffer (generate-new-buffer bufname)) (save-excursion (set-buffer buffer) + (setq buffer-undo-list t) (setq Man-original-frame (selected-frame)) (setq Man-arguments man-args)) (let ((process-environment (copy-sequence process-environment)) From 0c2f6ddaa7e5dccc2ec4a3c63bdc445cb6b50d52 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:28:00 +0000 Subject: [PATCH 458/560] (normal-backup-enable-predicate): Return nil for files in /tmp, regardless of temporary-file-directory. --- lisp/files.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 841332b957a..045958bf9c5 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2844,13 +2844,18 @@ ignored." (defun normal-backup-enable-predicate (name) "Default `backup-enable-predicate' function. -Checks for files in `temporary-file-directory' or -`small-temporary-file-directory'." +Checks for files in `temporary-file-directory', +`small-temporary-file-directory', and /tmp." (not (or (let ((comp (compare-strings temporary-file-directory 0 nil name 0 nil))) ;; Directory is under temporary-file-directory. (and (not (eq comp t)) (< comp (- (length temporary-file-directory))))) + (let ((comp (compare-strings "/tmp" 0 nil + name 0 nil))) + ;; Directory is under /tmp. + (and (not (eq comp t)) + (< comp (- (length "/tmp"))))) (if small-temporary-file-directory (let ((comp (compare-strings small-temporary-file-directory 0 nil From 5e5a3412552dd70bf5fe9c664a62cbd019c7a29d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:28:48 +0000 Subject: [PATCH 459/560] (dired-mode-map): Remap `undo' and `advertised-undo' instead of rebinding C-x u and C-_. --- lisp/dired.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 0341214a98e..461546ddac5 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1197,8 +1197,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." ;; misc (define-key map "?" 'dired-summary) (define-key map "\177" 'dired-unmark-backward) - (define-key map "\C-_" 'dired-undo) - (define-key map "\C-xu" 'dired-undo) + (define-key map [remap undo] 'dired-undo) + (define-key map [remap advertised-undo] 'dired-undo) ;; Make menu bar items. From 137e400204f8d8046d9ef12b9f627106ed06b4d7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:31:32 +0000 Subject: [PATCH 460/560] (undo-more): defadvice deleted. (ses-begin-change): Doc fix. --- lisp/ses.el | 61 +++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/lisp/ses.el b/lisp/ses.el index 49d4f49d94a..952474c8715 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1279,38 +1279,39 @@ to each symbol." ;; Undo control ;;---------------------------------------------------------------------------- -(defadvice undo-more (around ses-undo-more activate preactivate) - "Define a meaning for conses in buffer-undo-list whose car is a symbol -other than t or nil. To undo these, apply the car--a function--to the -cdr--its arglist." - (let ((ses-count (ad-get-arg 0))) - (catch 'undo - (dolist (ses-x pending-undo-list) - (unless ses-x - ;;End of undo boundary - (setq ses-count (1- ses-count)) - (if (<= ses-count 0) - ;;We've seen enough boundaries - stop undoing - (throw 'undo nil))) - (and (consp ses-x) (symbolp (car ses-x)) (fboundp (car ses-x)) - ;;Undo using apply - (apply (car ses-x) (cdr ses-x))))) - (if (not (eq major-mode 'ses-mode)) - ad-do-it - ;;Here is some extra code for SES mode. - (setq ses--deferred-narrow - (or ses--deferred-narrow (ses-narrowed-p))) - (widen) - (condition-case x - ad-do-it - (error - ;;Restore narrow if appropriate - (ses-command-hook) - (signal (car x) (cdr x))))))) +;; This should be unnecessary, because the feature is now built in. + +;;; (defadvice undo-more (around ses-undo-more activate preactivate) +;;; "Define a meaning for conses in buffer-undo-list whose car is a symbol +;;; other than t or nil. To undo these, apply the car--a function--to the +;;; cdr--its arglist." +;;; (let ((ses-count (ad-get-arg 0))) +;;; (catch 'undo +;;; (dolist (ses-x pending-undo-list) +;;; (unless ses-x +;;; ;;End of undo boundary +;;; (setq ses-count (1- ses-count)) +;;; (if (<= ses-count 0) +;;; ;;We've seen enough boundaries - stop undoing +;;; (throw 'undo nil))) +;;; (and (consp ses-x) (symbolp (car ses-x)) (fboundp (car ses-x)) +;;; ;;Undo using apply +;;; (apply (car ses-x) (cdr ses-x))))) +;;; (if (not (eq major-mode 'ses-mode)) +;;; ad-do-it +;;; ;;Here is some extra code for SES mode. +;;; (setq ses--deferred-narrow +;;; (or ses--deferred-narrow (ses-narrowed-p))) +;;; (widen) +;;; (condition-case x +;;; ad-do-it +;;; (error +;;; ;;Restore narrow if appropriate +;;; (ses-command-hook) +;;; (signal (car x) (cdr x))))))) (defun ses-begin-change () - "For undo, remember current buffer-position before we start changing hidden -stuff." + "For undo, remember point before we start changing hidden stuff." (let ((inhibit-read-only t)) (insert-and-inherit "X") (delete-region (1- (point)) (point)))) From 5a92a9eb7821b7efe89ef2c4d53f72099e64531e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 29 Jan 2005 17:31:43 +0000 Subject: [PATCH 461/560] *** empty log message *** --- etc/NEWS | 10 +++++----- lib-src/ChangeLog | 4 ++++ lisp/ChangeLog | 28 ++++++++++++++++++++++++++++ src/ChangeLog | 6 ++++++ 4 files changed, 43 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 9d24c5dc32c..8ccaee23b06 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2474,11 +2474,6 @@ configuration files. * Incompatible Lisp Changes in Emacs 21.4 -** An element of buffer-undo-list can now have the form (FUNNAME . -ARGS), where FUNNAME is a symbol other than t or nil. That stands for -a high-level change that should be undone by evaluating (apply FUNNAME -ARGS). - +++ ** `suppress-keymap' now works by remapping `self-insert-command' to the command `undefined'. (In earlier Emacs versions, it used @@ -2492,6 +2487,11 @@ the command `undefined'. (In earlier Emacs versions, it used * Lisp Changes in Emacs 21.4 +** An element of buffer-undo-list can now have the form (FUNNAME . +ARGS), where FUNNAME is a symbol other than t or nil. That stands for +a high-level change that should be undone by evaluating (apply FUNNAME +ARGS). + +++ ** The line-move, scroll-up, and scroll-down functions will now modify the window vscroll to scroll through display rows that are diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 92d06473a80..503a8bead04 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-29 Richard M. Stallman + + * movemail.c (popmail): Don't use Errmsg as format string. + 2004-12-26 YAMAMOTO Mitsuharu * make-docfile.c: Include stdlib.h even if WINDOWSNT is not diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ac939a0d6a..8e3414fe20d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,31 @@ +2005-01-29 Richard M. Stallman + + * ses.el (undo-more): defadvice deleted. + (ses-begin-change): Doc fix. + + * dired.el (dired-mode-map): Remap `undo' and `advertised-undo' + instead of rebinding C-x u and C-_. + + * files.el (normal-backup-enable-predicate): Return nil for files + in /tmp, regardless of temporary-file-directory. + + * man.el (Man-getpage-in-background): Disable undo in Man buffer. + + * rect.el (delete-rectangle-line, delete-extract-rectangle-line) + (open-rectangle, delete-whitespace-rectangle-line) + (clear-rectangle-line): If FILL, pass t instead of FILL + for move-to-column's 2nd arg. + + * simple.el (undo): Fix the test for continuing a series of undos. + (undo-more): Set pending-undo-list to t when we reach end. + (pending-undo-list): defvar moved up. + + * wid-edit.el (widget-button-click): + Shorten the range of the track-mouse binding. + + * comint.el (comint-insert-input): Undo previous changes; + use last-input-event in interactive spec. + 2005-01-29 Eli Zaretskii * progmodes/compile.el (compilation-start): Bind buffer-read-only diff --git a/src/ChangeLog b/src/ChangeLog index 6030a3a4886..6c2b21823ad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-01-29 Richard M. Stallman + + * buffer.c (syms_of_buffer) : Doc fix. + + * undo.c (Fprimitive_undo): Handle (FUNNAME . ARGS) by calling FUNNAME. + 2005-01-28 Stefan Monnier * keymap.c (access_keymap): YAILOM. From 49b8b5dcb303bb12ab4f503c42ed1d7c1e6a2132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 29 Jan 2005 22:25:58 +0000 Subject: [PATCH 462/560] * xfns.c (show_hourglass): Use FRAME_X_WINDOW as parent for GTK, button events are not received otherwise. --- src/ChangeLog | 5 +++++ src/xfns.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6c2b21823ad..3180fa1216c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-29 Jan Dj,Ad(Brv + + * xfns.c (show_hourglass): Use FRAME_X_WINDOW as parent for GTK, + button events are not received otherwise. + 2005-01-29 Richard M. Stallman * buffer.c (syms_of_buffer) : Doc fix. diff --git a/src/xfns.c b/src/xfns.c index 9ee459680aa..64a83cdd5f6 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4339,11 +4339,15 @@ show_hourglass (timer) { unsigned long mask = CWCursor; XSetWindowAttributes attrs; - +#ifdef USE_GTK + Window parent = FRAME_X_WINDOW (f); +#else + Window parent = FRAME_OUTER_WINDOW (f); +#endif attrs.cursor = f->output_data.x->hourglass_cursor; f->output_data.x->hourglass_window - = XCreateWindow (dpy, FRAME_OUTER_WINDOW (f), + = XCreateWindow (dpy, parent, 0, 0, 32000, 32000, 0, 0, InputOnly, CopyFromParent, From 28cb725d59def882d9346d05ad8a93059ecbc44f Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 30 Jan 2005 00:32:39 +0000 Subject: [PATCH 463/560] (undo-ask-before-discard): New var. (undo-outer-limit-truncate): Implement it. (undo-extra-outer-limit): Doc update. --- lisp/simple.el | 83 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 20 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index b195874e2f6..e6b445f9ec7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1525,33 +1525,76 @@ is not *inside* the region START...END." '(0 . 0))) '(0 . 0))) +(defcustom undo-ask-before-discard t + "If non-nil ask about discarding undo info for the current command. +Normally, Emacs discards the undo info for the current command if +it exceeds `undo-outer-limit'. But if you set this option +non-nil, it asks in the echo area whether to discard the info. +If you answer no, there a slight risk that Emacs might crash, so +only do it if you really want to undo the command. + +This option is mainly intended for debugging. You have to be +careful if you use it for other purposes. Garbage collection is +inhibited while the question is asked, meaning that Emacs might +leak memory. So you should make sure that you do not wait +excessively long before answering the question." + :type 'boolean + :group 'undo + :version "21.4") + (defvar undo-extra-outer-limit nil "If non-nil, an extra level of size that's ok in an undo item. We don't ask the user about truncating the undo list until the -current item gets bigger than this amount.") +current item gets bigger than this amount. + +This variable only matters if `undo-ask-before-discard' is non-nil.") (make-variable-buffer-local 'undo-extra-outer-limit) -;; When the first undo batch in an undo list is longer than undo-outer-limit, -;; this function gets called to ask the user what to do. -;; Garbage collection is inhibited around the call, -;; so it had better not do a lot of consing. +;; When the first undo batch in an undo list is longer than +;; undo-outer-limit, this function gets called to warn the user that +;; the undo info for the current command was discarded. Garbage +;; collection is inhibited around the call, so it had better not do a +;; lot of consing. (setq undo-outer-limit-function 'undo-outer-limit-truncate) (defun undo-outer-limit-truncate (size) - (when (or (null undo-extra-outer-limit) - (> size undo-extra-outer-limit)) - ;; Don't ask the question again unless it gets even bigger. - ;; This applies, in particular, if the user quits from the question. - ;; Such a quit quits out of GC, but something else will call GC - ;; again momentarily. It will call this function again, - ;; but we don't want to ask the question again. - (setq undo-extra-outer-limit (+ size 50000)) - (if (let (use-dialog-box) - (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? " - (buffer-name) size))) - (progn (setq buffer-undo-list nil) - (setq undo-extra-outer-limit nil) - t) - nil))) + (if undo-ask-before-discard + (when (or (null undo-extra-outer-limit) + (> size undo-extra-outer-limit)) + ;; Don't ask the question again unless it gets even bigger. + ;; This applies, in particular, if the user quits from the question. + ;; Such a quit quits out of GC, but something else will call GC + ;; again momentarily. It will call this function again, + ;; but we don't want to ask the question again. + (setq undo-extra-outer-limit (+ size 50000)) + (if (let (use-dialog-box track-mouse executing-kbd-macro ) + (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? " + (buffer-name) size))) + (progn (setq buffer-undo-list nil) + (setq undo-extra-outer-limit nil) + t) + nil)) + (display-warning '(undo discard-info) + (concat + (format "Buffer %s undo info was %d bytes long.\n" + (buffer-name) size) + "The undo info was discarded because it exceeded \ +`undo-outer-limit'. + +This is normal if you executed a command that made a huge change +to the buffer. In that case, to prevent similar problems in the +future, set `undo-outer-limit' to a value that is large enough to +cover the maximum size of normal changes you expect a single +command to make, but not so large that it might exceed the +maximum memory allotted to Emacs. + +If you did not execute any such command, the situation is +probably due to a bug and you should report it. + +You can disable the popping up of this buffer by adding the entry +\(undo discard-info) to the user option `warning-suppress-types'.\n") + :warning) + (setq buffer-undo-list nil) + t)) (defvar shell-command-history nil "History list for some commands that read shell commands.") From 62d776fd34a8d47520070916e8af9b732fa06903 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 30 Jan 2005 00:39:33 +0000 Subject: [PATCH 464/560] (syms_of_undo) : Doc update. --- src/undo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/undo.c b/src/undo.c index ac7b4d8935e..3809c83d91d 100644 --- a/src/undo.c +++ b/src/undo.c @@ -639,11 +639,13 @@ which includes both saved text and other data. */); DEFVAR_LISP ("undo-outer-limit", &Vundo_outer_limit, doc: /* Outer limit on size of undo information for one command. At garbage collection time, if the current command has produced -more than this much undo information, it asks you whether to delete -the information. This is a last-ditch limit to prevent memory overflow. +more than this much undo information, it discards the info and displays +a warning. This is a last-ditch limit to prevent memory overflow. -The size is counted as the number of bytes occupied, -which includes both saved text and other data. +The size is counted as the number of bytes occupied, which includes +both saved text and other data. A value of nil means no limit. In +this case, accumulating one huge undo entry could make Emacs crash as +a result of memory overflow. In fact, this calls the function which is the value of `undo-outer-limit-function' with one argument, the size. From 03c64f2e02d2bb55e335beb1c6f8f420a3489167 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 30 Jan 2005 00:43:04 +0000 Subject: [PATCH 465/560] *** empty log message *** --- lisp/ChangeLog | 8 +++++++- src/ChangeLog | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e3414fe20d..ed352686eb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-01-29 Luc Teirlinck + + * simple.el (undo-ask-before-discard): New var. + (undo-outer-limit-truncate): Implement it. + (undo-extra-outer-limit): Doc update. + 2005-01-29 Richard M. Stallman * ses.el (undo-more): defadvice deleted. @@ -13,7 +19,7 @@ * rect.el (delete-rectangle-line, delete-extract-rectangle-line) (open-rectangle, delete-whitespace-rectangle-line) - (clear-rectangle-line): If FILL, pass t instead of FILL + (clear-rectangle-line): If FILL, pass t instead of FILL for move-to-column's 2nd arg. * simple.el (undo): Fix the test for continuing a series of undos. diff --git a/src/ChangeLog b/src/ChangeLog index 3180fa1216c..14a41374d33 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-01-29 Luc Teirlinck + + * undo.c (syms_of_undo) : Doc update. + 2005-01-29 Jan Dj,Ad(Brv * xfns.c (show_hourglass): Use FRAME_X_WINDOW as parent for GTK, From 6de38aa35015ed6fb3613eec6a37e9a2d5ec7272 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 30 Jan 2005 02:09:45 +0000 Subject: [PATCH 466/560] (syms_of_undo) : Increase value to 3 Meg. --- src/ChangeLog | 1 + src/undo.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 14a41374d33..97f88d2b3f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2005-01-29 Luc Teirlinck * undo.c (syms_of_undo) : Doc update. + Increase value to 3 Meg. 2005-01-29 Jan Dj,Ad(Brv diff --git a/src/undo.c b/src/undo.c index 3809c83d91d..480a1b07ea6 100644 --- a/src/undo.c +++ b/src/undo.c @@ -651,7 +651,7 @@ In fact, this calls the function which is the value of `undo-outer-limit-function' with one argument, the size. The text above describes the behavior of the function that variable usually specifies. */); - Vundo_outer_limit = make_number (300000); + Vundo_outer_limit = make_number (3000000); DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, doc: /* Function to call when an undo list exceeds `undo-outer-limit'. From 97733c3d0022f9b1616fca7782eb927fcc72c5c4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 2005 11:07:54 +0000 Subject: [PATCH 467/560] (custom-bury-buffer): Function deleted. (custom-buffer-done-function): Option deleted. (custom-buffer-done-kill): New (replacement option. (Custom-buffer-done): Call quit-window. (custom-buffer-create-internal): Update for above changes. --- lisp/cus-edit.el | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 989a9f16840..30d831ff039 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1180,19 +1180,10 @@ links: groups have links to subgroups." (const links)) :group 'custom-buffer) -;; If we pass BUFFER to `bury-buffer', the buffer isn't removed from -;; the window. -(defun custom-bury-buffer (buffer) - (with-current-buffer buffer - (bury-buffer))) - -(defcustom custom-buffer-done-function 'custom-bury-buffer - "*Function called to remove a Custom buffer when the user is done with it. -Called with one argument, the buffer to remove." - :type '(choice (function-item :tag "Bury buffer" custom-bury-buffer) - (function-item :tag "Kill buffer" kill-buffer) - (function :tag "Other")) - :version "21.1" +(defcustom custom-buffer-done-kill nil + "*Non-nil means exiting a Custom buffer should kill it." + :type 'boolean + :version "21.4" :group 'custom-buffer) (defcustom custom-buffer-indent 3 @@ -1262,9 +1253,9 @@ This button will have a menu with all three reset operations." :group 'custom-buffer) (defun Custom-buffer-done (&rest ignore) - "Remove current buffer by calling `custom-buffer-done-function'." + "Exit current Custom buffer according to `custom-buffer-done-kill'." (interactive) - (funcall custom-buffer-done-function (current-buffer))) + (quit-window custom-buffer-done-kill)) (defcustom custom-raised-buttons (not (equal (face-valid-attribute-values :box) '(("unspecified" . unspecified)))) @@ -1350,13 +1341,9 @@ Un-customize all values in this buffer. They get their standard settings." :tag "Finish" :help-echo (lambda (&rest ignore) - (cond - ((eq custom-buffer-done-function - 'custom-bury-buffer) - "Bury this buffer") - ((eq custom-buffer-done-function 'kill-buffer) - "Kill this buffer") - (t "Finish with this buffer"))) + (if custom-buffer-done-kill + "Kill this buffer" + "Bury this buffer")) :action #'Custom-buffer-done) (widget-insert "\n\n") (message "Creating customization items...") From bdc3b3be0ff78758e9287a34a2b2baf48c2e8b31 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 2005 11:20:14 +0000 Subject: [PATCH 468/560] Don't say just "option" when talking about variables. Other minor cleanups. --- man/display.texi | 10 +++++----- man/mule.texi | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/man/display.texi b/man/display.texi index 0e39360d38a..23b79d1703e 100644 --- a/man/display.texi +++ b/man/display.texi @@ -219,7 +219,7 @@ Font Lock mode whenever you edit a C file, you can do this: @findex global-font-lock-mode @vindex global-font-lock-mode To turn on Font Lock mode automatically in all modes which support -it, customize the user option @code{global-font-lock-mode} or use the +it, customize the variable @code{global-font-lock-mode} or use the function @code{global-font-lock-mode} in your @file{.emacs} file, like this: @@ -327,9 +327,9 @@ portion of a buffer. As you scroll through the buffer, each portion that becomes visible is fontified as soon as it is displayed. The parts of the buffer that are not displayed are fontified ``stealthily'', in the background, i.e.@: when Emacs is idle. You can -control this background fontification, called @dfn{Just-In-Time}, or -@dfn{JIT} Font Lock, by customizing various options in the -customization group @samp{jit-lock}. @xref{Specific Customization}. +control this background fontification, also called @dfn{Just-In-Time} +(or @dfn{JIT}) Lock, by customizing variables in the customization +group @samp{jit-lock}. @xref{Specific Customization}. @node Highlight Changes @section Highlight Changes Mode @@ -1087,7 +1087,7 @@ the variable @code{blink-cursor-alist}. state, with the same appearance as when the blinking cursor blinks ``off''. For a box cursor, this is a hollow box; for a bar cursor, this is a thinner bar. To turn off cursors in non-selected windows, -customize the option @code{cursor-in-non-selected-windows} and assign +customize the variable @code{cursor-in-non-selected-windows} and assign it a @code{nil} value. @vindex x-stretch-cursor diff --git a/man/mule.texi b/man/mule.texi index 4bc6b9939dd..a726265ff72 100644 --- a/man/mule.texi +++ b/man/mule.texi @@ -996,11 +996,11 @@ your locale specification (@pxref{Language Environments}). @findex set-keyboard-coding-system @vindex keyboard-coding-system The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}) -or the Custom option @code{keyboard-coding-system} -specifies the coding system for keyboard input. Character-code -translation of keyboard input is useful for terminals with keys that -send non-@acronym{ASCII} graphic characters---for example, some terminals designed -for ISO Latin-1 or subsets of it. +or the variable @code{keyboard-coding-system} specifies the coding +system for keyboard input. Character-code translation of keyboard +input is useful for terminals with keys that send non-@acronym{ASCII} +graphic characters---for example, some terminals designed for ISO +Latin-1 or subsets of it. By default, keyboard input is translated based on your system locale setting. If your terminal does not really support the encoding @@ -1276,7 +1276,7 @@ instead, e.g.@: @samp{"o} for o-umlaut. Load the library @vindex latin1-display If your terminal can display Latin-1, you can display characters from other European character sets using a mixture of equivalent -Latin-1 characters and @acronym{ASCII} mnemonics. Use the Custom option +Latin-1 characters and @acronym{ASCII} mnemonics. Customize the variable @code{latin1-display} to enable this. The mnemonic @acronym{ASCII} sequences mostly correspond to those of the prefix input methods. @@ -1338,10 +1338,10 @@ directly. On a windowing terminal, you should not need to do anything special to use these keys; they should simply work. On a text-only terminal, you should use the command @code{M-x set-keyboard-coding-system} or the -Custom option @code{keyboard-coding-system} to specify which coding +variable @code{keyboard-coding-system} to specify which coding system your keyboard uses (@pxref{Specify Coding}). Enabling this feature will probably require you to use @kbd{ESC} to type Meta -characters; however, on a Linux console or in @code{xterm}, you can +characters; however, on a console terminal or in @code{xterm}, you can arrange for Meta to be converted to @kbd{ESC} and still be able type 8-bit characters present directly on the keyboard or using @kbd{Compose} or @kbd{AltGr} keys. @xref{User Input}. From 1eeda44946928f8548d3a90c138ecf7d50b5324a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 2005 11:21:00 +0000 Subject: [PATCH 469/560] (Picture): Mention artist.el. --- man/picture.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/picture.texi b/man/picture.texi index e62962b0ff7..dba81df7c2e 100644 --- a/man/picture.texi +++ b/man/picture.texi @@ -44,7 +44,8 @@ their normal equivalents do. @vindex picture-mode-hook Turning on Picture mode runs the hook @code{picture-mode-hook} -(@pxref{Hooks}). +(@pxref{Hooks}). Additional extensions to Picture mode can be found +in @file{artist.el}. @menu * Basic Picture:: Basic concepts and simple commands of Picture Mode. From 19b2c4ca1fe5defb95255b9652be5c90c3ce481d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 2005 11:23:17 +0000 Subject: [PATCH 470/560] Don't say just "option" when talking about variables. --- man/files.texi | 2 +- man/frames.texi | 18 +++++++++--------- man/help.texi | 14 +++++++------- man/macos.texi | 2 +- man/maintaining.texi | 2 +- man/major.texi | 7 ++++--- man/mini.texi | 2 +- man/misc.texi | 4 ++-- man/programs.texi | 2 +- man/screen.texi | 2 +- man/sending.texi | 6 +++--- 11 files changed, 31 insertions(+), 30 deletions(-) diff --git a/man/files.texi b/man/files.texi index 8494ea8dc52..2ab9d5aaaa6 100644 --- a/man/files.texi +++ b/man/files.texi @@ -2979,7 +2979,7 @@ that don't support them, this command is not defined. compressed files when you visit them, and automatically recompress them if you alter them and save them. To enable this feature, type the command @kbd{M-x auto-compression-mode}. You can enable it permanently -by customizing the option @code{auto-compression-mode}. +by customizing the variable @code{auto-compression-mode}. When automatic compression (which implies automatic uncompression as well) is enabled, Emacs recognizes compressed files by their file names. diff --git a/man/frames.texi b/man/frames.texi index 45133d746a3..2d6c953d2e4 100644 --- a/man/frames.texi +++ b/man/frames.texi @@ -278,7 +278,7 @@ particularly under OpenWindows and Gnome. @code{Paste} and @code{Copy} menu items, as well as the keys of the same names, all use the clipboard. - You can customize the option @code{x-select-enable-clipboard} to make + You can customize the variable @code{x-select-enable-clipboard} to make the Emacs yank functions consult the clipboard before the primary selection, and to make the kill functions to store in the clipboard as well as the primary selection. Otherwise they do not access the @@ -758,7 +758,7 @@ window vertically. The split occurs on the line where you click. scroll-bar-mode}. With no argument, it toggles the use of scroll bars. With an argument, it turns use of scroll bars on if and only if the argument is positive. This command applies to all frames, including -frames yet to be created. Customize the option @code{scroll-bar-mode} +frames yet to be created. Customize the variable @code{scroll-bar-mode} to control the use of scroll bars at startup. You can use it to specify that they are placed at the right of windows if you prefer that. You have to set this variable through the @samp{Customize} interface @@ -788,7 +788,7 @@ usually click the wheel to act as either @kbd{Mouse-2} or @kbd{Mouse-3}, depending on the setup. You can also use the wheel to scroll windows instead of using the scroll bar or keyboard commands. To do so, turn on Mouse Wheel global minor mode with the command -@kbd{M-x mouse-wheel-mode} or by customizing the option +@kbd{M-x mouse-wheel-mode} or by customizing the variable @code{mouse-wheel-mode}. Support for the wheel depends on the system generating appropriate events for Emacs. @@ -849,7 +849,7 @@ variables. @cindex mode, Menu Bar You can turn display of menu bars on or off with @kbd{M-x -menu-bar-mode} or by customizing the option @code{menu-bar-mode}. +menu-bar-mode} or by customizing the variable @code{menu-bar-mode}. With no argument, this command toggles Menu Bar mode, a minor mode. With an argument, the command turns Menu Bar mode on if the argument is positive, off if the argument is not positive. You can use @@ -899,7 +899,7 @@ question or some other special question. Many Emacs commands use a dialog box to ask a yes-or-no question, if you used the mouse to invoke the command to begin with. - You can customize the option @code{use-dialog-box} to suppress the + You can customize the variable @code{use-dialog-box} to suppress the use of dialog boxes. This also controls whether to use file selection windows (but those are not supported on all platforms). @@ -907,10 +907,10 @@ windows (but those are not supported on all platforms). A file selection window is a special kind of dialog box for asking for file names. - You can customize the option @code{use-file-dialog} to suppress the + You can customize the variable @code{use-file-dialog} to suppress the use of file selection windows even if you still want other kinds -of dialogs. This option has no effect if you have suppressed all dialog -boxes with the option @code{use-dialog-box}. +of dialogs. This variable has no effect if you have suppressed all dialog +boxes with the variable @code{use-dialog-box}. @vindex x-use-old-gtk-file-dialog For Gtk+ version 2.4 and 2.6, you can make Emacs use the old file dialog @@ -949,7 +949,7 @@ customizing the windows that display tooltips. @vindex mouse-avoidance-mode Mouse Avoidance mode keeps the window system mouse pointer away from point, to avoid obscuring text. Whenever it moves the mouse, it also -raises the frame. To use Mouse Avoidance mode, customize the option +raises the frame. To use Mouse Avoidance mode, customize the variable @code{mouse-avoidance-mode}. You can set this to various values to move the mouse in several ways: diff --git a/man/help.texi b/man/help.texi index a3c307e5d3b..fb14eb150a2 100644 --- a/man/help.texi +++ b/man/help.texi @@ -40,7 +40,7 @@ customization buffers and the like. @xref{Help Mode}. @cindex looking for a subject in documentation If you are looking for a certain feature, but don't know where exactly it is documented, and aren't sure of the name of a -related command or option, we recommend trying these methods. Usually +related command or variable, we recommend trying these methods. Usually it is best to start with an apropos command, then try searching the manual index, then finally look in the FAQ and the package keywords. @@ -51,9 +51,9 @@ be a regular expression (@pxref{Regexps}). Browse the buffer that this command displays to find what you are looking for. @xref{Apropos}. @item M-x apropos @key{RET} @var{topic} @key{RET} -This works like @kbd{C-h a}, but it also searches for user options and -other variables, in case the feature you are looking for is controlled -by an option, not a command. @xref{Apropos}. +This works like @kbd{C-h a}, but it also searches for variables, +in case the feature you are looking for is controlled by a variable +rather than a command. @xref{Apropos}. @item M-x apropos-documentation @key{RET} @var{topic} @key{RET} This searches the @emph{documentation strings} (the built-in short @@ -302,9 +302,9 @@ view, describe, default. @findex apropos-variable To list all user variables that match a regexp, use the command -@kbd{M-x apropos-variable}. This command shows only user variables and -customization options by default; if you specify a prefix argument, it -checks all variables. +@kbd{M-x apropos-variable}. By default, this command shows only +variables meant for user customization; if you specify a prefix +argument, it checks all variables. @findex apropos To list all Lisp symbols that contain a match for a regexp, not just diff --git a/man/macos.texi b/man/macos.texi index 93045eb1044..9451f35f4a5 100644 --- a/man/macos.texi +++ b/man/macos.texi @@ -101,7 +101,7 @@ is run on the Mac. It displays characters in the @code{mac-roman} coding system using 12-point Monaco. To insert characters directly in the @code{mac-roman} coding system, -type @kbd{C-x @key{RET} k mac-roman @key{RET}}, customize the option +type @kbd{C-x @key{RET} k mac-roman @key{RET}}, customize the variable @code{keyboard-coding-system}, or put this in your init file: @lisp diff --git a/man/maintaining.texi b/man/maintaining.texi index e7d98e67591..231699a7d02 100644 --- a/man/maintaining.texi +++ b/man/maintaining.texi @@ -90,7 +90,7 @@ can even guess the name of the function or other object that was changed. @vindex add-log-keep-changes-together - When the option @code{add-log-keep-changes-together} is + When the variable @code{add-log-keep-changes-together} is non-@code{nil}, @kbd{C-x 4 a} adds to any existing entry for the file rather than starting a new entry. diff --git a/man/major.texi b/man/major.texi index 4c933b13db0..a7c3a9062cf 100644 --- a/man/major.texi +++ b/man/major.texi @@ -18,9 +18,10 @@ parentheses (@pxref{Mode Line}). The least specialized major mode is called @dfn{Fundamental mode}. This mode has no mode-specific redefinitions or variable settings, so that each Emacs command behaves in its most general manner, and each -option is in its default state. For editing text of a specific type -that Emacs knows about, such as Lisp code or English text, you should -switch to the appropriate major mode, such as Lisp mode or Text mode. +user option variable is in its default state. For editing text of a +specific type that Emacs knows about, such as Lisp code or English +text, you should switch to the appropriate major mode, such as Lisp +mode or Text mode. Selecting a major mode changes the meanings of a few keys to become more specifically adapted to the language being edited. The ones that diff --git a/man/mini.texi b/man/mini.texi index 9d0a7d54be1..69e31032b12 100644 --- a/man/mini.texi +++ b/man/mini.texi @@ -392,7 +392,7 @@ indicate the places for completion; thus, @file{/u*/b*/f*} might complete to @file{/usr/bin/foo}. To enable this mode, use the command @kbd{M-x -partial-completion-mode}, or customize the option +partial-completion-mode}, or customize the variable @code{partial-completion-mode}. This binds the partial completion commands to @key{TAB}, @key{SPC}, @key{RET}, and @kbd{?}. The usual completion commands are available on @kbd{M-@key{TAB}}, diff --git a/man/misc.texi b/man/misc.texi index e4b2806c673..8068de4c25f 100644 --- a/man/misc.texi +++ b/man/misc.texi @@ -2020,8 +2020,8 @@ editors. Standard facilities can emulate these: @cindex mode, CRiSP You can turn on key bindings to emulate the CRiSP/Brief editor with @kbd{M-x crisp-mode}. Note that this rebinds @kbd{M-x} to exit Emacs -unless you change the user option @code{crisp-override-meta-x}. You can -also use the command @kbd{M-x scroll-all-mode} or set the user option +unless you set the variable @code{crisp-override-meta-x}. You can +also use the command @kbd{M-x scroll-all-mode} or set the variable @code{crisp-load-scroll-all} to emulate CRiSP's scroll-all feature (scrolling all windows together). diff --git a/man/programs.texi b/man/programs.texi index b48a55777a5..67b19c2e5e4 100644 --- a/man/programs.texi +++ b/man/programs.texi @@ -1277,7 +1277,7 @@ Hide all blocks @var{n} levels below this block @vindex hs-hide-comments-when-hiding-all @vindex hs-isearch-open @vindex hs-special-modes-alist - These user options exist for customizing Hideshow mode. + These variables exist for customizing Hideshow mode. @table @code @item hs-hide-comments-when-hiding-all diff --git a/man/screen.texi b/man/screen.texi index b2632fefd5d..ee3bb3e7dce 100644 --- a/man/screen.texi +++ b/man/screen.texi @@ -97,7 +97,7 @@ selected window's cursor is solid or blinking, and the other cursors are just hollow. Thus, the most striking cursor always shows you the selected window, on all kinds of terminals. - @xref{Cursor Display}, for customization options that control display + @xref{Cursor Display}, for customizable variables that control display of the cursor or cursors. The term ``point'' comes from the character @samp{.}, which was the diff --git a/man/sending.texi b/man/sending.texi index 5bc54294cf9..a1564d4fc01 100644 --- a/man/sending.texi +++ b/man/sending.texi @@ -506,9 +506,9 @@ the full name, and what style to use, as in @code{mail-from-style} For completion purposes, the valid mailing addresses are taken to be the local users' names plus your personal mail aliases. You can -specify additional sources of valid addresses; look at the customization -group @samp{mailalias} to see the options for this -(@pxref{Customization Groups}). +specify additional sources of valid addresses; see the customization +group @samp{mailalias} to see the variables for customizing this +feature (@pxref{Customization Groups}). If you type @kbd{M-@key{TAB}} in the body of the message, @code{mail-complete} invokes @code{ispell-complete-word}, as in Text From 12e737f868df17955af01b810249202134f8ee72 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 2005 11:26:25 +0000 Subject: [PATCH 471/560] (Glossary) : Add xref. : Change definition--include faces. Change xref. --- man/glossary.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man/glossary.texi b/man/glossary.texi index 017630801a6..5782ee7f2d8 100644 --- a/man/glossary.texi +++ b/man/glossary.texi @@ -434,6 +434,7 @@ such as font family and size, foreground and background colors, underline and strike-through, background stipple, etc. Emacs provides features to associate specific faces with portions of buffer text, in order to display that text as specified by the face attributes. +@xref{Faces}. @item File Locking Emacs uses file locking to notice when two different users @@ -1223,8 +1224,9 @@ back the text that existed earlier in the editing session. @xref{Undo}. @item User Option -A user option is a variable (q.v.@:) that exists so that you can customize -Emacs by setting it to a new value. @xref{Variables}. +A user option is a face (q.v.@:) or a variable (q.v.@:) that exists so +that you can customize Emacs by setting it to a new value. +@xref{Easy Customization}. @item Variable A variable is an object in Lisp that can store an arbitrary value. From 89fa0de4cd2f1501e83104fc68b82b74358467f4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 2005 11:34:58 +0000 Subject: [PATCH 472/560] (Easy Customization): Defn of "User Option" now includes faces. Don't say just "option" when talking about variables. Do say just "options" to mean "anything customizable". (Specific Customization): Describe `customize-variable', not `customize-option'. --- man/custom.texi | 160 ++++++++++++++++++++++++------------------------ 1 file changed, 81 insertions(+), 79 deletions(-) diff --git a/man/custom.texi b/man/custom.texi index bbde8b4aaf5..79e0bd60bea 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -178,10 +178,11 @@ region highlighted (currently only when using X). @xref{Mark}. @cindex user option Emacs has many @dfn{user options} which have values that you can set -in order to customize various commands. Most user options are -documented in this manual. Each user option is actually a Lisp -variable (@pxref{Variables}), so their names appear in the Variable -Index (@pxref{Variable Index}). +in order to customize various commands. Many user options are +documented in this manual. Most user options are actually Lisp +variables (@pxref{Variables}), so their names appear in the Variable +Index (@pxref{Variable Index}). The rest are faces and their +attributes (@pxref{Faces}). @findex customize @cindex customization buffer @@ -203,7 +204,7 @@ the active fields and other features. * Saving Customizations:: Details of saving customizations. * Face Customization:: How to edit the attributes of a face. * Specific Customization:: Making a customization buffer for specific - options, faces, or groups. + variables, faces, or groups. @end menu @node Customization Groups @@ -266,7 +267,7 @@ link to another group. mainly it contains other groups, which contain more groups, which contain the user options. By browsing the hierarchy of groups, you will eventually find the feature you are interested in customizing. -Then you can use the customization buffer to set the options and faces +Then you can use the customization buffer to set the options pertaining to that feature. You can also go straight to a particular group by name, using the command @kbd{M-x customize-group}. @@ -274,45 +275,45 @@ group by name, using the command @kbd{M-x customize-group}. You can view the structure of customization groups on a larger scale with @kbd{M-x customize-browse}. This command creates a special kind of customization buffer which shows only the names of the groups (and -options and faces), and their structure. +variables and faces), and their structure. In this buffer, you can show the contents of a group by invoking @samp{[+]}. When the group contents are visible, this button changes to @samp{[-]}; invoking that hides the group contents. - Each group, option or face name in this buffer has an active field -which says @samp{[Group]}, @samp{[Option]} or @samp{[Face]}. Invoking + Each group, variable, or face name in this buffer has an active field +which says @samp{[Group]}, @samp{[Variable]} or @samp{[Face]}. Invoking that active field creates an ordinary customization buffer showing just -that group and its contents, just that option, or just that face. +that group and its contents, just that variable, or just that face. This is the way to set values in it. -@node Changing an Option -@subsection Changing an Option +@node Changing a Variable +@subsection Changing a Variable - Here is an example of what a user option looks like in the + Here is an example of what a variable looks like in the customization buffer: @smallexample Kill Ring Max: [Hide] 60 - [State]: this option is unchanged from its standard setting. + [State]: this variable is unchanged from its standard setting. Maximum length of kill ring before oldest elements are thrown away. @end smallexample The text following @samp{[Hide]}, @samp{60} in this case, indicates -the current value of the option. If you see @samp{[Show]} instead of +the current value of the variable. If you see @samp{[Show]} instead of @samp{[Hide]}, it means that the value is hidden; the customization buffer initially hides values that take up several lines. Invoke @samp{[Show]} to show the value. The line after the option name indicates the @dfn{customization state} -of the option: in the example above, it says you have not changed the +of the variable: in the example above, it says you have not changed the option yet. The word @samp{[State]} at the beginning of this line is active; you can get a menu of various operations by invoking it with @kbd{Mouse-1} or @key{RET}. These operations are essential for -customizing the user option. +customizing the variable. The line after the @samp{[State]} line displays the beginning of the -option's documentation string. If there are more lines of +variable's documentation string. If there are more lines of documentation, this line ends with @samp{[More]}; invoke this to show the full documentation string. @@ -324,22 +325,22 @@ another number. change to say that you have edited the value: @smallexample -[State]: you have edited the value as text, but not set the option. +[State]: you have edited the value as text, but not set the variable. @end smallexample @cindex setting option value - Editing the value does not actually set the option. To do -that, you must @dfn{set} the option. To do this, invoke the word + Editing the value does not actually set the variable. To do +that, you must @dfn{set} it. To do this, invoke the word @samp{[State]} and choose @samp{Set for Current Session}. - The state of the option changes visibly when you set it: + The state of the variable changes visibly when you set it: @smallexample -[State]: you have set this option, but not saved it for future sessions. +[State]: you have set this variable, but not saved it for future sessions. @end smallexample You don't have to worry about specifying a value that is not valid; -setting the option checks for validity and will not really install an +setting the variable checks for validity and will not really install an unacceptable value. @kindex M-TAB @r{(customization buffer)} @@ -348,15 +349,15 @@ unacceptable value. command name, or anything else for which completion is defined, you can type @kbd{M-@key{TAB}} (@code{widget-complete}) to do completion. - Some options have a small fixed set of possible legitimate values. -These options don't let you edit the value textually. Instead, an + Some variables have a small fixed set of possible legitimate values. +These variables don't let you edit the value textually. Instead, an active field @samp{[Value Menu]} appears before the value; invoke this field to edit the value. For a boolean ``on or off'' value, the active field says @samp{[Toggle]}, and it changes to the other value. @samp{[Value Menu]} and @samp{[Toggle]} edit the buffer; the changes take effect when you use the @samp{Set for Current Session} operation. - Some options have values with complex structure. For example, the + Some variables have values with complex structure. For example, the value of @code{file-coding-system-alist} is an association list. Here is how it appears in the customization buffer: @@ -379,7 +380,7 @@ File Coding System Alist: [Hide] Decoding: undecided Encoding: nil [INS] - [State]: this option is unchanged from its standard setting. + [State]: this variable is unchanged from its standard setting. Alist to decide a coding system to use for a file I/O operation. [Hide] The format is ((PATTERN . VAL) ...), where PATTERN is a regular expression matching a file name, @@ -415,37 +416,37 @@ previous active or editable field. when they are finished editing a field. To insert a newline within an editable field, use @kbd{C-o} or @kbd{C-q C-j}. -@cindex saving option value -@cindex customized options, saving - Setting the option changes its value in the current Emacs session; +@cindex saving variable value +@cindex customized variables, saving + Setting the variable changes its value in the current Emacs session; @dfn{saving} the value changes it for future sessions as well. To -save the option, invoke @samp{[State]} and select the @samp{Save for +save the variable, invoke @samp{[State]} and select the @samp{Save for Future Sessions} operation. This works by writing code so as to set -the option again, each time you start Emacs (@pxref{Saving +the variable again, each time you start Emacs (@pxref{Saving Customizations}). - You can also restore the option to its standard value by invoking + You can also restore the variable to its standard value by invoking @samp{[State]} and selecting the @samp{Erase Customization} operation. There are actually three reset operations: @table @samp @item Reset -If you have made some modifications and not yet set the option, +If you have made some modifications and not yet set the variable, this restores the text in the customization buffer to match the actual value. @item Reset to Saved -This restores the value of the option to the last saved value, +This restores the value of the variable to the last saved value, and updates the text accordingly. @item Erase Customization -This sets the option to its standard value, and updates the text +This sets the variable to its standard value, and updates the text accordingly. This also eliminates any saved value for the option, so that you will get the standard value in future Emacs sessions. @item Use Backup Value -This sets the option to a previous value that was set in the -customization buffer in this session. If you customize an option +This sets the variable to a previous value that was set in the +customization buffer in this session. If you customize a variable and then reset it, which discards the customized value, you can get the customized value back again with this operation. @end table @@ -455,7 +456,7 @@ you can get the customized value back again with this operation. customization. Use the @samp{Add Comment} item from the @samp{[State]} menu to create a field for entering the comment. The comment you enter will be saved, and displayed again if you again view -the same option in a customization buffer, even in another session. +the same variable in a customization buffer, even in another session. The state of a group indicates whether anything in that group has been edited, set or saved. You can select @samp{Set for Current Session}, @@ -477,8 +478,9 @@ Invoking @samp{[Finish]} either buries or kills this customization buffer according to the setting of the option @code{custom-buffer-done-function}; the default is to bury the buffer. Each of the other fields performs an operation---set, save or -reset---on each of the items in the buffer that could meaningfully be -set, saved or reset. +reset---on each of the options in the buffer that could meaningfully +be set, saved or reset. They do not operate on options whose values +are hidden. @node Saving Customizations @subsection Saving Customizations @@ -525,8 +527,8 @@ customizations you might have on your init file. @cindex italic font @cindex fonts and faces - In addition to user options, some customization groups also include -faces. When you show the contents of a group, both the user options and + In addition to variables, some customization groups also include +faces. When you show the contents of a group, both the variables and the faces in the group appear in the customization buffer. Here is an example of how a face looks: @@ -568,7 +570,7 @@ black-and-white display, the colors you can use for the background are stipple patterns instead of a color. Setting, saving and resetting a face work like the same operations for -options (@pxref{Changing an Option}). +variables (@pxref{Changing a Variable}). A face can specify different appearances for different types of display. For example, a face can make text red on a color display, but @@ -588,37 +590,37 @@ to clear out the attribute. @subsection Customizing Specific Items Instead of finding the options you want to change by moving down -through the structure of groups, you can specify the particular option, -face or group that you want to customize. +through the structure of groups, you can specify the particular variable, +face, or group that you want to customize. @table @kbd -@item M-x customize-option @key{RET} @var{option} @key{RET} -Set up a customization buffer with just one option, @var{option}. +@item M-x customize-variable @key{RET} @var{variable} @key{RET} +Set up a customization buffer with just one variable, @var{variable}. @item M-x customize-face @key{RET} @var{face} @key{RET} Set up a customization buffer with just one face, @var{face}. @item M-x customize-group @key{RET} @var{group} @key{RET} Set up a customization buffer with just one group, @var{group}. @item M-x customize-apropos @key{RET} @var{regexp} @key{RET} -Set up a customization buffer with all the options, faces and groups +Set up a customization buffer with all the variables, faces and groups that match @var{regexp}. @item M-x customize-changed-options @key{RET} @var{version} @key{RET} -Set up a customization buffer with all the options, faces and groups +Set up a customization buffer with all the variables, faces and groups whose meaning has changed since Emacs version @var{version}. @item M-x customize-saved -Set up a customization buffer containing all options and faces that you +Set up a customization buffer containing all variables and faces that you have saved with customization buffers. @item M-x customize-customized -Set up a customization buffer containing all options and faces that you +Set up a customization buffer containing all variables and faces that you have customized but not saved. @end table -@findex customize-option - If you want to alter a particular user option with the -customization buffer, and you know its name, you can use the command -@kbd{M-x customize-option} and specify the option name. This sets up -the customization buffer with just one option---the one that you asked -for. Editing, setting and saving the value work as described above, but -only for the specified option. +@findex customize-variable + If you want to alter a particular variable with the customization +buffer, and you know its name, you can use the command @kbd{M-x +customize-variable} and specify the variable name. This sets up the +customization buffer with just one variable---the one that you asked +for. Editing, setting and saving the value work as described above, +but only for the specified variable. @findex customize-face Likewise, you can modify a specific face, chosen by name, using @@ -650,11 +652,11 @@ definitions have been changed since the specified version. @findex customize-saved @findex customize-customized - If you change option values and then decide the change was a mistake, -you can use two special commands to revisit your previous changes. Use -@kbd{M-x customize-saved} to look at the options and faces that you have -saved. Use @kbd{M-x customize-customized} to look at the options and -faces that you have set but not saved. + If you change option values and then decide the change was a +mistake, you can use two special commands to revisit your previous +changes. Use @kbd{M-x customize-saved} to look at the options that +you have saved. Use @kbd{M-x customize-customized} to look at the +options that you have set but not saved. @node Variables @section Variables @@ -679,14 +681,14 @@ turn on the feature---since you have to pick one particular value when you set the variable---is @code{t}. Emacs uses many Lisp variables for internal record keeping, but the -most interesting variables for a non-programmer user are the @dfn{user -options}, the variables that are meant for users to change. Each user -option that you can set with the customization buffer is, in fact, a -Lisp variable. Emacs does not (usually) change the values of these -variables; instead, you set the values, and thereby alter and control -the behavior of certain Emacs commands. Use of the customization -buffer is explained above; here we describe other aspects of Emacs -variables. +most interesting variables for a non-programmer user are those that +are also @dfn{user options}, the variables that are meant for users to +change. Each user option that you can set with the customization +buffer is (if it is not a face) in fact a Lisp variable. Emacs does +not (usually) change the values of these variables; instead, you set +the values, and thereby alter and control the behavior of certain +Emacs commands. Use of the customization buffer is explained above; +here we describe other aspects of Emacs variables. @menu * Examining:: Examining or setting one variable's value. @@ -734,10 +736,10 @@ variable is a user option. @kbd{C-h v} is not restricted to user options; it allows any variable name. @findex set-variable - The most convenient way to set a specific user option is with @kbd{M-x -set-variable}. This reads the variable name with the minibuffer (with -completion), and then reads a Lisp expression for the new value using -the minibuffer a second time. For example, + The most convenient way to set a specific user option variable is +with @kbd{M-x set-variable}. This reads the variable name with the +minibuffer (with completion), and then reads a Lisp expression for the +new value using the minibuffer a second time. For example, @example M-x set-variable @key{RET} fill-column @key{RET} 75 @key{RET} @@ -1092,10 +1094,10 @@ so you can judge. The @code{eval} ``variable,'' and certain actual variables, create a special risk; when you visit someone else's file, local variable specifications for these could affect your Emacs in arbitrary ways. -Therefore, the option @code{enable-local-eval} controls whether Emacs +Therefore, the variable @code{enable-local-eval} controls whether Emacs processes @code{eval} variables, as well variables with names that end in @samp{-hook}, @samp{-hooks}, @samp{-function} or @samp{-functions}, -and certain other variables. The three possibilities for the option's +and certain other variables. The three possibilities for the variable's value are @code{t}, @code{nil}, and anything else, just as for @code{enable-local-variables}. The default is @code{maybe}, which is neither @code{t} nor @code{nil}, so normally Emacs does ask for From ce4065431ec248e8ce4c68fde5a453b172264cec Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Jan 2005 11:35:43 +0000 Subject: [PATCH 473/560] *** empty log message *** --- admin/FOR-RELEASE | 2 +- lisp/ChangeLog | 8 ++++++++ man/ChangeLog | 21 +++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 22d36fe42fd..be844766439 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -208,7 +208,7 @@ man/misc.texi man/msdog.texi man/mule.texi "Luc Teirlinck" man/m-x.texi "Luc Teirlinck" -man/picture.texi +man/picture.texi Joakim Verona man/programs.texi "Stephen Eglen" man/regs.texi "Luc Teirlinck" man/rmail.texi diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ed352686eb6..f42a4ba7f7e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-01-30 Richard M. Stallman + + * cus-edit.el (custom-bury-buffer): Function deleted. + (custom-buffer-done-function): Option deleted. + (custom-buffer-done-kill): New (replacement option. + (Custom-buffer-done): Call quit-window. + (custom-buffer-create-internal): Update for above changes. + 2005-01-29 Luc Teirlinck * simple.el (undo-ask-before-discard): New var. diff --git a/man/ChangeLog b/man/ChangeLog index 5f69fc7d856..5f05930ed6a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,24 @@ +2005-01-30 Richard M. Stallman + + * custom.texi (Easy Customization): Defn of "User Option" now + includes faces. Don't say just "option" when talking about variables. + Do say just "options" to mean "anything customizable". + (Specific Customization): Describe `customize-variable', + not `customize-option'. + + * glossary.texi (Glossary) : Add xref. + : Change definition--include faces. Change xref. + + * picture.texi (Picture): Mention artist.el. + + * sending.texi, screen.texi, programs.texi, misc.texi: + * mini.texi, major.texi, maintaining.texi, macos.texi: + * help.texi, frames.texi, files.texi: + Don't say just "option" when talking about variables. + + * display.texi, mule.texi: Don't say just "option" when talking + about variables. Other minor cleanups. + 2005-01-28 Lars Magne Ingebrigtsen * gnus.texi: Some edits based on comments from David Abrahams. From 70b96d19f12a96e4983db214b8d3fa6c6ba26525 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Sun, 30 Jan 2005 14:47:11 +0000 Subject: [PATCH 474/560] (Easy Customization): Adapt menu to node name change. --- man/ChangeLog | 8 ++++++-- man/custom.texi | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 5f05930ed6a..d51c642c818 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-30 Luc Teirlinck + + * custom.texi (Easy Customization): Adapt menu to node name change. + 2005-01-30 Richard M. Stallman * custom.texi (Easy Customization): Defn of "User Option" now @@ -11,8 +15,8 @@ * picture.texi (Picture): Mention artist.el. - * sending.texi, screen.texi, programs.texi, misc.texi: - * mini.texi, major.texi, maintaining.texi, macos.texi: + * sending.texi, screen.texi, programs.texi, misc.texi: + * mini.texi, major.texi, maintaining.texi, macos.texi: * help.texi, frames.texi, files.texi: Don't say just "option" when talking about variables. diff --git a/man/custom.texi b/man/custom.texi index 79e0bd60bea..2b9710ea512 100644 --- a/man/custom.texi +++ b/man/custom.texi @@ -200,7 +200,7 @@ the active fields and other features. @menu * Groups: Customization Groups. How options are classified in a structure. -* Changing an Option:: How to edit a value and set an option. +* Changing a Variable:: How to edit a value and set an option. * Saving Customizations:: Details of saving customizations. * Face Customization:: How to edit the attributes of a face. * Specific Customization:: Making a customization buffer for specific From 7bf72fa6f6c24219eb242b70ab887e4dc9138781 Mon Sep 17 00:00:00 2001 From: Jesper Harder Date: Sun, 30 Jan 2005 16:39:16 +0000 Subject: [PATCH 475/560] (syms_of_macterm) : Fix docstring indentation. (syms_of_macterm) : do. --- src/ChangeLog | 5 +++++ src/macterm.c | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 97f88d2b3f8..d1425eba3bb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-01-30 Jesper Harder + + * macterm.c (syms_of_macterm) : Fix docstring indentation. + (syms_of_macterm) : do. + 2005-01-29 Luc Teirlinck * undo.c (syms_of_undo) : Doc update. diff --git a/src/macterm.c b/src/macterm.c index 9304a2d62f9..9dfe67bd040 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -9902,18 +9902,18 @@ nil then the key will act as the normal Mac option modifier. */); DEFVAR_LISP ("mac-reverse-ctrl-meta", &Vmac_reverse_ctrl_meta, doc: /* Non-nil means that the control and meta keys are reversed. This is - useful for non-standard keyboard layouts. */); +useful for non-standard keyboard layouts. */); Vmac_reverse_ctrl_meta = Qnil; DEFVAR_LISP ("mac-emulate-three-button-mouse", &Vmac_emulate_three_button_mouse, doc: /* t means that when the option-key is held down while pressing the - mouse button, the click will register as mouse-2 and while the - command-key is held down, the click will register as mouse-3. - 'reverse means that the the option-key will register for mouse-3 - and the command-key will register for mouse-2. nil means that - not emulation should be done and the modifiers should be placed - on the mouse-1 event. */); +mouse button, the click will register as mouse-2 and while the +command-key is held down, the click will register as mouse-3. +'reverse means that the the option-key will register for mouse-3 +and the command-key will register for mouse-2. nil means that +no emulation should be done and the modifiers should be placed +on the mouse-1 event. */); Vmac_emulate_three_button_mouse = Qnil; #if USE_CARBON_EVENTS From a050b1a91a6fb149792175dc0d1f8a1707afd56e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 30 Jan 2005 18:13:05 +0000 Subject: [PATCH 476/560] *** empty log message *** --- src/ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d1425eba3bb..7c95c9868a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,7 @@ 2005-01-30 Jesper Harder - * macterm.c (syms_of_macterm) : Fix docstring indentation. - (syms_of_macterm) : do. + * macterm.c (syms_of_macterm) + : Fix docstring indentation. 2005-01-29 Luc Teirlinck From f429956a03408289fe1e9ba8127377cc81c2bd58 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 31 Jan 2005 00:28:37 +0000 Subject: [PATCH 477/560] (gnus-article-mode): Turn off the "\ " non-break space. --- lisp/gnus/ChangeLog | 28 +++++++++++++++------------- lisp/gnus/gnus-art.el | 2 ++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2fbab6bea54..eb761d10b27 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2005-01-30 Stefan Monnier + + * gnus-art.el (gnus-article-mode): Turn off the "\ " non-break space. + 2005-01-28 Stefan Monnier * message.el (message-beginning-of-line): Change the behavior when @@ -11,8 +15,8 @@ 2005-01-28 Katsumi Yamaoka - * gnus-art.el (gnus-article-prepare): Remove - message-strip-forbidden-properties from the local hook. + * gnus-art.el (gnus-article-prepare): + Remove message-strip-forbidden-properties from the local hook. 2005-01-24 Katsumi Yamaoka @@ -33,9 +37,9 @@ 2004-12-27 Simon Josefsson - * mm-bodies.el (mm-body-encoding): Don't permit 7-bit to be used - when mm-use-ultra-safe-encoding is enabled (e.g., for PGP/MIME) - and we have trailing white space. Reported by Werner Koch . + * mm-bodies.el (mm-body-encoding): Don't permit 7-bit to be used when + mm-use-ultra-safe-encoding is enabled (e.g., for PGP/MIME) and we have + trailing white space. Reported by Werner Koch . 2004-12-17 Kim F. Storm @@ -408,11 +412,10 @@ 2004-10-18 Kevin Greiner - * gnus-agent.el (gnus-agent-possibly-synchronize-flags): Ignore - servers that are offline. Avoids having gnus-agent-toggle-plugged - first ask if you want to open a server and then, even when you - responded with no, asking if you want to synchronize the server's - flags. + * gnus-agent.el (gnus-agent-possibly-synchronize-flags): Ignore servers + that are offline. Avoids having gnus-agent-toggle-plugged first ask if + you want to open a server and then, even when you responded with no, + asking if you want to synchronize the server's flags. (gnus-agent-synchronize-flags-server): Rewrite read loop to handle multi-line expressions. (gnus-agent-synchronize-group-flags): New internal function. @@ -560,9 +563,8 @@ 2004-10-18 Kevin Greiner - * gnus-start.el (gnus-convert-old-newsrc): Only write the - conversion message to newsrc-dribble when an actual conversion is - performed. + * gnus-start.el (gnus-convert-old-newsrc): Only write the conversion + message to newsrc-dribble when an actual conversion is performed. 2004-10-18 Kevin Greiner diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 8a81176a5f6..3f8e172c1a8 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3711,6 +3711,8 @@ commands: (make-local-variable 'gnus-article-image-alist) (make-local-variable 'gnus-article-charset) (make-local-variable 'gnus-article-ignored-charsets) + ;; Prevent recent Emacsen from displaying non-break space as "\ ". + (set (make-local-variable 'show-nonbreak-escape) nil) (gnus-set-default-directory) (buffer-disable-undo) (setq buffer-read-only t) From 2d08f307e9ac4af5263bfcea672166354e601bbb Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 31 Jan 2005 02:21:40 +0000 Subject: [PATCH 478/560] *** empty log message *** --- lisp/ChangeLog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f42a4ba7f7e..f5b1550c2fa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2005-01-31 Nick Roberts + + * progmodes/gdb-ui.el (gdb-memory-address) + (gdb-memory-repeat-count, gdb-memory-format, gdb-memory-unit) + (gdb-memory-mode-map, gdb-memory-format-keymap) + (gdb-memory-format-menu, gdb-memory-unit-keymap) + (gdb-memory-unit-menu): New variables for a buffer + that lets the user examine program memory. + (gdb-memory-set-address, gdb-memory-set-repeat-count) + (gdb-memory-format-binary, gdb-memory-format-octal) + (gdb-memory-format-unsigned, gdb-memory-format-signed) + (gdb-memory-format-hexadecimal, gdb-memory-format-menu) + (gdb-memory-format-menu-1, gdb-memory-unit-giant) + (gdb-memory-unit-word, gdb-memory-unit-halfword) + (gdb-memory-unit-byte, gdb-memory-unit-menu) + (gdb-memory-unit-menu-1, gdb-make-header-line-mouse-map) + (gdb-memory-mode, gdb-memory-buffer-name) + (gdb-display-memory-buffer, gdb-frame-memory-buffer): + New functions for above buffer. + 2005-01-30 Richard M. Stallman * cus-edit.el (custom-bury-buffer): Function deleted. From 37ebd64bd93a489e5f0ed61a2a4f936d111391e3 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 31 Jan 2005 02:22:24 +0000 Subject: [PATCH 479/560] (gdb-memory-address) (gdb-memory-repeat-count, gdb-memory-format, gdb-memory-unit) (gdb-memory-mode-map, gdb-memory-format-keymap) (gdb-memory-format-menu, gdb-memory-unit-keymap) (gdb-memory-unit-menu): New variables for a buffer that lets the user examine program memory. (gdb-memory-set-address, gdb-memory-set-repeat-count) (gdb-memory-format-binary, gdb-memory-format-octal) (gdb-memory-format-unsigned, gdb-memory-format-signed) (gdb-memory-format-hexadecimal, gdb-memory-format-menu) (gdb-memory-format-menu-1, gdb-memory-unit-giant) (gdb-memory-unit-word, gdb-memory-unit-halfword) (gdb-memory-unit-byte, gdb-memory-unit-menu) (gdb-memory-unit-menu-1, gdb-make-header-line-mouse-map) (gdb-memory-mode, gdb-memory-buffer-name) (gdb-display-memory-buffer, gdb-frame-memory-buffer): New functions for above buffer. --- lisp/progmodes/gdb-ui.el | 279 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 275 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 2769023605e..54c43d1df36 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -53,8 +53,14 @@ ;; Known Bugs: ;; ;; TODO: -;; Use tree-widget.el instead of the speedbar for watch-expressions? -;; Mark breakpoint locations on scroll-bar of source buffer? +;; 1) Use MI command -data-read-memory for memory window. +;; 2) Highlight changed register values (use MI commands +;; -data-list-register-values and -data-list-changed-registers instead +;; of 'info registers'. +;; 3) Use tree-widget.el instead of the speedbar for watch-expressions? +;; 4) Mark breakpoint locations on scroll-bar of source buffer? +;; 5) After release of 21.4 use '-var-list-children --all-values' +;; and '-stack-list-locals 2' which need GDB 6.1 onwards. ;;; Code: @@ -62,6 +68,7 @@ (defvar gdb-current-address "main" "Initialisation for Assembler buffer.") (defvar gdb-previous-address nil) +(defvar gdb-memory-address "main") (defvar gdb-previous-frame nil) (defvar gdb-current-frame nil) (defvar gdb-current-stack-level nil) @@ -227,6 +234,7 @@ detailed description of this mode. ;; (re-)initialize (setq gdb-current-address "main") (setq gdb-previous-address nil) + (setq gdb-memory-address "main") (setq gdb-previous-frame nil) (setq gdb-current-frame nil) (setq gdb-current-stack-level nil) @@ -840,6 +848,7 @@ happens to be appropriate." (gdb-invalidate-breakpoints) (gdb-invalidate-assembler) (gdb-invalidate-registers) + (gdb-invalidate-memory) (gdb-invalidate-locals) (gdb-invalidate-threads) (unless (eq system-type 'darwin) ;Breaks on Darwin's GDB-5.3. @@ -1521,8 +1530,268 @@ static char *magick[] = { (let ((special-display-regexps (append special-display-regexps '(".*"))) (special-display-frame-alist gdb-frame-parameters)) (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer)))) - + +;; Memory buffer. ;; +(defcustom gdb-memory-repeat-count 32 + "Number of data items in memory window." + :type 'integer + :group 'gud + :version "21.4") + +(defcustom gdb-memory-format "x" + "Display format of data items in memory window." + :type '(choice (const :tag "Hexadecimal" "x") + (const :tag "Signed decimal" "d") + (const :tag "Unsigned decimal" "u") + (const :tag "Octal" "o") + (const :tag "Binary" "t")) + :group 'gud + :version "21.4") + +(defcustom gdb-memory-unit "w" + "Unit size of data items in memory window." + :type '(choice (const :tag "Byte" "b") + (const :tag "Halfword" "h") + (const :tag "Word" "w") + (const :tag "Giant word" "g")) + :group 'gud + :version "21.4") + +(gdb-set-buffer-rules 'gdb-memory-buffer + 'gdb-memory-buffer-name + 'gdb-memory-mode) + +(def-gdb-auto-updated-buffer gdb-memory-buffer + gdb-invalidate-memory + (concat gdb-server-prefix "x/" (number-to-string gdb-memory-repeat-count) + gdb-memory-format gdb-memory-unit " " gdb-memory-address "\n") + gdb-read-memory-handler + gdb-read-memory-custom) + +(defun gdb-read-memory-custom ()) + +(defvar gdb-memory-mode-map + (let ((map (make-sparse-keymap))) + (suppress-keymap map) + (define-key map "q" 'kill-this-buffer) + map)) + +(defun gdb-memory-set-address (event) + "Set the start memory address." + (interactive "e") + (save-selected-window + (select-window (posn-window (event-start event))) + (let ((arg (read-from-minibuffer "Memory address: "))) + (setq gdb-memory-address arg)) + (gdb-invalidate-memory))) + +(defun gdb-memory-set-repeat-count (event) + "Set the number of data items in memory window." + (interactive "e") + (save-selected-window + (select-window (posn-window (event-start event))) + (let* ((arg (read-from-minibuffer "Repeat count: ")) + (count (string-to-int arg))) + (if (< count 0) + (error "Non-negative numbers only") + (customize-set-variable 'gdb-memory-repeat-count count) + (gdb-invalidate-memory))))) + +(defun gdb-memory-format-binary () + "Set the display format to binary." + (interactive) + (customize-set-variable 'gdb-memory-format "t") + (gdb-invalidate-memory)) + +(defun gdb-memory-format-octal () + "Set the display format to octal." + (interactive) + (customize-set-variable 'gdb-memory-format "o") + (gdb-invalidate-memory)) + +(defun gdb-memory-format-unsigned () + "Set the display format to unsigned decimal." + (interactive) + (customize-set-variable 'gdb-memory-format "u") + (gdb-invalidate-memory)) + +(defun gdb-memory-format-signed () + "Set the display format to decimal." + (interactive) + (customize-set-variable 'gdb-memory-format "d") + (gdb-invalidate-memory)) + +(defun gdb-memory-format-hexadecimal () + "Set the display format to hexadecimal." + (interactive) + (customize-set-variable 'gdb-memory-format "x") + (gdb-invalidate-memory)) + +(defvar gdb-memory-format-keymap + (let ((map (make-sparse-keymap))) + (define-key map [header-line down-mouse-3] 'gdb-memory-format-menu-1) + map) + "Keymap to select format in the header line.") + +(defvar gdb-memory-format-menu (make-sparse-keymap "Format") + "Menu of display formats in the header line.") + +(define-key gdb-memory-format-menu [binary] + '(menu-item "Binary" gdb-memory-format-binary + :button (:radio . (equal gdb-memory-format "t")))) +(define-key gdb-memory-format-menu [octal] + '(menu-item "Octal" gdb-memory-format-octal + :button (:radio . (equal gdb-memory-format "o")))) +(define-key gdb-memory-format-menu [unsigned] + '(menu-item "Unsigned Decimal" gdb-memory-format-unsigned + :button (:radio . (equal gdb-memory-format "u")))) +(define-key gdb-memory-format-menu [signed] + '(menu-item "Signed Decimal" gdb-memory-format-signed + :button (:radio . (equal gdb-memory-format "d")))) +(define-key gdb-memory-format-menu [hexadecimal] + '(menu-item "Hexadecimal" gdb-memory-format-hexadecimal + :button (:radio . (equal gdb-memory-format "x")))) + +(defun gdb-memory-format-menu (event) + (interactive "@e") + (x-popup-menu event gdb-memory-format-menu)) + +(defun gdb-memory-format-menu-1 (event) + (interactive "e") + (save-selected-window + (select-window (posn-window (event-start event))) + (let* ((selection (gdb-memory-format-menu event)) + (binding (and selection (lookup-key gdb-memory-format-menu + (vector (car selection)))))) + (if binding (call-interactively binding))))) + +(defun gdb-memory-unit-giant () + "Set the unit size to giant words (eight bytes)." + (interactive) + (customize-set-variable 'gdb-memory-unit "g") + (gdb-invalidate-memory)) + +(defun gdb-memory-unit-word () + "Set the unit size to words (four bytes)." + (interactive) + (customize-set-variable 'gdb-memory-unit "w") + (gdb-invalidate-memory)) + +(defun gdb-memory-unit-halfword () + "Set the unit size to halfwords (two bytes)." + (interactive) + (customize-set-variable 'gdb-memory-unit "h") + (gdb-invalidate-memory)) + +(defun gdb-memory-unit-byte () + "Set the unit size to bytes." + (interactive) + (customize-set-variable 'gdb-memory-unit "b") + (gdb-invalidate-memory)) + +(defvar gdb-memory-unit-keymap + (let ((map (make-sparse-keymap))) + (define-key map [header-line down-mouse-3] 'gdb-memory-unit-menu-1) + map) + "Keymap to select units in the header line.") + +(defvar gdb-memory-unit-menu (make-sparse-keymap "Unit") + "Menu of units in the header line.") + +(define-key gdb-memory-unit-menu [giantwords] + '(menu-item "Giant words" gdb-memory-unit-giant + :button (:radio . (equal gdb-memory-unit "g")))) +(define-key gdb-memory-unit-menu [words] + '(menu-item "Words" gdb-memory-unit-word + :button (:radio . (equal gdb-memory-unit "w")))) +(define-key gdb-memory-unit-menu [halfwords] + '(menu-item "Halfwords" gdb-memory-unit-halfword + :button (:radio . (equal gdb-memory-unit "h")))) +(define-key gdb-memory-unit-menu [bytes] + '(menu-item "Bytes" gdb-memory-unit-byte + :button (:radio . (equal gdb-memory-unit "b")))) + +(defun gdb-memory-unit-menu (event) + (interactive "@e") + (x-popup-menu event gdb-memory-unit-menu)) + +(defun gdb-memory-unit-menu-1 (event) + (interactive "e") + (save-selected-window + (select-window (posn-window (event-start event))) + (let* ((selection (gdb-memory-unit-menu event)) + (binding (and selection (lookup-key gdb-memory-unit-menu + (vector (car selection)))))) + (if binding (call-interactively binding))))) + +;;from make-mode-line-mouse-map +(defun gdb-make-header-line-mouse-map (mouse function) "\ +Return a keymap with single entry for mouse key MOUSE on the header line. +MOUSE is defined to run function FUNCTION with no args in the buffer +corresponding to the mode line clicked." + (let ((map (make-sparse-keymap))) + (define-key map (vector 'header-line mouse) function) + (define-key map (vector 'header-line 'down-mouse-1) 'ignore) + map)) + +(defun gdb-memory-mode () + "Major mode for examining memory. + +\\{gdb-memory-mode-map}" + (kill-all-local-variables) + (setq major-mode 'gdb-memory-mode) + (setq mode-name "Memory") + (setq buffer-read-only t) + (use-local-map gdb-memory-mode-map) + (setq header-line-format + '(:eval + (concat + "Read address: " + (propertize gdb-memory-address + 'face font-lock-warning-face + 'help-echo (purecopy "mouse-1: Set memory address") + 'local-map (purecopy (gdb-make-header-line-mouse-map + 'mouse-1 + #'gdb-memory-set-address))) + " Repeat Count: " + (propertize (number-to-string gdb-memory-repeat-count) + 'face font-lock-warning-face + 'help-echo (purecopy "mouse-1: Set repeat count") + 'local-map (purecopy (gdb-make-header-line-mouse-map + 'mouse-1 + #'gdb-memory-set-repeat-count))) + " Display Format: " + (propertize gdb-memory-format + 'face font-lock-warning-face + 'help-echo (purecopy "mouse-3: Select display format") + 'local-map gdb-memory-format-keymap) + " Unit Size: " + (propertize gdb-memory-unit + 'face font-lock-warning-face + 'help-echo (purecopy "mouse-3: Select unit size") + 'local-map gdb-memory-unit-keymap)))) + (run-mode-hooks 'gdb-memory-mode-hook) + 'gdb-invalidate-memory) + +(defun gdb-memory-buffer-name () + (with-current-buffer gud-comint-buffer + (concat "*memory of " (gdb-get-target-string) "*"))) + +(defun gdb-display-memory-buffer () + "Display memory contents." + (interactive) + (gdb-display-buffer + (gdb-get-create-buffer 'gdb-memory-buffer))) + +(defun gdb-frame-memory-buffer () + "Display memory contents in a new frame." + (interactive) + (let ((special-display-regexps (append special-display-regexps '(".*"))) + (special-display-frame-alist gdb-frame-parameters)) + (display-buffer (gdb-get-create-buffer 'gdb-memory-buffer)))) + + ;; Locals buffer. ;; (gdb-set-buffer-rules 'gdb-locals-buffer @@ -1633,6 +1902,7 @@ static char *magick[] = { `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) + (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer)) (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) @@ -1643,8 +1913,9 @@ static char *magick[] = { (define-key gud-menu-map [displays] `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba))) (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) - (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) + (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) + (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer)) (define-key menu [registers] '("Registers" . gdb-display-registers-buffer)) (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) From 434e68998059809d3481f5506108eefddbf1f974 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:21:31 +0000 Subject: [PATCH 480/560] (math-read-token): Add support for LaTeX. --- lisp/calc/calc-aent.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 2210435036c..bf4f5c382e7 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -690,7 +690,7 @@ in Calc algebraic input.") math-exp-pos) (or (eq math-exp-pos 0) (and (memq calc-language '(nil flat big unform - tex eqn)) + tex latex eqn)) (eq (string-match "[^])}\"a-zA-Z0-9'$]_" math-exp-str (1- math-exp-pos)) (1- math-exp-pos)))))) @@ -746,7 +746,7 @@ in Calc algebraic input.") (setq math-exp-token 'string math-expr-data (math-match-substring math-exp-str 1) math-exp-pos (match-end 0)))) - ((and (= ch ?\\) (eq calc-language 'tex) + ((and (= ch ?\\) (memq calc-language '(tex latex)) (< math-exp-pos (1- (length math-exp-str)))) (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" math-exp-str math-exp-pos) @@ -800,11 +800,11 @@ in Calc algebraic input.") (setq math-exp-pos (match-end 0)) (math-read-token)) (t - (if (and (eq ch ?\{) (memq calc-language '(tex eqn))) + (if (and (eq ch ?\{) (memq calc-language '(tex latex eqn))) (setq ch ?\()) - (if (and (eq ch ?\}) (memq calc-language '(tex eqn))) + (if (and (eq ch ?\}) (memq calc-language '(tex latex eqn))) (setq ch ?\))) - (if (and (eq ch ?\&) (eq calc-language 'tex)) + (if (and (eq ch ?\&) (memq calc-language '(tex latex))) (setq ch ?\,)) (setq math-exp-token 'punc math-expr-data (char-to-string ch) From 4617278c2591718bea340da2949ca6eae57f57d8 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:23:04 +0000 Subject: [PATCH 481/560] Add calc-latex-language to autoloads. (calc-mode-map): Add calc-latex-language. --- lisp/calc/calc-ext.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 8d3be3b8505..9a79032b8db 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -217,6 +217,7 @@ (define-key calc-mode-map "dO" 'calc-flat-language) (define-key calc-mode-map "dP" 'calc-pascal-language) (define-key calc-mode-map "dT" 'calc-tex-language) + (define-key calc-mode-map "dL" 'calc-latex-language) (define-key calc-mode-map "dU" 'calc-unformatted-language) (define-key calc-mode-map "dW" 'calc-maple-language) (define-key calc-mode-map "d[" 'calc-truncate-up) @@ -998,7 +999,7 @@ calc-keypad-press) ("calc-lang" calc-big-language calc-c-language calc-eqn-language calc-flat-language calc-fortran-language calc-maple-language calc-mathematica-language calc-normal-language calc-pascal-language -calc-tex-language calc-unformatted-language) +calc-tex-language calc-latex-language calc-unformatted-language) ("calc-map" calc-accumulate calc-apply calc-inner-product calc-map calc-map-equation calc-map-stack calc-outer-product calc-reduce) From 2d3ce3f29290628c20bf36db7b87c9a908ac16c9 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:25:17 +0000 Subject: [PATCH 482/560] (calc-latex-language, math-latex-parse-frac) (math-latex-print-frac): New functions. (math-oper-table, math-function-table, math-variable-table) (math-complex-format, math-input-filter): Add latex properties. (calc-set-language): Set math-expr-special-function-mapping. --- lisp/calc/calc-lang.el | 167 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index cfbe3313d8e..c691e2bcc2b 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -36,6 +36,7 @@ (defun calc-set-language (lang &optional option no-refresh) (setq math-expr-opers (or (get lang 'math-oper-table) math-standard-opers) math-expr-function-mapping (get lang 'math-function-table) + math-expr-special-function-mapping (get lang 'math-special-function-table) math-expr-variable-mapping (get lang 'math-variable-table) calc-language-input-filter (get lang 'math-input-filter) calc-language-output-filter (get lang 'math-output-filter) @@ -296,6 +297,26 @@ "TeX language mode with \\func{\\hbox{var}}") "TeX language mode")))) +(defun calc-latex-language (n) + (interactive "P") + (calc-wrapper + (and n (setq n (prefix-numeric-value n))) + (calc-set-language 'latex n) + (cond ((not n) + (message "LaTeX language mode")) + ((= n 0) + (message "LaTeX language mode with multiline matrices")) + ((= n 1) + (message "LaTeX language mode with \\text{func}(\\text{var})")) + ((> n 1) + (message + "LaTeX language mode with \\text{func}(\\text{var}) and multiline matrices")) + ((= n -1) + (message "LaTeX language mode with \\func(\\text{var})")) + ((< n -1) + (message + "LaTeX language mode with \\func(\\text{var}) and multiline matrices"))))) + (put 'tex 'math-oper-table '( ( "u+" ident -1 1000 ) ( "u-" neg -1 1000 ) @@ -406,6 +427,152 @@ str) (put 'tex 'math-input-filter 'math-tex-input-filter) +(put 'latex 'math-oper-table + '( ( "u+" ident -1 1000 ) + ( "u-" neg -1 1000 ) + ( "\\hat" calcFunc-hat -1 950 ) + ( "\\check" calcFunc-check -1 950 ) + ( "\\tilde" calcFunc-tilde -1 950 ) + ( "\\acute" calcFunc-acute -1 950 ) + ( "\\grave" calcFunc-grave -1 950 ) + ( "\\dot" calcFunc-dot -1 950 ) + ( "\\ddot" calcFunc-dotdot -1 950 ) + ( "\\breve" calcFunc-breve -1 950 ) + ( "\\bar" calcFunc-bar -1 950 ) + ( "\\vec" calcFunc-Vec -1 950 ) + ( "\\underline" calcFunc-under -1 950 ) + ( "\\Hat" calcFunc-Hat -1 950 ) + ( "\\Check" calcFunc-Check -1 950 ) + ( "\\Tilde" calcFunc-Tilde -1 950 ) + ( "\\Acute" calcFunc-Acute -1 950 ) + ( "\\Grave" calcFunc-Grave -1 950 ) + ( "\\Dot" calcFunc-Dot -1 950 ) + ( "\\Ddot" calcFunc-Dotdot -1 950 ) + ( "\\Breve" calcFunc-Breve -1 950 ) + ( "\\Bar" calcFunc-Bar -1 950 ) + ( "\\Vec" calcFunc-VEC -1 950 ) + ( "\\dddot" calcFunc-dddot -1 950 ) + ( "\\ddddot" calcFunc-ddddot -1 950 ) + ( "u|" calcFunc-abs -1 0 ) + ( "|" closing 0 -1 ) + ( "\\lfloor" calcFunc-floor -1 0 ) + ( "\\rfloor" closing 0 -1 ) + ( "\\lceil" calcFunc-ceil -1 0 ) + ( "\\rceil" closing 0 -1 ) + ( "\\pm" sdev 300 300 ) + ( "!" calcFunc-fact 210 -1 ) + ( "^" ^ 201 200 ) + ( "_" calcFunc-subscr 201 200 ) + ( "\\times" * 191 190 ) + ( "*" * 191 190 ) + ( "2x" * 191 190 ) + ( "+" + 180 181 ) + ( "-" - 180 181 ) + ( "\\over" / 170 171 ) + ( "/" / 170 171 ) + ( "\div" / 170 171 ) + ( "\\choose" calcFunc-choose 170 171 ) + ( "\\mod" % 170 171 ) + ( "<" calcFunc-lt 160 161 ) + ( ">" calcFunc-gt 160 161 ) + ( "\\leq" calcFunc-leq 160 161 ) + ( "\\le" calcFunc-leq 160 161 ) + ( "\\leqq" calcFunc-leq 160 161 ) + ( "\\leqsland" calcFunc-leq 160 161 ) + ( "\\geq" calcFunc-geq 160 161 ) + ( "\\ge" calcFunc-geq 160 161 ) + ( "\\geqq" calcFunc-geq 160 161 ) + ( "\\geqslant" calcFunc-geq 160 161 ) + ( "=" calcFunc-eq 160 161 ) + ( "\\neq" calcFunc-neq 160 161 ) + ( "\\ne" calcFunc-neq 160 161 ) + ( "\\lnot" calcFunc-lnot -1 121 ) + ( "\\land" calcFunc-land 110 111 ) + ( "\\lor" calcFunc-lor 100 101 ) + ( "?" (math-read-if) 91 90 ) + ( "!!!" calcFunc-pnot -1 85 ) + ( "&&&" calcFunc-pand 80 81 ) + ( "|||" calcFunc-por 75 76 ) + ( "\\gets" calcFunc-assign 51 50 ) + ( ":=" calcFunc-assign 51 50 ) + ( "::" calcFunc-condition 45 46 ) + ( "\\to" calcFunc-evalto 40 41 ) + ( "\\to" calcFunc-evalto 40 -1 ) + ( "=>" calcFunc-evalto 40 41 ) + ( "=>" calcFunc-evalto 40 -1 ))) + +(put 'latex 'math-function-table + '( ( \\arccos . calcFunc-arccos ) + ( \\arcsin . calcFunc-arcsin ) + ( \\arctan . calcFunc-arctan ) + ( \\arg . calcFunc-arg ) + ( \\cos . calcFunc-cos ) + ( \\cosh . calcFunc-cosh ) + ( \\det . calcFunc-det ) + ( \\exp . calcFunc-exp ) + ( \\gcd . calcFunc-gcd ) + ( \\ln . calcFunc-ln ) + ( \\log . calcFunc-log10 ) + ( \\max . calcFunc-max ) + ( \\min . calcFunc-min ) + ( \\tan . calcFunc-tan ) + ( \\sin . calcFunc-sin ) + ( \\sinh . calcFunc-sinh ) + ( \\sqrt . calcFunc-sqrt ) + ( \\tanh . calcFunc-tanh ) + ( \\frac . (math-latex-parse-frac /)) + ( \\tfrac . (math-latex-parse-frac /)) + ( \\dfrac . (math-latex-parse-frac /)) + ( \\binom . (math-latex-parse-frac calcFunc-choose)) + ( \\tbinom . (math-latex-parse-frac calcFunc-choose)) + ( \\dbinom . (math-latex-parse-frac calcFunc-choose)) + ( \\phi . calcFunc-totient ) + ( \\mu . calcFunc-moebius ))) + +(put 'latex 'math-special-function-table + '((/ . (math-latex-print-frac "\\frac")) + (calcFunc-choose . (math-latex-print-frac "\\binom")))) + +(put 'latex 'math-variable-table + '( ( \\pi . var-pi ) + ( \\infty . var-inf ) + ( \\infty . var-uinf ) + ( \\phi . var-phi ) + ( \\gamma . var-gamma ) + ( \\sum . (math-parse-tex-sum calcFunc-sum) ) + ( \\prod . (math-parse-tex-sum calcFunc-prod) ))) + +(put 'latex 'math-complex-format 'i) + +(defun math-latex-parse-frac (f val) + (let (numer denom) + (setq args (math-read-expr-list)) + (math-read-token) + (setq margs (math-read-factor)) + (list (nth 2 f) (car args) margs))) + +(defun math-latex-print-frac (a fn) + (list 'horiz (nth 1 fn) "{" (math-compose-expr (nth 1 a) -1) + "}{" + (math-compose-expr (nth 2 a) -1) + "}")) + +(defun math-latex-input-filter (str) ; allow parsing of 123\,456\,789. + (while (string-match "[0-9]\\\\,[0-9]" str) + (setq str (concat (substring str 0 (1+ (match-beginning 0))) + (substring str (1- (match-end 0)))))) + (while (string-match "\\\\begin{\\(small\\|[bp]\\)?matrix}" str) + (setq str (concat (substring str 0 (match-beginning 0)) + "\\matrix{" + (substring str (match-end 0))))) + (while (string-match "\\\\end{\\(small\\|[bp]\\)?matrix}" str) + (setq str (concat (substring str 0 (match-beginning 0)) + "}" + (substring str (match-end 0))))) + + str) + +(put 'latex 'math-input-filter 'math-latex-input-filter) (defun calc-eqn-language (n) (interactive "P") From dd9041c77a7a6c325df620d38f773215d3921343 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:28:06 +0000 Subject: [PATCH 483/560] (calc-edit-user-syntax, calc-fix-token-name) (calc-write-parse-table-part): Add LaTeX support. --- lisp/calc/calc-prog.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index a37f3c5cedd..d5d9123d04d 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -477,6 +477,7 @@ (format "Editing %s-Mode Syntax Table. " (cond ((null lang) "Normal") ((eq lang 'tex) "TeX") + ((eq lang 'latex) "LaTeX") (t (capitalize (symbol-name lang)))))) (calc-write-parse-table (cdr (assq lang calc-user-parse-tables)) lang))) @@ -519,7 +520,7 @@ (cond ((stringp (car p)) (let ((s (car p))) (if (and (string-match "\\`\\\\dots\\>" s) - (not (eq calc-lang 'tex))) + (not (eq calc-lang '(tex latex)))) (setq s (concat ".." (substring s 5)))) (if (or (and (string-match "[a-zA-Z0-9\"{}]\\|\\`:=\\'\\|\\`#\\|\\`%%" s) @@ -582,11 +583,11 @@ (defun calc-fix-token-name (name &optional unquoted) (cond ((string-match "\\`\\.\\." name) (concat "\\dots" (substring name 2))) - ((and (equal name "{") (memq calc-lang '(tex eqn))) + ((and (equal name "{") (memq calc-lang '(tex latex eqn))) "(") - ((and (equal name "}") (memq calc-lang '(tex eqn))) + ((and (equal name "}") (memq calc-lang '(tex latex eqn))) ")") - ((and (equal name "&") (eq calc-lang 'tex)) + ((and (equal name "&") (eq calc-lang '(tex latex))) ",") ((equal name "#") (search-backward "#") From ad1c32c76f21950d53291fc5b9c6397ca358e982 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:29:39 +0000 Subject: [PATCH 484/560] (calc-language): Adjust docstring. (calc-set-mode-line): Add LaTeX support. (math-expr-special-function-mapping): New variable. --- lisp/calc/calc.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index ba5cda831e1..a1887daea46 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -405,6 +405,7 @@ If `C' is present, display outer brackets for matrices (centered).") pascal Use Pascal language notation. fortran Use Fortran language notation. tex Use TeX notation. + latex Use LaTeX notation. eqn Use eqn notation. math Use Mathematica(tm) notation. maple Use Maple notation.") @@ -704,6 +705,7 @@ If nil, selections displayed but ignored.") (defvar math-eval-rules-cache-tag t) (defvar math-radix-explicit-format t) (defvar math-expr-function-mapping nil) +(defvar math-expr-special-function-mapping nil) (defvar math-expr-variable-mapping nil) (defvar math-read-expr-quotes nil) (defvar math-working-step nil) @@ -1368,6 +1370,7 @@ See calc-keypad for details." (if calc-leading-zeros "Zero " "") (cond ((null calc-language) "") ((eq calc-language 'tex) "TeX ") + ((eq calc-language 'latex) "LaTeX ") (t (concat (capitalize (symbol-name calc-language)) " "))) From ddaad6092eb67e0922a76c516e3badfe6ddb22f7 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:30:37 +0000 Subject: [PATCH 485/560] (math-compose-expr, math-compose-rows): Add LaTeX support. (math-compose-expr): Add support for special functions. --- lisp/calc/calccomp.el | 116 +++++++++++++++++++++++++----------------- 1 file changed, 68 insertions(+), 48 deletions(-) diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index e76b3a34e09..dc46159b09b 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -79,7 +79,8 @@ (defun math-compose-expr (a prec) - (let ((math-compose-level (1+ math-compose-level))) + (let ((math-compose-level (1+ math-compose-level)) + spfn) (cond ((or (and (eq a math-comp-selected) a) (and math-comp-tagged @@ -89,10 +90,13 @@ (list 'tag a (math-compose-expr a prec)))) ((and (not (consp a)) (not (integerp a))) (concat "'" (prin1-to-string a))) + ((setq spfn (assq (car-safe a) math-expr-special-function-mapping)) + (setq spfn (cdr spfn)) + (funcall (car spfn) a spfn)) ((math-scalarp a) (if (or (eq (car-safe a) 'frac) (and (nth 1 calc-frac-format) (Math-integerp a))) - (if (memq calc-language '(tex eqn math maple c fortran pascal)) + (if (memq calc-language '(tex latex eqn math maple c fortran pascal)) (let ((aa (math-adjust-fraction a)) (calc-frac-format nil)) (math-compose-expr (list '/ @@ -265,34 +269,44 @@ (append '(horiz "\\matrix{ ") (math-compose-tex-matrix (cdr a)) '(" }")) - (if (and (eq calc-language 'eqn) - (math-matrixp a)) - (append '(horiz "matrix { ") - (math-compose-eqn-matrix - (cdr (math-transpose a))) - '("}")) - (if (and (eq calc-language 'maple) - (math-matrixp a)) - (list 'horiz - "matrix(" - math-comp-left-bracket - (math-compose-vector (cdr a) + (if (and (eq calc-language 'latex) + (math-matrixp a)) + (if (memq calc-language-option '(-2 0 2)) + (append '(vleft 0 "\\begin{pmatrix}") + (math-compose-tex-matrix (cdr a)) + '("\\end{pmatrix}")) + (append '(horiz "\\begin{pmatrix} ") + (math-compose-tex-matrix (cdr a)) + '(" \\end{pmatrix}"))) + (if (and (eq calc-language 'eqn) + (math-matrixp a)) + (append '(horiz "matrix { ") + (math-compose-eqn-matrix + (cdr (math-transpose a))) + '("}")) + (if (and (eq calc-language 'maple) + (math-matrixp a)) + (list 'horiz + "matrix(" + math-comp-left-bracket + (math-compose-vector (cdr a) + (concat math-comp-comma " ") + math-comp-vector-prec) + math-comp-right-bracket + ")") + (list 'horiz + math-comp-left-bracket + (math-compose-vector (cdr a) (concat math-comp-comma " ") - math-comp-vector-prec) - math-comp-right-bracket - ")") - (list 'horiz - math-comp-left-bracket - (math-compose-vector (cdr a) - (concat math-comp-comma " ") - math-comp-vector-prec) - math-comp-right-bracket)))) + math-comp-vector-prec) + math-comp-right-bracket))))) (list 'horiz math-comp-left-bracket (math-compose-vector (list (nth 1 a) (nth 2 a) (nth 3 a)) (concat math-comp-comma " ") math-comp-vector-prec) - math-comp-comma (if (eq calc-language 'tex) " \\ldots" " ...") + math-comp-comma (if (memq calc-language '(tex latex)) + " \\ldots" " ...") math-comp-comma " " (list 'break math-compose-level) (math-compose-expr (nth (1- (length a)) a) @@ -326,12 +340,14 @@ (let ((v (rassq (nth 2 a) math-expr-variable-mapping))) (if v (symbol-name (car v)) - (if (and (eq calc-language 'tex) + (if (and (memq calc-language '(tex latex)) calc-language-option (not (= calc-language-option 0)) (string-match "\\`[a-zA-Z][a-zA-Z0-9]+\\'" (symbol-name (nth 1 a)))) - (format "\\hbox{%s}" (symbol-name (nth 1 a))) + (if (eq calc-language 'latex) + (format "\\text{%s}" (symbol-name (nth 1 a))) + (format "\\hbox{%s}" (symbol-name (nth 1 a)))) (if (and math-compose-hash-args (let ((p calc-arg-values)) (setq v 1) @@ -359,7 +375,7 @@ (if (eq calc-language 'maple) "" (if (memq (nth 1 a) '(0 1)) "(" "[")) (math-compose-expr (nth 2 a) 0) - (if (eq calc-language 'tex) " \\ldots " + (if (memq calc-language '(tex latex)) " \\ldots " (if (eq calc-language 'eqn) " ... " " .. ")) (math-compose-expr (nth 3 a) 0) (if (eq calc-language 'maple) "" @@ -404,7 +420,7 @@ (math-compose-expr (nth 2 a) 0) "]]")) ((and (eq (car a) 'calcFunc-sqrt) - (eq calc-language 'tex)) + (memq calc-language '(tex latex))) (list 'horiz "\\sqrt{" (math-compose-expr (nth 1 a) 0) @@ -440,7 +456,7 @@ (math-comp-height a1) a1 '(rule ?-) a2))) ((and (memq (car a) '(calcFunc-sum calcFunc-prod)) - (eq calc-language 'tex) + (memq calc-language '(tex latex)) (= (length a) 5)) (list 'horiz (if (eq (car a) 'calcFunc-sum) "\\sum" "\\prod") "_{" (math-compose-expr (nth 2 a) 0) @@ -495,7 +511,7 @@ (integerp (nth 2 a))) (let ((c (math-compose-expr (nth 1 a) -1))) (if (> prec (nth 2 a)) - (if (eq calc-language 'tex) + (if (memq calc-language '(tex latex)) (list 'horiz "\\left( " c " \\right)") (if (eq calc-language 'eqn) (list 'horiz "{left ( " c " right )}") @@ -633,13 +649,13 @@ (make-list (nth 1 a) c)))))) ((and (eq (car a) 'calcFunc-evalto) (setq calc-any-evaltos t) - (memq calc-language '(tex eqn)) + (memq calc-language '(tex latex eqn)) (= math-compose-level (if math-comp-tagged 2 1)) (= (length a) 3)) (list 'horiz - (if (eq calc-language 'tex) "\\evalto " "evalto ") + (if (memq calc-language '(tex latex)) "\\evalto " "evalto ") (math-compose-expr (nth 1 a) 0) - (if (eq calc-language 'tex) " \\to " " -> ") + (if (memq calc-language '(tex latex)) " \\to " " -> ") (math-compose-expr (nth 2 a) 0))) (t (let ((op (and (not (eq calc-language 'unform)) @@ -651,7 +667,7 @@ (/= (nth 3 op) -1)) (cond ((> prec (or (nth 4 op) (min (nth 2 op) (nth 3 op)))) - (if (and (eq calc-language 'tex) + (if (and (memq calc-language '(tex latex)) (not (math-tex-expr-is-flat a))) (if (eq (car-safe a) '/) (list 'horiz "{" (math-compose-expr a -1) "}") @@ -668,7 +684,7 @@ (math-compose-expr a -1) " right )}"))) (list 'horiz "(" (math-compose-expr a 0) ")")))) - ((and (eq calc-language 'tex) + ((and (memq calc-language '(tex latex)) (memq (car a) '(/ calcFunc-choose calcFunc-evalto)) (>= prec 0)) (list 'horiz "{" (math-compose-expr a -1) "}")) @@ -694,7 +710,7 @@ (and (equal (car op) "^") (eq (math-comp-first-char lhs) ?-) (setq lhs (list 'horiz "(" lhs ")"))) - (and (eq calc-language 'tex) + (and (memq calc-language '(tex latex)) (or (equal (car op) "^") (equal (car op) "_")) (not (and (stringp rhs) (= (length rhs) 1))) (setq rhs (list 'horiz "{" rhs "}"))) @@ -761,7 +777,7 @@ ((or (> prec (or (nth 4 op) (nth 2 op))) (and (not (eq (assoc (car op) math-expr-opers) op)) (> prec 0))) ; don't write x% + y - (if (and (eq calc-language 'tex) + (if (and (memq calc-language '(tex latex)) (not (math-tex-expr-is-flat a))) (list 'horiz "\\left( " (math-compose-expr a -1) @@ -786,7 +802,7 @@ ((and op (= (length a) 2) (= (nth 2 op) -1)) (cond ((eq (nth 3 op) 0) - (let ((lr (and (eq calc-language 'tex) + (let ((lr (and (memq calc-language '(tex latex)) (not (math-tex-expr-is-flat (nth 1 a)))))) (list 'horiz (if lr "\\left" "") @@ -799,7 +815,7 @@ (if lr "\\right" "") (car (nth 1 (memq op math-expr-opers)))))) ((> prec (or (nth 4 op) (nth 3 op))) - (if (and (eq calc-language 'tex) + (if (and (memq calc-language '(tex latex)) (not (math-tex-expr-is-flat a))) (list 'horiz "\\left( " (math-compose-expr a -1) @@ -836,6 +852,7 @@ ( pascal . math-compose-pascal ) ( fortran . math-compose-fortran ) ( tex . math-compose-tex ) + ( latex . math-compose-latex ) ( eqn . math-compose-eqn ) ( math . math-compose-math ) ( maple . math-compose-maple )))) @@ -866,20 +883,22 @@ (symbol-name func)))) (if (memq calc-language '(c fortran pascal maple)) (setq func (math-to-underscores func))) - (if (and (eq calc-language 'tex) + (if (and (memq calc-language '(tex latex)) calc-language-option (not (= calc-language-option 0)) (string-match "\\`[a-zA-Z][a-zA-Z0-9]+\\'" func)) (if (< (prefix-numeric-value calc-language-option) 0) (setq func (format "\\%s" func)) - (setq func (format "\\hbox{%s}" func)))) + (setq func (if (eq calc-language 'latex) + (format "\\text{%s}" func) + (format "\\hbox{%s}" func))))) (if (and (eq calc-language 'eqn) (string-match "[^']'+\\'" func)) (let ((n (- (length func) (match-beginning 0) 1))) (setq func (substring func 0 (- n))) (while (>= (setq n (1- n)) 0) (setq func (concat func " prime"))))) - (cond ((and (eq calc-language 'tex) + (cond ((and (eq calc-language '(tex latex)) (or (> (length a) 2) (not (math-tex-expr-is-flat (nth 1 a))))) (setq left "\\left( " @@ -889,11 +908,13 @@ (not (math-tex-expr-is-flat (nth 1 a))))) (setq left "{left ( " right " right )}")) - ((and (or (and (eq calc-language 'tex) + ((and (or (and (memq calc-language '(tex latex)) (eq (aref func 0) ?\\)) (and (eq calc-language 'eqn) (memq (car a) math-eqn-special-funcs))) - (not (string-match "\\hbox{" func)) + (not (or + (string-match "\\hbox{" func) + (string-match "\\text{" func))) (= (length a) 2) (or (Math-realp (nth 1 a)) (memq (car (nth 1 a)) '(var *)))) @@ -968,7 +989,7 @@ (if (<= count 0) (if (< count 0) (math-compose-rows (cdr a) -1 nil) - (cons (concat (if (eq calc-language 'tex) " \\ldots" " ...") + (cons (concat (if (memq calc-language '(tex latex)) " \\ldots" " ...") math-comp-comma) (math-compose-rows (cdr a) -1 nil))) (cons (list 'horiz @@ -983,9 +1004,8 @@ (defun math-compose-tex-matrix (a) (if (cdr a) - (cons (math-compose-vector (cdr (car a)) " & " 0) - (cons " \\\\ " - (math-compose-tex-matrix (cdr a)))) + (cons (append (math-compose-vector (cdr (car a)) " & " 0) '(" \\\\ ")) + (math-compose-tex-matrix (cdr a))) (list (math-compose-vector (cdr (car a)) " & " 0)))) (defun math-compose-eqn-matrix (a) From 0010f0335a38b1474e6670af0d4a9fab10534d91 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:31:43 +0000 Subject: [PATCH 486/560] (calc-d-prefix-help): Add LaTeX. --- lisp/calc/calc-help.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index eb0cba79cd8..dc7f0b17c1d 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -593,7 +593,7 @@ C-w Describe how there is no warranty for Calc." "Why; Line-nums, line-Breaks; <, =, > (justify); Plain" "\" (strings); Truncate, [, ]; SPC (refresh), RET, @" "SHIFT + language: Normal, One-line, Big, Unformatted" - "SHIFT + language: C, Pascal, Fortran; TeX, Eqn" + "SHIFT + language: C, Pascal, Fortran; TeX, LaTeX, Eqn" "SHIFT + language: Mathematica, W=Maple") "display" ?d)) From 1be70c6150ce8a16ad0526d6948bac42aeb99308 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 06:39:44 +0000 Subject: [PATCH 487/560] *** empty log message *** --- lisp/ChangeLog | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5b1550c2fa..4380bb77840 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,29 @@ +2005-01-31 Jay Belanger + + * calc/calc-aent.el (math-read-token): Add support for LaTeX. + + * calc/calc-ext.el: Add calc-latex-language to autoloads. + (calc-mode-map): Add calc-latex-language. + + * calc/calc-lang.el (calc-latex-language, math-latex-parse-frac) + (math-latex-print-frac): New functions. + (math-oper-table, math-function-table, math-variable-table) + (math-complex-format, math-input-filter): Add latex properties. + (calc-set-language): Set math-expr-special-function-mapping. + + * calc/calc-prog.el (calc-edit-user-syntax, calc-fix-token-name) + (calc-write-parse-table-part): Add LaTeX support. + + * calc/calc.el (calc-language): Adjust docstring. + (calc-set-mode-line): Add LaTeX support. + (math-expr-special-function-mapping): New variable. + + * calc/calccomp.el (math-compose-expr, math-compose-rows): + Add LaTeX support. + (math-compose-expr): Add support for special functions. + + * calc/calc-help.el (calc-d-prefix-help): Add LaTeX. + 2005-01-31 Nick Roberts * progmodes/gdb-ui.el (gdb-memory-address) From 8d5cd17257e20550ff1d77a8fc682d3359d8f0d2 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 09:05:27 +0000 Subject: [PATCH 488/560] (math-read-token): Read LaTeX matrices. --- lisp/calc/calc-aent.el | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index bf4f5c382e7..49aae82a950 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -763,8 +763,22 @@ in Calc algebraic input.") ((eq (nth 1 code) 'punc) (setq math-exp-token 'punc math-expr-data (nth 2 code))) - ((and (eq (nth 1 code) 'mat) - (string-match " *{" math-exp-str math-exp-pos)) + ((and (eq (nth 1 code) 'begenv) + (string-match " *{\\([^}]*\\)}" math-exp-str math-exp-pos)) + (setq math-exp-pos (match-end 0) + envname (match-string 1 math-exp-str) + math-exp-token 'punc + math-expr-data "[") + (cond ((or (string= envname "matrix") + (string= envname "bmatrix") + (string= envname "pmatrix")) + (if (setq j (string-match (concat "\\\\end{" envname "}") + math-exp-str math-exp-pos)) + (setq math-exp-str + (replace-match "]" t t math-exp-str)) + (error "%s" (concat "No closing \\end{" envname "}")))))) + ((and (eq (nth 1 code) 'mat) + (string-match " *{" math-exp-str math-exp-pos)) (setq math-exp-pos (match-end 0) math-exp-token 'punc math-expr-data "[") From dacc4c70c4ace1f2381cab1f0ac1e5c5fae32038 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 09:07:48 +0000 Subject: [PATCH 489/560] (math-tex-ignore-words): Add support for LaTeX matrices. --- lisp/calc/calc.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index a1887daea46..44c56f2787d 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -3221,6 +3221,7 @@ See calc-keypad for details." ("\\cal") ("\\mit") ("\\Cal") ("\\Bbb") ("\\frak") ("\\goth") ("\\evalto") ("\\matrix" mat) ("\\bmatrix" mat) ("\\pmatrix" mat) + ("\\begin" begenv) ("\\cr" punc ";") ("\\\\" punc ";") ("\\*" punc "*") ("\\{" punc "[") ("\\}" punc "]") )) From cfa083161b51d2ebfc65f2d6a9e2440af44accff Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 09:08:34 +0000 Subject: [PATCH 490/560] (math-latex-input-filter): Remove function. --- lisp/calc/calc-lang.el | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index c691e2bcc2b..48612f4cfd5 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -557,22 +557,7 @@ (math-compose-expr (nth 2 a) -1) "}")) -(defun math-latex-input-filter (str) ; allow parsing of 123\,456\,789. - (while (string-match "[0-9]\\\\,[0-9]" str) - (setq str (concat (substring str 0 (1+ (match-beginning 0))) - (substring str (1- (match-end 0)))))) - (while (string-match "\\\\begin{\\(small\\|[bp]\\)?matrix}" str) - (setq str (concat (substring str 0 (match-beginning 0)) - "\\matrix{" - (substring str (match-end 0))))) - (while (string-match "\\\\end{\\(small\\|[bp]\\)?matrix}" str) - (setq str (concat (substring str 0 (match-beginning 0)) - "}" - (substring str (match-end 0))))) - - str) - -(put 'latex 'math-input-filter 'math-latex-input-filter) +(put 'latex 'math-input-filter 'math-tex-input-filter) (defun calc-eqn-language (n) (interactive "P") From e09d97e8f11aa63e1d3b0083610882626f6530e3 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 09:15:44 +0000 Subject: [PATCH 491/560] *** empty log message *** --- lisp/ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4380bb77840..16bf2e91af3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -17,7 +17,8 @@ * calc/calc.el (calc-language): Adjust docstring. (calc-set-mode-line): Add LaTeX support. (math-expr-special-function-mapping): New variable. - + (math-tex-ignore-words): Add to list. + * calc/calccomp.el (math-compose-expr, math-compose-rows): Add LaTeX support. (math-compose-expr): Add support for special functions. From 84d77b1eb3a117e81a387fa829fe294e392fac6f Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 09:16:44 +0000 Subject: [PATCH 492/560] (math-read-token): Check for smallmatrix environment. --- lisp/calc/calc-aent.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 49aae82a950..2b0cf9a004a 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -771,6 +771,7 @@ in Calc algebraic input.") math-expr-data "[") (cond ((or (string= envname "matrix") (string= envname "bmatrix") + (string= envname "smallmatrix") (string= envname "pmatrix")) (if (setq j (string-match (concat "\\\\end{" envname "}") math-exp-str math-exp-pos)) From a6e7a34bef67e5e41932fb19e98f5f51e21f6fb8 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 31 Jan 2005 11:54:36 +0000 Subject: [PATCH 493/560] (ispell-local-dictionary-overridden): New var. (ispell-local-dictionary): Doc fix. (ispell-dictionary-alist): Don't include ispell-local-dictionary-alist. Don't reinitialize at run time. Don't defcustom. All uses changed to append ispell-local-dictionary-alist, or else check it first. (ispell-current-dictionary): New variable for dictionary in use. (ispell-dictionary): Now used only for global default. (ispell-start-process): Set ispell-current-dictionary, not ispell-dictionary. (ispell-change-dictionary): Use this only for setting user preferences. (ispell-internal-change-dictionary): New function to change the current dictionary in use. (ispell-region, ispell-process-line, ispell-buffer-local-dict): Use ispell-current-dictionary. Handle ispell-local-dictionary-overridden. (ispell-buffer-local-dict): Call ispell-internal-change-dictionary. --- lisp/ChangeLog | 21 ++++ lisp/textmodes/ispell.el | 201 ++++++++++++++++++--------------------- 2 files changed, 111 insertions(+), 111 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 16bf2e91af3..fcbfa0c2d4a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,24 @@ +2005-01-31 Richard M. Stallman + + * textmodes/ispell.el (ispell-local-dictionary-overridden): New var. + (ispell-local-dictionary): Doc fix. + (ispell-dictionary-alist): Don't include ispell-local-dictionary-alist. + Don't reinitialize at run time. Don't defcustom. + All uses changed to append ispell-local-dictionary-alist, + or check it first. + (ispell-current-dictionary): New variable for dictionary in use. + (ispell-dictionary): Now used only for global default. + (ispell-start-process): Set ispell-current-dictionary, + not ispell-dictionary. + (ispell-change-dictionary): Use this only for setting + user preferences. + (ispell-internal-change-dictionary): New function + to change the current dictionary in use. + (ispell-region, ispell-process-line, ispell-buffer-local-dict): + Use ispell-current-dictionary. + Handle ispell-local-dictionary-overridden. + (ispell-buffer-local-dict): Call ispell-internal-change-dictionary. + 2005-01-31 Jay Belanger * calc/calc-aent.el (math-read-token): Add support for LaTeX. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 11e81f0ad70..c403422801f 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -44,8 +44,8 @@ ;; country and language. ;; Most dictionary changes should be made in this file so all users can ;; enjoy them. Local or modified dictionaries are supported in your .emacs -;; file. Modify the variable `ispell-local-dictionary-alist' to include -;; these dictionaries, and they will be installed when ispell.el is loaded. +;; file. Use the variable `ispell-local-dictionary-alist' to specify +;; your own dictionaries. ;; Depending on the mail system you use, you may want to include these: ;; (add-hook 'news-inews-hook 'ispell-message) @@ -428,29 +428,27 @@ where DICTNAME is the name of your default dictionary." :type 'boolean :group 'ispell) -;;; This is the local dictionary to use. When nil the default dictionary will -;;; be used. Change set-default call to use a new default dictionary. +(defvar ispell-local-dictionary-overridden nil + "Non-nil means the user has explicitly set this buffer's Ispell dictionary.") +(make-variable-buffer-local 'ispell-local-dictionary) + (defcustom ispell-local-dictionary nil - "If non-nil, the dictionary to be used for Ispell commands. -The value must be a string dictionary name in `ispell-dictionary-alist'. + "If non-nil, the dictionary to be used for Ispell commands in this buffer. +The value must be a string dictionary name, +or nil, which means use the global setting in `ispell-dictionary'. +Dictionary names are defined in `ispell-local-dictionary-alist' +and `ispell-dictionary-alist', Setting `ispell-local-dictionary' to a value has the same effect as calling \\[ispell-change-dictionary] with that value. This variable is automatically set when defined in the file with either -`ispell-dictionary-keyword' or the Local Variable syntax. - -To create a non-standard default dictionary (not from `ispell-dictionary-alist') -call function `set-default' with the new dictionary name." +`ispell-dictionary-keyword' or the Local Variable syntax." :type '(choice string (const :tag "default" nil)) :group 'ispell) (make-variable-buffer-local 'ispell-local-dictionary) -;; Call this function set up the default dictionary if not English. -;;(set-default 'ispell-local-dictionary nil) - - (defcustom ispell-extra-args nil "*If non-nil, a list of extra switches to pass to the Ispell program. For example, (\"-W\" \"3\") to cause it to accept all 1-3 character @@ -473,17 +471,14 @@ buffer's major mode." (make-variable-buffer-local 'ispell-skip-html) -;;; Define definitions here only for personal dictionaries. ;;;###autoload (defcustom ispell-local-dictionary-alist nil - "*Contains local or customized dictionary definitions. + "*List of local or customized dictionary definitions. +These can override the values in `ispell-dictionary-alist'. -These will override the values in `ispell-dictionary-alist'. - -Customization changes made to `ispell-dictionary-alist' will not operate -over emacs sessions. To make permanent changes to your dictionary -definitions, you will need to make your changes in this variable, save, -and then re-start emacs." +To make permanent changes to your dictionary definitions, you +will need to make your changes in this variable, save, and then +re-start emacs." :type '(repeat (list (choice :tag "Dictionary" (string :tag "Dictionary name") (const :tag "default" nil)) @@ -646,9 +641,8 @@ and then re-start emacs." ;;;###autoload -(defcustom ispell-dictionary-alist - (append ispell-local-dictionary-alist ; dictionary customizations - ispell-dictionary-alist-1 ispell-dictionary-alist-2 +(defvar ispell-dictionary-alist + (append ispell-dictionary-alist-1 ispell-dictionary-alist-2 ispell-dictionary-alist-3 ispell-dictionary-alist-4 ispell-dictionary-alist-5 ispell-dictionary-alist-6) "An alist of dictionaries and their associated parameters. @@ -696,33 +690,7 @@ CHARACTER-SET used for languages with multibyte characters. Note that the CASECHARS and OTHERCHARS slots of the alist should contain the same character set as casechars and otherchars in the -LANGUAGE.aff file \(e.g., english.aff\)." - :type '(repeat (list (choice :tag "Dictionary" - (string :tag "Dictionary name") - (const :tag "default" nil)) - (regexp :tag "Case characters") - (regexp :tag "Non case characters") - (regexp :tag "Other characters") - (boolean :tag "Many other characters") - (repeat :tag "Ispell command line args" - (string :tag "Arg")) - (choice :tag "Extended character mode" - (const "~tex") (const "~plaintex") - (const "~nroff") (const "~list") - (const "~latin1") (const "~latin3") - (const :tag "default" nil)) - (choice :tag "Coding System" - (const iso-8859-1) - (const iso-8859-2) - (const koi8-r)))) - :group 'ispell) - -;;; update the dictionaries at load time -(setq ispell-dictionary-alist - (append ispell-local-dictionary-alist ; dictionary customizations - ispell-dictionary-alist-1 ispell-dictionary-alist-2 - ispell-dictionary-alist-3 ispell-dictionary-alist-4 - ispell-dictionary-alist-5 ispell-dictionary-alist-6)) +LANGUAGE.aff file \(e.g., english.aff\).") (defvar ispell-really-aspell nil) ; Non-nil if aspell extensions should be used @@ -877,7 +845,7 @@ and added as a submenu of the \"Edit\" menu.") (defun ispell-valid-dictionary-list () "Returns a list of valid dictionaries. The variable `ispell-library-directory' defines the library location." - (let ((dicts ispell-dictionary-alist) + (let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist)) (dict-list (cons "default" nil)) name load-dict) (dolist (dict dicts) @@ -899,11 +867,12 @@ The variable `ispell-library-directory' defines the library location." (setq dict-list (cons name dict-list)))) dict-list)) - ;;;###autoload (if ispell-menu-map-needed (let ((dicts (if (fboundp 'ispell-valid-dictionary-list) (ispell-valid-dictionary-list) + ;; This case is used in loaddefs.el + ;; since ispell-valid-dictionary-list isn't defined then. (mapcar (lambda (x) (or (car x) "default")) ispell-dictionary-alist))) (dict-map (make-sparse-keymap "Dictionaries"))) @@ -1054,14 +1023,14 @@ The variable `ispell-library-directory' defines the library location." ;;; This variable contains the current dictionary being used if the ispell -;;; process is running. Otherwise it contains the global default. -(defvar ispell-dictionary nil +;;; process is running. +(defvar ispell-current-dictionary nil "The name of the current dictionary, or nil for the default. -When `ispell-local-dictionary' is nil, `ispell-dictionary' is used to select -the dictionary for new buffers. - This is passed to the ispell process using the `-d' switch and is -used as key in `ispell-dictionary-alist' (which see).") +used as key in `ispell-local-dictionary-alist' and `ispell-dictionary-alist'.") + +(defvar ispell-dictionary nil + "Default dictionary to use if `ispell-local-dictionary' is nil.") (defun ispell-decode-string (str) "Decodes multibyte character strings. @@ -1097,7 +1066,9 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs." ;; regular expression matching. (defun ispell-get-decoded-string (n) - (let* ((slot (assoc ispell-dictionary ispell-dictionary-alist)) + (let* ((slot (or + (assoc ispell-current-dictionary ispell-local-dictionary-alist) + (assoc ispell-current-dictionary ispell-dictionary-alist))) (str (nth n slot))) (when (and (> (length str) 0) (not (multibyte-string-p str))) @@ -1123,13 +1094,17 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs." (defun ispell-get-otherchars () (ispell-get-decoded-string 3)) (defun ispell-get-many-otherchars-p () - (nth 4 (assoc ispell-dictionary ispell-dictionary-alist))) + (nth 4 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist) + (assoc ispell-current-dictionary ispell-dictionary-alist)))) (defun ispell-get-ispell-args () - (nth 5 (assoc ispell-dictionary ispell-dictionary-alist))) + (nth 5 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist) + (assoc ispell-current-dictionary ispell-dictionary-alist)))) (defun ispell-get-extended-character-mode () - (nth 6 (assoc ispell-dictionary ispell-dictionary-alist))) + (nth 6 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist) + (assoc ispell-current-dictionary ispell-dictionary-alist)))) (defun ispell-get-coding-system () - (nth 7 (assoc ispell-dictionary ispell-dictionary-alist))) + (nth 7 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist) + (assoc ispell-current-dictionary ispell-dictionary-alist)))) (defvar ispell-pdict-modified-p nil @@ -1181,8 +1156,9 @@ There can be multiple of these keywords in the file.") (defconst ispell-dictionary-keyword "Local IspellDict: " "The keyword for a local dictionary to use. -The keyword must be followed by a correct dictionary name in -`ispell-dictionary-alist'. When multiple occurrences exist, the last keyword +The keyword must be followed by a valid dictionary name, defined in +`ispell-local-dictionary-alist' or `ispell-dictionary-alist'. +When multiple occurrences exist, the last keyword definition is used.") (defconst ispell-pdict-keyword "Local IspellPersDict: " @@ -1439,7 +1415,8 @@ when called interactively, non-corrective messages are suppressed. With a prefix argument (or if CONTINUE is non-nil), resume interrupted spell-checking of a buffer or region. -Word syntax described by `ispell-dictionary-alist' (which see). +Word syntax is controlled by the definition of the chosen dictionary, +which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'. This will check or reload the dictionary. Use \\[ispell-change-dictionary] or \\[ispell-region] to update the Ispell process. @@ -1549,7 +1526,8 @@ is non-nil when called interactively, then the following word Optional second argument contains otherchars that can be included in word many times. -Word syntax described by `ispell-dictionary-alist' (which see)." +Word syntax is controlled by the definition of the chosen dictionary, +which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'." (let* ((ispell-casechars (ispell-get-casechars)) (ispell-not-casechars (ispell-get-not-casechars)) (ispell-otherchars (ispell-get-otherchars)) @@ -2309,13 +2287,13 @@ When asynchronous processes are not supported, `run' is always returned." Keeps argument list for future ispell invocations for no async support." (let (args) ;; Local dictionary becomes the global dictionary in use. - (if ispell-local-dictionary - (setq ispell-dictionary ispell-local-dictionary)) + (setq ispell-current-dictionary + (or ispell-local-dictionary ispell-dictionary)) (setq args (ispell-get-ispell-args)) - (if (and ispell-dictionary ; use specified dictionary + (if (and ispell-current-dictionary ; use specified dictionary (not (member "-d" args))) ; only define if not overridden (setq args - (append (list "-d" ispell-dictionary) args))) + (append (list "-d" ispell-current-dictionary) args))) (if ispell-personal-dictionary ; use specified pers dict (setq args (append args @@ -2431,9 +2409,7 @@ With NO-ERROR, just return non-nil if there was no Ispell running." ;;;###autoload (defun ispell-change-dictionary (dict &optional arg) - "Change `ispell-dictionary' (q.v.) to DICT and kill old Ispell process. -A new one will be started as soon as necessary. - + "Change to dictionary DICT for Ispell. By just answering RET you can find out what the current dictionary is. With prefix argument, set the default dictionary." @@ -2441,39 +2417,42 @@ With prefix argument, set the default dictionary." (list (completing-read "Use new dictionary (RET for current, SPC to complete): " (and (fboundp 'ispell-valid-dictionary-list) - (mapcar (lambda (x)(cons x nil)) (ispell-valid-dictionary-list))) + (mapcar 'list (ispell-valid-dictionary-list))) nil t) current-prefix-arg)) + (unless arg (ispell-accept-buffer-local-defs)) (if (equal dict "default") (setq dict nil)) ;; This relies on completing-read's bug of returning "" for no match (cond ((equal dict "") (message "Using %s dictionary" (or ispell-local-dictionary ispell-dictionary "default"))) - ((and (equal dict ispell-dictionary) - (or (null ispell-local-dictionary) - (equal dict ispell-local-dictionary))) + ((equal dict (or ispell-local-dictionary + ispell-dictionary "default")) ;; Specified dictionary is the default already. No-op (and (interactive-p) - (message "No change, using %s dictionary" (or dict "default")))) + (message "No change, using %s dictionary" dict))) (t ; reset dictionary! - (if (assoc dict ispell-dictionary-alist) - (progn - (if (or arg (null dict)) ; set default dictionary - (setq ispell-dictionary dict)) - (if (null arg) ; set local dictionary - (setq ispell-local-dictionary dict))) + (if (or (assoc dict ispell-local-dictionary-alist) + (assoc dict ispell-dictionary-alist)) + (if arg + ;; set default dictionary + (setq ispell-dictionary dict) + ;; set local dictionary + (setq ispell-local-dictionary dict) + (setq ispell-local-dictionary-overridden t)) (error "Undefined dictionary: %s" dict)) - (ispell-kill-ispell t) - (message "(Next %sIspell command will use %s dictionary)" - (cond ((equal ispell-local-dictionary ispell-dictionary) - "") - (arg "global ") - (t "local ")) - (or (if (or (equal ispell-local-dictionary ispell-dictionary) - (null arg)) - ispell-local-dictionary - ispell-dictionary) - "default"))))) + (message "%s Ispell dictionary set to %s" + (if arg "Global" "Local") + dict)))) + +(defun ispell-internal-change-dictionary () + "Update the dictionary actually used by Ispell. +This may kill the Ispell process; if so, +a new one will be started when needed." + (let ((dict (or ispell-local-dictionary ispell-dictionary "default"))) + (unless (equal ispell-current-dictionary dict) + (setq ispell-current-dictionary dict) + (ispell-kill-ispell t)))) ;;; Spelling of comments are checked when ispell-check-comments is non-nil. @@ -2493,7 +2472,7 @@ Return nil if spell session is quit, (message "Spell checking %s using %s dictionary..." (if (and (= reg-start (point-min)) (= reg-end (point-max))) (buffer-name) "region") - (or ispell-dictionary "default")) + (or ispell-current-dictionary "default")) ;; Returns cursor to original location. (save-window-excursion (goto-char reg-start) @@ -2511,7 +2490,7 @@ Return nil if spell session is quit, (goto-char reg-start))) (let (message-log-max) (message "Continuing spelling check using %s dictionary..." - (or ispell-dictionary "default"))) + (or ispell-current-dictionary "default"))) (set-marker rstart reg-start) (set-marker ispell-region-end reg-end) (while (and (not ispell-quit) @@ -2941,7 +2920,7 @@ Returns the sum shift due to changes in word replacements." (if (not ispell-quit) (let (message-log-max) (message "Continuing spelling check using %s dictionary..." - (or ispell-dictionary "default")))) + (or ispell-current-dictionary "default")))) (sit-for 0) (setq start (marker-position line-start) end (marker-position line-end)) @@ -3511,14 +3490,15 @@ Both should not be used to define a buffer-local dictionary." ;; Override the local variable definition. ;; Uses last occurrence of ispell-dictionary-keyword. (goto-char (point-max)) - (if (search-backward ispell-dictionary-keyword nil t) - (progn - (search-forward ispell-dictionary-keyword) - (setq end (save-excursion (end-of-line) (point))) - (if (re-search-forward " *\\([^ \"]+\\)" end t) - (setq ispell-local-dictionary - (buffer-substring-no-properties (match-beginning 1) - (match-end 1)))))) + (unless ispell-local-dictionary-overridden + (if (search-backward ispell-dictionary-keyword nil t) + (progn + (search-forward ispell-dictionary-keyword) + (setq end (save-excursion (end-of-line) (point))) + (if (re-search-forward " *\\([^ \"]+\\)" end t) + (setq ispell-local-dictionary + (buffer-substring-no-properties (match-beginning 1) + (match-end 1))))))) (goto-char (point-max)) (if (search-backward ispell-pdict-keyword nil t) (progn @@ -3535,8 +3515,7 @@ Both should not be used to define a buffer-local dictionary." (ispell-kill-ispell t) (setq ispell-personal-dictionary ispell-local-pdict))) ;; Reload if new dictionary defined. - (if (not (equal ispell-local-dictionary ispell-dictionary)) - (ispell-change-dictionary ispell-local-dictionary))) + (ispell-internal-change-dictionary)) (defun ispell-buffer-local-words () From 0978d7380499b7468e6f9ae03a90882045121b83 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 31 Jan 2005 21:20:00 +0000 Subject: [PATCH 494/560] *** empty log message *** --- man/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index d51c642c818..4983b362f02 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2005-02-01 Nick Roberts + + * building.texi: Update documentation relating to GDB Graphical + Interface. + 2005-01-30 Luc Teirlinck * custom.texi (Easy Customization): Adapt menu to node name change. From 31b4c1b7a101afa85b596b26239b4f8509bdb7df Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Mon, 31 Jan 2005 21:20:35 +0000 Subject: [PATCH 495/560] Update documentation relating to GDB Graphical Interface. --- man/building.texi | 82 ++++++++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 29 deletions(-) diff --git a/man/building.texi b/man/building.texi index cd42a4ef79d..3cb0e929ec0 100644 --- a/man/building.texi +++ b/man/building.texi @@ -309,12 +309,13 @@ Emacs. @xref{MS-DOS}. @c Do you believe in GUD? The GUD (Grand Unified Debugger) library provides an interface to -various symbolic debuggers from within Emacs. We recommend the debugger -GDB, which is free software, but you can also run DBX, SDB or XDB if you -have them. GUD can also serve as an interface to Perl's debugging -mode, the Python debugger PDB, and to JDB, the Java Debugger. -@xref{Debugging,, The Lisp Debugger, elisp, the Emacs Lisp Reference Manual}, -for information on debugging Emacs Lisp programs. +various symbolic debuggers from within Emacs. We recommend the +debugger GDB, which is free software, but you can also run DBX, SDB or +XDB if you have them. GUD can also serve as an interface to Perl's +debugging mode, the Python debugger PDB, the bash debugger, and to +JDB, the Java Debugger. @xref{Debugging,, The Lisp Debugger, elisp, +the Emacs Lisp Reference Manual}, for information on debugging Emacs +Lisp programs. @menu * Starting GUD:: How to start a debugger subprocess. @@ -336,15 +337,14 @@ to a particular debugger program. @table @kbd @item M-x gdb @key{RET} @var{file} @key{RET} @findex gdb -Run GDB as a subprocess of Emacs. If the variable -@code{gud-gdb-command-name} is ``gdb --annotate=3'' (the default -value) then GDB starts as for @kbd{M-x gdba} below. If you want GDB -to start as in Emacs 21.3 and earlier then edit the string in the -minibuffer or set @code{gud-gdb-command-name} to ``gdb --fullname''. -You need to do this if you want to run multiple debugging sessions -within one Emacs session. In this case, the command creates a buffer -for input and output to GDB, and switches to it. If a GDB buffer -already exists, it just switches to that buffer. +Run GDB as a subprocess of Emacs. By default, GDB starts as for +@kbd{M-x gdba} below. If you want GDB to start as in Emacs 21.3 and +earlier then edit the string in the minibuffer or set +@code{gud-gdb-command-name} to ``gdb --fullname''. You need to do +this if you want to run multiple debugging sessions within one Emacs +session. In this case, the command creates a buffer for input and +output to GDB, and switches to it. If a GDB buffer already exists, it +just switches to that buffer. @item M-x gdba @key{RET} @var{file} @key{RET} Run GDB as a subprocess of Emacs, providing a graphical interface @@ -569,11 +569,13 @@ be bizarre. See the GDB manual entry regarding @code{jump} for details. @end table -If you started GDB with the command @code{gdba}, you can click -@kbd{Mouse-1} on a line of the source buffer, in the fringe or display -margin, to set a breakpoint there. If a breakpoint already exists on -that line, this action will remove it. -(@code{gdb-mouse-toggle-breakpoint}). +With the GDB Graphical Interface, you can click @kbd{Mouse-1} on a +line of the source buffer, in the fringe or display margin, to set a +breakpoint there. If a breakpoint already exists on that line, this +action will remove it (@code{gdb-mouse-set-clear-breakpoint}). Where +Emacs uses the margin to display breakpoints, it is also possible to +enable or disable them when you click @kbd{Mouse-3} there +(@code{gdb-mouse-toggle--breakpoint}). These commands interpret a numeric argument as a repeat count, when that makes sense. @@ -661,19 +663,23 @@ customizable list @code{tooltip-gud-modes}. @node GDB Graphical Interface @subsection GDB Graphical Interface +By default, the command @code{gdb} starts GDB using a graphical +interface where you view and control the program's data using Emacs +windows. You can still interact with GDB through the GUD buffer, but +the point of this mode is that you can do it through menus and clicks, +without needing to know GDB commands. + @findex gdba -The command @code{gdba} starts GDB using a graphical interface where -you view and control the program's data using Emacs windows. You can -still interact with GDB through the GUD buffer, but the point of this -mode is that you can do it through menus and clicks, without needing -to know GDB commands. +If you have customised @code{gud-gdb-command-name}, then start this +mode with the command @code{gdba}. @menu * Layout:: Control the number of displayed buffers. * Breakpoints Buffer:: A breakpoint control panel. * Stack Buffer:: Select a frame from the call stack. * Watch Expressions:: Monitor variable values in the speedbar. -* Other Buffers:: Input/output, locals, registers and assembler buffers. +* Other Buffers:: Input/output, locals, registers, assembler, threads + and memory buffers. @end menu @node Layout @@ -722,6 +728,15 @@ gdb-display-@var{buffertype}-buffer} or @code{M-x gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype} is the relevant buffer type e.g breakpoints. +When you finish debugging then kill the GUD buffer with @kbd{C-x k}, +which will also kill all the buffers associated with the session. +However you need not do this if, after editing and re-compiling your +source code within Emacs, you wish continue debugging. When you +restart execution, GDB will automatically find your new executable. +Keeping the GUD buffer has the advantage of keeping the shell history +as well as GDB's breakpoints. You need to check, however, that the +breakpoints in the recently edited code are still where you want them. + @node Breakpoints Buffer @subsubsection Breakpoints Buffer @@ -827,18 +842,27 @@ The registers buffer displays the values held by the registers @item Assembler Buffer The assembler buffer displays the current frame as machine code. An overlay arrow points to the current instruction and you can set and -remove breakpoints as with the source buffer. Breakpoints also -appear in the margin. +remove breakpoints as with the source buffer. Breakpoint icons also +appear in the fringe or margin. @item Threads Buffer The threads buffer displays a summary of all threads currently in your -program.(@pxref{Threads,,, gdb, The GNU debugger}). Move point to +program (@pxref{Threads,,, gdb, The GNU debugger}). Move point to any thread in the list and type @key{RET} to make it become the current thread (@code{gdb-threads-select}) and display the associated source in the source buffer. Alternatively, click @kbd{Mouse-2} to make the selected thread become the current one. +@item Memory Buffer + +The memory buffer allows the user to examine sections of program +memory (@pxref{Memory,,, gdb, The GNU debugger}). Click @kbd{Mouse-1} +on the appropriate part of the header line to change the starting +address or number of data items that the buffer displays. +Click @kbd{Mouse-3} on the header line to select the display format +or unit size for these data items. + @end table @node Executing Lisp From a6ab3125f2c6f397423c704d9e07a424933b7a50 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 21:51:34 +0000 Subject: [PATCH 496/560] (math-read-token): Separate the TeX and LaTeX parts. --- lisp/calc/calc-aent.el | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 2b0cf9a004a..9a693a18466 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -746,7 +746,7 @@ in Calc algebraic input.") (setq math-exp-token 'string math-expr-data (math-match-substring math-exp-str 1) math-exp-pos (match-end 0)))) - ((and (= ch ?\\) (memq calc-language '(tex latex)) + ((and (= ch ?\\) (eq calc-language 'tex) (< math-exp-pos (1- (length math-exp-str)))) (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" math-exp-str math-exp-pos) @@ -756,6 +756,34 @@ in Calc algebraic input.") math-exp-pos (match-end 0) math-expr-data (math-restore-dashes (math-match-substring math-exp-str 1))) + (let ((code (assoc math-expr-data math-latex-ignore-words))) + (cond ((null code)) + ((null (cdr code)) + (math-read-token)) + ((eq (nth 1 code) 'punc) + (setq math-exp-token 'punc + math-expr-data (nth 2 code))) + ((and (eq (nth 1 code) 'mat) + (string-match " *{" math-exp-str math-exp-pos)) + (setq math-exp-pos (match-end 0) + math-exp-token 'punc + math-expr-data "[") + (let ((right (string-match "}" math-exp-str math-exp-pos))) + (and right + (setq math-exp-str (copy-sequence math-exp-str)) + (aset math-exp-str right ?\]))))))) + ((and (= ch ?\\) (eq calc-language 'latex) + (< math-exp-pos (1- (length math-exp-str)))) + (or (string-match "\\\\hbox *{\\([a-zA-Z0-9]+\\)}" + math-exp-str math-exp-pos) + (string-match "\\\\text *{\\([a-zA-Z0-9]+\\)}" + math-exp-str math-exp-pos) + (string-match "\\(\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)\\)" + math-exp-str math-exp-pos)) + (setq math-exp-token 'symbol + math-exp-pos (match-end 0) + math-expr-data (math-restore-dashes + (math-match-substring math-exp-str 1))) (let ((code (assoc math-expr-data math-tex-ignore-words))) (cond ((null code)) ((null (cdr code)) From 316fc0cc95c3970ffc1d188468a20321f24d7e0b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 21:52:11 +0000 Subject: [PATCH 497/560] (calc-embedded-open-formula, calc-embedded-close-formula): Ignore matrix environments. --- lisp/calc/calc-embed.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index db1acfcb145..080d48f2062 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -48,11 +48,11 @@ (defvar calc-embedded-some-active nil) (make-variable-buffer-local 'calc-embedded-some-active) -(defvar calc-embedded-open-formula "\\`\\|^\n\\|\\$\\$?\\|\\\\\\[\\|^\\\\begin.*\n\\|^@.*\n\\|^\\.EQ.*\n\\|\\\\(\\|^%\n\\|^\\.\\\\\"\n" +(defvar calc-embedded-open-formula "\\`\\|^\n\\|\\$\\$?\\|\\\\\\[\\|^\\\\begin[^{].*\n\\|^\\\\begin{.*[^x]}.*\n\\|^@.*\n\\|^\\.EQ.*\n\\|\\\\(\\|^%\n\\|^\\.\\\\\"\n" "*A regular expression for the opening delimiter of a formula used by calc-embedded.") -(defvar calc-embedded-close-formula "\\'\\|\n$\\|\\$\\$?\\|\\\\]\\|^\\\\end.*\n\\|^@.*\n\\|^\\.EN.*\n\\|\\\\)\\|\n%\n\\|^\\.\\\\\"\n" +(defvar calc-embedded-close-formula "\\'\\|\n$\\|\\$\\$?\\|\\\\]\\|^\\\\end[^{].*\n\\|^\\\\end{.*[^x]}.*\n\\|^@.*\n\\|^\\.EN.*\n\\|\\\\)\\|\n%\n\\|^\\.\\\\\"\n" "*A regular expression for the closing delimiter of a formula used by calc-embedded.") From 86e3afd3bda5847cc131caa084115bec7d4063ae Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 21:52:49 +0000 Subject: [PATCH 498/560] (math-read-big-expr): Make LaTeX the default TeX mode. --- lisp/calc/calc-ext.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 9a79032b8db..374e89ec1f1 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -2947,13 +2947,13 @@ calc-kill calc-kill-region calc-yank)))) (setq str (concat (substring str 0 (match-beginning 0)) (substring str (match-end 0))))) (if (string-match "\\\\[^ \n|]" str) - (if (eq calc-language 'tex) + (if (eq calc-language 'latex) (math-read-expr str) - (let ((calc-language 'tex) + (let ((calc-language 'latex) (calc-language-option nil) - (math-expr-opers (get 'tex 'math-oper-table)) - (math-expr-function-mapping (get 'tex 'math-function-table)) - (math-expr-variable-mapping (get 'tex 'math-variable-table))) + (math-expr-opers (get 'latex 'math-oper-table)) + (math-expr-function-mapping (get 'latex 'math-function-table)) + (math-expr-variable-mapping (get 'latex 'math-variable-table))) (math-read-expr str))) (let ((math-read-big-lines nil) (pos 0) From 62a54f6ca5cf9b66ee35ad348097dc285c884f38 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 21:53:21 +0000 Subject: [PATCH 499/560] (math-function-table, math-oper-table, math-variable-table): Adjust the LaTeX portions. --- lisp/calc/calc-lang.el | 153 +++++++++++++---------------------------- 1 file changed, 48 insertions(+), 105 deletions(-) diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 48612f4cfd5..d91d78fc461 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -428,119 +428,62 @@ (put 'tex 'math-input-filter 'math-tex-input-filter) (put 'latex 'math-oper-table - '( ( "u+" ident -1 1000 ) - ( "u-" neg -1 1000 ) - ( "\\hat" calcFunc-hat -1 950 ) - ( "\\check" calcFunc-check -1 950 ) - ( "\\tilde" calcFunc-tilde -1 950 ) - ( "\\acute" calcFunc-acute -1 950 ) - ( "\\grave" calcFunc-grave -1 950 ) - ( "\\dot" calcFunc-dot -1 950 ) - ( "\\ddot" calcFunc-dotdot -1 950 ) - ( "\\breve" calcFunc-breve -1 950 ) - ( "\\bar" calcFunc-bar -1 950 ) - ( "\\vec" calcFunc-Vec -1 950 ) - ( "\\underline" calcFunc-under -1 950 ) - ( "\\Hat" calcFunc-Hat -1 950 ) - ( "\\Check" calcFunc-Check -1 950 ) - ( "\\Tilde" calcFunc-Tilde -1 950 ) - ( "\\Acute" calcFunc-Acute -1 950 ) - ( "\\Grave" calcFunc-Grave -1 950 ) - ( "\\Dot" calcFunc-Dot -1 950 ) - ( "\\Ddot" calcFunc-Dotdot -1 950 ) - ( "\\Breve" calcFunc-Breve -1 950 ) - ( "\\Bar" calcFunc-Bar -1 950 ) - ( "\\Vec" calcFunc-VEC -1 950 ) - ( "\\dddot" calcFunc-dddot -1 950 ) - ( "\\ddddot" calcFunc-ddddot -1 950 ) - ( "u|" calcFunc-abs -1 0 ) - ( "|" closing 0 -1 ) - ( "\\lfloor" calcFunc-floor -1 0 ) - ( "\\rfloor" closing 0 -1 ) - ( "\\lceil" calcFunc-ceil -1 0 ) - ( "\\rceil" closing 0 -1 ) - ( "\\pm" sdev 300 300 ) - ( "!" calcFunc-fact 210 -1 ) - ( "^" ^ 201 200 ) - ( "_" calcFunc-subscr 201 200 ) - ( "\\times" * 191 190 ) - ( "*" * 191 190 ) - ( "2x" * 191 190 ) - ( "+" + 180 181 ) - ( "-" - 180 181 ) - ( "\\over" / 170 171 ) - ( "/" / 170 171 ) - ( "\div" / 170 171 ) - ( "\\choose" calcFunc-choose 170 171 ) - ( "\\mod" % 170 171 ) - ( "<" calcFunc-lt 160 161 ) - ( ">" calcFunc-gt 160 161 ) - ( "\\leq" calcFunc-leq 160 161 ) - ( "\\le" calcFunc-leq 160 161 ) - ( "\\leqq" calcFunc-leq 160 161 ) - ( "\\leqsland" calcFunc-leq 160 161 ) - ( "\\geq" calcFunc-geq 160 161 ) - ( "\\ge" calcFunc-geq 160 161 ) - ( "\\geqq" calcFunc-geq 160 161 ) - ( "\\geqslant" calcFunc-geq 160 161 ) - ( "=" calcFunc-eq 160 161 ) - ( "\\neq" calcFunc-neq 160 161 ) - ( "\\ne" calcFunc-neq 160 161 ) - ( "\\lnot" calcFunc-lnot -1 121 ) - ( "\\land" calcFunc-land 110 111 ) - ( "\\lor" calcFunc-lor 100 101 ) - ( "?" (math-read-if) 91 90 ) - ( "!!!" calcFunc-pnot -1 85 ) - ( "&&&" calcFunc-pand 80 81 ) - ( "|||" calcFunc-por 75 76 ) - ( "\\gets" calcFunc-assign 51 50 ) - ( ":=" calcFunc-assign 51 50 ) - ( "::" calcFunc-condition 45 46 ) - ( "\\to" calcFunc-evalto 40 41 ) - ( "\\to" calcFunc-evalto 40 -1 ) - ( "=>" calcFunc-evalto 40 41 ) - ( "=>" calcFunc-evalto 40 -1 ))) + (append (get 'tex 'math-oper-table) + '(( "\\Hat" calcFunc-Hat -1 950 ) + ( "\\Check" calcFunc-Check -1 950 ) + ( "\\Tilde" calcFunc-Tilde -1 950 ) + ( "\\Acute" calcFunc-Acute -1 950 ) + ( "\\Grave" calcFunc-Grave -1 950 ) + ( "\\Dot" calcFunc-Dot -1 950 ) + ( "\\Ddot" calcFunc-Dotdot -1 950 ) + ( "\\Breve" calcFunc-Breve -1 950 ) + ( "\\Bar" calcFunc-Bar -1 950 ) + ( "\\Vec" calcFunc-VEC -1 950 ) + ( "\\dddot" calcFunc-dddot -1 950 ) + ( "\\ddddot" calcFunc-ddddot -1 950 ) + ( "\div" / 170 171 ) + ( "\\le" calcFunc-leq 160 161 ) + ( "\\leqq" calcFunc-leq 160 161 ) + ( "\\leqsland" calcFunc-leq 160 161 ) + ( "\\ge" calcFunc-geq 160 161 ) + ( "\\geqq" calcFunc-geq 160 161 ) + ( "\\geqslant" calcFunc-geq 160 161 ) + ( "=" calcFunc-eq 160 161 ) + ( "\\neq" calcFunc-neq 160 161 ) + ( "\\ne" calcFunc-neq 160 161 ) + ( "\\lnot" calcFunc-lnot -1 121 ) + ( "\\land" calcFunc-land 110 111 ) + ( "\\lor" calcFunc-lor 100 101 ) + ( "?" (math-read-if) 91 90 ) + ( "!!!" calcFunc-pnot -1 85 ) + ( "&&&" calcFunc-pand 80 81 ) + ( "|||" calcFunc-por 75 76 ) + ( "\\gets" calcFunc-assign 51 50 ) + ( ":=" calcFunc-assign 51 50 ) + ( "::" calcFunc-condition 45 46 ) + ( "\\to" calcFunc-evalto 40 41 ) + ( "\\to" calcFunc-evalto 40 -1 ) + ( "=>" calcFunc-evalto 40 41 ) + ( "=>" calcFunc-evalto 40 -1 )))) (put 'latex 'math-function-table - '( ( \\arccos . calcFunc-arccos ) - ( \\arcsin . calcFunc-arcsin ) - ( \\arctan . calcFunc-arctan ) - ( \\arg . calcFunc-arg ) - ( \\cos . calcFunc-cos ) - ( \\cosh . calcFunc-cosh ) - ( \\det . calcFunc-det ) - ( \\exp . calcFunc-exp ) - ( \\gcd . calcFunc-gcd ) - ( \\ln . calcFunc-ln ) - ( \\log . calcFunc-log10 ) - ( \\max . calcFunc-max ) - ( \\min . calcFunc-min ) - ( \\tan . calcFunc-tan ) - ( \\sin . calcFunc-sin ) - ( \\sinh . calcFunc-sinh ) - ( \\sqrt . calcFunc-sqrt ) - ( \\tanh . calcFunc-tanh ) - ( \\frac . (math-latex-parse-frac /)) - ( \\tfrac . (math-latex-parse-frac /)) - ( \\dfrac . (math-latex-parse-frac /)) - ( \\binom . (math-latex-parse-frac calcFunc-choose)) - ( \\tbinom . (math-latex-parse-frac calcFunc-choose)) - ( \\dbinom . (math-latex-parse-frac calcFunc-choose)) - ( \\phi . calcFunc-totient ) - ( \\mu . calcFunc-moebius ))) + (append + (get 'tex 'math-function-table) + '(( \\frac . (math-latex-parse-frac /)) + ( \\tfrac . (math-latex-parse-frac /)) + ( \\dfrac . (math-latex-parse-frac /)) + ( \\binom . (math-latex-parse-frac calcFunc-choose)) + ( \\tbinom . (math-latex-parse-frac calcFunc-choose)) + ( \\dbinom . (math-latex-parse-frac calcFunc-choose)) + ( \\phi . calcFunc-totient ) + ( \\mu . calcFunc-moebius )))) (put 'latex 'math-special-function-table '((/ . (math-latex-print-frac "\\frac")) (calcFunc-choose . (math-latex-print-frac "\\binom")))) (put 'latex 'math-variable-table - '( ( \\pi . var-pi ) - ( \\infty . var-inf ) - ( \\infty . var-uinf ) - ( \\phi . var-phi ) - ( \\gamma . var-gamma ) - ( \\sum . (math-parse-tex-sum calcFunc-sum) ) - ( \\prod . (math-parse-tex-sum calcFunc-prod) ))) + (get 'tex 'math-variable-table)) (put 'latex 'math-complex-format 'i) From 998858ae208ae0305396e6a69369d260b8a0381d Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 31 Jan 2005 21:58:05 +0000 Subject: [PATCH 500/560] (math-tex-ignore-words): Remove LaTeX portion. (math-latex-ignore-words): New constant. --- lisp/ChangeLog | 17 +++++++++++++++++ lisp/calc/calc.el | 10 ++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fcbfa0c2d4a..5141e5999cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2005-01-31 Jay Belanger + + * calc/calc-aent.el (math-read-token): Separate the TeX and LaTeX + parts. + + * calc/calc-embed.el (calc-embedded-open-formula) + (calc-embedded-close-formula): Ignore matrix environments. + + * calc/calc-ext.el (math-read-big-expr): Make LaTeX the default + TeX mode. + + * calc/calc-lang.el (math-function-table, math-oper-table) + (math-variable-table): Adjust the LaTeX portions. + + * calc/calc.el (math-tex-ignore-words): Remove LaTeX portion. + (math-latex-ignore-words): New constant. + 2005-01-31 Richard M. Stallman * textmodes/ispell.el (ispell-local-dictionary-overridden): New var. diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 44c56f2787d..99857ce05a0 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -3223,8 +3223,11 @@ See calc-keypad for details." ("\\matrix" mat) ("\\bmatrix" mat) ("\\pmatrix" mat) ("\\begin" begenv) ("\\cr" punc ";") ("\\\\" punc ";") ("\\*" punc "*") - ("\\{" punc "[") ("\\}" punc "]") -)) + ("\\{" punc "[") ("\\}" punc "]"))) + +(defconst math-latex-ignore-words + (append math-tex-ignore-words + '(("\\begin" begenv)))) (defconst math-eqn-ignore-words '( ("roman") ("bold") ("italic") ("mark") ("lineup") ("evalto") @@ -3232,8 +3235,7 @@ See calc-keypad for details." ("right" ("floor") ("ceil")) ("arc" ("sin") ("cos") ("tan") ("sinh") ("cosh") ("tanh")) ("size" n) ("font" n) ("fwd" n) ("back" n) ("up" n) ("down" n) - ("above" punc ",") -)) + ("above" punc ","))) (defconst math-standard-opers '( ( "_" calcFunc-subscr 1200 1201 ) From 49be18c97e6df29dfac0febac31e75ada2c9a7ce Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 31 Jan 2005 22:44:27 +0000 Subject: [PATCH 501/560] (Qapply): New lisp var. (syms_of_undo): Intern and staticpro it. (Fprimitive_undo): Support formats (apply FUNNAME . ARGS) and (apply DELTA BEG END FUNNAME . ARGS) instead of (FUNNAME . ARGS). --- src/undo.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/undo.c b/src/undo.c index 480a1b07ea6..ea4f35397a9 100644 --- a/src/undo.c +++ b/src/undo.c @@ -40,6 +40,10 @@ Lisp_Object last_undo_buffer; Lisp_Object Qinhibit_read_only; +/* Marker for function call undo list elements. */ + +Lisp_Object Qapply; + /* The first time a command records something for undo. it also allocates the undo-boundary object which will be added to the list at the end of the command. @@ -543,10 +547,18 @@ Return what remains of the list. */) Fgoto_char (car); Fdelete_region (car, cdr); } - else if (SYMBOLP (car)) + else if (EQ (car, Qapply)) { Lisp_Object oldlist = current_buffer->undo_list; - /* Element (FUNNAME . ARGS) means call FUNNAME to undo. */ + /* Element (apply FUNNAME . ARGS) means call FUNNAME to undo. */ + car = Fcar (cdr); + if (INTEGERP (car)) + { + /* Long format: (apply DELTA START END FUNNAME . ARGS). */ + cdr = Fcdr (Fcdr (Fcdr (cdr))); + car = Fcar (cdr); + } + cdr = Fcdr (cdr); apply1 (car, cdr); /* Make sure this produces at least one undo entry, so the test in `undo' for continuing an undo series @@ -608,6 +620,9 @@ syms_of_undo () Qinhibit_read_only = intern ("inhibit-read-only"); staticpro (&Qinhibit_read_only); + Qapply = intern ("apply"); + staticpro (&Qapply); + pending_boundary = Qnil; staticpro (&pending_boundary); From 7405f386b9a4ffdba3befacb0321deeab815b7c6 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 31 Jan 2005 22:45:12 +0000 Subject: [PATCH 502/560] (syms_of_buffer) : Doc fix. --- src/buffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index 2ca4332bca2..a5099fc2487 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5782,7 +5782,13 @@ An entry (nil PROPERTY VALUE BEG . END) indicates that a text property was modified between BEG and END. PROPERTY is the property name, and VALUE is the old value. -An entry (FUN-NAME . ARGS) means undo the change with (apply FUN-NAME ARGS). +An entry (apply FUN-NAME . ARGS) means undo the change with +\(apply FUN-NAME ARGS). + +An entry (apply DELTA BEG END FUN-NAME . ARGS) supports selective undo +in the active region. BEG and END is the range affected by this entry +and DELTA is the number of bytes added or deleted in that range by +this change. An entry (MARKER . DISTANCE) indicates that the marker MARKER was adjusted in position by the offset DISTANCE (an integer). From 63f3351cc0c2c18539acb1205528bf51ab927a94 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 31 Jan 2005 22:47:40 +0000 Subject: [PATCH 503/560] (ses-create-cell-variable-range) (ses-destroy-cell-variable-range, ses-reset-header-string) (ses-set-with-undo, ses-unset-with-undo, ses-aset-with-undo) (ses-insert-row): Fix format of apply undo entries. --- lisp/ses.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/ses.el b/lisp/ses.el index 952474c8715..c2239327e1c 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -515,7 +515,7 @@ for this spreadsheet." (defun ses-create-cell-variable-range (minrow maxrow mincol maxcol) "Create buffer-local variables for cells. This is undoable." - (push `(ses-destroy-cell-variable-range ,minrow ,maxrow ,mincol ,maxcol) + (push `(apply ses-destroy-cell-variable-range ,minrow ,maxrow ,mincol ,maxcol) buffer-undo-list) (let (sym xrow xcol) (dotimes (row (1+ (- maxrow minrow))) @@ -536,16 +536,16 @@ for this spreadsheet." (dotimes (col (1+ (- maxcol mincol))) (setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol))) (if (boundp sym) - (push `(ses-set-with-undo ,sym ,(symbol-value sym)) + (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list)) (kill-local-variable sym)))) - (push `(ses-create-cell-variable-range ,minrow ,maxrow ,mincol ,maxcol) + (push `(apply ses-create-cell-variable-range ,minrow ,maxrow ,mincol ,maxcol) buffer-undo-list)) (defun ses-reset-header-string () "Flags the header string for update. Upon undo, the header string will be updated again." - (push '(ses-reset-header-string) buffer-undo-list) + (push '(apply ses-reset-header-string) buffer-undo-list) (setq ses--header-hscroll -1)) ;;Split this code off into a function to avoid coverage-testing difficulties @@ -1325,8 +1325,8 @@ to each symbol." (equal (symbol-value sym) newval) (not (stringp newval))) (push (if (boundp sym) - `(ses-set-with-undo ,sym ,(symbol-value sym)) - `(ses-unset-with-undo ,sym)) + `(apply ses-set-with-undo ,sym ,(symbol-value sym)) + `(apply ses-unset-with-undo ,sym)) buffer-undo-list) (set sym newval) t)) @@ -1334,13 +1334,13 @@ to each symbol." (defun ses-unset-with-undo (sym) "Set SYM to be unbound. This is undoable." (when (1value (boundp sym)) ;;Always bound, except after a programming error - (push `(ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list) + (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list) (makunbound sym))) (defun ses-aset-with-undo (array idx newval) "Like aset, but undoable. Result is t if element has changed" (unless (equal (aref array idx) newval) - (push `(ses-aset-with-undo ,array ,idx ,(aref array idx)) buffer-undo-list) + (push `(apply ses-aset-with-undo ,array ,idx ,(aref array idx)) buffer-undo-list) (aset array idx newval) t)) @@ -2066,7 +2066,7 @@ before current one." (dotimes (col ses--numcols) (aset newrow col (ses-make-cell))) (setq ses--cells (ses-vector-insert ses--cells row newrow)) - (push `(ses-vector-delete ses--cells ,row 1) buffer-undo-list) + (push `(apply ses-vector-delete ses--cells ,row 1) buffer-undo-list) (insert ses--blank-line)) ;;Insert empty lines in cell data area (will be replaced by ;;ses-relocate-all) From fb89c330967ec70bb2cfc5d0af0b440fffbe29df Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 31 Jan 2005 23:17:42 +0000 Subject: [PATCH 504/560] *** empty log message *** --- lisp/ChangeLog | 13 ++++++++++--- lispref/ChangeLog | 4 ++++ src/ChangeLog | 9 +++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5141e5999cd..b3b9034620d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-01-31 Kim F. Storm + + * ses.el (ses-create-cell-variable-range) + (ses-destroy-cell-variable-range, ses-reset-header-string) + (ses-set-with-undo, ses-unset-with-undo, ses-aset-with-undo) + (ses-insert-row): Fix format of apply undo entries. + 2005-01-31 Jay Belanger * calc/calc-aent.el (math-read-token): Separate the TeX and LaTeX @@ -31,8 +38,8 @@ user preferences. (ispell-internal-change-dictionary): New function to change the current dictionary in use. - (ispell-region, ispell-process-line, ispell-buffer-local-dict): - Use ispell-current-dictionary. + (ispell-region, ispell-process-line, ispell-buffer-local-dict): + Use ispell-current-dictionary. Handle ispell-local-dictionary-overridden. (ispell-buffer-local-dict): Call ispell-internal-change-dictionary. @@ -56,7 +63,7 @@ (calc-set-mode-line): Add LaTeX support. (math-expr-special-function-mapping): New variable. (math-tex-ignore-words): Add to list. - + * calc/calccomp.el (math-compose-expr, math-compose-rows): Add LaTeX support. (math-compose-expr): Add support for special functions. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index c0ce2c6ff0f..75e9b4cdd29 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2005-02-01 Kim F. Storm + + * text.texi (Undo) : Describe `apply' elements. + 2005-01-29 Eli Zaretskii * commands.texi (Misc Events): Describe the help-echo event. diff --git a/src/ChangeLog b/src/ChangeLog index 7c95c9868a5..ac38d0de416 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2005-01-31 Kim F. Storm + + * undo.c (Qapply): New lisp var. + (syms_of_undo): Intern and staticpro it. + (Fprimitive_undo): Support formats (apply FUNNAME . ARGS) and + (apply DELTA BEG END FUNNAME . ARGS) instead of (FUNNAME . ARGS). + + * buffer.c (syms_of_buffer) : Doc fix. + 2005-01-30 Jesper Harder * macterm.c (syms_of_macterm) From 23c5319c0ef847f0db8121fc4d435d47359a163d Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 31 Jan 2005 23:18:45 +0000 Subject: [PATCH 505/560] (Undo): Update description of `undo-outer-limit'. --- man/basic.texi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/man/basic.texi b/man/basic.texi index c04d8cf914c..29bf6d4e207 100644 --- a/man/basic.texi +++ b/man/basic.texi @@ -399,13 +399,13 @@ value of @code{undo-strong-limit} is 30000. Regardless of the values of those variables, the most recent change is never discarded unless it gets bigger than @code{undo-outer-limit} -(normally 300,000). At that point, Emacs asks whether to discard the -undo information even for the current command. (You also have the -option of quitting.) So there is normally no danger that garbage -collection occurring right after an unintentional large change might -prevent you from undoing it. But if you didn't expect the command -to create such large undo data, you can get rid of it and prevent -Emacs from running out of memory. +(normally 3,000,000). At that point, Emacs discards the undo data and +warns you about it. This is the only situation in which you can not +undo the last command. If this happens, you can increase the value of +@code{undo-outer-limit} to make it even less likely to happen in the +future. But if you didn't expect the command to create such large +undo data, then it is probably a bug and you should report it. +@xref{Bugs,, Reporting Bugs}. The reason the @code{undo} command has two keys, @kbd{C-x u} and @kbd{C-_}, set up to run it is that it is worthy of a single-character From e15db1740967bdcd7b6df1c5b4a1083a88b10933 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 31 Jan 2005 23:22:11 +0000 Subject: [PATCH 506/560] (Undo) : Describe `apply' elements. --- lispref/text.texi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lispref/text.texi b/lispref/text.texi index 785e7b99467..942fb2220a7 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -1208,6 +1208,18 @@ Here's how you might undo the change: (put-text-property @var{beg} @var{end} @var{property} @var{value}) @end example +@item (apply @var{funname} . @var{args}) +This kind of element records a change that can be undone by evaluating +(@code{apply} @var{funname} @var{args}). + +@item (apply @var{delta} @var{beg} @var{end} @var{funname} . @var{args}) +This kind of element records a change that can be undone by evaluating +(@code{apply} @var{funname} @var{args}). The integer values @var{beg} +and @var{end} is buffer positions of the range affected by this change +and @var{delta} is an integer value which is the number of bytes added +or deleted in that range by this change. This kind of element +supports undo in an active region + @item (@var{marker} . @var{adjustment}) This kind of element records the fact that the marker @var{marker} was relocated due to deletion of surrounding text, and that it moved From 578e484b9e0d1f9bf4437f7f2ba0fbd1b77aac63 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 31 Jan 2005 23:31:21 +0000 Subject: [PATCH 507/560] (Maintaining Undo): Add `undo-outer-limit'. --- lispref/text.texi | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lispref/text.texi b/lispref/text.texi index 942fb2220a7..3d2fa870bac 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -1321,20 +1321,27 @@ preferred name is @code{buffer-disable-undo}. them from using up all available memory space, garbage collection trims them back to size limits you can set. (For this purpose, the ``size'' of an undo list measures the cons cells that make up the list, plus the -strings of deleted text.) Two variables control the range of acceptable -sizes: @code{undo-limit} and @code{undo-strong-limit}. +strings of deleted text.) Three variables control the range of acceptable +sizes: @code{undo-limit}, @code{undo-strong-limit} and +@code{undo-outer-limit}. -@defvar undo-limit +@defopt undo-limit This is the soft limit for the acceptable size of an undo list. The change group at which this size is exceeded is the last one kept. -@end defvar +@end defopt -@defvar undo-strong-limit +@defopt undo-strong-limit This is the upper limit for the acceptable size of an undo list. The change group at which this size is exceeded is discarded itself (along with all older change groups). There is one exception: the very latest -change group is never discarded no matter how big it is. -@end defvar +change group is only discarded if it exceeds @code{undo-outer-limit}. +@end defopt + +@defopt undo-outer-limit +If at garbage collection time the undo info for the current command +exceeds this limit, Emacs discards the info and prints a warning +message. This is a last ditch limit to prevent memory overflow. +@end defopt @node Filling @comment node-name, next, previous, up From d4d668071e1fd8f50d2c70e6b300cfd0d2fb0e3b Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 31 Jan 2005 23:32:36 +0000 Subject: [PATCH 508/560] *** empty log message *** --- etc/NEWS | 4 ++-- lispref/ChangeLog | 4 ++++ man/ChangeLog | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 8ccaee23b06..21601767c6d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -175,8 +175,8 @@ modes do. +++ ** When the undo information of the current command gets really large -(beyond the value of `undo-outer-limit'), Emacs asks you whether to -discard it or keep it. +(beyond the value of `undo-outer-limit'), Emacs discards it and warns +you about it. ** line-move-ignore-invisible now defaults to t. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 75e9b4cdd29..c327bfc9058 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2005-01-31 Luc Teirlinck + + * text.texi (Maintaining Undo): Add `undo-outer-limit'. + 2005-02-01 Kim F. Storm * text.texi (Undo) : Describe `apply' elements. diff --git a/man/ChangeLog b/man/ChangeLog index 4983b362f02..2559bdfaa61 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2005-01-31 Luc Teirlinck + + * basic.texi (Undo): Update description of `undo-outer-limit'. + 2005-02-01 Nick Roberts * building.texi: Update documentation relating to GDB Graphical From 0a18efee864b73dca2f1463a6c753cc33fc99e03 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 1 Feb 2005 03:57:08 +0000 Subject: [PATCH 509/560] (calc-embedded-find-bounds): Set formula bound on line with formula. --- lisp/calc/calc-embed.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 080d48f2062..4c6311c9a5b 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -417,6 +417,8 @@ With any prefix argument, marks only the formula itself." (forward-char -1)) (setq calc-embed-outer-top (point)) (goto-char (match-end 0)) + (if (looking-at "[ \t]*$") + (end-of-line)) (if (eq (following-char) ?\n) (forward-char 1)) (or (bolp) From a214f7ba7eb6a3a15d07c20a8cb41511ba655ffc Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 1 Feb 2005 04:13:59 +0000 Subject: [PATCH 510/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b3b9034620d..5cb9a1c12ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-31 Jay Belanger + + * calc/calc-embed.el (calc-embedded-find-bounds): Set the formula + bound on the line with the formula. + 2005-01-31 Kim F. Storm * ses.el (ses-create-cell-variable-range) From 5e1674c5f1791f16d912b80edf9ef89d3871fcec Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 1 Feb 2005 08:55:42 +0000 Subject: [PATCH 511/560] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index ac38d0de416..5d470d57098 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-02-01 Kim F. Storm + + * xdisp.c (back_to_previous_visible_line_start): Reset iterator + stack before calling handle_display_prop. + 2005-01-31 Kim F. Storm * undo.c (Qapply): New lisp var. From f2433a30c5c6fa307ae1358c15e65e484989e5b4 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 1 Feb 2005 08:56:01 +0000 Subject: [PATCH 512/560] (back_to_previous_visible_line_start): Reset iterator stack before calling handle_display_prop. --- src/xdisp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xdisp.c b/src/xdisp.c index aec14bcadde..c09ae2b2ef1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4703,6 +4703,7 @@ back_to_previous_visible_line_start (it) int beg, end; Lisp_Object val, overlay; + it2.sp = 0; if (handle_display_prop (&it2) == HANDLED_RETURN && !NILP (val = get_char_property_and_overlay (make_number (pos), Qdisplay, Qnil, &overlay)) From 2fdf44570f731eb29aa54da6ccb1a7fd884eb33f Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 1 Feb 2005 12:37:28 +0000 Subject: [PATCH 513/560] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5cb9a1c12ab..7ce12a475f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-02-01 Carsten Dominik + + * textmodes/reftex.el (reftex-access-scan-info): Error out in a + buffer not visiting a file. + 2005-01-31 Jay Belanger * calc/calc-embed.el (calc-embedded-find-bounds): Set the formula From 489632ba4fd4e909e91897dde14d15fca0d0ff74 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 1 Feb 2005 12:39:39 +0000 Subject: [PATCH 514/560] (reftex-access-scan-info): Error out in a buffer not visiting a file. --- lisp/textmodes/reftex.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 318279b1377..49485c24725 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1228,6 +1228,11 @@ This enforces rescanning the buffer on next use." ;; But, when RESCAN is -1, don't rescan even if docstruct is empty. ;; When FILE is non-nil, parse only from that file. + ;; Error out in a buffer without a file. + (if (and reftex-mode + (not (buffer-file-name))) + (error "RefTeX works only in buffers visiting a file.")) + ;; Make sure we have the symbols tied (if (eq reftex-docstruct-symbol nil) ;; Symbols are not yet tied: Tie them. From b961eb0e9896443e57a18e5d59d7227ce158079c Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Tue, 1 Feb 2005 15:02:50 +0000 Subject: [PATCH 515/560] (lisp-indent-function): Doc fix. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/lisp-mode.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ce12a475f3..e444165a8d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-02-01 Thien-Thi Nguyen + + * emacs-lisp/lisp-mode.el (lisp-indent-function): Doc fix. + 2005-02-01 Carsten Dominik * textmodes/reftex.el (reftex-access-scan-info): Error out in a diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 86c3ac1bab4..6548a70f7d8 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -881,8 +881,8 @@ which has a non-nil property `lisp-indent-function', that specifies how to do the indentation. The property value can be * `defun', meaning indent `defun'-style; * an integer N, meaning indent the first N arguments specially -like ordinary function arguments and then indent any further -aruments like a body; + like ordinary function arguments and then indent any further + arguments like a body; * a function to call just as this function was called. If that function returns nil, that means it doesn't specify the indentation. From cc08f5b25368d2113b7346bd2701535de48d9967 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Tue, 1 Feb 2005 15:50:46 +0000 Subject: [PATCH 516/560] (lisp-indent-function): Fix bug: When delegating, order args in the funcall correctly. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/lisp-mode.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e444165a8d6..625e33d5ea3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-02-01 Thien-Thi Nguyen + + * emacs-lisp/lisp-mode.el (lisp-indent-function): Fix bug: + When delegating, order args in the funcall correctly. + 2005-02-01 Thien-Thi Nguyen * emacs-lisp/lisp-mode.el (lisp-indent-function): Doc fix. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 6548a70f7d8..6b5c0b1c0f1 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -884,8 +884,8 @@ that specifies how to do the indentation. The property value can be like ordinary function arguments and then indent any further arguments like a body; * a function to call just as this function was called. -If that function returns nil, that means it doesn't specify -the indentation. + If that function returns nil, that means it doesn't specify + the indentation. This function also returns nil meaning don't specify the indentation." (let ((normal-indent (current-column))) @@ -921,7 +921,7 @@ This function also returns nil meaning don't specify the indentation." (lisp-indent-specform method state indent-point normal-indent)) (method - (funcall method state indent-point))))))) + (funcall method indent-point state))))))) (defvar lisp-body-indent 2 "Number of columns to indent the second line of a `(def...)' form.") From dd8e8b27ac14efcb2efc543e475dfdd7d0396995 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 1 Feb 2005 20:09:33 +0000 Subject: [PATCH 517/560] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 625e33d5ea3..7faed93d0d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-02-02 Nick Roberts + + * progmodes/gdb-ui.el: (gdb-goto-info): Delete. + + * progmodes/gud.el (gud-goto-info): New function. + (gud-tool-bar-map): Use correct icon. + 2005-02-01 Thien-Thi Nguyen * emacs-lisp/lisp-mode.el (lisp-indent-function): Fix bug: From ed941a3ce6d4b73e6135ebdd2f1d6b23c41bf918 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 1 Feb 2005 20:10:19 +0000 Subject: [PATCH 518/560] (gud-goto-info): New function. (gud-tool-bar-map): Use correct icon. --- lisp/progmodes/gud.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 2a40ae1aab6..42f908eb8dd 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -91,9 +91,17 @@ If SOFT is non-nil, returns nil if the symbol doesn't already exist." "Non-nil if debuggee is running. Used to grey out relevant toolbar icons.") +(defun gud-goto-info () + "Go to relevant Emacs info node." + (interactive) + (select-frame (make-frame)) + (require 'info) + (if (memq gud-minor-mode '(gdbmi gdba)) + (Info-goto-node "(emacs)GDB Graphical Interface") + (Info-goto-node "(emacs)Debuggers"))) + (easy-mmode-defmap gud-menu-map - '(([help] menu-item "Help" gdb-goto-info - :enable (memq gud-minor-mode '(gdbmi gdba))) + '(([help] "Info" . gud-goto-info ([refresh] "Refresh" . gud-refresh) ([run] menu-item "Run" gud-run :enable (and (not gud-running) @@ -172,7 +180,7 @@ Used to grey out relevant toolbar icons.") (gud-nexti . "gud-ni") (gud-up . "gud-up") (gud-down . "gud-down") - (gdb-goto-info . "help")) + (gud-goto-info . "info")) map) (tool-bar-local-item-from-menu (car x) (cdr x) map gud-minor-mode-map))))) From 1f8f8e684ad089a7666d78ed9a30e5cb2cb9253f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 1 Feb 2005 20:11:09 +0000 Subject: [PATCH 519/560] (gdb-goto-info): Delete. --- lisp/progmodes/gdb-ui.el | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 54c43d1df36..d7581d8698b 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -289,13 +289,6 @@ detailed description of this mode. `(lambda () (gdb-var-create-handler ,expr)))))) (select-window (get-buffer-window gud-comint-buffer 0))) -(defun gdb-goto-info () - "Go to Emacs info node: GDB Graphical Interface." - (interactive) - (select-frame (make-frame)) - (require 'info) - (Info-goto-node "(emacs)GDB Graphical Interface")) - (defconst gdb-var-create-regexp "name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"") From 7077904e6b5f65c6758d9b7b1d092fc5579d4317 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 1 Feb 2005 23:47:06 +0000 Subject: [PATCH 520/560] (replace_range_2): Fix bugs in adjusting markers and point. --- src/insdel.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/insdel.c b/src/insdel.c index 7f10c2f523d..ad6623c6693 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1,5 +1,5 @@ /* Buffer insertion/deletion and gap motion for GNU Emacs. - Copyright (C) 1985, 86,93,94,95,97,98, 1999, 2000, 01, 2003 + Copyright (C) 1985, 86,93,94,95,97,98, 1999, 2000, 01, 2003, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1745,17 +1745,21 @@ replace_range_2 (from, from_byte, to, to_byte, ins, inschars, insbytes, markers) /* Adjust markers for the deletion and the insertion. */ if (markers - && ! (nchars_del == 1 && inschars == 1)) + && ! (nchars_del == 1 && inschars == 1 && nbytes_del == insbytes)) adjust_markers_for_replace (from, from_byte, nchars_del, nbytes_del, inschars, insbytes); offset_intervals (current_buffer, from, inschars - nchars_del); /* Relocate point as if it were a marker. */ - if (from < PT && nchars_del != inschars) - adjust_point ((from + inschars - (PT < to ? PT : to)), - (from_byte + insbytes - - (PT_BYTE < to_byte ? PT_BYTE : to_byte))); + if (from < PT && (nchars_del != inschars || nbytes_del != insbytes)) + { + if (PT < to) + /* PT was within the deleted text. Move it to FROM. */ + adjust_point (from - PT, from_byte - PT_BYTE); + else + adjust_point (inschars - nchars_del, insbytes - nbytes_del); + } if (insbytes == 0) evaporate_overlays (from); From f98a8aa964088ab816829eacd5812b413330e20c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 1 Feb 2005 23:49:46 +0000 Subject: [PATCH 521/560] (casify_object): Enable changing characters of different byte length. (casify_region): Fix loop condition, args to replace_range_2, and update opoint_byte. --- src/casefiddle.c | 86 ++++++++++++++++-------------------------------- 1 file changed, 28 insertions(+), 58 deletions(-) diff --git a/src/casefiddle.c b/src/casefiddle.c index ae4888088bd..4505f477c90 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -1,5 +1,5 @@ /* GNU Emacs case conversion functions. - Copyright (C) 1985,94,97,98,99, 2001, 2002, 2004 + Copyright (C) 1985,94,97,98,99, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -73,71 +73,38 @@ casify_object (flag, obj) if (STRINGP (obj)) { int multibyte = STRING_MULTIBYTE (obj); + int n; obj = Fcopy_sequence (obj); len = SBYTES (obj); - /* Scan all single-byte characters from start of string. */ - for (i = 0; i < len;) + /* I counts bytes, and N counts chars. */ + for (i = n = 0; i < len; n++) { + int from_len = 1, to_len = 1; + c = SREF (obj, i); if (multibyte && c >= 0x80) - /* A multibyte character can't be handled in this - simple loop. */ - break; + c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i, len -i, from_len); if (inword && flag != CASE_CAPITALIZE_UP) c = DOWNCASE (c); else if (!UPPERCASEP (c) && (!inword || flag != CASE_CAPITALIZE_UP)) c = UPCASE1 (c); - /* If this char won't fit in a single-byte string. - fall out to the multibyte case. */ - if (multibyte ? ! ASCII_BYTE_P (c) - : ! SINGLE_BYTE_CHAR_P (c)) - break; - - SSET (obj, i, c); + if (ASCII_BYTE_P (c) || (! multibyte && SINGLE_BYTE_CHAR_P (c))) + SSET (obj, i, c); + else + { + to_len = CHAR_BYTES (c); + if (from_len == to_len) + CHAR_STRING (c, SDATA (obj) + i); + else + Faset (obj, make_number (n), make_number (c)); + } if ((int) flag >= (int) CASE_CAPITALIZE) inword = SYNTAX (c) == Sword; - i++; - } - - /* If we didn't do the whole string as single-byte, - scan the rest in a more complex way. */ - if (i < len) - { - /* The work is not yet finished because of a multibyte - character just encountered. */ - int fromlen, j_byte = i; - char *buf; - int bufsize; - USE_SAFE_ALLOCA; - - bufsize = (len - i) * MAX_MULTIBYTE_LENGTH + i; - SAFE_ALLOCA (buf, char *, bufsize); - - /* Copy data already handled. */ - bcopy (SDATA (obj), buf, i); - - /* From now on, I counts bytes. */ - while (i < len) - { - c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i, - len - i, fromlen); - if (inword && flag != CASE_CAPITALIZE_UP) - c = DOWNCASE (c); - else if (!UPPERCASEP (c) - && (!inword || flag != CASE_CAPITALIZE_UP)) - c = UPCASE1 (c); - i += fromlen; - j_byte += CHAR_STRING (c, buf + j_byte); - if ((int) flag >= (int) CASE_CAPITALIZE) - inword = SYNTAX (c) == Sword; - } - obj = make_multibyte_string (buf, SCHARS (obj), - j_byte); - SAFE_FREE (); + i += to_len; } return obj; } @@ -253,7 +220,7 @@ casify_region (flag, b, e) int opoint_byte = PT_BYTE; int c2; - while (i < end_byte) + while (start < end) { if ((c = FETCH_BYTE (i)) >= 0x80) c = FETCH_MULTIBYTE_CHAR (i); @@ -281,12 +248,15 @@ casify_region (flag, b, e) FETCH_BYTE (i + j) = str[j]; } else - /* Replace one character with the other, - keeping text properties the same. */ - replace_range_2 (start + 1, i + tolen, - start + 2, i + tolen + fromlen, - str, 1, tolen, - 0); + { + /* Replace one character with the other, + keeping text properties the same. */ + replace_range_2 (start, i, + start + 1, i + fromlen, + str, 1, tolen, + 1); + opoint_byte += tolen - fromlen; + } } if ((int) flag >= (int) CASE_CAPITALIZE) inword = SYNTAX (c2) == Sword; From e1e89a70b9a54fa5dc2365398ef4df2eb5944b2a Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Feb 2005 00:57:07 +0000 Subject: [PATCH 522/560] (get-upcase-table): New function. (copy-case-table): Copy upcaes table too if non-nil. (set-case-syntax-delims): Maintain upcase table too. (set-case-syntax-pair): Likewise. (set-upcase-syntax, set-downcase-syntax): New functions. (set-case-syntax): Maintain upcase table too. --- lisp/case-table.el | 76 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 14 deletions(-) diff --git a/lisp/case-table.el b/lisp/case-table.el index 094c1d6e62a..77ebe857ff2 100644 --- a/lisp/case-table.el +++ b/lisp/case-table.el @@ -1,6 +1,6 @@ ;;; case-table.el --- code to extend the character set and support case tables -;; Copyright (C) 1988, 1994 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 2005 Free Software Foundation, Inc. ;; Author: Howard Gayle ;; Maintainer: FSF @@ -62,11 +62,26 @@ (describe-vector description) (help-mode))))) +(defun get-upcase-table (case-table) + "Return the upcase table of CASE-TABLE." + (or (char-table-extra-slot case-table 0) + ;; Setup all extra slots of CASE-TABLE by temporarily selecting + ;; it as the standard case table. + (let ((old (standard-case-table))) + (unwind-protect + (progn + (set-standard-case-table case-table) + (char-table-extra-slot case-table 0)) + (or (eq case-table old) + (set-standard-case-table old)))))) + (defun copy-case-table (case-table) - (let ((copy (copy-sequence case-table))) - ;; Clear out the extra slots so that they will be - ;; recomputed from the main (downcase) table. - (set-char-table-extra-slot copy 0 nil) + (let ((copy (copy-sequence case-table)) + (up (char-table-extra-slot case-table 0))) + ;; Clear out the extra slots (except for upcase table) so that + ;; they will be recomputed from the main (downcase) table. + (if up + (set-char-table-extra-slot copy 0 (copy-sequence up))) (set-char-table-extra-slot copy 1 nil) (set-char-table-extra-slot copy 2 nil) copy)) @@ -87,9 +102,11 @@ indicate left and right delimiters." (setq r (set-case-syntax-1 r)) (aset table l l) (aset table r r) + (let ((up (get-upcase-table table))) + (aset up l l) + (aset up r r)) ;; Clear out the extra slots so that they will be - ;; recomputed from the main (downcase) table. - (set-char-table-extra-slot table 0 nil) + ;; recomputed from the main (downcase) table and upcase table. (set-char-table-extra-slot table 1 nil) (set-char-table-extra-slot table 2 nil) (modify-syntax-entry l (concat "(" (char-to-string r) " ") @@ -103,16 +120,46 @@ This sets the entries for characters UC and LC in TABLE, which is a string that will be used as the downcase part of a case table. It also modifies `standard-syntax-table' to give them the syntax of word constituents." - (unless (= (charset-bytes (char-charset uc)) - (charset-bytes (char-charset lc))) - (error "Can't casify chars with different `charset-bytes' values")) + (setq uc (set-case-syntax-1 uc)) + (setq lc (set-case-syntax-1 lc)) + (aset table uc lc) + (aset table lc lc) + (let ((up (get-upcase-table table))) + (aset up uc uc) + (aset up lc uc)) + ;; Clear out the extra slots so that they will be + ;; recomputed from the main (downcase) table and upcase table. + (set-char-table-extra-slot table 1 nil) + (set-char-table-extra-slot table 2 nil) + (modify-syntax-entry lc "w " (standard-syntax-table)) + (modify-syntax-entry uc "w " (standard-syntax-table))) + +(defun set-upcase-syntax (uc lc table) + "Make character UC an upcase of character LC. +It also modifies `standard-syntax-table' to give them the syntax of +word constituents." + (setq uc (set-case-syntax-1 uc)) + (setq lc (set-case-syntax-1 lc)) + (let ((up (get-upcase-table table))) + (aset up uc uc) + (aset up lc uc)) + ;; Clear out the extra slots so that they will be + ;; recomputed from the main (downcase) table and upcase table. + (set-char-table-extra-slot table 1 nil) + (set-char-table-extra-slot table 2 nil) + (modify-syntax-entry lc "w " (standard-syntax-table)) + (modify-syntax-entry uc "w " (standard-syntax-table))) + +(defun set-downcase-syntax (uc lc table) + "Make character LC a downcase of character UC. +It also modifies `standard-syntax-table' to give them the syntax of +word constituents." (setq uc (set-case-syntax-1 uc)) (setq lc (set-case-syntax-1 lc)) (aset table uc lc) (aset table lc lc) ;; Clear out the extra slots so that they will be - ;; recomputed from the main (downcase) table. - (set-char-table-extra-slot table 0 nil) + ;; recomputed from the main (downcase) table and upcase table. (set-char-table-extra-slot table 1 nil) (set-char-table-extra-slot table 2 nil) (modify-syntax-entry lc "w " (standard-syntax-table)) @@ -126,9 +173,10 @@ It also modifies `standard-syntax-table'. SYNTAX should be \" \", \"w\", \".\" or \"_\"." (setq c (set-case-syntax-1 c)) (aset table c c) + (let ((up (get-upcase-table table))) + (aset up c c)) ;; Clear out the extra slots so that they will be - ;; recomputed from the main (downcase) table. - (set-char-table-extra-slot table 0 nil) + ;; recomputed from the main (downcase) table and upcase table. (set-char-table-extra-slot table 1 nil) (set-char-table-extra-slot table 2 nil) (modify-syntax-entry c syntax (standard-syntax-table))) From cc4ff429a07a84a041f7d399c42fbe3510f0112f Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Feb 2005 00:57:33 +0000 Subject: [PATCH 523/560] (casify_region): Fix previous change. --- src/casefiddle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/casefiddle.c b/src/casefiddle.c index 4505f477c90..9af4015fbb3 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -255,7 +255,8 @@ casify_region (flag, b, e) start + 1, i + fromlen, str, 1, tolen, 1); - opoint_byte += tolen - fromlen; + if (opoint > start) + opoint_byte += tolen - fromlen; } } if ((int) flag >= (int) CASE_CAPITALIZE) From e0a65b4df5d82e2b6c57eca640cc1274c1c59d24 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Feb 2005 01:00:44 +0000 Subject: [PATCH 524/560] Setup cases of GREEK-FINAL-SIGMA, Y-WITH-DIAERESIS, I-WITH-DOT-ABOVE, DOTLESS-i. --- lisp/international/characters.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/international/characters.el b/lisp/international/characters.el index c33bd2eb43f..77eb49807c0 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -447,6 +447,7 @@ (set-case-syntax-pair ?,FO(B ?,Fo(B tbl) (set-case-syntax-pair ?,FP(B ?,Fp(B tbl) (set-case-syntax-pair ?,FQ(B ?,Fq(B tbl) + (set-upcase-syntax ?,FS(B ?,Fr(B tbl) (set-case-syntax-pair ?,FS(B ?,Fs(B tbl) (set-case-syntax-pair ?,FT(B ?,Ft(B tbl) (set-case-syntax-pair ?,FU(B ?,Fu(B tbl) @@ -481,6 +482,7 @@ (set-case-syntax-pair ?$,1&(B ?$,1'?(B tbl) (set-case-syntax-pair ?$,1' (B ?$,1'@(B tbl) (set-case-syntax-pair ?$,1'!(B ?$,1'A(B tbl) + (set-upcase-syntax ?$,1'#(B ?$,1'B(B tbl) (set-case-syntax-pair ?$,1'#(B ?$,1'C(B tbl) (set-case-syntax-pair ?$,1'$(B ?$,1'D(B tbl) (set-case-syntax-pair ?$,1'%(B ?$,1'E(B tbl) @@ -882,10 +884,12 @@ (set-case-syntax-pair (decode-char 'ucs (1- c)) (decode-char 'ucs c) tbl)) (setq c (1+ c))) + (set-downcase-syntax ?$,1 P(B ?i tbl) + (set-upcase-syntax ?I ?$,1 Q(B tbl) (set-case-syntax-pair ?$,1 R(B ?$,1 S(B tbl) (set-case-syntax-pair ?$,1 T(B ?$,1 U(B tbl) (set-case-syntax-pair ?$,1 V(B ?$,1 W(B tbl) -;;; (set-case-syntax-pair ?$,1!8(B ?,A(B tbl) ; these two have different length! + (set-case-syntax-pair ?$,1!8(B ?,A(B tbl) (set-case-syntax-pair ?$,1!9(B ?$,1!:(B tbl) (set-case-syntax-pair ?$,1!;(B ?$,1!<(B tbl) (set-case-syntax-pair ?$,1!=(B ?$,1!>(B tbl) From 62b00758164753249cacc65755a09ef6d3d05ed8 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Feb 2005 01:12:36 +0000 Subject: [PATCH 525/560] (tbl): Setup cases of I-WITH-DOT-ABOVE, DOTLESS-i. --- lisp/international/latin-5.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/international/latin-5.el b/lisp/international/latin-5.el index 5d96c1132a7..5d6cf04dc50 100644 --- a/lisp/international/latin-5.el +++ b/lisp/international/latin-5.el @@ -96,14 +96,14 @@ (set-case-syntax-pair 218 250 tbl) ;latin letter u with acute (set-case-syntax-pair 219 251 tbl) ;latin letter u with circumflex (set-case-syntax-pair 220 252 tbl) ;latin letter u with diaeresis - (set-case-syntax 221 "w" tbl) ;latin capital letter i with dot above + (set-downcase-syntax 221 ?i tbl) ;latin capital letter i with dot above (set-case-syntax-pair 222 254 tbl) ;latin letter s with cedilla (set-case-syntax 223 "w" tbl) ;latin small letter sharp s (set-case-syntax 234 "w" tbl) ;latin small letter e with ogonek (set-case-syntax 236 "w" tbl) ;latin small letter e with dot above (set-case-syntax 239 "w" tbl) ;latin small letter i with macron (set-case-syntax 247 "_" tbl) ;division sign - (set-case-syntax 253 "w" tbl) ;latin small letter i dotless + (set-upcase-syntax ?I 253 tbl) ;latin small letter i dotless (set-case-syntax 255 "w" tbl)) ;latin small letter y with diaeresis ;; When preloading this file, don't provide the feature. From 560721609df5200a474a7cf198f12c4e597df217 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Feb 2005 01:13:50 +0000 Subject: [PATCH 526/560] *** empty log message *** --- lisp/ChangeLog | 15 +++++++++++++++ src/ChangeLog | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7faed93d0d0..3fa13c73708 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2005-02-02 Kenichi Handa + + * international/latin-5.el (tbl): Setup cases of I-WITH-DOT-ABOVE, + DOTLESS-i. + + * international/characters.el: Setup cases of GREEK-FINAL-SIGMA, + Y-WITH-DIAERESIS, I-WITH-DOT-ABOVE, DOTLESS-i. + + * case-table.el (get-upcase-table): New function. + (copy-case-table): Copy upcaes table too if non-nil. + (set-case-syntax-delims): Maintain upcase table too. + (set-case-syntax-pair): Likewise. + (set-upcase-syntax, set-downcase-syntax): New functions. + (set-case-syntax): Maintain upcase table too. + 2005-02-02 Nick Roberts * progmodes/gdb-ui.el: (gdb-goto-info): Delete. diff --git a/src/ChangeLog b/src/ChangeLog index 5d470d57098..c7bd8f42b55 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2005-02-02 Kenichi Handa + + * casefiddle.c (casify_object): Enable changing characters of + different byte length. + (casify_region): Fix loop condition, args to replace_range_2, and + update opoint_byte. + + * insdel.c (replace_range_2): Fix bugs in adjusting markers and + point. + 2005-02-01 Kim F. Storm * xdisp.c (back_to_previous_visible_line_start): Reset iterator From 9afd1c3cafe0e6b0df3833bdbe35fe0b39f7e521 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 2 Feb 2005 02:43:13 +0000 Subject: [PATCH 527/560] (set-upcase-syntax, set-downcase-syntax): Fix previous change. --- lisp/case-table.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/case-table.el b/lisp/case-table.el index 77ebe857ff2..e9697655f38 100644 --- a/lisp/case-table.el +++ b/lisp/case-table.el @@ -140,6 +140,7 @@ It also modifies `standard-syntax-table' to give them the syntax of word constituents." (setq uc (set-case-syntax-1 uc)) (setq lc (set-case-syntax-1 lc)) + (aset table lc lc) (let ((up (get-upcase-table table))) (aset up uc uc) (aset up lc uc)) @@ -158,6 +159,8 @@ word constituents." (setq lc (set-case-syntax-1 lc)) (aset table uc lc) (aset table lc lc) + (let ((up (get-upcase-table table))) + (aset up uc uc)) ;; Clear out the extra slots so that they will be ;; recomputed from the main (downcase) table and upcase table. (set-char-table-extra-slot table 1 nil) From 87c366c13dd1a47c8f55feaf1641a001e6acea56 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 2 Feb 2005 05:51:51 +0000 Subject: [PATCH 528/560] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3fa13c73708..fd979e61a33 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2005-02-02 Nick Roberts + + * progmodes/gud.el: Correction to syntax in gud-menu-map. + 2005-02-02 Kenichi Handa * international/latin-5.el (tbl): Setup cases of I-WITH-DOT-ABOVE, From 4e518230522119c9034df4ca92b6952187d0e0f1 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 2 Feb 2005 05:52:51 +0000 Subject: [PATCH 529/560] Correction to syntax in gud-menu-map. --- lisp/progmodes/gud.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 42f908eb8dd..0988599ed54 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -101,7 +101,7 @@ Used to grey out relevant toolbar icons.") (Info-goto-node "(emacs)Debuggers"))) (easy-mmode-defmap gud-menu-map - '(([help] "Info" . gud-goto-info + '(([help] "Info" . gud-goto-info) ([refresh] "Refresh" . gud-refresh) ([run] menu-item "Run" gud-run :enable (and (not gud-running) From b044278deb1d9234fab91f5c1744d8e79774c624 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 2 Feb 2005 15:43:05 +0000 Subject: [PATCH 530/560] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index c7bd8f42b55..a1eeec8770f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-02-02 Kim F. Storm + + * undo.c (Fprimitive_undo): Fix dummy apply undo entry. + 2005-02-02 Kenichi Handa * casefiddle.c (casify_object): Enable changing characters of From ed71a5cf0a117f082d557a014bce13e78cc469d5 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 2 Feb 2005 15:43:18 +0000 Subject: [PATCH 531/560] (Fprimitive_undo): Fix dummy apply undo entry. --- src/undo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/undo.c b/src/undo.c index ea4f35397a9..eaf312be676 100644 --- a/src/undo.c +++ b/src/undo.c @@ -560,12 +560,13 @@ Return what remains of the list. */) } cdr = Fcdr (cdr); apply1 (car, cdr); + /* Make sure this produces at least one undo entry, so the test in `undo' for continuing an undo series will work right. */ if (EQ (oldlist, current_buffer->undo_list)) current_buffer->undo_list - = Fcons (list2 (Qcdr, Qnil), current_buffer->undo_list); + = Fcons (list3 (Qapply, Qcdr, Qnil), current_buffer->undo_list); } else if (STRINGP (car) && INTEGERP (cdr)) { From 394dff578e7e2fb35f555c5f1325696199360ce7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 2 Feb 2005 23:32:15 +0000 Subject: [PATCH 532/560] *** empty log message *** --- lisp/ChangeLog | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd979e61a33..e919f5f4622 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -10,7 +10,7 @@ * international/characters.el: Setup cases of GREEK-FINAL-SIGMA, Y-WITH-DIAERESIS, I-WITH-DOT-ABOVE, DOTLESS-i. - * case-table.el (get-upcase-table): New function. + * case-table.el (get-upcase-table): New function. (copy-case-table): Copy upcaes table too if non-nil. (set-case-syntax-delims): Maintain upcase table too. (set-case-syntax-pair): Likewise. @@ -151,7 +151,7 @@ 2005-01-29 Richard M. Stallman - * ses.el (undo-more): defadvice deleted. + * ses.el (undo-more): Delete defadvice. (ses-begin-change): Doc fix. * dired.el (dired-mode-map): Remap `undo' and `advertised-undo' @@ -169,7 +169,7 @@ * simple.el (undo): Fix the test for continuing a series of undos. (undo-more): Set pending-undo-list to t when we reach end. - (pending-undo-list): defvar moved up. + (pending-undo-list): Move up defvar. * wid-edit.el (widget-button-click): Shorten the range of the track-mouse binding. @@ -194,6 +194,20 @@ (gdb-assembler-custom): Update to recognise breakpoint information added on 2005-01-19. +2005-01-28 Stefan Monnier + + * progmodes/scheme.el (scheme-mode-variables): Set comment-add. + (dsssl-mode): Use define-derived-mode. + (scheme-mode-initialize): Remove. + (scheme-mode): Use run-mode-hooks. + + * cus-edit.el (customize-group-other-window) + (custom-buffer-create-other-window): Don't override special-display-*. + (custom-mode-map): Make it dense. + + * emacs-lisp/lisp-mode.el (eval-defun-1): Make sure `defvar' always + sets the default value. + 2005-01-28 Eli Zaretskii * descr-text.el: Add more keywords. From a383faaa0de4eb7e0cb061d4b04e28368a3ab021 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 2 Feb 2005 23:33:04 +0000 Subject: [PATCH 533/560] Make it clear it's only used for Mac OS 9. --- mac/inc/config.h | 2 +- mac/inc/s-mac.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mac/inc/config.h b/mac/inc/config.h index 859ef017bc6..4f9d36c030c 100644 --- a/mac/inc/config.h +++ b/mac/inc/config.h @@ -1,4 +1,4 @@ -/* Handcrafted Emacs site configuration file for Mac OS. -*- C -*- */ +/* Handcrafted Emacs site configuration file for Mac OS 9. -*- C -*- */ /* GNU Emacs site configuration template file. -*- C -*- Copyright (C) 1988, 1993, 1994, 1999, 2000 Free Software Foundation, Inc. diff --git a/mac/inc/s-mac.h b/mac/inc/s-mac.h index 2905692aac0..a9108a67ca5 100644 --- a/mac/inc/s-mac.h +++ b/mac/inc/s-mac.h @@ -1,4 +1,4 @@ -/* Handcrafted s-mac.h file for building GNU Emacs on the Macintosh. +/* Handcrafted s-mac.h file for building GNU Emacs on Mac OS 9. Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GNU Emacs. From 37a354aed8fd047e2fec9ca92a6d5fccf403f159 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 3 Feb 2005 02:16:40 +0000 Subject: [PATCH 534/560] Cancel previous change. --- lisp/international/latin-5.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/international/latin-5.el b/lisp/international/latin-5.el index 5d6cf04dc50..5d96c1132a7 100644 --- a/lisp/international/latin-5.el +++ b/lisp/international/latin-5.el @@ -96,14 +96,14 @@ (set-case-syntax-pair 218 250 tbl) ;latin letter u with acute (set-case-syntax-pair 219 251 tbl) ;latin letter u with circumflex (set-case-syntax-pair 220 252 tbl) ;latin letter u with diaeresis - (set-downcase-syntax 221 ?i tbl) ;latin capital letter i with dot above + (set-case-syntax 221 "w" tbl) ;latin capital letter i with dot above (set-case-syntax-pair 222 254 tbl) ;latin letter s with cedilla (set-case-syntax 223 "w" tbl) ;latin small letter sharp s (set-case-syntax 234 "w" tbl) ;latin small letter e with ogonek (set-case-syntax 236 "w" tbl) ;latin small letter e with dot above (set-case-syntax 239 "w" tbl) ;latin small letter i with macron (set-case-syntax 247 "_" tbl) ;division sign - (set-upcase-syntax ?I 253 tbl) ;latin small letter i dotless + (set-case-syntax 253 "w" tbl) ;latin small letter i dotless (set-case-syntax 255 "w" tbl)) ;latin small letter y with diaeresis ;; When preloading this file, don't provide the feature. From fbbde29acf66db8c98f3f88e9c4d3a51f141d35a Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 3 Feb 2005 02:19:15 +0000 Subject: [PATCH 535/560] Cancel previous change. for I-WITH-DOT-ABOVE and DOTLESS-i --- lisp/ChangeLog | 7 +++++++ lisp/international/characters.el | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e919f5f4622..032d796014a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2005-02-03 Kenichi Handa + + * international/characters.el: Cancel previous change. for + I-WITH-DOT-ABOVE and DOTLESS-i. + + * international/latin-5.el: Cancel previous change. + 2005-02-02 Nick Roberts * progmodes/gud.el: Correction to syntax in gud-menu-map. diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 77eb49807c0..727c9e6b9ff 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -884,8 +884,8 @@ (set-case-syntax-pair (decode-char 'ucs (1- c)) (decode-char 'ucs c) tbl)) (setq c (1+ c))) - (set-downcase-syntax ?$,1 P(B ?i tbl) - (set-upcase-syntax ?I ?$,1 Q(B tbl) + ;;(set-downcase-syntax ?$,1 P(B ?i tbl) + ;;(set-upcase-syntax ?I ?$,1 Q(B tbl) (set-case-syntax-pair ?$,1 R(B ?$,1 S(B tbl) (set-case-syntax-pair ?$,1 T(B ?$,1 U(B tbl) (set-case-syntax-pair ?$,1 V(B ?$,1 W(B tbl) From d78f30b86d46ec52982a98cf7fb1811b3568961d Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 3 Feb 2005 03:56:00 +0000 Subject: [PATCH 536/560] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-72 src/dispextern.h (xassert): Enable unconditionally. 2005-02-02 Miles Bader * src/dispextern.h (xassert): Enable unconditionally. --- src/ChangeLog | 4 ++++ src/dispextern.h | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a1eeec8770f..721c118467b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-02-02 Miles Bader + + * dispextern.h (xassert): Enable unconditionally. + 2005-02-02 Kim F. Storm * undo.c (Fprimitive_undo): Fix dummy apply undo entry. diff --git a/src/dispextern.h b/src/dispextern.h index 3b72e54b6d1..a11e4daaa22 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1,5 +1,5 @@ /* Interface definitions for display code. - Copyright (C) 1985,93,94,97,98,99, 2000,01,02,03, 2004 + Copyright (C) 1985,93,94,97,98,99, 2000,01,02,03, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -123,12 +123,13 @@ enum window_part #if GLYPH_DEBUG #define IF_DEBUG(X) X -#define xassert(X) do {if (!(X)) abort ();} while (0) #else #define IF_DEBUG(X) (void) 0 -#define xassert(X) (void) 0 #endif +/* Maybe move this inside the above `#ifdef GLYPH_DEBUG' for release. */ +#define xassert(X) do {if (!(X)) abort ();} while (0) + /* Macro for displaying traces of redisplay. If Emacs was compiled with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to a non-zero value in debugging sessions to activate traces. */ From 30b940a73115f6b2c0b4686d46df399cbd7381d3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 3 Feb 2005 04:28:21 +0000 Subject: [PATCH 537/560] (font-lock-default-function): Handle the rare case where only font-lock-keywords is set. --- lisp/ChangeLog | 7 ++++++- lisp/font-core.el | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 032d796014a..6390dc64b49 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,11 @@ +2005-02-02 Stefan Monnier + + * font-core.el (font-lock-default-function): Handle the rare case where + only font-lock-keywords is set. + 2005-02-03 Kenichi Handa - * international/characters.el: Cancel previous change. for + * international/characters.el: Cancel previous change for I-WITH-DOT-ABOVE and DOTLESS-i. * international/latin-5.el: Cancel previous change. diff --git a/lisp/font-core.el b/lisp/font-core.el index ce4a35a0ec3..bbe1961e51e 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -1,7 +1,7 @@ ;;; font-core.el --- Core interface to font-lock -;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001, 02, 2003 -;; Free Software Foundation, Inc. +;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +;; 2002, 2003, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: languages, faces @@ -202,6 +202,7 @@ this function onto `change-major-mode-hook'." ;; Only do hard work if the mode has specified stuff in ;; `font-lock-defaults'. (when (or font-lock-defaults + (and (boundp 'font-lock-keywords) font-lock-keywords) (cdr (assq major-mode font-lock-defaults-alist))) (font-lock-mode-internal mode))) @@ -295,6 +296,5 @@ means that Font Lock mode is turned on for buffers in C and C++ modes only." (provide 'font-core) +;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71 ;;; font-core.el ends here - -;;; arch-tag: f8c286e1-02f7-41d9-b89b-1b67780aed71 From e2c11e3b5bdf63e48cb20ccc3cc07033d3d1f34f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 06:47:16 +0000 Subject: [PATCH 538/560] (list-faces-display): Add optional argument. --- lisp/faces.el | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index a234c902332..4bfa94b062f 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1143,15 +1143,26 @@ Value is a list (FACE NEW-VALUE) where FACE is the face read ;; conflict with Lucid, which uses that name differently. (defvar help-xref-stack) -(defun list-faces-display () +(defun list-faces-display (&optional regexp) "List all faces, using the same sample text in each. The sample text is a string that comes from the variable -`list-faces-sample-text'." - (interactive) +`list-faces-sample-text'. + +If REGEXP is non-nil, list only those faces with names matching +this regular expression. When called interactively with a prefix +arg, prompt for a regular expression." + (interactive (list (and current-prefix-arg + (read-string "List faces matching regexp: ")))) (let ((faces (sort (face-list) #'string-lessp)) - (face nil) (frame (selected-frame)) disp-frame window face-name) + (when (> (length regexp) 0) + (setq faces + (delq nil + (mapcar (lambda (f) + (when (string-match regexp (symbol-name f)) + f)) + faces)))) (with-output-to-temp-buffer "*Faces*" (save-excursion (set-buffer standard-output) @@ -1164,9 +1175,7 @@ The sample text is a string that comes from the variable "\\[help-follow] on a face name to customize it\n" "or on its sample text for a description of the face.\n\n"))) (setq help-xref-stack nil) - (while faces - (setq face (car faces)) - (setq faces (cdr faces)) + (dolist (face faces) (setq face-name (symbol-name face)) (insert (format "%25s " face-name)) ;; Hyperlink to a customization buffer for the face. Using @@ -1208,6 +1217,7 @@ The sample text is a string that comes from the variable (copy-face (car faces) (car faces) frame disp-frame) (setq faces (cdr faces))))))) + (defun describe-face (face &optional frame) "Display the properties of face FACE on FRAME. Interactively, FACE defaults to the faces of the character after point From 048e6895c62b338e5f80d84cd4a75cfb7e98bf88 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 06:49:18 +0000 Subject: [PATCH 539/560] (hi-lock-mode): Turning on Hi-Lock turns on Font-Lock. --- lisp/hi-lock.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 99eeb698171..81c7296760f 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -294,6 +294,10 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." (when (and (not hi-lock-mode-prev) hi-lock-mode) (add-hook 'find-file-hooks 'hi-lock-find-file-hook) (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook) + (when (eq nil font-lock-defaults) + (setq font-lock-defaults '(nil))) + (unless font-lock-mode + (font-lock-mode 1)) (define-key-after menu-bar-edit-menu [hi-lock] (cons "Regexp Highlighting" hi-lock-menu)) (dolist (buffer (buffer-list)) From cb21651739ce95adcc6586e4ac6bd7a1a6268e7a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 06:56:24 +0000 Subject: [PATCH 540/560] (Buffer Names): Clarify generate-new-buffer-name. (Modification Time): Clarify when visited-file-modtime returns 0. (The Buffer List): Clarify bury-buffer. (Killing Buffers): Clarify. (Indirect Buffers): Add clone-indirect-buffer. --- lispref/buffers.texi | 46 +++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/lispref/buffers.texi b/lispref/buffers.texi index 42131766ec7..e0ef75ccae8 100644 --- a/lispref/buffers.texi +++ b/lispref/buffers.texi @@ -344,11 +344,11 @@ number inside of @samp{<@dots{}>}. It starts at 2 and keeps incrementing the number until it is not the name of an existing buffer. If the optional second argument @var{ignore} is non-@code{nil}, it -should be a string; it makes a difference if it is a name in the -sequence of names to be tried. That name will be considered acceptable, -if it is tried, even if a buffer with that name exists. Thus, if -buffers named @samp{foo}, @samp{foo<2>}, @samp{foo<3>} and @samp{foo<4>} -exist, +should be a string, a potential buffer name. It means to consider +that potential buffer acceptable, if it is tried, even it is the name +of an existing buffer (which would normally be rejected). Thus, if +buffers named @samp{foo}, @samp{foo<2>}, @samp{foo<3>} and +@samp{foo<4>} exist, @example (generate-new-buffer-name "foo") @@ -629,16 +629,13 @@ modification time, as a list of the form @code{(@var{high} @var{low})}. (This is the same format that @code{file-attributes} uses to return time values; see @ref{File Attributes}.) -The function returns zero if the buffer has no recorded last -modification time, which can happen, for instance, if the record has -been explicitly cleared by @code{clear-visited-file-modtime} or if the -buffer is not visiting a file. Note, however, that -@code{visited-file-modtime} can return a non-zero value for some -buffers that are not visiting files, but are nevertheless closely -associated with a file. This happens, for instance, with dired -buffers listing a directory. For such buffers, -@code{visited-file-modtime} returns the last modification time of that -directory, as recorded by dired. +If the buffer has no recorded last modification time, this function +returns zero. This case occurs, for instance, if the buffer is not +visiting a file or if the time has been explicitly cleared by +@code{clear-visited-file-modtime}. Note, however, that +@code{visited-file-modtime} returns a list for some non-file buffers +too. For instance, in a Dired buffer listing a directory, it returns +the last modification time of that directory, as recorded by Dired. For a new buffer visiting a not yet existing file, @var{high} is @minus{}1 and @var{low} is 65535, that is, @@ -857,7 +854,8 @@ If no suitable buffer exists, the buffer @samp{*scratch*} is returned This function puts @var{buffer-or-name} at the end of the buffer list, without changing the order of any of the other buffers on the list. This buffer therefore becomes the least desirable candidate for -@code{other-buffer} to return. +@code{other-buffer} to return. The argument can be either a buffer +itself or the name of one. @code{bury-buffer} operates on each frame's @code{buffer-list} parameter as well as the frame-independent Emacs buffer list; therefore, the @@ -949,8 +947,8 @@ Names}. @cindex killing buffers @cindex buffers, killing - @dfn{Killing a buffer} makes its name unknown to Emacs and makes its -text space available for other use. + @dfn{Killing a buffer} makes its name unknown to Emacs and makes the +memory space it occupied available for other use. The buffer object for the buffer that has been killed remains in existence as long as anything refers to it, but it is specially marked @@ -1101,6 +1099,18 @@ non-@code{nil}, the initial state is copied from the actual base buffer, not from @var{base-buffer}. @end deffn +@defun clone-indirect-buffer newname display-flag &optional norecord +This function creates and returns a new indirect buffer that shares +the current buffer's base buffer and copies the rest of the current +buffer's attributes. (If the current buffer is not indirect, it is +used as the base buffer.) + +If @var{display-flag} is non-@code{nil}, that means to display the new +buffer by calling @code{pop-to-buffer}. If @var{norecord} is +non-@code{nil}, that means not to put the new buffer to the front of +the buffer list. +@end defun + @defun buffer-base-buffer &optional buffer This function returns the base buffer of @var{buffer}, which defaults to the current buffer. If @var{buffer} is not indirect, the value is From f75fbf430c3500a6ca567386cd0ef4a8e22f45be Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 06:57:22 +0000 Subject: [PATCH 541/560] (Misc Events): Remove stray space. --- lispref/commands.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/commands.texi b/lispref/commands.texi index 293d72783c5..ec3c972e28a 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -1554,7 +1554,7 @@ portion of buffer text which has a @code{help-echo} text property. The generated event has this form: @example - (help-echo @var{frame} @var{help} @var{window} @var{object} @var{pos}) +(help-echo @var{frame} @var{help} @var{window} @var{object} @var{pos}) @end example @noindent From 011caae16dcb22153007869ad513bb80591fe3f4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 06:58:38 +0000 Subject: [PATCH 542/560] (Printing in Edebug): Fix edebug-print-circle. (Coverage Testing): Fix typo. --- lispref/edebug.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lispref/edebug.texi b/lispref/edebug.texi index 9789835780b..bcd7eba5b6f 100644 --- a/lispref/edebug.texi +++ b/lispref/edebug.texi @@ -801,7 +801,7 @@ vectors. @defopt edebug-print-circle If non-@code{nil}, Edebug binds @code{print-circle} to this value while -printing results. The default value is @code{nil}. +printing results. The default value is @code{t}. @end defopt Other programs can also use custom printing; see @file{cust-print.el} @@ -909,7 +909,7 @@ the breakpoint is reached, the frequency data looks like this: @example (defun fac (n) (if (= n 0) (edebug)) -;#6 1 0 =5 +;#6 1 = =5 (if (< 0 n) ;#5 = (* n (fac (1- n))) From 16bf330f413566714d4e62a3c515bc3dcecc89fc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:01:04 +0000 Subject: [PATCH 543/560] (File Locks): Not supported on MS systems. (Testing Accessibility): Clarify. --- lispref/files.texi | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lispref/files.texi b/lispref/files.texi index 2e6a5bcee00..aa97ff83d30 100644 --- a/lispref/files.texi +++ b/lispref/files.texi @@ -646,9 +646,10 @@ with-temp-buffer,, The Current Buffer}. @section File Locks @cindex file locks - When two users edit the same file at the same time, they are likely to -interfere with each other. Emacs tries to prevent this situation from -arising by recording a @dfn{file lock} when a file is being modified. + When two users edit the same file at the same time, they are likely +to interfere with each other. Emacs tries to prevent this situation +from arising by recording a @dfn{file lock} when a file is being +modified. (File locks are not implemented on Microsoft systems.) Emacs can then detect the first attempt to modify a buffer visiting a file that is locked by another Emacs job, and ask the user what to do. The file lock is really a file, a symbolic link with a special name, @@ -680,14 +681,15 @@ some other job. This function locks the file @var{filename}, if the current buffer is modified. The argument @var{filename} defaults to the current buffer's visited file. Nothing is done if the current buffer is not visiting a -file, or is not modified. +file, or is not modified, or if the system does not support locking. @end defun @defun unlock-buffer This function unlocks the file being visited in the current buffer, if the buffer is modified. If the buffer is not modified, then the file should not be locked, so this function does nothing. It also -does nothing if the current buffer is not visiting a file. +does nothing if the current buffer is not visiting a file, or if the +system does not support locking. @end defun File locking is not supported on some systems. On systems that do not @@ -834,10 +836,11 @@ a directory. @c Emacs 19 feature @defun file-accessible-directory-p dirname This function returns @code{t} if you have permission to open existing -files in the directory whose name as a file is @var{dirname}; otherwise -(or if there is no such directory), it returns @code{nil}. The value -of @var{dirname} may be either a directory name or the file name of a -file which is a directory. +files in the directory whose name as a file is @var{dirname}; +otherwise (or if there is no such directory), it returns @code{nil}. +The value of @var{dirname} may be either a directory name (such as +@file{/foo/}) or the file name of a file which is a directory +(such as @file{/foo}, without the final slash). Example: after the following, From 8dc22b869ee51262cdf08a4d92c7f79e19dc9e9c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:04:29 +0000 Subject: [PATCH 544/560] (Window Frame Parameters): Explain pixel=char on tty. (Pop-Up Menus): Fix typo. (Color Names): Explain all types of color names. Explain color-values on B&W terminal. (Text Terminal Colors): Explain "rgb values" are lists. Fix arg names. --- lispref/frames.texi | 63 ++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/lispref/frames.texi b/lispref/frames.texi index 655232a8869..a33c5b356be 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi @@ -310,12 +310,14 @@ The GNU Emacs Manual}. @node Window Frame Parameters @subsection Window Frame Parameters -Just what parameters a frame has depends on what display mechanism it + Just what parameters a frame has depends on what display mechanism it uses. Here is a table of the parameters that have special meanings in a window frame; of these, @code{name}, @code{title}, @code{height}, @code{width}, @code{buffer-list} and @code{buffer-predicate} provide meaningful information in terminal frames, and @code{tty-color-mode} -is meaningful @emph{only} in terminal frames. +is meaningful @emph{only} in terminal frames. Frame parameter whose +values measured in pixels, when used on text-only terminals, count +characters or lines instead. @table @code @item display @@ -1407,7 +1409,7 @@ that it calls @code{x-popup-menu}. Therefore, if you try to implement a submenu using @code{x-popup-menu}, it cannot work with the menu bar in an integrated fashion. This is why all menu bar submenus are implemented with menu keymaps within the parent menu, and never with -@code{x-popup-menu}. @xref{Menu Bar}, +@code{x-popup-menu}. @xref{Menu Bar}. If you want a menu bar submenu to have contents that vary, you should still use a menu keymap to implement it. To make the contents vary, add @@ -1586,6 +1588,17 @@ but @code{t} on MS-Windows. @node Color Names @section Color Names + A color name is text (usually in a string) that specifies a color. +Symbolic names such as @samp{black}, @samp{white}, @samp{red}, etc., +are allowed; use @kbd{M-x list-colors-display} to see a list of +defined names. You can also specify colors numerically in forms such +as @samp{#@var{rgb}} and @samp{RGB:@var{r}/@var{g}/@var{b}}, where +@var{r} specifies the red level, @var{g} specifies the green level, +and @var{b} specifies the blue level. You can use either one, two, +three, or four hex digits for @var{r}; then you must use the same +number of hex digits for all @var{g} and @var{b} as well, making +either 3, 6, 9 or 12 hex digits in all. + These functions provide a way to determine which color names are valid, and what they look like. In some cases, the value depends on the @dfn{selected frame}, as described below; see @ref{Input Focus}, for the @@ -1666,9 +1679,10 @@ If @var{color} is not defined, the value is @code{nil}. @result{} nil @end example -The color values are returned for @var{frame}'s display. If @var{frame} -is omitted or @code{nil}, the information is returned for the selected -frame's display. +The color values are returned for @var{frame}'s display. If +@var{frame} is omitted or @code{nil}, the information is returned for +the selected frame's display. If the frame cannot display colors, the +value is @code{nil}. @findex x-color-values This function used to be called @code{x-color-values}, @@ -1701,26 +1715,26 @@ terminal) as an optional argument. We hope in the future to make Emacs support more than one text-only terminal at one time; then this argument will specify which terminal to operate on (the default being the selected frame's terminal; @pxref{Input Focus}). At present, though, -the @var{display} argument has no effect. +the @var{frame} argument has no effect. -@defun tty-color-define name number &optional rgb display +@defun tty-color-define name number &optional rgb frame @tindex tty-color-define This function associates the color name @var{name} with color number @var{number} on the terminal. -The optional argument @var{rgb}, if specified, is an rgb value; it says -what the color actually looks like. If you do not specify @var{rgb}, -then this color cannot be used by @code{tty-color-approximate} to -approximate other colors, because Emacs does not know what it looks -like. +The optional argument @var{rgb}, if specified, is an rgb value, a list +of three numbers that specify what what the color actually looks like. +If you do not specify @var{rgb}, then this color cannot be used by +@code{tty-color-approximate} to approximate other colors, because +Emacs will not know what it looks like. @end defun -@defun tty-color-clear &optional display +@defun tty-color-clear &optional frame @tindex tty-color-clear This function clears the table of defined colors for a text-only terminal. @end defun -@defun tty-color-alist &optional display +@defun tty-color-alist &optional frame @tindex tty-color-alist This function returns an alist recording the known colors supported by a text-only terminal. @@ -1728,26 +1742,23 @@ text-only terminal. Each element has the form @code{(@var{name} @var{number} . @var{rgb})} or @code{(@var{name} @var{number})}. Here, @var{name} is the color name, @var{number} is the number used to specify it to the terminal. -If present, @var{rgb} is an rgb value that says what the color -actually looks like. +If present, @var{rgb} is a list of three color values (for red, green, +and blue) that says what the color actually looks like. @end defun -@defun tty-color-approximate rgb &optional display +@defun tty-color-approximate rgb &optional frame @tindex tty-color-approximate -This function finds the closest color, among the known colors supported -for @var{display}, to that described by the rgb value @var{rgb}. -The return value is an element of @code{tty-color-alist}. +This function finds the closest color, among the known colors +supported for @var{display}, to that described by the rgb value +@var{rgb} (a list of color values). The return value is an element of +@code{tty-color-alist}. @end defun -@defun tty-color-translate color &optional display +@defun tty-color-translate color &optional frame @tindex tty-color-translate This function finds the closest color to @var{color} among the known colors supported for @var{display} and returns its index (an integer). If the name @var{color} is not defined, the value is @code{nil}. - -@var{color} can be an X-style @code{"#@var{xxxyyyzzz}"} specification -instead of an actual name. The format -@code{"RGB:@var{xx}/@var{yy}/@var{zz}"} is also supported. @end defun @node Resources From 4a34b52963fb688604da46dc1d0c900d5d1f2dfa Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Thu, 3 Feb 2005 07:05:35 +0000 Subject: [PATCH 545/560] * dispnew.c (update_window): Fixing compile error due to xassert being uncondition, but predicate is. --- src/ChangeLog | 5 +++++ src/dispnew.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 721c118467b..16b6256556c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-02-02 Steven Tamm + + * dispnew.c (update_window): Fixing compile error due to + GLYPH_DEBUG being undefined. + 2005-02-02 Miles Bader * dispextern.h (xassert): Enable unconditionally. diff --git a/src/dispnew.c b/src/dispnew.c index 1c3c56de80b..b58d81fcba5 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4065,11 +4065,11 @@ update_window (w, force_p) extern Lisp_Object do_mouse_tracking; #if GLYPH_DEBUG struct frame *f = XFRAME (WINDOW_FRAME (w)); -#endif /* Check that W's frame doesn't have glyph matrices. */ xassert (FRAME_WINDOW_P (f)); xassert (updating_frame != NULL); +#endif /* Check pending input the first time so that we can quickly return. */ if (redisplay_dont_pause) From b471b8e98c6e121e77fde34c55558ac419712ba6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:09:17 +0000 Subject: [PATCH 546/560] (User-Level Deletion): just-one-space takes numeric arg. (Undo, Maintaining Undo): Clarify last change. (Sorting): In sort-numeric-fields, explain about octal and hex. Mention sort-numeric-base. (Format Properties): Add xref for hard newlines. --- lispref/text.texi | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/lispref/text.texi b/lispref/text.texi index 3d2fa870bac..144a95c03dc 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -720,10 +720,11 @@ This has too many spaces at the start of (this list) @end smallexample @end deffn -@deffn Command just-one-space +@deffn Command just-one-space &optional n @comment !!SourceFile simple.el This command replaces any spaces and tabs around point with a single -space. It returns @code{nil}. +space, or @var{n} spaces if @var{n} is specified. It returns +@code{nil}. @end deffn @deffn Command delete-blank-lines @@ -1218,7 +1219,8 @@ This kind of element records a change that can be undone by evaluating and @var{end} is buffer positions of the range affected by this change and @var{delta} is an integer value which is the number of bytes added or deleted in that range by this change. This kind of element -supports undo in an active region +enables undo limited to a region to determine whether the element +pertains to that region. @item (@var{marker} . @var{adjustment}) This kind of element records the fact that the marker @var{marker} was @@ -1339,8 +1341,8 @@ change group is only discarded if it exceeds @code{undo-outer-limit}. @defopt undo-outer-limit If at garbage collection time the undo info for the current command -exceeds this limit, Emacs discards the info and prints a warning -message. This is a last ditch limit to prevent memory overflow. +exceeds this limit, Emacs discards the info and displays a warning. +This is a last ditch limit to prevent memory overflow. @end defopt @node Filling @@ -1915,19 +1917,27 @@ is useful for sorting tables. @deffn Command sort-numeric-fields field start end This command sorts lines in the region between @var{start} and -@var{end}, comparing them numerically by the @var{field}th field of each -line. The specified field must contain a number in each line of the -region. Fields are separated by whitespace and numbered starting from -1. If @var{field} is negative, sorting is by the -@w{@minus{}@var{field}th} field from the end of the line. This command -is useful for sorting tables. +@var{end}, comparing them numerically by the @var{field}th field of +each line. Fields are separated by whitespace and numbered starting +from 1. The specified field must contain a number in each line of the +region. Numbers starting with 0 are treated as octal, and numbers +starting with @samp{0x} are treated as hexadecimal. + +If @var{field} is negative, sorting is by the +@w{@minus{}@var{field}th} field from the end of the line. This +command is useful for sorting tables. @end deffn +@defopt sort-numeric-base +This variable specifies the default radix for +@code{sort-numeric-fields} to parse numbers. +@end defopt + @deffn Command sort-columns reverse &optional beg end This command sorts the lines in the region between @var{beg} and -@var{end}, comparing them alphabetically by a certain range of columns. -The column positions of @var{beg} and @var{end} bound the range of -columns to sort on. +@var{end}, comparing them alphabetically by a certain range of +columns. The column positions of @var{beg} and @var{end} bound the +range of columns to sort on. If @var{reverse} is non-@code{nil}, the sort is in reverse order. @@ -3119,8 +3129,9 @@ are used for representing formatted text. @xref{Filling}, and @item hard If a newline character has this property, it is a ``hard'' newline. The fill commands do not alter hard newlines and do not move words -across them. However, this property takes effect only if the variable -@code{use-hard-newlines} is non-@code{nil}. +across them. However, this property takes effect only if the +@code{use-hard-newlines} minor mode is enabled. @xref{Hard and Soft +Newlines,, Hard and Soft Newlines, emacs, The GNU Emacs Manual}. @item right-margin This property specifies an extra right margin for filling this part of the From f6c62d96905001cee7e45e1e4e621fdcda9dabbf Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Thu, 3 Feb 2005 07:09:43 +0000 Subject: [PATCH 547/560] * macfns.c (unwind_create_frame): Fixing compile error due to xassert being uncondition, but predicate is. --- src/ChangeLog | 4 +++- src/macfns.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 16b6256556c..4dcf9208643 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,9 @@ 2005-02-02 Steven Tamm + * macfns.c (unwind_create_frame): Fixing compile error due to + xassert being uncondition, but predicate is. * dispnew.c (update_window): Fixing compile error due to - GLYPH_DEBUG being undefined. + xassert being uncondition, but predicate is. 2005-02-02 Miles Bader diff --git a/src/macfns.c b/src/macfns.c index 33da9091575..416522b49b9 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -2527,9 +2527,11 @@ unwind_create_frame (frame) x_free_frame_resources (f); +#if GLYPH_DEBUG /* Check that reference counts are indeed correct. */ xassert (dpyinfo->reference_count == dpyinfo_refcount); xassert (dpyinfo->image_cache->refcount == image_cache_refcount); +#endif return Qt; } From ae473bd3ef47ac71101961bb91d3debfdc600d0d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:19:07 +0000 Subject: [PATCH 548/560] (Basic Windows): Add cursor-in-non-selected-windows. Clarify. (Selecting Windows): Clarify save-selected-window. (Cyclic Window Ordering): Clarify walk-windows. (Window Point): Clarify. (Window Start): Add comment to example. (Resizing Windows): Add `interactive' specs in examples. Document fit-window-to-buffer. --- lispref/windows.texi | 52 +++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/lispref/windows.texi b/lispref/windows.texi index 5041fb5b2df..671175a550d 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi @@ -53,11 +53,17 @@ multiple nonoverlapping Emacs windows. In each frame, at any time, one and only one window is designated as @dfn{selected within the frame}. The frame's cursor appears in that -window. At any time, one frame is the selected frame; and the window -selected within that frame is @dfn{the selected window}. The selected -window's buffer is usually the current buffer (except when +window, but the other windows have ``non-selected'' cursors, normally +less visible. At any time, one frame is the selected frame; and the +window selected within that frame is @dfn{the selected window}. The +selected window's buffer is usually the current buffer (except when @code{set-buffer} has been used). @xref{Current Buffer}. +@defvar cursor-in-non-selected-windows +If this variable is @code{nil}, Emacs displays only one cursor, +in the selected window. Other windows have no cursor at all. +@end defvar + For practical purposes, a window exists only while it is displayed in a frame. Once removed from the frame, the window is effectively deleted and should not be used, @emph{even though there may still be references @@ -455,10 +461,10 @@ The return value is @var{window}. @end defun @defmac save-selected-window forms@dots{} -This macro records the selected window, as well as the selected window +This macro records the selected frame, as well as the selected window of each frame, executes @var{forms} in sequence, then restores the -earlier selected windows. It returns the value of the last form in -@var{forms}. +earlier selected frame and windows It returns the value of the last +form in @var{forms}. This macro does not save or restore anything about the sizes, arrangement or contents of windows; therefore, if the @var{forms} @@ -648,8 +654,9 @@ In an interactive call, @var{count} is the numeric prefix argument. @c Emacs 19 feature @defun walk-windows proc &optional minibuf all-frames -This function cycles through all windows, calling @code{proc} -once for each window with the window as its sole argument. +This function cycles through all windows. It calls the function +@code{proc} once for each window, with the window as its sole +argument. The optional arguments @var{minibuf} and @var{all-frames} specify the set of windows to include in the scan. See @code{next-window}, above, @@ -1175,11 +1182,11 @@ the other windows are stored in those windows. @item As long as the selected window displays the current buffer, the window's point and the buffer's point always move together; they remain equal. - -@item -@xref{Positions}, for more details on buffer positions. @end itemize +@noindent +@xref{Positions}, for more details on buffer positions. + As far as the user is concerned, point is where the cursor is, and when the user switches to another buffer, the cursor jumps to the position of point in that buffer. @@ -1356,6 +1363,7 @@ Here is an example: @example @group +;; @r{If point is off the screen now, recenter it now.} (or (pos-visible-in-window-p (point) (selected-window)) (recenter 0)) @@ -1984,6 +1992,7 @@ It could be defined as follows: @example @group (defun enlarge-window-horizontally (columns) + (interactive "p") (enlarge-window columns t)) @end group @end example @@ -2006,16 +2015,29 @@ It could be defined as follows: @example @group (defun shrink-window-horizontally (columns) + (interactive "p") (shrink-window columns t)) @end group @end example @end deffn +@defun fit-window-to-buffer &optional window max-height min-height +This function makes @var{window} the right height to display its +contents exactly. If @var{window} is omitted or @code{nil}, it uses +the selected window. + +The argument @var{max-height} specifies the maximum height the window +is allowed to be; @code{nil} means use the frame height. The argument +@var{min-height} specifies the minimum height for the window; +@code{nil} means use @code{window-min-height}. All these height +values include the mode-line and/or header-line. +@end defun + @deffn Command shrink-window-if-larger-than-buffer &optional window -This command shrinks @var{window} to be as small as possible while still -showing the full contents of its buffer---but not less than -@code{window-min-height} lines. If @var{window} is not given, -it defaults to the selected window. +This command shrinks @var{window} vertically to be as small as +possible while still showing the full contents of its buffer---but not +less than @code{window-min-height} lines. If @var{window} is not +given, it defaults to the selected window. However, the command does nothing if the window is already too small to display the whole text of the buffer, or if part of the contents are From 7f9c94b0881d5089d66d1706cfec60f97745c3c2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:20:07 +0000 Subject: [PATCH 549/560] (Undo): Clarify last change. --- man/basic.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/basic.texi b/man/basic.texi index 29bf6d4e207..1598de2632a 100644 --- a/man/basic.texi +++ b/man/basic.texi @@ -400,7 +400,7 @@ value of @code{undo-strong-limit} is 30000. Regardless of the values of those variables, the most recent change is never discarded unless it gets bigger than @code{undo-outer-limit} (normally 3,000,000). At that point, Emacs discards the undo data and -warns you about it. This is the only situation in which you can not +warns you about it. This is the only situation in which you cannot undo the last command. If this happens, you can increase the value of @code{undo-outer-limit} to make it even less likely to happen in the future. But if you didn't expect the command to create such large From 7354ca011daefc7a0a7e7e7ce51c8453f33e69d3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:22:46 +0000 Subject: [PATCH 550/560] (Select Buffer): Doc next-buffer and prev-buffer. (List Buffers): Clarify. (Several Buffers): Doc T command. (Buffer Convenience): Clarify menu. --- man/buffers.texi | 64 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/man/buffers.texi b/man/buffers.texi index 558b636de60..97234966b4b 100644 --- a/man/buffers.texi +++ b/man/buffers.texi @@ -67,6 +67,10 @@ megabytes. @table @kbd @item C-x b @var{buffer} @key{RET} Select or create a buffer named @var{buffer} (@code{switch-to-buffer}). +@item C-x @key{LEFT} +Select the previous buffer in the list of existing buffers. +@item C-x @key{RIGHT} +Select the next buffer in the list of existing buffers. @item C-x 4 b @var{buffer} @key{RET} Similar, but select @var{buffer} in another window (@code{switch-to-buffer-other-window}). @@ -84,6 +88,16 @@ name you want (@pxref{Completion}). An empty argument to @kbd{C-x b} specifies the buffer that was current most recently among those not now displayed in any window. +@kindex C-x @key{LEFT} +@kindex C-x @key{RIGHT} +@findex next-buffer +@findex prev-buffer + For conveniently switching between a few buffers, use the commands +@kbd{C-x @key{LEFT}} and @kbd{C-x @key{RIGHT}}. @kbd{C-x @key{RIGHT}} +(@code{prev-buffer}) selects the previous buffer (following the order +of most recent selection), while @kbd{C-x @key{LEFT}} +(@code{next-buffer}) moves through buffers in the reverse direction. + @kindex C-x 4 b @findex switch-to-buffer-other-window @vindex even-window-heights @@ -141,9 +155,9 @@ List the existing buffers (@code{list-buffers}). @cindex listing current buffers @kindex C-x C-b @findex list-buffers - To display a list of all the buffers that exist, type @kbd{C-x C-b}. -Each line in the list shows one buffer's name, major mode and visited -file. The buffers are listed in the order that they were current; the + To display a list of existing buffers, type @kbd{C-x C-b}. Each +line in the list shows one buffer's name, major mode and visited file. +The buffers are listed in the order that they were current; the buffers that were current most recently come first. @samp{*} in the first field of a line indicates the buffer is ``modified.'' @@ -171,7 +185,7 @@ directory @file{~/cvs/emacs/src/}. You can list only buffers that are visiting files by giving the command a prefix; for instance, by typing @kbd{C-u C-x C-b}. -@code{list-buffers} omits buffers whose name begins with a blank, + @code{list-buffers} omits buffers whose names begin with a space, unless they visit files: such buffers are used internally by Emacs. @need 2000 @@ -332,8 +346,9 @@ Similar, but do it in another window. buffers@footnote{Buffers which don't visit files and whose names begin with a space are omitted: these are used internally by Emacs.} into the buffer @samp{*Buffer List*}, and selects that buffer in Buffer Menu -mode. The list in the @samp{*Buffer List*} buffer looks exactly as -described in @ref{List Buffers}. The buffer is read-only, and can be +mode. + + The buffer is read-only, and can be changed only through the special commands described in this section. The usual Emacs cursor motion commands can be used in the @samp{*Buffer List*} buffer. The following commands apply to the buffer described on @@ -411,21 +426,32 @@ any buffers previously marked with the @kbd{m} command. If you have not marked any buffers, this command is equivalent to @kbd{1}. @end table - All that @code{buffer-menu} does directly is create and switch to a -suitable buffer, and turn on Buffer Menu mode. Everything else + There is also a command that affects the entire buffer list: + +@table @kbd +@item T +Delete, or reinsert, lines for non-file buffers. This command toggles +the inclusion of such buffers in the buffer list. +@end table + + What @code{buffer-menu} actually does is create and switch to a +suitable buffer, and turn on Buffer Menu mode in it. Everything else described above is implemented by the special commands provided in Buffer Menu mode. One consequence of this is that you can switch from -the @samp{*Buffer List*} buffer to another Emacs buffer, and edit there. -You can reselect the @samp{*Buffer List*} buffer later, to perform the -operations already requested, or you can kill it, or pay no further -attention to it. +the @samp{*Buffer List*} buffer to another Emacs buffer, and edit +there. You can reselect the @samp{*Buffer List*} buffer later, to +perform the operations already requested, or you can kill it, or pay +no further attention to it. - The only difference between @code{buffer-menu} and @code{list-buffers} -is that @code{buffer-menu} switches to the @samp{*Buffer List*} buffer -in the selected window; @code{list-buffers} displays it in another -window. If you run @code{list-buffers} (that is, type @kbd{C-x C-b}) -and select the buffer list manually, you can use all of the commands -described here. + The list in the @samp{*Buffer List*} buffer looks exactly like the +buffer list described in @ref{List Buffers}, because they really are +the same. The only difference between @code{buffer-menu} and +@code{list-buffers} is that @code{buffer-menu} switches to the +@samp{*Buffer List*} buffer in the selected window; +@code{list-buffers} displays the same buffer in another window. If +you run @code{list-buffers} (that is, type @kbd{C-x C-b}) and select +the buffer list manually, you can use all of the commands described +here. Normally, the buffer @samp{*Buffer List*} is not updated automatically when buffers are created and killed; its contents are just text. If you have @@ -506,7 +532,7 @@ minibuffer. convenient to switch between buffers. @menu -* Uniquify:: Buffer names can contain directory parts. +* Uniquify:: Making buffer names unique with directory parts. * Iswitchb:: Switching between buffers with substrings. * Buffer Menus:: Configurable buffer menu. @end menu From b027df6b5813b665a9fcdeb0d0017905daa5df4a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:23:36 +0000 Subject: [PATCH 551/560] (Misc Dired Commands): Delete dired-marked-files. --- man/dired.texi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/man/dired.texi b/man/dired.texi index 464aa34c6c2..0390848faf6 100644 --- a/man/dired.texi +++ b/man/dired.texi @@ -1116,13 +1116,10 @@ marked file. As a special case, if no prefix argument is given and point is on a directory headerline, @kbd{w} gives you the name of that directory without looking for marked files. -@vindex dired-marked-files The main purpose of the @kbd{w} command is so that you can yank the file names into arguments for other Emacs commands. It also displays what was pushed onto the kill ring, so you can use it to display the -list of currently marked files in the echo area. It also stores the -list of names in the variable @code{dired-marked-files}, for use in -Lisp expressions. +list of currently marked files in the echo area. @end table @ignore From 4a10556bc2baa2b6904536f65d27d85e29b03844 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:25:14 +0000 Subject: [PATCH 552/560] (File Names): Clarify. (Visiting): Update conditions for use of file dialog. Clarify. (Saving): Doc d as answer in save-some-buffers. (Remote Files): Clean up the text. --- man/files.texi | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/man/files.texi b/man/files.texi index 2ab9d5aaaa6..df7809309e8 100644 --- a/man/files.texi +++ b/man/files.texi @@ -120,7 +120,7 @@ is not defined). only when done before Emacs is started. @cindex home directory shorthand - You can use the @file{~/} in a file name to mean your home directory, + You can use @file{~/} in a file name to mean your home directory, or @file{~@var{user-id}/} to mean the home directory of a user whose login name is @code{user-id}. (On DOS and Windows systems, where a user doesn't have a home directory, Emacs substitutes @file{~/} with the @@ -208,11 +208,13 @@ While in the minibuffer, you can abort @kbd{C-x C-f} by typing about this, see @ref{Completion Options}. @cindex file selection dialog - When Emacs is built with a suitable GUI toolkit, it pops up the -standard File Selection dialog of that toolkit instead of prompting for -the file name in the minibuffer. On Unix and GNU/Linux platforms, Emacs -does that when built with LessTif and Motif toolkits; on MS-Windows, the -GUI version does that by default. + When Emacs is built with a suitable GUI toolkit, commands invoked +with the mouse or the menu bar use the toolkit's standard File +Selection dialog instead of prompting for the file name in the +minibuffer. On Unix and GNU/Linux platforms, Emacs does that when +built with GTK, LessTif, and Motif toolkits; on MS-Windows, the GUI +version does that by default. @xref{Dialog Boxes}, for info +on customization of this. Your confirmation that @kbd{C-x C-f} has completed successfully is the appearance of new text on the screen and a new buffer name in the mode @@ -253,10 +255,10 @@ carriage-return linefeed or just carriage-return if appropriate. @vindex find-file-run-dired If the file you specify is actually a directory, @kbd{C-x C-f} invokes Dired, the Emacs directory browser, so that you can ``edit'' the contents -of the directory (@pxref{Dired}). Dired is a convenient way to delete, -look at, or operate on the files in the directory. However, if the -variable @code{find-file-run-dired} is @code{nil}, then it is an error -to try to visit a directory. +of the directory (@pxref{Dired}). Dired is a convenient way to view, delete, +or operate on the files in the directory. However, if the variable +@code{find-file-run-dired} is @code{nil}, then it is an error to try +to visit a directory. Files which are actually collections of other files, or @dfn{file archives}, are visited in special modes which invoke a Dired-like @@ -407,6 +409,9 @@ about other buffers. View the buffer that you are currently being asked about. When you exit View mode, you get back to @code{save-some-buffers}, which asks the question again. +@item d +Diff the buffer against its corresponding file, so you can see +what changes you would be saving. @item C-h Display a help message about these options. @end table @@ -3085,26 +3090,24 @@ syntax: @end example @noindent -When you do this, Emacs may use the FTP program to access files on the -remote host, or Emacs may use a remote-login program (such as -@command{ssh}, @command{rlogin}, or @command{telnet}) to do this. - -You can always specify in the file name which method should be used to -access the remote files, for example +To carry out this request, Emacs uses either the FTP program or a +remote-login program such as @command{ssh}, @command{rlogin}, or +@command{telnet}. You can always specify in the file name which +method to use---for example, @file{/ftp:@var{user}@@@var{host}:@var{filename}} uses FTP, whereas @file{/ssh:@var{user}@@@var{host}:@var{filename}} uses @command{ssh}. -When you don't specify a method in the file name, Emacs determines a -default method according to the following rules: +When you don't specify a method in the file name, Emacs chooses +the method as follows: @enumerate @item -If the host name starts with @samp{ftp.} (with dot), then Emacs assumes -the @command{ftp} method. +If the host name starts with @samp{ftp.} (with dot), then Emacs uses +FTP. @item -If the user name is @samp{ftp} or @samp{anonymous}, then Emacs assumes -the @command{ftp} method. +If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses +FTP. @item -Otherwise, Emacs assumes the @command{ssh} method. +Otherwise, Emacs uses @command{ssh}. @end enumerate @noindent From 6d8d2de06e4b36ca96adb9bf92973548bf271937 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:25:47 +0000 Subject: [PATCH 553/560] (Spelling): Fix typo. --- man/fixit.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/fixit.texi b/man/fixit.texi index 84121842b8c..04fa823e76e 100644 --- a/man/fixit.texi +++ b/man/fixit.texi @@ -159,7 +159,7 @@ checker program Ispell, which is not part of Emacs. @table @kbd @item M-x flyspell-mode Enable Flyspell mode, which highlights all misspelled words. -@item M-x flyspell-progmode +@item M-x flyspell-prog-mode Enable Flyspell mode for comments and strings only. @item M-$ Check and correct spelling of the word at point (@code{ispell-word}). From 511002e96270cc157d552db4f0c83073b5786602 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:29:03 +0000 Subject: [PATCH 554/560] (Frames): Delete unnecessary mention of Windows. (Mouse Commands): Likewise. Mention xterm mouse support. (Clipboard): Clarify. (Mouse References): Mention use of Mouse-1 for following links. (Menu Mouse Clicks): Clarify. (Mode Line Mouse): Clarify. (Drag and Drop): Rewrite. --- man/frames.texi | 150 ++++++++++++++++++++++++++---------------------- 1 file changed, 82 insertions(+), 68 deletions(-) diff --git a/man/frames.texi b/man/frames.texi index 2d6c953d2e4..877d9a0e319 100644 --- a/man/frames.texi +++ b/man/frames.texi @@ -29,10 +29,6 @@ frame. so that you can use many of the features described in this chapter. @xref{MS-DOS Input}, for more information. -@cindex MS Windows - Emacs compiled for MS Windows mostly supports the same features as -under X. - @menu * Mouse Commands:: Moving, cutting, and pasting, with the mouse. * Secondary Selection:: Cutting without altering point and mark. @@ -64,7 +60,9 @@ under X. The mouse commands for selecting and copying a region are mostly compatible with the @code{xterm} program. You can use the same mouse -commands for copying between Emacs and other X client programs. +commands for copying between Emacs and other window-based programs. +Most of these commands also work in Emacs when you run it under an +@code{xterm} terminal. @kindex DELETE @r{(and mouse selection)} If you select a region with any of these mouse commands, and then @@ -188,8 +186,6 @@ you want. Then yank it in Emacs with @kbd{C-y} or @kbd{Mouse-2}. system for X selections, use @kbd{C-x @key{RET} x} or @kbd{C-x @key{RET} X}. @xref{Specify Coding}. - These cutting and pasting commands also work on MS-Windows. - @cindex primary selection @cindex cut buffer @cindex selection, primary @@ -270,7 +266,7 @@ that matters is which window you click on. @xref{Mouse Commands}. @cindex OpenWindows @cindex Gnome - As well as the primary and secondary selection types, X supports a + Apart from the primary and secondary selection types, X supports a @dfn{clipboard} selection type which is used by some applications, particularly under OpenWindows and Gnome. @@ -287,28 +283,42 @@ unlike most systems. @node Mouse References @section Following References with the Mouse +@kindex Mouse-1 @r{(selection)} @kindex Mouse-2 @r{(selection)} - Some Emacs buffers display lists of various sorts. These include -lists of files, of buffers, of possible completions, of matches for -a pattern, and so on. + Some read-only Emacs buffers include references you can follow, or +commands you can activate. These include names of files, of buffers, +of possible completions, of matches for a pattern, as well as the +buttons in Help buffers and customization buffers. You can follow the +reference or activate the command by moving point to it and typing +@key{RET}. You can also do this with the mouse, using either +@kbd{Mouse-1} or @kbd{Mouse-2}. - Since yanking text into these buffers is not very useful, most of them -define @kbd{Mouse-2} specially, as a command to use or view the item you -click on. + Since yanking text into a read-only buffer is not allowed, these +buffers generally define @kbd{Mouse-2} to follow a reference or +activate a command. For example, if you click @kbd{Mouse-2} on a file +name in a Dired buffer, you visit that file. If you click +@kbd{Mouse-2} on an error message in the @samp{*Compilation*} buffer, +you go to the source code for that error message. If you click +@kbd{Mouse-2} on a completion in the @samp{*Completions*} buffer, you +choose that completion. - For example, if you click @kbd{Mouse-2} on a file name in a Dired -buffer, you visit that file. If you click @kbd{Mouse-2} on an error -message in the @samp{*Compilation*} buffer, you go to the source code -for that error message. If you click @kbd{Mouse-2} on a completion in -the @samp{*Completions*} buffer, you choose that completion. +@vindex mouse-1-click-follows-link + However, most applications use @kbd{Mouse-1} to do this sort of +thing, so Emacs implements this too. If you click @kbd{Mouse-1} +quickly on a reference or button, it follows or activates. If you +click slowly, it moves point as usual. Dragging, meaning moving the +mouse while it is held down, also has its usual behavior of setting +the region. The variable @code{mouse-1-click-follows-link} controls +whether @kbd{Mouse-1} has this behavior. @vindex mouse-highlight - You can usually tell when @kbd{Mouse-2} has this special sort of -meaning because the sensitive text highlights when you move the mouse -over it. The variable @code{mouse-highlight} controls whether to do -this highlighting always (even when such text appears where the mouse -already is), never, or only immediately after you move the mouse. + You can usually tell when @kbd{Mouse-1} and @kbd{Mouse-2} have this +special sort of meaning because the sensitive text highlights when you +move the mouse over it. The variable @code{mouse-highlight} controls +whether to do this highlighting always (even when such text appears +where the mouse already is), never, or only immediately after you move +the mouse. @node Menu Mouse Clicks @section Mouse Clicks for Menus @@ -331,16 +341,17 @@ for editing formatted text. @xref{Formatted Text}. @item C-Mouse-3 @kindex C-Mouse-3 -This menu is mode-specific. For most modes if Menu-bar mode is on, this -menu has the same items as all the mode-specific menu-bar menus put -together. Some modes may specify a different menu for this +This menu is mode-specific. For most modes if Menu-bar mode is on, +this menu has the same items as all the mode-specific menu-bar menus +put together. Some modes may specify a different menu for this button.@footnote{Some systems use @kbd{Mouse-3} for a mode-specific menu. We took a survey of users, and found they preferred to keep -@kbd{Mouse-3} for selecting and killing regions. Hence the decision to -use @kbd{C-Mouse-3} for this menu.} If Menu-bar mode is off, this menu -contains all the items which would be present in the menu bar---not just -the mode-specific ones---so that you can access them without having to -display the menu bar. +@kbd{Mouse-3} for selecting and killing regions. Hence the decision +to use @kbd{C-Mouse-3} for this menu. To use @kbd{Mouse-3} instead, +do @code{(global-set-key [mouse-3] 'mouse-popup-menubar-stuff)}.} If +Menu-bar mode is off, this menu contains all the items which would be +present in the menu bar---not just the mode-specific ones---so that +you can access them without having to display the menu bar. @item S-Mouse-1 This menu is for specifying the frame's principal font. @@ -357,9 +368,9 @@ windows. @table @kbd @item Mouse-1 @kindex Mouse-1 @r{(mode line)} -@kbd{Mouse-1} on a mode line selects the window above. By dragging -@kbd{Mouse-1} on the mode line, you can move it, thus changing the -height of the windows above and below. +@kbd{Mouse-1} on a mode line selects the window it belongs to. By +dragging @kbd{Mouse-1} on the mode line, you can move it, thus +changing the height of the windows above and below. @item Mouse-2 @kindex Mouse-2 @r{(mode line)} @@ -367,9 +378,9 @@ height of the windows above and below. @item Mouse-3 @kindex Mouse-3 @r{(mode line)} -@kbd{Mouse-3} on a mode line deletes the window above. If the frame has -only one window, it buries the current buffer instead and switches to -another buffer. +@kbd{Mouse-3} on a mode line deletes the window it belongs to. If the +frame has only one window, it buries the current buffer instead, and +switches to another buffer. @item C-Mouse-2 @kindex C-mouse-2 @r{(mode line)} @@ -798,19 +809,24 @@ generating appropriate events for Emacs. @code{mouse-wheel-scroll-amount} determine where and by how much buffers are scrolled. -@node Drag and drop -@section Drag and drop in Emacs. - +@node Drag and Drop +@section Drag and Drop @cindex drag and drop - Emacs supports drag and drop so that dropping of files and text is handled. -Currently supported drag and drop protocols are XDND, Motif and the old -KDE 1.x protocol. There is no drag support yet. -When text is dropped on Emacs, Emacs inserts the text where it is dropped. -When a file is dragged from a file manager to Emacs, Emacs opens that file. -As a special case, if a file is dropped on a dired buffer the file is -copied or moved (depends on exactly how it is dragged and the application -it was dragged from) to the directory the dired buffer is displaying. + Emacs supports @cindex{drag and drop} using the mouse. For +instance, dropping text onto an Emacs frame inserts the text where it +is dropped. Dropping a file onto an Emacs frame visits that file. As +a special case, dropping the file on a Dired buffer moves or copies +the file (according to the conventions of the application it came +from) into the directory displayed in that buffer. + +@vindex x-dnd-open-file-other-window + Dropping a file normally visits it in the window you drop it on. If +you prefer to visit the file in a new window in such cases, customize +the variable @code{x-dnd-open-file-other-window}. + +@ignore +@c ??? To Lisp manual @vindex x-dnd-test-function @vindex x-dnd-known-types When a user drags something from another application over Emacs, that other @@ -822,26 +838,24 @@ which accepts drops if the type of the data to be dropped is present in @code{x-dnd-known-types} if you want Emacs to accept or reject drops based on some other criteria. -@vindex x-dnd-open-file-other-window - A file is normally opened in the window it is dropped on, but if you -prefer the file to be opened in a new window you can customize the variable -@code{x-dnd-open-file-other-window}. - @vindex x-dnd-types-alist If you want to change the way Emacs handles drop of different types -or add a new type, you shall customize @code{x-dnd-types-alist}. This -requires detailed knowledge of what types other applications use -for drag and drop. +or add a new type, customize @code{x-dnd-types-alist}. This requires +detailed knowledge of what types other applications use for drag and +drop. @vindex x-dnd-protocol-alist When an URL is dropped on Emacs it may be a file, but it may also be another URL type (ftp, http, etc.). Emacs first checks -@code{x-dnd-protocol-alist} to determine what to do with the URL. If there -is no match there and if @code{browse-url-browser-function} is an alist, -Emacs looks for a match there. If no match is found the text for the URL -is inserted. If you want to alter Emacs behaviour you can customize these -variables. +@code{x-dnd-protocol-alist} to determine what to do with the URL. If +there is no match there and if @code{browse-url-browser-function} is +an alist, Emacs looks for a match there. If no match is found the +text for the URL is inserted. If you want to alter Emacs behavior, +you can customize these variables. +@end ignore + The drag and drop protocols XDND, Motif and the +old KDE 1.x protocol are currently supported. @node Menu Bars @section Menu Bars @@ -873,20 +887,20 @@ menus. @cindex mode, Tool Bar @cindex icons, toolbar -The @dfn{tool bar} is a line (or multiple lines) of icons at the top -of the Emacs window. You can click on these icons with the mouse -to do various jobs. + The @dfn{tool bar} is a line (or lines) of icons at the top of the +Emacs window, just below the menu bar. You can click on these icons +with the mouse to do various jobs. -The global tool bar contains general commands. Some major modes + The global tool bar contains general commands. Some major modes define their own tool bars to replace it. A few ``special'' modes that are not designed for ordinary editing remove some items from the global tool bar. -Tool bars work only on a graphical display. The tool bar uses colored + Tool bars work only on a graphical display. The tool bar uses colored XPM icons if Emacs was built with XPM support. Otherwise, the tool bar uses monochrome icons (PBM or XBM format). -You can turn display of tool bars on or off with @kbd{M-x + You can turn display of tool bars on or off with @kbd{M-x tool-bar-mode}. @node Dialog Boxes From 3a55fb34563ce929adb80f6730e3b2cba989db6d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:30:48 +0000 Subject: [PATCH 555/560] (Sentences): Clarify. (Paragraphs): Explain M-a and blank lines. (Outline Mode): Clarify text and menu. (Hard and Soft Newlines): Mention use-hard-newlines. --- man/text.texi | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/man/text.texi b/man/text.texi index a83e78cc211..8eaa6178a8d 100644 --- a/man/text.texi +++ b/man/text.texi @@ -185,9 +185,9 @@ Kill back to the beginning of the sentence (@code{backward-kill-sentence}). The commands @kbd{M-a} and @kbd{M-e} (@code{backward-sentence} and @code{forward-sentence}) move to the beginning and end of the current sentence, respectively. They were chosen to resemble @kbd{C-a} and -@kbd{C-e}, which move to the beginning and end of a line. Unlike them, -@kbd{M-a} and @kbd{M-e} if repeated or given numeric arguments move over -successive sentences. +@kbd{C-e}, which move to the beginning and end of a line. Unlike +them, @kbd{M-a} and @kbd{M-e} move over successive sentences if +repeated. Moving backward over a sentence places point just before the first character of the sentence; moving forward places point right after the @@ -238,11 +238,10 @@ set @code{sentence-end} to this value: @end example @noindent -You should also set the variable @code{sentence-end-double-space} to -@code{nil} so that the fill commands expect and leave just one space at -the end of a sentence. Note that this makes it impossible to -distinguish between periods that end sentences and those that indicate -abbreviations. +This is what setting the variable @code{sentence-end-double-space} to +@code{nil} automatically does. But note that this makes it impossible +to distinguish between periods that end sentences and those that +indicate abbreviations. @node Paragraphs @section Paragraphs @@ -269,8 +268,8 @@ paragraph, while @kbd{M-@}} moves to the end of the current or next paragraph. Blank lines and text-formatter command lines separate paragraphs and are not considered part of any paragraph. In Indented Text mode, but not in Text mode, an indented line also starts a new -paragraph. (If a paragraph is preceded by a blank line, these -commands treat that blank line as the beginning of the paragraph.) +paragraph. If there is a blank line before the paragraph, @kbd{M-@{} +moves to the blank line, because that is convenient in practice. In major modes for programs, paragraphs begin and end only at blank lines. This makes the paragraph commands continue to be useful even @@ -894,11 +893,11 @@ invisible so that you can see the outline structure. Type @kbd{M-x outline-mode} to switch to Outline mode as the major mode of the current buffer. - When Outline mode makes a line invisible, the line does not appear on -the screen. The screen appears exactly as if the invisible line were -deleted, except that an ellipsis (three periods in a row) appears at the -end of the previous visible line (only one ellipsis no matter how many -invisible lines follow). + When Outline mode makes a line invisible, the line does not appear +on the screen. The screen appears exactly as if the invisible line +were deleted, except that an ellipsis (three periods in a row) appears +at the end of the previous visible line. (Multiple consecutive +invisible lines produce just one ellipsis.) Editing commands that operate on lines, such as @kbd{C-n} and @kbd{C-p}, treat the text of the invisible line as part of the previous @@ -929,7 +928,7 @@ the hook @code{outline-mode-hook} (@pxref{Hooks}). outlines. * Visibility: Outline Visibility. Commands to control what is visible. * Views: Outline Views. Outlines and multiple views. -* Foldout:: Folding editing. +* Foldout:: Folding means zooming in on outlines. @end menu @node Outline Format @@ -1900,8 +1899,11 @@ for more information about text properties. @cindex soft newline @cindex newlines, hard and soft +@cindex use-hard-newlines In formatted text, Emacs distinguishes between two different kinds of -newlines, @dfn{hard} newlines and @dfn{soft} newlines. +newlines, @dfn{hard} newlines and @dfn{soft} newlines. (You can enable +or disable this feature separately in any buffer with the command +@code{use-hard-newlines}.) Hard newlines are used to separate paragraphs, or items in a list, or anywhere that there should always be a line break regardless of the From a08ff74cc5fe89edb73e3310a8f5b5249ab7db5a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:31:56 +0000 Subject: [PATCH 556/560] (Basic Window): Mention color-change in mode line. (Change Window): Explain dragging vertical boundaries. --- man/windows.texi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/man/windows.texi b/man/windows.texi index 8416c4be076..0d90a3b2e0c 100644 --- a/man/windows.texi +++ b/man/windows.texi @@ -60,8 +60,8 @@ only one mark position. Each window has its own mode line, which displays the buffer name, modification status and major and minor modes of the buffer that is -displayed in the window. @xref{Mode Line}, for full details on the mode -line. +displayed in the window. The selected window's mode line appears in a +different color. @xref{Mode Line}, for full details on the mode line. @iftex @break @@ -322,9 +322,14 @@ except for the echo area. @kbd{Mouse-3}, and delete all the windows in a frame except one window by clicking on that window's mode line with @kbd{Mouse-2}. - The easiest way to adjust window heights is with a mouse. If you -press @kbd{Mouse-1} on a mode line, you can drag that mode line up or -down, changing the heights of the windows above and below it. + You can also adjust window heights and widths with the mouse. If +you press @kbd{Mouse-1} on a mode line, you can drag that mode line up +or down, changing the heights of the windows above and below it. If +you press it on the divider between two consecutive mode lines, you +can drag that divider right or left, changing the widths of the +windows to either side. Note that changing heights and widths with +the mouse never deletes windows, it just refuses to make any window +smaller than it can be. @kindex C-x ^ @findex enlarge-window From 3997118842c31d87ccb53ad06707280cb89184af Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:33:52 +0000 Subject: [PATCH 557/560] (Fbury_buffer): Doc fix. --- src/buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/buffer.c b/src/buffer.c index a5099fc2487..ae390ba7500 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1952,6 +1952,7 @@ DEFUN ("bury-buffer", Fbury_buffer, Sbury_buffer, 0, 1, "", doc: /* Put BUFFER at the end of the list of all buffers. There it is the least likely candidate for `other-buffer' to return; thus, the least likely buffer for \\[switch-to-buffer] to select by default. +You can specify a buffer name as BUFFER, or an actual buffer object. If BUFFER is nil or omitted, bury the current buffer. Also, if BUFFER is nil or omitted, remove the current buffer from the selected window if it is displayed there. */) From 85424dea001dd2518ffa7367cae3e9d51f3f7810 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:35:28 +0000 Subject: [PATCH 558/560] (echo_area_display): Clear echo_message_buffer. --- src/xdisp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index c09ae2b2ef1..db4b2a244ac 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8086,6 +8086,8 @@ echo_area_display (update_frame_p) /* Last displayed message is now the current message. */ echo_area_buffer[1] = echo_area_buffer[0]; + /* Inform read_char that we're not echoing. */ + echo_message_buffer = Qnil; /* Prevent redisplay optimization in redisplay_internal by resetting this_line_start_pos. This is done because the mini-buffer now From 799775ff761dae4cc360b2bc273949ef76c29395 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:36:15 +0000 Subject: [PATCH 559/560] (x_error_quitter): On GCC 3 and up, specify noinline. --- src/xterm.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 2db3379a264..f047c255c69 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7770,10 +7770,18 @@ x_error_handler (display, error) It kills all frames on the display that we got the error for. If that was the only one, it prints an error message and kills Emacs. */ -/* It is after x_error_handler so that it won't get inlined in - x_error_handler. */ +/* .gdbinit puts a breakpoint here, so make sure it is not inlined. */ -static void +#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ +#define NO_INLINE __attribute__((noinline)) +#else +#define NO_INLINE +#endif + +/* On older GCC versions, just putting x_error_quitter + after x_error_handler prevents inlining into the former. */ + +static void NO_INLINE x_error_quitter (display, error) Display *display; XErrorEvent *error; From 4e07258f2b539fa9a3ba97442e81e3e67a9ce5a7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Feb 2005 07:39:01 +0000 Subject: [PATCH 560/560] *** empty log message *** --- admin/FOR-RELEASE | 20 ++++++++++---------- etc/NEWS | 27 ++++++++++++++------------- etc/TODO | 3 +++ lisp/ChangeLog | 10 +++++++++- lispref/ChangeLog | 47 +++++++++++++++++++++++++++++++++++++++++++++-- man/ChangeLog | 40 +++++++++++++++++++++++++++++++++++++++- src/ChangeLog | 8 ++++++++ 7 files changed, 128 insertions(+), 27 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index be844766439..facce8ec9a7 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -181,7 +181,7 @@ SECTION READERS man/abbrevs.texi man/anti.texi man/basic.texi "Luc Teirlinck" -man/buffers.texi "Luc Teirlinck" +man/buffers.texi "Luc Teirlinck" Chong Yidong man/building.texi "Ted Zlatanov" man/calendar.texi Joakim Verona man/cmdargs.texi @@ -191,9 +191,9 @@ man/dired.texi man/display.texi "Luc Teirlinck" man/emacs.texi "Luc Teirlinck" man/entering.texi "Luc Teirlinck" -man/files.texi "Luc Teirlinck" +man/files.texi "Luc Teirlinck" Chong Yidong man/fixit.texi "Luc Teirlinck" -man/frames.texi "Luc Teirlinck" +man/frames.texi "Luc Teirlinck" Chong Yidong man/glossary.texi man/help.texi "Luc Teirlinck" man/indent.texi "Luc Teirlinck" @@ -215,9 +215,9 @@ man/rmail.texi man/screen.texi "Luc Teirlinck" man/search.texi "Luc Teirlinck" man/sending.texi -man/text.texi "Luc Teirlinck" +man/text.texi "Luc Teirlinck" Chong Yidong man/trouble.texi -man/windows.texi "Luc Teirlinck" +man/windows.texi "Luc Teirlinck" Chong Yidong man/xresources.texi ** Check the Emacs Lisp manual. @@ -233,7 +233,7 @@ lispref/abbrevs.texi "Luc Teirlinck" lispref/advice.texi Joakim Verona lispref/anti.texi lispref/backups.texi "Luc Teirlinck" -lispref/buffers.texi "Luc Teirlinck" +lispref/buffers.texi "Luc Teirlinck" Chong Yidong lispref/calendar.texi Joakim Verona lispref/commands.texi "Luc Teirlinck" lispref/compile.texi "Luc Teirlinck" @@ -245,8 +245,8 @@ lispref/edebug.texi lispref/elisp.texi "Luc Teirlinck" lispref/errors.texi "Luc Teirlinck" lispref/eval.texi "Luc Teirlinck" -lispref/files.texi "Luc Teirlinck" -lispref/frames.texi "Luc Teirlinck" +lispref/files.texi "Luc Teirlinck" Chong Yidong +lispref/frames.texi "Luc Teirlinck" Chong Yidong lispref/functions.texi "Luc Teirlinck" lispref/hash.texi "Luc Teirlinck" lispref/help.texi "Luc Teirlinck" @@ -274,10 +274,10 @@ lispref/streams.texi "Luc Teirlinck" lispref/strings.texi "Luc Teirlinck" lispref/symbols.texi "Luc Teirlinck" lispref/syntax.texi "Luc Teirlinck" -lispref/text.texi +lispref/text.texi Chong Yidong lispref/tips.texi "Luc Teirlinck" lispref/variables.texi "Luc Teirlinck" -lispref/windows.texi "Luc Teirlinck" +lispref/windows.texi "Luc Teirlinck" Chong Yidong Local variables: diff --git a/etc/NEWS b/etc/NEWS index 21601767c6d..b031f5ff986 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -126,22 +126,23 @@ character is used every few digits, making it easier to see byte boundries etc. For more info, see the documentation of the variable `calculator-radix-grouping-mode'. ++++ ** You can now follow links by clicking Mouse-1 on the link. Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2 click to follow a link, whereas most other applications use a Mouse-1 click for both purposes, depending on whether you click outside or -inside a link. With release 21.4, the behaviour of a Mouse-1 click -has been changed to match this context-sentitive dual behaviour. +inside a link. Now the behavior of a Mouse-1 click has been changed +to match this context-sentitive dual behavior. Depending on the current mode, a Mouse-2 click in Emacs may do much -more than just follow a link, so the new Mouse-1 behaviour is only +more than just follow a link, so the new Mouse-1 behavior is only activated for modes which explicitly mark a clickable text as a "link" -(see the new function `mouse-on-link-p' for details). The lisp +(see the new function `mouse-on-link-p' for details). The Lisp packages that are included in release 21.4 have been adapted to do this, but external packages may not yet support this. However, there is no risk in using such packages, as the worst thing that could -happen is that you get the original Mouse-1 behaviour when you click +happen is that you get the original Mouse-1 behavior when you click on a link, which typically means that you set point where you click. If you want to get the original Mouse-1 action also inside a link, you @@ -152,7 +153,7 @@ you release it). Dragging the Mouse-1 inside a link still performs the original drag-mouse-1 action, typically copy the text. -You can customize the new Mouse-1 behaviour via the new user option +You can customize the new Mouse-1 behavior via the new user option `mouse-1-click-follows-link'. +++ @@ -476,7 +477,7 @@ Instead, the newline now "overflows" into the right fringe, and the cursor will be displayed in the fringe when positioned on that newline. The new user option 'overflow-newline-into-fringe' may be set to nil to -revert to the old behaviour of continuing such lines. +revert to the old behavior of continuing such lines. +++ ** The buffer boundaries (i.e. first and last line in the buffer) may @@ -1538,7 +1539,7 @@ directory listing into a buffer. ** Unexpected yanking of text due to accidental clicking on the mouse wheel button (typically mouse-2) during wheel scrolling is now avoided. -This behaviour can be customized via the mouse-wheel-click-event and +This behavior can be customized via the mouse-wheel-click-event and mouse-wheel-inhibit-click-time variables. +++ @@ -2370,7 +2371,7 @@ before calling it, if used while defining a macro. In addition, when ending or calling a macro with C-x e, the macro can be repeated immediately by typing just the `e'. You can customize -this behaviour via the variable kmacro-call-repeat-key and +this behavior via the variable kmacro-call-repeat-key and kmacro-call-repeat-with-arg. Keyboard macros can now be debugged and edited interactively. @@ -3152,7 +3153,7 @@ created and can be changed later by `set-process-filter-multibyte'. buffer is multibyte, the output of the process is at first converted to multibyte by `string-to-multibyte' then inserted in the buffer. Previously, it was converted to multibyte by `string-as-multibyte', -which was not compatible with the behaviour of file reading. +which was not compatible with the behavior of file reading. +++ ** New function `string-to-multibyte' converts a unibyte string to a @@ -3640,7 +3641,7 @@ elements with the following format: The `insert-for-yank' function looks for a yank-handler property on the first character on its string argument (typically the first element on the kill-ring). If a yank-handler property is found, -the normal behaviour of `insert-for-yank' is modified in various ways: +the normal behavior of `insert-for-yank' is modified in various ways: When FUNCTION is present and non-nil, it is called instead of `insert' to insert the string. FUNCTION takes one argument--the object to insert. @@ -3728,7 +3729,7 @@ speech synthesis. On some systems, when emacs reads the output from a subprocess, the output data is read in very small blocks, potentially resulting in -very poor performance. This behaviour can be remedied to some extent +very poor performance. This behavior can be remedied to some extent by setting the new variable process-adaptive-read-buffering to a non-nil value (the default), as it will automatically delay reading from such processes, to allowing them to produce more output before @@ -4242,7 +4243,7 @@ By default `unify-8859-on-encoding-mode' is turned on. If you want the old behavior, set selection-coding-system to compound-text, which may be significantly more efficient. Using compound-text-with-extensions seems to be necessary only for decoding -text from applications under XFree86 4.2, whose behaviour is actually +text from applications under XFree86 4.2, whose behavior is actually contrary to the compound text specification. diff --git a/etc/TODO b/etc/TODO index bca0f9a12cb..d37de9bc280 100644 --- a/etc/TODO +++ b/etc/TODO @@ -24,6 +24,9 @@ to the FSF. It should not generate :require. Or :require in defcustom should not be recorded in the user's custom-set-variables call. +** The buttons at the top of a custom buffer should not omit + variables whose values are currently hidden. + * Important features: ** Provide user-friendly ways to list all available font families, diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6390dc64b49..c7ab3fb44ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,17 @@ +2005-02-03 Richard M. Stallman + + * hi-lock.el (hi-lock-mode): Turning on Hi-Lock turns on Font-Lock. + +2005-02-03 Matt Hodges + + * faces.el (list-faces-display): Add optional argument. + 2005-02-02 Stefan Monnier * font-core.el (font-lock-default-function): Handle the rare case where only font-lock-keywords is set. -2005-02-03 Kenichi Handa +2005-02-02 Kenichi Handa * international/characters.el: Cancel previous change for I-WITH-DOT-ABOVE and DOTLESS-i. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index c327bfc9058..1d7f7c66ab1 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,8 +1,51 @@ -2005-01-31 Luc Teirlinck +2005-02-03 Richard M. Stallman + + * windows.texi (Basic Windows): Add cursor-in-non-selected-windows. + Clarify. + (Selecting Windows): Clarify save-selected-window. + (Cyclic Window Ordering): Clarify walk-windows. + (Window Point): Clarify. + (Window Start): Add comment to example. + (Resizing Windows): Add `interactive' specs in examples. + Document fit-window-to-buffer. + + * text.texi (User-Level Deletion): just-one-space takes numeric arg. + (Undo, Maintaining Undo): Clarify last change. + (Sorting): In sort-numeric-fields, explain about octal and hex. + Mention sort-numeric-base. + (Format Properties): Add xref for hard newlines. + + * frames.texi (Window Frame Parameters): Explain pixel=char on tty. + (Pop-Up Menus): Fix typo. + (Color Names): Explain all types of color names. + Explain color-values on B&W terminal. + (Text Terminal Colors): Explain "rgb values" are lists. Fix arg names. + + * files.texi (File Locks): Not supported on MS systems. + (Testing Accessibility): Clarify. + + * edebug.texi (Printing in Edebug): Fix edebug-print-circle. + (Coverage Testing): Fix typo. + + * commands.texi (Misc Events): Remove stray space. + + * buffers.texi (Buffer Names): Clarify generate-new-buffer-name. + (Modification Time): Clarify when visited-file-modtime returns 0. + (The Buffer List): Clarify bury-buffer. + (Killing Buffers): Clarify. + (Indirect Buffers): Add clone-indirect-buffer. + +2005-02-02 Matt Hodges + + * edebug.texi (Printing in Edebug): Fix default value of + edebug-print-circle. + (Coverage Testing): Fix displayed frequency count data. + +2005-02-02 Luc Teirlinck * text.texi (Maintaining Undo): Add `undo-outer-limit'. -2005-02-01 Kim F. Storm +2005-02-02 Kim F. Storm * text.texi (Undo) : Describe `apply' elements. diff --git a/man/ChangeLog b/man/ChangeLog index 2559bdfaa61..ca46664fe39 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,4 +1,42 @@ -2005-01-31 Luc Teirlinck +2005-02-03 Richard M. Stallman + + * windows.texi (Basic Window): Mention color-change in mode line. + (Change Window): Explain dragging vertical boundaries. + + * text.texi (Sentences): Clarify. + (Paragraphs): Explain M-a and blank lines. + (Outline Mode): Clarify text and menu. + (Hard and Soft Newlines): Mention use-hard-newlines. + + * frames.texi (Frames): Delete unnecessary mention of Windows. + (Mouse Commands): Likewise. Mention xterm mouse support. + (Clipboard): Clarify. + (Mouse References): Mention use of Mouse-1 for following links. + (Menu Mouse Clicks): Clarify. + (Mode Line Mouse): Clarify. + (Drag and Drop): Rewrite. + + * fixit.texi (Spelling): Fix typo. + + * files.texi (File Names): Clarify. + (Visiting): Update conditions for use of file dialog. Clarify. + (Saving): Doc d as answer in save-some-buffers. + (Remote Files): Clean up the text. + + * dired.texi (Misc Dired Commands): Delete dired-marked-files. + + * buffers.texi (Select Buffer): Doc next-buffer and prev-buffer. + (List Buffers): Clarify. + (Several Buffers): Doc T command. + (Buffer Convenience): Clarify menu. + + * basic.texi (Undo): Clarify last change. + +2005-02-02 Matt Hodges + + * fixit.texi (Spelling): Fix typo. + +2005-02-01 Luc Teirlinck * basic.texi (Undo): Update description of `undo-outer-limit'. diff --git a/src/ChangeLog b/src/ChangeLog index 4dcf9208643..6dd4211364f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2005-02-03 Richard M. Stallman + + * xterm.c (x_error_quitter): On GCC 3 and up, specify noinline. + + * xdisp.c (echo_area_display): Clear echo_message_buffer. + + * buffer.c (Fbury_buffer): Doc fix. + 2005-02-02 Steven Tamm * macfns.c (unwind_create_frame): Fixing compile error due to