changeset 83355:e0dbda31f619

Merged in changes from CVS trunk. (Testing my own CVS gateway.) Patches applied: * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-3 Update from CVS. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-395
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 05 Sep 2005 14:21:08 +0000
parents e506a3d30e62 (current diff) 6eb2fcfc3d29 (diff)
children df547ba04c0f
files admin/FOR-RELEASE lisp/ChangeLog lispref/ChangeLog man/ChangeLog src/xdisp.c
diffstat 13 files changed, 172 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/admin/FOR-RELEASE	Sun Sep 04 03:51:22 2005 +0000
+++ b/admin/FOR-RELEASE	Mon Sep 05 14:21:08 2005 +0000
@@ -33,10 +33,6 @@
 
 ** Update Speedbar.
 
-** Debug custom themes.
-
-** Get rid of the defadvice calls in org.el.
-
 * FATAL ERRORS
 
 ** Investigate reported crashes in compact_small_strings.
@@ -115,8 +111,6 @@
 
 * DOCUMENTATION
 
-** Document Custom Themes.
-
 ** Update man/info.texi.
 
 ** Add missing years in copyright notices of all files.
@@ -243,7 +237,7 @@
 lispref/help.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/hooks.texi	 Lute Kamstra
 lispref/internals.texi	 "Luc Teirlinck"   Chong Yidong
-lispref/intro.texi	 "Luc Teirlinck"
+lispref/intro.texi	 "Luc Teirlinck"   Josh Varner
 lispref/keymaps.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/lists.texi	 "Luc Teirlinck"   Chong Yidong
 lispref/loading.texi     "Luc Teirlinck"   Chong Yidong
--- a/lisp/ChangeLog	Sun Sep 04 03:51:22 2005 +0000
+++ b/lisp/ChangeLog	Mon Sep 05 14:21:08 2005 +0000
@@ -1,3 +1,15 @@
+2005-09-04  Chong Yidong  <cyd@stupidchicken.com>
+
+	* custom.el (load-theme): Renamed from require-theme.
+	Add interactive spec.
+	(enable-theme): Renamed from custom-enable-theme.
+	Add interactive spec.
+	(disable-theme): Renamed from custom-disable-theme.
+	Add interactive spec.
+	(custom-make-theme-feature): Doc fix.
+	(custom-theme-directory): Doc fix.
+	(provide-theme): Call enable-theme.
+
 2005-09-02  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* term/xterm.el (terminal-init-xterm): Add eval-when-compile to
--- a/lisp/custom.el	Sun Sep 04 03:51:22 2005 +0000
+++ b/lisp/custom.el	Mon Sep 05 14:21:08 2005 +0000
@@ -953,7 +953,7 @@
 
 This allows for a file-name convention for autoloading themes:
 Every theme X has a property `provide-theme' whose value is \"X-theme\".
-\(require-theme X) then attempts to load the file `X-theme.el'."
+\(load-theme X) then attempts to load the file `X-theme.el'."
   (intern (concat (symbol-name theme) "-theme")))
 
 ;;; Loading themes.
@@ -996,7 +996,7 @@
 	 "~/_emacs.d/"
       "~/.emacs.d/")
   "Directory in which Custom theme files should be written.
-`require-theme' searches this directory in addition to load-path.
+`load-theme' searches this directory in addition to load-path.
 The command `customize-create-theme' writes the files it produces
 into this directory."
   :type 'string
@@ -1031,11 +1031,11 @@
   ;; `user' must always be the highest-precedence enabled theme.
   ;; Make that remain true.  (This has the effect of making user settings
   ;; override the ones just loaded, too.)
-  (custom-enable-theme 'user))
+  (enable-theme 'user))
 
-(defun require-theme (theme)
+(defun load-theme (theme)
   "Try to load a theme's settings from its file.
-This also enables the theme; use `custom-disable-theme' to disable it."
+This also enables the theme; use `disable-theme' to disable it."
 
   ;; THEME's feature is stored in THEME's `theme-feature' property.
   ;; Usually the `theme-feature' property contains a symbol created
@@ -1043,6 +1043,7 @@
 
   ;; Note we do no check for validity of the theme here.
   ;; This allows to pull in themes by a file-name convention
+  (interactive "SCustom theme name: ")
   (let ((load-path (if (file-directory-p custom-theme-directory)
 		       (cons custom-theme-directory load-path)
 		     load-path)))
@@ -1070,12 +1071,12 @@
   (let ((themes-loaded (get by-theme 'theme-loads-themes)))
     (dolist (theme body)
       (cond ((and (consp theme) (eq (car theme) 'reset))
-	     (custom-disable-theme (cadr theme)))
+	     (disable-theme (cadr theme)))
 	    ((and (consp theme) (eq (car theme) 'hidden))
-	     (require-theme (cadr theme))
-	     (custom-disable-theme (cadr theme)))
+	     (load-theme (cadr theme))
+	     (disable-theme (cadr theme)))
 	    (t
-	     (require-theme theme)))
+	     (load-theme theme)))
       (push theme themes-loaded))
     (put by-theme 'theme-loads-themes themes-loaded)))
 
@@ -1087,10 +1088,11 @@
 
 ;;; Enabling and disabling loaded themes.
 
-(defun custom-enable-theme (theme)
+(defun enable-theme (theme)
   "Reenable all variable and face settings defined by THEME.
 The newly enabled theme gets the highest precedence (after `user').
 If it is already enabled, just give it highest precedence (after `user')."
+  (interactive "SEnable Custom theme: ")
   (let ((settings (get theme 'theme-settings)))
     (dolist (s settings)
       (let* ((prop (car s))
@@ -1104,11 +1106,12 @@
         (cons theme (delq theme custom-enabled-themes)))
   ;; `user' must always be the highest-precedence enabled theme.
   (unless (eq theme 'user)
-    (custom-enable-theme 'user)))
+    (enable-theme 'user)))
 
-(defun custom-disable-theme (theme)
+(defun disable-theme (theme)
   "Disable all variable and face settings defined by THEME.
 See `custom-known-themes' for a list of known themes."
+  (interactive "SDisable Custom theme: ")
   (let ((settings (get theme 'theme-settings)))
     (dolist (s settings)
       (let* ((prop (car s))
--- a/lispref/ChangeLog	Sun Sep 04 03:51:22 2005 +0000
+++ b/lispref/ChangeLog	Mon Sep 05 14:21:08 2005 +0000
@@ -1,3 +1,16 @@
+2005-09-03  Richard M. Stallman  <rms@gnu.org>
+
+	* tips.texi (Programming Tips): Add conventions for minibuffer
+	questions and prompts.
+
+2005-09-03  Joshua Varner  <jlvarner@gmail.com>  (tiny change)
+
+	* intro.texi (nil and t): Minor cleanup.
+	Delete spurious mention of keyword symbols.
+	(Evaluation Notation): Add index entry.
+	(A Sample Function Description): Minor cleanup.
+	(A Sample Variable Description): Not all vars can be set.
+
 2005-09-03  Thien-Thi Nguyen  <ttn@gnu.org>
 
 	* text.texi (Buffer Contents): Use "\n" in examples' result strings.
--- a/lispref/intro.texi	Sun Sep 04 03:51:22 2005 +0000
+++ b/lispref/intro.texi	Mon Sep 05 14:21:08 2005 +0000
@@ -197,7 +197,7 @@
 (not nil)                     ; @r{Emphasize the truth value @var{false}}
 @end example
 
-@cindex @code{t} and truth
+@cindex @code{t}, uses of
 @cindex true
   In contexts where a truth value is expected, any non-@code{nil} value
 is considered to be @var{true}.  However, @code{t} is the preferred way
@@ -209,14 +209,14 @@
   In Emacs Lisp, @code{nil} and @code{t} are special symbols that always
 evaluate to themselves.  This is so that you do not need to quote them
 to use them as constants in a program.  An attempt to change their
-values results in a @code{setting-constant} error.  The same is true of
-any symbol whose name starts with a colon (@samp{:}).  @xref{Constant
+values results in a @code{setting-constant} error.  @xref{Constant
 Variables}.
 
 @node Evaluation Notation
 @subsection Evaluation Notation
 @cindex evaluation notation
 @cindex documentation notation
+@cindex notation
 
   A Lisp expression that you can evaluate is called a @dfn{form}.
 Evaluating a form always produces a result, which is a Lisp object.  In
@@ -355,11 +355,11 @@
 arguments default to @code{nil}).  Do not write @code{&optional} when
 you call the function.
 
-  The keyword @code{&rest} (which must be followed by a single argument
-name) indicates that any number of arguments can follow.  The single
-following argument name will have a value, as a variable, which is a
-list of all these remaining arguments.  Do not write @code{&rest} when
-you call the function.
+  The keyword @code{&rest} (which must be followed by a single
+argument name) indicates that any number of arguments can follow.  The
+single argument name following @code{&rest} will receive, as its
+value, a list of all the remaining arguments passed to the function.
+Do not write @code{&rest} when you call the function.
 
   Here is a description of an imaginary function @code{foo}:
 
@@ -450,9 +450,9 @@
 @cindex variable descriptions
 @cindex option descriptions
 
-  A @dfn{variable} is a name that can hold a value.  Although any
-variable can be set by the user, certain variables that exist
-specifically so that users can change them are called @dfn{user
+  A @dfn{variable} is a name that can hold a value.  Although nearly
+all variables can be set by the user, certain variables exist
+specifically so that users can change them; these are called @dfn{user
 options}.  Ordinary variables and user options are described using a
 format like that for functions except that there are no arguments.
 
--- a/lispref/tips.texi	Sun Sep 04 03:51:22 2005 +0000
+++ b/lispref/tips.texi	Mon Sep 05 14:21:08 2005 +0000
@@ -374,6 +374,20 @@
 with a period.
 
 @item
+A question asked in the minibuffer with @code{y-or-n-p} or
+@code{yes-or-no-p} should start with a capital letter and end with
+@samp{? }.
+
+@item
+When you mention a default value in a minibuffer prompt,
+put it and the word @samp{default} inside parentheses.
+It should look like this:
+
+@example
+Enter the answer: (default 42)
+@end example
+
+@item
 In @code{interactive}, if you use a Lisp expression to produce a list
 of arguments, don't try to provide the ``correct'' default values for
 region or position arguments.  Instead, provide @code{nil} for those
--- a/man/ChangeLog	Sun Sep 04 03:51:22 2005 +0000
+++ b/man/ChangeLog	Mon Sep 05 14:21:08 2005 +0000
@@ -1,3 +1,12 @@
+2005-09-05  Chong Yidong  <cyd@stupidchicken.com>
+
+	* custom.texi (Custom Themes): New node.
+
+2005-09-03  Richard M. Stallman  <rms@gnu.org>
+
+	* search.texi (Search Case): Mention vars that control
+	case-fold-search for various operations.
+
 2005-08-30  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org.texi: Version 3.15.
--- a/man/custom.texi	Sun Sep 04 03:51:22 2005 +0000
+++ b/man/custom.texi	Mon Sep 05 14:21:08 2005 +0000
@@ -199,6 +199,8 @@
 * Face Customization::       How to edit the attributes of a face.
 * Specific Customization::   Making a customization buffer for specific
                                 variables, faces, or groups.
+* Custom Themes::            How to define collections of customized options
+                                that can be loaded and unloaded together.
 @end menu
 
 @node Customization Groups
@@ -652,6 +654,60 @@
 you have saved.  Use @kbd{M-x customize-customized} to look at the
 options that you have set but not saved.
 
+@node Custom Themes
+@subsection Customization Themes
+@cindex custom themes
+
+@dfn{Custom themes} are collections of customized options that can be
+enabled or disabled as a unit.  You can use Custom themes to switch
+quickly and easily between various collections of settings, and to
+transfer such collections from one computer to another.
+
+@findex customize-create-theme
+To define a Custom theme, use the command
+@kbd{M-x customize-create-theme}, which brings up a buffer named
+@samp{*New Custom Theme*}.  At the top of the buffer is an editable
+field where you can specify the name of the theme.  To add a
+customization option to the theme, click on the @samp{INS} button to
+open up a field where you can insert the name of the option.  The
+current value of that option is applied to the theme.  After adding as
+many options as you like, click on @samp{Done} to save the Custom
+theme.
+
+@vindex custom-theme-directory
+Saving a Custom theme named @var{foo} writes its definition into the
+file @file{@var{foo}-theme.el}, in the directory @file{~/.emacs.d/}
+(you can specify the directory by setting
+@code{custom-theme-directory}).
+
+@findex load-theme
+@findex enable-theme
+@findex disable-theme
+You can load the themes you've previously defined with the command
+@code{load-theme}.  It prompts for a theme name in the minibuffer,
+then loads that theme if it isn't already loaded.  It also
+@dfn{enables} the theme, which means putting its settings into effect.
+An enabled theme can be @dfn{disabled} with the command
+@kbd{M-x disable-theme}; this returns the options specified in the
+theme to their original values.  To re-enable the theme, use the
+command @kbd{M-x enable-theme}.
+
+To enable a Custom theme named @var{foo} whenever Emacs is started up,
+add the line @code{(load-theme '@var{foo})} to your @file{.emacs} file
+(@pxref{Init File}).
+
+Enabling a custom theme does not disable the themes already enabled;
+instead, they are all enabled together.  If two enabled Custom themes
+specify different values for an option, the last theme to be enabled
+takes effect.
+
+The options that you set in the ordinary customization buffer
+(@pxref{Easy Customization}) are also considered part of a Custom
+theme, called @samp{user}.  The @samp{user} theme is always enabled,
+and always takes precedence over all other enabled Custom themes.
+Additionally, the @samp{user} theme is recorded in your @file{.emacs}
+file, rather than a @file{user-theme.el} file.
+
 @node Variables
 @section Variables
 @cindex variable
--- a/man/search.texi	Sun Sep 04 03:51:22 2005 +0000
+++ b/man/search.texi	Mon Sep 05 14:21:08 2005 +0000
@@ -907,6 +907,12 @@
 (@pxref{Replace}) and the minibuffer history matching commands
 (@pxref{Minibuffer History}).
 
+  Several related variables control case-sensitivity of searching and
+matching for specific commands or activities.  For instance,
+@code{tags-case-fold-search} controls case sensitivity for
+@code{find-tag}.  To find these variables, do @kbd{M-x
+apropos-variable @key{RET} case-fold-search @key{RET}}.
+
 @node Replace
 @section Replacement Commands
 @cindex replacement
--- a/src/ChangeLog	Sun Sep 04 03:51:22 2005 +0000
+++ b/src/ChangeLog	Mon Sep 05 14:21:08 2005 +0000
@@ -1,3 +1,13 @@
+2005-09-03  Richard M. Stallman  <rms@gnu.org>
+
+	* xdisp.c (redisplay_internal): Make UPDATED as long as needed.
+	(move_it_in_display_line_to): Stop after last char on line even
+	on a windowing terminal, if that's the specified stop position.
+
+	* fns.c (Fsort): Doc fix.
+
+	* editfns.c (Fpropertize): Don't insist that properties be symbols.
+
 2005-09-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* dispnew.c (window_to_frame_hpos, update_window):
--- a/src/editfns.c	Sun Sep 04 03:51:22 2005 +0000
+++ b/src/editfns.c	Mon Sep 05 14:21:08 2005 +0000
@@ -3260,10 +3260,7 @@
   string = Fcopy_sequence (args[0]);
 
   for (i = 1; i < nargs; i += 2)
-    {
-      CHECK_SYMBOL (args[i]);
-      properties = Fcons (args[i], Fcons (args[i + 1], properties));
-    }
+    properties = Fcons (args[i], Fcons (args[i + 1], properties));
 
   Fadd_text_properties (make_number (0),
 			make_number (SCHARS (string)),
--- a/src/fns.c	Sun Sep 04 03:51:22 2005 +0000
+++ b/src/fns.c	Mon Sep 05 14:21:08 2005 +0000
@@ -1894,7 +1894,7 @@
        doc: /* Sort LIST, stably, comparing elements using PREDICATE.
 Returns the sorted list.  LIST is modified by side effects.
 PREDICATE is called with two elements of LIST, and should return non-nil
-if the first element is "less" than the second.  */)
+if the first element should sort before the second.  */)
      (list, predicate)
      Lisp_Object list, predicate;
 {
--- a/src/xdisp.c	Sun Sep 04 03:51:22 2005 +0000
+++ b/src/xdisp.c	Mon Sep 05 14:21:08 2005 +0000
@@ -5999,6 +5999,8 @@
 	     glyphs have the same width.  */
 	  int single_glyph_width = it->pixel_width / it->nglyphs;
 	  int new_x;
+	  int x_before_this_char = x;
+	  int hpos_before_this_char = it->hpos;
 
 	  for (i = 0; i < it->nglyphs; ++i, x = new_x)
 	    {
@@ -6030,8 +6032,22 @@
 		    {
 		      ++it->hpos;
 		      it->current_x = new_x;
+
+		      /* The character's last glyph just barely fits
+			 in this row.  */
 		      if (i == it->nglyphs - 1)
 			{
+			  /* If this is the destination position,
+			     return a position *before* it in this row,
+			     now that we know it fits in this row.  */
+			  if (BUFFER_POS_REACHED_P ())
+			    {
+			      it->hpos = hpos_before_this_char;
+			      it->current_x = x_before_this_char;
+			      result = MOVE_POS_MATCH_OR_ZV;
+			      break;
+			    }
+
 			  set_iterator_to_next (it, 1);
 #ifdef HAVE_WINDOW_SYSTEM
 			  if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
@@ -10600,9 +10616,13 @@
   if (consider_all_windows_p)
     {
       Lisp_Object tail, frame;
-      int i, n = 0, size = 50;
-      struct frame **updated
-	= (struct frame **) alloca (size * sizeof *updated);
+      int i, n = 0, size = 5;
+      struct frame **updated;
+
+      FOR_EACH_FRAME (tail, frame)
+	size++;
+
+      updated = (struct frame **) alloca (size * sizeof *updated);
 
       /* Recompute # windows showing selected buffer.  This will be
 	 incremented each time such a window is displayed.  */