aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-05-09 16:13:15 +0000
committerKaroly Lorentey2005-05-09 16:13:15 +0000
commit85dc59a9ff65aaf6b8e6a0c4452f74b7dade88fd (patch)
tree85aebc58216ed19de18354b3d9974942eea621d5
parentc25b55138a36cf5f334070baf79ce61c1e956eed (diff)
parentc7bda15b58de3efcf856786167f11f5b4175e30b (diff)
downloademacs-85dc59a9ff65aaf6b8e6a0c4452f74b7dade88fd.tar.gz
emacs-85dc59a9ff65aaf6b8e6a0c4452f74b7dade88fd.zip
Merged from miles@gnu.org--gnu-2005 (patch 292-295)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-292 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-293 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-294 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-295 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-342
-rw-r--r--ChangeLog6
-rw-r--r--admin/FOR-RELEASE6
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/NEWS811
-rw-r--r--lisp/ChangeLog209
-rw-r--r--lisp/calc/README38
-rw-r--r--lisp/calc/calc-alg.el2
-rw-r--r--lisp/calc/calc-arith.el2
-rw-r--r--lisp/calc/calc-comb.el2
-rw-r--r--lisp/calc/calc-embed.el9
-rw-r--r--lisp/calc/calc-ext.el4
-rw-r--r--lisp/calc/calc-lang.el2
-rw-r--r--lisp/calc/calc-math.el2
-rw-r--r--lisp/calc/calc-misc.el2
-rw-r--r--lisp/calc/calc-mode.el4
-rw-r--r--lisp/calc/calc-poly.el2
-rw-r--r--lisp/calc/calc-rewr.el2
-rw-r--r--lisp/calc/calc-store.el2
-rw-r--r--lisp/calc/calc-stuff.el2
-rw-r--r--lisp/calc/calc-vec.el2
-rw-r--r--lisp/calc/calcalg2.el2
-rw-r--r--lisp/calc/calcalg3.el2
-rw-r--r--lisp/calc/calccomp.el2
-rw-r--r--lisp/calc/calcsel2.el24
-rw-r--r--lisp/calendar/appt.el4
-rw-r--r--lisp/calendar/cal-bahai.el16
-rw-r--r--lisp/calendar/solar.el1
-rw-r--r--lisp/emacs-lisp/cl-macs.el3
-rw-r--r--lisp/emacs-lisp/easy-mmode.el21
-rw-r--r--lisp/emulation/cua-base.el24
-rw-r--r--lisp/files.el5
-rw-r--r--lisp/international/mule.el4
-rw-r--r--lisp/jka-cmpr-hook.el (renamed from lisp/jka-comp-hook.el)6
-rw-r--r--lisp/jka-compr.el2
-rw-r--r--lisp/loadup.el2
-rw-r--r--lisp/net/goto-addr.el29
-rw-r--r--lisp/net/webjump.el4
-rw-r--r--lisp/obsolete/uncompress.el8
-rw-r--r--lisp/pcvs.el4
-rw-r--r--lisp/progmodes/cmacexp.el21
-rw-r--r--lisp/progmodes/compile.el3
-rw-r--r--lisp/progmodes/gdb-ui.el28
-rw-r--r--lisp/progmodes/grep.el2
-rw-r--r--lisp/progmodes/gud.el207
-rw-r--r--lisp/progmodes/idlw-help.el153
-rw-r--r--lisp/replace.el52
-rw-r--r--lisp/simple.el4
-rw-r--r--lisp/term/mac-win.el56
-rw-r--r--lisp/textmodes/ispell.el4
-rw-r--r--lisp/textmodes/po.el21
-rw-r--r--lisp/tooltip.el211
-rw-r--r--lispref/ChangeLog11
-rw-r--r--lispref/display.texi2
-rw-r--r--lispref/variables.texi7
-rw-r--r--mac/ChangeLog4
-rw-r--r--mac/inc/config.h4
-rwxr-xr-xmake-dist25
-rw-r--r--man/ChangeLog22
-rw-r--r--man/basic.texi12
-rw-r--r--man/building.texi19
-rw-r--r--man/calc.texi11
-rw-r--r--man/frames.texi42
-rw-r--r--src/ChangeLog147
-rw-r--r--src/Makefile.in2
-rw-r--r--src/dired.c2
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c12
-rw-r--r--src/fns.c10
-rw-r--r--src/lread.c1
-rw-r--r--src/macselect.c16
-rw-r--r--src/macterm.c502
-rw-r--r--src/macterm.h6
-rw-r--r--src/sysselect.h6
-rw-r--r--src/xfns.c4
74 files changed, 1863 insertions, 1045 deletions
diff --git a/ChangeLog b/ChangeLog
index 707b8a718d3..7468324b229 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12005-05-07 J,Ai(Br,At(Bme Marant <jerome@marant.org>
2
3 * make-dist: Remove references to makefile.nt and makefile.def.
4 Include widgets and images subdirectories of etc. Do not exclude
5 ldefs-boot.el.
6
12005-04-23 Andreas Schwab <schwab@suse.de> 72005-04-23 Andreas Schwab <schwab@suse.de>
2 8
3 * configure.in: Remove duplicate match for powerpc configuration. 9 * configure.in: Remove duplicate match for powerpc configuration.
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 08f9c839474..8af79e4df8b 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -91,6 +91,12 @@ is encountered.
91Please record your name here and say which part of the distribution 91Please record your name here and say which part of the distribution
92you're going to handle. 92you're going to handle.
93 93
94DIRECTORY STATUS IN CHARGE
95--------- ------ ---------
96lisp/international working Kenichi Handa
97lisp/languages working Kenichi Handa
98
99
94** Update AUTHORS. 100** Update AUTHORS.
95 101
96** Reorder NEWS entries. 102** Reorder NEWS entries.
diff --git a/etc/ChangeLog b/etc/ChangeLog
index b8d5c87dfd8..e81c661290f 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,7 +1,6 @@
12005-05-05 Marcelo Toledo <marcelo@marcelotoledo.org> (tiny change) 12005-05-05 Slawomir Nowaczyk <slawek@cs.lth.se> (tiny change)
2 2
3 * TUTORIAL.pl: Updated header. Patch by Slawomir Nowaczyk 3 * TUTORIAL.pl: Updated header.
4 <slawek@cs.lth.se>.
5 4
62005-05-02 Richard M. Stallman <rms@gnu.org> 52005-05-02 Richard M. Stallman <rms@gnu.org>
7 6
diff --git a/etc/NEWS b/etc/NEWS
index fa99b3f8f18..e58347524d5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -36,7 +36,7 @@ provides a way to display multilingual text in menus (with some caveats).
36--- 36---
37** By default, Emacs now uses a setgid helper program to update game 37** By default, Emacs now uses a setgid helper program to update game
38scores. The directory ${localstatedir}/games/emacs is the normal 38scores. The directory ${localstatedir}/games/emacs is the normal
39place for game scores to be stored. This may be controlled by the 39place for game scores to be stored. You can control this with the
40configure option `--with-game-dir'. The specific user that Emacs uses 40configure option `--with-game-dir'. The specific user that Emacs uses
41to own the game scores is controlled by `--with-game-user'. If access 41to own the game scores is controlled by `--with-game-user'. If access
42to a game user is not available, then scores will be stored separately 42to a game user is not available, then scores will be stored separately
@@ -121,6 +121,23 @@ the blinking cursor.
121the blinking cursor on graphical terminals. 121the blinking cursor on graphical terminals.
122 122
123+++ 123+++
124** The option --script FILE runs Emacs in batch mode and loads FILE.
125It is useful for writing Emacs Lisp shell script files, because they
126can start with this line:
127
128 #!/usr/bin/emacs --script
129
130+++
131** The option --directory DIR now modifies `load-path' immediately.
132Directories are added to the front of `load-path' in the order they
133appear on the command line. For example, with this command line:
134
135 emacs -batch -L .. -L /tmp --eval "(require 'foo)"
136
137Emacs looks for library `foo' in the parent directory, then in /tmp, then
138in the other directories in `load-path'. (-L is short for --directory.)
139
140+++
124** The command line option --no-windows has been changed to 141** The command line option --no-windows has been changed to
125--no-window-system. The old one still works, but is deprecated. 142--no-window-system. The old one still works, but is deprecated.
126 143
@@ -130,6 +147,11 @@ now reads arguments for the function interactively if it is
130an interactively callable function. 147an interactively callable function.
131 148
132+++ 149+++
150** When you specify a frame size with --geometry, the size applies to
151all frames you create. A position specified with --geometry only
152affects the initial frame.
153
154+++
133** Emacs can now be invoked in full-screen mode on a windowed display. 155** Emacs can now be invoked in full-screen mode on a windowed display.
134When Emacs is invoked on a window system, the new command-line options 156When Emacs is invoked on a window system, the new command-line options
135`--fullwidth', `--fullheight', and `--fullscreen' produce a frame 157`--fullwidth', `--fullheight', and `--fullscreen' produce a frame
@@ -164,6 +186,10 @@ according to the value of `save-abbrevs'.
164* Editing Changes in Emacs 22.1 186* Editing Changes in Emacs 22.1
165 187
166+++ 188+++
189** The max size of buffers and integers has been doubled.
190On 32bit machines, it is now 256M (i.e. 268435455).
191
192+++
167** The mode line position information now comes before the major mode. 193** The mode line position information now comes before the major mode.
168When the file is maintained under version control, that information 194When the file is maintained under version control, that information
169appears between the position information and the major mode. 195appears between the position information and the major mode.
@@ -234,7 +260,26 @@ in Indented-Text mode.
234`beginning-of-defun', `end-of-defun' do not set the mark if the mark 260`beginning-of-defun', `end-of-defun' do not set the mark if the mark
235is already active in Transient Mark mode. 261is already active in Transient Mark mode.
236 262
237** Mark Changes: 263+++
264** `apply-macro-to-region-lines' now operates on all lines that begin
265in the region, rather than on all complete lines in the region.
266
267+++
268** M-x setenv now expands environment variables of the form `$foo' and
269`${foo}' in the specified new value of the environment variable. To
270include a `$' in the value, use `$$'.
271
272+++
273** Unquoted `$' in file names do not signal an error any more when
274the corresponding environment variable does not exist.
275Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
276is only rarely needed.
277
278+++
279** The default for the paper size (variable ps-paper-type) is taken
280from the locale.
281
282** Mark command changes:
238 283
239+++ 284+++
240*** A prefix argument is no longer required to repeat a jump to a 285*** A prefix argument is no longer required to repeat a jump to a
@@ -340,6 +385,10 @@ widgets at point. You can get more information about some of them, by
340clicking on mouse-sensitive areas or moving there and pressing RET. 385clicking on mouse-sensitive areas or moving there and pressing RET.
341 386
342+++ 387+++
388*** The command `list-text-properties-at' has been deleted because
389C-u C-x = gives the same information and more.
390
391+++
343*** New command `display-local-help' displays any local help at point 392*** New command `display-local-help' displays any local help at point
344in the echo area. It is bound to `C-h .'. It normally displays the 393in the echo area. It is bound to `C-h .'. It normally displays the
345same string that would be displayed on mouse-over using the 394same string that would be displayed on mouse-over using the
@@ -353,37 +402,92 @@ point-over, after suitable idle time. The amount of idle time is
353determined by the user option `help-at-pt-timer-delay' and defaults 402determined by the user option `help-at-pt-timer-delay' and defaults
354to one second. This feature is turned off by default. 403to one second. This feature is turned off by default.
355 404
356** Buffer Menu changes 405+++
406*** The apropos commands now accept a list of words to match.
407When more than one word is specified, at least two of those words must
408be present for an item to match. Regular expression matching is still
409available.
357 410
358+++ 411+++
359*** New command `Buffer-menu-toggle-files-only' toggles display of file 412*** The new option `apropos-sort-by-scores' causes the matching items
360buffers only in the Buffer Menu. It is bound to `T' in Buffer Menu 413to be sorted according to their score. The score for an item is a
361mode. 414number calculated to indicate how well the item matches the words or
415regular expression that you entered to the apropos command. The best
416match is listed first, and the calculated score is shown for each
417matching item.
418
419** Window selection changes:
362 420
363+++ 421+++
364*** `buffer-menu' and `list-buffers' now list buffers whose names begin 422*** `special-display-buffer-names' and `special-display-regexps' now
365with a space, when those buffers are visiting files. Normally buffers 423understand two new boolean pseudo-frame-parameters `same-frame' and
366whose names begin with space are omitted. 424`same-window'.
425
426** Incremental Search changes:
427
428+++
429*** Vertical scrolling is now possible within incremental search.
430To enable this feature, customize the new user option
431`isearch-allow-scroll'. User written commands which satisfy stringent
432constraints can be marked as "scrolling commands". See the Emacs manual
433for details.
434
435+++
436*** C-w in incremental search now grabs either a character or a word,
437making the decision in a heuristic way. This new job is done by the
438command `isearch-yank-word-or-char'. To restore the old behavior,
439bind C-w to `isearch-yank-word' in `isearch-mode-map'.
440
441+++
442*** C-y in incremental search now grabs the next line if point is already
443at the end of a line.
444
445+++
446*** C-M-w deletes and C-M-y grabs a character in isearch mode.
447Another method to grab a character is to enter the minibuffer by `M-e'
448and to type `C-f' at the end of the search string in the minibuffer.
449
450+++
451*** M-% typed in isearch mode invokes `query-replace' or
452`query-replace-regexp' (depending on search mode) with the current
453search string used as the string to replace.
454
455+++
456*** Isearch no longer adds `isearch-resume' commands to the command
457history by default. To enable this feature, customize the new
458user option `isearch-resume-in-command-history'.
459
460** Replace command changes:
367 461
368--- 462---
369*** The new options `buffers-menu-show-directories' and 463*** New user option `query-replace-skip-read-only': when non-nil,
370`buffers-menu-show-status' let you control how buffers are displayed 464`query-replace' and related functions simply ignore
371in the menu dropped down when you click "Buffers" from the menu bar. 465a match if part of it has a read-only property.
372 466
373`buffers-menu-show-directories' controls whether the menu displays 467+++
374leading directories as part of the file name visited by the buffer. 468*** When used interactively, the commands `query-replace-regexp' and
375If its value is `unless-uniquify', the default, directories are 469`replace-regexp' allow \,expr to be used in a replacement string,
376shown unless uniquify-buffer-name-style' is non-nil. The value of nil 470where expr is an arbitrary Lisp expression evaluated at replacement
377and t turn the display of directories off and on, respectively. 471time. In many cases, this will be more convenient than using
472`query-replace-regexp-eval'. `\#' in a replacement string now refers
473to the count of replacements already made by the replacement command.
474All regular expression replacement commands now allow `\?' in the
475replacement string to specify a position where the replacement string
476can be edited for each replacement.
378 477
379`buffers-menu-show-status' controls whether the Buffers menu includes 478+++
380the modified and read-only status of the buffers. By default it is 479*** query-replace uses isearch lazy highlighting when the new user option
381t, and the status is shown. 480`query-replace-lazy-highlight' is non-nil.
382 481
383Setting these variables directly does not take effect until next time 482---
384the Buffers menu is regenerated. 483*** The current match in query-replace is highlighted in new face
484`query-replace' which by default inherits from isearch face.
485
486** File operation changes:
385 487
386** File Operation Changes: 488+++
489*** In processing a local variables list, Emacs strips the prefix and
490suffix are from every line before processing all the lines.
387 491
388+++ 492+++
389*** find-file-read-only visits multiple files in read-only mode, 493*** find-file-read-only visits multiple files in read-only mode,
@@ -433,7 +537,7 @@ attempt to construct a unique auto-save name (e.g. for remote files).
433 537
434+++ 538+++
435*** If the user visits a file larger than `large-file-warning-threshold', 539*** If the user visits a file larger than `large-file-warning-threshold',
436Emacs prompts her for confirmation. 540Emacs asks for confirmation.
437 541
438+++ 542+++
439*** require-final-newline now has two new possible values: 543*** require-final-newline now has two new possible values:
@@ -453,10 +557,6 @@ sets require-final-newline based on mode-require-final-newline.
453So you can customize mode-require-final-newline to control what these 557So you can customize mode-require-final-newline to control what these
454modes do. 558modes do.
455 559
456+++
457** The max size of buffers and integers has been doubled.
458On 32bit machines, it is now 256M (i.e. 268435455).
459
460** Minibuffer changes: 560** Minibuffer changes:
461 561
462+++ 562+++
@@ -481,7 +581,7 @@ parts less visible than normal, so that the rest of the differing
481parts is, by contrast, slightly highlighted. 581parts is, by contrast, slightly highlighted.
482 582
483+++ 583+++
484*** File-name completion can now ignore directories. 584*** File-name completion can now ignore specified directories.
485If an element of the list in `completion-ignored-extensions' ends in a 585If an element of the list in `completion-ignored-extensions' ends in a
486slash `/', it indicates a subdirectory that should be ignored when 586slash `/', it indicates a subdirectory that should be ignored when
487completing file names. Elements of `completion-ignored-extensions' 587completing file names. Elements of `completion-ignored-extensions'
@@ -498,7 +598,7 @@ it remains unchanged.
498If set to t when adding a new history element, all previous identical 598If set to t when adding a new history element, all previous identical
499elements are deleted. 599elements are deleted.
500 600
501** Redisplay Changes 601** Redisplay changes:
502 602
503*** Easy to overlook single character negation is now font-locked. 603*** Easy to overlook single character negation is now font-locked.
504You can use the new variable `font-lock-negation-char-face' and the face of 604You can use the new variable `font-lock-negation-char-face' and the face of
@@ -535,11 +635,6 @@ the window now works sensible, by automatically adjusting the window's
535vscroll property. 635vscroll property.
536 636
537+++ 637+++
538*** In graphical mode, with a C program, GUD Tooltips have been extended to
539display the #define directive associated with an identifier when program is
540not executing.
541
542+++
543*** The new face `mode-line-inactive' is used to display the mode line 638*** The new face `mode-line-inactive' is used to display the mode line
544of non-selected windows. The `mode-line' face is now used to display 639of non-selected windows. The `mode-line' face is now used to display
545the mode line of the currently selected window. 640the mode line of the currently selected window.
@@ -555,10 +650,9 @@ control this for a specific frame, use the command M-x
555set-fringe-style. 650set-fringe-style.
556 651
557+++ 652+++
558*** The buffer boundaries (i.e. first and last line in the buffer) may 653*** Angle icons in the fringes can indicate the buffer boundaries. In
559now be marked with angle bitmaps in the fringes. In addition, up and 654addition, up and down arrow bitmaps in the fringe indicate which ways
560down arrow bitmaps may be shown at the top and bottom of the left or 655the window can be scrolled.
561right fringe if the window can be scrolled in either direction.
562 656
563This behavior is activated by setting the buffer-local variable 657This behavior is activated by setting the buffer-local variable
564`indicate-buffer-boundaries' to a non-nil value. The default value of 658`indicate-buffer-boundaries' to a non-nil value. The default value of
@@ -567,8 +661,8 @@ this variable is found in `default-indicate-buffer-boundaries'.
567If value is `left' or `right', both angle and arrow bitmaps are 661If value is `left' or `right', both angle and arrow bitmaps are
568displayed in the left or right fringe, resp. 662displayed in the left or right fringe, resp.
569 663
570Value may also be an alist which specifies the presense and position 664The value can also be an alist which specifies the presense and
571of each bitmap individually. 665position of each bitmap individually.
572 666
573For example, ((top . left) (t . right)) places the top angle bitmap 667For example, ((top . left) (t . right)) places the top angle bitmap
574in left fringe, the bottom angle bitmap in right fringe, and both 668in left fringe, the bottom angle bitmap in right fringe, and both
@@ -582,23 +676,23 @@ two lines on the display (with just the newline on the second line).
582Instead, the newline now "overflows" into the right fringe, and the 676Instead, the newline now "overflows" into the right fringe, and the
583cursor will be displayed in the fringe when positioned on that newline. 677cursor will be displayed in the fringe when positioned on that newline.
584 678
585The new user option 'overflow-newline-into-fringe' may be set to nil to 679The new user option 'overflow-newline-into-fringe' can be set to nil to
586revert to the old behavior of continuing such lines. 680revert to the old behavior of continuing such lines.
587 681
588+++ 682+++
589*** When display margins are present in a window, the fringes are now 683*** When a window has display margin areas, the fringes are now
590displayed between the margins and the buffer's text area, rather than 684displayed between the margins and the buffer's text area, rather than
591at the edges of the window. 685outside those margins.
592 686
593+++ 687+++
594*** A window may now have individual fringe and scroll-bar settings, 688*** A window can now have individual fringe and scroll-bar settings,
595in addition to the individual display margin settings. 689in addition to the individual display margin settings.
596 690
597Such individual settings are now preserved when windows are split 691Such individual settings are now preserved when windows are split
598horizontally or vertically, a saved window configuration is restored, 692horizontally or vertically, a saved window configuration is restored,
599or when the frame is resized. 693or when the frame is resized.
600 694
601** Cursor Display Changes 695** Cursor display changes:
602 696
603+++ 697+++
604*** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is 698*** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is
@@ -622,21 +716,37 @@ appears in.
622*** The variable `cursor-in-non-selected-windows' can now be set to any 716*** The variable `cursor-in-non-selected-windows' can now be set to any
623of the recognized cursor types. 717of the recognized cursor types.
624 718
719** Font-Lock changes:
720
721+++
722*** All modes now support using M-x font-lock-mode to toggle
723fontification, even those such as Occur, Info, and comint-derived
724modes that do their own fontification in a special way.
725
726The variable `Info-fontify' is no longer applicable; to disable
727fontification in Info, remove `turn-on-font-lock' from
728`Info-mode-hook'.
729
625+++ 730+++
626** font-lock-lines-before specifies a number of lines before the 731*** font-lock-lines-before specifies a number of lines before the
627current line that should be refontified when you change the buffer. 732current line that should be refontified when you change the buffer.
628The default value is 1. 733The default value is 1.
629 734
630--- 735+++
631** JIT-lock changes 736*** font-lock: in modes like C and Lisp where the fontification assumes that
737an open-paren in column 0 is always outside of any string or comment,
738font-lock now highlights any such open-paren-in-column-zero in bold-red
739if it is inside a string or a comment, to indicate that it can cause
740trouble with fontification and/or indentation.
632 741
742---
633*** The default settings for JIT stealth lock parameters are changed. 743*** The default settings for JIT stealth lock parameters are changed.
634The default value for the user option jit-lock-stealth-time is now 16 744The default value for the user option jit-lock-stealth-time is now 16
635instead of 3, and the default value of jit-lock-stealth-nice is now 745instead of 3, and the default value of jit-lock-stealth-nice is now
6360.5 instead of 0.125. The new defaults should lower the CPU usage 7460.5 instead of 0.125. The new defaults should lower the CPU usage
637when Emacs is fontifying in the background. 747when Emacs is fontifying in the background.
638 748
639 749---
640*** jit-lock can now be delayed with `jit-lock-defer-time'. 750*** jit-lock can now be delayed with `jit-lock-defer-time'.
641 751
642If this variable is non-nil, its value should be the amount of Emacs 752If this variable is non-nil, its value should be the amount of Emacs
@@ -644,13 +754,14 @@ idle time in seconds to wait before starting fontification. For
644example, if you set `jit-lock-defer-time' to 0.25, fontification will 754example, if you set `jit-lock-defer-time' to 0.25, fontification will
645only happen after 0.25s of idle time. 755only happen after 0.25s of idle time.
646 756
757---
647*** contextual refontification is now separate from stealth fontification. 758*** contextual refontification is now separate from stealth fontification.
648 759
649jit-lock-defer-contextually is renamed jit-lock-contextually and 760jit-lock-defer-contextually is renamed jit-lock-contextually and
650jit-lock-context-time determines the delay after which contextual 761jit-lock-context-time determines the delay after which contextual
651refontification takes place. 762refontification takes place.
652 763
653** Menu Bar changes 764** Menu Bar changes:
654 765
655--- 766---
656*** A menu item "Show/Hide" was added to the top-level menu "Options". 767*** A menu item "Show/Hide" was added to the top-level menu "Options".
@@ -664,16 +775,10 @@ mode-line.
664--- 775---
665*** Speedbar has moved from the "Tools" top level menu to "Show/Hide". 776*** Speedbar has moved from the "Tools" top level menu to "Show/Hide".
666 777
667+++ 778** Mouse changes:
668** You can now customize fill-nobreak-predicate to control where
669filling can break lines. The value is now normally a list of
670functions, but it can also be a single function, for compatibility.
671
672We provide two sample predicates, fill-single-word-nobreak-p and
673fill-french-nobreak-p, for use in the value of fill-nobreak-predicate.
674 779
675+++ 780+++
676** New display feature: focus follows the mouse from one Emacs window 781*** New display feature: focus follows the mouse from one Emacs window
677to another, even within a frame. If you set the variable 782to another, even within a frame. If you set the variable
678mouse-autoselect-window to non-nil value, moving the mouse to a 783mouse-autoselect-window to non-nil value, moving the mouse to a
679different Emacs window will select that window (minibuffer window can 784different Emacs window will select that window (minibuffer window can
@@ -681,7 +786,7 @@ be selected only when it is active). The default is nil, so that this
681feature is not enabled. 786feature is not enabled.
682 787
683+++ 788+++
684** On X, when the window manager requires that you click on a frame to 789*** On X, when the window manager requires that you click on a frame to
685select it (give it focus), the selected window and cursor position 790select it (give it focus), the selected window and cursor position
686normally changes according to the mouse click position. If you set 791normally changes according to the mouse click position. If you set
687the variable x-mouse-click-focus-ignore-position to t, the selected 792the variable x-mouse-click-focus-ignore-position to t, the selected
@@ -689,39 +794,16 @@ window and cursor position do not change when you click on a frame
689to give it focus. 794to give it focus.
690 795
691+++ 796+++
692** When you specify a frame size with --geometry, the size applies to 797*** You can now follow links by clicking Mouse-1 on the link.
693all frames you create. A position specified with --geometry only
694affects the initial frame.
695
696+++
697** `special-display-buffer-names' and `special-display-regexps' now
698understand two new boolean pseudo-frame-parameters `same-frame' and
699`same-window'.
700
701---
702** New commands `scan-buf-next-region' and `scan-buf-previous-region'
703move to the start of the next (previous, respectively) region with
704non-nil help-echo property and display any help found there in the
705echo area, using `display-local-help'.
706
707+++
708** In processing a local variables list, Emacs strips the prefix and
709suffix are from every line before processing all the lines.
710
711+++
712** `apply-macro-to-region-lines' now operates on all lines that begin
713in the region, rather than on all complete lines in the region.
714
715+++
716** You can now follow links by clicking Mouse-1 on the link.
717 798
718Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2 799Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2
719click to follow a link, whereas most other applications use a Mouse-1 800click to follow a link, whereas most other applications use a Mouse-1
720click for both purposes, depending on whether you click outside or 801click for both purposes, depending on whether you click outside or
721inside a link. Now the behavior of a Mouse-1 click has been changed 802inside a link. Now the behavior of a Mouse-1 click has been changed
722to match this context-sentitive dual behavior. 803to match this context-sentitive dual behavior. (If you prefer the old
804behavior, set the user option `mouse-1-click-follows-link' to nil.)
723 805
724Depending on the current mode, a Mouse-2 click in Emacs may do much 806Depending on the current mode, a Mouse-2 click in Emacs can do much
725more than just follow a link, so the new Mouse-1 behavior is only 807more than just follow a link, so the new Mouse-1 behavior is only
726activated for modes which explicitly mark a clickable text as a "link" 808activated for modes which explicitly mark a clickable text as a "link"
727(see the new function `mouse-on-link-p' for details). The Lisp 809(see the new function `mouse-on-link-p' for details). The Lisp
@@ -743,56 +825,43 @@ You can customize the new Mouse-1 behavior via the new user options
743`mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'. 825`mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'.
744 826
745+++ 827+++
746** Emacs normally highlights mouse sensitive text whenever the mouse 828*** Emacs normally highlights mouse sensitive text whenever the mouse
747is over the text. By setting the new variable `mouse-highlight', you 829is over the text. By setting the new variable `mouse-highlight', you
748can optionally enable mouse highlighting only after you move the 830can optionally enable mouse highlighting only after you move the
749mouse, so that highlighting disappears when you press a key. You can 831mouse, so that highlighting disappears when you press a key. You can
750also disable mouse highlighting. 832also disable mouse highlighting.
751 833
752+++ 834+++
753** You can now customize if selecting a region by dragging the mouse 835*** You can now customize if selecting a region by dragging the mouse
754shall not copy the selected text to the kill-ring by setting the new 836shall not copy the selected text to the kill-ring by setting the new
755variable mouse-drag-copy-region to nil. 837variable mouse-drag-copy-region to nil.
756 838
757--- 839---
758** mouse-wheels can now scroll a specific fraction of the window 840*** mouse-wheels can now scroll a specific fraction of the window
759(rather than a fixed number of lines) and the scrolling is `progressive'. 841(rather than a fixed number of lines) and the scrolling is `progressive'.
760 842
761--- 843---
762** Unexpected yanking of text due to accidental clicking on the mouse 844*** Unexpected yanking of text due to accidental clicking on the mouse
763wheel button (typically mouse-2) during wheel scrolling is now avoided. 845wheel button (typically mouse-2) during wheel scrolling is now avoided.
764This behavior can be customized via the mouse-wheel-click-event and 846This behavior can be customized via the mouse-wheel-click-event and
765mouse-wheel-inhibit-click-time variables. 847mouse-wheel-inhibit-click-time variables.
766 848
767+++ 849+++
768** Under X, mouse-wheel-mode is turned on by default. 850*** Under X, mouse-wheel-mode is turned on by default.
769 851
770+++ 852** Mule changes:
771** M-x setenv now expands environment variables of the form `$foo' and
772`${foo}' in the specified new value of the environment variable. To
773include a `$' in the value, use `$$'.
774
775+++
776** Unquoted `$' in file names do not signal an error any more when
777the corresponding environment variable does not exist.
778Instead, the `$ENVVAR' text is left as is, so that `$$' quoting
779is only rarely needed.
780 853
781--- 854---
782** Language environment and various default coding systems are setup 855*** Language environment and various default coding systems are setup
783more correctly according to the current locale name. If the locale 856more correctly according to the current locale name. If the locale
784name doesn't specify a charset, the default is what glibc defines. 857name doesn't specify a charset, the default is what glibc defines.
785This change may result in using the different coding systems as 858This change can result in using the different coding systems as
786default in some locale (e.g. vi_VN). 859default in some locale (e.g. vi_VN).
787 860
788+++ 861+++
789** The default for the paper size (variable ps-paper-type) is taken 862*** The keyboard-coding-system is now automatically set based on your
790from the locale.
791
792+++
793** The keyboard-coding-system is now automatically set based on your
794current locale settings if you are not using a window system. This 863current locale settings if you are not using a window system. This
795may mean that the META key doesn't work but generates non-ASCII 864can mean that the META key doesn't work but generates non-ASCII
796characters instead, depending on how the terminal (or terminal 865characters instead, depending on how the terminal (or terminal
797emulator) works. Use `set-keyboard-coding-system' (or customize 866emulator) works. Use `set-keyboard-coding-system' (or customize
798keyboard-coding-system) if you prefer META to work (the old default) 867keyboard-coding-system) if you prefer META to work (the old default)
@@ -800,33 +869,33 @@ or if the locale doesn't describe the character set actually generated
800by the keyboard. See Info node `Single-Byte Character Support'. 869by the keyboard. See Info node `Single-Byte Character Support'.
801 870
802+++ 871+++
803** The new command `revert-buffer-with-coding-system' (C-x RET r) 872*** The new command `revert-buffer-with-coding-system' (C-x RET r)
804revisits the current file using a coding system that you specify. 873revisits the current file using a coding system that you specify.
805 874
806+++ 875+++
807** New command `recode-region' decodes the region again by a specified 876*** New command `recode-region' decodes the region again by a specified
808coding system. 877coding system.
809 878
810+++ 879+++
811** The new command `recode-file-name' changes the encoding of the name 880*** The new command `recode-file-name' changes the encoding of the name
812of a file. 881of a file.
813 882
814--- 883---
815** New command `ucs-insert' inserts a character specified by its 884*** New command `ucs-insert' inserts a character specified by its
816unicode. 885unicode.
817 886
818+++ 887+++
819** The new command `set-file-name-coding-system' (C-x RET F) sets 888*** The new command `set-file-name-coding-system' (C-x RET F) sets
820coding system for encoding and decoding file names. A new menu item 889coding system for encoding and decoding file names. A new menu item
821(Options->Mule->Set Coding Systems->For File Name) invokes this 890(Options->Mule->Set Coding Systems->For File Name) invokes this
822command. 891command.
823 892
824+++ 893+++
825** New command quail-show-key shows what key (or key sequence) to type 894*** New command quail-show-key shows what key (or key sequence) to type
826in the current input method to input a character at point. 895in the current input method to input a character at point.
827 896
828+++ 897+++
829** Limited support for character `unification' has been added. 898*** Limited support for character `unification' has been added.
830Emacs now knows how to translate between different representations of 899Emacs now knows how to translate between different representations of
831the same characters in various Emacs charsets according to standard 900the same characters in various Emacs charsets according to standard
832Unicode mappings. This applies mainly to characters in the ISO 8859 901Unicode mappings. This applies mainly to characters in the ISO 8859
@@ -846,20 +915,20 @@ mule-unicode-0100-24ff charsets) on decoding. Note that this mode
846will often effectively clobber data with an iso-2022 encoding. 915will often effectively clobber data with an iso-2022 encoding.
847 916
848--- 917---
849** There is support for decoding Greek and Cyrillic characters into 918*** There is support for decoding Greek and Cyrillic characters into
850either Unicode (the mule-unicode charsets) or the iso-8859 charsets, 919either Unicode (the mule-unicode charsets) or the iso-8859 charsets,
851when possible. The latter are more space-efficient. This is 920when possible. The latter are more space-efficient. This is
852controlled by user option utf-fragment-on-decoding. 921controlled by user option utf-fragment-on-decoding.
853 922
854--- 923---
855** New language environments: French, Ukrainian, Tajik, 924*** New language environments: French, Ukrainian, Tajik,
856Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6, 925Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6,
857Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian, 926Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian,
858Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up 927Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up
859automatically according to the locale.) 928automatically according to the locale.)
860 929
861--- 930---
862** New input methods: latin-alt-postfix, latin-postfix, latin-prefix, 931*** New input methods: latin-alt-postfix, latin-postfix, latin-prefix,
863ukrainian-computer, belarusian, bulgarian-bds, russian-computer, 932ukrainian-computer, belarusian, bulgarian-bds, russian-computer,
864vietnamese-telex, lithuanian-numeric, lithuanian-keyboard, 933vietnamese-telex, lithuanian-numeric, lithuanian-keyboard,
865latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml, 934latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml,
@@ -867,11 +936,11 @@ bulgarian-phonetic, dutch, slovenian, croatian, malayalam-inscript,
867tamil-inscript. 936tamil-inscript.
868 937
869--- 938---
870** New input method chinese-sisheng for inputting Chinese Pinyin 939*** New input method chinese-sisheng for inputting Chinese Pinyin
871characters. 940characters.
872 941
873--- 942---
874** Improved Thai support. A new minor mode `thai-word-mode' (which is 943*** Improved Thai support. A new minor mode `thai-word-mode' (which is
875automatically activated if you select Thai as a language 944automatically activated if you select Thai as a language
876environment) changes key bindings of most word-oriented commands to 945environment) changes key bindings of most word-oriented commands to
877versions which recognize Thai words. Affected commands are 946versions which recognize Thai words. Affected commands are
@@ -883,17 +952,17 @@ versions which recognize Thai words. Affected commands are
883 M-q (fill-paragraph) 952 M-q (fill-paragraph)
884 953
885--- 954---
886** Indian support has been updated. 955*** Indian support has been updated.
887The in-is13194 coding system is now Unicode-based. CDAC fonts are 956The in-is13194 coding system is now Unicode-based. CDAC fonts are
888assumed. There is a framework for supporting various 957assumed. There is a framework for supporting various
889Indian scripts, but currently only Devanagari, Malayalam and Tamil are 958Indian scripts, but currently only Devanagari, Malayalam and Tamil are
890supported. 959supported.
891 960
892--- 961---
893** A UTF-7 coding system is available in the library `utf-7'. 962*** A UTF-7 coding system is available in the library `utf-7'.
894 963
895--- 964---
896** The utf-8/16 coding systems have been enhanced. 965*** The utf-8/16 coding systems have been enhanced.
897By default, untranslatable utf-8 sequences are simply composed into 966By default, untranslatable utf-8 sequences are simply composed into
898single quasi-characters. User option `utf-translate-cjk-mode' (it is 967single quasi-characters. User option `utf-translate-cjk-mode' (it is
899turned on by default) arranges to translate many utf-8 CJK character 968turned on by default) arranges to translate many utf-8 CJK character
@@ -907,12 +976,12 @@ one-dimensional internal charsets, specifically the ISO-8859 ones.
907The utf-16 coding system is affected similarly. 976The utf-16 coding system is affected similarly.
908 977
909--- 978---
910** A new coding system `euc-tw' has been added for traditional Chinese 979*** A new coding system `euc-tw' has been added for traditional Chinese
911in CNS encoding; it accepts both Big 5 and CNS as input; on saving, 980in CNS encoding; it accepts both Big 5 and CNS as input; on saving,
912Big 5 is then converted to CNS. 981Big 5 is then converted to CNS.
913 982
914--- 983---
915** Many new coding systems are available by loading the `code-pages' 984*** Many new coding systems are available by loading the `code-pages'
916library. These include complete versions of most of those in 985library. These include complete versions of most of those in
917codepage.el, based on Unicode mappings. `codepage-setup' is now 986codepage.el, based on Unicode mappings. `codepage-setup' is now
918obsolete and is used only in the MS-DOS port of Emacs. windows-1252 987obsolete and is used only in the MS-DOS port of Emacs. windows-1252
@@ -920,82 +989,24 @@ and windows-1251 are preloaded since the former is so common and the
920latter is used by GNU locales. 989latter is used by GNU locales.
921 990
922--- 991---
923** New variable `utf-translate-cjk-unicode-range' controls which 992*** New variable `utf-translate-cjk-unicode-range' controls which
924Unicode characters to translate in `utf-translate-cjk-mode'. 993Unicode characters to translate in `utf-translate-cjk-mode'.
925 994
926--- 995---
927** iso-10646-1 (`Unicode') fonts can be used to display any range of 996*** iso-10646-1 (`Unicode') fonts can be used to display any range of
928characters encodable by the utf-8 coding system. Just specify the 997characters encodable by the utf-8 coding system. Just specify the
929fontset appropriately. 998fontset appropriately.
930 999
931+++ 1000** Customize changes:
932** Vertical scrolling is now possible within incremental search.
933To enable this feature, customize the new user option
934`isearch-allow-scroll'. User written commands which satisfy stringent
935constraints can be marked as "scrolling commands". See the Emacs manual
936for details.
937
938+++
939** C-w in incremental search now grabs either a character or a word,
940making the decision in a heuristic way. This new job is done by the
941command `isearch-yank-word-or-char'. To restore the old behavior,
942bind C-w to `isearch-yank-word' in `isearch-mode-map'.
943
944+++
945** C-y in incremental search now grabs the next line if point is already
946at the end of a line.
947
948+++
949** C-M-w deletes and C-M-y grabs a character in isearch mode.
950Another method to grab a character is to enter the minibuffer by `M-e'
951and to type `C-f' at the end of the search string in the minibuffer.
952
953+++
954** M-% typed in isearch mode invokes `query-replace' or
955`query-replace-regexp' (depending on search mode) with the current
956search string used as the string to replace.
957
958+++
959** Isearch no longer adds `isearch-resume' commands to the command
960history by default. To enable this feature, customize the new
961user option `isearch-resume-in-command-history'.
962
963---
964** New user option `query-replace-skip-read-only': when non-nil,
965`query-replace' and related functions simply ignore
966a match if part of it has a read-only property.
967 1001
968+++ 1002+++
969** When used interactively, the commands `query-replace-regexp' and 1003*** The commands M-x customize-face and M-x customize-face-other-window
970`replace-regexp' allow \,expr to be used in a replacement string,
971where expr is an arbitrary Lisp expression evaluated at replacement
972time. In many cases, this will be more convenient than using
973`query-replace-regexp-eval'. `\#' in a replacement string now refers
974to the count of replacements already made by the replacement command.
975All regular expression replacement commands now allow `\?' in the
976replacement string to specify a position where the replacement string
977can be edited for each replacement.
978
979+++
980** query-replace uses isearch lazy highlighting when the new user option
981`query-replace-lazy-highlight' is non-nil.
982
983---
984** The current match in query-replace is highlighted in new face
985`query-replace' which by default inherits from isearch face.
986
987+++
988** M-x compare-windows now can automatically skip non-matching text to
989resync points in both windows.
990
991+++
992** The commands M-x customize-face and M-x customize-face-other-window
993now look at the character after point. If a face or faces are 1004now look at the character after point. If a face or faces are
994specified for that character, the commands by default customize those 1005specified for that character, the commands by default customize those
995faces. 1006faces.
996 1007
997--- 1008---
998** The face-customization widget has been reworked to be less confusing. 1009*** The face-customization widget has been reworked to be less confusing.
999In particular, when you enable a face attribute using the corresponding 1010In particular, when you enable a face attribute using the corresponding
1000check-box, there's no longer a redundant `*' option in value selection 1011check-box, there's no longer a redundant `*' option in value selection
1001for that attribute; the values you can choose are only those which make 1012for that attribute; the values you can choose are only those which make
@@ -1004,11 +1015,41 @@ its check-box, then the (now ignored, but still present temporarily in
1004case you re-select the attribute) value is hidden. 1015case you re-select the attribute) value is hidden.
1005 1016
1006+++ 1017+++
1007** When you set or reset a variable's value in a Customize buffer, 1018*** When you set or reset a variable's value in a Customize buffer,
1008the previous value becomes the "backup value" of the variable. 1019the previous value becomes the "backup value" of the variable.
1009You can go back to that backup value by selecting "Use Backup Value" 1020You can go back to that backup value by selecting "Use Backup Value"
1010under the "[State]" button. 1021under the "[State]" button.
1011 1022
1023** Buffer Menu changes:
1024
1025+++
1026*** New command `Buffer-menu-toggle-files-only' toggles display of file
1027buffers only in the Buffer Menu. It is bound to `T' in Buffer Menu
1028mode.
1029
1030+++
1031*** `buffer-menu' and `list-buffers' now list buffers whose names begin
1032with a space, when those buffers are visiting files. Normally buffers
1033whose names begin with space are omitted.
1034
1035---
1036*** The new options `buffers-menu-show-directories' and
1037`buffers-menu-show-status' let you control how buffers are displayed
1038in the menu dropped down when you click "Buffers" from the menu bar.
1039
1040`buffers-menu-show-directories' controls whether the menu displays
1041leading directories as part of the file name visited by the buffer.
1042If its value is `unless-uniquify', the default, directories are
1043shown unless uniquify-buffer-name-style' is non-nil. The value of nil
1044and t turn the display of directories off and on, respectively.
1045
1046`buffers-menu-show-status' controls whether the Buffers menu includes
1047the modified and read-only status of the buffers. By default it is
1048t, and the status is shown.
1049
1050Setting these variables directly does not take effect until next time
1051the Buffers menu is regenerated.
1052
1012** Dired mode: 1053** Dired mode:
1013 1054
1014--- 1055---
@@ -1037,36 +1078,23 @@ special treatment in `dired-do-shell-command'.
1037into the kill ring. With a zero prefix arg, copies absolute file names. 1078into the kill ring. With a zero prefix arg, copies absolute file names.
1038 1079
1039+++ 1080+++
1040** The variables dired-free-space-program and dired-free-space-args 1081*** In Dired-x, Omitting files is now a minor mode, dired-omit-mode.
1041have been renamed to directory-free-space-program and
1042directory-free-space-args, and they now apply whenever Emacs puts a
1043directory listing into a buffer.
1044
1045+++
1046** Dired-x:
1047 1082
1048+++ 1083The mode toggling command is bound to M-o. A new command
1049*** Omitting files is now a minor mode, dired-omit-mode. The mode toggling 1084dired-mark-omitted, bound to * O, marks omitted files. The variable
1050command is bound to M-o. A new command dired-mark-omitted, bound to * O, 1085dired-omit-files-p is obsoleted, use the mode toggling function
1051marks omitted files. The variable dired-omit-files-p is obsoleted, use the 1086instead.
1052mode toggling function instead.
1053
1054+++
1055** In Outline mode, hide-body no longer hides lines at the top
1056of the file that precede the first header line.
1057 1087
1058+++ 1088+++
1059** Occur, Info, and comint-derived modes now support using 1089*** The variables dired-free-space-program and dired-free-space-args
1060M-x font-lock-mode to toggle fontification. The variable 1090have been renamed to directory-free-space-program and
1061`Info-fontify' is no longer applicable; to disable fontification, 1091directory-free-space-args, and they now apply whenever Emacs puts a
1062remove `turn-on-font-lock' from `Info-mode-hook'. 1092directory listing into a buffer.
1063 1093
1064--- 1094** Comint changes:
1065** The terminal emulation code in term.el has been improved, it can
1066run most curses applications now.
1067 1095
1068--- 1096---
1069** The comint prompt can now be made read-only, using the new user 1097*** The comint prompt can now be made read-only, using the new user
1070option `comint-prompt-read-only'. This is not enabled by default, 1098option `comint-prompt-read-only'. This is not enabled by default,
1071except in IELM buffers. The read-only status of IELM prompts can be 1099except in IELM buffers. The read-only status of IELM prompts can be
1072controlled with the new user option `ielm-prompt-read-only', which 1100controlled with the new user option `ielm-prompt-read-only', which
@@ -1088,20 +1116,19 @@ not the case, then `comint-kill-region' behaves just like
1088kill-ring, but does not delete it. 1116kill-ring, but does not delete it.
1089 1117
1090+++ 1118+++
1091** The new command `comint-insert-previous-argument' in comint-derived 1119*** The new command `comint-insert-previous-argument' in comint-derived
1092modes (shell-mode etc) inserts arguments from previous command lines, 1120modes (shell-mode etc) inserts arguments from previous command lines,
1093like bash's `ESC .' binding. It is bound by default to `C-c .', but 1121like bash's `ESC .' binding. It is bound by default to `C-c .', but
1094otherwise behaves quite similarly to the bash version. 1122otherwise behaves quite similarly to the bash version.
1095 1123
1096** `comint-use-prompt-regexp-instead-of-fields' has been renamed 1124*** `comint-use-prompt-regexp-instead-of-fields' has been renamed
1097`comint-use-prompt-regexp'. The old name has been kept as an alias, 1125`comint-use-prompt-regexp'. The old name has been kept as an alias,
1098but declared obsolete. 1126but declared obsolete.
1099 1127
1100+++ 1128** M-x Compile changes:
1101** Telnet now prompts you for a port number with C-u M-x telnet.
1102 1129
1103--- 1130---
1104** M-x compile has become more robust and reliable 1131*** M-x compile has become more robust and reliable
1105 1132
1106Quite a few more kinds of messages are recognized. Messages that are 1133Quite a few more kinds of messages are recognized. Messages that are
1107recognized as warnings or informational come in orange or green, instead of 1134recognized as warnings or informational come in orange or green, instead of
@@ -1120,8 +1147,6 @@ that configure outputs and -o options so you see at a glance where you are.
1120 1147
1121The new file etc/compilation.txt gives examples of each type of message. 1148The new file etc/compilation.txt gives examples of each type of message.
1122 1149
1123** Compilation mode enhancements:
1124
1125+++ 1150+++
1126*** New user option `compilation-environment'. 1151*** New user option `compilation-environment'.
1127This option allows you to specify environment variables for inferior 1152This option allows you to specify environment variables for inferior
@@ -1129,19 +1154,47 @@ compilation processes without affecting the environment that all
1129subprocesses inherit. 1154subprocesses inherit.
1130 1155
1131+++ 1156+++
1157*** New options `next-error-highlight' and `next-error-highlight-no-select'
1158specify the method of highlighting of the corresponding source line
1159in new face `next-error'.
1160
1161+++
1162*** A new minor mode `next-error-follow-minor-mode' can be used in
1163compilation-mode, grep-mode, occur-mode, and diff-mode (i.e. all the
1164modes that can use `next-error'). In this mode, cursor motion in the
1165buffer causes automatic display in another window of the corresponding
1166matches, compilation errors, etc. This minor mode can be toggled with
1167C-c C-f.
1168
1169** Occur mode changes:
1170
1171+++
1172*** In the *Occur* buffer, `o' switches to it in another window, and
1173C-o displays the current line's occurrence in another window without
1174switching to it.
1175
1176+++
1177*** You can now use next-error (C-x `) and previous-error to advance to
1178the next/previous matching line found by M-x occur.
1179
1180+++
1181*** The new command `multi-occur' is just like `occur', except it can
1182search multiple buffers. There is also a new command
1183`multi-occur-by-filename-regexp' which allows you to specify the
1184buffers to search by their filename. Internally, Occur mode has been
1185rewritten, and now uses font-lock, among other changes.
1186
1187+++
1132** Grep has been decoupled from compilation mode setup. 1188** Grep has been decoupled from compilation mode setup.
1133 1189
1134--- 1190There's a new separate package grep.el, with its own submenu and
1135*** There's a new separate package grep.el. 1191customization group.
1136 1192
1137--- 1193---
1138*** M-x grep has been adapted to new compile 1194*** M-x grep provides highlighting support.
1139 1195
1140Hits are fontified in green, and hits in binary files in orange. Grep buffers 1196Hits are fontified in green, and hits in binary files in orange. Grep buffers
1141can be saved and automatically revisited with the new Grep mode. 1197can be saved and automatically revisited.
1142
1143---
1144*** Grep commands now have their own submenu and customization group.
1145 1198
1146+++ 1199+++
1147*** `grep-find' is now also available under the name `find-grep' where 1200*** `grep-find' is now also available under the name `find-grep' where
@@ -1149,8 +1202,8 @@ people knowing `find-grep-dired' would probably expect it.
1149 1202
1150--- 1203---
1151*** The new variables `grep-window-height', `grep-auto-highlight', and 1204*** The new variables `grep-window-height', `grep-auto-highlight', and
1152`grep-scroll-output' can be used to override the corresponding 1205`grep-scroll-output' override the corresponding compilation mode
1153compilation mode settings for grep commands. 1206settings, for grep commands only.
1154 1207
1155+++ 1208+++
1156*** New option `grep-highlight-matches' highlightes matches in *grep* 1209*** New option `grep-highlight-matches' highlightes matches in *grep*
@@ -1170,70 +1223,17 @@ previous or next file in the grep output. TAB also jumps to the next
1170file. 1223file.
1171 1224
1172+++ 1225+++
1173** M-x grep now tries to avoid appending `/dev/null' to the command line 1226*** M-x grep now tries to avoid appending `/dev/null' to the command line
1174by using GNU grep `-H' option instead. M-x grep automatically 1227by using GNU grep `-H' option instead. M-x grep automatically
1175detects whether this is possible or not the first time it is invoked. 1228detects whether this is possible or not the first time it is invoked.
1176When `-H' is used, the grep command line supplied by the user is passed 1229When `-H' is used, the grep command line supplied by the user is passed
1177unchanged to the system to execute, which allows more complicated 1230unchanged to the system to execute, which allows more complicated
1178command lines to be used than was possible before. 1231command lines to be used than was possible before.
1179 1232
1180+++ 1233** Emacs server changes:
1181** New options `next-error-highlight' and `next-error-highlight-no-select'
1182specify the method of highlighting of the corresponding source line
1183in new face `next-error'.
1184
1185+++
1186** A new minor mode `next-error-follow-minor-mode' can be used in
1187compilation-mode, grep-mode, occur-mode, and diff-mode (i.e. all the
1188modes that can use `next-error'). In this mode, cursor motion in the
1189buffer causes automatic display in another window of the corresponding
1190matches, compilation errors, etc. This minor mode can be toggled with
1191C-c C-f.
1192
1193+++
1194** M-x diff uses diff-mode instead of compilation-mode.
1195
1196+++
1197** In the *Occur* buffer, `o' switches to it in another window, and
1198C-o displays the current line's occurrence in another window without
1199switching to it.
1200
1201+++
1202** You can now use next-error (C-x `) and previous-error to advance to
1203the next/previous matching line found by M-x occur.
1204
1205+++
1206** The new command `multi-occur' is just like `occur', except it can
1207search multiple buffers. There is also a new command
1208`multi-occur-by-filename-regexp' which allows you to specify the
1209buffers to search by their filename. Internally, Occur mode has been
1210rewritten, and now uses font-lock, among other changes.
1211 1234
1212+++ 1235+++
1213** font-lock: in modes like C and Lisp where the fontification assumes that 1236*** You can have several Emacs servers on the same machine.
1214an open-paren in column 0 is always outside of any string or comment,
1215font-lock now highlights any such open-paren-in-column-zero in bold-red
1216if it is inside a string or a comment, to indicate that it can cause
1217trouble with fontification and/or indentation.
1218
1219** Enhancements to apropos commands:
1220
1221+++
1222*** The apropos commands now accept a list of words to match.
1223When more than one word is specified, at least two of those words must
1224be present for an item to match. Regular expression matching is still
1225available.
1226
1227+++
1228*** The new option `apropos-sort-by-scores' causes the matching items
1229to be sorted according to their score. The score for an item is a
1230number calculated to indicate how well the item matches the words or
1231regular expression that you entered to the apropos command. The best
1232match is listed first, and the calculated score is shown for each
1233matching item.
1234
1235+++
1236** You can have several Emacs servers on the same machine.
1237 1237
1238 % emacs --eval '(setq server-name "foo")' -f server-start & 1238 % emacs --eval '(setq server-name "foo")' -f server-start &
1239 % emacs --eval '(setq server-name "bar")' -f server-start & 1239 % emacs --eval '(setq server-name "bar")' -f server-start &
@@ -1241,17 +1241,12 @@ matching item.
1241 % emacsclient -s bar file2 1241 % emacsclient -s bar file2
1242 1242
1243+++ 1243+++
1244** The `emacsclient' command understands the options `--eval' and 1244*** The `emacsclient' command understands the options `--eval' and
1245`--display' which tell Emacs respectively to evaluate the given elisp 1245`--display' which tell Emacs respectively to evaluate the given elisp
1246expression and to use the given display when visiting files. 1246expression and to use the given display when visiting files.
1247 1247
1248+++ 1248+++
1249** User option `server-mode' can be used to start a server process. 1249*** User option `server-mode' can be used to start a server process.
1250
1251+++
1252** New user option `add-log-always-start-new-record'.
1253When this option is enabled, M-x add-change-log-entry always
1254starts a new record regardless of when the last record is.
1255 1250
1256** Menu support: 1251** Menu support:
1257 1252
@@ -1284,7 +1279,7 @@ Meta and Alt:
1284 (setq x-meta-keysym 'alt) 1279 (setq x-meta-keysym 'alt)
1285 1280
1286+++ 1281+++
1287*** The X resource useXIM can be used to turn off use of XIM, which may 1282*** The X resource useXIM can be used to turn off use of XIM, which can
1288speed up Emacs with slow networking to the X server. 1283speed up Emacs with slow networking to the X server.
1289 1284
1290If the configure option `--without-xim' was used to turn off use of 1285If the configure option `--without-xim' was used to turn off use of
@@ -1315,7 +1310,7 @@ to explicitly specify a fontSet resource for this to work, for example
1315ESC, like they do for Gtk+, Mac and W32. 1310ESC, like they do for Gtk+, Mac and W32.
1316 1311
1317+++ 1312+++
1318** For Gtk+ version 2.4, you can make Emacs use the old file dialog 1313*** For Gtk+ version 2.4, you can make Emacs use the old file dialog
1319by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use 1314by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use
1320the new dialog. 1315the new dialog.
1321 1316
@@ -1333,7 +1328,7 @@ following should work:
1333These key bindings work on xterm from X.org 6.8, they might not work on 1328These key bindings work on xterm from X.org 6.8, they might not work on
1334some older versions of xterm, or on some proprietary versions. 1329some older versions of xterm, or on some proprietary versions.
1335 1330
1336** Changes in support of colors on character terminals 1331** Character terminal color support changes:
1337 1332
1338+++ 1333+++
1339*** The new command-line option --color=MODE lets you specify a standard 1334*** The new command-line option --color=MODE lets you specify a standard
@@ -1362,10 +1357,12 @@ colors as on X.
1362 1357
1363--- 1358---
1364*** There's a new support for colors on `rxvt' terminal emulator. 1359*** There's a new support for colors on `rxvt' terminal emulator.
1360
1361* New modes and packages in Emacs 22.1
1365 1362
1366--- 1363+++
1367** M-x view-file and commands that use it now avoid interfering 1364** New package benchmark.el contains simple support for convenient
1368with special modes such as Tar mode. 1365timing measurements of code (including the garbage collection component).
1369 1366
1370+++ 1367+++
1371** Filesets are collections of files. You can define a fileset in 1368** Filesets are collections of files. You can define a fileset in
@@ -1376,23 +1373,6 @@ Once you have defined a fileset, you can perform various operations on
1376all the files in it, such as visiting them or searching and replacing 1373all the files in it, such as visiting them or searching and replacing
1377in them. 1374in them.
1378 1375
1379---
1380** Commands winner-redo and winner-undo, from winner.el, are now bound to
1381C-c <left> and C-c <right>, respectively. This is an incompatible change.
1382
1383---
1384** global-whitespace-mode is a new alias for whitespace-global-mode.
1385
1386+++
1387** The command `list-text-properties-at' has been deleted because
1388C-u C-x = gives the same information and more.
1389
1390* New modes and packages in Emacs 22.1
1391
1392+++
1393** New package benchmark.el contains simple support for convenient
1394timing measurements of code (including the garbage collection component).
1395
1396+++ 1376+++
1397** Calc is now part of the Emacs distribution. 1377** Calc is now part of the Emacs distribution.
1398 1378
@@ -1450,7 +1430,7 @@ commentary in cua-base.el for more global mark related commands.
1450 1430
1451The features of cua also works with the standard emacs bindings for 1431The features of cua also works with the standard emacs bindings for
1452kill, copy, yank, and undo. If you want to use cua mode, but don't 1432kill, copy, yank, and undo. If you want to use cua mode, but don't
1453want the C-x, C-c, C-v, and C-z bindings, you may customize the 1433want the C-x, C-c, C-v, and C-z bindings, you can customize the
1454`cua-enable-cua-keys' variable. 1434`cua-enable-cua-keys' variable.
1455 1435
1456Note: This version of cua mode is not backwards compatible with older 1436Note: This version of cua mode is not backwards compatible with older
@@ -1468,7 +1448,7 @@ to increment the SOA serial.
1468filenames being entered by the user in the minibuffer are displayed, so 1448filenames being entered by the user in the minibuffer are displayed, so
1469that it's clear when part of the entered filename will be ignored due to 1449that it's clear when part of the entered filename will be ignored due to
1470emacs' filename parsing rules. The ignored portion can be made dim, 1450emacs' filename parsing rules. The ignored portion can be made dim,
1471invisible, or otherwise less visually noticable. The display method may 1451invisible, or otherwise less visually noticable. The display method can
1472be displayed by customizing the variable `file-name-shadow-properties'. 1452be displayed by customizing the variable `file-name-shadow-properties'.
1473 1453
1474+++ 1454+++
@@ -1481,16 +1461,6 @@ source files. See the Flymake's Info manual for more details.
1481--- 1461---
1482** GDB-Script-mode is used for files like .gdbinit. 1462** GDB-Script-mode is used for files like .gdbinit.
1483 1463
1484+++
1485** The new package gdb-ui.el provides an enhanced graphical interface to
1486GDB. You can interact with GDB through the GUD buffer in the usual way, but
1487there are also further buffers which control the execution and describe the
1488state of your program. It separates the input/output of your program from
1489that of GDB and watches expressions in the speedbar. It also uses features of
1490Emacs 21 such as the display margin for breakpoints, and the toolbar.
1491
1492Use M-x gdba to start GDB-UI.
1493
1494--- 1464---
1495** The new package ibuffer provides a powerful, completely 1465** The new package ibuffer provides a powerful, completely
1496customizable replacement for buff-menu.el. 1466customizable replacement for buff-menu.el.
@@ -1577,12 +1547,6 @@ referred to as "soft word wrap" in other text editors. This is
1577similar to Refill mode, but more reliable. To turn the word wrap 1547similar to Refill mode, but more reliable. To turn the word wrap
1578feature off, set `longlines-auto-wrap' to nil. 1548feature off, set `longlines-auto-wrap' to nil.
1579 1549
1580---
1581** The old Octave mode bindings C-c f and C-c i have been changed
1582to C-c C-f and C-c C-i. The C-c C-i subcommands now have duplicate
1583bindings on control characters--thus, C-c C-i C-b is the same as
1584C-c C-i b, and so on.
1585
1586** The printing package is now part of the Emacs distribution. 1550** The printing package is now part of the Emacs distribution.
1587 1551
1588If you enable the printing package by including (require 'printing) in 1552If you enable the printing package by including (require 'printing) in
@@ -1671,6 +1635,48 @@ buffers to change filenames, permissions, etc...
1671* Changes in specialized modes and packages: 1635* Changes in specialized modes and packages:
1672 1636
1673+++ 1637+++
1638** In Outline mode, hide-body no longer hides lines at the top
1639of the file that precede the first header line.
1640
1641+++
1642** Telnet now prompts you for a port number with C-u M-x telnet.
1643
1644---
1645** The terminal emulation code in term.el has been improved, it can
1646run most curses applications now.
1647
1648+++
1649** M-x diff uses diff-mode instead of compilation-mode.
1650
1651+++
1652** You can now customize fill-nobreak-predicate to control where
1653filling can break lines. The value is now normally a list of
1654functions, but it can also be a single function, for compatibility.
1655
1656We provide two sample predicates, fill-single-word-nobreak-p and
1657fill-french-nobreak-p, for use in the value of fill-nobreak-predicate.
1658
1659---
1660** M-x view-file and commands that use it now avoid interfering
1661with special modes such as Tar mode.
1662
1663---
1664** Commands winner-redo and winner-undo, from winner.el, are now bound to
1665C-c <left> and C-c <right>, respectively. This is an incompatible change.
1666
1667---
1668** global-whitespace-mode is a new alias for whitespace-global-mode.
1669
1670+++
1671** M-x compare-windows now can automatically skip non-matching text to
1672resync points in both windows.
1673
1674+++
1675** New user option `add-log-always-start-new-record'.
1676When this option is enabled, M-x add-change-log-entry always
1677starts a new record regardless of when the last record is.
1678
1679+++
1674** There is a new user option `mail-default-directory' that allows you 1680** There is a new user option `mail-default-directory' that allows you
1675to specify the value of `default-directory' for mail buffers. This 1681to specify the value of `default-directory' for mail buffers. This
1676directory is used for auto-save files of mail buffers. It defaults to 1682directory is used for auto-save files of mail buffers. It defaults to
@@ -2060,6 +2066,12 @@ syntactic indentation.
2060--- 2066---
2061** Perl mode has a new variable `perl-indent-continued-arguments'. 2067** Perl mode has a new variable `perl-indent-continued-arguments'.
2062 2068
2069---
2070** The old Octave mode bindings C-c f and C-c i have been changed
2071to C-c C-f and C-c C-i. The C-c C-i subcommands now have duplicate
2072bindings on control characters--thus, C-c C-i C-b is the same as
2073C-c C-i b, and so on.
2074
2063** Fortran mode changes: 2075** Fortran mode changes:
2064 2076
2065--- 2077---
@@ -2184,6 +2196,24 @@ counter to the specified source line (the one where point is).
2184*** GUD mode has its own tool bar for controlling execution of the inferior 2196*** GUD mode has its own tool bar for controlling execution of the inferior
2185and other common debugger commands. 2197and other common debugger commands.
2186 2198
2199+++
2200*** The new package gdb-ui.el provides an enhanced graphical interface to
2201GDB. You can interact with GDB through the GUD buffer in the usual way, but
2202there are also further buffers which control the execution and describe the
2203state of your program. It separates the input/output of your program from
2204that of GDB and watches expressions in the speedbar. It also uses features of
2205Emacs 21 such as the display margin for breakpoints, and the toolbar.
2206
2207Use M-x gdba to start GDB-UI.
2208
2209*** GUD tooltips can be toggled independently of normal tooltips
2210with the minor mode, gud-tooltip-mode.
2211
2212+++
2213*** In graphical mode, with a C program, GUD Tooltips have been extended to
2214display the #define directive associated with an identifier when program is
2215not executing.
2216
2187--- 2217---
2188** GUD mode improvements for jdb: 2218** GUD mode improvements for jdb:
2189 2219
@@ -2236,7 +2266,7 @@ mode keeps it at the end after reverting. Similarly if point is
2236displayed at the end of a file buffer in any window, it stays at 2266displayed at the end of a file buffer in any window, it stays at
2237the end of the buffer in that window. This allows to tail a file: 2267the end of the buffer in that window. This allows to tail a file:
2238just put point at the end of the buffer and it stays there. This 2268just put point at the end of the buffer and it stays there. This
2239rule applies to file buffers. For non-file buffers, the behavior may 2269rule applies to file buffers. For non-file buffers, the behavior can
2240be mode dependent. 2270be mode dependent.
2241 2271
2242If you are sure that the file will only change by growing at the end, 2272If you are sure that the file will only change by growing at the end,
@@ -2487,6 +2517,19 @@ anyone has committed to the repository since you last executed
2487"checkout", "update" or "commit". That means using cvs diff options 2517"checkout", "update" or "commit". That means using cvs diff options
2488-rBASE -rHEAD. 2518-rBASE -rHEAD.
2489 2519
2520** Rmail changes:
2521
2522---
2523*** Rmail now displays 5-digit message ids in its summary buffer.
2524
2525+++
2526*** Support for `movemail' from GNU mailutils was added to Rmail.
2527This version of `movemail' allows to read mail from a wide range of
2528mailbox formats, including remote POP3 and IMAP4 mailboxes with or
2529without TLS encryption. If GNU mailutils is installed on the system
2530and its version of `movemail' can be found in exec-path, it will be
2531used instead of the native one.
2532
2490** Gnus package 2533** Gnus package
2491 2534
2492--- 2535---
@@ -2499,17 +2542,6 @@ PGP/MIME.
2499See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. 2542See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
2500 2543
2501--- 2544---
2502** Rmail now displays 5-digit message ids in its summary buffer.
2503
2504+++
2505** Support for `movemail' from GNU mailutils was added to Rmail.
2506This version of `movemail' allows to read mail from a wide range of
2507mailbox formats, including remote POP3 and IMAP4 mailboxes with or
2508without TLS encryption. If GNU mailutils is installed on the system
2509and its version of `movemail' can be found in exec-path, it will be
2510used instead of the native one.
2511
2512---
2513** MH-E changes. 2545** MH-E changes.
2514 2546
2515Upgraded to MH-E version 7.82. There have been major changes since 2547Upgraded to MH-E version 7.82. There have been major changes since
@@ -2839,22 +2871,17 @@ the command `undefined'. (In earlier Emacs versions, it used
2839 2871
2840* Lisp Changes in Emacs 22.1 2872* Lisp Changes in Emacs 22.1
2841 2873
2842+++ 2874** New function `locate-file' searches for a file in a list of directories.
2843** The option --script FILE runs Emacs in batch mode and loads FILE. 2875`locate-file' accepts a name of a file to search (a string), and two
2844It is useful for writing Emacs Lisp shell script files, because they 2876lists: a list of directories to search in and a list of suffixes to
2845can start with this line: 2877try; typical usage might use `exec-path' and `load-path' for the list
2878of directories, and `exec-suffixes' and `load-suffixes' for the list
2879of suffixes. The function also accepts a predicate argument to
2880further filter candidate files.
2846 2881
2847 #!/usr/bin/emacs --script 2882One advantage of using this function is that the list of suffixes in
2848 2883`exec-suffixes' is OS-dependant, so this function will find
2849+++ 2884executables without polluting Lisp code with OS dependancies.
2850** The option --directory DIR now modifies `load-path' immediately.
2851Directories are added to the front of `load-path' in the order they
2852appear on the command line. For example, with this command line:
2853
2854 emacs -batch -L .. -L /tmp --eval "(require 'foo)"
2855
2856Emacs looks for library `foo' in the parent directory, then in /tmp, then
2857in the other directories in `load-path'. (-L is short for --directory.)
2858 2885
2859+++ 2886+++
2860** The default value of `sentence-end' is now defined using the new 2887** The default value of `sentence-end' is now defined using the new
@@ -2931,7 +2958,7 @@ for a function that could be called with `call-interactively',
2931and does not return t for keyboard macros. 2958and does not return t for keyboard macros.
2932 2959
2933+++ 2960+++
2934** An interactive specification may now use the code letter 'U' to get 2961** An interactive specification can now use the code letter 'U' to get
2935the up-event that was discarded in case the last key sequence read for a 2962the up-event that was discarded in case the last key sequence read for a
2936previous 'k' or 'K' argument was a down-event; otherwise nil is used. 2963previous 'k' or 'K' argument was a down-event; otherwise nil is used.
2937 2964
@@ -3184,7 +3211,7 @@ The new functions `make-progress-reporter', `progress-reporter-update',
3184a command to present progress messages for the user. 3211a command to present progress messages for the user.
3185 3212
3186+++ 3213+++
3187** New `yank-handler' text property may be used to control how 3214** New `yank-handler' text property can be used to control how
3188previously killed text on the kill-ring is reinserted. 3215previously killed text on the kill-ring is reinserted.
3189 3216
3190The value of the yank-handler property must be a list with one to four 3217The value of the yank-handler property must be a list with one to four
@@ -3209,7 +3236,7 @@ if FUNCTION adjusts point before or after inserting the object.
3209 If UNDO is present and non-nil, it is a function that will be called 3236 If UNDO is present and non-nil, it is a function that will be called
3210by `yank-pop' to undo the insertion of the current object. It is 3237by `yank-pop' to undo the insertion of the current object. It is
3211called with two arguments, the start and end of the current region. 3238called with two arguments, the start and end of the current region.
3212FUNCTION may set `yank-undo-function' to override the UNDO value. 3239FUNCTION can set `yank-undo-function' to override the UNDO value.
3213 3240
3214*** The functions kill-new, kill-append, and kill-region now have an 3241*** The functions kill-new, kill-append, and kill-region now have an
3215optional argument to specify the yank-handler text property to put on 3242optional argument to specify the yank-handler text property to put on
@@ -3228,7 +3255,7 @@ string. The old behavior is available if you call
3228 3255
3229*** The new function insert-for-yank normally works like `insert', but 3256*** The new function insert-for-yank normally works like `insert', but
3230removes the text properties in the `yank-excluded-properties' list. 3257removes the text properties in the `yank-excluded-properties' list.
3231However, the insertion of the text may be modified by a `yank-handler' 3258However, the insertion of the text can be modified by a `yank-handler'
3232text property. 3259text property.
3233 3260
3234+++ 3261+++
@@ -3321,7 +3348,7 @@ create a stream or datagram server inside emacs.
3321- A server can open on a random port using :service t arg. 3348- A server can open on a random port using :service t arg.
3322- Local sockets are supported using :family 'local arg. 3349- Local sockets are supported using :family 'local arg.
3323- Non-blocking connect is supported using :nowait t arg. 3350- Non-blocking connect is supported using :nowait t arg.
3324- The process' property list may be initialized using :plist PLIST arg; 3351- The process' property list can be initialized using :plist PLIST arg;
3325 a copy of the server process' property list is automatically inherited 3352 a copy of the server process' property list is automatically inherited
3326 by new client processes created to handle incoming connections. 3353 by new client processes created to handle incoming connections.
3327 3354
@@ -3399,7 +3426,7 @@ forcing an explicit window update.
3399** The line-move, scroll-up, and scroll-down functions will now 3426** The line-move, scroll-up, and scroll-down functions will now
3400modify the window vscroll to scroll through display rows that are 3427modify the window vscroll to scroll through display rows that are
3401taller that the height of the window, for example in the presense of 3428taller that the height of the window, for example in the presense of
3402large images. To disable this feature, Lisp code may bind the new 3429large images. To disable this feature, Lisp code can bind the new
3403variable `auto-window-vscroll' to nil. 3430variable `auto-window-vscroll' to nil.
3404 3431
3405+++ 3432+++
@@ -3460,7 +3487,7 @@ fringe bitmaps, as well as change the built-in fringe bitmaps.
3460To change a built-in bitmap, do (require 'fringe) and use the symbol 3487To change a built-in bitmap, do (require 'fringe) and use the symbol
3461identifing the bitmap such as `left-truncation or `continued-line'. 3488identifing the bitmap such as `left-truncation or `continued-line'.
3462 3489
3463*** New function 'destroy-fringe-bitmap' may be used to destroy a 3490*** New function 'destroy-fringe-bitmap' can be used to destroy a
3464previously created bitmap, or restore a built-in bitmap. 3491previously created bitmap, or restore a built-in bitmap.
3465 3492
3466*** New function 'set-fringe-bitmap-face' can now be used to set a 3493*** New function 'set-fringe-bitmap-face' can now be used to set a
@@ -3543,7 +3570,7 @@ variable `overlay-arrow-variable-list'. It contains a list of
3543varibles which contain overlay arrow position markers, including 3570varibles which contain overlay arrow position markers, including
3544the original `overlay-arrow-position' variable. 3571the original `overlay-arrow-position' variable.
3545 3572
3546Each variable on this list may have individual `overlay-arrow-string' 3573Each variable on this list can have individual `overlay-arrow-string'
3547and `overlay-arrow-bitmap' properties that specify an overlay arrow 3574and `overlay-arrow-bitmap' properties that specify an overlay arrow
3548string (for non-window terminals) or fringe bitmap (for window 3575string (for non-window terminals) or fringe bitmap (for window
3549systems) to display at the corresponding overlay arrow position. 3576systems) to display at the corresponding overlay arrow position.
@@ -3553,7 +3580,7 @@ If either property is not set, the default `overlay-arrow-string' or
3553+++ 3580+++
3554** New line-height and line-spacing properties for newline characters 3581** New line-height and line-spacing properties for newline characters
3555 3582
3556A newline may now have line-height and line-spacing text or overlay 3583A newline can now have line-height and line-spacing text or overlay
3557properties that control the height of the corresponding display row. 3584properties that control the height of the corresponding display row.
3558 3585
3559If the line-height property value is t, the newline does not 3586If the line-height property value is t, the newline does not
@@ -3588,11 +3615,11 @@ is used as additional pixels to insert after the display line; this
3588overrides the default frame line-spacing and any buffer local value of 3615overrides the default frame line-spacing and any buffer local value of
3589the line-spacing variable. 3616the line-spacing variable.
3590 3617
3591If the line-spacing property may be a float or cons, the line spacing 3618If the line-spacing property is a float or cons, the line spacing
3592is calculated as specified above for the line-height property. 3619is calculated as specified above for the line-height property.
3593 3620
3594+++ 3621+++
3595** The buffer local line-spacing variable may now have a float value, 3622** The buffer local line-spacing variable can now have a float value,
3596which is used as a height relative to the default frame line height. 3623which is used as a height relative to the default frame line height.
3597 3624
3598+++ 3625+++
@@ -3655,7 +3682,7 @@ The form `(- EXPR ...)' negates or subtracts the value of the expressions.
3655+++ 3682+++
3656** Support for displaying image slices 3683** Support for displaying image slices
3657 3684
3658*** New display property (slice X Y WIDTH HEIGHT) may be used with 3685*** New display property (slice X Y WIDTH HEIGHT) can be used with
3659an image property to display only a specific slice of the image. 3686an image property to display only a specific slice of the image.
3660 3687
3661*** Function insert-image has new optional fourth arg to 3688*** Function insert-image has new optional fourth arg to
@@ -3665,15 +3692,15 @@ specify image slice (X Y WIDTH HEIGHT).
3665specified number of evenly sized slices (rows x columns). 3692specified number of evenly sized slices (rows x columns).
3666 3693
3667+++ 3694+++
3668** Images may now have an associated image map via the :map property. 3695** Images can now have an associated image map via the :map property.
3669 3696
3670An image map is an alist where each element has the format (AREA ID PLIST). 3697An image map is an alist where each element has the format (AREA ID PLIST).
3671An AREA is specified as either a rectangle, a circle, or a polygon: 3698An AREA is specified as either a rectangle, a circle, or a polygon:
3672A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the 3699A rectangle is a cons (rect . ((X0 . Y0) . (X1 . Y1))) specifying the
3673pixel coordinates of the upper left and bottom right corners. 3700pixel coordinates of the upper left and bottom right corners.
3674A circle is a cons (circle . ((x0 . y0) . r)) specifying the center 3701A circle is a cons (circle . ((X0 . Y0) . R)) specifying the center
3675and the radius of the circle; r may be a float or integer. 3702and the radius of the circle; R can be a float or integer.
3676A polygon is a cons (poly . [x0 y0 x1 y1 ...]) where each pair in the 3703A polygon is a cons (poly . [X0 Y0 X1 Y1 ...]) where each pair in the
3677vector describes one corner in the polygon. 3704vector describes one corner in the polygon.
3678 3705
3679When the mouse pointer is above a hot-spot area of an image, the 3706When the mouse pointer is above a hot-spot area of an image, the
@@ -3705,7 +3732,7 @@ clickable link with the new function `mouse-on-link-p'. This is the
3705function used by the new `mouse-1-click-follows-link' functionality. 3732function used by the new `mouse-1-click-follows-link' functionality.
3706 3733
3707+++ 3734+++
3708** The mouse pointer shape over ordinary text or images may now be 3735** The mouse pointer shape over ordinary text or images can now be
3709controlled/overriden via the `pointer' text property. 3736controlled/overriden via the `pointer' text property.
3710 3737
3711** Mouse event enhancements: 3738** Mouse event enhancements:
@@ -3739,7 +3766,7 @@ text area).
3739*** New function `posn-actual-col-row' returns actual glyph coordinates. 3766*** New function `posn-actual-col-row' returns actual glyph coordinates.
3740 3767
3741+++ 3768+++
3742*** Mouse events may now include image object in addition to string object. 3769*** Mouse events can now include image object in addition to string object.
3743 3770
3744+++ 3771+++
3745*** Mouse events include relative x and y pixel coordinates relative to 3772*** Mouse events include relative x and y pixel coordinates relative to
@@ -3769,7 +3796,7 @@ post-command-hook and thus does not care about intermediate states.
3769+++ 3796+++
3770** Normally, the cursor is displayed at the end of any overlay and 3797** Normally, the cursor is displayed at the end of any overlay and
3771text property string that may be present at the current window 3798text property string that may be present at the current window
3772position. The cursor may now be placed on any character of such 3799position. The cursor can now be placed on any character of such
3773strings by giving that character a non-nil `cursor' text property. 3800strings by giving that character a non-nil `cursor' text property.
3774 3801
3775+++ 3802+++
@@ -3815,10 +3842,10 @@ to display CHAR. More precisely, if the selected frame's fontset has
3815a font to display the character set that CHAR belongs to. 3842a font to display the character set that CHAR belongs to.
3816 3843
3817Fontsets can specify a font on a per-character basis; when the fontset 3844Fontsets can specify a font on a per-character basis; when the fontset
3818does that, this value may not be accurate. 3845does that, this value cannot be accurate.
3819 3846
3820+++ 3847+++
3821** New function display-supports-face-attributes-p may be used to test 3848** New function display-supports-face-attributes-p can be used to test
3822whether a given set of face attributes is actually displayable. 3849whether a given set of face attributes is actually displayable.
3823 3850
3824A new predicate `supports' has also been added to the `defface' face 3851A new predicate `supports' has also been added to the `defface' face
@@ -3835,7 +3862,7 @@ directly in the `face' property instead of using a named face.
3835+++ 3862+++
3836** The first face specification element in a defface can specify 3863** The first face specification element in a defface can specify
3837`default' instead of frame classification. Then its attributes act as 3864`default' instead of frame classification. Then its attributes act as
3838defaults that apply to all the subsequent cases (and may be overridden 3865defaults that apply to all the subsequent cases (and can be overridden
3839by them). 3866by them).
3840 3867
3841+++ 3868+++
@@ -4013,7 +4040,7 @@ as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5).
4013its last line. It should match the regexp "\n\n(fn.*)\\'". 4040its last line. It should match the regexp "\n\n(fn.*)\\'".
4014 4041
4015+++ 4042+++
4016** The `defmacro' form may contain declarations specifying how to 4043** The `defmacro' form can contain declarations specifying how to
4017indent the macro in Lisp mode and how to debug it with Edebug. The 4044indent the macro in Lisp mode and how to debug it with Edebug. The
4018syntax of defmacro has been extended to 4045syntax of defmacro has been extended to
4019 4046
@@ -4033,7 +4060,7 @@ declaration specifiers supported are:
4033** The functions all-completions and try-completion now accept lists 4060** The functions all-completions and try-completion now accept lists
4034of strings as well as hash-tables additionally to alists, obarrays 4061of strings as well as hash-tables additionally to alists, obarrays
4035and functions. Furthermore, the function `test-completion' is now 4062and functions. Furthermore, the function `test-completion' is now
4036exported to Lisp. The keys in alists and hash tables may be either 4063exported to Lisp. The keys in alists and hash tables can be either
4037strings or symbols, which are automatically converted with to strings. 4064strings or symbols, which are automatically converted with to strings.
4038 4065
4039+++ 4066+++
@@ -4044,8 +4071,8 @@ as a dynamic completion table.
4044 4071
4045FUN is called with one argument, the string for which completion is required, 4072FUN is called with one argument, the string for which completion is required,
4046and it should return an alist containing all the intended possible 4073and it should return an alist containing all the intended possible
4047completions. This alist may be a full list of possible completions so that FUN 4074completions. This alist can be a full list of possible completions so that FUN
4048can ignore the value of its argument. If completion is performed in the 4075can ignore the value of its argument. If completion is performed in the
4049minibuffer, FUN will be called in the buffer from which the minibuffer was 4076minibuffer, FUN will be called in the buffer from which the minibuffer was
4050entered. dynamic-completion-table then computes the completion. 4077entered. dynamic-completion-table then computes the completion.
4051 4078
@@ -4113,12 +4140,12 @@ In the first case, using `foo' as a function inside the <then> form
4113won't produce a warning if it's not defined as a function, and in the 4140won't produce a warning if it's not defined as a function, and in the
4114second case, using `foo' as a variable won't produce a warning if it's 4141second case, using `foo' as a variable won't produce a warning if it's
4115unbound. The test must be in exactly one of the above forms (after 4142unbound. The test must be in exactly one of the above forms (after
4116macro expansion), but such tests may be nested. Note that `when' and 4143macro expansion), but such tests can be nested. Note that `when' and
4117`unless' expand to `if', but `cond' doesn't. 4144`unless' expand to `if', but `cond' doesn't.
4118 4145
4119*** `(featurep 'xemacs)' is treated by the compiler as nil. This 4146*** `(featurep 'xemacs)' is treated by the compiler as nil. This
4120helps to avoid noisy compiler warnings in code meant to run under both 4147helps to avoid noisy compiler warnings in code meant to run under both
4121Emacs and XEmacs and may sometimes make the result significantly more 4148Emacs and XEmacs and can sometimes make the result significantly more
4122efficient. Since byte code from recent versions of XEmacs won't 4149efficient. Since byte code from recent versions of XEmacs won't
4123generally run in Emacs and vice versa, this optimization doesn't lose 4150generally run in Emacs and vice versa, this optimization doesn't lose
4124you anything. 4151you anything.
@@ -4483,7 +4510,7 @@ back the match can start; this is a way to keep it from taking too long.
4483*** New function `macroexpand-all' expands all macros in a form. 4510*** New function `macroexpand-all' expands all macros in a form.
4484It is similar to the Common-Lisp function of the same name. 4511It is similar to the Common-Lisp function of the same name.
4485One difference is that it guarantees to return the original argument 4512One difference is that it guarantees to return the original argument
4486if no expansion is done, which may be tested using `eq'. 4513if no expansion is done, which can be tested using `eq'.
4487 4514
4488*** The new function `minibufferp' returns non-nil if its optional 4515*** The new function `minibufferp' returns non-nil if its optional
4489buffer argument is a minibuffer. If the argument is omitted, it 4516buffer argument is a minibuffer. If the argument is omitted, it
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3453149b6fd..d6c88be6b8c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,171 @@
12005-05-09 Juanma Barranquero <lekktu@gmail.com>
2
3 * obsolete/uncompress.el: Set `find-file-not-found-functions', not
4 `find-file-not-found-hooks'; use `add-hook'.
5 (uncompress-while-visiting): Set `write-file-functions', not
6 `write-file-hooks'; use `add-hook'.
7
82005-05-09 Kim F. Storm <storm@cua.dk>
9
10 * emulation/cua-base.el (cua-copy-region, cua-cut-region)
11 (cua-paste): Handle clipboard action.
12 (cua--init-keymaps): Remap clipboard-kill-region and
13 clipboard-kill-ring-save.
14
152005-05-08 Eli Zaretskii <eliz@gnu.org>
16
17 * emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name): Improve
18 commentary.
19
20 * simple.el (next-error-overlay-arrow-position): Revert the change
21 made on 2005-04-30.
22
232005-05-07 Jay Belanger <belanger@truman.edu>
24
25 * calc/calcsel2.el (calc-commute-left, calc-commute-right)
26 (calc-sel-unpack, calc-sel-isolate): Rename variable `reselect' to
27 `calc-sel-reselect'.
28
29 * calc/calc-mode.el (calc-save-modes): Reset the modes list if
30 Calc is in embedded mode.
31
322005-05-07 Eli Zaretskii <eliz@gnu.org>
33
34 * progmodes/compile.el (compilation-setup): Set
35 overlay-arrow-string to an empty string on text terminals.
36
37 * textmodes/ispell.el (ispell-program-name): Try looking for
38 "aspell" along exec-path, and if found, use it as the default
39 speller program.
40
412005-05-07 Jirka Kosek <jirka@kosek.cz> (tiny change)
42
43 * international/mule.el (sgml-xml-auto-coding-function): Recognize
44 encoding='FOO' in single quotes as well as in double quotes.
45
462005-05-07 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se>
47
48 * emacs-lisp/cl-macs.el (cl-transform-lambda): Recognize `declare'
49 as well as `interactive', so that defmacro* would recognize
50 `declare' forms.
51
522005-05-07 Eli Zaretskii <eliz@gnu.org>
53
54 * emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name): Explain
55 more about the LIGHTER arg's usage in the doc string. Add
56 commentary to clarify what the code does. Fix the regexp that
57 strips whitespace from LIGHTER. Quote LIGHTER before using it,
58 since it could have characters special to regular expressions.
59
602005-05-07 Matt Hodges <MPHodges@member.fsf.org> (tiny change)
61
62 * replace.el (occur-1): Bind inhibit-read-only so that
63 erase-buffer doesn't barf on read-only text properties (likewise
64 for add-text-properties in occur-engine). Mark buffer as
65 unmodified.
66 (occur-engine): Don't set buffer-read-only here.
67
682005-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
69
70 * pcvs.el (cvs-mode-commit, cvs-mode-edit-log): Don't fiddle with
71 list-buffers-directory. This caused the *cvs-commit* buffer to be
72 sometimes mistakenly reused as a *cvs* buffer.
73
742005-05-07 Nick Roberts <nickrob@snap.net.nz>
75
76 * tooltip.el: Move code for GUD tooltips into gud.el.
77 (require): CL no longer needed to compile case.
78 (tooltip-mode): Do not toggle functions for GUD tooltips.
79 (tooltip-gud-tips-p): Remove. Replace with minor mode
80 gud-tooltip-mode in gud.el.
81 (tooltip-gud-modes, tooltip-gud-display, tooltip-gud-echo-area)
82 (tooltip-gud-toggle-dereference): Rename in gud.el by replacing
83 tooltip-gud prefix with gud-tooltip and obsolete.
84 (tooltip-change-major-mode, tooltip-activate-mouse-motions-if-enabled)
85 (tooltip-mouse-motions-active, tooltip-activate-mouse-motions)
86 (tooltip-mouse-motion): Mouse movement functions/variable.
87 Rename in gud.el by adding gud prefix.
88 (tooltip-gud-original-filter, tooltip-gud-dereference)
89 (tooltip-gud-event, tooltip-toggle-gud-tips)
90 (tooltip-gud-process-output, tooltip-gud-print-command)
91 (tooltip-gud-tips): GUD tooltip functions/variables. Rename in
92 gud.el by replacing tooltip-gud prefix with gud-tooltip.
93 (gdb-tooltip-print): Move to gdb-ui.el.
94
95 * progmodes/gud.el: Move code for GUD tooltips from tooltip.el.
96 (require): CL needed to compile case.
97 (gud-tooltip-mode): Use to toggle GUD tooltips unstead of
98 tooltip-gud-tips-p. Make it a minor-mode.
99 (gud-find-file): Only prepare GUD tooltips if gud-tooltip-mode is t.
100 (gud-menu-map): GUD tooltips use gud-tooltip-mode now.
101 (gud-tooltip-modes, gud-tooltip-display, gud-tooltip-echo-area)
102 (gud-tooltip-change-major-mode)
103 (gud-tooltip-activate-mouse-motions-if-enabled)
104 (gud-tooltip-mouse-motions-active, gud-tooltip-activate-mouse-motions)
105 (gud-tooltip-mouse-motion, gud-tooltip-toggle-dereference)
106 (gud-tooltip-original-filter, gud-tooltip-dereference)
107 (gud-tooltip-event, tooltip-toggle-gud-tips)
108 (gud-tooltip-process-output, gud-tooltip-print-command)
109 (gud-tooltip-tips): Move from tooltip.el.
110
111 * progmodes/gdb-ui.el (gdb-tooltip-print): Move from tooltip.el.
112 (gdb-cpp-define-alist-flags): Doc fix.
113 (gdb-set-gud-minor-mode-1): Only prepare GUD tooltips if
114 gud-tooltip-mode is t.
115
1162005-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
117
118 * net/goto-addr.el (goto-address-fontify): Make sure the overlays
119 evaporate if their text is deleted.
120 (goto-address-at-point): Make it work as a mouse binding as well.
121 (goto-address-at-mouse): Obsolete it. Update users.
122
1232005-05-06 Glenn Morris <gmorris@ast.cam.ac.uk>
124
125 * calendar/appt.el (top-level): No longer activate on load.
126
1272005-05-06 Juanma Barranquero <lekktu@gmail.com>
128
129 * calendar/cal-bahai.el (mark-bahai-diary-entries):
130 * net/webjump.el (webjump):
131 * progmodes/idlw-help.el (idlwave-do-context-help1)
132 (idlwave-highlight-linked-completions):
133 * textmodes/po.el (po-find-file-coding-system-guts):
134 Replace `assoc-ignore-case' by `assoc-string'.
135
1362005-05-06 Eli Zaretskii <eliz@gnu.org>
137
138 * files.el (locate-file): Doc fix.
139
140 * progmodes/gdb-ui.el (gdb-cpp-define-alist-program): Doc fix.
141 Remove the redundant test for ms-dos.
142
143 * progmodes/cmacexp.el (c-macro-preprocessor): Use locate-file to
144 look for the preprocessor with exec-suffixes. If not found in
145 standard places, look in exec-path. Remove most of the tests that
146 used system-type.
147
148 * loadup.el: Load jka-cmpr-hook instead of jka-comp-hook.
149
150 * jka-compr.el (jka-compr-uninstall): Add autoload cookie.
151
152 * jka-cmpr-hook.el: Renamed from jka-comp-hook.el, to avoid
153 file-name clash with jka-compr.el on 8+3 filesystems.
154
1552005-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
156
157 * term/mac-win.el: Don't define or bind scroll bar functions if
158 x-toolkit-scroll-bars is t.
159 (x-select-text, x-get-selection-value):
160 Clear x-last-selected-text-clipboard if x-select-enable-clipboard is
161 nil.
162 (PRIMARY): Put mac-scrap-name property.
163 (mac-select-convert-to-file-url): New function.
164 (public.file-url): New selection target type. Add to
165 selection-converter-alist.
166 (x-get-selection, x-selection-value): Handle it.
167 (x-cut-buffer-or-selection-value): New alias.
168
12005-05-05 Luc Teirlinck <teirllm@auburn.edu> 1692005-05-05 Luc Teirlinck <teirllm@auburn.edu>
2 170
3 * emacs-lisp/byte-run.el (define-obsolete-function-alias) 171 * emacs-lisp/byte-run.el (define-obsolete-function-alias)
@@ -22,8 +190,8 @@
22 (ido-file-internal): Add with-no-warnings around ffap and dired code. 190 (ido-file-internal): Add with-no-warnings around ffap and dired code.
23 (ido-exit-minibuffer): Use exit-minibuffer instead of throw. 191 (ido-exit-minibuffer): Use exit-minibuffer instead of throw.
24 (ido-wide-find-file, ido-wide-find-dir): Catch quit to cancel find. 192 (ido-wide-find-file, ido-wide-find-dir): Catch quit to cancel find.
25 (ido-push-dir, ido-pop-dir, ido-wide-find-file-or-pop-dir): New 193 (ido-push-dir, ido-pop-dir, ido-wide-find-file-or-pop-dir):
26 functions for M-b/M-f to move among the directory components. 194 New functions for M-b/M-f to move among the directory components.
27 (ido-make-merged-file-list): Catch quit to cancel merge. 195 (ido-make-merged-file-list): Catch quit to cancel merge.
28 (ido-make-dir-list): Delete "." when ido-input-stack is non-empty. 196 (ido-make-dir-list): Delete "." when ido-input-stack is non-empty.
29 (ido-completion-help): No warnings for ido-completion-buffer-full. 197 (ido-completion-help): No warnings for ido-completion-buffer-full.
@@ -38,8 +206,8 @@
38 206
392005-05-05 Juanma Barranquero <lekktu@gmail.com> 2072005-05-05 Juanma Barranquero <lekktu@gmail.com>
40 208
41 * emacs-lisp/byte-run.el (define-obsolete-function-alias): Fix 209 * emacs-lisp/byte-run.el (define-obsolete-function-alias):
42 typo in docstring. 210 Fix typo in docstring.
43 211
44 * progmodes/ebrowse.el (ebrowse-install-1-to-9-keys) 212 * progmodes/ebrowse.el (ebrowse-install-1-to-9-keys)
45 (ebrowse-print-statistics-line) 213 (ebrowse-print-statistics-line)
@@ -55,12 +223,17 @@
55 223
56 * progmodes/gdb-ui.el (gdb-cpp-define-alist-flags): New variable. 224 * progmodes/gdb-ui.el (gdb-cpp-define-alist-flags): New variable.
57 (gdb-create-define-alist): Use it. 225 (gdb-create-define-alist): Use it.
58 (gdb-cpp-define-alist-program): Update for MS-DOS? 226 (gdb-cpp-define-alist-program): Update for MS-DOS.
59 227
602005-05-04 Nick Roberts <nickrob@snap.net.nz> 2282005-05-04 Nick Roberts <nickrob@snap.net.nz>
61 229
62 * progmodes/cmacexp.el (c-macro-preprocessor): Update for Mac OSX. 230 * progmodes/cmacexp.el (c-macro-preprocessor): Update for Mac OSX.
63 231
2322005-05-04 Richard M. Stallman <rms@gnu.org>
233
234 * simple.el (line-move-1): Fix previous change to signal errors
235 appropriately.
236
642005-05-03 Ulf Jasper <ulf.jasper@web.de> 2372005-05-03 Ulf Jasper <ulf.jasper@web.de>
65 238
66 * calendar/icalendar.el (icalendar-version): Now at 0.12. 239 * calendar/icalendar.el (icalendar-version): Now at 0.12.
@@ -218,10 +391,10 @@
218 391
219 * loadup.el: load jka-comp-hook. 392 * loadup.el: load jka-comp-hook.
220 393
221 * jka-compr.el: Many functions and vars moved to jka-compr-hook.el. 394 * jka-compr.el: Many functions and vars moved to jka-comp-hook.el.
222 (jka-compr-handler): Add autoload. `put' calls moved 395 (jka-compr-handler): Add autoload. `put' calls moved
223 to jka-compr-hook.el. 396 to jka-comp-hook.el.
224 (compression, jka-compr): defgroups moved to jka-compr-hook.el. 397 (compression, jka-compr): defgroups moved to jka-comp-hook.el.
225 (jka-compr-inhibit): Autoload. 398 (jka-compr-inhibit): Autoload.
226 399
227 * jka-comp-hook.el: New file. 400 * jka-comp-hook.el: New file.
@@ -2189,7 +2362,7 @@
2189 (menu-bar-showhide-menu): Use menu-bar-make-mm-toggle. 2362 (menu-bar-showhide-menu): Use menu-bar-make-mm-toggle.
2190 (menu-bar-make-mm-toggle): Simplify. 2363 (menu-bar-make-mm-toggle): Simplify.
2191 2364
21922005-03-22 JUAN-LEON Lahoz Garcia <juanleon1@gmail.com> 23652005-03-22 JUAN-LEON Lahoz Garcia <juanleon1@gmail.com>
2193 2366
2194 * progmodes/perl-mode.el (perl-font-lock-keywords-2): 2367 * progmodes/perl-mode.el (perl-font-lock-keywords-2):
2195 Accept qualified variable and function names. 2368 Accept qualified variable and function names.
@@ -2363,7 +2536,7 @@
2363 (recentf-cleanup): Use it to conditionally check availablity of 2536 (recentf-cleanup): Use it to conditionally check availablity of
2364 remote files. 2537 remote files.
2365 2538
23662005-03-19 Joe Edmonds <joe-bugs-debian-org@elem.com> (tiny change) 25392005-03-19 Joe Edmonds <joe-bugs-debian-org@elem.com> (tiny change)
2367 2540
2368 * emacs-lisp/lisp-mode.el (lisp-mode-variables): Recognize `@' in 2541 * emacs-lisp/lisp-mode.el (lisp-mode-variables): Recognize `@' in
2369 function names. 2542 function names.
@@ -3938,7 +4111,7 @@
3938 (bibtex-parse-field-name): Fix typos in docstrings. 4111 (bibtex-parse-field-name): Fix typos in docstrings.
3939 (bibtex-field-list, bibtex-find-crossref): Fix typos in error messages. 4112 (bibtex-field-list, bibtex-find-crossref): Fix typos in error messages.
3940 4113
39412005-01-24 Carsten Dominik <dominik@science.uva.nl> 41142005-01-24 Carsten Dominik <dominik@science.uva.nl>
3942 4115
3943 * textmodes/reftex-global.el (reftex-isearch-push-state-function) 4116 * textmodes/reftex-global.el (reftex-isearch-push-state-function)
3944 (reftex-isearch-pop-state-function, reftex-isearch-isearch-search) 4117 (reftex-isearch-pop-state-function, reftex-isearch-isearch-search)
@@ -5070,7 +5243,7 @@
5070 * ffap.el (ffap-string-at-point-mode-alist): Add "*" to url chars, 5243 * ffap.el (ffap-string-at-point-mode-alist): Add "*" to url chars,
5071 it can appear unencoded and has been seen from yahoo. 5244 it can appear unencoded and has been seen from yahoo.
5072 5245
50732004-12-27 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change) 52462004-12-27 Sergey Poznyakoff <gray@Mirddin.farlep.net> (tiny change)
5074 5247
5075 * mail/smtpmail.el (smtpmail-try-auth-methods): Send AUTH CRAM-MD5 5248 * mail/smtpmail.el (smtpmail-try-auth-methods): Send AUTH CRAM-MD5
5076 in upper case. Reported by Wojciech Polak <polak@gnu.org>. 5249 in upper case. Reported by Wojciech Polak <polak@gnu.org>.
@@ -6440,7 +6613,7 @@
6440 other frames. 6613 other frames.
6441 (gdb-reset): Remove dedicated property after debugging. 6614 (gdb-reset): Remove dedicated property after debugging.
6442 6615
64432004-11-24 Jay Belanger <belanger@truman.edu> 66162004-11-24 Jay Belanger <belanger@truman.edu>
6444 6617
6445 * calc/calc-sel.el: Add comment. 6618 * calc/calc-sel.el: Add comment.
6446 6619
@@ -7728,7 +7901,7 @@
7728 (gud-gdba-command-name, gdb-show-main, gdb-many-windows): 7901 (gud-gdba-command-name, gdb-show-main, gdb-many-windows):
7729 Add :version keyword. 7902 Add :version keyword.
7730 7903
77312004-11-02 Pavel Kobiakov <pk_at_work@yahoo.com> 79042004-11-02 Pavel Kobiakov <pk_at_work@yahoo.com>
7732 7905
7733 * progmodes/flymake.el (flymake-err-line-patterns): 7906 * progmodes/flymake.el (flymake-err-line-patterns):
7734 Use `flymake-reformat-err-line-patterns-from-compile-el' to convert 7907 Use `flymake-reformat-err-line-patterns-from-compile-el' to convert
@@ -8137,7 +8310,7 @@
8137 Handle periods and underscores in a function name. 8310 Handle periods and underscores in a function name.
8138 Remove the address fontification. 8311 Remove the address fontification.
8139 8312
81402004-10-24 Masatake YAMATO <jet@gyve.org> 83132004-10-24 Masatake YAMATO <jet@gyve.org>
8141 8314
8142 * progmodes/asm-mode.el (asm-font-lock-keywords): 8315 * progmodes/asm-mode.el (asm-font-lock-keywords):
8143 Use font-lock-variable-name-face for registers. 8316 Use font-lock-variable-name-face for registers.
@@ -8279,7 +8452,7 @@
8279 8452
8280 * paths.el (news-path): Fix previous change. 8453 * paths.el (news-path): Fix previous change.
8281 8454
82822004-10-18 Jay Belanger <belanger@truman.edu> 84552004-10-18 Jay Belanger <belanger@truman.edu>
8283 8456
8284 * calc/calc-help.el (calc-describe-bindings): 8457 * calc/calc-help.el (calc-describe-bindings):
8285 Set `buffer-read-only' to nil while working in the keybindings buffer; 8458 Set `buffer-read-only' to nil while working in the keybindings buffer;
@@ -9419,7 +9592,7 @@
9419 9592
9420 * terminal.el (te-escape): Show `?' in prompt for help key. 9593 * terminal.el (te-escape): Show `?' in prompt for help key.
9421 9594
94222004-09-04 Emilio C. Lopes <eclig@gmx.net> 95952004-09-04 Emilio C. Lopes <eclig@gmx.net>
9423 9596
9424 * emacs-lisp/lisp.el (kill-backward-up-list): New function. 9597 * emacs-lisp/lisp.el (kill-backward-up-list): New function.
9425 9598
@@ -9827,7 +10000,7 @@
9827 10000
9828 * imenu.el: Several doc fixes: don't say variables are buffer-local. 10001 * imenu.el: Several doc fixes: don't say variables are buffer-local.
9829 10002
98302004-08-16 Davis Herring <herring@lanl.gov> 100032004-08-16 Davis Herring <herring@lanl.gov>
9831 10004
9832 * isearch.el (isearch-string, isearch-message-string, isearch-point) 10005 * isearch.el (isearch-string, isearch-message-string, isearch-point)
9833 (isearch-success, isearch-forward-flag, isearch-other-end) 10006 (isearch-success, isearch-forward-flag, isearch-other-end)
diff --git a/lisp/calc/README b/lisp/calc/README
index a9e2813673c..a307b711f1e 100644
--- a/lisp/calc/README
+++ b/lisp/calc/README
@@ -2,7 +2,7 @@
2This directory contains Calc, an advanced desk calculator for GNU 2This directory contains Calc, an advanced desk calculator for GNU
3Emacs. 3Emacs.
4 4
5"Calc" Copyright 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 5"Calc" Copyright 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
6 6
7Written by: 7Written by:
8 Dave Gillespie 8 Dave Gillespie
@@ -52,20 +52,9 @@ From the introduction to the manual:
52 52
53 53
54Calc is written entirely in Emacs Lisp, for maximum portability. 54Calc is written entirely in Emacs Lisp, for maximum portability.
55You do not need to recompile Emacs to install and use Calc.
56
57You will need about six megabytes of disk space to install Calc
58and its Info documentation.
59
60See the file INSTALL for installation instructions. The instructions
61may seem long, but on typical systems you will only need to follow the
62steps shown in the first section.
63
64Don't even try to run Calc in uncompiled (.el) form! It's far too slow.
65
66 55
67I am anxious to hear about your experiences using Calc. Send mail to 56I am anxious to hear about your experiences using Calc. Send mail to
68"daveg@synaptics.com". A bug report is most useful if you include the 57"belanger@truman.edu". A bug report is most useful if you include the
69exact input and output that occurred, any modes in effect (such as the 58exact input and output that occurred, any modes in effect (such as the
70current precision), and so on. If you find Calc is difficult to operate 59current precision), and so on. If you find Calc is difficult to operate
71in any way, or if you have other suggestions, don't hesitate to let me 60in any way, or if you have other suggestions, don't hesitate to let me
@@ -73,21 +62,32 @@ know. If you find errors (including simple typos) in the manual, let
73me know. Even if you find no bugs at all I would love to hear your 62me know. Even if you find no bugs at all I would love to hear your
74opinions. 63opinions.
75 64
76The latest Calc tar files and patches are always available for anonymous
77FTP on prep.ai.mit.edu.
78 65
79Thanks,
80 66
81 -- Dave 67Summary of changes to "Calc"
68------- -- ------- -- ----
82 69
83 70
71Version 2.1:
84 72
73* Added new functions: sec, csc, cot, sech, csch, coth.
85 74
75* 0^0 now evaluates to 1.
86 76
87Summary of changes to "Calc" 77* Added a new language mode for LaTeX.
88------- -- ------- -- ---- 78
79* Calc now tries to use an appropriate language mode in embedded mode.
80
81* Calc now restores original modes when leaving embedded mode.
89 82
83* User settable variables which are not set with keystrokes are now
84 customizable.
90 85
86* Made ~/.calc.el the default Calc settings file.
87
88* Miscellaneous updates and bugfixes.
89
90
91Version 2.02f: 91Version 2.02f:
92 92
93 * Fixed a bug which broke `I', `H', `K' prefix keys in recent Emacs. 93 * Fixed a bug which broke `I', `H', `K' prefix keys in recent Emacs.
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index b722261907d..45d66231835 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -1,6 +1,6 @@
1;;; calc-alg.el --- algebraic functions for Calc 1;;; calc-alg.el --- algebraic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el
index d9acc2ebc52..bba7a8fe942 100644
--- a/lisp/calc/calc-arith.el
+++ b/lisp/calc/calc-arith.el
@@ -1,6 +1,6 @@
1;;; calc-arith.el --- arithmetic functions for Calc 1;;; calc-arith.el --- arithmetic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el
index adb8fcecce6..c7bf225fe7c 100644
--- a/lisp/calc/calc-comb.el
+++ b/lisp/calc/calc-comb.el
@@ -1,6 +1,6 @@
1;;; calc-comb.el --- combinatoric functions for Calc 1;;; calc-comb.el --- combinatoric functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index 4f45419c136..6b94cd0af0c 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -148,6 +148,15 @@
148 (setq calc-embedded-original-modes (cons lang modes))) 148 (setq calc-embedded-original-modes (cons lang modes)))
149 (setq calc-embedded-original-modes nil)))) 149 (setq calc-embedded-original-modes nil))))
150 150
151(defun calc-embedded-preserve-modes ()
152 "Preserve the current modes when leaving embedded mode."
153 (interactive)
154 (if calc-embedded-info
155 (progn
156 (calc-embedded-save-original-modes)
157 (message "Current modes will be preserved when leaving embedded mode."))
158 (message "Not in embedded mode.")))
159
151(defun calc-embedded-restore-original-modes () 160(defun calc-embedded-restore-original-modes ()
152 "Restore the original Calc modes when leaving embedded mode." 161 "Restore the original Calc modes when leaving embedded mode."
153 (let ((calcbuf (get-buffer "*Calculator*")) 162 (let ((calcbuf (get-buffer "*Calculator*"))
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index df9f9512aaa..5b23dabbbf5 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -378,6 +378,7 @@
378 (define-key calc-mode-map "m?" 'calc-m-prefix-help) 378 (define-key calc-mode-map "m?" 'calc-m-prefix-help)
379 (define-key calc-mode-map "ma" 'calc-algebraic-mode) 379 (define-key calc-mode-map "ma" 'calc-algebraic-mode)
380 (define-key calc-mode-map "md" 'calc-degrees-mode) 380 (define-key calc-mode-map "md" 'calc-degrees-mode)
381 (define-key calc-mode-map "me" 'calc-embedded-preserve-modes)
381 (define-key calc-mode-map "mf" 'calc-frac-mode) 382 (define-key calc-mode-map "mf" 'calc-frac-mode)
382 (define-key calc-mode-map "mg" 'calc-get-modes) 383 (define-key calc-mode-map "mg" 'calc-get-modes)
383 (define-key calc-mode-map "mh" 'calc-hms-mode) 384 (define-key calc-mode-map "mh" 'calc-hms-mode)
@@ -737,7 +738,8 @@ math-polar math-want-polar)
737 738
738 ("calc-embed" calc-do-embedded 739 ("calc-embed" calc-do-embedded
739calc-do-embedded-activate calc-embedded-evaluate-expr 740calc-do-embedded-activate calc-embedded-evaluate-expr
740calc-embedded-modes-change calc-embedded-var-change) 741calc-embedded-modes-change calc-embedded-var-change
742calc-embedded-preserve-modes)
741 743
742 ("calc-fin" calc-to-percentage calcFunc-ddb 744 ("calc-fin" calc-to-percentage calcFunc-ddb
743calcFunc-fv calcFunc-fvb calcFunc-fvl calcFunc-irr calcFunc-irrb 745calcFunc-fv calcFunc-fvb calcFunc-fvl calcFunc-irr calcFunc-irrb
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el
index 9510507e276..67cc5270942 100644
--- a/lisp/calc/calc-lang.el
+++ b/lisp/calc/calc-lang.el
@@ -1,6 +1,6 @@
1;;; calc-lang.el --- calc language functions 1;;; calc-lang.el --- calc language functions
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el
index ffb7644cdfe..bd939e1669c 100644
--- a/lisp/calc/calc-math.el
+++ b/lisp/calc/calc-math.el
@@ -1,6 +1,6 @@
1;;; calc-math.el --- mathematical functions for Calc 1;;; calc-math.el --- mathematical functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 8040d28d083..3b2f95d9be8 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -1,6 +1,6 @@
1;;; calc-misc.el --- miscellaenous functions for Calc 1;;; calc-misc.el --- miscellaenous functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index 389b52385b6..1c5bd29e804 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -304,7 +304,9 @@
304 vals (cdr vals)))) 304 vals (cdr vals))))
305 (run-hooks 'calc-mode-save-hook) 305 (run-hooks 'calc-mode-save-hook)
306 (insert ";;; End of mode settings\n") 306 (insert ";;; End of mode settings\n")
307 (save-buffer)))) 307 (save-buffer)
308 (if calc-embedded-info
309 (calc-embedded-save-original-modes)))))
308 310
309(defun calc-settings-file-name (name &optional arg) 311(defun calc-settings-file-name (name &optional arg)
310 (interactive 312 (interactive
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 95fdba2562c..e887e77030e 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -1,6 +1,6 @@
1;;; calc-poly.el --- polynomial functions for Calc 1;;; calc-poly.el --- polynomial functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el
index f5788fa6e84..c520c4d390c 100644
--- a/lisp/calc/calc-rewr.el
+++ b/lisp/calc/calc-rewr.el
@@ -1,6 +1,6 @@
1;;; calc-rewr.el --- rewriting functions for Calc 1;;; calc-rewr.el --- rewriting functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index 52f0cc0272d..f59cad99802 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -1,6 +1,6 @@
1;;; calc-store.el --- value storage functions for Calc 1;;; calc-store.el --- value storage functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el
index 8d2180c9c47..288ec70b00e 100644
--- a/lisp/calc/calc-stuff.el
+++ b/lisp/calc/calc-stuff.el
@@ -1,6 +1,6 @@
1;;; calc-stuff.el --- miscellaneous functions for Calc 1;;; calc-stuff.el --- miscellaneous functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el
index 2ae327b36bf..efe2e30ce71 100644
--- a/lisp/calc/calc-vec.el
+++ b/lisp/calc/calc-vec.el
@@ -1,6 +1,6 @@
1;;; calc-vec.el --- vector functions for Calc 1;;; calc-vec.el --- vector functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el
index d2459919fda..7e502aa1a87 100644
--- a/lisp/calc/calcalg2.el
+++ b/lisp/calc/calcalg2.el
@@ -1,6 +1,6 @@
1;;; calcalg2.el --- more algebraic functions for Calc 1;;; calcalg2.el --- more algebraic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el
index 90ceaea68db..bbba841c220 100644
--- a/lisp/calc/calcalg3.el
+++ b/lisp/calc/calcalg3.el
@@ -1,6 +1,6 @@
1;;; calcalg3.el --- more algebraic functions for Calc 1;;; calcalg3.el --- more algebraic functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el
index 305e155843e..70ceb01da64 100644
--- a/lisp/calc/calccomp.el
+++ b/lisp/calc/calccomp.el
@@ -1,6 +1,6 @@
1;;; calccomp.el --- composition functions for Calc 1;;; calccomp.el --- composition functions for Calc
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainer: Jay Belanger <belanger@truman.edu> 6;; Maintainer: Jay Belanger <belanger@truman.edu>
diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el
index 28944755a1b..20020f57468 100644
--- a/lisp/calc/calcsel2.el
+++ b/lisp/calc/calcsel2.el
@@ -34,6 +34,10 @@
34;; The variable calc-keep-selection is declared and set in calc-sel.el. 34;; The variable calc-keep-selection is declared and set in calc-sel.el.
35(defvar calc-keep-selection) 35(defvar calc-keep-selection)
36 36
37;; The variable calc-sel-reselect is local to the methods below,
38;; but is used by some functions in calc-sel.el which are called
39;; by the functions below.
40
37(defun calc-commute-left (arg) 41(defun calc-commute-left (arg)
38 (interactive "p") 42 (interactive "p")
39 (if (< arg 0) 43 (if (< arg 0)
@@ -41,7 +45,7 @@
41 (calc-wrapper 45 (calc-wrapper
42 (calc-preserve-point) 46 (calc-preserve-point)
43 (let ((num (max 1 (calc-locate-cursor-element (point)))) 47 (let ((num (max 1 (calc-locate-cursor-element (point))))
44 (reselect calc-keep-selection)) 48 (calc-sel-reselect calc-keep-selection))
45 (if (= arg 0) (setq arg nil)) 49 (if (= arg 0) (setq arg nil))
46 (while (or (null arg) (>= (setq arg (1- arg)) 0)) 50 (while (or (null arg) (>= (setq arg (1- arg)) 0))
47 (let* ((entry (calc-top num 'entry)) 51 (let* ((entry (calc-top num 'entry))
@@ -106,14 +110,14 @@
106 (if (null new) 110 (if (null new)
107 (if arg 111 (if arg
108 (error "Term is already leftmost") 112 (error "Term is already leftmost")
109 (or reselect 113 (or calc-sel-reselect
110 (calc-pop-push-list 1 (list expr) num '(nil))) 114 (calc-pop-push-list 1 (list expr) num '(nil)))
111 (setq arg 0)) 115 (setq arg 0))
112 (calc-pop-push-record-list 116 (calc-pop-push-record-list
113 1 "left" 117 1 "left"
114 (list (calc-replace-sub-formula expr parent new)) 118 (list (calc-replace-sub-formula expr parent new))
115 num 119 num
116 (list (and (or (not (eq arg 0)) reselect) 120 (list (and (or (not (eq arg 0)) calc-sel-reselect)
117 sel)))))))))) 121 sel))))))))))
118 122
119(defun calc-commute-right (arg) 123(defun calc-commute-right (arg)
@@ -123,7 +127,7 @@
123 (calc-wrapper 127 (calc-wrapper
124 (calc-preserve-point) 128 (calc-preserve-point)
125 (let ((num (max 1 (calc-locate-cursor-element (point)))) 129 (let ((num (max 1 (calc-locate-cursor-element (point))))
126 (reselect calc-keep-selection)) 130 (calc-sel-reselect calc-keep-selection))
127 (if (= arg 0) (setq arg nil)) 131 (if (= arg 0) (setq arg nil))
128 (while (or (null arg) (>= (setq arg (1- arg)) 0)) 132 (while (or (null arg) (>= (setq arg (1- arg)) 0))
129 (let* ((entry (calc-top num 'entry)) 133 (let* ((entry (calc-top num 'entry))
@@ -189,14 +193,14 @@
189 (if (null new) 193 (if (null new)
190 (if arg 194 (if arg
191 (error "Term is already rightmost") 195 (error "Term is already rightmost")
192 (or reselect 196 (or calc-sel-reselect
193 (calc-pop-push-list 1 (list expr) num '(nil))) 197 (calc-pop-push-list 1 (list expr) num '(nil)))
194 (setq arg 0)) 198 (setq arg 0))
195 (calc-pop-push-record-list 199 (calc-pop-push-record-list
196 1 "rght" 200 1 "rght"
197 (list (calc-replace-sub-formula expr parent new)) 201 (list (calc-replace-sub-formula expr parent new))
198 num 202 num
199 (list (and (or (not (eq arg 0)) reselect) 203 (list (and (or (not (eq arg 0)) calc-sel-reselect)
200 sel)))))))))) 204 sel))))))))))
201 205
202(defun calc-build-assoc-term (op lhs rhs) 206(defun calc-build-assoc-term (op lhs rhs)
@@ -225,7 +229,7 @@
225 (calc-wrapper 229 (calc-wrapper
226 (calc-preserve-point) 230 (calc-preserve-point)
227 (let* ((num (max 1 (calc-locate-cursor-element (point)))) 231 (let* ((num (max 1 (calc-locate-cursor-element (point))))
228 (reselect calc-keep-selection) 232 (calc-sel-reselect calc-keep-selection)
229 (entry (calc-top num 'entry)) 233 (entry (calc-top num 'entry))
230 (expr (car entry)) 234 (expr (car entry))
231 (sel (or (calc-auto-selection entry) expr))) 235 (sel (or (calc-auto-selection entry) expr)))
@@ -236,14 +240,14 @@
236 (list (calc-replace-sub-formula 240 (list (calc-replace-sub-formula
237 expr sel (nth 1 sel))) 241 expr sel (nth 1 sel)))
238 num 242 num
239 (list (and reselect (nth 1 sel))))))) 243 (list (and calc-sel-reselect (nth 1 sel)))))))
240 244
241(defun calc-sel-isolate () 245(defun calc-sel-isolate ()
242 (interactive) 246 (interactive)
243 (calc-slow-wrapper 247 (calc-slow-wrapper
244 (calc-preserve-point) 248 (calc-preserve-point)
245 (let* ((num (max 1 (calc-locate-cursor-element (point)))) 249 (let* ((num (max 1 (calc-locate-cursor-element (point))))
246 (reselect calc-keep-selection) 250 (calc-sel-reselect calc-keep-selection)
247 (entry (calc-top num 'entry)) 251 (entry (calc-top num 'entry))
248 (expr (car entry)) 252 (expr (car entry))
249 (sel (or (calc-auto-selection entry) (error "No selection"))) 253 (sel (or (calc-auto-selection entry) (error "No selection")))
@@ -266,7 +270,7 @@
266 (list (calc-replace-sub-formula 270 (list (calc-replace-sub-formula
267 expr eqn soln)) 271 expr eqn soln))
268 num 272 num
269 (list (and reselect sel))) 273 (list (and calc-sel-reselect sel)))
270 (calc-handle-whys)))) 274 (calc-handle-whys))))
271 275
272(defun calc-sel-commute (many) 276(defun calc-sel-commute (many)
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 8ace0be910b..d007e5b4546 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -688,10 +688,6 @@ ARG is positive, otherwise off."
688 (appt-check t)))) 688 (appt-check t))))
689 689
690 690
691;; This is needed for backwards compatibility. Feh.
692(appt-activate 1)
693
694
695(provide 'appt) 691(provide 'appt)
696 692
697;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347 693;;; arch-tag: bf5791c4-8921-499e-a26f-772b1788d347
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 4dfd8eb16e5..2bcfaf648ec 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -375,19 +375,21 @@ nongregorian-diary-marking-hook."
375 (string-to-int y-str))))) 375 (string-to-int y-str)))))
376 (if dd-name 376 (if dd-name
377 (mark-calendar-days-named 377 (mark-calendar-days-named
378 (cdr (assoc-ignore-case (substring dd-name 0 3) 378 (cdr (assoc-string (substring dd-name 0 3)
379 (calendar-make-alist 379 (calendar-make-alist
380 calendar-day-name-array 380 calendar-day-name-array
381 0 381 0
382 '(lambda (x) (substring x 0 3)))))) 382 '(lambda (x) (substring x 0 3)))
383 t)))
383 (if mm-name 384 (if mm-name
384 (if (string-equal mm-name "*") 385 (if (string-equal mm-name "*")
385 (setq mm 0) 386 (setq mm 0)
386 (setq mm 387 (setq mm
387 (cdr (assoc-ignore-case 388 (cdr (assoc-string
388 mm-name 389 mm-name
389 (calendar-make-alist 390 (calendar-make-alist
390 bahai-calendar-month-name-array)))))) 391 bahai-calendar-month-name-array)
392 t)))))
391 (mark-bahai-calendar-date-pattern mm dd yy))))) 393 (mark-bahai-calendar-date-pattern mm dd yy)))))
392 (setq d (cdr d))))) 394 (setq d (cdr d)))))
393 395
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 57a6c6a40a8..5eca356af59 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -4,6 +4,7 @@
4 4
5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
6;; Denis B. Roegel <Denis.Roegel@loria.fr> 6;; Denis B. Roegel <Denis.Roegel@loria.fr>
7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
7;; Keywords: calendar 8;; Keywords: calendar
8;; Human-Keywords: sunrise, sunset, equinox, solstice, calendar, diary, 9;; Human-Keywords: sunrise, sunset, equinox, solstice, calendar, diary,
9;; holidays 10;; holidays
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 4a46801763a..aae2fd9f3d8 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -233,7 +233,8 @@ ARGLIST allows full Common Lisp conventions."
233 (bind-defs nil) (bind-enquote nil) 233 (bind-defs nil) (bind-enquote nil)
234 (bind-inits nil) (bind-lets nil) (bind-forms nil) 234 (bind-inits nil) (bind-lets nil) (bind-forms nil)
235 (header nil) (simple-args nil)) 235 (header nil) (simple-args nil))
236 (while (or (stringp (car body)) (eq (car-safe (car body)) 'interactive)) 236 (while (or (stringp (car body))
237 (memq (car-safe (car body)) '(interactive declare)))
237 (push (pop body) header)) 238 (push (pop body) header))
238 (setq args (if (listp args) (copy-list args) (list '&rest args))) 239 (setq args (if (listp args) (copy-list args) (list '&rest args)))
239 (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p))))) 240 (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p)))))
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 831ffb2d576..a02f7be7d13 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -58,16 +58,31 @@
58 58
59(defun easy-mmode-pretty-mode-name (mode &optional lighter) 59(defun easy-mmode-pretty-mode-name (mode &optional lighter)
60 "Turn the symbol MODE into a string intended for the user. 60 "Turn the symbol MODE into a string intended for the user.
61If provided LIGHTER will be used to help choose capitalization." 61If provided, LIGHTER will be used to help choose capitalization by,
62replacing its case-insensitive matches with the literal string in LIGHTER."
62 (let* ((case-fold-search t) 63 (let* ((case-fold-search t)
64 ;; Produce "Foo-Bar minor mode" from foo-bar-minor-mode.
63 (name (concat (replace-regexp-in-string 65 (name (concat (replace-regexp-in-string
66 ;; If the original mode name included "-minor" (some
67 ;; of them don't, e.g. auto-revert-mode), then
68 ;; replace it with " minor".
64 "-Minor" " minor" 69 "-Minor" " minor"
70 ;; "foo-bar-minor" -> "Foo-Bar-Minor"
65 (capitalize (replace-regexp-in-string 71 (capitalize (replace-regexp-in-string
72 ;; "foo-bar-minor-mode" -> "foo-bar-minor"
66 "-mode\\'" "" (symbol-name mode)))) 73 "-mode\\'" "" (symbol-name mode))))
67 " mode"))) 74 " mode")))
68 (if (not (stringp lighter)) name 75 (if (not (stringp lighter)) name
69 (setq lighter (replace-regexp-in-string "\\`\\s-+\\|\\-s+\\'" "" lighter)) 76 ;; Strip leading and trailing whitespace from LIGHTER.
70 (replace-regexp-in-string lighter lighter name t t)))) 77 (setq lighter (replace-regexp-in-string "\\`\\s-+\\|\\s-+\\'" ""
78 lighter))
79 ;; Replace any (case-insensitive) matches for LIGHTER in NAME
80 ;; with a literal LIGHTER. E.g., if NAME is "Iimage mode" and
81 ;; LIGHTER is " iImag", then this will produce "iImage mode".
82 ;; (LIGHTER normally comes from the mode-line string passed to
83 ;; define-minor-mode, and normally includes at least one leading
84 ;; space.)
85 (replace-regexp-in-string (regexp-quote lighter) lighter name t t))))
71 86
72;;;###autoload 87;;;###autoload
73(defalias 'easy-mmode-define-minor-mode 'define-minor-mode) 88(defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 2a515bc95f7..e9679c66dd3 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -777,9 +777,13 @@ With numeric prefix arg, copy to register 0-9 instead."
777 (let ((start (mark)) (end (point))) 777 (let ((start (mark)) (end (point)))
778 (or (<= start end) 778 (or (<= start end)
779 (setq start (prog1 end (setq end start)))) 779 (setq start (prog1 end (setq end start))))
780 (if cua--register 780 (cond
781 (copy-to-register cua--register start end nil) 781 (cua--register
782 (copy-region-as-kill start end)) 782 (copy-to-register cua--register start end nil))
783 ((eq this-original-command 'clipboard-kill-ring-save)
784 (clipboard-kill-ring-save start end))
785 (t
786 (copy-region-as-kill start end)))
783 (if cua-keep-region-after-copy 787 (if cua-keep-region-after-copy
784 (cua--keep-active) 788 (cua--keep-active)
785 (cua--deactivate)))) 789 (cua--deactivate))))
@@ -795,9 +799,13 @@ With numeric prefix arg, copy to register 0-9 instead."
795 (let ((start (mark)) (end (point))) 799 (let ((start (mark)) (end (point)))
796 (or (<= start end) 800 (or (<= start end)
797 (setq start (prog1 end (setq end start)))) 801 (setq start (prog1 end (setq end start))))
798 (if cua--register 802 (cond
799 (copy-to-register cua--register start end t) 803 (cua--register
800 (kill-region start end))) 804 (copy-to-register cua--register start end t))
805 ((eq this-original-command 'clipboard-kill-region)
806 (clipboard-kill-region start end))
807 (t
808 (kill-region start end))))
801 (cua--deactivate))) 809 (cua--deactivate)))
802 810
803;;; Generic commands for regions, rectangles, and global marks 811;;; Generic commands for regions, rectangles, and global marks
@@ -864,6 +872,8 @@ If global mark is active, copy from register or one character."
864 (cua--insert-rectangle (cdr cua--last-killed-rectangle) 872 (cua--insert-rectangle (cdr cua--last-killed-rectangle)
865 nil paste-column paste-lines) 873 nil paste-column paste-lines)
866 (if arg (goto-char pt)))) 874 (if arg (goto-char pt))))
875 ((eq this-original-command 'clipboard-yank)
876 (clipboard-yank))
867 (t (yank arg))))))) 877 (t (yank arg)))))))
868 878
869(defun cua-paste-pop (arg) 879(defun cua-paste-pop (arg)
@@ -1282,9 +1292,11 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1282 (define-key cua--region-keymap [remap delete-char] 'cua-delete-region) 1292 (define-key cua--region-keymap [remap delete-char] 'cua-delete-region)
1283 ;; kill region 1293 ;; kill region
1284 (define-key cua--region-keymap [remap kill-region] 'cua-cut-region) 1294 (define-key cua--region-keymap [remap kill-region] 'cua-cut-region)
1295 (define-key cua--region-keymap [remap clipboard-kill-region] 'cua-cut-region)
1285 ;; copy region 1296 ;; copy region
1286 (define-key cua--region-keymap [remap copy-region-as-kill] 'cua-copy-region) 1297 (define-key cua--region-keymap [remap copy-region-as-kill] 'cua-copy-region)
1287 (define-key cua--region-keymap [remap kill-ring-save] 'cua-copy-region) 1298 (define-key cua--region-keymap [remap kill-ring-save] 'cua-copy-region)
1299 (define-key cua--region-keymap [remap clipboard-kill-ring-save] 'cua-copy-region)
1288 ;; cancel current region/rectangle 1300 ;; cancel current region/rectangle
1289 (define-key cua--region-keymap [remap keyboard-escape-quit] 'cua-cancel) 1301 (define-key cua--region-keymap [remap keyboard-escape-quit] 'cua-cancel)
1290 (define-key cua--region-keymap [remap keyboard-quit] 'cua-cancel) 1302 (define-key cua--region-keymap [remap keyboard-quit] 'cua-cancel)
diff --git a/lisp/files.el b/lisp/files.el
index d8aaaaf76fe..deda9dca2a7 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -632,8 +632,13 @@ The path separator is colon in GNU and GNU-like systems."
632 632
633(defun locate-file (filename path &optional suffixes predicate) 633(defun locate-file (filename path &optional suffixes predicate)
634 "Search for FILENAME through PATH. 634 "Search for FILENAME through PATH.
635If found, return the absolute file name of FILENAME, with its suffixes;
636otherwise return nil.
637PATH should be a list of directories to look in, like the lists in
638`exec-path' or `load-path'.
635If SUFFIXES is non-nil, it should be a list of suffixes to append to 639If SUFFIXES is non-nil, it should be a list of suffixes to append to
636file name when searching. If SUFFIXES is nil, it is equivalent to '(\"\"). 640file name when searching. If SUFFIXES is nil, it is equivalent to '(\"\").
641Use '(\"/\") to disable PATH search, but still try the suffixes in SUFFIXES.
637If non-nil, PREDICATE is used instead of `file-readable-p'. 642If non-nil, PREDICATE is used instead of `file-readable-p'.
638PREDICATE can also be an integer to pass to the `access' system call, 643PREDICATE can also be an integer to pass to the `access' system call,
639in which case file-name handlers are ignored. This usage is deprecated. 644in which case file-name handlers are ignored. This usage is deprecated.
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 1a3db49a667..94424dad302 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2188,9 +2188,9 @@ This function is intended to be added to `auto-coding-functions'."
2188 (when (re-search-forward "\\`[[:space:]\n]*<\\?xml" size t) 2188 (when (re-search-forward "\\`[[:space:]\n]*<\\?xml" size t)
2189 (let ((end (save-excursion 2189 (let ((end (save-excursion
2190 ;; This is a hack. 2190 ;; This is a hack.
2191 (re-search-forward "\"\\s-*\\?>" size t)))) 2191 (re-search-forward "[\"']\\s-*\\?>" size t))))
2192 (when end 2192 (when end
2193 (if (re-search-forward "encoding=\"\\(.+?\\)\"" end t) 2193 (if (re-search-forward "encoding=[\"']\\(.+?\\)[\"']" end t)
2194 (let* ((match (match-string 1)) 2194 (let* ((match (match-string 1))
2195 (sym (intern (downcase match)))) 2195 (sym (intern (downcase match))))
2196 (if (coding-system-p sym) 2196 (if (coding-system-p sym)
diff --git a/lisp/jka-comp-hook.el b/lisp/jka-cmpr-hook.el
index ead50b76343..79b47130baf 100644
--- a/lisp/jka-comp-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -1,4 +1,4 @@
1;;; jka-comp-hook.el --- preloaded code to enable jka-compr.el 1;;; jka-cmpr-hook.el --- preloaded code to enable jka-compr.el
2 2
3;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
@@ -287,7 +287,7 @@ Returns the new status of auto compression (non-nil means on)."
287;;; Turn on the mode. 287;;; Turn on the mode.
288(auto-compression-mode 1) 288(auto-compression-mode 1)
289 289
290(provide 'jka-comp-hook) 290(provide 'jka-cmpr-hook)
291 291
292;; arch-tag: 4bd73429-f400-45fe-a065-270a113e31a8 292;; arch-tag: 4bd73429-f400-45fe-a065-270a113e31a8
293;;; jka-comp-hook.el ends here \ No newline at end of file 293;;; jka-cmpr-hook.el ends here
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index ec2eab463cc..ca5e158349d 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -669,7 +669,7 @@ It is not recommended to set this variable permanently to anything but nil.")
669 (inhibit-file-name-operation operation)) 669 (inhibit-file-name-operation operation))
670 (apply operation args))) 670 (apply operation args)))
671 671
672 672;;;###autoload
673(defun jka-compr-uninstall () 673(defun jka-compr-uninstall ()
674 "Uninstall jka-compr. 674 "Uninstall jka-compr.
675This removes the entries in `file-name-handler-alist' and `auto-mode-alist' 675This removes the entries in `file-name-handler-alist' and `auto-mode-alist'
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 0963f5150ad..d5f97e49245 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -203,7 +203,7 @@
203(message "%s" (garbage-collect)) 203(message "%s" (garbage-collect))
204 204
205(load "vc-hooks") 205(load "vc-hooks")
206(load "jka-comp-hook") 206(load "jka-cmpr-hook")
207(load "ediff-hook") 207(load "ediff-hook")
208(if (fboundp 'x-show-tip) (load "tooltip")) 208(if (fboundp 'x-show-tip) (load "tooltip"))
209(message "%s" (garbage-collect)) 209(message "%s" (garbage-collect))
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 95a13b620a2..54d5854ca80 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -1,6 +1,6 @@
1;;; goto-addr.el --- click to browse URL or to send to e-mail address 1;;; goto-addr.el --- click to browse URL or to send to e-mail address
2 2
3;; Copyright (C) 1995, 2000, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1995, 2000, 2001, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Eric Ding <ericding@alum.mit.edu> 5;; Author: Eric Ding <ericding@alum.mit.edu>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -46,7 +46,7 @@
46;; 46;;
47;; (setq goto-address-highlight-keymap 47;; (setq goto-address-highlight-keymap
48;; (let ((m (make-sparse-keymap))) 48;; (let ((m (make-sparse-keymap)))
49;; (define-key m [S-mouse-2] 'goto-address-at-mouse) 49;; (define-key m [S-mouse-2] 'goto-address-at-point)
50;; m)) 50;; m))
51;; 51;;
52 52
@@ -118,9 +118,8 @@ A value of t means there is no limit--fontify regardless of the size."
118 118
119(defvar goto-address-highlight-keymap 119(defvar goto-address-highlight-keymap
120 (let ((m (make-sparse-keymap))) 120 (let ((m (make-sparse-keymap)))
121 (if (featurep 'xemacs) 121 (define-key m (if (featurep 'xemacs) (kbd "<button2>") (kbd "<mouse-2>"))
122 (define-key m (kbd "<button2>") 'goto-address-at-mouse) 122 'goto-address-at-point)
123 (define-key m (kbd "<mouse-2>") 'goto-address-at-mouse))
124 (define-key m (kbd "C-c RET") 'goto-address-at-point) 123 (define-key m (kbd "C-c RET") 'goto-address-at-point)
125 m) 124 m)
126 "keymap to hold goto-addr's mouse key defs under highlighted URLs.") 125 "keymap to hold goto-addr's mouse key defs under highlighted URLs.")
@@ -165,6 +164,7 @@ and `goto-address-fontify-p'."
165 (this-overlay (make-overlay s e))) 164 (this-overlay (make-overlay s e)))
166 (and goto-address-fontify-p 165 (and goto-address-fontify-p
167 (overlay-put this-overlay 'face goto-address-url-face)) 166 (overlay-put this-overlay 'face goto-address-url-face))
167 (overlay-put this-overlay 'evaporate t)
168 (overlay-put this-overlay 168 (overlay-put this-overlay
169 'mouse-face goto-address-url-mouse-face) 169 'mouse-face goto-address-url-mouse-face)
170 (overlay-put this-overlay 170 (overlay-put this-overlay
@@ -179,6 +179,7 @@ and `goto-address-fontify-p'."
179 (this-overlay (make-overlay s e))) 179 (this-overlay (make-overlay s e)))
180 (and goto-address-fontify-p 180 (and goto-address-fontify-p
181 (overlay-put this-overlay 'face goto-address-mail-face)) 181 (overlay-put this-overlay 'face goto-address-mail-face))
182 (overlay-put this-overlay 'evaporate t)
182 (overlay-put this-overlay 'mouse-face 183 (overlay-put this-overlay 'mouse-face
183 goto-address-mail-mouse-face) 184 goto-address-mail-mouse-face)
184 (overlay-put this-overlay 185 (overlay-put this-overlay
@@ -191,24 +192,18 @@ and `goto-address-fontify-p'."
191;; snarfed from browse-url.el 192;; snarfed from browse-url.el
192 193
193;;;###autoload 194;;;###autoload
194(defun goto-address-at-mouse (event) 195(define-obsolete-function-alias
195 "Send to the e-mail address or load the URL clicked with the mouse. 196 'goto-address-at-mouse 'goto-address-at-point "22.1")
196Send mail to address at position of mouse click. See documentation for
197`goto-address-find-address-at-point'. If no address is found
198there, then load the URL at or before the position of the mouse click."
199 (interactive "e")
200 (save-excursion
201 (mouse-set-point event)
202 (goto-address-at-point)))
203 197
204;;;###autoload 198;;;###autoload
205(defun goto-address-at-point () 199(defun goto-address-at-point (&optional event)
206 "Send to the e-mail address or load the URL at point. 200 "Send to the e-mail address or load the URL at point.
207Send mail to address at point. See documentation for 201Send mail to address at point. See documentation for
208`goto-address-find-address-at-point'. If no address is found 202`goto-address-find-address-at-point'. If no address is found
209there, then load the URL at or before point." 203there, then load the URL at or before point."
210 (interactive) 204 (interactive (list last-input-event))
211 (save-excursion 205 (save-excursion
206 (if event (mouse-set-point event))
212 (let ((address (save-excursion (goto-address-find-address-at-point)))) 207 (let ((address (save-excursion (goto-address-find-address-at-point))))
213 (if (and address 208 (if (and address
214 (save-excursion 209 (save-excursion
@@ -248,5 +243,5 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and
248 243
249(provide 'goto-addr) 244(provide 'goto-addr)
250 245
251;;; arch-tag: ca47c505-5661-425d-a471-62bc6e75cf0a 246;; arch-tag: ca47c505-5661-425d-a471-62bc6e75cf0a
252;;; goto-addr.el ends here 247;;; goto-addr.el ends here
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 3f004b8864e..0fc47fafa85 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -274,9 +274,9 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
274<nwv@acm.org>." 274<nwv@acm.org>."
275 (interactive) 275 (interactive)
276 (let* ((completion-ignore-case t) 276 (let* ((completion-ignore-case t)
277 (item (assoc-ignore-case 277 (item (assoc-string
278 (completing-read "WebJump to site: " webjump-sites nil t) 278 (completing-read "WebJump to site: " webjump-sites nil t)
279 webjump-sites)) 279 webjump-sites t))
280 (name (car item)) 280 (name (car item))
281 (expr (cdr item))) 281 (expr (cdr item)))
282 (browse-url (webjump-url-fix 282 (browse-url (webjump-url-fix
diff --git a/lisp/obsolete/uncompress.el b/lisp/obsolete/uncompress.el
index ac567be67b0..28ad5f06c7b 100644
--- a/lisp/obsolete/uncompress.el
+++ b/lisp/obsolete/uncompress.el
@@ -83,14 +83,10 @@ It then selects a major mode from the uncompressed file name and contents."
83 (goto-char (point-min)) 83 (goto-char (point-min))
84 (message "Uncompressing...done") 84 (message "Uncompressing...done")
85 (set-buffer-modified-p nil) 85 (set-buffer-modified-p nil)
86 (make-local-variable 'write-file-hooks) 86 (add-hook 'write-file-functions 'uncompress-backup-file nil t)
87 (or (memq 'uncompress-backup-file write-file-hooks)
88 (setq write-file-hooks (cons 'uncompress-backup-file write-file-hooks)))
89 (normal-mode)) 87 (normal-mode))
90 88
91(or (memq 'find-compressed-version find-file-not-found-hooks) 89(add-hook 'find-file-not-found-functions 'find-compressed-version)
92 (setq find-file-not-found-hooks
93 (cons 'find-compressed-version find-file-not-found-hooks)))
94 90
95(defun find-compressed-version () 91(defun find-compressed-version ()
96 "Hook to read and uncompress the compressed version of a file." 92 "Hook to read and uncompress the compressed version of a file."
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index 6382705139e..7c96a080c54 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -1438,12 +1438,10 @@ The POSTPROC specified there (typically `log-edit') is then called,
1438 ;; displayed in the wrong minibuffer). 1438 ;; displayed in the wrong minibuffer).
1439 (cvs-mode!) 1439 (cvs-mode!)
1440 (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup)) 1440 (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
1441 (lbd list-buffers-directory)
1442 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist))) 1441 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
1443 'log-edit))) 1442 'log-edit)))
1444 (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist buf) 1443 (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist buf)
1445 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap) 1444 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap)
1446 (set (make-local-variable 'list-buffers-directory) lbd)
1447 (run-hooks 'cvs-mode-commit-hook))) 1445 (run-hooks 'cvs-mode-commit-hook)))
1448 1446
1449(defun cvs-commit-minor-wrap (buf f) 1447(defun cvs-commit-minor-wrap (buf f)
@@ -1494,14 +1492,12 @@ This is best called from a `log-view-mode' buffer."
1494 ;; displayed in the wrong minibuffer). 1492 ;; displayed in the wrong minibuffer).
1495 (cvs-mode!) 1493 (cvs-mode!)
1496 (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup)) 1494 (let ((buf (cvs-temp-buffer "message" 'normal 'nosetup))
1497 (lbd list-buffers-directory)
1498 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist))) 1495 (setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
1499 'log-edit))) 1496 'log-edit)))
1500 (funcall setupfun 'cvs-do-edit-log nil 'cvs-edit-log-filelist buf) 1497 (funcall setupfun 'cvs-do-edit-log nil 'cvs-edit-log-filelist buf)
1501 (when text (erase-buffer) (insert text)) 1498 (when text (erase-buffer) (insert text))
1502 (set (make-local-variable 'cvs-edit-log-revision) rev) 1499 (set (make-local-variable 'cvs-edit-log-revision) rev)
1503 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-edit-log-minor-wrap) 1500 (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-edit-log-minor-wrap)
1504 (set (make-local-variable 'list-buffers-directory) lbd)
1505 ;; (run-hooks 'cvs-mode-commit-hook) 1501 ;; (run-hooks 'cvs-mode-commit-hook)
1506 )) 1502 ))
1507 1503
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index 28d988961a6..65eea658d4e 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -108,18 +108,23 @@
108 :group 'c-macro) 108 :group 'c-macro)
109 109
110(defcustom c-macro-preprocessor 110(defcustom c-macro-preprocessor
111 ;; Cannot rely on standard directory on MS-DOS to find CPP. In 111 (cond ;; Solaris has it in an unusual place.
112 ;; fact, cannot rely on having cpp.exe, either, in latest GCC
113 ;; versions.
114 (cond ((eq system-type 'ms-dos) "gcc -E -C -o - -")
115 ;; Solaris has it in an unusual place.
116 ((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)" 112 ((and (string-match "^[^-]*-[^-]*-\\(solaris\\|sunos5\\)"
117 system-configuration) 113 system-configuration)
118 (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) 114 (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp"))
119 "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") 115 "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E")
120 ((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C") 116 ((locate-file "/usr/ccs/lib/cpp"
121 ((memq system-type '(darwin berkeley-unix)) "gcc -E -C -") 117 '("/") exec-suffixes 'file-executable-p)
122 (t "/lib/cpp -C")) 118 "/usr/ccs/lib/cpp -C")
119 ((locate-file "/lib/cpp"
120 '("/") exec-suffixes 'file-executable-p)
121 "/lib/cpp -C")
122 ;; On some systems, we cannot rely on standard directories to
123 ;; find CPP. In fact, we cannot rely on having cpp, either,
124 ;; in some GCC versions.
125 ((locate-file "cpp" exec-path exec-suffixes 'file-executable-p)
126 "cpp -C")
127 (t "gcc -E -C -o - -"))
123 "The preprocessor used by the cmacexp package. 128 "The preprocessor used by the cmacexp package.
124 129
125If you change this, be sure to preserve the `-C' (don't strip comments) 130If you change this, be sure to preserve the `-C' (don't strip comments)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 0cc70386be8..f5180b1fb48 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1247,7 +1247,8 @@ Optional argument MINOR indicates this is called from
1247 (make-local-variable 'compilation-messages-start) 1247 (make-local-variable 'compilation-messages-start)
1248 (make-local-variable 'compilation-error-screen-columns) 1248 (make-local-variable 'compilation-error-screen-columns)
1249 (make-local-variable 'overlay-arrow-position) 1249 (make-local-variable 'overlay-arrow-position)
1250 (set (make-local-variable 'overlay-arrow-string) "=>") 1250 (set (make-local-variable 'overlay-arrow-string)
1251 (if (display-graphic-p) "=>" ""))
1251 (setq next-error-overlay-arrow-position nil) 1252 (setq next-error-overlay-arrow-position nil)
1252 (add-hook 'kill-buffer-hook 1253 (add-hook 'kill-buffer-hook
1253 (lambda () (setq next-error-overlay-arrow-position nil)) nil t) 1254 (lambda () (setq next-error-overlay-arrow-position nil)) nil t)
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 56344a67e5c..c4298ffb99b 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -196,19 +196,20 @@ detailed description of this mode.
196 :group 'gud 196 :group 'gud
197 :version "22.1") 197 :version "22.1")
198 198
199(defcustom gdb-cpp-define-alist-program 199(defcustom gdb-cpp-define-alist-program "gcc -E -dM -"
200 (cond ((eq system-type 'ms-dos) "gcc -E -dM -o - -") 200 "Shell command for generating a list of defined macros in a source file.
201 (t "gcc -E -dM -"))
202 "The program name for generating an alist of #define directives.
203This list is used to display the #define directive associated 201This list is used to display the #define directive associated
204with an identifier as a tooltip. It works in a debug session with 202with an identifier as a tooltip. It works in a debug session with
205GDB, when tooltip-gud-tips-p is t." 203GDB, when gud-tooltip-mode is t.
204
205Set `gdb-cpp-define-alist-flags' for any include paths or
206predefined macros."
206 :type 'string 207 :type 'string
207 :group 'gud 208 :group 'gud
208 :version "22.1") 209 :version "22.1")
209 210
210(defcustom gdb-cpp-define-alist-flags "" 211(defcustom gdb-cpp-define-alist-flags ""
211 "*Preprocessor flags used by `gdb-create-define-alist'." 212 "*Preprocessor flags for `gdb-cpp-define-alist-program'."
212 :type 'string 213 :type 'string
213 :group 'gud 214 :group 'gud
214 :version "22.1") 215 :version "22.1")
@@ -233,6 +234,14 @@ GDB, when tooltip-gud-tips-p is t."
233 (setq name (nth 1 (split-string define "[( ]"))) 234 (setq name (nth 1 (split-string define "[( ]")))
234 (push (cons name define) gdb-define-alist)))) 235 (push (cons name define) gdb-define-alist))))
235 236
237(defun gdb-tooltip-print ()
238 (tooltip-show
239 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
240 (let ((string (buffer-string)))
241 ;; remove newline for gud-tooltip-echo-area
242 (substring string 0 (- (length string) 1))))
243 gud-tooltip-echo-area))
244
236(defun gdb-set-gud-minor-mode (buffer) 245(defun gdb-set-gud-minor-mode (buffer)
237 "Set gud-minor-mode from find-file if appropriate." 246 "Set gud-minor-mode from find-file if appropriate."
238 (goto-char (point-min)) 247 (goto-char (point-min))
@@ -252,9 +261,10 @@ GDB, when tooltip-gud-tips-p is t."
252 (with-current-buffer buffer 261 (with-current-buffer buffer
253 (set (make-local-variable 'gud-minor-mode) 'gdba) 262 (set (make-local-variable 'gud-minor-mode) 'gdba)
254 (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) 263 (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
255 (make-local-variable 'gdb-define-alist) 264 (when gud-tooltip-mode
256 (gdb-create-define-alist) 265 (make-local-variable 'gdb-define-alist)
257 (add-hook 'after-save-hook 'gdb-create-define-alist nil t)))) 266 (gdb-create-define-alist)
267 (add-hook 'after-save-hook 'gdb-create-define-alist nil t)))))
258 268
259(defun gdb-set-gud-minor-mode-existing-buffers () 269(defun gdb-set-gud-minor-mode-existing-buffers ()
260 (dolist (buffer (buffer-list)) 270 (dolist (buffer (buffer-list))
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 4f5ffe0d23b..195875842a3 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -1,4 +1,4 @@
1;;; grep.el --- run compiler as inferior of Emacs, parse error messages 1;;; grep.el --- run Grep as inferior of Emacs, parse match messages
2 2
3;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4;; 2001, 2002, 2004, 2005 Free Software Foundation, Inc. 4;; 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index e98cb9eee58..544a4804639 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -39,6 +39,8 @@
39 39
40;;; Code: 40;;; Code:
41 41
42(eval-when-compile (require 'cl)) ; for case macro
43
42(require 'comint) 44(require 'comint)
43(require 'etags) 45(require 'etags)
44 46
@@ -113,11 +115,11 @@ Used to grey out relevant togolbar icons.")
113 115
114(easy-mmode-defmap gud-menu-map 116(easy-mmode-defmap gud-menu-map
115 '(([help] "Info" . gud-goto-info) 117 '(([help] "Info" . gud-goto-info)
116 ([tooltips] menu-item "Toggle GUD tooltips" tooltip-toggle-gud-tips 118 ([tooltips] menu-item "Toggle GUD tooltips" gud-tooltip-mode
117 :enable (and (not emacs-basic-display) 119 :enable (and (not emacs-basic-display)
118 (display-graphic-p) 120 (display-graphic-p)
119 (fboundp 'x-show-tip)) 121 (fboundp 'x-show-tip))
120 :button (:toggle . tooltip-gud-tips-p)) 122 :button (:toggle . gud-tooltip-mode))
121 ([refresh] "Refresh" . gud-refresh) 123 ([refresh] "Refresh" . gud-refresh)
122 ([run] menu-item "Run" gud-run 124 ([run] menu-item "Run" gud-run
123 :enable (and (not gud-running) 125 :enable (and (not gud-running)
@@ -228,7 +230,8 @@ Uses `gud-<MINOR-MODE>-directories' to find the source files."
228 (with-current-buffer buf 230 (with-current-buffer buf
229 (set (make-local-variable 'gud-minor-mode) minor-mode) 231 (set (make-local-variable 'gud-minor-mode) minor-mode)
230 (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) 232 (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
231 (when (memq gud-minor-mode '(gdbmi gdba)) 233 (when (and gud-tooltip-mode
234 (memq gud-minor-mode '(gdbmi gdba)))
232 (make-local-variable 'gdb-define-alist) 235 (make-local-variable 'gdb-define-alist)
233 (unless gdb-define-alist (gdb-create-define-alist)) 236 (unless gdb-define-alist (gdb-create-define-alist))
234 (add-hook 'after-save-hook 'gdb-create-define-alist nil t)) 237 (add-hook 'after-save-hook 'gdb-create-define-alist nil t))
@@ -3100,6 +3103,204 @@ Treats actions as defuns."
3100 (font-lock-syntactic-face-function 3103 (font-lock-syntactic-face-function
3101 . gdb-script-font-lock-syntactic-face)))) 3104 . gdb-script-font-lock-syntactic-face))))
3102 3105
3106
3107;;; tooltips for GUD
3108
3109;;; Customizable settings
3110(defcustom gud-tooltip-modes '(gud-mode c-mode c++-mode fortran-mode)
3111 "List of modes for which to enable GUD tips."
3112 :type 'sexp
3113 :tag "GUD modes"
3114 :group 'tooltip)
3115
3116(defcustom gud-tooltip-display
3117 '((eq (tooltip-event-buffer gud-tooltip-event)
3118 (marker-buffer gud-overlay-arrow-position)))
3119 "List of forms determining where GUD tooltips are displayed.
3120
3121Forms in the list are combined with AND. The default is to display
3122only tooltips in the buffer containing the overlay arrow."
3123 :type 'sexp
3124 :tag "GUD buffers predicate"
3125 :group 'tooltip)
3126
3127(defcustom gud-tooltip-echo-area nil
3128 "Use the echo area instead of frames for GUD tooltips."
3129 :type 'boolean
3130 :tag "Use echo area"
3131 :group 'tooltip)
3132
3133(define-obsolete-variable-alias 'tooltip-gud-modes
3134 'gud-tooltip-modes "22.1")
3135(define-obsolete-variable-alias 'tooltip-gud-display
3136 'gud-tooltip-display "22.1")
3137(define-obsolete-variable-alias 'tooltip-use-echo-area
3138 'gud-tooltip-echo-area "22.1")
3139
3140;;; Reacting on mouse movements
3141
3142(defun gud-tooltip-change-major-mode ()
3143 "Function added to `change-major-mode-hook' when tooltip mode is on."
3144 (add-hook 'post-command-hook 'gud-tooltip-activate-mouse-motions-if-enabled))
3145
3146(defun gud-tooltip-activate-mouse-motions-if-enabled ()
3147 "Reconsider for all buffers whether mouse motion events are desired."
3148 (remove-hook 'post-command-hook
3149 'gud-tooltip-activate-mouse-motions-if-enabled)
3150 (dolist (buffer (buffer-list))
3151 (save-excursion
3152 (set-buffer buffer)
3153 (if (and gud-tooltip-mode
3154 (memq major-mode gud-tooltip-modes))
3155 (gud-tooltip-activate-mouse-motions t)
3156 (gud-tooltip-activate-mouse-motions nil)))))
3157
3158(defvar gud-tooltip-mouse-motions-active nil
3159 "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
3160
3161(defun gud-tooltip-activate-mouse-motions (activatep)
3162 "Activate/deactivate mouse motion events for the current buffer.
3163ACTIVATEP non-nil means activate mouse motion events."
3164 (if activatep
3165 (progn
3166 (make-local-variable 'gud-tooltip-mouse-motions-active)
3167 (setq gud-tooltip-mouse-motions-active t)
3168 (make-local-variable 'track-mouse)
3169 (setq track-mouse t))
3170 (when gud-tooltip-mouse-motions-active
3171 (kill-local-variable 'gud-tooltip-mouse-motions-active)
3172 (kill-local-variable 'track-mouse))))
3173
3174(defun gud-tooltip-mouse-motion (event)
3175 "Command handler for mouse movement events in `global-map'."
3176 (interactive "e")
3177 (tooltip-hide)
3178 (when (car (mouse-pixel-position))
3179 (setq tooltip-last-mouse-motion-event (copy-sequence event))
3180 (tooltip-start-delayed-tip)))
3181
3182;;; Tips for `gud'
3183
3184(defvar gud-tooltip-original-filter nil
3185 "Process filter to restore after GUD output has been received.")
3186
3187(defvar gud-tooltip-dereference nil
3188 "Non-nil means print expressions with a `*' in front of them.
3189For C this would dereference a pointer expression.")
3190
3191(defvar gud-tooltip-event nil
3192 "The mouse movement event that led to a tooltip display.
3193This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3194
3195(defun gud-tooltip-toggle-dereference ()
3196 "Toggle whether tooltips should show `* expr' or `expr'."
3197 (interactive)
3198 (setq gud-tooltip-dereference (not gud-tooltip-dereference))
3199 (when (interactive-p)
3200 (message "Dereferencing is now %s."
3201 (if gud-tooltip-dereference "on" "off"))))
3202
3203(define-obsolete-function-alias 'tooltip-gud-toggle-dereference
3204 'gud-tooltip-toggle-dereference "22.1")
3205
3206(define-minor-mode gud-tooltip-mode
3207 "Toggle the display of GUD tooltips."
3208 :global t
3209 :group 'gud
3210 (if gud-tooltip-mode
3211 (progn
3212 (add-hook 'change-major-mode-hook 'gud-tooltip-change-major-mode)
3213 (add-hook 'pre-command-hook 'tooltip-hide)
3214 (add-hook 'tooltip-hook 'gud-tooltip-tips)
3215 (define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion))
3216 (unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide)
3217 (remove-hook 'change-major-mode-hook 'tooltip-change-major-mode)
3218 (remove-hook 'tooltip-hook 'gud-tooltip-tips)
3219 (define-key global-map [mouse-movement] 'ignore)))
3220 (gud-tooltip-activate-mouse-motions-if-enabled)
3221 (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
3222 (if gud-tooltip-mode
3223 (progn
3224 (dolist (buffer (buffer-list))
3225 (unless (eq buffer gud-comint-buffer)
3226 (with-current-buffer buffer
3227 (when (and (memq gud-minor-mode '(gdbmi gdba))
3228 (not (string-match "\\`\\*.+\\*\\'"
3229 (buffer-name))))
3230 (make-local-variable 'gdb-define-alist)
3231 (gdb-create-define-alist)
3232 (add-hook 'after-save-hook
3233 'gdb-create-define-alist nil t))))))
3234 (kill-local-variable 'gdb-define-alist)
3235 (remove-hook 'after-save-hook 'gdb-create-define-alist t))))
3236
3237; This will only display data that comes in one chunk.
3238; Larger arrays (say 400 elements) are displayed in
3239; the tootip incompletely and spill over into the gud buffer.
3240; Switching the process-filter creates timing problems and
3241; it may be difficult to do better. Using annotations as in
3242; gdb-ui.el gets round this problem.
3243(defun gud-tooltip-process-output (process output)
3244 "Process debugger output and show it in a tooltip window."
3245 (set-process-filter process gud-tooltip-original-filter)
3246 (tooltip-show (tooltip-strip-prompt process output)
3247 gud-tooltip-echo-area))
3248
3249(defun gud-tooltip-print-command (expr)
3250 "Return a suitable command to print the expression EXPR.
3251If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR."
3252 (when gud-tooltip-dereference
3253 (setq expr (concat "*" expr)))
3254 (case gud-minor-mode
3255 ((gdb gdba) (concat "server print " expr))
3256 (dbx (concat "print " expr))
3257 (xdb (concat "p " expr))
3258 (sdb (concat expr "/"))
3259 (perldb expr)))
3260
3261(defun gud-tooltip-tips (event)
3262 "Show tip for identifier or selection under the mouse.
3263The mouse must either point at an identifier or inside a selected
3264region for the tip window to be shown. If gud-tooltip-dereference is t,
3265add a `*' in front of the printed expression. In the case of a C program
3266controlled by GDB, show the associated #define directives when program is
3267not executing.
3268
3269This function must return nil if it doesn't handle EVENT."
3270 (let (process)
3271 (when (and (eventp event)
3272 gud-tooltip-mode
3273 (boundp 'gud-comint-buffer)
3274 gud-comint-buffer
3275 (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
3276 (setq process (get-buffer-process gud-comint-buffer))
3277 (posn-point (event-end event))
3278 (or (and (eq gud-minor-mode 'gdba) (not gdb-active-process))
3279 (progn (setq gud-tooltip-event event)
3280 (eval (cons 'and gud-tooltip-display)))))
3281 (let ((expr (tooltip-expr-to-print event)))
3282 (when expr
3283 (if (and (eq gud-minor-mode 'gdba)
3284 (not gdb-active-process))
3285 (progn
3286 (with-current-buffer
3287 (window-buffer (let ((mouse (mouse-position)))
3288 (window-at (cadr mouse)
3289 (cddr mouse))))
3290 (let ((define-elt (assoc expr gdb-define-alist)))
3291 (unless (null define-elt)
3292 (tooltip-show (cdr define-elt))
3293 expr))))
3294 (let ((cmd (gud-tooltip-print-command expr)))
3295 (unless (null cmd) ; CMD can be nil if unknown debugger
3296 (if (eq gud-minor-mode 'gdba)
3297 (gdb-enqueue-input
3298 (list (concat cmd "\n") 'gdb-tooltip-print))
3299 (setq gud-tooltip-original-filter (process-filter process))
3300 (set-process-filter process 'gud-tooltip-process-output)
3301 (gud-basic-call cmd))
3302 expr))))))))
3303
3103(provide 'gud) 3304(provide 'gud)
3104 3305
3105;;; arch-tag: 6d990948-df65-461a-be39-1c7fb83ac4c4 3306;;; arch-tag: 6d990948-df65-461a-be39-1c7fb83ac4c4
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el
index e3da5508342..8696e1a7d63 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/progmodes/idlw-help.el
@@ -36,7 +36,7 @@
36;; information, at: 36;; information, at:
37;; 37;;
38;; http://idlwave.org 38;; http://idlwave.org
39;; 39;;
40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
41 41
42 42
@@ -52,10 +52,10 @@
52 :group 'idlwave-online-help 52 :group 'idlwave-online-help
53 :type 'boolean) 53 :type 'boolean)
54 54
55(defvar idlwave-html-link-sep 55(defvar idlwave-html-link-sep
56 (if idlwave-html-help-pre-v6 "#" "#wp")) 56 (if idlwave-html-help-pre-v6 "#" "#wp"))
57 57
58(defcustom idlwave-html-help-location 58(defcustom idlwave-html-help-location
59 (if (memq system-type '(ms-dos windows-nt)) 59 (if (memq system-type '(ms-dos windows-nt))
60 nil 60 nil
61 "/usr/local/etc/") 61 "/usr/local/etc/")
@@ -83,7 +83,7 @@ Defaults to `browse-url-browser-function', which see."
83 :group 'idlwave-online-help 83 :group 'idlwave-online-help
84 :type 'string) 84 :type 'string)
85 85
86(defcustom idlwave-help-browser-generic-args 86(defcustom idlwave-help-browser-generic-args
87 (if (boundp 'browse-url-generic-args) 87 (if (boundp 'browse-url-generic-args)
88 browse-url-generic-args "") 88 browse-url-generic-args "")
89 "Program args to use if using browse-url-generic-program." 89 "Program args to use if using browse-url-generic-program."
@@ -191,7 +191,7 @@ support."
191 191
192(defvar idlwave-help-activate-links-aggressively nil 192(defvar idlwave-help-activate-links-aggressively nil
193 "Obsolete variable.") 193 "Obsolete variable.")
194 194
195(defvar idlwave-completion-help-info) 195(defvar idlwave-completion-help-info)
196 196
197(defvar idlwave-help-frame nil 197(defvar idlwave-help-frame nil
@@ -314,7 +314,7 @@ It collects and prints the diagnostics messages."
314 (setq idlwave-last-context-help-pos marker) 314 (setq idlwave-last-context-help-pos marker)
315 (idlwave-do-context-help1 arg) 315 (idlwave-do-context-help1 arg)
316 (if idlwave-help-diagnostics 316 (if idlwave-help-diagnostics
317 (message "%s" (mapconcat 'identity 317 (message "%s" (mapconcat 'identity
318 (nreverse idlwave-help-diagnostics) 318 (nreverse idlwave-help-diagnostics)
319 "; ")))))) 319 "; "))))))
320 320
@@ -323,7 +323,7 @@ It collects and prints the diagnostics messages."
323(defun idlwave-do-context-help1 (&optional arg) 323(defun idlwave-do-context-help1 (&optional arg)
324 "The work-horse version of `idlwave-context-help', which see." 324 "The work-horse version of `idlwave-context-help', which see."
325 (save-excursion 325 (save-excursion
326 (if (equal (char-after) ?/) 326 (if (equal (char-after) ?/)
327 (forward-char 1) 327 (forward-char 1)
328 (if (equal (char-before) ?=) 328 (if (equal (char-before) ?=)
329 (backward-char 1))) 329 (backward-char 1)))
@@ -333,7 +333,7 @@ It collects and prints the diagnostics messages."
333 (beg (save-excursion (skip-chars-backward chars) (point))) 333 (beg (save-excursion (skip-chars-backward chars) (point)))
334 (end (save-excursion (skip-chars-forward chars) (point))) 334 (end (save-excursion (skip-chars-forward chars) (point)))
335 (this-word (buffer-substring-no-properties beg end)) 335 (this-word (buffer-substring-no-properties beg end))
336 (st-ass (assoc (downcase this-word) 336 (st-ass (assoc (downcase this-word)
337 idlwave-help-special-topic-words)) 337 idlwave-help-special-topic-words))
338 (classtag (and (string-match "self\\." this-word) 338 (classtag (and (string-match "self\\." this-word)
339 (< beg (- end 4)))) 339 (< beg (- end 4))))
@@ -341,7 +341,7 @@ It collects and prints the diagnostics messages."
341 (string-match "\\`\\([^.]+\\)\\." this-word) 341 (string-match "\\`\\([^.]+\\)\\." this-word)
342 (< beg (- end 4)))) 342 (< beg (- end 4))))
343 module keyword cw mod1 mod2 mod3) 343 module keyword cw mod1 mod2 mod3)
344 (if (or arg 344 (if (or arg
345 (and (not st-ass) 345 (and (not st-ass)
346 (not classtag) 346 (not classtag)
347 (not structtag) 347 (not structtag)
@@ -360,15 +360,15 @@ It collects and prints the diagnostics messages."
360 (setq module (list "init" 'fun (match-string 1 str)) 360 (setq module (list "init" 'fun (match-string 1 str))
361 idlwave-current-obj_new-class (match-string 1 str)) 361 idlwave-current-obj_new-class (match-string 1 str))
362 ))))) 362 )))))
363 (cond 363 (cond
364 (arg (setq mod1 module)) 364 (arg (setq mod1 module))
365 365
366 ;; A special topic -- only system help 366 ;; A special topic -- only system help
367 (st-ass (setq mod1 (list (cdr st-ass)))) 367 (st-ass (setq mod1 (list (cdr st-ass))))
368 368
369 ;; A system variable -- only system help 369 ;; A system variable -- only system help
370 ((string-match 370 ((string-match
371 "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?" 371 "\\`!\\([a-zA-Z0-9_]+\\)\\(\.\\([A-Za-z0-9_]+\\)\\)?"
372 this-word) 372 this-word)
373 (let* ((word (match-string-no-properties 1 this-word)) 373 (let* ((word (match-string-no-properties 1 this-word))
374 (entry (assq (idlwave-sintern-sysvar word) 374 (entry (assq (idlwave-sintern-sysvar word)
@@ -380,18 +380,19 @@ It collects and prints the diagnostics messages."
380 (cdr (assq 'tags entry)))))) 380 (cdr (assq 'tags entry))))))
381 (link (nth 1 (assq 'link entry)))) 381 (link (nth 1 (assq 'link entry))))
382 (if tag-target 382 (if tag-target
383 (setq link (idlwave-substitute-link-target link 383 (setq link (idlwave-substitute-link-target link
384 tag-target))) 384 tag-target)))
385 (setq mod1 (list link)))) 385 (setq mod1 (list link))))
386 386
387 ;; An executive command -- only system help 387 ;; An executive command -- only system help
388 ((string-match "^\\.\\([A-Z_]+\\)" this-word) 388 ((string-match "^\\.\\([A-Z_]+\\)" this-word)
389 (let* ((word (match-string 1 this-word)) 389 (let* ((word (match-string 1 this-word))
390 (link (cdr (assoc-ignore-case 390 (link (cdr (assoc-string
391 word 391 word
392 idlwave-executive-commands-alist)))) 392 idlwave-executive-commands-alist
393 t))))
393 (setq mod1 (list link)))) 394 (setq mod1 (list link))))
394 395
395 ;; A class -- system OR in-text help (via class__define). 396 ;; A class -- system OR in-text help (via class__define).
396 ((and (eq cw 'class) 397 ((and (eq cw 'class)
397 (or (idlwave-in-quote) ; e.g. obj_new 398 (or (idlwave-in-quote) ; e.g. obj_new
@@ -405,28 +406,28 @@ It collects and prints the diagnostics messages."
405 (name (concat (downcase this-word) "__define")) 406 (name (concat (downcase this-word) "__define"))
406 (link (nth 1 (assq 'link entry)))) 407 (link (nth 1 (assq 'link entry))))
407 (setq mod1 (list link name 'pro)))) 408 (setq mod1 (list link name 'pro))))
408 409
409 ;; A class structure tag (self.BLAH) -- only in-text help available 410 ;; A class structure tag (self.BLAH) -- only in-text help available
410 (classtag 411 (classtag
411 (let ((tag (substring this-word (match-end 0))) 412 (let ((tag (substring this-word (match-end 0)))
412 class-with found-in) 413 class-with found-in)
413 (when (setq class-with 414 (when (setq class-with
414 (idlwave-class-or-superclass-with-tag 415 (idlwave-class-or-superclass-with-tag
415 (nth 2 (idlwave-current-routine)) 416 (nth 2 (idlwave-current-routine))
416 tag)) 417 tag))
417 (setq found-in (idlwave-class-found-in class-with)) 418 (setq found-in (idlwave-class-found-in class-with))
418 (if (assq (idlwave-sintern-class class-with) 419 (if (assq (idlwave-sintern-class class-with)
419 idlwave-system-class-info) 420 idlwave-system-class-info)
420 (error "No help available for system class tags")) 421 (error "No help available for system class tags"))
421 (setq idlwave-help-do-class-struct-tag t) 422 (setq idlwave-help-do-class-struct-tag t)
422 (setq mod1 (list nil 423 (setq mod1 (list nil
423 (if found-in 424 (if found-in
424 (cons (concat found-in "__define") class-with) 425 (cons (concat found-in "__define") class-with)
425 (concat class-with "__define")) 426 (concat class-with "__define"))
426 'pro 427 'pro
427 nil ; no class.... it's a procedure! 428 nil ; no class.... it's a procedure!
428 tag))))) 429 tag)))))
429 430
430 ;; A regular structure tag -- only in text, and if 431 ;; A regular structure tag -- only in text, and if
431 ;; optional `complete-structtag' loaded. 432 ;; optional `complete-structtag' loaded.
432 (structtag 433 (structtag
@@ -437,7 +438,7 @@ It collects and prints the diagnostics messages."
437 (setq idlwave-help-do-struct-tag 438 (setq idlwave-help-do-struct-tag
438 idlwave-structtag-struct-location 439 idlwave-structtag-struct-location
439 mod1 (list nil nil nil nil tag)))) 440 mod1 (list nil nil nil nil tag))))
440 441
441 ;; A routine keyword -- in text or system help 442 ;; A routine keyword -- in text or system help
442 ((and (memq cw '(function-keyword procedure-keyword)) 443 ((and (memq cw '(function-keyword procedure-keyword))
443 (stringp this-word) 444 (stringp this-word)
@@ -479,7 +480,7 @@ It collects and prints the diagnostics messages."
479 (setq mod1 (append (list t) module (list keyword)) 480 (setq mod1 (append (list t) module (list keyword))
480 mod2 (list t this-word 'fun nil) 481 mod2 (list t this-word 'fun nil)
481 mod3 (append (list t) module))))) 482 mod3 (append (list t) module)))))
482 483
483 ;; Everything else 484 ;; Everything else
484 (t 485 (t
485 (setq mod1 (append (list t) module)))) 486 (setq mod1 (append (list t) module))))
@@ -512,14 +513,14 @@ Needs additional info stored in global `idlwave-completion-help-info'."
512 word link) 513 word link)
513 (mouse-set-point ev) 514 (mouse-set-point ev)
514 515
515 516
516 ;; See if we can also find help somewhere, e.g. for multiple classes 517 ;; See if we can also find help somewhere, e.g. for multiple classes
517 (setq word (idlwave-this-word)) 518 (setq word (idlwave-this-word))
518 (if (string= word "") 519 (if (string= word "")
519 (error "No help item selected")) 520 (error "No help item selected"))
520 (setq link (get-text-property 0 'link word)) 521 (setq link (get-text-property 0 'link word))
521 (select-window cw) 522 (select-window cw)
522 (cond 523 (cond
523 ;; Routine name 524 ;; Routine name
524 ((memq what '(procedure function routine)) 525 ((memq what '(procedure function routine))
525 (setq name word) 526 (setq name word)
@@ -530,9 +531,9 @@ Needs additional info stored in global `idlwave-completion-help-info'."
530 type))) 531 type)))
531 (setq link t) ; No specific link valid yet 532 (setq link t) ; No specific link valid yet
532 (if sclasses 533 (if sclasses
533 (setq classes (idlwave-members-only 534 (setq classes (idlwave-members-only
534 classes (cons class sclasses)))) 535 classes (cons class sclasses))))
535 (setq class (idlwave-popup-select ev classes 536 (setq class (idlwave-popup-select ev classes
536 "Select Class" 'sort)))) 537 "Select Class" 'sort))))
537 538
538 ;; XXX is this necessary, given all-method-classes? 539 ;; XXX is this necessary, given all-method-classes?
@@ -552,7 +553,7 @@ Needs additional info stored in global `idlwave-completion-help-info'."
552 type))) 553 type)))
553 (setq link t) ; Link can't be correct yet 554 (setq link t) ; Link can't be correct yet
554 (if sclasses 555 (if sclasses
555 (setq classes (idlwave-members-only 556 (setq classes (idlwave-members-only
556 classes (cons class sclasses)))) 557 classes (cons class sclasses))))
557 (setq class (idlwave-popup-select ev classes 558 (setq class (idlwave-popup-select ev classes
558 "Select Class" 'sort)) 559 "Select Class" 'sort))
@@ -564,14 +565,14 @@ Needs additional info stored in global `idlwave-completion-help-info'."
564 (if (string= (downcase name) "obj_new") 565 (if (string= (downcase name) "obj_new")
565 (setq class idlwave-current-obj_new-class 566 (setq class idlwave-current-obj_new-class
566 name "Init")))) 567 name "Init"))))
567 568
568 ;; Class name 569 ;; Class name
569 ((eq what 'class) 570 ((eq what 'class)
570 (setq class word 571 (setq class word
571 word nil)) 572 word nil))
572 573
573 ;; A special named function to call which sets some of our variables 574 ;; A special named function to call which sets some of our variables
574 ((and (symbolp what) 575 ((and (symbolp what)
575 (fboundp what)) 576 (fboundp what))
576 (funcall what 'set word)) 577 (funcall what 'set word))
577 578
@@ -586,7 +587,7 @@ Needs additional info stored in global `idlwave-completion-help-info'."
586 "Highlight all completions for which help is available and attach link. 587 "Highlight all completions for which help is available and attach link.
587Those words in `idlwave-completion-help-links' have links. The 588Those words in `idlwave-completion-help-links' have links. The
588`idlwave-help-link-face' face is used for this." 589`idlwave-help-link-face' face is used for this."
589 (if idlwave-highlight-help-links-in-completion 590 (if idlwave-highlight-help-links-in-completion
590 (with-current-buffer (get-buffer "*Completions*") 591 (with-current-buffer (get-buffer "*Completions*")
591 (save-excursion 592 (save-excursion
592 (let* ((case-fold-search t) 593 (let* ((case-fold-search t)
@@ -602,13 +603,13 @@ Those words in `idlwave-completion-help-links' have links. The
602 (setq beg (match-beginning 1) end (match-end 1) 603 (setq beg (match-beginning 1) end (match-end 1)
603 word (match-string 1) doit nil) 604 word (match-string 1) doit nil)
604 ;; Call special completion function test 605 ;; Call special completion function test
605 (if (and (symbolp what) 606 (if (and (symbolp what)
606 (fboundp what)) 607 (fboundp what))
607 (setq doit (funcall what 'test word)) 608 (setq doit (funcall what 'test word))
608 ;; Look for special link property passed in help-links 609 ;; Look for special link property passed in help-links
609 (if idlwave-completion-help-links 610 (if idlwave-completion-help-links
610 (setq doit (assoc-ignore-case 611 (setq doit (assoc-string
611 word idlwave-completion-help-links)))) 612 word idlwave-completion-help-links t))))
612 (when doit 613 (when doit
613 (if (consp doit) 614 (if (consp doit)
614 (setq props (append props `(link ,(cdr doit))))) 615 (setq props (append props `(link ,(cdr doit)))))
@@ -633,13 +634,13 @@ Those words in `idlwave-completion-help-links' have links. The
633 ;; Try to select the return frame. 634 ;; Try to select the return frame.
634 ;; This can crash on slow network connections, obviously when 635 ;; This can crash on slow network connections, obviously when
635 ;; we kill the help frame before the return-frame is selected. 636 ;; we kill the help frame before the return-frame is selected.
636 ;; To protect the workings, we wait for up to one second 637 ;; To protect the workings, we wait for up to one second
637 ;; and check if the return-frame *is* now selected. 638 ;; and check if the return-frame *is* now selected.
638 ;; This is marked "eperimental" since we are not sure when its OK. 639 ;; This is marked "eperimental" since we are not sure when its OK.
639 (let ((maxtime 1.0) (time 0.) (step 0.1)) 640 (let ((maxtime 1.0) (time 0.) (step 0.1))
640 (select-frame idlwave-help-return-frame) 641 (select-frame idlwave-help-return-frame)
641 (while (and (sit-for step) 642 (while (and (sit-for step)
642 (not (eq (selected-frame) 643 (not (eq (selected-frame)
643 idlwave-help-return-frame)) 644 idlwave-help-return-frame))
644 (< (setq time (+ time step)) maxtime))))) 645 (< (setq time (+ time step)) maxtime)))))
645 (delete-frame idlwave-help-frame)) 646 (delete-frame idlwave-help-frame))
@@ -652,7 +653,7 @@ Those words in `idlwave-completion-help-links' have links. The
652(defvar default-toolbar-visible-p) 653(defvar default-toolbar-visible-p)
653 654
654(defun idlwave-help-display-help-window (&optional pos-or-func) 655(defun idlwave-help-display-help-window (&optional pos-or-func)
655 "Display the help window. 656 "Display the help window.
656Move window start to POS-OR-FUNC, if passed as a position, or call it 657Move window start to POS-OR-FUNC, if passed as a position, or call it
657if passed as a function. See `idlwave-help-use-dedicated-frame'." 658if passed as a function. See `idlwave-help-use-dedicated-frame'."
658 (let ((cw (selected-window)) 659 (let ((cw (selected-window))
@@ -663,13 +664,13 @@ if passed as a function. See `idlwave-help-use-dedicated-frame'."
663 (switch-to-buffer buf)) 664 (switch-to-buffer buf))
664 ;; Do it in this frame and save the window configuration 665 ;; Do it in this frame and save the window configuration
665 (if (not (get-buffer-window buf nil)) 666 (if (not (get-buffer-window buf nil))
666 (setq idlwave-help-window-configuration 667 (setq idlwave-help-window-configuration
667 (current-window-configuration))) 668 (current-window-configuration)))
668 (display-buffer buf nil (selected-frame)) 669 (display-buffer buf nil (selected-frame))
669 (select-window (get-buffer-window buf))) 670 (select-window (get-buffer-window buf)))
670 (raise-frame) 671 (raise-frame)
671 (if pos-or-func 672 (if pos-or-func
672 (if (functionp pos-or-func) 673 (if (functionp pos-or-func)
673 (funcall pos-or-func) 674 (funcall pos-or-func)
674 (goto-char pos-or-func) 675 (goto-char pos-or-func)
675 (recenter 0))) 676 (recenter 0)))
@@ -691,31 +692,31 @@ if passed as a function. See `idlwave-help-use-dedicated-frame'."
691 (select-frame idlwave-help-return-frame))) 692 (select-frame idlwave-help-return-frame)))
692 693
693(defun idlwave-online-help (link &optional name type class keyword) 694(defun idlwave-online-help (link &optional name type class keyword)
694 "Display HTML or other special help on a certain topic. 695 "Display HTML or other special help on a certain topic.
695Either loads an HTML link, if LINK is non-nil, or gets special-help on 696Either loads an HTML link, if LINK is non-nil, or gets special-help on
696the optional arguments, if any special help is defined. If LINK is 697the optional arguments, if any special help is defined. If LINK is
697`t', first look up the optional arguments in the routine info list to 698`t', first look up the optional arguments in the routine info list to
698see if a link is set for it. Try extra help functions if necessary." 699see if a link is set for it. Try extra help functions if necessary."
699 ;; Lookup link 700 ;; Lookup link
700 (if (eq link t) 701 (if (eq link t)
701 (let ((entry (idlwave-best-rinfo-assoc name type class 702 (let ((entry (idlwave-best-rinfo-assoc name type class
702 (idlwave-routines) nil t))) 703 (idlwave-routines) nil t)))
703 (cond 704 (cond
704 ;; Try keyword link 705 ;; Try keyword link
705 ((and keyword 706 ((and keyword
706 (setq link (cdr (idlwave-entry-find-keyword entry keyword))))) 707 (setq link (cdr (idlwave-entry-find-keyword entry keyword)))))
707 ;; Default, regular entry link 708 ;; Default, regular entry link
708 (t (setq link (idlwave-entry-has-help entry)))))) 709 (t (setq link (idlwave-entry-has-help entry))))))
709 710
710 (cond 711 (cond
711 ;; An explicit link 712 ;; An explicit link
712 ((stringp link) 713 ((stringp link)
713 (idlwave-help-html-link link)) 714 (idlwave-help-html-link link))
714 715
715 ;; Any extra help 716 ;; Any extra help
716 (idlwave-extra-help-function 717 (idlwave-extra-help-function
717 (idlwave-help-get-special-help name type class keyword)) 718 (idlwave-help-get-special-help name type class keyword))
718 719
719 ;; Nothing worked 720 ;; Nothing worked
720 (t (idlwave-help-error name type class keyword)))) 721 (t (idlwave-help-error name type class keyword))))
721 722
@@ -726,7 +727,7 @@ see if a link is set for it. Try extra help functions if necessary."
726 (help-pos (save-excursion 727 (help-pos (save-excursion
727 (set-buffer (idlwave-help-get-help-buffer)) 728 (set-buffer (idlwave-help-get-help-buffer))
728 (let ((buffer-read-only nil)) 729 (let ((buffer-read-only nil))
729 (funcall idlwave-extra-help-function 730 (funcall idlwave-extra-help-function
730 name type class keyword))))) 731 name type class keyword)))))
731 (if help-pos 732 (if help-pos
732 (idlwave-help-display-help-window help-pos) 733 (idlwave-help-display-help-window help-pos)
@@ -740,7 +741,7 @@ see if a link is set for it. Try extra help functions if necessary."
740 (browse-url-generic-program idlwave-help-browser-generic-program) 741 (browse-url-generic-program idlwave-help-browser-generic-program)
741 ;(browse-url-generic-args idlwave-help-browser-generic-args) 742 ;(browse-url-generic-args idlwave-help-browser-generic-args)
742 full-link) 743 full-link)
743 744
744 (if (and (memq system-type '(ms-dos windows-nt)) 745 (if (and (memq system-type '(ms-dos windows-nt))
745 idlwave-help-use-hh) 746 idlwave-help-use-hh)
746 (progn 747 (progn
@@ -755,12 +756,12 @@ see if a link is set for it. Try extra help functions if necessary."
755 ;; Just a regular file name (+ anchor name) 756 ;; Just a regular file name (+ anchor name)
756 (unless (and (stringp help-loc) 757 (unless (and (stringp help-loc)
757 (file-directory-p help-loc)) 758 (file-directory-p help-loc))
758 (error 759 (error
759 "Invalid help location; customize `idlwave-html-help-location'.")) 760 "Invalid help location; customize `idlwave-html-help-location'."))
760 (setq full-link (concat 761 (setq full-link (concat
761 "file://" 762 "file://"
762 (expand-file-name 763 (expand-file-name
763 link 764 link
764 (expand-file-name "idl_html_help" help-loc))))) 765 (expand-file-name "idl_html_help" help-loc)))))
765 766
766 ;; Check for a local browser 767 ;; Check for a local browser
@@ -796,7 +797,7 @@ This function can be used as `idlwave-extra-help-function'."
796 (if class-only ;Help with class? Using "Init" as source. 797 (if class-only ;Help with class? Using "Init" as source.
797 (setq name "Init" 798 (setq name "Init"
798 type 'fun)) 799 type 'fun))
799 (if (not struct-tag) 800 (if (not struct-tag)
800 (setq file 801 (setq file
801 (idlwave-routine-source-file 802 (idlwave-routine-source-file
802 (nth 3 (idlwave-best-rinfo-assoc 803 (nth 3 (idlwave-best-rinfo-assoc
@@ -809,7 +810,7 @@ This function can be used as `idlwave-extra-help-function'."
809 (if (or struct-tag (stringp file)) 810 (if (or struct-tag (stringp file))
810 (progn 811 (progn
811 (setq in-buf ; structure-tag completion is always in current buffer 812 (setq in-buf ; structure-tag completion is always in current buffer
812 (if struct-tag 813 (if struct-tag
813 idlwave-current-tags-buffer 814 idlwave-current-tags-buffer
814 (idlwave-get-buffer-visiting file))) 815 (idlwave-get-buffer-visiting file)))
815 ;; see if file is in a visited buffer, insert those contents 816 ;; see if file is in a visited buffer, insert those contents
@@ -831,19 +832,19 @@ This function can be used as `idlwave-extra-help-function'."
831 ;; Try to find a good place to display 832 ;; Try to find a good place to display
832 (setq def-pos 833 (setq def-pos
833 ;; Find the class structure tag if that's what we're after 834 ;; Find the class structure tag if that's what we're after
834 (cond 835 (cond
835 ;; Class structure tags: find the class or named structure 836 ;; Class structure tags: find the class or named structure
836 ;; definition 837 ;; definition
837 (class-struct-tag 838 (class-struct-tag
838 (save-excursion 839 (save-excursion
839 (setq class 840 (setq class
840 (if (string-match "[a-zA-Z0-9]\\(__\\)" name) 841 (if (string-match "[a-zA-Z0-9]\\(__\\)" name)
841 (substring name 0 (match-beginning 1)) 842 (substring name 0 (match-beginning 1))
842 idlwave-current-tags-class)) 843 idlwave-current-tags-class))
843 (and 844 (and
844 (idlwave-find-class-definition class nil real-class) 845 (idlwave-find-class-definition class nil real-class)
845 (idlwave-find-struct-tag keyword)))) 846 (idlwave-find-struct-tag keyword))))
846 847
847 ;; Generic structure tags: the structure definition 848 ;; Generic structure tags: the structure definition
848 ;; location within the file has been recorded in 849 ;; location within the file has been recorded in
849 ;; `struct-tag' 850 ;; `struct-tag'
@@ -853,14 +854,14 @@ This function can be used as `idlwave-extra-help-function'."
853 (integerp struct-tag) 854 (integerp struct-tag)
854 (goto-char struct-tag) 855 (goto-char struct-tag)
855 (idlwave-find-struct-tag keyword)))) 856 (idlwave-find-struct-tag keyword))))
856 857
857 ;; Just find the routine definition 858 ;; Just find the routine definition
858 (t 859 (t
859 (if class-only (point-min) 860 (if class-only (point-min)
860 (idlwave-help-find-routine-definition name type class keyword)))) 861 (idlwave-help-find-routine-definition name type class keyword))))
861 idlwave-help-def-pos def-pos) 862 idlwave-help-def-pos def-pos)
862 863
863 (if (and idlwave-help-source-try-header 864 (if (and idlwave-help-source-try-header
864 (not (or struct-tag class-struct-tag))) 865 (not (or struct-tag class-struct-tag)))
865 ;; Check if we can find the header 866 ;; Check if we can find the header
866 (save-excursion 867 (save-excursion
@@ -870,7 +871,7 @@ This function can be used as `idlwave-extra-help-function'."
870 idlwave-help-in-header header-pos))) 871 idlwave-help-in-header header-pos)))
871 872
872 (if (or header-pos def-pos) 873 (if (or header-pos def-pos)
873 (progn 874 (progn
874 (if (boundp 'idlwave-help-min-frame-width) 875 (if (boundp 'idlwave-help-min-frame-width)
875 (setq idlwave-help-min-frame-width 80)) 876 (setq idlwave-help-min-frame-width 80))
876 (goto-char (or header-pos def-pos))) 877 (goto-char (or header-pos def-pos)))
@@ -884,7 +885,7 @@ This function can be used as `idlwave-extra-help-function'."
884KEYWORD is ignored. Returns the point of match if successful, nil otherwise." 885KEYWORD is ignored. Returns the point of match if successful, nil otherwise."
885 (save-excursion 886 (save-excursion
886 (goto-char (point-max)) 887 (goto-char (point-max))
887 (if (re-search-backward 888 (if (re-search-backward
888 (concat "^[ \t]*" 889 (concat "^[ \t]*"
889 (if (eq type 'pro) "pro" 890 (if (eq type 'pro) "pro"
890 (if (eq type 'fun) "function" 891 (if (eq type 'fun) "function"
@@ -930,22 +931,22 @@ with spaces allowed between the keyword and the following dash or equal sign.
930If there is a match, we assume it is the keyword description." 931If there is a match, we assume it is the keyword description."
931 (let* ((case-fold-search t) 932 (let* ((case-fold-search t)
932 (rname (if (stringp class) 933 (rname (if (stringp class)
933 (concat 934 (concat
934 "\\(" 935 "\\("
935 ;; Traditional name or class::name 936 ;; Traditional name or class::name
936 "\\(" 937 "\\("
937 "\\(" (regexp-quote (downcase class)) "::\\)?" 938 "\\(" (regexp-quote (downcase class)) "::\\)?"
938 (regexp-quote (downcase name)) 939 (regexp-quote (downcase name))
939 "\\>\\)" 940 "\\>\\)"
940 (concat 941 (concat
941 "\\|" 942 "\\|"
942 ;; class__define or just class 943 ;; class__define or just class
943 (regexp-quote (downcase class)) "\\(__define\\)?") 944 (regexp-quote (downcase class)) "\\(__define\\)?")
944 "\\)") 945 "\\)")
945 (regexp-quote (downcase name)))) 946 (regexp-quote (downcase name))))
946 947
947 ;; NAME tag plus the routine name. The new version is from JD. 948 ;; NAME tag plus the routine name. The new version is from JD.
948 (name-re (concat 949 (name-re (concat
949 "\\(^;+\\*?[ \t]*" 950 "\\(^;+\\*?[ \t]*"
950 idlwave-help-doclib-name 951 idlwave-help-doclib-name
951 "\\([ \t]*:\\|[ \t]*$\\)[ \t]*\\(\n;+[ \t]*\\)*" 952 "\\([ \t]*:\\|[ \t]*$\\)[ \t]*\\(\n;+[ \t]*\\)*"
@@ -980,7 +981,7 @@ If there is a match, we assume it is the keyword description."
980 (regexp-quote (upcase keyword)) 981 (regexp-quote (upcase keyword))
981 "\\>"))) 982 "\\>")))
982 dstart dend name-pos kwds-pos kwd-pos) 983 dstart dend name-pos kwds-pos kwd-pos)
983 (catch 'exit 984 (catch 'exit
984 (save-excursion 985 (save-excursion
985 (goto-char (point-min)) 986 (goto-char (point-min))
986 (while (and (setq dstart (re-search-forward idlwave-doclib-start nil t)) 987 (while (and (setq dstart (re-search-forward idlwave-doclib-start nil t))
@@ -988,7 +989,7 @@ If there is a match, we assume it is the keyword description."
988 ;; found a routine header 989 ;; found a routine header
989 (goto-char dstart) 990 (goto-char dstart)
990 (if (setq name-pos (re-search-forward name-re dend t)) 991 (if (setq name-pos (re-search-forward name-re dend t))
991 (progn 992 (progn
992 (if keyword 993 (if keyword
993 ;; We do need a keyword 994 ;; We do need a keyword
994 (progn 995 (progn
@@ -1070,7 +1071,7 @@ When DING is non-nil, ring the bell as well."
1070 (idlwave-help-find-first-header nil) 1071 (idlwave-help-find-first-header nil)
1071 (setq idlwave-help-in-header nil) 1072 (setq idlwave-help-in-header nil)
1072 (idlwave-help-toggle-header-match-and-def arg 'top))) 1073 (idlwave-help-toggle-header-match-and-def arg 'top)))
1073 1074
1074(defun idlwave-help-toggle-header-match-and-def (arg &optional top) 1075(defun idlwave-help-toggle-header-match-and-def (arg &optional top)
1075 (interactive "P") 1076 (interactive "P")
1076 (let ((args idlwave-help-args) 1077 (let ((args idlwave-help-args)
@@ -1082,7 +1083,7 @@ When DING is non-nil, ring the bell as well."
1082 (setq pos idlwave-help-def-pos)) 1083 (setq pos idlwave-help-def-pos))
1083 ;; Try to display header 1084 ;; Try to display header
1084 (setq pos (apply 'idlwave-help-find-in-doc-header 1085 (setq pos (apply 'idlwave-help-find-in-doc-header
1085 (if top 1086 (if top
1086 (list (car args) (nth 1 args) (nth 2 args) nil) 1087 (list (car args) (nth 1 args) (nth 2 args) nil)
1087 args))) 1088 args)))
1088 (if pos 1089 (if pos
@@ -1116,7 +1117,7 @@ Useful when source code is displayed as help. See the option
1116 (font-lock-fontify-buffer)) 1117 (font-lock-fontify-buffer))
1117 (set-syntax-table syntax-table))))) 1118 (set-syntax-table syntax-table)))))
1118 1119
1119 1120
1120(defun idlwave-help-error (name type class keyword) 1121(defun idlwave-help-error (name type class keyword)
1121 (error "Can't find help on %s%s %s" 1122 (error "Can't find help on %s%s %s"
1122 (or (and (or class name) (idlwave-make-full-name class name)) 1123 (or (and (or class name) (idlwave-make-full-name class name))
diff --git a/lisp/replace.el b/lisp/replace.el
index dc8eb131b72..1cef7ecc52a 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -977,32 +977,33 @@ See also `multi-occur'."
977 (setq occur-buf (get-buffer-create buf-name)) 977 (setq occur-buf (get-buffer-create buf-name))
978 978
979 (with-current-buffer occur-buf 979 (with-current-buffer occur-buf
980 (setq buffer-read-only nil)
981 (occur-mode) 980 (occur-mode)
982 (erase-buffer) 981 (let ((inhibit-read-only t))
983 (let ((count (occur-engine 982 (erase-buffer)
984 regexp active-bufs occur-buf 983 (let ((count (occur-engine
985 (or nlines list-matching-lines-default-context-lines) 984 regexp active-bufs occur-buf
986 (and case-fold-search 985 (or nlines list-matching-lines-default-context-lines)
987 (isearch-no-upper-case-p regexp t)) 986 (and case-fold-search
988 list-matching-lines-buffer-name-face 987 (isearch-no-upper-case-p regexp t))
989 nil list-matching-lines-face t))) 988 list-matching-lines-buffer-name-face
990 (let* ((bufcount (length active-bufs)) 989 nil list-matching-lines-face t)))
991 (diff (- (length bufs) bufcount))) 990 (let* ((bufcount (length active-bufs))
992 (message "Searched %d buffer%s%s; %s match%s for `%s'" 991 (diff (- (length bufs) bufcount)))
993 bufcount (if (= bufcount 1) "" "s") 992 (message "Searched %d buffer%s%s; %s match%s for `%s'"
994 (if (zerop diff) "" (format " (%d killed)" diff)) 993 bufcount (if (= bufcount 1) "" "s")
995 (if (zerop count) "no" (format "%d" count)) 994 (if (zerop diff) "" (format " (%d killed)" diff))
996 (if (= count 1) "" "es") 995 (if (zerop count) "no" (format "%d" count))
997 regexp)) 996 (if (= count 1) "" "es")
998 (setq occur-revert-arguments (list regexp nlines bufs) 997 regexp))
999 buffer-read-only t) 998 (setq occur-revert-arguments (list regexp nlines bufs))
1000 (if (> count 0) 999 (if (> count 0)
1001 (progn 1000 (progn
1002 (display-buffer occur-buf) 1001 (display-buffer occur-buf)
1003 (setq next-error-last-buffer occur-buf)) 1002 (setq next-error-last-buffer occur-buf))
1004 (kill-buffer occur-buf))) 1003 (kill-buffer occur-buf)))
1005 (run-hooks 'occur-hook)))) 1004 (run-hooks 'occur-hook))
1005 (setq buffer-read-only t)
1006 (set-buffer-modified-p nil))))
1006 1007
1007(defun occur-engine-add-prefix (lines) 1008(defun occur-engine-add-prefix (lines)
1008 (mapcar 1009 (mapcar
@@ -1013,7 +1014,6 @@ See also `multi-occur'."
1013(defun occur-engine (regexp buffers out-buf nlines case-fold-search 1014(defun occur-engine (regexp buffers out-buf nlines case-fold-search
1014 title-face prefix-face match-face keep-props) 1015 title-face prefix-face match-face keep-props)
1015 (with-current-buffer out-buf 1016 (with-current-buffer out-buf
1016 (setq buffer-read-only nil)
1017 (let ((globalcount 0) 1017 (let ((globalcount 0)
1018 (coding nil)) 1018 (coding nil))
1019 ;; Map over all the buffers 1019 ;; Map over all the buffers
diff --git a/lisp/simple.el b/lisp/simple.el
index cfbd6d4155f..8c73c005e69 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -113,9 +113,7 @@ If `fringe-arrow', indicate the locus by the fringe arrow."
113(defvar next-error-highlight-timer nil) 113(defvar next-error-highlight-timer nil)
114 114
115(defvar next-error-overlay-arrow-position nil) 115(defvar next-error-overlay-arrow-position nil)
116;; This is nil so as not to really display anything on text 116(put 'next-error-overlay-arrow-position 'overlay-arrow-string "=>")
117;; terminals. On text terminals, it would hide part of the file name.
118(put 'next-error-overlay-arrow-position 'overlay-arrow-string "")
119(add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position) 117(add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position)
120 118
121(defvar next-error-last-buffer nil 119(defvar next-error-last-buffer nil
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 9519dadeed5..64623e76ce9 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1168,7 +1168,8 @@ This is in addition to the primary selection."
1168(defun x-select-text (text &optional push) 1168(defun x-select-text (text &optional push)
1169 (x-set-selection 'PRIMARY text) 1169 (x-set-selection 'PRIMARY text)
1170 (setq x-last-selected-text-primary text) 1170 (setq x-last-selected-text-primary text)
1171 (when x-select-enable-clipboard 1171 (if (not x-select-enable-clipboard)
1172 (setq x-last-selected-text-clipboard nil)
1172 (x-set-selection 'CLIPBOARD text) 1173 (x-set-selection 'CLIPBOARD text)
1173 (setq x-last-selected-text-clipboard text)) 1174 (setq x-last-selected-text-clipboard text))
1174 ) 1175 )
@@ -1203,20 +1204,26 @@ in `selection-converter-alist', which see."
1203 (setq data 1204 (setq data
1204 (decode-coding-string data 'utf-16))))) 1205 (decode-coding-string data 'utf-16)))))
1205 ((eq data-type 'com.apple.traditional-mac-plain-text) 1206 ((eq data-type 'com.apple.traditional-mac-plain-text)
1206 (setq data (decode-coding-string data coding)))) 1207 (setq data (decode-coding-string data coding)))
1208 ((eq data-type 'public.file-url)
1209 (setq data (decode-coding-string data 'utf-8))
1210 ;; Remove a trailing nul character.
1211 (let ((len (length data)))
1212 (if (and (> len 0) (= (aref data (1- len)) ?\0))
1213 (setq data (substring data 0 (1- len)))))))
1207 (put-text-property 0 (length data) 'foreign-selection data-type data)) 1214 (put-text-property 0 (length data) 'foreign-selection data-type data))
1208 data)) 1215 data))
1209 1216
1210(defun x-selection-value (type) 1217(defun x-selection-value (type)
1211 (let (text tiff-image) 1218 (let ((data-types '(public.utf16-plain-text
1212 (setq text (condition-case nil 1219 com.apple.traditional-mac-plain-text
1213 (x-get-selection type 'public.utf16-plain-text) 1220 public.file-url))
1214 (error nil))) 1221 text tiff-image)
1215 (if (not text) 1222 (while (and (null text) data-types)
1216 (setq text (condition-case nil 1223 (setq text (condition-case nil
1217 (x-get-selection type 1224 (x-get-selection type (car data-types))
1218 'com.apple.traditional-mac-plain-text) 1225 (error nil)))
1219 (error nil)))) 1226 (setq data-types (cdr data-types)))
1220 (if text 1227 (if text
1221 (remove-text-properties 0 (length text) '(foreign-selection nil) text)) 1228 (remove-text-properties 0 (length text) '(foreign-selection nil) text))
1222 (setq tiff-image (condition-case nil 1229 (setq tiff-image (condition-case nil
@@ -1237,7 +1244,8 @@ in `selection-converter-alist', which see."
1237;;; selection won't be added to the kill ring over and over. 1244;;; selection won't be added to the kill ring over and over.
1238(defun x-get-selection-value () 1245(defun x-get-selection-value ()
1239 (let (clip-text primary-text) 1246 (let (clip-text primary-text)
1240 (when x-select-enable-clipboard 1247 (if (not x-select-enable-clipboard)
1248 (setq x-last-selected-text-clipboard nil)
1241 (setq clip-text (x-selection-value 'CLIPBOARD)) 1249 (setq clip-text (x-selection-value 'CLIPBOARD))
1242 (if (string= clip-text "") (setq clip-text nil)) 1250 (if (string= clip-text "") (setq clip-text nil))
1243 1251
@@ -1286,11 +1294,14 @@ in `selection-converter-alist', which see."
1286 )) 1294 ))
1287 1295
1288(put 'CLIPBOARD 'mac-scrap-name "com.apple.scrap.clipboard") 1296(put 'CLIPBOARD 'mac-scrap-name "com.apple.scrap.clipboard")
1289(if (eq system-type 'darwin) 1297(when (eq system-type 'darwin)
1290 (put 'FIND 'mac-scrap-name "com.apple.scrap.find")) 1298 (put 'FIND 'mac-scrap-name "com.apple.scrap.find")
1299 (put 'PRIMARY 'mac-scrap-name
1300 (format "org.gnu.Emacs.%d.selection.PRIMARY" (emacs-pid))))
1291(put 'com.apple.traditional-mac-plain-text 'mac-ostype "TEXT") 1301(put 'com.apple.traditional-mac-plain-text 'mac-ostype "TEXT")
1292(put 'public.utf16-plain-text 'mac-ostype "utxt") 1302(put 'public.utf16-plain-text 'mac-ostype "utxt")
1293(put 'public.tiff 'mac-ostype "TIFF") 1303(put 'public.tiff 'mac-ostype "TIFF")
1304(put 'public.file-url 'mac-ostype "furl")
1294 1305
1295(defun mac-select-convert-to-string (selection type value) 1306(defun mac-select-convert-to-string (selection type value)
1296 (let ((str (cdr (xselect-convert-to-string selection nil value))) 1307 (let ((str (cdr (xselect-convert-to-string selection nil value)))
@@ -1326,6 +1337,16 @@ in `selection-converter-alist', which see."
1326 (setq next-selection-coding-system nil) 1337 (setq next-selection-coding-system nil)
1327 (cons type str)))) 1338 (cons type str))))
1328 1339
1340(defun mac-select-convert-to-file-url (selection type value)
1341 (let ((filename (xselect-convert-to-filename selection type value))
1342 (coding (or file-name-coding-system default-file-name-coding-system)))
1343 (if (and filename coding)
1344 (setq filename (encode-coding-string filename coding)))
1345 (and filename
1346 (concat "file://localhost"
1347 (mapconcat 'url-hexify-string
1348 (split-string filename "/") "/")))))
1349
1329(setq selection-converter-alist 1350(setq selection-converter-alist
1330 (nconc 1351 (nconc
1331 '((public.utf16-plain-text . mac-select-convert-to-string) 1352 '((public.utf16-plain-text . mac-select-convert-to-string)
@@ -1333,6 +1354,7 @@ in `selection-converter-alist', which see."
1333 ;; This is not enabled by default because the `Import Image' 1354 ;; This is not enabled by default because the `Import Image'
1334 ;; menu makes Emacs crash or hang for unknown reasons. 1355 ;; menu makes Emacs crash or hang for unknown reasons.
1335 ;; (public.tiff . nil) 1356 ;; (public.tiff . nil)
1357 (public.file-url . mac-select-convert-to-file-url)
1336 ) 1358 )
1337 selection-converter-alist)) 1359 selection-converter-alist))
1338 1360
@@ -1702,6 +1724,7 @@ ascii:-*-Monaco-*-*-*-*-12-*-*-*-*-*-mac-roman")
1702(setq interprogram-cut-function 'x-select-text) 1724(setq interprogram-cut-function 'x-select-text)
1703(setq interprogram-paste-function 'x-get-selection-value) 1725(setq interprogram-paste-function 'x-get-selection-value)
1704 1726
1727(defalias 'x-cut-buffer-or-selection-value 'x-get-selection-value)
1705 1728
1706;;; Turn off window-splitting optimization; Mac is usually fast enough 1729;;; Turn off window-splitting optimization; Mac is usually fast enough
1707;;; that this is only annoying. 1730;;; that this is only annoying.
@@ -1756,7 +1779,9 @@ Switch to a buffer editing the last file dropped."
1756 '(lambda () 1779 '(lambda ()
1757 (defvar mac-ready-for-drag-n-drop t))) 1780 (defvar mac-ready-for-drag-n-drop t)))
1758 1781
1759;;;; Scroll bars 1782;;;; Non-toolkit Scroll bars
1783
1784(unless x-toolkit-scroll-bars
1760 1785
1761;; for debugging 1786;; for debugging
1762;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event)) 1787;; (defun mac-handle-scroll-bar-event (event) (interactive "e") (princ event))
@@ -1816,6 +1841,7 @@ Switch to a buffer editing the last file dropped."
1816 (mac-scroll-ignore-events) 1841 (mac-scroll-ignore-events)
1817 (scroll-up 1))) 1842 (scroll-up 1)))
1818 1843
1844)
1819 1845
1820;;;; Others 1846;;;; Others
1821 1847
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 97bc3350b47..c8926776400 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -301,7 +301,9 @@ Must be greater than 1."
301 :type 'integer 301 :type 'integer
302 :group 'ispell) 302 :group 'ispell)
303 303
304(defcustom ispell-program-name "ispell" 304(defcustom ispell-program-name
305 (or (locate-file "aspell" exec-path exec-suffixes 'file-executable-p)
306 "ispell")
305 "Program invoked by \\[ispell-word] and \\[ispell-region] commands." 307 "Program invoked by \\[ispell-word] and \\[ispell-region] commands."
306 :type 'string 308 :type 'string
307 :group 'ispell) 309 :group 'ispell)
diff --git a/lisp/textmodes/po.el b/lisp/textmodes/po.el
index a4ec5d3ac8b..c2e58d7d582 100644
--- a/lisp/textmodes/po.el
+++ b/lisp/textmodes/po.el
@@ -80,14 +80,15 @@ Do so according to FILENAME's declared charset."
80 assoc) 80 assoc)
81 (list (cond 81 (list (cond
82 ((setq assoc 82 ((setq assoc
83 (assoc-ignore-case charset 83 (assoc-string charset
84 po-content-type-charset-alist)) 84 po-content-type-charset-alist
85 t))
85 (cdr assoc)) 86 (cdr assoc))
86 ((or (setq assoc (assoc-ignore-case charset coding-system-alist)) 87 ((or (setq assoc (assoc-string charset coding-system-alist t))
87 (setq assoc 88 (setq assoc
88 (assoc-ignore-case (subst-char-in-string ?_ ?- 89 (assoc-string (subst-char-in-string ?_ ?-
89 charset) 90 charset)
90 coding-system-alist))) 91 coding-system-alist t)))
91 (intern (car assoc))) 92 (intern (car assoc)))
92 ;; In principle we should also check the `mime-charset' 93 ;; In principle we should also check the `mime-charset'
93 ;; property of everything in the base coding system 94 ;; property of everything in the base coding system
@@ -101,10 +102,10 @@ Do so according to FILENAME's declared charset."
101 ;; to require it initially? 102 ;; to require it initially?
102 (require 'code-pages nil t) 103 (require 'code-pages nil t)
103 (if (or 104 (if (or
104 (setq assoc (assoc-ignore-case charset coding-system-alist)) 105 (setq assoc (assoc-string charset coding-system-alist t))
105 (setq assoc (assoc-ignore-case (subst-char-in-string 106 (setq assoc (assoc-string (subst-char-in-string
106 ?_ ?- charset) 107 ?_ ?- charset)
107 coding-system-alist))) 108 coding-system-alist t)))
108 (intern (car assoc)) 109 (intern (car assoc))
109 'raw-text)))))))) 110 'raw-text))))))))
110 111
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 9bd35f05d11..7a2865b9dfa 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -27,9 +27,6 @@
27 27
28;;; Code: 28;;; Code:
29 29
30(eval-when-compile (require 'cl)) ; for case macro
31
32
33;;; Customizable settings 30;;; Customizable settings
34 31
35(defgroup tooltip nil 32(defgroup tooltip nil
@@ -116,42 +113,6 @@ position to pop up the tooltip."
116 "Face for tooltips." 113 "Face for tooltips."
117 :group 'tooltip) 114 :group 'tooltip)
118 115
119(defcustom tooltip-gud-tips-p nil
120 "*Non-nil means show tooltips in GUD sessions.
121
122This allows you to display a variable's value in a tooltip simply
123by pointing at it with the mouse. In the case of a C program
124controlled by GDB, it shows the associated #define directives
125when program is not executing."
126 :type 'boolean
127 :tag "GUD"
128 :group 'tooltip)
129
130(defcustom tooltip-gud-modes '(gud-mode c-mode c++-mode fortran-mode)
131 "List of modes for which to enable GUD tips."
132 :type 'sexp
133 :tag "GUD modes"
134 :group 'tooltip)
135
136(defcustom tooltip-gud-display
137 '((eq (tooltip-event-buffer tooltip-gud-event)
138 (marker-buffer gud-overlay-arrow-position)))
139 "List of forms determining where GUD tooltips are displayed.
140
141Forms in the list are combined with AND. The default is to display
142only tooltips in the buffer containing the overlay arrow."
143 :type 'sexp
144 :tag "GUD buffers predicate"
145 :group 'tooltip)
146
147(defcustom tooltip-gud-echo-area nil
148 "Use the echo area instead of frames for GUD tooltips."
149 :type 'boolean
150 :tag "Use echo area"
151 :group 'tooltip)
152
153(defvaralias 'tooltip-use-echo-area 'tooltip-gud-echo-area)
154(make-obsolete-variable 'tooltip-use-echo-area 'tooltip-gud-echo-area "22.1")
155 116
156;;; Variables that are not customizable. 117;;; Variables that are not customizable.
157 118
@@ -169,7 +130,6 @@ the last mouse movement event that occurred.")
169(defvar tooltip-hide-time nil 130(defvar tooltip-hide-time nil
170 "Time when the last tooltip was hidden.") 131 "Time when the last tooltip was hidden.")
171 132
172
173;;; Event accessors 133;;; Event accessors
174 134
175(defun tooltip-event-buffer (event) 135(defun tooltip-event-buffer (event)
@@ -178,7 +138,6 @@ This might return nil if the event did not occur over a buffer."
178 (let ((window (posn-window (event-end event)))) 138 (let ((window (posn-window (event-end event))))
179 (and window (window-buffer window)))) 139 (and window (window-buffer window))))
180 140
181
182;;; Switching tooltips on/off 141;;; Switching tooltips on/off
183 142
184;; We don't set track-mouse globally because this is a big redisplay 143;; We don't set track-mouse globally because this is a big redisplay
@@ -202,16 +161,15 @@ With ARG, turn tooltip mode on if and only if ARG is positive."
202 :group 'tooltip 161 :group 'tooltip
203 (unless (or (null tooltip-mode) (fboundp 'x-show-tip)) 162 (unless (or (null tooltip-mode) (fboundp 'x-show-tip))
204 (error "Sorry, tooltips are not yet available on this system")) 163 (error "Sorry, tooltips are not yet available on this system"))
205 (let ((hook-fn (if tooltip-mode 'add-hook 'remove-hook))) 164 (if tooltip-mode
206 (funcall hook-fn 'change-major-mode-hook 'tooltip-change-major-mode) 165 (progn
207 (tooltip-activate-mouse-motions-if-enabled) 166 (add-hook 'pre-command-hook 'tooltip-hide)
208 (funcall hook-fn 'pre-command-hook 'tooltip-hide) 167 (add-hook 'tooltip-hook 'tooltip-help-tips))
209 (funcall hook-fn 'tooltip-hook 'tooltip-gud-tips) 168 (unless (and (boundp 'gud-tooltip-mode) gud-tooltip-mode)
210 (funcall hook-fn 'tooltip-hook 'tooltip-help-tips) 169 (remove-hook 'pre-command-hook 'tooltip-hide))
211 (setq show-help-function (if tooltip-mode 'tooltip-show-help-function nil)) 170 (remove-hook 'tooltip-hook 'tooltip-help-tips))
212 ;; `ignore' is the default binding for mouse movements. 171 (setq show-help-function
213 (define-key global-map [mouse-movement] 172 (if tooltip-mode 'tooltip-show-help-function nil)))
214 (if tooltip-mode 'tooltip-mouse-motion 'ignore))))
215 173
216 174
217;;; Timeout for tooltip display 175;;; Timeout for tooltip display
@@ -242,49 +200,6 @@ With ARG, turn tooltip mode on if and only if ARG is positive."
242 tooltip-last-mouse-motion-event)) 200 tooltip-last-mouse-motion-event))
243 201
244 202
245;;; Reacting on mouse movements
246
247(defun tooltip-change-major-mode ()
248 "Function added to `change-major-mode-hook' when tooltip mode is on."
249 (add-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled))
250
251(defun tooltip-activate-mouse-motions-if-enabled ()
252 "Reconsider for all buffers whether mouse motion events are desired."
253 (remove-hook 'post-command-hook 'tooltip-activate-mouse-motions-if-enabled)
254 (dolist (buffer (buffer-list))
255 (save-excursion
256 (set-buffer buffer)
257 (if (and tooltip-mode
258 tooltip-gud-tips-p
259 (memq major-mode tooltip-gud-modes))
260 (tooltip-activate-mouse-motions t)
261 (tooltip-activate-mouse-motions nil)))))
262
263(defvar tooltip-mouse-motions-active nil
264 "Locally t in a buffer if tooltip processing of mouse motion is enabled.")
265
266(defun tooltip-activate-mouse-motions (activatep)
267 "Activate/deactivate mouse motion events for the current buffer.
268ACTIVATEP non-nil means activate mouse motion events."
269 (if activatep
270 (progn
271 (make-local-variable 'tooltip-mouse-motions-active)
272 (setq tooltip-mouse-motions-active t)
273 (make-local-variable 'track-mouse)
274 (setq track-mouse t))
275 (when tooltip-mouse-motions-active
276 (kill-local-variable 'tooltip-mouse-motions-active)
277 (kill-local-variable 'track-mouse))))
278
279(defun tooltip-mouse-motion (event)
280 "Command handler for mouse movement events in `global-map'."
281 (interactive "e")
282 (tooltip-hide)
283 (when (car (mouse-pixel-position))
284 (setq tooltip-last-mouse-motion-event (copy-sequence event))
285 (tooltip-start-delayed-tip)))
286
287
288;;; Displaying tips 203;;; Displaying tips
289 204
290(defun tooltip-set-param (alist key value) 205(defun tooltip-set-param (alist key value)
@@ -396,114 +311,6 @@ of PROCESS."
396 output)) 311 output))
397 312
398 313
399;;; Tips for `gud'
400
401(defvar tooltip-gud-original-filter nil
402 "Process filter to restore after GUD output has been received.")
403
404(defvar tooltip-gud-dereference nil
405 "Non-nil means print expressions with a `*' in front of them.
406For C this would dereference a pointer expression.")
407
408(defvar tooltip-gud-event nil
409 "The mouse movement event that led to a tooltip display.
410This event can be examined by forms in TOOLTIP-GUD-DISPLAY.")
411
412(defun tooltip-gud-toggle-dereference ()
413 "Toggle whether tooltips should show `* expr' or `expr'."
414 (interactive)
415 (setq tooltip-gud-dereference (not tooltip-gud-dereference))
416 (when (interactive-p)
417 (message "Dereferencing is now %s."
418 (if tooltip-gud-dereference "on" "off"))))
419
420(defun tooltip-toggle-gud-tips ()
421 "Toggle the display of GUD tooltips."
422 (interactive)
423 (setq tooltip-gud-tips-p (not tooltip-gud-tips-p))
424 ;; Reconsider for all buffers whether mouse motion events are desired.
425 (tooltip-change-major-mode)
426 (when (interactive-p)
427 (message (format "GUD tooltips %sabled"
428 (if tooltip-gud-tips-p "en" "dis")))))
429
430; This will only display data that comes in one chunk.
431; Larger arrays (say 400 elements) are displayed in
432; the tootip incompletely and spill over into the gud buffer.
433; Switching the process-filter creates timing problems and
434; it may be difficult to do better. Using annotations as in
435; gdb-ui.el gets round this problem.
436(defun tooltip-gud-process-output (process output)
437 "Process debugger output and show it in a tooltip window."
438 (set-process-filter process tooltip-gud-original-filter)
439 (tooltip-show (tooltip-strip-prompt process output)
440 tooltip-gud-echo-area))
441
442(defun tooltip-gud-print-command (expr)
443 "Return a suitable command to print the expression EXPR.
444If TOOLTIP-GUD-DEREFERENCE is t, also prepend a `*' to EXPR."
445 (when tooltip-gud-dereference
446 (setq expr (concat "*" expr)))
447 (case gud-minor-mode
448 ((gdb gdba) (concat "server print " expr))
449 (dbx (concat "print " expr))
450 (xdb (concat "p " expr))
451 (sdb (concat expr "/"))
452 (perldb expr)))
453
454(defun tooltip-gud-tips (event)
455 "Show tip for identifier or selection under the mouse.
456The mouse must either point at an identifier or inside a selected
457region for the tip window to be shown. If tooltip-gud-dereference is t,
458add a `*' in front of the printed expression. In the case of a C program
459controlled by GDB, show the associated #define directives when program is
460not executing.
461
462This function must return nil if it doesn't handle EVENT."
463 (let (process)
464 (when (and (eventp event)
465 tooltip-gud-tips-p
466 (boundp 'gud-comint-buffer)
467 gud-comint-buffer
468 (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
469 (setq process (get-buffer-process gud-comint-buffer))
470 (posn-point (event-end event))
471 (or (eq gud-minor-mode 'gdba)
472 (progn (setq tooltip-gud-event event)
473 (eval (cons 'and tooltip-gud-display)))))
474 (let ((expr (tooltip-expr-to-print event)))
475 (when expr
476 (if (and (eq gud-minor-mode 'gdba)
477 (not gdb-active-process))
478 (progn
479 (with-current-buffer
480 (window-buffer (let ((mouse (mouse-position)))
481 (window-at (cadr mouse)
482 (cddr mouse))))
483 (let ((define-elt (assoc expr gdb-define-alist)))
484 (unless (null define-elt)
485 (tooltip-show (cdr define-elt))
486 expr))))
487 (let ((cmd (tooltip-gud-print-command expr)))
488 (unless (null cmd) ; CMD can be nil if unknown debugger
489 (case gud-minor-mode
490 (gdba (gdb-enqueue-input
491 (list (concat cmd "\n") 'gdb-tooltip-print)))
492 (t
493 (setq tooltip-gud-original-filter (process-filter process))
494 (set-process-filter process 'tooltip-gud-process-output)
495 (gud-basic-call cmd)))
496 expr))))))))
497
498(defun gdb-tooltip-print ()
499 (tooltip-show
500 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
501 (let ((string (buffer-string)))
502 ;; remove newline for tooltip-gud-echo-area
503 (substring string 0 (- (length string) 1))))
504 tooltip-gud-echo-area))
505
506
507;;; Tooltip help. 314;;; Tooltip help.
508 315
509(defvar tooltip-help-message nil 316(defvar tooltip-help-message nil
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 672a70d478f..aa90a4f0e73 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,14 @@
12005-05-08 Luc Teirlinck <teirllm@auburn.edu>
2
3 * variables.texi (File Local Variables): `(hack-local-variables t)'
4 now also checks whether a mode is specified in the local variables
5 list.
6
72005-05-05 Kevin Ryde <user42@zip.com.au>
8
9 * display.texi (The Echo Area): Correct format function cross
10 reference.
11
12005-05-05 Luc Teirlinck <teirllm@auburn.edu> 122005-05-05 Luc Teirlinck <teirllm@auburn.edu>
2 13
3 * variables.texi (Variable Aliases): Change description of 14 * variables.texi (Variable Aliases): Change description of
diff --git a/lispref/display.texi b/lispref/display.texi
index 76bf99e0ede..7f91072ca5d 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -200,7 +200,7 @@ follows:
200@defun message string &rest arguments 200@defun message string &rest arguments
201This function displays a message in the echo area. The 201This function displays a message in the echo area. The
202argument @var{string} is similar to a C language @code{printf} control 202argument @var{string} is similar to a C language @code{printf} control
203string. See @code{format} in @ref{String Conversion}, for the details 203string. See @code{format} in @ref{Formatting Strings}, for the details
204on the conversion specifications. @code{message} returns the 204on the conversion specifications. @code{message} returns the
205constructed string. 205constructed string.
206 206
diff --git a/lispref/variables.texi b/lispref/variables.texi
index 5ece7e98906..28eab924eca 100644
--- a/lispref/variables.texi
+++ b/lispref/variables.texi
@@ -1804,10 +1804,9 @@ function does not look for the @samp{mode:} local variable in the
1804@code{enable-local-variables} into account. 1804@code{enable-local-variables} into account.
1805 1805
1806If the optional argument @var{mode-only} is non-@code{nil}, then all 1806If the optional argument @var{mode-only} is non-@code{nil}, then all
1807this function does is return @code{t} if the @w{@samp{-*-}} line 1807this function does is return @code{t} if the @w{@samp{-*-}} line or
1808specifies a mode and @code{nil} otherwise. It does not set the mode 1808the local variables list specifies a mode and @code{nil} otherwise.
1809nor any other file local variable. It does not check whether a mode 1809It does not set the mode nor any other file local variable.
1810is specified in the local variables list at the end of the file.
1811@end defun 1810@end defun
1812 1811
1813 If a file local variable list could specify a function that would 1812 If a file local variable list could specify a function that would
diff --git a/mac/ChangeLog b/mac/ChangeLog
index 27cd5d98be9..96ba2ee5201 100644
--- a/mac/ChangeLog
+++ b/mac/ChangeLog
@@ -1,3 +1,7 @@
12005-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * inc/config.h [HAVE_CARBON]: Define USE_TOOLKIT_SCROLL_BARS.
4
12005-04-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 52005-04-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 6
3 * makefile.MPW (MacObjects): Add macselect.c.x. 7 * makefile.MPW (MacObjects): Add macselect.c.x.
diff --git a/mac/inc/config.h b/mac/inc/config.h
index c996cce4bfd..c81db673cca 100644
--- a/mac/inc/config.h
+++ b/mac/inc/config.h
@@ -91,7 +91,9 @@ Boston, MA 02111-1307, USA. */
91/* #undef HAVE_XAW3D */ 91/* #undef HAVE_XAW3D */
92 92
93/* Define if we should use toolkit scroll bars. */ 93/* Define if we should use toolkit scroll bars. */
94/* #undef USE_TOOLKIT_SCROLL_BARS */ 94#ifdef HAVE_CARBON
95#define USE_TOOLKIT_SCROLL_BARS 1
96#endif
95 97
96/* Define if we should use XIM, if it is available. */ 98/* Define if we should use XIM, if it is available. */
97/* #undef USE_XIM */ 99/* #undef USE_XIM */
diff --git a/make-dist b/make-dist
index 0506087c15a..227c4b21640 100755
--- a/make-dist
+++ b/make-dist
@@ -321,7 +321,9 @@ for subdir in lisp site-lisp lispref lispintro \
321 leim/SKK-DIC leim/ja-dic leim/quail \ 321 leim/SKK-DIC leim/ja-dic leim/quail \
322 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \ 322 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
323 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \ 323 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
324 etc etc/e info man msdos vms mac mac/inc mac/inc/sys \ 324 etc etc/e etc/images etc/images/gnus etc/images/smilies \
325 etc/tree-widget etc/tree-widget/default etc/tree-widget/folder \
326 info man msdos vms mac mac/inc mac/inc/sys \
325 mac/src mac/Emacs.app mac/Emacs.app/Contents \ 327 mac/src mac/Emacs.app mac/Emacs.app/Contents \
326 mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \ 328 mac/Emacs.app/Contents/MacOS mac/Emacs.app/Contents/Resources \
327 mac/Emacs.app/Contents/Resources/English.lproj 329 mac/Emacs.app/Contents/Resources/English.lproj
@@ -349,7 +351,6 @@ echo "Making links to \`lisp' and its subdirectories"
349 test -f README && ln README ../${tempdir}/lisp 351 test -f README && ln README ../${tempdir}/lisp
350 (cd ../${tempdir}/lisp 352 (cd ../${tempdir}/lisp
351 rm -f TAGS =* 353 rm -f TAGS =*
352 rm -f ldefs-boot.el
353 rm -f site-init site-init.el site-init.elc 354 rm -f site-init site-init.el site-init.elc
354 rm -f site-load site-load.el site-load.elc 355 rm -f site-load site-load.el site-load.elc
355 rm -f site-start site-start.el site-start.elc 356 rm -f site-start site-start.el site-start.elc
@@ -396,7 +397,7 @@ echo "Making links to \`lisp' and its subdirectories"
396echo "Making links to \`leim' and its subdirectories" 397echo "Making links to \`leim' and its subdirectories"
397### Don't distribute TAGS, or =*.el files. 398### Don't distribute TAGS, or =*.el files.
398(cd leim 399(cd leim
399 ln makefile.nt makefile.w32-in ../${tempdir}/leim 400 ln makefile.w32-in ../${tempdir}/leim
400 ln ChangeLog README ../${tempdir}/leim 401 ln ChangeLog README ../${tempdir}/leim
401 402
402 ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC 403 ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
@@ -443,7 +444,7 @@ echo "Making links to \`src'"
443 fi 444 fi
444 done 445 done
445 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src 446 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
446 ln makefile.nt makefile.w32-in ../${tempdir}/src 447 ln makefile.w32-in ../${tempdir}/src
447 ln .gdbinit .dbxinit ../${tempdir}/src 448 ln .gdbinit .dbxinit ../${tempdir}/src
448 cd ../${tempdir}/src 449 cd ../${tempdir}/src
449 rm -f config.h epaths.h Makefile Makefile.c 450 rm -f config.h epaths.h Makefile Makefile.c
@@ -466,7 +467,7 @@ echo "Making links to \`lib-src'"
466(cd lib-src 467(cd lib-src
467 ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src 468 ln [a-zA-Z]*.[chy] ../${tempdir}/lib-src
468 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src 469 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
469 ln grep-changelog rcs2log rcs-checkin makefile.nt ../${tempdir}/lib-src 470 ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
470 ln makefile.w32-in ../${tempdir}/lib-src 471 ln makefile.w32-in ../${tempdir}/lib-src
471 ## If we ended up with a symlink, or if we did not get anything 472 ## If we ended up with a symlink, or if we did not get anything
472 ## due to a cross-device symlink, copy the file. 473 ## due to a cross-device symlink, copy the file.
@@ -492,7 +493,7 @@ echo "Making links to \`nt'"
492(cd nt 493(cd nt
493 ln emacs.rc config.nt [a-z]*.c ../${tempdir}/nt 494 ln emacs.rc config.nt [a-z]*.c ../${tempdir}/nt
494 ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt 495 ln nmake.defs gmake.defs subdirs.el ../${tempdir}/nt
495 ln [a-z]*.bat [a-z]*.h makefile.def makefile.nt ../${tempdir}/nt 496 ln [a-z]*.bat [a-z]*.h ../${tempdir}/nt
496 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt) 497 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt)
497 498
498echo "Making links to \`nt/inc'" 499echo "Making links to \`nt/inc'"
@@ -563,7 +564,8 @@ echo "Making links to \`etc'"
563### tex litter. 564### tex litter.
564### Don't distribute gfdl.1, since no man page references it. 565### Don't distribute gfdl.1, since no man page references it.
565(cd etc 566(cd etc
566 files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$'` 567 files=`ls -d * | grep -v CVS | grep -v RCS | grep -v 'Old' | grep -v '^e$' \
568 | grep -v '^images$' | grep -v '^tree-widget$'`
567 ln $files ../${tempdir}/etc 569 ln $files ../${tempdir}/etc
568 ## If we ended up with a symlink, or if we did not get anything 570 ## If we ended up with a symlink, or if we did not get anything
569 ## due to a cross-device symlink, copy the file. 571 ## due to a cross-device symlink, copy the file.
@@ -592,6 +594,15 @@ echo "Making links to \`etc/e'"
592 cd ../../${tempdir}/etc/e 594 cd ../../${tempdir}/etc/e
593 rm -f *~ \#*\# *,v =* core) 595 rm -f *~ \#*\# *,v =* core)
594 596
597for dir in etc/images/gnus etc/images/smilies \
598 etc/tree-widget/default etc/tree-widget/folder ; do
599 echo "Making links to \`${dir}'"
600 (cd ${dir}
601 ln `ls -d * | grep -v CVS | grep -v RCS` ../../../${tempdir}/${dir}
602 cd ../../../${tempdir}/${dir}
603 rm -f *~ \#*\# *,v =* core)
604done
605
595echo "Making links to \`info'" 606echo "Making links to \`info'"
596# Don't distribute backups or autosaves. 607# Don't distribute backups or autosaves.
597(cd info 608(cd info
diff --git a/man/ChangeLog b/man/ChangeLog
index 553256ddd56..31a1383aade 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,25 @@
12005-05-08 Luc Teirlinck <teirllm@auburn.edu>
2
3 * basic.texi: Various typo and grammar fixes.
4 (Moving Point): C-a now runs move-beginning-of-line.
5
62005-05-08 Nick Roberts <nickrob@snap.net.nz>
7
8 * building.texi (Debugger Operation): Describe gud-tooltip-echo-area.
9
10 * frames.texi (Tooltips): Describe help tooltips and GUD tooltips
11 as different animals.
12
132005-05-07 Luc Teirlinck <teirllm@auburn.edu>
14
15 * frames.texi (Mouse References): Clarify `mouse-1-click-follows-link'.
16 Correct index entry.
17
182005-05-07 Nick Roberts <nickrob@snap.net.nz>
19
20 * building.texi (Debugger Operation): Update to reflect changes
21 in GUD tooltips.
22
12005-04-30 Richard M. Stallman <rms@gnu.org> 232005-04-30 Richard M. Stallman <rms@gnu.org>
2 24
3 * files.texi (Compressed Files): Auto Compression normally enabled. 25 * files.texi (Compressed Files): Auto Compression normally enabled.
diff --git a/man/basic.texi b/man/basic.texi
index ad3cfbca88a..c8922996534 100644
--- a/man/basic.texi
+++ b/man/basic.texi
@@ -170,7 +170,7 @@ them). Others do more sophisticated things.
170@kindex RIGHT 170@kindex RIGHT
171@kindex UP 171@kindex UP
172@kindex DOWN 172@kindex DOWN
173@findex beginning-of-line 173@findex move-beginning-of-line
174@findex move-end-of-line 174@findex move-end-of-line
175@findex forward-char 175@findex forward-char
176@findex backward-char 176@findex backward-char
@@ -183,7 +183,7 @@ them). Others do more sophisticated things.
183@findex move-to-window-line 183@findex move-to-window-line
184@table @kbd 184@table @kbd
185@item C-a 185@item C-a
186Move to the beginning of the line (@code{beginning-of-line}). 186Move to the beginning of the line (@code{move-beginning-of-line}).
187@item C-e 187@item C-e
188Move to the end of the line (@code{move-end-of-line}). 188Move to the end of the line (@code{move-end-of-line}).
189@item C-f 189@item C-f
@@ -261,7 +261,7 @@ to the end of another line. Normally, @code{track-eol} is @code{nil}.
261@xref{Variables}, for how to set variables such as @code{track-eol}. 261@xref{Variables}, for how to set variables such as @code{track-eol}.
262 262
263@vindex next-line-add-newlines 263@vindex next-line-add-newlines
264 @kbd{C-n} normally stops at the end of the bufer when you use it on 264 @kbd{C-n} normally stops at the end of the buffer when you use it on
265the last line of the buffer. But if you set the variable 265the last line of the buffer. But if you set the variable
266@code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on 266@code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on
267the last line of a buffer creates an additional line at the end and 267the last line of a buffer creates an additional line at the end and
@@ -510,7 +510,7 @@ type the text for the new line. @kbd{C-o F O O} has the same effect as
510 510
511 You can make several blank lines by typing @kbd{C-o} several times, or 511 You can make several blank lines by typing @kbd{C-o} several times, or
512by giving it a numeric argument to tell it how many blank lines to make. 512by giving it a numeric argument to tell it how many blank lines to make.
513@xref{Arguments}, for how. If you have a fill prefix, then @kbd{C-o} 513@xref{Arguments}, for how. If you have a fill prefix, the @kbd{C-o}
514command inserts the fill prefix on the new line, when you use it at the 514command inserts the fill prefix on the new line, when you use it at the
515beginning of a line. @xref{Fill Prefix}. 515beginning of a line. @xref{Fill Prefix}.
516 516
@@ -677,7 +677,7 @@ point=26957 of 26956(100%) column 0
677@cindex character set of character at point 677@cindex character set of character at point
678@cindex font of character at point 678@cindex font of character at point
679@cindex text properties at point 679@cindex text properties at point
680 @w{@kbd{C-u C-x =}} displays these additional information about a 680 @w{@kbd{C-u C-x =}} displays the following additional information about a
681character. 681character.
682 682
683@itemize @bullet 683@itemize @bullet
@@ -780,7 +780,7 @@ without digits normally means @minus{}1.
780sign has the special meaning of ``multiply by four.'' It multiplies the 780sign has the special meaning of ``multiply by four.'' It multiplies the
781argument for the next command by four. @kbd{C-u} twice multiplies it by 781argument for the next command by four. @kbd{C-u} twice multiplies it by
782sixteen. Thus, @kbd{C-u C-u C-f} moves forward sixteen characters. This 782sixteen. Thus, @kbd{C-u C-u C-f} moves forward sixteen characters. This
783is a good way to move forward ``fast,'' since it moves about 1/5 of a line 783is a good way to move forward ``fast'', since it moves about 1/5 of a line
784in the usual size screen. Other useful combinations are @kbd{C-u C-n}, 784in the usual size screen. Other useful combinations are @kbd{C-u C-n},
785@kbd{C-u C-u C-n} (move down a good fraction of a screen), @kbd{C-u C-u 785@kbd{C-u C-u C-n} (move down a good fraction of a screen), @kbd{C-u C-u
786C-o} (make ``a lot'' of blank lines), and @kbd{C-u C-k} (kill four 786C-o} (make ``a lot'' of blank lines), and @kbd{C-u C-k} (kill four
diff --git a/man/building.texi b/man/building.texi
index 2fdfd1a72a3..b3c7fa4f2da 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -491,15 +491,18 @@ history commands to repeat them. @xref{Shell Mode}.
491 491
492@cindex tooltips with GUD 492@cindex tooltips with GUD
493@vindex tooltip-gud-modes 493@vindex tooltip-gud-modes
494@vindex tooltip-gud-tips-p 494@vindex gud-tooltip-mode
495@vindex gud-tooltip-echo-area
495 The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. 496 The Tooltip facility (@pxref{Tooltips}) provides support for GUD@.
496You activate this feature by setting the variable 497You activate this feature by turning on the minor mode
497@code{tooltip-gud-tips-p} to @code{t}. Then you can display a 498@code{gud-tooltip-mode}. Then you can display a variable's value in a
498variable's value in a tooltip simply by pointing at it with the mouse. 499tooltip simply by pointing at it with the mouse. In graphical mode,
499In graphical mode, with a C program, you can also display the 500with a C program, you can also display the @code{#define} directive
500@code{#define} directive associated with an identifier when program is 501associated with an identifier when the program is not executing. This
501not executing. This operates in the GUD buffer and in source buffers 502operates in the GUD buffer and in source buffers with major modes in
502with major modes in the list @code{tooltip-gud-modes}. 503the list @code{gud-tooltip-modes}. If the variable
504@code{gud-tooltip-echo-area} is non-@code{nil} then the help text is
505displayed in the echo area.
503 506
504@node Commands of GUD 507@node Commands of GUD
505@subsection Commands of GUD 508@subsection Commands of GUD
diff --git a/man/calc.texi b/man/calc.texi
index 0cd28e5bf8a..97f06047773 100644
--- a/man/calc.texi
+++ b/man/calc.texi
@@ -30634,11 +30634,15 @@ use @kbd{M-# u} to update the buffer by hand.
30634@node Mode Settings in Embedded Mode, Customizing Embedded Mode, Assignments in Embedded Mode, Embedded Mode 30634@node Mode Settings in Embedded Mode, Customizing Embedded Mode, Assignments in Embedded Mode, Embedded Mode
30635@section Mode Settings in Embedded Mode 30635@section Mode Settings in Embedded Mode
30636 30636
30637@kindex m e
30638@pindex calc-embedded-preserve-modes
30637@noindent 30639@noindent
30638The mode settings can be changed while Calc is in embedded mode, but 30640The mode settings can be changed while Calc is in embedded mode, but
30639will revert to their original values when embedded mode is ended 30641by default they will revert to their original values when embedded mode
30640(except for the modes saved when the mode-recording mode is 30642is ended. However, the modes saved when the mode-recording mode is
30641@code{Save}; see below). 30643@code{Save} (see below) and the modes in effect when the @kbd{m e}
30644(@code{calc-embedded-preserve-modes}) command is given
30645will be preserved when embedded mode is ended.
30642 30646
30643Embedded mode has a rather complicated mechanism for handling mode 30647Embedded mode has a rather complicated mechanism for handling mode
30644settings in Embedded formulas. It is possible to put annotations 30648settings in Embedded formulas. It is possible to put annotations
@@ -35580,6 +35584,7 @@ keystrokes are not listed in this summary.
35580@c 35584@c
35581@r{ @: m a @: @: 12,13 @:calc-algebraic-mode@:} 35585@r{ @: m a @: @: 12,13 @:calc-algebraic-mode@:}
35582@r{ @: m d @: @: @:calc-degrees-mode@:} 35586@r{ @: m d @: @: @:calc-degrees-mode@:}
35587@r{ @: m e @: @: @:calc-embedded-preserve-modes@:}
35583@r{ @: m f @: @: 12 @:calc-frac-mode@:} 35588@r{ @: m f @: @: 12 @:calc-frac-mode@:}
35584@r{ @: m g @: @: 52 @:calc-get-modes@:} 35589@r{ @: m g @: @: 52 @:calc-get-modes@:}
35585@r{ @: m h @: @: @:calc-hms-mode@:} 35590@r{ @: m h @: @: @:calc-hms-mode@:}
diff --git a/man/frames.texi b/man/frames.texi
index f95d65a85fa..139560af30e 100644
--- a/man/frames.texi
+++ b/man/frames.texi
@@ -48,7 +48,7 @@ so that you can use many of the features described in this chapter.
48* Menu Bars:: Enabling and disabling the menu bar. 48* Menu Bars:: Enabling and disabling the menu bar.
49* Tool Bars:: Enabling and disabling the tool bar. 49* Tool Bars:: Enabling and disabling the tool bar.
50* Dialog Boxes:: Controlling use of dialog boxes. 50* Dialog Boxes:: Controlling use of dialog boxes.
51* Tooltips:: Showing "tooltips", AKA "balloon help" for active text. 51* Tooltips:: Displaying information at the current mouse position.
52* Mouse Avoidance:: Moving the mouse pointer out of the way. 52* Mouse Avoidance:: Moving the mouse pointer out of the way.
53* Non-Window Terminals:: Multiple frames on terminals that show only one. 53* Non-Window Terminals:: Multiple frames on terminals that show only one.
54* XTerm Mouse:: Using the mouse in an XTerm terminal emulator. 54* XTerm Mouse:: Using the mouse in an XTerm terminal emulator.
@@ -319,16 +319,14 @@ you go to the source code for that error message. If you click
319@kbd{Mouse-2} on a completion in the @samp{*Completions*} buffer, you 319@kbd{Mouse-2} on a completion in the @samp{*Completions*} buffer, you
320choose that completion. 320choose that completion.
321 321
322@vindex mouse-1-click-follows-link
323 However, most applications use @kbd{Mouse-1} to do this sort of 322 However, most applications use @kbd{Mouse-1} to do this sort of
324thing, so Emacs implements this too. If you click @kbd{Mouse-1} 323thing, so Emacs implements this too. If you click @kbd{Mouse-1}
325quickly on a reference or button, it follows or activates. If you 324quickly on a reference or button, it follows or activates. If you
326click slowly, it moves point as usual. Dragging, meaning moving the 325click slowly, it moves point as usual. Dragging, meaning moving the
327mouse while it is held down, also has its usual behavior of setting 326mouse while it is held down, also has its usual behavior of setting
328the region. The variable @code{mouse-1-click-follows-link} controls 327the region.
329whether @kbd{Mouse-1} has this behavior.
330 328
331@vindex mouse-1-click-follows-link 329@vindex mouse-1-click-in-non-selected-windows
332 Normally, the @kbd{Mouse-1} click behavior is performed on links in 330 Normally, the @kbd{Mouse-1} click behavior is performed on links in
333any window. The variable @code{mouse-1-click-in-non-selected-windows} 331any window. The variable @code{mouse-1-click-in-non-selected-windows}
334controls whether @kbd{Mouse-1} has this behavior even in non-selected 332controls whether @kbd{Mouse-1} has this behavior even in non-selected
@@ -342,6 +340,14 @@ whether to do this highlighting always (even when such text appears
342where the mouse already is), never, or only immediately after you move 340where the mouse already is), never, or only immediately after you move
343the mouse. 341the mouse.
344 342
343@vindex mouse-1-click-follows-link
344 In Emacs versions before 22, only @kbd{Mouse-2} follows links and
345@kbd{Mouse-1} always sets points. If you prefer this behavior, set
346the variable @code{mouse-1-click-follows-link} to @code{nil}. This
347variable also lets you choose various other alternatives for following
348links with the mouse. Type @kbd{C-h v mouse-1-click-follows-link @key{RET}}
349for more details.
350
345@node Menu Mouse Clicks 351@node Menu Mouse Clicks
346@section Mouse Clicks for Menus 352@section Mouse Clicks for Menus
347 353
@@ -963,19 +969,25 @@ value. If Emacs is built with a Gtk+ version that has only one file dialog,
963the setting of this variable has no effect. 969the setting of this variable has no effect.
964 970
965@node Tooltips 971@node Tooltips
966@section Tooltips (or ``Balloon Help'') 972@section Tooltips
967 973
968@cindex balloon help 974 Tooltips are small windows that display text information at the
969 Tooltips are small X windows displaying a help string at the current 975current mouse position. They activate when there is a pause in mouse
970mouse position, typically over text---including the mode line---which 976movement.
971can be activated with the mouse or other keys. (This facility is 977
972sometimes known as @dfn{balloon help}.) Help text may be available for 978There are two types of tooltip: help tooltips and GUD tooltips.
973menu items too. 979
980Help tooltips typically display over text--including the mode
981line--but may be also available for many other parts of the Emacs
982frame such as the toolbar and menu items.
974 983
975@findex tooltip-mode 984@findex tooltip-mode
976 You can toggle Tooltip mode with the command @kbd{M-x tooltip-mode}. 985 You can toggle help tooltips (Tooltip mode) with the command
977When Tooltip mode is disabled, the help text is displayed in the echo 986@kbd{M-x tooltip-mode}. When Tooltip mode is disabled, the help text
978area instead. 987is displayed in the echo area instead.
988
989GUD tooltips are useful when you are debugging a
990program. @xref{Debugger Operation}.
979 991
980@vindex tooltip-delay 992@vindex tooltip-delay
981 The variables @code{tooltip-delay} specifies how long Emacs should 993 The variables @code{tooltip-delay} specifies how long Emacs should
diff --git a/src/ChangeLog b/src/ChangeLog
index 02a81fb7f7c..a8e248a1718 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,85 @@
12005-05-09 Juanma Barranquero <lekktu@gmail.com>
2
3 * fileio.c (Fexpand_file_name, Frename_file, Fadd_name_to_file)
4 (Fmake_symbolic_link, Faccess_file, Frecent_auto_save_p):
5 Doc fixes.
6
7 * dired.c (Ffile_name_completion): Make argument name
8 match its use in docstring.
9
102005-05-08 Luc Teirlinck <teirllm@auburn.edu>
11
12 * eval.c (Fdefvaralias): Remove any pre-existing
13 variable-documentation property of the alias.
14
152005-05-07 Thien-Thi Nguyen <ttn@gnu.org>
16
17 * xfns.c (start_hourglass): Do nothing when running on a tty.
18
192005-05-07 Juanma Barranquero <lekktu@gmail.com>
20
21 * fns.c (Fchar_table_range): Fix typos in docstring.
22
232005-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
24
25 * fns.c (Fchar_table_range): Yet Another Int/Lisp_Object Mixup.
26
272005-05-06 Eli Zaretskii <eliz@gnu.org>
28
29 * lread.c (Flocate_file_internal): Doc fix.
30
31 * Makefile.in (lisp, shortlisp): Add jka-cmpr-hook.elc.
32
332005-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
34
35 * macselect.c (x_own_selection): Accept Lisp string as result of
36 selection converter function.
37 (x_clear_frame_selections): Don't call x-lost-selection-functions
38 if Emacs is not owner of the selection.
39 (Vmac_services_selection): Put variable and initialization in
40 #ifdef MAC_OSX.
41 (syms_of_macselect) [MAC_OSX]: Set default value of
42 Vmac_services_selection to PRIMARY.
43
44 * macterm.c (toolkit_scroll_bar_interaction): Remove unused variable.
45 (mac_handle_tool_bar_click): Remove unused function and declaration.
46 [USE_TOOLKIT_SCROLL_BARS] (scroll_bar_timer_callback)
47 (install_scroll_bar_timer, set_scroll_bar_timer)
48 (control_part_code_to_scroll_bar_part, construct_scroll_bar_click)
49 (get_control_part_bound, x_scroll_bar_handle_press)
50 (x_scroll_bar_handle_release, x_scroll_bar_handle_drag)
51 (x_set_toolkit_scroll_bar_thumb): New functions and declarations.
52 [USE_TOOLKIT_SCROLL_BARS] (last_scroll_bar_part, scroll_bar_timer)
53 (scroll_bar_timer_event_posted_p): New variables.
54 [USE_TOOLKIT_SCROLL_BARS] (SCROLL_BAR_FIRST_DELAY)
55 (SCROLL_BAR_CONTINUOUS_DELAY): New macros.
56 (x_scroll_bar_create): Set control reference with NewControl.
57 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS]:
58 Initialize track_top and track_height to nil.
59 (x_scroll_bar_set_handle, x_scroll_bar_note_movement):
60 Put functions in #ifndef USE_TOOLKIT_SCROLL_BARS.
61 (XTset_vertical_scroll_bar): Don't make space between scroll bar
62 and associated window.
63 (XTset_vertical_scroll_bar) [MAC_OSX]: Get scroll bar area width
64 from window config.
65 (XTset_vertical_scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
66 Set track_top and track_height to nil when scroll bar size is changed.
67 Recalculate them if they are nil.
68 (XTread_socket) [MAC_OSX]: Use control kind to determine if the
69 clicked control is a scroll bar.
70 (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Use toolkit scroll bar
71 event handler functions. Don't add modifiers to scroll bar click
72 events. Call scroll bar release handler when window is deactivated.
73 (mac_initialize): Remove unused code for X toolkit.
74 (syms_of_macterm) [!USE_TOOLKIT_SCROLL_BARS]:
75 Initialize Vx_toolkit_scroll_bars to nil.
76
77 * macterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS]:
78 New members track_top and track_height.
79
80 * sysselect.h [DARWIN || MAC_OSX]: Temporarily undefine
81 init_process when including sys/select.h.
82
12005-05-05 Luc Teirlinck <teirllm@auburn.edu> 832005-05-05 Luc Teirlinck <teirllm@auburn.edu>
2 84
3 * eval.c (Fdefvaralias): Doc fix. 85 * eval.c (Fdefvaralias): Doc fix.
@@ -61,7 +143,7 @@
612005-05-01 Kim F. Storm <storm@cua.dk> 1432005-05-01 Kim F. Storm <storm@cua.dk>
62 144
63 * xdisp.c (move_it_in_display_line_to): Stop if we move beyond 145 * xdisp.c (move_it_in_display_line_to): Stop if we move beyond
64 TO_CHARPOS. This may happen if last glyphs was an image or stretch 146 TO_CHARPOS. This may happen if last glyphs was an image or stretch
65 glyph. 147 glyph.
66 148
672005-05-01 Luc Teirlinck <teirllm@auburn.edu> 1492005-05-01 Luc Teirlinck <teirllm@auburn.edu>
@@ -73,7 +155,7 @@
73 * xmenu.c [not HAVE_X_TOOLKIT] (xmenu_show): 155 * xmenu.c [not HAVE_X_TOOLKIT] (xmenu_show):
74 If user cancels the menu, quit unless FOR_CLICK. 156 If user cancels the menu, quit unless FOR_CLICK.
75 157
76 * macros.c (Vexecuting_kbd_macro): Renamed from Vexecuting_macro. 158 * macros.c (Vexecuting_kbd_macro): Rename from Vexecuting_macro.
77 All uses changed. 159 All uses changed.
78 (syms_of_macros): Define only executing-kbd-macro, not executing-macro. 160 (syms_of_macros): Define only executing-kbd-macro, not executing-macro.
79 * keyboard.c: Change Vexecuting_macro to Vexecuting_kbd_macro. 161 * keyboard.c: Change Vexecuting_macro to Vexecuting_kbd_macro.
@@ -95,8 +177,7 @@
95 177
962005-04-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 1782005-04-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
97 179
98 * mac.c: Don't include time.h. Include sysselect.h after 180 * mac.c: Don't include time.h. Include sysselect.h after systime.h.
99 systime.h.
100 181
101 * macfns.c (Fx_server_version): Add BLOCK_INPUT around Gestalt. 182 * macfns.c (Fx_server_version): Add BLOCK_INPUT around Gestalt.
102 183
@@ -159,13 +240,12 @@
159 (mac.o): Depend on ccl.h. 240 (mac.o): Depend on ccl.h.
160 (macselect.o): New target. 241 (macselect.o): New target.
161 242
162 * emacs.c (main) [MAC_OS8 || MAC_OSX && HAVE_CARBON]: Call 243 * emacs.c (main) [MAC_OS8 || MAC_OSX && HAVE_CARBON]:
163 syms_of_macselect. 244 Call syms_of_macselect.
164 245
165 * frame.c (Fdelete_frame) [MAC_OS]: Call x_clear_frame_selections. 246 * frame.c (Fdelete_frame) [MAC_OS]: Call x_clear_frame_selections.
166 247
167 * mac.c [!TARGET_API_MAC_CARBON]: Don't include charset.h or 248 * mac.c [!TARGET_API_MAC_CARBON]: Don't include charset.h or coding.h.
168 coding.h.
169 (QCLIPBOARD): Remove variable. 249 (QCLIPBOARD): Remove variable.
170 (syms_of_mac): Don't initialize it. 250 (syms_of_mac): Don't initialize it.
171 (Fmac_paste_function, Fmac_cut_function, Fx_selection_exists_p): 251 (Fmac_paste_function, Fmac_cut_function, Fx_selection_exists_p):
@@ -179,10 +259,10 @@
179 [TARGET_API_MAC_CARBON] (Fmac_code_convert_string): Likewise. 259 [TARGET_API_MAC_CARBON] (Fmac_code_convert_string): Likewise.
180 (syms_of_mac) [TARGET_API_MAC_CARBON]: Defsubr it. 260 (syms_of_mac) [TARGET_API_MAC_CARBON]: Defsubr it.
181 261
182 * macterm.c (handling_window_update, terminate_flag): Remove 262 * macterm.c (handling_window_update, terminate_flag):
183 variables. 263 Remove variables.
184 (do_window_update, do_ae_quit_application, XTread_socket): Don't 264 (do_window_update, do_ae_quit_application, XTread_socket):
185 use them. 265 Don't use them.
186 (WNE_SLEEP_AT_SUSPEND, WNE_SLEEP_AT_RESUME): Don't define. 266 (WNE_SLEEP_AT_SUSPEND, WNE_SLEEP_AT_RESUME): Don't define.
187 [USE_CARBON_EVENTS && MAC_OSX] (mac_handle_service_event) 267 [USE_CARBON_EVENTS && MAC_OSX] (mac_handle_service_event)
188 (init_service_handler): Move to macselect.c. Remove declarations. 268 (init_service_handler): Move to macselect.c. Remove declarations.
@@ -277,8 +357,8 @@
277 Make a sub-chartable with correct initial value. 357 Make a sub-chartable with correct initial value.
278 358
279 * fns.c (Fset_char_table_range): Don't set slots used as default 359 * fns.c (Fset_char_table_range): Don't set slots used as default
280 values for ascii, eight-bit-control, eight-bit-graphic. Don't 360 values for ascii, eight-bit-control, eight-bit-graphic.
281 call Faref with charset-id. 361 Don't call Faref with charset-id.
282 (Fset_char_table_default): Document how to treat normal character 362 (Fset_char_table_default): Document how to treat normal character
283 argument. Handle special slots used as default values of ascii, 363 argument. Handle special slots used as default values of ascii,
284 eight-bit-control, eight-bit-control. Make a sub chartable if 364 eight-bit-control, eight-bit-control. Make a sub chartable if
@@ -313,8 +393,8 @@
313 create_text_encoding_info_alist instead. 393 create_text_encoding_info_alist instead.
314 (init_font_name_table) [TARGET_API_MAC_CARBON]: Use Font Manager 394 (init_font_name_table) [TARGET_API_MAC_CARBON]: Use Font Manager
315 routines also on Mac OS Classic. 395 routines also on Mac OS Classic.
316 (init_font_name_table) [!TARGET_API_MAC_CARBON]: Use 396 (init_font_name_table) [!TARGET_API_MAC_CARBON]:
317 add_font_name_table_entry. 397 Use add_font_name_table_entry.
318 (mac_do_list_fonts): Regard 0 in XLFD scaleble fields as 398 (mac_do_list_fonts): Regard 0 in XLFD scaleble fields as
319 specified. Derive unspecified scalable fields from specified one. 399 specified. Derive unspecified scalable fields from specified one.
320 (x_list_fonts): Consider Valternate_fontname_alist. 400 (x_list_fonts): Consider Valternate_fontname_alist.
@@ -412,8 +492,7 @@
412 492
413 * mac.c: Include charset.h and coding.h. 493 * mac.c: Include charset.h and coding.h.
414 [TARGET_API_MAC_CARBON] (Qutf_8): Remove extern. 494 [TARGET_API_MAC_CARBON] (Qutf_8): Remove extern.
415 [TARGET_API_MAC_CARBON] (cfstring_create_with_string): New 495 [TARGET_API_MAC_CARBON] (cfstring_create_with_string): New function.
416 function.
417 [TARGET_API_MAC_CARBON] (Fmac_get_preference): Use it. 496 [TARGET_API_MAC_CARBON] (Fmac_get_preference): Use it.
418 497
419 * macfns.c [TARGET_API_MAC_CARBON] (Fx_file_dialog): Likewise. 498 * macfns.c [TARGET_API_MAC_CARBON] (Fx_file_dialog): Likewise.
@@ -422,8 +501,8 @@
422 501
423 * macterm.c (x_autoselect_window_p): Remove variable. 502 * macterm.c (x_autoselect_window_p): Remove variable.
424 (last_window): New variable. 503 (last_window): New variable.
425 (XTreassert_line_highlight, x_change_line_highlight): Remove 504 (XTreassert_line_highlight, x_change_line_highlight):
426 declarations. 505 Remove declarations.
427 (mac_focus_changed, x_detect_focus_change): New functions and 506 (mac_focus_changed, x_detect_focus_change): New functions and
428 declarations. 507 declarations.
429 (XTextExtents16, front_emacs_window): Remove function. 508 (XTextExtents16, front_emacs_window): Remove function.
@@ -436,8 +515,8 @@
436 (XTread_socket): Move its contents here. Generate select-window 515 (XTread_socket): Move its contents here. Generate select-window
437 event on mouse movement if needed. Use x_detect_focus_change on 516 event on mouse movement if needed. Use x_detect_focus_change on
438 activate/deactivate events. Don't deiconify frame or invalidate 517 activate/deactivate events. Don't deiconify frame or invalidate
439 window rectangle when dnd items are dropped. Don't 518 window rectangle when dnd items are dropped.
440 activate/deactivate root control. 519 Don't activate/deactivate root control.
441 (frame_highlight, frame_unhighlight): Activate/deactivate root 520 (frame_highlight, frame_unhighlight): Activate/deactivate root
442 control here. 521 control here.
443 (syms_of_macterm): Delete DEFVAR_BOOL for x_autoselect_window_p. 522 (syms_of_macterm): Delete DEFVAR_BOOL for x_autoselect_window_p.
@@ -453,17 +532,17 @@
453 532
4542005-04-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 5332005-04-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
455 534
456 * mac.c [!TARGET_API_MAC_CARBON]: Include MacLocales.h. Don't 535 * mac.c [!TARGET_API_MAC_CARBON]: Include MacLocales.h.
457 include TextEncodingConverter.h. 536 Don't include TextEncodingConverter.h.
458 (mac_system_script_code, Vmac_system_locale): New variables. 537 (mac_system_script_code, Vmac_system_locale): New variables.
459 (syms_of_mac): Defvar them. 538 (syms_of_mac): Defvar them.
460 (mac_get_system_locale): New function. 539 (mac_get_system_locale): New function.
461 540
462 * macfns.c (x_set_name, x_set_title) [!TARGET_API_MAC_CARBON]: Use 541 * macfns.c (x_set_name, x_set_title) [!TARGET_API_MAC_CARBON]:
463 ENCODE_SYSTEM to encode title bar string. 542 Use ENCODE_SYSTEM to encode title bar string.
464 (x_create_tip_frame): Apply 2005-03-18 change for xfns.c. 543 (x_create_tip_frame): Apply 2005-03-18 change for xfns.c.
465 (Fx_file_dialog) [TARGET_API_MAC_CARBON && !MAC_OSX]: Use 544 (Fx_file_dialog) [TARGET_API_MAC_CARBON && !MAC_OSX]:
466 CFStringGetSystemEncoding to get system default string encoding. 545 Use CFStringGetSystemEncoding to get system default string encoding.
467 546
468 * macterm.c [!TARGET_API_MAC_CARBON]: Don't include 547 * macterm.c [!TARGET_API_MAC_CARBON]: Don't include
469 TextEncodingConverter.h. 548 TextEncodingConverter.h.
@@ -1080,7 +1159,7 @@
1080 * xdisp.c (init_from_display_pos): Don't read past end of 1159 * xdisp.c (init_from_display_pos): Don't read past end of
1081 it->overlay_strings array. 1160 it->overlay_strings array.
1082 1161
10832005-02-25 Stephan Stahl <stahl@eos.franken.de> (tiny change) 11622005-02-25 Stephan Stahl <stahl@eos.franken.de> (tiny change)
1084 1163
1085 * buffer.c (syms_of_buffer): Fix typo. 1164 * buffer.c (syms_of_buffer): Fix typo.
1086 1165
@@ -1110,7 +1189,7 @@
1110 I think those asserts are bogus if buffer contains invisible text 1189 I think those asserts are bogus if buffer contains invisible text
1111 or images. 1190 or images.
1112 1191
11132005-02-21 David Kastrup <dak@gnu.org> 11922005-02-21 David Kastrup <dak@gnu.org>
1114 1193
1115 * gtkutil.c (xg_create_frame_widgets): UNBLOCK_INPUT on error. 1194 * gtkutil.c (xg_create_frame_widgets): UNBLOCK_INPUT on error.
1116 1195
@@ -3710,7 +3789,7 @@
3710 compositions to encode. 3789 compositions to encode.
3711 (encode_coding_string): Likewise. Free composition data. 3790 (encode_coding_string): Likewise. Free composition data.
3712 3791
37132004-09-30 Florian Weimer <fw@deneb.enyo.de> 37922004-09-30 Florian Weimer <fw@deneb.enyo.de>
3714 3793
3715 * coding.c (code_convert_region): Free composition data. 3794 * coding.c (code_convert_region): Free composition data.
3716 3795
@@ -4248,7 +4327,7 @@
4248 * xfns.c (x_icon_verify): New function. 4327 * xfns.c (x_icon_verify): New function.
4249 (Fx_create_frame): Use it. 4328 (Fx_create_frame): Use it.
4250 4329
42512004-07-22 Barry Fishman <barry_fishman@att.net> (tiny change) 43302004-07-22 Barry Fishman <barry_fishman@att.net> (tiny change)
4252 4331
4253 * s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined. 4332 * s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined.
4254 4333
@@ -5911,7 +5990,7 @@
5911 * xdisp.c (note_mode_line_or_margin_highlight): Accept HEADER_LINE 5990 * xdisp.c (note_mode_line_or_margin_highlight): Accept HEADER_LINE
5912 when keymap and cursor are setup. 5991 when keymap and cursor are setup.
5913 5992
59142004-03-14 Steven Tamm <steventamm@mac.com> 59932004-03-14 Steven Tamm <steventamm@mac.com>
5915 5994
5916 * Makefile.in (XMENU_OBJ) [HAVE_CARBON]: Do not include xmenu.o. 5995 * Makefile.in (XMENU_OBJ) [HAVE_CARBON]: Do not include xmenu.o.
5917 5996
@@ -5973,7 +6052,7 @@
5973 (GTK_OBJ) [USE_GTK]: New declaration. 6052 (GTK_OBJ) [USE_GTK]: New declaration.
5974 (obj): Add $(GTK_OBJ) to list. 6053 (obj): Add $(GTK_OBJ) to list.
5975 6054
59762004-03-11 Steven Tamm <steventamm@mac.com> 60552004-03-11 Steven Tamm <steventamm@mac.com>
5977 6056
5978 * image.c [MAC_OSX]: Include sys/stat.h. 6057 * image.c [MAC_OSX]: Include sys/stat.h.
5979 6058
diff --git a/src/Makefile.in b/src/Makefile.in
index a7013ce4de5..3407f9024ef 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -784,6 +784,7 @@ lisp= \
784 ${lispsource}textmodes/paragraphs.elc \ 784 ${lispsource}textmodes/paragraphs.elc \
785 ${lispsource}textmodes/text-mode.elc \ 785 ${lispsource}textmodes/text-mode.elc \
786 ${lispsource}emacs-lisp/timer.elc \ 786 ${lispsource}emacs-lisp/timer.elc \
787 ${lispsource}jka-cmpr-hook.elc \
787 ${lispsource}vc-hooks.elc \ 788 ${lispsource}vc-hooks.elc \
788 ${lispsource}ediff-hook.elc \ 789 ${lispsource}ediff-hook.elc \
789 TOOLTIP_SUPPORT \ 790 TOOLTIP_SUPPORT \
@@ -878,6 +879,7 @@ shortlisp= \
878 ../lisp/textmodes/text-mode.elc \ 879 ../lisp/textmodes/text-mode.elc \
879 ../lisp/emacs-lisp/timer.elc \ 880 ../lisp/emacs-lisp/timer.elc \
880 ../lisp/vc-hooks.elc \ 881 ../lisp/vc-hooks.elc \
882 ../lisp/jka-cmpr-hook.elc \
881 ../lisp/ediff-hook.elc \ 883 ../lisp/ediff-hook.elc \
882 ../lisp/widget.elc \ 884 ../lisp/widget.elc \
883 ../lisp/window.elc \ 885 ../lisp/window.elc \
diff --git a/src/dired.c b/src/dired.c
index 87b48ba2d78..349154e1ac0 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -400,7 +400,7 @@ DEFUN ("file-name-completion", Ffile_name_completion, Sfile_name_completion,
400Returns the longest string 400Returns the longest string
401common to all file names in DIRECTORY that start with FILE. 401common to all file names in DIRECTORY that start with FILE.
402If there is only one and FILE matches it exactly, returns t. 402If there is only one and FILE matches it exactly, returns t.
403Returns nil if DIR contains no name starting with FILE. 403Returns nil if DIRECTORY contains no name starting with FILE.
404 404
405This function ignores some of the possible completions as 405This function ignores some of the possible completions as
406determined by the variable `completion-ignored-extensions', which see. */) 406determined by the variable `completion-ignored-extensions', which see. */)
diff --git a/src/eval.c b/src/eval.c
index 8b6c1885727..7f043daa555 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -747,6 +747,8 @@ The return value is ALIASED. */)
747 LOADHIST_ATTACH (symbol); 747 LOADHIST_ATTACH (symbol);
748 if (!NILP (docstring)) 748 if (!NILP (docstring))
749 Fput (symbol, Qvariable_documentation, docstring); 749 Fput (symbol, Qvariable_documentation, docstring);
750 else
751 Fput (symbol, Qvariable_documentation, Qnil);
750 752
751 return aliased; 753 return aliased;
752} 754}
diff --git a/src/fileio.c b/src/fileio.c
index d8a0a5a729f..b62dac5b3d7 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1022,7 +1022,7 @@ DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0,
1022 doc: /* Convert filename NAME to absolute, and canonicalize it. 1022 doc: /* Convert filename NAME to absolute, and canonicalize it.
1023Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative 1023Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
1024\(does not start with slash); if DEFAULT-DIRECTORY is nil or missing, 1024\(does not start with slash); if DEFAULT-DIRECTORY is nil or missing,
1025the current buffer's value of default-directory is used. 1025the current buffer's value of `default-directory' is used.
1026File name components that are `.' are removed, and 1026File name components that are `.' are removed, and
1027so are file name components followed by `..', along with the `..' itself; 1027so are file name components followed by `..', along with the `..' itself;
1028note that these simplifications are done without checking the resulting 1028note that these simplifications are done without checking the resulting
@@ -2708,7 +2708,7 @@ internal_delete_file (filename)
2708 2708
2709DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, 2709DEFUN ("rename-file", Frename_file, Srename_file, 2, 3,
2710 "fRename file: \nGRename %s to file: \np", 2710 "fRename file: \nGRename %s to file: \np",
2711 doc: /* Rename FILE as NEWNAME. Both args strings. 2711 doc: /* Rename FILE as NEWNAME. Both args must be strings.
2712If file has names other than FILE, it continues to have those names. 2712If file has names other than FILE, it continues to have those names.
2713Signals a `file-already-exists' error if a file NEWNAME already exists 2713Signals a `file-already-exists' error if a file NEWNAME already exists
2714unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2714unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
@@ -2797,7 +2797,7 @@ This is what happens in interactive use with M-x. */)
2797 2797
2798DEFUN ("add-name-to-file", Fadd_name_to_file, Sadd_name_to_file, 2, 3, 2798DEFUN ("add-name-to-file", Fadd_name_to_file, Sadd_name_to_file, 2, 3,
2799 "fAdd name to file: \nGName to add to %s: \np", 2799 "fAdd name to file: \nGName to add to %s: \np",
2800 doc: /* Give FILE additional name NEWNAME. Both args strings. 2800 doc: /* Give FILE additional name NEWNAME. Both args must be strings.
2801Signals a `file-already-exists' error if a file NEWNAME already exists 2801Signals a `file-already-exists' error if a file NEWNAME already exists
2802unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2802unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2803A number as third arg means request confirmation if NEWNAME already exists. 2803A number as third arg means request confirmation if NEWNAME already exists.
@@ -2864,7 +2864,7 @@ This is what happens in interactive use with M-x. */)
2864#ifdef S_IFLNK 2864#ifdef S_IFLNK
2865DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, 2865DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
2866 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", 2866 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np",
2867 doc: /* Make a symbolic link to FILENAME, named LINKNAME. Both args strings. 2867 doc: /* Make a symbolic link to FILENAME, named LINKNAME. Both args must be strings.
2868Signals a `file-already-exists' error if a file LINKNAME already exists 2868Signals a `file-already-exists' error if a file LINKNAME already exists
2869unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2869unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2870A number as third arg means request confirmation if LINKNAME already exists. 2870A number as third arg means request confirmation if LINKNAME already exists.
@@ -3209,7 +3209,7 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0,
3209DEFUN ("access-file", Faccess_file, Saccess_file, 2, 2, 0, 3209DEFUN ("access-file", Faccess_file, Saccess_file, 2, 2, 0,
3210 doc: /* Access file FILENAME, and get an error if that does not work. 3210 doc: /* Access file FILENAME, and get an error if that does not work.
3211The second argument STRING is used in the error message. 3211The second argument STRING is used in the error message.
3212If there is no error, we return nil. */) 3212If there is no error, returns nil. */)
3213 (filename, string) 3213 (filename, string)
3214 Lisp_Object filename, string; 3214 Lisp_Object filename, string;
3215{ 3215{
@@ -6038,7 +6038,7 @@ DEFUN ("clear-buffer-auto-save-failure", Fclear_buffer_auto_save_failure,
6038 6038
6039DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p, 6039DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p,
6040 0, 0, 0, 6040 0, 0, 0,
6041 doc: /* Return t if buffer has been auto-saved since last read in or saved. */) 6041 doc: /* Return t if current buffer has been auto-saved since last read in or saved. */)
6042 () 6042 ()
6043{ 6043{
6044 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil; 6044 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil;
diff --git a/src/fns.c b/src/fns.c
index f0dff278117..216852f893e 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2536,19 +2536,19 @@ char_table_range (table, from, to, defalt)
2536 error ("Characters in the range have inconsistent values"); 2536 error ("Characters in the range have inconsistent values");
2537 } 2537 }
2538 return val; 2538 return val;
2539} 2539}
2540 2540
2541 2541
2542DEFUN ("char-table-range", Fchar_table_range, Schar_table_range, 2542DEFUN ("char-table-range", Fchar_table_range, Schar_table_range,
2543 2, 2, 0, 2543 2, 2, 0,
2544 doc: /* Return the value in CHAR-TABLE for a range of characters RANGE. 2544 doc: /* Return the value in CHAR-TABLE for a range of characters RANGE.
2545RANGE should be nil (for the default value) 2545RANGE should be nil (for the default value),
2546a vector which identifies a character set or a row of a character set, 2546a vector which identifies a character set or a row of a character set,
2547a character set name, or a character code. 2547a character set name, or a character code.
2548If the characters in the specified range have different values, 2548If the characters in the specified range have different values,
2549an error is signalled. 2549an error is signalled.
2550 2550
2551Note that this function doesn't check the parent of CHAR_TABLE. */) 2551Note that this function doesn't check the parent of CHAR-TABLE. */)
2552 (char_table, range) 2552 (char_table, range)
2553 Lisp_Object char_table, range; 2553 Lisp_Object char_table, range;
2554{ 2554{
@@ -2582,7 +2582,7 @@ Note that this function doesn't check the parent of CHAR_TABLE. */)
2582 { 2582 {
2583 size = ASIZE (range); 2583 size = ASIZE (range);
2584 if (size == 0) 2584 if (size == 0)
2585 args_out_of_range (range, 0); 2585 args_out_of_range (range, make_number (0));
2586 CHECK_NUMBER (AREF (range, 0)); 2586 CHECK_NUMBER (AREF (range, 0));
2587 charset_id = XINT (AREF (range, 0)); 2587 charset_id = XINT (AREF (range, 0));
2588 if (size > 1) 2588 if (size > 1)
@@ -2631,7 +2631,7 @@ Note that this function doesn't check the parent of CHAR_TABLE. */)
2631 current_default = XCHAR_TABLE (char_table)->contents[defalt]; 2631 current_default = XCHAR_TABLE (char_table)->contents[defalt];
2632 return char_table_range (char_table, from, to, current_default); 2632 return char_table_range (char_table, from, to, current_default);
2633 } 2633 }
2634 2634
2635 val = XCHAR_TABLE (char_table)->contents[128 + charset_id]; 2635 val = XCHAR_TABLE (char_table)->contents[128 + charset_id];
2636 if (! SUB_CHAR_TABLE_P (val)) 2636 if (! SUB_CHAR_TABLE_P (val))
2637 return (NILP (val) ? current_default : val); 2637 return (NILP (val) ? current_default : val);
diff --git a/src/lread.c b/src/lread.c
index 869e95a00e0..ffc7d87d977 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1006,6 +1006,7 @@ complete_filename_p (pathname)
1006 1006
1007DEFUN ("locate-file-internal", Flocate_file_internal, Slocate_file_internal, 2, 4, 0, 1007DEFUN ("locate-file-internal", Flocate_file_internal, Slocate_file_internal, 2, 4, 0,
1008 doc: /* Search for FILENAME through PATH. 1008 doc: /* Search for FILENAME through PATH.
1009Returns the file's name in absolute form, or nil if not found.
1009If SUFFIXES is non-nil, it should be a list of suffixes to append to 1010If SUFFIXES is non-nil, it should be a list of suffixes to append to
1010file name when searching. 1011file name when searching.
1011If non-nil, PREDICATE is used instead of `file-readable-p'. 1012If non-nil, PREDICATE is used instead of `file-readable-p'.
diff --git a/src/macselect.c b/src/macselect.c
index 49246f7eddc..a115c9b3229 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -98,8 +98,10 @@ static Lisp_Object Vselection_converter_alist;
98 selection type with a scrap flavor type via `mac-ostype'. */ 98 selection type with a scrap flavor type via `mac-ostype'. */
99static Lisp_Object Qmac_scrap_name, Qmac_ostype; 99static Lisp_Object Qmac_scrap_name, Qmac_ostype;
100 100
101#ifdef MAC_OSX
101/* Selection name for communication via Services menu. */ 102/* Selection name for communication via Services menu. */
102static Lisp_Object Vmac_services_selection; 103static Lisp_Object Vmac_services_selection;
104#endif
103 105
104/* Get a reference to the scrap corresponding to the symbol SYM. The 106/* Get a reference to the scrap corresponding to the symbol SYM. The
105 reference is set to *SCRAP, and it becomes NULL if there's no 107 reference is set to *SCRAP, and it becomes NULL if there's no
@@ -455,9 +457,11 @@ x_own_selection (selection_name, selection_value)
455 value = call3 (handler_fn, selection_name, 457 value = call3 (handler_fn, selection_name,
456 type, selection_value); 458 type, selection_value);
457 459
458 if (CONSP (value) 460 if (STRINGP (value))
459 && EQ (XCAR (value), type) 461 err = put_scrap_string (scrap, type, value);
460 && STRINGP (XCDR (value))) 462 else if (CONSP (value)
463 && EQ (XCAR (value), type)
464 && STRINGP (XCDR (value)))
461 err = put_scrap_string (scrap, type, XCDR (value)); 465 err = put_scrap_string (scrap, type, XCDR (value));
462 } 466 }
463 467
@@ -622,7 +626,8 @@ x_clear_frame_selections (f)
622 hooks = Vx_lost_selection_functions; 626 hooks = Vx_lost_selection_functions;
623 selection_symbol = Fcar (Fcar (Vselection_alist)); 627 selection_symbol = Fcar (Fcar (Vselection_alist));
624 628
625 if (!EQ (hooks, Qunbound)) 629 if (!EQ (hooks, Qunbound)
630 && !NILP (Fx_selection_owner_p (selection_symbol)))
626 { 631 {
627 for (; CONSP (hooks); hooks = Fcdr (hooks)) 632 for (; CONSP (hooks); hooks = Fcdr (hooks))
628 call1 (Fcar (hooks), selection_symbol); 633 call1 (Fcar (hooks), selection_symbol);
@@ -646,7 +651,8 @@ x_clear_frame_selections (f)
646 hooks = Vx_lost_selection_functions; 651 hooks = Vx_lost_selection_functions;
647 selection_symbol = Fcar (Fcar (XCDR (rest))); 652 selection_symbol = Fcar (Fcar (XCDR (rest)));
648 653
649 if (!EQ (hooks, Qunbound)) 654 if (!EQ (hooks, Qunbound)
655 && !NILP (Fx_selection_owner_p (selection_symbol)))
650 { 656 {
651 for (; CONSP (hooks); hooks = Fcdr (hooks)) 657 for (; CONSP (hooks); hooks = Fcdr (hooks))
652 call1 (Fcar (hooks), selection_symbol); 658 call1 (Fcar (hooks), selection_symbol);
diff --git a/src/macterm.c b/src/macterm.c
index aeb990a80e7..1e8aba4e178 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -154,10 +154,6 @@ extern int waiting_for_input;
154 154
155struct frame *pending_autoraise_frame; 155struct frame *pending_autoraise_frame;
156 156
157/* Non-zero means user is interacting with a toolkit scroll bar. */
158
159static int toolkit_scroll_bar_interaction;
160
161/* Mouse movement. 157/* Mouse movement.
162 158
163 Formerly, we used PointerMotionHintMask (in standard_event_mask) 159 Formerly, we used PointerMotionHintMask (in standard_event_mask)
@@ -256,7 +252,6 @@ QDGlobals qd; /* QuickDraw global information structure. */
256struct frame * x_window_to_frame (struct mac_display_info *, WindowPtr); 252struct frame * x_window_to_frame (struct mac_display_info *, WindowPtr);
257struct mac_display_info *mac_display_info_for_display (Display *); 253struct mac_display_info *mac_display_info_for_display (Display *);
258static void x_update_window_end P_ ((struct window *, int, int)); 254static void x_update_window_end P_ ((struct window *, int, int));
259static void mac_handle_tool_bar_click P_ ((struct frame *, EventRecord *));
260static int x_io_error_quitter P_ ((Display *)); 255static int x_io_error_quitter P_ ((Display *));
261int x_catch_errors P_ ((Display *)); 256int x_catch_errors P_ ((Display *));
262void x_uncatch_errors P_ ((Display *, int)); 257void x_uncatch_errors P_ ((Display *, int));
@@ -4131,30 +4126,316 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time)
4131} 4126}
4132 4127
4133 4128
4134/*********************************************************************** 4129/************************************************************************
4135 Tool-bars 4130 Toolkit scroll bars
4136 ***********************************************************************/ 4131 ************************************************************************/
4132
4133#ifdef USE_TOOLKIT_SCROLL_BARS
4134
4135static pascal void scroll_bar_timer_callback P_ ((EventLoopTimerRef, void *));
4136static OSStatus install_scroll_bar_timer P_ ((void));
4137static OSStatus set_scroll_bar_timer P_ ((EventTimerInterval));
4138static int control_part_code_to_scroll_bar_part P_((ControlPartCode));
4139static void construct_scroll_bar_click P_ ((struct scroll_bar *, int,
4140 unsigned long,
4141 struct input_event *));
4142static OSErr get_control_part_bound P_((ControlHandle, ControlPartCode,
4143 Rect *));
4144static void x_scroll_bar_handle_press P_ ((struct scroll_bar *,
4145 ControlPartCode,
4146 unsigned long,
4147 struct input_event *));
4148static void x_scroll_bar_handle_release P_ ((struct scroll_bar *,
4149 unsigned long,
4150 struct input_event *));
4151static void x_scroll_bar_handle_drag P_ ((WindowPtr, struct scroll_bar *,
4152 Point, unsigned long,
4153 struct input_event *));
4154static void x_set_toolkit_scroll_bar_thumb P_ ((struct scroll_bar *,
4155 int, int, int));
4156
4157/* Last scroll bar part sent in x_scroll_bar_handle_*. */
4158
4159static int last_scroll_bar_part;
4160
4161static EventLoopTimerRef scroll_bar_timer;
4162
4163static int scroll_bar_timer_event_posted_p;
4164
4165#define SCROLL_BAR_FIRST_DELAY 0.5
4166#define SCROLL_BAR_CONTINUOUS_DELAY (1.0 / 15)
4167
4168static pascal void
4169scroll_bar_timer_callback (timer, data)
4170 EventLoopTimerRef timer;
4171 void *data;
4172{
4173 EventRef event = NULL;
4174 OSErr err;
4175
4176 err = CreateEvent (NULL, kEventClassMouse, kEventMouseMoved, 0,
4177 kEventAttributeNone, &event);
4178 if (err == noErr)
4179 {
4180 Point mouse_pos;
4181
4182 GetMouse (&mouse_pos);
4183 LocalToGlobal (&mouse_pos);
4184 err = SetEventParameter (event, kEventParamMouseLocation, typeQDPoint,
4185 sizeof (Point), &mouse_pos);
4186 }
4187 if (err == noErr)
4188 {
4189 UInt32 modifiers = GetCurrentKeyModifiers ();
4190
4191 err = SetEventParameter (event, kEventParamKeyModifiers, typeUInt32,
4192 sizeof (UInt32), &modifiers);
4193 }
4194 if (err == noErr)
4195 err = PostEventToQueue (GetCurrentEventQueue (), event,
4196 kEventPriorityStandard);
4197 if (err == noErr)
4198 scroll_bar_timer_event_posted_p = 1;
4137 4199
4138/* Handle mouse button event on the tool-bar of frame F, at 4200 if (event)
4139 frame-relative coordinates X/Y. EVENT_TYPE is either ButtionPress 4201 ReleaseEvent (event);
4140 or ButtonRelase. */ 4202}
4203
4204static OSStatus
4205install_scroll_bar_timer ()
4206{
4207 static EventLoopTimerUPP scroll_bar_timer_callbackUPP = NULL;
4208
4209 if (scroll_bar_timer_callbackUPP == NULL)
4210 scroll_bar_timer_callbackUPP =
4211 NewEventLoopTimerUPP (scroll_bar_timer_callback);
4212
4213 if (scroll_bar_timer == NULL)
4214 /* Mac OS X and CarbonLib 1.5 and later allow us to specify
4215 kEventDurationForever as delays. */
4216 return
4217 InstallEventLoopTimer (GetCurrentEventLoop (),
4218 kEventDurationForever, kEventDurationForever,
4219 scroll_bar_timer_callbackUPP, NULL,
4220 &scroll_bar_timer);
4221}
4222
4223static OSStatus
4224set_scroll_bar_timer (delay)
4225 EventTimerInterval delay;
4226{
4227 if (scroll_bar_timer == NULL)
4228 install_scroll_bar_timer ();
4229
4230 scroll_bar_timer_event_posted_p = 0;
4231
4232 return SetEventLoopTimerNextFireTime (scroll_bar_timer, delay);
4233}
4234
4235static int
4236control_part_code_to_scroll_bar_part (part_code)
4237 ControlPartCode part_code;
4238{
4239 switch (part_code)
4240 {
4241 case kControlUpButtonPart: return scroll_bar_up_arrow;
4242 case kControlDownButtonPart: return scroll_bar_down_arrow;
4243 case kControlPageUpPart: return scroll_bar_above_handle;
4244 case kControlPageDownPart: return scroll_bar_below_handle;
4245 case kControlIndicatorPart: return scroll_bar_handle;
4246 }
4247
4248 return -1;
4249}
4141 4250
4142static void 4251static void
4143mac_handle_tool_bar_click (f, button_event) 4252construct_scroll_bar_click (bar, part, timestamp, bufp)
4144 struct frame *f; 4253 struct scroll_bar *bar;
4145 EventRecord *button_event; 4254 int part;
4255 unsigned long timestamp;
4256 struct input_event *bufp;
4257{
4258 bufp->kind = SCROLL_BAR_CLICK_EVENT;
4259 bufp->frame_or_window = bar->window;
4260 bufp->arg = Qnil;
4261 bufp->part = part;
4262 bufp->code = 0;
4263 bufp->timestamp = timestamp;
4264 XSETINT (bufp->x, 0);
4265 XSETINT (bufp->y, 0);
4266 bufp->modifiers = 0;
4267}
4268
4269static OSErr
4270get_control_part_bound (ch, part_code, rect)
4271 ControlHandle ch;
4272 ControlPartCode part_code;
4273 Rect *rect;
4274{
4275 RgnHandle region = NewRgn ();
4276 OSStatus err;
4277
4278 err = GetControlRegion (ch, part_code, region);
4279 if (err == noErr)
4280 GetRegionBounds (region, rect);
4281 DisposeRgn (region);
4282
4283 return err;
4284}
4285
4286static void
4287x_scroll_bar_handle_press (bar, part_code, timestamp, bufp)
4288 struct scroll_bar *bar;
4289 ControlPartCode part_code;
4290 unsigned long timestamp;
4291 struct input_event *bufp;
4292{
4293 int part = control_part_code_to_scroll_bar_part (part_code);
4294
4295 if (part < 0)
4296 return;
4297
4298 if (part != scroll_bar_handle)
4299 {
4300 construct_scroll_bar_click (bar, part, timestamp, bufp);
4301 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code);
4302 set_scroll_bar_timer (SCROLL_BAR_FIRST_DELAY);
4303 }
4304
4305 last_scroll_bar_part = part;
4306 bar->dragging = Qnil;
4307 tracked_scroll_bar = bar;
4308}
4309
4310static void
4311x_scroll_bar_handle_release (bar, timestamp, bufp)
4312 struct scroll_bar *bar;
4313 unsigned long timestamp;
4314 struct input_event *bufp;
4315{
4316 if (last_scroll_bar_part != scroll_bar_handle
4317 || !GC_NILP (bar->dragging))
4318 construct_scroll_bar_click (bar, scroll_bar_end_scroll, timestamp, bufp);
4319
4320 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0);
4321 set_scroll_bar_timer (kEventDurationForever);
4322
4323 last_scroll_bar_part = -1;
4324 bar->dragging = Qnil;
4325 tracked_scroll_bar = NULL;
4326}
4327
4328static void
4329x_scroll_bar_handle_drag (win, bar, mouse_pos, timestamp, bufp)
4330 WindowPtr win;
4331 struct scroll_bar *bar;
4332 Point mouse_pos;
4333 unsigned long timestamp;
4334 struct input_event *bufp;
4335{
4336 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
4337
4338 if (last_scroll_bar_part == scroll_bar_handle)
4339 {
4340 int top, top_range;
4341 Rect r;
4342
4343 get_control_part_bound (SCROLL_BAR_CONTROL_HANDLE (bar),
4344 kControlIndicatorPart, &r);
4345
4346 if (GC_NILP (bar->dragging))
4347 XSETINT (bar->dragging, mouse_pos.v - r.top);
4348
4349 top = mouse_pos.v - XINT (bar->dragging) - XINT (bar->track_top);
4350 top_range = (XINT (bar->track_height) - (r.bottom - r.top)) *
4351 (1.0 + (float) GetControlViewSize (ch) / GetControl32BitMaximum (ch))
4352 + .5;
4353
4354 if (top < 0)
4355 top = 0;
4356 if (top > top_range)
4357 top = top_range;
4358
4359 construct_scroll_bar_click (bar, scroll_bar_handle, timestamp, bufp);
4360 XSETINT (bufp->x, top);
4361 XSETINT (bufp->y, top_range);
4362 }
4363 else
4364 {
4365 ControlPartCode part_code;
4366 int unhilite_p = 0, part;
4367
4368 if (ch != FindControlUnderMouse (mouse_pos, win, &part_code))
4369 unhilite_p = 1;
4370 else
4371 {
4372 part = control_part_code_to_scroll_bar_part (part_code);
4373
4374 switch (last_scroll_bar_part)
4375 {
4376 case scroll_bar_above_handle:
4377 case scroll_bar_below_handle:
4378 if (part != scroll_bar_above_handle
4379 && part != scroll_bar_below_handle)
4380 unhilite_p = 1;
4381 break;
4382
4383 case scroll_bar_up_arrow:
4384 case scroll_bar_down_arrow:
4385 if (part != scroll_bar_up_arrow
4386 && part != scroll_bar_down_arrow)
4387 unhilite_p = 1;
4388 break;
4389 }
4390 }
4391
4392 if (unhilite_p)
4393 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), 0);
4394 else if (part != last_scroll_bar_part
4395 || scroll_bar_timer_event_posted_p)
4396 {
4397 construct_scroll_bar_click (bar, part, timestamp, bufp);
4398 last_scroll_bar_part = part;
4399 HiliteControl (SCROLL_BAR_CONTROL_HANDLE (bar), part_code);
4400 set_scroll_bar_timer (SCROLL_BAR_CONTINUOUS_DELAY);
4401 }
4402 }
4403}
4404
4405/* Set the thumb size and position of scroll bar BAR. We are currently
4406 displaying PORTION out of a whole WHOLE, and our position POSITION. */
4407
4408static void
4409x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
4410 struct scroll_bar *bar;
4411 int portion, position, whole;
4146{ 4412{
4147 int x = button_event->where.h; 4413 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
4148 int y = button_event->where.v;
4149 4414
4150 if (button_event->what == mouseDown) 4415 int value, viewsize, maximum;
4151 handle_tool_bar_click (f, x, y, 1, 0); 4416
4417 if (whole == 0 || XINT (bar->track_height) == 0)
4418 value = 0, viewsize = 1, maximum = 0;
4152 else 4419 else
4153 handle_tool_bar_click (f, x, y, 0, 4420 {
4154 x_mac_to_emacs_modifiers (FRAME_MAC_DISPLAY_INFO (f), 4421 value = position;
4155 button_event->modifiers)); 4422 viewsize = portion;
4423 maximum = max (0, whole - portion);
4424 }
4425
4426 BLOCK_INPUT;
4427
4428 SetControl32BitMinimum (ch, 0);
4429 SetControl32BitMaximum (ch, maximum);
4430 SetControl32BitValue (ch, value);
4431 SetControlViewSize (ch, viewsize);
4432
4433 UNBLOCK_INPUT;
4156} 4434}
4157 4435
4436#endif /* USE_TOOLKIT_SCROLL_BARS */
4437
4438
4158 4439
4159/************************************************************************ 4440/************************************************************************
4160 Scroll bars, general 4441 Scroll bars, general
@@ -4185,13 +4466,12 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height)
4185 4466
4186#if TARGET_API_MAC_CARBON 4467#if TARGET_API_MAC_CARBON
4187 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0, 4468 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0,
4188 kControlScrollBarProc, 0L); 4469 kControlScrollBarProc, (long) bar);
4189#else 4470#else
4190 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0, scrollBarProc, 4471 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 1, 0, 0, 0,
4191 0L); 4472 scrollBarProc, (long) bar);
4192#endif 4473#endif
4193 SET_SCROLL_BAR_CONTROL_HANDLE (bar, ch); 4474 SET_SCROLL_BAR_CONTROL_HANDLE (bar, ch);
4194 SetControlReference (ch, (long) bar);
4195 4475
4196 XSETWINDOW (bar->window, w); 4476 XSETWINDOW (bar->window, w);
4197 XSETINT (bar->top, top); 4477 XSETINT (bar->top, top);
@@ -4201,6 +4481,10 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height)
4201 XSETINT (bar->start, 0); 4481 XSETINT (bar->start, 0);
4202 XSETINT (bar->end, 0); 4482 XSETINT (bar->end, 0);
4203 bar->dragging = Qnil; 4483 bar->dragging = Qnil;
4484#ifdef USE_TOOLKIT_SCROLL_BARS
4485 bar->track_top = Qnil;
4486 bar->track_height = Qnil;
4487#endif
4204 4488
4205 /* Add bar to its frame's list of scroll bars. */ 4489 /* Add bar to its frame's list of scroll bars. */
4206 bar->next = FRAME_SCROLL_BARS (f); 4490 bar->next = FRAME_SCROLL_BARS (f);
@@ -4227,6 +4511,8 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height)
4227 the bar's top is as far down as it goes; otherwise, there's no way 4511 the bar's top is as far down as it goes; otherwise, there's no way
4228 to move to the very end of the buffer. */ 4512 to move to the very end of the buffer. */
4229 4513
4514#ifndef USE_TOOLKIT_SCROLL_BARS
4515
4230static void 4516static void
4231x_scroll_bar_set_handle (bar, start, end, rebuild) 4517x_scroll_bar_set_handle (bar, start, end, rebuild)
4232 struct scroll_bar *bar; 4518 struct scroll_bar *bar;
@@ -4286,6 +4572,7 @@ x_scroll_bar_set_handle (bar, start, end, rebuild)
4286 UNBLOCK_INPUT; 4572 UNBLOCK_INPUT;
4287} 4573}
4288 4574
4575#endif /* !USE_TOOLKIT_SCROLL_BARS */
4289 4576
4290/* Destroy scroll bar BAR, and set its Emacs window's scroll bar to 4577/* Destroy scroll bar BAR, and set its Emacs window's scroll bar to
4291 nil. */ 4578 nil. */
@@ -4324,11 +4611,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
4324 /* Get window dimensions. */ 4611 /* Get window dimensions. */
4325 window_box (w, -1, 0, &window_y, 0, &window_height); 4612 window_box (w, -1, 0, &window_y, 0, &window_height);
4326 top = window_y; 4613 top = window_y;
4327#ifdef MAC_OSX
4328 width = 16;
4329#else
4330 width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f); 4614 width = WINDOW_CONFIG_SCROLL_BAR_COLS (w) * FRAME_COLUMN_WIDTH (f);
4331#endif
4332 height = window_height; 4615 height = window_height;
4333 4616
4334 /* Compute the left edge of the scroll bar area. */ 4617 /* Compute the left edge of the scroll bar area. */
@@ -4343,9 +4626,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
4343 4626
4344 /* Compute the left edge of the scroll bar. */ 4627 /* Compute the left edge of the scroll bar. */
4345 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) 4628 if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))
4346 sb_left = left + width - sb_width - (width - sb_width) / 2; 4629 sb_left = left;
4347 else 4630 else
4348 sb_left = left + (width - sb_width) / 2; 4631 sb_left = left + width - sb_width;
4349 4632
4350 /* Adjustments according to Inside Macintosh to make it look nice */ 4633 /* Adjustments according to Inside Macintosh to make it look nice */
4351 disp_top = top; 4634 disp_top = top;
@@ -4418,11 +4701,44 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
4418 XSETINT (bar->top, top); 4701 XSETINT (bar->top, top);
4419 XSETINT (bar->width, sb_width); 4702 XSETINT (bar->width, sb_width);
4420 XSETINT (bar->height, height); 4703 XSETINT (bar->height, height);
4704#ifdef USE_TOOLKIT_SCROLL_BARS
4705 bar->track_top = Qnil;
4706 bar->track_height = Qnil;
4707#endif
4421 } 4708 }
4422 4709
4423 UNBLOCK_INPUT; 4710 UNBLOCK_INPUT;
4424 } 4711 }
4425 4712
4713#ifdef USE_TOOLKIT_SCROLL_BARS
4714 if (NILP (bar->track_top))
4715 {
4716 ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar);
4717 Rect r0, r1;
4718
4719 BLOCK_INPUT;
4720
4721 SetControl32BitMinimum (ch, 0);
4722 SetControl32BitMaximum (ch, 1);
4723 SetControlViewSize (ch, 1);
4724
4725 /* Move the scroll bar thumb to the top. */
4726 SetControl32BitValue (ch, 0);
4727 get_control_part_bound (ch, kControlIndicatorPart, &r0);
4728
4729 /* Move the scroll bar thumb to the bottom. */
4730 SetControl32BitValue (ch, 1);
4731 get_control_part_bound (ch, kControlIndicatorPart, &r1);
4732
4733 UnionRect (&r0, &r1, &r0);
4734 XSETINT (bar->track_top, r0.top);
4735 XSETINT (bar->track_height, r0.bottom - r0.top);
4736
4737 UNBLOCK_INPUT;
4738 }
4739
4740 x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole);
4741#else /* not USE_TOOLKIT_SCROLL_BARS */
4426 /* Set the scroll bar's current state, unless we're currently being 4742 /* Set the scroll bar's current state, unless we're currently being
4427 dragged. */ 4743 dragged. */
4428 if (NILP (bar->dragging)) 4744 if (NILP (bar->dragging))
@@ -4438,6 +4754,7 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
4438 x_scroll_bar_set_handle (bar, start, end, 0); 4754 x_scroll_bar_set_handle (bar, start, end, 0);
4439 } 4755 }
4440 } 4756 }
4757#endif /* not USE_TOOLKIT_SCROLL_BARS */
4441} 4758}
4442 4759
4443 4760
@@ -4619,6 +4936,7 @@ x_scroll_bar_handle_click (bar, part_code, er, bufp)
4619 XSETINT (bufp->y, top_range); 4936 XSETINT (bufp->y, top_range);
4620} 4937}
4621 4938
4939#ifndef USE_TOOLKIT_SCROLL_BARS
4622 4940
4623/* Handle some mouse motion while someone is dragging the scroll bar. 4941/* Handle some mouse motion while someone is dragging the scroll bar.
4624 4942
@@ -4653,6 +4971,7 @@ x_scroll_bar_note_movement (bar, y_pos, t)
4653 } 4971 }
4654} 4972}
4655 4973
4974#endif /* !USE_TOOLKIT_SCROLL_BARS */
4656 4975
4657/* Return information to the user about the current position of the 4976/* Return information to the user about the current position of the
4658 mouse on the scroll bar. */ 4977 mouse on the scroll bar. */
@@ -8657,6 +8976,9 @@ XTread_socket (sd, expected, hold_quit)
8657 SInt16 control_part_code; 8976 SInt16 control_part_code;
8658 ControlHandle ch; 8977 ControlHandle ch;
8659 Point mouse_loc = er.where; 8978 Point mouse_loc = er.where;
8979#ifdef MAC_OSX
8980 ControlKind control_kind;
8981#endif
8660 8982
8661 f = mac_window_to_frame (window_ptr); 8983 f = mac_window_to_frame (window_ptr);
8662 /* convert to local coordinates of new window */ 8984 /* convert to local coordinates of new window */
@@ -8666,6 +8988,10 @@ XTread_socket (sd, expected, hold_quit)
8666#if TARGET_API_MAC_CARBON 8988#if TARGET_API_MAC_CARBON
8667 ch = FindControlUnderMouse (mouse_loc, window_ptr, 8989 ch = FindControlUnderMouse (mouse_loc, window_ptr,
8668 &control_part_code); 8990 &control_part_code);
8991#ifdef MAC_OSX
8992 if (ch)
8993 GetControlKind (ch, &control_kind);
8994#endif
8669#else 8995#else
8670 control_part_code = FindControl (mouse_loc, window_ptr, 8996 control_part_code = FindControl (mouse_loc, window_ptr,
8671 &ch); 8997 &ch);
@@ -8684,19 +9010,42 @@ XTread_socket (sd, expected, hold_quit)
8684 /* ticks to milliseconds */ 9010 /* ticks to milliseconds */
8685 9011
8686 if (dpyinfo->grabbed && tracked_scroll_bar 9012 if (dpyinfo->grabbed && tracked_scroll_bar
9013 || ch != 0
9014#ifndef USE_TOOLKIT_SCROLL_BARS
8687 /* control_part_code becomes kControlNoPart if 9015 /* control_part_code becomes kControlNoPart if
8688 a progress indicator is clicked. */ 9016 a progress indicator is clicked. */
8689 || ch != 0 && control_part_code != kControlNoPart) 9017 && control_part_code != kControlNoPart
9018#else /* USE_TOOLKIT_SCROLL_BARS */
9019#ifdef MAC_OSX
9020 && control_kind.kind == kControlKindScrollBar
9021#endif /* MAC_OSX */
9022#endif /* USE_TOOLKIT_SCROLL_BARS */
9023 )
8690 { 9024 {
8691 struct scroll_bar *bar; 9025 struct scroll_bar *bar;
8692 9026
8693 if (dpyinfo->grabbed && tracked_scroll_bar) 9027 if (dpyinfo->grabbed && tracked_scroll_bar)
8694 { 9028 {
8695 bar = tracked_scroll_bar; 9029 bar = tracked_scroll_bar;
9030#ifndef USE_TOOLKIT_SCROLL_BARS
8696 control_part_code = kControlIndicatorPart; 9031 control_part_code = kControlIndicatorPart;
9032#endif
8697 } 9033 }
8698 else 9034 else
8699 bar = (struct scroll_bar *) GetControlReference (ch); 9035 bar = (struct scroll_bar *) GetControlReference (ch);
9036#ifdef USE_TOOLKIT_SCROLL_BARS
9037 /* Make the "Ctrl-Mouse-2 splits window" work
9038 for toolkit scroll bars. */
9039 if (er.modifiers & controlKey)
9040 x_scroll_bar_handle_click (bar, control_part_code,
9041 &er, &inev);
9042 else if (er.what == mouseDown)
9043 x_scroll_bar_handle_press (bar, control_part_code,
9044 inev.timestamp, &inev);
9045 else
9046 x_scroll_bar_handle_release (bar, inev.timestamp,
9047 &inev);
9048#else /* not USE_TOOLKIT_SCROLL_BARS */
8700 x_scroll_bar_handle_click (bar, control_part_code, 9049 x_scroll_bar_handle_click (bar, control_part_code,
8701 &er, &inev); 9050 &er, &inev);
8702 if (er.what == mouseDown 9051 if (er.what == mouseDown
@@ -8704,6 +9053,7 @@ XTread_socket (sd, expected, hold_quit)
8704 tracked_scroll_bar = bar; 9053 tracked_scroll_bar = bar;
8705 else 9054 else
8706 tracked_scroll_bar = NULL; 9055 tracked_scroll_bar = NULL;
9056#endif /* not USE_TOOLKIT_SCROLL_BARS */
8707 } 9057 }
8708 else 9058 else
8709 { 9059 {
@@ -8753,15 +9103,18 @@ XTread_socket (sd, expected, hold_quit)
8753 dpyinfo->grabbed &= ~(1 << inev.code); 9103 dpyinfo->grabbed &= ~(1 << inev.code);
8754 } 9104 }
8755 9105
8756 switch (er.what) 9106#ifdef USE_TOOLKIT_SCROLL_BARS
8757 { 9107 if (inev.kind == MOUSE_CLICK_EVENT)
8758 case mouseDown: 9108#endif
8759 inev.modifiers |= down_modifier; 9109 switch (er.what)
8760 break; 9110 {
8761 case mouseUp: 9111 case mouseDown:
8762 inev.modifiers |= up_modifier; 9112 inev.modifiers |= down_modifier;
8763 break; 9113 break;
8764 } 9114 case mouseUp:
9115 inev.modifiers |= up_modifier;
9116 break;
9117 }
8765 } 9118 }
8766 break; 9119 break;
8767 9120
@@ -8863,10 +9216,16 @@ XTread_socket (sd, expected, hold_quit)
8863 GlobalToLocal (&mouse_pos); 9216 GlobalToLocal (&mouse_pos);
8864 9217
8865 if (dpyinfo->grabbed && tracked_scroll_bar) 9218 if (dpyinfo->grabbed && tracked_scroll_bar)
9219#ifdef USE_TOOLKIT_SCROLL_BARS
9220 x_scroll_bar_handle_drag (wp, tracked_scroll_bar,
9221 mouse_pos, er.when * (1000 / 60),
9222 &inev);
9223#else /* not USE_TOOLKIT_SCROLL_BARS */
8866 x_scroll_bar_note_movement (tracked_scroll_bar, 9224 x_scroll_bar_note_movement (tracked_scroll_bar,
8867 mouse_pos.v 9225 mouse_pos.v
8868 - XINT (tracked_scroll_bar->top), 9226 - XINT (tracked_scroll_bar->top),
8869 TickCount() * (1000 / 60)); 9227 er.when * (1000 / 60));
9228#endif /* not USE_TOOLKIT_SCROLL_BARS */
8870 else 9229 else
8871 { 9230 {
8872 /* Generate SELECT_WINDOW_EVENTs when needed. */ 9231 /* Generate SELECT_WINDOW_EVENTs when needed. */
@@ -8941,6 +9300,23 @@ XTread_socket (sd, expected, hold_quit)
8941 else 9300 else
8942 { 9301 {
8943 /* A window has been deactivated */ 9302 /* A window has been deactivated */
9303#if USE_TOOLKIT_SCROLL_BARS
9304 if (dpyinfo->grabbed && tracked_scroll_bar)
9305 {
9306 struct input_event event;
9307
9308 EVENT_INIT (event);
9309 event.kind = NO_EVENT;
9310 x_scroll_bar_handle_release (tracked_scroll_bar,
9311 er.when * (1000 / 60),
9312 &event);
9313 if (event.kind != NO_EVENT)
9314 {
9315 kbd_buffer_store_event_hold (&event, hold_quit);
9316 count++;
9317 }
9318 }
9319#endif
8944 dpyinfo->grabbed = 0; 9320 dpyinfo->grabbed = 0;
8945 9321
8946 x_detect_focus_change (dpyinfo, &er, &inev); 9322 x_detect_focus_change (dpyinfo, &er, &inev);
@@ -9720,42 +10096,6 @@ mac_initialize ()
9720 /* Try to use interrupt input; if we can't, then start polling. */ 10096 /* Try to use interrupt input; if we can't, then start polling. */
9721 Fset_input_mode (Qt, Qnil, Qt, Qnil); 10097 Fset_input_mode (Qt, Qnil, Qt, Qnil);
9722 10098
9723#ifdef USE_X_TOOLKIT
9724 XtToolkitInitialize ();
9725 Xt_app_con = XtCreateApplicationContext ();
9726 XtAppSetFallbackResources (Xt_app_con, Xt_default_resources);
9727
9728 /* Install an asynchronous timer that processes Xt timeout events
9729 every 0.1s. This is necessary because some widget sets use
9730 timeouts internally, for example the LessTif menu bar, or the
9731 Xaw3d scroll bar. When Xt timouts aren't processed, these
9732 widgets don't behave normally. */
9733 {
9734 EMACS_TIME interval;
9735 EMACS_SET_SECS_USECS (interval, 0, 100000);
9736 start_atimer (ATIMER_CONTINUOUS, interval, x_process_timeouts, 0);
9737 }
9738#endif
9739
9740#if USE_TOOLKIT_SCROLL_BARS
9741 xaw3d_arrow_scroll = False;
9742 xaw3d_pick_top = True;
9743#endif
9744
9745#if 0
9746 /* Note that there is no real way portable across R3/R4 to get the
9747 original error handler. */
9748 XSetErrorHandler (x_error_handler);
9749 XSetIOErrorHandler (x_io_error_quitter);
9750
9751 /* Disable Window Change signals; they are handled by X events. */
9752#ifdef SIGWINCH
9753 signal (SIGWINCH, SIG_DFL);
9754#endif /* ! defined (SIGWINCH) */
9755
9756 signal (SIGPIPE, x_connection_signal);
9757#endif
9758
9759 BLOCK_INPUT; 10099 BLOCK_INPUT;
9760 10100
9761#if TARGET_API_MAC_CARBON 10101#if TARGET_API_MAC_CARBON
@@ -9832,7 +10172,11 @@ syms_of_macterm ()
9832 10172
9833 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars, 10173 DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
9834 doc: /* If not nil, Emacs uses toolkit scroll bars. */); 10174 doc: /* If not nil, Emacs uses toolkit scroll bars. */);
10175#ifdef USE_TOOLKIT_SCROLL_BARS
9835 Vx_toolkit_scroll_bars = Qt; 10176 Vx_toolkit_scroll_bars = Qt;
10177#else
10178 Vx_toolkit_scroll_bars = Qnil;
10179#endif
9836 10180
9837 DEFVAR_BOOL ("x-use-underline-position-properties", 10181 DEFVAR_BOOL ("x-use-underline-position-properties",
9838 &x_use_underline_position_properties, 10182 &x_use_underline_position_properties,
diff --git a/src/macterm.h b/src/macterm.h
index 5c724aac7b2..79c78e3f0e0 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -492,6 +492,12 @@ struct scroll_bar {
492 place where the user grabbed it. If the handle isn't currently 492 place where the user grabbed it. If the handle isn't currently
493 being dragged, this is Qnil. */ 493 being dragged, this is Qnil. */
494 Lisp_Object dragging; 494 Lisp_Object dragging;
495
496#ifdef USE_TOOLKIT_SCROLL_BARS
497 /* The position and size of the scroll bar handle track area in
498 pixels, relative to the frame. */
499 Lisp_Object track_top, track_height;
500#endif
495}; 501};
496 502
497/* The number of elements a vector holding a struct scroll_bar needs. */ 503/* The number of elements a vector holding a struct scroll_bar needs. */
diff --git a/src/sysselect.h b/src/sysselect.h
index 4c52bba677a..866a65e9208 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -19,7 +19,13 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */ 19Boston, MA 02111-1307, USA. */
20 20
21#ifdef HAVE_SYS_SELECT_H 21#ifdef HAVE_SYS_SELECT_H
22#if defined (DARWIN) || defined (MAC_OSX)
23#undef init_process
24#endif
22#include <sys/select.h> 25#include <sys/select.h>
26#if defined (DARWIN) || defined (MAC_OSX)
27#define init_process emacs_init_process
28#endif
23#endif 29#endif
24 30
25#ifdef FD_SET 31#ifdef FD_SET
diff --git a/src/xfns.c b/src/xfns.c
index 666acfec773..4a5ff0894f1 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4388,6 +4388,10 @@ start_hourglass ()
4388 EMACS_TIME delay; 4388 EMACS_TIME delay;
4389 int secs, usecs = 0; 4389 int secs, usecs = 0;
4390 4390
4391 /* Don't bother for ttys. */
4392 if (NILP (Vwindow_system))
4393 return;
4394
4391 cancel_hourglass (); 4395 cancel_hourglass ();
4392 4396
4393 if (INTEGERP (Vhourglass_delay) 4397 if (INTEGERP (Vhourglass_delay)