aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-05-16 15:49:27 +0000
committerKaroly Lorentey2005-05-16 15:49:27 +0000
commit35bc5d82600f330082298823f09f53259a90ea81 (patch)
tree328e8f1df7bcd3cb68f4dfa7de371543da885c89
parent133fe4c8a2d944324dc2c9a42b01ab1d258ad49d (diff)
parentcc211a0ff8145e0814413e237bb5674d615968b7 (diff)
downloademacs-35bc5d82600f330082298823f09f53259a90ea81.tar.gz
emacs-35bc5d82600f330082298823f09f53259a90ea81.zip
Merged from miles@gnu.org--gnu-2005 (patch 307-312)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-307 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-308 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-309 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-310 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-311 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-312 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-346
-rw-r--r--admin/FOR-RELEASE3
-rw-r--r--etc/ChangeLog10
-rw-r--r--etc/GNU31
-rw-r--r--etc/NEWS1534
-rw-r--r--lisp/ChangeLog189
-rw-r--r--lisp/calc/calc-ext.el4
-rw-r--r--lisp/calc/calc-prog.el1
-rw-r--r--lisp/calc/calc-store.el141
-rw-r--r--lisp/calendar/solar.el84
-rw-r--r--lisp/dired-aux.el5
-rw-r--r--lisp/dired.el44
-rw-r--r--lisp/dnd.el1
-rw-r--r--lisp/emacs-lisp/bytecomp.el26
-rw-r--r--lisp/emacs-lisp/copyright.el10
-rw-r--r--lisp/emacs-lisp/derived.el4
-rw-r--r--lisp/emacs-lisp/easymenu.el6
-rw-r--r--lisp/emacs-lisp/eldoc.el1
-rw-r--r--lisp/emacs-lisp/lisp-mode.el3
-rw-r--r--lisp/eshell/esh-mode.el3
-rw-r--r--lisp/faces.el21
-rw-r--r--lisp/files.el32
-rw-r--r--lisp/font-lock.el17
-rw-r--r--lisp/help-mode.el12
-rw-r--r--lisp/ibuf-ext.el4
-rw-r--r--lisp/ibuffer.el4
-rw-r--r--lisp/ido.el77
-rw-r--r--lisp/international/latexenc.el1
-rw-r--r--lisp/international/ogonek.el4
-rw-r--r--lisp/language/china-util.el8
-rw-r--r--lisp/language/chinese.el6
-rw-r--r--lisp/language/cyril-util.el2
-rw-r--r--lisp/language/cyrillic.el7
-rw-r--r--lisp/language/devan-util.el6
-rw-r--r--lisp/language/devanagari.el2
-rw-r--r--lisp/language/english.el6
-rw-r--r--lisp/language/ethio-util.el7
-rw-r--r--lisp/language/ethiopic.el6
-rw-r--r--lisp/language/european.el8
-rw-r--r--lisp/language/greek.el5
-rw-r--r--lisp/language/hebrew.el7
-rw-r--r--lisp/language/indian.el5
-rw-r--r--lisp/language/japan-util.el7
-rw-r--r--lisp/language/japanese.el6
-rw-r--r--lisp/language/korea-util.el5
-rw-r--r--lisp/language/korean.el6
-rw-r--r--lisp/language/lao-util.el7
-rw-r--r--lisp/language/lao.el7
-rw-r--r--lisp/language/misc-lang.el5
-rw-r--r--lisp/language/tibet-util.el6
-rw-r--r--lisp/language/tibetan.el6
-rw-r--r--lisp/language/viet-util.el6
-rw-r--r--lisp/language/vietnamese.el6
-rw-r--r--lisp/mail/supercite.el8
-rw-r--r--lisp/net/net-utils.el3
-rw-r--r--lisp/net/tramp.el118
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/progmodes/cc-engine.el3
-rw-r--r--lisp/progmodes/compile.el26
-rw-r--r--lisp/progmodes/gud.el8
-rw-r--r--lisp/progmodes/sh-script.el60
-rw-r--r--lisp/subr.el69
-rw-r--r--lisp/tmm.el5
-rw-r--r--lispref/ChangeLog42
-rw-r--r--lispref/elisp.texi8
-rw-r--r--lispref/loading.texi8
-rw-r--r--lispref/modes.texi538
-rw-r--r--lispref/processes.texi41
-rw-r--r--lispref/tips.texi21
-rw-r--r--lispref/variables.texi174
-rw-r--r--man/ChangeLog44
-rw-r--r--man/basic.texi21
-rw-r--r--man/building.texi18
-rw-r--r--man/calc.texi60
-rw-r--r--man/ediff.texi6
-rw-r--r--man/frames.texi2
-rw-r--r--man/killing.texi2
-rw-r--r--man/major.texi3
-rw-r--r--man/mini.texi11
-rw-r--r--man/trampver.texi2
-rw-r--r--src/ChangeLog22
-rw-r--r--src/alloc.c7
-rw-r--r--src/emacs.c20
-rw-r--r--src/fileio.c51
-rw-r--r--src/process.c7
-rw-r--r--src/xdisp.c10
85 files changed, 2335 insertions, 1499 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index e51573fef61..d159c711672 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -93,9 +93,10 @@ you're going to handle.
93 93
94DIRECTORY STATUS IN CHARGE 94DIRECTORY STATUS IN CHARGE
95--------- ------ --------- 95--------- ------ ---------
96leim working Kenichi Handa
96lisp/emulation working Thien-Thi Nguyen 97lisp/emulation working Thien-Thi Nguyen
97lisp/international done Kenichi Handa 98lisp/international done Kenichi Handa
98lisp/languages working Kenichi Handa 99lisp/languages done Kenichi Handa
99lisp/net working Thien-Thi Nguyen 100lisp/net working Thien-Thi Nguyen
100lisp/play done Thien-Thi Nguyen 101lisp/play done Thien-Thi Nguyen
101lisp/term done Thien-Thi Nguyen 102lisp/term done Thien-Thi Nguyen
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 95f847ac9ee..49935b9a9b3 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,13 @@
12005-05-15 Richard M. Stallman <rms@gnu.org>
2
3 * GNU: Correct/improve previous change.
4
52005-05-14 Richard M. Stallman <rms@gnu.org>
6
7 * GNU: Update footnotes.
8
9 * NEWS: Lots of clarifications and cleanups.
10
12005-05-05 Slawomir Nowaczyk <slawek@cs.lth.se> (tiny change) 112005-05-05 Slawomir Nowaczyk <slawek@cs.lth.se> (tiny change)
2 12
3 * TUTORIAL.pl: Updated header. 13 * TUTORIAL.pl: Updated header.
diff --git a/etc/GNU b/etc/GNU
index 1df59f049ee..4ee6ef03153 100644
--- a/etc/GNU
+++ b/etc/GNU
@@ -1,4 +1,4 @@
1Copyright (C) 1985, 1993, 2003 Free Software Foundation, Inc. 1Copyright (C) 1985, 1993, 2003, 2005 Free Software Foundation, Inc.
2 2
3 Permission is granted to anyone to make or distribute verbatim copies 3 Permission is granted to anyone to make or distribute verbatim copies
4of this document, in any medium, provided that the copyright notice and 4of this document, in any medium, provided that the copyright notice and
@@ -446,7 +446,7 @@ operating systems onto the new hardware.
446 The sale of teaching, hand-holding and maintenance services could 446 The sale of teaching, hand-holding and maintenance services could
447also employ programmers. 447also employ programmers.
448 448
449 People with new ideas could distribute programs as freeware, asking 449 People with new ideas could distribute programs as freeware(7), asking
450for donations from satisfied users, or selling hand-holding services. 450for donations from satisfied users, or selling hand-holding services.
451I have met people who are already working this way successfully. 451I have met people who are already working this way successfully.
452 452
@@ -518,23 +518,26 @@ friends or over the net. But it does suggest the wrong idea.
518 518
519 (3) Several such companies now exist. 519 (3) Several such companies now exist.
520 520
521 (4) The Free Software Foundation raises most of its funds from a 521 (4) The Free Software Foundation raised most of its funds for 10
522distribution service, although it is a charity rather than a company. 522years from a distribution service, although it is a charity rather
523If *no one* chooses to obtain copies by ordering from the FSF, it 523than a company.
524will be unable to do its work. But this does not mean that proprietary
525restrictions are justified to force every user to pay. If a small
526fraction of all the users order copies from the FSF, that is sufficient
527to keep the FSF afloat. So we ask users to choose to support us in
528this way. Have you done your part?
529 524
530 (5) A group of computer companies recently pooled funds to support 525 (5) A group of computer companies pooled funds around 1991 to
531maintenance of the GNU C Compiler. 526support maintenance of the GNU C Compiler.
532 527
533 (6) In the 80s I had not yet realized how confusing it was to speak 528 (6) In the 80s I had not yet realized how confusing it was to speak
534of "the issue" of "intellectual property". That term is obviously 529of "the issue" of "intellectual property". That term is obviously
535biased; more subtle is the fact that it lumps together various 530biased; more subtle is the fact that it lumps together various
536disparate laws which raise very different issues. Nowadays I urge 531disparate laws which raise very different issues. Nowadays I urge
537people to reject the term "intellectual property" entirely, lest it 532people to reject the term "intellectual property" entirely, lest it
538lead others to suppose this is one coherent issue. The way to be 533lead others to suppose that those laws form one coherent issue. The way to be
539clear is to to discuss patents, copyrights, and trademarks separately. 534clear is to to discuss patents, copyrights, and trademarks separately.
540See http://www.gnu.org/philosophy/words-to-avoid.html. \ No newline at end of file 535See http://www.gnu.org/philosophy/not-ipr.xhtml for more explanation
536of how this term spreads confusion and bias.
537
538 (7) In 1985 I had not yet recognized the importance of distinguishing
539between "free software" and "freeware". The term "freeware" means
540software you are free to redistribute, but usually you are not free to study
541and change the source code, so most of it is not free software.
542See http://www.gnu.org/philosophy/words-to-avoid.html for more
543explanation.
diff --git a/etc/NEWS b/etc/NEWS
index e0375dd8439..7061be5d71d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -31,7 +31,7 @@ when you run configure. This requires Gtk+ 2.0 or newer. This port
31provides a way to display multilingual text in menus (with some caveats). 31provides a way to display multilingual text in menus (with some caveats).
32 32
33--- 33---
34** The `emacsserver' program has been removed, replaced with elisp code. 34** The `emacsserver' program has been removed, replaced with Lisp code.
35 35
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
@@ -677,14 +677,8 @@ elements are deleted.
677When the file is maintained under version control, that information 677When the file is maintained under version control, that information
678appears between the position information and the major mode. 678appears between the position information and the major mode.
679 679
680*** Easy to overlook single character negation is now font-locked.
681You can use the new variable `font-lock-negation-char-face' and the face of
682the same name to customize this. Currently the cc-modes, sh-script-mode,
683cperl-mode and make-mode support this.
684
685+++ 680+++
686*** Control characters and escape glyphs are now shown in the new 681*** New face `escape-glyph' highlights control characters and escape glyphs.
687escape-glyph face.
688 682
689+++ 683+++
690*** Non-breaking space and hyphens are now prefixed with an escape 684*** Non-breaking space and hyphens are now prefixed with an escape
@@ -820,6 +814,16 @@ font-lock now highlights any such open-paren-in-column-zero in bold-red
820if it is inside a string or a comment, to indicate that it can cause 814if it is inside a string or a comment, to indicate that it can cause
821trouble with fontification and/or indentation. 815trouble with fontification and/or indentation.
822 816
817+++
818*** New standard font-lock face `font-lock-preprocessor-face'.
819
820*** New standard font-lock face `font-lock-comment-delimiter-face'.
821
822*** Easy to overlook single character negation is now font-locked.
823You can use the new variable `font-lock-negation-char-face' and the face of
824the same name to customize this. Currently the cc-modes, sh-script-mode,
825cperl-mode and make-mode support this.
826
823--- 827---
824*** The default settings for JIT stealth lock parameters are changed. 828*** The default settings for JIT stealth lock parameters are changed.
825The default value for the user option jit-lock-stealth-time is now 16 829The default value for the user option jit-lock-stealth-time is now 16
@@ -952,9 +956,11 @@ variable mouse-drag-copy-region to nil.
952(rather than a fixed number of lines) and the scrolling is `progressive'. 956(rather than a fixed number of lines) and the scrolling is `progressive'.
953 957
954--- 958---
955*** Unexpected yanking of text due to accidental clicking on the mouse 959*** Emacs ignores mouse-2 clicks while the mouse wheel is being moved.
956wheel button (typically mouse-2) during wheel scrolling is now avoided. 960
957This behavior can be customized via the mouse-wheel-click-event and 961People tend to push the mouse wheel (which counts as a mouse-2 click)
962unintentionally while turning the wheel, so these clicks are now
963ignored. You can customize this with the mouse-wheel-click-event and
958mouse-wheel-inhibit-click-time variables. 964mouse-wheel-inhibit-click-time variables.
959 965
960+++ 966+++
@@ -1277,6 +1283,15 @@ buffer causes automatic display in another window of the corresponding
1277matches, compilation errors, etc. This minor mode can be toggled with 1283matches, compilation errors, etc. This minor mode can be toggled with
1278C-c C-f. 1284C-c C-f.
1279 1285
1286*** When the left fringe is displayed, an arrow points to current message in
1287the compilation buffer.
1288
1289*** The new variable `compilation-context-lines' controls lines of leading
1290context before the current message. If nil and the left fringe is displayed,
1291it doesn't scroll the compilation output window. If there is no left fringe,
1292no arrow is displayed and a value of nil means display the message at the top
1293of the window.
1294
1280** Occur mode changes: 1295** Occur mode changes:
1281 1296
1282+++ 1297+++
@@ -1424,10 +1439,6 @@ colors as on X.
1424* New Modes and Packages in Emacs 22.1 1439* New Modes and Packages in Emacs 22.1
1425 1440
1426+++ 1441+++
1427** New package benchmark.el contains simple support for convenient
1428timing measurements of code (including the garbage collection component).
1429
1430+++
1431** Filesets are collections of files. You can define a fileset in 1442** Filesets are collections of files. You can define a fileset in
1432various ways, such as based on a directory tree or based on 1443various ways, such as based on a directory tree or based on
1433program files that include other program files. 1444program files that include other program files.
@@ -1445,16 +1456,20 @@ type "C-h i m calc RET" to read that manual. A reference card is
1445available in `etc/calccard.tex' and `etc/calccard.ps'. 1456available in `etc/calccard.tex' and `etc/calccard.ps'.
1446 1457
1447--- 1458---
1448** `cfengine-mode' is a major mode for editing GNU Cfengine 1459** The new package ibuffer provides a powerful, completely
1449configuration files. 1460customizable replacement for buff-menu.el.
1461
1462---
1463** Ido mode is now part of the Emacs distribution.
1464
1465The ido (interactively do) package is an extension of the iswitchb
1466package to do interactive opening of files and directories in addition
1467to interactive buffer switching. Ido is a superset of iswitchb (with
1468a few exceptions), so don't enable both packages.
1450 1469
1451+++ 1470+++
1452** The new package conf-mode.el handles thousands of configuration files, with 1471** Image files are normally visited in Image mode, which lets you toggle
1453varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, 1472between viewing the image and viewing the text using C-c C-c.
1454var : value, var value or keyword var value) and sections ([section] or
1455section { }). Many files under /etc/, or with suffixes like .cf through
1456.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are
1457recognized.
1458 1473
1459--- 1474---
1460** CUA mode is now part of the Emacs distribution. 1475** CUA mode is now part of the Emacs distribution.
@@ -1518,28 +1533,6 @@ be displayed by customizing the variable `file-name-shadow-properties'.
1518** The new package flymake.el does on-the-fly syntax checking of program 1533** The new package flymake.el does on-the-fly syntax checking of program
1519source files. See the Flymake's Info manual for more details. 1534source files. See the Flymake's Info manual for more details.
1520 1535
1521---
1522** The new Lisp library fringe.el controls the appearance of fringes.
1523
1524---
1525** GDB-Script-mode is used for files like .gdbinit.
1526
1527---
1528** The new package ibuffer provides a powerful, completely
1529customizable replacement for buff-menu.el.
1530
1531---
1532** Ido mode is now part of the Emacs distribution.
1533
1534The ido (interactively do) package is an extension of the iswitchb
1535package to do interactive opening of files and directories in addition
1536to interactive buffer switching. Ido is a superset of iswitchb (with
1537a few exceptions), so don't enable both packages.
1538
1539+++
1540** Image files are normally visited in Image mode, which lets you toggle
1541between viewing the image and viewing the text using C-c C-c.
1542
1543+++ 1536+++
1544** The new keypad setup package provides several common bindings for 1537** The new keypad setup package provides several common bindings for
1545the numeric keypad which is available on most keyboards. The numeric 1538the numeric keypad which is available on most keyboards. The numeric
@@ -1599,6 +1592,15 @@ Keyboard macros can now be debugged and edited interactively.
1599C-x C-k SPC steps through the last keyboard macro one key sequence 1592C-x C-k SPC steps through the last keyboard macro one key sequence
1600at a time, prompting for the actions to take. 1593at a time, prompting for the actions to take.
1601 1594
1595---
1596** New minor mode, Visible mode, toggles invisibility in the current buffer.
1597When enabled, it makes all invisible text visible. When disabled, it
1598restores the previous value of `buffer-invisibility-spec'.
1599
1600+++
1601** The wdired.el package allows you to use normal editing commands on Dired
1602buffers to change filenames, permissions, etc...
1603
1602+++ 1604+++
1603** The new package longlines.el provides a minor mode for editing text 1605** The new package longlines.el provides a minor mode for editing text
1604files composed of long lines, based on the `use-hard-newlines' 1606files composed of long lines, based on the `use-hard-newlines'
@@ -1619,9 +1621,6 @@ ghostview, use ghostscript to print (if you don't have a PostScript
1619printer) or send directly to printer a PostScript code generated by 1621printer) or send directly to printer a PostScript code generated by
1620`ps-print' package. Use M-x pr-help for more information. 1622`ps-print' package. Use M-x pr-help for more information.
1621 1623
1622+++
1623** The new python.el package is used to edit Python and Jython programs.
1624
1625--- 1624---
1626** The minor mode Reveal mode makes text visible on the fly as you 1625** The minor mode Reveal mode makes text visible on the fly as you
1627move your cursor into hidden regions of the buffer. 1626move your cursor into hidden regions of the buffer.
@@ -1679,119 +1678,72 @@ If you want to disable Tramp you should set
1679 (setq tramp-default-method "ftp") 1678 (setq tramp-default-method "ftp")
1680 1679
1681--- 1680---
1682** The library tree-widget.el provides a new widget to display a set
1683of hierarchical data as an outline. For example, the tree-widget is
1684well suited to display a hierarchy of directories and files.
1685
1686---
1687** The URL package (which had been part of W3) is now part of Emacs. 1681** The URL package (which had been part of W3) is now part of Emacs.
1688 1682
1689--- 1683---
1690** New minor mode, Visible mode, toggles invisibility in the current buffer. 1684** `cfengine-mode' is a major mode for editing GNU Cfengine
1691When enabled, it makes all invisible text visible. When disabled, it 1685configuration files.
1692restores the previous value of `buffer-invisibility-spec'.
1693 1686
1694+++ 1687+++
1695** The wdired.el package allows you to use normal editing commands on Dired 1688** The new package conf-mode.el handles thousands of configuration files, with
1696buffers to change filenames, permissions, etc... 1689varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value,
1690var : value, var value or keyword var value) and sections ([section] or
1691section { }). Many files under /etc/, or with suffixes like .cf through
1692.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are
1693recognized.
1697 1694
1698--- 1695---
1699** The TCL package tcl-mode.el was replaced by tcl.el. 1696** GDB-Script-mode is used for files like .gdbinit.
1700This was actually done in Emacs-21.1, and was not documented.
1701
1702** The new package bindat.el provides functions to unpack and pack
1703binary data structures, such as network packets, to and from Lisp
1704data structures.
1705 1697
1706+++ 1698+++
1707** The new package button.el implements simple and fast `clickable buttons' 1699** The new python.el package is used to edit Python and Jython programs.
1708in emacs buffers. `buttons' are much lighter-weight than the `widgets'
1709implemented by widget.el, and can be used by lisp code that doesn't
1710require the full power of widgets. Emacs uses buttons for such things
1711as help and apropos buffers.
1712 1700
1713--- 1701---
1714** master-mode.el implements a minor mode for scrolling a slave 1702** The TCL package tcl-mode.el was replaced by tcl.el.
1715buffer without leaving your current buffer, the master buffer. 1703This was actually done in Emacs-21.1, and was not documented.
1716
1717It can be used by sql.el, for example: the SQL buffer is the master
1718and its SQLi buffer is the slave. This allows you to scroll the SQLi
1719buffer containing the output from the SQL buffer containing the
1720commands.
1721
1722This is how to use sql.el and master.el together: the variable
1723sql-buffer contains the slave buffer. It is a local variable in the
1724SQL buffer.
1725
1726(add-hook 'sql-mode-hook
1727 (function (lambda ()
1728 (master-mode t)
1729 (master-set-slave sql-buffer))))
1730(add-hook 'sql-set-sqli-hook
1731 (function (lambda ()
1732 (master-set-slave sql-buffer))))
1733
1734+++
1735** New Lisp library testcover.el works with edebug to help you determine
1736whether you've tested all your Lisp code. Function testcover-start
1737instruments all functions in a given file. Then test your code. Function
1738testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to
1739show where coverage is lacking. Command testcover-next-mark (bind it to
1740a key!) will move point forward to the next spot that has a splotch.
1741
1742Normally, a red splotch indicates the form was never completely
1743evaluated; a brown splotch means it always evaluated to the same
1744value. The red splotches are skipped for forms that can't possibly
1745complete their evaluation, such as `error'. The brown splotches are
1746skipped for forms that are expected to always evaluate to the same
1747value, such as (setq x 14).
1748
1749For difficult cases, you can add do-nothing macros to your code to
1750help out the test coverage tool. The macro `noreturn' suppresses a
1751red splotch. It is an error if the argument to `noreturn' does
1752return. The macro 1value suppresses a brown splotch for its argument.
1753This macro is a no-op except during test-coverage -- then it signals
1754an error if the argument actually returns differing values.
1755 1704
1756* Changes in Specialized Modes and Packages in Emacs 22.1: 1705* Changes in Specialized Modes and Packages in Emacs 22.1:
1757 1706
1758** Makefile mode has now been split up into specialized modes for automake, 1707** Makefile mode has submodes for automake, gmake, makepp and BSD make.
1759gmake, makepp and BSD make. The former two couldn't be differentiated before, 1708
1760and the latter two are new. Font-locking is robust now and offers new 1709The former two couldn't be differentiated before, and the latter two
1761customizable faces. 1710are new. Font-locking is robust now and offers new customizable
1711faces.
1762 1712
1763+++ 1713+++
1764** In Outline mode, hide-body no longer hides lines at the top 1714** In Outline mode, `hide-body' no longer hides lines at the top
1765of the file that precede the first header line. 1715of the file that precede the first header line.
1766 1716
1767+++ 1717+++
1768** Telnet now prompts you for a port number with C-u M-x telnet. 1718** Telnet now prompts you for a port number with C-u M-x telnet.
1769 1719
1770--- 1720---
1771** The terminal emulation code in term.el has been improved, it can 1721** The terminal emulation code in term.el has been improved; it can
1772run most curses applications now. 1722run most curses applications now.
1773 1723
1774+++ 1724+++
1775** M-x diff uses diff-mode instead of compilation-mode. 1725** M-x diff uses Diff mode instead of Compilation mode.
1776 1726
1777+++ 1727+++
1778** You can now customize fill-nobreak-predicate to control where 1728** You can now customize `fill-nobreak-predicate' to control where
1779filling can break lines. The value is now normally a list of 1729filling can break lines. The value is now normally a list of
1780functions, but it can also be a single function, for compatibility. 1730functions, but it can also be a single function, for compatibility.
1781 1731
1782We provide two sample predicates, fill-single-word-nobreak-p and 1732Emacs provide two predicates, `fill-single-word-nobreak-p' and
1783fill-french-nobreak-p, for use in the value of fill-nobreak-predicate. 1733`fill-french-nobreak-p', for use as the value of
1734`fill-nobreak-predicate'.
1784 1735
1785--- 1736---
1786** M-x view-file and commands that use it now avoid interfering 1737** M-x view-file and commands that use it now avoid interfering
1787with special modes such as Tar mode. 1738with special modes such as Tar mode.
1788 1739
1789--- 1740---
1790** Commands winner-redo and winner-undo, from winner.el, are now bound to 1741** Commands `winner-redo' and `winner-undo', from winner.el, are now
1791C-c <left> and C-c <right>, respectively. This is an incompatible change. 1742bound to C-c <left> and C-c <right>, respectively. This is an
1743incompatible change.
1792 1744
1793--- 1745---
1794** global-whitespace-mode is a new alias for whitespace-global-mode. 1746** `global-whitespace-mode' is a new alias for `whitespace-global-mode'.
1795 1747
1796+++ 1748+++
1797** M-x compare-windows now can automatically skip non-matching text to 1749** M-x compare-windows now can automatically skip non-matching text to
@@ -1799,6 +1751,7 @@ resync points in both windows.
1799 1751
1800+++ 1752+++
1801** New user option `add-log-always-start-new-record'. 1753** New user option `add-log-always-start-new-record'.
1754
1802When this option is enabled, M-x add-change-log-entry always 1755When this option is enabled, M-x add-change-log-entry always
1803starts a new record regardless of when the last record is. 1756starts a new record regardless of when the last record is.
1804 1757
@@ -1810,10 +1763,11 @@ when Emacs visits them.
1810 1763
1811+++ 1764+++
1812*** A numeric prefix argument of `info' selects an Info buffer 1765*** A numeric prefix argument of `info' selects an Info buffer
1813with the number appended to the *info* buffer name (e.g. "*info*<2>"). 1766with the number appended to the `*info*' buffer name (e.g. "*info*<2>").
1814 1767
1815--- 1768---
1816*** isearch in Info uses Info-search and searches through multiple nodes. 1769*** isearch in Info uses Info-search and searches through multiple nodes.
1770
1817Before leaving the initial Info node isearch fails once with the error 1771Before leaving the initial Info node isearch fails once with the error
1818message [initial node], and with subsequent C-s/C-r continues through 1772message [initial node], and with subsequent C-s/C-r continues through
1819other nodes. When isearch fails for the rest of the manual, it wraps 1773other nodes. When isearch fails for the rest of the manual, it wraps
@@ -1852,11 +1806,13 @@ references and following them calls `browse-url'.
1852 1806
1853+++ 1807+++
1854*** Info now hides node names in menus and cross references by default. 1808*** Info now hides node names in menus and cross references by default.
1809
1855If you prefer the old behavior, you can set the new user option 1810If you prefer the old behavior, you can set the new user option
1856`Info-hide-note-references' to nil. 1811`Info-hide-note-references' to nil.
1857 1812
1858--- 1813---
1859*** Images in Info pages are supported. 1814*** Images in Info pages are supported.
1815
1860Info pages show embedded images, in Emacs frames with image support. 1816Info pages show embedded images, in Emacs frames with image support.
1861Info documentation that includes images, processed with makeinfo 1817Info documentation that includes images, processed with makeinfo
1862version 4.7 or newer, compiles to Info pages with embedded images. 1818version 4.7 or newer, compiles to Info pages with embedded images.
@@ -1865,25 +1821,24 @@ version 4.7 or newer, compiles to Info pages with embedded images.
1865*** The default value for `Info-scroll-prefer-subnodes' is now nil. 1821*** The default value for `Info-scroll-prefer-subnodes' is now nil.
1866 1822
1867--- 1823---
1868*** Info-index offers completion. 1824*** `Info-index' offers completion.
1869 1825
1870** Lisp mode changes: 1826** Lisp mode changes:
1871 1827
1872--- 1828---
1873*** Lisp mode now uses font-lock-doc-face for the docstrings. 1829*** Lisp mode now uses `font-lock-doc-face' for doc strings.
1874 1830
1875+++ 1831+++
1876*** A prefix argument of C-M-q in Emacs Lisp mode pretty-printifies the 1832*** C-u C-M-q in Emacs Lisp mode pretty-prints the list after point.
1877list starting after point.
1878 1833
1879*** New features in evaluation commands 1834*** New features in evaluation commands
1880 1835
1881+++ 1836+++
1882*** The function `eval-defun' (C-M-x) called on defface reinitializes 1837**** The function `eval-defun' (C-M-x) called on defface reinitializes
1883the face to the value specified in the defface expression. 1838the face to the value specified in the defface expression.
1884 1839
1885+++ 1840+++
1886*** Typing C-x C-e twice prints the value of the integer result 1841**** Typing C-x C-e twice prints the value of the integer result
1887in additional formats (octal, hexadecimal, character) specified 1842in additional formats (octal, hexadecimal, character) specified
1888by the new function `eval-expression-print-format'. The same 1843by the new function `eval-expression-print-format'. The same
1889function also defines the result format for `eval-expression' (M-:), 1844function also defines the result format for `eval-expression' (M-:),
@@ -2009,23 +1964,23 @@ module-open, module-close, inmodule, composition-open,
2009composition-close, and incomposition. 1964composition-close, and incomposition.
2010 1965
2011*** New functions to do hungry delete without enabling hungry delete mode. 1966*** New functions to do hungry delete without enabling hungry delete mode.
2012The functions c-hungry-backspace and c-hungry-delete-forward can be 1967The functions `c-hungry-backspace' and `c-hungry-delete-forward' can be
2013bound to keys to get this feature without toggling a mode. 1968bound to keys to get this feature without toggling a mode.
2014Contributed by Kevin Ryde.
2015 1969
2016*** Better control over require-final-newline. The variable that 1970*** Better control over `require-final-newline'.
2017controls how to handle a final newline when the buffer is saved, 1971
2018require-final-newline, is now customizable on a per-mode basis through 1972The variable `c-require-final-newline' specifies which of the modes
2019c-require-final-newline. That is a list of modes, and only those 1973implemented by CC mode should insert final newlines. Its value is a
2020modes set require-final-newline. By default that's C, C++ and 1974list of modes, and only those modes should do it. By default the list
2021Objective-C. 1975includes C, C++ and Objective-C modes.
2022 1976
2023The specified modes set require-final-newline based on 1977Whichever modes are in this list will set `require-final-newline'
2024mode-require-final-newline, as usual. 1978based on `mode-require-final-newline'.
2025 1979
2026*** Format change for syntactic context elements. 1980*** Format change for syntactic context elements.
2027The elements in the syntactic context returned by c-guess-basic-syntax 1981
2028and stored in c-syntactic-context has been changed somewhat to allow 1982The elements in the syntactic context returned by `c-guess-basic-syntax'
1983and stored in `c-syntactic-context' has been changed somewhat to allow
2029attaching more information. They are now lists instead of single cons 1984attaching more information. They are now lists instead of single cons
2030cells. E.g. a line that previously had the syntactic analysis 1985cells. E.g. a line that previously had the syntactic analysis
2031 1986
@@ -2038,12 +1993,13 @@ is now analysed as
2038In some cases there are more than one position given for a syntactic 1993In some cases there are more than one position given for a syntactic
2039symbol. 1994symbol.
2040 1995
2041This change might affect code that call c-guess-basic-syntax directly, 1996This change might affect code that call `c-guess-basic-syntax' directly,
2042and custom lineup functions if they use c-syntactic-context. However, 1997and custom lineup functions if they use `c-syntactic-context'. However,
2043the argument given to lineup functions is still a single cons cell 1998the argument given to lineup functions is still a single cons cell
2044with nil or an integer in the cdr. 1999with nil or an integer in the cdr.
2045 2000
2046*** API changes for derived modes. 2001*** API changes for derived modes.
2002
2047There have been extensive changes "under the hood" which can affect 2003There have been extensive changes "under the hood" which can affect
2048derived mode writers. Some of these changes are likely to cause 2004derived mode writers. Some of these changes are likely to cause
2049incompatibilities with existing derived modes, but on the other hand 2005incompatibilities with existing derived modes, but on the other hand
@@ -2055,8 +2011,8 @@ See the comment blurb near the top of cc-langs.el.
2055 2011
2056**** New initialization functions. 2012**** New initialization functions.
2057The initialization procedure has been split up into more functions to 2013The initialization procedure has been split up into more functions to
2058give better control: c-basic-common-init, c-font-lock-init, and 2014give better control: `c-basic-common-init', `c-font-lock-init', and
2059c-init-language-vars. 2015`c-init-language-vars'.
2060 2016
2061*** Changes in analysis of nested syntactic constructs. 2017*** Changes in analysis of nested syntactic constructs.
2062The syntactic analysis engine has better handling of cases where 2018The syntactic analysis engine has better handling of cases where
@@ -2082,33 +2038,34 @@ its substatement. E.g:
2082**** Syntactic indentation inside macros. 2038**** Syntactic indentation inside macros.
2083The contents of multiline #define's are now analyzed and indented 2039The contents of multiline #define's are now analyzed and indented
2084syntactically just like other code. This can be disabled by the new 2040syntactically just like other code. This can be disabled by the new
2085variable c-syntactic-indentation-in-macros. A new syntactic symbol 2041variable `c-syntactic-indentation-in-macros'. A new syntactic symbol
2086cpp-define-intro has been added to control the initial indentation 2042`cpp-define-intro' has been added to control the initial indentation
2087inside #define's. 2043inside `#define's.
2044
2045**** New lineup function `c-lineup-cpp-define'.
2088 2046
2089**** New lineup function c-lineup-cpp-define.
2090Now used by default to line up macro continuation lines. The behavior 2047Now used by default to line up macro continuation lines. The behavior
2091of this function closely mimics the indentation one gets if the macro 2048of this function closely mimics the indentation one gets if the macro
2092is indented while the line continuation backslashes are temporarily 2049is indented while the line continuation backslashes are temporarily
2093removed. If syntactic indentation in macros is turned off, it works 2050removed. If syntactic indentation in macros is turned off, it works
2094much line c-lineup-dont-change, which was used earlier, but handles 2051much line `c-lineup-dont-change', which was used earlier, but handles
2095empty lines within the macro better. 2052empty lines within the macro better.
2096 2053
2097**** Automatically inserted newlines continues the macro if used within one. 2054**** Automatically inserted newlines continues the macro if used within one.
2098This applies to the newlines inserted by the auto-newline mode, and to 2055This applies to the newlines inserted by the auto-newline mode, and to
2099c-context-line-break and c-context-open-line. 2056`c-context-line-break' and `c-context-open-line'.
2100 2057
2101**** Better alignment of line continuation backslashes. 2058**** Better alignment of line continuation backslashes.
2102c-backslash-region tries to adapt to surrounding backslashes. New 2059`c-backslash-region' tries to adapt to surrounding backslashes. New
2103variable c-backslash-max-column which put a limit on how far out 2060variable `c-backslash-max-column' which put a limit on how far out
2104backslashes can be moved. 2061backslashes can be moved.
2105 2062
2106**** Automatic alignment of line continuation backslashes. 2063**** Automatic alignment of line continuation backslashes.
2107This is controlled by the new variable c-auto-align-backslashes. It 2064This is controlled by the new variable `c-auto-align-backslashes'. It
2108affects c-context-line-break, c-context-open-line and newlines 2065affects `c-context-line-break', `c-context-open-line' and newlines
2109inserted in auto-newline mode. 2066inserted in Auto-Newline mode.
2110
2111**** Line indentation works better inside macros. 2067**** Line indentation works better inside macros.
2068
2112Regardless whether syntactic indentation and syntactic indentation 2069Regardless whether syntactic indentation and syntactic indentation
2113inside macros are enabled or not, line indentation now ignores the 2070inside macros are enabled or not, line indentation now ignores the
2114line continuation backslashes. This is most noticeable when syntactic 2071line continuation backslashes. This is most noticeable when syntactic
@@ -2117,37 +2074,35 @@ backslash) in the macro.
2117 2074
2118*** indent-for-comment is more customizable. 2075*** indent-for-comment is more customizable.
2119The behavior of M-; (indent-for-comment) is now configurable through 2076The behavior of M-; (indent-for-comment) is now configurable through
2120the variable c-indent-comment-alist. The indentation behavior based 2077the variable `c-indent-comment-alist'. The indentation behavior based
2121on the preceding code on the line, e.g. to get two spaces after #else 2078on the preceding code on the line, e.g. to get two spaces after #else
2122and #endif but indentation to comment-column in most other cases 2079and #endif but indentation to `comment-column' in most other cases
2123(something which was hardcoded earlier). 2080(something which was hardcoded earlier).
2124 2081
2125*** New function c-context-open-line. 2082*** New function `c-context-open-line'.
2126It's the open-line equivalent of c-context-line-break. 2083It's the open-line equivalent of `c-context-line-break'.
2127 2084
2128*** New lineup functions 2085*** New lineup functions
2129 2086
2130**** c-lineup-string-cont 2087**** `c-lineup-string-cont'
2131This lineup function lines up a continued string under the one it 2088This lineup function lines up a continued string under the one it
2132continues. E.g: 2089continues. E.g:
2133 2090
2134result = prefix + "A message " 2091result = prefix + "A message "
2135 "string."; <- c-lineup-string-cont 2092 "string."; <- c-lineup-string-cont
2136 2093
2137**** c-lineup-cascaded-calls 2094**** `c-lineup-cascaded-calls'
2138Lines up series of calls separated by "->" or ".". 2095Lines up series of calls separated by "->" or ".".
2139 2096
2140**** c-lineup-knr-region-comment 2097**** `c-lineup-knr-region-comment'
2141Gives (what most people think is) better indentation of comments in 2098Gives (what most people think is) better indentation of comments in
2142the "K&R region" between the function header and its body. 2099the "K&R region" between the function header and its body.
2143 2100
2144**** c-lineup-gcc-asm-reg 2101**** `c-lineup-gcc-asm-reg'
2145Provides better indentation inside asm blocks. Contributed by Kevin 2102Provides better indentation inside asm blocks.
2146Ryde.
2147 2103
2148**** c-lineup-argcont 2104**** `c-lineup-argcont'
2149Lines up continued function arguments after the preceding comma. 2105Lines up continued function arguments after the preceding comma.
2150Contributed by Kevin Ryde.
2151 2106
2152*** Better caching of the syntactic context. 2107*** Better caching of the syntactic context.
2153CC Mode caches the positions of the opening parentheses (of any kind) 2108CC Mode caches the positions of the opening parentheses (of any kind)
@@ -2167,7 +2122,7 @@ Statements are recognized most of the time even when they occur in an
2167"invalid" context, e.g. in a function argument. In practice that can 2122"invalid" context, e.g. in a function argument. In practice that can
2168happen when macros are involved. 2123happen when macros are involved.
2169 2124
2170*** Improved the way c-indent-exp chooses the block to indent. 2125*** Improved the way `c-indent-exp' chooses the block to indent.
2171It now indents the block for the closest sexp following the point 2126It now indents the block for the closest sexp following the point
2172whose closing paren ends on a different line. This means that the 2127whose closing paren ends on a different line. This means that the
2173point doesn't have to be immediately before the block to indent. 2128point doesn't have to be immediately before the block to indent.
@@ -2175,7 +2130,7 @@ Also, only the block and the closing line is indented; the current
2175line is left untouched. 2130line is left untouched.
2176 2131
2177*** Added toggle for syntactic indentation. 2132*** Added toggle for syntactic indentation.
2178The function c-toggle-syntactic-indentation can be used to toggle 2133The function `c-toggle-syntactic-indentation' can be used to toggle
2179syntactic indentation. 2134syntactic indentation.
2180 2135
2181--- 2136---
@@ -2205,7 +2160,7 @@ Lines that match are never indented, and are given distinctive font-locking.
2205`fortran-beginning-of-block'. 2160`fortran-beginning-of-block'.
2206 2161
2207--- 2162---
2208*** F90 mode and Fortran mode have support for hs-minor-mode (hideshow). 2163*** F90 mode and Fortran mode have support for `hs-minor-mode' (hideshow).
2209It cannot deal with every code format, but ought to handle a sizeable 2164It cannot deal with every code format, but ought to handle a sizeable
2210majority. 2165majority.
2211 2166
@@ -2250,50 +2205,51 @@ TeX commands to use at startup.
2250and super/sub-scripts are made into super/sub-scripts. 2205and super/sub-scripts are made into super/sub-scripts.
2251 2206
2252+++ 2207+++
2253*** New major mode doctex-mode for *.dtx files. 2208*** New major mode Doctex mode, for *.dtx files.
2254 2209
2255** BibTeX mode: 2210** BibTeX mode:
2256*** The new command bibtex-url browses a URL for the BibTeX entry at 2211
2212*** The new command `bibtex-url' browses a URL for the BibTeX entry at
2257point (bound to C-c C-l and mouse-2, RET on clickable fields). 2213point (bound to C-c C-l and mouse-2, RET on clickable fields).
2258 2214
2259*** The new command bibtex-entry-update (bound to C-c C-u) updates 2215*** The new command `bibtex-entry-update' (bound to C-c C-u) updates
2260an existing BibTeX entry. 2216an existing BibTeX entry.
2261 2217
2262*** New `bibtex-entry-format' option `required-fields', enabled by default. 2218*** New `bibtex-entry-format' option `required-fields', enabled by default.
2263 2219
2264*** bibtex-maintain-sorted-entries can take values `plain', 2220*** `bibtex-maintain-sorted-entries' can take values `plain',
2265`crossref', and `entry-class' which control the sorting scheme used 2221`crossref', and `entry-class' which control the sorting scheme used
2266for BibTeX entries. `bibtex-sort-entry-class' controls the sorting 2222for BibTeX entries. `bibtex-sort-entry-class' controls the sorting
2267scheme `entry-class'. TAB completion for reference keys and 2223scheme `entry-class'. TAB completion for reference keys and
2268automatic detection of duplicates does not require anymore that 2224automatic detection of duplicates does not require anymore that
2269bibtex-maintain-sorted-entries is non-nil. 2225`bibtex-maintain-sorted-entries' is non-nil.
2270 2226
2271*** If the new variable bibtex-parse-keys-fast is non-nil, 2227*** If the new variable `bibtex-parse-keys-fast' is non-nil,
2272use fast but simplified algorithm for parsing BibTeX keys. 2228use fast but simplified algorithm for parsing BibTeX keys.
2273 2229
2274*** If the new variable bibtex-autoadd-commas is non-nil, 2230*** If the new variable `bibtex-autoadd-commas' is non-nil,
2275automatically add missing commas at end of BibTeX fields. 2231automatically add missing commas at end of BibTeX fields.
2276 2232
2277*** The new variable bibtex-autofill-types contains a list of entry 2233*** The new variable `bibtex-autofill-types' contains a list of entry
2278types for which fields are filled automatically (if possible). 2234types for which fields are filled automatically (if possible).
2279 2235
2280*** The new command bibtex-complete completes word fragment before 2236*** The new command `bibtex-complete' completes word fragment before
2281point according to context (bound to M-tab). 2237point according to context (bound to M-tab).
2282 2238
2283*** The new commands bibtex-find-entry and bibtex-find-crossref 2239*** The new commands `bibtex-find-entry' and `bibtex-find-crossref'
2284locate entries and crossref'd entries (bound to C-c C-s and C-c C-x). 2240locate entries and crossref'd entries (bound to C-c C-s and C-c C-x).
2285Crossref fields are clickable (bound to mouse-2, RET). 2241Crossref fields are clickable (bound to mouse-2, RET).
2286 2242
2287*** In BibTeX mode the command fill-paragraph (bound to M-q) fills 2243*** In BibTeX mode the command `fill-paragraph' (M-q) fills
2288individual fields of a BibTeX entry. 2244individual fields of a BibTeX entry.
2289 2245
2290*** The new variables bibtex-files and bibtex-file-path define a set 2246*** The new variables `bibtex-files' and `bibtex-file-path' define a set
2291of BibTeX files that are searched for entry keys. 2247of BibTeX files that are searched for entry keys.
2292 2248
2293*** The new command bibtex-validate-globally checks for duplicate keys 2249*** The new command `bibtex-validate-globally' checks for duplicate keys
2294in multiple BibTeX files. 2250in multiple BibTeX files.
2295 2251
2296*** The new command bibtex-copy-summary-as-kill pushes summary 2252*** The new command `bibtex-copy-summary-as-kill' pushes summary
2297of BibTeX entry to kill ring (bound to C-c C-t). 2253of BibTeX entry to kill ring (bound to C-c C-t).
2298 2254
2299+++ 2255+++
@@ -2315,14 +2271,15 @@ and other common debugger commands.
2315*** The new package gdb-ui.el provides an enhanced graphical interface to 2271*** The new package gdb-ui.el provides an enhanced graphical interface to
2316GDB. You can interact with GDB through the GUD buffer in the usual way, but 2272GDB. You can interact with GDB through the GUD buffer in the usual way, but
2317there are also further buffers which control the execution and describe the 2273there are also further buffers which control the execution and describe the
2318state of your program. It separates the input/output of your program from 2274state of your program. It can separate the input/output of your program from
2319that of GDB and watches expressions in the speedbar. It also uses features of 2275that of GDB and watches expressions in the speedbar. It also uses features of
2320Emacs 21 such as the display margin for breakpoints, and the toolbar. 2276Emacs 21/22 such as the the toolbar, and bitmaps in the fringe to indicate
2277breakpoints.
2321 2278
2322Use M-x gdba to start GDB-UI. 2279Use M-x gdb to start GDB-UI.
2323 2280
2324*** GUD tooltips can be toggled independently of normal tooltips 2281*** GUD tooltips can be toggled independently of normal tooltips
2325with the minor mode, gud-tooltip-mode. 2282with the minor mode `gud-tooltip-mode'.
2326 2283
2327+++ 2284+++
2328*** In graphical mode, with a C program, GUD Tooltips have been extended to 2285*** In graphical mode, with a C program, GUD Tooltips have been extended to
@@ -2348,27 +2305,27 @@ not executing.
2348 2305
2349*** The previous method of searching for source files has been 2306*** The previous method of searching for source files has been
2350 preserved in case someone still wants/needs to use it. 2307 preserved in case someone still wants/needs to use it.
2351 Set gud-jdb-use-classpath to nil. 2308 Set `gud-jdb-use-classpath' to nil.
2352 2309
2353 Added Customization Variables 2310 Added Customization Variables
2354 2311
2355*** gud-jdb-command-name. What command line to use to invoke jdb. 2312*** `gud-jdb-command-name'. What command line to use to invoke jdb.
2356 2313
2357*** gud-jdb-use-classpath. Allows selection of java source file searching 2314*** `gud-jdb-use-classpath'. Allows selection of java source file searching
2358 method: set to t for new method, nil to scan gud-jdb-directories for 2315 method: set to t for new method, nil to scan `gud-jdb-directories' for
2359 java sources (previous method). 2316 java sources (previous method).
2360 2317
2361*** gud-jdb-directories. List of directories to scan and search for java 2318*** `gud-jdb-directories'. List of directories to scan and search for java
2362 classes using the original gud-jdb method (if gud-jdb-use-classpath 2319 classes using the original gud-jdb method (if `gud-jdb-use-classpath'
2363 is nil). 2320 is nil).
2364 2321
2365 Minor Improvements 2322 Minor Improvements
2366 2323
2367*** The STARTTLS elisp wrapper (starttls.el) can now use GNUTLS 2324*** The STARTTLS wrapper (starttls.el) can now use GNUTLS
2368instead of the OpenSSL based "starttls" tool. For backwards 2325instead of the OpenSSL based `starttls' tool. For backwards
2369compatibility, it prefers "starttls", but you can toggle 2326compatibility, it prefers `starttls', but you can toggle
2370`starttls-use-gnutls' to switch to GNUTLS (or simply remove the 2327`starttls-use-gnutls' to switch to GNUTLS (or simply remove the
2371"starttls" tool). 2328`starttls' tool).
2372 2329
2373*** Do not allow debugger output history variable to grow without bounds. 2330*** Do not allow debugger output history variable to grow without bounds.
2374 2331
@@ -2376,6 +2333,7 @@ compatibility, it prefers "starttls", but you can toggle
2376 2333
2377+++ 2334+++
2378*** You can now use Auto Revert mode to `tail' a file. 2335*** You can now use Auto Revert mode to `tail' a file.
2336
2379If point is at the end of a file buffer before reverting, Auto Revert 2337If point is at the end of a file buffer before reverting, Auto Revert
2380mode keeps it at the end after reverting. Similarly if point is 2338mode keeps it at the end after reverting. Similarly if point is
2381displayed at the end of a file buffer in any window, it stays at 2339displayed at the end of a file buffer in any window, it stays at
@@ -2431,17 +2389,20 @@ old name remains available as alias, but has been marked obsolete.
2431** Desktop package 2389** Desktop package
2432 2390
2433+++ 2391+++
2434*** Desktop saving is now a minor mode, desktop-save-mode. Variable 2392*** Desktop saving is now a minor mode, `desktop-save-mode'.
2435desktop-enable is obsolete. Customize desktop-save-mode to enable desktop 2393
2436saving. 2394*** The variable `desktop-enable' is obsolete.
2395
2396Customize `desktop-save-mode' to enable desktop saving.
2437 2397
2438--- 2398---
2439*** Buffers are saved in the desktop file in the same order as that in the 2399*** Buffers are saved in the desktop file in the same order as that in the
2440buffer list. 2400buffer list.
2441 2401
2442+++ 2402+++
2443*** The desktop package can be customized to restore only some buffers immediately, 2403*** The desktop package can be customized to restore only some buffers
2444remaining buffers are restored lazily (when Emacs is idle). 2404immediately, remaining buffers are restored lazily (when Emacs is
2405idle).
2445 2406
2446+++ 2407+++
2447*** New commands: 2408*** New commands:
@@ -2477,6 +2438,7 @@ remaining buffers are restored lazily (when Emacs is idle).
2477 2438
2478--- 2439---
2479** The saveplace.el package now filters out unreadable files. 2440** The saveplace.el package now filters out unreadable files.
2441
2480When you exit Emacs, the saved positions in visited files no longer 2442When you exit Emacs, the saved positions in visited files no longer
2481include files that aren't readable, e.g. files that don't exist. 2443include files that aren't readable, e.g. files that don't exist.
2482Customize the new option `save-place-forget-unreadable-files' to nil 2444Customize the new option `save-place-forget-unreadable-files' to nil
@@ -2509,6 +2471,7 @@ backup using `ediff'. If you specify the name of a backup file,
2509*** New regular expressions features 2471*** New regular expressions features
2510 2472
2511**** New syntax for regular expressions, multi-line regular expressions. 2473**** New syntax for regular expressions, multi-line regular expressions.
2474
2512The syntax --ignore-case-regexp=/regex/ is now undocumented and retained 2475The syntax --ignore-case-regexp=/regex/ is now undocumented and retained
2513only for backward compatibility. The new equivalent syntax is 2476only for backward compatibility. The new equivalent syntax is
2514--regex=/regex/i. More generally, it is --regex=/TAGREGEX/TAGNAME/MODS, 2477--regex=/regex/i. More generally, it is --regex=/TAGREGEX/TAGNAME/MODS,
@@ -2520,39 +2483,47 @@ expressions: `m' allows regexps to match more than one line, while `s'
2520span newlines allows writing of much more powerful regular expressions 2483span newlines allows writing of much more powerful regular expressions
2521and rapid prototyping for tagging new languages. 2484and rapid prototyping for tagging new languages.
2522 2485
2523**** Regular expressions can use char escape sequences as in Gcc. 2486**** Regular expressions can use char escape sequences as in GCC.
2487
2524The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v, 2488The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v,
2525respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, 2489respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
2526CR, TAB, VT, 2490CR, TAB, VT,
2527 2491
2528**** Regular expressions can be bound to a given language. 2492**** Regular expressions can be bound to a given language.
2493
2529The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags 2494The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags
2530only for files of language LANGUAGE, and ignored otherwise. This is 2495only for files of language LANGUAGE, and ignored otherwise. This is
2531particularly useful when storing regexps in a file. 2496particularly useful when storing regexps in a file.
2532 2497
2533**** Regular expressions can be read from a file. 2498**** Regular expressions can be read from a file.
2499
2534The --regex=@regexfile option means read the regexps from a file, one 2500The --regex=@regexfile option means read the regexps from a file, one
2535per line. Lines beginning with space or tab are ignored. 2501per line. Lines beginning with space or tab are ignored.
2536 2502
2537*** New language parsing features 2503*** New language parsing features
2538 2504
2539**** The `::' qualifier triggers C++ parsing in C file. 2505**** The `::' qualifier triggers C++ parsing in C file.
2506
2540Previously, only the `template' and `class' keywords had this effect. 2507Previously, only the `template' and `class' keywords had this effect.
2541 2508
2542**** The gnucc __attribute__ keyword is now recognised and ignored. 2509**** The GCC __attribute__ keyword is now recognised and ignored.
2543 2510
2544**** New language HTML. 2511**** New language HTML.
2545Title and h1, h2, h3 are tagged. Also, tags are generated when name= is 2512
2546used inside an anchor and whenever id= is used. 2513Tags are generated for `title' as well as `h1', `h2', and `h3'. Also,
2514when `name=' is used inside an anchor and whenever `id=' is used.
2547 2515
2548**** In Makefiles, constants are tagged. 2516**** In Makefiles, constants are tagged.
2517
2549If you want the old behavior instead, thus avoiding to increase the 2518If you want the old behavior instead, thus avoiding to increase the
2550size of the tags file, use the --no-globals option. 2519size of the tags file, use the --no-globals option.
2551 2520
2552**** New language Lua. 2521**** New language Lua.
2522
2553All functions are tagged. 2523All functions are tagged.
2554 2524
2555**** In Perl, packages are tags. 2525**** In Perl, packages are tags.
2526
2556Subroutine tags are named from their package. You can jump to sub tags 2527Subroutine tags are named from their package. You can jump to sub tags
2557as you did before, by the sub name, or additionally by looking for 2528as you did before, by the sub name, or additionally by looking for
2558package::sub. 2529package::sub.
@@ -2560,14 +2531,17 @@ package::sub.
2560**** In Prolog, etags creates tags for rules in addition to predicates. 2531**** In Prolog, etags creates tags for rules in addition to predicates.
2561 2532
2562**** New language PHP. 2533**** New language PHP.
2563Tags are functions, classes and defines. 2534
2564If the --members option is specified to etags, tags are variables also. 2535Functions, classes and defines are tags. If the --members option is
2536specified to etags, variables are tags also.
2565 2537
2566**** New default keywords for TeX. 2538**** New default keywords for TeX.
2539
2567The new keywords are def, newcommand, renewcommand, newenvironment and 2540The new keywords are def, newcommand, renewcommand, newenvironment and
2568renewenvironment. 2541renewenvironment.
2569 2542
2570*** Honour #line directives. 2543*** Honour #line directives.
2544
2571When Etags parses an input file that contains C preprocessor's #line 2545When Etags parses an input file that contains C preprocessor's #line
2572directives, it creates tags using the file name and line number 2546directives, it creates tags using the file name and line number
2573specified in those directives. This is useful when dealing with code 2547specified in those directives. This is useful when dealing with code
@@ -2575,6 +2549,7 @@ created from Cweb source files. When Etags tags the generated file, it
2575writes tags pointing to the source file. 2549writes tags pointing to the source file.
2576 2550
2577*** New option --parse-stdin=FILE. 2551*** New option --parse-stdin=FILE.
2552
2578This option is mostly useful when calling etags from programs. It can 2553This option is mostly useful when calling etags from programs. It can
2579be used (only once) in place of a file name on the command line. Etags 2554be used (only once) in place of a file name on the command line. Etags
2580reads from standard input and marks the produced tags as belonging to 2555reads from standard input and marks the produced tags as belonging to
@@ -2583,31 +2558,33 @@ the file FILE.
2583** VC Changes 2558** VC Changes
2584 2559
2585+++ 2560+++
2586*** The key C-x C-q no longer checks files in or out, it only changes 2561*** The key C-x C-q only changes the read-only state of the buffer
2587the read-only state of the buffer (toggle-read-only). We made this 2562(toggle-read-only). It no longer checks files in or out.
2588change because we held a poll and found that many users were unhappy 2563
2589with the previous behavior. If you do prefer this behavior, you 2564We made this change because we held a poll and found that many users
2590can bind `vc-toggle-read-only' to C-x C-q in your .emacs: 2565were unhappy with the previous behavior. If you do prefer this
2566behavior, you can bind `vc-toggle-read-only' to C-x C-q in your
2567`.emacs' file:
2591 2568
2592 (global-set-key "\C-x\C-q" 'vc-toggle-read-only) 2569 (global-set-key "\C-x\C-q" 'vc-toggle-read-only)
2593 2570
2594The function `vc-toggle-read-only' will continue to exist. 2571The function `vc-toggle-read-only' will continue to exist.
2595 2572
2596+++ 2573+++
2597*** There is a new user option `vc-cvs-global-switches' that allows 2574*** The new variable `vc-cvs-global-switches' specifies switches that
2598you to specify switches that are passed to any CVS command invoked 2575are passed to any CVS command invoked by VC.
2599by VC. These switches are used as "global options" for CVS, which 2576
2600means they are inserted before the command name. For example, this 2577These switches are used as "global options" for CVS, which means they
2601allows you to specify a compression level using the "-z#" option for 2578are inserted before the command name. For example, this allows you to
2602CVS. 2579specify a compression level using the `-z#' option for CVS.
2603 2580
2604+++ 2581+++
2605*** New backends for Subversion and Meta-CVS. 2582*** New backends for Subversion and Meta-CVS.
2606 2583
2607+++ 2584+++
2608*** vc-annotate-mode enhancements 2585*** VC-Annotate mode enhancements
2609 2586
2610In vc-annotate mode, you can now use the following key bindings for 2587In VC-Annotate mode, you can now use the following key bindings for
2611enhanced functionality to browse the annotations of past revisions, or 2588enhanced functionality to browse the annotations of past revisions, or
2612to view diffs or log entries directly from vc-annotate-mode: 2589to view diffs or log entries directly from vc-annotate-mode:
2613 2590
@@ -2629,18 +2606,18 @@ in the repository.
2629+++ 2606+++
2630*** In pcl-cvs mode, there is a new `d r' command to view the changes 2607*** In pcl-cvs mode, there is a new `d r' command to view the changes
2631anyone has committed to the repository since you last executed 2608anyone has committed to the repository since you last executed
2632"checkout", "update" or "commit". That means using cvs diff options 2609`checkout', `update' or `commit'. That means using cvs diff options
2633-rBASE -rHEAD. 2610-rBASE -rHEAD.
2634 2611
2635+++ 2612+++
2636** There is a new user option `mail-default-directory' that allows you 2613** The new variable `mail-default-directory' specifies
2637to specify the value of `default-directory' for mail buffers. This 2614`default-directory' for mail buffers. This directory is used for
2638directory is used for auto-save files of mail buffers. It defaults to 2615auto-save files of mail buffers. It defaults to "~/".
2639"~/".
2640 2616
2641+++ 2617+++
2642** Emacs can now indicate in the mode-line the presence of new e-mail 2618** The mode line can indicate new mail in a directory or file.
2643in a directory or in a file. See the documentation of the user option 2619
2620See the documentation of the user option
2644`display-time-mail-directory'. 2621`display-time-mail-directory'.
2645 2622
2646** Rmail changes: 2623** Rmail changes:
@@ -2650,6 +2627,7 @@ in a directory or in a file. See the documentation of the user option
2650 2627
2651+++ 2628+++
2652*** Support for `movemail' from GNU mailutils was added to Rmail. 2629*** Support for `movemail' from GNU mailutils was added to Rmail.
2630
2653This version of `movemail' allows to read mail from a wide range of 2631This version of `movemail' allows to read mail from a wide range of
2654mailbox formats, including remote POP3 and IMAP4 mailboxes with or 2632mailbox formats, including remote POP3 and IMAP4 mailboxes with or
2655without TLS encryption. If GNU mailutils is installed on the system 2633without TLS encryption. If GNU mailutils is installed on the system
@@ -2660,11 +2638,13 @@ used instead of the native one.
2660 2638
2661--- 2639---
2662*** Gnus now includes Sieve and PGG 2640*** Gnus now includes Sieve and PGG
2641
2663Sieve is a library for managing Sieve scripts. PGG is a library to handle 2642Sieve is a library for managing Sieve scripts. PGG is a library to handle
2664PGP/MIME. 2643PGP/MIME.
2665 2644
2666--- 2645---
2667*** There are many news features, bug fixes and improvements. 2646*** There are many news features, bug fixes and improvements.
2647
2668See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. 2648See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details.
2669 2649
2670--- 2650---
@@ -2716,10 +2696,10 @@ This can be controlled through the variables `diary-header-line-flag'
2716and `diary-header-line-format'. 2696and `diary-header-line-format'.
2717 2697
2718+++ 2698+++
2719*** The procedure for activating appointment reminders has changed: use 2699*** The procedure for activating appointment reminders has changed:
2720the new function `appt-activate'. The new variable 2700use the new function `appt-activate'. The new variable
2721`appt-display-format' controls how reminders are displayed, replacing 2701`appt-display-format' controls how reminders are displayed, replacing
2722appt-issue-message, appt-visible, and appt-msg-window. 2702`appt-issue-message', `appt-visible', and `appt-msg-window'.
2723 2703
2724+++ 2704+++
2725*** The new functions `diary-from-outlook', `diary-from-outlook-gnus', 2705*** The new functions `diary-from-outlook', `diary-from-outlook-gnus',
@@ -2757,24 +2737,26 @@ The current product name will be shown on the mode line following the
2757SQL mode indicator. 2737SQL mode indicator.
2758 2738
2759The technique of setting `sql-mode-font-lock-defaults' directly in 2739The technique of setting `sql-mode-font-lock-defaults' directly in
2760your .emacs will no longer establish the default highlighting -- Use 2740your `.emacs' will no longer establish the default highlighting -- Use
2761`sql-product' to accomplish this. 2741`sql-product' to accomplish this.
2762 2742
2763ANSI keywords are always highlighted. 2743ANSI keywords are always highlighted.
2764 2744
2765*** The function `sql-add-product-keywords' can be used to add 2745*** The function `sql-add-product-keywords' can be used to add
2766font-lock rules to the product specific rules. For example, to have 2746font-lock rules to the product specific rules. For example, to have
2767all identifiers ending in "_t" under MS SQLServer treated as a type, 2747all identifiers ending in `_t' under MS SQLServer treated as a type,
2768you would use the following line in your .emacs file: 2748you would use the following line in your .emacs file:
2769 2749
2770 (sql-add-product-keywords 'ms 2750 (sql-add-product-keywords 'ms
2771 '(("\\<\\w+_t\\>" . font-lock-type-face))) 2751 '(("\\<\\w+_t\\>" . font-lock-type-face)))
2772 2752
2773*** Oracle support includes keyword highlighting for Oracle 9i. Most 2753*** Oracle support includes keyword highlighting for Oracle 9i.
2774SQL and PL/SQL keywords are implemented. SQL*Plus commands are 2754
2755Most SQL and PL/SQL keywords are implemented. SQL*Plus commands are
2775highlighted in `font-lock-doc-face'. 2756highlighted in `font-lock-doc-face'.
2776 2757
2777*** Microsoft SQLServer support has been significantly improved. 2758*** Microsoft SQLServer support has been significantly improved.
2759
2778Keyword highlighting for SqlServer 2000 is implemented. 2760Keyword highlighting for SqlServer 2000 is implemented.
2779sql-interactive-mode defaults to use osql, rather than isql, because 2761sql-interactive-mode defaults to use osql, rather than isql, because
2780osql flushes its error stream more frequently. Thus error messages 2762osql flushes its error stream more frequently. Thus error messages
@@ -2782,7 +2764,7 @@ are displayed when they occur rather than when the session is
2782terminated. 2764terminated.
2783 2765
2784If the username and password are not provided to `sql-ms', osql is 2766If the username and password are not provided to `sql-ms', osql is
2785called with the -E command line argument to use the operating system 2767called with the `-E' command line argument to use the operating system
2786credentials to authenticate the user. 2768credentials to authenticate the user.
2787 2769
2788*** Postgres support is enhanced. 2770*** Postgres support is enhanced.
@@ -2797,33 +2779,36 @@ packages, procedures, functions, triggers, sequences, rules, and
2797defaults. 2779defaults.
2798 2780
2799*** Added SQL->Start SQLi Session menu entry which calls the 2781*** Added SQL->Start SQLi Session menu entry which calls the
2800appropriate sql-interactive-mode wrapper for the current setting of 2782appropriate `sql-interactive-mode' wrapper for the current setting of
2801`sql-product'. 2783`sql-product'.
2802 2784
2803--- 2785---
2804*** Support for the SQLite interpreter has been added to sql.el by calling 2786*** sql.el supports the SQLite interpreter--call 'sql-sqlite'.
2805'sql-sqlite'.
2806 2787
2807** FFAP changes: 2788** FFAP changes:
2808 2789
2809+++ 2790+++
2810*** New ffap commands and keybindings: C-x C-r (`ffap-read-only'), 2791*** New ffap commands and keybindings:
2792
2793C-x C-r (`ffap-read-only'),
2811C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'), 2794C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'),
2812C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'), 2795C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'),
2813C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame'). 2796C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame').
2814 2797
2815--- 2798---
2816*** FFAP accepts wildcards in a file name by default. C-x C-f passes 2799*** FFAP accepts wildcards in a file name by default.
2817it to `find-file' with non-nil WILDCARDS argument, which visits 2800
2818multiple files, and C-x d passes it to `dired'. 2801C-x C-f passes the file name to `find-file' with non-nil WILDCARDS
2802argument, which visits multiple files, and C-x d passes it to `dired'.
2819 2803
2820--- 2804---
2821** skeleton.el now supports using - to mark the skeleton-point without 2805** In skeleton.el, `-' marks the `skeleton-point' without interregion interaction.
2822 interregion interaction. @ has reverted to only setting 2806
2823 skeleton-positions and no longer sets skeleton-point. Skeletons 2807`@' has reverted to only setting `skeleton-positions' and no longer
2824 which used @ to mark skeleton-point independent of _ should now use - 2808sets `skeleton-point'. Skeletons which used @ to mark
2825 instead. The updated skeleton-insert docstring explains these new 2809`skeleton-point' independent of `_' should now use `-' instead. The
2826 features along with other details of skeleton construction. 2810updated `skeleton-insert' docstring explains these new features along
2811with other details of skeleton construction.
2827 2812
2828--- 2813---
2829** New variable `hs-set-up-overlay' allows customization of the overlay 2814** New variable `hs-set-up-overlay' allows customization of the overlay
@@ -2832,25 +2817,25 @@ handles the overlay property `display' specially, preserving it during
2832temporary overlay showing in the course of an isearch operation. 2817temporary overlay showing in the course of an isearch operation.
2833 2818
2834+++ 2819+++
2835** hide-ifdef-mode now uses overlays rather than selective-display 2820** `hide-ifdef-mode' now uses overlays rather than selective-display
2836to hide its text. This should be mostly transparent but slightly 2821to hide its text. This should be mostly transparent but slightly
2837changes the behavior of motion commands like C-e and C-p. 2822changes the behavior of motion commands like C-e and C-p.
2838 2823
2839--- 2824---
2840** partial-completion-mode now does partial completion on directory names. 2825** `partial-completion-mode' now handles partial completion on directory names.
2841 2826
2842--- 2827---
2843** The type-break package now allows `type-break-file-name' to be nil 2828** The type-break package now allows `type-break-file-name' to be nil
2844and if so, doesn't store any data across sessions. This is handy if 2829and if so, doesn't store any data across sessions. This is handy if
2845you don't want the .type-break file in your home directory or are 2830you don't want the `.type-break' file in your home directory or are
2846annoyed by the need for interaction when you kill Emacs. 2831annoyed by the need for interaction when you kill Emacs.
2847 2832
2848--- 2833---
2849** `ps-print' can now print characters from the mule-unicode charsets. 2834** `ps-print' can now print characters from the mule-unicode charsets.
2850 2835
2851Printing text with characters from the mule-unicode-* sets works with 2836Printing text with characters from the mule-unicode-* sets works with
2852ps-print, provided that you have installed the appropriate BDF fonts. 2837`ps-print', provided that you have installed the appropriate BDF
2853See the file INSTALL for URLs where you can find these fonts. 2838fonts. See the file INSTALL for URLs where you can find these fonts.
2854 2839
2855--- 2840---
2856** New command `strokes-global-set-stroke-string'. 2841** New command `strokes-global-set-stroke-string'.
@@ -2870,7 +2855,7 @@ using strokes as an input method.
2870 2855
2871+++ 2856+++
2872*** The `emacsclient' command understands the options `--eval' and 2857*** The `emacsclient' command understands the options `--eval' and
2873`--display' which tell Emacs respectively to evaluate the given elisp 2858`--display' which tell Emacs respectively to evaluate the given Lisp
2874expression and to use the given display when visiting files. 2859expression and to use the given display when visiting files.
2875 2860
2876+++ 2861+++
@@ -2881,11 +2866,10 @@ expression and to use the given display when visiting files.
2881 2866
2882+++ 2867+++
2883** You can now disable pc-selection-mode after enabling it. 2868** You can now disable pc-selection-mode after enabling it.
2884M-x pc-selection-mode behaves like a proper minor mode, and with no
2885argument it toggles the mode.
2886 2869
2887Turning off PC-Selection mode restores the global key bindings 2870M-x pc-selection-mode behaves like a proper minor mode, and with no
2888that were replaced by turning on the mode. 2871argument it toggles the mode. Turning off PC-Selection mode restores
2872the global key bindings that were replaced by turning on the mode.
2889 2873
2890--- 2874---
2891** `uniquify-strip-common-suffix' tells uniquify to prefer 2875** `uniquify-strip-common-suffix' tells uniquify to prefer
@@ -2893,9 +2877,10 @@ that were replaced by turning on the mode.
2893 2877
2894--- 2878---
2895** Support for `magic cookie' standout modes has been removed. 2879** Support for `magic cookie' standout modes has been removed.
2896Emacs will still work on terminals that require magic cookies in order 2880
2897to use standout mode, however they will not be able to display 2881Emacs still works on terminals that require magic cookies in order to
2898mode-lines in inverse-video. 2882use standout mode, but they can no longer display mode-lines in
2883inverse-video.
2899 2884
2900--- 2885---
2901** The game `mpuz' is enhanced. 2886** The game `mpuz' is enhanced.
@@ -2905,14 +2890,15 @@ default, all trivial operations involving whole lines are performed
2905automatically. The game uses faces for better visual feedback. 2890automatically. The game uses faces for better visual feedback.
2906 2891
2907--- 2892---
2908** display-battery has been replaced by display-battery-mode. 2893** display-battery-mode replaces display-battery.
2909 2894
2910--- 2895---
2911** calculator.el now has radix grouping mode, which is available when 2896** calculator.el now has radix grouping mode.
2912`calculator-output-radix' is non-nil. In this mode a separator 2897
2913character is used every few digits, making it easier to see byte 2898To enable this, set `calculator-output-radix' non-nil. In this mode a
2914boundries etc. For more info, see the documentation of the variable 2899separator character is used every few digits, making it easier to see
2915`calculator-radix-grouping-mode'. 2900byte boundries etc. For more info, see the documentation of the
2901variable `calculator-radix-grouping-mode'.
2916 2902
2917--- 2903---
2918** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead. 2904** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead.
@@ -2921,12 +2907,13 @@ boundries etc. For more info, see the documentation of the variable
2921** iso-acc.el is now obsolete. Use one of the latin input methods instead. 2907** iso-acc.el is now obsolete. Use one of the latin input methods instead.
2922 2908
2923--- 2909---
2924** cplus-md.el has been removed to avoid problems with Custom. 2910** cplus-md.el has been deleted.
2925 2911
2926* Changes in Emacs 22.1 on non-free operating systems 2912* Changes in Emacs 22.1 on non-free operating systems
2927 2913
2928+++ 2914+++
2929** Passing resources on the command line now works on MS Windows. 2915** Passing resources on the command line now works on MS Windows.
2916
2930You can use --xrm to pass resource settings to Emacs, overriding any 2917You can use --xrm to pass resource settings to Emacs, overriding any
2931existing values. For example: 2918existing values. For example:
2932 2919
@@ -2937,15 +2924,18 @@ irrespective of geometry or background setting on the Windows registry.
2937 2924
2938--- 2925---
2939** On MS Windows, the "system caret" now follows the cursor. 2926** On MS Windows, the "system caret" now follows the cursor.
2927
2940This enables Emacs to work better with programs that need to track 2928This enables Emacs to work better with programs that need to track
2941the cursor, for example screen magnifiers and text to speech programs. 2929the cursor, for example screen magnifiers and text to speech programs.
2942 2930
2943--- 2931---
2944** Tooltips now work on MS Windows. 2932** Tooltips now work on MS Windows.
2933
2945See the Emacs 21.1 NEWS entry for tooltips for details. 2934See the Emacs 21.1 NEWS entry for tooltips for details.
2946 2935
2947--- 2936---
2948** Images are now supported on MS Windows. 2937** Images are now supported on MS Windows.
2938
2949PBM and XBM images are supported out of the box. Other image formats 2939PBM and XBM images are supported out of the box. Other image formats
2950depend on external libraries. All of these libraries have been ported 2940depend on external libraries. All of these libraries have been ported
2951to Windows, and can be found in both source and binary form at 2941to Windows, and can be found in both source and binary form at
@@ -2955,6 +2945,7 @@ against. For additional information, see nt/INSTALL.
2955 2945
2956--- 2946---
2957** Sound is now supported on MS Windows. 2947** Sound is now supported on MS Windows.
2948
2958WAV format is supported on all versions of Windows, other formats such 2949WAV format is supported on all versions of Windows, other formats such
2959as AU, AIFF and MP3 may be supported in the more recent versions of 2950as AU, AIFF and MP3 may be supported in the more recent versions of
2960Windows, or when other software provides hooks into the system level 2951Windows, or when other software provides hooks into the system level
@@ -2962,16 +2953,19 @@ sound support for those formats.
2962 2953
2963--- 2954---
2964** Different shaped mouse pointers are supported on MS Windows. 2955** Different shaped mouse pointers are supported on MS Windows.
2956
2965The mouse pointer changes shape depending on what is under the pointer. 2957The mouse pointer changes shape depending on what is under the pointer.
2966 2958
2967--- 2959---
2968** Pointing devices with more than 3 buttons are now supported on MS Windows. 2960** Pointing devices with more than 3 buttons are now supported on MS Windows.
2961
2969The new variable `w32-pass-extra-mouse-buttons-to-system' controls 2962The new variable `w32-pass-extra-mouse-buttons-to-system' controls
2970whether Emacs should handle the extra buttons itself (the default), or 2963whether Emacs should handle the extra buttons itself (the default), or
2971pass them to Windows to be handled with system-wide functions. 2964pass them to Windows to be handled with system-wide functions.
2972 2965
2973--- 2966---
2974** Emacs takes note of colors defined in Control Panel on MS-Windows. 2967** Emacs takes note of colors defined in Control Panel on MS-Windows.
2968
2975The Control Panel defines some default colors for applications in much 2969The Control Panel defines some default colors for applications in much
2976the same way as wildcard X Resources do on X. Emacs now adds these 2970the same way as wildcard X Resources do on X. Emacs now adds these
2977colors to the colormap prefixed by System (eg SystemMenu for the 2971colors to the colormap prefixed by System (eg SystemMenu for the
@@ -2982,6 +2976,7 @@ you wish to use them in other faces.
2982 2976
2983--- 2977---
2984** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations. 2978** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations.
2979
2985Those systems use Unicode internally, so this allows Emacs to share 2980Those systems use Unicode internally, so this allows Emacs to share
2986multilingual text with other applications. On other versions of 2981multilingual text with other applications. On other versions of
2987MS Windows, Emacs now uses the appropriate locale coding-system, so 2982MS Windows, Emacs now uses the appropriate locale coding-system, so
@@ -2989,9 +2984,10 @@ the clipboard should work correctly for your local language without
2989any customizations. 2984any customizations.
2990 2985
2991--- 2986---
2992** On Mac OS, the value of the variable `keyboard-coding-system' is 2987** On Mac OS, `keyboard-coding-system' changes based on the keyboard script.
2993now dynamically changed according to the current keyboard script. The 2988
2994variable `mac-keyboard-text-encoding' and the constants 2989---
2990** The variable `mac-keyboard-text-encoding' and the constants
2995`kTextEncodingMacRoman', `kTextEncodingISOLatin1', and 2991`kTextEncodingMacRoman', `kTextEncodingISOLatin1', and
2996`kTextEncodingISOLatin2' are obsolete. 2992`kTextEncodingISOLatin2' are obsolete.
2997 2993
@@ -3022,57 +3018,67 @@ the command `undefined'. (In earlier Emacs versions, it used
3022*** `makehash' is now obsolete. Use `make-hash-table' instead. 3018*** `makehash' is now obsolete. Use `make-hash-table' instead.
3023 3019
3024+++ 3020+++
3025*** If optional third argument APPEND to `add-to-list' is non-nil, a 3021*** `add-to-list' takes an optional third argument, APPEND.
3026new element gets added at the end of the list instead of at the
3027beginning. This change actually occurred in Emacs-21.1, but was not
3028documented.
3029 3022
3030+++ 3023If APPEND is non-nil, the new element gets added at the end of the
3031*** New function `copy-tree' makes a copy of a tree, recursively copying 3024list instead of at the beginning. This change actually occurred in
3032both cars and cdrs. 3025Emacs 21.1, but was not documented then.
3033 3026
3034+++ 3027+++
3035*** New function `delete-dups' destructively removes `equal' 3028*** New function `copy-tree' makes a copy of a tree.
3036duplicates from a list. Of several `equal' occurrences of an element 3029
3037in the list, the first one is kept. 3030It recursively copyies through both CARs and CDRs.
3038 3031
3039+++ 3032+++
3040*** `declare' is now a macro. This change was made mostly for 3033*** New function `delete-dups' deletes `equal' duplicate elements from a list.
3041documentation purposes and should have no real effect on Lisp code. 3034
3035It modifies the list destructively, like `delete'. Of several `equal'
3036occurrences of an element in the list, the one that's kept is the
3037first one.
3042 3038
3043+++ 3039+++
3044*** The new function `rassq-delete-all' deletes all elements from an 3040*** New function `rassq-delete-all'.
3045alist whose cdr is `eq' to a specified value. 3041
3042(rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose
3043CDR is `eq' to the specified value.
3046 3044
3047+++ 3045+++
3048*** The function `number-sequence' returns a list of equally-separated 3046*** The function `number-sequence' makes a list of equally-separated numbers.
3049numbers. For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). 3047
3050By default, the separation is 1, but you can specify a different separation 3048For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). By
3051as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5). 3049default, the separation is 1, but you can specify a different
3050separation as the third argument. (number-sequence 1.5 6 2) returns
3051(1.5 3.5 5.5).
3052 3052
3053+++ 3053+++
3054*** The variables `most-positive-fixnum' and `most-negative-fixnum' 3054*** New variables `most-positive-fixnum' and `most-negative-fixnum'.
3055hold the largest and smallest possible integer values. 3055
3056They hold the largest and smallest possible integer values.
3056 3057
3057+++ 3058+++
3058*** The flags, width, and precision options for %-specifications in function 3059*** Minor change in the function `format'.
3059`format' are now documented. Some flags that were accepted but not 3060
3060implemented (such as "*") are no longer accepted. 3061Some flags that were accepted but not implemented (such as "*") are no
3062longer accepted.
3061 3063
3062+++ 3064+++
3063*** Functions `get' and `plist-get' no longer signals an error for 3065*** Functions `get' and `plist-get' no longer give errors for bad plists.
3064a malformed property list. They also detect cyclic lists. 3066
3067They return nil for a malformed property list or if the list is
3068cyclic.
3065 3069
3066+++ 3070+++
3067*** The new functions `lax-plist-get' and `lax-plist-put' are like 3071*** New functions `lax-plist-get' and `lax-plist-put'.
3068`plist-get' and `plist-put', except that they compare the property 3072
3069name using `equal' rather than `eq'. 3073They are like `plist-get' and `plist-put', except that they compare
3074the property name using `equal' rather than `eq'.
3070 3075
3071+++ 3076+++
3072*** The new variable `print-continuous-numbering', when non-nil, says 3077*** New variable `print-continuous-numbering'.
3073that successive calls to print functions should use the same 3078
3074numberings for circular structure references. This is only relevant 3079When this is non-nil, successive calls to print functions use a single
3075when `print-circle' is non-nil. 3080numbering scheme for circular structure references. This is only
3081relevant when `print-circle' is non-nil.
3076 3082
3077When you bind `print-continuous-numbering' to t, you should 3083When you bind `print-continuous-numbering' to t, you should
3078also bind `print-number-table' to nil. 3084also bind `print-number-table' to nil.
@@ -3092,44 +3098,55 @@ angle in radians between the vector [X, Y] and the X axis. (This is
3092equivalent to the standard C library function `atan2'.) 3098equivalent to the standard C library function `atan2'.)
3093 3099
3094+++ 3100+++
3095*** A function's doc string can now specify the calling pattern. 3101*** A function or macro's doc string can now specify the calling pattern.
3096 3102
3097You put this in the doc string's last line, which should match the 3103You put this info in the doc string's last line. It should be
3098regexp "\n\n(fn.*)\\'". 3104formatted so as to match the regexp "\n\n(fn .*)\\'". If you don't
3105specify this explicitly, Emacs determines it from the actual argument
3106names. Usually that default is right, but not always.
3099 3107
3100+++ 3108+++
3101*** New macro `with-local-quit' temporarily sets `inhibit-quit' to nil. 3109*** New macro `with-local-quit' temporarily allows quitting.
3110
3111A quit inside the body of `with-local-quit' is caught by the
3112`with-local-quit' form itself, but another quit will happen later once
3113the code that has inhibitted quitting exits.
3114
3115This is for use around potentially blocking or long-running code
3116inside timer functions and `post-command-hook' functions.
3102 3117
3103This is for use around potentially blocking or long-running code in 3118+++
3104timers and `post-command-hook' functions. 3119*** New macro `define-obsolete-function-alias'.
3105 3120
3106*** `define-obsolete-function-alias' 3121This combines `defalias' and `make-obsolete'.
3107combines `defalias' and `make-obsolete'.
3108 3122
3109+++ 3123+++
3110*** New function `unsafep' returns nil if the given Lisp form can't 3124*** New function `unsafep' determines whether a Lisp form is safe.
3111possibly do anything dangerous; otherwise it returns a reason why the 3125
3112form might be unsafe (calls unknown function, alters global variable, 3126It returns nil if the given Lisp form can't possibly do anything
3113etc). 3127dangerous; otherwise it returns a reason why the form might be unsafe
3128(calls unknown function, alters global variable, etc).
3114 3129
3115** Lisp code indentation features: 3130** Lisp code indentation features:
3116 3131
3117+++ 3132+++
3118*** The `defmacro' form can contain declarations specifying how to 3133*** The `defmacro' form can contain indentation and edebug declarations.
3119indent the macro in Lisp mode and how to debug it with Edebug. The 3134
3120syntax of defmacro has been extended to 3135These declarations specify how to indent the macro calls in Lisp mode
3136and how to debug them with Edebug. You write them like this:
3121 3137
3122 (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...) 3138 (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...)
3123 3139
3124DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The 3140DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The
3125declaration specifiers supported are: 3141possible declaration specifiers are:
3126 3142
3127(indent INDENT) 3143(indent INDENT)
3128 Set NAME's `lisp-indent-function' property to INDENT. 3144 Set NAME's `lisp-indent-function' property to INDENT.
3129 3145
3130(edebug DEBUG) 3146(edebug DEBUG)
3131 Set NAME's `edebug-form-spec' property to DEBUG. (This is 3147 Set NAME's `edebug-form-spec' property to DEBUG. (This is
3132 equivalent to writing a `def-edebug-spec' for the macro. 3148 equivalent to writing a `def-edebug-spec' for the macro,
3149 but this is cleaner.)
3133 3150
3134--- 3151---
3135*** cl-indent now allows customization of Indentation of backquoted forms. 3152*** cl-indent now allows customization of Indentation of backquoted forms.
@@ -3147,7 +3164,7 @@ forms.
3147+++ 3164+++
3148** Variable aliases: 3165** Variable aliases:
3149 3166
3150*** defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] 3167*** New function: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING]
3151 3168
3152This function defines the symbol ALIAS-VAR as a variable alias for 3169This function defines the symbol ALIAS-VAR as a variable alias for
3153symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR 3170symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR
@@ -3157,7 +3174,7 @@ changes the value of BASE-VAR.
3157DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has 3174DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has
3158the same documentation as BASE-VAR. 3175the same documentation as BASE-VAR.
3159 3176
3160*** indirect-variable VARIABLE 3177*** New function: indirect-variable VARIABLE
3161 3178
3162This function returns the variable at the end of the chain of aliases 3179This function returns the variable at the end of the chain of aliases
3163of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not 3180of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not
@@ -3173,24 +3190,22 @@ variables, including buffer-local and frame-local variables.
3173** defcustom changes: 3190** defcustom changes:
3174 3191
3175+++ 3192+++
3176*** defcustom and other custom declarations now use a default group 3193*** The new customization type `float' requires a floating point number.
3177(the last prior group defined in the same file) when no :group was given.
3178
3179---
3180*** The new customization type `float' specifies numbers with floating
3181point (no integers are allowed).
3182 3194
3183** String changes: 3195** String changes:
3184 3196
3185+++ 3197+++
3186*** The escape sequence \s is now interpreted as a SPACE character, 3198*** The escape sequence \s is now interpreted as a SPACE character.
3187unless it is followed by a `-' in a character constant (e.g. ?\s-A), 3199
3188in which case it is still interpreted as the super modifier. 3200Exception: In a character constant, if it is followed by a `-' in a
3189In strings, \s is always interpreted as a space. 3201character constant (e.g. ?\s-A), it is still interpreted as the super
3202modifier. In strings, \s is always interpreted as a space.
3203
3204+++
3205*** A hex escape in a string constant forces the string to be multibyte.
3190 3206
3191+++ 3207+++
3192*** A hex escape in a string forces the string to be multibyte. 3208*** An octal escape in a string constant forces the string to be unibyte.
3193An octal escape makes it unibyte.
3194 3209
3195+++ 3210+++
3196*** `split-string' now includes null substrings in the returned list if 3211*** `split-string' now includes null substrings in the returned list if
@@ -3204,7 +3219,7 @@ empty matches are omitted from the returned list.
3204multibyte string with the same individual character codes. 3219multibyte string with the same individual character codes.
3205 3220
3206+++ 3221+++
3207*** New function `substring-no-properties returns a substring without 3222*** New function `substring-no-properties' returns a substring without
3208text properties. 3223text properties.
3209 3224
3210+++ 3225+++
@@ -3212,18 +3227,13 @@ text properties.
3212`assoc-ignore-representation', which are still available, but have 3227`assoc-ignore-representation', which are still available, but have
3213been declared obsolete. 3228been declared obsolete.
3214 3229
3215** Buffer/variable changes:
3216
3217+++ 3230+++
3218*** The new function `buffer-local-value' returns the buffer-local 3231** Displaying warnings to the user.
3219binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not
3220have a buffer-local binding in buffer BUFFER, it returns the default
3221value of VARIABLE instead.
3222 3232
3223+++ 3233See the functions `warn' and `display-warning', or the Lisp Manual.
3224** There is a new facility for displaying warnings to the user. 3234If you want to be sure the warning will not be overlooked, this
3225 3235facility is much better than using `message', since it displays
3226See the functions `warn' and `display-warning' . 3236warnings in a separate window.
3227 3237
3228+++ 3238+++
3229** Progress reporters. 3239** Progress reporters.
@@ -3245,28 +3255,36 @@ the usable window height and width is used.
3245+++ 3255+++
3246*** The `line-move', `scroll-up', and `scroll-down' functions will now 3256*** The `line-move', `scroll-up', and `scroll-down' functions will now
3247modify the window vscroll to scroll through display rows that are 3257modify the window vscroll to scroll through display rows that are
3248taller that the height of the window, for example in the presense of 3258taller that the height of the window, for example in the presence of
3249large images. To disable this feature, Lisp code can bind the new 3259large images. To disable this feature, bind the new variable
3250variable `auto-window-vscroll' to nil. 3260`auto-window-vscroll' to nil.
3251 3261
3252+++ 3262+++
3253*** The argument to `forward-word', `backward-word', 3263*** The argument to `forward-word', `backward-word' is optional.
3254`forward-to-indentation' and `backward-to-indentation' is now 3264
3255optional, and defaults to 1. 3265It defaults to 1.
3256 3266
3257+++ 3267+++
3258*** Lisp code can now test if a given buffer position is inside a 3268*** Argument to `forward-to-indentation' and `backward-to-indentation' is optional.
3259clickable link with the new function `mouse-on-link-p'. This is the 3269
3260function used by the new `mouse-1-click-follows-link' functionality. 3270It defaults to 1.
3261 3271
3262+++ 3272+++
3263*** New function `line-number-at-pos' returns the line number of the 3273*** New function `mouse-on-link-p' test if a position is in a clickable link.
3264current line in the current buffer, or if optional buffer position is 3274
3265given, line number of corresponding line in current buffer. 3275This is the function used by the new `mouse-1-click-follows-link'
3276functionality.
3266 3277
3267+++ 3278+++
3268*** `field-beginning' and `field-end' now accept an additional optional 3279*** New function `line-number-at-pos' returns the line number of a position.
3269argument, LIMIT. 3280
3281It an optional buffer position argument that defaults to point.
3282
3283+++
3284*** `field-beginning' and `field-end' take new optional argument, LIMIT.
3285
3286This argument tells them not to search beyond LIMIT. Instead they
3287give up and return LIMIT.
3270 3288
3271+++ 3289+++
3272*** Function `pos-visible-in-window-p' now returns the pixel coordinates 3290*** Function `pos-visible-in-window-p' now returns the pixel coordinates
@@ -3281,23 +3299,29 @@ position or for a given window pixel coordinate.
3281** Text modification: 3299** Text modification:
3282 3300
3283+++ 3301+++
3284*** The new function `insert-buffer-substring-as-yank' works like 3302*** The new function `insert-for-yank' normally works like `insert', but
3285`insert-buffer-substring', but removes the text properties in the 3303removes the text properties in the `yank-excluded-properties' list
3286`yank-excluded-properties' list. 3304and handles the `yank-handler' text property.
3305
3306+++
3307*** The new function `insert-buffer-substring-as-yank' is like
3308`insert-for-yank' except that it gets the text from another buffer as
3309in `insert-buffer-substring'.
3287 3310
3288+++ 3311+++
3289*** The new function `insert-buffer-substring-no-properties' is like 3312*** The new function `insert-buffer-substring-no-properties' is like
3290insert-buffer-substring, but removes all text properties from the 3313`insert-buffer-substring', but removes all text properties from the
3291inserted substring. 3314inserted substring.
3292 3315
3293+++ 3316+++
3294*** The new function `filter-buffer-substring' extracts a buffer 3317*** The new function `filter-buffer-substring' extracts a buffer
3295substring, passes it through a set of filter functions, and returns 3318substring, passes it through a set of filter functions, and returns
3296the filtered substring. It is used instead of `buffer-substring' or 3319the filtered substring. Use it instead of `buffer-substring' or
3297`delete-and-extract-region' when copying text into a user-accessible 3320`delete-and-extract-region' when copying text into a user-accessible
3298data structure, like the kill-ring, X clipboard, or a register. The 3321data structure, such as the kill-ring, X clipboard, or a register.
3299list of filter function is specified by the new variable 3322
3300`buffer-substring-filters'. For example, Longlines mode uses 3323The list of filter function is specified by the new variable
3324`buffer-substring-filters'. For example, Longlines mode adds to
3301`buffer-substring-filters' to remove soft newlines from the copied 3325`buffer-substring-filters' to remove soft newlines from the copied
3302text. 3326text.
3303 3327
@@ -3320,42 +3344,80 @@ clone to the other.
3320--- 3344---
3321*** The function `insert-string' is now obsolete. 3345*** The function `insert-string' is now obsolete.
3322 3346
3323** Syntax table changes:
3324
3325+++ 3347+++
3326*** The macro `with-syntax-table' does not copy the table any more. 3348** Atomic change groups.
3327 3349
3328+++ 3350To perform some changes in the current buffer "atomically" so that
3329*** The new function `syntax-after' returns the syntax code 3351they either all succeed or are all undone, use `atomic-change-group'
3330of the character after a specified buffer position, taking account 3352around the code that makes changes. For instance:
3331of text properties as well as the character code.
3332 3353
3333+++ 3354 (atomic-change-group
3334*** `syntax-class' extracts the class of a syntax code (as returned 3355 (insert foo)
3335by syntax-after). 3356 (delete-region x y))
3336 3357
3337*** The new package `syntax.el' provides an efficient way to find the 3358If an error (or other nonlocal exit) occurs inside the body of
3338current syntactic context (as returned by `parse-partial-sexp'). 3359`atomic-change-group', it unmakes all the changes in that buffer that
3360were during the execution of the body. The change group has no effect
3361on any other buffers--any such changes remain.
3339 3362
3340** GC changes: 3363If you need something more sophisticated, you can directly call the
3364lower-level functions that `atomic-change-group' uses. Here is how.
3341 3365
3342+++ 3366To set up a change group for one buffer, call `prepare-change-group'.
3343*** New variables `gc-elapsed' and `gcs-done' provide extra information 3367Specify the buffer as argument; it defaults to the current buffer.
3344on garbage collection. 3368This function returns a "handle" for the change group. You must save
3369the handle to activate the change group and then finish it.
3345 3370
3346+++ 3371Before you change the buffer again, you must activate the change
3347*** Functions from `post-gc-hook' are run at the end of garbage 3372group. Pass the handle to `activate-change-group' afterward to
3348collection. The hook is run with GC inhibited, so use it with care. 3373do this.
3374
3375After you make the changes, you must finish the change group. You can
3376either accept the changes or cancel them all. Call
3377`accept-change-group' to accept the changes in the group as final;
3378call `cancel-change-group' to undo them all.
3379
3380You should use `unwind-protect' to make sure the group is always
3381finished. The call to `activate-change-group' should be inside the
3382`unwind-protect', in case the user types C-g just after it runs.
3383(This is one reason why `prepare-change-group' and
3384`activate-change-group' are separate functions.) Once you finish the
3385group, don't use the handle again--don't try to finish the same group
3386twice.
3387
3388To make a multibuffer change group, call `prepare-change-group' once
3389for each buffer you want to cover, then use `nconc' to combine the
3390returned values, like this:
3391
3392 (nconc (prepare-change-group buffer-1)
3393 (prepare-change-group buffer-2))
3394
3395You can then activate the multibuffer change group with a single call
3396to `activate-change-group', and finish it with a single call to
3397`accept-change-group' or `cancel-change-group'.
3398
3399Nested use of several change groups for the same buffer works as you
3400would expect. Non-nested use of change groups for the same buffer
3401will lead to undesirable results, so don't let it happen; the first
3402change group you start for any given buffer should be the last one
3403finished.
3349 3404
3350** Buffer-related changes: 3405** Buffer-related changes:
3351 3406
3352--- 3407---
3353*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST. 3408*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST.
3409
3354If it is non-nil, it specifies which buffers to list. 3410If it is non-nil, it specifies which buffers to list.
3355 3411
3356+++ 3412+++
3357*** `kill-buffer-hook' is now a permanent local. 3413*** `kill-buffer-hook' is now a permanent local.
3358 3414
3415+++
3416*** The new function `buffer-local-value' returns the buffer-local
3417binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not
3418have a buffer-local binding in buffer BUFFER, it returns the default
3419value of VARIABLE instead.
3420
3359** Local variables lists: 3421** Local variables lists:
3360 3422
3361+++ 3423+++
@@ -3382,25 +3444,65 @@ with the form as argument, and if any returns t, the form is ok to call.
3382If the form is not "ok to call", that means Emacs asks for 3444If the form is not "ok to call", that means Emacs asks for
3383confirmation as before. 3445confirmation as before.
3384 3446
3385** Abbrev changes: 3447** Searching and matching changes:
3386 3448
3387*** The new function copy-abbrev-table returns a new abbrev table that 3449+++
3388is a copy of a given abbrev table. 3450*** New function `looking-back' checks whether a regular expression matches
3451the text before point. Specifying the LIMIT argument bounds how far
3452back the match can start; this is a way to keep it from taking too long.
3389 3453
3390+++ 3454+++
3391*** define-abbrev now accepts an optional argument SYSTEM-FLAG. If 3455*** The new variable `search-spaces-regexp' controls how to search
3392non-nil, this marks the abbrev as a "system" abbrev, which means that 3456for spaces in a regular expression. If it is non-nil, it should be a
3393it won't be stored in the user's abbrevs file if he saves the abbrevs. 3457regular expression, and any series of spaces stands for that regular
3394Major modes that predefine some abbrevs should always specify this 3458expression. If it is nil, spaces stand for themselves.
3395flag. 3459
3460Spaces inside of constructs such as `[..]' and inside loops such as
3461`*', `+', and `?' are never replaced with `search-spaces-regexp'.
3462
3463+++
3464*** New regular expression operators, `\_<' and `\_>'.
3465
3466These match the beginning and end of a symbol. A symbol is a
3467non-empty sequence of either word or symbol constituent characters, as
3468specified by the syntax table.
3469
3470---
3471*** rx.el has new corresponding `symbol-end' and `symbol-start' elements.
3472
3473+++
3474*** `skip-chars-forward' and `skip-chars-backward' now handle
3475character classes such as `[:alpha:]', along with individual
3476characters and ranges.
3477
3478---
3479*** In `replace-match', the replacement text no longer inherits
3480properties from surrounding text.
3481
3482+++
3483*** The list returned by `(match-data t)' now has the buffer as a final
3484element, if the last match was on a buffer. `set-match-data'
3485accepts such a list for restoring the match state.
3486
3487+++
3488*** The default value of `sentence-end' is now defined using the new
3489variable `sentence-end-without-space', which contains such characters
3490that end a sentence without following spaces.
3491
3492The function `sentence-end' should be used to obtain the value of the
3493variable `sentence-end'. If the variable `sentence-end' is nil, then
3494this function returns the regexp constructed from the variables
3495`sentence-end-without-period', `sentence-end-double-space' and
3496`sentence-end-without-space'.
3396 3497
3397** Undo changes: 3498** Undo changes:
3398 3499
3399+++ 3500+++
3400*** An element of buffer-undo-list can now have the form (apply FUNNAME 3501*** `buffer-undo-list' can allows programmable elements.
3401. ARGS), where FUNNAME is a symbol other than t or nil. That stands 3502
3402for a high-level change that should be undone by evaluating (apply 3503These elements have the form (apply FUNNAME . ARGS), where FUNNAME is
3403FUNNAME ARGS). 3504a symbol other than t or nil. That stands for a high-level change
3505that should be undone by evaluating (apply FUNNAME ARGS).
3404 3506
3405These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS) 3507These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS)
3406which indicates that the change which took place was limited to the 3508which indicates that the change which took place was limited to the
@@ -3408,20 +3510,20 @@ range BEG...END and increased the buffer size by DELTA.
3408 3510
3409+++ 3511+++
3410*** If the buffer's undo list for the current command gets longer than 3512*** If the buffer's undo list for the current command gets longer than
3411undo-outer-limit, garbage collection empties it. This is to prevent 3513`undo-outer-limit', garbage collection empties it. This is to prevent
3412it from using up the available memory and choking Emacs. 3514it from using up the available memory and choking Emacs.
3413 3515
3414+++ 3516+++
3415** New `yank-handler' text property can be used to control how 3517** New `yank-handler' text property can be used to control how
3416previously killed text on the kill-ring is reinserted. 3518previously killed text on the kill ring is reinserted.
3417 3519
3418The value of the yank-handler property must be a list with one to four 3520The value of the `yank-handler' property must be a list with one to four
3419elements with the following format: 3521elements with the following format:
3420 (FUNCTION PARAM NOEXCLUDE UNDO). 3522 (FUNCTION PARAM NOEXCLUDE UNDO).
3421 3523
3422The `insert-for-yank' function looks for a yank-handler property on 3524The `insert-for-yank' function looks for a yank-handler property on
3423the first character on its string argument (typically the first 3525the first character on its string argument (typically the first
3424element on the kill-ring). If a yank-handler property is found, 3526element on the kill-ring). If a `yank-handler' property is found,
3425the normal behavior of `insert-for-yank' is modified in various ways: 3527the normal behavior of `insert-for-yank' is modified in various ways:
3426 3528
3427 When FUNCTION is present and non-nil, it is called instead of `insert' 3529 When FUNCTION is present and non-nil, it is called instead of `insert'
@@ -3431,7 +3533,7 @@ passed to FUNCTION (or `insert'); for example, if FUNCTION is
3431`yank-rectangle', PARAM should be a list of strings to insert as a 3533`yank-rectangle', PARAM should be a list of strings to insert as a
3432rectangle. 3534rectangle.
3433 If NOEXCLUDE is present and non-nil, the normal removal of the 3535 If NOEXCLUDE is present and non-nil, the normal removal of the
3434yank-excluded-properties is not performed; instead FUNCTION is 3536`yank-excluded-properties' is not performed; instead FUNCTION is
3435responsible for removing those properties. This may be necessary 3537responsible for removing those properties. This may be necessary
3436if FUNCTION adjusts point before or after inserting the object. 3538if FUNCTION adjusts point before or after inserting the object.
3437 If UNDO is present and non-nil, it is a function that will be called 3539 If UNDO is present and non-nil, it is a function that will be called
@@ -3439,31 +3541,43 @@ by `yank-pop' to undo the insertion of the current object. It is
3439called with two arguments, the start and end of the current region. 3541called with two arguments, the start and end of the current region.
3440FUNCTION can set `yank-undo-function' to override the UNDO value. 3542FUNCTION can set `yank-undo-function' to override the UNDO value.
3441 3543
3442*** The functions kill-new, kill-append, and kill-region now have an 3544*** The functions `kill-new', `kill-append', and `kill-region' now have an
3443optional argument to specify the yank-handler text property to put on 3545optional argument to specify the `yank-handler' text property to put on
3444the killed text. 3546the killed text.
3445 3547
3446*** The function yank-pop will now use a non-nil value of the variable 3548*** The function `yank-pop' will now use a non-nil value of the variable
3447`yank-undo-function' (instead of delete-region) to undo the previous 3549`yank-undo-function' (instead of `delete-region') to undo the previous
3448yank or yank-pop command (or a call to insert-for-yank). The function 3550`yank' or `yank-pop' command (or a call to `insert-for-yank'). The function
3449insert-for-yank automatically sets that variable according to the UNDO 3551`insert-for-yank' automatically sets that variable according to the UNDO
3450element of the string argument's yank-handler text property if present. 3552element of the string argument's `yank-handler' text property if present.
3451 3553
3452*** The function `insert-for-yank' now supports strings where the 3554*** The function `insert-for-yank' now supports strings where the
3453`yank-handler' property does not span the first character of the 3555`yank-handler' property does not span the first character of the
3454string. The old behavior is available if you call 3556string. The old behavior is available if you call
3455`insert-for-yank-1' instead. 3557`insert-for-yank-1' instead.
3456 3558
3457*** The new function insert-for-yank normally works like `insert', but 3559** Syntax table changes:
3458removes the text properties in the `yank-excluded-properties' list. 3560
3459However, the insertion of the text can be modified by a `yank-handler' 3561+++
3460text property. 3562*** The macro `with-syntax-table' no longer copies the syntax table.
3563
3564+++
3565*** The new function `syntax-after' returns the syntax code
3566of the character after a specified buffer position, taking account
3567of text properties as well as the character code.
3568
3569+++
3570*** `syntax-class' extracts the class of a syntax code (as returned
3571by `syntax-after').
3572
3573*** The new function `syntax-ppss' rovides an efficient way to find the
3574current syntactic context at point.
3461 3575
3462** File operation changes: 3576** File operation changes:
3463 3577
3464+++ 3578+++
3465*** New vars `exec-suffixes' and `load-suffixes' used when 3579*** New vars `exec-suffixes' and `load-suffixes' used when
3466searching for an executable resp. an elisp file. 3580searching for an executable or an Emacs Lisp file.
3467 3581
3468+++ 3582+++
3469*** The new primitive `set-file-times' sets a file's access and 3583*** The new primitive `set-file-times' sets a file's access and
@@ -3477,8 +3591,8 @@ its own special methods and not directly through the file system).
3477The value in that case is an identifier for the remote file system. 3591The value in that case is an identifier for the remote file system.
3478 3592
3479+++ 3593+++
3480*** `auto-save-file-format' has been renamed to 3594*** `buffer-auto-save-file-format' is the new name for what was
3481`buffer-auto-save-file-format' and made into a permanent local. 3595formerly called `auto-save-file-format'. It is now a permanent local.
3482 3596
3483+++ 3597+++
3484*** Functions `file-name-sans-extension' and `file-name-extension' now 3598*** Functions `file-name-sans-extension' and `file-name-extension' now
@@ -3486,15 +3600,11 @@ ignore the leading dots in file names, so that file names such as
3486`.emacs' are treated as extensionless. 3600`.emacs' are treated as extensionless.
3487 3601
3488+++ 3602+++
3489*** copy-file now takes an additional option arg MUSTBENEW. 3603*** `copy-file' now takes an additional option arg MUSTBENEW.
3490 3604
3491This argument works like the MUSTBENEW argument of write-file. 3605This argument works like the MUSTBENEW argument of write-file.
3492 3606
3493+++ 3607+++
3494*** If the second argument to `copy-file' is the name of a directory,
3495the file is copied to that directory instead of signaling an error.
3496
3497+++
3498*** `visited-file-modtime' and `calendar-time-from-absolute' now return 3608*** `visited-file-modtime' and `calendar-time-from-absolute' now return
3499a list of two integers, instead of a cons. 3609a list of two integers, instead of a cons.
3500 3610
@@ -3511,9 +3621,9 @@ tasks, for example; it can be used by the copyright package to make
3511sure saved files have the current year in any copyright headers. 3621sure saved files have the current year in any copyright headers.
3512 3622
3513+++ 3623+++
3514*** If a buffer sets buffer-save-without-query to non-nil, 3624*** If `buffer-save-without-query' is non-nil in some buffer,
3515save-some-buffers will always save that buffer without asking 3625`save-some-buffers' will always save that buffer without asking (if
3516(if it's modified). 3626it's modified).
3517 3627
3518*** New function `locate-file' searches for a file in a list of directories. 3628*** New function `locate-file' searches for a file in a list of directories.
3519`locate-file' accepts a name of a file to search (a string), and two 3629`locate-file' accepts a name of a file to search (a string), and two
@@ -3528,12 +3638,13 @@ One advantage of using this function is that the list of suffixes in
3528executables without polluting Lisp code with OS dependancies. 3638executables without polluting Lisp code with OS dependancies.
3529 3639
3530--- 3640---
3531*** The precedence of file-name-handlers has been changed. 3641*** The precedence of file name handlers has been changed.
3532Instead of blindly choosing the first handler that matches, 3642
3533find-file-name-handler now gives precedence to a file-name handler 3643Instead of choosing the first handler that matches,
3534that matches near the end of the file name. More specifically, the 3644`find-file-name-handler' now gives precedence to a file name handler
3535handler whose (match-beginning 0) is the largest is chosen. 3645that matches nearest the end of the file name. More precisely, the
3536In case of ties, the old "first matched" rule applies. 3646handler whose (match-beginning 0) is the largest is chosen. In case
3647of ties, the old "first matched" rule applies.
3537 3648
3538+++ 3649+++
3539*** A file name handler can declare which operations it handles. 3650*** A file name handler can declare which operations it handles.
@@ -3551,7 +3662,7 @@ autoloaded when not really necessary.
3551+++ 3662+++
3552*** An interactive specification can now use the code letter 'U' to get 3663*** An interactive specification can now use the code letter 'U' to get
3553the up-event that was discarded in case the last key sequence read for a 3664the up-event that was discarded in case the last key sequence read for a
3554previous 'k' or 'K' argument was a down-event; otherwise nil is used. 3665previous `k' or `K' argument was a down-event; otherwise nil is used.
3555 3666
3556+++ 3667+++
3557*** The new interactive-specification `G' reads a file name 3668*** The new interactive-specification `G' reads a file name
@@ -3559,28 +3670,29 @@ much like `F', but if the input is a directory name (even defaulted),
3559it returns just the directory name. 3670it returns just the directory name.
3560 3671
3561--- 3672---
3562*** Functions y-or-n-p, read-char, read-key-sequence and the like, that 3673*** Functions `y-or-n-p', `read-char', `read-key-sequence' and the like, that
3563display a prompt but don't use the minibuffer, now display the prompt 3674display a prompt but don't use the minibuffer, now display the prompt
3564using the text properties (esp. the face) of the prompt string. 3675using the text properties (esp. the face) of the prompt string.
3565 3676
3566+++ 3677+++
3567*** (while-no-input BODY...) runs BODY, but only so long as no input 3678*** (while-no-input BODY...) runs BODY, but only so long as no input
3568arrives. If the user types or clicks anything, BODY stops as if a 3679arrives. If the user types or clicks anything, BODY stops as if a
3569quit had occurred. while-no-input returns the value of BODY, if BODY 3680quit had occurred. `while-no-input' returns the value of BODY, if BODY
3570finishes. It returns nil if BODY was aborted. 3681finishes. It returns nil if BODY was aborted.
3571 3682
3572** Minibuffer changes: 3683** Minibuffer changes:
3573 3684
3685+++
3574*** The new function `minibufferp' returns non-nil if its optional 3686*** The new function `minibufferp' returns non-nil if its optional
3575buffer argument is a minibuffer. If the argument is omitted, it 3687buffer argument is a minibuffer. If the argument is omitted, it
3576defaults to the current buffer. 3688defaults to the current buffer.
3577 3689
3578+++ 3690+++
3579*** New function minibuffer-selected-window returns the window which 3691*** New function `minibuffer-selected-window' returns the window which
3580was selected when entering the minibuffer. 3692was selected when entering the minibuffer.
3581 3693
3582+++ 3694+++
3583*** read-from-minibuffer now accepts an additional argument KEEP-ALL 3695*** `read-from-minibuffer' now accepts an additional argument KEEP-ALL
3584saying to put all inputs in the history list, even empty ones. 3696saying to put all inputs in the history list, even empty ones.
3585 3697
3586+++ 3698+++
@@ -3591,8 +3703,8 @@ while reading the file name from the minibuffer; the predicate in this
3591variable is used by read-file-name-internal to filter the completion list. 3703variable is used by read-file-name-internal to filter the completion list.
3592 3704
3593--- 3705---
3594*** The new variable `read-file-name-function' can be used by lisp code 3706*** The new variable `read-file-name-function' can be used by Lisp code
3595to override the internal read-file-name function. 3707to override the built-in `read-file-name' function.
3596 3708
3597+++ 3709+++
3598*** The new variable `read-file-name-completion-ignore-case' specifies 3710*** The new variable `read-file-name-completion-ignore-case' specifies
@@ -3600,59 +3712,45 @@ whether completion ignores case when reading a file name with the
3600`read-file-name' function. 3712`read-file-name' function.
3601 3713
3602+++ 3714+++
3603*** The new function `read-directory-name' can be used instead of 3715*** The new function `read-directory-name' for reading a directory name.
3604`read-file-name' to read a directory name; when used, completion
3605will only show directories.
3606 3716
3607** Searching and matching changes: 3717It is like `read-file-name' except that the defaulting works better
3718for directories, and completion inside it shows only directories.
3608 3719
3609+++ 3720** Completion changes:
3610*** New function `looking-back' checks whether a regular expression matches
3611the text before point. Specifying the LIMIT argument bounds how far
3612back the match can start; this is a way to keep it from taking too long.
3613 3721
3614+++ 3722+++
3615*** The new variable search-spaces-regexp controls how to search 3723*** The functions `all-completions' and `try-completion' now accept lists
3616for spaces in a regular expression. If it is non-nil, it should be a 3724of strings as well as hash-tables additionally to alists, obarrays
3617regular expression, and any series of spaces stands for that regular 3725and functions. Furthermore, the function `test-completion' is now
3618expression. If it is nil, spaces stand for themselves. 3726exported to Lisp. The keys in alists and hash tables can be either
3619 3727strings or symbols, which are automatically converted with to strings.
3620Spaces inside of constructs such as [..] and *, +, ? are never
3621replaced with search-spaces-regexp.
3622 3728
3623+++ 3729+++
3624*** There are now two new regular expression operators, \_< and \_>, 3730*** The new macro `dynamic-completion-table' supports using functions
3625for matching the beginning and end of a symbol. A symbol is a 3731as a dynamic completion table.
3626non-empty sequence of either word or symbol constituent characters, as
3627specified by the syntax table.
3628 3732
3629+++ 3733 (dynamic-completion-table FUN)
3630*** skip-chars-forward and skip-chars-backward now handle
3631character classes such as [:alpha:], along with individual characters
3632and ranges.
3633 3734
3634--- 3735FUN is called with one argument, the string for which completion is required,
3635*** In `replace-match', the replacement text no longer inherits 3736and it should return an alist containing all the intended possible
3636properties from surrounding text. 3737completions. This alist can be a full list of possible completions so that FUN
3738can ignore the value of its argument. If completion is performed in the
3739minibuffer, FUN will be called in the buffer from which the minibuffer was
3740entered. `dynamic-completion-table' then computes the completion.
3637 3741
3638+++ 3742+++
3639*** The list returned by `(match-data t)' now has the buffer as a final 3743*** The new macro `lazy-completion-table' initializes a variable
3640element, if the last match was on a buffer. `set-match-data' 3744as a lazy completion table.
3641accepts such a list for restoring the match state.
3642
3643---
3644*** rx.el has new corresponding `symbol-end' and `symbol-start' elements.
3645 3745
3646+++ 3746 (lazy-completion-table VAR FUN &rest ARGS)
3647*** The default value of `sentence-end' is now defined using the new
3648variable `sentence-end-without-space', which contains such characters
3649that end a sentence without following spaces.
3650 3747
3651The function `sentence-end' should be used to obtain the value of the 3748If the completion table VAR is used for the first time (e.g., by passing VAR
3652variable `sentence-end'. If the variable `sentence-end' is nil, then 3749as an argument to `try-completion'), the function FUN is called with arguments
3653this function returns the regexp constructed from the variables 3750ARGS. FUN must return the completion table that will be stored in VAR. If
3654`sentence-end-without-period', `sentence-end-double-space' and 3751completion is requested in the minibuffer, FUN will be called in the buffer
3655`sentence-end-without-space'. 3752from which the minibuffer was entered. The return value of
3753`lazy-completion-table' must be used to initialize the value of VAR.
3656 3754
3657+++ 3755+++
3658** Enhancements to keymaps. 3756** Enhancements to keymaps.
@@ -3667,7 +3765,7 @@ example,
3667 3765
3668*** Interactive commands can be remapped through keymaps. 3766*** Interactive commands can be remapped through keymaps.
3669 3767
3670This is an alternative to using defadvice or substitute-key-definition 3768This is an alternative to using `defadvice' or `substitute-key-definition'
3671to modify the behavior of a key binding using the normal keymap 3769to modify the behavior of a key binding using the normal keymap
3672binding and lookup functionality. 3770binding and lookup functionality.
3673 3771
@@ -3676,26 +3774,25 @@ remapped to another command, that command is run instead of the
3676original command. 3774original command.
3677 3775
3678Example: 3776Example:
3679Suppose that minor mode my-mode has defined the commands 3777Suppose that minor mode `my-mode' has defined the commands
3680my-kill-line and my-kill-word, and it wants C-k (and any other key 3778`my-kill-line' and `my-kill-word', and it wants C-k (and any other key
3681bound to kill-line) to run the command my-kill-line instead of 3779bound to `kill-line') to run the command `my-kill-line' instead of
3682kill-line, and likewise it wants to run my-kill-word instead of 3780`kill-line', and likewise it wants to run `my-kill-word' instead of
3683kill-word. 3781`kill-word'.
3684 3782
3685Instead of rebinding C-k and the other keys in the minor mode map, 3783Instead of rebinding C-k and the other keys in the minor mode map,
3686command remapping allows you to directly map kill-line into 3784command remapping allows you to directly map `kill-line' into
3687my-kill-line and kill-word into my-kill-word through the minor mode 3785`my-kill-line' and `kill-word' into `my-kill-word' using `define-key':
3688map using define-key:
3689 3786
3690 (define-key my-mode-map [remap kill-line] 'my-kill-line) 3787 (define-key my-mode-map [remap kill-line] 'my-kill-line)
3691 (define-key my-mode-map [remap kill-word] 'my-kill-word) 3788 (define-key my-mode-map [remap kill-word] 'my-kill-word)
3692 3789
3693Now, when my-mode is enabled, and the user enters C-k or M-d, 3790When `my-mode' is enabled, its minor mode keymap is enabled too. So
3694the commands my-kill-line and my-kill-word are run. 3791when the user types C-k, that runs the command `my-kill-line'.
3695 3792
3696Notice that only one level of remapping is supported. In the above 3793Only one level of remapping is supported. In the above example, this
3697example, this means that if my-kill-line is remapped to other-kill, 3794means that if `my-kill-line' is remapped to `other-kill', then C-k still
3698then C-k still runs my-kill-line. 3795runs `my-kill-line'.
3699 3796
3700The following changes have been made to provide command remapping: 3797The following changes have been made to provide command remapping:
3701 3798
@@ -3707,15 +3804,15 @@ The following changes have been made to provide command remapping:
3707- The new function `command-remapping' returns the binding for a 3804- The new function `command-remapping' returns the binding for a
3708 remapped command in the current keymaps, or nil if not remapped. 3805 remapped command in the current keymaps, or nil if not remapped.
3709 3806
3710- key-binding now remaps interactive commands unless the optional 3807- `key-binding' now remaps interactive commands unless the optional
3711 third argument NO-REMAP is non-nil. 3808 third argument NO-REMAP is non-nil.
3712 3809
3713- where-is-internal now returns nil for a remapped command (e.g. 3810- `where-is-internal' now returns nil for a remapped command (e.g.
3714 kill-line if my-mode is enabled), and the actual key binding for 3811 `kill-line', when `my-mode' is enabled), and the actual key binding for
3715 the command it is remapped to (e.g. C-k for my-kill-line). 3812 the command it is remapped to (e.g. C-k for my-kill-line).
3716 It also has a new optional fifth argument, NO-REMAP, which inhibits 3813 It also has a new optional fifth argument, NO-REMAP, which inhibits
3717 remapping if non-nil (e.g. it returns C-k for kill-line and 3814 remapping if non-nil (e.g. it returns "C-k" for `kill-line', and
3718 <kill-line> for my-kill-line). 3815 "<kill-line>" for `my-kill-line').
3719 3816
3720- The new variable `this-original-command' contains the original 3817- The new variable `this-original-command' contains the original
3721 command before remapping. It is equal to `this-command' when the 3818 command before remapping. It is equal to `this-command' when the
@@ -3725,10 +3822,11 @@ The following changes have been made to provide command remapping:
3725over minor mode keymaps. 3822over minor mode keymaps.
3726 3823
3727*** The `keymap' property now also works at the ends of overlays and 3824*** The `keymap' property now also works at the ends of overlays and
3728text-properties, according to their stickiness. This also means that it 3825text properties, according to their stickiness. This also means that it
3729works with empty overlays. The same hold for the `local-map' property. 3826works with empty overlays. The same hold for the `local-map' property.
3730 3827
3731*** Dense keymaps now handle inheritance correctly. 3828*** Dense keymaps now handle inheritance correctly.
3829
3732Previously a dense keymap would hide all of the simple-char key 3830Previously a dense keymap would hide all of the simple-char key
3733bindings of the parent keymap. 3831bindings of the parent keymap.
3734 3832
@@ -3740,99 +3838,57 @@ active keymaps.
3740*** New function `describe-buffer-bindings' inserts the list of all 3838*** New function `describe-buffer-bindings' inserts the list of all
3741defined keys and their definitions. 3839defined keys and their definitions.
3742 3840
3743*** New function `keymap-prompt' returns the prompt-string of a keymap 3841*** New function `keymap-prompt' returns the prompt string of a keymap.
3744 3842
3745*** (map-keymap FUNCTION KEYMAP) applies the function to each binding 3843*** (map-keymap FUNCTION KEYMAP) applies the function to each binding
3746in the keymap. 3844in the keymap.
3747 3845
3748*** New variable emulation-mode-map-alists. 3846*** New variable `emulation-mode-map-alists'.
3749 3847
3750Lisp packages using many minor mode keymaps can now maintain their own 3848Lisp packages using many minor mode keymaps can now maintain their own
3751keymap alist separate from minor-mode-map-alist by adding their keymap 3849keymap alist separate from `minor-mode-map-alist' by adding their
3752alist to this list. 3850keymap alist to this list.
3753
3754+++
3755** Atomic change groups.
3756
3757To perform some changes in the current buffer "atomically" so that
3758they either all succeed or are all undone, use `atomic-change-group'
3759around the code that makes changes. For instance:
3760
3761 (atomic-change-group
3762 (insert foo)
3763 (delete-region x y))
3764
3765If an error (or other nonlocal exit) occurs inside the body of
3766`atomic-change-group', it unmakes all the changes in that buffer that
3767were during the execution of the body. The change group has no effect
3768on any other buffers--any such changes remain.
3769
3770If you need something more sophisticated, you can directly call the
3771lower-level functions that `atomic-change-group' uses. Here is how.
3772
3773To set up a change group for one buffer, call `prepare-change-group'.
3774Specify the buffer as argument; it defaults to the current buffer.
3775This function returns a "handle" for the change group. You must save
3776the handle to activate the change group and then finish it.
3777
3778Before you change the buffer again, you must activate the change
3779group. Pass the handle to `activate-change-group' afterward to
3780do this.
3781
3782After you make the changes, you must finish the change group. You can
3783either accept the changes or cancel them all. Call
3784`accept-change-group' to accept the changes in the group as final;
3785call `cancel-change-group' to undo them all.
3786 3851
3787You should use `unwind-protect' to make sure the group is always 3852** Abbrev changes:
3788finished. The call to `activate-change-group' should be inside the
3789`unwind-protect', in case the user types C-g just after it runs.
3790(This is one reason why `prepare-change-group' and
3791`activate-change-group' are separate functions.) Once you finish the
3792group, don't use the handle again--don't try to finish the same group
3793twice.
3794 3853
3795To make a multibuffer change group, call `prepare-change-group' once 3854+++
3796for each buffer you want to cover, then use `nconc' to combine the 3855*** The new function `copy-abbrev-table' copies an abbrev table.
3797returned values, like this:
3798 3856
3799 (nconc (prepare-change-group buffer-1) 3857It returns a new abbrev table that is a copy of a given abbrev table.
3800 (prepare-change-group buffer-2))
3801 3858
3802You can then activate the multibuffer change group with a single call 3859+++
3803to `activate-change-group', and finish it with a single call to 3860*** `define-abbrev' now accepts an optional argument SYSTEM-FLAG.
3804`accept-change-group' or `cancel-change-group'.
3805 3861
3806Nested use of several change groups for the same buffer works as you 3862If non-nil, this marks the abbrev as a "system" abbrev, which means
3807would expect. Non-nested use of change groups for the same buffer 3863that it won't be stored in the user's abbrevs file if he saves the
3808will lead to undesirable results, so don't let it happen; the first 3864abbrevs. Major modes that predefine some abbrevs should always
3809change group you start for any given buffer should be the last one 3865specify this flag.
3810finished.
3811 3866
3812+++ 3867+++
3813** Enhancements to process support 3868** Enhancements to process support
3814 3869
3815*** Function list-processes now has an optional argument; if non-nil, 3870*** Function `list-processes' now has an optional argument; if non-nil,
3816only the processes whose query-on-exit flag is set are listed. 3871it lists only the processes whose query-on-exit flag is set.
3872
3873*** New fns `set-process-query-on-exit-flag' and `process-query-on-exit-flag'.
3817 3874
3818*** New set-process-query-on-exit-flag and process-query-on-exit-flag 3875These replace the old function `process-kill-without-query'. That
3819functions. The existing process-kill-without-query function is still 3876function is still supported, but new code should use the new
3820supported, but new code should use the new functions. 3877functions.
3821 3878
3822*** Function signal-process now accepts a process object or process 3879*** Function `signal-process' now accepts a process object or process
3823name in addition to a process id to identify the signalled process. 3880name in addition to a process id to identify the signalled process.
3824 3881
3825*** Processes now have an associated property list where programs can 3882*** Processes now have an associated property list where programs can
3826maintain process state and other per-process related information. 3883maintain process state and other per-process related information.
3827 3884
3828The new functions process-get and process-put are used to access, add, 3885Use the new functions `process-get' and `process-put' to access, add,
3829and modify elements on this property list. 3886and modify elements on this property list. Use the new functions
3830 3887`process-plist' and `set-process-plist' to access and replace the
3831The new low-level functions process-plist and set-process-plist are 3888entire property list of a process.
3832used to access and replace the entire property list of a process.
3833 3889
3834*** Function accept-process-output now has an optional fourth arg 3890*** Function `accept-process-output' has a new optional fourth arg
3835`just-this-one'. If non-nil, only output from the specified process 3891JUST-THIS-ONE. If non-nil, only output from the specified process
3836is handled, suspending output from other processes. If value is an 3892is handled, suspending output from other processes. If value is an
3837integer, also inhibit running timers. This feature is generally not 3893integer, also inhibit running timers. This feature is generally not
3838recommended, but may be necessary for specific applications, such as 3894recommended, but may be necessary for specific applications, such as
@@ -3843,7 +3899,7 @@ speech synthesis.
3843On some systems, when emacs reads the output from a subprocess, the 3899On some systems, when emacs reads the output from a subprocess, the
3844output data is read in very small blocks, potentially resulting in 3900output data is read in very small blocks, potentially resulting in
3845very poor performance. This behavior can be remedied to some extent 3901very poor performance. This behavior can be remedied to some extent
3846by setting the new variable process-adaptive-read-buffering to a 3902by setting the new variable `process-adaptive-read-buffering' to a
3847non-nil value (the default), as it will automatically delay reading 3903non-nil value (the default), as it will automatically delay reading
3848from such processes, to allowing them to produce more output before 3904from such processes, to allowing them to produce more output before
3849emacs tries to read it. 3905emacs tries to read it.
@@ -3857,10 +3913,12 @@ process.
3857obeys file handlers. The file handler is chosen based on 3913obeys file handlers. The file handler is chosen based on
3858`default-directory'. 3914`default-directory'.
3859 3915
3860*** A filter function of a process is called with a multibyte string 3916*** A process filter function gets the output as multibyte string
3861if the filter's multibyteness is t. That multibyteness is decided by 3917if the process specifies t for its filter's multibyteness.
3862the value of `default-enable-multibyte-characters' when the process is 3918
3863created and can be changed later by `set-process-filter-multibyte'. 3919That multibyteness is decided by the value of
3920`default-enable-multibyte-characters' when the process is created, and
3921you can change it later with `set-process-filter-multibyte'.
3864 3922
3865*** The new function `set-process-filter-multibyte' sets the 3923*** The new function `set-process-filter-multibyte' sets the
3866multibyteness of the strings passed to the process's filter. 3924multibyteness of the strings passed to the process's filter.
@@ -3877,8 +3935,8 @@ which was not compatible with the behavior of file reading.
3877+++ 3935+++
3878** Enhanced networking support. 3936** Enhanced networking support.
3879 3937
3880*** There is a new `make-network-process' function which supports 3938*** The new `make-network-process' function makes network connections.
3881opening of stream and datagram connections to a server, as well as 3939It allows opening of stream and datagram connections to a server, as well as
3882create a stream or datagram server inside emacs. 3940create a stream or datagram server inside emacs.
3883 3941
3884- A server is started using :server t arg. 3942- A server is started using :server t arg.
@@ -3893,9 +3951,9 @@ create a stream or datagram server inside emacs.
3893To test for the availability of a given feature, use featurep like this: 3951To test for the availability of a given feature, use featurep like this:
3894 (featurep 'make-network-process '(:type datagram)) 3952 (featurep 'make-network-process '(:type datagram))
3895 3953
3896*** Original open-network-stream is now emulated using make-network-process. 3954*** The old `open-network-stream' now uses `make-network-process'.
3897 3955
3898*** New function open-network-stream-nowait. 3956*** New function `open-network-stream-nowait'.
3899 3957
3900This function initiates a non-blocking connect and returns immediately 3958This function initiates a non-blocking connect and returns immediately
3901without waiting for the connection to be established. It takes the 3959without waiting for the connection to be established. It takes the
@@ -3903,55 +3961,58 @@ filter and sentinel functions as arguments; when the non-blocking
3903connect completes, the sentinel is called with a status string 3961connect completes, the sentinel is called with a status string
3904matching "open" or "failed". 3962matching "open" or "failed".
3905 3963
3906*** New function open-network-stream-server. 3964*** New function `open-network-stream-server'.
3907 3965
3908This function creates a network server process for a TCP service. 3966This function creates a network server process for a TCP service.
3909When a client connects to the specified service, a new subprocess 3967When a client connects to the specified service, a new subprocess
3910is created to handle the new connection, and the sentinel function 3968is created to handle the new connection, and the sentinel function
3911is called for the new process. 3969is called for the new process.
3912 3970
3913*** New functions process-datagram-address and set-process-datagram-address. 3971*** New functions `process-datagram-address', `set-process-datagram-address'.
3914 3972
3915These functions are used with datagram-based network processes to get 3973These functions are used with datagram-based network processes to get
3916and set the current address of the remote partner. 3974and set the current address of the remote partner.
3917 3975
3918*** New function format-network-address. 3976*** New function `format-network-address'.
3919 3977
3920This function reformats the lisp representation of a network address 3978This function reformats the Lisp representation of a network address
3921to a printable string. For example, an IP address A.B.C.D and port 3979to a printable string. For example, an IP address A.B.C.D and port
3922number P is represented as a five element vector [A B C D P], and the 3980number P is represented as a five element vector [A B C D P], and the
3923printable string returned for this vector is "A.B.C.D:P". See the doc 3981printable string returned for this vector is "A.B.C.D:P". See the doc
3924string for other formatting options. 3982string for other formatting options.
3925 3983
3926*** By default, the function process-contact still returns (HOST SERVICE) 3984*** `process-contact' has an optional KEY argument.
3927for a network process. Using the new optional KEY arg, the complete list 3985
3928of network process properties or a specific property can be selected. 3986Depending on this argument, you can get the complete list of network
3987process properties or a specific property. Using :local or :remote as
3988the KEY, you get the address of the local or remote end-point.
3989
3990An Inet address is represented as a 5 element vector, where the first
39914 elements contain the IP address and the fifth is the port number.
3929 3992
3930Using :local and :remote as the KEY, the address of the local or 3993*** New functions `stop-process' and `continue-process'.
3931remote end-point is returned. An Inet address is represented as a 5
3932element vector, where the first 4 elements contain the IP address and
3933the fifth is the port number.
3934 3994
3935*** Network processes can now be stopped and restarted with 3995These functions stop and restart communication through a network
3936`stop-process' and `continue-process'. For a server process, no 3996connection. For a server process, no connections are accepted in the
3937connections are accepted in the stopped state. For a client process, 3997stopped state. For a client process, no input is received in the
3938no input is received in the stopped state. 3998stopped state.
3939 3999
3940*** New function network-interface-list. 4000*** New function `network-interface-list'.
3941 4001
3942This function returns a list of network interface names and their 4002This function returns a list of network interface names and their
3943current network addresses. 4003current network addresses.
3944 4004
3945*** New function network-interface-info. 4005*** New function `network-interface-info'.
3946 4006
3947This function returns the network address, hardware address, current 4007This function returns the network address, hardware address, current
3948status, and other information about a specific network interface. 4008status, and other information about a specific network interface.
3949 4009
3950*** The sentinel is now called when a network process is deleted with 4010*** Deleting a network process with `delete-process' calls the sentinel.
3951delete-process. The status message passed to the sentinel for a 4011
3952deleted network process is "deleted". The message passed to the 4012The status message passed to the sentinel for a deleted network
3953sentinel when the connection is closed by the remote peer has been 4013process is "deleted". The message passed to the sentinel when the
3954changed to "connection broken by remote peer". 4014connection is closed by the remote peer has been changed to
4015"connection broken by remote peer".
3955 4016
3956** Using window objects: 4017** Using window objects:
3957 4018
@@ -3964,7 +4025,7 @@ header line.
3964+++ 4025+++
3965*** New function `window-body-height'. 4026*** New function `window-body-height'.
3966 4027
3967This is like window-height but does not count the mode line 4028This is like `window-height' but does not count the mode line
3968or the header line. 4029or the header line.
3969 4030
3970+++ 4031+++
@@ -3991,7 +4052,7 @@ return window edges in units of pixels, rather than columns and lines.
3991selected window without impacting the order of `buffer-list'. 4052selected window without impacting the order of `buffer-list'.
3992 4053
3993+++ 4054+++
3994*** `select-window' takes an optional second argument `norecord'. 4055*** `select-window' takes an optional second argument NORECORD.
3995 4056
3996This is like `switch-to-buffer'. 4057This is like `switch-to-buffer'.
3997 4058
@@ -4018,12 +4079,12 @@ identifing the bitmap such as `left-truncation or `continued-line'.
4018*** New function `destroy-fringe-bitmap' deletes a fringe bitmap 4079*** New function `destroy-fringe-bitmap' deletes a fringe bitmap
4019or restores a built-in one to its default value. 4080or restores a built-in one to its default value.
4020 4081
4021*** New function `set-fringe-bitmap-face' can now be used to set a 4082*** New function `set-fringe-bitmap-face' specifies the face to be
4022specific face to be used for a specific fringe bitmap. The face is 4083used for a specific fringe bitmap. The face is automatically merged
4023automatically merged with the `fringe' face, so normally, the face 4084with the `fringe' face, so normally, the face should only specify the
4024should only specify the foreground color of the bitmap. 4085foreground color of the bitmap.
4025 4086
4026*** There are new display properties, `left-fringe; and `right-fringe', 4087*** There are new display properties, `left-fringe' and `right-fringe',
4027that can be used to show a specific bitmap in the left or right fringe 4088that can be used to show a specific bitmap in the left or right fringe
4028bitmap of the display line. 4089bitmap of the display line.
4029 4090
@@ -4166,7 +4227,7 @@ If the `line-spacing' property is a float or cons, the line spacing
4166is calculated as specified above for the `line-height' property. 4227is calculated as specified above for the `line-height' property.
4167 4228
4168+++ 4229+++
4169*** The buffer local line-spacing variable can now have a float value, 4230*** The buffer local `line-spacing' variable can now have a float value,
4170which is used as a height relative to the default frame line height. 4231which is used as a height relative to the default frame line height.
4171 4232
4172+++ 4233+++
@@ -4216,7 +4277,7 @@ For example, to align to the center of the left-margin, use
4216 4277
4217If no specific base offset is set for alignment, it is always relative 4278If no specific base offset is set for alignment, it is always relative
4218to the left edge of the text area. For example, :align-to 0 in a 4279to the left edge of the text area. For example, :align-to 0 in a
4219header-line aligns with the first text column in the text area. 4280header line aligns with the first text column in the text area.
4220 4281
4221The value of the form `(NUM . EXPR)' is the value of NUM multiplied by 4282The value of the form `(NUM . EXPR)' is the value of NUM multiplied by
4222the value of the expression EXPR. For example, (2 . in) specifies a 4283the value of the expression EXPR. For example, (2 . in) specifies a
@@ -4242,10 +4303,10 @@ supported on text terminals.
4242**** New display property (slice X Y WIDTH HEIGHT) can be used with 4303**** New display property (slice X Y WIDTH HEIGHT) can be used with
4243an image property to display only a specific slice of the image. 4304an image property to display only a specific slice of the image.
4244 4305
4245**** Function insert-image has new optional fourth arg to 4306**** Function `insert-image' has new optional fourth arg to
4246specify image slice (X Y WIDTH HEIGHT). 4307specify image slice (X Y WIDTH HEIGHT).
4247 4308
4248**** New function insert-sliced-image inserts a given image as a 4309**** New function `insert-sliced-image' inserts a given image as a
4249specified number of evenly sized slices (rows x columns). 4310specified number of evenly sized slices (rows x columns).
4250 4311
4251+++ 4312+++
@@ -4264,7 +4325,7 @@ When the mouse pointer is above a hot-spot area of an image, the
4264PLIST of that hot-spot is consulted; if it contains a `help-echo' 4325PLIST of that hot-spot is consulted; if it contains a `help-echo'
4265property it defines a tool-tip for the hot-spot, and if it contains 4326property it defines a tool-tip for the hot-spot, and if it contains
4266a `pointer' property, it defines the shape of the mouse cursor when 4327a `pointer' property, it defines the shape of the mouse cursor when
4267it is over the hot-spot. See the variable 'void-area-text-pointer' 4328it is over the hot-spot. See the variable `void-area-text-pointer'
4268for possible pointer shapes. 4329for possible pointer shapes.
4269 4330
4270When you click the mouse when the mouse pointer is over a hot-spot, 4331When you click the mouse when the mouse pointer is over a hot-spot,
@@ -4292,38 +4353,37 @@ controlled/overriden via the `pointer' text property.
4292** Mouse event enhancements: 4353** Mouse event enhancements:
4293 4354
4294+++ 4355+++
4295*** Mouse clicks on fringes now generates left-fringe or right-fringes 4356*** Mouse events for clicks on window fringes now specify `left-fringe'
4296events, rather than a text area click event. 4357or `right-fringe' as the area.
4297
4298+++
4299*** Mouse clicks in the left and right marginal areas now includes a
4300sensible buffer position corresponding to the first character in the
4301corresponding text row.
4302 4358
4303+++ 4359+++
4304*** Function `mouse-set-point' now works for events outside text area. 4360*** All mouse events now include a buffer position regardless of where
4361you clicked. For mouse clicks in window margins and fringes, this is
4362a sensible buffer position corresponding to the surrounding text.
4305 4363
4306+++ 4364+++
4307*** Mouse events now includes buffer position for all event types. 4365*** `posn-point' now returns buffer position for non-text area events.
4308 4366
4309+++ 4367+++
4310*** `posn-point' now returns buffer position for non-text area events. 4368*** Function `mouse-set-point' now works for events outside text area.
4311 4369
4312+++ 4370+++
4313*** New function `posn-area' returns window area clicked on (nil means 4371*** New function `posn-area' returns window area clicked on (nil means
4314text area). 4372text area).
4315 4373
4316+++ 4374+++
4317*** Mouse events include actual glyph column and row for all event types. 4375*** Mouse events include actual glyph column and row for all event types
4376and all areas.
4318 4377
4319+++ 4378+++
4320*** New function `posn-actual-col-row' returns actual glyph coordinates. 4379*** New function `posn-actual-col-row' returns the actual glyph coordinates
4380of the mouse event position.
4321 4381
4322+++ 4382+++
4323*** Mouse events can now include image object in addition to string object. 4383*** Mouse events can now indicate an image object clicked on.
4324 4384
4325+++ 4385+++
4326*** Mouse events include relative x and y pixel coordinates relative to 4386*** Mouse events include relative X and Y pixel coordinates relative to
4327the top left corner of the object (image or character) clicked on. 4387the top left corner of the object (image or character) clicked on.
4328 4388
4329+++ 4389+++
@@ -4331,19 +4391,20 @@ the top left corner of the object (image or character) clicked on.
4331(image or character) clicked on. 4391(image or character) clicked on.
4332 4392
4333+++ 4393+++
4334*** New functions 'posn-object', 'posn-object-x-y', and 4394*** New functions 'posn-object', 'posn-object-x-y', 'posn-object-width-height'.
4335'posn-object-width-height' return the image or string object of a mouse 4395
4336click, the x and y pixel coordinates relative to the top left corner 4396These return the image or string object of a mouse click, the X and Y
4337of that object, and the total width and height of that object. 4397pixel coordinates relative to the top left corner of that object, and
4398the total width and height of that object.
4338 4399
4339** Text property and overlay changes: 4400** Text property and overlay changes:
4340 4401
4341+++ 4402+++
4342*** Arguments for remove-overlays are now optional, so that you can 4403*** Arguments for `remove-overlays' are now optional, so that you can
4343remove all overlays in the buffer by just calling (remove-overlays). 4404remove all overlays in the buffer with just (remove-overlays).
4344 4405
4345+++ 4406+++
4346*** New variable char-property-alias-alist. 4407*** New variable `char-property-alias-alist'.
4347 4408
4348This variable allows you to create alternative names for text 4409This variable allows you to create alternative names for text
4349properties. It works at the same level as `default-text-properties', 4410properties. It works at the same level as `default-text-properties',
@@ -4358,9 +4419,10 @@ whose cdr is the overlay in which the property was found, or nil if
4358it was found as a text property or not found at all. 4419it was found as a text property or not found at all.
4359 4420
4360+++ 4421+++
4361*** The new function remove-list-of-text-properties is almost the same 4422*** The new function `remove-list-of-text-properties'.
4362as `remove-text-properties'. The only difference is that it takes a 4423
4363list of property names as argument rather than a property list. 4424It is like `remove-text-properties' except that it takes a list of
4425property names as argument rather than a property list.
4364 4426
4365** Face changes 4427** Face changes
4366 4428
@@ -4373,12 +4435,12 @@ is now the preferred method for defining default faces in a way that
4373makes a good use of the capabilities of the display. 4435makes a good use of the capabilities of the display.
4374 4436
4375+++ 4437+++
4376*** New function display-supports-face-attributes-p can be used to test 4438*** New function `display-supports-face-attributes-p' can be used to test
4377whether a given set of face attributes is actually displayable. 4439whether a given set of face attributes is actually displayable.
4378 4440
4379A new predicate `supports' has also been added to the `defface' face 4441A new predicate `supports' has also been added to the `defface' face
4380specification language, which can be used to do this test for faces 4442specification language, which can be used to do this test for faces
4381defined with defface. 4443defined with `defface'.
4382 4444
4383--- 4445---
4384*** The special treatment of faces whose names are of the form `fg:COLOR' 4446*** The special treatment of faces whose names are of the form `fg:COLOR'
@@ -4406,10 +4468,11 @@ whether the given face displays differently from the default face or
4406not (previously it did only a very cursory check). 4468not (previously it did only a very cursory check).
4407 4469
4408+++ 4470+++
4409*** `face-attribute', `face-foreground', `face-background', and 4471*** `face-attribute', `face-foreground', `face-background', `face-stipple'.
4410`face-stipple' now accept a new optional argument, INHERIT, which 4472
4411controls how face inheritance is used when determining the value of a 4473These now accept a new optional argument, INHERIT, which controls how
4412face attribute. 4474face inheritance is used when determining the value of a face
4475attribute.
4413 4476
4414+++ 4477+++
4415*** New functions `face-attribute-relative-p' and `merge-face-attribute' 4478*** New functions `face-attribute-relative-p' and `merge-face-attribute'
@@ -4424,9 +4487,6 @@ releases of Emacs, the order was the opposite. This change was made
4424so that :inherit face lists operate identically to face lists in text 4487so that :inherit face lists operate identically to face lists in text
4425`face' properties. 4488`face' properties.
4426 4489
4427+++
4428*** New standard font-lock face `font-lock-preprocessor-face'.
4429
4430--- 4490---
4431*** `set-fontset-font', `fontset-info', `fontset-font' now operate on 4491*** `set-fontset-font', `fontset-info', `fontset-font' now operate on
4432the default fontset if the argument NAME is nil.. 4492the default fontset if the argument NAME is nil..
@@ -4444,11 +4504,11 @@ new variable `char-property-alias-alist'.
4444+++ 4504+++
4445*** font-lock can manage arbitrary text-properties beside `face'. 4505*** font-lock can manage arbitrary text-properties beside `face'.
4446 4506
4447*** the FACENAME returned in `font-lock-keywords' can be a list of the 4507**** the FACENAME returned in `font-lock-keywords' can be a list of the
4448form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set other 4508form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set other
4449properties than `face'. 4509properties than `face'.
4450 4510
4451*** `font-lock-extra-managed-props' can be set to make sure those 4511**** `font-lock-extra-managed-props' can be set to make sure those
4452extra properties are automatically cleaned up by font-lock. 4512extra properties are automatically cleaned up by font-lock.
4453 4513
4454--- 4514---
@@ -4480,8 +4540,12 @@ declaration will give the buffer XML or SGML mode, based on the new
4480var `magic-mode-alist'. 4540var `magic-mode-alist'.
4481 4541
4482+++ 4542+++
4483*** Major mode functions now run the new normal hook 4543*** Use the new function `run-mode-hooks' to run the major mode's mode hook.
4484`after-change-major-mode-hook', at their very end, after the mode hooks. 4544
4545+++
4546*** All major mode functions should now run the new normal hook
4547`after-change-major-mode-hook', at their very end, after the mode
4548hooks. `run-mode-hooks' does this automatically.
4485 4549
4486--- 4550---
4487*** If a major mode function has a non-nil `no-clone-indirect' 4551*** If a major mode function has a non-nil `no-clone-indirect'
@@ -4511,7 +4575,7 @@ and simply passes them to `defcustom', if applicable.
4511+++ 4575+++
4512*** `minor-mode-list' now holds a list of minor mode commands. 4576*** `minor-mode-list' now holds a list of minor mode commands.
4513 4577
4514--- 4578+++
4515*** `define-global-minor-mode'. 4579*** `define-global-minor-mode'.
4516 4580
4517This is a new name for what was formerly called 4581This is a new name for what was formerly called
@@ -4521,9 +4585,10 @@ This is a new name for what was formerly called
4521 4585
4522+++ 4586+++
4523*** The new function `called-interactively-p' does what many people 4587*** The new function `called-interactively-p' does what many people
4524have mistakenly believed `interactive-p' did: it returns t if the 4588have mistakenly believed `interactive-p' to do: it returns t if the
4525calling function was called through `call-interactively'. This should 4589calling function was called through `call-interactively'.
4526only be used when you cannot solve the problem by adding a new 4590
4591Only use this when you cannot solve the problem by adding a new
4527INTERACTIVE argument to the command. 4592INTERACTIVE argument to the command.
4528 4593
4529+++ 4594+++
@@ -4560,41 +4625,6 @@ been renamed to `disabled-command-function'. The variable
4560*** `emacsserver' now runs `pre-command-hook' and `post-command-hook' 4625*** `emacsserver' now runs `pre-command-hook' and `post-command-hook'
4561when it receives a request from emacsclient. 4626when it receives a request from emacsclient.
4562 4627
4563** Minibuffer changes:
4564
4565+++
4566*** The functions all-completions and try-completion now accept lists
4567of strings as well as hash-tables additionally to alists, obarrays
4568and functions. Furthermore, the function `test-completion' is now
4569exported to Lisp. The keys in alists and hash tables can be either
4570strings or symbols, which are automatically converted with to strings.
4571
4572+++
4573*** The new macro `dynamic-completion-table' supports using functions
4574as a dynamic completion table.
4575
4576 (dynamic-completion-table FUN)
4577
4578FUN is called with one argument, the string for which completion is required,
4579and it should return an alist containing all the intended possible
4580completions. This alist can be a full list of possible completions so that FUN
4581can ignore the value of its argument. If completion is performed in the
4582minibuffer, FUN will be called in the buffer from which the minibuffer was
4583entered. `dynamic-completion-table' then computes the completion.
4584
4585+++
4586*** The new macro `lazy-completion-table' initializes a variable
4587as a lazy completion table.
4588
4589 (lazy-completion-table VAR FUN &rest ARGS)
4590
4591If the completion table VAR is used for the first time (e.g., by passing VAR
4592as an argument to `try-completion'), the function FUN is called with arguments
4593ARGS. FUN must return the completion table that will be stored in VAR. If
4594completion is requested in the minibuffer, FUN will be called in the buffer
4595from which the minibuffer was entered. The return value of
4596`lazy-completion-table' must be used to initialize the value of VAR.
4597
4598** Lisp file loading changes: 4628** Lisp file loading changes:
4599 4629
4600+++ 4630+++
@@ -4607,8 +4637,8 @@ current file redefined it).
4607defined. For a variable, it records just the variable name. 4637defined. For a variable, it records just the variable name.
4608 4638
4609+++ 4639+++
4610*** The function symbol-file can now search specifically for function or 4640*** The function `symbol-file' can now search specifically for function,
4611variable definitions. 4641variable or face definitions.
4612 4642
4613+++ 4643+++
4614*** `provide' and `featurep' now accept an optional second argument 4644*** `provide' and `featurep' now accept an optional second argument
@@ -4623,10 +4653,11 @@ than 3 levels of nesting.
4623+++ 4653+++
4624** Byte compiler changes: 4654** Byte compiler changes:
4625 4655
4626*** The byte-compiler now displays the actual line and character 4656*** The byte compiler now displays the actual line and character
4627position of errors, where possible. Additionally, the form of its 4657position of errors, where possible. Additionally, the form of its
4628warning and error messages have been brought more in line with the 4658warning and error messages have been brought into line with GNU standards
4629output of other GNU tools. 4659for these. As a result, you can use next-error and friends on the
4660compilation output buffer.
4630 4661
4631*** The new macro `with-no-warnings' suppresses all compiler warnings 4662*** The new macro `with-no-warnings' suppresses all compiler warnings
4632inside its body. In terms of execution, it is equivalent to `progn'. 4663inside its body. In terms of execution, it is equivalent to `progn'.
@@ -4654,7 +4685,7 @@ efficient. Since byte code from recent versions of XEmacs won't
4654generally run in Emacs and vice versa, this optimization doesn't lose 4685generally run in Emacs and vice versa, this optimization doesn't lose
4655you anything. 4686you anything.
4656 4687
4657*** The local variable `no-byte-compile' in elisp files is now obeyed. 4688*** The local variable `no-byte-compile' in Lisp files is now obeyed.
4658 4689
4659--- 4690---
4660*** When a Lisp file uses CL functions at run-time, compiling the file 4691*** When a Lisp file uses CL functions at run-time, compiling the file
@@ -4702,7 +4733,7 @@ the time it takes to convert the format.
4702wasteful. 4733wasteful.
4703 4734
4704--- 4735---
4705*** set-buffer-file-coding-system now takes an additional argument, 4736*** `set-buffer-file-coding-system' now takes an additional argument,
4706NOMODIFY. If it is non-nil, it means don't mark the buffer modified. 4737NOMODIFY. If it is non-nil, it means don't mark the buffer modified.
4707 4738
4708+++ 4739+++
@@ -4729,7 +4760,7 @@ it is read from a file without decoding.
4729hash tables defined by the Lisp function `define-translation-hash-table'. 4760hash tables defined by the Lisp function `define-translation-hash-table'.
4730 4761
4731--- 4762---
4732*** New function quail-find-key returns a list of keys to type in the 4763*** New function `quail-find-key' returns a list of keys to type in the
4733current input method to input a character. 4764current input method to input a character.
4734 4765
4735** Mode line changes: 4766** Mode line changes:
@@ -4737,7 +4768,7 @@ current input method to input a character.
4737+++ 4768+++
4738*** New function `format-mode-line'. 4769*** New function `format-mode-line'.
4739 4770
4740This returns the mode-line or header-line of the selected (or a 4771This returns the mode line or header line of the selected (or a
4741specified) window as a string with or without text properties. 4772specified) window as a string with or without text properties.
4742 4773
4743+++ 4774+++
@@ -4799,13 +4830,13 @@ debugging output on the stderr file handle to a file.
4799+++ 4830+++
4800*** A number of hooks have been renamed to better follow the conventions: 4831*** A number of hooks have been renamed to better follow the conventions:
4801 4832
4802find-file-hooks to find-file-hook, 4833`find-file-hooks' to `find-file-hook',
4803find-file-not-found-hooks to find-file-not-found-functions, 4834`find-file-not-found-hooks' to `find-file-not-found-functions',
4804write-file-hooks to write-file-functions, 4835`write-file-hooks' to `write-file-functions',
4805write-contents-hooks to write-contents-functions, 4836`write-contents-hooks' to `write-contents-functions',
4806x-lost-selection-hooks to x-lost-selection-functions, 4837`x-lost-selection-hooks' to `x-lost-selection-functions',
4807x-sent-selection-hooks to x-sent-selection-functions, 4838`x-sent-selection-hooks' to `x-sent-selection-functions',
4808delete-frame-hook to delete-frame-functions. 4839`delete-frame-hook' to `delete-frame-functions'.
4809 4840
4810In each case the old name remains as an alias for the moment. 4841In each case the old name remains as an alias for the moment.
4811 4842
@@ -4817,6 +4848,87 @@ Use the LOCAL arg of `add-hook'.
4817--- 4848---
4818*** New function `x-send-client-message' sends a client message when 4849*** New function `x-send-client-message' sends a client message when
4819running under X. 4850running under X.
4851
4852** GC changes:
4853
4854+++
4855*** New variables `gc-elapsed' and `gcs-done' provide extra information
4856on garbage collection.
4857
4858+++
4859*** The normal hook `post-gc-hook' is run at the end of garbage collection.
4860
4861The hook is run with GC inhibited, so use it with care.
4862
4863* New Packages for Lisp Programming in Emacs 22.1
4864
4865+++
4866** The new library button.el implements simple and fast `clickable
4867buttons' in emacs buffers. Buttons are much lighter-weight than the
4868`widgets' implemented by widget.el, and can be used by lisp code that
4869doesn't require the full power of widgets. Emacs uses buttons for
4870such things as help and apropos buffers.
4871
4872---
4873** The new library tree-widget.el provides a widget to display a set
4874of hierarchical data as an outline. For example, the tree-widget is
4875well suited to display a hierarchy of directories and files.
4876
4877** The new library bindat.el provides functions to unpack and pack
4878binary data structures, such as network packets, to and from Lisp
4879data structures.
4880
4881---
4882** master-mode.el implements a minor mode for scrolling a slave
4883buffer without leaving your current buffer, the master buffer.
4884
4885It can be used by sql.el, for example: the SQL buffer is the master
4886and its SQLi buffer is the slave. This allows you to scroll the SQLi
4887buffer containing the output from the SQL buffer containing the
4888commands.
4889
4890This is how to use sql.el and master.el together: the variable
4891sql-buffer contains the slave buffer. It is a local variable in the
4892SQL buffer.
4893
4894(add-hook 'sql-mode-hook
4895 (function (lambda ()
4896 (master-mode t)
4897 (master-set-slave sql-buffer))))
4898(add-hook 'sql-set-sqli-hook
4899 (function (lambda ()
4900 (master-set-slave sql-buffer))))
4901
4902+++
4903** The new library benchmark.el does timing measurements on Lisp code.
4904
4905This includes measuring garbage collection time.
4906
4907+++
4908** The new library testcover.el does test coverage checking.
4909
4910This is so you can tell whether you've tested all paths in your Lisp
4911code. It works with edebug.
4912
4913The function `testcover-start' instruments all functions in a given
4914file. Then test your code. The function `testcover-mark-all' adds
4915overlay "splotches" to the Lisp file's buffer to show where coverage
4916is lacking. The command `testcover-next-mark' (bind it to a key!)
4917will move point forward to the next spot that has a splotch.
4918
4919Normally, a red splotch indicates the form was never completely
4920evaluated; a brown splotch means it always evaluated to the same
4921value. The red splotches are skipped for forms that can't possibly
4922complete their evaluation, such as `error'. The brown splotches are
4923skipped for forms that are expected to always evaluate to the same
4924value, such as (setq x 14).
4925
4926For difficult cases, you can add do-nothing macros to your code to
4927help out the test coverage tool. The macro `noreturn' suppresses a
4928red splotch. It is an error if the argument to `noreturn' does
4929return. The macro `1value' suppresses a brown splotch for its argument.
4930This macro is a no-op except during test-coverage -- then it signals
4931an error if the argument actually returns differing values.
4820 4932
4821* Installation changes in Emacs 21.3 4933* Installation changes in Emacs 21.3
4822 4934
@@ -10645,8 +10757,8 @@ can make FCC copies more closely resemble copies that recipients get
10645 10757
10646**** you can specify an arbitrary function for actually transmitting 10758**** you can specify an arbitrary function for actually transmitting
10647the message; included in feedmail are interfaces for /bin/[r]mail, 10759the message; included in feedmail are interfaces for /bin/[r]mail,
10648/usr/lib/sendmail, and elisp smtpmail; it's easy to write a new 10760/usr/lib/sendmail, and Emacs Lisp smtpmail; it's easy to write a new
10649function for something else (10-20 lines of elisp) 10761function for something else (10-20 lines of Lisp code).
10650 10762
10651** Dired changes 10763** Dired changes
10652 10764
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3a960bc8067..bc460f52430 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,189 @@
12005-05-16 Juanma Barranquero <lekktu@gmail.com>
2
3 * international/latexenc.el: Add page marker to force the "Local
4 Variables:" string out of the last page.
5
62005-05-16 Nick Roberts <nickrob@snap.net.nz>
7
8 * progmodes/gud.el (gud-tooltip-mode): Add gud prefix to
9 tooltip-change-major-mode.
10 (gud-tooltip-print-command): Remove case where gud-minor-mode
11 is gdb ("--fullname").
12 (gud-tooltip-tips): Turn GUD tooltips off for this case and
13 explain to user.
14
152005-05-16 Jay Belanger <belanger@truman.edu>
16
17 * calc/calc-store.el (calc-copy-special-constant): New function.
18
19 * calc/calc-ext.el (calc-init-extensions): Add binding for
20 `calc-copy-special-constant'.
21
22 * calc/calc-prog.el (calc-edit-format-macro-buffer): Add a case
23 for the `calc-copy-special-constant' command.
24
252005-05-16 Nick Roberts <nickrob@snap.net.nz>
26
27 * subr.el (left-fringe-p): New function.
28
29 * progmodes/compile.el (compilation-setup): Set local value of
30 overlay-arrow-string to "" always.
31 (compilation-set-window): Left fringe then don't scroll. No left
32 fringe then no arrow and scroll message to top.
33 (compilation-context-lines): Adjust doc string accordingly.
34
352005-05-16 Kim F. Storm <storm@cua.dk>
36
37 * ido.el (ido-magic-forward-char, ido-magic-backward-char)
38 (ido-magic-delete-char): New commands for C-f, C-b, C-d.
39 (ido-wide-find-dir-or-delete-dir): New command for M-d.
40 (ido-define-mode-map): Bind them. Add C-x prefix to fallback commands.
41 (ido-read-file-name): Handle commands with ido property value
42 equal to find-file as reading a file name, to allow C-d to enter dired.
43 (ibuffer-find-file): Add ido property with value find-file.
44
452005-05-15 Kim F. Storm <storm@cua.dk>
46
47 * subr.el (open-network-stream-nowait): Remove.
48 (open-network-stream-server): Remove.
49
502005-05-15 Richard M. Stallman <rms@gnu.org>
51
52 * faces.el (describe-face): Output a definition link button.
53
54 * help-mode.el (help-face-def): New button type.
55
56 * emacs-lisp/copyright.el (copyright-fix-years):
57 Match properly if the first year is 2-digit.
58 Don't mess up the whitespace after the years by filling.
59
60 * dired-aux.el (dired-mark-confirm):
61 Pass t to dired-get-marked-files for DISTINGUISH-ONE-MARKED.
62
63 * dired.el (dired-map-over-marks): New arg DISTINGUISH-ONE-MARKED.
64 (dired-get-marked-files): New arg DISTINGUISH-ONE-MARKED.
65 (dired-mark-pop-up): Handle FILES = (t FILE) specially.
66
67 * emacs-lisp/lisp-mode.el (lisp-mode-variables):
68 Set font-lock-comment-start-skip.
69
70 * font-lock.el (font-lock-comment-start-skip): New variable.
71 (font-lock-comment-end-skip): New variable.
72 (font-lock-fontify-syntactically-region): Use them if non-nil.
73
742005-05-15 Jay Belanger <belanger@truman.edu>
75
76 * calc/calc-store.el (calc-store-value): Return a string rather
77 than display it as a message.
78 Use calc-var-name for variable name.
79 (calc-store-into): Add the result of calc-store-value to message.
80 (calc-copy-variable): Add a message.
81 (calc-store-exchange): Improve error messages.
82 (calc-store-binary, calc-store-map): Don't reset the values of
83 special constants.
84
852005-05-14 Luc Teirlinck <teirllm@auburn.edu>
86
87 * emacs-lisp/derived.el (define-derived-mode): Add link to Elisp
88 manual to docstring.
89
90 * files.el (hack-local-variables-confirm): Add STRING argument.
91 Make the function handle non file visiting buffers correctly.
92 (hack-local-variables-prop-line, hack-local-variables)
93 (hack-one-local-variable): Use STRING arg of
94 `hack-local-variables-confirm'.
95
962005-05-14 Michael Albinus <michael.albinus@gmx.de>
97
98 Sync with Tramp 2.0.49.
99
100 * tramp.el (tramp-handle-dired-call-process)
101 (tramp-handle-insert-directory):`insert-buffer' cannot be used
102 because the contents of the Tramp buffer is changed before
103 insertion (`expand-file' and alike).
104 (tramp-handle-insert-directory): If `localname' has an empty
105 nondirectory name, it must not be quoted.
106 (tramp-pre-connection): Add parameter CHUNKSIZE. Make local
107 variable `tramp-chunksize'. Change callees.
108 (tramp-open-connection-setup-interactive-shell): Check remote host
109 for buggy `send-process-string' implementation. Set
110 `tramp-chunksize' if found. Reported by Michael Kifer
111 <kifer@cs.sunysb.edu> (and a lot of other people all the years).
112 (tramp-handle-shell-command): `insert-buffer' cannot be used
113 because the contents of the Tramp buffer is changed before
114 insertion (`expand-file' and alike). Reported by Fr,Ai(Bd,Ai(Bric Bothamy
115 <frederic.bothamy@free.fr>.
116 (tramp-set-auto-save): Actions should be done for Tramp file name
117 handler only. Ange-FTP has its own auto-save mechanism. Reported
118 by Richard G. Bielawski <Richard.G.Bielawski@wellsfargo.com>.
119 (tramp-set-auto-save-file-modes): Set file modes of
120 `buffer-auto-save-file-name' to ?\600 as fallback solution.
121 Reported by Ferenc Wagner <wferi@tba.elte.hu>.
122 (tramp-bug): Remove obsolete variable.
123 (tramp-append-tramp-buffers): Rewrite partly. More suitable check
124 for presence of `mml-mode'. Make it running for older Emacsen as
125 well.
126
1272005-05-14 John Paul Wallington <jpw@pobox.com>
128
129 * ibuf-ext.el (define-ibuffer-filter filename):
130 If `dired-directory' is a list, use its car.
131
1322005-05-14 Daniel Brockman <daniel@brockman.se> (tiny change)
133
134 * ibuffer.el (define-ibuffer-column filename):
135 If `dired-directory' is a list, use its car.
136
1372005-05-14 Richard M. Stallman <rms@gnu.org>
138
139 * subr.el (symbol-file): Doc fix.
140
141 * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn): New function.
142 (byte-compile-form): Call byte-compile-nogroup-warn.
143 (byte-compile-warning-types): Doc fix.
144
145 * eshell/esh-mode.el (eshell-find-tag): Use with-no-warnings.
146
147 * progmodes/cc-engine.el (c-literal-faces):
148 Add font-lock-comment-delimiter-face.
149
150 * net/net-utils.el (dig): Use with-no-warnings.
151
152 * mail/supercite.el (sc-cite-frame-alist, sc-uncite-frame-alist)
153 (sc-recite-frame-alist, sc-default-cite-frame)
154 (sc-default-uncite-frame, sc-default-recite-frame)
155 (sc-attrib-selection-list, sc-rewrite-header-list):
156 Mark as risky-local-variable.
157
158 * international/ogonek.el (ogonek-jak, ogonek-how):
159 Don't use beginning-of-buffer.
160
161 * emacs-lisp/eldoc.el (eldoc-documentation-function): Add autoload.
162
163 * calendar/solar.el (solar-data-list): Move definition up.
164
165 * dnd.el (dnd-protocol-alist): Add autoload.
166
167 * progmodes/sh-script.el: Many doc usage fixes.
168 (sh-indent-after-do): Change default to match common styles.
169
1702005-05-13 Luc Teirlinck <teirllm@auburn.edu>
171
172 * files.el (interpreter-mode-alist)
173 (auto-mode-interpreter-regexp): Doc fixes.
174
1752005-05-13 Matt Hodges <MPHodges@member.fsf.org>
176
177 * tmm.el (tmm-get-keymap): Include only active menus and menu
178 items.
179
180 * emacs-lisp/easymenu.el (easy-menu-define): Doc fixes.
181
1822005-05-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
183
184 * dired.el (dired-mode): make-variable-buffer-local =>
185 make-local-variable
186
12005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 1872005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 188
3 * term/mac-win.el (mac-select-convert-to-string): Try coding 189 * term/mac-win.el (mac-select-convert-to-string): Try coding
@@ -141,6 +327,9 @@
141 * cus-edit.el (custom-file): Call file-chase-links. 327 * cus-edit.el (custom-file): Call file-chase-links.
142 328
143 * files.el (read-directory-name): Fix previous change. 329 * files.el (read-directory-name): Fix previous change.
330 (hack-local-variables-confirm): New function.
331 (hack-local-variables-prop-line, hack-local-variables)
332 (hack-one-local-variable): Use it.
144 333
1452005-05-10 Lute Kamstra <lute@gnu.org> 3342005-05-10 Lute Kamstra <lute@gnu.org>
146 335
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 5b23dabbbf5..7a604541944 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -416,6 +416,7 @@
416 (define-key calc-mode-map "sd" 'calc-declare-variable) 416 (define-key calc-mode-map "sd" 'calc-declare-variable)
417 (define-key calc-mode-map "se" 'calc-edit-variable) 417 (define-key calc-mode-map "se" 'calc-edit-variable)
418 (define-key calc-mode-map "si" 'calc-insert-variables) 418 (define-key calc-mode-map "si" 'calc-insert-variables)
419 (define-key calc-mode-map "sk" 'calc-copy-special-constant)
419 (define-key calc-mode-map "sl" 'calc-let) 420 (define-key calc-mode-map "sl" 'calc-let)
420 (define-key calc-mode-map "sm" 'calc-store-map) 421 (define-key calc-mode-map "sm" 'calc-store-map)
421 (define-key calc-mode-map "sn" 'calc-store-neg) 422 (define-key calc-mode-map "sn" 'calc-store-neg)
@@ -1075,7 +1076,8 @@ calc-vector-pop-covariance calc-vector-pop-sdev
1075calc-vector-pop-variance calc-vector-product calc-vector-sdev 1076calc-vector-pop-variance calc-vector-product calc-vector-sdev
1076calc-vector-sum calc-vector-variance) 1077calc-vector-sum calc-vector-variance)
1077 1078
1078 ("calc-store" calc-assign calc-copy-variable calc-declare-variable 1079 ("calc-store" calc-assign calc-copy-special-constant
1080calc-copy-variable calc-declare-variable
1079calc-edit-AlgSimpRules calc-edit-Decls calc-edit-EvalRules 1081calc-edit-AlgSimpRules calc-edit-Decls calc-edit-EvalRules
1080calc-edit-ExtSimpRules calc-edit-FitRules calc-edit-GenCount 1082calc-edit-ExtSimpRules calc-edit-FitRules calc-edit-GenCount
1081calc-edit-Holidays calc-edit-IntegLimit calc-edit-LineStyles 1083calc-edit-Holidays calc-edit-IntegLimit calc-edit-LineStyles
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 01ca770ba27..230b0f6a6c5 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -902,6 +902,7 @@
902 (calc-edit-macro-combine-var-name)) 902 (calc-edit-macro-combine-var-name))
903 ((or 903 ((or
904 (string-equal type "calc-copy-variable") 904 (string-equal type "calc-copy-variable")
905 (string-equal type "calc-copy-special-constant")
905 (string-equal type "calc-declare-variable")) 906 (string-equal type "calc-declare-variable"))
906 (forward-line 1) 907 (forward-line 1)
907 (calc-edit-macro-combine-var-name) 908 (calc-edit-macro-combine-var-name)
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index f59cad99802..fa61acb0f5f 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -57,15 +57,20 @@
57 ( | . calc-store-concat ) )))) 57 ( | . calc-store-concat ) ))))
58 (if found 58 (if found
59 (funcall (cdr found)) 59 (funcall (cdr found))
60 (calc-store-value var (or calc-given-value (calc-top 1)) 60 (let ((msg
61 "" calc-given-value-flag) 61 (calc-store-value var (or calc-given-value (calc-top 1))
62 (message "Stored to variable \"%s\"" (calc-var-name var)))) 62 "" calc-given-value-flag)))
63 (message (concat "Stored to variable \"%s\"" msg)
64 (calc-var-name var)))))
63 (setq var (calc-is-assignments (calc-top 1))) 65 (setq var (calc-is-assignments (calc-top 1)))
64 (if var 66 (if var
65 (while var 67 (while var
66 (calc-store-value (car (car var)) (cdr (car var)) 68 (let ((msg
67 (if (not (cdr var)) "") 69 (calc-store-value (car (car var)) (cdr (car var))
68 (if (not (cdr var)) 1)) 70 (if (not (cdr var)) "")
71 (if (not (cdr var)) 1))))
72 (message (concat "Stored to variable \"%s\"" msg)
73 (calc-var-name var)))
69 (setq var (cdr var)))))))) 74 (setq var (cdr var))))))))
70 75
71(defun calc-store-plus (&optional var) 76(defun calc-store-plus (&optional var)
@@ -109,22 +114,26 @@
109 (calc-store-binary var "n" '- n)) 114 (calc-store-binary var "n" '- n))
110 115
111(defun calc-store-value (var value tag &optional pop) 116(defun calc-store-value (var value tag &optional pop)
112 (if var 117 (let ((msg ""))
113 (let ((old (calc-var-value var))) 118 (if var
114 (set var value) 119 (let ((old (calc-var-value var)))
115 (if pop (or calc-store-keep (calc-pop-stack pop))) 120 (set var value)
116 (calc-record-undo (list 'store (symbol-name var) old)) 121 (if pop (or calc-store-keep (calc-pop-stack pop)))
117 (if tag 122 (calc-record-undo (list 'store (symbol-name var) old))
118 (let ((calc-full-trail-vectors nil)) 123 (if tag
119 (calc-record value (format ">%s%s" tag (calc-var-name var))))) 124 (let ((calc-full-trail-vectors nil))
120 (and (memq var '(var-e var-i var-pi var-phi var-gamma)) 125 (calc-record value (format ">%s%s" tag (calc-var-name var)))))
121 (eq (car-safe old) 'special-const) 126 (cond
122 (message "(Note: Built-in definition of %s has been lost)" var)) 127 ((and (memq var '(var-e var-i var-pi var-phi var-gamma))
123 (and (memq var '(var-inf var-uinf var-nan)) 128 (eq (car-safe old) 'special-const))
124 (null old) 129 (setq msg (format " (Note: Built-in definition of %s has been lost)"
125 (message "(Note: %s has built-in meanings which may interfere)" 130 (calc-var-name var))))
126 var)) 131 ((and (memq var '(var-inf var-uinf var-nan))
127 (calc-refresh-evaltos var)))) 132 (null old))
133 (setq msg (format " (Note: %s has built-in meanings which may interfere)"
134 (calc-var-name var)))))
135 (calc-refresh-evaltos var)))
136 msg))
128 137
129(defun calc-var-name (var) 138(defun calc-var-name (var)
130 (if (symbolp var) (setq var (symbol-name var))) 139 (if (symbolp var) (setq var (symbol-name var)))
@@ -140,8 +149,12 @@
140 (or var (setq var (calc-read-var-name (format "Store %s: " tag)))) 149 (or var (setq var (calc-read-var-name (format "Store %s: " tag))))
141 (if var 150 (if var
142 (let ((old (calc-var-value var))) 151 (let ((old (calc-var-value var)))
143 (or old 152 (if (eq (car-safe old) 'special-const)
144 (error "No such variable: \"%s\"" (calc-var-name var))) 153 (error "\"%s\" is a special constant" (calc-var-name var)))
154 (if (not old)
155 (if (memq var '(var-inf var-uinf var-nan))
156 (error "\"%s\" is a special variable" (calc-var-name var))
157 (error "No such variable: \"%s\"" (calc-var-name var))))
145 (if (stringp old) 158 (if (stringp old)
146 (setq old (math-read-expr old))) 159 (setq old (math-read-expr old)))
147 (if (eq (car-safe old) 'error) 160 (if (eq (car-safe old) 'error)
@@ -151,7 +164,7 @@
151 (list func value old) 164 (list func value old)
152 (list func old value))) 165 (list func old value)))
153 tag (and (not val) 1)) 166 tag (and (not val) 1))
154 (message "Stored to variable \"%s\"" (calc-var-name var))))))) 167 (message "Variable \"%s\" changed" (calc-var-name var)))))))
155 168
156(defvar calc-var-name-map nil "Keymap for reading Calc variable names.") 169(defvar calc-var-name-map nil "Keymap for reading Calc variable names.")
157(if calc-var-name-map 170(if calc-var-name-map
@@ -228,26 +241,32 @@
228 (or var (setq var (calc-read-var-name (format "Store Mapping %s: " 241 (or var (setq var (calc-read-var-name (format "Store Mapping %s: "
229 (nth 2 oper))))) 242 (nth 2 oper)))))
230 (if var 243 (if var
231 (let ((old (or (calc-var-value var) 244 (let ((old (calc-var-value var)))
232 (error "No such variable: \"%s\"" 245 (if (eq (car-safe old) 'special-const)
233 (calc-var-name var)))) 246 (error "\"%s\" is a special constant" (calc-var-name var)))
234 (calc-simplify-mode (if (eq calc-simplify-mode 'none) 247 (if (not old)
235 'num calc-simplify-mode)) 248 (if (memq var '(var-inf var-uinf var-nan))
236 (values (and (> nargs 1) 249 (error "\"%s\" is a special variable" (calc-var-name var))
237 (calc-top-list (1- nargs) (1+ calc-dollar-used))))) 250 (error "No such variable: \"%s\"" (calc-var-name var))))
238 (message "Working...") 251 (let ((calc-simplify-mode (if (eq calc-simplify-mode 'none)
239 (calc-set-command-flag 'clear-message) 252 'num calc-simplify-mode))
240 (if (stringp old) 253 (values (and (> nargs 1)
241 (setq old (math-read-expr old))) 254 (calc-top-list (1- nargs) (1+ calc-dollar-used)))))
242 (if (eq (car-safe old) 'error) 255 (message "Working...")
243 (error "Bad format in variable contents: %s" (nth 2 old))) 256 (calc-set-command-flag 'clear-message)
244 (setq values (if (calc-is-inverse) 257 (if (stringp old)
245 (append values (list old)) 258 (setq old (math-read-expr old)))
246 (append (list old) values))) 259 (if (eq (car-safe old) 'error)
247 (calc-store-value var 260 (error "Bad format in variable contents: %s" (nth 2 old)))
248 (calc-normalize (cons (nth 1 oper) values)) 261 (setq values (if (calc-is-inverse)
249 (nth 2 oper) 262 (append values (list old))
250 (+ calc-dollar-used (1- nargs)))))))) 263 (append (list old) values)))
264 (calc-store-value var
265 (calc-normalize (cons (nth 1 oper) values))
266 (nth 2 oper)
267 (+ calc-dollar-used (1- nargs)))
268 (message "Variable \"%s\" changed" (calc-var-name var))))))))
269
251 270
252(defun calc-store-exchange (&optional var) 271(defun calc-store-exchange (&optional var)
253 (interactive) 272 (interactive)
@@ -258,10 +277,12 @@
258 (or var (setq var (calc-read-var-name "Exchange with: "))) 277 (or var (setq var (calc-read-var-name "Exchange with: ")))
259 (if var 278 (if var
260 (let ((value (calc-var-value var))) 279 (let ((value (calc-var-value var)))
261 (or value
262 (error "No such variable: \"%s\"" (calc-var-name var)))
263 (if (eq (car-safe value) 'special-const) 280 (if (eq (car-safe value) 'special-const)
264 (error "%s is a special constant" var)) 281 (error "\"%s\" is a special constant" (calc-var-name var)))
282 (if (not value)
283 (if (memq var '(var-inf var-uinf var-nan))
284 (error "\"%s\" is a special variable" (calc-var-name var))
285 (error "No such variable: \"%s\"" (calc-var-name var))))
265 (setq top (or calc-given-value (calc-top 1))) 286 (setq top (or calc-given-value (calc-top 1)))
266 (calc-store-value var top nil) 287 (calc-store-value var top nil)
267 (calc-pop-push-record calc-given-value-flag 288 (calc-pop-push-record calc-given-value-flag
@@ -366,6 +387,26 @@
366 (interactive) 387 (interactive)
367 (calc-recall (intern (format "var-q%c" last-command-char)))) 388 (calc-recall (intern (format "var-q%c" last-command-char))))
368 389
390(defun calc-copy-special-constant (&optional sconst var)
391 (interactive)
392 (let ((sc '(("")
393 ("e" . (special-const (math-e)))
394 ("pi" . (special-const (math-pi)))
395 ("i" . (special-const (math-imaginary 1)))
396 ("phi" . (special-const (math-phi)))
397 ("gamma" . (special-const (math-gamma-const))))))
398 (calc-wrapper
399 (or sconst (setq sconst (completing-read "Special constant: " sc nil t)))
400 (unless (string= sconst "")
401 (let ((value (cdr (assoc sconst sc))))
402 (or var (setq var (calc-read-var-name
403 (format "Copy special constant %s, to: "
404 sconst))))
405 (if var
406 (let ((msg (calc-store-value var value "")))
407 (message (concat "Special constant \"%s\" copied to \"%s\"" msg)
408 sconst (calc-var-name var)))))))))
409
369(defun calc-copy-variable (&optional var1 var2) 410(defun calc-copy-variable (&optional var1 var2)
370 (interactive) 411 (interactive)
371 (calc-wrapper 412 (calc-wrapper
@@ -378,7 +419,9 @@
378 (format "Copy variable: %s, to: " 419 (format "Copy variable: %s, to: "
379 (calc-var-name var1))))) 420 (calc-var-name var1)))))
380 (if var2 421 (if var2
381 (calc-store-value var2 value "")))))) 422 (let ((msg (calc-store-value var2 value "")))
423 (message (concat "Variable \"%s\" copied to \"%s\"" msg)
424 (calc-var-name var1) (calc-var-name var2))))))))
382 425
383(defvar calc-last-edited-variable nil) 426(defvar calc-last-edited-variable nil)
384(defun calc-edit-variable (&optional var) 427(defun calc-edit-variable (&optional var)
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 5eca356af59..e1c4950b24b 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -643,48 +643,6 @@ since January 1st, 2000, at 12 ET."
643 ; equation of time, in hours 643 ; equation of time, in hours
644 (list app i time-eq nut))) 644 (list app i time-eq nut)))
645 645
646(defun solar-longitude (d)
647 "Longitude of sun on astronomical (Julian) day number D.
648Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes).
649
650The values of calendar-daylight-savings-starts,
651calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
652calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
653calendar-time-zone are used to interpret local time."
654 (let* ((a-d (calendar-absolute-from-astro d))
655 ;; get Universal Time
656 (date (calendar-astro-from-absolute
657 (- a-d
658 (if (dst-in-effect a-d)
659 (/ calendar-daylight-time-offset 24.0 60.0) 0)
660 (/ calendar-time-zone 60.0 24.0))))
661 ;; get Ephemeris Time
662 (date (+ date (solar-ephemeris-correction
663 (extract-calendar-year
664 (calendar-gregorian-from-absolute
665 (floor
666 (calendar-absolute-from-astro
667 date)))))))
668 (U (/ (- date 2451545) 3652500))
669 (longitude
670 (+ 4.9353929
671 (* 62833.1961680 U)
672 (* 0.0000001
673 (apply '+
674 (mapcar '(lambda (x)
675 (* (car x)
676 (sin (mod
677 (+ (car (cdr x))
678 (* (car (cdr (cdr x))) U))
679 (* 2 pi)))))
680 solar-data-list)))))
681 (aberration
682 (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973)))
683 (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi)))
684 (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi)))
685 (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2))))))
686 (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0)))
687
688(defconst solar-data-list 646(defconst solar-data-list
689 '((403406 4.721964 1.621043) 647 '((403406 4.721964 1.621043)
690 (195207 5.937458 62830.348067) 648 (195207 5.937458 62830.348067)
@@ -737,6 +695,48 @@ calendar-time-zone are used to interpret local time."
737 (10 1.50 21463.25) 695 (10 1.50 21463.25)
738 (10 2.55 157208.40))) 696 (10 2.55 157208.40)))
739 697
698(defun solar-longitude (d)
699 "Longitude of sun on astronomical (Julian) day number D.
700Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes).
701
702The values of calendar-daylight-savings-starts,
703calendar-daylight-savings-starts-time, calendar-daylight-savings-ends,
704calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and
705calendar-time-zone are used to interpret local time."
706 (let* ((a-d (calendar-absolute-from-astro d))
707 ;; get Universal Time
708 (date (calendar-astro-from-absolute
709 (- a-d
710 (if (dst-in-effect a-d)
711 (/ calendar-daylight-time-offset 24.0 60.0) 0)
712 (/ calendar-time-zone 60.0 24.0))))
713 ;; get Ephemeris Time
714 (date (+ date (solar-ephemeris-correction
715 (extract-calendar-year
716 (calendar-gregorian-from-absolute
717 (floor
718 (calendar-absolute-from-astro
719 date)))))))
720 (U (/ (- date 2451545) 3652500))
721 (longitude
722 (+ 4.9353929
723 (* 62833.1961680 U)
724 (* 0.0000001
725 (apply '+
726 (mapcar '(lambda (x)
727 (* (car x)
728 (sin (mod
729 (+ (car (cdr x))
730 (* (car (cdr (cdr x))) U))
731 (* 2 pi)))))
732 solar-data-list)))))
733 (aberration
734 (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973)))
735 (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi)))
736 (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi)))
737 (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2))))))
738 (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0)))
739
740(defun solar-ephemeris-correction (year) 740(defun solar-ephemeris-correction (year)
741 "Ephemeris time minus Universal Time during Gregorian year. 741 "Ephemeris time minus Universal Time during Gregorian year.
742Result is in days. 742Result is in days.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 9a1449823ca..0ce006af241 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -760,7 +760,10 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.")
760 ;; The files used are determined by ARG (as in dired-get-marked-files). 760 ;; The files used are determined by ARG (as in dired-get-marked-files).
761 (or (eq dired-no-confirm t) 761 (or (eq dired-no-confirm t)
762 (memq op-symbol dired-no-confirm) 762 (memq op-symbol dired-no-confirm)
763 (let ((files (dired-get-marked-files t arg)) 763 ;; Pass t for DISTINGUISH-ONE-MARKED so that a single file which
764 ;; is marked pops up a window. That will help the user see
765 ;; it isn't the current line file.
766 (let ((files (dired-get-marked-files t arg nil t))
764 (string (if (eq op-symbol 'compress) "Compress or uncompress" 767 (string (if (eq op-symbol 'compress) "Compress or uncompress"
765 (capitalize (symbol-name op-symbol))))) 768 (capitalize (symbol-name op-symbol)))))
766 (dired-mark-pop-up nil op-symbol files (function y-or-n-p) 769 (dired-mark-pop-up nil op-symbol files (function y-or-n-p)
diff --git a/lisp/dired.el b/lisp/dired.el
index afea6b173a6..60a9a7d35c1 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -450,7 +450,8 @@ Return value is the number of files marked, or nil if none were marked."
450 "flagged" "marked")))) 450 "flagged" "marked"))))
451 (and (> count 0) count))) 451 (and (> count 0) count)))
452 452
453(defmacro dired-map-over-marks (body arg &optional show-progress) 453(defmacro dired-map-over-marks (body arg &optional show-progress
454 distinguish-one-marked)
454 "Eval BODY with point on each marked line. Return a list of BODY's results. 455 "Eval BODY with point on each marked line. Return a list of BODY's results.
455If no marked file could be found, execute BODY on the current line. 456If no marked file could be found, execute BODY on the current line.
456 If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0) 457 If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0)
@@ -465,7 +466,10 @@ No guarantee is made about the position on the marked line.
465Search starts at the beginning of the buffer, thus the car of the list 466Search starts at the beginning of the buffer, thus the car of the list
466 corresponds to the line nearest to the buffer's bottom. This 467 corresponds to the line nearest to the buffer's bottom. This
467 is also true for (positive and negative) integer values of ARG. 468 is also true for (positive and negative) integer values of ARG.
468BODY should not be too long as it is expanded four times." 469BODY should not be too long as it is expanded four times.
470
471If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
472return (t FILENAME) instead of (FILENAME)."
469 ;; 473 ;;
470 ;;Warning: BODY must not add new lines before point - this may cause an 474 ;;Warning: BODY must not add new lines before point - this may cause an
471 ;;endless loop. 475 ;;endless loop.
@@ -505,13 +509,15 @@ BODY should not be too long as it is expanded four times."
505 (set-marker next-position nil) 509 (set-marker next-position nil)
506 (setq next-position (and (re-search-forward regexp nil t) 510 (setq next-position (and (re-search-forward regexp nil t)
507 (point-marker))))) 511 (point-marker)))))
512 (if (and ,distinguish-one-marked (= (length results) 1))
513 (setq results (cons t results)))
508 (if found 514 (if found
509 results 515 results
510 (list ,body))))) 516 (list ,body)))))
511 ;; save-excursion loses, again 517 ;; save-excursion loses, again
512 (dired-move-to-filename))) 518 (dired-move-to-filename)))
513 519
514(defun dired-get-marked-files (&optional localp arg filter) 520(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked)
515 "Return the marked files' names as list of strings. 521 "Return the marked files' names as list of strings.
516The list is in the same order as the buffer, that is, the car is the 522The list is in the same order as the buffer, that is, the car is the
517 first marked file. 523 first marked file.
@@ -522,13 +528,21 @@ Optional second argument ARG specifies files near point
522 If ARG is otherwise non-nil, use file. Usually ARG comes from 528 If ARG is otherwise non-nil, use file. Usually ARG comes from
523 the command's prefix arg. 529 the command's prefix arg.
524Optional third argument FILTER, if non-nil, is a function to select 530Optional third argument FILTER, if non-nil, is a function to select
525 some of the files--those for which (funcall FILTER FILENAME) is non-nil." 531 some of the files--those for which (funcall FILTER FILENAME) is non-nil.
526 (let ((all-of-them 532
527 (save-excursion 533If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file,
528 (dired-map-over-marks (dired-get-filename localp) arg))) 534return (t FILENAME) instead of (FILENAME).
529 result) 535Don't use that together with FILTER."
536 (let* ((all-of-them
537 (save-excursion
538 (dired-map-over-marks
539 (dired-get-filename localp)
540 arg nil distinguish-one-marked)))
541 result)
530 (if (not filter) 542 (if (not filter)
531 (nreverse all-of-them) 543 (if (and distinguish-one-marked (eq (car all-of-them) t))
544 all-of-them
545 (nreverse all-of-them))
532 (dolist (file all-of-them) 546 (dolist (file all-of-them)
533 (if (funcall filter file) 547 (if (funcall filter file)
534 (push file result))) 548 (push file result)))
@@ -1535,7 +1549,7 @@ Keybindings:
1535 (setq dired-switches-alist nil) 1549 (setq dired-switches-alist nil)
1536 (dired-sort-other dired-actual-switches t) 1550 (dired-sort-other dired-actual-switches t)
1537 (when (featurep 'dnd) 1551 (when (featurep 'dnd)
1538 (make-variable-buffer-local 'dnd-protocol-alist) 1552 (make-local-variable 'dnd-protocol-alist)
1539 (setq dnd-protocol-alist 1553 (setq dnd-protocol-alist
1540 (append dired-dnd-protocol-alist dnd-protocol-alist))) 1554 (append dired-dnd-protocol-alist dnd-protocol-alist)))
1541 (run-mode-hooks 'dired-mode-hook)) 1555 (run-mode-hooks 'dired-mode-hook))
@@ -2537,15 +2551,21 @@ FUNCTION should not manipulate files, just read input
2537 (an argument or confirmation). 2551 (an argument or confirmation).
2538The window is not shown if there is just one file or 2552The window is not shown if there is just one file or
2539 OP-SYMBOL is a member of the list in `dired-no-confirm'. 2553 OP-SYMBOL is a member of the list in `dired-no-confirm'.
2540FILES is the list of marked files." 2554FILES is the list of marked files. It can also be (t FILENAME)
2555in the case of one marked file, to distinguish that from using
2556just the current file."
2541 (or bufname (setq bufname " *Marked Files*")) 2557 (or bufname (setq bufname " *Marked Files*"))
2542 (if (or (eq dired-no-confirm t) 2558 (if (or (eq dired-no-confirm t)
2543 (memq op-symbol dired-no-confirm) 2559 (memq op-symbol dired-no-confirm)
2560 ;; If FILES defaulted to the current line's file.
2544 (= (length files) 1)) 2561 (= (length files) 1))
2545 (apply function args) 2562 (apply function args)
2546 (with-current-buffer (get-buffer-create bufname) 2563 (with-current-buffer (get-buffer-create bufname)
2547 (erase-buffer) 2564 (erase-buffer)
2548 (dired-format-columns-of-files files) 2565 ;; Handle (t FILE) just like (FILE), here.
2566 ;; That value is used (only in some cases), to mean
2567 ;; just one file that was marked, rather than the current line file.
2568 (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files))
2549 (remove-text-properties (point-min) (point-max) 2569 (remove-text-properties (point-min) (point-max)
2550 '(mouse-face nil help-echo nil))) 2570 '(mouse-face nil help-echo nil)))
2551 (save-window-excursion 2571 (save-window-excursion
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 927f2e3bdb6..96c9e18a3f1 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -36,6 +36,7 @@
36;;; Customizable variables 36;;; Customizable variables
37 37
38 38
39;;;###autoload
39(defcustom dnd-protocol-alist 40(defcustom dnd-protocol-alist
40 '( 41 '(
41 ("^file:///" . dnd-open-local-file) ; XDND format. 42 ("^file:///" . dnd-open-local-file) ; XDND format.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b93979de82c..970a64d062b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -338,8 +338,8 @@ Elements of the list may be be:
338 338
339 free-vars references to variables not in the current lexical scope. 339 free-vars references to variables not in the current lexical scope.
340 unresolved calls to unknown functions. 340 unresolved calls to unknown functions.
341 callargs lambda calls with args that don't match the definition. 341 callargs function calls with args that don't match the definition.
342 redefine function cell redefined from a macro to a lambda or vice 342 redefine function name redefined from a macro to ordinary function or vice
343 versa, or redefined to take a different number of arguments. 343 versa, or redefined to take a different number of arguments.
344 obsolete obsolete variables and functions. 344 obsolete obsolete variables and functions.
345 noruntime functions that may not be defined at runtime (typically 345 noruntime functions that may not be defined at runtime (typically
@@ -1244,6 +1244,20 @@ extra args."
1244(dolist (elt '(format message error)) 1244(dolist (elt '(format message error))
1245 (put elt 'byte-compile-format-like t)) 1245 (put elt 'byte-compile-format-like t))
1246 1246
1247;; Warn if a custom definition fails to specify :group.
1248(defun byte-compile-nogroup-warn (form)
1249 (let ((keyword-args (cdr (cdr (cdr (cdr form)))))
1250 (name (cadr form)))
1251 (unless (plist-get keyword-args :group)
1252 (byte-compile-warn
1253 "%s for `%s' fails to specify containing group"
1254 (cdr (assq (car form)
1255 '((custom-declare-group . defgroup)
1256 (custom-declare-face . defface)
1257 (custom-declare-variable . defcustom))))
1258 (if (and (consp name) (eq (car name) 'quote))
1259 (cadr name) name)))))
1260
1247;; Warn if the function or macro is being redefined with a different 1261;; Warn if the function or macro is being redefined with a different
1248;; number of arguments. 1262;; number of arguments.
1249(defun byte-compile-arglist-warn (form macrop) 1263(defun byte-compile-arglist-warn (form macrop)
@@ -2729,7 +2743,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
2729 (when (byte-compile-const-symbol-p fn) 2743 (when (byte-compile-const-symbol-p fn)
2730 (byte-compile-warn "`%s' called as a function" fn)) 2744 (byte-compile-warn "`%s' called as a function" fn))
2731 (and (memq 'interactive-only byte-compile-warnings) 2745 (and (memq 'interactive-only byte-compile-warnings)
2732 (memq (car form) byte-compile-interactive-only-functions) 2746 (memq fn byte-compile-interactive-only-functions)
2733 (byte-compile-warn "`%s' used from Lisp code\n\ 2747 (byte-compile-warn "`%s' used from Lisp code\n\
2734That command is designed for interactive use only" fn)) 2748That command is designed for interactive use only" fn))
2735 (if (and handler 2749 (if (and handler
@@ -2739,8 +2753,10 @@ That command is designed for interactive use only" fn))
2739 (progn 2753 (progn
2740 (byte-compile-set-symbol-position fn) 2754 (byte-compile-set-symbol-position fn)
2741 (funcall handler form)) 2755 (funcall handler form))
2742 (if (memq 'callargs byte-compile-warnings) 2756 (when (memq 'callargs byte-compile-warnings)
2743 (byte-compile-callargs-warn form)) 2757 (if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face))
2758 (byte-compile-nogroup-warn form))
2759 (byte-compile-callargs-warn form))
2744 (byte-compile-normal-call form)) 2760 (byte-compile-normal-call form))
2745 (if (memq 'cl-functions byte-compile-warnings) 2761 (if (memq 'cl-functions byte-compile-warnings)
2746 (byte-compile-cl-warn form)))) 2762 (byte-compile-cl-warn form))))
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index c2d3303c825..30c76b8769a 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -189,6 +189,8 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
189 last) 189 last)
190 (set-marker e (1+ (match-end 2))) 190 (set-marker e (1+ (match-end 2)))
191 (goto-char s) 191 (goto-char s)
192 ;; Back up one character so that our search can match the first year.
193 (backward-char 1)
192 (while (and (< (point) (marker-position e)) 194 (while (and (< (point) (marker-position e))
193 (re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]" 195 (re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]"
194 (marker-position e) t)) 196 (marker-position e) t))
@@ -204,8 +206,12 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
204 (setq last p))) 206 (setq last p)))
205 (when last 207 (when last
206 (goto-char last) 208 (goto-char last)
207 (let ((fill-prefix " ")) 209 ;; Don't mess up whitespace after the years.
208 (fill-region s last)) 210 (skip-chars-backward " \t")
211 (save-restriction
212 (narrow-to-region (point-min) (point))
213 (let ((fill-prefix " "))
214 (fill-region s last)))
209 ) 215 )
210 (set-marker e nil) 216 (set-marker e nil)
211 (copyright-update nil t)) 217 (copyright-update nil t))
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index a10b8546d03..c00028ad218 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -158,7 +158,9 @@ Note that if the documentation string had been left out, it would have
158been generated automatically, with a reference to the keymap. 158been generated automatically, with a reference to the keymap.
159 159
160The new mode runs the hook constructed by the function 160The new mode runs the hook constructed by the function
161`derived-mode-hook-name'." 161`derived-mode-hook-name'.
162
163See Info node `(elisp)Derived Modes' for more details."
162 (declare (debug (&define name symbolp sexp [&optional stringp] 164 (declare (debug (&define name symbolp sexp [&optional stringp]
163 [&rest keywordp sexp] def-body))) 165 [&rest keywordp sexp] def-body)))
164 166
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 78ba1fe27bf..c9f1769ae14 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -65,7 +65,7 @@ It returns the remaining items of the displayed menu.
65 :visible INCLUDE 65 :visible INCLUDE
66 66
67INCLUDE is an expression; this menu is only visible if this 67INCLUDE is an expression; this menu is only visible if this
68expression has a non-nil value. `:include' is an alias for `:visible'. 68expression has a non-nil value. `:included' is an alias for `:visible'.
69 69
70 :active ENABLE 70 :active ENABLE
71 71
@@ -110,10 +110,10 @@ keyboard equivalent.
110ENABLE is an expression; the item is enabled for selection 110ENABLE is an expression; the item is enabled for selection
111whenever this expression's value is non-nil. 111whenever this expression's value is non-nil.
112 112
113 :included INCLUDE 113 :visible INCLUDE
114 114
115INCLUDE is an expression; this item is only visible if this 115INCLUDE is an expression; this item is only visible if this
116expression has a non-nil value. 116expression has a non-nil value. `:included' is an alias for `:visible'.
117 117
118 :suffix FORM 118 :suffix FORM
119 119
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index b23217151e3..1546d078aea 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -229,6 +229,7 @@ With prefix ARG, turn ElDoc mode on if and only if ARG is positive."
229 (not (eq (selected-window) (minibuffer-window))))) 229 (not (eq (selected-window) (minibuffer-window)))))
230 230
231 231
232;;;###autoload
232(defvar eldoc-documentation-function nil 233(defvar eldoc-documentation-function nil
233 "If non-nil, function to call to return doc string. 234 "If non-nil, function to call to return doc string.
234The function of no args should return a one-line string for displaying 235The function of no args should return a one-line string for displaying
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 8f4245cb9a1..bb815481bf0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -192,6 +192,9 @@
192 ;; Look within the line for a ; following an even number of backslashes 192 ;; Look within the line for a ; following an even number of backslashes
193 ;; after either a non-backslash or the line beginning. 193 ;; after either a non-backslash or the line beginning.
194 (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") 194 (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
195 (make-local-variable 'font-lock-comment-start-skip)
196 ;; Font lock mode uses this only when it KNOWS a comment is starting.
197 (setq font-lock-comment-start-skip ";+ *")
195 (make-local-variable 'comment-add) 198 (make-local-variable 'comment-add)
196 (setq comment-add 1) ;default to `;;' in comment-region 199 (setq comment-add 1) ;default to `;;' in comment-region
197 (make-local-variable 'comment-column) 200 (make-local-variable 'comment-column)
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 7b07b84563a..54d4c4acb9e 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -517,7 +517,8 @@ This is used by `eshell-watch-for-password-prompt'."
517 (let ((inhibit-read-only t) 517 (let ((inhibit-read-only t)
518 (no-default (eobp)) 518 (no-default (eobp))
519 (find-tag-default-function 'ignore)) 519 (find-tag-default-function 'ignore))
520 (setq tagname (car (find-tag-interactive "Find tag: "))) 520 (with-no-warnings
521 (setq tagname (car (find-tag-interactive "Find tag: "))))
521 (find-tag tagname next-p regexp-p))) 522 (find-tag tagname next-p regexp-p)))
522 523
523(defun eshell-move-argument (limit func property arg) 524(defun eshell-move-argument (limit func property arg)
diff --git a/lisp/faces.el b/lisp/faces.el
index 03b3a769955..b6bc8e88f64 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1257,17 +1257,32 @@ If FRAME is omitted or nil, use the selected frame."
1257 (insert "Face: " (symbol-name f)) 1257 (insert "Face: " (symbol-name f))
1258 (if (not (facep f)) 1258 (if (not (facep f))
1259 (insert " undefined face.\n") 1259 (insert " undefined face.\n")
1260 (let ((customize-label "customize this face")) 1260 (let ((customize-label "customize this face")
1261 file-name)
1261 (princ (concat " (" customize-label ")\n")) 1262 (princ (concat " (" customize-label ")\n"))
1262 (insert "Documentation: " 1263 (insert "Documentation: "
1263 (or (face-documentation f) 1264 (or (face-documentation f)
1264 "Not documented as a face.") 1265 "Not documented as a face.")
1265 "\n\n") 1266 "\n")
1266 (with-current-buffer standard-output 1267 (with-current-buffer standard-output
1267 (save-excursion 1268 (save-excursion
1268 (re-search-backward 1269 (re-search-backward
1269 (concat "\\(" customize-label "\\)") nil t) 1270 (concat "\\(" customize-label "\\)") nil t)
1270 (help-xref-button 1 'help-customize-face f))) 1271 (help-xref-button 1 'help-customize-face f)))
1272 ;; The next 4 sexps are copied from describe-function-1
1273 ;; and simplified.
1274 (setq file-name (symbol-file f 'defface))
1275 (when file-name
1276 (princ "Defined in `")
1277 (princ file-name)
1278 (princ "'")
1279 ;; Make a hyperlink to the library.
1280 (save-excursion
1281 (re-search-backward "`\\([^`']+\\)'" nil t)
1282 (help-xref-button 1 'help-face-def f file-name))
1283 (princ ".")
1284 (terpri)
1285 (terpri))
1271 (dolist (a attrs) 1286 (dolist (a attrs)
1272 (let ((attr (face-attribute f (car a) frame))) 1287 (let ((attr (face-attribute f (car a) frame)))
1273 (insert (make-string (- max-width (length (cdr a))) ?\ ) 1288 (insert (make-string (- max-width (length (cdr a))) ?\ )
@@ -2078,7 +2093,7 @@ Note: Other faces cannot inherit from the cursor face."
2078 (t :inverse-video t)) 2093 (t :inverse-video t))
2079 "Basic face for highlighting trailing whitespace." 2094 "Basic face for highlighting trailing whitespace."
2080 :version "21.1" 2095 :version "21.1"
2081 :group 'font-lock ; like `show-trailing-whitespace' 2096 :group 'whitespace ; like `show-trailing-whitespace'
2082 :group 'basic-faces) 2097 :group 'basic-faces)
2083 2098
2084(defface escape-glyph '((((background dark)) :foreground "cyan") 2099(defface escape-glyph '((((background dark)) :foreground "cyan")
diff --git a/lisp/files.el b/lisp/files.el
index cdd4405d0cc..da2090d7752 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -541,7 +541,7 @@ DIR should be an absolute directory name. It defaults to
541the value of `default-directory'." 541the value of `default-directory'."
542 (unless dir 542 (unless dir
543 (setq dir default-directory)) 543 (setq dir default-directory))
544 (read-file-name prompt dir (or default-dirname 544 (read-file-name prompt dir (or default-dirname
545 (if initial (expand-file-name initial dir) 545 (if initial (expand-file-name initial dir)
546 dir)) 546 dir))
547 mustmatch initial 547 mustmatch initial
@@ -1944,7 +1944,7 @@ and `magic-mode-alist', which determines modes based on file contents.")
1944 "Alist mapping interpreter names to major modes. 1944 "Alist mapping interpreter names to major modes.
1945This is used for files whose first lines match `auto-mode-interpreter-regexp'. 1945This is used for files whose first lines match `auto-mode-interpreter-regexp'.
1946Each element looks like (INTERPRETER . MODE). 1946Each element looks like (INTERPRETER . MODE).
1947The car of each element is compared with 1947The car of each element, a regular expression, is compared with
1948the name of the interpreter specified in the first line. 1948the name of the interpreter specified in the first line.
1949If it matches, mode MODE is selected. 1949If it matches, mode MODE is selected.
1950 1950
@@ -1961,13 +1961,12 @@ from the end of the file name anything that matches one of these regexps.")
1961(defvar auto-mode-interpreter-regexp 1961(defvar auto-mode-interpreter-regexp
1962 "#![ \t]?\\([^ \t\n]*\ 1962 "#![ \t]?\\([^ \t\n]*\
1963/bin/env[ \t]\\)?\\([^ \t\n]+\\)" 1963/bin/env[ \t]\\)?\\([^ \t\n]+\\)"
1964 "Regular expression matching interpreters, for file mode determination. 1964 "Regexp matching interpreters, for file mode determination.
1965This regular expression is matched against the first line of a file 1965This regular expression is matched against the first line of a file
1966to determine the file's mode in `set-auto-mode' when Emacs can't deduce 1966to determine the file's mode in `set-auto-mode'. If it matches, the file
1967a mode from the file's name. If it matches, the file is assumed to 1967is assumed to be interpreted by the interpreter matched by the second group
1968be interpreted by the interpreter matched by the second group of the 1968of the regular expression. The mode is then determined as the mode
1969regular expression. The mode is then determined as the mode associated 1969associated with that interpreter in `interpreter-mode-alist'.")
1970with that interpreter in `interpreter-mode-alist'.")
1971 1970
1972(defvar magic-mode-alist 1971(defvar magic-mode-alist
1973 `(;; The < comes before the groups (but the first) to reduce backtracking. 1972 `(;; The < comes before the groups (but the first) to reduce backtracking.
@@ -2153,7 +2152,7 @@ Otherwise, return nil; point may be changed."
2153 (goto-char beg) 2152 (goto-char beg)
2154 end)))) 2153 end))))
2155 2154
2156(defun hack-local-variables-confirm () 2155(defun hack-local-variables-confirm (string)
2157 (or (eq enable-local-variables t) 2156 (or (eq enable-local-variables t)
2158 (and enable-local-variables 2157 (and enable-local-variables
2159 (save-window-excursion 2158 (save-window-excursion
@@ -2170,8 +2169,10 @@ Otherwise, return nil; point may be changed."
2170 (save-excursion 2169 (save-excursion
2171 (beginning-of-line) 2170 (beginning-of-line)
2172 (set-window-start (selected-window) (point))) 2171 (set-window-start (selected-window) (point)))
2173 (y-or-n-p (format "Set local variables as specified in -*- line of %s? " 2172 (y-or-n-p (format string
2174 (file-name-nondirectory buffer-file-name))))))) 2173 (if buffer-file-name
2174 (file-name-nondirectory buffer-file-name)
2175 (concat "buffer " (buffer-name)))))))))
2175 2176
2176(defun hack-local-variables-prop-line (&optional mode-only) 2177(defun hack-local-variables-prop-line (&optional mode-only)
2177 "Set local variables specified in the -*- line. 2178 "Set local variables specified in the -*- line.
@@ -2227,7 +2228,8 @@ is specified, returning t if it is specified."
2227 (if mode-only mode-specified 2228 (if mode-only mode-specified
2228 (if (and result 2229 (if (and result
2229 (or mode-only 2230 (or mode-only
2230 (hack-local-variables-confirm))) 2231 (hack-local-variables-confirm
2232 "Set local variables as specified in -*- line of %s? ")))
2231 (let ((enable-local-eval enable-local-eval)) 2233 (let ((enable-local-eval enable-local-eval))
2232 (while result 2234 (while result
2233 (hack-one-local-variable (car (car result)) (cdr (car result))) 2235 (hack-one-local-variable (car (car result)) (cdr (car result)))
@@ -2257,7 +2259,8 @@ is specified, returning t if it is specified."
2257 (when (let ((case-fold-search t)) 2259 (when (let ((case-fold-search t))
2258 (and (search-forward "Local Variables:" nil t) 2260 (and (search-forward "Local Variables:" nil t)
2259 (or mode-only 2261 (or mode-only
2260 (hack-local-variables-confirm)))) 2262 (hack-local-variables-confirm
2263 "Set local variables as specified at end of %s? "))))
2261 (skip-chars-forward " \t") 2264 (skip-chars-forward " \t")
2262 (let ((enable-local-eval enable-local-eval) 2265 (let ((enable-local-eval enable-local-eval)
2263 ;; suffix is what comes after "local variables:" in its line. 2266 ;; suffix is what comes after "local variables:" in its line.
@@ -2478,7 +2481,8 @@ is considered risky."
2478 (hack-one-local-variable-eval-safep val)) 2481 (hack-one-local-variable-eval-safep val))
2479 ;; Permit eval if not root and user says ok. 2482 ;; Permit eval if not root and user says ok.
2480 (and (not (zerop (user-uid))) 2483 (and (not (zerop (user-uid)))
2481 (hack-local-variables-confirm))) 2484 (hack-local-variables-confirm
2485 "Process `eval' or hook local variables in %s? ")))
2482 (if (eq var 'eval) 2486 (if (eq var 'eval)
2483 (save-excursion (eval val)) 2487 (save-excursion (eval val))
2484 (make-local-variable var) 2488 (make-local-variable var)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index fdc0ebf255d..444ca80f94c 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1311,12 +1311,19 @@ START should be at the beginning of a line."
1311 1311
1312;;; Syntactic fontification functions. 1312;;; Syntactic fontification functions.
1313 1313
1314(defvar font-lock-comment-start-skip nil
1315 "If non-nil, Font Lock mode uses this instead of `comment-start-skip'.")
1316
1317(defvar font-lock-comment-end-skip nil
1318 "If non-nil, Font Lock mode uses this instead of `comment-end'.")
1319
1314(defun font-lock-fontify-syntactically-region (start end &optional loudly ppss) 1320(defun font-lock-fontify-syntactically-region (start end &optional loudly ppss)
1315 "Put proper face on each string and comment between START and END. 1321 "Put proper face on each string and comment between START and END.
1316START should be at the beginning of a line." 1322START should be at the beginning of a line."
1317 (let ((comment-end-regexp 1323 (let ((comment-end-regexp
1318 (regexp-quote 1324 (or font-lock-comment-end-skip
1319 (replace-regexp-in-string "^ *" "" comment-end))) 1325 (regexp-quote
1326 (replace-regexp-in-string "^ *" "" comment-end))))
1320 state face beg) 1327 state face beg)
1321 (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name))) 1328 (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
1322 (goto-char start) 1329 (goto-char start)
@@ -1334,12 +1341,14 @@ START should be at the beginning of a line."
1334 'syntax-table)) 1341 'syntax-table))
1335 (when face (put-text-property beg (point) 'face face)) 1342 (when face (put-text-property beg (point) 'face face))
1336 (when (and (eq face 'font-lock-comment-face) 1343 (when (and (eq face 'font-lock-comment-face)
1337 comment-start-skip) 1344 (or font-lock-comment-start-skip
1345 comment-start-skip))
1338 ;; Find the comment delimiters 1346 ;; Find the comment delimiters
1339 ;; and use font-lock-comment-delimiter-face for them. 1347 ;; and use font-lock-comment-delimiter-face for them.
1340 (save-excursion 1348 (save-excursion
1341 (goto-char beg) 1349 (goto-char beg)
1342 (if (looking-at comment-start-skip) 1350 (if (looking-at (or font-lock-comment-start-skip
1351 comment-start-skip))
1343 (put-text-property beg (match-end 0) 'face 1352 (put-text-property beg (match-end 0) 'face
1344 font-lock-comment-delimiter-face))) 1353 font-lock-comment-delimiter-face)))
1345 (if (looking-back comment-end-regexp (point-at-bol)) 1354 (if (looking-back comment-end-regexp (point-at-bol))
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 8b0284089fc..d94f03200dc 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -169,6 +169,18 @@ The format is (FUNCTION ARGS...).")
169 (goto-char (cdr location)))) 169 (goto-char (cdr location))))
170 'help-echo (purecopy"mouse-2, RET: find variable's definition")) 170 'help-echo (purecopy"mouse-2, RET: find variable's definition"))
171 171
172(define-button-type 'help-face-def
173 :supertype 'help-xref
174 'help-function (lambda (fun file)
175 (require 'find-func)
176 ;; Don't use find-function-noselect because it follows
177 ;; aliases (which fails for built-in functions).
178 (let ((location
179 (find-function-search-for-symbol fun 'defface file)))
180 (pop-to-buffer (car location))
181 (goto-char (cdr location))))
182 'help-echo (purecopy "mouse-2, RET: find face's definition"))
183
172 184
173;;;###autoload 185;;;###autoload
174(defun help-mode () 186(defun help-mode ()
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index e2e5d251371..87d9eb707eb 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1024,7 +1024,9 @@ currently used by buffers."
1024 (ibuffer-awhen (with-current-buffer buf 1024 (ibuffer-awhen (with-current-buffer buf
1025 (or buffer-file-name 1025 (or buffer-file-name
1026 (and (boundp 'dired-directory) 1026 (and (boundp 'dired-directory)
1027 dired-directory 1027 (if (stringp dired-directory)
1028 dired-directory
1029 (car dired-directory))
1028 (expand-file-name dired-directory)))) 1030 (expand-file-name dired-directory))))
1029 (string-match qualifier it))) 1031 (string-match qualifier it)))
1030 1032
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index f2ebb5db324..213160b6f37 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1688,7 +1688,9 @@ If point is on a group name, this function operates on that group."
1688 (abbreviate-file-name 1688 (abbreviate-file-name
1689 (or buffer-file-name 1689 (or buffer-file-name
1690 (and (boundp 'dired-directory) 1690 (and (boundp 'dired-directory)
1691 dired-directory) 1691 (if (stringp dired-directory)
1692 dired-directory
1693 (car dired-directory)))
1692 "")))) 1694 ""))))
1693 1695
1694(define-ibuffer-column filename-and-process 1696(define-ibuffer-column filename-and-process
diff --git a/lisp/ido.el b/lisp/ido.el
index 519d57cbb88..d7c0c8aa9ea 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1392,10 +1392,15 @@ This function also adds a hook to the minibuffer."
1392 (define-key map [left] 'ido-prev-match) 1392 (define-key map [left] 'ido-prev-match)
1393 (define-key map "?" 'ido-completion-help) 1393 (define-key map "?" 'ido-completion-help)
1394 1394
1395 ;; Magic commands.
1396 (define-key map "\C-b" 'ido-magic-backward-char)
1397 (define-key map "\C-f" 'ido-magic-forward-char)
1398 (define-key map "\C-d" 'ido-magic-delete-char)
1399
1395 (when (memq ido-cur-item '(file dir)) 1400 (when (memq ido-cur-item '(file dir))
1396 (define-key map "\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer)) 1401 (define-key map "\C-x\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer))
1397 (define-key map "\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired)) 1402 (define-key map "\C-x\C-f" 'ido-fallback-command)
1398 (define-key map "\C-f" 'ido-fallback-command) 1403 (define-key map "\C-x\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired))
1399 (define-key map [down] 'ido-next-match-dir) 1404 (define-key map [down] 'ido-next-match-dir)
1400 (define-key map [up] 'ido-prev-match-dir) 1405 (define-key map [up] 'ido-prev-match-dir)
1401 (define-key map [(meta up)] 'ido-prev-work-directory) 1406 (define-key map [(meta up)] 'ido-prev-work-directory)
@@ -1405,7 +1410,7 @@ This function also adds a hook to the minibuffer."
1405 (define-key map [(meta backspace)] 'ido-delete-backward-word-updir) 1410 (define-key map [(meta backspace)] 'ido-delete-backward-word-updir)
1406 (define-key map [(control backspace)] 'ido-up-directory) 1411 (define-key map [(control backspace)] 'ido-up-directory)
1407 (define-key map "\C-l" 'ido-reread-directory) 1412 (define-key map "\C-l" 'ido-reread-directory)
1408 (define-key map [(meta ?d)] 'ido-wide-find-dir) 1413 (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir)
1409 (define-key map [(meta ?b)] 'ido-push-dir) 1414 (define-key map [(meta ?b)] 'ido-push-dir)
1410 (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir) 1415 (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir)
1411 (define-key map [(meta ?k)] 'ido-forget-work-directory) 1416 (define-key map [(meta ?k)] 'ido-forget-work-directory)
@@ -1426,8 +1431,8 @@ This function also adds a hook to the minibuffer."
1426 ) 1431 )
1427 1432
1428 (when (eq ido-cur-item 'buffer) 1433 (when (eq ido-cur-item 'buffer)
1429 (define-key map "\C-f" (or ido-context-switch-command 'ido-enter-find-file)) 1434 (define-key map "\C-x\C-f" (or ido-context-switch-command 'ido-enter-find-file))
1430 (define-key map "\C-b" 'ido-fallback-command) 1435 (define-key map "\C-x\C-b" 'ido-fallback-command)
1431 (define-key map "\C-k" 'ido-kill-buffer-at-head) 1436 (define-key map "\C-k" 'ido-kill-buffer-at-head)
1432 ) 1437 )
1433 1438
@@ -2258,6 +2263,52 @@ If no merge has yet taken place, toggle automatic merging option."
2258 ((not ido-use-merged-list) 2263 ((not ido-use-merged-list)
2259 (ido-merge-work-directories)))) 2264 (ido-merge-work-directories))))
2260 2265
2266;;; Magic C-f
2267
2268(defun ido-magic-forward-char ()
2269 "Move forward in user input or perform magic action.
2270If no user input is present, perform magic actions:
2271C-x C-f C-f fallback to non-ido find-file.
2272C-x C-d C-f fallback to non-ido brief dired.
2273C-x d C-f fallback to non-ido dired."
2274 (interactive)
2275 (cond
2276 ((not (eobp))
2277 (forward-char 1))
2278 ((and (= (length ido-text) 0)
2279 (memq ido-cur-item '(file dir)))
2280 (ido-fallback-command))))
2281
2282;;; Magic C-b
2283
2284(defun ido-magic-backward-char ()
2285 "Move backward in user input or perform magic action.
2286If no user input is present, perform magic actions:
2287C-x C-b C-b fallback to non-ido switch-to-buffer."
2288 (interactive)
2289 (cond
2290 ((> (length ido-text) 0)
2291 (if (> (point) (minibuffer-prompt-end))
2292 (forward-char -1)))
2293 ((eq ido-cur-item 'buffer)
2294 (ido-fallback-command))))
2295
2296;;; Magic C-d
2297
2298(defun ido-magic-delete-char ()
2299 "Delete following char in user input or perform magic action.
2300If at end of user input, perform magic actions:
2301C-x C-f ... C-d enter dired on current directory."
2302 (interactive)
2303 (cond
2304 ((not (eobp))
2305 (delete-char 1))
2306 (ido-context-switch-command
2307 nil)
2308 ((memq ido-cur-item '(file dir))
2309 (ido-enter-dired))))
2310
2311
2261;;; TOGGLE FUNCTIONS 2312;;; TOGGLE FUNCTIONS
2262 2313
2263(defun ido-toggle-case () 2314(defun ido-toggle-case ()
@@ -2505,6 +2556,14 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2505 (setq ido-rotate-temp t) 2556 (setq ido-rotate-temp t)
2506 (exit-minibuffer))) 2557 (exit-minibuffer)))
2507 2558
2559(defun ido-wide-find-dir-or-delete-dir (&optional dir)
2560 "Prompt for DIR to search for using find, starting from current directory.
2561If input stack is non-empty, delete current directory component."
2562 (interactive)
2563 (if ido-input-stack
2564 (ido-delete-backward-word-updir 1)
2565 (ido-wide-find-dir)))
2566
2508(defun ido-push-dir () 2567(defun ido-push-dir ()
2509 "Move to previous directory in file name, push current input on stack." 2568 "Move to previous directory in file name, push current input on stack."
2510 (interactive) 2569 (interactive)
@@ -4077,6 +4136,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
4077;;; Helper functions for other programs 4136;;; Helper functions for other programs
4078 4137
4079(put 'dired-do-rename 'ido 'ignore) 4138(put 'dired-do-rename 'ido 'ignore)
4139(put 'ibuffer-find-file 'ido 'find-file)
4080 4140
4081;;;###autoload 4141;;;###autoload
4082(defun ido-read-buffer (prompt &optional default require-match) 4142(defun ido-read-buffer (prompt &optional default require-match)
@@ -4111,7 +4171,8 @@ See `read-file-name' for additional parameters."
4111 (not (memq this-command ido-read-file-name-non-ido)) 4171 (not (memq this-command ido-read-file-name-non-ido))
4112 (or (null predicate) (eq predicate 'file-exists-p))) 4172 (or (null predicate) (eq predicate 'file-exists-p)))
4113 (let* (ido-saved-vc-hb 4173 (let* (ido-saved-vc-hb
4114 (ido-context-switch-command 'ignore) 4174 (ido-context-switch-command
4175 (if (eq (get this-command 'ido) 'find-file) nil 'ignore))
4115 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) 4176 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
4116 (ido-current-directory (ido-expand-directory dir)) 4177 (ido-current-directory (ido-expand-directory dir))
4117 (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) 4178 (ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
@@ -4126,6 +4187,8 @@ See `read-file-name' for additional parameters."
4126 (cond 4187 (cond
4127 ((eq ido-exit 'fallback) 4188 ((eq ido-exit 'fallback)
4128 (setq filename 'fallback)) 4189 (setq filename 'fallback))
4190 ((eq ido-exit 'dired)
4191 (setq filename ido-current-directory))
4129 (filename 4192 (filename
4130 (setq filename 4193 (setq filename
4131 (concat ido-current-directory filename)))))) 4194 (concat ido-current-directory filename))))))
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 39acbb33dfd..88da8ffed79 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -173,6 +173,7 @@ coding system names is determined from `latex-inputenc-coding-alist'."
173 'undecided)))) 173 'undecided))))
174 'undecided)) 174 'undecided))
175 175
176
176(provide 'latexenc) 177(provide 'latexenc)
177 178
178;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1 179;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el
index c3fe365d8a5..112bc22cfc6 100644
--- a/lisp/international/ogonek.el
+++ b/lisp/international/ogonek.el
@@ -166,7 +166,7 @@ znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco.
166 (set-buffer (get-buffer-create " *ogonek-jak*")) 166 (set-buffer (get-buffer-create " *ogonek-jak*"))
167 (insert ogonek-informacja) 167 (insert ogonek-informacja)
168 (switch-to-buffer " *ogonek-jak*") 168 (switch-to-buffer " *ogonek-jak*")
169 (beginning-of-buffer)) 169 (goto-char (point-min)))
170 170
171;; ------ A Little Info in English -------- 171;; ------ A Little Info in English --------
172 172
@@ -264,7 +264,7 @@ The functions come in the following groups.
264 (set-buffer (get-buffer-create " *ogonek-how*")) 264 (set-buffer (get-buffer-create " *ogonek-how*"))
265 (insert ogonek-information) 265 (insert ogonek-information)
266 (switch-to-buffer " *ogonek-how*") 266 (switch-to-buffer " *ogonek-how*")
267 (beginning-of-buffer)) 267 (goto-char (point-min)))
268 268
269;; ---- Variables keeping the suggested answers to dialogue questions ----- 269;; ---- Variables keeping the suggested answers to dialogue questions -----
270(defvar ogonek-encoding-choices 270(defvar ogonek-encoding-choices
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index cc7aaa65c67..1a833832379 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -1,8 +1,10 @@
1;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*- 1;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*-
2 2
3;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1995, 2001, 2003
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1995, 2001 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6 8
7;; Keywords: mule, multilingual, Chinese 9;; Keywords: mule, multilingual, Chinese
8 10
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index e3a1938b790..70b35bf62fb 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -1,7 +1,9 @@
1;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*- 1;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Chinese 8;; Keywords: multilingual, Chinese
7 9
diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el
index 1ccc97a2754..3bccb2561e4 100644
--- a/lisp/language/cyril-util.el
+++ b/lisp/language/cyril-util.el
@@ -1,6 +1,6 @@
1;;; cyril-util.el --- utilities for Cyrillic scripts 1;;; cyril-util.el --- utilities for Cyrillic scripts
2 2
3;; Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
4 4
5;; Keywords: mule, multilingual, Cyrillic 5;; Keywords: mule, multilingual, Cyrillic
6 6
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 32ad01602e2..44a9ccc66a1 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -1,8 +1,9 @@
1;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*- 1;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
5;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Author: Kenichi Handa <handa@etl.go.jp> 8;; Author: Kenichi Handa <handa@etl.go.jp>
8;; Keywords: multilingual, Cyrillic, i18n 9;; Keywords: multilingual, Cyrillic, i18n
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el
index 24b9d40eec0..3b7ea905206 100644
--- a/lisp/language/devan-util.el
+++ b/lisp/language/devan-util.el
@@ -1,6 +1,10 @@
1;;; devan-util.el --- Support for composing Devanagari characters 1;;; devan-util.el --- Support for composing Devanagari characters
2 2
3;; Copyright (C) 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1998, 2001, 2002, 2003
4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 1998, 1999, 2000
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
4 8
5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> 9;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6;; Keywords: multilingual, Devanagari 10;; Keywords: multilingual, Devanagari
diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el
index bf590d0a00a..ab0faae441b 100644
--- a/lisp/language/devanagari.el
+++ b/lisp/language/devanagari.el
@@ -1,6 +1,6 @@
1;;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1996, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
4 4
5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> 5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6;; Keywords: multilingual, Indian, Devanagari 6;; Keywords: multilingual, Indian, Devanagari
diff --git a/lisp/language/english.el b/lisp/language/english.el
index bff51f89644..1c536612244 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -1,7 +1,9 @@
1;;; english.el --- support for English -*- no-byte-compile: t -*- 1;;; english.el --- support for English -*- no-byte-compile: t -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multibyte character, character set, syntax, category 8;; Keywords: multibyte character, character set, syntax, category
7 9
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index aec352a5f75..cf893ffa48b 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -1,7 +1,10 @@
1;;; ethio-util.el --- utilities for Ethiopic -*- coding: iso-2022-7bit; -*- 1;;; ethio-util.el --- utilities for Ethiopic -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1997, 2001 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2002
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 1997, 1998, 1999, 2001, 2004, 2005
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
5 8
6;; Keywords: mule, multilingual, Ethiopic 9;; Keywords: mule, multilingual, Ethiopic
7 10
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index a0140b585fb..b5e4299e907 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -1,7 +1,9 @@
1;;; ethiopic.el --- support for Ethiopic -*- coding: iso-2022-7bit; -*- 1;;; ethiopic.el --- support for Ethiopic -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995, 2001 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 2001
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Ethiopic 8;; Keywords: multilingual, Ethiopic
7 9
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 7c51ec4d556..78f7900ffba 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -1,8 +1,10 @@
1;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- 1;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
4;; Licensed to the Free Software Foundation. 4;; Free Software Foundation, Inc.
5;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. 5;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
6 8
7;; Keywords: multilingual, European 9;; Keywords: multilingual, European
8 10
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index 0283f0fbfde..bd67b878ee6 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -1,7 +1,8 @@
1;;; greek.el --- support for Greek -*- no-byte-compile: t -*- 1;;; greek.el --- support for Greek -*- no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1995
4;; Licensed to the Free Software Foundation. 4;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021
5 6
6;; Keywords: multilingual, Greek 7;; Keywords: multilingual, Greek
7 8
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index 07407c8848d..fbb343d0c90 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -1,8 +1,9 @@
1;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995
5;; Copyright (C) 2001 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Keywords: multilingual, Hebrew 8;; Keywords: multilingual, Hebrew
8 9
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 4b9e08045db..91c7ecb5f28 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -1,6 +1,9 @@
1;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*- 1;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
4;; Copyright (C) 2002, 2003
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
4 7
5;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> 8;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
6;; Keywords: multilingual, i18n, Indian 9;; Keywords: multilingual, i18n, Indian
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index e9a80fc99a7..81a40a9c450 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -1,8 +1,9 @@
1;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*- 1;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1998, 2000, 2003
5;; Copyright (C) 2001 Free SOftware Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Keywords: mule, multilingual, Japanese 8;; Keywords: mule, multilingual, Japanese
8 9
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 84efe70e4bb..92020acc685 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -1,7 +1,9 @@
1;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Japanese 8;; Keywords: multilingual, Japanese
7 9
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el
index 222832022ac..de940f5317f 100644
--- a/lisp/language/korea-util.el
+++ b/lisp/language/korea-util.el
@@ -1,6 +1,9 @@
1;;; korea-util.el --- utilities for Korean 1;;; korea-util.el --- utilities for Korean
2 2
3;; Copyright (C) 1997 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1998, 1999
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
4 7
5;; Keywords: mule, multilingual, Korean 8;; Keywords: mule, multilingual, Korean
6 9
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index d03424ff093..6a7479cf151 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -1,7 +1,9 @@
1;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1998 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1998
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Korean 8;; Keywords: multilingual, Korean
7 9
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 8a0c89dc048..7ac1599c2cd 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -1,8 +1,9 @@
1;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*- 1;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997, 1998, 1999, 2000
5;; Copyright (C) 2001 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Keywords: multilingual, Lao 8;; Keywords: multilingual, Lao
8 9
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index b26a8f389ed..ab33dfa25e6 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -1,8 +1,9 @@
1;;; lao.el --- support for Lao -*- coding: iso-2022-7bit; no-byte-compile: t -*- 1;;; lao.el --- support for Lao -*- coding: iso-2022-7bit; no-byte-compile: t -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 2001 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997, 1998, 1999, 2002
5;; Copyright (C) 2001 Free Software Foundation, Inc. 5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
6 7
7;; Keywords: multilingual, Lao 8;; Keywords: multilingual, Lao
8 9
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 537267ce9ba..47993e16ea5 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -1,7 +1,8 @@
1;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*- 1;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1995, 1997
4;; Licensed to the Free Software Foundation. 4;; National Institute of Advanced Industrial Science and Technology (AIST)
5;; Registration Number H14PRO021
5 6
6;; Keywords: multilingual, character set, coding system 7;; Keywords: multilingual, character set, coding system
7 8
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index 3b9e6afbce7..0ab9413a483 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -1,7 +1,9 @@
1;;; tibet-util.el --- utilities for Tibetan -*- coding: iso-2022-7bit; -*- 1;;; tibet-util.el --- utilities for Tibetan -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Tibetan 8;; Keywords: multilingual, Tibetan
7 9
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index c9e67bd0b01..72267c96479 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -1,7 +1,9 @@
1;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*- 1;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1997, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1997, 1999, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Tibetan 8;; Keywords: multilingual, Tibetan
7 9
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index 5a92bf203a0..f492e504568 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -1,7 +1,9 @@
1;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*- 1;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1998 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: mule, multilingual, Vietnamese 8;; Keywords: mule, multilingual, Vietnamese
7 9
diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el
index 1c1e3bd6094..95302b64b67 100644
--- a/lisp/language/vietnamese.el
+++ b/lisp/language/vietnamese.el
@@ -1,7 +1,9 @@
1;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*- 1;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*-
2 2
3;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3;; Copyright (C) 1998, 2002 Free Software Foundation, Inc.
4;; Licensed to the Free Software Foundation. 4;; Copyright (C) 1995, 1997, 1998, 2000
5;; National Institute of Advanced Industrial Science and Technology (AIST)
6;; Registration Number H14PRO021
5 7
6;; Keywords: multilingual, Vietnamese 8;; Keywords: multilingual, Vietnamese
7 9
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index 6b769f53801..d9a9d78d0b9 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -153,6 +153,7 @@ a variable whose value is a citation frame."
153 (choice (repeat (repeat sexp)) 153 (choice (repeat (repeat sexp))
154 symbol))))) 154 symbol)))))
155 :group 'supercite-frames) 155 :group 'supercite-frames)
156(put 'sc-cite-frame-alist 'risky-local-variable t)
156 157
157(defcustom sc-uncite-frame-alist '() 158(defcustom sc-uncite-frame-alist '()
158 "*Alist for frame selection during unciting. 159 "*Alist for frame selection during unciting.
@@ -161,6 +162,7 @@ See the variable `sc-cite-frame-alist' for details."
161 (choice (repeat (repeat sexp)) 162 (choice (repeat (repeat sexp))
162 symbol))))) 163 symbol)))))
163 :group 'supercite-frames) 164 :group 'supercite-frames)
165(put 'sc-uncite-frame-alist 'risky-local-variable t)
164 166
165(defcustom sc-recite-frame-alist '() 167(defcustom sc-recite-frame-alist '()
166 "*Alist for frame selection during reciting. 168 "*Alist for frame selection during reciting.
@@ -169,6 +171,7 @@ See the variable `sc-cite-frame-alist' for details."
169 (choice (repeat (repeat sexp)) 171 (choice (repeat (repeat sexp))
170 symbol))))) 172 symbol)))))
171 :group 'supercite-frames) 173 :group 'supercite-frames)
174(put 'sc-recite-frame-alist 'risky-local-variable t)
172 175
173(defcustom sc-default-cite-frame 176(defcustom sc-default-cite-frame
174 '(;; initialize fill state and temporary variables when entering 177 '(;; initialize fill state and temporary variables when entering
@@ -214,6 +217,7 @@ See the variable `sc-cite-frame-alist' for details."
214 "*Default REGI frame for citing a region." 217 "*Default REGI frame for citing a region."
215 :type '(repeat (repeat sexp)) 218 :type '(repeat (repeat sexp))
216 :group 'supercite-frames) 219 :group 'supercite-frames)
220(put 'sc-default-cite-frame 'risky-local-variable t)
217 221
218(defcustom sc-default-uncite-frame 222(defcustom sc-default-uncite-frame
219 '(;; do nothing on a blank line 223 '(;; do nothing on a blank line
@@ -224,6 +228,7 @@ See the variable `sc-cite-frame-alist' for details."
224 "*Default REGI frame for unciting a region." 228 "*Default REGI frame for unciting a region."
225 :type '(repeat (repeat sexp)) 229 :type '(repeat (repeat sexp))
226 :group 'supercite-frames) 230 :group 'supercite-frames)
231(put 'sc-default-uncite-frame 'risky-local-variable t)
227 232
228(defcustom sc-default-recite-frame 233(defcustom sc-default-recite-frame
229 '(;; initialize fill state when entering frame 234 '(;; initialize fill state when entering frame
@@ -240,6 +245,7 @@ See the variable `sc-cite-frame-alist' for details."
240 "*Default REGI frame for reciting a region." 245 "*Default REGI frame for reciting a region."
241 :type '(repeat (repeat sexp)) 246 :type '(repeat (repeat sexp))
242 :group 'supercite-frames) 247 :group 'supercite-frames)
248(put 'sc-default-recite-frame 'risky-local-variable t)
243 249
244(defcustom sc-cite-region-limit t 250(defcustom sc-cite-region-limit t
245 "*This variable controls automatic citation of yanked text. 251 "*This variable controls automatic citation of yanked text.
@@ -427,6 +433,7 @@ to be consulted during attribution selection."
427 (choice (sexp :tag "List to eval") 433 (choice (sexp :tag "List to eval")
428 string))))) 434 string)))))
429 :group 'supercite-attr) 435 :group 'supercite-attr)
436(put 'sc-attrib-selection-list 'risky-local-variable t)
430 437
431(defcustom sc-attribs-preselect-hook nil 438(defcustom sc-attribs-preselect-hook nil
432 "*Hook to run before selecting an attribution." 439 "*Hook to run before selecting an attribution."
@@ -482,6 +489,7 @@ this list is chosen for automatic reference header insertions.
482Electric reference mode will cycle through this list of functions." 489Electric reference mode will cycle through this list of functions."
483 :type '(repeat sexp) 490 :type '(repeat sexp)
484 :group 'supercite) 491 :group 'supercite)
492(put 'sc-rewrite-header-list 'risky-local-variable t)
485 493
486(defcustom sc-titlecue-regexp "\\s +-+\\s +" 494(defcustom sc-titlecue-regexp "\\s +-+\\s +"
487 "*Regular expression describing the separator between names and titles. 495 "*Regular expression describing the separator between names and titles.
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index 4a54702643a..203d19ce14e 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -468,7 +468,8 @@ If your system's ping continues until interrupted, you can try setting
468 (require 'ffap) 468 (require 'ffap)
469 (read-from-minibuffer 469 (read-from-minibuffer
470 "Lookup host: " 470 "Lookup host: "
471 (or (ffap-string-at-point 'machine) ""))))) 471 (with-no-warnings
472 (or (ffap-string-at-point 'machine) ""))))))
472 (net-utils-run-program 473 (net-utils-run-program
473 "Dig" 474 "Dig"
474 (concat "** " 475 (concat "** "
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index bfdf7ed067a..c602a12aaa1 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1352,7 +1352,9 @@ autocorrect\" to the remote host."
1352 1352
1353;; Chunked sending kluge. We set this to 500 for black-listed constellations 1353;; Chunked sending kluge. We set this to 500 for black-listed constellations
1354;; known to have a bug in `process-send-string'; some ssh connections appear 1354;; known to have a bug in `process-send-string'; some ssh connections appear
1355;; to drop bytes when data is sent too quickly. 1355;; to drop bytes when data is sent too quickly. There is also a connection
1356;; buffer local variable, which is computed depending on remote host properties
1357;; when `tramp-chunksize' is zero or nil.
1356(defcustom tramp-chunksize 1358(defcustom tramp-chunksize
1357 (when (and (not (featurep 'xemacs)) 1359 (when (and (not (featurep 'xemacs))
1358 (memq system-type '(hpux))) 1360 (memq system-type '(hpux)))
@@ -3231,7 +3233,13 @@ This is like `dired-recursive-delete-directory' for tramp files."
3231 (mapconcat #'tramp-shell-quote-argument (cons program arguments) " ")) 3233 (mapconcat #'tramp-shell-quote-argument (cons program arguments) " "))
3232 (tramp-wait-for-output)) 3234 (tramp-wait-for-output))
3233 (unless discard 3235 (unless discard
3234 (insert-buffer (tramp-get-buffer multi-method method user host))) 3236 ;; We cannot use `insert-buffer' because the tramp buffer
3237 ;; changes its contents before insertion due to calling
3238 ;; `expand-file' and alike.
3239 (insert
3240 (with-current-buffer
3241 (tramp-get-buffer multi-method method user host)
3242 (buffer-string))))
3235 (save-excursion 3243 (save-excursion
3236 (prog1 3244 (prog1
3237 (tramp-send-command-and-check multi-method method user host nil) 3245 (tramp-send-command-and-check multi-method method user host nil)
@@ -3360,8 +3368,10 @@ This is like `dired-recursive-delete-directory' for tramp files."
3360 switches 3368 switches
3361 (if wildcard 3369 (if wildcard
3362 localname 3370 localname
3363 (tramp-shell-quote-argument 3371 (if (zerop (length (file-name-nondirectory localname)))
3364 (file-name-nondirectory localname)))))) 3372 ""
3373 (tramp-shell-quote-argument
3374 (file-name-nondirectory localname)))))))
3365 (sit-for 1) ;needed for rsh but not ssh? 3375 (sit-for 1) ;needed for rsh but not ssh?
3366 (tramp-wait-for-output)) 3376 (tramp-wait-for-output))
3367 ;; The following let-binding is used by code that's commented 3377 ;; The following let-binding is used by code that's commented
@@ -3369,8 +3379,13 @@ This is like `dired-recursive-delete-directory' for tramp files."
3369 ;; that the commented-out code is really not needed. Commenting-out 3379 ;; that the commented-out code is really not needed. Commenting-out
3370 ;; happened on 2003-03-13. 3380 ;; happened on 2003-03-13.
3371 (let ((old-pos (point))) 3381 (let ((old-pos (point)))
3372 (insert-buffer-substring 3382 ;; We cannot use `insert-buffer' because the tramp buffer
3373 (tramp-get-buffer multi-method method user host)) 3383 ;; changes its contents before insertion due to calling
3384 ;; `expand-file' and alike.
3385 (insert
3386 (with-current-buffer
3387 (tramp-get-buffer multi-method method user host)
3388 (buffer-string)))
3374 ;; On XEmacs, we want to call (exchange-point-and-mark t), but 3389 ;; On XEmacs, we want to call (exchange-point-and-mark t), but
3375 ;; that doesn't exist on Emacs, so we use this workaround instead. 3390 ;; that doesn't exist on Emacs, so we use this workaround instead.
3376 ;; Since zmacs-region-stays doesn't exist in Emacs, this ought to 3391 ;; Since zmacs-region-stays doesn't exist in Emacs, this ought to
@@ -3561,7 +3576,13 @@ This will break if COMMAND prints a newline, followed by the value of
3561 (unless asynchronous 3576 (unless asynchronous
3562 (tramp-wait-for-output))) 3577 (tramp-wait-for-output)))
3563 (unless asynchronous 3578 (unless asynchronous
3564 (insert-buffer (tramp-get-buffer multi-method method user host))) 3579 ;; We cannot use `insert-buffer' because the tramp buffer
3580 ;; changes its contents before insertion due to calling
3581 ;; `expand-file' and alike.
3582 (insert
3583 (with-current-buffer
3584 (tramp-get-buffer multi-method method user host)
3585 (buffer-string))))
3565 (when error-buffer 3586 (when error-buffer
3566 (save-excursion 3587 (save-excursion
3567 (unless (bufferp error-buffer) 3588 (unless (bufferp error-buffer)
@@ -3571,7 +3592,11 @@ This will break if COMMAND prints a newline, followed by the value of
3571 "cat /tmp/tramp.$$.err") 3592 "cat /tmp/tramp.$$.err")
3572 (tramp-wait-for-output) 3593 (tramp-wait-for-output)
3573 (set-buffer error-buffer) 3594 (set-buffer error-buffer)
3574 (insert-buffer (tramp-get-buffer multi-method method user host)) 3595 ;; Same comment as above
3596 (insert
3597 (with-current-buffer
3598 (tramp-get-buffer multi-method method user host)
3599 (buffer-string)))
3575 (tramp-send-command-and-check 3600 (tramp-send-command-and-check
3576 multi-method method user host "rm -f /tmp/tramp.$$.err"))) 3601 multi-method method user host "rm -f /tmp/tramp.$$.err")))
3577 (save-excursion 3602 (save-excursion
@@ -4834,6 +4859,9 @@ Function may have 0-3 parameters."
4834(defun tramp-set-auto-save () 4859(defun tramp-set-auto-save ()
4835 (when (and (buffer-file-name) 4860 (when (and (buffer-file-name)
4836 (tramp-tramp-file-p (buffer-file-name)) 4861 (tramp-tramp-file-p (buffer-file-name))
4862 ;; ange-ftp has its own auto-save mechanism
4863 (eq (tramp-find-foreign-file-name-handler (buffer-file-name))
4864 'tramp-sh-file-name-handler)
4837 auto-save-default) 4865 auto-save-default)
4838 (auto-save-mode 1))) 4866 (auto-save-mode 1)))
4839(add-hook 'find-file-hooks 'tramp-set-auto-save t) 4867(add-hook 'find-file-hooks 'tramp-set-auto-save t)
@@ -5417,7 +5445,7 @@ Maybe the different regular expressions need to be tuned.
5417 method)) 5445 method))
5418 (when multi-method 5446 (when multi-method
5419 (error "Cannot multi-connect using telnet connection method")) 5447 (error "Cannot multi-connect using telnet connection method"))
5420 (tramp-pre-connection multi-method method user host) 5448 (tramp-pre-connection multi-method method user host tramp-chunksize)
5421 (tramp-message 7 "Opening connection for %s@%s using %s..." 5449 (tramp-message 7 "Opening connection for %s@%s using %s..."
5422 (or user (user-login-name)) host method) 5450 (or user (user-login-name)) host method)
5423 (let ((process-environment (copy-sequence process-environment))) 5451 (let ((process-environment (copy-sequence process-environment)))
@@ -5475,7 +5503,7 @@ arguments, and xx will be used as the host name to connect to.
5475 (save-match-data 5503 (save-match-data
5476 (when multi-method 5504 (when multi-method
5477 (error "Cannot multi-connect using rsh connection method")) 5505 (error "Cannot multi-connect using rsh connection method"))
5478 (tramp-pre-connection multi-method method user host) 5506 (tramp-pre-connection multi-method method user host tramp-chunksize)
5479 (if (and user (not (string= user ""))) 5507 (if (and user (not (string= user "")))
5480 (tramp-message 7 "Opening connection for %s@%s using %s..." 5508 (tramp-message 7 "Opening connection for %s@%s using %s..."
5481 user host method) 5509 user host method)
@@ -5544,7 +5572,7 @@ prompt than you do, so it is not at all unlikely that the variable
5544 (error 5572 (error
5545 "Cannot connect to different host `%s' with `su' connection method" 5573 "Cannot connect to different host `%s' with `su' connection method"
5546 host)) 5574 host))
5547 (tramp-pre-connection multi-method method user host) 5575 (tramp-pre-connection multi-method method user host tramp-chunksize)
5548 (tramp-message 7 "Opening connection for `%s' using `%s'..." 5576 (tramp-message 7 "Opening connection for `%s' using `%s'..."
5549 (or user "<root>") method) 5577 (or user "<root>") method)
5550 (let ((process-environment (copy-sequence process-environment))) 5578 (let ((process-environment (copy-sequence process-environment)))
@@ -5609,7 +5637,7 @@ log in as u2 to h2."
5609 (unless (and (= (length method) (length user)) 5637 (unless (and (= (length method) (length user))
5610 (= (length method) (length host))) 5638 (= (length method) (length host)))
5611 (error "Arrays METHOD, USER, HOST must have equal length")) 5639 (error "Arrays METHOD, USER, HOST must have equal length"))
5612 (tramp-pre-connection multi-method method user host) 5640 (tramp-pre-connection multi-method method user host tramp-chunksize)
5613 (tramp-message 7 "Opening `%s' connection..." multi-method) 5641 (tramp-message 7 "Opening `%s' connection..." multi-method)
5614 (let ((process-environment (copy-sequence process-environment))) 5642 (let ((process-environment (copy-sequence process-environment)))
5615 (setenv "TERM" tramp-terminal-type) 5643 (setenv "TERM" tramp-terminal-type)
@@ -5810,7 +5838,7 @@ Uses PROMPT as a prompt and sends the password to process P."
5810;; HHH: Not Changed. This might handle the case where USER is not 5838;; HHH: Not Changed. This might handle the case where USER is not
5811;; given in the "File name" very poorly. Then, the local 5839;; given in the "File name" very poorly. Then, the local
5812;; variable tramp-current-user will be set to nil. 5840;; variable tramp-current-user will be set to nil.
5813(defun tramp-pre-connection (multi-method method user host) 5841(defun tramp-pre-connection (multi-method method user host chunksize)
5814 "Do some setup before actually logging in. 5842 "Do some setup before actually logging in.
5815METHOD, USER and HOST specify the connection." 5843METHOD, USER and HOST specify the connection."
5816 (set-buffer (tramp-get-buffer multi-method method user host)) 5844 (set-buffer (tramp-get-buffer multi-method method user host))
@@ -5818,6 +5846,7 @@ METHOD, USER and HOST specify the connection."
5818 (set (make-local-variable 'tramp-current-method) method) 5846 (set (make-local-variable 'tramp-current-method) method)
5819 (set (make-local-variable 'tramp-current-user) user) 5847 (set (make-local-variable 'tramp-current-user) user)
5820 (set (make-local-variable 'tramp-current-host) host) 5848 (set (make-local-variable 'tramp-current-host) host)
5849 (set (make-local-variable 'tramp-chunksize) chunksize)
5821 (set (make-local-variable 'inhibit-eol-conversion) nil) 5850 (set (make-local-variable 'inhibit-eol-conversion) nil)
5822 (erase-buffer)) 5851 (erase-buffer))
5823 5852
@@ -5869,6 +5898,20 @@ to set up. METHOD, USER and HOST specify the connection."
5869 (erase-buffer) 5898 (erase-buffer)
5870 (tramp-send-command-internal multi-method method user host 5899 (tramp-send-command-internal multi-method method user host
5871 "TERM=dumb; export TERM") 5900 "TERM=dumb; export TERM")
5901 (erase-buffer)
5902 ;; Check whether the remote host suffers from buggy `send-process-string'.
5903 ;; This is known for FreeBSD (see comment in `send_process', file process.c).
5904 ;; I've tested sending 624 bytes successfully, sending 625 bytes failed.
5905 ;; Emacs makes a hack when this host type is detected locally. It cannot
5906 ;; handle remote hosts, though.
5907 (when (or (not tramp-chunksize) (zerop tramp-chunksize))
5908 (tramp-message 9 "Checking remote host type for `send-process-string' bug")
5909 (tramp-send-command-internal multi-method method user host
5910 "(uname -sr) 2>/dev/null")
5911 (goto-char (point-min))
5912 (when (looking-at "FreeBSD")
5913 (setq tramp-chunksize 500)))
5914
5872 ;; Try to set up the coding system correctly. 5915 ;; Try to set up the coding system correctly.
5873 ;; CCC this can't be the right way to do it. Hm. 5916 ;; CCC this can't be the right way to do it. Hm.
5874 (save-excursion 5917 (save-excursion
@@ -6948,7 +6991,8 @@ as default."
6948 ;; Permissions should be set always, because there might be an old 6991 ;; Permissions should be set always, because there might be an old
6949 ;; auto-saved file belonging to another original file. This could 6992 ;; auto-saved file belonging to another original file. This could
6950 ;; be a security threat. 6993 ;; be a security threat.
6951 (set-file-modes buffer-auto-save-file-name (file-modes bfn))))) 6994 (set-file-modes buffer-auto-save-file-name
6995 (or (file-modes bfn) ?\600)))))
6952 6996
6953(unless (or (> emacs-major-version 21) 6997(unless (or (> emacs-major-version 21)
6954 (and (featurep 'xemacs) 6998 (and (featurep 'xemacs)
@@ -7226,7 +7270,6 @@ Only works for Bourne-like shells."
7226 tramp-yesno-prompt-regexp 7270 tramp-yesno-prompt-regexp
7227 tramp-yn-prompt-regexp 7271 tramp-yn-prompt-regexp
7228 tramp-terminal-prompt-regexp 7272 tramp-terminal-prompt-regexp
7229 tramp-out-of-band-prompt-regexp
7230 tramp-temp-name-prefix 7273 tramp-temp-name-prefix
7231 tramp-file-name-structure 7274 tramp-file-name-structure
7232 tramp-file-name-regexp 7275 tramp-file-name-regexp
@@ -7286,31 +7329,44 @@ report.
7286(defun tramp-append-tramp-buffers () 7329(defun tramp-append-tramp-buffers ()
7287 "Append Tramp buffers into the bug report." 7330 "Append Tramp buffers into the bug report."
7288 7331
7289 ;; We load mml.el from Gnus. 7332 ;; We load message.el and mml.el from Gnus.
7290 (if (featurep 'xemacs) 7333 (if (featurep 'xemacs)
7291 (load "mml" 'noerror) 7334 (progn
7335 (load "message" 'noerror)
7336 (load "mml" 'noerror))
7337 (require 'message nil 'noerror)
7292 (require 'mml nil 'noerror)) 7338 (require 'mml nil 'noerror))
7339 (when (functionp 'message-mode)
7340 (funcall 'message-mode))
7341 (when (functionp 'mml-mode)
7342 (funcall 'mml-mode t))
7293 7343
7294 (when (and 7344 (when (and
7295 ;; We don't want to add another dependency. 7345 (eq major-mode 'message-mode)
7296 (functionp 'mml-insert-empty-tag) 7346 (boundp 'mml-mode)
7297 ;; 2nd parameter since Emacs 22. 7347 (symbol-value 'mml-mode))
7298 (condition-case nil 7348
7299 (list-buffers-noselect nil nil) 7349 (let* ((tramp-buf-regexp "\\*\\(debug \\)?tramp/")
7300 (t nil))) 7350 (buffer-list
7301 (let ((buffer-list 7351 (delq nil
7302 (delq nil 7352 (mapcar '(lambda (b)
7303 (mapcar '(lambda (b) 7353 (when (string-match tramp-buf-regexp (buffer-name b)) b))
7304 (when (string-match "^\\*\\(debug \\)?tramp/" (buffer-name b)) b)) 7354 (buffer-list))))
7305 (buffer-list)))) 7355 (curbuf (current-buffer)))
7306 (curbuf (current-buffer)))
7307 7356
7308 ;; There is at least one Tramp buffer. 7357 ;; There is at least one Tramp buffer.
7309 (when buffer-list 7358 (when buffer-list
7310 (switch-to-buffer (list-buffers-noselect nil buffer-list)) 7359 (switch-to-buffer (list-buffers-noselect nil))
7311 (delete-other-windows) 7360 (delete-other-windows)
7312 (setq buffer-read-only nil) 7361 (setq buffer-read-only nil)
7313 (goto-char (point-max)) 7362 (goto-char (point-min))
7363 (while (not (eobp))
7364 (if (re-search-forward tramp-buf-regexp (tramp-point-at-eol) t)
7365 (forward-line 1)
7366 (forward-line 0)
7367 (let ((start (point)))
7368 (forward-line 1)
7369 (kill-region start (point)))))
7314 (insert " 7370 (insert "
7315The buffer(s) above will be appended to this message. If you don't want 7371The buffer(s) above will be appended to this message. If you don't want
7316to append a buffer because it contains sensible data, or because the buffer 7372to append a buffer because it contains sensible data, or because the buffer
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 12e56600f00..fac6e2aed65 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,7 +30,7 @@
30;; are auto-frobbed from configure.ac, so you should edit that file and run 30;; are auto-frobbed from configure.ac, so you should edit that file and run
31;; "autoconf && ./configure" to change them. 31;; "autoconf && ./configure" to change them.
32 32
33(defconst tramp-version "2.0.48" 33(defconst tramp-version "2.0.49"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index ea36064412f..0a4cb6c8cd6 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -335,7 +335,8 @@ This function does not do any hidden buffer changes."
335;; locking is in use. This variable is extended with the face in 335;; locking is in use. This variable is extended with the face in
336;; `c-doc-face-name' when fontification is activated in cc-fonts.el. 336;; `c-doc-face-name' when fontification is activated in cc-fonts.el.
337(defvar c-literal-faces 337(defvar c-literal-faces
338 '(font-lock-comment-face font-lock-string-face)) 338 '(font-lock-comment-face font-lock-string-face
339 font-lock-comment-delimiter-face))
339 340
340(defun c-shift-line-indentation (shift-amt) 341(defun c-shift-line-indentation (shift-amt)
341 ;; This function does not do any hidden buffer changes. 342 ;; This function does not do any hidden buffer changes.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index f5180b1fb48..d08766f5a35 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1247,8 +1247,7 @@ 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) "=>" ""))
1252 (setq next-error-overlay-arrow-position nil) 1251 (setq next-error-overlay-arrow-position nil)
1253 (add-hook 'kill-buffer-hook 1252 (add-hook 'kill-buffer-hook
1254 (lambda () (setq next-error-overlay-arrow-position nil)) nil t) 1253 (lambda () (setq next-error-overlay-arrow-position nil)) nil t)
@@ -1575,9 +1574,12 @@ region and the first line of the next region."
1575 (setcdr loc (list line file marker))) 1574 (setcdr loc (list line file marker)))
1576 loc)) 1575 loc))
1577 1576
1578(defcustom compilation-context-lines 0 1577(defcustom compilation-context-lines nil
1579 "*Display this many lines of leading context before message. 1578 "Display this many lines of leading context before the current message.
1580If nil, don't scroll the compilation output window." 1579If nil and the left fringe is displayed, don't scroll the
1580compilation output window; an arrow in the left fringe points to
1581the current message. If nil and there is no left fringe, the message
1582displays at the top of the window; there is no arrow."
1581 :type '(choice integer (const :tag "No window scrolling" nil)) 1583 :type '(choice integer (const :tag "No window scrolling" nil))
1582 :group 'compilation 1584 :group 'compilation
1583 :version "22.1") 1585 :version "22.1")
@@ -1586,10 +1588,16 @@ If nil, don't scroll the compilation output window."
1586 "Align the compilation output window W with marker MK near top." 1588 "Align the compilation output window W with marker MK near top."
1587 (if (integerp compilation-context-lines) 1589 (if (integerp compilation-context-lines)
1588 (set-window-start w (save-excursion 1590 (set-window-start w (save-excursion
1589 (goto-char mk) 1591 (goto-char mk)
1590 (beginning-of-line (- 1 compilation-context-lines)) 1592 (beginning-of-line
1591 (point)))) 1593 (- 1 compilation-context-lines))
1592 (set-window-point w mk)) 1594 (point)))
1595 (if (left-fringe-p)
1596 (set-window-start w (save-excursion
1597 (goto-char mk)
1598 (beginning-of-line 1)
1599 (point)))))
1600 (set-window-point w mk))
1593 1601
1594(defvar next-error-highlight-timer) 1602(defvar next-error-highlight-timer)
1595 1603
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 5c81ba7f6f9..4c95fc65d58 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -3215,7 +3215,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3215 (add-hook 'tooltip-hook 'gud-tooltip-tips) 3215 (add-hook 'tooltip-hook 'gud-tooltip-tips)
3216 (define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion)) 3216 (define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion))
3217 (unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide) 3217 (unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide)
3218 (remove-hook 'change-major-mode-hook 'tooltip-change-major-mode) 3218 (remove-hook 'change-major-mode-hook 'gud-tooltip-change-major-mode)
3219 (remove-hook 'tooltip-hook 'gud-tooltip-tips) 3219 (remove-hook 'tooltip-hook 'gud-tooltip-tips)
3220 (define-key global-map [mouse-movement] 'ignore))) 3220 (define-key global-map [mouse-movement] 'ignore)))
3221 (gud-tooltip-activate-mouse-motions-if-enabled) 3221 (gud-tooltip-activate-mouse-motions-if-enabled)
@@ -3253,7 +3253,7 @@ If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR."
3253 (when gud-tooltip-dereference 3253 (when gud-tooltip-dereference
3254 (setq expr (concat "*" expr))) 3254 (setq expr (concat "*" expr)))
3255 (case gud-minor-mode 3255 (case gud-minor-mode
3256 ((gdb gdba) (concat "server print " expr)) 3256 (gdba (concat "server print " expr))
3257 ((dbx gdbmi) (concat "print " expr)) 3257 ((dbx gdbmi) (concat "print " expr))
3258 (xdb (concat "p " expr)) 3258 (xdb (concat "p " expr))
3259 (sdb (concat expr "/")) 3259 (sdb (concat expr "/"))
@@ -3293,6 +3293,10 @@ This function must return nil if it doesn't handle EVENT."
3293 (tooltip-show (cdr define-elt)) 3293 (tooltip-show (cdr define-elt))
3294 expr)))) 3294 expr))))
3295 (let ((cmd (gud-tooltip-print-command expr))) 3295 (let ((cmd (gud-tooltip-print-command expr)))
3296 (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb))
3297 (gud-tooltip-mode -1)
3298 (message-box "Using GUD tooltips in this mode is unsafe\n\
3299so they have been disabled."))
3296 (unless (null cmd) ; CMD can be nil if unknown debugger 3300 (unless (null cmd) ; CMD can be nil if unknown debugger
3297 (if (memq gud-minor-mode '(gdba gdbmi)) 3301 (if (memq gud-minor-mode '(gdba gdbmi))
3298 (if gdb-macro-info 3302 (if gdb-macro-info
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index ae024e8111e..7a647f97775 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1015,7 +1015,7 @@ Anything else means: whenever we have a \"good guess\" as to the value."
1015 :group 'sh-indentation) 1015 :group 'sh-indentation)
1016 1016
1017(defcustom sh-popup-occur-buffer nil 1017(defcustom sh-popup-occur-buffer nil
1018 "*Controls when `sh-learn-buffer-indent' pops the *indent* buffer. 1018 "*Controls when `sh-learn-buffer-indent' pops the `*indent*' buffer.
1019If t it is always shown. If nil, it is shown only when there 1019If t it is always shown. If nil, it is shown only when there
1020are conflicts." 1020are conflicts."
1021 :type '(choice 1021 :type '(choice
@@ -1044,7 +1044,7 @@ Can be set to a number, or to nil which means leave it as is."
1044 1044
1045(defcustom sh-basic-offset 4 1045(defcustom sh-basic-offset 4
1046 "*The default indentation increment. 1046 "*The default indentation increment.
1047This value is used for the + and - symbols in an indentation variable." 1047This value is used for the `+' and `-' symbols in an indentation variable."
1048 :type 'integer 1048 :type 'integer
1049 :group 'sh-indentation) 1049 :group 'sh-indentation)
1050 1050
@@ -1088,7 +1088,7 @@ a number means align to that column, e.g. 0 means fist column."
1088 :menu-tag "/ Indent left half sh-basic-offset"))) 1088 :menu-tag "/ Indent left half sh-basic-offset")))
1089 1089
1090(defcustom sh-indent-for-else 0 1090(defcustom sh-indent-for-else 0
1091 "*How much to indent an else relative to an if. Usually 0." 1091 "*How much to indent an `else' relative to its `if'. Usually 0."
1092 :type `(choice 1092 :type `(choice
1093 (integer :menu-tag "A number (positive=>indent right)" 1093 (integer :menu-tag "A number (positive=>indent right)"
1094 :tag "A number") 1094 :tag "A number")
@@ -1104,75 +1104,75 @@ a number means align to that column, e.g. 0 means fist column."
1104 sh-symbol-list)) 1104 sh-symbol-list))
1105 1105
1106(defcustom sh-indent-for-fi 0 1106(defcustom sh-indent-for-fi 0
1107 "*How much to indent a fi relative to an if. Usually 0." 1107 "*How much to indent a `fi' relative to its `if'. Usually 0."
1108 :type `(choice ,@ sh-number-or-symbol-list ) 1108 :type `(choice ,@ sh-number-or-symbol-list )
1109 :group 'sh-indentation) 1109 :group 'sh-indentation)
1110 1110
1111(defcustom sh-indent-for-done '0 1111(defcustom sh-indent-for-done 0
1112 "*How much to indent a done relative to its matching stmt. Usually 0." 1112 "*How much to indent a `done' relative to its matching stmt. Usually 0."
1113 :type `(choice ,@ sh-number-or-symbol-list ) 1113 :type `(choice ,@ sh-number-or-symbol-list )
1114 :group 'sh-indentation) 1114 :group 'sh-indentation)
1115 1115
1116(defcustom sh-indent-after-else '+ 1116(defcustom sh-indent-after-else '+
1117 "*How much to indent a statement after an else statement." 1117 "*How much to indent a statement after an `else' statement."
1118 :type `(choice ,@ sh-number-or-symbol-list ) 1118 :type `(choice ,@ sh-number-or-symbol-list )
1119 :group 'sh-indentation) 1119 :group 'sh-indentation)
1120 1120
1121(defcustom sh-indent-after-if '+ 1121(defcustom sh-indent-after-if '+
1122 "*How much to indent a statement after an if statement. 1122 "*How much to indent a statement after an `if' statement.
1123This includes lines after else and elif statements, too, but 1123This includes lines after `else' and `elif' statements, too, but
1124does not affect then else elif or fi statements themselves." 1124does not affect the `else', `elif' or `fi' statements themselves."
1125 :type `(choice ,@ sh-number-or-symbol-list ) 1125 :type `(choice ,@ sh-number-or-symbol-list )
1126 :group 'sh-indentation) 1126 :group 'sh-indentation)
1127 1127
1128(defcustom sh-indent-for-then 0 1128(defcustom sh-indent-for-then 0
1129 "*How much to indent a then relative to an if." 1129 "*How much to indent a `then' relative to its `if'."
1130 :type `(choice ,@ sh-number-or-symbol-list ) 1130 :type `(choice ,@ sh-number-or-symbol-list )
1131 :group 'sh-indentation) 1131 :group 'sh-indentation)
1132 1132
1133(defcustom sh-indent-for-do 0 1133(defcustom sh-indent-for-do 0
1134 "*How much to indent a do statement. 1134 "*How much to indent a `do' statement.
1135This is relative to the statement before the do, i.e. the 1135This is relative to the statement before the `do', typically a
1136while until or for statement." 1136`while', `until', `for', `repeat' or `select' statement."
1137 :type `(choice ,@ sh-number-or-symbol-list) 1137 :type `(choice ,@ sh-number-or-symbol-list)
1138 :group 'sh-indentation) 1138 :group 'sh-indentation)
1139 1139
1140(defcustom sh-indent-after-do '* 1140(defcustom sh-indent-after-do '+
1141 "*How much to indent a line after a do statement. 1141 "*How much to indent a line after a `do' statement.
1142This is used when the do is the first word of the line. 1142This is used when the `do' is the first word of the line.
1143This is relative to the statement before the do, e.g. a 1143This is relative to the statement before the `do', typically a
1144while for repeat or select statement." 1144`while', `until', `for', `repeat' or `select' statement."
1145 :type `(choice ,@ sh-number-or-symbol-list) 1145 :type `(choice ,@ sh-number-or-symbol-list)
1146 :group 'sh-indentation) 1146 :group 'sh-indentation)
1147 1147
1148(defcustom sh-indent-after-loop-construct '+ 1148(defcustom sh-indent-after-loop-construct '+
1149 "*How much to indent a statement after a loop construct. 1149 "*How much to indent a statement after a loop construct.
1150 1150
1151This variable is used when the keyword \"do\" is on the same line as the 1151This variable is used when the keyword `do' is on the same line as the
1152loop statement (e.g. \"until\", \"while\" or \"for\"). 1152loop statement (e.g., `until', `while' or `for').
1153If the do is on a line by itself, then `sh-indent-after-do' is used instead." 1153If the `do' is on a line by itself, then `sh-indent-after-do' is used instead."
1154 :type `(choice ,@ sh-number-or-symbol-list) 1154 :type `(choice ,@ sh-number-or-symbol-list)
1155 :group 'sh-indentation) 1155 :group 'sh-indentation)
1156 1156
1157 1157
1158(defcustom sh-indent-after-done 0 1158(defcustom sh-indent-after-done 0
1159 "*How much to indent a statement after a \"done\" keyword. 1159 "*How much to indent a statement after a `done' keyword.
1160Normally this is 0, which aligns the \"done\" to the matching 1160Normally this is 0, which aligns the `done' to the matching
1161looping construct line. 1161looping construct line.
1162Setting it non-zero allows you to have the \"do\" statement on a line 1162Setting it non-zero allows you to have the `do' statement on a line
1163by itself and align the done under to do." 1163by itself and align the done under to do."
1164 :type `(choice ,@ sh-number-or-symbol-list) 1164 :type `(choice ,@ sh-number-or-symbol-list)
1165 :group 'sh-indentation) 1165 :group 'sh-indentation)
1166 1166
1167(defcustom sh-indent-for-case-label '+ 1167(defcustom sh-indent-for-case-label '+
1168 "*How much to indent a case label statement. 1168 "*How much to indent a case label statement.
1169This is relative to the line containing the case statement." 1169This is relative to the line containing the `case' statement."
1170 :type `(choice ,@ sh-number-or-symbol-list) 1170 :type `(choice ,@ sh-number-or-symbol-list)
1171 :group 'sh-indentation) 1171 :group 'sh-indentation)
1172 1172
1173(defcustom sh-indent-for-case-alt '++ 1173(defcustom sh-indent-for-case-alt '++
1174 "*How much to indent statements after the case label. 1174 "*How much to indent statements after the case label.
1175This is relative to the line containing the case statement." 1175This is relative to the line containing the `case' statement."
1176 :type `(choice ,@ sh-number-or-symbol-list) 1176 :type `(choice ,@ sh-number-or-symbol-list)
1177 :group 'sh-indentation) 1177 :group 'sh-indentation)
1178 1178
@@ -1184,7 +1184,7 @@ This is relative to the line containing the case statement."
1184 1184
1185(defcustom sh-indent-after-open '+ 1185(defcustom sh-indent-after-open '+
1186 "*How much to indent after a line with an opening parenthesis or brace. 1186 "*How much to indent after a line with an opening parenthesis or brace.
1187For an open paren after a function `sh-indent-after-function' is used." 1187For an open paren after a function, `sh-indent-after-function' is used."
1188 :type `(choice ,@ sh-number-or-symbol-list) 1188 :type `(choice ,@ sh-number-or-symbol-list)
1189 :group 'sh-indentation) 1189 :group 'sh-indentation)
1190 1190
@@ -1196,13 +1196,13 @@ For an open paren after a function `sh-indent-after-function' is used."
1196;; These 2 are for the rc shell: 1196;; These 2 are for the rc shell:
1197 1197
1198(defcustom sh-indent-after-switch '+ 1198(defcustom sh-indent-after-switch '+
1199 "*How much to indent a case statement relative to the switch statement. 1199 "*How much to indent a `case' statement relative to the `switch' statement.
1200This is for the rc shell." 1200This is for the rc shell."
1201 :type `(choice ,@ sh-number-or-symbol-list) 1201 :type `(choice ,@ sh-number-or-symbol-list)
1202 :group 'sh-indentation) 1202 :group 'sh-indentation)
1203 1203
1204(defcustom sh-indent-after-case '+ 1204(defcustom sh-indent-after-case '+
1205 "*How much to indent a statement relative to the case statement. 1205 "*How much to indent a statement relative to the `case' statement.
1206This is for the rc shell." 1206This is for the rc shell."
1207 :type `(choice ,@ sh-number-or-symbol-list) 1207 :type `(choice ,@ sh-number-or-symbol-list)
1208 :group 'sh-indentation) 1208 :group 'sh-indentation)
diff --git a/lisp/subr.el b/lisp/subr.el
index 50fa2ea2ddd..d3b6cfe9f76 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -983,7 +983,8 @@ It can also be nil, if the definition is not associated with any file.
983 983
984If TYPE is nil, then any kind of definition is acceptable. 984If TYPE is nil, then any kind of definition is acceptable.
985If TYPE is `defun' or `defvar', that specifies function 985If TYPE is `defun' or `defvar', that specifies function
986definition only or variable definition only." 986definition only or variable definition only.
987`defface' specifies a face definition only."
987 (if (and (or (null type) (eq type 'defun)) 988 (if (and (or (null type) (eq type 'defun))
988 (symbolp symbol) (fboundp symbol) 989 (symbolp symbol) (fboundp symbol)
989 (eq 'autoload (car-safe (symbol-function symbol)))) 990 (eq 'autoload (car-safe (symbol-function symbol))))
@@ -1040,12 +1041,10 @@ This makes or adds to an entry on `after-load-alist'.
1040FILE should be the name of a library, with no directory name." 1041FILE should be the name of a library, with no directory name."
1041 (eval-after-load file (read))) 1042 (eval-after-load file (read)))
1042 1043
1043;;; make-network-process wrappers 1044;;; open-network-stream is a wrapper around make-network-process.
1044 1045
1045(if (featurep 'make-network-process) 1046(when (featurep 'make-network-process)
1046 (progn 1047 (defun open-network-stream (name buffer host service)
1047
1048(defun open-network-stream (name buffer host service)
1049 "Open a TCP connection for a service to a host. 1048 "Open a TCP connection for a service to a host.
1050Returns a subprocess-object to represent the connection. 1049Returns a subprocess-object to represent the connection.
1051Input and output work as for subprocesses; `delete-process' closes it. 1050Input and output work as for subprocesses; `delete-process' closes it.
@@ -1061,56 +1060,7 @@ HOST is name of the host to connect to, or its IP address.
1061SERVICE is name of the service desired, or an integer specifying 1060SERVICE is name of the service desired, or an integer specifying
1062 a port number to connect to." 1061 a port number to connect to."
1063 (make-network-process :name name :buffer buffer 1062 (make-network-process :name name :buffer buffer
1064 :host host :service service)) 1063 :host host :service service)))
1065
1066(defun open-network-stream-nowait (name buffer host service &optional sentinel filter)
1067 "Initiate connection to a TCP connection for a service to a host.
1068It returns nil if non-blocking connects are not supported; otherwise,
1069it returns a subprocess-object to represent the connection.
1070
1071This function is similar to `open-network-stream', except that it
1072returns before the connection is established. When the connection
1073is completed, the sentinel function will be called with second arg
1074matching `open' (if successful) or `failed' (on error).
1075
1076Args are NAME BUFFER HOST SERVICE SENTINEL FILTER.
1077NAME, BUFFER, HOST, and SERVICE are as for `open-network-stream'.
1078Optional args SENTINEL and FILTER specify the sentinel and filter
1079functions to be used for this network stream."
1080 (if (featurep 'make-network-process '(:nowait t))
1081 (make-network-process :name name :buffer buffer :nowait t
1082 :host host :service service
1083 :filter filter :sentinel sentinel)))
1084
1085(defun open-network-stream-server (name buffer service &optional sentinel filter)
1086 "Create a network server process for a TCP service.
1087It returns nil if server processes are not supported; otherwise,
1088it returns a subprocess-object to represent the server.
1089
1090When a client connects to the specified service, a new subprocess
1091is created to handle the new connection, and the sentinel function
1092is called for the new process.
1093
1094Args are NAME BUFFER SERVICE SENTINEL FILTER.
1095NAME is name for the server process. Client processes are named by
1096 appending the ip-address and port number of the client to NAME.
1097BUFFER is the buffer (or buffer name) to associate with the server
1098 process. Client processes will not get a buffer if a process filter
1099 is specified or BUFFER is nil; otherwise, a new buffer is created for
1100 the client process. The name is similar to the process name.
1101Third arg SERVICE is name of the service desired, or an integer
1102 specifying a port number to connect to. It may also be t to select
1103 an unused port number for the server.
1104Optional args SENTINEL and FILTER specify the sentinel and filter
1105 functions to be used for the client processes; the server process
1106 does not use these function."
1107 (if (featurep 'make-network-process '(:server t))
1108 (make-network-process :name name :buffer buffer
1109 :service service :server t :noquery t
1110 :sentinel sentinel :filter filter)))
1111
1112)) ;; (featurep 'make-network-process)
1113
1114 1064
1115;; compatibility 1065;; compatibility
1116 1066
@@ -2356,6 +2306,9 @@ configuration."
2356 (and (consp object) 2306 (and (consp object)
2357 (eq (car object) 'frame-configuration))) 2307 (eq (car object) 'frame-configuration)))
2358 2308
2309(defsubst left-fringe-p ()
2310 (equal (car (window-fringes)) 0))
2311
2359(defun functionp (object) 2312(defun functionp (object)
2360 "Non-nil if OBJECT is any kind of function or a special form. 2313 "Non-nil if OBJECT is any kind of function or a special form.
2361Also non-nil if OBJECT is a symbol and its function definition is 2314Also non-nil if OBJECT is a symbol and its function definition is
@@ -2374,7 +2327,7 @@ macros."
2374 "Delete from ALIST all elements whose car is `eq' to KEY. 2327 "Delete from ALIST all elements whose car is `eq' to KEY.
2375Return the modified alist. 2328Return the modified alist.
2376Elements of ALIST that are not conses are ignored." 2329Elements of ALIST that are not conses are ignored."
2377 (while (and (consp (car alist)) 2330 (while (and (consp (car alist))
2378 (eq (car (car alist)) key)) 2331 (eq (car (car alist)) key))
2379 (setq alist (cdr alist))) 2332 (setq alist (cdr alist)))
2380 (let ((tail alist) tail-cdr) 2333 (let ((tail alist) tail-cdr)
@@ -2389,7 +2342,7 @@ Elements of ALIST that are not conses are ignored."
2389 "Delete from ALIST all elements whose cdr is `eq' to VALUE. 2342 "Delete from ALIST all elements whose cdr is `eq' to VALUE.
2390Return the modified alist. 2343Return the modified alist.
2391Elements of ALIST that are not conses are ignored." 2344Elements of ALIST that are not conses are ignored."
2392 (while (and (consp (car alist)) 2345 (while (and (consp (car alist))
2393 (eq (cdr (car alist)) value)) 2346 (eq (cdr (car alist)) value))
2394 (setq alist (cdr alist))) 2347 (setq alist (cdr alist)))
2395 (let ((tail alist) tail-cdr) 2348 (let ((tail alist) tail-cdr)
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 99931867792..3e0a8e95701 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -395,7 +395,7 @@ element of keymap, an `x-popup-menu' argument, or an element of
395`x-popup-menu' argument (when IN-X-MENU is not-nil). 395`x-popup-menu' argument (when IN-X-MENU is not-nil).
396This function adds the element only if it is not already present. 396This function adds the element only if it is not already present.
397It uses the free variable `tmm-table-undef' to keep undefined keys." 397It uses the free variable `tmm-table-undef' to keep undefined keys."
398 (let (km str cache plist filter visible (event (car elt))) 398 (let (km str cache plist filter visible enable (event (car elt)))
399 (setq elt (cdr elt)) 399 (setq elt (cdr elt))
400 (if (eq elt 'undefined) 400 (if (eq elt 'undefined)
401 (setq tmm-table-undef (cons (cons event nil) tmm-table-undef)) 401 (setq tmm-table-undef (cons (cons event nil) tmm-table-undef))
@@ -436,6 +436,9 @@ It uses the free variable `tmm-table-undef' to keep undefined keys."
436 (setq visible (plist-get plist :visible)) 436 (setq visible (plist-get plist :visible))
437 (if visible 437 (if visible
438 (setq km (and (eval visible) km))) 438 (setq km (and (eval visible) km)))
439 (setq enable (plist-get plist :enable))
440 (if enable
441 (setq km (and (eval enable) km)))
439 (and str 442 (and str
440 (consp (nth 3 elt)) 443 (consp (nth 3 elt))
441 (stringp (cdr (nth 3 elt))) ; keyseq cache 444 (stringp (cdr (nth 3 elt))) ; keyseq cache
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index d436eac5195..2563f22d36b 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,45 @@
12005-05-15 Kim F. Storm <storm@cua.dk>
2
3 * processes.texi (Network): Remove open-network-stream-nowait.
4 (Network Servers): Remove open-network-stream-server.
5
62005-05-15 Luc Teirlinck <teirllm@auburn.edu>
7
8 * elisp.texi (Top): Update detailed menu.
9
10 * variables.texi: Reorder nodes.
11 (Variables): Update menu.
12 (File Local Variables): Do not refer to the `-*-' line as
13 a "local variables list". Add pxref.
14
152005-05-14 Luc Teirlinck <teirllm@auburn.edu>
16
17 * elisp.texi (Top): Update detailed menu for node changes.
18
19 * modes.texi (Modes): Update Menu.
20 (Hooks): Move to beginning of chapter.
21 Most minor modes run mode hooks too.
22 `add-hook' can handle void hooks or hooks whose value is a single
23 function.
24 (Major Modes): Update Menu.
25 (Major Mode Basics): New node, split off from `Major Modes'.
26 (Major Mode Conventions): Correct xref. Explain how to handle
27 auto-mode-alist if the major mode command has an autoload cookie.
28 (Auto Major Mode): Major update. Add magic-mode-alist.
29 (Derived Modes): Major update.
30 (Mode Line Format): Update Menu.
31 (Mode Line Basics): New node, split off from `Mode Line Format'.
32
33 * loading.texi (Autoload): Mention `autoload cookie' as synonym
34 for `magic autoload comment'. Add index entries and anchor.
35
362005-05-14 Richard M. Stallman <rms@gnu.org>
37
38 * tips.texi (Coding Conventions): Explain how important it is
39 that just loading certain files not change Emacs behavior.
40
41 * modes.texi (Defining Minor Modes): Define define-global-minor-mode.
42
12005-05-12 Lute Kamstra <lute@gnu.org> 432005-05-12 Lute Kamstra <lute@gnu.org>
2 44
3 * modes.texi (Generic Modes): Update. 45 * modes.texi (Generic Modes): Update.
diff --git a/lispref/elisp.texi b/lispref/elisp.texi
index 061d826e711..7a19f8a47da 100644
--- a/lispref/elisp.texi
+++ b/lispref/elisp.texi
@@ -383,8 +383,8 @@ Variables
383* Buffer-Local Variables:: Variable values in effect only in one buffer. 383* Buffer-Local Variables:: Variable values in effect only in one buffer.
384* Frame-Local Variables:: Variable values in effect only in one frame. 384* Frame-Local Variables:: Variable values in effect only in one frame.
385* Future Local Variables:: New kinds of local values we might add some day. 385* Future Local Variables:: New kinds of local values we might add some day.
386* Variable Aliases:: Variables that are aliases for other variables.
387* File Local Variables:: Handling local variable lists in files. 386* File Local Variables:: Handling local variable lists in files.
387* Variable Aliases:: Variables that are aliases for other variables.
388* Variables with Restricted Values:: Non-constant variables whose value can 388* Variables with Restricted Values:: Non-constant variables whose value can
389 @emph{not} be an arbitrary Lisp object. 389 @emph{not} be an arbitrary Lisp object.
390 390
@@ -617,6 +617,8 @@ Keymaps
617 617
618Major and Minor Modes 618Major and Minor Modes
619 619
620* Hooks:: How to use hooks; how to write code that
621 provides hooks.
620* Major Modes:: Defining major modes. 622* Major Modes:: Defining major modes.
621* Minor Modes:: Defining minor modes. 623* Minor Modes:: Defining minor modes.
622* Mode Line Format:: Customizing the text that appears in the mode line. 624* Mode Line Format:: Customizing the text that appears in the mode line.
@@ -625,11 +627,10 @@ Major and Minor Modes
625* Font Lock Mode:: How modes can highlight text according to syntax. 627* Font Lock Mode:: How modes can highlight text according to syntax.
626* Desktop Save Mode:: How modes can have buffer state saved between 628* Desktop Save Mode:: How modes can have buffer state saved between
627 Emacs sessions. 629 Emacs sessions.
628* Hooks:: How to use hooks; how to write code that
629 provides hooks.
630 630
631Major Modes 631Major Modes
632 632
633* Major Mode Basics::
633* Major Mode Conventions:: Coding conventions for keymaps, etc. 634* Major Mode Conventions:: Coding conventions for keymaps, etc.
634* Example Major Modes:: Text mode and Lisp modes. 635* Example Major Modes:: Text mode and Lisp modes.
635* Auto Major Mode:: How Emacs chooses the major mode automatically. 636* Auto Major Mode:: How Emacs chooses the major mode automatically.
@@ -648,6 +649,7 @@ Minor Modes
648 649
649Mode Line Format 650Mode Line Format
650 651
652* Mode Line Basics::
651* Mode Line Data:: The data structure that controls the mode line. 653* Mode Line Data:: The data structure that controls the mode line.
652* Mode Line Variables:: Variables used in that data structure. 654* Mode Line Variables:: Variables used in that data structure.
653* %-Constructs:: Putting information into a mode line. 655* %-Constructs:: Putting information into a mode line.
diff --git a/lispref/loading.texi b/lispref/loading.texi
index e12826af2f8..4049877e782 100644
--- a/lispref/loading.texi
+++ b/lispref/loading.texi
@@ -436,8 +436,12 @@ define function @var{function-name}"}.
436 436
437@findex update-file-autoloads 437@findex update-file-autoloads
438@findex update-directory-autoloads 438@findex update-directory-autoloads
439 A magic autoload comment consists of @samp{;;;###autoload}, on a line 439@cindex magic autoload comment
440by itself, just before the real definition of the function in its 440@cindex autoload cookie
441@anchor{autoload cookie}
442 A magic autoload comment (often called an @dfn{autoload cookie})
443consists of @samp{;;;###autoload}, on a line by itself,
444just before the real definition of the function in its
441autoloadable source file. The command @kbd{M-x update-file-autoloads} 445autoloadable source file. The command @kbd{M-x update-file-autoloads}
442writes a corresponding @code{autoload} call into @file{loaddefs.el}. 446writes a corresponding @code{autoload} call into @file{loaddefs.el}.
443Building Emacs loads @file{loaddefs.el} and thus calls @code{autoload}. 447Building Emacs loads @file{loaddefs.el} and thus calls @code{autoload}.
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 4e6085566c4..9af56fd9d37 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -20,6 +20,7 @@ user. For related topics such as keymaps and syntax tables, see
20@ref{Keymaps}, and @ref{Syntax Tables}. 20@ref{Keymaps}, and @ref{Syntax Tables}.
21 21
22@menu 22@menu
23* Hooks:: How to use hooks; how to write code that provides hooks.
23* Major Modes:: Defining major modes. 24* Major Modes:: Defining major modes.
24* Minor Modes:: Defining minor modes. 25* Minor Modes:: Defining minor modes.
25* Mode Line Format:: Customizing the text that appears in the mode line. 26* Mode Line Format:: Customizing the text that appears in the mode line.
@@ -28,13 +29,153 @@ user. For related topics such as keymaps and syntax tables, see
28* Font Lock Mode:: How modes can highlight text according to syntax. 29* Font Lock Mode:: How modes can highlight text according to syntax.
29* Desktop Save Mode:: How modes can have buffer state saved between 30* Desktop Save Mode:: How modes can have buffer state saved between
30 Emacs sessions. 31 Emacs sessions.
31* Hooks:: How to use hooks; how to write code that provides hooks.
32@end menu 32@end menu
33 33
34@node Hooks
35@section Hooks
36@cindex hooks
37
38 A @dfn{hook} is a variable where you can store a function or functions
39to be called on a particular occasion by an existing program. Emacs
40provides hooks for the sake of customization. Most often, hooks are set
41up in the init file (@pxref{Init File}), but Lisp programs can set them also.
42@xref{Standard Hooks}, for a list of standard hook variables.
43
44@cindex normal hook
45 Most of the hooks in Emacs are @dfn{normal hooks}. These variables
46contain lists of functions to be called with no arguments. When the
47hook name ends in @samp{-hook}, that tells you it is normal. We try to
48make all hooks normal, as much as possible, so that you can use them in
49a uniform way.
50
51 Every major mode function is supposed to run a normal hook called the
52@dfn{mode hook} as the last step of initialization. This makes it easy
53for a user to customize the behavior of the mode, by overriding the
54buffer-local variable assignments already made by the mode. Most
55minor modes also run a mode hook at their end. But hooks are used in
56other contexts too. For example, the hook @code{suspend-hook} runs
57just before Emacs suspends itself (@pxref{Suspending Emacs}).
58
59 The recommended way to add a hook function to a normal hook is by
60calling @code{add-hook} (see below). The hook functions may be any of
61the valid kinds of functions that @code{funcall} accepts (@pxref{What
62Is a Function}). Most normal hook variables are initially void;
63@code{add-hook} knows how to deal with this. You can add hooks either
64globally or buffer-locally with @code{add-hook}.
65
66@cindex abnormal hook
67 If the hook variable's name does not end with @samp{-hook}, that
68indicates it is probably an @dfn{abnormal hook}. Then you should look at its
69documentation to see how to use the hook properly.
70
71 If the variable's name ends in @samp{-functions} or @samp{-hooks},
72then the value is a list of functions, but it is abnormal in that either
73these functions are called with arguments or their values are used in
74some way. You can use @code{add-hook} to add a function to the list,
75but you must take care in writing the function. (A few of these
76variables, notably those ending in @samp{-hooks}, are actually
77normal hooks which were named before we established the convention of
78using @samp{-hook} for them.)
79
80 If the variable's name ends in @samp{-function}, then its value
81is just a single function, not a list of functions.
82
83 Here's an example that uses a mode hook to turn on Auto Fill mode when
84in Lisp Interaction mode:
85
86@example
87(add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill)
88@end example
89
90 At the appropriate time, Emacs uses the @code{run-hooks} function to
91run particular hooks. This function calls the hook functions that have
92been added with @code{add-hook}.
93
94@defun run-hooks &rest hookvars
95This function takes one or more normal hook variable names as
96arguments, and runs each hook in turn. Each argument should be a
97symbol that is a normal hook variable. These arguments are processed
98in the order specified.
99
100If a hook variable has a non-@code{nil} value, that value may be a
101function or a list of functions. (The former option is considered
102obsolete.) If the value is a function (either a lambda expression or
103a symbol with a function definition), it is called. If it is a list
104that isn't a function, its elements are called, consecutively. All
105the hook functions are called with no arguments.
106@end defun
107
108@defun run-hook-with-args hook &rest args
109This function is the way to run an abnormal hook and always call all
110of the hook functions. It calls each of the hook functions one by
111one, passing each of them the arguments @var{args}.
112@end defun
113
114@defun run-hook-with-args-until-failure hook &rest args
115This function is the way to run an abnormal hook until one of the hook
116functions fails. It calls each of the hook functions, passing each of
117them the arguments @var{args}, until some hook function returns
118@code{nil}. It then stops and returns @code{nil}. If none of the
119hook functions return @code{nil}, it returns a non-@code{nil} value.
120@end defun
121
122@defun run-hook-with-args-until-success hook &rest args
123This function is the way to run an abnormal hook until a hook function
124succeeds. It calls each of the hook functions, passing each of them
125the arguments @var{args}, until some hook function returns
126non-@code{nil}. Then it stops, and returns whatever was returned by
127the last hook function that was called. If all hook functions return
128@code{nil}, it returns @code{nil} as well.
129@end defun
130
131@defun add-hook hook function &optional append local
132This function is the handy way to add function @var{function} to hook
133variable @var{hook}. You can use it for abnormal hooks as well as for
134normal hooks. @var{function} can be any Lisp function that can accept
135the proper number of arguments for @var{hook}. For example,
136
137@example
138(add-hook 'text-mode-hook 'my-text-hook-function)
139@end example
140
141@noindent
142adds @code{my-text-hook-function} to the hook called @code{text-mode-hook}.
143
144If @var{function} is already present in @var{hook} (comparing using
145@code{equal}), then @code{add-hook} does not add it a second time.
146
147It is best to design your hook functions so that the order in which they
148are executed does not matter. Any dependence on the order is ``asking
149for trouble''. However, the order is predictable: normally,
150@var{function} goes at the front of the hook list, so it will be
151executed first (barring another @code{add-hook} call). If the optional
152argument @var{append} is non-@code{nil}, the new hook function goes at
153the end of the hook list and will be executed last.
154
155@code{add-hook} can handle the cases where @var{hook} is void or its
156value is a single function; it sets or changes the value to a list of
157functions.
158
159If @var{local} is non-@code{nil}, that says to add @var{function} to
160the buffer-local hook list instead of to the global hook list. If
161needed, this makes the hook buffer-local and adds @code{t} to the
162buffer-local value. The latter acts as a flag to run the hook
163functions in the default value as well as in the local value.
164@end defun
165
166@defun remove-hook hook function &optional local
167This function removes @var{function} from the hook variable
168@var{hook}. It compares @var{function} with elements of @var{hook}
169using @code{equal}, so it works for both symbols and lambda
170expressions.
171
172If @var{local} is non-@code{nil}, that says to remove @var{function}
173from the buffer-local hook list instead of from the global hook list.
174@end defun
175
34@node Major Modes 176@node Major Modes
35@section Major Modes 177@section Major Modes
36@cindex major mode 178@cindex major mode
37@cindex Fundamental mode
38 179
39 Major modes specialize Emacs for editing particular kinds of text. 180 Major modes specialize Emacs for editing particular kinds of text.
40Each buffer has only one major mode at a time. For each major mode 181Each buffer has only one major mode at a time. For each major mode
@@ -44,6 +185,23 @@ buffer-local variable bindings and other data associated with the
44buffer, such as a local keymap. The effect lasts until you switch 185buffer, such as a local keymap. The effect lasts until you switch
45to another major mode in the same buffer. 186to another major mode in the same buffer.
46 187
188@menu
189* Major Mode Basics::
190* Major Mode Conventions:: Coding conventions for keymaps, etc.
191* Example Major Modes:: Text mode and Lisp modes.
192* Auto Major Mode:: How Emacs chooses the major mode automatically.
193* Mode Help:: Finding out how to use a mode.
194* Derived Modes:: Defining a new major mode based on another major
195 mode.
196* Generic Modes:: Defining a simple major mode that supports
197 comment syntax and Font Lock mode.
198* Mode Hooks:: Hooks run at the end of major mode functions.
199@end menu
200
201@node Major Mode Basics
202@subsection Major Mode Basics
203@cindex Fundamental mode
204
47 The least specialized major mode is called @dfn{Fundamental mode}. 205 The least specialized major mode is called @dfn{Fundamental mode}.
48This mode has no mode-specific definitions or variable settings, so each 206This mode has no mode-specific definitions or variable settings, so each
49Emacs command behaves in its default manner, and each option is in its 207Emacs command behaves in its default manner, and each option is in its
@@ -95,18 +253,6 @@ for several major modes, in files such as @file{text-mode.el},
95are written. Text mode is perhaps the simplest major mode aside from 253are written. Text mode is perhaps the simplest major mode aside from
96Fundamental mode. Rmail mode is a complicated and specialized mode. 254Fundamental mode. Rmail mode is a complicated and specialized mode.
97 255
98@menu
99* Major Mode Conventions:: Coding conventions for keymaps, etc.
100* Example Major Modes:: Text mode and Lisp modes.
101* Auto Major Mode:: How Emacs chooses the major mode automatically.
102* Mode Help:: Finding out how to use a mode.
103* Derived Modes:: Defining a new major mode based on another major
104 mode.
105* Generic Modes:: Defining a simple major mode that supports
106 comment syntax and Font Lock mode.
107* Mode Hooks:: Hooks run at the end of major mode functions.
108@end menu
109
110@node Major Mode Conventions 256@node Major Mode Conventions
111@subsection Major Mode Conventions 257@subsection Major Mode Conventions
112 258
@@ -240,7 +386,7 @@ related modes. If it has its own abbrev table, it should store this
240in a variable named @code{@var{modename}-mode-abbrev-table}. If the 386in a variable named @code{@var{modename}-mode-abbrev-table}. If the
241major mode command defines any abbrevs itself, it should pass @code{t} 387major mode command defines any abbrevs itself, it should pass @code{t}
242for the @var{system-flag} argument to @code{define-abbrev}. 388for the @var{system-flag} argument to @code{define-abbrev}.
243@xref{Abbrev Tables}. 389@xref{Defining Abbrevs}.
244 390
245@item 391@item
246The mode should specify how to do highlighting for Font Lock mode, by 392The mode should specify how to do highlighting for Font Lock mode, by
@@ -326,8 +472,11 @@ If you want to make the new mode the default for files with certain
326recognizable names, add an element to @code{auto-mode-alist} to select 472recognizable names, add an element to @code{auto-mode-alist} to select
327the mode for those file names. If you define the mode command to 473the mode for those file names. If you define the mode command to
328autoload, you should add this element in the same file that calls 474autoload, you should add this element in the same file that calls
329@code{autoload}. Otherwise, it is sufficient to add the element in the 475@code{autoload}. If you use an autoload cookie for the mode command,
330file that contains the mode definition. @xref{Auto Major Mode}. 476you can also use an autoload cookie for the form that adds the element
477(@pxref{autoload cookie}). If you do not autoload the mode command,
478it is sufficient to add the element in the file that contains the mode
479definition. @xref{Auto Major Mode}.
331 480
332@item 481@item
333In the comments that document the file, you should provide a sample 482In the comments that document the file, you should provide a sample
@@ -635,21 +784,28 @@ state of Emacs.)
635 784
636@deffn Command normal-mode &optional find-file 785@deffn Command normal-mode &optional find-file
637This function establishes the proper major mode and buffer-local variable 786This function establishes the proper major mode and buffer-local variable
638bindings for the current buffer. First it calls @code{set-auto-mode}, 787bindings for the current buffer. First it calls @code{set-auto-mode}
639then it runs @code{hack-local-variables} to parse, and bind or 788(see below), then it runs @code{hack-local-variables} to parse, and
640evaluate as appropriate, the file's local variables. 789bind or evaluate as appropriate, the file's local variables
790(@pxref{File Local Variables}).
641 791
642If the @var{find-file} argument to @code{normal-mode} is non-@code{nil}, 792If the @var{find-file} argument to @code{normal-mode} is non-@code{nil},
643@code{normal-mode} assumes that the @code{find-file} function is calling 793@code{normal-mode} assumes that the @code{find-file} function is calling
644it. In this case, it may process a local variables list at the end of 794it. In this case, it may process local variables in the @samp{-*-}
645the file and in the @samp{-*-} line. The variable 795line or at the end of the file. The variable
646@code{enable-local-variables} controls whether to do so. @xref{File 796@code{enable-local-variables} controls whether to do so. @xref{File
647variables, , Local Variables in Files, emacs, The GNU Emacs Manual}, for 797Variables, , Local Variables in Files, emacs, The GNU Emacs Manual},
648the syntax of the local variables section of a file. 798for the syntax of the local variables section of a file.
649 799
650If you run @code{normal-mode} interactively, the argument 800If you run @code{normal-mode} interactively, the argument
651@var{find-file} is normally @code{nil}. In this case, 801@var{find-file} is normally @code{nil}. In this case,
652@code{normal-mode} unconditionally processes any local variables list. 802@code{normal-mode} unconditionally processes any file local variables.
803
804If @code{normal-mode} processes the local variables list and this list
805specifies a major mode, that mode overrides any mode chosen by
806@code{set-auto-mode}. If neither @code{set-auto-mode} nor
807@code{hack-local-variables} specify a major mode, the buffer stays in
808the major mode determined by @code{default-major-mode} (see below).
653 809
654@cindex file mode specification error 810@cindex file mode specification error
655@code{normal-mode} uses @code{condition-case} around the call to the 811@code{normal-mode} uses @code{condition-case} around the call to the
@@ -657,16 +813,25 @@ major mode function, so errors are caught and reported as a @samp{File
657mode specification error}, followed by the original error message. 813mode specification error}, followed by the original error message.
658@end deffn 814@end deffn
659 815
660@defun set-auto-mode 816@defun set-auto-mode &optional keep-mode-if-same
661@cindex visited file mode 817@cindex visited file mode
662 This function selects the major mode that is appropriate for the 818 This function selects the major mode that is appropriate for the
663current buffer. It may base its decision on the value of the @w{@samp{-*-}} 819current buffer. It bases its decision (in order of precedence) on
664line, on the visited file name (using @code{auto-mode-alist}), on the 820the @w{@samp{-*-}} line, on the @w{@samp{#!}} line (using
665@w{@samp{#!}} line (using @code{interpreter-mode-alist}), or on the 821@code{interpreter-mode-alist}), on the text at the beginning of the
666file's local variables list. However, this function does not look for 822buffer (using @code{magic-mode-alist}), and finally on the visited
667the @samp{mode:} local variable near the end of a file; the 823file name (using @code{auto-mode-alist}). @xref{Choosing Modes, , How
668@code{hack-local-variables} function does that. @xref{Choosing Modes, , 824Major Modes are Chosen, emacs, The GNU Emacs Manual}. However, this
669How Major Modes are Chosen, emacs, The GNU Emacs Manual}. 825function does not look for the @samp{mode:} local variable near the
826end of a file; the @code{hack-local-variables} function does that.
827If @code{enable-local-variables} is @code{nil}, @code{set-auto-mode}
828does not check the @w{@samp{-*-}} line for a mode tag either.
829
830If @var{keep-mode-if-same} is non-@code{nil}, this function does not
831call the mode command if the buffer is already in the proper major
832mode. For instance, @code{set-visited-file-name} sets this to
833@code{t} to avoid killing buffer local variables that the user may
834have set.
670@end defun 835@end defun
671 836
672@defopt default-major-mode 837@defopt default-major-mode
@@ -674,8 +839,8 @@ This variable holds the default major mode for new buffers. The
674standard value is @code{fundamental-mode}. 839standard value is @code{fundamental-mode}.
675 840
676If the value of @code{default-major-mode} is @code{nil}, Emacs uses 841If the value of @code{default-major-mode} is @code{nil}, Emacs uses
677the (previously) current buffer's major mode for the major mode of a new 842the (previously) current buffer's major mode as the default major mode
678buffer. However, if that major mode symbol has a @code{mode-class} 843of a new buffer. However, if that major mode symbol has a @code{mode-class}
679property with value @code{special}, then it is not used for new buffers; 844property with value @code{special}, then it is not used for new buffers;
680Fundamental mode is used instead. The modes that have this property are 845Fundamental mode is used instead. The modes that have this property are
681those such as Dired and Rmail that are useful only with text that has 846those such as Dired and Rmail that are useful only with text that has
@@ -684,28 +849,50 @@ been specially prepared.
684 849
685@defun set-buffer-major-mode buffer 850@defun set-buffer-major-mode buffer
686This function sets the major mode of @var{buffer} to the value of 851This function sets the major mode of @var{buffer} to the value of
687@code{default-major-mode}. If that variable is @code{nil}, it uses 852@code{default-major-mode}; if that variable is @code{nil}, it uses the
688the current buffer's major mode (if that is suitable). 853current buffer's major mode (if that is suitable). As an exception,
854if @var{buffer}'s name is @samp{*scratch*}, it sets the mode to
855@code{initial-major-mode}.
689 856
690The low-level primitives for creating buffers do not use this function, 857The low-level primitives for creating buffers do not use this function,
691but medium-level commands such as @code{switch-to-buffer} and 858but medium-level commands such as @code{switch-to-buffer} and
692@code{find-file-noselect} use it whenever they create buffers. 859@code{find-file-noselect} use it whenever they create buffers.
693@end defun 860@end defun
694 861
695@defvar initial-major-mode 862@defopt initial-major-mode
696@cindex @samp{*scratch*} 863@cindex @samp{*scratch*}
697The value of this variable determines the major mode of the initial 864The value of this variable determines the major mode of the initial
698@samp{*scratch*} buffer. The value should be a symbol that is a major 865@samp{*scratch*} buffer. The value should be a symbol that is a major
699mode command. The default value is @code{lisp-interaction-mode}. 866mode command. The default value is @code{lisp-interaction-mode}.
867@end defopt
868
869@defvar interpreter-mode-alist
870This variable specifies major modes to use for scripts that specify a
871command interpreter in a @samp{#!} line. Its value is an alist with
872elements of the form @code{(@var{interpreter} . @var{mode})}; for
873example, @code{("perl" . perl-mode)} is one element present by
874default. The element says to use mode @var{mode} if the file
875specifies an interpreter which matches @var{interpreter}. The value
876of @var{interpreter} is actually a regular expression. @xref{Regular
877Expressions}.
878@end defvar
879
880@defvar magic-mode-alist
881This variable's value is an alist with elements of the form
882@code{(@var{regexp} . @var{function})}, where @var{regexp} is a
883regular expression and @var{function} is a function or @code{nil}.
884After visiting a file, @code{set-auto-mode} calls @var{function} if
885the text at the beginning of the buffer matches @var{regexp} and
886@var{function} is non-@code{nil}; if @var{function} is @code{nil},
887@code{auto-mode-alist} gets to decide the mode.
700@end defvar 888@end defvar
701 889
702@defvar auto-mode-alist 890@defvar auto-mode-alist
703This variable contains an association list of file name patterns 891This variable contains an association list of file name patterns
704(regular expressions; @pxref{Regular Expressions}) and corresponding 892(regular expressions) and corresponding major mode commands. Usually,
705major mode commands. Usually, the file name patterns test for suffixes, 893the file name patterns test for suffixes, such as @samp{.el} and
706such as @samp{.el} and @samp{.c}, but this need not be the case. An 894@samp{.c}, but this need not be the case. An ordinary element of the
707ordinary element of the alist looks like @code{(@var{regexp} . 895alist looks like @code{(@var{regexp} . @var{mode-function})}.
708@var{mode-function})}.
709 896
710For example, 897For example,
711 898
@@ -724,9 +911,11 @@ For example,
724@end smallexample 911@end smallexample
725 912
726When you visit a file whose expanded file name (@pxref{File Name 913When you visit a file whose expanded file name (@pxref{File Name
727Expansion}) matches a @var{regexp}, @code{set-auto-mode} calls the 914Expansion}), with version numbers and backup suffixes removed using
728corresponding @var{mode-function}. This feature enables Emacs to select 915@code{file-name-sans-versions} (@pxref{File Name Components}), matches
729the proper major mode for most files. 916a @var{regexp}, @code{set-auto-mode} calls the corresponding
917@var{mode-function}. This feature enables Emacs to select the proper
918major mode for most files.
730 919
731If an element of @code{auto-mode-alist} has the form @code{(@var{regexp} 920If an element of @code{auto-mode-alist} has the form @code{(@var{regexp}
732@var{function} t)}, then after calling @var{function}, Emacs searches 921@var{function} t)}, then after calling @var{function}, Emacs searches
@@ -755,19 +944,6 @@ init file.)
755@end smallexample 944@end smallexample
756@end defvar 945@end defvar
757 946
758@defvar interpreter-mode-alist
759This variable specifies major modes to use for scripts that specify a
760command interpreter in a @samp{#!} line. Its value is a list of
761elements of the form @code{(@var{interpreter} . @var{mode})}; for
762example, @code{("perl" . perl-mode)} is one element present by default.
763The element says to use mode @var{mode} if the file specifies
764an interpreter which matches @var{interpreter}. The value of
765@var{interpreter} is actually a regular expression.
766
767This variable is applicable only when the @code{auto-mode-alist} does
768not indicate which major mode to use.
769@end defvar
770
771@node Mode Help 947@node Mode Help
772@subsection Getting Help about a Major Mode 948@subsection Getting Help about a Major Mode
773@cindex mode help 949@cindex mode help
@@ -804,36 +980,38 @@ mode.
804 It's often useful to define a new major mode in terms of an existing 980 It's often useful to define a new major mode in terms of an existing
805one. An easy way to do this is to use @code{define-derived-mode}. 981one. An easy way to do this is to use @code{define-derived-mode}.
806 982
807@defmac define-derived-mode variant parent name docstring body@dots{} 983@defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{}
808This construct defines @var{variant} as a major mode command, using 984This construct defines @var{variant} as a major mode command, using
809@var{name} as the string form of the mode name. 985@var{name} as the string form of the mode name. @var{variant} and
986@var{parent} should be unquoted symbols.
810 987
811The new command @var{variant} is defined to call the function 988The new command @var{variant} is defined to call the function
812@var{parent}, then override certain aspects of that parent mode: 989@var{parent}, then override certain aspects of that parent mode:
813 990
814@itemize @bullet 991@itemize @bullet
815@item 992@item
816The new mode has its own keymap, named @code{@var{variant}-map}. 993The new mode has its own sparse keymap, named
817@code{define-derived-mode} initializes this map to inherit from 994@code{@var{variant}-map}. @code{define-derived-mode}
818@code{@var{parent}-map}, if it is not already set. 995makes the parent mode's keymap the parent of the new map, unless
996@code{@var{variant}-map} is already set and already has a parent.
819 997
820@item 998@item
821The new mode has its own syntax table, kept in the variable 999The new mode has its own syntax table, kept in the variable
822@code{@var{variant}-syntax-table}. 1000@code{@var{variant}-syntax-table}, unless you override this using the
823@code{define-derived-mode} initializes this variable by copying 1001@code{:syntax-table} keyword (see below). @code{define-derived-mode}
824@code{@var{parent}-syntax-table}, if it is not already set. 1002makes the parent mode's syntax-table the parent of
1003@code{@var{variant}-syntax-table}, unless the latter is already set
1004and already has a parent different from @code{standard-syntax-table}.
825 1005
826@item 1006@item
827The new mode has its own abbrev table, kept in the variable 1007The new mode has its own abbrev table, kept in the variable
828@code{@var{variant}-abbrev-table}. 1008@code{@var{variant}-abbrev-table}, unless you override this using the
829@code{define-derived-mode} initializes this variable by copying 1009@code{:abbrev-table} keyword (see below).
830@code{@var{parent}-abbrev-table}, if it is not already set.
831 1010
832@item 1011@item
833The new mode has its own mode hook, @code{@var{variant}-hook}, 1012The new mode has its own mode hook, @code{@var{variant}-hook}. It
834which it runs in standard fashion as the very last thing that it does. 1013runs this hook, after running the hooks of its ancestor modes, with
835(The new mode also runs the mode hook of @var{parent} as part 1014@code{run-mode-hooks} (@pxref{Mode Hooks}).
836of calling @var{parent}.)
837@end itemize 1015@end itemize
838 1016
839In addition, you can specify how to override other aspects of 1017In addition, you can specify how to override other aspects of
@@ -841,9 +1019,38 @@ In addition, you can specify how to override other aspects of
841evaluates the forms in @var{body} after setting up all its usual 1019evaluates the forms in @var{body} after setting up all its usual
842overrides, just before running @code{@var{variant}-hook}. 1020overrides, just before running @code{@var{variant}-hook}.
843 1021
844The argument @var{docstring} specifies the documentation string for the 1022You can also specify @code{nil} for @var{parent}. This gives the new
845new mode. If you omit @var{docstring}, @code{define-derived-mode} 1023mode no parent. Then @code{define-derived-mode} behaves as described
846generates a documentation string. 1024above, but, of course, omits all actions connected with @var{parent}.
1025
1026The argument @var{docstring} specifies the documentation string for
1027the new mode. @code{define-derived-mode} adds some general
1028information about the mode's hook, followed by the mode's keymap, at
1029the end of this docstring. If you omit @var{docstring},
1030@code{define-derived-mode} generates a documentation string.
1031
1032The @var{keyword-args} are pairs of keywords and values. The values
1033are evaluated. The following keywords are currently supported:
1034
1035@table @code
1036@item :group
1037If this is specified, it is the customization group for this mode.
1038
1039@item :syntax-table
1040You can use this to explicitly specify a syntax table for the new
1041mode. If you specify a @code{nil} value, the new mode uses the same
1042syntax table as @var{parent}, or @code{standard-syntax-table} if
1043@var{parent} is @code{nil}. (Note that this does @emph{not} follow
1044the convention used for non-keyword arguments that a @code{nil} value
1045is equivalent with not specifying the argument.)
1046
1047@item :abbrev-table
1048You can use this to explicitly specify an abbrev table for the new
1049mode. If you specify a @code{nil} value, the new mode uses the same
1050abbrev table as @var{parent}, or @code{fundamental-mode-abbrev-table}
1051if @var{parent} is @code{nil}. (Again, a @code{nil} value is
1052@emph{not} equivalent to not specifying this keyword.)
1053@end table
847 1054
848Here is a hypothetical example: 1055Here is a hypothetical example:
849 1056
@@ -1184,8 +1391,9 @@ written a @code{defgroup} to define that group properly. @xref{Group
1184Definitions}. 1391Definitions}.
1185 1392
1186@item :global @var{global} 1393@item :global @var{global}
1187If non-@code{nil} specifies that the minor mode should be global. 1394If non-@code{nil} specifies that the minor mode should be global. By
1188By default, minor modes are buffer-local. 1395default, minor modes defined with @code{define-minor-mode} are
1396buffer-local.
1189 1397
1190@item :init-value @var{init-value} 1398@item :init-value @var{init-value}
1191This is equivalent to specifying @var{init-value} positionally. 1399This is equivalent to specifying @var{init-value} positionally.
@@ -1266,6 +1474,17 @@ See the command \\[hungry-electric-delete]."
1266 :group 'hunger) 1474 :group 'hunger)
1267@end smallexample 1475@end smallexample
1268 1476
1477@defmac define-global-minor-mode global-mode mode turn-on keyword-args...
1478This defines a global minor mode named @var{global-mode} whose meaning
1479is to enable the buffer-local minor mode @var{mode} in every buffer.
1480To turn on the minor mode in a buffer, it uses the function
1481@var{turn-on}; to turn off the minor mode, it calls @code{mode} with
1482@minus{}1 as argument.
1483
1484Use @code{:group @var{group}} in @var{keyword-args} to specify the
1485custom group for the mode variable of the global minor mode.
1486@end defmac
1487
1269@node Mode Line Format 1488@node Mode Line Format
1270@section Mode-Line Format 1489@section Mode-Line Format
1271@cindex mode line 1490@cindex mode line
@@ -1283,6 +1502,19 @@ and header line. We include it in this chapter because much of the
1283information displayed in the mode line relates to the enabled major and 1502information displayed in the mode line relates to the enabled major and
1284minor modes. 1503minor modes.
1285 1504
1505@menu
1506* Mode Line Basics::
1507* Mode Line Data:: The data structure that controls the mode line.
1508* Mode Line Variables:: Variables used in that data structure.
1509* %-Constructs:: Putting information into a mode line.
1510* Properties in Mode:: Using text properties in the mode line.
1511* Header Lines:: Like a mode line, but at the top.
1512* Emulating Mode Line:: Formatting text as the mode line would.
1513@end menu
1514
1515@node Mode Line Basics
1516@subsection Mode Line Basics
1517
1286 @code{mode-line-format} is a buffer-local variable that holds a 1518 @code{mode-line-format} is a buffer-local variable that holds a
1287template used to display the mode line of the current buffer. All 1519template used to display the mode line of the current buffer. All
1288windows for the same buffer use the same @code{mode-line-format}, so 1520windows for the same buffer use the same @code{mode-line-format}, so
@@ -1324,15 +1556,6 @@ that is two lines tall cannot display both a mode line and a header
1324line at once; if the variables call for both, only the mode line 1556line at once; if the variables call for both, only the mode line
1325actually appears. 1557actually appears.
1326 1558
1327@menu
1328* Mode Line Data:: The data structure that controls the mode line.
1329* Mode Line Variables:: Variables used in that data structure.
1330* %-Constructs:: Putting information into a mode line.
1331* Properties in Mode:: Using text properties in the mode line.
1332* Header Lines:: Like a mode line, but at the top.
1333* Emulating Mode Line:: Formatting text as the mode line would.
1334@end menu
1335
1336@node Mode Line Data 1559@node Mode Line Data
1337@subsection The Data Structure of the Mode Line 1560@subsection The Data Structure of the Mode Line
1338@cindex mode-line construct 1561@cindex mode-line construct
@@ -2801,147 +3024,8 @@ argument list
2801and it should return the restored buffer. 3024and it should return the restored buffer.
2802Here @var{desktop-buffer-misc} is the value returned by the function 3025Here @var{desktop-buffer-misc} is the value returned by the function
2803optionally bound to @code{desktop-save-buffer}. 3026optionally bound to @code{desktop-save-buffer}.
2804
2805@end defvar 3027@end defvar
2806 3028
2807@node Hooks
2808@section Hooks
2809@cindex hooks
2810
2811 A @dfn{hook} is a variable where you can store a function or functions
2812to be called on a particular occasion by an existing program. Emacs
2813provides hooks for the sake of customization. Most often, hooks are set
2814up in the init file (@pxref{Init File}), but Lisp programs can set them also.
2815@xref{Standard Hooks}, for a list of standard hook variables.
2816
2817@cindex normal hook
2818 Most of the hooks in Emacs are @dfn{normal hooks}. These variables
2819contain lists of functions to be called with no arguments. When the
2820hook name ends in @samp{-hook}, that tells you it is normal. We try to
2821make all hooks normal, as much as possible, so that you can use them in
2822a uniform way.
2823
2824 Every major mode function is supposed to run a normal hook called the
2825@dfn{mode hook} as the last step of initialization. This makes it easy
2826for a user to customize the behavior of the mode, by overriding the
2827buffer-local variable assignments already made by the mode. But hooks
2828are used in other contexts too. For example, the hook
2829@code{suspend-hook} runs just before Emacs suspends itself
2830(@pxref{Suspending Emacs}).
2831
2832 The recommended way to add a hook function to a normal hook is by
2833calling @code{add-hook} (see below). The hook functions may be any of
2834the valid kinds of functions that @code{funcall} accepts (@pxref{What
2835Is a Function}). Most normal hook variables are initially void;
2836@code{add-hook} knows how to deal with this. You can add hooks either
2837globally or buffer-locally with @code{add-hook}.
2838
2839@cindex abnormal hook
2840 If the hook variable's name does not end with @samp{-hook}, that
2841indicates it is probably an @dfn{abnormal hook}. Then you should look at its
2842documentation to see how to use the hook properly.
2843
2844 If the variable's name ends in @samp{-functions} or @samp{-hooks},
2845then the value is a list of functions, but it is abnormal in that either
2846these functions are called with arguments or their values are used in
2847some way. You can use @code{add-hook} to add a function to the list,
2848but you must take care in writing the function. (A few of these
2849variables, notably those ending in @samp{-hooks}, are actually
2850normal hooks which were named before we established the convention of
2851using @samp{-hook} for them.)
2852
2853 If the variable's name ends in @samp{-function}, then its value
2854is just a single function, not a list of functions.
2855
2856 Here's an example that uses a mode hook to turn on Auto Fill mode when
2857in Lisp Interaction mode:
2858
2859@example
2860(add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill)
2861@end example
2862
2863 At the appropriate time, Emacs uses the @code{run-hooks} function to
2864run particular hooks. This function calls the hook functions that have
2865been added with @code{add-hook}.
2866
2867@defun run-hooks &rest hookvars
2868This function takes one or more normal hook variable names as
2869arguments, and runs each hook in turn. Each argument should be a
2870symbol that is a normal hook variable. These arguments are processed
2871in the order specified.
2872
2873If a hook variable has a non-@code{nil} value, that value may be a
2874function or a list of functions. (The former option is considered
2875obsolete.) If the value is a function (either a lambda expression or
2876a symbol with a function definition), it is called. If it is a list
2877that isn't a function, its elements are called, consecutively. All
2878the hook functions are called with no arguments.
2879@end defun
2880
2881@defun run-hook-with-args hook &rest args
2882This function is the way to run an abnormal hook and always call all
2883of the hook functions. It calls each of the hook functions one by
2884one, passing each of them the arguments @var{args}.
2885@end defun
2886
2887@defun run-hook-with-args-until-failure hook &rest args
2888This function is the way to run an abnormal hook until one of the hook
2889functions fails. It calls each of the hook functions, passing each of
2890them the arguments @var{args}, until some hook function returns
2891@code{nil}. It then stops and returns @code{nil}. If none of the
2892hook functions return @code{nil}, it returns a non-@code{nil} value.
2893@end defun
2894
2895@defun run-hook-with-args-until-success hook &rest args
2896This function is the way to run an abnormal hook until a hook function
2897succeeds. It calls each of the hook functions, passing each of them
2898the arguments @var{args}, until some hook function returns
2899non-@code{nil}. Then it stops, and returns whatever was returned by
2900the last hook function that was called. If all hook functions return
2901@code{nil}, it returns @code{nil} as well.
2902@end defun
2903
2904@defun add-hook hook function &optional append local
2905This function is the handy way to add function @var{function} to hook
2906variable @var{hook}. You can use it for abnormal hooks as well as for
2907normal hooks. @var{function} can be any Lisp function that can accept
2908the proper number of arguments for @var{hook}. For example,
2909
2910@example
2911(add-hook 'text-mode-hook 'my-text-hook-function)
2912@end example
2913
2914@noindent
2915adds @code{my-text-hook-function} to the hook called @code{text-mode-hook}.
2916
2917If @var{function} is already present in @var{hook} (comparing using
2918@code{equal}), then @code{add-hook} does not add it a second time.
2919
2920It is best to design your hook functions so that the order in which they
2921are executed does not matter. Any dependence on the order is ``asking
2922for trouble''. However, the order is predictable: normally,
2923@var{function} goes at the front of the hook list, so it will be
2924executed first (barring another @code{add-hook} call). If the optional
2925argument @var{append} is non-@code{nil}, the new hook function goes at
2926the end of the hook list and will be executed last.
2927
2928If @var{local} is non-@code{nil}, that says to add @var{function} to
2929the buffer-local hook list instead of to the global hook list. If
2930needed, this makes the hook buffer-local and adds @code{t} to the
2931buffer-local value. The latter acts as a flag to run the hook
2932functions in the default value as well as in the local value.
2933@end defun
2934
2935@defun remove-hook hook function &optional local
2936This function removes @var{function} from the hook variable
2937@var{hook}. It compares @var{function} with elements of @var{hook}
2938using @code{equal}, so it works for both symbols and lambda
2939expressions.
2940
2941If @var{local} is non-@code{nil}, that says to remove @var{function}
2942from the buffer-local hook list instead of from the global hook list.
2943@end defun
2944
2945@ignore 3029@ignore
2946 arch-tag: 4c7bff41-36e6-4da6-9e7f-9b9289e27c8e 3030 arch-tag: 4c7bff41-36e6-4da6-9e7f-9b9289e27c8e
2947@end ignore 3031@end ignore
diff --git a/lispref/processes.texi b/lispref/processes.texi
index 6ffacebce8a..07a72886355 100644
--- a/lispref/processes.texi
+++ b/lispref/processes.texi
@@ -1559,9 +1559,7 @@ back to listening for more connection requests.
1559keyword/argument pairs, for example @code{:server t} to create a 1559keyword/argument pairs, for example @code{:server t} to create a
1560server process, or @code{:type 'datagram} to create a datagram 1560server process, or @code{:type 'datagram} to create a datagram
1561connection. @xref{Low-Level Network}, for details. You can also use 1561connection. @xref{Low-Level Network}, for details. You can also use
1562one of the @code{open-network-...} functions descibed below; 1562the @code{open-network-stream} function descibed below.
1563internally, they just call @code{make-network-process} with suitable
1564arguments.
1565 1563
1566 You can distinguish process objects representing network connections 1564 You can distinguish process objects representing network connections
1567and servers from those representing subprocesses with the 1565and servers from those representing subprocesses with the
@@ -1601,25 +1599,6 @@ The arguments @var{host} and @var{service} specify where to connect to;
1601a defined network service (a string) or a port number (an integer). 1599a defined network service (a string) or a port number (an integer).
1602@end defun 1600@end defun
1603 1601
1604@defun open-network-stream-nowait name buffer-or-name host service &optional sentinel filter
1605This function opens a TCP connection, like @code{open-network-stream},
1606but it returns immediately without waiting for the request to be
1607accepted or rejected by the remote server. When the request is
1608subsequently accepted or rejected, the process's sentinel function
1609will be called with a string that starts with @code{"open"} (on
1610success) or @code{"failed"} (on error).
1611
1612Some systems do not support non-blocking connections; on those
1613systems, @code{open-network-stream-nowait} returns @code{nil}
1614and does nothing.
1615
1616The optional arguments @var{sentinel} and @var{filter} specify the
1617sentinel and filter functions for this network connection. It is
1618useful to specify them when opening the connection, because they will
1619be used later asynchronously. The other arguments mean the same as in
1620@code{open-network-stream}.
1621@end defun
1622
1623@defun process-contact process &optional key 1602@defun process-contact process &optional key
1624This function returns information about how a network process was set 1603This function returns information about how a network process was set
1625up. For a connection, when @var{key} is @code{nil}, it returns 1604up. For a connection, when @var{key} is @code{nil}, it returns
@@ -1704,24 +1683,6 @@ number used for the connection.
1704The client process' plist is initialized from the server's plist. 1683The client process' plist is initialized from the server's plist.
1705@end itemize 1684@end itemize
1706 1685
1707@defun open-network-stream-server name buffer-or-name service &optional sentinel filter
1708Create a network server process for a TCP service.
1709It returns @code{nil} if server processes are not supported; otherwise,
1710it returns a subprocess-object to represent the server.
1711
1712When a client connects to the specified service, Emacs creates a new
1713subprocess to handle the new connection, and then calls its sentinel
1714function (which it has inherited from the server).
1715
1716The optional arguments @var{sentinel} and @var{filter} specify the
1717sentinel and filter functions for the server. It is useful to specify
1718them now, because they will be used later asynchronously when the
1719server receives a connection request. The three arguments @var{name},
1720@var{buffer-or-name} and @var{service} mean the same thing as in
1721@code{open-network-stream}, but @var{service} can be @code{t}
1722meaning ask the system to allocate an unused port to listen on.
1723@end defun
1724
1725@node Datagrams 1686@node Datagrams
1726@section Datagrams 1687@section Datagrams
1727@cindex datagrams 1688@cindex datagrams
diff --git a/lispref/tips.texi b/lispref/tips.texi
index 538affd7450..8ec755f54b1 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -37,6 +37,16 @@ code intended for widespread use:
37 37
38@itemize @bullet 38@itemize @bullet
39@item 39@item
40Simply loading the package should not change Emacs's editing behavior.
41Include a command or commands to enable and disable the feature,
42or to invoke it.
43
44This convention is mandatory for any file that includes custom
45definitions. If fixing such a file to follow this convention requires
46an incompatible change, go ahead and make the incompatible change;
47don't postpone it.
48
49@item
40Since all global variables share the same name space, and all 50Since all global variables share the same name space, and all
41functions share another name space, you should choose a short word to 51functions share another name space, you should choose a short word to
42distinguish your program from other Lisp programs.@footnote{The 52distinguish your program from other Lisp programs.@footnote{The
@@ -201,17 +211,6 @@ way.
201In addition, they should mark the text as a kind of ``link'' so that 211In addition, they should mark the text as a kind of ``link'' so that
202@kbd{mouse-1} will follow it also. @xref{Links and Mouse-1}. 212@kbd{mouse-1} will follow it also. @xref{Links and Mouse-1}.
203 213
204@item
205When a package provides a modification of ordinary Emacs behavior, it is
206good to include a command to enable and disable the feature, provide a
207command named @code{@var{whatever}-mode} which turns the feature on or
208off, and make it autoload (@pxref{Autoload}). Design the package so
209that simply loading it has no visible effect---that should not enable
210the feature.@footnote{Consider that the package may be loaded
211arbitrarily by Custom for instance.} Users will request the feature by
212invoking the command. It is a good idea to define this command
213as a minor mode.
214
215@cindex unloading packages 214@cindex unloading packages
216If loading the file adds functions to hooks, define a function 215If loading the file adds functions to hooks, define a function
217@code{@var{feature}-unload-hook}, where @var{feature} is the name of 216@code{@var{feature}-unload-hook}, where @var{feature} is the name of
diff --git a/lispref/variables.texi b/lispref/variables.texi
index 28eab924eca..27f0f4a7029 100644
--- a/lispref/variables.texi
+++ b/lispref/variables.texi
@@ -42,8 +42,8 @@ variable.
42* Buffer-Local Variables:: Variable values in effect only in one buffer. 42* Buffer-Local Variables:: Variable values in effect only in one buffer.
43* Frame-Local Variables:: Variable values in effect only in one frame. 43* Frame-Local Variables:: Variable values in effect only in one frame.
44* Future Local Variables:: New kinds of local values we might add some day. 44* Future Local Variables:: New kinds of local values we might add some day.
45* Variable Aliases:: Variables that are aliases for other variables.
46* File Local Variables:: Handling local variable lists in files. 45* File Local Variables:: Handling local variable lists in files.
46* Variable Aliases:: Variables that are aliases for other variables.
47* Variables with Restricted Values:: Non-constant variables whose value can 47* Variables with Restricted Values:: Non-constant variables whose value can
48 @emph{not} be an arbitrary Lisp object. 48 @emph{not} be an arbitrary Lisp object.
49@end menu 49@end menu
@@ -1688,6 +1688,92 @@ bindings offer a way to handle these situations more robustly.
1688 If sufficient application is found for either of these two kinds of 1688 If sufficient application is found for either of these two kinds of
1689local bindings, we will provide it in a subsequent Emacs version. 1689local bindings, we will provide it in a subsequent Emacs version.
1690 1690
1691@node File Local Variables
1692@section File Local Variables
1693
1694 This section describes the functions and variables that affect
1695processing of file local variables. @xref{File variables, ,
1696Local Variables in Files, emacs, The GNU Emacs Manual}, for basic
1697information about file local variables.
1698
1699@defopt enable-local-variables
1700This variable controls whether to process file local variables. A
1701value of @code{t} means process them unconditionally; @code{nil} means
1702ignore them; anything else means ask the user what to do for each
1703file. The default value is @code{t}.
1704@end defopt
1705
1706@defun hack-local-variables &optional mode-only
1707This function parses, and binds or evaluates as appropriate, any local
1708variables specified by the contents of the current buffer. The variable
1709@code{enable-local-variables} has its effect here. However, this
1710function does not look for the @samp{mode:} local variable in the
1711@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking
1712@code{enable-local-variables} into account (@pxref{Auto Major Mode}).
1713
1714If the optional argument @var{mode-only} is non-@code{nil}, then all
1715this function does is return @code{t} if the @w{@samp{-*-}} line or
1716the local variables list specifies a mode and @code{nil} otherwise.
1717It does not set the mode nor any other file local variable.
1718@end defun
1719
1720 If a file local variable could specify a function that would
1721be called later, or an expression that would be executed later, simply
1722visiting a file could take over your Emacs. To prevent this, Emacs
1723takes care not to allow to set such file local variables.
1724
1725 For one thing, any variable whose name ends in @samp{-command},
1726@samp{-frame-alist}, @samp{-function}, @samp{-functions},
1727@samp{-hook}, @samp{-hooks}, @samp{-form}, @samp{-forms}, @samp{-map},
1728@samp{-map-alist}, @samp{-mode-alist}, @samp{-program}, or
1729@samp{-predicate} cannot be given a file local value. In general,
1730you should use such a name whenever it is appropriate for the
1731variable's meaning. The variables @samp{font-lock-keywords},
1732@samp{font-lock-keywords-[0-9]}, and
1733@samp{font-lock-syntactic-keywords} cannot be given file local values either.
1734These rules can be overridden by giving the variable's
1735name a non-@code{nil} @code{safe-local-variable} property. If one
1736gives it a @code{safe-local-variable} property of @code{t}, then one
1737can give the variable any file local value. One can also give any
1738symbol, including the above, a @code{safe-local-variable} property
1739that is a function taking exactly one argument. In that case, giving
1740a variable with that name a file local value is only allowed if the
1741function returns non-@code{nil} when called with that value as
1742argument.
1743
1744 In addition, any variable whose name has a non-@code{nil}
1745@code{risky-local-variable} property is also ignored. So are all
1746variables listed in @code{ignored-local-variables}:
1747
1748@defvar ignored-local-variables
1749This variable holds a list of variables that should not be given local
1750values by files. Any value specified for one of these variables is
1751ignored.
1752@end defvar
1753
1754@defun risky-local-variable-p sym &optional val
1755If @var{val} is non-@code{nil}, returns non-@code{nil} if giving
1756@var{sym} a file local value of @var{val} would be risky, for any of
1757the reasons stated above. If @var{val} is @code{nil} or omitted, only
1758returns @code{nil} if @var{sym} can be safely assigned any file local
1759value whatsoever.
1760@end defun
1761
1762 The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs
1763normally asks for confirmation before handling it.
1764
1765@defopt enable-local-eval
1766This variable controls processing of @samp{Eval:} in @samp{-*-} lines
1767or local variables
1768lists in files being visited. A value of @code{t} means process them
1769unconditionally; @code{nil} means ignore them; anything else means ask
1770the user what to do for each file. The default value is @code{maybe}.
1771@end defopt
1772
1773 Text properties are also potential loopholes, since their values
1774could include functions to call. So Emacs discards all text
1775properties from string values specified for file local variables.
1776
1691@node Variable Aliases 1777@node Variable Aliases
1692@section Variable Aliases 1778@section Variable Aliases
1693 1779
@@ -1780,92 +1866,6 @@ foo
1780 @result{} 0 1866 @result{} 0
1781@end example 1867@end example
1782 1868
1783@node File Local Variables
1784@section File Local Variables
1785
1786 This section describes the functions and variables that affect
1787processing of local variables lists in files. @xref{File variables, ,
1788Local Variables in Files, emacs, The GNU Emacs Manual}, for basic
1789information about file local variables.
1790
1791@defopt enable-local-variables
1792This variable controls whether to process file local variables lists. A
1793value of @code{t} means process the local variables lists
1794unconditionally; @code{nil} means ignore them; anything else means ask
1795the user what to do for each file. The default value is @code{t}.
1796@end defopt
1797
1798@defun hack-local-variables &optional mode-only
1799This function parses, and binds or evaluates as appropriate, any local
1800variables specified by the contents of the current buffer. The variable
1801@code{enable-local-variables} has its effect here. However, this
1802function does not look for the @samp{mode:} local variable in the
1803@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking
1804@code{enable-local-variables} into account.
1805
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 or
1808the local variables list specifies a mode and @code{nil} otherwise.
1809It does not set the mode nor any other file local variable.
1810@end defun
1811
1812 If a file local variable list could specify a function that would
1813be called later, or an expression that would be executed later, simply
1814visiting a file could take over your Emacs. To prevent this, Emacs
1815takes care not to allow local variable lists to set such variables.
1816
1817 For one thing, any variable whose name ends in @samp{-command},
1818@samp{-frame-alist}, @samp{-function}, @samp{-functions},
1819@samp{-hook}, @samp{-hooks}, @samp{-form}, @samp{-forms}, @samp{-map},
1820@samp{-map-alist}, @samp{-mode-alist}, @samp{-program}, or
1821@samp{-predicate} cannot be set in a local variable list. In general,
1822you should use such a name whenever it is appropriate for the
1823variable's meaning. The variables @samp{font-lock-keywords},
1824@samp{font-lock-keywords-[0-9]}, and
1825@samp{font-lock-syntactic-keywords} cannot be set in a local variable
1826list, either. These rules can be overridden by giving the variable's
1827name a non-@code{nil} @code{safe-local-variable} property. If one
1828gives it a @code{safe-local-variable} property of @code{t}, then one
1829can give the variable any file local value. One can also give any
1830symbol, including the above, a @code{safe-local-variable} property
1831that is a function taking exactly one argument. In that case, giving
1832a variable with that name a file local value is only allowed if the
1833function returns non-@code{nil} when called with that value as
1834argument.
1835
1836 In addition, any variable whose name has a non-@code{nil}
1837@code{risky-local-variable} property is also ignored. So are all
1838variables listed in @code{ignored-local-variables}:
1839
1840@defvar ignored-local-variables
1841This variable holds a list of variables that should not be
1842set by a file's local variables list. Any value specified
1843for one of these variables is ignored.
1844@end defvar
1845
1846@defun risky-local-variable-p sym &optional val
1847If @var{val} is non-@code{nil}, returns non-@code{nil} if giving
1848@var{sym} a file local value of @var{val} would be risky, for any of
1849the reasons stated above. If @var{val} is @code{nil} or omitted, only
1850returns @code{nil} if @var{sym} can be safely assigned any file local
1851value whatsoever.
1852@end defun
1853
1854 The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs
1855normally asks for confirmation before handling it.
1856
1857@defopt enable-local-eval
1858This variable controls processing of @samp{Eval:} in local variables
1859lists in files being visited. A value of @code{t} means process them
1860unconditionally; @code{nil} means ignore them; anything else means ask
1861the user what to do for each file. The default value is @code{maybe}.
1862@end defopt
1863
1864 Text properties are also potential loopholes, since their values
1865could include functions to call. So Emacs discards all text
1866properties from string values specified in a file's local variables
1867list.
1868
1869@node Variables with Restricted Values 1869@node Variables with Restricted Values
1870@section Variables with Restricted Values 1870@section Variables with Restricted Values
1871 1871
diff --git a/man/ChangeLog b/man/ChangeLog
index 8574bd8f205..dd79a20d412 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,47 @@
12005-05-16 Jay Belanger <belanger@truman.edu>
2
3 * calc.texi (Storing Variables): Mention `calc-copy-special-constant'.
4
52005-05-16 Nick Roberts <nickrob@snap.net.nz>
6
7 * building.texi: Replace toolbar with "tool bar" for consistency.
8 (Compilation Mode): Describe compilation-context-lines
9 and use of arrow in compilation buffer.
10 (Debugger Operation): Replace help text with variable's value.
11
12 * frames.texi (Tooltips): Replace toolbar with "tool bar" for
13 consistency.
14
152005-05-15 Luc Teirlinck <teirllm@auburn.edu>
16
17 * major.texi (Choosing Modes): normal-mode processes the -*- line.
18 Add xref.
19
202005-05-14 Jay Belanger <belanger@truman.edu>
21
22 * calc.texi (Default Simplifications): Insert missing ! (logical
23 not operator).
24
252005-05-14 Michael Albinus <michael.albinus@gmx.de>
26
27 Sync with Tramp 2.0.49.
28
292005-05-14 Luc Teirlinck <teirllm@auburn.edu>
30
31 * basic.texi (Moving Point): Mention `M-g g' binding for `goto-line'.
32 (Position Info): Delete discussion of `goto-line'. It is already
33 described in `Moving point'.
34
35 * mini.texi (Completion Commands): Correct reference.
36 (Completion Options): Fix typo.
37
38 * killing.texi (Deletion): Complete description of `C-x C-o'.
39
402005-05-10 Jay Belanger <belanger@truman.edu>
41
42 * calc.texi (Default Simplifications): Mention that 0^0 simplifies
43 to 1.
44
12005-05-10 Richard M. Stallman <rms@gnu.org> 452005-05-10 Richard M. Stallman <rms@gnu.org>
2 46
3 * building.texi (Compilation): Clarify recompile's directory choice. 47 * building.texi (Compilation): Clarify recompile's directory choice.
diff --git a/man/basic.texi b/man/basic.texi
index 3fbaff2a1e7..f45f87335fb 100644
--- a/man/basic.texi
+++ b/man/basic.texi
@@ -238,6 +238,7 @@ it is commonly used to do so. If your keyboard has a @key{PAGEUP} or
238Read a number @var{n} and move point to buffer position @var{n}. 238Read a number @var{n} and move point to buffer position @var{n}.
239Position 1 is the beginning of the buffer. 239Position 1 is the beginning of the buffer.
240@item M-g M-g 240@item M-g M-g
241@itemx M-g g
241@itemx M-x goto-line 242@itemx M-x goto-line
242Read a number @var{n} and move point to line number @var{n}. Line 1 243Read a number @var{n} and move point to line number @var{n}. Line 1
243is the beginning of the buffer. 244is the beginning of the buffer.
@@ -595,19 +596,13 @@ Toggle automatic display of the size of the buffer.
595@cindex location of point 596@cindex location of point
596@cindex cursor location 597@cindex cursor location
597@cindex point location 598@cindex point location
598 There are two commands for working with line numbers. @kbd{M-x 599 @kbd{M-x what-line} computes the current line number and displays it
599what-line} computes the current line number and displays it in the 600in the echo area. You can also see the current line number in the
600echo area. To go to a given line by number, use @kbd{M-g M-g} or 601mode line; see @ref{Mode Line}. If you narrow the buffer, then the
601@kbd{M-g g} (@code{goto-line}). This prompts you for a line number, 602line number in the mode line is relative to the accessible portion
602then moves point to the beginning of that line. To move to a given 603(@pxref{Narrowing}). By contrast, @code{what-line} shows both the
603line in the most recently displayed other buffer, use @kbd{C-u M-g 604line number relative to the narrowed region and the line number
604M-g}. Line numbers in Emacs count from one at the beginning of the buffer. 605relative to the whole buffer.
605
606 You can also see the current line number in the mode line; see @ref{Mode
607Line}. If you narrow the buffer, then the line number in the mode line
608is relative to the accessible portion (@pxref{Narrowing}). By contrast,
609@code{what-line} shows both the line number relative to the narrowed
610region and the line number relative to the whole buffer.
611 606
612 @kbd{M-x what-page} counts pages from the beginning of the file, and 607 @kbd{M-x what-page} counts pages from the beginning of the file, and
613counts lines within the page, showing both numbers in the echo area. 608counts lines within the page, showing both numbers in the echo area.
diff --git a/man/building.texi b/man/building.texi
index 99bc20260b2..b3cd8187ede 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -223,6 +223,14 @@ commands advance from there. When @kbd{C-x `} gets to the end of the
223buffer and finds no more error messages to visit, it fails and signals 223buffer and finds no more error messages to visit, it fails and signals
224an Emacs error. 224an Emacs error.
225 225
226When the left fringe is displayed, an arrow points to the
227current message in the compilation buffer. The variable
228@code{compilation-context-lines} controls the number of lines of
229leading context in the window before the current message. If it is
230@code{nil} and the left fringe is displayed, the window doesn't
231scroll. If there is no left fringe, no arrow is displayed and a value
232of @code{nil} means display the message at the top of the window.
233
226 You don't have to be in the compilation buffer in order to use 234 You don't have to be in the compilation buffer in order to use
227@code{next-error}. If one window on the selected frame can be the 235@code{next-error}. If one window on the selected frame can be the
228target of the @code{next-error} call, it is used. Else, if a buffer 236target of the @code{next-error} call, it is used. Else, if a buffer
@@ -504,8 +512,8 @@ with a C program, you can also display the @code{#define} directive
504associated with an identifier when the program is not executing. This 512associated with an identifier when the program is not executing. This
505operates in the GUD buffer and in source buffers with major modes in 513operates in the GUD buffer and in source buffers with major modes in
506the list @code{gud-tooltip-modes}. If the variable 514the list @code{gud-tooltip-modes}. If the variable
507@code{gud-tooltip-echo-area} is non-@code{nil} then the help text is 515@code{gud-tooltip-echo-area} is non-@code{nil} then the variable's
508displayed in the echo area. 516value is displayed in the echo area.
509 517
510@node Commands of GUD 518@node Commands of GUD
511@subsection Commands of GUD 519@subsection Commands of GUD
@@ -515,7 +523,7 @@ commands of Shell mode are available (@pxref{Shell Mode}). GUD mode
515also provides commands for setting and clearing breakpoints, for 523also provides commands for setting and clearing breakpoints, for
516selecting stack frames, and for stepping through the program. These 524selecting stack frames, and for stepping through the program. These
517commands are available both in the GUD buffer and globally, but with 525commands are available both in the GUD buffer and globally, but with
518different key bindings. It also has its own toolbar from which you 526different key bindings. It also has its own tool bar from which you
519can invoke the more common commands by clicking on the appropriate 527can invoke the more common commands by clicking on the appropriate
520icon. This is particularly useful for repetitive commands like 528icon. This is particularly useful for repetitive commands like
521gud-next and gud-step and allows the user to hide the GUD buffer. 529gud-next and gud-step and allows the user to hide the GUD buffer.
@@ -742,7 +750,7 @@ that line, this action will remove it
742(@code{gdb-mouse-set-clear-breakpoint}). Where Emacs uses the margin 750(@code{gdb-mouse-set-clear-breakpoint}). Where Emacs uses the margin
743to display breakpoints, it is also possible to enable or disable them 751to display breakpoints, it is also possible to enable or disable them
744when you click @kbd{Mouse-3} there 752when you click @kbd{Mouse-3} there
745(@code{gdb-mouse-toggle--breakpoint}). 753(@code{gdb-mouse-toggle-breakpoint}).
746 754
747@vindex gud-gdb-command-name 755@vindex gud-gdb-command-name
748@findex gdba 756@findex gdba
@@ -869,7 +877,7 @@ the variables that are local to the new frame.
869 877
870If you want to see how a variable changes each time your program stops 878If you want to see how a variable changes each time your program stops
871then place the cursor over the variable name and click on the watch 879then place the cursor over the variable name and click on the watch
872icon in the toolbar (@code{gud-watch}). 880icon in the tool bar (@code{gud-watch}).
873 881
874Each watch expression is displayed in the speedbar. Complex data 882Each watch expression is displayed in the speedbar. Complex data
875types, such as arrays, structures and unions are represented in a tree 883types, such as arrays, structures and unions are represented in a tree
diff --git a/man/calc.texi b/man/calc.texi
index 97f06047773..5d0af765f15 100644
--- a/man/calc.texi
+++ b/man/calc.texi
@@ -22660,11 +22660,10 @@ to @expr{a / (c - b)}, and @expr{(a - b) / (-c)} to @expr{(b - a) / c}.
22660 22660
22661The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)} 22661The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)}
22662in Matrix mode. The formula @expr{0^x} is simplified to @expr{0} 22662in Matrix mode. The formula @expr{0^x} is simplified to @expr{0}
22663unless @expr{x} is a negative number or complex number, in which 22663unless @expr{x} is a negative number, complex number or zero.
22664case the result is an infinity or an unsimplified formula according 22664If @expr{x} is negative, complex or @expr{0.0}, @expr{0^x} is an
22665to the current infinite mode. Note that @expr{0^0} is an 22665infinity or an unsimplified formula according to the current infinite
22666indeterminate form, as evidenced by the fact that the simplifications 22666mode. The expression @expr{0^0} is simplified to @expr{1}.
22667for @expr{x^0} and @expr{0^x} conflict when @expr{x=0}.
22668 22667
22669Powers of products or quotients @expr{(a b)^c}, @expr{(a/b)^c} 22668Powers of products or quotients @expr{(a b)^c}, @expr{(a/b)^c}
22670are distributed to @expr{a^c b^c}, @expr{a^c / b^c} only if @expr{c} 22669are distributed to @expr{a^c b^c}, @expr{a^c / b^c} only if @expr{c}
@@ -22766,7 +22765,7 @@ simplified to @expr{x} for any @expr{x}. This occurs even if you have
22766stored a different value in the Calc variable @samp{e}; but this would 22765stored a different value in the Calc variable @samp{e}; but this would
22767be a bad idea in any case if you were also using natural logarithms! 22766be a bad idea in any case if you were also using natural logarithms!
22768 22767
22769Among the logical functions, @tfn{(@var{a} <= @var{b})} changes to 22768Among the logical functions, @tfn{!(@var{a} <= @var{b})} changes to
22770@tfn{@var{a} > @var{b}} and so on. Equations and inequalities where both sides 22769@tfn{@var{a} > @var{b}} and so on. Equations and inequalities where both sides
22771are either negative-looking or zero are simplified by negating both sides 22770are either negative-looking or zero are simplified by negating both sides
22772and reversing the inequality. While it might seem reasonable to simplify 22771and reversing the inequality. While it might seem reasonable to simplify
@@ -28299,6 +28298,15 @@ will be left alone even if you press @kbd{=} (@code{calc-evaluate}).
28299The @kbd{s u} (@code{calc-unstore}) command returns a variable to the 28298The @kbd{s u} (@code{calc-unstore}) command returns a variable to the
28300void state. 28299void state.
28301 28300
28301@kindex s c
28302@pindex calc-copy-variable
28303The @kbd{s c} (@code{calc-copy-variable}) command copies the stored
28304value of one variable to another. One way it differs from a simple
28305@kbd{s r} followed by an @kbd{s t} (aside from saving keystrokes) is
28306that the value never goes on the stack and thus is never rounded,
28307evaluated, or simplified in any way; it is not even rounded down to the
28308current precision.
28309
28302The only variables with predefined values are the ``special constants'' 28310The only variables with predefined values are the ``special constants''
28303@code{pi}, @code{e}, @code{i}, @code{phi}, and @code{gamma}. You are free 28311@code{pi}, @code{e}, @code{i}, @code{phi}, and @code{gamma}. You are free
28304to unstore these variables or to store new values into them if you like, 28312to unstore these variables or to store new values into them if you like,
@@ -28308,25 +28316,26 @@ you change the value of one of these variables, or of one of the other
28308special variables @code{inf}, @code{uinf}, and @code{nan} (which are 28316special variables @code{inf}, @code{uinf}, and @code{nan} (which are
28309normally void). 28317normally void).
28310 28318
28311Note that @code{pi} doesn't actually have 3.14159265359 stored 28319Note that @code{pi} doesn't actually have 3.14159265359 stored in it,
28312in it, but rather a special magic value that evaluates to @cpi{} 28320but rather a special magic value that evaluates to @cpi{} at the current
28313at the current precision. Likewise @code{e}, @code{i}, and 28321precision. Likewise @code{e}, @code{i}, and @code{phi} evaluate
28314@code{phi} evaluate according to the current precision or polar mode. 28322according to the current precision or polar mode. If you recall a value
28315If you recall a value from @code{pi} and store it back, this magic 28323from @code{pi} and store it back, this magic property will be lost. The
28316property will be lost. 28324magic property is preserved, however, when a variable is copied with
28317 28325@kbd{s c}.
28318@kindex s c 28326
28319@pindex calc-copy-variable 28327@kindex s k
28320The @kbd{s c} (@code{calc-copy-variable}) command copies the stored 28328@pindex calc-copy-special-constant
28321value of one variable to another. It differs from a simple @kbd{s r} 28329If one of the ``special constants'' is redefined (or undefined) so that
28322followed by an @kbd{s t} in two important ways. First, the value never 28330it no longer has its magic property, the property can be restored with
28323goes on the stack and thus is never rounded, evaluated, or simplified 28331@kbd{s k} (@code{calc-copy-special-constant}). This command will prompt
28324in any way; it is not even rounded down to the current precision. 28332for a special constant and a variable to store it in, and so a special
28325Second, the ``magic'' contents of a variable like @code{e} can 28333constant can be stored in any variable. Here, the special constant that
28326be copied into another variable with this command, perhaps because 28334you enter doesn't depend on the value of the corresponding variable;
28327you need to unstore @code{e} right now but you wish to put it 28335@code{pi} will represent 3.14159@dots{} regardless of what is currently
28328back when you're done. The @kbd{s c} command is the only way to 28336stored in the Calc variable @code{pi}. If one of the other special
28329manipulate these magic values intact. 28337variables, @code{inf}, @code{uinf} or @code{nan}, is given a value, its
28338original behavior can be restored by voiding it with @kbd{s u}.
28330 28339
28331@node Recalling Variables, Operations on Variables, Storing Variables, Store and Recall 28340@node Recalling Variables, Operations on Variables, Storing Variables, Store and Recall
28332@section Recalling Variables 28341@section Recalling Variables
@@ -35616,6 +35625,7 @@ keystrokes are not listed in this summary.
35616@r{ @: s d @:var, decl @: @:calc-declare-variable@:} 35625@r{ @: s d @:var, decl @: @:calc-declare-variable@:}
35617@r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:} 35626@r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:}
35618@r{ @: s i @:buffer @: @:calc-insert-variables@:} 35627@r{ @: s i @:buffer @: @:calc-insert-variables@:}
35628@r{ @: s k @:const, var @: 29 @:calc-copy-special-constant@:}
35619@r{ a b@: s l @:var @: 29 @:@:a (letting var=b)} 35629@r{ a b@: s l @:var @: 29 @:@:a (letting var=b)}
35620@r{ a ...@: s m @:op, var @: 22,29 @:calc-store-map@:} 35630@r{ a ...@: s m @:op, var @: 22,29 @:calc-store-map@:}
35621@r{ @: s n @:var @: 29,47 @:calc-store-neg@: (v/-1)} 35631@r{ @: s n @:var @: 29,47 @:calc-store-neg@: (v/-1)}
diff --git a/man/ediff.texi b/man/ediff.texi
index 318ac9e5c3f..8e176a49fe0 100644
--- a/man/ediff.texi
+++ b/man/ediff.texi
@@ -155,6 +155,12 @@ Compare, Merge, and Apply Patch.
155@findex ediff 155@findex ediff
156Compare two files. 156Compare two files.
157 157
158@item ediff-backup
159@findex ediff-backup
160Compare a file with its backup. If there are several numerical backups, use
161the latest. If the file is itself a backup, then compare it with its
162original.
163
158@item ediff-buffers 164@item ediff-buffers
159@findex ediff-buffers 165@findex ediff-buffers
160Compare two buffers. 166Compare two buffers.
diff --git a/man/frames.texi b/man/frames.texi
index 68d406b45e3..2b2c61af133 100644
--- a/man/frames.texi
+++ b/man/frames.texi
@@ -979,7 +979,7 @@ tooltips.
979 979
980 @dfn{Help tooltips} typically display over text---including the mode 980 @dfn{Help tooltips} typically display over text---including the mode
981line---but may be also available for many other parts of the Emacs 981line---but may be also available for many other parts of the Emacs
982frame such as the toolbar and menu items. 982frame such as the tool bar and menu items.
983 983
984@findex tooltip-mode 984@findex tooltip-mode
985 You can toggle help tooltips (Tooltip mode) with the command 985 You can toggle help tooltips (Tooltip mode) with the command
diff --git a/man/killing.texi b/man/killing.texi
index 9950e405cdd..006af200c06 100644
--- a/man/killing.texi
+++ b/man/killing.texi
@@ -157,7 +157,7 @@ leaves @var{n} spaces after point.
157 @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines 157 @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines
158after the current line. If the current line is blank, it deletes all 158after the current line. If the current line is blank, it deletes all
159blank lines preceding the current line as well (leaving one blank line, 159blank lines preceding the current line as well (leaving one blank line,
160the current line). 160the current line). On a solitary blank line, it deletes that line.
161 161
162 @kbd{M-^} (@code{delete-indentation}) joins the current line and the 162 @kbd{M-^} (@code{delete-indentation}) joins the current line and the
163previous line, by deleting a newline and all surrounding spaces, usually 163previous line, by deleting a newline and all surrounding spaces, usually
diff --git a/man/major.texi b/man/major.texi
index 28f0ff0f32f..23e0f8e116f 100644
--- a/man/major.texi
+++ b/man/major.texi
@@ -176,7 +176,8 @@ mode is taken from the previously current buffer.
176mode Emacs would choose automatically: use the command @kbd{M-x 176mode Emacs would choose automatically: use the command @kbd{M-x
177normal-mode} to do this. This is the same function that 177normal-mode} to do this. This is the same function that
178@code{find-file} calls to choose the major mode. It also processes 178@code{find-file} calls to choose the major mode. It also processes
179the file's local variables list (if any). 179the file's @samp{-*-} line or local variables list (if any).
180@xref{File Variables}.
180 181
181@vindex change-major-mode-with-file-name 182@vindex change-major-mode-with-file-name
182 The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to 183 The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to
diff --git a/man/mini.texi b/man/mini.texi
index fbe1d1e3909..0a775000722 100644
--- a/man/mini.texi
+++ b/man/mini.texi
@@ -260,7 +260,14 @@ Complete the minibuffer text before point, but don't go beyond one word
260(@code{minibuffer-complete-word}). 260(@code{minibuffer-complete-word}).
261@item @key{RET} 261@item @key{RET}
262Submit the text in the minibuffer as the argument, possibly completing 262Submit the text in the minibuffer as the argument, possibly completing
263first as described below (@code{minibuffer-complete-and-exit}). 263first as described
264@iftex
265in the next subsection (@code{minibuffer-complete-and-exit}).
266@end iftex
267@ifnottex
268in the next node (@code{minibuffer-complete-and-exit}). @xref{Strict
269Completion}.
270@end ifnottex
264@item ? 271@item ?
265Display a list of all possible completions of the text in the minibuffer 272Display a list of all possible completions of the text in the minibuffer
266(@code{minibuffer-list-completions}). 273(@code{minibuffer-list-completions}).
@@ -410,7 +417,7 @@ completion commands are available on @kbd{M-@key{TAB}} (or
410@vindex PC-include-file-path 417@vindex PC-include-file-path
411@vindex PC-disable-includes 418@vindex PC-disable-includes
412 Another feature of Partial Completion mode is to extend 419 Another feature of Partial Completion mode is to extend
413@code{find-file} so that the @samp{<@var{include}>} stands for the 420@code{find-file} so that @samp{<@var{include}>} stands for the
414file named @var{include} in some directory in the path 421file named @var{include} in some directory in the path
415@code{PC-include-file-path}. If you set @code{PC-disable-includes} to 422@code{PC-include-file-path}. If you set @code{PC-disable-includes} to
416non-@code{nil}, this feature is disabled. 423non-@code{nil}, this feature is disabled.
diff --git a/man/trampver.texi b/man/trampver.texi
index 3e9f32a7fae..33a0aacbb9e 100644
--- a/man/trampver.texi
+++ b/man/trampver.texi
@@ -4,7 +4,7 @@
4@c In the Tramp CVS, the version number is auto-frobbed from 4@c In the Tramp CVS, the version number is auto-frobbed from
5@c configure.ac, so you should edit that file and run 5@c configure.ac, so you should edit that file and run
6@c "autoconf && ./configure" to change the version number. 6@c "autoconf && ./configure" to change the version number.
7@set trampver 2.0.48 7@set trampver 2.0.49
8 8
9@c Other flags from configuration 9@c Other flags from configuration
10@set prefix /usr/local 10@set prefix /usr/local
diff --git a/src/ChangeLog b/src/ChangeLog
index a86f78e5b96..fd11243cbb0 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,25 @@
12005-05-14 Richard M. Stallman <rms@gnu.org>
2
3 * xdisp.c (message3): Call cancel_echoing.
4
5 * alloc.c (Fmemory_full_p): New function.
6 (syms_of_alloc): defsubr it.
7
8 * process.c (send_process_trap): Unblock SIGPIPE.
9 (send_process): Reset SIGPIPE handler before reporting error.
10
112005-05-14 Nick Roberts <nickrob@snap.net.nz>
12
13 * emacs.c (syms_of_emacs): Fix doc string for system-type.
14
152005-05-13 Richard M. Stallman <rms@gnu.org>
16
17 * fileio.c (Ffind_file_name_handler): Handle lambda-exp as handler.
18 (Finsert_file_contents): If we read 0 bytes from a special file,
19 unlock the visited file if we locked it.
20 (Fmake_symbolic_link, Frecent_auto_save_p): Doc fixes.
21 (Ffile_exists_p, Ffile_symlink_p): Doc fixes.
22
12005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 232005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 24
3 * emacs.c (main) [MAC_OS8]: Call init_atimer before mac_term_init. 25 * emacs.c (main) [MAC_OS8]: Call init_atimer before mac_term_init.
diff --git a/src/alloc.c b/src/alloc.c
index 43db28e08a0..35ce8a5cfa1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -535,6 +535,12 @@ memory_full ()
535 Fsignal (Qnil, Vmemory_signal_data); 535 Fsignal (Qnil, Vmemory_signal_data);
536} 536}
537 537
538DEFUN ("memory-full-p", Fmemory_full_p, Smemory_full_p, 0, 0, 0,
539 doc: /* t if memory is nearly full, nil otherwise. */)
540 ()
541{
542 return (spare_memory ? Qnil : Qt);
543}
538 544
539/* Called if we can't allocate relocatable space for a buffer. */ 545/* Called if we can't allocate relocatable space for a buffer. */
540 546
@@ -6080,6 +6086,7 @@ The time is in seconds as a floating point value. */);
6080 DEFVAR_INT ("gcs-done", &gcs_done, 6086 DEFVAR_INT ("gcs-done", &gcs_done,
6081 doc: /* Accumulated number of garbage collections done. */); 6087 doc: /* Accumulated number of garbage collections done. */);
6082 6088
6089 defsubr (&Smemory_full_p);
6083 defsubr (&Scons); 6090 defsubr (&Scons);
6084 defsubr (&Slist); 6091 defsubr (&Slist);
6085 defsubr (&Svector); 6092 defsubr (&Svector);
diff --git a/src/emacs.c b/src/emacs.c
index a1805c6497a..f435a3959a3 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2441,16 +2441,16 @@ syms_of_emacs ()
2441Many arguments are deleted from the list as they are processed. */); 2441Many arguments are deleted from the list as they are processed. */);
2442 2442
2443 DEFVAR_LISP ("system-type", &Vsystem_type, 2443 DEFVAR_LISP ("system-type", &Vsystem_type,
2444+ doc: /* Value is symbol indicating type of operating system you are using. 2444 doc: /* Value is symbol indicating type of operating system you are using.
2445+Special values: 2445Special values:
2446+ `gnu/linux' compiled for a GNU/Linux system. 2446 `gnu/linux' compiled for a GNU/Linux system.
2447+ `darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...). 2447 `darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...).
2448+ `macos' compiled for Mac OS 9. 2448 `macos' compiled for Mac OS 9.
2449+ `ms-dos' compiled as an MS-DOS application. 2449 `ms-dos' compiled as an MS-DOS application.
2450+ `windows-nt' compiled as a native W32 application. 2450 `windows-nt' compiled as a native W32 application.
2451+ `cygwin' compiled using the Cygwin library. 2451 `cygwin' compiled using the Cygwin library.
2452+ `vax-vms' or `axp-vms': compiled for a (Open)VMS system. 2452 `vax-vms' or `axp-vms': compiled for a (Open)VMS system.
2453+Anything else indicates some sort of Unix system. */); 2453Anything else indicates some sort of Unix system. */);
2454 Vsystem_type = intern (SYSTEM_TYPE); 2454 Vsystem_type = intern (SYSTEM_TYPE);
2455 2455
2456 DEFVAR_LISP ("system-configuration", &Vsystem_configuration, 2456 DEFVAR_LISP ("system-configuration", &Vsystem_configuration,
diff --git a/src/fileio.c b/src/fileio.c
index b62dac5b3d7..eaa2d184f1d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -375,7 +375,10 @@ use the standard functions without calling themselves recursively. */)
375 Lisp_Object string = XCAR (elt); 375 Lisp_Object string = XCAR (elt);
376 int match_pos; 376 int match_pos;
377 Lisp_Object handler = XCDR (elt); 377 Lisp_Object handler = XCDR (elt);
378 Lisp_Object operations = Fget (handler, Qoperations); 378 Lisp_Object operations = Qnil;
379
380 if (SYMBOLP (handler))
381 operations = Fget (handler, Qoperations);
379 382
380 if (STRINGP (string) 383 if (STRINGP (string)
381 && (match_pos = fast_string_match (string, filename)) > pos 384 && (match_pos = fast_string_match (string, filename)) > pos
@@ -2864,7 +2867,8 @@ This is what happens in interactive use with M-x. */)
2864#ifdef S_IFLNK 2867#ifdef S_IFLNK
2865DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, 2868DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
2866 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", 2869 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np",
2867 doc: /* Make a symbolic link to FILENAME, named LINKNAME. Both args must be strings. 2870 doc: /* Make a symbolic link to FILENAME, named LINKNAME.
2871Both args must be strings.
2868Signals a `file-already-exists' error if a file LINKNAME already exists 2872Signals a `file-already-exists' error if a file LINKNAME already exists
2869unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2873unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2870A number as third arg means request confirmation if LINKNAME already exists. 2874A number as third arg means request confirmation if LINKNAME already exists.
@@ -3062,8 +3066,10 @@ check_writable (filename)
3062} 3066}
3063 3067
3064DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, 3068DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0,
3065 doc: /* Return t if file FILENAME exists. (This does not mean you can read it.) 3069 doc: /* Return t if file FILENAME exists (whether or not you can read it.)
3066See also `file-readable-p' and `file-attributes'. */) 3070See also `file-readable-p' and `file-attributes'.
3071This returns nil for a symlink to a nonexistent file.
3072Use `file-symlink-p' to test for such links. */)
3067 (filename) 3073 (filename)
3068 Lisp_Object filename; 3074 Lisp_Object filename;
3069{ 3075{
@@ -3240,7 +3246,10 @@ If there is no error, returns nil. */)
3240DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0, 3246DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0,
3241 doc: /* Return non-nil if file FILENAME is the name of a symbolic link. 3247 doc: /* Return non-nil if file FILENAME is the name of a symbolic link.
3242The value is the link target, as a string. 3248The value is the link target, as a string.
3243Otherwise returns nil. */) 3249Otherwise it returns nil.
3250
3251This function returns t when given the name of a symlink that
3252points to a nonexistent file. */)
3244 (filename) 3253 (filename)
3245 Lisp_Object filename; 3254 Lisp_Object filename;
3246{ 3255{
@@ -3730,6 +3739,8 @@ actually used. */)
3730 int set_coding_system = 0; 3739 int set_coding_system = 0;
3731 int coding_system_decided = 0; 3740 int coding_system_decided = 0;
3732 int read_quit = 0; 3741 int read_quit = 0;
3742 int old_Vdeactivate_mark = Vdeactivate_mark;
3743 int we_locked_file = 0;
3733 3744
3734 if (current_buffer->base_buffer && ! NILP (visit)) 3745 if (current_buffer->base_buffer && ! NILP (visit))
3735 error ("Cannot do file visiting in an indirect buffer"); 3746 error ("Cannot do file visiting in an indirect buffer");
@@ -4402,8 +4413,17 @@ actually used. */)
4402 /* For a special file, all we can do is guess. */ 4413 /* For a special file, all we can do is guess. */
4403 total = READ_BUF_SIZE; 4414 total = READ_BUF_SIZE;
4404 4415
4405 if (NILP (visit) && total > 0) 4416 if (NILP (visit) && inserted > 0)
4406 prepare_to_modify_buffer (PT, PT, NULL); 4417 {
4418#ifdef CLASH_DETECTION
4419 if (!NILP (current_buffer->file_truename)
4420 /* Make binding buffer-file-name to nil effective. */
4421 && !NILP (current_buffer->filename)
4422 && SAVE_MODIFF >= MODIFF)
4423 we_locked_file = 1;
4424#endif /* CLASH_DETECTION */
4425 prepare_to_modify_buffer (GPT, GPT, NULL);
4426 }
4407 4427
4408 move_gap (PT); 4428 move_gap (PT);
4409 if (GAP_SIZE < total) 4429 if (GAP_SIZE < total)
@@ -4493,6 +4513,18 @@ actually used. */)
4493 } 4513 }
4494 } 4514 }
4495 4515
4516 /* Now we have read all the file data into the gap.
4517 If it was empty, undo marking the buffer modified. */
4518
4519 if (inserted == 0)
4520 {
4521#ifdef CLASH_DETECTION
4522 if (we_locked_file)
4523 unlock_file (current_buffer->file_truename);
4524#endif
4525 Vdeactivate_mark = old_Vdeactivate_mark;
4526 }
4527
4496 /* Make the text read part of the buffer. */ 4528 /* Make the text read part of the buffer. */
4497 GAP_SIZE -= inserted; 4529 GAP_SIZE -= inserted;
4498 GPT += inserted; 4530 GPT += inserted;
@@ -6038,7 +6070,10 @@ DEFUN ("clear-buffer-auto-save-failure", Fclear_buffer_auto_save_failure,
6038 6070
6039DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p, 6071DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p,
6040 0, 0, 0, 6072 0, 0, 0,
6041 doc: /* Return t if current buffer has been auto-saved since last read in or saved. */) 6073 doc: /* Return t if current buffer has been auto-saved recently.
6074More precisely, if it has been auto-saved since last read from or saved
6075in the visited file. If the buffer has no visited file,
6076then any auto-save counts as "recent". */)
6042 () 6077 ()
6043{ 6078{
6044 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil; 6079 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil;
diff --git a/src/process.c b/src/process.c
index c6a9b255243..a557ee30c27 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5108,6 +5108,7 @@ send_process_trap ()
5108 sigrelse (SIGPIPE); 5108 sigrelse (SIGPIPE);
5109 sigrelse (SIGALRM); 5109 sigrelse (SIGALRM);
5110#endif /* BSD4_1 */ 5110#endif /* BSD4_1 */
5111 sigunblock (sigmask (SIGPIPE));
5111 longjmp (send_process_frame, 1); 5112 longjmp (send_process_frame, 1);
5112} 5113}
5113 5114
@@ -5299,7 +5300,11 @@ send_process (proc, buf, len, object)
5299 0, datagram_address[outfd].sa, 5300 0, datagram_address[outfd].sa,
5300 datagram_address[outfd].len); 5301 datagram_address[outfd].len);
5301 if (rv < 0 && errno == EMSGSIZE) 5302 if (rv < 0 && errno == EMSGSIZE)
5302 report_file_error ("sending datagram", Fcons (proc, Qnil)); 5303 {
5304 signal (SIGPIPE, old_sigpipe);
5305 report_file_error ("sending datagram",
5306 Fcons (proc, Qnil));
5307 }
5303 } 5308 }
5304 else 5309 else
5305#endif 5310#endif
diff --git a/src/xdisp.c b/src/xdisp.c
index 92e85dd8786..7d4ac6916fa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6909,7 +6909,9 @@ message2_nolog (m, nbytes, multibyte)
6909/* Display an echo area message M with a specified length of NBYTES 6909/* Display an echo area message M with a specified length of NBYTES
6910 bytes. The string may include null characters. If M is not a 6910 bytes. The string may include null characters. If M is not a
6911 string, clear out any existing message, and let the mini-buffer 6911 string, clear out any existing message, and let the mini-buffer
6912 text show through. */ 6912 text show through.
6913
6914 This function cancels echoing. */
6913 6915
6914void 6916void
6915message3 (m, nbytes, multibyte) 6917message3 (m, nbytes, multibyte)
@@ -6921,6 +6923,7 @@ message3 (m, nbytes, multibyte)
6921 6923
6922 GCPRO1 (m); 6924 GCPRO1 (m);
6923 clear_message (1,1); 6925 clear_message (1,1);
6926 cancel_echoing ();
6924 6927
6925 /* First flush out any partial line written with print. */ 6928 /* First flush out any partial line written with print. */
6926 message_log_maybe_newline (); 6929 message_log_maybe_newline ();
@@ -6932,7 +6935,10 @@ message3 (m, nbytes, multibyte)
6932} 6935}
6933 6936
6934 6937
6935/* The non-logging version of message3. */ 6938/* The non-logging version of message3.
6939 This does not cancel echoing, because it is used for echoing.
6940 Perhaps we need to make a separate function for echoing
6941 and make this cancel echoing. */
6936 6942
6937void 6943void
6938message3_nolog (m, nbytes, multibyte) 6944message3_nolog (m, nbytes, multibyte)