aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2007-10-15 05:03:21 +0000
committerMiles Bader2007-10-15 05:03:21 +0000
commit63655c83146b773b4ef3d9220b4a9d61545fd050 (patch)
tree2161d262bba2c99b0db2ed8b322eddcafeadd247
parentce8f7ca45fabe11ce32a9ced2b8e7c1987c0d997 (diff)
parentb2529d56b5126319a1659dc1530d6fc102cc21d6 (diff)
downloademacs-63655c83146b773b4ef3d9220b4a9d61545fd050.tar.gz
emacs-63655c83146b773b4ef3d9220b4a9d61545fd050.zip
Merge from emacs--devo--0
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
-rw-r--r--admin/FOR-RELEASE10
-rw-r--r--doc/emacs/ChangeLog9
-rw-r--r--doc/emacs/display.texi8
-rw-r--r--doc/emacs/files.texi20
-rw-r--r--doc/lispref/ChangeLog22
-rw-r--r--doc/lispref/commands.texi104
-rw-r--r--doc/lispref/display.texi105
-rw-r--r--doc/lispref/elisp.texi11
-rw-r--r--doc/lispref/text.texi14
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/ChangeLog138
-rw-r--r--lisp/comint.el2
-rw-r--r--lisp/cus-start.el2
-rw-r--r--lisp/dired.el13
-rw-r--r--lisp/emacs-lisp/advice.el35
-rw-r--r--lisp/emacs-lisp/debug.el1
-rw-r--r--lisp/emacs-lisp/edebug.el44
-rw-r--r--lisp/emacs-lisp/ring.el72
-rw-r--r--lisp/faces.el35
-rw-r--r--lisp/files.el7
-rw-r--r--lisp/frame.el19
-rw-r--r--lisp/help-fns.el18
-rw-r--r--lisp/loadhist.el18
-rw-r--r--lisp/progmodes/ebrowse.el1
-rw-r--r--lisp/progmodes/etags.el3
-rw-r--r--lisp/progmodes/gdb-ui.el120
-rw-r--r--lisp/progmodes/idlwave.el12
-rw-r--r--lisp/progmodes/octave-mod.el41
-rw-r--r--lisp/startup.el29
-rw-r--r--lisp/textmodes/ispell.el16
-rw-r--r--lisp/textmodes/reftex-sel.el6
-rw-r--r--lisp/url/ChangeLog19
-rw-r--r--lisp/url/url-auth.el44
-rw-r--r--lisp/url/url-expand.el3
-rw-r--r--lisp/url/url-util.el20
-rw-r--r--lisp/woman.el2
-rw-r--r--src/ChangeLog49
-rw-r--r--src/buffer.c12
-rw-r--r--src/ccl.c23
-rw-r--r--src/data.c16
-rw-r--r--src/dispextern.h4
-rw-r--r--src/dispnew.c2
-rw-r--r--src/editfns.c2
-rw-r--r--src/eval.c16
-rw-r--r--src/fontset.c11
-rw-r--r--src/frame.c4
-rw-r--r--src/image.c6
-rw-r--r--src/intervals.c4
-rw-r--r--src/keyboard.c47
-rw-r--r--src/lisp.h8
-rw-r--r--src/macfns.c10
-rw-r--r--src/macmenu.c9
-rw-r--r--src/macterm.c14
-rw-r--r--src/msdos.c8
-rw-r--r--src/w32fns.c16
-rw-r--r--src/w32menu.c8
-rw-r--r--src/w32term.c45
-rw-r--r--src/window.c8
-rw-r--r--src/xdisp.c14
-rw-r--r--src/xfaces.c26
-rw-r--r--src/xfns.c30
-rw-r--r--src/xmenu.c9
-rw-r--r--src/xterm.c25
63 files changed, 864 insertions, 589 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 56a9d3f9981..8ad2fc3ae50 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -36,13 +36,6 @@ to the hack introduced on 2005-07-01 to fix some other Cleartype problem.
36** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem on Cygwin. 36** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem on Cygwin.
37 (Did we decide that is unreproducible?) 37 (Did we decide that is unreproducible?)
38 38
39** set-frame-size for frame without minibuffer loses mode line
40Probably a Windows only bug. Reported by Drew Adams on bug-gnu-emacs on
412007-08-07. It seems that the bug manifests itself only if resizing the
42frame makes the menu bar wrap before. On 2007-08-16 Glenn Morris
43reported on emacs-devel that he was not able to reproduce the bug on a
44GNU/Linux system.
45
46* BUGS WAITING FOR MORE USER INPUT 39* BUGS WAITING FOR MORE USER INPUT
47 40
48** raman@users.sf.net, sep 7: Emacs 23.0.50: Segfaults in alloc.c (batch process) 41** 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
87** tromey@redhat.com: two View-mode "quit" bugs 80** tromey@redhat.com: two View-mode "quit" bugs
88http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00103.html 81http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00103.html
89 82
83** rms: gnus-dired.el is a mistake. Those features should not
84be part of Gnus. They should be moved to some other part of Emacs.
85
90* DOCUMENTATION 86* DOCUMENTATION
91 87
92** Check the Emacs Tutorial. 88** Check the Emacs Tutorial.
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 279a9a47ec3..9d5e6158f3f 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,7 @@
12007-10-13 Eric S. Raymond <esr@snark.thyrsus.com>
2
3 * files.texi: Capitalize node names according to convention.
4
12007-10-13 Glenn Morris <rgm@gnu.org> 52007-10-13 Glenn Morris <rgm@gnu.org>
2 6
3 * misc.texi (Interactive Shell): Correct INSIDE_EMACS reference. 7 * misc.texi (Interactive Shell): Correct INSIDE_EMACS reference.
@@ -23,6 +27,11 @@
23 * files.texi (Version Systems): Describe newer VCses. 27 * files.texi (Version Systems): Describe newer VCses.
24 Reorder the descriptions to be chronological. 28 Reorder the descriptions to be chronological.
25 29
302007-10-09 Richard Stallman <rms@gnu.org>
31
32 * display.texi (Cursor Display): Correct how cursor appears
33 in nonselected windows.
34
262007-10-04 Nick Roberts <nickrob@snap.net.nz> 352007-10-04 Nick Roberts <nickrob@snap.net.nz>
27 36
28 * building.texi (GDB Graphical Interface): Remove references to gdba 37 * building.texi (GDB Graphical Interface): Remove references to gdba
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index d4d2945d584..5e1e0056592 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1116,12 +1116,12 @@ doesn't switch, so it uses the normal cursor.
1116 1116
1117@cindex cursor in non-selected windows 1117@cindex cursor in non-selected windows
1118@vindex cursor-in-non-selected-windows 1118@vindex cursor-in-non-selected-windows
1119 Normally, the cursor appears in non-selected windows in the ``off'' 1119 Normally, the cursor appears in non-selected windows without
1120state, with the same appearance as when the blinking cursor blinks 1120blinking, with the same appearance as when the blinking cursor blinks
1121``off.'' For a box cursor, this is a hollow box; for a bar cursor, 1121``off.'' For a box cursor, this is a hollow box; for a bar cursor,
1122this is a thinner bar. To turn off cursors in non-selected windows, 1122this is a thinner bar. To turn off cursors in non-selected windows,
1123customize the variable @code{cursor-in-non-selected-windows} and assign 1123customize the variable @code{cursor-in-non-selected-windows} and
1124it a @code{nil} value. 1124assign it a @code{nil} value.
1125 1125
1126@vindex x-stretch-cursor 1126@vindex x-stretch-cursor
1127@cindex wide block cursor 1127@cindex wide block cursor
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 78c72dac330..80feaea2340 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1595,15 +1595,15 @@ system, but is usually not excessive.
1595@subsection Basic Editing under Version Control 1595@subsection Basic Editing under Version Control
1596 1596
1597@menu 1597@menu
1598* Selecting a fileset:: Choosing a set of files to operate on 1598* Selecting A Fileset:: Choosing a set of files to operate on
1599* Doing the next logical thing:: Stepping forward in the development cycle 1599* Doing The Right Thing:: Stepping forward in the development cycle
1600* VC with a locking VCS:: RCS in its default mode, SCCS, and optionally CVS. 1600* VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS.
1601* VC with a merging VCS:: Without locking: default mode for CVS. 1601* VC With A Merging VCS:: Without locking: default mode for CVS.
1602* Advanced C-x v v:: Advanced features available with a prefix argument. 1602* Advanced C-x v v:: Advanced features available with a prefix argument.
1603* Log Buffer:: Features available in log entry buffers. 1603* Log Buffer:: Features available in log entry buffers.
1604@end menu 1604@end menu
1605 1605
1606@node Selecting a fileset 1606@node Selecting A Fileset
1607@subsubsection Choosing the scope of your command 1607@subsubsection Choosing the scope of your command
1608 1608
1609@cindex filesets 1609@cindex filesets
@@ -1638,7 +1638,7 @@ marked files, but did not pass them to the version-control backends as
1638a group. Now it does, which enables VC to drive changeset-based 1638a group. Now it does, which enables VC to drive changeset-based
1639version-control systems. 1639version-control systems.
1640 1640
1641@node Doing the next logical thing 1641@node Doing The Right Thing
1642@subsubsection Performing the next operation in the development cycle 1642@subsubsection Performing the next operation in the development cycle
1643 1643
1644 The principal VC command is an all-purpose command that performs 1644 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
1667achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only} 1667achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only}
1668in your @file{~/.emacs} file. (@xref{Init Rebinding}.) 1668in your @file{~/.emacs} file. (@xref{Init Rebinding}.)
1669 1669
1670@node VC with a locking VCS 1670@node VC With A Locking VCS
1671@subsubsection Basic Version Control with Locking 1671@subsubsection Basic Version Control with Locking
1672 1672
1673 If locking is used for the file (as with SCCS, and RCS in its default 1673 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.
1698 These rules also apply when you use CVS in locking mode, except 1698 These rules also apply when you use CVS in locking mode, except
1699that there is no such thing as stealing a lock. 1699that there is no such thing as stealing a lock.
1700 1700
1701@node VC with a merging VCS 1701@node VC With A Merging VCS
1702@subsubsection Basic Version Control with Merging 1702@subsubsection Basic Version Control with Merging
1703 1703
1704 When your version-control system is merging-based rather than 1704 When your version-control system is merging-based rather than
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 5c4f9159066..d95597e940b 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,25 @@
12007-10-13 Karl Berry <karl@gnu.org>
2
3 * elisp.texi (@dircategory): Move to after @copying,
4 since we want @copying as close as possible to the beginning of
5 the output.
6
72007-10-12 Richard Stallman <rms@gnu.org>
8
9 * elisp.texi (Top): Add Distinguish Interactive to subnode menu.
10
11 * commands.texi (Distinguish Interactive): New node,
12 broken out from Interactive Call and rewritten.
13 (Command Loop): Put Distinguish Interactive in menu.
14
152007-10-09 Richard Stallman <rms@gnu.org>
16
17 * text.texi (Examining Properties): Mention overlay priority.
18
19 * display.texi (Display Margins): Correct the description
20 of margin display specifications.
21 (Replacing Specs): New subnode broken out of Display Property.
22
12007-10-06 Juri Linkov <juri@jurta.org> 232007-10-06 Juri Linkov <juri@jurta.org>
2 24
3 * text.texi (Filling): Document fill-paragraph-or-region. 25 * text.texi (Filling): Document fill-paragraph-or-region.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index aaad7ca82a7..cdd627f6b52 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -18,6 +18,7 @@ are done, and the subroutines that allow Lisp programs to do them.
18* Command Overview:: How the command loop reads commands. 18* Command Overview:: How the command loop reads commands.
19* Defining Commands:: Specifying how a function should read arguments. 19* Defining Commands:: Specifying how a function should read arguments.
20* Interactive Call:: Calling a command, so that it will read arguments. 20* Interactive Call:: Calling a command, so that it will read arguments.
21* Distinguish Interactive:: Making a command distinguish interactive calls.
21* Command Loop Info:: Variables set by the command loop for you to examine. 22* Command Loop Info:: Variables set by the command loop for you to examine.
22* Adjusting Point:: Adjustment of point after a command. 23* Adjusting Point:: Adjustment of point after a command.
23* Input Events:: What input looks like when you read it. 24* Input Events:: What input looks like when you read it.
@@ -635,42 +636,74 @@ part of the prompt.
635@end example 636@end example
636@end deffn 637@end deffn
637 638
638@defun interactive-p 639@node Distinguish Interactive
639This function returns @code{t} if the containing function (the one 640@section Distinguish Interactive Calls
640whose code includes the call to @code{interactive-p}) was called in 641
641direct response to user input. This means that it was called with the 642 Sometimes a command should display additional visual feedback (such
642function @code{call-interactively}, and that a keyboard macro is 643as an informative message in the echo area) for interactive calls
643not running, and that Emacs is not running in batch mode. 644only. There are three ways to do this. The recommended way to test
645whether the function was called using @code{call-interactively} is to
646give it an optional argument @code{print-message} and use the
647@code{interactive} spec to make it non-@code{nil} in interactive
648calls. Here's an example:
649
650@example
651(defun foo (&optional print-message)
652 (interactive "p")
653 (when print-message
654 (message "foo")))
655@end example
656
657@noindent
658We use @code{"p"} because the numeric prefix argument is never
659@code{nil}. Defined in this way, the function does display the
660message when called from a keyboard macro.
661
662 The above method with the additional argument is usually best,
663because it allows callers to say ``treat this call as interactive.''
664But you can also do the job in a simpler way by testing
665@code{called-interactively-p}.
666
667@defun called-interactively-p
668This function returns @code{t} when the calling function was called
669using @code{call-interactively}.
644 670
645If the containing function was called by Lisp evaluation (or with 671If the containing function was called by Lisp evaluation (or with
646@code{apply} or @code{funcall}), then it was not called interactively. 672@code{apply} or @code{funcall}), then it was not called interactively.
647@end defun 673@end defun
648 674
649 The most common use of @code{interactive-p} is for deciding whether 675 Here's an example of using @code{called-interactively-p}:
650to give the user additional visual feedback (such as by printing an
651informative message). For example:
652 676
653@example 677@example
654@group 678@group
655;; @r{Here's the usual way to use @code{interactive-p}.}
656(defun foo () 679(defun foo ()
657 (interactive) 680 (interactive)
658 (when (interactive-p) 681 (when (called-interactively-p)
659 (message "foo"))) 682 (message "foo"))
683 'haha)
660 @result{} foo 684 @result{} foo
661@end group 685@end group
662 686
663@group 687@group
664;; @r{This function is just to illustrate the behavior.} 688;; @r{Type @kbd{M-x foo}.}
665(defun bar () 689 @print{} foo
666 (interactive)
667 (setq foobar (list (foo) (interactive-p))))
668 @result{} bar
669@end group 690@end group
670 691
671@group 692@group
672;; @r{Type @kbd{M-x foo}.} 693(foo)
673 @print{} foo 694 @result{} haha
695@end group
696@end example
697
698 Here is another example that contrasts direct and indirect
699calls to @code{called-interactively-p}.
700
701@example
702@group
703(defun bar ()
704 (interactive)
705 (setq foobar (list (foo) (called-interactively-p))))
706 @result{} bar
674@end group 707@end group
675 708
676@group 709@group
@@ -684,31 +717,16 @@ foobar
684@end group 717@end group
685@end example 718@end example
686 719
687 If you want to test @emph{only} whether the function was called 720 If you want to treat commands run in keyboard macros just like calls
688using @code{call-interactively}, add an optional argument 721from Lisp programs, test @code{interactive-p} instead of
689@code{print-message} which should be non-@code{nil} in an interactive 722@code{called-interactively-p}.
690call, and use the @code{interactive} spec to make sure it is
691non-@code{nil}. Here's an example:
692
693@example
694(defun foo (&optional print-message)
695 (interactive "p")
696 (when print-message
697 (message "foo")))
698@end example
699
700@noindent
701Defined in this way, the function does display the message when called
702from a keyboard macro. We use @code{"p"} because the numeric prefix
703argument is never @code{nil}.
704
705@defun called-interactively-p
706This function returns @code{t} when the calling function was called
707using @code{call-interactively}.
708 723
709When possible, instead of using this function, you should use the 724@defun interactive-p
710method in the example above; that method makes it possible for a 725This function returns @code{t} if the containing function (the one
711caller to ``pretend'' that the function was called interactively. 726whose code includes the call to @code{interactive-p}) was called in
727direct response to user input. This means that it was called with the
728function @code{call-interactively}, and that a keyboard macro is
729not running, and that Emacs is not running in batch mode.
712@end defun 730@end defun
713 731
714@node Command Loop Info 732@node Command Loop Info
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 90d94dbe6b3..4c9df9c5ede 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3245,21 +3245,47 @@ to use the value specified by the frame.
3245insert images into text, and also control other aspects of how text 3245insert images into text, and also control other aspects of how text
3246displays. The value of the @code{display} property should be a 3246displays. The value of the @code{display} property should be a
3247display specification, or a list or vector containing several display 3247display specification, or a list or vector containing several display
3248specifications. Display specifications generally apply in parallel to 3248specifications. Display specifications in the same @code{display}
3249the text they cover. 3249property value generally apply in parallel to the text they cover.
3250
3251 If several sources (overlays and/or a text property) specify values
3252for the @code{display} property, only one of the values takes effect,
3253following the rules of @code{get-char-property}. @xref{Examining
3254Properties}.
3255
3256 The rest of this section describes several kinds of
3257display specifications and what they mean.
3258
3259@menu
3260* Replacing Specs:: Display specs that replace the text.
3261* Specified Space:: Displaying one space with a specified width.
3262* Pixel Specification:: Specifying space width or height in pixels.
3263* Other Display Specs:: Displaying an image; magnifying text; moving it
3264 up or down on the page; adjusting the width
3265 of spaces within text.
3266* Display Margins:: Displaying text or images to the side of the main text.
3267@end menu
3268
3269@node Replacing Specs
3270@subsection Display Specs That Replace The Text
3250 3271
3251 Some kinds of @code{display} specifications specify something to 3272 Some kinds of @code{display} specifications specify something to
3252display instead of the text that has the property. If a list of 3273display instead of the text that has the property. These are called
3253display specifications includes more than one of this kind, the first 3274@dfn{replacing} display specifications. Emacs does not allow the user
3254is effective and the rest are ignored. You cannot interactively move 3275to interactively move point into the middle of buffer text that is
3255point into the middle of the text that is thus replaced. 3276replaced in this way.
3256 3277
3257 For these specifications, ``the text that has the property'' means 3278 If a list of display specifications includes more than one replacing
3258all the consecutive characters that have the same Lisp object as their 3279display specification, the first overrides the rest. Replacing
3259@code{display} property; these characters are replaced as a single 3280display specifications make most other display specifications
3260unit. By contrast, characters that have similar but distinct Lisp 3281irrelevant, since those don't apply to the replacement.
3261objects as their @code{display} properties are handled separately. 3282
3262Here's a function that illustrates this point: 3283 For replacing display specifications, ``the text that has the
3284property'' means all the consecutive characters that have the same
3285Lisp object as their @code{display} property; these characters are
3286replaced as a single unit. By contrast, characters that have similar
3287but distinct Lisp objects as their @code{display} properties are
3288handled separately. Here's a function that illustrates this point:
3263 3289
3264@smallexample 3290@smallexample
3265(defun foo () 3291(defun foo ()
@@ -3299,18 +3325,6 @@ object as the @code{display} property value, it's irrelevant
3299whether they got this property from a single call to 3325whether they got this property from a single call to
3300@code{put-text-property} or from two different calls. 3326@code{put-text-property} or from two different calls.
3301 3327
3302 The rest of this section describes several kinds of
3303display specifications and what they mean.
3304
3305@menu
3306* Specified Space:: Displaying one space with a specified width.
3307* Pixel Specification:: Specifying space width or height in pixels.
3308* Other Display Specs:: Displaying an image; magnifying text; moving it
3309 up or down on the page; adjusting the width
3310 of spaces within text.
3311* Display Margins:: Displaying text or images to the side of the main text.
3312@end menu
3313
3314@node Specified Space 3328@node Specified Space
3315@subsection Specified Spaces 3329@subsection Specified Spaces
3316@cindex spaces, specified height or width 3330@cindex spaces, specified height or width
@@ -3549,25 +3563,28 @@ string.
3549@cindex display margins 3563@cindex display margins
3550@cindex margins, display 3564@cindex margins, display
3551 3565
3552 A buffer can have blank areas called @dfn{display margins} on the left 3566 A buffer can have blank areas called @dfn{display margins} on the
3553and on the right. Ordinary text never appears in these areas, but you 3567left and on the right. Ordinary text never appears in these areas,
3554can put things into the display margins using the @code{display} 3568but you can put things into the display margins using the
3555property. 3569@code{display} property. There is currently no way to make text or
3556 3570images in the margin mouse-sensitive.
3557 To put text in the left or right display margin of the window, use a 3571
3558display specification of the form @code{(margin right-margin)} or 3572 The way to display something in the margins is to specify it in a
3559@code{(margin left-margin)} on it. To put an image in a display margin, 3573margin display specification in the @code{display} property of some
3560use that display specification along with the display specification for 3574text. This is a replacing display specification, meaning that the
3561the image. Unfortunately, there is currently no way to make 3575text you put it on does not get displayed; the margin display appears,
3562text or images in the margin mouse-sensitive. 3576but that text does not.
3563 3577
3564 If you put such a display specification directly on text in the 3578 A margin display specification looks like @code{((margin
3565buffer, the specified margin display appears @emph{instead of} that 3579right-margin) @var{spec}} or @code{((margin left-margin) @var{spec})}.
3566buffer text itself. To put something in the margin @emph{in 3580Here, @var{spec} is another display specification that says what to
3567association with} certain buffer text without preventing or altering 3581display in the margin. Typically it is a string of text to display,
3568the display of that text, put a @code{before-string} property on the 3582or an image descriptor.
3569text and put the display specification on the contents of the 3583
3570before-string. 3584 To display something in the margin @emph{in association with}
3585certain buffer text, without altering or preventing the display of
3586that text, put a @code{before-string} property on the text and put the
3587margin display specification on the contents of the before-string.
3571 3588
3572 Before the display margins can display anything, you must give 3589 Before the display margins can display anything, you must give
3573them a nonzero width. The usual way to do that is to set these 3590them a nonzero width. The usual way to do that is to set these
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 613bdbace38..8cd25ed59d3 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -9,11 +9,6 @@
9@set VERSION 2.9 9@set VERSION 2.9
10@set EMACSVER 23.0.50 10@set EMACSVER 23.0.50
11 11
12@dircategory Emacs
13@direntry
14* Elisp: (elisp). The Emacs Lisp Reference Manual.
15@end direntry
16
17@c in general, keep the following line commented out, unless doing a 12@c in general, keep the following line commented out, unless doing a
18@c copy of this manual that will be published. The manual should go 13@c copy of this manual that will be published. The manual should go
19@c onto the distribution in the full, 8.5 x 11" size. 14@c onto the distribution in the full, 8.5 x 11" size.
@@ -67,6 +62,11 @@ developing GNU and promoting software freedom.''
67@end quotation 62@end quotation
68@end copying 63@end copying
69 64
65@dircategory Emacs
66@direntry
67* Elisp: (elisp). The Emacs Lisp Reference Manual.
68@end direntry
69
70@titlepage 70@titlepage
71@title GNU Emacs Lisp Reference Manual 71@title GNU Emacs Lisp Reference Manual
72@subtitle For Emacs Version @value{EMACSVER} 72@subtitle For Emacs Version @value{EMACSVER}
@@ -639,6 +639,7 @@ Command Loop
639* Command Overview:: How the command loop reads commands. 639* Command Overview:: How the command loop reads commands.
640* Defining Commands:: Specifying how a function should read arguments. 640* Defining Commands:: Specifying how a function should read arguments.
641* Interactive Call:: Calling a command, so that it will read arguments. 641* Interactive Call:: Calling a command, so that it will read arguments.
642* Distinguish Interactive:: Making a command distinguish interactive calls.
642* Command Loop Info:: Variables set by the command loop for you to examine. 643* Command Loop Info:: Variables set by the command loop for you to examine.
643* Adjusting Point:: Adjustment of point after a command. 644* Adjusting Point:: Adjustment of point after a command.
644* Input Events:: What input looks like when you read it. 645* Input Events:: What input looks like when you read it.
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index c6da06b4a13..daaaf6c9b9d 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -2619,13 +2619,13 @@ the @var{prop} property of that symbol.
2619This function is like @code{get-text-property}, except that it checks 2619This function is like @code{get-text-property}, except that it checks
2620overlays first and then text properties. @xref{Overlays}. 2620overlays first and then text properties. @xref{Overlays}.
2621 2621
2622The argument @var{object} may be a string, a buffer, or a window. If it 2622The argument @var{object} may be a string, a buffer, or a window. If
2623is a window, then the buffer displayed in that window is used for text 2623it is a window, then the buffer displayed in that window is used for
2624properties and overlays, but only the overlays active for that window 2624text properties and overlays, but only the overlays active for that
2625are considered. If @var{object} is a buffer, then all overlays in that 2625window are considered. If @var{object} is a buffer, then overlays in
2626buffer are considered, as well as text properties. If @var{object} is a 2626that buffer are considered first, in order of decreasing priority,
2627string, only text properties are considered, since strings never have 2627followed by the text properties. If @var{object} is a string, only
2628overlays. 2628text properties are considered, since strings never have overlays.
2629@end defun 2629@end defun
2630 2630
2631@defun get-char-property-and-overlay position prop &optional object 2631@defun get-char-property-and-overlay position prop &optional object
diff --git a/etc/NEWS b/etc/NEWS
index 4ecdca35c52..21cb6b3ffff 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -120,6 +120,10 @@ following arguments.
120`transient-mark-mode' is turned on. Otherwise, it fills the current 120`transient-mark-mode' is turned on. Otherwise, it fills the current
121paragraph. The new command bound to M-q is `fill-paragraph-or-region'. 121paragraph. The new command bound to M-q is `fill-paragraph-or-region'.
122 122
123** M-$ now checks spelling of the region if the region is active and
124`transient-mark-mode' is turned on. Otherwise, it checks spelling of the
125word at point.
126
123** TAB now indents the region if the region is active and 127** TAB now indents the region if the region is active and
124`transient-mark-mode' is turned on. 128`transient-mark-mode' is turned on.
125 129
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3fe5e2994cf..d3fde16c4fa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,119 @@
12007-10-14 Drew Adams <drew.adams@oracle.com>
2
3 * emacs-lisp/ring.el (ring-convert-sequence-to-ring)
4 (ring-insert+extend, ring-remove+insert+extend, ring-member)
5 (ring-next, ring-previous): New functions.
6
72007-10-14 Richard Stallman <rms@gnu.org>
8
9 * emacs-lisp/advice.el (documentation): Advice deleted.
10 Doc for advised functions is now handled at C level.
11 This is now handled at C level.
12 (ad-stop-advice, ad-start-advice): Don't enable or disable
13 advice for `documentation'.
14 (ad-advised-definition-docstring-regexp): Var deleted.
15 (ad-make-advised-definition-docstring): Store orig name
16 as text property of string.
17 (ad-advised-definition-p): Check for text property of docstring.
18
19 * help-fns.el (describe-function-1): Find source of advised functions.
20
212007-10-14 Juri Linkov <juri@jurta.org>
22
23 * faces.el (describe-face): Allow handling a string as the face name.
24
25 * textmodes/ispell.el (ispell-word): Call `ispell-region' on the
26 active region in transient-mark-mode.
27 (ispell-region): Change messages displayed at the start and end of
28 the spell-checking to be the same.
29
30 * startup.el (fancy-startup-tail): Say exactly what does the button
31 dismiss ("Dismiss this startup screen"). Use text "Never show
32 it again" for the checkbox after this button.
33 (fancy-startup-screen, fancy-about-screen): Put point before the
34 first link, so the user can quickly select links with the keyboard.
35 (normal-mouse-startup-screen): Add more useful text describing how
36 to follow a link.
37
382007-10-14 Glenn Morris <rgm@gnu.org>
39
40 * progmodes/etags.el (select-tags-table): Disable undo in the
41 `*Tags Table List*' buffer.
42
432007-10-13 Eli Zaretskii <eliz@gnu.org>
44
45 * dired.el (dired-warn-writable): New face.
46 (dired-warn-writable-face): New variable.
47 (dired-font-lock-keywords): Use dired-warn-writable-face, instead
48 of dired-warning-face, for group- and world-writable files.
49
502007-10-13 Richard Stallman <rms@gnu.org>
51
52 * files.el (directory-abbrev-alist): Doc fix.
53
542007-10-13 Jari Aalto <jari.aalto@cante.net>
55
56 * comint.el (comint-password-prompt-regexp): Add 'LDAP'.
57
582007-10-12 Martin Rudalics <rudalics@gmx.at>
59
60 * frame.el (set-frame-configuration): Assign name parameter only
61 if it has been set explicitly before.
62
632007-10-11 Tom Tromey <tromey@redhat.com>
64
65 * progmodes/gdb-ui.el (gdb-info-stack-custom): Ensure current
66 frame is visible.
67
682007-10-10 Richard Stallman <rms@gnu.org>
69
70 * emacs-lisp/debug.el (debugger-setup-buffer): Disable undo
71 in *Backtrace*.
72
73 * faces.el (face-font-selection-order): Doc fix.
74
75 * loadhist.el (unload-feature): Doc fix.
76
772007-10-13 Glenn Morris <rgm@gnu.org>
78
79 * progmodes/octave-mod.el (octave-looking-at-kw): Add doc string.
80 (octave-re-search-forward-kw, octave-re-search-backward-kw):
81 Add doc string, and an explicit COUNT argument.
82 (octave-scan-blocks, octave-beginning-of-defun): Explicitly pass
83 `inc' to search functions.
84
85 * faces.el (face-spec-set): When FRAME is nil, set the default for
86 new frames (restores pre-2007-09-17 behavior). Doc fix.
87
882007-10-13 John W. Eaton <jwe@octave.org>
89
90 * progmodes/octave-mod.el (octave-looking-at-kw)
91 (octave-re-search-forward-kw, octave-re-search-backward-kw):
92 New functions.
93 (octave-in-defun-p, calculate-octave-indent)
94 (octave-blink-matching-block-open, octave-beginning-of-defun)
95 (octave-auto-fill): Use octave-looking-at-kw instead of looking-at,
96 to search for regexps that contain case-sensitive keywords.
97 (octave-beginning-of-defun): Likewise, for octave-re-search-backward-kw.
98 (octave-scan-blocks): Likewise, for octave-re-search-forward-kw.
99
1002007-10-13 Dan Nicolaescu <dann@ics.uci.edu>
101
102 * frame.el (select-frame-set-input-focus): Fix typo
103 "max" -> "mac". Do not use a single clause cond.
104
105 * cus-start.el (all): Use test that does not match the X11 version
106 for mac.
107
1082007-10-13 Markus Gritsch <m.gritsch@gmail.com> (tiny change)
109
110 * progmodes/ebrowse.el (ebrowse-tree-mode): Disable undo in the
111 BROWSE buffer.
112
1132007-10-13 Dan Nicolaescu <dann@ics.uci.edu>
114
115 * cus-start.el (all): Undo previous change.
116
12007-10-13 Glenn Morris <rgm@gnu.org> 1172007-10-13 Glenn Morris <rgm@gnu.org>
2 118
3 * woman.el (woman0-rename): Fix paren typo. 119 * woman.el (woman0-rename): Fix paren typo.
@@ -28,9 +144,12 @@
28 (idlwave-sintern-keyword-list, idlwave-scan-user-lib-files) 144 (idlwave-sintern-keyword-list, idlwave-scan-user-lib-files)
29 (idlwave-write-paths, idlwave-all-method-classes) 145 (idlwave-write-paths, idlwave-all-method-classes)
30 (idlwave-all-method-keyword-classes, idlwave-entry-keywords) 146 (idlwave-all-method-keyword-classes, idlwave-entry-keywords)
31 (idlwave-fix-keywords, idlwave-display-calling-sequence): 147 (idlwave-fix-keywords, idlwave-display-calling-sequence)
148 (idlwave-complete-in-buffer):
32 * textmodes/org.el (org-export-as-html, org-export-as-ascii) 149 * textmodes/org.el (org-export-as-html, org-export-as-ascii)
33 (org-fast-tag-selection): Use mapc rather than mapcar. 150 (org-fast-tag-selection):
151 * textmodes/reftex-sel.el (reftex-select-item): Use mapc rather
152 than mapcar.
34 153
352007-10-13 Dan Nicolaescu <dann@ics.uci.edu> 1542007-10-13 Dan Nicolaescu <dann@ics.uci.edu>
36 155
@@ -101,11 +220,12 @@
101 220
1022007-10-11 Eric S. Raymond <esr@snark.thyrsus.com> 2212007-10-11 Eric S. Raymond <esr@snark.thyrsus.com>
103 222
104 * vc.el (vc-diff, vc-diff-internal): Bug fixes by Juanma Barranquero. 223 * vc.el (vc-diff):
105 Temporarily disable the check for his edge case, it's calling some 224 (vc-diff-internal): Merge a patch by Juanma Barranquero. Also,
106 brittle code. 225 emporarily disable the check for his edge case of
107 (with-vc-properties): Fievaluation time of a macro argument. 226 vc-diff (stopping it from grinding when callerd from $HOME), as
108 227 it's calling some brittle code in vc-hooks.el.
228 (with-vc-properties): Fix evaluation time of a macro argument.
109 * ediff-vers.el (ediff-vc-internal): 229 * ediff-vers.el (ediff-vc-internal):
110 * vc-hooks.el: 230 * vc-hooks.el:
111 * loaddefs.el: Follow up on VC terminology change. 231 * loaddefs.el: Follow up on VC terminology change.
@@ -305,6 +425,10 @@
305 425
306 * net/trampver.el: Update release number. 426 * net/trampver.el: Update release number.
307 427
4282007-10-09 Richard Stallman <rms@gnu.org>
429
430 * play/gamegrid.el (gamegrid-setup-default-font): Use face-spec-set.
431
3082007-10-09 Juanma Barranquero <lekktu@gmail.com> 4322007-10-09 Juanma Barranquero <lekktu@gmail.com>
309 433
310 * follow.el: Require easymenu. 434 * follow.el: Require easymenu.
diff --git a/lisp/comint.el b/lisp/comint.el
index d08b2013426..623eef17327 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -337,7 +337,7 @@ This variable is buffer-local."
337;; Some implementations of passwd use "Password (again)" as the 2nd prompt. 337;; Some implementations of passwd use "Password (again)" as the 2nd prompt.
338(defcustom comint-password-prompt-regexp 338(defcustom comint-password-prompt-regexp
339 "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\ 339 "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\
340Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\ 340Kerberos \\|CVS \\|UNIX \\| SMB \\|LDAP \\|^\\)\
341\[Pp]assword\\( (again)\\)?\\|\ 341\[Pp]assword\\( (again)\\)?\\|\
342pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\ 342pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\
343\\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'" 343\\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'"
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 53245d902ae..c6b0f269d1b 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -436,7 +436,7 @@ since it could result in memory overflow and make Emacs crash."
436 ((string-match "\\`w32-" (symbol-name symbol)) 436 ((string-match "\\`w32-" (symbol-name symbol))
437 (eq system-type 'windows-nt)) 437 (eq system-type 'windows-nt))
438 ((string-match "\\`mac-" (symbol-name symbol)) 438 ((string-match "\\`mac-" (symbol-name symbol))
439 (eq window-system 'mac)) 439 (featurep 'mac-carbon))
440 ((string-match "\\`x-.*gtk" (symbol-name symbol)) 440 ((string-match "\\`x-.*gtk" (symbol-name symbol))
441 (featurep 'gtk)) 441 (featurep 'gtk))
442 ((string-match "\\`x-" (symbol-name symbol)) 442 ((string-match "\\`x-" (symbol-name symbol))
diff --git a/lisp/dired.el b/lisp/dired.el
index 74e6876fd28..7bdb195543a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -344,6 +344,15 @@ Subexpression 2 must end right before the \\n or \\r.")
344(defvar dired-warning-face 'dired-warning 344(defvar dired-warning-face 'dired-warning
345 "Face name used for a part of a buffer that needs user attention.") 345 "Face name used for a part of a buffer that needs user attention.")
346 346
347(defface dired-warn-writable
348 '((((type w32 pc)) :inherit default) ;; These default to rw-rw-rw.
349 (t (:inherit font-lock-warning-face)))
350 "Face used to highlight permissions of group- and world-writable files."
351 :group 'dired-faces
352 :version "22.2")
353(defvar dired-warn-writable-face 'dired-warn-writable
354 "Face name used for permissions of group- and world-writable files.")
355
347(defface dired-directory 356(defface dired-directory
348 '((t (:inherit font-lock-function-name-face))) 357 '((t (:inherit font-lock-function-name-face)))
349 "Face used for subdirectories." 358 "Face used for subdirectories."
@@ -405,10 +414,10 @@ Subexpression 2 must end right before the \\n or \\r.")
405 ;; fields with keymaps to frob the permissions, somewhat a la XEmacs. 414 ;; fields with keymaps to frob the permissions, somewhat a la XEmacs.
406 (list (concat dired-re-maybe-mark dired-re-inode-size 415 (list (concat dired-re-maybe-mark dired-re-inode-size
407 "[-d]....\\(w\\)....") ; group writable 416 "[-d]....\\(w\\)....") ; group writable
408 '(1 dired-warning-face)) 417 '(1 dired-warn-writable-face))
409 (list (concat dired-re-maybe-mark dired-re-inode-size 418 (list (concat dired-re-maybe-mark dired-re-inode-size
410 "[-d].......\\(w\\).") ; world writable 419 "[-d].......\\(w\\).") ; world writable
411 '(1 dired-warning-face)) 420 '(1 dired-warn-writable-face))
412 ;; 421 ;;
413 ;; Subdirectories. 422 ;; Subdirectories.
414 (list dired-re-dir 423 (list dired-re-dir
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index d04550c187d..cabd0dd391e 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2603,17 +2603,13 @@ Like `interactive-form', but also works on pieces of advice."
2603 (if (ad-interactive-form definition) 1 0)) 2603 (if (ad-interactive-form definition) 1 0))
2604 (cdr (cdr (ad-lambda-expression definition))))))) 2604 (cdr (cdr (ad-lambda-expression definition)))))))
2605 2605
2606;; Matches the docstring of an advised definition.
2607;; The first group of the regexp matches the function name:
2608(defvar ad-advised-definition-docstring-regexp "^\\$ad-doc: \\(.+\\)\\$$")
2609
2610(defun ad-make-advised-definition-docstring (function) 2606(defun ad-make-advised-definition-docstring (function)
2611 "Make an identifying docstring for the advised definition of FUNCTION. 2607 "Make an identifying docstring for the advised definition of FUNCTION.
2612Put function name into the documentation string so we can infer 2608Put function name into the documentation string so we can infer
2613the name of the advised function from the docstring. This is needed 2609the name of the advised function from the docstring. This is needed
2614to generate a proper advised docstring even if we are just given a 2610to generate a proper advised docstring even if we are just given a
2615definition (also see the defadvice for `documentation')." 2611definition (see the code for `documentation')."
2616 (format "$ad-doc: %s$" (prin1-to-string function))) 2612 (propertize "Advice doc string" 'ad-advice-info function))
2617 2613
2618(defun ad-advised-definition-p (definition) 2614(defun ad-advised-definition-p (definition)
2619 "Return non-nil if DEFINITION was generated from advice information." 2615 "Return non-nil if DEFINITION was generated from advice information."
@@ -2622,8 +2618,7 @@ definition (also see the defadvice for `documentation')."
2622 (ad-compiled-p definition)) 2618 (ad-compiled-p definition))
2623 (let ((docstring (ad-docstring definition))) 2619 (let ((docstring (ad-docstring definition)))
2624 (and (stringp docstring) 2620 (and (stringp docstring)
2625 (string-match 2621 (get-text-property 0 'ad-advice-info docstring)))))
2626 ad-advised-definition-docstring-regexp docstring)))))
2627 2622
2628(defun ad-definition-type (definition) 2623(defun ad-definition-type (definition)
2629 "Return symbol that describes the type of DEFINITION." 2624 "Return symbol that describes the type of DEFINITION."
@@ -3917,24 +3912,6 @@ undone on exit of this macro."
3917;; during bootstrapping. 3912;; during bootstrapping.
3918(ad-define-subr-args 'documentation '(function &optional raw)) 3913(ad-define-subr-args 'documentation '(function &optional raw))
3919 3914
3920(defadvice documentation (after ad-advised-docstring first disable preact)
3921 "Builds an advised docstring if FUNCTION is advised."
3922 ;; Because we get the function name from the advised docstring
3923 ;; this will work for function names as well as for definitions:
3924 (if (and (stringp ad-return-value)
3925 (string-match
3926 ad-advised-definition-docstring-regexp ad-return-value))
3927 (let ((function
3928 (car (read-from-string
3929 ad-return-value (match-beginning 1) (match-end 1)))))
3930 (cond ((ad-is-advised function)
3931 (setq ad-return-value (ad-make-advised-docstring function))
3932 ;; Handle optional `raw' argument:
3933 (if (not (ad-get-arg 1))
3934 (setq ad-return-value
3935 (substitute-command-keys ad-return-value))))))))
3936
3937
3938;; @@ Starting, stopping and recovering from the advice package magic: 3915;; @@ Starting, stopping and recovering from the advice package magic:
3939;; =================================================================== 3916;; ===================================================================
3940 3917
@@ -3943,9 +3920,7 @@ undone on exit of this macro."
3943 (interactive) 3920 (interactive)
3944 ;; Advising `ad-activate-internal' means death!! 3921 ;; Advising `ad-activate-internal' means death!!
3945 (ad-set-advice-info 'ad-activate-internal nil) 3922 (ad-set-advice-info 'ad-activate-internal nil)
3946 (ad-safe-fset 'ad-activate-internal 'ad-activate) 3923 (ad-safe-fset 'ad-activate-internal 'ad-activate))
3947 (ad-enable-advice 'documentation 'after 'ad-advised-docstring)
3948 (ad-activate 'documentation 'compile))
3949 3924
3950(defun ad-stop-advice () 3925(defun ad-stop-advice ()
3951 "Stop the automatic advice handling magic. 3926 "Stop the automatic advice handling magic.
@@ -3953,8 +3928,6 @@ You should only need this in case of Advice-related emergencies."
3953 (interactive) 3928 (interactive)
3954 ;; Advising `ad-activate-internal' means death!! 3929 ;; Advising `ad-activate-internal' means death!!
3955 (ad-set-advice-info 'ad-activate-internal nil) 3930 (ad-set-advice-info 'ad-activate-internal nil)
3956 (ad-disable-advice 'documentation 'after 'ad-advised-docstring)
3957 (ad-update 'documentation)
3958 (ad-safe-fset 'ad-activate-internal 'ad-activate-internal-off)) 3931 (ad-safe-fset 'ad-activate-internal 'ad-activate-internal-off))
3959 3932
3960(defun ad-recover-normality () 3933(defun ad-recover-normality ()
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 2dea1d0a347..39cb8dce1ff 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -269,6 +269,7 @@ That buffer should be current already."
269 (setq buffer-read-only nil) 269 (setq buffer-read-only nil)
270 (erase-buffer) 270 (erase-buffer)
271 (set-buffer-multibyte nil) 271 (set-buffer-multibyte nil)
272 (setq buffer-undo-list t)
272 (let ((standard-output (current-buffer)) 273 (let ((standard-output (current-buffer))
273 (print-escape-newlines t) 274 (print-escape-newlines t)
274 (print-level 8) 275 (print-level 8)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 01d883d63be..e3ade01a4a0 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3675,44 +3675,6 @@ Return the result of the last expression."
3675 3675
3676;;; Printing 3676;;; Printing
3677 3677
3678;; Replace printing functions.
3679
3680;; obsolete names
3681(define-obsolete-function-alias 'edebug-install-custom-print-funcs
3682 'edebug-install-custom-print "22.1")
3683(define-obsolete-function-alias 'edebug-reset-print-funcs
3684 'edebug-uninstall-custom-print "22.1")
3685(define-obsolete-function-alias 'edebug-uninstall-custom-print-funcs
3686 'edebug-uninstall-custom-print "22.1")
3687
3688(defun edebug-install-custom-print ()
3689 "Replace print functions used by Edebug with custom versions."
3690 ;; Modifying the custom print functions, or changing print-length,
3691 ;; print-level, print-circle, custom-print-list or custom-print-vector
3692 ;; have immediate effect.
3693 (interactive)
3694 (require 'cust-print)
3695 (defalias 'edebug-prin1 'custom-prin1)
3696 (defalias 'edebug-print 'custom-print)
3697 (defalias 'edebug-prin1-to-string 'custom-prin1-to-string)
3698 (defalias 'edebug-format 'custom-format)
3699 (defalias 'edebug-message 'custom-message)
3700 "Installed")
3701
3702(eval-and-compile
3703 (defun edebug-uninstall-custom-print ()
3704 "Replace edebug custom print functions with internal versions."
3705 (interactive)
3706 (defalias 'edebug-prin1 'prin1)
3707 (defalias 'edebug-print 'print)
3708 (defalias 'edebug-prin1-to-string 'prin1-to-string)
3709 (defalias 'edebug-format 'format)
3710 (defalias 'edebug-message 'message)
3711 "Uninstalled")
3712
3713 ;; Default print functions are the same as Emacs'.
3714 (edebug-uninstall-custom-print))
3715
3716 3678
3717(defun edebug-report-error (edebug-value) 3679(defun edebug-report-error (edebug-value)
3718 ;; Print an error message like command level does. 3680 ;; Print an error message like command level does.
@@ -3759,6 +3721,12 @@ Return the result of the last expression."
3759 3721
3760;;; Read, Eval and Print 3722;;; Read, Eval and Print
3761 3723
3724(defalias 'edebug-prin1 'prin1)
3725(defalias 'edebug-print 'print)
3726(defalias 'edebug-prin1-to-string 'prin1-to-string)
3727(defalias 'edebug-format 'format)
3728(defalias 'edebug-message 'message)
3729
3762(defun edebug-eval-expression (edebug-expr) 3730(defun edebug-eval-expression (edebug-expr)
3763 "Evaluate an expression in the outside environment. 3731 "Evaluate an expression in the outside environment.
3764If interactive, prompt for the expression. 3732If interactive, prompt for the expression.
diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el
index 2c8e0a29faf..93cf434292a 100644
--- a/lisp/emacs-lisp/ring.el
+++ b/lisp/emacs-lisp/ring.el
@@ -164,6 +164,78 @@ will be performed."
164 (dotimes (var (cadr ring) lst) 164 (dotimes (var (cadr ring) lst)
165 (push (aref vect (mod (+ start var) size)) lst)))) 165 (push (aref vect (mod (+ start var) size)) lst))))
166 166
167(defun ring-member (ring item)
168 "Return index of ITEM if on RING, else nil. Comparison via `equal'.
169The index is 0-based."
170 (let ((ind 0)
171 (len (1- (ring-length ring)))
172 (memberp nil))
173 (while (and (<= ind len)
174 (not (setq memberp (equal item (ring-ref ring ind)))))
175 (setq ind (1+ ind)))
176 (and memberp ind)))
177
178(defun ring-next (ring item)
179 "Return the next item in the RING, after ITEM.
180Raise error if ITEM is not in the RING."
181 (let ((curr-index (ring-member ring item)))
182 (unless curr-index (error "Item is not in the ring: `%s'" item))
183 (ring-ref ring (ring-plus1 curr-index (ring-length ring)))))
184
185(defun ring-previous (ring item)
186 "Return the previous item in the RING, before ITEM.
187Raise error if ITEM is not in the RING."
188 (let ((curr-index (ring-member ring item)))
189 (unless curr-index (error "Item is not in the ring: `%s'" item))
190 (ring-ref ring (ring-minus1 curr-index (ring-length ring)))))
191
192(defun ring-insert+extend (ring item &optional grow-p)
193 "Like ring-insert, but if GROW-P is non-nil, then enlarge ring.
194Insert onto ring RING the item ITEM, as the newest (last) item.
195If the ring is full, behavior depends on GROW-P:
196 If GROW-P is non-nil, enlarge the ring to accommodate the new item.
197 If GROW-P is nil, dump the oldest item to make room for the new."
198 (let* ((vec (cdr (cdr ring)))
199 (veclen (length vec))
200 (hd (car ring))
201 (ringlen (ring-length ring)))
202 (prog1
203 (cond ((and grow-p (= ringlen veclen)) ; Full ring. Enlarge it.
204 (setq veclen (1+ veclen))
205 (setcdr ring (cons (setq ringlen (1+ ringlen))
206 (setq vec (vconcat vec (vector item)))))
207 (setcar ring hd))
208 (t (aset vec (mod (+ hd ringlen) veclen) item)))
209 (if (= ringlen veclen)
210 (setcar ring (ring-plus1 hd veclen))
211 (setcar (cdr ring) (1+ ringlen))))))
212
213(defun ring-remove+insert+extend (ring item &optional grow-p)
214 "`ring-remove' ITEM from RING, then `ring-insert+extend' it.
215This ensures that there is only one ITEM on RING.
216
217If the RING is full, behavior depends on GROW-P:
218 If GROW-P is non-nil, enlarge the ring to accommodate the new ITEM.
219 If GROW-P is nil, dump the oldest item to make room for the new."
220 (let (ind)
221 (while (setq ind (ring-member ring item)) (ring-remove ring ind)))
222 (ring-insert+extend ring item grow-p))
223
224(defun ring-convert-sequence-to-ring (seq)
225 "Convert sequence SEQ to a ring. Return the ring.
226If SEQ is already a ring, return it."
227 (if (ring-p seq)
228 seq
229 (let* ((size (length seq))
230 (ring (make-ring size))
231 (count 0))
232 (while (< count size)
233 (if (or (ring-empty-p ring)
234 (not (equal (ring-ref ring 0) (elt seq count))))
235 (ring-insert-at-beginning ring (elt seq count)))
236 (setq count (1+ count)))
237 ring)))
238
167;;; provide ourself: 239;;; provide ourself:
168 240
169(provide 'ring) 241(provide 'ring)
diff --git a/lisp/faces.el b/lisp/faces.el
index 55be1fad20e..8a0ba7d221f 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -48,8 +48,8 @@
48 "*A list specifying how face font selection chooses fonts. 48 "*A list specifying how face font selection chooses fonts.
49Each of the four symbols `:width', `:height', `:weight', and `:slant' 49Each of the four symbols `:width', `:height', `:weight', and `:slant'
50must appear once in the list, and the list must not contain any other 50must appear once in the list, and the list must not contain any other
51elements. Font selection tries to find a best matching font for 51elements. Font selection first tries to find a best matching font
52those face attributes first that appear first in the list. For 52for those face attributes that appear before in the list. For
53example, if `:slant' appears before `:height', font selection first 53example, if `:slant' appears before `:height', font selection first
54tries to find a font with a suitable slant, even if this results in 54tries to find a font with a suitable slant, even if this results in
55a font height that isn't optimal." 55a font height that isn't optimal."
@@ -1356,6 +1356,7 @@ If FRAME is omitted or nil, use the selected frame."
1356 (save-excursion 1356 (save-excursion
1357 (set-buffer standard-output) 1357 (set-buffer standard-output)
1358 (dolist (f face) 1358 (dolist (f face)
1359 (if (stringp f) (setq f (intern f)))
1359 (insert "Face: " (symbol-name f)) 1360 (insert "Face: " (symbol-name f))
1360 (if (not (facep f)) 1361 (if (not (facep f))
1361 (insert " undefined face.\n") 1362 (insert " undefined face.\n")
@@ -1515,17 +1516,16 @@ If SPEC is nil, return nil."
1515(defun face-spec-set (face spec &optional frame) 1516(defun face-spec-set (face spec &optional frame)
1516 "Set FACE's attributes according to the first matching entry in SPEC. 1517 "Set FACE's attributes according to the first matching entry in SPEC.
1517FRAME is the frame whose frame-local face is set. FRAME nil means 1518FRAME is the frame whose frame-local face is set. FRAME nil means
1518do it on all frames. See `defface' for information about SPEC. 1519do it on all frames (and change the default for new frames).
1519If SPEC is nil, do nothing." 1520See `defface' for information about SPEC. If SPEC is nil, do nothing."
1520 (if frame 1521 (let ((attrs (face-spec-choose spec frame)))
1521 (let ((attrs (face-spec-choose spec frame))) 1522 (when spec
1522 (when spec 1523 (face-spec-reset-face face (or frame t)))
1523 (face-spec-reset-face face frame)) 1524 (while attrs
1524 (while attrs 1525 (let ((attribute (car attrs))
1525 (let ((attribute (car attrs)) 1526 (value (car (cdr attrs))))
1526 (value (car (cdr attrs)))) 1527 ;; Support some old-style attribute names and values.
1527 ;; Support some old-style attribute names and values. 1528 (case attribute
1528 (case attribute
1529 (:bold (setq attribute :weight value (if value 'bold 'normal))) 1529 (:bold (setq attribute :weight value (if value 'bold 'normal)))
1530 (:italic (setq attribute :slant value (if value 'italic 'normal))) 1530 (:italic (setq attribute :slant value (if value 'italic 'normal)))
1531 ((:foreground :background) 1531 ((:foreground :background)
@@ -1534,9 +1534,12 @@ If SPEC is nil, do nothing."
1534 (if (null value) (setq value 'unspecified))) 1534 (if (null value) (setq value 'unspecified)))
1535 (t (unless (assq attribute face-x-resources) 1535 (t (unless (assq attribute face-x-resources)
1536 (setq attribute nil)))) 1536 (setq attribute nil))))
1537 (when attribute 1537 (when attribute
1538 (set-face-attribute face frame attribute value))) 1538 ;; If frame is nil, set the default for new frames.
1539 (setq attrs (cdr (cdr attrs))))) 1539 ;; Existing frames are handled below.
1540 (set-face-attribute face (or frame t) attribute value)))
1541 (setq attrs (cdr (cdr attrs)))))
1542 (unless frame
1540 ;; When we reset the face based on its spec, then it is unmodified 1543 ;; When we reset the face based on its spec, then it is unmodified
1541 ;; as far as Custom is concerned. 1544 ;; as far as Custom is concerned.
1542 (put (or (get face 'face-alias) face) 'face-modified nil) 1545 (put (or (get face 'face-alias) face) 'face-modified nil)
diff --git a/lisp/files.el b/lisp/files.el
index f4881911381..be28dec4c40 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -59,8 +59,9 @@ FROM with TO when it appears in a directory name. This replacement is
59done when setting up the default directory of a newly visited file. 59done when setting up the default directory of a newly visited file.
60*Every* FROM string should start with `^'. 60*Every* FROM string should start with `^'.
61 61
62Do not use `~' in the TO strings. 62FROM and TO should be equivalent names, which refer to the
63They should be ordinary absolute directory names. 63same directory. Do not use `~' in the TO strings;
64they should be ordinary absolute directory names.
64 65
65Use this feature when you have directories which you normally refer to 66Use this feature when you have directories which you normally refer to
66via absolute symbolic links. Make TO the name of the link, and FROM 67via 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."
554 (start 0)) 555 (start 0))
555 ;; Replace invalid filename characters with ! 556 ;; Replace invalid filename characters with !
556 (while (string-match "[?*:<>|\"\000-\037]" name start) 557 (while (string-match "[?*:<>|\"\000-\037]" name start)
557 (aset name (match-beginning 0) ?!) 558 (aset name (match-beginning 0) ?!)
558 (setq start (match-end 0))) 559 (setq start (match-end 0)))
559 name) 560 name)
560 filename)) 561 filename))
diff --git a/lisp/frame.el b/lisp/frame.el
index 37673835f34..1c11829475b 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -820,10 +820,10 @@ the user during startup."
820 (select-frame frame) 820 (select-frame frame)
821 (raise-frame frame) 821 (raise-frame frame)
822 ;; Ensure, if possible, that frame gets input focus. 822 ;; Ensure, if possible, that frame gets input focus.
823 (cond ((memq (window-system frame) '(x max w32)) 823 (when (memq (window-system frame) '(x mac w32))
824 (x-focus-frame frame))) 824 (x-focus-frame frame))
825 (cond (focus-follows-mouse 825 (when focus-follows-mouse
826 (set-mouse-position (selected-frame) (1- (frame-width)) 0)))) 826 (set-mouse-position (selected-frame) (1- (frame-width)) 0)))
827 827
828(defun other-frame (arg) 828(defun other-frame (arg)
829 "Select the ARGth different visible frame on current display, and raise it. 829 "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."
950 ;; Since we can't set a frame's minibuffer status, 950 ;; Since we can't set a frame's minibuffer status,
951 ;; we might as well omit the parameter altogether. 951 ;; we might as well omit the parameter altogether.
952 (let* ((parms (nth 1 parameters)) 952 (let* ((parms (nth 1 parameters))
953 (mini (assq 'minibuffer parms))) 953 (mini (assq 'minibuffer parms))
954 (if mini (setq parms (delq mini parms))) 954 (name (assq 'name parms))
955 (explicit-name (cdr (assq 'explicit-name parms))))
956 (when mini (setq parms (delq mini parms)))
957 ;; Leave name in iff it was set explicitly.
958 ;; This should fix the behavior reported in
959 ;; http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg01632.html
960 (when (and name (not explicit-name))
961 (setq parms (delq name parms)))
955 parms)) 962 parms))
956 (set-window-configuration (nth 2 parameters))) 963 (set-window-configuration (nth 2 parameters)))
957 (setq frames-to-delete (cons frame frames-to-delete))))) 964 (setq frames-to-delete (cons frame frames-to-delete)))))
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index eee0794b673..bf8d5f9a209 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -251,8 +251,15 @@ face (according to `face-differs-from-default-p')."
251 251
252;;;###autoload 252;;;###autoload
253(defun describe-function-1 (function) 253(defun describe-function-1 (function)
254 (let* ((def (if (symbolp function) 254 (let* ((advised (and (featurep 'advice) (ad-get-advice-info function)))
255 (symbol-function function) 255 ;; If the function is advised, get the symbol that has the
256 ;; real definition.
257 (real-function
258 (if advised (cdr (assq 'origname advised))
259 function))
260 ;; Get the real definition.
261 (def (if (symbolp real-function)
262 (symbol-function real-function)
256 function)) 263 function))
257 file-name string 264 file-name string
258 (beg (if (commandp def) "an interactive " "a "))) 265 (beg (if (commandp def) "an interactive " "a ")))
@@ -334,7 +341,7 @@ face (according to `face-differs-from-default-p')."
334 (with-current-buffer standard-output 341 (with-current-buffer standard-output
335 (save-excursion 342 (save-excursion
336 (re-search-backward "`\\([^`']+\\)'" nil t) 343 (re-search-backward "`\\([^`']+\\)'" nil t)
337 (help-xref-button 1 'help-function-def function file-name)))) 344 (help-xref-button 1 'help-function-def real-function file-name))))
338 (princ ".") 345 (princ ".")
339 (terpri) 346 (terpri)
340 (when (commandp function) 347 (when (commandp function)
@@ -383,8 +390,9 @@ face (according to `face-differs-from-default-p')."
383 ((listp arglist) 390 ((listp arglist)
384 (format "%S" (help-make-usage function arglist))) 391 (format "%S" (help-make-usage function arglist)))
385 ((stringp arglist) arglist) 392 ((stringp arglist) arglist)
386 ;; Maybe the arglist is in the docstring of the alias. 393 ;; Maybe the arglist is in the docstring of a symbol
387 ((let ((fun function)) 394 ;; this one is aliased to.
395 ((let ((fun real-function))
388 (while (and (symbolp fun) 396 (while (and (symbolp fun)
389 (setq fun (symbol-function fun)) 397 (setq fun (symbol-function fun))
390 (not (setq usage (help-split-fundoc 398 (not (setq usage (help-split-fundoc
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 70f2ee20646..4e9ee480d65 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -154,14 +154,16 @@ documentation of `unload-feature' for details.")
154If the feature is required by any other loaded code, and prefix arg FORCE 154If the feature is required by any other loaded code, and prefix arg FORCE
155is nil, raise an error. 155is nil, raise an error.
156 156
157This function tries to undo modifications made by the package to 157This function tries to undo any modifications that the package has
158hooks. Packages may define a hook FEATURE-unload-hook that is called 158made to hook values in Emacs. Normally it does this using heuristics.
159instead of the normal heuristics for doing this. Such a hook should 159The packages may define a hook `FEATURE-unload-hook'; if that exists,
160undo all the relevant global state changes that may have been made by 160it is called instead of the normal heuristics.
161loading the package or executing functions in it. It has access to 161
162the package's feature list (before anything is unbound) in the 162Such a hook should undo all the relevant global state changes that may
163variable `unload-hook-features-list' and could remove features from it 163have been made by loading the package or executing functions in it.
164in the event that the package has done something normally-ill-advised, 164It has access to the package's feature list (before anything is unbound)
165in the variable `unload-hook-features-list' and could remove features
166from it in the event that the package has done something strange,
165such as redefining an Emacs function." 167such as redefining an Emacs function."
166 (interactive 168 (interactive
167 (list 169 (list
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index 9264bb42ba2..5acbe70a074 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -1139,6 +1139,7 @@ Tree mode key bindings:
1139 1139
1140 (kill-all-local-variables) 1140 (kill-all-local-variables)
1141 (use-local-map ebrowse-tree-mode-map) 1141 (use-local-map ebrowse-tree-mode-map)
1142 (buffer-disable-undo)
1142 1143
1143 (unless (zerop (buffer-size)) 1144 (unless (zerop (buffer-size))
1144 (goto-char (point-min)) 1145 (goto-char (point-min))
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 96af63849a4..4148f327ecc 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1904,7 +1904,8 @@ The list of tags tables to select from is stored in `tags-table-set-list';
1904see the doc of that variable if you want to add names to the list." 1904see the doc of that variable if you want to add names to the list."
1905 (interactive) 1905 (interactive)
1906 (pop-to-buffer "*Tags Table List*") 1906 (pop-to-buffer "*Tags Table List*")
1907 (setq buffer-read-only nil) 1907 (setq buffer-read-only nil
1908 buffer-undo-list t)
1908 (erase-buffer) 1909 (erase-buffer)
1909 (let ((set-list tags-table-set-list) 1910 (let ((set-list tags-table-set-list)
1910 (desired-point nil) 1911 (desired-point nil)
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 89211732e44..c6ae98c5b12 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -2120,62 +2120,72 @@ static char *magick[] = {
2120 2120
2121(defun gdb-info-stack-custom () 2121(defun gdb-info-stack-custom ()
2122 (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) 2122 (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
2123 (save-excursion 2123 (let (move-to)
2124 (unless (eq gdb-look-up-stack 'delete) 2124 (save-excursion
2125 (let ((buffer-read-only nil) 2125 (unless (eq gdb-look-up-stack 'delete)
2126 bl el) 2126 (let ((buffer-read-only nil)
2127 (goto-char (point-min)) 2127 bl el)
2128 (while (< (point) (point-max))
2129 (setq bl (line-beginning-position)
2130 el (line-end-position))
2131 (when (looking-at "#")
2132 (add-text-properties bl el
2133 '(mouse-face highlight
2134 help-echo "mouse-2, RET: Select frame")))
2135 (goto-char bl)
2136 (when (looking-at "^#\\([0-9]+\\)")
2137 (when (string-equal (match-string 1) gdb-frame-number)
2138 (if (> (car (window-fringes)) 0)
2139 (progn
2140 (or gdb-stack-position
2141 (setq gdb-stack-position (make-marker)))
2142 (set-marker gdb-stack-position (point)))
2143 (put-text-property bl (+ bl 4)
2144 'face '(:inverse-video t))))
2145 (when (re-search-forward
2146 (concat
2147 (if (string-equal (match-string 1) "0") "" " in ")
2148 "\\([^ ]+\\) (") el t)
2149 (put-text-property (match-beginning 1) (match-end 1)
2150 'face font-lock-function-name-face)
2151 (setq bl (match-end 0))
2152 (while (re-search-forward "<\\([^>]+\\)>" el t)
2153 (put-text-property (match-beginning 1) (match-end 1)
2154 'face font-lock-function-name-face))
2155 (goto-char bl)
2156 (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
2157 (put-text-property (match-beginning 1) (match-end 1)
2158 'face font-lock-variable-name-face))))
2159 (forward-line 1))
2160 (forward-line -1)
2161 (when (looking-at "(More stack frames follow...)")
2162 (add-text-properties (match-beginning 0) (match-end 0)
2163 '(mouse-face highlight
2164 gdb-max-frames t
2165 help-echo
2166 "mouse-2, RET: customize gdb-max-frames to see more frames")))))
2167 (when gdb-look-up-stack
2168 (goto-char (point-min)) 2128 (goto-char (point-min))
2169 (when (re-search-forward "\\(\\S-+?\\):\\([0-9]+\\)" nil t) 2129 (while (< (point) (point-max))
2170 (let ((start (line-beginning-position)) 2130 (setq bl (line-beginning-position)
2171 (file (match-string 1)) 2131 el (line-end-position))
2172 (line (match-string 2))) 2132 (when (looking-at "#")
2173 (re-search-backward "^#*\\([0-9]+\\)" start t) 2133 (add-text-properties bl el
2174 (gdb-enqueue-input 2134 '(mouse-face highlight
2175 (list (concat gdb-server-prefix "frame " 2135 help-echo "mouse-2, RET: Select frame")))
2176 (match-string 1) "\n") 'gdb-set-hollow)) 2136 (goto-char bl)
2177 (gdb-enqueue-input 2137 (when (looking-at "^#\\([0-9]+\\)")
2178 (list (concat gdb-server-prefix "frame 0\n") 'ignore))))))) 2138 (when (string-equal (match-string 1) gdb-frame-number)
2139 (if (> (car (window-fringes)) 0)
2140 (progn
2141 (or gdb-stack-position
2142 (setq gdb-stack-position (make-marker)))
2143 (set-marker gdb-stack-position (point))
2144 (setq move-to gdb-stack-position))
2145 (put-text-property bl (+ bl 4)
2146 'face '(:inverse-video t))
2147 (setq move-to bl)))
2148 (when (re-search-forward
2149 (concat
2150 (if (string-equal (match-string 1) "0") "" " in ")
2151 "\\([^ ]+\\) (") el t)
2152 (put-text-property (match-beginning 1) (match-end 1)
2153 'face font-lock-function-name-face)
2154 (setq bl (match-end 0))
2155 (while (re-search-forward "<\\([^>]+\\)>" el t)
2156 (put-text-property (match-beginning 1) (match-end 1)
2157 'face font-lock-function-name-face))
2158 (goto-char bl)
2159 (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t)
2160 (put-text-property (match-beginning 1) (match-end 1)
2161 'face font-lock-variable-name-face))))
2162 (forward-line 1))
2163 (forward-line -1)
2164 (when (looking-at "(More stack frames follow...)")
2165 (add-text-properties (match-beginning 0) (match-end 0)
2166 '(mouse-face highlight
2167 gdb-max-frames t
2168 help-echo
2169 "mouse-2, RET: customize gdb-max-frames to see more frames")))))
2170 (when gdb-look-up-stack
2171 (goto-char (point-min))
2172 (when (re-search-forward "\\(\\S-+?\\):\\([0-9]+\\)" nil t)
2173 (let ((start (line-beginning-position))
2174 (file (match-string 1))
2175 (line (match-string 2)))
2176 (re-search-backward "^#*\\([0-9]+\\)" start t)
2177 (gdb-enqueue-input
2178 (list (concat gdb-server-prefix "frame "
2179 (match-string 1) "\n") 'gdb-set-hollow))
2180 (gdb-enqueue-input
2181 (list (concat gdb-server-prefix "frame 0\n") 'ignore))))))
2182 (when move-to
2183 (let ((window (get-buffer-window (current-buffer) 0)))
2184 (when window
2185 (with-selected-window window
2186 (goto-char move-to)
2187 (unless (pos-visible-in-window-p)
2188 (recenter '(center)))))))))
2179 (if (eq gdb-look-up-stack 'delete) 2189 (if (eq gdb-look-up-stack 'delete)
2180 (kill-buffer (gdb-get-buffer 'gdb-stack-buffer))) 2190 (kill-buffer (gdb-get-buffer 'gdb-stack-buffer)))
2181 (setq gdb-look-up-stack nil)) 2191 (setq gdb-look-up-stack nil))
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 646f6a80d8e..abe5cfe6489 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -6785,12 +6785,12 @@ accumulate information on matching completions."
6785 (message "Making completion list...") 6785 (message "Making completion list...")
6786 6786
6787 (unless idlwave-completion-help-links ; already set somewhere? 6787 (unless idlwave-completion-help-links ; already set somewhere?
6788 (mapcar (lambda (x) ; Pass link prop through to highlight-linked 6788 (mapc (lambda (x) ; Pass link prop through to highlight-linked
6789 (let ((link (get-text-property 0 'link (car x)))) 6789 (let ((link (get-text-property 0 'link (car x))))
6790 (if link 6790 (if link
6791 (push (cons (car x) link) 6791 (push (cons (car x) link)
6792 idlwave-completion-help-links)))) 6792 idlwave-completion-help-links))))
6793 list)) 6793 list))
6794 (let* ((list all-completions) 6794 (let* ((list all-completions)
6795 ;; "complete" means, this is already a valid completion 6795 ;; "complete" means, this is already a valid completion
6796 (complete (memq spart all-completions)) 6796 (complete (memq spart all-completions))
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 4630fe1856d..b7084950a09 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -581,13 +581,28 @@ to end after the end keyword."
581 (error nil)) 581 (error nil))
582 (< pos (point))))) 582 (< pos (point)))))
583 583
584(defun octave-looking-at-kw (regexp)
585 "Like `looking-at', but sets `case-fold-search' nil."
586 (let ((case-fold-search nil))
587 (looking-at regexp)))
588
589(defun octave-re-search-forward-kw (regexp count)
590 "Like `re-search-forward', but sets `case-fold-search' nil, and moves point."
591 (let ((case-fold-search nil))
592 (re-search-forward regexp nil 'move count)))
593
594(defun octave-re-search-backward-kw (regexp count)
595 "Like `re-search-backward', but sets `case-fold-search' nil, and moves point."
596 (let ((case-fold-search nil))
597 (re-search-backward regexp nil 'move count)))
598
584(defun octave-in-defun-p () 599(defun octave-in-defun-p ()
585 "Return t if point is inside an Octave function declaration. 600 "Return t if point is inside an Octave function declaration.
586The function is taken to start at the `f' of `function' and to end after 601The function is taken to start at the `f' of `function' and to end after
587the end keyword." 602the end keyword."
588 (let ((pos (point))) 603 (let ((pos (point)))
589 (save-excursion 604 (save-excursion
590 (or (and (looking-at "\\<function\\>") 605 (or (and (octave-looking-at-kw "\\<function\\>")
591 (octave-not-in-string-or-comment-p)) 606 (octave-not-in-string-or-comment-p))
592 (and (octave-beginning-of-defun) 607 (and (octave-beginning-of-defun)
593 (condition-case nil 608 (condition-case nil
@@ -658,14 +673,14 @@ level."
658 (while (< (point) eol) 673 (while (< (point) eol)
659 (if (octave-not-in-string-or-comment-p) 674 (if (octave-not-in-string-or-comment-p)
660 (cond 675 (cond
661 ((looking-at "\\<switch\\>") 676 ((octave-looking-at-kw "\\<switch\\>")
662 (setq icol (+ icol (* 2 octave-block-offset)))) 677 (setq icol (+ icol (* 2 octave-block-offset))))
663 ((looking-at octave-block-begin-regexp) 678 ((octave-looking-at-kw octave-block-begin-regexp)
664 (setq icol (+ icol octave-block-offset))) 679 (setq icol (+ icol octave-block-offset)))
665 ((looking-at octave-block-else-regexp) 680 ((octave-looking-at-kw octave-block-else-regexp)
666 (if (= bot (point)) 681 (if (= bot (point))
667 (setq icol (+ icol octave-block-offset)))) 682 (setq icol (+ icol octave-block-offset))))
668 ((looking-at octave-block-end-regexp) 683 ((octave-looking-at-kw octave-block-end-regexp)
669 (if (not (= bot (point))) 684 (if (not (= bot (point)))
670 (setq icol (- icol 685 (setq icol (- icol
671 (octave-block-end-offset))))))) 686 (octave-block-end-offset)))))))
@@ -675,10 +690,10 @@ level."
675 (save-excursion 690 (save-excursion
676 (back-to-indentation) 691 (back-to-indentation)
677 (cond 692 (cond
678 ((and (looking-at octave-block-else-regexp) 693 ((and (octave-looking-at-kw octave-block-else-regexp)
679 (octave-not-in-string-or-comment-p)) 694 (octave-not-in-string-or-comment-p))
680 (setq icol (- icol octave-block-offset))) 695 (setq icol (- icol octave-block-offset)))
681 ((and (looking-at octave-block-end-regexp) 696 ((and (octave-looking-at-kw octave-block-end-regexp)
682 (octave-not-in-string-or-comment-p)) 697 (octave-not-in-string-or-comment-p))
683 (setq icol (- icol (octave-block-end-offset)))) 698 (setq icol (- icol (octave-block-end-offset))))
684 ((or (looking-at "\\s<\\s<\\s<\\S<") 699 ((or (looking-at "\\s<\\s<\\s<\\S<")
@@ -854,8 +869,8 @@ an error is signaled."
854 (save-excursion 869 (save-excursion
855 (while (/= count 0) 870 (while (/= count 0)
856 (catch 'foo 871 (catch 'foo
857 (while (or (re-search-forward 872 (while (or (octave-re-search-forward-kw
858 octave-block-begin-or-end-regexp nil 'move inc) 873 octave-block-begin-or-end-regexp inc)
859 (if (/= depth 0) 874 (if (/= depth 0)
860 (error "Unbalanced block"))) 875 (error "Unbalanced block")))
861 (if (octave-not-in-string-or-comment-p) 876 (if (octave-not-in-string-or-comment-p)
@@ -974,7 +989,7 @@ Signal an error if the keywords are incompatible."
974 (looking-at "\\>") 989 (looking-at "\\>")
975 (save-excursion 990 (save-excursion
976 (skip-syntax-backward "w") 991 (skip-syntax-backward "w")
977 (looking-at octave-block-else-or-end-regexp))) 992 (octave-looking-at-kw octave-block-else-or-end-regexp)))
978 (save-excursion 993 (save-excursion
979 (cond 994 (cond
980 ((match-end 1) 995 ((match-end 1)
@@ -1021,11 +1036,11 @@ Returns t unless search stops at the beginning or end of the buffer."
1021 (inc (if (> arg 0) 1 -1)) 1036 (inc (if (> arg 0) 1 -1))
1022 (found)) 1037 (found))
1023 (and (not (eobp)) 1038 (and (not (eobp))
1024 (not (and (> arg 0) (looking-at "\\<function\\>"))) 1039 (not (and (> arg 0) (octave-looking-at-kw "\\<function\\>")))
1025 (skip-syntax-forward "w")) 1040 (skip-syntax-forward "w"))
1026 (while (and (/= arg 0) 1041 (while (and (/= arg 0)
1027 (setq found 1042 (setq found
1028 (re-search-backward "\\<function\\>" nil 'move inc))) 1043 (octave-re-search-backward-kw "\\<function\\>" inc)))
1029 (if (octave-not-in-string-or-comment-p) 1044 (if (octave-not-in-string-or-comment-p)
1030 (setq arg (- arg inc)))) 1045 (setq arg (- arg inc))))
1031 (if found 1046 (if found
@@ -1078,7 +1093,7 @@ otherwise."
1078 (save-excursion 1093 (save-excursion
1079 (beginning-of-line) 1094 (beginning-of-line)
1080 (and auto-fill-inhibit-regexp 1095 (and auto-fill-inhibit-regexp
1081 (looking-at auto-fill-inhibit-regexp)))) 1096 (octave-looking-at-kw auto-fill-inhibit-regexp))))
1082 nil ; Can't do anything 1097 nil ; Can't do anything
1083 (if (and (not (octave-in-comment-p)) 1098 (if (and (not (octave-in-comment-p))
1084 (> (current-column) fc)) 1099 (> (current-column) fc))
diff --git a/lisp/startup.el b/lisp/startup.el
index d1e44bdad6b..ff0caaf43b4 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1452,14 +1452,15 @@ a face or button specification."
1452 (when concise 1452 (when concise
1453 (fancy-splash-insert 1453 (fancy-splash-insert
1454 :face 'variable-pitch "\n" 1454 :face 'variable-pitch "\n"
1455 :link '("Dismiss" (lambda (button) 1455 :link '("Dismiss this startup screen"
1456 (when startup-screen-inhibit-startup-screen 1456 (lambda (button)
1457 (customize-set-variable 'inhibit-startup-screen t) 1457 (when startup-screen-inhibit-startup-screen
1458 (customize-mark-to-save 'inhibit-startup-screen) 1458 (customize-set-variable 'inhibit-startup-screen t)
1459 (custom-save-all)) 1459 (customize-mark-to-save 'inhibit-startup-screen)
1460 (let ((w (get-buffer-window "*GNU Emacs*"))) 1460 (custom-save-all))
1461 (and w (not (one-window-p)) (delete-window w))) 1461 (let ((w (get-buffer-window "*GNU Emacs*")))
1462 (kill-buffer "*GNU Emacs*"))) 1462 (and w (not (one-window-p)) (delete-window w)))
1463 (kill-buffer "*GNU Emacs*")))
1463 " ") 1464 " ")
1464 (when (or user-init-file custom-file) 1465 (when (or user-init-file custom-file)
1465 (let ((checked (create-image "\300\300\141\143\067\076\034\030" 1466 (let ((checked (create-image "\300\300\141\143\067\076\034\030"
@@ -1480,7 +1481,7 @@ a face or button specification."
1480 (overlay-put button 'display (overlay-get button :on-glyph)) 1481 (overlay-put button 'display (overlay-get button :on-glyph))
1481 (setq startup-screen-inhibit-startup-screen t))))) 1482 (setq startup-screen-inhibit-startup-screen t)))))
1482 (fancy-splash-insert :face '(variable-pitch :height 0.9) 1483 (fancy-splash-insert :face '(variable-pitch :height 0.9)
1483 " Don't show this message again."))))) 1484 " Never show it again.")))))
1484 1485
1485(defun exit-splash-screen () 1486(defun exit-splash-screen ()
1486 "Stop displaying the splash screen buffer." 1487 "Stop displaying the splash screen buffer."
@@ -1492,7 +1493,7 @@ a face or button specification."
1492If CONCISE is non-nil, display a concise version of the 1493If CONCISE is non-nil, display a concise version of the
1493splash screen in another window." 1494splash screen in another window."
1494 (let ((splash-buffer (get-buffer-create "*GNU Emacs*"))) 1495 (let ((splash-buffer (get-buffer-create "*GNU Emacs*")))
1495 (with-current-buffer splash-buffer 1496 (with-current-buffer splash-buffer
1496 (let ((inhibit-read-only t)) 1497 (let ((inhibit-read-only t))
1497 (erase-buffer) 1498 (erase-buffer)
1498 (make-local-variable 'startup-screen-inhibit-startup-screen) 1499 (make-local-variable 'startup-screen-inhibit-startup-screen)
@@ -1513,7 +1514,8 @@ splash screen in another window."
1513 (set-buffer-modified-p nil) 1514 (set-buffer-modified-p nil)
1514 (if (and view-read-only (not view-mode)) 1515 (if (and view-read-only (not view-mode))
1515 (view-mode-enter nil 'kill-buffer)) 1516 (view-mode-enter nil 'kill-buffer))
1516 (goto-char (point-max))) 1517 (goto-char (point-min))
1518 (forward-line (if concise 2 4)))
1517 (if concise 1519 (if concise
1518 (progn 1520 (progn
1519 (display-buffer splash-buffer) 1521 (display-buffer splash-buffer)
@@ -1551,7 +1553,8 @@ splash screen in another window."
1551 (setq tab-width 22) 1553 (setq tab-width 22)
1552 (message "%s" (startup-echo-area-message)) 1554 (message "%s" (startup-echo-area-message))
1553 (setq buffer-read-only t) 1555 (setq buffer-read-only t)
1554 (goto-char (point-min))))) 1556 (goto-char (point-min))
1557 (forward-line 3))))
1555 1558
1556(defun fancy-splash-frame () 1559(defun fancy-splash-frame ()
1557 "Return the frame to use for the fancy splash screen. 1560 "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."
1658 ;; The user can use the mouse to activate menus 1661 ;; The user can use the mouse to activate menus
1659 ;; so give help in terms of menu items. 1662 ;; so give help in terms of menu items.
1660 (insert "\ 1663 (insert "\
1661You can do basic editing with the menu bar and scroll bar using the mouse. 1664To follow a link, click Mouse-1 on it, or move to it and type RET.
1662To quit a partially entered command, type Control-g.\n") 1665To quit a partially entered command, type Control-g.\n")
1663 1666
1664 (insert "\nImportant Help menu items:\n") 1667 (insert "\nImportant Help menu items:\n")
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index bf1487f02e2..253c29f408e 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1564,8 +1564,12 @@ nil word is correct or spelling is accepted.
1564quit spell session exited." 1564quit spell session exited."
1565 1565
1566 (interactive (list ispell-following-word ispell-quietly current-prefix-arg)) 1566 (interactive (list ispell-following-word ispell-quietly current-prefix-arg))
1567 (if continue 1567 (cond
1568 (ispell-continue) 1568 ((and transient-mark-mode mark-active
1569 (not (eq (region-beginning) (region-end))))
1570 (ispell-region (region-beginning) (region-end)))
1571 (continue (ispell-continue))
1572 (t
1569 (ispell-maybe-find-aspell-dictionaries) 1573 (ispell-maybe-find-aspell-dictionaries)
1570 (ispell-accept-buffer-local-defs) ; use the correct dictionary 1574 (ispell-accept-buffer-local-defs) ; use the correct dictionary
1571 (let ((cursor-location (point)) ; retain cursor location 1575 (let ((cursor-location (point)) ; retain cursor location
@@ -1660,7 +1664,7 @@ quit spell session exited."
1660 ;; NB: Cancels ispell-quit incorrectly if called from ispell-region 1664 ;; NB: Cancels ispell-quit incorrectly if called from ispell-region
1661 (if ispell-quit (setq ispell-quit nil replace 'quit)) 1665 (if ispell-quit (setq ispell-quit nil replace 'quit))
1662 (goto-char cursor-location) ; return to original location 1666 (goto-char cursor-location) ; return to original location
1663 replace))) 1667 replace))))
1664 1668
1665 1669
1666(defun ispell-get-word (following &optional extra-otherchars) 1670(defun ispell-get-word (following &optional extra-otherchars)
@@ -2653,7 +2657,7 @@ Return nil if spell session is quit,
2653 (rstart (make-marker))) 2657 (rstart (make-marker)))
2654 (unwind-protect 2658 (unwind-protect
2655 (save-excursion 2659 (save-excursion
2656 (message "Spell checking %s using %s with %s dictionary..." 2660 (message "Spell-checking %s using %s with %s dictionary..."
2657 (if (and (= reg-start (point-min)) (= reg-end (point-max))) 2661 (if (and (= reg-start (point-min)) (= reg-end (point-max)))
2658 (buffer-name) "region") 2662 (buffer-name) "region")
2659 (file-name-nondirectory ispell-program-name) 2663 (file-name-nondirectory ispell-program-name)
@@ -2752,7 +2756,9 @@ Return nil if spell session is quit,
2752 (if (not recheckp) (set-marker ispell-region-end nil)) 2756 (if (not recheckp) (set-marker ispell-region-end nil))
2753 ;; Only save if successful exit. 2757 ;; Only save if successful exit.
2754 (ispell-pdict-save ispell-silently-savep) 2758 (ispell-pdict-save ispell-silently-savep)
2755 (message "Spell-checking using %s with %s dictionary done" 2759 (message "Spell-checking %s using %s with %s dictionary done"
2760 (if (and (= reg-start (point-min)) (= reg-end (point-max)))
2761 (buffer-name) "region")
2756 (file-name-nondirectory ispell-program-name) 2762 (file-name-nondirectory ispell-program-name)
2757 (or ispell-current-dictionary "default")))))) 2763 (or ispell-current-dictionary "default"))))))
2758 2764
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el
index 4551068af90..d08694c2080 100644
--- a/lisp/textmodes/reftex-sel.el
+++ b/lisp/textmodes/reftex-sel.el
@@ -418,11 +418,11 @@ During a selection process, these are the local bindings.
418 (set-buffer selection-buffer) 418 (set-buffer selection-buffer)
419 (use-local-map nil) 419 (use-local-map nil)
420 (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t) 420 (remove-hook 'pre-command-hook 'reftex-select-pre-command-hook t)
421 (remove-hook 'post-command-hook 421 (remove-hook 'post-command-hook
422 'reftex-select-post-command-hook t)) 422 'reftex-select-post-command-hook t))
423 ;; Kill the mark overlays 423 ;; Kill the mark overlays
424 (mapcar (lambda (c) (reftex-delete-overlay (nth 1 c))) 424 (mapc (lambda (c) (reftex-delete-overlay (nth 1 c)))
425 reftex-select-marked))))) 425 reftex-select-marked)))))
426 426
427 (set (make-local-variable 'reftex-last-line) 427 (set (make-local-variable 'reftex-last-line)
428 (+ (count-lines (point-min) (point)) (if (bolp) 1 0))) 428 (+ (count-lines (point-min) (point)) (if (bolp) 1 0)))
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 0e4362bce31..8f3979debcf 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,8 +1,27 @@
12007-10-13 Richard Stallman <rms@gnu.org>
2
3 * url-util.el (url-basepath): Function deleted.
4 (url-file-directory, url-file-nondirectory): New functions
5 replacing url-basepath. Callers changed.
6
7 * url-expand.el (url-default-expander): Use `url-file-directory'.
8
9 * url-auth.el (url-digest-auth, url-basic-auth):
10 Rename `path' to `file'. Use `url-file-directory'.
11
12007-10-12 Diane Murray <disumu@x3y2z1.net> 122007-10-12 Diane Murray <disumu@x3y2z1.net>
2 13
3 * url-auth.el (url-basic-auth): Set path to "/" when URL has an 14 * url-auth.el (url-basic-auth): Set path to "/" when URL has an
4 empty string filename. 15 empty string filename.
5 16
172007-10-09 Richard Stallman <rms@gnu.org>
18
19 * url-parse.el (url-type, url-user, url-password, url-host)
20 (url-port, url-filename, url-target, url-attributes)
21 (url-fullness, url-set-type, url-set-user, url-set-password)
22 (url-set-host, url-set-port, url-set-filename, url-set-target)
23 (url-set-attributes, url-set-full): Change macros to defuns.
24
62007-09-26 Juanma Barranquero <lekktu@gmail.com> 252007-09-26 Juanma Barranquero <lekktu@gmail.com>
7 26
8 * url-dav.el (top): 27 * url-dav.el (top):
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index 60239ba76ac..98e351916c1 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -61,22 +61,22 @@ If optional argument PROMPT is non-nil, ask for the username/password
61to use for the url and its descendants. If optional third argument 61to use for the url and its descendants. If optional third argument
62OVERWRITE is non-nil, overwrite the old username/password pair if it 62OVERWRITE is non-nil, overwrite the old username/password pair if it
63is found in the assoc list. If REALM is specified, use that as the realm 63is found in the assoc list. If REALM is specified, use that as the realm
64instead of the pathname inheritance method." 64instead of the filename inheritance method."
65 (let* ((href (if (stringp url) 65 (let* ((href (if (stringp url)
66 (url-generic-parse-url url) 66 (url-generic-parse-url url)
67 url)) 67 url))
68 (server (url-host href)) 68 (server (url-host href))
69 (port (url-port href)) 69 (port (url-port href))
70 (path (url-filename href)) 70 (file (url-filename href))
71 (user (url-user href)) 71 (user (url-user href))
72 (pass (url-password href)) 72 (pass (url-password href))
73 byserv retval data) 73 byserv retval data)
74 (setq server (format "%s:%d" server port) 74 (setq server (format "%s:%d" server port)
75 path (cond 75 file (cond
76 (realm realm) 76 (realm realm)
77 ((string= "" path) "/") 77 ((string= "" file) "/")
78 ((string-match "/$" path) path) 78 ((string-match "/$" file) file)
79 (t (url-basepath path))) 79 (t (url-file-directory file)))
80 byserv (cdr-safe (assoc server 80 byserv (cdr-safe (assoc server
81 (symbol-value url-basic-auth-storage)))) 81 (symbol-value url-basic-auth-storage))))
82 (cond 82 (cond
@@ -86,21 +86,21 @@ instead of the pathname inheritance method."
86 pass (read-passwd "Password: " nil (or pass ""))) 86 pass (read-passwd "Password: " nil (or pass "")))
87 (set url-basic-auth-storage 87 (set url-basic-auth-storage
88 (cons (list server 88 (cons (list server
89 (cons path 89 (cons file
90 (setq retval 90 (setq retval
91 (base64-encode-string 91 (base64-encode-string
92 (format "%s:%s" user pass))))) 92 (format "%s:%s" user pass)))))
93 (symbol-value url-basic-auth-storage)))) 93 (symbol-value url-basic-auth-storage))))
94 (byserv 94 (byserv
95 (setq retval (cdr-safe (assoc path byserv))) 95 (setq retval (cdr-safe (assoc file byserv)))
96 (if (and (not retval) 96 (if (and (not retval)
97 (string-match "/" path)) 97 (string-match "/" file))
98 (while (and byserv (not retval)) 98 (while (and byserv (not retval))
99 (setq data (car (car byserv))) 99 (setq data (car (car byserv)))
100 (if (or (not (string-match "/" data)) ; It's a realm - take it! 100 (if (or (not (string-match "/" data)) ; It's a realm - take it!
101 (and 101 (and
102 (>= (length path) (length data)) 102 (>= (length file) (length data))
103 (string= data (substring path 0 (length data))))) 103 (string= data (substring file 0 (length data)))))
104 (setq retval (cdr (car byserv)))) 104 (setq retval (cdr (car byserv))))
105 (setq byserv (cdr byserv)))) 105 (setq byserv (cdr byserv))))
106 (if (or (and (not retval) prompt) overwrite) 106 (if (or (and (not retval) prompt) overwrite)
@@ -111,7 +111,7 @@ instead of the pathname inheritance method."
111 retval (base64-encode-string (format "%s:%s" user pass)) 111 retval (base64-encode-string (format "%s:%s" user pass))
112 byserv (assoc server (symbol-value url-basic-auth-storage))) 112 byserv (assoc server (symbol-value url-basic-auth-storage)))
113 (setcdr byserv 113 (setcdr byserv
114 (cons (cons path retval) (cdr byserv)))))) 114 (cons (cons file retval) (cdr byserv))))))
115 (t (setq retval nil))) 115 (t (setq retval nil)))
116 (if retval (setq retval (concat "Basic " retval))) 116 (if retval (setq retval (concat "Basic " retval)))
117 retval)) 117 retval))
@@ -153,12 +153,12 @@ instead of hostname:portnum."
153 url)) 153 url))
154 (server (url-host href)) 154 (server (url-host href))
155 (port (url-port href)) 155 (port (url-port href))
156 (path (url-filename href)) 156 (file (url-filename href))
157 user pass byserv retval data) 157 user pass byserv retval data)
158 (setq path (cond 158 (setq file (cond
159 (realm realm) 159 (realm realm)
160 ((string-match "/$" path) path) 160 ((string-match "/$" file) file)
161 (t (url-basepath path))) 161 (t (url-file-directory file)))
162 server (format "%s:%d" server port) 162 server (format "%s:%d" server port)
163 byserv (cdr-safe (assoc server url-digest-auth-storage))) 163 byserv (cdr-safe (assoc server url-digest-auth-storage)))
164 (cond 164 (cond
@@ -168,7 +168,7 @@ instead of hostname:portnum."
168 pass (read-passwd "Password: ") 168 pass (read-passwd "Password: ")
169 url-digest-auth-storage 169 url-digest-auth-storage
170 (cons (list server 170 (cons (list server
171 (cons path 171 (cons file
172 (setq retval 172 (setq retval
173 (cons user 173 (cons user
174 (url-digest-auth-create-key 174 (url-digest-auth-create-key
@@ -177,15 +177,15 @@ instead of hostname:portnum."
177 url))))) 177 url)))))
178 url-digest-auth-storage))) 178 url-digest-auth-storage)))
179 (byserv 179 (byserv
180 (setq retval (cdr-safe (assoc path byserv))) 180 (setq retval (cdr-safe (assoc file byserv)))
181 (if (and (not retval) ; no exact match, check directories 181 (if (and (not retval) ; no exact match, check directories
182 (string-match "/" path)) ; not looking for a realm 182 (string-match "/" file)) ; not looking for a realm
183 (while (and byserv (not retval)) 183 (while (and byserv (not retval))
184 (setq data (car (car byserv))) 184 (setq data (car (car byserv)))
185 (if (or (not (string-match "/" data)) 185 (if (or (not (string-match "/" data))
186 (and 186 (and
187 (>= (length path) (length data)) 187 (>= (length file) (length data))
188 (string= data (substring path 0 (length data))))) 188 (string= data (substring file 0 (length data)))))
189 (setq retval (cdr (car byserv)))) 189 (setq retval (cdr (car byserv))))
190 (setq byserv (cdr byserv)))) 190 (setq byserv (cdr byserv))))
191 (if (or (and (not retval) prompt) overwrite) 191 (if (or (and (not retval) prompt) overwrite)
@@ -201,7 +201,7 @@ instead of hostname:portnum."
201 url))) 201 url)))
202 byserv (assoc server url-digest-auth-storage)) 202 byserv (assoc server url-digest-auth-storage))
203 (setcdr byserv 203 (setcdr byserv
204 (cons (cons path retval) (cdr byserv)))))) 204 (cons (cons file retval) (cdr byserv))))))
205 (t (setq retval nil))) 205 (t (setq retval nil)))
206 (if retval 206 (if retval
207 (let ((nonce (or (cdr-safe (assoc "nonce" args)) "nonegiven")) 207 (let ((nonce (or (cdr-safe (assoc "nonce" args)) "nonegiven"))
diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el
index df4de29a619..bebdbd9e04b 100644
--- a/lisp/url/url-expand.el
+++ b/lisp/url/url-expand.el
@@ -135,7 +135,8 @@ path components followed by `..' are removed, along with the `..' itself."
135 sepchar (substring (url-filename urlobj) (match-beginning 0) (match-end 0))) 135 sepchar (substring (url-filename urlobj) (match-beginning 0) (match-end 0)))
136 (setq file (url-filename urlobj))) 136 (setq file (url-filename urlobj)))
137 (setq file (url-expander-remove-relative-links 137 (setq file (url-expander-remove-relative-links
138 (concat (url-basepath (url-filename defobj)) file))) 138 (expand-file-name file
139 (url-file-directory (url-filename defobj)))))
139 (setf (url-filename urlobj) 140 (setf (url-filename urlobj)
140 (if query (concat file sepchar query) file)))))) 141 (if query (concat file sepchar query) file))))))
141 142
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 9f73fa435be..119f40b4da4 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -259,18 +259,24 @@ Will not do anything if `url-show-status' is nil."
259 (/ (* x 100) y))) 259 (/ (* x 100) y)))
260 260
261;;;###autoload 261;;;###autoload
262(defun url-basepath (file &optional x) 262(defun url-file-directory (file)
263 "Return the base pathname of FILE, or the actual filename if X is true." 263 "Return the directory part of FILE, for a URL."
264 (cond 264 (cond
265 ((null file) "") 265 ((null file) "")
266 ((string-match (eval-when-compile (regexp-quote "?")) file) 266 ((string-match (eval-when-compile (regexp-quote "?")) file)
267 (if x 267 (file-name-directory (substring file 0 (match-beginning 0))))
268 (file-name-nondirectory (substring file 0 (match-beginning 0)))
269 (file-name-directory (substring file 0 (match-beginning 0)))))
270 (x (file-name-nondirectory file))
271 (t (file-name-directory file)))) 268 (t (file-name-directory file))))
272 269
273;;;###autoload 270;;;###autoload
271(defun url-file-nondirectory (file)
272 "Return the nondirectory part of FILE, for a URL."
273 (cond
274 ((null file) "")
275 ((string-match (eval-when-compile (regexp-quote "?")) file)
276 (file-name-nondirectory (substring file 0 (match-beginning 0))))
277 (t (file-name-nondirectory file))))
278
279;;;###autoload
274(defun url-parse-query-string (query &optional downcase allow-newlines) 280(defun url-parse-query-string (query &optional downcase allow-newlines)
275 (let (retval pairs cur key val) 281 (let (retval pairs cur key val)
276 (setq pairs (split-string query "&")) 282 (setq pairs (split-string query "&"))
@@ -385,7 +391,7 @@ string: \"%\" followed by two lowercase hex digits."
385If optional variable X is t, 391If optional variable X is t,
386then return the basename of the file with the extension stripped off." 392then return the basename of the file with the extension stripped off."
387 (if (and fname 393 (if (and fname
388 (setq fname (url-basepath fname t)) 394 (setq fname (url-file-nondirectory fname))
389 (string-match "\\.[^./]+$" fname)) 395 (string-match "\\.[^./]+$" fname))
390 (if x (substring fname 0 (match-beginning 0)) 396 (if x (substring fname 0 (match-beginning 0))
391 (substring fname (match-beginning 0) nil)) 397 (substring fname (match-beginning 0) nil))
diff --git a/lisp/woman.el b/lisp/woman.el
index fc0100b31da..876fd6fc311 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -846,7 +846,7 @@ Heading emboldening is NOT standard `man' behavior."
846 :group 'woman-formatting) 846 :group 'woman-formatting)
847 847
848(defcustom woman-ignore t 848(defcustom woman-ignore t
849 "If non-nil then unrecognized requests etc.. are ignored. Default is t. 849 "If non-nil then unrecognized requests etc. are ignored. Default is t.
850This gives the standard ?roff behavior. If nil then they are left in 850This gives the standard ?roff behavior. If nil then they are left in
851the buffer, which may aid debugging." 851the buffer, which may aid debugging."
852 :type 'boolean 852 :type 'boolean
diff --git a/src/ChangeLog b/src/ChangeLog
index c928977d68b..4ba46df0f23 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,47 @@
12007-10-10 Patrick Mahan <mahan@mahan.org> (tiny change) 12007-10-14 Juanma Barranquero <lekktu@gmail.com>
2
3 * w32term.c (w32_font_is_double_byte, my_create_scrollbar): Make static.
4 (syms_of_w32term) <w32-enable-unicode-output>: Fix typo in docstring.
5
62007-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
7
8 * buffer.c (Fmake_indirect_buffer): Set the buffer's tag.
9
102007-10-14 Juanma Barranquero <lekktu@gmail.com>
11
12 * eval.c (do_autoload): Don't save autoloads.
13
14 * data.c (Ffset): Save autoload of the function being set.
15
162007-10-07 John Paul Wallington <jpw@pobox.com>
17
18 * xfns.c (x_create_tip_frame): Set the `display-type' frame
19 parameter before setting up faces.
20
212007-10-13 Eli Zaretskii <eliz@gnu.org>
22
23 * ccl.c (Fregister_code_conversion_map):
24 * keyboard.c (append_tool_bar_item): Reformat last change.
25
26 * lisp.h (eabs): Rename from `abs'. All callers changed.
27
282007-10-05 Dmitry Antipov <dmantipov@yandex.ru>
29
30 * buffer.c (add_overlay_mod_hooklist):
31 * ccl.c (Fregister_ccl_program, Fregister_code_conversion_map):
32 * fontset.c (make_fontset):
33 * keyboard.c (GROW_RAW_KEYBUF, menu_bar_items, menu_bar_item)
34 (append_tool_bar_item):
35 * macmenu.c (grow_menu_items):
36 * w32menu.c (grow_menu_items):
37 * xmenu.c (grow_menu_items): Use larger_vector.
38
392007-10-13 Eli Zaretskii <eliz@gnu.org>
40
41 * msdos.c (dos_rawgetc): Undo last change (there's no ``leaving
42 selected frame'' on MSDOS).
43
442007-10-10 Patrick Mahan <mahan@mahan.org> (tiny change)
2 45
3 * macfns.c (x_create_tip_frame): Set terminal for frame. 46 * macfns.c (x_create_tip_frame): Set terminal for frame.
4 47
@@ -785,7 +828,7 @@
785 * keyboard.c (restore_kboard_configuration): Only define when 828 * keyboard.c (restore_kboard_configuration): Only define when
786 MULTI_KBOARD defined. 829 MULTI_KBOARD defined.
787 830
788 * makefile.w32-in: Update dependancies from Makefile.in 831 * makefile.w32-in: Update dependancies from Makefile.in.
789 (OBJ1): Add terminal.$(O) 832 (OBJ1): Add terminal.$(O)
790 833
791 * term.c (dissociate_if_controlling_tty) [WINDOWSNT]: 834 * term.c (dissociate_if_controlling_tty) [WINDOWSNT]:
@@ -1335,7 +1378,7 @@
1335 1378
13362007-08-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 13792007-08-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1337 1380
1338 * mac.c [MAC_OSX] (select_and_poll_event, sys_select): Fix last changes. 1381 * mac.c [MAC_OSX] (select_and_poll_event, sys_select): Fix last changes.
1339 1382
13402007-08-24 Martin Rudalics <rudalics@gmx.at> 13832007-08-24 Martin Rudalics <rudalics@gmx.at>
1341 1384
diff --git a/src/buffer.c b/src/buffer.c
index 237c549df8b..d5f9541301d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -569,6 +569,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
569 569
570 b = (struct buffer *) allocate_buffer (); 570 b = (struct buffer *) allocate_buffer ();
571 b->size = sizeof (struct buffer) / sizeof (EMACS_INT); 571 b->size = sizeof (struct buffer) / sizeof (EMACS_INT);
572 XSETPVECTYPE (b, PVEC_BUFFER);
572 573
573 if (XBUFFER (base_buffer)->base_buffer) 574 if (XBUFFER (base_buffer)->base_buffer)
574 b->base_buffer = XBUFFER (base_buffer)->base_buffer; 575 b->base_buffer = XBUFFER (base_buffer)->base_buffer;
@@ -4233,15 +4234,8 @@ add_overlay_mod_hooklist (functionlist, overlay)
4233 int oldsize = XVECTOR (last_overlay_modification_hooks)->size; 4234 int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
4234 4235
4235 if (last_overlay_modification_hooks_used == oldsize) 4236 if (last_overlay_modification_hooks_used == oldsize)
4236 { 4237 last_overlay_modification_hooks = larger_vector
4237 Lisp_Object old; 4238 (last_overlay_modification_hooks, oldsize * 2, Qnil);
4238 old = last_overlay_modification_hooks;
4239 last_overlay_modification_hooks
4240 = Fmake_vector (make_number (oldsize * 2), Qnil);
4241 bcopy (XVECTOR (old)->contents,
4242 XVECTOR (last_overlay_modification_hooks)->contents,
4243 sizeof (Lisp_Object) * oldsize);
4244 }
4245 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = functionlist; 4239 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = functionlist;
4246 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = overlay; 4240 AREF (last_overlay_modification_hooks, last_overlay_modification_hooks_used++) = overlay;
4247} 4241}
diff --git a/src/ccl.c b/src/ccl.c
index d51743c243a..5e4a6632d1d 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -2245,16 +2245,8 @@ Return index number of the registered CCL program. */)
2245 } 2245 }
2246 2246
2247 if (idx == len) 2247 if (idx == len)
2248 { 2248 /* Extend the table. */
2249 /* Extend the table. */ 2249 Vccl_program_table = larger_vector (Vccl_program_table, len * 2, Qnil);
2250 Lisp_Object new_table;
2251 int j;
2252
2253 new_table = Fmake_vector (make_number (len * 2), Qnil);
2254 for (j = 0; j < len; j++)
2255 ASET (new_table, j, AREF (Vccl_program_table, j));
2256 Vccl_program_table = new_table;
2257 }
2258 2250
2259 { 2251 {
2260 Lisp_Object elt; 2252 Lisp_Object elt;
@@ -2313,15 +2305,8 @@ Return index number of the registered map. */)
2313 } 2305 }
2314 2306
2315 if (i == len) 2307 if (i == len)
2316 { 2308 Vcode_conversion_map_vector = larger_vector (Vcode_conversion_map_vector,
2317 Lisp_Object new_vector = Fmake_vector (make_number (len * 2), Qnil); 2309 len * 2, Qnil);
2318 int j;
2319
2320 for (j = 0; j < len; j++)
2321 AREF (new_vector, j)
2322 = AREF (Vcode_conversion_map_vector, j);
2323 Vcode_conversion_map_vector = new_vector;
2324 }
2325 2310
2326 index = make_number (i); 2311 index = make_number (i);
2327 Fput (symbol, Qcode_conversion_map, map); 2312 Fput (symbol, Qcode_conversion_map, map);
diff --git a/src/data.c b/src/data.c
index 6439686dcd9..81cffcb38de 100644
--- a/src/data.c
+++ b/src/data.c
@@ -663,12 +663,20 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
663 (symbol, definition) 663 (symbol, definition)
664 register Lisp_Object symbol, definition; 664 register Lisp_Object symbol, definition;
665{ 665{
666 register Lisp_Object function;
667
666 CHECK_SYMBOL (symbol); 668 CHECK_SYMBOL (symbol);
667 if (NILP (symbol) || EQ (symbol, Qt)) 669 if (NILP (symbol) || EQ (symbol, Qt))
668 xsignal1 (Qsetting_constant, symbol); 670 xsignal1 (Qsetting_constant, symbol);
669 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) 671
670 Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), 672 function = XSYMBOL (symbol)->function;
671 Vautoload_queue); 673
674 if (!NILP (Vautoload_queue) && !EQ (function, Qunbound))
675 Vautoload_queue = Fcons (Fcons (symbol, function), Vautoload_queue);
676
677 if (CONSP (function) && EQ (XCAR (function), Qautoload))
678 Fput (symbol, Qautoload, XCDR (function));
679
672 XSYMBOL (symbol)->function = definition; 680 XSYMBOL (symbol)->function = definition;
673 /* Handle automatic advice activation */ 681 /* Handle automatic advice activation */
674 if (CONSP (XSYMBOL (symbol)->plist) && !NILP (Fget (symbol, Qad_advice_info))) 682 if (CONSP (XSYMBOL (symbol)->plist) && !NILP (Fget (symbol, Qad_advice_info)))
@@ -752,7 +760,7 @@ Value, if non-nil, is a list \(interactive SPEC). */)
752 Lisp_Object cmd; 760 Lisp_Object cmd;
753{ 761{
754 Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ 762 Lisp_Object fun = indirect_function (cmd); /* Check cycles. */
755 763
756 if (NILP (fun) || EQ (fun, Qunbound)) 764 if (NILP (fun) || EQ (fun, Qunbound))
757 return Qnil; 765 return Qnil;
758 766
diff --git a/src/dispextern.h b/src/dispextern.h
index 32ecee96f60..e89d0d7e390 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -680,9 +680,9 @@ struct glyph_row
680 short used[LAST_AREA]; 680 short used[LAST_AREA];
681 681
682 /* Window-relative x and y-position of the top-left corner of this 682 /* Window-relative x and y-position of the top-left corner of this
683 row. If y < 0, this means that abs (y) pixels of the row are 683 row. If y < 0, this means that eabs (y) pixels of the row are
684 invisible because it is partially visible at the top of a window. 684 invisible because it is partially visible at the top of a window.
685 If x < 0, this means that abs (x) pixels of the first glyph of 685 If x < 0, this means that eabs (x) pixels of the first glyph of
686 the text area of the row are invisible because the glyph is 686 the text area of the row are invisible because the glyph is
687 partially visible. */ 687 partially visible. */
688 int x, y; 688 int x, y;
diff --git a/src/dispnew.c b/src/dispnew.c
index ab2c1518dce..79bb81abfeb 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1993,7 +1993,7 @@ required_matrix_height (w)
1993 if (FRAME_WINDOW_P (f)) 1993 if (FRAME_WINDOW_P (f))
1994 { 1994 {
1995 int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); 1995 int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f);
1996 int window_pixel_height = window_box_height (w) + abs (w->vscroll); 1996 int window_pixel_height = window_box_height (w) + eabs (w->vscroll);
1997 return (((window_pixel_height + ch_height - 1) 1997 return (((window_pixel_height + ch_height - 1)
1998 / ch_height) * w->nrows_scale_factor 1998 / ch_height) * w->nrows_scale_factor
1999 /* One partially visible line at the top and 1999 /* One partially visible line at the top and
diff --git a/src/editfns.c b/src/editfns.c
index 152c5b669d9..66e3883494f 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1846,7 +1846,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
1846 tzstring = (char *) SDATA (zone); 1846 tzstring = (char *) SDATA (zone);
1847 else if (INTEGERP (zone)) 1847 else if (INTEGERP (zone))
1848 { 1848 {
1849 int abszone = abs (XINT (zone)); 1849 int abszone = eabs (XINT (zone));
1850 sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XINT (zone) < 0), 1850 sprintf (tzbuf, "XXX%s%d:%02d:%02d", "-" + (XINT (zone) < 0),
1851 abszone / (60*60), (abszone/60) % 60, abszone % 60); 1851 abszone / (60*60), (abszone/60) % 60, abszone % 60);
1852 tzstring = tzbuf; 1852 tzstring = tzbuf;
diff --git a/src/eval.c b/src/eval.c
index 77abe5046db..b69eea44c75 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2178,7 +2178,7 @@ do_autoload (fundef, funname)
2178 Lisp_Object fundef, funname; 2178 Lisp_Object fundef, funname;
2179{ 2179{
2180 int count = SPECPDL_INDEX (); 2180 int count = SPECPDL_INDEX ();
2181 Lisp_Object fun, queue, first, second; 2181 Lisp_Object fun;
2182 struct gcpro gcpro1, gcpro2, gcpro3; 2182 struct gcpro gcpro1, gcpro2, gcpro3;
2183 2183
2184 /* This is to make sure that loadup.el gives a clear picture 2184 /* This is to make sure that loadup.el gives a clear picture
@@ -2199,20 +2199,6 @@ do_autoload (fundef, funname)
2199 Vautoload_queue = Qt; 2199 Vautoload_queue = Qt;
2200 Fload (Fcar (Fcdr (fundef)), Qnil, Qt, Qnil, Qt); 2200 Fload (Fcar (Fcdr (fundef)), Qnil, Qt, Qnil, Qt);
2201 2201
2202 /* Save the old autoloads, in case we ever do an unload. */
2203 queue = Vautoload_queue;
2204 while (CONSP (queue))
2205 {
2206 first = XCAR (queue);
2207 second = Fcdr (first);
2208 first = Fcar (first);
2209
2210 if (SYMBOLP (first) && CONSP (second) && EQ (XCAR (second), Qautoload))
2211 Fput (first, Qautoload, (XCDR (second)));
2212
2213 queue = XCDR (queue);
2214 }
2215
2216 /* Once loading finishes, don't undo it. */ 2202 /* Once loading finishes, don't undo it. */
2217 Vautoload_queue = Qt; 2203 Vautoload_queue = Qt;
2218 unbind_to (count, Qnil); 2204 unbind_to (count, Qnil);
diff --git a/src/fontset.c b/src/fontset.c
index a9cf53c4913..045e632778e 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -859,16 +859,7 @@ make_fontset (frame, name, base)
859 while (!NILP (AREF (Vfontset_table, id))) id++; 859 while (!NILP (AREF (Vfontset_table, id))) id++;
860 860
861 if (id + 1 == size) 861 if (id + 1 == size)
862 { 862 Vfontset_table = larger_vector (Vfontset_table, size + 32, Qnil);
863 /* We must grow Vfontset_table. */
864 Lisp_Object tem;
865 int i;
866
867 tem = Fmake_vector (make_number (size + 32), Qnil);
868 for (i = 0; i < size; i++)
869 AREF (tem, i) = AREF (Vfontset_table, i);
870 Vfontset_table = tem;
871 }
872 863
873 fontset = Fmake_char_table (Qfontset, Qnil); 864 fontset = Fmake_char_table (Qfontset, Qnil);
874 865
diff --git a/src/frame.c b/src/frame.c
index 5f4e12cd705..389a94ae3e8 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -107,6 +107,7 @@ Lisp_Object Qouter_window_id;
107#endif 107#endif
108Lisp_Object Qparent_id; 108Lisp_Object Qparent_id;
109Lisp_Object Qtitle, Qname; 109Lisp_Object Qtitle, Qname;
110Lisp_Object Qexplicit_name;
110Lisp_Object Qunsplittable; 111Lisp_Object Qunsplittable;
111Lisp_Object Qmenu_bar_lines, Qtool_bar_lines; 112Lisp_Object Qmenu_bar_lines, Qtool_bar_lines;
112Lisp_Object Qleft_fringe, Qright_fringe; 113Lisp_Object Qleft_fringe, Qright_fringe;
@@ -3281,6 +3282,7 @@ x_report_frame_params (f, alistptr)
3281 tem = Qnil; 3282 tem = Qnil;
3282 else 3283 else
3283 XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc); 3284 XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc);
3285 store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
3284 store_in_alist (alistptr, Qparent_id, tem); 3286 store_in_alist (alistptr, Qparent_id, tem);
3285} 3287}
3286 3288
@@ -4337,6 +4339,8 @@ syms_of_frame ()
4337 staticpro (&Qframep); 4339 staticpro (&Qframep);
4338 Qframe_live_p = intern ("frame-live-p"); 4340 Qframe_live_p = intern ("frame-live-p");
4339 staticpro (&Qframe_live_p); 4341 staticpro (&Qframe_live_p);
4342 Qexplicit_name = intern ("explicit-name");
4343 staticpro (&Qexplicit_name);
4340 Qheight = intern ("height"); 4344 Qheight = intern ("height");
4341 staticpro (&Qheight); 4345 staticpro (&Qheight);
4342 Qicon = intern ("icon"); 4346 Qicon = intern ("icon");
diff --git a/src/image.c b/src/image.c
index 16826c425fa..33d5e1a9b2d 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1984,8 +1984,8 @@ lookup_image (f, spec)
1984 if (INTEGERP (relief)) 1984 if (INTEGERP (relief))
1985 { 1985 {
1986 img->relief = XINT (relief); 1986 img->relief = XINT (relief);
1987 img->hmargin += abs (img->relief); 1987 img->hmargin += eabs (img->relief);
1988 img->vmargin += abs (img->relief); 1988 img->vmargin += eabs (img->relief);
1989 } 1989 }
1990 1990
1991 if (! img->background_valid) 1991 if (! img->background_valid)
@@ -5165,7 +5165,7 @@ x_detect_edges (f, img, matrix, color_adjust)
5165 int x, y, i, sum; 5165 int x, y, i, sum;
5166 5166
5167 for (i = sum = 0; i < 9; ++i) 5167 for (i = sum = 0; i < 9; ++i)
5168 sum += abs (matrix[i]); 5168 sum += eabs (matrix[i]);
5169 5169
5170#define COLOR(A, X, Y) ((A) + (Y) * img->width + (X)) 5170#define COLOR(A, X, Y) ((A) + (Y) * img->width + (X))
5171 5171
diff --git a/src/intervals.c b/src/intervals.c
index 74269c7d406..1190ad11cea 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -427,7 +427,7 @@ balance_an_interval (i)
427 /* Since the left child is longer, there must be one. */ 427 /* Since the left child is longer, there must be one. */
428 new_diff = i->total_length - i->left->total_length 428 new_diff = i->total_length - i->left->total_length
429 + RIGHT_TOTAL_LENGTH (i->left) - LEFT_TOTAL_LENGTH (i->left); 429 + RIGHT_TOTAL_LENGTH (i->left) - LEFT_TOTAL_LENGTH (i->left);
430 if (abs (new_diff) >= old_diff) 430 if (eabs (new_diff) >= old_diff)
431 break; 431 break;
432 i = rotate_right (i); 432 i = rotate_right (i);
433 balance_an_interval (i->right); 433 balance_an_interval (i->right);
@@ -437,7 +437,7 @@ balance_an_interval (i)
437 /* Since the right child is longer, there must be one. */ 437 /* Since the right child is longer, there must be one. */
438 new_diff = i->total_length - i->right->total_length 438 new_diff = i->total_length - i->right->total_length
439 + LEFT_TOTAL_LENGTH (i->right) - RIGHT_TOTAL_LENGTH (i->right); 439 + LEFT_TOTAL_LENGTH (i->right) - RIGHT_TOTAL_LENGTH (i->right);
440 if (abs (new_diff) >= -old_diff) 440 if (eabs (new_diff) >= -old_diff)
441 break; 441 break;
442 i = rotate_left (i); 442 i = rotate_left (i);
443 balance_an_interval (i->left); 443 balance_an_interval (i->left);
diff --git a/src/keyboard.c b/src/keyboard.c
index d64091db506..6d6ba6e0cc0 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -160,14 +160,7 @@ int raw_keybuf_count;
160 160
161#define GROW_RAW_KEYBUF \ 161#define GROW_RAW_KEYBUF \
162 if (raw_keybuf_count == XVECTOR (raw_keybuf)->size) \ 162 if (raw_keybuf_count == XVECTOR (raw_keybuf)->size) \
163 { \ 163 raw_keybuf = larger_vector (raw_keybuf, raw_keybuf_count * 2, Qnil) \
164 int newsize = 2 * XVECTOR (raw_keybuf)->size; \
165 Lisp_Object new; \
166 new = Fmake_vector (make_number (newsize), Qnil); \
167 bcopy (XVECTOR (raw_keybuf)->contents, XVECTOR (new)->contents, \
168 raw_keybuf_count * sizeof (Lisp_Object)); \
169 raw_keybuf = new; \
170 }
171 164
172/* Number of elements of this_command_keys 165/* Number of elements of this_command_keys
173 that precede this key sequence. */ 166 that precede this key sequence. */
@@ -5714,8 +5707,8 @@ make_lispy_event (event)
5714 fuzz = double_click_fuzz / 8; 5707 fuzz = double_click_fuzz / 8;
5715 5708
5716 is_double = (button == last_mouse_button 5709 is_double = (button == last_mouse_button
5717 && (abs (XINT (event->x) - last_mouse_x) <= fuzz) 5710 && (eabs (XINT (event->x) - last_mouse_x) <= fuzz)
5718 && (abs (XINT (event->y) - last_mouse_y) <= fuzz) 5711 && (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
5719 && button_down_time != 0 5712 && button_down_time != 0
5720 && (EQ (Vdouble_click_time, Qt) 5713 && (EQ (Vdouble_click_time, Qt)
5721 || (INTEGERP (Vdouble_click_time) 5714 || (INTEGERP (Vdouble_click_time)
@@ -5883,8 +5876,8 @@ make_lispy_event (event)
5883 fuzz = double_click_fuzz / 8; 5876 fuzz = double_click_fuzz / 8;
5884 5877
5885 is_double = (last_mouse_button < 0 5878 is_double = (last_mouse_button < 0
5886 && (abs (XINT (event->x) - last_mouse_x) <= fuzz) 5879 && (eabs (XINT (event->x) - last_mouse_x) <= fuzz)
5887 && (abs (XINT (event->y) - last_mouse_y) <= fuzz) 5880 && (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
5888 && button_down_time != 0 5881 && button_down_time != 0
5889 && (EQ (Vdouble_click_time, Qt) 5882 && (EQ (Vdouble_click_time, Qt)
5890 || (INTEGERP (Vdouble_click_time) 5883 || (INTEGERP (Vdouble_click_time)
@@ -7598,13 +7591,7 @@ menu_bar_items (old)
7598 /* Add nil, nil, nil, nil at the end. */ 7591 /* Add nil, nil, nil, nil at the end. */
7599 i = menu_bar_items_index; 7592 i = menu_bar_items_index;
7600 if (i + 4 > XVECTOR (menu_bar_items_vector)->size) 7593 if (i + 4 > XVECTOR (menu_bar_items_vector)->size)
7601 { 7594 menu_bar_items_vector = larger_vector (menu_bar_items_vector, 2 * i, Qnil);
7602 Lisp_Object tem;
7603 tem = Fmake_vector (make_number (2 * i), Qnil);
7604 bcopy (XVECTOR (menu_bar_items_vector)->contents,
7605 XVECTOR (tem)->contents, i * sizeof (Lisp_Object));
7606 menu_bar_items_vector = tem;
7607 }
7608 /* Add this item. */ 7595 /* Add this item. */
7609 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; 7596 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
7610 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; 7597 XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
@@ -7676,14 +7663,7 @@ menu_bar_item (key, item, dummy1, dummy2)
7676 { 7663 {
7677 /* If vector is too small, get a bigger one. */ 7664 /* If vector is too small, get a bigger one. */
7678 if (i + 4 > XVECTOR (menu_bar_items_vector)->size) 7665 if (i + 4 > XVECTOR (menu_bar_items_vector)->size)
7679 { 7666 menu_bar_items_vector = larger_vector (menu_bar_items_vector, 2 * i, Qnil);
7680 Lisp_Object tem;
7681 tem = Fmake_vector (make_number (2 * i), Qnil);
7682 bcopy (XVECTOR (menu_bar_items_vector)->contents,
7683 XVECTOR (tem)->contents, i * sizeof (Lisp_Object));
7684 menu_bar_items_vector = tem;
7685 }
7686
7687 /* Add this item. */ 7667 /* Add this item. */
7688 XVECTOR (menu_bar_items_vector)->contents[i++] = key; 7668 XVECTOR (menu_bar_items_vector)->contents[i++] = key;
7689 XVECTOR (menu_bar_items_vector)->contents[i++] 7669 XVECTOR (menu_bar_items_vector)->contents[i++]
@@ -8452,16 +8432,9 @@ append_tool_bar_item ()
8452 /* Enlarge tool_bar_items_vector if necessary. */ 8432 /* Enlarge tool_bar_items_vector if necessary. */
8453 if (ntool_bar_items + TOOL_BAR_ITEM_NSLOTS 8433 if (ntool_bar_items + TOOL_BAR_ITEM_NSLOTS
8454 >= XVECTOR (tool_bar_items_vector)->size) 8434 >= XVECTOR (tool_bar_items_vector)->size)
8455 { 8435 tool_bar_items_vector
8456 Lisp_Object new_vector; 8436 = larger_vector (tool_bar_items_vector,
8457 int old_size = XVECTOR (tool_bar_items_vector)->size; 8437 2 * XVECTOR (tool_bar_items_vector)->size, Qnil);
8458
8459 new_vector = Fmake_vector (make_number (2 * old_size), Qnil);
8460 bcopy (XVECTOR (tool_bar_items_vector)->contents,
8461 XVECTOR (new_vector)->contents,
8462 old_size * sizeof (Lisp_Object));
8463 tool_bar_items_vector = new_vector;
8464 }
8465 8438
8466 /* Append entries from tool_bar_item_properties to the end of 8439 /* Append entries from tool_bar_item_properties to the end of
8467 tool_bar_items_vector. */ 8440 tool_bar_items_vector. */
diff --git a/src/lisp.h b/src/lisp.h
index 50750af3c4f..231cfcc7379 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3368,9 +3368,11 @@ extern Lisp_Object Vdirectory_sep_char;
3368#define min(a, b) ((a) < (b) ? (a) : (b)) 3368#define min(a, b) ((a) < (b) ? (a) : (b))
3369#define max(a, b) ((a) > (b) ? (a) : (b)) 3369#define max(a, b) ((a) > (b) ? (a) : (b))
3370 3370
3371/* Make sure we have abs defined */ 3371/* We used to use `abs', but that clashes with system headers on some
3372#if !defined(abs) 3372 platforms, and using a name reserved by Standard C is a bad idea
3373#define abs(x) ((x) < 0 ? -(x) : (x)) 3373 anyway. */
3374#if !defined(eabs)
3375#define eabs(x) ((x) < 0 ? -(x) : (x))
3374#endif 3376#endif
3375 3377
3376/* Return a fixnum or float, depending on whether VAL fits in a Lisp 3378/* Return a fixnum or float, depending on whether VAL fits in a Lisp
diff --git a/src/macfns.c b/src/macfns.c
index 0330ccd0d44..9a9eb69fa63 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -1868,15 +1868,7 @@ x_implicitly_set_name (f, arg, oldval)
1868} 1868}
1869 1869
1870/* Change the title of frame F to NAME. 1870/* Change the title of frame F to NAME.
1871 If NAME is nil, use the frame name as the title. 1871 If NAME is nil, use the frame name as the title. */
1872
1873 If EXPLICIT is non-zero, that indicates that lisp code is setting the
1874 name; if NAME is a string, set F's name to NAME and set
1875 F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
1876
1877 If EXPLICIT is zero, that indicates that Emacs redisplay code is
1878 suggesting a new name, which lisp code should override; if
1879 F->explicit_name is set, ignore the new name; otherwise, set it. */
1880 1872
1881void 1873void
1882x_set_title (f, name, old_name) 1874x_set_title (f, name, old_name)
diff --git a/src/macmenu.c b/src/macmenu.c
index 8305c89ee68..aa0be0bdc2e 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -347,15 +347,8 @@ save_menu_items ()
347static void 347static void
348grow_menu_items () 348grow_menu_items ()
349{ 349{
350 Lisp_Object old;
351 int old_size = menu_items_allocated;
352 old = menu_items;
353
354 menu_items_allocated *= 2; 350 menu_items_allocated *= 2;
355 351 menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
356 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
357 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
358 old_size * sizeof (Lisp_Object));
359} 352}
360 353
361/* Begin a submenu. */ 354/* Begin a submenu. */
diff --git a/src/macterm.c b/src/macterm.c
index ed7411615f5..a15f0b0fcfc 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -2970,7 +2970,7 @@ x_draw_glyph_string_foreground (s)
2970 of S to the right of that box line. */ 2970 of S to the right of that box line. */
2971 if (s->face->box != FACE_NO_BOX 2971 if (s->face->box != FACE_NO_BOX
2972 && s->first_glyph->left_box_line_p) 2972 && s->first_glyph->left_box_line_p)
2973 x = s->x + abs (s->face->box_line_width); 2973 x = s->x + eabs (s->face->box_line_width);
2974 else 2974 else
2975 x = s->x; 2975 x = s->x;
2976 2976
@@ -3049,7 +3049,7 @@ x_draw_composite_glyph_string_foreground (s)
3049 of S to the right of that box line. */ 3049 of S to the right of that box line. */
3050 if (s->face->box != FACE_NO_BOX 3050 if (s->face->box != FACE_NO_BOX
3051 && s->first_glyph->left_box_line_p) 3051 && s->first_glyph->left_box_line_p)
3052 x = s->x + abs (s->face->box_line_width); 3052 x = s->x + eabs (s->face->box_line_width);
3053 else 3053 else
3054 x = s->x; 3054 x = s->x;
3055 3055
@@ -3544,7 +3544,7 @@ x_draw_glyph_string_box (s)
3544 ? s->first_glyph 3544 ? s->first_glyph
3545 : s->first_glyph + s->nchars - 1); 3545 : s->first_glyph + s->nchars - 1);
3546 3546
3547 width = abs (s->face->box_line_width); 3547 width = eabs (s->face->box_line_width);
3548 raised_p = s->face->box == FACE_RAISED_BOX; 3548 raised_p = s->face->box == FACE_RAISED_BOX;
3549 left_x = s->x; 3549 left_x = s->x;
3550 right_x = (s->row->full_width_p && s->extends_to_end_of_line_p 3550 right_x = (s->row->full_width_p && s->extends_to_end_of_line_p
@@ -3590,7 +3590,7 @@ x_draw_image_foreground (s)
3590 if (s->face->box != FACE_NO_BOX 3590 if (s->face->box != FACE_NO_BOX
3591 && s->first_glyph->left_box_line_p 3591 && s->first_glyph->left_box_line_p
3592 && s->slice.x == 0) 3592 && s->slice.x == 0)
3593 x += abs (s->face->box_line_width); 3593 x += eabs (s->face->box_line_width);
3594 3594
3595 /* If there is a margin around the image, adjust x- and y-position 3595 /* If there is a margin around the image, adjust x- and y-position
3596 by that margin. */ 3596 by that margin. */
@@ -3663,7 +3663,7 @@ x_draw_image_relief (s)
3663 if (s->face->box != FACE_NO_BOX 3663 if (s->face->box != FACE_NO_BOX
3664 && s->first_glyph->left_box_line_p 3664 && s->first_glyph->left_box_line_p
3665 && s->slice.x == 0) 3665 && s->slice.x == 0)
3666 x += abs (s->face->box_line_width); 3666 x += eabs (s->face->box_line_width);
3667 3667
3668 /* If there is a margin around the image, adjust x- and y-position 3668 /* If there is a margin around the image, adjust x- and y-position
3669 by that margin. */ 3669 by that margin. */
@@ -3680,7 +3680,7 @@ x_draw_image_relief (s)
3680 } 3680 }
3681 else 3681 else
3682 { 3682 {
3683 thick = abs (s->img->relief); 3683 thick = eabs (s->img->relief);
3684 raised_p = s->img->relief > 0; 3684 raised_p = s->img->relief > 0;
3685 } 3685 }
3686 3686
@@ -3741,7 +3741,7 @@ x_draw_image_glyph_string (s)
3741 struct glyph_string *s; 3741 struct glyph_string *s;
3742{ 3742{
3743 int x, y; 3743 int x, y;
3744 int box_line_hwidth = abs (s->face->box_line_width); 3744 int box_line_hwidth = eabs (s->face->box_line_width);
3745 int box_line_vwidth = max (s->face->box_line_width, 0); 3745 int box_line_vwidth = max (s->face->box_line_width, 0);
3746 int height; 3746 int height;
3747 3747
diff --git a/src/msdos.c b/src/msdos.c
index 02bd2748b8f..2e3ce3cf146 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -3393,13 +3393,7 @@ dos_rawgetc ()
3393 it is active. */ 3393 it is active. */
3394 if (WINDOWP (mouse_window) 3394 if (WINDOWP (mouse_window)
3395 && !EQ (mouse_window, last_mouse_window) 3395 && !EQ (mouse_window, last_mouse_window)
3396 && !EQ (window, selected_window) 3396 && !EQ (mouse_window, selected_window))
3397 /* For click-to-focus window managers
3398 create event iff we don't leave the
3399 selected frame. */
3400 && (focus_follows_mouse
3401 || (EQ (XWINDOW (window)->frame,
3402 XWINDOW (selected_window)->frame))))
3403 { 3397 {
3404 event.kind = SELECT_WINDOW_EVENT; 3398 event.kind = SELECT_WINDOW_EVENT;
3405 event.frame_or_window = mouse_window; 3399 event.frame_or_window = mouse_window;
diff --git a/src/w32fns.c b/src/w32fns.c
index 1fbde99f306..74b2a0ed655 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1940,15 +1940,7 @@ x_implicitly_set_name (f, arg, oldval)
1940} 1940}
1941 1941
1942/* Change the title of frame F to NAME. 1942/* Change the title of frame F to NAME.
1943 If NAME is nil, use the frame name as the title. 1943 If NAME is nil, use the frame name as the title. */
1944
1945 If EXPLICIT is non-zero, that indicates that lisp code is setting the
1946 name; if NAME is a string, set F's name to NAME and set
1947 F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
1948
1949 If EXPLICIT is zero, that indicates that Emacs redisplay code is
1950 suggesting a new name, which lisp code should override; if
1951 F->explicit_name is set, ignore the new name; otherwise, set it. */
1952 1944
1953void 1945void
1954x_set_title (f, name, old_name) 1946x_set_title (f, name, old_name)
@@ -5488,9 +5480,9 @@ w32_to_x_font (lplogfont, lpxstr, len, specific_charset)
5488 5480
5489 if (lplogfont->lfHeight) 5481 if (lplogfont->lfHeight)
5490 { 5482 {
5491 sprintf (height_pixels, "%u", abs (lplogfont->lfHeight)); 5483 sprintf (height_pixels, "%u", eabs (lplogfont->lfHeight));
5492 sprintf (height_dpi, "%u", 5484 sprintf (height_dpi, "%u",
5493 abs (lplogfont->lfHeight) * 720 / display_resy); 5485 eabs (lplogfont->lfHeight) * 720 / display_resy);
5494 } 5486 }
5495 else 5487 else
5496 { 5488 {
@@ -5713,7 +5705,7 @@ x_to_w32_font (lpxstr, lplogfont)
5713 } 5705 }
5714 5706
5715 /* This makes TrueType fonts work better. */ 5707 /* This makes TrueType fonts work better. */
5716 lplogfont->lfHeight = - abs (lplogfont->lfHeight); 5708 lplogfont->lfHeight = - eabs (lplogfont->lfHeight);
5717 5709
5718 return (TRUE); 5710 return (TRUE);
5719} 5711}
diff --git a/src/w32menu.c b/src/w32menu.c
index d4c92d4dcd5..986832b3e7c 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -319,14 +319,8 @@ discard_menu_items ()
319static void 319static void
320grow_menu_items () 320grow_menu_items ()
321{ 321{
322 Lisp_Object old;
323 int old_size = menu_items_allocated;
324 old = menu_items;
325
326 menu_items_allocated *= 2; 322 menu_items_allocated *= 2;
327 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil); 323 menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
328 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
329 old_size * sizeof (Lisp_Object));
330} 324}
331 325
332/* Begin a submenu. */ 326/* Begin a submenu. */
diff --git a/src/w32term.c b/src/w32term.c
index a7fca780d3c..f174d25720a 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1143,7 +1143,8 @@ w32_cache_char_metrics (font)
1143 1143
1144 1144
1145/* Determine if a font is double byte. */ 1145/* Determine if a font is double byte. */
1146int w32_font_is_double_byte (XFontStruct *font) 1146static int
1147w32_font_is_double_byte (XFontStruct *font)
1147{ 1148{
1148 return font->double_byte_p; 1149 return font->double_byte_p;
1149} 1150}
@@ -1869,7 +1870,7 @@ x_draw_glyph_string_foreground (s)
1869 of S to the right of that box line. */ 1870 of S to the right of that box line. */
1870 if (s->face->box != FACE_NO_BOX 1871 if (s->face->box != FACE_NO_BOX
1871 && s->first_glyph->left_box_line_p) 1872 && s->first_glyph->left_box_line_p)
1872 x = s->x + abs (s->face->box_line_width); 1873 x = s->x + eabs (s->face->box_line_width);
1873 else 1874 else
1874 x = s->x; 1875 x = s->x;
1875 1876
@@ -1961,7 +1962,7 @@ x_draw_composite_glyph_string_foreground (s)
1961 of S to the right of that box line. */ 1962 of S to the right of that box line. */
1962 if (s->face && s->face->box != FACE_NO_BOX 1963 if (s->face && s->face->box != FACE_NO_BOX
1963 && s->first_glyph->left_box_line_p) 1964 && s->first_glyph->left_box_line_p)
1964 x = s->x + abs (s->face->box_line_width); 1965 x = s->x + eabs (s->face->box_line_width);
1965 else 1966 else
1966 x = s->x; 1967 x = s->x;
1967 1968
@@ -2349,7 +2350,7 @@ x_draw_glyph_string_box (s)
2349 ? s->first_glyph 2350 ? s->first_glyph
2350 : s->first_glyph + s->nchars - 1); 2351 : s->first_glyph + s->nchars - 1);
2351 2352
2352 width = abs (s->face->box_line_width); 2353 width = eabs (s->face->box_line_width);
2353 raised_p = s->face->box == FACE_RAISED_BOX; 2354 raised_p = s->face->box == FACE_RAISED_BOX;
2354 left_x = s->x; 2355 left_x = s->x;
2355 right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p 2356 right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p
@@ -2395,7 +2396,7 @@ x_draw_image_foreground (s)
2395 if (s->face->box != FACE_NO_BOX 2396 if (s->face->box != FACE_NO_BOX
2396 && s->first_glyph->left_box_line_p 2397 && s->first_glyph->left_box_line_p
2397 && s->slice.x == 0) 2398 && s->slice.x == 0)
2398 x += abs (s->face->box_line_width); 2399 x += eabs (s->face->box_line_width);
2399 2400
2400 /* If there is a margin around the image, adjust x- and y-position 2401 /* If there is a margin around the image, adjust x- and y-position
2401 by that margin. */ 2402 by that margin. */
@@ -2488,7 +2489,7 @@ x_draw_image_relief (s)
2488 if (s->face->box != FACE_NO_BOX 2489 if (s->face->box != FACE_NO_BOX
2489 && s->first_glyph->left_box_line_p 2490 && s->first_glyph->left_box_line_p
2490 && s->slice.x == 0) 2491 && s->slice.x == 0)
2491 x += abs (s->face->box_line_width); 2492 x += eabs (s->face->box_line_width);
2492 2493
2493 /* If there is a margin around the image, adjust x- and y-position 2494 /* If there is a margin around the image, adjust x- and y-position
2494 by that margin. */ 2495 by that margin. */
@@ -2505,7 +2506,7 @@ x_draw_image_relief (s)
2505 } 2506 }
2506 else 2507 else
2507 { 2508 {
2508 thick = abs (s->img->relief); 2509 thick = eabs (s->img->relief);
2509 raised_p = s->img->relief > 0; 2510 raised_p = s->img->relief > 0;
2510 } 2511 }
2511 2512
@@ -2542,7 +2543,7 @@ w32_draw_image_foreground_1 (s, pixmap)
2542 if (s->face->box != FACE_NO_BOX 2543 if (s->face->box != FACE_NO_BOX
2543 && s->first_glyph->left_box_line_p 2544 && s->first_glyph->left_box_line_p
2544 && s->slice.x == 0) 2545 && s->slice.x == 0)
2545 x += abs (s->face->box_line_width); 2546 x += eabs (s->face->box_line_width);
2546 2547
2547 /* If there is a margin around the image, adjust x- and y-position 2548 /* If there is a margin around the image, adjust x- and y-position
2548 by that margin. */ 2549 by that margin. */
@@ -2654,7 +2655,7 @@ x_draw_image_glyph_string (s)
2654 struct glyph_string *s; 2655 struct glyph_string *s;
2655{ 2656{
2656 int x, y; 2657 int x, y;
2657 int box_line_hwidth = abs (s->face->box_line_width); 2658 int box_line_hwidth = eabs (s->face->box_line_width);
2658 int box_line_vwidth = max (s->face->box_line_width, 0); 2659 int box_line_vwidth = max (s->face->box_line_width, 0);
2659 int height; 2660 int height;
2660 HBITMAP pixmap = 0; 2661 HBITMAP pixmap = 0;
@@ -4023,7 +4024,7 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole)
4023 Scroll bars, general 4024 Scroll bars, general
4024 ************************************************************************/ 4025 ************************************************************************/
4025 4026
4026HWND 4027static HWND
4027my_create_scrollbar (f, bar) 4028my_create_scrollbar (f, bar)
4028 struct frame * f; 4029 struct frame * f;
4029 struct scroll_bar * bar; 4030 struct scroll_bar * bar;
@@ -4637,7 +4638,7 @@ static short temp_buffer[100];
4637 4638
4638 Some of these messages are reposted back to the message queue since the 4639 Some of these messages are reposted back to the message queue since the
4639 system calls the windows proc directly in a context where we cannot return 4640 system calls the windows proc directly in a context where we cannot return
4640 the data nor can we guarantee the state we are in. So if we dispatch them 4641 the data nor can we guarantee the state we are in. So if we dispatch them
4641 we will get into an infinite loop. To prevent this from ever happening we 4642 we will get into an infinite loop. To prevent this from ever happening we
4642 will set a variable to indicate we are in the read_socket call and indicate 4643 will set a variable to indicate we are in the read_socket call and indicate
4643 which message we are processing since the windows proc gets called 4644 which message we are processing since the windows proc gets called
@@ -6097,7 +6098,22 @@ x_set_window_size (f, change_gravity, cols, rows)
6097 SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); 6098 SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
6098 } 6099 }
6099 6100
6100 /* Now, strictly speaking, we can't be sure that this is accurate, 6101#if 0
6102 /* The following mirrors what is done in xterm.c. It appears to be
6103 for informing lisp of the new size immediately, while the actual
6104 resize will happen asynchronously. But on Windows, the menu bar
6105 automatically wraps when the frame is too narrow to contain it,
6106 and that causes any calculations made here to come out wrong. The
6107 end is some nasty buggy behaviour, including the potential loss
6108 of the minibuffer.
6109
6110 Disabling this code is either not sufficient to fix the problems
6111 completely, or it causes fresh problems, but at least it removes
6112 the most problematic symptom of the minibuffer becoming unusable.
6113
6114 -----------------------------------------------------------------
6115
6116 Now, strictly speaking, we can't be sure that this is accurate,
6101 but the window manager will get around to dealing with the size 6117 but the window manager will get around to dealing with the size
6102 change request eventually, and we'll hear how it went when the 6118 change request eventually, and we'll hear how it went when the
6103 ConfigureNotify event gets here. 6119 ConfigureNotify event gets here.
@@ -6128,6 +6144,7 @@ x_set_window_size (f, change_gravity, cols, rows)
6128 Actually checking whether it is outside is a pain in the neck, 6144 Actually checking whether it is outside is a pain in the neck,
6129 so don't try--just let the highlighting be done afresh with new size. */ 6145 so don't try--just let the highlighting be done afresh with new size. */
6130 cancel_mouse_face (f); 6146 cancel_mouse_face (f);
6147#endif
6131 6148
6132 UNBLOCK_INPUT; 6149 UNBLOCK_INPUT;
6133} 6150}
@@ -6714,7 +6731,7 @@ w32_initialize_display_info (display_name)
6714 6731
6715/* Create an xrdb-style database of resources to supercede registry settings. 6732/* Create an xrdb-style database of resources to supercede registry settings.
6716 The database is just a concatenation of C strings, finished by an additional 6733 The database is just a concatenation of C strings, finished by an additional
6717 \0. The string are submitted to some basic normalization, so 6734 \0. The strings are submitted to some basic normalization, so
6718 6735
6719 [ *]option[ *]:[ *]value... 6736 [ *]option[ *]:[ *]value...
6720 6737
@@ -7186,7 +7203,7 @@ interpreted normally. */);
7186Unicode output may prevent some third party applications for displaying 7203Unicode output may prevent some third party applications for displaying
7187Far-East Languages on Windows 95/98 from working properly. 7204Far-East Languages on Windows 95/98 from working properly.
7188NT uses Unicode internally anyway, so this flag will probably have no 7205NT uses Unicode internally anyway, so this flag will probably have no
7189affect on NT machines. */); 7206effect on NT machines. */);
7190 w32_enable_unicode_output = 1; 7207 w32_enable_unicode_output = 1;
7191 7208
7192 DEFVAR_BOOL ("w32-use-visible-system-caret", 7209 DEFVAR_BOOL ("w32-use-visible-system-caret",
diff --git a/src/window.c b/src/window.c
index c51649679da..2fd4d286eba 100644
--- a/src/window.c
+++ b/src/window.c
@@ -799,7 +799,7 @@ coordinates_in_window (w, x, y)
799 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) 799 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
800 || WINDOW_RIGHTMOST_P (w)) 800 || WINDOW_RIGHTMOST_P (w))
801 { 801 {
802 if (!WINDOW_LEFTMOST_P (w) && abs (*x - x0) < grabbable_width) 802 if (!WINDOW_LEFTMOST_P (w) && eabs (*x - x0) < grabbable_width)
803 { 803 {
804 /* Convert X and Y to window relative coordinates. 804 /* Convert X and Y to window relative coordinates.
805 Vertical border is at the left edge of window. */ 805 Vertical border is at the left edge of window. */
@@ -810,7 +810,7 @@ coordinates_in_window (w, x, y)
810 } 810 }
811 else 811 else
812 { 812 {
813 if (abs (*x - x1) < grabbable_width) 813 if (eabs (*x - x1) < grabbable_width)
814 { 814 {
815 /* Convert X and Y to window relative coordinates. 815 /* Convert X and Y to window relative coordinates.
816 Vertical border is at the right edge of window. */ 816 Vertical border is at the right edge of window. */
@@ -858,7 +858,7 @@ coordinates_in_window (w, x, y)
858 if (!w->pseudo_window_p 858 if (!w->pseudo_window_p
859 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) 859 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
860 && !WINDOW_RIGHTMOST_P (w) 860 && !WINDOW_RIGHTMOST_P (w)
861 && (abs (*x - right_x) < grabbable_width)) 861 && (eabs (*x - right_x) < grabbable_width))
862 { 862 {
863 /* Convert X and Y to window relative coordinates. 863 /* Convert X and Y to window relative coordinates.
864 Vertical border is at the right edge of window. */ 864 Vertical border is at the right edge of window. */
@@ -5497,7 +5497,7 @@ scroll_command (n, direction)
5497{ 5497{
5498 int count = SPECPDL_INDEX (); 5498 int count = SPECPDL_INDEX ();
5499 5499
5500 xassert (abs (direction) == 1); 5500 xassert (eabs (direction) == 1);
5501 5501
5502 /* If selected window's buffer isn't current, make it current for 5502 /* If selected window's buffer isn't current, make it current for
5503 the moment. But don't screw up if window_scroll gets an error. */ 5503 the moment. But don't screw up if window_scroll gets an error. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 746fa2540f9..fef50689ab5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3724,6 +3724,10 @@ handle_invisible_prop (it)
3724 it->position.bytepos = CHAR_TO_BYTE (it->position.charpos); 3724 it->position.bytepos = CHAR_TO_BYTE (it->position.charpos);
3725 } 3725 }
3726 setup_for_ellipsis (it, 0); 3726 setup_for_ellipsis (it, 0);
3727 /* Let the ellipsis display before
3728 considering any properties of the following char.
3729 Fixes jasonr@gnu.org 01 Oct 07 bug. */
3730 handled = HANDLED_RETURN;
3727 } 3731 }
3728 } 3732 }
3729 } 3733 }
@@ -12625,7 +12629,7 @@ compute_window_start_on_continuation_line (w)
12625 minimum distance from the old window start. */ 12629 minimum distance from the old window start. */
12626 pos = it.current.pos; 12630 pos = it.current.pos;
12627 min_distance = INFINITY; 12631 min_distance = INFINITY;
12628 while ((distance = abs (CHARPOS (start_pos) - IT_CHARPOS (it))), 12632 while ((distance = eabs (CHARPOS (start_pos) - IT_CHARPOS (it))),
12629 distance < min_distance) 12633 distance < min_distance)
12630 { 12634 {
12631 min_distance = distance; 12635 min_distance = distance;
@@ -20291,9 +20295,9 @@ produce_image_glyph (it)
20291 } 20295 }
20292 20296
20293 if (it->start_of_box_run_p && slice.x == 0) 20297 if (it->start_of_box_run_p && slice.x == 0)
20294 it->pixel_width += abs (face->box_line_width); 20298 it->pixel_width += eabs (face->box_line_width);
20295 if (it->end_of_box_run_p && slice.x + slice.width == img->width) 20299 if (it->end_of_box_run_p && slice.x + slice.width == img->width)
20296 it->pixel_width += abs (face->box_line_width); 20300 it->pixel_width += eabs (face->box_line_width);
20297 } 20301 }
20298 20302
20299 take_vertical_position_into_account (it); 20303 take_vertical_position_into_account (it);
@@ -22610,8 +22614,8 @@ fast_find_string_pos (w, pos, object, hpos, vpos, x, y, right_p)
22610 goto found; 22614 goto found;
22611 } 22615 }
22612 else if (best_glyph == NULL 22616 else if (best_glyph == NULL
22613 || ((abs (g->charpos - pos) 22617 || ((eabs (g->charpos - pos)
22614 < abs (best_glyph->charpos - pos)) 22618 < eabs (best_glyph->charpos - pos))
22615 && (right_p 22619 && (right_p
22616 ? g->charpos < pos 22620 ? g->charpos < pos
22617 : g->charpos > pos))) 22621 : g->charpos > pos)))
diff --git a/src/xfaces.c b/src/xfaces.c
index d3e7a105b60..50d733c7d0b 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1501,11 +1501,11 @@ face_color_gray_p (f, color_name)
1501 gray_p = (/* Any color sufficiently close to black counts as grey. */ 1501 gray_p = (/* Any color sufficiently close to black counts as grey. */
1502 (color.red < 5000 && color.green < 5000 && color.blue < 5000) 1502 (color.red < 5000 && color.green < 5000 && color.blue < 5000)
1503 || 1503 ||
1504 ((abs (color.red - color.green) 1504 ((eabs (color.red - color.green)
1505 < max (color.red, color.green) / 20) 1505 < max (color.red, color.green) / 20)
1506 && (abs (color.green - color.blue) 1506 && (eabs (color.green - color.blue)
1507 < max (color.green, color.blue) / 20) 1507 < max (color.green, color.blue) / 20)
1508 && (abs (color.blue - color.red) 1508 && (eabs (color.blue - color.red)
1509 < max (color.blue, color.red) / 20))); 1509 < max (color.blue, color.red) / 20)));
1510 else 1510 else
1511 gray_p = 0; 1511 gray_p = 0;
@@ -2838,7 +2838,7 @@ cmp_font_names (a, b)
2838 int resy = FRAME_X_DISPLAY_INFO (font_frame)->resy; 2838 int resy = FRAME_X_DISPLAY_INFO (font_frame)->resy;
2839 int x_resy = x->numeric[XLFD_RESY]; 2839 int x_resy = x->numeric[XLFD_RESY];
2840 int y_resy = y->numeric[XLFD_RESY]; 2840 int y_resy = y->numeric[XLFD_RESY];
2841 cmp = abs (resy - x_resy) - abs (resy - y_resy); 2841 cmp = eabs (resy - x_resy) - eabs (resy - y_resy);
2842 } 2842 }
2843 } 2843 }
2844 2844
@@ -6198,7 +6198,7 @@ smaller_face (f, face_id, steps)
6198 6198
6199 /* Try in increments of 1/2 pt. */ 6199 /* Try in increments of 1/2 pt. */
6200 delta = steps < 0 ? 5 : -5; 6200 delta = steps < 0 ? 5 : -5;
6201 steps = abs (steps); 6201 steps = eabs (steps);
6202 6202
6203 face = FACE_FROM_ID (f, face_id); 6203 face = FACE_FROM_ID (f, face_id);
6204 bcopy (face->lface, attrs, sizeof attrs); 6204 bcopy (face->lface, attrs, sizeof attrs);
@@ -6209,7 +6209,7 @@ smaller_face (f, face_id, steps)
6209 while (steps 6209 while (steps
6210 && pt + delta > 0 6210 && pt + delta > 0
6211 /* Give up if we cannot find a font within 10pt. */ 6211 /* Give up if we cannot find a font within 10pt. */
6212 && abs (last_pt - pt) < 100) 6212 && eabs (last_pt - pt) < 100)
6213 { 6213 {
6214 /* Look up a face for a slightly smaller/larger font. */ 6214 /* Look up a face for a slightly smaller/larger font. */
6215 pt += delta; 6215 pt += delta;
@@ -6822,17 +6822,17 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth)
6822 6822
6823 if (xlfd_idx == XLFD_POINT_SIZE) 6823 if (xlfd_idx == XLFD_POINT_SIZE)
6824 { 6824 {
6825 delta1 = abs (values[i] - (font1->numeric[xlfd_idx] 6825 delta1 = eabs (values[i] - (font1->numeric[xlfd_idx]
6826 / font1->rescale_ratio)); 6826 / font1->rescale_ratio));
6827 delta2 = abs (values[i] - (font2->numeric[xlfd_idx] 6827 delta2 = eabs (values[i] - (font2->numeric[xlfd_idx]
6828 / font2->rescale_ratio)); 6828 / font2->rescale_ratio));
6829 if (abs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM) 6829 if (eabs (delta1 - delta2) < FONT_POINT_SIZE_QUANTUM)
6830 continue; 6830 continue;
6831 } 6831 }
6832 else 6832 else
6833 { 6833 {
6834 delta1 = abs (values[i] - font1->numeric[xlfd_idx]); 6834 delta1 = eabs (values[i] - font1->numeric[xlfd_idx]);
6835 delta2 = abs (values[i] - font2->numeric[xlfd_idx]); 6835 delta2 = eabs (values[i] - font2->numeric[xlfd_idx]);
6836 } 6836 }
6837 6837
6838 if (delta1 > delta2) 6838 if (delta1 > delta2)
@@ -6854,8 +6854,8 @@ better_font_p (values, font1, font2, compare_pt_p, avgwidth)
6854 6854
6855 if (avgwidth) 6855 if (avgwidth)
6856 { 6856 {
6857 int delta1 = abs (avgwidth - font1->numeric[XLFD_AVGWIDTH]); 6857 int delta1 = eabs (avgwidth - font1->numeric[XLFD_AVGWIDTH]);
6858 int delta2 = abs (avgwidth - font2->numeric[XLFD_AVGWIDTH]); 6858 int delta2 = eabs (avgwidth - font2->numeric[XLFD_AVGWIDTH]);
6859 if (delta1 > delta2) 6859 if (delta1 > delta2)
6860 return 0; 6860 return 0;
6861 else if (delta1 < delta2) 6861 else if (delta1 < delta2)
diff --git a/src/xfns.c b/src/xfns.c
index 54d637d859b..8d21a69461a 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1760,15 +1760,7 @@ x_implicitly_set_name (f, arg, oldval)
1760} 1760}
1761 1761
1762/* Change the title of frame F to NAME. 1762/* Change the title of frame F to NAME.
1763 If NAME is nil, use the frame name as the title. 1763 If NAME is nil, use the frame name as the title. */
1764
1765 If EXPLICIT is non-zero, that indicates that lisp code is setting the
1766 name; if NAME is a string, set F's name to NAME and set
1767 F->explicit_name; if NAME is Qnil, then clear F->explicit_name.
1768
1769 If EXPLICIT is zero, that indicates that Emacs redisplay code is
1770 suggesting a new name, which lisp code should override; if
1771 F->explicit_name is set, ignore the new name; otherwise, set it. */
1772 1764
1773void 1765void
1774x_set_title (f, name, old_name) 1766x_set_title (f, name, old_name)
@@ -5180,6 +5172,26 @@ else
5180 Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt), 5172 Fmodify_frame_parameters (frame, Fcons (Fcons (intern ("tooltip"), Qt),
5181 Qnil)); 5173 Qnil));
5182 5174
5175 /* FIXME - can this be done in a similar way to normal frames?
5176 http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */
5177
5178 /* Set the `display-type' frame parameter before setting up faces. */
5179 {
5180 Lisp_Object disptype;
5181
5182 if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1)
5183 disptype = intern ("mono");
5184 else if (FRAME_X_DISPLAY_INFO (f)->visual->class == GrayScale
5185 || FRAME_X_DISPLAY_INFO (f)->visual->class == StaticGray)
5186 disptype = intern ("grayscale");
5187 else
5188 disptype = intern ("color");
5189
5190 if (NILP (Fframe_parameter (frame, Qdisplay_type)))
5191 Fmodify_frame_parameters (frame, Fcons (Fcons (Qdisplay_type, disptype),
5192 Qnil));
5193 }
5194
5183 /* Set up faces after all frame parameters are known. This call 5195 /* Set up faces after all frame parameters are known. This call
5184 also merges in face attributes specified for new frames. 5196 also merges in face attributes specified for new frames.
5185 5197
diff --git a/src/xmenu.c b/src/xmenu.c
index 4e7f07c375a..15aab98f9c5 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -354,15 +354,8 @@ save_menu_items ()
354static void 354static void
355grow_menu_items () 355grow_menu_items ()
356{ 356{
357 Lisp_Object old;
358 int old_size = menu_items_allocated;
359 old = menu_items;
360
361 menu_items_allocated *= 2; 357 menu_items_allocated *= 2;
362 358 menu_items = larger_vector (menu_items, menu_items_allocated, Qnil);
363 menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
364 bcopy (XVECTOR (old)->contents, XVECTOR (menu_items)->contents,
365 old_size * sizeof (Lisp_Object));
366} 359}
367 360
368/* Begin a submenu. */ 361/* Begin a submenu. */
diff --git a/src/xterm.c b/src/xterm.c
index a1beab492ee..68670795fa3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1401,7 +1401,7 @@ x_draw_glyph_string_foreground (s)
1401 of S to the right of that box line. */ 1401 of S to the right of that box line. */
1402 if (s->face->box != FACE_NO_BOX 1402 if (s->face->box != FACE_NO_BOX
1403 && s->first_glyph->left_box_line_p) 1403 && s->first_glyph->left_box_line_p)
1404 x = s->x + abs (s->face->box_line_width); 1404 x = s->x + eabs (s->face->box_line_width);
1405 else 1405 else
1406 x = s->x; 1406 x = s->x;
1407 1407
@@ -1503,7 +1503,7 @@ x_draw_composite_glyph_string_foreground (s)
1503 of S to the right of that box line. */ 1503 of S to the right of that box line. */
1504 if (s->face && s->face->box != FACE_NO_BOX 1504 if (s->face && s->face->box != FACE_NO_BOX
1505 && s->first_glyph->left_box_line_p) 1505 && s->first_glyph->left_box_line_p)
1506 x = s->x + abs (s->face->box_line_width); 1506 x = s->x + eabs (s->face->box_line_width);
1507 else 1507 else
1508 x = s->x; 1508 x = s->x;
1509 1509
@@ -2357,7 +2357,7 @@ x_draw_glyph_string_box (s)
2357 ? s->first_glyph 2357 ? s->first_glyph
2358 : s->first_glyph + s->nchars - 1); 2358 : s->first_glyph + s->nchars - 1);
2359 2359
2360 width = abs (s->face->box_line_width); 2360 width = eabs (s->face->box_line_width);
2361 raised_p = s->face->box == FACE_RAISED_BOX; 2361 raised_p = s->face->box == FACE_RAISED_BOX;
2362 left_x = s->x; 2362 left_x = s->x;
2363 right_x = (s->row->full_width_p && s->extends_to_end_of_line_p 2363 right_x = (s->row->full_width_p && s->extends_to_end_of_line_p
@@ -2403,7 +2403,7 @@ x_draw_image_foreground (s)
2403 if (s->face->box != FACE_NO_BOX 2403 if (s->face->box != FACE_NO_BOX
2404 && s->first_glyph->left_box_line_p 2404 && s->first_glyph->left_box_line_p
2405 && s->slice.x == 0) 2405 && s->slice.x == 0)
2406 x += abs (s->face->box_line_width); 2406 x += eabs (s->face->box_line_width);
2407 2407
2408 /* If there is a margin around the image, adjust x- and y-position 2408 /* If there is a margin around the image, adjust x- and y-position
2409 by that margin. */ 2409 by that margin. */
@@ -2496,7 +2496,7 @@ x_draw_image_relief (s)
2496 if (s->face->box != FACE_NO_BOX 2496 if (s->face->box != FACE_NO_BOX
2497 && s->first_glyph->left_box_line_p 2497 && s->first_glyph->left_box_line_p
2498 && s->slice.x == 0) 2498 && s->slice.x == 0)
2499 x += abs (s->face->box_line_width); 2499 x += eabs (s->face->box_line_width);
2500 2500
2501 /* If there is a margin around the image, adjust x- and y-position 2501 /* If there is a margin around the image, adjust x- and y-position
2502 by that margin. */ 2502 by that margin. */
@@ -2513,7 +2513,7 @@ x_draw_image_relief (s)
2513 } 2513 }
2514 else 2514 else
2515 { 2515 {
2516 thick = abs (s->img->relief); 2516 thick = eabs (s->img->relief);
2517 raised_p = s->img->relief > 0; 2517 raised_p = s->img->relief > 0;
2518 } 2518 }
2519 2519
@@ -2548,7 +2548,7 @@ x_draw_image_foreground_1 (s, pixmap)
2548 if (s->face->box != FACE_NO_BOX 2548 if (s->face->box != FACE_NO_BOX
2549 && s->first_glyph->left_box_line_p 2549 && s->first_glyph->left_box_line_p
2550 && s->slice.x == 0) 2550 && s->slice.x == 0)
2551 x += abs (s->face->box_line_width); 2551 x += eabs (s->face->box_line_width);
2552 2552
2553 /* If there is a margin around the image, adjust x- and y-position 2553 /* If there is a margin around the image, adjust x- and y-position
2554 by that margin. */ 2554 by that margin. */
@@ -2648,7 +2648,7 @@ static void
2648x_draw_image_glyph_string (s) 2648x_draw_image_glyph_string (s)
2649 struct glyph_string *s; 2649 struct glyph_string *s;
2650{ 2650{
2651 int box_line_hwidth = abs (s->face->box_line_width); 2651 int box_line_hwidth = eabs (s->face->box_line_width);
2652 int box_line_vwidth = max (s->face->box_line_width, 0); 2652 int box_line_vwidth = max (s->face->box_line_width, 0);
2653 int height; 2653 int height;
2654 Pixmap pixmap = None; 2654 Pixmap pixmap = None;
@@ -4630,7 +4630,7 @@ xaw_jump_callback (widget, client_data, call_data)
4630 whole = 10000000; 4630 whole = 10000000;
4631 portion = shown < 1 ? top * whole : 0; 4631 portion = shown < 1 ? top * whole : 0;
4632 4632
4633 if (shown < 1 && (abs (top + shown - 1) < 1.0/height)) 4633 if (shown < 1 && (eabs (top + shown - 1) < 1.0/height))
4634 /* Some derivatives of Xaw refuse to shrink the thumb when you reach 4634 /* Some derivatives of Xaw refuse to shrink the thumb when you reach
4635 the bottom, so we force the scrolling whenever we see that we're 4635 the bottom, so we force the scrolling whenever we see that we're
4636 too close to the bottom (in x_set_toolkit_scroll_bar_thumb 4636 too close to the bottom (in x_set_toolkit_scroll_bar_thumb
@@ -4671,12 +4671,12 @@ xaw_scroll_callback (widget, client_data, call_data)
4671 XtVaGetValues (widget, XtNheight, &height, NULL); 4671 XtVaGetValues (widget, XtNheight, &height, NULL);
4672 UNBLOCK_INPUT; 4672 UNBLOCK_INPUT;
4673 4673
4674 if (abs (position) >= height) 4674 if (eabs (position) >= height)
4675 part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle; 4675 part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle;
4676 4676
4677 /* If Xaw3d was compiled with ARROW_SCROLLBAR, 4677 /* If Xaw3d was compiled with ARROW_SCROLLBAR,
4678 it maps line-movement to call_data = max(5, height/20). */ 4678 it maps line-movement to call_data = max(5, height/20). */
4679 else if (xaw3d_arrow_scroll && abs (position) <= max (5, height / 20)) 4679 else if (xaw3d_arrow_scroll && eabs (position) <= max (5, height / 20))
4680 part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow; 4680 part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow;
4681 else 4681 else
4682 part = scroll_bar_move_ratio; 4682 part = scroll_bar_move_ratio;
@@ -9044,7 +9044,8 @@ x_sync_with_move (f, left, top, fuzzy)
9044 /* The left fuzz-factor is 10 pixels. The top fuzz-factor is 40 9044 /* The left fuzz-factor is 10 pixels. The top fuzz-factor is 40
9045 pixels. */ 9045 pixels. */
9046 9046
9047 if (abs (current_left - left) <= 10 && abs (current_top - top) <= 40) 9047 if (eabs (current_left - left) <= 10
9048 && eabs (current_top - top) <= 40)
9048 return; 9049 return;
9049 } 9050 }
9050 else if (current_left == left && current_top == top) 9051 else if (current_left == left && current_top == top)