changeset 83042:968e8c7ff1f4

Merged in changes from CVS HEAD Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-103 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-82
author Karoly Lorentey <lorentey@elte.hu>
date Thu, 19 Feb 2004 13:25:32 +0000
parents 94b1d2cd8189 (current diff) 4dcd34f2c3a7 (diff)
children 78a785f205ea
files lisp/ChangeLog man/info.texi src/xdisp.c
diffstat 11 files changed, 81 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Feb 19 02:27:31 2004 +0000
+++ b/lisp/ChangeLog	Thu Feb 19 13:25:32 2004 +0000
@@ -1,3 +1,17 @@
+2004-02-18  Markus Rost  <rost@mathematik.uni-bielefeld.de>
+
+	* progmodes/executable.el (executable-command-find-posix-p):  Fix
+	choice of the directory.
+
+2004-02-17  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* simple.el (interprogram-cut-function)
+	(interprogram-paste-function, kill-new, kill-append):
+	Doc fixes.
+	(kill-region): Make it return nil.  Doc fix.
+	(yank-pop): Make its argument optional.
+	(yank): Make ARG `-' equivalent to `-1'.
+
 2004-02-17  Eli Zaretskii  <eliz@elta.co.il>
 
 	* mail/rmail.el (rmail-get-new-mail): Don't reference
--- a/lisp/progmodes/executable.el	Thu Feb 19 02:27:31 2004 +0000
+++ b/lisp/progmodes/executable.el	Thu Feb 19 13:25:32 2004 +0000
@@ -145,12 +145,8 @@
   "Check if PROGRAM handles arguments Posix-style.
 If PROGRAM is non-nil, use that instead of \"find\"."
   ;;  Pick file to search from location we know
-  (let* ((dir   (car load-path))
-         (file  (find-if
-                 (lambda (x)
-                   ;; Filter directories . and ..
-                   (not (string-match "^\\.\\.?$" x)))
-                 (directory-files dir))))
+  (let* ((dir (file-truename data-directory))
+         (file (car (directory-files dir nil "^[^.]"))))
     (with-temp-buffer
       (call-process (or program "find")
                     nil
--- a/lisp/simple.el	Thu Feb 19 02:27:31 2004 +0000
+++ b/lisp/simple.el	Thu Feb 19 13:25:32 2004 +0000
@@ -505,7 +505,7 @@
       (save-excursion
 	(save-restriction
 	  (widen)
-	  (message "line %d (narrowed line %d)" 
+	  (message "line %d (narrowed line %d)"
 		   (+ n (line-number-at-pos start) -1) n))))))
 
 (defun count-lines (start end)
@@ -1779,8 +1779,8 @@
 The function takes one or two arguments.
 The first argument, TEXT, is a string containing
 the text which should be made available.
-The second, PUSH, if non-nil means this is a \"new\" kill;
-nil means appending to an \"old\" kill.")
+The second, optional, argument PUSH, has the same meaning as the
+similar argument to `x-set-cut-buffer', which see.")
 
 (defvar interprogram-paste-function nil
   "Function to call to get text cut from other programs.
@@ -1793,7 +1793,8 @@
 The function should be called with no arguments.  If the function
 returns nil, then no other program has provided such text, and the top
 of the Emacs kill ring should be used.  If the function returns a
-string, that string should be put in the kill ring as the latest kill.
+string, then the caller of the function \(usually `current-kill')
+should put this string in the kill ring as the latest kill.
 
 Note that the function should return a string only if a program other
 than Emacs has provided a string for pasting; if Emacs provided the
@@ -1834,7 +1835,7 @@
 Optional third arguments YANK-HANDLER controls how the STRING is later
 inserted into a buffer; see `insert-for-yank' for details.
 When a yank handler is specified, STRING must be non-empty (the yank
-handler is stored as a `yank-handler' text property on STRING).
+handler, if non-nil, is stored as a `yank-handler' text property on STRING).
 
 When the yank handler has a non-nil PARAM element, the original STRING
 argument is not used by `insert-for-yank'.  However, since Lisp code
@@ -1861,11 +1862,12 @@
 (defun kill-append (string before-p &optional yank-handler)
   "Append STRING to the end of the latest kill in the kill ring.
 If BEFORE-P is non-nil, prepend STRING to the kill.
-Optional third argument YANK-HANDLER specifies the yank-handler text
-property to be set on the combined kill ring string.  If the specified
-yank-handler arg differs from the yank-handler property of the latest
-kill string, this function adds the combined string to the kill
-ring as a new element, instead of replacing the last kill with it.
+Optional third argument YANK-HANDLER, if non-nil, specifies the
+yank-handler text property to be set on the combined kill ring
+string.  If the specified yank-handler arg differs from the
+yank-handler property of the latest kill string, this function
+adds the combined string to the kill ring as a new element,
+instead of replacing the last kill with it.
 If `interprogram-cut-function' is set, pass the resulting kill to it."
   (let* ((cur (car kill-ring)))
     (kill-new (if before-p (concat string cur) (concat cur string))
@@ -1934,8 +1936,9 @@
 the text killed this time appends to the text killed last time
 to make one entry in the kill ring.
 
-In Lisp code, optional third arg YANK-HANDLER specifies the yank-handler
-text property to be set on the killed text.  See `insert-for-yank'."
+In Lisp code, optional third arg YANK-HANDLER, if non-nil,
+specifies the yank-handler text property to be set on the killed
+text.  See `insert-for-yank'."
   (interactive "r")
   (condition-case nil
       (let ((string (delete-and-extract-region beg end)))
@@ -1945,7 +1948,8 @@
 	      (kill-append string (< end beg) yank-handler)
 	    (kill-new string nil yank-handler)))
 	(when (or string (eq last-command 'kill-region))
-	  (setq this-command 'kill-region)))
+	  (setq this-command 'kill-region))
+	nil)
     ((buffer-read-only text-read-only)
      ;; The code above failed because the buffer, or some of the characters
      ;; in the region, are read-only.
@@ -1957,7 +1961,7 @@
      (setq this-command 'kill-region)
      ;; This should barf, if appropriate, and give us the correct error.
      (if kill-read-only-ok
-	 (message "Read only text copied to kill ring")
+	 (progn (message "Read only text copied to kill ring") nil)
        ;; Signal an error if the buffer is read-only.
        (barf-if-buffer-read-only)
        ;; If the buffer isn't read-only, the text is.
@@ -2051,7 +2055,7 @@
 the value of the mark and point; it is guaranteed that START <= END.
 Normally set from the UNDO element of a yank-handler; see `insert-for-yank'.")
 
-(defun yank-pop (arg)
+(defun yank-pop (&optional arg)
   "Replace just-yanked stretch of killed text with a different stretch.
 This command is allowed only immediately after a `yank' or a `yank-pop'.
 At such a time, the region contains a stretch of reinserted
@@ -2068,6 +2072,7 @@
   (if (not (eq last-command 'yank))
       (error "Previous command was not a yank"))
   (setq this-command 'yank)
+  (unless arg (setq arg 1))
   (let ((inhibit-read-only t)
 	(before (< (point) (mark t))))
     (if before
@@ -2103,7 +2108,7 @@
   (push-mark (point))
   (insert-for-yank (current-kill (cond
 				  ((listp arg) 0)
-				  ((eq arg '-) -1)
+				  ((eq arg '-) -2)
 				  (t (1- arg)))))
   (if (consp arg)
       ;; This is like exchange-point-and-mark, but doesn't activate the mark.
--- a/lispref/ChangeLog	Thu Feb 19 02:27:31 2004 +0000
+++ b/lispref/ChangeLog	Thu Feb 19 13:25:32 2004 +0000
@@ -1,3 +1,11 @@
+2004-02-17  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* markers.texi (Marker Insertion Types): Minor change.
+
+	* locals.texi (Standard Buffer-Local Variables):
+	* commands.texi (Interactive Codes, Using Interactive):
+	* functions.texi (Related Topics): Fix xrefs.
+
 2004-02-16  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* lists.texi (Sets And Lists): Update description of delete-dups.
--- a/lispref/commands.texi	Thu Feb 19 02:27:31 2004 +0000
+++ b/lispref/commands.texi	Thu Feb 19 13:25:32 2004 +0000
@@ -239,9 +239,8 @@
 @var{function} is a command (@pxref{Interactive Call}), the value is a
 list of the form @code{(interactive @var{spec})}, where @var{spec} is
 the descriptor specification used by the command's @code{interactive}
-form to compute the function's arguments (@pxref{Using Interactive}).
-If @var{function} is not a command, @code{interactive-form} returns
-@code{nil}.
+form to compute the function's arguments.  If @var{function} is not a
+command, @code{interactive-form} returns @code{nil}.
 @end defun
 
 @node Interactive Codes
@@ -328,7 +327,7 @@
 
 @item D
 A directory name.  The default is the current default directory of the
-current buffer, @code{default-directory} (@pxref{System Environment}).
+current buffer, @code{default-directory} (@pxref{File Name Expansion}).
 Existing, Completion, Default, Prompt.
 
 @item e
--- a/lispref/functions.texi	Thu Feb 19 02:27:31 2004 +0000
+++ b/lispref/functions.texi	Thu Feb 19 13:25:32 2004 +0000
@@ -1320,7 +1320,7 @@
 See @ref{Calling Functions}.
 
 @item indirect-function
-See @ref{Definition of indirect-function}.
+See @ref{Function Indirection}.
 
 @item interactive
 See @ref{Using Interactive}.
@@ -1341,7 +1341,7 @@
 See @ref{Mapping Functions}.
 
 @item undefined
-See @ref{Key Lookup}.
+See @ref{Functions for Key Lookup}.
 @end table
 
 @ignore
--- a/lispref/locals.texi	Thu Feb 19 02:27:31 2004 +0000
+++ b/lispref/locals.texi	Thu Feb 19 13:25:32 2004 +0000
@@ -79,7 +79,7 @@
 @xref{Comments,,, emacs, The GNU Emacs Manual}.
 
 @item default-directory
-@xref{System Environment}.
+@xref{File Name Expansion}.
 
 @item defun-prompt-regexp
 @xref{List Motion}.
--- a/lispref/markers.texi	Thu Feb 19 02:27:31 2004 +0000
+++ b/lispref/markers.texi	Thu Feb 19 13:25:32 2004 +0000
@@ -326,10 +326,6 @@
 @code{insert-before-markers} ignores markers' insertion types, always
 relocating a marker to point after the inserted text.
 
-Most functions that create markers, without explicitly specifying an
-insertion type, create them with insertion type @code{nil}.  Also, the
-mark has, by default, insertion type @code{nil}.
-
 @defun set-marker-insertion-type marker type
 This function sets the insertion type of marker @var{marker} to
 @var{type}.  If @var{type} is @code{t}, @var{marker} will advance when
@@ -341,6 +337,10 @@
 This function reports the current insertion type of @var{marker}.
 @end defun
 
+Most functions that create markers, without explicitly specifying an
+insertion type, create them with insertion type @code{nil}.  Also, the
+mark has, by default, insertion type @code{nil}.
+
 @node Moving Markers
 @section Moving Marker Positions
 
--- a/man/info.texi	Thu Feb 19 02:27:31 2004 +0000
+++ b/man/info.texi	Thu Feb 19 13:25:32 2004 +0000
@@ -6,13 +6,12 @@
 @syncodeindex vr cp
 @syncodeindex ky cp
 @comment %**end of header
-@comment $Id: info.texi,v 1.37 2003/10/27 00:01:25 karl Exp $
 
 @copying
 This file describes how to use Info, the on-line, menu-driven GNU
 documentation system.
 
-Copyright (C) 1989, 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+Copyright (C) 1989, 1992, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 Free Software Foundation, Inc.
 
 @quotation
@@ -829,12 +828,16 @@
   The introductory course is almost over; please continue
 a little longer to learn some intermediate-level commands.
 
-  Most Info files have an index, which is actually a large node that
-contains nothing but a menu.  The menu has one menu item for each
-topic listed in the index.  You can find the index node from the main
-menu of the file, with the @kbd{m} command; then you can use the
-@kbd{m} command again in the index node to go to the node that
-describes the topic.
+  Most Info files have an index, which is actually a large node
+containing little but a menu.  The menu has one menu item for each
+topic listed in the index.  (As a special feature, menus for indices
+may also include the line number within the node of the index entry.
+This allows Info readers to go to the exact line of an entry, not just
+the start of the containing node.)
+
+  You can get to the index from the main menu of the file with the
+@kbd{m} command; then you can use the @kbd{m} command again in the
+index node to go to the node that describes the topic you want.
 
   There is also a short-cut Info command, @kbd{i}, which does all of
 that for you.  It searches the index for a given topic (a string) and
@@ -1046,7 +1049,7 @@
 looking for a description of a command, an option, or a key, just type
 their names when @kbd{i} prompts you for a topic.  For example, if you
 want to read the description of what the @kbd{C-f} key does, type
-@kbd{iC-f@key{RET}}.  Here @kbd{C-f} are 3 literal characters
+@kbd{i C - f @key{RET}}.  Here @kbd{C-f} are 3 literal characters
 @samp{C}, @samp{-}, and @samp{f}, not the ``Control-f'' command key
 you type inside Emacs to run the command bound to @kbd{C-f}.
 
--- a/src/ChangeLog	Thu Feb 19 02:27:31 2004 +0000
+++ b/src/ChangeLog	Thu Feb 19 13:25:32 2004 +0000
@@ -1,3 +1,8 @@
+2004-02-18  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (get_window_cursor_type, display_and_set_cursor):
+	Fix last change.
+
 2004-02-17  Kim F. Storm  <storm@cua.dk>
 
 	* xdisp.c (fast_find_position): Fix return value of new version;
--- a/src/xdisp.c	Thu Feb 19 02:27:31 2004 +0000
+++ b/src/xdisp.c	Thu Feb 19 13:25:32 2004 +0000
@@ -19028,9 +19028,9 @@
     cursor_type = get_specified_cursor_type (b->cursor_type, width);
 
   /* Use normal cursor if not blinked off.  */
-  if (!w->cursor_off_p && glyph != NULL)
-    {
-      if (glyph->type == IMAGE_GLYPH) {
+  if (!w->cursor_off_p)
+    {
+      if (glyph != NULL && glyph->type == IMAGE_GLYPH) {
 	if (cursor_type == FILLED_BOX_CURSOR)
 	  cursor_type = HOLLOW_BOX_CURSOR;
       }
@@ -19347,7 +19347,6 @@
   int new_cursor_type;
   int new_cursor_width;
   int active_cursor;
-  struct glyph_matrix *current_glyphs;
   struct glyph_row *glyph_row;
   struct glyph *glyph;
 
@@ -19365,11 +19364,7 @@
   if (!on && !w->phys_cursor_on_p)
     return;
 
-  current_glyphs = w->current_matrix;
-  glyph_row = MATRIX_ROW (current_glyphs, vpos);
-  glyph = (glyph_row->cursor_in_fringe_p ? NULL
-	   : glyph_row->glyphs[TEXT_AREA] + hpos);
-
+  glyph_row = MATRIX_ROW (w->current_matrix, vpos);
   /* If cursor row is not enabled, we don't really know where to
      display the cursor.  */
   if (!glyph_row->enabled_p)
@@ -19378,6 +19373,11 @@
       return;
     }
 
+  glyph = NULL;
+  if (!glyph_row->exact_window_width_line_p
+      || hpos < glyph_row->used[TEXT_AREA])
+    glyph = glyph_row->glyphs[TEXT_AREA] + hpos;
+
   xassert (interrupt_input_blocked);
 
   /* Set new_cursor_type to the cursor we want to be displayed.  */