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