]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs--devo--0
authorMiles Bader <miles@gnu.org>
Mon, 15 Oct 2007 05:03:21 +0000 (05:03 +0000)
committerMiles Bader <miles@gnu.org>
Mon, 15 Oct 2007 05:03:21 +0000 (05:03 +0000)
Patches applied:

 * emacs--devo--0  (patch 887-889)

   - Update from CVS
   - Merge from emacs--rel--22

 * emacs--rel--22  (patch 116-121)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-268

63 files changed:
admin/FOR-RELEASE
doc/emacs/ChangeLog
doc/emacs/display.texi
doc/emacs/files.texi
doc/lispref/ChangeLog
doc/lispref/commands.texi
doc/lispref/display.texi
doc/lispref/elisp.texi
doc/lispref/text.texi
etc/NEWS
lisp/ChangeLog
lisp/comint.el
lisp/cus-start.el
lisp/dired.el
lisp/emacs-lisp/advice.el
lisp/emacs-lisp/debug.el
lisp/emacs-lisp/edebug.el
lisp/emacs-lisp/ring.el
lisp/faces.el
lisp/files.el
lisp/frame.el
lisp/help-fns.el
lisp/loadhist.el
lisp/progmodes/ebrowse.el
lisp/progmodes/etags.el
lisp/progmodes/gdb-ui.el
lisp/progmodes/idlwave.el
lisp/progmodes/octave-mod.el
lisp/startup.el
lisp/textmodes/ispell.el
lisp/textmodes/reftex-sel.el
lisp/url/ChangeLog
lisp/url/url-auth.el
lisp/url/url-expand.el
lisp/url/url-util.el
lisp/woman.el
src/ChangeLog
src/buffer.c
src/ccl.c
src/data.c
src/dispextern.h
src/dispnew.c
src/editfns.c
src/eval.c
src/fontset.c
src/frame.c
src/image.c
src/intervals.c
src/keyboard.c
src/lisp.h
src/macfns.c
src/macmenu.c
src/macterm.c
src/msdos.c
src/w32fns.c
src/w32menu.c
src/w32term.c
src/window.c
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xmenu.c
src/xterm.c

index 56a9d3f9981eb34957aed5de955b0b754aec661a..8ad2fc3ae50e9dfa28728fa541c8a46b1b421b9c 100644 (file)
@@ -36,13 +36,6 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem.
 ** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem on Cygwin.
   (Did we decide that is unreproducible?)
 
-** set-frame-size for frame without minibuffer loses mode line
-Probably a Windows only bug.  Reported by Drew Adams on bug-gnu-emacs on
-2007-08-07.  It seems that the bug manifests itself only if resizing the
-frame makes the menu bar wrap before.  On 2007-08-16 Glenn Morris
-reported on emacs-devel that he was not able to reproduce the bug on a
-GNU/Linux system.
-
 * BUGS WAITING FOR MORE USER INPUT
 
 ** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process)
@@ -87,6 +80,9 @@ http://lists.gnu.org/archive/html/emacs-devel/2007-05/msg01339.html
 ** tromey@redhat.com: two View-mode "quit" bugs
 http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00103.html
 
+** rms: gnus-dired.el is a mistake.  Those features should not
+be part of Gnus.  They should be moved to some other part of Emacs.
+
 * DOCUMENTATION
 
 ** Check the Emacs Tutorial.
index 279a9a47ec34245f8ae2214cd6d27f19b70d5669..9d5e6158f3ff0d797f0d37286b1315fa2b0008bc 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-13  Eric S. Raymond  <esr@snark.thyrsus.com>
+
+       * files.texi: Capitalize node names according to convention.
+
 2007-10-13  Glenn Morris  <rgm@gnu.org>
 
        * misc.texi (Interactive Shell): Correct INSIDE_EMACS reference.
        * files.texi (Version Systems): Describe newer VCses.
        Reorder the descriptions to be chronological.
 
+2007-10-09  Richard Stallman  <rms@gnu.org>
+
+       * display.texi (Cursor Display): Correct how cursor appears
+       in nonselected windows.
+
 2007-10-04  Nick Roberts  <nickrob@snap.net.nz>
 
        * building.texi (GDB Graphical Interface): Remove references to gdba
index d4d2945d5842e373e3fac0ca3363309d10cb4ed0..5e1e0056592338c5b68b2153d2e5e6c205122814 100644 (file)
@@ -1116,12 +1116,12 @@ doesn't switch, so it uses the normal cursor.
 
 @cindex cursor in non-selected windows
 @vindex cursor-in-non-selected-windows
-  Normally, the cursor appears in non-selected windows in the ``off''
-state, with the same appearance as when the blinking cursor blinks
+  Normally, the cursor appears in non-selected windows without
+blinking, 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 variable @code{cursor-in-non-selected-windows} and assign
-it a @code{nil} value.
+customize the variable @code{cursor-in-non-selected-windows} and
+assign it a @code{nil} value.
 
 @vindex x-stretch-cursor
 @cindex wide block cursor
index 78c72dac330b4d240f7d0d60c45d151d5e52bd6d..80feaea234022a8de5d697b59f6166279154591a 100644 (file)
@@ -1595,15 +1595,15 @@ system, but is usually not excessive.
 @subsection Basic Editing under Version Control
 
 @menu
-* Selecting a fileset::          Choosing a set of files to operate on 
-* Doing the next logical thing:: Stepping forward in the development cycle
-* VC with a locking VCS::     RCS in its default mode, SCCS, and optionally CVS.
-* VC with a merging VCS::     Without locking: default mode for CVS.
-* Advanced C-x v v::    Advanced features available with a prefix argument.
-* Log Buffer::          Features available in log entry buffers.
+* Selecting A Fileset::    Choosing a set of files to operate on 
+* Doing The Right Thing::  Stepping forward in the development cycle
+* VC With A Locking VCS::  RCS in its default mode, SCCS, and optionally CVS.
+* VC With A Merging VCS::  Without locking: default mode for CVS.
+* Advanced C-x v v::       Advanced features available with a prefix argument.
+* Log Buffer::             Features available in log entry buffers.
 @end menu
 
-@node Selecting a fileset
+@node Selecting A Fileset
 @subsubsection Choosing the scope of your command
 
 @cindex filesets
@@ -1638,7 +1638,7 @@ marked files, but did not pass them to the version-control backends as
 a group.  Now it does, which enables VC to drive changeset-based
 version-control systems.
 
-@node Doing the next logical thing
+@node Doing The Right Thing
 @subsubsection Performing the next operation in the development cycle
 
   The principal VC command is an all-purpose command that performs
@@ -1667,7 +1667,7 @@ accidentally edit a file without properly checking it out first.  To
 achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only}
 in your @file{~/.emacs} file.  (@xref{Init Rebinding}.)
 
-@node VC with a locking VCS
+@node VC With A Locking VCS
 @subsubsection Basic Version Control with Locking
 
   If locking is used for the file (as with SCCS, and RCS in its default
@@ -1698,7 +1698,7 @@ formerly locked the file, to inform him of what has happened.
   These rules also apply when you use CVS in locking mode, except
 that there is no such thing as stealing a lock.
 
-@node VC with a merging VCS
+@node VC With A Merging VCS
 @subsubsection Basic Version Control with Merging
 
   When your version-control system is merging-based rather than
index 5c4f9159066aca89c8fd9625140e060225e5b0db..d95597e940b9a6e8e682fd6829b98ae78bfe1277 100644 (file)
@@ -1,3 +1,25 @@
+2007-10-13  Karl Berry  <karl@gnu.org>
+
+       * elisp.texi (@dircategory): Move to after @copying,
+       since we want @copying as close as possible to the beginning of
+       the output.
+
+2007-10-12  Richard Stallman  <rms@gnu.org>
+
+       * elisp.texi (Top): Add Distinguish Interactive to subnode menu.
+
+       * commands.texi (Distinguish Interactive): New node,
+       broken out from Interactive Call and rewritten.
+       (Command Loop): Put Distinguish Interactive in menu.
+
+2007-10-09  Richard Stallman  <rms@gnu.org>
+
+       * text.texi (Examining Properties): Mention overlay priority.
+
+       * display.texi (Display Margins): Correct the description
+       of margin display specifications.
+       (Replacing Specs): New subnode broken out of Display Property.
+
 2007-10-06  Juri Linkov  <juri@jurta.org>
 
        * text.texi (Filling): Document fill-paragraph-or-region.
index aaad7ca82a7e28c15e028ef0b40d093f90a6a9c9..cdd627f6b52127188f10bc01e8a0d4a2b841ee5a 100644 (file)
@@ -18,6 +18,7 @@ are done, and the subroutines that allow Lisp programs to do them.
 * Command Overview::    How the command loop reads commands.
 * Defining Commands::   Specifying how a function should read arguments.
 * Interactive Call::    Calling a command, so that it will read arguments.
+* Distinguish Interactive::     Making a command distinguish interactive calls.
 * Command Loop Info::   Variables set by the command loop for you to examine.
 * Adjusting Point::     Adjustment of point after a command.
 * Input Events::       What input looks like when you read it.
@@ -635,42 +636,74 @@ part of the prompt.
 @end example
 @end deffn
 
-@defun interactive-p
-This function returns @code{t} if the containing function (the one
-whose code includes the call to @code{interactive-p}) was called in
-direct response to user input.  This means that it was called with the
-function @code{call-interactively}, and that a keyboard macro is
-not running, and that Emacs is not running in batch mode.
+@node Distinguish Interactive
+@section Distinguish Interactive Calls
+
+  Sometimes a command should display additional visual feedback (such
+as an informative message in the echo area) for interactive calls
+only.  There are three ways to do this.  The recommended way to test
+whether the function was called using @code{call-interactively} is to
+give it an optional argument @code{print-message} and use the
+@code{interactive} spec to make it non-@code{nil} in interactive
+calls.  Here's an example:
+
+@example
+(defun foo (&optional print-message)
+  (interactive "p")
+  (when print-message
+    (message "foo")))
+@end example
+
+@noindent
+We use @code{"p"} because the numeric prefix argument is never
+@code{nil}.  Defined in this way, the function does display the
+message when called from a keyboard macro.
+
+  The above method with the additional argument is usually best,
+because it allows callers to say ``treat this call as interactive.''
+But you can also do the job in a simpler way by testing
+@code{called-interactively-p}.
+
+@defun called-interactively-p
+This function returns @code{t} when the calling function was called
+using @code{call-interactively}.
 
 If the containing function was called by Lisp evaluation (or with
 @code{apply} or @code{funcall}), then it was not called interactively.
 @end defun
 
-  The most common use of @code{interactive-p} is for deciding whether
-to give the user additional visual feedback (such as by printing an
-informative message).  For example:
+   Here's an example of using @code{called-interactively-p}:
 
 @example
 @group
-;; @r{Here's the usual way to use @code{interactive-p}.}
 (defun foo ()
   (interactive)
-  (when (interactive-p)
-    (message "foo")))
+  (when (called-interactively-p)
+    (message "foo"))
+  'haha)
      @result{} foo
 @end group
 
 @group
-;; @r{This function is just to illustrate the behavior.}
-(defun bar ()
-  (interactive)
-  (setq foobar (list (foo) (interactive-p))))
-     @result{} bar
+;; @r{Type @kbd{M-x foo}.}
+     @print{} foo
 @end group
 
 @group
-;; @r{Type @kbd{M-x foo}.}
-     @print{} foo
+(foo)
+     @result{} haha
+@end group
+@end example
+
+  Here is another example that contrasts direct and indirect
+calls to @code{called-interactively-p}.
+
+@example
+@group
+(defun bar ()
+  (interactive)
+  (setq foobar (list (foo) (called-interactively-p))))
+     @result{} bar
 @end group
 
 @group
@@ -684,31 +717,16 @@ foobar
 @end group
 @end example
 
-  If you want to test @emph{only} whether the function was called
-using @code{call-interactively}, add an optional argument
-@code{print-message} which should be non-@code{nil} in an interactive
-call, and use the @code{interactive} spec to make sure it is
-non-@code{nil}.  Here's an example:
-
-@example
-(defun foo (&optional print-message)
-  (interactive "p")
-  (when print-message
-    (message "foo")))
-@end example
-
-@noindent
-Defined in this way, the function does display the message when called
-from a keyboard macro.  We use @code{"p"} because the numeric prefix
-argument is never @code{nil}.
-
-@defun called-interactively-p
-This function returns @code{t} when the calling function was called
-using @code{call-interactively}.
+  If you want to treat commands run in keyboard macros just like calls
+from Lisp programs, test @code{interactive-p} instead of
+@code{called-interactively-p}.
 
-When possible, instead of using this function, you should use the
-method in the example above; that method makes it possible for a
-caller to ``pretend'' that the function was called interactively.
+@defun interactive-p
+This function returns @code{t} if the containing function (the one
+whose code includes the call to @code{interactive-p}) was called in
+direct response to user input.  This means that it was called with the
+function @code{call-interactively}, and that a keyboard macro is
+not running, and that Emacs is not running in batch mode.
 @end defun
 
 @node Command Loop Info
index 90d94dbe6b323691f060270603810a5492979fdd..4c9df9c5ede6ad9804848d4b82a06d1b80188a66 100644 (file)
@@ -3245,21 +3245,47 @@ to use the value specified by the frame.
 insert images into text, and also control other aspects of how text
 displays.  The value of the @code{display} property should be a
 display specification, or a list or vector containing several display
-specifications.  Display specifications generally apply in parallel to
-the text they cover.
+specifications.  Display specifications in the same @code{display}
+property value generally apply in parallel to the text they cover.
+
+  If several sources (overlays and/or a text property) specify values
+for the @code{display} property, only one of the values takes effect,
+following the rules of @code{get-char-property}.  @xref{Examining
+Properties}.
+
+  The rest of this section describes several kinds of
+display specifications and what they mean.
+
+@menu
+* Replacing Specs::      Display specs that replace the text.
+* Specified Space::      Displaying one space with a specified width.
+* Pixel Specification::  Specifying space width or height in pixels.
+* Other Display Specs::  Displaying an image; magnifying text; moving it
+                          up or down on the page; adjusting the width
+                          of spaces within text.
+* Display Margins::     Displaying text or images to the side of the main text.
+@end menu
+
+@node Replacing Specs
+@subsection Display Specs That Replace The Text
 
   Some kinds of @code{display} specifications specify something to
-display instead of the text that has the property.  If a list of
-display specifications includes more than one of this kind, the first
-is effective and the rest are ignored.  You cannot interactively move
-point into the middle of the text that is thus replaced.
-
-  For these specifications, ``the text that has the property'' means
-all the consecutive characters that have the same Lisp object as their
-@code{display} property; these characters are replaced as a single
-unit.  By contrast, characters that have similar but distinct Lisp
-objects as their @code{display} properties are handled separately.
-Here's a function that illustrates this point:
+display instead of the text that has the property.  These are called
+@dfn{replacing} display specifications.  Emacs does not allow the user
+to interactively move point into the middle of buffer text that is
+replaced in this way.
+
+  If a list of display specifications includes more than one replacing
+display specification, the first overrides the rest.  Replacing
+display specifications make most other display specifications
+irrelevant, since those don't apply to the replacement.
+
+  For replacing display specifications, ``the text that has the
+property'' means all the consecutive characters that have the same
+Lisp object as their @code{display} property; these characters are
+replaced as a single unit.  By contrast, characters that have similar
+but distinct Lisp objects as their @code{display} properties are
+handled separately.  Here's a function that illustrates this point:
 
 @smallexample
 (defun foo ()
@@ -3299,18 +3325,6 @@ object as the @code{display} property value, it's irrelevant
 whether they got this property from a single call to
 @code{put-text-property} or from two different calls.
 
-  The rest of this section describes several kinds of
-display specifications and what they mean.
-
-@menu
-* Specified Space::      Displaying one space with a specified width.
-* Pixel Specification::  Specifying space width or height in pixels.
-* Other Display Specs::  Displaying an image; magnifying text; moving it
-                          up or down on the page; adjusting the width
-                          of spaces within text.
-* Display Margins::     Displaying text or images to the side of the main text.
-@end menu
-
 @node Specified Space
 @subsection Specified Spaces
 @cindex spaces, specified height or width
@@ -3549,25 +3563,28 @@ string.
 @cindex display margins
 @cindex margins, display
 
-  A buffer can have blank areas called @dfn{display margins} on the left
-and on the right.  Ordinary text never appears in these areas, but you
-can put things into the display margins using the @code{display}
-property.
-
-  To put text in the left or right display margin of the window, use a
-display specification of the form @code{(margin right-margin)} or
-@code{(margin left-margin)} on it.  To put an image in a display margin,
-use that display specification along with the display specification for
-the image.  Unfortunately, there is currently no way to make
-text or images in the margin mouse-sensitive.
-
-  If you put such a display specification directly on text in the
-buffer, the specified margin display appears @emph{instead of} that
-buffer text itself.  To put something in the margin @emph{in
-association with} certain buffer text without preventing or altering
-the display of that text, put a @code{before-string} property on the
-text and put the display specification on the contents of the
-before-string.
+  A buffer can have blank areas called @dfn{display margins} on the
+left and on the right.  Ordinary text never appears in these areas,
+but you can put things into the display margins using the
+@code{display} property.  There is currently no way to make text or
+images in the margin mouse-sensitive.
+
+  The way to display something in the margins is to specify it in a
+margin display specification in the @code{display} property of some
+text.  This is a replacing display specification, meaning that the
+text you put it on does not get displayed; the margin display appears,
+but that text does not.
+
+  A margin display specification looks like @code{((margin
+right-margin) @var{spec}} or @code{((margin left-margin) @var{spec})}.
+Here, @var{spec} is another display specification that says what to
+display in the margin.  Typically it is a string of text to display,
+or an image descriptor.
+
+  To display something in the margin @emph{in association with}
+certain buffer text, without altering or preventing the display of
+that text, put a @code{before-string} property on the text and put the
+margin display specification on the contents of the before-string.
 
   Before the display margins can display anything, you must give
 them a nonzero width.  The usual way to do that is to set these
index 613bdbace38b09f2aa3c409b6a1483cc54f36079..8cd25ed59d33dab4b89ce32b2b7d167765315b3d 100644 (file)
@@ -9,11 +9,6 @@
 @set VERSION  2.9
 @set EMACSVER 23.0.50
 
-@dircategory Emacs
-@direntry
-* Elisp: (elisp).       The Emacs Lisp Reference Manual.
-@end direntry
-
 @c in general, keep the following line commented out, unless doing a
 @c copy of this manual that will be published.  The manual should go
 @c onto the distribution in the full, 8.5 x 11" size.
@@ -67,6 +62,11 @@ developing GNU and promoting software freedom.''
 @end quotation
 @end copying
 
+@dircategory Emacs
+@direntry
+* Elisp: (elisp).       The Emacs Lisp Reference Manual.
+@end direntry
+
 @titlepage
 @title GNU Emacs Lisp Reference Manual
 @subtitle For Emacs Version @value{EMACSVER}
@@ -639,6 +639,7 @@ Command Loop
 * Command Overview::    How the command loop reads commands.
 * Defining Commands::   Specifying how a function should read arguments.
 * Interactive Call::    Calling a command, so that it will read arguments.
+* Distinguish Interactive::     Making a command distinguish interactive calls.
 * Command Loop Info::   Variables set by the command loop for you to examine.
 * Adjusting Point::     Adjustment of point after a command.
 * Input Events::       What input looks like when you read it.
index c6da06b4a132eee46aaa593a3f1129beaeb66040..daaaf6c9b9de23e8c0dc7d9aae33c24b617cb178 100644 (file)
@@ -2619,13 +2619,13 @@ the @var{prop} property of that symbol.
 This function is like @code{get-text-property}, except that it checks
 overlays first and then text properties.  @xref{Overlays}.
 
-The argument @var{object} may be a string, a buffer, or a window.  If it
-is a window, then the buffer displayed in that window is used for text
-properties and overlays, but only the overlays active for that window
-are considered.  If @var{object} is a buffer, then all overlays in that
-buffer are considered, as well as text properties.  If @var{object} is a
-string, only text properties are considered, since strings never have
-overlays.
+The argument @var{object} may be a string, a buffer, or a window.  If
+it is a window, then the buffer displayed in that window is used for
+text properties and overlays, but only the overlays active for that
+window are considered.  If @var{object} is a buffer, then overlays in
+that buffer are considered first, in order of decreasing priority,
+followed by the text properties.  If @var{object} is a string, only
+text properties are considered, since strings never have overlays.
 @end defun
 
 @defun get-char-property-and-overlay position prop &optional object
index 4ecdca35c5277e0acf485edc904d558ffacb7e0d..21cb6b3ffffe16c07079221d2131f6f36e930495 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -120,6 +120,10 @@ following arguments.
 `transient-mark-mode' is turned on.  Otherwise, it fills the current
 paragraph.  The new command bound to M-q is `fill-paragraph-or-region'.
 
+** M-$ now checks spelling of the region if the region is active and
+`transient-mark-mode' is turned on.  Otherwise, it checks spelling of the
+word at point.
+
 ** TAB now indents the region if the region is active and
 `transient-mark-mode' is turned on.
 
index 3fe5e2994cfc0a3ffdd9ae98628a45a31bed8794..d3fde16c4fa346a57b71adf876b829d2d33a01e4 100644 (file)
@@ -1,3 +1,119 @@
+2007-10-14  Drew Adams  <drew.adams@oracle.com>
+
+       * emacs-lisp/ring.el (ring-convert-sequence-to-ring)
+       (ring-insert+extend, ring-remove+insert+extend, ring-member)
+       (ring-next, ring-previous): New functions.
+
+2007-10-14  Richard Stallman  <rms@gnu.org>
+
+       * emacs-lisp/advice.el (documentation): Advice deleted.
+       Doc for advised functions is now handled at C level.
+       This is now handled at C level.
+       (ad-stop-advice, ad-start-advice): Don't enable or disable
+       advice for `documentation'.
+       (ad-advised-definition-docstring-regexp): Var deleted.
+       (ad-make-advised-definition-docstring): Store orig name
+       as text property of string.
+       (ad-advised-definition-p): Check for text property of docstring.
+
+       * help-fns.el (describe-function-1): Find source of advised functions.
+
+2007-10-14  Juri Linkov  <juri@jurta.org>
+
+       * faces.el (describe-face): Allow handling a string as the face name.
+
+       * textmodes/ispell.el (ispell-word): Call `ispell-region' on the
+       active region in transient-mark-mode.
+       (ispell-region): Change messages displayed at the start and end of
+       the spell-checking to be the same.
+
+       * startup.el (fancy-startup-tail): Say exactly what does the button
+       dismiss ("Dismiss this startup screen").  Use text "Never show
+       it again" for the checkbox after this button.
+       (fancy-startup-screen, fancy-about-screen): Put point before the
+       first link, so the user can quickly select links with the keyboard.
+       (normal-mouse-startup-screen): Add more useful text describing how
+       to follow a link.
+
+2007-10-14  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/etags.el (select-tags-table): Disable undo in the
+       `*Tags Table List*' buffer.
+
+2007-10-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * dired.el (dired-warn-writable): New face.
+       (dired-warn-writable-face): New variable.
+       (dired-font-lock-keywords): Use dired-warn-writable-face, instead
+       of dired-warning-face, for group- and world-writable files.
+
+2007-10-13  Richard Stallman  <rms@gnu.org>
+
+       * files.el (directory-abbrev-alist): Doc fix.
+
+2007-10-13  Jari Aalto  <jari.aalto@cante.net>
+
+       * comint.el (comint-password-prompt-regexp): Add 'LDAP'.
+
+2007-10-12  Martin Rudalics  <rudalics@gmx.at>
+
+       * frame.el (set-frame-configuration): Assign name parameter only
+       if it has been set explicitly before.
+
+2007-10-11  Tom Tromey  <tromey@redhat.com>
+
+       * progmodes/gdb-ui.el (gdb-info-stack-custom): Ensure current
+       frame is visible.
+
+2007-10-10  Richard Stallman  <rms@gnu.org>
+
+       * emacs-lisp/debug.el (debugger-setup-buffer): Disable undo
+       in *Backtrace*.
+
+       * faces.el (face-font-selection-order): Doc fix.
+
+       * loadhist.el (unload-feature): Doc fix.
+
+2007-10-13  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/octave-mod.el (octave-looking-at-kw): Add doc string.
+       (octave-re-search-forward-kw, octave-re-search-backward-kw):
+       Add doc string, and an explicit COUNT argument.
+       (octave-scan-blocks, octave-beginning-of-defun): Explicitly pass
+       `inc' to search functions.
+
+       * faces.el (face-spec-set): When FRAME is nil, set the default for
+       new frames (restores pre-2007-09-17 behavior).  Doc fix.
+
+2007-10-13  John W. Eaton  <jwe@octave.org>
+
+       * progmodes/octave-mod.el (octave-looking-at-kw)
+       (octave-re-search-forward-kw, octave-re-search-backward-kw):
+       New functions.
+       (octave-in-defun-p, calculate-octave-indent)
+       (octave-blink-matching-block-open, octave-beginning-of-defun)
+       (octave-auto-fill): Use octave-looking-at-kw instead of looking-at,
+       to search for regexps that contain case-sensitive keywords.
+       (octave-beginning-of-defun): Likewise, for octave-re-search-backward-kw.
+       (octave-scan-blocks): Likewise, for octave-re-search-forward-kw.
+
+2007-10-13  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * frame.el (select-frame-set-input-focus): Fix typo
+       "max" -> "mac". Do not use a single clause cond.
+
+       * cus-start.el (all): Use test that does not match the X11 version
+       for mac.
+
+2007-10-13  Markus Gritsch  <m.gritsch@gmail.com>  (tiny change)
+
+       * progmodes/ebrowse.el (ebrowse-tree-mode): Disable undo in the
+       BROWSE buffer.
+
+2007-10-13  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * cus-start.el (all): Undo previous change.
+
 2007-10-13  Glenn Morris  <rgm@gnu.org>
 
        * woman.el (woman0-rename): Fix paren typo.
        (idlwave-sintern-keyword-list, idlwave-scan-user-lib-files)
        (idlwave-write-paths, idlwave-all-method-classes)
        (idlwave-all-method-keyword-classes, idlwave-entry-keywords)
-       (idlwave-fix-keywords, idlwave-display-calling-sequence):
+       (idlwave-fix-keywords, idlwave-display-calling-sequence)
+       (idlwave-complete-in-buffer):
        * textmodes/org.el (org-export-as-html, org-export-as-ascii)
-       (org-fast-tag-selection): Use mapc rather than mapcar.
+       (org-fast-tag-selection):
+       * textmodes/reftex-sel.el (reftex-select-item):  Use mapc rather
+       than mapcar.
 
 2007-10-13  Dan Nicolaescu  <dann@ics.uci.edu>
 
 
 2007-10-11  Eric S. Raymond  <esr@snark.thyrsus.com>
 
-       * vc.el (vc-diff, vc-diff-internal): Bug fixes by Juanma Barranquero.
-       Temporarily disable the check for his edge case, it's calling some
-       brittle code.
-       (with-vc-properties): Fievaluation time of a macro argument.
-
+       * vc.el (vc-diff):
+       (vc-diff-internal): Merge a patch by Juanma Barranquero.  Also,
+       emporarily disable the check for his edge case of
+       vc-diff (stopping it from grinding when callerd from $HOME), as
+       it's calling some brittle code in vc-hooks.el.
+       (with-vc-properties): Fix evaluation time of a macro argument.
        * ediff-vers.el (ediff-vc-internal):
        * vc-hooks.el:
        * loaddefs.el: Follow up on VC terminology change.
 
        * net/trampver.el: Update release number.
 
+2007-10-09  Richard Stallman  <rms@gnu.org>
+
+       * play/gamegrid.el (gamegrid-setup-default-font): Use face-spec-set.
+
 2007-10-09  Juanma Barranquero  <lekktu@gmail.com>
 
        * follow.el: Require easymenu.
index d08b20134264d1c6f1342c665603838bdf4f3642..623eef17327457fce652543e74663fa6afa4493f 100644 (file)
@@ -337,7 +337,7 @@ This variable is buffer-local."
 ;; Some implementations of passwd use "Password (again)" as the 2nd prompt.
 (defcustom comint-password-prompt-regexp
   "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\
-Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\
+Kerberos \\|CVS \\|UNIX \\| SMB \\|LDAP \\|^\\)\
 \[Pp]assword\\( (again)\\)?\\|\
 pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\
 \\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'"
index 53245d902ae11cab21516f5f5a657885b268eaf5..c6b0f269d1bb6ba526276c17c0a2099884c11f6e 100644 (file)
@@ -436,7 +436,7 @@ since it could result in memory overflow and make Emacs crash."
                      ((string-match "\\`w32-" (symbol-name symbol))
                       (eq system-type 'windows-nt))
                      ((string-match "\\`mac-" (symbol-name symbol))
-                      (eq window-system 'mac))
+                      (featurep 'mac-carbon))
                      ((string-match "\\`x-.*gtk" (symbol-name symbol))
                       (featurep 'gtk))
                      ((string-match "\\`x-" (symbol-name symbol))
index 74e6876fd2889e4e28c0bc70082fa7c9263c9947..7bdb195543aa858de92824312b6a9be34ed92f17 100644 (file)
@@ -344,6 +344,15 @@ Subexpression 2 must end right before the \\n or \\r.")
 (defvar dired-warning-face 'dired-warning
   "Face name used for a part of a buffer that needs user attention.")
 
+(defface dired-warn-writable
+  '((((type w32 pc)) :inherit default)  ;; These default to rw-rw-rw.
+    (t (:inherit font-lock-warning-face)))
+  "Face used to highlight permissions of group- and world-writable files."
+  :group 'dired-faces
+  :version "22.2")
+(defvar dired-warn-writable-face 'dired-warn-writable
+  "Face name used for permissions of group- and world-writable files.")
+
 (defface dired-directory
   '((t (:inherit font-lock-function-name-face)))
   "Face used for subdirectories."
@@ -405,10 +414,10 @@ Subexpression 2 must end right before the \\n or \\r.")
    ;; fields with keymaps to frob the permissions, somewhat a la XEmacs.
    (list (concat dired-re-maybe-mark dired-re-inode-size
                 "[-d]....\\(w\\)....") ; group writable
-        '(1 dired-warning-face))
+        '(1 dired-warn-writable-face))
    (list (concat dired-re-maybe-mark dired-re-inode-size
                 "[-d].......\\(w\\).") ; world writable
-        '(1 dired-warning-face))
+        '(1 dired-warn-writable-face))
    ;;
    ;; Subdirectories.
    (list dired-re-dir
index d04550c187d4c082d0654a88455710f2d927bd74..cabd0dd391ea9b61330ea3816ef6bc81962d2c3e 100644 (file)
@@ -2603,17 +2603,13 @@ Like `interactive-form', but also works on pieces of advice."
                    (if (ad-interactive-form definition) 1 0))
                 (cdr (cdr (ad-lambda-expression definition)))))))
 
-;; Matches the docstring of an advised definition.
-;; The first group of the regexp matches the function name:
-(defvar ad-advised-definition-docstring-regexp "^\\$ad-doc: \\(.+\\)\\$$")
-
 (defun ad-make-advised-definition-docstring (function)
   "Make an identifying docstring for the advised definition of FUNCTION.
 Put function name into the documentation string so we can infer
 the name of the advised function from the docstring.  This is needed
 to generate a proper advised docstring even if we are just given a
-definition (also see the defadvice for `documentation')."
-  (format "$ad-doc: %s$" (prin1-to-string function)))
+definition (see the code for `documentation')."
+  (propertize "Advice doc string" 'ad-advice-info function))
 
 (defun ad-advised-definition-p (definition)
   "Return non-nil if DEFINITION was generated from advice information."
@@ -2622,8 +2618,7 @@ definition (also see the defadvice for `documentation')."
          (ad-compiled-p definition))
       (let ((docstring (ad-docstring definition)))
        (and (stringp docstring)
-            (string-match
-             ad-advised-definition-docstring-regexp docstring)))))
+            (get-text-property 0 'ad-advice-info docstring)))))
 
 (defun ad-definition-type (definition)
   "Return symbol that describes the type of DEFINITION."
@@ -3917,24 +3912,6 @@ undone on exit of this macro."
 ;; during bootstrapping.
 (ad-define-subr-args 'documentation '(function &optional raw))
 
-(defadvice documentation (after ad-advised-docstring first disable preact)
-  "Builds an advised docstring if FUNCTION is advised."
-  ;; Because we get the function name from the advised docstring
-  ;; this will work for function names as well as for definitions:
-  (if (and (stringp ad-return-value)
-          (string-match
-           ad-advised-definition-docstring-regexp ad-return-value))
-      (let ((function
-            (car (read-from-string
-                  ad-return-value (match-beginning 1) (match-end 1)))))
-       (cond ((ad-is-advised function)
-              (setq ad-return-value (ad-make-advised-docstring function))
-              ;; Handle optional `raw' argument:
-              (if (not (ad-get-arg 1))
-                  (setq ad-return-value
-                        (substitute-command-keys ad-return-value))))))))
-
-
 ;; @@ Starting, stopping and recovering from the advice package magic:
 ;; ===================================================================
 
@@ -3943,9 +3920,7 @@ undone on exit of this macro."
   (interactive)
   ;; Advising `ad-activate-internal' means death!!
   (ad-set-advice-info 'ad-activate-internal nil)
-  (ad-safe-fset 'ad-activate-internal 'ad-activate)
-  (ad-enable-advice 'documentation 'after 'ad-advised-docstring)
-  (ad-activate 'documentation 'compile))
+  (ad-safe-fset 'ad-activate-internal 'ad-activate))
 
 (defun ad-stop-advice ()
   "Stop the automatic advice handling magic.
@@ -3953,8 +3928,6 @@ You should only need this in case of Advice-related emergencies."
   (interactive)
   ;; Advising `ad-activate-internal' means death!!
   (ad-set-advice-info 'ad-activate-internal nil)
-  (ad-disable-advice 'documentation 'after 'ad-advised-docstring)
-  (ad-update 'documentation)
   (ad-safe-fset 'ad-activate-internal 'ad-activate-internal-off))
 
 (defun ad-recover-normality ()
index 2dea1d0a3470b863199f697d8e4f5680104dd230..39cb8dce1ffe51ef966807c383426f19f9306989 100644 (file)
@@ -269,6 +269,7 @@ That buffer should be current already."
   (setq buffer-read-only nil)
   (erase-buffer)
   (set-buffer-multibyte nil)
+  (setq buffer-undo-list t)
   (let ((standard-output (current-buffer))
        (print-escape-newlines t)
        (print-level 8)
index 01d883d63be1c20b9ddc0a786b7dd456efaa6ba4..e3ade01a4a067de7f2cd321bf41e602a2fae0508 100644 (file)
@@ -3675,44 +3675,6 @@ Return the result of the last expression."
 
 ;;; Printing
 
-;; Replace printing functions.
-
-;; obsolete names
-(define-obsolete-function-alias 'edebug-install-custom-print-funcs
-    'edebug-install-custom-print "22.1")
-(define-obsolete-function-alias 'edebug-reset-print-funcs
-    'edebug-uninstall-custom-print "22.1")
-(define-obsolete-function-alias 'edebug-uninstall-custom-print-funcs
-    'edebug-uninstall-custom-print "22.1")
-
-(defun edebug-install-custom-print ()
-  "Replace print functions used by Edebug with custom versions."
-  ;; Modifying the custom print functions, or changing print-length,
-  ;; print-level, print-circle, custom-print-list or custom-print-vector
-  ;; have immediate effect.
-  (interactive)
-  (require 'cust-print)
-  (defalias 'edebug-prin1 'custom-prin1)
-  (defalias 'edebug-print 'custom-print)
-  (defalias 'edebug-prin1-to-string 'custom-prin1-to-string)
-  (defalias 'edebug-format 'custom-format)
-  (defalias 'edebug-message 'custom-message)
-  "Installed")
-
-(eval-and-compile
-  (defun edebug-uninstall-custom-print ()
-    "Replace edebug custom print functions with internal versions."
-    (interactive)
-    (defalias 'edebug-prin1 'prin1)
-    (defalias 'edebug-print 'print)
-    (defalias 'edebug-prin1-to-string 'prin1-to-string)
-    (defalias 'edebug-format 'format)
-    (defalias 'edebug-message 'message)
-    "Uninstalled")
-
-  ;; Default print functions are the same as Emacs'.
-  (edebug-uninstall-custom-print))
-
 
 (defun edebug-report-error (edebug-value)
   ;; Print an error message like command level does.
@@ -3759,6 +3721,12 @@ Return the result of the last expression."
 
 ;;; Read, Eval and Print
 
+(defalias 'edebug-prin1 'prin1)
+(defalias 'edebug-print 'print)
+(defalias 'edebug-prin1-to-string 'prin1-to-string)
+(defalias 'edebug-format 'format)
+(defalias 'edebug-message 'message)
+
 (defun edebug-eval-expression (edebug-expr)
   "Evaluate an expression in the outside environment.
 If interactive, prompt for the expression.
index 2c8e0a29faf5e8d6794329dbf9ce537f382087de..93cf434292a31983e97969450a0f680514055f65 100644 (file)
@@ -164,6 +164,78 @@ will be performed."
     (dotimes (var (cadr ring) lst)
       (push (aref vect (mod (+ start var) size)) lst))))
 
+(defun ring-member (ring item)
+  "Return index of ITEM if on RING, else nil.  Comparison via `equal'.
+The index is 0-based."
+  (let ((ind 0)
+        (len (1- (ring-length ring)))
+        (memberp nil))
+    (while (and (<= ind len)
+                (not (setq memberp (equal item (ring-ref ring ind)))))
+      (setq ind (1+ ind)))
+    (and memberp ind)))
+
+(defun ring-next (ring item)
+  "Return the next item in the RING, after ITEM.
+Raise error if ITEM is not in the RING."
+  (let ((curr-index (ring-member ring item)))
+    (unless curr-index (error "Item is not in the ring: `%s'" item))
+    (ring-ref ring (ring-plus1 curr-index (ring-length ring)))))
+
+(defun ring-previous (ring item)
+  "Return the previous item in the RING, before ITEM.
+Raise error if ITEM is not in the RING."
+  (let ((curr-index (ring-member ring item)))
+    (unless curr-index (error "Item is not in the ring: `%s'" item))
+    (ring-ref ring (ring-minus1 curr-index (ring-length ring)))))
+
+(defun ring-insert+extend (ring item &optional grow-p)
+  "Like ring-insert, but if GROW-P is non-nil, then enlarge ring.
+Insert onto ring RING the item ITEM, as the newest (last) item.
+If the ring is full, behavior depends on GROW-P:
+  If GROW-P is non-nil, enlarge the ring to accommodate the new item.
+  If GROW-P is nil, dump the oldest item to make room for the new."
+  (let* ((vec (cdr (cdr ring)))
+        (veclen (length vec))
+        (hd (car ring))
+        (ringlen (ring-length ring)))
+    (prog1
+        (cond ((and grow-p (= ringlen veclen)) ; Full ring.  Enlarge it.
+               (setq veclen (1+ veclen))
+               (setcdr ring (cons (setq ringlen (1+ ringlen))
+                                  (setq vec (vconcat vec (vector item)))))
+               (setcar ring hd))
+              (t (aset vec (mod (+ hd ringlen) veclen) item)))
+      (if (= ringlen veclen)
+          (setcar ring (ring-plus1 hd veclen))
+        (setcar (cdr ring) (1+ ringlen))))))
+
+(defun ring-remove+insert+extend (ring item &optional grow-p)
+  "`ring-remove' ITEM from RING, then `ring-insert+extend' it.
+This ensures that there is only one ITEM on RING.
+
+If the RING is full, behavior depends on GROW-P:
+  If GROW-P is non-nil, enlarge the ring to accommodate the new ITEM.
+  If GROW-P is nil, dump the oldest item to make room for the new."
+  (let (ind)
+    (while (setq ind (ring-member ring item)) (ring-remove ring ind)))
+  (ring-insert+extend ring item grow-p))
+
+(defun ring-convert-sequence-to-ring (seq)
+  "Convert sequence SEQ to a ring.  Return the ring.
+If SEQ is already a ring, return it."
+  (if (ring-p seq)
+      seq
+    (let* ((size (length seq))
+           (ring (make-ring size))
+           (count 0))
+      (while (< count size)
+        (if (or (ring-empty-p ring)
+                (not (equal (ring-ref ring 0) (elt seq count))))
+            (ring-insert-at-beginning ring (elt seq count)))
+        (setq count (1+ count)))
+      ring)))
+
 ;;; provide ourself:
 
 (provide 'ring)
index 55be1fad20e3859fa476b449677ca6a2ab84d0fe..8a0ba7d221f28e71b8ae3a754918155f1dd062f1 100644 (file)
@@ -48,8 +48,8 @@
   "*A list specifying how face font selection chooses fonts.
 Each of the four symbols `:width', `:height', `:weight', and `:slant'
 must appear once in the list, and the list must not contain any other
-elements.  Font selection tries to find a best matching font for
-those face attributes first that appear first in the list.  For
+elements.  Font selection first tries to find a best matching font
+for those face attributes that appear before in the list.  For
 example, if `:slant' appears before `:height', font selection first
 tries to find a font with a suitable slant, even if this results in
 a font height that isn't optimal."
@@ -1356,6 +1356,7 @@ If FRAME is omitted or nil, use the selected frame."
       (save-excursion
        (set-buffer standard-output)
        (dolist (f face)
+         (if (stringp f) (setq f (intern f)))
          (insert "Face: " (symbol-name f))
          (if (not (facep f))
              (insert "   undefined face.\n")
@@ -1515,17 +1516,16 @@ If SPEC is nil, return nil."
 (defun face-spec-set (face spec &optional frame)
   "Set FACE's attributes according to the first matching entry in SPEC.
 FRAME is the frame whose frame-local face is set.  FRAME nil means
-do it on all frames.  See `defface' for information about SPEC.
-If SPEC is nil, do nothing."
-  (if frame
-      (let ((attrs (face-spec-choose spec frame)))
-       (when spec
-         (face-spec-reset-face face frame))
-       (while attrs
-         (let ((attribute (car attrs))
-               (value (car (cdr attrs))))
-           ;; Support some old-style attribute names and values.
-           (case attribute
+do it on all frames (and change the default for new frames).
+See `defface' for information about SPEC.  If SPEC is nil, do nothing."
+  (let ((attrs (face-spec-choose spec frame)))
+    (when spec
+      (face-spec-reset-face face (or frame t)))
+    (while attrs
+      (let ((attribute (car attrs))
+           (value (car (cdr attrs))))
+       ;; Support some old-style attribute names and values.
+       (case attribute
              (:bold (setq attribute :weight value (if value 'bold 'normal)))
              (:italic (setq attribute :slant value (if value 'italic 'normal)))
              ((:foreground :background)
@@ -1534,9 +1534,12 @@ If SPEC is nil, do nothing."
               (if (null value) (setq value 'unspecified)))
              (t (unless (assq attribute face-x-resources)
                   (setq attribute nil))))
-           (when attribute
-             (set-face-attribute face frame attribute value)))
-         (setq attrs (cdr (cdr attrs)))))
+       (when attribute
+         ;; If frame is nil, set the default for new frames.
+         ;; Existing frames are handled below.
+         (set-face-attribute face (or frame t) attribute value)))
+      (setq attrs (cdr (cdr attrs)))))
+  (unless frame
     ;; When we reset the face based on its spec, then it is unmodified
     ;; as far as Custom is concerned.
     (put (or (get face 'face-alias) face) 'face-modified nil)
index f4881911381cf5790a04961faca1a0522f9c67fd..be28dec4c409b8d42784b2f3e0685f9e15a1612d 100644 (file)
@@ -59,8 +59,9 @@ FROM with TO when it appears in a directory name.  This replacement is
 done when setting up the default directory of a newly visited file.
 *Every* FROM string should start with `^'.
 
-Do not use `~' in the TO strings.
-They should be ordinary absolute directory names.
+FROM and TO should be equivalent names, which refer to the
+same directory.  Do not use `~' in the TO strings;
+they should be ordinary absolute directory names.
 
 Use this feature when you have directories which you normally refer to
 via absolute symbolic links.  Make TO the name of the link, and FROM
@@ -554,7 +555,7 @@ See Info node `(elisp)Standard File Names' for more details."
            (start 0))
        ;; Replace invalid filename characters with !
        (while (string-match "[?*:<>|\"\000-\037]" name start)
-         (aset name (match-beginning 0) ?!)
+              (aset name (match-beginning 0) ?!)
          (setq start (match-end 0)))
        name)
     filename))
index 37673835f3474aa6cd8bcb4d0777273bf654bb3a..1c11829475bd81e08920dcc74b76c675bbb0f412 100644 (file)
@@ -820,10 +820,10 @@ the user during startup."
     (select-frame frame)
     (raise-frame frame)
     ;; Ensure, if possible, that frame gets input focus.
-    (cond ((memq (window-system frame) '(x max w32))
-          (x-focus-frame frame)))
-    (cond (focus-follows-mouse
-          (set-mouse-position (selected-frame) (1- (frame-width)) 0))))
+    (when (memq (window-system frame) '(x mac w32))
+      (x-focus-frame frame))
+    (when focus-follows-mouse
+      (set-mouse-position (selected-frame) (1- (frame-width)) 0)))
 
 (defun other-frame (arg)
   "Select the ARGth different visible frame on current display, and raise it.
@@ -950,8 +950,15 @@ is given and non-nil, the unwanted frames are iconified instead."
                ;; Since we can't set a frame's minibuffer status,
                ;; we might as well omit the parameter altogether.
                (let* ((parms (nth 1 parameters))
-                      (mini (assq 'minibuffer parms)))
-                 (if mini (setq parms (delq mini parms)))
+                     (mini (assq 'minibuffer parms))
+                     (name (assq 'name parms))
+                     (explicit-name (cdr (assq 'explicit-name parms))))
+                (when mini (setq parms (delq mini parms)))
+                ;; Leave name in iff it was set explicitly.
+                ;; This should fix the behavior reported in
+                ;; http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01632.html
+                (when (and name (not explicit-name))
+                  (setq parms (delq name parms)))
                  parms))
               (set-window-configuration (nth 2 parameters)))
           (setq frames-to-delete (cons frame frames-to-delete)))))
index eee0794b673a04bcf2b33f280d43f2e4f3fb39f7..bf8d5f9a209a6869dd27016a55fc4a809054420c 100644 (file)
@@ -251,8 +251,15 @@ face (according to `face-differs-from-default-p')."
 
 ;;;###autoload
 (defun describe-function-1 (function)
-  (let* ((def (if (symbolp function)
-                 (symbol-function function)
+  (let* ((advised (and (featurep 'advice) (ad-get-advice-info function)))
+        ;; If the function is advised, get the symbol that has the
+        ;; real definition.
+        (real-function
+         (if advised (cdr (assq 'origname advised))
+           function))
+        ;; Get the real definition.
+        (def (if (symbolp real-function)
+                 (symbol-function real-function)
                function))
         file-name string
         (beg (if (commandp def) "an interactive " "a ")))
@@ -334,7 +341,7 @@ face (according to `face-differs-from-default-p')."
       (with-current-buffer standard-output
         (save-excursion
          (re-search-backward "`\\([^`']+\\)'" nil t)
-         (help-xref-button 1 'help-function-def function file-name))))
+         (help-xref-button 1 'help-function-def real-function file-name))))
     (princ ".")
     (terpri)
     (when (commandp function)
@@ -383,8 +390,9 @@ face (according to `face-differs-from-default-p')."
                         ((listp arglist)
                          (format "%S" (help-make-usage function arglist)))
                         ((stringp arglist) arglist)
-                        ;; Maybe the arglist is in the docstring of the alias.
-                        ((let ((fun function))
+                        ;; Maybe the arglist is in the docstring of a symbol
+                       ;; this one is aliased to.
+                        ((let ((fun real-function))
                            (while (and (symbolp fun)
                                        (setq fun (symbol-function fun))
                                        (not (setq usage (help-split-fundoc
index 70f2ee2064602276b24f6815873a8a57d57da5ad..4e9ee480d65b2bf9a97299da6df7c49f3b0c7410 100644 (file)
@@ -154,14 +154,16 @@ documentation of `unload-feature' for details.")
 If the feature is required by any other loaded code, and prefix arg FORCE
 is nil, raise an error.
 
-This function tries to undo modifications made by the package to
-hooks.  Packages may define a hook FEATURE-unload-hook that is called
-instead of the normal heuristics for doing this.  Such a hook should
-undo all the relevant global state changes that may have been made by
-loading the package or executing functions in it.  It has access to
-the package's feature list (before anything is unbound) in the
-variable `unload-hook-features-list' and could remove features from it
-in the event that the package has done something normally-ill-advised,
+This function tries to undo any modifications that the package has
+made to hook values in Emacs.  Normally it does this using heuristics.
+The packages may define a hook `FEATURE-unload-hook'; if that exists,
+it is called instead of the normal heuristics.
+
+Such a hook should undo all the relevant global state changes that may
+have been made by loading the package or executing functions in it.
+It has access to the package's feature list (before anything is unbound)
+in the variable `unload-hook-features-list' and could remove features
+from it in the event that the package has done something strange,
 such as redefining an Emacs function."
   (interactive
    (list
index 9264bb42ba2e7686f82413a3818d0e78e8883dc7..5acbe70a074989992ed44efe6eeb1c715c488d69 100644 (file)
@@ -1139,6 +1139,7 @@ Tree mode key bindings:
 
     (kill-all-local-variables)
     (use-local-map ebrowse-tree-mode-map)
+    (buffer-disable-undo)
 
     (unless (zerop (buffer-size))
       (goto-char (point-min))
index 96af63849a461de9955451529a8dda8c372630ef..4148f327ecc852cdf25e4166ba859b09dc2f1de1 100644 (file)
@@ -1904,7 +1904,8 @@ The list of tags tables to select from is stored in `tags-table-set-list';
 see the doc of that variable if you want to add names to the list."
   (interactive)
   (pop-to-buffer "*Tags Table List*")
-  (setq buffer-read-only nil)
+  (setq buffer-read-only nil
+       buffer-undo-list t)
   (erase-buffer)
   (let ((set-list tags-table-set-list)
        (desired-point nil)
index 89211732e44830ccda046627f15ba72ea7aa4fa3..c6ae98c5b1247d9872aa6f5bb5b2fcd3d2c2ac13 100644 (file)
@@ -2120,62 +2120,72 @@ static char *magick[] = {
 
 (defun gdb-info-stack-custom ()
   (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
-    (save-excursion
-      (unless (eq gdb-look-up-stack 'delete)
-       (let ((buffer-read-only nil)
-             bl el)
-         (goto-char (point-min))
-         (while (< (point) (point-max))
-           (setq bl (line-beginning-position)
-                 el (line-end-position))
-           (when (looking-at "#")
-             (add-text-properties bl el
-                                  '(mouse-face highlight
-                                    help-echo "mouse-2, RET: Select frame")))
-           (goto-char bl)
-           (when (looking-at "^#\\([0-9]+\\)")
-             (when (string-equal (match-string 1) gdb-frame-number)
-               (if (> (car (window-fringes)) 0)
-                   (progn
-                     (or gdb-stack-position
-                         (setq gdb-stack-position (make-marker)))
-                     (set-marker gdb-stack-position (point)))
-                 (put-text-property bl (+ bl 4)
-                                    'face '(:inverse-video t))))
-             (when (re-search-forward
-                    (concat
-                     (if (string-equal (match-string 1) "0") "" " in ")
-                     "\\([^ ]+\\) (") el t)
-               (put-text-property (match-beginning 1) (match-end 1)
-                                  'face font-lock-function-name-face)
-               (setq bl (match-end 0))
-               (while (re-search-forward "<\\([^>]+\\)>" el t)
-                 (put-text-property (match-beginning 1) (match-end 1)
-                                    'face font-lock-function-name-face))
-               (goto-char bl)
-               (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
-                 (put-text-property (match-beginning 1) (match-end 1)
-                                    'face font-lock-variable-name-face))))
-           (forward-line 1))
-         (forward-line -1)
-         (when (looking-at "(More stack frames follow...)")
-           (add-text-properties (match-beginning 0) (match-end 0)
-            '(mouse-face highlight
-              gdb-max-frames t
-              help-echo
-               "mouse-2, RET: customize gdb-max-frames to see more frames")))))
-      (when gdb-look-up-stack
+    (let (move-to)
+      (save-excursion
+       (unless (eq gdb-look-up-stack 'delete)
+         (let ((buffer-read-only nil)
+               bl el)
            (goto-char (point-min))
-           (when (re-search-forward "\\(\\S-+?\\):\\([0-9]+\\)" nil t)
-             (let ((start (line-beginning-position))
-                   (file (match-string 1))
-                   (line (match-string 2)))
-               (re-search-backward "^#*\\([0-9]+\\)" start t)
-               (gdb-enqueue-input
-                (list (concat gdb-server-prefix "frame "
-                              (match-string 1) "\n") 'gdb-set-hollow))
-               (gdb-enqueue-input
-                (list (concat gdb-server-prefix "frame 0\n") 'ignore)))))))
+           (while (< (point) (point-max))
+             (setq bl (line-beginning-position)
+                   el (line-end-position))
+             (when (looking-at "#")
+               (add-text-properties bl el
+                                    '(mouse-face highlight
+                                                 help-echo "mouse-2, RET: Select frame")))
+             (goto-char bl)
+             (when (looking-at "^#\\([0-9]+\\)")
+               (when (string-equal (match-string 1) gdb-frame-number)
+                 (if (> (car (window-fringes)) 0)
+                     (progn
+                       (or gdb-stack-position
+                           (setq gdb-stack-position (make-marker)))
+                       (set-marker gdb-stack-position (point))
+                       (setq move-to gdb-stack-position))
+                   (put-text-property bl (+ bl 4)
+                                      'face '(:inverse-video t))
+                   (setq move-to bl)))
+               (when (re-search-forward
+                      (concat
+                       (if (string-equal (match-string 1) "0") "" " in ")
+                       "\\([^ ]+\\) (") el t)
+                 (put-text-property (match-beginning 1) (match-end 1)
+                                    'face font-lock-function-name-face)
+                 (setq bl (match-end 0))
+                 (while (re-search-forward "<\\([^>]+\\)>" el t)
+                   (put-text-property (match-beginning 1) (match-end 1)
+                                      'face font-lock-function-name-face))
+                 (goto-char bl)
+                 (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
+                   (put-text-property (match-beginning 1) (match-end 1)
+                                      'face font-lock-variable-name-face))))
+             (forward-line 1))
+           (forward-line -1)
+           (when (looking-at "(More stack frames follow...)")
+             (add-text-properties (match-beginning 0) (match-end 0)
+                                  '(mouse-face highlight
+                                               gdb-max-frames t
+                                               help-echo
+                                               "mouse-2, RET: customize gdb-max-frames to see more frames")))))
+       (when gdb-look-up-stack
+         (goto-char (point-min))
+         (when (re-search-forward "\\(\\S-+?\\):\\([0-9]+\\)" nil t)
+           (let ((start (line-beginning-position))
+                 (file (match-string 1))
+                 (line (match-string 2)))
+             (re-search-backward "^#*\\([0-9]+\\)" start t)
+             (gdb-enqueue-input
+              (list (concat gdb-server-prefix "frame "
+                            (match-string 1) "\n") 'gdb-set-hollow))
+             (gdb-enqueue-input
+              (list (concat gdb-server-prefix "frame 0\n") 'ignore))))))
+      (when move-to
+       (let ((window (get-buffer-window (current-buffer) 0)))
+         (when window
+           (with-selected-window window
+             (goto-char move-to)
+             (unless (pos-visible-in-window-p)
+               (recenter '(center)))))))))
   (if (eq gdb-look-up-stack 'delete)
       (kill-buffer (gdb-get-buffer 'gdb-stack-buffer)))
   (setq gdb-look-up-stack nil))
index 646f6a80d8eb92cbeae391b28f3902cd847a5370..abe5cfe648912bee4545a7dea0ba9bc09be2bd80 100644 (file)
@@ -6785,12 +6785,12 @@ accumulate information on matching completions."
       (message "Making completion list...")
 
       (unless idlwave-completion-help-links ; already set somewhere?
-       (mapcar (lambda (x)  ; Pass link prop through to highlight-linked
-                 (let ((link (get-text-property 0 'link (car x))))
-                   (if link
-                       (push (cons (car x) link)
-                             idlwave-completion-help-links))))
-               list))
+       (mapc (lambda (x)  ; Pass link prop through to highlight-linked
+               (let ((link (get-text-property 0 'link (car x))))
+                 (if link
+                     (push (cons (car x) link)
+                           idlwave-completion-help-links))))
+             list))
       (let* ((list all-completions)
             ;; "complete" means, this is already a valid completion
             (complete (memq spart all-completions))
index 4630fe1856df51b11bb656e0c7e865a9bc81aec3..b7084950a09a1c7d4a7726820ed6520617bd2e52 100644 (file)
@@ -581,13 +581,28 @@ to end after the end keyword."
        (error nil))
       (< pos (point)))))
 
+(defun octave-looking-at-kw (regexp)
+  "Like `looking-at', but sets `case-fold-search' nil."
+  (let ((case-fold-search nil))
+    (looking-at regexp)))
+
+(defun octave-re-search-forward-kw (regexp count)
+  "Like `re-search-forward', but sets `case-fold-search' nil, and moves point."
+  (let ((case-fold-search nil))
+    (re-search-forward regexp nil 'move count)))
+
+(defun octave-re-search-backward-kw (regexp count)
+  "Like `re-search-backward', but sets `case-fold-search' nil, and moves point."
+  (let ((case-fold-search nil))
+    (re-search-backward regexp nil 'move count)))
+
 (defun octave-in-defun-p ()
   "Return t if point is inside an Octave function declaration.
 The function is taken to start at the `f' of `function' and to end after
 the end keyword."
   (let ((pos (point)))
     (save-excursion
-      (or (and (looking-at "\\<function\\>")
+      (or (and (octave-looking-at-kw "\\<function\\>")
               (octave-not-in-string-or-comment-p))
          (and (octave-beginning-of-defun)
               (condition-case nil
@@ -658,14 +673,14 @@ level."
                (while (< (point) eol)
                  (if (octave-not-in-string-or-comment-p)
                      (cond
-                      ((looking-at "\\<switch\\>")
+                      ((octave-looking-at-kw "\\<switch\\>")
                        (setq icol (+ icol (* 2 octave-block-offset))))
-                      ((looking-at octave-block-begin-regexp)
+                      ((octave-looking-at-kw octave-block-begin-regexp)
                        (setq icol (+ icol octave-block-offset)))
-                      ((looking-at octave-block-else-regexp)
+                      ((octave-looking-at-kw octave-block-else-regexp)
                        (if (= bot (point))
                            (setq icol (+ icol octave-block-offset))))
-                      ((looking-at octave-block-end-regexp)
+                      ((octave-looking-at-kw octave-block-end-regexp)
                        (if (not (= bot (point)))
                            (setq icol (- icol
                                          (octave-block-end-offset)))))))
@@ -675,10 +690,10 @@ level."
     (save-excursion
       (back-to-indentation)
       (cond
-       ((and (looking-at octave-block-else-regexp)
+       ((and (octave-looking-at-kw octave-block-else-regexp)
             (octave-not-in-string-or-comment-p))
        (setq icol (- icol octave-block-offset)))
-       ((and (looking-at octave-block-end-regexp)
+       ((and (octave-looking-at-kw octave-block-end-regexp)
             (octave-not-in-string-or-comment-p))
        (setq icol (- icol (octave-block-end-offset))))
        ((or (looking-at "\\s<\\s<\\s<\\S<")
@@ -854,8 +869,8 @@ an error is signaled."
     (save-excursion
       (while (/= count 0)
        (catch 'foo
-         (while (or (re-search-forward
-                     octave-block-begin-or-end-regexp nil 'move inc)
+         (while (or (octave-re-search-forward-kw
+                     octave-block-begin-or-end-regexp inc)
                     (if (/= depth 0)
                         (error "Unbalanced block")))
            (if (octave-not-in-string-or-comment-p)
@@ -974,7 +989,7 @@ Signal an error if the keywords are incompatible."
             (looking-at "\\>")
             (save-excursion
               (skip-syntax-backward "w")
-              (looking-at octave-block-else-or-end-regexp)))
+              (octave-looking-at-kw octave-block-else-or-end-regexp)))
        (save-excursion
          (cond
           ((match-end 1)
@@ -1021,11 +1036,11 @@ Returns t unless search stops at the beginning or end of the buffer."
         (inc (if (> arg 0) 1 -1))
         (found))
     (and (not (eobp))
-        (not (and (> arg 0) (looking-at "\\<function\\>")))
+        (not (and (> arg 0) (octave-looking-at-kw "\\<function\\>")))
         (skip-syntax-forward "w"))
     (while (and (/= arg 0)
                (setq found
-                     (re-search-backward "\\<function\\>" nil 'move inc)))
+                     (octave-re-search-backward-kw "\\<function\\>" inc)))
       (if (octave-not-in-string-or-comment-p)
          (setq arg (- arg inc))))
     (if found
@@ -1078,7 +1093,7 @@ otherwise."
            (save-excursion
              (beginning-of-line)
              (and auto-fill-inhibit-regexp
-                  (looking-at auto-fill-inhibit-regexp))))
+                  (octave-looking-at-kw auto-fill-inhibit-regexp))))
        nil                             ; Can't do anything
       (if (and (not (octave-in-comment-p))
               (> (current-column) fc))
index d1e44bdad6b98c0eb0802d6f47c3b1d172fafaa9..ff0caaf43b4f065b15cdcea52aef868add09be46 100644 (file)
@@ -1452,14 +1452,15 @@ a face or button specification."
     (when concise
       (fancy-splash-insert
        :face 'variable-pitch "\n"
-       :link '("Dismiss" (lambda (button)
-                          (when startup-screen-inhibit-startup-screen
-                            (customize-set-variable 'inhibit-startup-screen t)
-                            (customize-mark-to-save 'inhibit-startup-screen)
-                            (custom-save-all))
-                          (let ((w (get-buffer-window "*GNU Emacs*")))
-                            (and w (not (one-window-p)) (delete-window w)))
-                          (kill-buffer "*GNU Emacs*")))
+       :link '("Dismiss this startup screen"
+              (lambda (button)
+                (when startup-screen-inhibit-startup-screen
+                  (customize-set-variable 'inhibit-startup-screen t)
+                  (customize-mark-to-save 'inhibit-startup-screen)
+                  (custom-save-all))
+                (let ((w (get-buffer-window "*GNU Emacs*")))
+                  (and w (not (one-window-p)) (delete-window w)))
+                (kill-buffer "*GNU Emacs*")))
        "  ")
       (when (or user-init-file custom-file)
        (let ((checked (create-image "\300\300\141\143\067\076\034\030"
@@ -1480,7 +1481,7 @@ a face or button specification."
                       (overlay-put button 'display (overlay-get button :on-glyph))
                       (setq startup-screen-inhibit-startup-screen t)))))
        (fancy-splash-insert :face '(variable-pitch :height 0.9)
-                            " Don't show this message again.")))))
+                            " Never show it again.")))))
 
 (defun exit-splash-screen ()
   "Stop displaying the splash screen buffer."
@@ -1492,7 +1493,7 @@ a face or button specification."
 If CONCISE is non-nil, display a concise version of the
 splash screen in another window."
   (let ((splash-buffer (get-buffer-create "*GNU Emacs*")))
-    (with-current-buffer splash-buffer 
+    (with-current-buffer splash-buffer
       (let ((inhibit-read-only t))
        (erase-buffer)
        (make-local-variable 'startup-screen-inhibit-startup-screen)
@@ -1513,7 +1514,8 @@ splash screen in another window."
       (set-buffer-modified-p nil)
       (if (and view-read-only (not view-mode))
          (view-mode-enter nil 'kill-buffer))
-      (goto-char (point-max)))
+      (goto-char (point-min))
+      (forward-line (if concise 2 4)))
     (if concise
        (progn
          (display-buffer splash-buffer)
@@ -1551,7 +1553,8 @@ splash screen in another window."
       (setq tab-width 22)
       (message "%s" (startup-echo-area-message))
       (setq buffer-read-only t)
-      (goto-char (point-min)))))
+      (goto-char (point-min))
+      (forward-line 3))))
 
 (defun fancy-splash-frame ()
   "Return the frame to use for the fancy splash screen.
@@ -1658,7 +1661,7 @@ after Emacs starts.  If STARTUP is nil, display the About screen."
   ;; The user can use the mouse to activate menus
   ;; so give help in terms of menu items.
   (insert "\
-You can do basic editing with the menu bar and scroll bar using the mouse.
+To follow a link, click Mouse-1 on it, or move to it and type RET.
 To quit a partially entered command, type Control-g.\n")
 
   (insert "\nImportant Help menu items:\n")
index bf1487f02e2f81b856f871116339300e386cc100..253c29f408e874fb5c87577d8a0e79a8722e294a 100644 (file)
@@ -1564,8 +1564,12 @@ nil           word is correct or spelling is accepted.
 quit          spell session exited."
 
   (interactive (list ispell-following-word ispell-quietly current-prefix-arg))
-  (if continue
-      (ispell-continue)
+  (cond
+   ((and transient-mark-mode mark-active
+        (not (eq (region-beginning) (region-end))))
+    (ispell-region (region-beginning) (region-end)))
+   (continue (ispell-continue))
+   (t
     (ispell-maybe-find-aspell-dictionaries)
     (ispell-accept-buffer-local-defs)  ; use the correct dictionary
     (let ((cursor-location (point))    ; retain cursor location
@@ -1660,7 +1664,7 @@ quit          spell session exited."
       ;; NB: Cancels ispell-quit incorrectly if called from ispell-region
       (if ispell-quit (setq ispell-quit nil replace 'quit))
       (goto-char cursor-location)      ; return to original location
-      replace)))
+      replace))))
 
 
 (defun ispell-get-word (following &optional extra-otherchars)
@@ -2653,7 +2657,7 @@ Return nil if spell session is quit,
        (rstart (make-marker)))
   (unwind-protect
       (save-excursion
-       (message "Spell checking %s using %s with %s dictionary..."
+       (message "Spell-checking %s using %s with %s dictionary..."
                 (if (and (= reg-start (point-min)) (= reg-end (point-max)))
                     (buffer-name) "region")
                 (file-name-nondirectory ispell-program-name)
@@ -2752,7 +2756,9 @@ Return nil if spell session is quit,
       (if (not recheckp) (set-marker ispell-region-end nil))
       ;; Only save if successful exit.
       (ispell-pdict-save ispell-silently-savep)
-      (message "Spell-checking using %s with %s dictionary done"
+      (message "Spell-checking %s using %s with %s dictionary done"
+              (if (and (= reg-start (point-min)) (= reg-end (point-max)))
+                  (buffer-name) "region")
               (file-name-nondirectory ispell-program-name)
               (or ispell-current-dictionary "default"))))))
 
index 4551068af90b98e97a181a3b014b59676143c4f7..d08694c2080b512a809554997f2d44a4f2c15308 100644 (file)
@@ -418,11 +418,11 @@ During a selection process, these are the local bindings.
           (set-buffer selection-buffer)
           (use-local-map nil)
           (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t)
-          (remove-hook 'post-command-hook 
+          (remove-hook 'post-command-hook
                        'reftex-select-post-command-hook t))
         ;; Kill the mark overlays
-        (mapcar (lambda (c) (reftex-delete-overlay (nth 1 c)))
-                reftex-select-marked)))))
+        (mapc (lambda (c) (reftex-delete-overlay (nth 1 c)))
+              reftex-select-marked)))))
 
     (set (make-local-variable 'reftex-last-line)
          (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))
index 0e4362bce31891d92136816708abc6609cd9f0db..8f3979debcf83644de6eccd78f030d1adbc681ca 100644 (file)
@@ -1,8 +1,27 @@
+2007-10-13  Richard Stallman  <rms@gnu.org>
+
+       * url-util.el (url-basepath): Function deleted.
+       (url-file-directory, url-file-nondirectory): New functions
+       replacing url-basepath.  Callers changed.
+
+       * url-expand.el (url-default-expander): Use `url-file-directory'.
+
+       * url-auth.el (url-digest-auth, url-basic-auth):
+       Rename `path' to `file'.  Use `url-file-directory'.
+
 2007-10-12  Diane Murray  <disumu@x3y2z1.net>
 
        * url-auth.el (url-basic-auth): Set path to "/" when URL has an
         empty string filename.
 
+2007-10-09  Richard Stallman  <rms@gnu.org>
+
+       * url-parse.el (url-type, url-user, url-password, url-host)
+       (url-port, url-filename, url-target, url-attributes)
+       (url-fullness, url-set-type, url-set-user, url-set-password)
+       (url-set-host, url-set-port, url-set-filename, url-set-target)
+       (url-set-attributes, url-set-full): Change macros to defuns.
+
 2007-09-26  Juanma Barranquero  <lekktu@gmail.com>
 
        * url-dav.el (top):
index 60239ba76ac57b7be463ffe7d878a76ff249b40c..98e351916c1d379dc1f1b838ea8bf8fe126be97c 100644 (file)
@@ -61,22 +61,22 @@ If optional argument PROMPT is non-nil, ask for the username/password
 to use for the url and its descendants.  If optional third argument
 OVERWRITE is non-nil, overwrite the old username/password pair if it
 is found in the assoc list.  If REALM is specified, use that as the realm
-instead of the pathname inheritance method."
+instead of the filename inheritance method."
   (let* ((href (if (stringp url)
                   (url-generic-parse-url url)
                 url))
         (server (url-host href))
         (port (url-port href))
-        (path (url-filename href))
+        (file (url-filename href))
         (user (url-user href))
         (pass (url-password href))
         byserv retval data)
     (setq server (format "%s:%d" server port)
-         path (cond
+         file (cond
                (realm realm)
-               ((string= "" path) "/")
-               ((string-match "/$" path) path)
-               (t (url-basepath path)))
+               ((string= "" file) "/")
+               ((string-match "/$" file) file)
+               (t (url-file-directory file)))
          byserv (cdr-safe (assoc server
                                  (symbol-value url-basic-auth-storage))))
     (cond
@@ -86,21 +86,21 @@ instead of the pathname inheritance method."
            pass (read-passwd "Password: " nil (or pass "")))
       (set url-basic-auth-storage
           (cons (list server
-                      (cons path
+                      (cons file
                             (setq retval
                                   (base64-encode-string
                                    (format "%s:%s" user pass)))))
                 (symbol-value url-basic-auth-storage))))
      (byserv
-      (setq retval (cdr-safe (assoc path byserv)))
+      (setq retval (cdr-safe (assoc file byserv)))
       (if (and (not retval)
-              (string-match "/" path))
+              (string-match "/" file))
          (while (and byserv (not retval))
            (setq data (car (car byserv)))
            (if (or (not (string-match "/" data)) ; It's a realm - take it!
                    (and
-                    (>= (length path) (length data))
-                    (string= data (substring path 0 (length data)))))
+                    (>= (length file) (length data))
+                    (string= data (substring file 0 (length data)))))
                (setq retval (cdr (car byserv))))
            (setq byserv (cdr byserv))))
       (if (or (and (not retval) prompt) overwrite)
@@ -111,7 +111,7 @@ instead of the pathname inheritance method."
                  retval (base64-encode-string (format "%s:%s" user pass))
                  byserv (assoc server (symbol-value url-basic-auth-storage)))
            (setcdr byserv
-                   (cons (cons path retval) (cdr byserv))))))
+                   (cons (cons file retval) (cdr byserv))))))
      (t (setq retval nil)))
     (if retval (setq retval (concat "Basic " retval)))
     retval))
@@ -153,12 +153,12 @@ instead of hostname:portnum."
                     url))
             (server (url-host href))
             (port (url-port href))
-            (path (url-filename href))
+            (file (url-filename href))
             user pass byserv retval data)
-       (setq path (cond
+       (setq file (cond
                    (realm realm)
-                   ((string-match "/$" path) path)
-                   (t (url-basepath path)))
+                   ((string-match "/$" file) file)
+                   (t (url-file-directory file)))
              server (format "%s:%d" server port)
              byserv (cdr-safe (assoc server url-digest-auth-storage)))
        (cond
@@ -168,7 +168,7 @@ instead of hostname:portnum."
                pass (read-passwd "Password: ")
                url-digest-auth-storage
                (cons (list server
-                           (cons path
+                           (cons file
                                  (setq retval
                                        (cons user
                                              (url-digest-auth-create-key
@@ -177,15 +177,15 @@ instead of hostname:portnum."
                                               url)))))
                      url-digest-auth-storage)))
         (byserv
-         (setq retval (cdr-safe (assoc path byserv)))
+         (setq retval (cdr-safe (assoc file byserv)))
          (if (and (not retval)         ; no exact match, check directories
-                  (string-match "/" path)) ; not looking for a realm
+                  (string-match "/" file)) ; not looking for a realm
              (while (and byserv (not retval))
                (setq data (car (car byserv)))
                (if (or (not (string-match "/" data))
                        (and
-                        (>= (length path) (length data))
-                        (string= data (substring path 0 (length data)))))
+                        (>= (length file) (length data))
+                        (string= data (substring file 0 (length data)))))
                    (setq retval (cdr (car byserv))))
                (setq byserv (cdr byserv))))
          (if (or (and (not retval) prompt) overwrite)
@@ -201,7 +201,7 @@ instead of hostname:portnum."
                                          url)))
                      byserv (assoc server url-digest-auth-storage))
                (setcdr byserv
-                       (cons (cons path retval) (cdr byserv))))))
+                       (cons (cons file retval) (cdr byserv))))))
         (t (setq retval nil)))
        (if retval
            (let ((nonce (or (cdr-safe (assoc "nonce" args)) "nonegiven"))
index df4de29a619e367acf4d777d0ec79e79752ec6f8..bebdbd9e04bf1690f4e9ae6a9c6b649f441cdd59 100644 (file)
@@ -135,7 +135,8 @@ path components followed by `..' are removed, along with the `..' itself."
                  sepchar (substring (url-filename urlobj) (match-beginning 0) (match-end 0)))
          (setq file (url-filename urlobj)))
        (setq file (url-expander-remove-relative-links
-                   (concat (url-basepath (url-filename defobj)) file)))
+                   (expand-file-name file
+                                     (url-file-directory (url-filename defobj)))))
        (setf (url-filename urlobj)
               (if query (concat file sepchar query) file))))))
 
index 9f73fa435be4b1fc6bf9ccd6d208aa8ae0cdc741..119f40b4da46348aae1797948ea1939033fa30c4 100644 (file)
@@ -259,17 +259,23 @@ Will not do anything if `url-show-status' is nil."
     (/ (* x 100) y)))
 
 ;;;###autoload
-(defun url-basepath (file &optional x)
-  "Return the base pathname of FILE, or the actual filename if X is true."
+(defun url-file-directory (file)
+  "Return the directory part of FILE, for a URL."
   (cond
    ((null file) "")
    ((string-match (eval-when-compile (regexp-quote "?")) file)
-    (if x
-       (file-name-nondirectory (substring file 0 (match-beginning 0)))
-      (file-name-directory (substring file 0 (match-beginning 0)))))
-   (x (file-name-nondirectory file))
+    (file-name-directory (substring file 0 (match-beginning 0))))
    (t (file-name-directory file))))
 
+;;;###autoload
+(defun url-file-nondirectory (file)
+  "Return the nondirectory part of FILE, for a URL."
+  (cond
+   ((null file) "")
+   ((string-match (eval-when-compile (regexp-quote "?")) file)
+    (file-name-nondirectory (substring file 0 (match-beginning 0))))
+   (t (file-name-nondirectory file))))
+
 ;;;###autoload
 (defun url-parse-query-string (query &optional downcase allow-newlines)
   (let (retval pairs cur key val)
@@ -385,7 +391,7 @@ string: \"%\" followed by two lowercase hex digits."
 If optional variable X is t,
 then return the basename of the file with the extension stripped off."
   (if (and fname
-          (setq fname (url-basepath fname t))
+          (setq fname (url-file-nondirectory fname))
           (string-match "\\.[^./]+$" fname))
       (if x (substring fname 0 (match-beginning 0))
        (substring fname (match-beginning 0) nil))
index fc0100b31dad61f8bb287af704b0ed14e457f2fb..876fd6fc311c4d7725ccbd8a79b06e9e8d5be94c 100644 (file)
@@ -846,7 +846,7 @@ Heading emboldening is NOT standard `man' behavior."
   :group 'woman-formatting)
 
 (defcustom woman-ignore t
-  "If non-nil then unrecognized requests etc.. are ignored.  Default is t.
+  "If non-nil then unrecognized requests etc. are ignored.  Default is t.
 This gives the standard ?roff behavior.  If nil then they are left in
 the buffer, which may aid debugging."
   :type 'boolean
index c928977d68b6c7acc8ddf430f7ce8bf87ee4e671..4ba46df0f2306ffb24ad588bc7c4d7397cce865d 100644 (file)
@@ -1,4 +1,47 @@
-2007-10-10  Patrick Mahan <mahan@mahan.org>  (tiny change)
+2007-10-14  Juanma Barranquero  <lekktu@gmail.com>
+
+       * w32term.c (w32_font_is_double_byte, my_create_scrollbar): Make static.
+       (syms_of_w32term) <w32-enable-unicode-output>: Fix typo in docstring.
+
+2007-10-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * buffer.c (Fmake_indirect_buffer): Set the buffer's tag.
+
+2007-10-14  Juanma Barranquero  <lekktu@gmail.com>
+
+       * eval.c (do_autoload): Don't save autoloads.
+
+       * data.c (Ffset): Save autoload of the function being set.
+
+2007-10-07  John Paul Wallington  <jpw@pobox.com>
+
+       * xfns.c (x_create_tip_frame): Set the `display-type' frame
+       parameter before setting up faces.
+
+2007-10-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * ccl.c (Fregister_code_conversion_map):
+       * keyboard.c (append_tool_bar_item): Reformat last change.
+
+       * lisp.h (eabs): Rename from `abs'.  All callers changed.
+
+2007-10-05  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * buffer.c (add_overlay_mod_hooklist):
+       * ccl.c (Fregister_ccl_program, Fregister_code_conversion_map):
+       * fontset.c (make_fontset):
+       * keyboard.c (GROW_RAW_KEYBUF, menu_bar_items, menu_bar_item)
+       (append_tool_bar_item):
+       * macmenu.c (grow_menu_items):
+       * w32menu.c (grow_menu_items):
+       * xmenu.c (grow_menu_items): Use larger_vector.
+
+2007-10-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * msdos.c (dos_rawgetc): Undo last change (there's no ``leaving
+       selected frame'' on MSDOS).
+
+2007-10-10  Patrick Mahan  <mahan@mahan.org>  (tiny change)
 
        * macfns.c (x_create_tip_frame): Set terminal for frame.
 
        * keyboard.c (restore_kboard_configuration): Only define when
        MULTI_KBOARD defined.
 
-       * makefile.w32-in: Update dependancies from Makefile.in
+       * makefile.w32-in: Update dependancies from Makefile.in.
        (OBJ1): Add terminal.$(O)
 
        * term.c (dissociate_if_controlling_tty) [WINDOWSNT]:
 
 2007-08-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
-       * mac.c [MAC_OSX] (select_and_poll_event, sys_select): Fix last changes.
+       * mac.c [MAC_OSX] (select_and_poll_event, sys_select): Fix last changes.
 
 2007-08-24  Martin Rudalics  <rudalics@gmx.at>
 
index 237c549df8b9f5c790203fee03d8855e814b6f1e..d5f9541301d2168590cbc2239df44ae40f8b6587 100644 (file)
@@ -569,6 +569,7 @@ CLONE nil means the indirect buffer's state is reset to default values.  */)
 
   b = (struct buffer *) allocate_buffer ();
   b->size = sizeof (struct buffer) / sizeof (EMACS_INT);
+  XSETPVECTYPE (b, PVEC_BUFFER);
 
   if (XBUFFER (base_buffer)->base_buffer)
     b->base_buffer = XBUFFER (base_buffer)->base_buffer;
@@ -4233,15 +4234,8 @@ add_overlay_mod_hooklist (functionlist, overlay)
   int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
 
   if (last_overlay_modification_hooks_used == oldsize)
-    {
-      Lisp_Object old;
-      old = last_overlay_modification_hooks;
-      last_overlay_modification_hooks
-       = Fmake_vector (make_number (oldsize * 2), Qnil);
-      bcopy (XVECTOR (old)->contents,
-            XVECTOR (last_overlay_modification_hooks)->contents,
-            sizeof (Lisp_Object) * oldsize);
-    }
+    last_overlay_modification_hooks = larger_vector 
+      (last_overlay_modification_hooks, oldsize * 2, Qnil);
   AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = functionlist;
   AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = overlay;
 }
index d51743c243ab5cc8b8ccdbabe03e57127fcae128..5e4a6632d1dd005811b8cb56c7431a589d3fc39c 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2245,16 +2245,8 @@ Return index number of the registered CCL program.  */)
     }
 
   if (idx == len)
-    {
-      /* Extend the table.  */
-      Lisp_Object new_table;
-      int j;
-
-      new_table = Fmake_vector (make_number (len * 2), Qnil);
-      for (j = 0; j < len; j++)
-       ASET (new_table, j, AREF (Vccl_program_table, j));
-      Vccl_program_table = new_table;
-    }
+    /* Extend the table.  */
+    Vccl_program_table = larger_vector (Vccl_program_table, len * 2, Qnil);
 
   {
     Lisp_Object elt;
@@ -2313,15 +2305,8 @@ Return index number of the registered map.  */)
     }
 
   if (i == len)
-    {
-      Lisp_Object new_vector = Fmake_vector (make_number (len * 2), Qnil);
-      int j;
-
-      for (j = 0; j < len; j++)
-       AREF (new_vector, j)
-         = AREF (Vcode_conversion_map_vector, j);
-      Vcode_conversion_map_vector = new_vector;
-    }
+    Vcode_conversion_map_vector = larger_vector (Vcode_conversion_map_vector,
+                                                len * 2, Qnil);
 
   index = make_number (i);
   Fput (symbol, Qcode_conversion_map, map);
index 6439686dcd9fe36fac0dd32a270445e590607d0b..81cffcb38deee72dda7f45700c203a549ac9a79b 100644 (file)
@@ -663,12 +663,20 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
      (symbol, definition)
      register Lisp_Object symbol, definition;
 {
+  register Lisp_Object function;
+
   CHECK_SYMBOL (symbol);
   if (NILP (symbol) || EQ (symbol, Qt))
     xsignal1 (Qsetting_constant, symbol);
-  if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound))
-    Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function),
-                            Vautoload_queue);
+
+  function = XSYMBOL (symbol)->function;
+
+  if (!NILP (Vautoload_queue) && !EQ (function, Qunbound))
+    Vautoload_queue = Fcons (Fcons (symbol, function), Vautoload_queue);
+
+  if (CONSP (function) && EQ (XCAR (function), Qautoload))
+    Fput (symbol, Qautoload, XCDR (function));
+
   XSYMBOL (symbol)->function = definition;
   /* Handle automatic advice activation */
   if (CONSP (XSYMBOL (symbol)->plist) && !NILP (Fget (symbol, Qad_advice_info)))
@@ -752,7 +760,7 @@ Value, if non-nil, is a list \(interactive SPEC).  */)
      Lisp_Object cmd;
 {
   Lisp_Object fun = indirect_function (cmd); /* Check cycles.  */
-  
+
   if (NILP (fun) || EQ (fun, Qunbound))
     return Qnil;
 
index 32ecee96f607aea3dfc22a5e243c4161c3331d95..e89d0d7e39006566b5079d965f829fe416a799e5 100644 (file)
@@ -680,9 +680,9 @@ struct glyph_row
   short used[LAST_AREA];
 
   /* Window-relative x and y-position of the top-left corner of this
-     row.  If y < 0, this means that abs (y) pixels of the row are
+     row.  If y < 0, this means that eabs (y) pixels of the row are
      invisible because it is partially visible at the top of a window.
-     If x < 0, this means that abs (x) pixels of the first glyph of
+     If x < 0, this means that eabs (x) pixels of the first glyph of
      the text area of the row are invisible because the glyph is
      partially visible.  */
   int x, y;
index ab2c1518dce3a3beca2d22bbc2f9a94a8720738a..79bb81abfebf7e1361fe6d656bcf67fd9fa09ea1 100644 (file)
@@ -1993,7 +1993,7 @@ required_matrix_height (w)
   if (FRAME_WINDOW_P (f))
     {
       int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f);
-      int window_pixel_height = window_box_height (w) + abs (w->vscroll);
+      int window_pixel_height = window_box_height (w) + eabs (w->vscroll);
       return (((window_pixel_height + ch_height - 1)
               / ch_height) * w->nrows_scale_factor
              /* One partially visible line at the top and
index 152c5b669d97e276efb73b475795c90f2c54217c..66e3883494ff0ddd8a37bedd2c9bcd6057fd0072 100644 (file)
@@ -1846,7 +1846,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE)  */)
        tzstring = (char *) SDATA (zone);
       else if (INTEGERP (zone))
        {
-         int abszone = abs (XINT (zone));
+         int abszone = eabs (XINT (zone));
          sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XINT (zone) < 0),
                   abszone / (60*60), (abszone/60) % 60, abszone % 60);
          tzstring = tzbuf;
index 77abe5046dba25d66fe5686d3b4f3446ef8fc88f..b69eea44c75c2ecb7d23c9a4f2fa8f03a0be8be4 100644 (file)
@@ -2178,7 +2178,7 @@ do_autoload (fundef, funname)
      Lisp_Object fundef, funname;
 {
   int count = SPECPDL_INDEX ();
-  Lisp_Object fun, queue, first, second;
+  Lisp_Object fun;
   struct gcpro gcpro1, gcpro2, gcpro3;
 
   /* This is to make sure that loadup.el gives a clear picture
@@ -2199,20 +2199,6 @@ do_autoload (fundef, funname)
   Vautoload_queue = Qt;
   Fload (Fcar (Fcdr (fundef)), Qnil, Qt, Qnil, Qt);
 
-  /* Save the old autoloads, in case we ever do an unload.  */
-  queue = Vautoload_queue;
-  while (CONSP (queue))
-    {
-      first = XCAR (queue);
-      second = Fcdr (first);
-      first = Fcar (first);
-
-      if (SYMBOLP (first) && CONSP (second) && EQ (XCAR (second), Qautoload))
-       Fput (first, Qautoload, (XCDR (second)));
-
-      queue = XCDR (queue);
-    }
-
   /* Once loading finishes, don't undo it.  */
   Vautoload_queue = Qt;
   unbind_to (count, Qnil);
index a9cf53c4913de8a516043adb57ef0274abe33c9e..045e632778ebfeb7abf22980f25dbc6312b0837b 100644 (file)
@@ -859,16 +859,7 @@ make_fontset (frame, name, base)
   while (!NILP (AREF (Vfontset_table, id))) id++;
 
   if (id + 1 == size)
-    {
-      /* We must grow Vfontset_table.  */
-      Lisp_Object tem;
-      int i;
-
-      tem = Fmake_vector (make_number (size + 32), Qnil);
-      for (i = 0; i < size; i++)
-       AREF (tem, i) = AREF (Vfontset_table, i);
-      Vfontset_table = tem;
-    }
+    Vfontset_table = larger_vector (Vfontset_table, size + 32, Qnil);
 
   fontset = Fmake_char_table (Qfontset, Qnil);
 
index 5f4e12cd705bd538cf5f191abc55e052f102ae48..389a94ae3e842afe7688e08176f529c6ab957ac9 100644 (file)
@@ -107,6 +107,7 @@ Lisp_Object Qouter_window_id;
 #endif
 Lisp_Object Qparent_id;
 Lisp_Object Qtitle, Qname;
+Lisp_Object Qexplicit_name;
 Lisp_Object Qunsplittable;
 Lisp_Object Qmenu_bar_lines, Qtool_bar_lines;
 Lisp_Object Qleft_fringe, Qright_fringe;
@@ -3281,6 +3282,7 @@ x_report_frame_params (f, alistptr)
     tem = Qnil;
   else
     XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc);
+  store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
   store_in_alist (alistptr, Qparent_id, tem);
 }
 
@@ -4337,6 +4339,8 @@ syms_of_frame ()
   staticpro (&Qframep);
   Qframe_live_p = intern ("frame-live-p");
   staticpro (&Qframe_live_p);
+  Qexplicit_name = intern ("explicit-name");
+  staticpro (&Qexplicit_name);
   Qheight = intern ("height");
   staticpro (&Qheight);
   Qicon = intern ("icon");
index 16826c425faca393700f7a4d2077c6b614a8433b..33d5e1a9b2d7b52b24b1d7ea75a2d8f40ebb2a9a 100644 (file)
@@ -1984,8 +1984,8 @@ lookup_image (f, spec)
          if (INTEGERP (relief))
            {
              img->relief = XINT (relief);
-             img->hmargin += abs (img->relief);
-             img->vmargin += abs (img->relief);
+             img->hmargin += eabs (img->relief);
+             img->vmargin += eabs (img->relief);
            }
 
          if (! img->background_valid)
@@ -5165,7 +5165,7 @@ x_detect_edges (f, img, matrix, color_adjust)
   int x, y, i, sum;
 
   for (i = sum = 0; i < 9; ++i)
-    sum += abs (matrix[i]);
+    sum += eabs (matrix[i]);
 
 #define COLOR(A, X, Y) ((A) + (Y) * img->width + (X))
 
index 74269c7d40664e19ebd4bd1b8f46edce1161f61d..1190ad11cea0d30eb9890c696693d3c48ca1db50 100644 (file)
@@ -427,7 +427,7 @@ balance_an_interval (i)
          /* Since the left child is longer, there must be one.  */
          new_diff = i->total_length - i->left->total_length
            + RIGHT_TOTAL_LENGTH (i->left) - LEFT_TOTAL_LENGTH (i->left);
-         if (abs (new_diff) >= old_diff)
+         if (eabs (new_diff) >= old_diff)
            break;
          i = rotate_right (i);
          balance_an_interval (i->right);
@@ -437,7 +437,7 @@ balance_an_interval (i)
          /* Since the right child is longer, there must be one.  */
          new_diff = i->total_length - i->right->total_length
            + LEFT_TOTAL_LENGTH (i->right) - RIGHT_TOTAL_LENGTH (i->right);
-         if (abs (new_diff) >= -old_diff)
+         if (eabs (new_diff) >= -old_diff)
            break;
          i = rotate_left (i);
          balance_an_interval (i->left);
index d64091db5067cc37e3ab276a5fddc465ff5a6f00..6d6ba6e0cc0e67d19920106d931ca3c2616bced1 100644 (file)
@@ -160,14 +160,7 @@ int raw_keybuf_count;
 
 #define GROW_RAW_KEYBUF                                                        \
  if (raw_keybuf_count == XVECTOR (raw_keybuf)->size)                   \
-  {                                                                    \
-    int newsize = 2 * XVECTOR (raw_keybuf)->size;                      \
-    Lisp_Object new;                                                   \
-    new = Fmake_vector (make_number (newsize), Qnil);                  \
-    bcopy (XVECTOR (raw_keybuf)->contents, XVECTOR (new)->contents,    \
-          raw_keybuf_count * sizeof (Lisp_Object));                    \
-    raw_keybuf = new;                                                  \
-  }
+   raw_keybuf = larger_vector (raw_keybuf, raw_keybuf_count * 2, Qnil)  \
 
 /* Number of elements of this_command_keys
    that precede this key sequence.  */
@@ -5714,8 +5707,8 @@ make_lispy_event (event)
            fuzz = double_click_fuzz / 8;
 
          is_double = (button == last_mouse_button
-                      && (abs (XINT (event->x) - last_mouse_x) <= fuzz)
-                      && (abs (XINT (event->y) - last_mouse_y) <= fuzz)
+                      && (eabs (XINT (event->x) - last_mouse_x) <= fuzz)
+                      && (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
                       && button_down_time != 0
                       && (EQ (Vdouble_click_time, Qt)
                           || (INTEGERP (Vdouble_click_time)
@@ -5883,8 +5876,8 @@ make_lispy_event (event)
            fuzz = double_click_fuzz / 8;
 
          is_double = (last_mouse_button < 0
-                      && (abs (XINT (event->x) - last_mouse_x) <= fuzz)
-                      && (abs (XINT (event->y) - last_mouse_y) <= fuzz)
+                      && (eabs (XINT (event->x) - last_mouse_x) <= fuzz)
+                      && (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
                       && button_down_time != 0
                       && (EQ (Vdouble_click_time, Qt)
                           || (INTEGERP (Vdouble_click_time)
@@ -7598,13 +7591,7 @@ menu_bar_items (old)
   /* Add nil, nil, nil, nil at the end.  */
   i = menu_bar_items_index;
   if (i + 4 > XVECTOR (menu_bar_items_vector)->size)
-    {
-      Lisp_Object tem;
-      tem = Fmake_vector (make_number (2 * i), Qnil);
-      bcopy (XVECTOR (menu_bar_items_vector)->contents,
-            XVECTOR (tem)->contents, i * sizeof (Lisp_Object));
-      menu_bar_items_vector = tem;
-    }
+    menu_bar_items_vector = larger_vector (menu_bar_items_vector, 2 * i, Qnil);
   /* Add this item.  */
   XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
   XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
@@ -7676,14 +7663,7 @@ menu_bar_item (key, item, dummy1, dummy2)
     {
       /* If vector is too small, get a bigger one.  */
       if (i + 4 > XVECTOR (menu_bar_items_vector)->size)
-       {
-         Lisp_Object tem;
-         tem = Fmake_vector (make_number (2 * i), Qnil);
-         bcopy (XVECTOR (menu_bar_items_vector)->contents,
-                XVECTOR (tem)->contents, i * sizeof (Lisp_Object));
-         menu_bar_items_vector = tem;
-       }
-
+       menu_bar_items_vector = larger_vector (menu_bar_items_vector, 2 * i, Qnil);
       /* Add this item.  */
       XVECTOR (menu_bar_items_vector)->contents[i++] = key;
       XVECTOR (menu_bar_items_vector)->contents[i++]
@@ -8452,16 +8432,9 @@ append_tool_bar_item ()
   /* Enlarge tool_bar_items_vector if necessary.  */
   if (ntool_bar_items + TOOL_BAR_ITEM_NSLOTS
       >= XVECTOR (tool_bar_items_vector)->size)
-    {
-      Lisp_Object new_vector;
-      int old_size = XVECTOR (tool_bar_items_vector)->size;
-
-      new_vector = Fmake_vector (make_number (2 * old_size), Qnil);
-      bcopy (XVECTOR (tool_bar_items_vector)->contents,
-            XVECTOR (new_vector)->contents,
-            old_size * sizeof (Lisp_Object));
-      tool_bar_items_vector = new_vector;
-    }
+    tool_bar_items_vector
+      = larger_vector (tool_bar_items_vector,
+                      2 * XVECTOR (tool_bar_items_vector)->size, Qnil);
 
   /* Append entries from tool_bar_item_properties to the end of
      tool_bar_items_vector.  */
index 50750af3c4f497decd649558927d2920ce9d0e08..231cfcc73790839bcef525a5f5828e600466d49b 100644 (file)
@@ -3368,9 +3368,11 @@ extern Lisp_Object Vdirectory_sep_char;
 #define min(a, b)      ((a) < (b) ? (a) : (b))
 #define max(a, b)      ((a) > (b) ? (a) : (b))
 
-/* Make sure we have abs defined */
-#if !defined(abs)
-#define abs(x)         ((x) < 0 ? -(x) : (x))
+/* We used to use `abs', but that clashes with system headers on some
+   platforms, and using a name reserved by Standard C is a bad idea
+   anyway.  */
+#if !defined(eabs)
+#define eabs(x)         ((x) < 0 ? -(x) : (x))
 #endif
 
 /* Return a fixnum or float, depending on whether VAL fits in a Lisp
index 0330ccd0d441973fa97a866937c0922b6c6a6a27..9a9eb69fa6354f805ce9794ca148863fa56e050c 100644 (file)
@@ -1868,15 +1868,7 @@ x_implicitly_set_name (f, arg, oldval)
 }
 \f
 /* Change the title of frame F to NAME.
-   If NAME is nil, use the frame name as the title.
-
-   If EXPLICIT is non-zero, that indicates that lisp code is setting the
-       name; if NAME is a string, set F's name to NAME and set
-       F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
-
-   If EXPLICIT is zero, that indicates that Emacs redisplay code is
-       suggesting a new name, which lisp code should override; if
-       F->explicit_name is set, ignore the new name; otherwise, set it.  */
+   If NAME is nil, use the frame name as the title.  */
 
 void
 x_set_title (f, name, old_name)
index 8305c89ee68fbcfa1ba27fd0a00f17833068a031..aa0be0bdc2e956014c245f7c98ff8425d4851f8b 100644 (file)
@@ -347,15 +347,8 @@ save_menu_items ()
 static void
 grow_menu_items ()
 {
-  Lisp_Object old;
-  int old_size = menu_items_allocated;
-  old = menu_items;
-
   menu_items_allocated *= 2;
-
-  menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
-  bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
-        old_size * sizeof (Lisp_Object));
+  menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
 }
 
 /* Begin a submenu.  */
index ed7411615f52668fbad7fa99aa2ca49300df098b..a15f0b0fcfc882a0ae9914b1870c9c42b50d62a6 100644 (file)
@@ -2970,7 +2970,7 @@ x_draw_glyph_string_foreground (s)
      of S to the right of that box line.  */
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p)
-    x = s->x + abs (s->face->box_line_width);
+    x = s->x + eabs (s->face->box_line_width);
   else
     x = s->x;
 
@@ -3049,7 +3049,7 @@ x_draw_composite_glyph_string_foreground (s)
      of S to the right of that box line.  */
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p)
-    x = s->x + abs (s->face->box_line_width);
+    x = s->x + eabs (s->face->box_line_width);
   else
     x = s->x;
 
@@ -3544,7 +3544,7 @@ x_draw_glyph_string_box (s)
                ? s->first_glyph
                : s->first_glyph + s->nchars - 1);
 
-  width = abs (s->face->box_line_width);
+  width = eabs (s->face->box_line_width);
   raised_p = s->face->box == FACE_RAISED_BOX;
   left_x = s->x;
   right_x = (s->row->full_width_p && s->extends_to_end_of_line_p
@@ -3590,7 +3590,7 @@ x_draw_image_foreground (s)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -3663,7 +3663,7 @@ x_draw_image_relief (s)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -3680,7 +3680,7 @@ x_draw_image_relief (s)
     }
   else
     {
-      thick = abs (s->img->relief);
+      thick = eabs (s->img->relief);
       raised_p = s->img->relief > 0;
     }
 
@@ -3741,7 +3741,7 @@ x_draw_image_glyph_string (s)
      struct glyph_string *s;
 {
   int x, y;
-  int box_line_hwidth = abs (s->face->box_line_width);
+  int box_line_hwidth = eabs (s->face->box_line_width);
   int box_line_vwidth = max (s->face->box_line_width, 0);
   int height;
 
index 02bd2748b8f0e02d121525d217807ca8072abe7f..2e3ce3cf146c79b324af8aa758e0cd8498ac8c68 100644 (file)
@@ -3393,13 +3393,7 @@ dos_rawgetc ()
                 it is active.  */
              if (WINDOWP (mouse_window)
                  && !EQ (mouse_window, last_mouse_window)
-                 && !EQ (window, selected_window)
-                 /* For click-to-focus window managers
-                    create event iff we don't leave the
-                    selected frame.  */
-                 && (focus_follows_mouse
-                     || (EQ (XWINDOW (window)->frame,
-                             XWINDOW (selected_window)->frame))))
+                 && !EQ (mouse_window, selected_window))
                {
                  event.kind = SELECT_WINDOW_EVENT;
                  event.frame_or_window = mouse_window;
index 1fbde99f30683ed16d5ca4ef733f16bc3623a8e7..74b2a0ed655dd813144950c3cdbe99f4c63ddccd 100644 (file)
@@ -1940,15 +1940,7 @@ x_implicitly_set_name (f, arg, oldval)
 }
 \f
 /* Change the title of frame F to NAME.
-   If NAME is nil, use the frame name as the title.
-
-   If EXPLICIT is non-zero, that indicates that lisp code is setting the
-       name; if NAME is a string, set F's name to NAME and set
-       F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
-
-   If EXPLICIT is zero, that indicates that Emacs redisplay code is
-       suggesting a new name, which lisp code should override; if
-       F->explicit_name is set, ignore the new name; otherwise, set it.  */
+   If NAME is nil, use the frame name as the title.  */
 
 void
 x_set_title (f, name, old_name)
@@ -5488,9 +5480,9 @@ w32_to_x_font (lplogfont, lpxstr, len, specific_charset)
 
   if (lplogfont->lfHeight)
     {
-      sprintf (height_pixels, "%u", abs (lplogfont->lfHeight));
+      sprintf (height_pixels, "%u", eabs (lplogfont->lfHeight));
       sprintf (height_dpi, "%u",
-              abs (lplogfont->lfHeight) * 720 / display_resy);
+              eabs (lplogfont->lfHeight) * 720 / display_resy);
     }
   else
     {
@@ -5713,7 +5705,7 @@ x_to_w32_font (lpxstr, lplogfont)
     }
 
   /* This makes TrueType fonts work better. */
-  lplogfont->lfHeight = - abs (lplogfont->lfHeight);
+  lplogfont->lfHeight = - eabs (lplogfont->lfHeight);
 
   return (TRUE);
 }
index d4c92d4dcd54075c31e46f390970a33afad7a21c..986832b3e7c14bf42bf1afc5bd3344c4c6fd0b3d 100644 (file)
@@ -319,14 +319,8 @@ discard_menu_items ()
 static void
 grow_menu_items ()
 {
-  Lisp_Object old;
-  int old_size = menu_items_allocated;
-  old = menu_items;
-
   menu_items_allocated *= 2;
-  menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
-  bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
-        old_size * sizeof (Lisp_Object));
+  menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
 }
 
 /* Begin a submenu.  */
index a7fca780d3c26a9877a1c0bc5f71bb347cedf7e7..f174d25720add024816b2eca582e9d69de0ad084 100644 (file)
@@ -1143,7 +1143,8 @@ w32_cache_char_metrics (font)
 
 
 /* Determine if a font is double byte. */
-int w32_font_is_double_byte (XFontStruct *font)
+static int
+w32_font_is_double_byte (XFontStruct *font)
 {
   return font->double_byte_p;
 }
@@ -1869,7 +1870,7 @@ x_draw_glyph_string_foreground (s)
      of S to the right of that box line.  */
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p)
-    x = s->x + abs (s->face->box_line_width);
+    x = s->x + eabs (s->face->box_line_width);
   else
     x = s->x;
 
@@ -1961,7 +1962,7 @@ x_draw_composite_glyph_string_foreground (s)
      of S to the right of that box line.  */
   if (s->face && s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p)
-    x = s->x + abs (s->face->box_line_width);
+    x = s->x + eabs (s->face->box_line_width);
   else
     x = s->x;
 
@@ -2349,7 +2350,7 @@ x_draw_glyph_string_box (s)
                ? s->first_glyph
                : s->first_glyph + s->nchars - 1);
 
-  width = abs (s->face->box_line_width);
+  width = eabs (s->face->box_line_width);
   raised_p = s->face->box == FACE_RAISED_BOX;
   left_x = s->x;
   right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p
@@ -2395,7 +2396,7 @@ x_draw_image_foreground (s)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -2488,7 +2489,7 @@ x_draw_image_relief (s)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -2505,7 +2506,7 @@ x_draw_image_relief (s)
     }
   else
     {
-      thick = abs (s->img->relief);
+      thick = eabs (s->img->relief);
       raised_p = s->img->relief > 0;
     }
 
@@ -2542,7 +2543,7 @@ w32_draw_image_foreground_1 (s, pixmap)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -2654,7 +2655,7 @@ x_draw_image_glyph_string (s)
      struct glyph_string *s;
 {
   int x, y;
-  int box_line_hwidth = abs (s->face->box_line_width);
+  int box_line_hwidth = eabs (s->face->box_line_width);
   int box_line_vwidth = max (s->face->box_line_width, 0);
   int height;
   HBITMAP pixmap = 0;
@@ -4023,7 +4024,7 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole)
                         Scroll bars, general
  ************************************************************************/
 
-HWND
+static HWND
 my_create_scrollbar (f, bar)
      struct frame * f;
      struct scroll_bar * bar;
@@ -4637,7 +4638,7 @@ static short temp_buffer[100];
 
    Some of these messages are reposted back to the message queue since the
    system calls the windows proc directly in a context where we cannot return
-   the data nor can we guarantee the state we are in.  So if we dispatch  them
+   the data nor can we guarantee the state we are in.  So if we dispatch them
    we will get into an infinite loop.  To prevent this from ever happening we
    will set a variable to indicate we are in the read_socket call and indicate
    which message we are processing since the windows proc gets called
@@ -6097,7 +6098,22 @@ x_set_window_size (f, change_gravity, cols, rows)
                       SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
   }
 
-  /* Now, strictly speaking, we can't be sure that this is accurate,
+#if 0
+  /* The following mirrors what is done in xterm.c. It appears to be
+     for informing lisp of the new size immediately, while the actual
+     resize will happen asynchronously. But on Windows, the menu bar
+     automatically wraps when the frame is too narrow to contain it,
+     and that causes any calculations made here to come out wrong. The
+     end is some nasty buggy behaviour, including the potential loss
+     of the minibuffer.
+
+     Disabling this code is either not sufficient to fix the problems
+     completely, or it causes fresh problems, but at least it removes
+     the most problematic symptom of the minibuffer becoming unusable.
+
+     -----------------------------------------------------------------
+
+     Now, strictly speaking, we can't be sure that this is accurate,
      but the window manager will get around to dealing with the size
      change request eventually, and we'll hear how it went when the
      ConfigureNotify event gets here.
@@ -6128,6 +6144,7 @@ x_set_window_size (f, change_gravity, cols, rows)
      Actually checking whether it is outside is a pain in the neck,
      so don't try--just let the highlighting be done afresh with new size.  */
   cancel_mouse_face (f);
+#endif
 
   UNBLOCK_INPUT;
 }
@@ -6714,7 +6731,7 @@ w32_initialize_display_info (display_name)
 
 /* Create an xrdb-style database of resources to supercede registry settings.
    The database is just a concatenation of C strings, finished by an additional
-   \0.  The string are submitted to some basic normalization, so
+   \0.  The strings are submitted to some basic normalization, so
 
      [ *]option[ *]:[ *]value...
 
@@ -7186,7 +7203,7 @@ interpreted normally.  */);
 Unicode output may prevent some third party applications for displaying
 Far-East Languages on Windows 95/98 from working properly.
 NT uses Unicode internally anyway, so this flag will probably have no
-affect on NT machines.  */);
+effect on NT machines.  */);
   w32_enable_unicode_output = 1;
 
   DEFVAR_BOOL ("w32-use-visible-system-caret",
index c51649679da97afc2fb9e33c1f635e992c13473f..2fd4d286eba64334cfe8e595f63af2133589f01d 100644 (file)
@@ -799,7 +799,7 @@ coordinates_in_window (w, x, y)
       if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
          || WINDOW_RIGHTMOST_P (w))
        {
-         if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width)
+         if (!WINDOW_LEFTMOST_P (w) && eabs (*x - x0) < grabbable_width)
            {
              /* Convert X and Y to window relative coordinates.
                 Vertical border is at the left edge of window.  */
@@ -810,7 +810,7 @@ coordinates_in_window (w, x, y)
        }
       else
        {
-         if (abs (*x - x1) < grabbable_width)
+         if (eabs (*x - x1) < grabbable_width)
            {
              /* Convert X and Y to window relative coordinates.
                 Vertical border is at the right edge of window.  */
@@ -858,7 +858,7 @@ coordinates_in_window (w, x, y)
       if (!w->pseudo_window_p
          && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
          && !WINDOW_RIGHTMOST_P (w)
-         && (abs (*x - right_x) < grabbable_width))
+         && (eabs (*x - right_x) < grabbable_width))
        {
          /* Convert X and Y to window relative coordinates.
             Vertical border is at the right edge of window.  */
@@ -5497,7 +5497,7 @@ scroll_command (n, direction)
 {
   int count = SPECPDL_INDEX ();
 
-  xassert (abs (direction) == 1);
+  xassert (eabs (direction) == 1);
 
   /* If selected window's buffer isn't current, make it current for
      the moment.  But don't screw up if window_scroll gets an error.  */
index 746fa2540f9899f9763dd31e9b7b95432f806a80..fef50689ab536e03a582cb1b533d57696e2964c8 100644 (file)
@@ -3724,6 +3724,10 @@ handle_invisible_prop (it)
                  it->position.bytepos = CHAR_TO_BYTE (it->position.charpos);
                }
               setup_for_ellipsis (it, 0);
+             /* Let the ellipsis display before
+                considering any properties of the following char.
+                Fixes jasonr@gnu.org 01 Oct 07 bug.  */
+             handled = HANDLED_RETURN;
             }
        }
     }
@@ -12625,7 +12629,7 @@ compute_window_start_on_continuation_line (w)
             minimum distance from the old window start.  */
          pos = it.current.pos;
          min_distance = INFINITY;
-         while ((distance = abs (CHARPOS (start_pos) - IT_CHARPOS (it))),
+         while ((distance = eabs (CHARPOS (start_pos) - IT_CHARPOS (it))),
                 distance < min_distance)
            {
              min_distance = distance;
@@ -20291,9 +20295,9 @@ produce_image_glyph (it)
        }
 
       if (it->start_of_box_run_p && slice.x == 0)
-       it->pixel_width += abs (face->box_line_width);
+       it->pixel_width += eabs (face->box_line_width);
       if (it->end_of_box_run_p && slice.x + slice.width == img->width)
-       it->pixel_width += abs (face->box_line_width);
+       it->pixel_width += eabs (face->box_line_width);
     }
 
   take_vertical_position_into_account (it);
@@ -22610,8 +22614,8 @@ fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p)
                goto found;
              }
            else if (best_glyph == NULL
-                    || ((abs (g->charpos - pos)
-                        < abs (best_glyph->charpos - pos))
+                    || ((eabs (g->charpos - pos)
+                        < eabs (best_glyph->charpos - pos))
                         && (right_p
                             ? g->charpos < pos
                             : g->charpos > pos)))
index d3e7a105b60ea788633b4ffee6b3075f8f2930c4..50d733c7d0b39f8686486e76bd8c4f864026734c 100644 (file)
@@ -1501,11 +1501,11 @@ face_color_gray_p (f, color_name)
     gray_p = (/* Any color sufficiently close to black counts as grey.  */
              (color.red < 5000 && color.green < 5000 && color.blue < 5000)
              ||
-             ((abs (color.red - color.green)
+             ((eabs (color.red - color.green)
                < max (color.red, color.green) / 20)
-              && (abs (color.green - color.blue)
+              && (eabs (color.green - color.blue)
                   < max (color.green, color.blue) / 20)
-              && (abs (color.blue - color.red)
+              && (eabs (color.blue - color.red)
                   < max (color.blue, color.red) / 20)));
   else
     gray_p = 0;
@@ -2838,7 +2838,7 @@ cmp_font_names (a, b)
          int resy = FRAME_X_DISPLAY_INFO (font_frame)->resy;
          int x_resy = x->numeric[XLFD_RESY];
          int y_resy = y->numeric[XLFD_RESY];
-         cmp = abs (resy - x_resy) - abs (resy - y_resy);
+         cmp = eabs (resy - x_resy) - eabs (resy - y_resy);
        }
     }
 
@@ -6198,7 +6198,7 @@ smaller_face (f, face_id, steps)
 
   /* Try in increments of 1/2 pt.  */
   delta = steps < 0 ? 5 : -5;
-  steps = abs (steps);
+  steps = eabs (steps);
 
   face = FACE_FROM_ID (f, face_id);
   bcopy (face->lface, attrs, sizeof attrs);
@@ -6209,7 +6209,7 @@ smaller_face (f, face_id, steps)
   while (steps
         && pt + delta > 0
         /* Give up if we cannot find a font within 10pt.  */
-        && abs (last_pt - pt) < 100)
+        && eabs (last_pt - pt) < 100)
     {
       /* Look up a face for a slightly smaller/larger font.  */
       pt += delta;
@@ -6822,17 +6822,17 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth)
 
          if (xlfd_idx == XLFD_POINT_SIZE)
            {
-             delta1 = abs (values[i] - (font1->numeric[xlfd_idx]
+             delta1 = eabs (values[i] - (font1->numeric[xlfd_idx]
                                         / font1->rescale_ratio));
-             delta2 = abs (values[i] - (font2->numeric[xlfd_idx]
+             delta2 = eabs (values[i] - (font2->numeric[xlfd_idx]
                                         / font2->rescale_ratio));
-             if (abs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM)
+             if (eabs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM)
                continue;
            }
          else
            {
-             delta1 = abs (values[i] - font1->numeric[xlfd_idx]);
-             delta2 = abs (values[i] - font2->numeric[xlfd_idx]);
+             delta1 = eabs (values[i] - font1->numeric[xlfd_idx]);
+             delta2 = eabs (values[i] - font2->numeric[xlfd_idx]);
            }
 
          if (delta1 > delta2)
@@ -6854,8 +6854,8 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth)
 
   if (avgwidth)
     {
-      int delta1 = abs (avgwidth - font1->numeric[XLFD_AVGWIDTH]);
-      int delta2 = abs (avgwidth - font2->numeric[XLFD_AVGWIDTH]);
+      int delta1 = eabs (avgwidth - font1->numeric[XLFD_AVGWIDTH]);
+      int delta2 = eabs (avgwidth - font2->numeric[XLFD_AVGWIDTH]);
       if (delta1 > delta2)
        return 0;
       else if (delta1 < delta2)
index 54d637d859b20ab96c76bdc0a1c39b13c6de9137..8d21a69461a45005a7a3bf2ac40b40caf25930d2 100644 (file)
@@ -1760,15 +1760,7 @@ x_implicitly_set_name (f, arg, oldval)
 }
 \f
 /* Change the title of frame F to NAME.
-   If NAME is nil, use the frame name as the title.
-
-   If EXPLICIT is non-zero, that indicates that lisp code is setting the
-       name; if NAME is a string, set F's name to NAME and set
-       F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
-
-   If EXPLICIT is zero, that indicates that Emacs redisplay code is
-       suggesting a new name, which lisp code should override; if
-       F->explicit_name is set, ignore the new name; otherwise, set it.  */
+   If NAME is nil, use the frame name as the title.  */
 
 void
 x_set_title (f, name, old_name)
@@ -5180,6 +5172,26 @@ else
     Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt),
                                            Qnil));
 
+  /* FIXME - can this be done in a similar way to normal frames?
+     http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */
+
+  /* Set the `display-type' frame parameter before setting up faces. */
+  {
+    Lisp_Object disptype;
+
+    if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1)
+      disptype = intern ("mono");
+    else if (FRAME_X_DISPLAY_INFO (f)->visual->class == GrayScale
+             || FRAME_X_DISPLAY_INFO (f)->visual->class == StaticGray)
+      disptype = intern ("grayscale");
+    else
+      disptype = intern ("color");
+
+    if (NILP (Fframe_parameter (frame, Qdisplay_type)))
+      Fmodify_frame_parameters (frame, Fcons (Fcons (Qdisplay_type, disptype),
+                                              Qnil));
+  }
+
   /* Set up faces after all frame parameters are known.  This call
      also merges in face attributes specified for new frames.
 
index 4e7f07c375a7500234b867af0e3edca687ab64a6..15aab98f9c5eadde96cc1321f2d9e3eac7f2001e 100644 (file)
@@ -354,15 +354,8 @@ save_menu_items ()
 static void
 grow_menu_items ()
 {
-  Lisp_Object old;
-  int old_size = menu_items_allocated;
-  old = menu_items;
-
   menu_items_allocated *= 2;
-
-  menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
-  bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
-        old_size * sizeof (Lisp_Object));
+  menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
 }
 
 /* Begin a submenu.  */
index a1beab492eee7f29f3524706e75c9502b3d1c07c..68670795fa374210a13b4b7657c296d9057cf2c4 100644 (file)
@@ -1401,7 +1401,7 @@ x_draw_glyph_string_foreground (s)
      of S to the right of that box line.  */
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p)
-    x = s->x + abs (s->face->box_line_width);
+    x = s->x + eabs (s->face->box_line_width);
   else
     x = s->x;
 
@@ -1503,7 +1503,7 @@ x_draw_composite_glyph_string_foreground (s)
      of S to the right of that box line.  */
   if (s->face && s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p)
-    x = s->x + abs (s->face->box_line_width);
+    x = s->x + eabs (s->face->box_line_width);
   else
     x = s->x;
 
@@ -2357,7 +2357,7 @@ x_draw_glyph_string_box (s)
                ? s->first_glyph
                : s->first_glyph + s->nchars - 1);
 
-  width = abs (s->face->box_line_width);
+  width = eabs (s->face->box_line_width);
   raised_p = s->face->box == FACE_RAISED_BOX;
   left_x = s->x;
   right_x = (s->row->full_width_p && s->extends_to_end_of_line_p
@@ -2403,7 +2403,7 @@ x_draw_image_foreground (s)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -2496,7 +2496,7 @@ x_draw_image_relief (s)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -2513,7 +2513,7 @@ x_draw_image_relief (s)
     }
   else
     {
-      thick = abs (s->img->relief);
+      thick = eabs (s->img->relief);
       raised_p = s->img->relief > 0;
     }
 
@@ -2548,7 +2548,7 @@ x_draw_image_foreground_1 (s, pixmap)
   if (s->face->box != FACE_NO_BOX
       && s->first_glyph->left_box_line_p
       && s->slice.x == 0)
-    x += abs (s->face->box_line_width);
+    x += eabs (s->face->box_line_width);
 
   /* If there is a margin around the image, adjust x- and y-position
      by that margin.  */
@@ -2648,7 +2648,7 @@ static void
 x_draw_image_glyph_string (s)
      struct glyph_string *s;
 {
-  int box_line_hwidth = abs (s->face->box_line_width);
+  int box_line_hwidth = eabs (s->face->box_line_width);
   int box_line_vwidth = max (s->face->box_line_width, 0);
   int height;
   Pixmap pixmap = None;
@@ -4630,7 +4630,7 @@ xaw_jump_callback (widget, client_data, call_data)
   whole = 10000000;
   portion = shown < 1 ? top * whole : 0;
 
-  if (shown < 1 && (abs (top + shown - 1) < 1.0/height))
+  if (shown < 1 && (eabs (top + shown - 1) < 1.0/height))
     /* Some derivatives of Xaw refuse to shrink the thumb when you reach
        the bottom, so we force the scrolling whenever we see that we're
        too close to the bottom (in x_set_toolkit_scroll_bar_thumb
@@ -4671,12 +4671,12 @@ xaw_scroll_callback (widget, client_data, call_data)
   XtVaGetValues (widget, XtNheight, &height, NULL);
   UNBLOCK_INPUT;
 
-  if (abs (position) >= height)
+  if (eabs (position) >= height)
     part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle;
 
   /* If Xaw3d was compiled with ARROW_SCROLLBAR,
      it maps line-movement to call_data = max(5, height/20).  */
-  else if (xaw3d_arrow_scroll && abs (position) <= max (5, height / 20))
+  else if (xaw3d_arrow_scroll && eabs (position) <= max (5, height / 20))
     part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow;
   else
     part = scroll_bar_move_ratio;
@@ -9044,7 +9044,8 @@ x_sync_with_move (f, left, top, fuzzy)
           /* The left fuzz-factor is 10 pixels.  The top fuzz-factor is 40
              pixels.  */
 
-          if (abs (current_left - left) <= 10 && abs (current_top - top) <= 40)
+          if (eabs (current_left - left) <= 10
+             && eabs (current_top - top) <= 40)
             return;
   }
       else if (current_left == left && current_top == top)