diff options
| author | Joakim Verona | 2011-08-30 09:50:25 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-08-30 09:50:25 +0200 |
| commit | b72c6fe2ac5f148b00ceed70a910c7c9ee6a669e (patch) | |
| tree | 7c64545ae0d8f0d99b82134e04e43b0759d776bc | |
| parent | 9fb7b0cab34a48a4c7b66abb6b8edc4ee20467b4 (diff) | |
| parent | 393aa9d403dda96b2fa061311cc76bbad40489cf (diff) | |
| download | emacs-b72c6fe2ac5f148b00ceed70a910c7c9ee6a669e.tar.gz emacs-b72c6fe2ac5f148b00ceed70a910c7c9ee6a669e.zip | |
upstream
44 files changed, 873 insertions, 813 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 50eb89fe488..2407d7dd18f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2011-08-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * modes.texi (Choosing Modes): auto-mode-case-fold is now t. | ||
| 4 | |||
| 5 | 2011-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 6 | |||
| 7 | * files.texi (File Archives): | ||
| 8 | * cal-xtra.texi (Diary Display): | ||
| 9 | * help.texi (Help Mode): Add xref to View Mode. | ||
| 10 | |||
| 11 | 2011-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 12 | |||
| 13 | * display.texi (View Mode): New node. Move view-file here from | ||
| 14 | Misc File Ops. Move view-buffer here from Misc Buffer. | ||
| 15 | |||
| 16 | * buffers.texi (Misc Buffer): Move view-buffer to View Mode. | ||
| 17 | |||
| 18 | * files.texi (Misc File Ops): Document new | ||
| 19 | delete-by-moving-to-trash behavior. Remove view-file. | ||
| 20 | |||
| 21 | * dired.texi (Dired Deletion): Shorten description of Trash. | ||
| 22 | |||
| 23 | * misc.texi (emacsclient Options): Document server-port. | ||
| 24 | |||
| 1 | 2011-08-27 Eli Zaretskii <eliz@gnu.org> | 25 | 2011-08-27 Eli Zaretskii <eliz@gnu.org> |
| 2 | 26 | ||
| 3 | * frames.texi (Frame Commands): Advise setting focus-follows-mouse | 27 | * frames.texi (Frame Commands): Advise setting focus-follows-mouse |
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index d4cc4f7bb6a..c4880af2b5d 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi | |||
| @@ -285,16 +285,6 @@ buffers with particular names. (With some of these features, such as | |||
| 285 | switch to some other buffer before using the command, in order for it | 285 | switch to some other buffer before using the command, in order for it |
| 286 | to make a different buffer.) | 286 | to make a different buffer.) |
| 287 | 287 | ||
| 288 | @findex view-buffer | ||
| 289 | @kbd{M-x view-buffer} is much like @kbd{M-x view-file} (@pxref{Misc | ||
| 290 | File Ops}) except that it examines an already existing Emacs buffer. | ||
| 291 | View mode provides commands for scrolling through the buffer | ||
| 292 | conveniently but not for changing it. When you exit View mode with | ||
| 293 | @kbd{q}, that switches back to the buffer (and the position) which was | ||
| 294 | previously displayed in the window. Alternatively, if you exit View | ||
| 295 | mode with @kbd{e}, the buffer and the value of point that resulted from | ||
| 296 | your perusal remain in effect. | ||
| 297 | |||
| 298 | The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer} | 288 | The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer} |
| 299 | can be used to copy text from one buffer to another. @xref{Accumulating | 289 | can be used to copy text from one buffer to another. @xref{Accumulating |
| 300 | Text}. | 290 | Text}. |
diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi index 52898efc268..6d20c92a6d9 100644 --- a/doc/emacs/cal-xtra.texi +++ b/doc/emacs/cal-xtra.texi | |||
| @@ -538,13 +538,7 @@ are no diary entries, even if that day is a holiday. If you want such | |||
| 538 | days to be shown in the fancy diary buffer, set the variable | 538 | days to be shown in the fancy diary buffer, set the variable |
| 539 | @code{diary-list-include-blanks} to @code{t}.@refill | 539 | @code{diary-list-include-blanks} to @code{t}.@refill |
| 540 | 540 | ||
| 541 | @c View mode does not seem to be described in the manual. | 541 | The fancy diary buffer enables View mode (@pxref{View Mode}). |
| 542 | @c buffers.texi has a brief mention. | ||
| 543 | The fancy diary buffer enables View mode, a minor mode that provides | ||
| 544 | commands for scrolling and searching the text. For example, @key{SPC} | ||
| 545 | and @key{DEL} scroll forward and backward, and @key{s} starts an | ||
| 546 | incremental search. See the documentation of the function | ||
| 547 | @code{view-mode} for more information. | ||
| 548 | 542 | ||
| 549 | The alternative display method @code{diary-simple-display} shows the | 543 | The alternative display method @code{diary-simple-display} shows the |
| 550 | actual diary buffer, and uses invisible text to hide entries that don't | 544 | actual diary buffer, and uses invisible text to hide entries that don't |
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index d536547e293..eb2bcc109e8 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi | |||
| @@ -201,12 +201,10 @@ delete nonempty directories including all their contents. That can | |||
| 201 | be somewhat risky. | 201 | be somewhat risky. |
| 202 | 202 | ||
| 203 | @vindex delete-by-moving-to-trash | 203 | @vindex delete-by-moving-to-trash |
| 204 | On some systems, there is a facility called the ``Trash'' or | 204 | If you change the variable @code{delete-by-moving-to-trash} to |
| 205 | ``Recycle Bin'', but Emacs does @emph{not} use it by default. Thus, | 205 | @code{t}, the above deletion commands will move the affected files or |
| 206 | when you delete a file in Dired, it is gone forever. However, you can | 206 | directories into the operating system's Trash, instead of deleting |
| 207 | tell Emacs to use the Trash for file deletion, by changing the | 207 | them outright. @xref{Misc File Ops}. |
| 208 | variable @code{delete-by-moving-to-trash} to @code{t}. @xref{Misc | ||
| 209 | File Ops}, for more information about the Trash. | ||
| 210 | 208 | ||
| 211 | @node Flagging Many Files | 209 | @node Flagging Many Files |
| 212 | @section Flagging Many Files at Once | 210 | @section Flagging Many Files at Once |
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index cc7f70cf574..09e365d9d5f 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -17,6 +17,7 @@ want to see, and how to display it. | |||
| 17 | * Horizontal Scrolling:: Moving text left and right in a window. | 17 | * Horizontal Scrolling:: Moving text left and right in a window. |
| 18 | * Narrowing:: Restricting display and editing to a portion | 18 | * Narrowing:: Restricting display and editing to a portion |
| 19 | of the buffer. | 19 | of the buffer. |
| 20 | * View Mode:: Viewing read-only buffers. | ||
| 20 | * Follow Mode:: Follow mode lets two windows scroll as one. | 21 | * Follow Mode:: Follow mode lets two windows scroll as one. |
| 21 | * Faces:: How to change the display style using faces. | 22 | * Faces:: How to change the display style using faces. |
| 22 | * Standard Faces:: Emacs' predefined faces. | 23 | * Standard Faces:: Emacs' predefined faces. |
| @@ -368,6 +369,28 @@ this command asks for confirmation and gives you the option of enabling it; | |||
| 368 | if you enable the command, confirmation will no longer be required for | 369 | if you enable the command, confirmation will no longer be required for |
| 369 | it. @xref{Disabling}. | 370 | it. @xref{Disabling}. |
| 370 | 371 | ||
| 372 | @node View Mode | ||
| 373 | @section View Mode | ||
| 374 | @cindex View mode | ||
| 375 | @cindex mode, View | ||
| 376 | |||
| 377 | View mode is a minor mode that lets you scan a buffer by sequential | ||
| 378 | screenfuls. It provides commands for scrolling through the buffer | ||
| 379 | conveniently but not for changing it. Apart from the usual Emacs | ||
| 380 | cursor motion commands, you can type @key{SPC} to scroll forward one | ||
| 381 | windowful, @key{DEL} to scroll backward, and @kbd{s} to start an | ||
| 382 | incremental search. | ||
| 383 | |||
| 384 | Typing @kbd{q} disables View mode, and switches back to the buffer | ||
| 385 | and position before View mode was enabled. Alternatively, typing | ||
| 386 | @kbd{e} disables View mode, keeping the current buffer and position. | ||
| 387 | |||
| 388 | @findex view-buffer | ||
| 389 | @findex view-file | ||
| 390 | @kbd{M-x view-buffer} prompts for an existing Emacs buffer, switches | ||
| 391 | to it, and enables View mode. @kbd{M-x view-file} prompts for a file | ||
| 392 | and visits it with View mode enabled. | ||
| 393 | |||
| 371 | @node Follow Mode | 394 | @node Follow Mode |
| 372 | @section Follow Mode | 395 | @section Follow Mode |
| 373 | @cindex Follow mode | 396 | @cindex Follow mode |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 060f939fa7a..2ba4af712af 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -345,6 +345,7 @@ Controlling the Display | |||
| 345 | * Horizontal Scrolling:: Moving text left and right in a window. | 345 | * Horizontal Scrolling:: Moving text left and right in a window. |
| 346 | * Narrowing:: Restricting display and editing to a portion | 346 | * Narrowing:: Restricting display and editing to a portion |
| 347 | of the buffer. | 347 | of the buffer. |
| 348 | * View Mode:: Viewing read-only buffers. | ||
| 348 | * Follow Mode:: Follow mode lets two windows scroll as one. | 349 | * Follow Mode:: Follow mode lets two windows scroll as one. |
| 349 | * Faces:: How to change the display style using faces. | 350 | * Faces:: How to change the display style using faces. |
| 350 | * Standard Faces:: Emacs' predefined faces. | 351 | * Standard Faces:: Emacs' predefined faces. |
| @@ -1054,6 +1055,12 @@ Hyperlinking and Navigation Features | |||
| 1054 | * Goto Address mode:: Activating URLs. | 1055 | * Goto Address mode:: Activating URLs. |
| 1055 | * FFAP:: Finding files etc. at point. | 1056 | * FFAP:: Finding files etc. at point. |
| 1056 | 1057 | ||
| 1058 | Emacs Lisp Packages | ||
| 1059 | |||
| 1060 | * Package Menu:: Buffer for viewing and managing packages. | ||
| 1061 | * Package Installation:: Options for package installation. | ||
| 1062 | * Package Files:: Where packages are installed. | ||
| 1063 | |||
| 1057 | Customization | 1064 | Customization |
| 1058 | 1065 | ||
| 1059 | * Easy Customization:: Convenient way to browse and change settings. | 1066 | * Easy Customization:: Convenient way to browse and change settings. |
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 793a11e62ed..2672c30363b 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -1272,11 +1272,11 @@ this, it runs the program specified by | |||
| 1272 | The command @kbd{M-x delete-directory} prompts for a directory name | 1272 | The command @kbd{M-x delete-directory} prompts for a directory name |
| 1273 | using the minibuffer, and deletes the directory if it is empty. If | 1273 | using the minibuffer, and deletes the directory if it is empty. If |
| 1274 | the directory is not empty, you will be asked whether you want to | 1274 | the directory is not empty, you will be asked whether you want to |
| 1275 | delete it recursively. On systems that have a ``Trash'' or ``Recycle | 1275 | delete it recursively. On systems that have a ``Trash'' (or ``Recycle |
| 1276 | Bin'' feature, you can make this command move the specified directory | 1276 | Bin'') feature, you can make this command move the specified directory |
| 1277 | to the Trash or Recycle Bin, instead of deleting it outright, by | 1277 | to the Trash instead of deleting it outright, by changing the variable |
| 1278 | changing the variable @code{delete-by-moving-to-trash} to @code{t}. | 1278 | @code{delete-by-moving-to-trash} to @code{t}. @xref{Misc File Ops}, |
| 1279 | @xref{Misc File Ops}, for more information about using the Trash. | 1279 | for more information about using the Trash. |
| 1280 | 1280 | ||
| 1281 | @node Comparing Files | 1281 | @node Comparing Files |
| 1282 | @section Comparing Files | 1282 | @section Comparing Files |
| @@ -1503,23 +1503,78 @@ patch syntax (@pxref{Useless Whitespace}). | |||
| 1503 | Emacs has commands for performing many other operations on files. | 1503 | Emacs has commands for performing many other operations on files. |
| 1504 | All operate on one file; they do not accept wildcard file names. | 1504 | All operate on one file; they do not accept wildcard file names. |
| 1505 | 1505 | ||
| 1506 | @findex view-file | 1506 | @findex delete-file |
| 1507 | @cindex viewing | 1507 | @cindex deletion (of files) |
| 1508 | @cindex View mode | 1508 | @kbd{M-x delete-file} prompts for a file and deletes it. If you are |
| 1509 | @cindex mode, View | 1509 | deleting many files in one directory, it may be more convenient to use |
| 1510 | @kbd{M-x view-file} allows you to scan or read a file by sequential | 1510 | Dired rather than @code{delete-file}. @xref{Dired Deletion}. |
| 1511 | screenfuls. It reads a file name argument using the minibuffer. After | 1511 | |
| 1512 | reading the file into an Emacs buffer, @code{view-file} displays the | 1512 | @cindex trash |
| 1513 | beginning. You can then type @key{SPC} to scroll forward one windowful, | 1513 | @cindex recycle bin |
| 1514 | or @key{DEL} to scroll backward. Various other commands are provided | 1514 | @kbd{M-x move-file-to-trash} moves a file into the system |
| 1515 | for moving around in the file, but none for changing it; type @kbd{?} | 1515 | @dfn{Trash} (or @dfn{Recycle Bin}). This is a facility available on |
| 1516 | while viewing for a list of them. They are mostly the same as normal | 1516 | most operating systems; files that are moved into the Trash can be |
| 1517 | Emacs cursor motion commands. To exit from viewing, type @kbd{q}. | 1517 | brought back later if you change your mind. |
| 1518 | The commands for viewing are defined by a special minor mode called View | 1518 | |
| 1519 | mode. | 1519 | @vindex delete-by-moving-to-trash |
| 1520 | 1520 | By default, Emacs deletion commands do @emph{not} use the Trash. To | |
| 1521 | A related command, @kbd{M-x view-buffer}, views a buffer already present | 1521 | use the Trash (when it is available) for common deletion commands, |
| 1522 | in Emacs. @xref{Misc Buffer}. | 1522 | change the variable @code{delete-by-moving-to-trash} to @code{t}. |
| 1523 | This affects the commands @kbd{M-x delete-file} and @kbd{M-x | ||
| 1524 | delete-directory} (@pxref{Directories}), as well as the deletion | ||
| 1525 | commands in Dired (@pxref{Dired Deletion}). Supplying a prefix | ||
| 1526 | argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes | ||
| 1527 | them delete outright, instead of using the Trash, regardless of | ||
| 1528 | @code{delete-by-moving-to-trash}. | ||
| 1529 | |||
| 1530 | @findex copy-file | ||
| 1531 | @cindex copying files | ||
| 1532 | @kbd{M-x copy-file} reads the file @var{old} and writes a new file | ||
| 1533 | named @var{new} with the same contents. | ||
| 1534 | |||
| 1535 | @findex copy-directory | ||
| 1536 | @kbd{M-x copy-directory} copies directories, similar to the | ||
| 1537 | @command{cp -r} shell command. It prompts for a directory @var{old} | ||
| 1538 | and a destination @var{new}. If @var{new} is an existing directory, | ||
| 1539 | it creates a copy of the @var{old} directory and puts it in @var{new}. | ||
| 1540 | If @var{new} is not an existing directory, it copies all the contents | ||
| 1541 | of @var{old} into a new directory named @var{new}. | ||
| 1542 | |||
| 1543 | @findex rename-file | ||
| 1544 | @kbd{M-x rename-file} reads two file names @var{old} and @var{new} | ||
| 1545 | using the minibuffer, then renames file @var{old} as @var{new}. If | ||
| 1546 | the file name @var{new} already exists, you must confirm with | ||
| 1547 | @kbd{yes} or renaming is not done; this is because renaming causes the | ||
| 1548 | old meaning of the name @var{new} to be lost. If @var{old} and | ||
| 1549 | @var{new} are on different file systems, the file @var{old} is copied | ||
| 1550 | and deleted. If the argument @var{new} is just a directory name, the | ||
| 1551 | real new name is in that directory, with the same non-directory | ||
| 1552 | component as @var{old}. For example, @kbd{M-x rename-file RET ~/foo | ||
| 1553 | RET /tmp RET} renames @file{~/foo} to @file{/tmp/foo}. The same rule | ||
| 1554 | applies to all the remaining commands in this section. All of them | ||
| 1555 | ask for confirmation when the new file name already exists, too. | ||
| 1556 | |||
| 1557 | @findex add-name-to-file | ||
| 1558 | @cindex hard links (creation) | ||
| 1559 | @kbd{M-x add-name-to-file} adds an additional name to an existing | ||
| 1560 | file without removing its old name. The new name is created as a | ||
| 1561 | ``hard link'' to the existing file. The new name must belong on the | ||
| 1562 | same file system that the file is on. On MS-Windows, this command | ||
| 1563 | works only if the file resides in an NTFS file system. On MS-DOS, it | ||
| 1564 | works by copying the file. | ||
| 1565 | |||
| 1566 | @findex make-symbolic-link | ||
| 1567 | @cindex symbolic links (creation) | ||
| 1568 | @kbd{M-x make-symbolic-link} reads two file names @var{target} and | ||
| 1569 | @var{linkname}, then creates a symbolic link named @var{linkname}, | ||
| 1570 | which points at @var{target}. The effect is that future attempts to | ||
| 1571 | open file @var{linkname} will refer to whatever file is named | ||
| 1572 | @var{target} at the time the opening is done, or will get an error if | ||
| 1573 | the name @var{target} is nonexistent at that time. This command does | ||
| 1574 | not expand the argument @var{target}, so that it allows you to specify | ||
| 1575 | a relative name as the target of the link. Not all systems support | ||
| 1576 | symbolic links; on systems that don't support them, this command is | ||
| 1577 | not defined. | ||
| 1523 | 1578 | ||
| 1524 | @kindex C-x i | 1579 | @kindex C-x i |
| 1525 | @findex insert-file | 1580 | @findex insert-file |
| @@ -1544,74 +1599,6 @@ specified file. @xref{Accumulating Text}. The variable | |||
| 1544 | @code{write-region-inhibit-fsync} applies to these commands, as well | 1599 | @code{write-region-inhibit-fsync} applies to these commands, as well |
| 1545 | as saving files; see @ref{Customize Save}. | 1600 | as saving files; see @ref{Customize Save}. |
| 1546 | 1601 | ||
| 1547 | @findex delete-file | ||
| 1548 | @cindex deletion (of files) | ||
| 1549 | @vindex delete-by-moving-to-trash | ||
| 1550 | @kbd{M-x delete-file} deletes the specified file, like the @code{rm} | ||
| 1551 | command in the shell. If you are deleting many files in one | ||
| 1552 | directory, it may be more convenient to use Dired rather than | ||
| 1553 | @code{delete-file}. @xref{Dired}. | ||
| 1554 | |||
| 1555 | @cindex trash | ||
| 1556 | @cindex recycle bin | ||
| 1557 | On some systems, there is a facility called the ``Trash'' (or | ||
| 1558 | ``Recycle Bin''); ``deleting'' a file normally means moving it into | ||
| 1559 | the Trash, and you can bring the file back from the Trash if you later | ||
| 1560 | change your mind. By default, Emacs does @emph{not} use the Trash for | ||
| 1561 | file deletion---when Emacs deletes a file, it is gone forever. You | ||
| 1562 | can tell Emacs to use the Trash by changing the variable | ||
| 1563 | @code{delete-by-moving-to-trash} to @code{t}. This applies to file | ||
| 1564 | deletion via @kbd{M-x delete-file}, as well as @kbd{M-x | ||
| 1565 | delete-directory} (@pxref{Directories}) and file deletion in Dired | ||
| 1566 | (@pxref{Dired Deletion}). In addition, you can explicitly move a file | ||
| 1567 | into the Trash with the command @kbd{M-x move-file-to-trash}. | ||
| 1568 | |||
| 1569 | @findex rename-file | ||
| 1570 | @kbd{M-x rename-file} reads two file names @var{old} and @var{new} using | ||
| 1571 | the minibuffer, then renames file @var{old} as @var{new}. If the file name | ||
| 1572 | @var{new} already exists, you must confirm with @kbd{yes} or renaming is not | ||
| 1573 | done; this is because renaming causes the old meaning of the name @var{new} | ||
| 1574 | to be lost. If @var{old} and @var{new} are on different file systems, the | ||
| 1575 | file @var{old} is copied and deleted. | ||
| 1576 | |||
| 1577 | If the argument @var{new} is just a directory name, the real new | ||
| 1578 | name is in that directory, with the same non-directory component as | ||
| 1579 | @var{old}. For example, @kbd{M-x rename-file RET ~/foo RET /tmp RET} | ||
| 1580 | renames @file{~/foo} to @file{/tmp/foo}. The same rule applies to all | ||
| 1581 | the remaining commands in this section. All of them ask for | ||
| 1582 | confirmation when the new file name already exists, too. | ||
| 1583 | |||
| 1584 | @findex add-name-to-file | ||
| 1585 | @cindex hard links (creation) | ||
| 1586 | The similar command @kbd{M-x add-name-to-file} is used to add an | ||
| 1587 | additional name to an existing file without removing its old name. | ||
| 1588 | The new name is created as a ``hard link'' to the existing file. | ||
| 1589 | The new name must belong on the same file system that the file is on. | ||
| 1590 | On MS-Windows, this command works only if the file resides in an NTFS | ||
| 1591 | file system. On MS-DOS, it works by copying the file. | ||
| 1592 | |||
| 1593 | @findex copy-file | ||
| 1594 | @findex copy-directory | ||
| 1595 | @cindex copying files | ||
| 1596 | @kbd{M-x copy-file} reads the file @var{old} and writes a new file | ||
| 1597 | named @var{new} with the same contents. @kbd{M-x copy-directory} does | ||
| 1598 | the same for directories, by recursive copying all files and | ||
| 1599 | subdirectories. | ||
| 1600 | |||
| 1601 | @findex make-symbolic-link | ||
| 1602 | @cindex symbolic links (creation) | ||
| 1603 | @kbd{M-x make-symbolic-link} reads two file names @var{target} and | ||
| 1604 | @var{linkname}, then creates a symbolic link named @var{linkname}, | ||
| 1605 | which points at @var{target}. The effect is that future attempts to | ||
| 1606 | open file @var{linkname} will refer to whatever file is named | ||
| 1607 | @var{target} at the time the opening is done, or will get an error if | ||
| 1608 | the name @var{target} is nonexistent at that time. This command does | ||
| 1609 | not expand the argument @var{target}, so that it allows you to specify | ||
| 1610 | a relative name as the target of the link. | ||
| 1611 | |||
| 1612 | Not all systems support symbolic links; on systems that don't | ||
| 1613 | support them, this command is not defined. | ||
| 1614 | |||
| 1615 | @findex set-file-modes | 1602 | @findex set-file-modes |
| 1616 | @cindex file modes | 1603 | @cindex file modes |
| 1617 | @cindex file permissions | 1604 | @cindex file permissions |
| @@ -1670,13 +1657,13 @@ Tar mode is used also for compressed archives---files with extensions | |||
| 1670 | The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file | 1657 | The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file |
| 1671 | into its own buffer. You can edit it there, and if you save the | 1658 | into its own buffer. You can edit it there, and if you save the |
| 1672 | buffer, the edited version will replace the version in the Tar buffer. | 1659 | buffer, the edited version will replace the version in the Tar buffer. |
| 1673 | @kbd{v} extracts a file into a buffer in View mode. @kbd{o} extracts | 1660 | @kbd{v} extracts a file into a buffer in View mode (@pxref{View |
| 1674 | the file and displays it in another window, so you could edit the file | 1661 | Mode}). @kbd{o} extracts the file and displays it in another window, |
| 1675 | and operate on the archive simultaneously. @kbd{d} marks a file for | 1662 | so you could edit the file and operate on the archive simultaneously. |
| 1676 | deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in | 1663 | @kbd{d} marks a file for deletion when you later use @kbd{x}, and |
| 1677 | Dired. @kbd{C} copies a file from the archive to disk and @kbd{R} | 1664 | @kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the |
| 1678 | renames a file within the archive. @kbd{g} reverts the buffer from | 1665 | archive to disk and @kbd{R} renames a file within the archive. |
| 1679 | the archive on disk. | 1666 | @kbd{g} reverts the buffer from the archive on disk. |
| 1680 | 1667 | ||
| 1681 | The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission | 1668 | The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission |
| 1682 | bits, group, and owner, respectively. | 1669 | bits, group, and owner, respectively. |
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index bf93892c0db..9ff995138f5 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -405,8 +405,8 @@ the variable @code{apropos-documentation-sort-by-scores} is | |||
| 405 | @node Help Mode | 405 | @node Help Mode |
| 406 | @section Help Mode Commands | 406 | @section Help Mode Commands |
| 407 | 407 | ||
| 408 | Help buffers provide the same commands as View mode (@pxref{Misc File | 408 | Help buffers provide the same commands as View mode (@pxref{View |
| 409 | Ops}), plus a few special commands of their own. | 409 | Mode}), plus a few special commands of their own. |
| 410 | 410 | ||
| 411 | @table @kbd | 411 | @table @kbd |
| 412 | @item @key{SPC} | 412 | @item @key{SPC} |
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 2dab70c512a..598f495784f 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -1596,6 +1596,11 @@ runs, and (ii) provide @command{emacsclient} with the server file. | |||
| 1596 | (One convenient way to do the latter is to put the server file on a | 1596 | (One convenient way to do the latter is to put the server file on a |
| 1597 | networked file system such as NFS.) | 1597 | networked file system such as NFS.) |
| 1598 | 1598 | ||
| 1599 | @vindex server-port | ||
| 1600 | When the Emacs server is using TCP, the variable @code{server-port} | ||
| 1601 | determines the port number to listen on; the default value, | ||
| 1602 | @code{nil}, means to choose a random port when the server starts. | ||
| 1603 | |||
| 1599 | @item -n | 1604 | @item -n |
| 1600 | @itemx --no-wait | 1605 | @itemx --no-wait |
| 1601 | Let @command{emacsclient} exit immediately, instead of waiting until | 1606 | Let @command{emacsclient} exit immediately, instead of waiting until |
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 314d5d4347e..d82423a73b4 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi | |||
| @@ -353,12 +353,13 @@ the element has the form @code{(@var{regexp} @var{mode-function} | |||
| 353 | @var{regexp} and searches the list again for another match. | 353 | @var{regexp} and searches the list again for another match. |
| 354 | 354 | ||
| 355 | @vindex auto-mode-case-fold | 355 | @vindex auto-mode-case-fold |
| 356 | On systems with case-insensitive file names, such as Microsoft | 356 | On GNU/Linux and other systems with case-sensitive file names, Emacs |
| 357 | Windows, Emacs performs a single case-insensitive search through | 357 | performs a case-sensitive search through @code{auto-mode-alist}; if |
| 358 | @code{auto-mode-alist}. On other systems, Emacs normally performs a | 358 | this search fails, it performs a second case-insensitive search |
| 359 | single case-sensitive search through the alist. However, if you | 359 | through the alist. To suppress the second search, change the variable |
| 360 | change the variable @code{auto-mode-case-fold} to @code{t}, Emacs | 360 | @code{auto-mode-case-fold} to @code{nil}. On systems with |
| 361 | performs a second case-insensitive search if the first search fails. | 361 | case-insensitive file names, such as Microsoft Windows, Emacs performs |
| 362 | a single case-insensitive search through @code{auto-mode-alist}. | ||
| 362 | 363 | ||
| 363 | @vindex magic-fallback-mode-alist | 364 | @vindex magic-fallback-mode-alist |
| 364 | Finally, if Emacs @emph{still} hasn't found a major mode to use, it | 365 | Finally, if Emacs @emph{still} hasn't found a major mode to use, it |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index ca9c93b563d..57dde5ac4cb 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | 2011-08-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * modes.texi (Basic Major Modes): New node. Callers updated. | ||
| 4 | (Major Modes): Document fundamental-mode and major-mode. | ||
| 5 | (Major Mode Basics): Node deleted; text moved to Major Modes. | ||
| 6 | (Derived Modes): Document derived-mode-p. | ||
| 7 | |||
| 8 | 2011-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 9 | |||
| 10 | * files.texi (Changing Files, Create/Delete Dirs): Document new | ||
| 11 | arguments for delete-file, delete-directory, and copy-directory. | ||
| 12 | (Visiting Functions): Remove view-file; it is documented in the | ||
| 13 | Emacs manual. | ||
| 14 | |||
| 15 | * frames.texi (Layout Parameters): The defaults for the | ||
| 16 | menu-bar-lines and tool-bar-lines parameters depend on the mode. | ||
| 17 | |||
| 18 | * display.texi (Progress): Document spinner functionality. | ||
| 19 | |||
| 20 | * os.texi (Killing Emacs): Note that kill-emacs can be called by | ||
| 21 | operating system signals. Refer to save-buffers-kill-terminal | ||
| 22 | instead of save-buffers-kill-emacs. | ||
| 23 | |||
| 24 | * objects.texi (Symbol Type): Document ## print representation. | ||
| 25 | |||
| 1 | 2011-08-25 Eli Zaretskii <eliz@gnu.org> | 26 | 2011-08-25 Eli Zaretskii <eliz@gnu.org> |
| 2 | 27 | ||
| 3 | * display.texi (Specified Space): Mention that `space' specs | 28 | * display.texi (Specified Space): Mention that `space' specs |
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index d9e807afb88..757906f286e 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -596,25 +596,6 @@ forms are elided. | |||
| 596 | @end smallexample | 596 | @end smallexample |
| 597 | @end deffn | 597 | @end deffn |
| 598 | 598 | ||
| 599 | @ignore @c Not worth mentioning | ||
| 600 | @defopt stack-trace-on-error | ||
| 601 | @cindex stack trace | ||
| 602 | This variable controls whether Lisp automatically displays a | ||
| 603 | backtrace buffer after every error that is not handled. A quit signal | ||
| 604 | counts as an error for this variable. If it is non-@code{nil} then a | ||
| 605 | backtrace is shown in a pop-up buffer named @samp{*Backtrace*} on every | ||
| 606 | error. If it is @code{nil}, then a backtrace is not shown. | ||
| 607 | |||
| 608 | When a backtrace is shown, that buffer is not selected. If either | ||
| 609 | @code{debug-on-quit} or @code{debug-on-error} is also non-@code{nil}, then | ||
| 610 | a backtrace is shown in one buffer, and the debugger is popped up in | ||
| 611 | another buffer with its own backtrace. | ||
| 612 | |||
| 613 | We consider this feature to be obsolete and superseded by the debugger | ||
| 614 | itself. | ||
| 615 | @end defopt | ||
| 616 | @end ignore | ||
| 617 | |||
| 618 | @defvar debug-on-next-call | 599 | @defvar debug-on-next-call |
| 619 | @cindex @code{eval}, and debugging | 600 | @cindex @code{eval}, and debugging |
| 620 | @cindex @code{apply}, and debugging | 601 | @cindex @code{apply}, and debugging |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index bf7cd126a26..cfe4b8298fb 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -367,10 +367,9 @@ echo area, or @code{nil} if there is none. | |||
| 367 | When an operation can take a while to finish, you should inform the | 367 | When an operation can take a while to finish, you should inform the |
| 368 | user about the progress it makes. This way the user can estimate | 368 | user about the progress it makes. This way the user can estimate |
| 369 | remaining time and clearly see that Emacs is busy working, not hung. | 369 | remaining time and clearly see that Emacs is busy working, not hung. |
| 370 | A convenient way to do this is to use a @dfn{progress reporter}. | ||
| 370 | 371 | ||
| 371 | Functions listed in this section provide simple and efficient way of | 372 | Here is a working example that does nothing useful: |
| 372 | reporting operation progress. Here is a working example that does | ||
| 373 | nothing useful: | ||
| 374 | 373 | ||
| 375 | @smallexample | 374 | @smallexample |
| 376 | (let ((progress-reporter | 375 | (let ((progress-reporter |
| @@ -382,11 +381,11 @@ nothing useful: | |||
| 382 | (progress-reporter-done progress-reporter)) | 381 | (progress-reporter-done progress-reporter)) |
| 383 | @end smallexample | 382 | @end smallexample |
| 384 | 383 | ||
| 385 | @defun make-progress-reporter message min-value max-value &optional current-value min-change min-time | 384 | @defun make-progress-reporter message &optional min-value max-value current-value min-change min-time |
| 386 | This function creates and returns a @dfn{progress reporter}---an | 385 | This function creates and returns a progress reporter object, which |
| 387 | object you will use as an argument for all other functions listed | 386 | you will use as an argument for the other functions listed below. The |
| 388 | here. The idea is to precompute as much data as possible to make | 387 | idea is to precompute as much data as possible to make progress |
| 389 | progress reporting very fast. | 388 | reporting very fast. |
| 390 | 389 | ||
| 391 | When this progress reporter is subsequently used, it will display | 390 | When this progress reporter is subsequently used, it will display |
| 392 | @var{message} in the echo area, followed by progress percentage. | 391 | @var{message} in the echo area, followed by progress percentage. |
| @@ -394,24 +393,28 @@ When this progress reporter is subsequently used, it will display | |||
| 394 | on a filename, for instance, use @code{format} before calling this | 393 | on a filename, for instance, use @code{format} before calling this |
| 395 | function. | 394 | function. |
| 396 | 395 | ||
| 397 | @var{min-value} and @var{max-value} arguments stand for starting and | 396 | The arguments @var{min-value} and @var{max-value} should be numbers |
| 398 | final states of your operation. For instance, if you scan a buffer, | 397 | standing for the starting and final states of the operation. For |
| 399 | they should be the results of @code{point-min} and @code{point-max} | 398 | instance, an operation that ``scans'' a buffer should set these to the |
| 400 | correspondingly. It is required that @var{max-value} is greater than | 399 | results of @code{point-min} and @code{point-max} correspondingly. |
| 401 | @var{min-value}. If you create progress reporter when some part of | 400 | @var{max-value} should be greater than @var{min-value}. |
| 402 | the operation has already been completed, then specify | 401 | |
| 403 | @var{current-value} argument. But normally you should omit it or set | 402 | Alternatively, you can set @var{min-value} and @var{max-value} to |
| 404 | it to @code{nil}---it will default to @var{min-value} then. | 403 | @code{nil}. In that case, the progress reporter does not report |
| 405 | 404 | process percentages; it instead displays a ``spinner'' that rotates a | |
| 406 | Remaining arguments control the rate of echo area updates. Progress | 405 | notch each time you update the progress reporter. |
| 407 | reporter will wait for at least @var{min-change} more percents of the | 406 | |
| 408 | operation to be completed before printing next message. | 407 | If @var{min-value} and @var{max-value} are numbers, you can give the |
| 409 | @var{min-time} specifies the minimum time in seconds to pass between | 408 | argument @var{current-value} a numerical value specifying the initial |
| 410 | successive prints. It can be fractional. Depending on Emacs and | 409 | progress; if omitted, this defaults to @var{min-value}. |
| 411 | system capabilities, progress reporter may or may not respect this | 410 | |
| 412 | last argument or do it with varying precision. Default value for | 411 | The remaining arguments control the rate of echo area updates. The |
| 413 | @var{min-change} is 1 (one percent), for @var{min-time}---0.2 | 412 | progress reporter will wait for at least @var{min-change} more |
| 414 | (seconds.) | 413 | percents of the operation to be completed before printing next |
| 414 | message; the default is one percent. @var{min-time} specifies the | ||
| 415 | minimum time in seconds to pass between successive prints; the default | ||
| 416 | is 0.2 seconds. (On some operating systems, the progress reporter may | ||
| 417 | handle fractions of seconds with varying precision). | ||
| 415 | 418 | ||
| 416 | This function calls @code{progress-reporter-update}, so the first | 419 | This function calls @code{progress-reporter-update}, so the first |
| 417 | message is printed immediately. | 420 | message is printed immediately. |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index bb05f1b4a0b..a19af903027 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -765,8 +765,7 @@ Major and Minor Modes | |||
| 765 | * Major Modes:: Defining major modes. | 765 | * Major Modes:: Defining major modes. |
| 766 | * Minor Modes:: Defining minor modes. | 766 | * Minor Modes:: Defining minor modes. |
| 767 | * Mode Line Format:: Customizing the text that appears in the mode line. | 767 | * Mode Line Format:: Customizing the text that appears in the mode line. |
| 768 | * Imenu:: How a mode can provide a menu | 768 | * Imenu:: Providing a menu of definitions made in a buffer. |
| 769 | of definitions in the buffer. | ||
| 770 | * Font Lock Mode:: How modes can highlight text according to syntax. | 769 | * Font Lock Mode:: How modes can highlight text according to syntax. |
| 771 | * Desktop Save Mode:: How modes can have buffer state saved between | 770 | * Desktop Save Mode:: How modes can have buffer state saved between |
| 772 | Emacs sessions. | 771 | Emacs sessions. |
| @@ -778,12 +777,12 @@ Hooks | |||
| 778 | 777 | ||
| 779 | Major Modes | 778 | Major Modes |
| 780 | 779 | ||
| 781 | * Major Mode Basics:: | ||
| 782 | * Major Mode Conventions:: Coding conventions for keymaps, etc. | 780 | * Major Mode Conventions:: Coding conventions for keymaps, etc. |
| 783 | * Auto Major Mode:: How Emacs chooses the major mode automatically. | 781 | * Auto Major Mode:: How Emacs chooses the major mode automatically. |
| 784 | * Mode Help:: Finding out how to use a mode. | 782 | * Mode Help:: Finding out how to use a mode. |
| 785 | * Derived Modes:: Defining a new major mode based on another major | 783 | * Derived Modes:: Defining a new major mode based on another major |
| 786 | mode. | 784 | mode. |
| 785 | * Basic Major Modes:: Modes that other modes are often derived from. | ||
| 787 | * Generic Modes:: Defining a simple major mode that supports | 786 | * Generic Modes:: Defining a simple major mode that supports |
| 788 | comment syntax and Font Lock mode. | 787 | comment syntax and Font Lock mode. |
| 789 | * Mode Hooks:: Hooks run at the end of major mode functions. | 788 | * Mode Hooks:: Hooks run at the end of major mode functions. |
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 4d992bd2c51..bd904bf49c0 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -203,17 +203,6 @@ When this command is called interactively, it prompts for | |||
| 203 | @var{filename}. | 203 | @var{filename}. |
| 204 | @end deffn | 204 | @end deffn |
| 205 | 205 | ||
| 206 | @deffn Command view-file filename | ||
| 207 | This command visits @var{filename} using View mode, returning to the | ||
| 208 | previous buffer when you exit View mode. View mode is a minor mode that | ||
| 209 | provides commands to skim rapidly through the file, but does not let you | ||
| 210 | modify the text. Entering View mode runs the normal hook | ||
| 211 | @code{view-mode-hook}. @xref{Hooks}. | ||
| 212 | |||
| 213 | When @code{view-file} is called interactively, it prompts for | ||
| 214 | @var{filename}. | ||
| 215 | @end deffn | ||
| 216 | |||
| 217 | @defopt find-file-wildcards | 206 | @defopt find-file-wildcards |
| 218 | If this variable is non-@code{nil}, then the various @code{find-file} | 207 | If this variable is non-@code{nil}, then the various @code{find-file} |
| 219 | commands check for wildcard characters and visit all the files that | 208 | commands check for wildcard characters and visit all the files that |
| @@ -1529,19 +1518,26 @@ This function is not available on systems that don't support symbolic | |||
| 1529 | links. | 1518 | links. |
| 1530 | @end deffn | 1519 | @end deffn |
| 1531 | 1520 | ||
| 1532 | @deffn Command delete-file filename | 1521 | @cindex trash |
| 1522 | @vindex delete-by-moving-to-trash | ||
| 1523 | @deffn Command delete-file filename &optional trash | ||
| 1533 | @pindex rm | 1524 | @pindex rm |
| 1534 | This command deletes the file @var{filename}, like the shell command | 1525 | This command deletes the file @var{filename}. If the file has |
| 1535 | @samp{rm @var{filename}}. If the file has multiple names, it continues | 1526 | multiple names, it continues to exist under the other names. If |
| 1536 | to exist under the other names. | 1527 | @var{filename} is a symbolic link, @code{delete-file} deletes only the |
| 1537 | 1528 | symbolic link and not its target (though it does follow symbolic links | |
| 1538 | A suitable kind of @code{file-error} error is signaled if the file does | 1529 | at all levels of parent directories). |
| 1539 | not exist, or is not deletable. (On Unix and GNU/Linux, a file is | 1530 | |
| 1540 | deletable if its directory is writable.) | 1531 | A suitable kind of @code{file-error} error is signaled if the file |
| 1541 | 1532 | does not exist, or is not deletable. (On Unix and GNU/Linux, a file | |
| 1542 | If @var{filename} is a symbolic link, @code{delete-file} does not | 1533 | is deletable if its directory is writable.) |
| 1543 | replace it with its target, but it does follow symbolic links at all | 1534 | |
| 1544 | levels of parent directories. | 1535 | If the optional argument @var{trash} is non-@code{nil} and the |
| 1536 | variable @code{delete-by-moving-to-trash} is non-@code{nil}, this | ||
| 1537 | command moves the file into the system Trash instead of deleting it. | ||
| 1538 | @xref{Misc File Ops,,Miscellaneous File Operations, emacs, The GNU | ||
| 1539 | Emacs Manual}. When called interactively, @var{trash} is @code{t} if | ||
| 1540 | no prefix argument is given, and @code{nil} otherwise. | ||
| 1545 | 1541 | ||
| 1546 | See also @code{delete-directory} in @ref{Create/Delete Dirs}. | 1542 | See also @code{delete-directory} in @ref{Create/Delete Dirs}. |
| 1547 | @end deffn | 1543 | @end deffn |
| @@ -2507,7 +2503,7 @@ if they don't already exist. | |||
| 2507 | @code{mkdir} is an alias for this. | 2503 | @code{mkdir} is an alias for this. |
| 2508 | @end deffn | 2504 | @end deffn |
| 2509 | 2505 | ||
| 2510 | @deffn Command copy-directory dirname newname &optional keep-time parents | 2506 | @deffn Command copy-directory dirname newname &optional keep-time parents copy-contents |
| 2511 | This command copies the directory named @var{dirname} to | 2507 | This command copies the directory named @var{dirname} to |
| 2512 | @var{newname}. If @var{newname} names an existing directory, | 2508 | @var{newname}. If @var{newname} names an existing directory, |
| 2513 | @var{dirname} will be copied to a subdirectory there. | 2509 | @var{dirname} will be copied to a subdirectory there. |
| @@ -2515,16 +2511,23 @@ This command copies the directory named @var{dirname} to | |||
| 2515 | It always sets the file modes of the copied files to match the | 2511 | It always sets the file modes of the copied files to match the |
| 2516 | corresponding original file. | 2512 | corresponding original file. |
| 2517 | 2513 | ||
| 2518 | The third arg @var{keep-time} non-@code{nil} means to preserve the | 2514 | The third argument @var{keep-time} non-@code{nil} means to preserve the |
| 2519 | modification time of the copied files. A prefix arg makes | 2515 | modification time of the copied files. A prefix arg makes |
| 2520 | @var{keep-time} non-@code{nil}. | 2516 | @var{keep-time} non-@code{nil}. |
| 2521 | 2517 | ||
| 2522 | Noninteractively, the last argument @var{parents} says whether to | 2518 | The fourth argument @var{parents} says whether to |
| 2523 | create parent directories if they don't exist. Interactively, | 2519 | create parent directories if they don't exist. Interactively, |
| 2524 | this happens by default. | 2520 | this happens by default. |
| 2521 | |||
| 2522 | The fifth argument @var{copy-contents}, if non-@code{nil}, means to | ||
| 2523 | copy the contents of @var{dirname} directly into @var{newname} if the | ||
| 2524 | latter is an existing directory, instead of copying @var{dirname} into | ||
| 2525 | it as a subdirectory. | ||
| 2525 | @end deffn | 2526 | @end deffn |
| 2526 | 2527 | ||
| 2527 | @deffn Command delete-directory dirname &optional recursive | 2528 | @cindex trash |
| 2529 | @vindex delete-by-moving-to-trash | ||
| 2530 | @deffn Command delete-directory dirname &optional recursive trash | ||
| 2528 | This command deletes the directory named @var{dirname}. The function | 2531 | This command deletes the directory named @var{dirname}. The function |
| 2529 | @code{delete-file} does not work for files that are directories; you | 2532 | @code{delete-file} does not work for files that are directories; you |
| 2530 | must use @code{delete-directory} for them. If @var{recursive} is | 2533 | must use @code{delete-directory} for them. If @var{recursive} is |
| @@ -2533,6 +2536,13 @@ must use @code{delete-directory} for them. If @var{recursive} is | |||
| 2533 | 2536 | ||
| 2534 | @code{delete-directory} only follows symbolic links at the level of | 2537 | @code{delete-directory} only follows symbolic links at the level of |
| 2535 | parent directories. | 2538 | parent directories. |
| 2539 | |||
| 2540 | If the optional argument @var{trash} is non-@code{nil} and the | ||
| 2541 | variable @code{delete-by-moving-to-trash} is non-@code{nil}, this | ||
| 2542 | command moves the file into the system Trash instead of deleting it. | ||
| 2543 | @xref{Misc File Ops,,Miscellaneous File Operations, emacs, The GNU | ||
| 2544 | Emacs Manual}. When called interactively, @var{trash} is @code{t} if | ||
| 2545 | no prefix argument is given, and @code{nil} otherwise. | ||
| 2536 | @end deffn | 2546 | @end deffn |
| 2537 | 2547 | ||
| 2538 | @node Magic File Names | 2548 | @node Magic File Names |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index b6012a4dd53..e799cfa6b7f 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -695,20 +695,19 @@ right fringe. However, you can force one fringe or the other to a | |||
| 695 | precise width by specifying that width as a negative integer. If both | 695 | precise width by specifying that width as a negative integer. If both |
| 696 | widths are negative, only the left fringe gets the specified width. | 696 | widths are negative, only the left fringe gets the specified width. |
| 697 | 697 | ||
| 698 | @vindex menu-bar-lines, a frame parameter | 698 | @vindex menu-bar-lines frame parameter |
| 699 | @item menu-bar-lines | 699 | @item menu-bar-lines |
| 700 | The number of lines to allocate at the top of the frame for a menu | 700 | The number of lines to allocate at the top of the frame for a menu |
| 701 | bar. The default is 1. A value of @code{nil} means don't display a | 701 | bar. The default is 1 if Menu Bar mode is enabled, and 0 otherwise. |
| 702 | menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one | 702 | @xref{Menu Bars,,,emacs, The GNU Emacs Manual}. |
| 703 | menu bar line; they treat larger values as 1.) | ||
| 704 | 703 | ||
| 705 | @vindex tool-bar-lines, a frame parameter | 704 | @vindex tool-bar-lines frame parameter |
| 706 | @item tool-bar-lines | 705 | @item tool-bar-lines |
| 707 | The number of lines to use for the tool bar. A value of @code{nil} | 706 | The number of lines to use for the tool bar. The default is 1 if Tool |
| 708 | means don't display a tool bar. (GTK and Nextstep allow at most one | 707 | Bar mode is enabled, and 0 otherwise. @xref{Tool Bars,,,emacs, The |
| 709 | tool bar line; they treat larger values as 1.) | 708 | GNU Emacs Manual}. |
| 710 | 709 | ||
| 711 | @vindex tool-bar-position, a frame parameter | 710 | @vindex tool-bar-position frame parameter |
| 712 | @item tool-bar-position | 711 | @item tool-bar-position |
| 713 | The position of the tool bar. Currently only for the GTK tool bar. | 712 | The position of the tool bar. Currently only for the GTK tool bar. |
| 714 | Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. | 713 | Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index a354265b365..586fc0bbbfb 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -19,16 +19,15 @@ user. For related topics such as keymaps and syntax tables, see | |||
| 19 | @ref{Keymaps}, and @ref{Syntax Tables}. | 19 | @ref{Keymaps}, and @ref{Syntax Tables}. |
| 20 | 20 | ||
| 21 | @menu | 21 | @menu |
| 22 | * Hooks:: How to use hooks; how to write code that provides hooks. | 22 | * Hooks:: How to use hooks; how to write code that provides hooks. |
| 23 | * Major Modes:: Defining major modes. | 23 | * Major Modes:: Defining major modes. |
| 24 | * Minor Modes:: Defining minor modes. | 24 | * Minor Modes:: Defining minor modes. |
| 25 | * Mode Line Format:: Customizing the text that appears in the mode line. | 25 | * Mode Line Format:: Customizing the text that appears in the mode line. |
| 26 | * Imenu:: How a mode can provide a menu | 26 | * Imenu:: Providing a menu of definitions made in a buffer. |
| 27 | of definitions in the buffer. | 27 | * Font Lock Mode:: How modes can highlight text according to syntax. |
| 28 | * Font Lock Mode:: How modes can highlight text according to syntax. | 28 | * Auto-Indentation:: How to teach Emacs to indent for a major mode. |
| 29 | * Auto-Indentation:: How to teach Emacs to indent for a major mode. | 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. | ||
| 32 | @end menu | 31 | @end menu |
| 33 | 32 | ||
| 34 | @node Hooks | 33 | @node Hooks |
| @@ -48,12 +47,12 @@ convention, whenever the hook name ends in @samp{-hook}, that tells | |||
| 48 | you it is normal. We try to make all hooks normal, as much as | 47 | you it is normal. We try to make all hooks normal, as much as |
| 49 | possible, so that you can use them in a uniform way. | 48 | possible, so that you can use them in a uniform way. |
| 50 | 49 | ||
| 51 | Every major mode function is supposed to run a normal hook called | 50 | Every major mode command is supposed to run a normal hook called the |
| 52 | the @dfn{mode hook} as the one of the last steps of initialization. | 51 | @dfn{mode hook} as the one of the last steps of initialization. This |
| 53 | This makes it easy for a user to customize the behavior of the mode, | 52 | makes it easy for a user to customize the behavior of the mode, by |
| 54 | by overriding the buffer-local variable assignments already made by | 53 | overriding the buffer-local variable assignments already made by the |
| 55 | the mode. Most minor mode functions also run a mode hook at the end. | 54 | mode. Most minor mode functions also run a mode hook at the end. But |
| 56 | But hooks are used in other contexts too. For example, the hook | 55 | hooks are used in other contexts too. For example, the hook |
| 57 | @code{suspend-hook} runs just before Emacs suspends itself | 56 | @code{suspend-hook} runs just before Emacs suspends itself |
| 58 | (@pxref{Suspending Emacs}). | 57 | (@pxref{Suspending Emacs}). |
| 59 | 58 | ||
| @@ -78,8 +77,8 @@ convention. | |||
| 78 | its value is just a single function, not a list of functions. | 77 | its value is just a single function, not a list of functions. |
| 79 | 78 | ||
| 80 | @menu | 79 | @menu |
| 81 | * Running Hooks:: How to run a hook. | 80 | * Running Hooks:: How to run a hook. |
| 82 | * Setting Hooks:: How to put functions on a hook, or remove them. | 81 | * Setting Hooks:: How to put functions on a hook, or remove them. |
| 83 | @end menu | 82 | @end menu |
| 84 | 83 | ||
| 85 | @node Running Hooks | 84 | @node Running Hooks |
| @@ -195,115 +194,98 @@ from the buffer-local hook list instead of from the global hook list. | |||
| 195 | @section Major Modes | 194 | @section Major Modes |
| 196 | @cindex major mode | 195 | @cindex major mode |
| 197 | 196 | ||
| 197 | @cindex major mode command | ||
| 198 | Major modes specialize Emacs for editing particular kinds of text. | 198 | Major modes specialize Emacs for editing particular kinds of text. |
| 199 | Each buffer has only one major mode at a time. For each major mode | 199 | Each buffer has one major mode at a time. Every major mode is |
| 200 | there is a function to switch to that mode in the current buffer; its | 200 | associated with a @dfn{major mode command}, whose name should end in |
| 201 | name should end in @samp{-mode}. These functions work by setting | 201 | @samp{-mode}. This command takes care of switching to that mode in the |
| 202 | buffer-local variable bindings and other data associated with the | 202 | current buffer, by setting various buffer-local variables such as a |
| 203 | buffer, such as a local keymap. The effect lasts until you switch | 203 | local keymap. @xref{Major Mode Conventions}. |
| 204 | to another major mode in the same buffer. | 204 | |
| 205 | The least specialized major mode is called @dfn{Fundamental mode}, | ||
| 206 | which has no mode-specific definitions or variable settings. | ||
| 207 | |||
| 208 | @deffn Command fundamental-mode | ||
| 209 | This is the major mode command for Fundamental mode. Unlike other mode | ||
| 210 | commands, it does @emph{not} run any mode hooks (@pxref{Major Mode | ||
| 211 | Conventions}), since you are not supposed to customize this mode. | ||
| 212 | @end deffn | ||
| 213 | |||
| 214 | The easiest way to write a major mode is to use the macro | ||
| 215 | @code{define-derived-mode}, which sets up the new mode as a variant of | ||
| 216 | an existing major mode. @xref{Derived Modes}. We recommend using | ||
| 217 | @code{define-derived-mode} even if the new mode is not an obvious | ||
| 218 | derivative of another mode, as it automatically enforces many coding | ||
| 219 | conventions for you. @xref{Basic Major Modes}, for common modes to | ||
| 220 | derive from. | ||
| 221 | |||
| 222 | The standard GNU Emacs Lisp directory tree contains the code for | ||
| 223 | several major modes, in files such as @file{text-mode.el}, | ||
| 224 | @file{texinfo.el}, @file{lisp-mode.el}, and @file{rmail.el}. You can | ||
| 225 | study these libraries to see how modes are written. | ||
| 226 | |||
| 227 | @defopt major-mode | ||
| 228 | The buffer-local value of this variable is a symbol naming the buffer's | ||
| 229 | current major mode. Its default value holds the default major mode for | ||
| 230 | new buffers. The standard default value is @code{fundamental-mode}. | ||
| 231 | |||
| 232 | If the default value is @code{nil}, then whenever Emacs creates a new | ||
| 233 | buffer via a command such as @kbd{C-x b} (@code{switch-to-buffer}), the | ||
| 234 | new buffer is put in the major mode of the previously current buffer. | ||
| 235 | As an exception, if the major mode of the previous buffer has a | ||
| 236 | @code{mode-class} symbol property with value @code{special}, the new | ||
| 237 | buffer is put in Fundamental mode (@pxref{Major Mode Conventions}). | ||
| 238 | @end defopt | ||
| 205 | 239 | ||
| 206 | @menu | 240 | @menu |
| 207 | * Major Mode Basics:: | 241 | * Major Mode Conventions:: Coding conventions for keymaps, etc. |
| 208 | * Major Mode Conventions:: Coding conventions for keymaps, etc. | 242 | * Auto Major Mode:: How Emacs chooses the major mode automatically. |
| 209 | * Auto Major Mode:: How Emacs chooses the major mode automatically. | 243 | * Mode Help:: Finding out how to use a mode. |
| 210 | * Mode Help:: Finding out how to use a mode. | 244 | * Derived Modes:: Defining a new major mode based on another major |
| 211 | * Derived Modes:: Defining a new major mode based on another major | ||
| 212 | mode. | 245 | mode. |
| 213 | * Generic Modes:: Defining a simple major mode that supports | 246 | * Basic Major Modes:: Modes that other modes are often derived from. |
| 247 | * Generic Modes:: Defining a simple major mode that supports | ||
| 214 | comment syntax and Font Lock mode. | 248 | comment syntax and Font Lock mode. |
| 215 | * Mode Hooks:: Hooks run at the end of major mode functions. | 249 | * Mode Hooks:: Hooks run at the end of major mode commands. |
| 216 | * Example Major Modes:: Text mode and Lisp modes. | 250 | * Example Major Modes:: Text mode and Lisp modes. |
| 217 | @end menu | 251 | @end menu |
| 218 | 252 | ||
| 219 | @node Major Mode Basics | ||
| 220 | @subsection Major Mode Basics | ||
| 221 | @cindex Fundamental mode | ||
| 222 | |||
| 223 | The least specialized major mode is called @dfn{Fundamental mode}. | ||
| 224 | This mode has no mode-specific definitions or variable settings, so each | ||
| 225 | Emacs command behaves in its default manner, and each option is in its | ||
| 226 | default state. All other major modes redefine various keys and options. | ||
| 227 | For example, Lisp Interaction mode provides special key bindings for | ||
| 228 | @kbd{C-j} (@code{eval-print-last-sexp}), @key{TAB} | ||
| 229 | (@code{lisp-indent-line}), and other keys. | ||
| 230 | |||
| 231 | When you need to write several editing commands to help you perform a | ||
| 232 | specialized editing task, creating a new major mode is usually a good | ||
| 233 | idea. In practice, writing a major mode is easy (in contrast to | ||
| 234 | writing a minor mode, which is often difficult). | ||
| 235 | |||
| 236 | If the new mode is similar to an old one, it is often unwise to | ||
| 237 | modify the old one to serve two purposes, since it may become harder | ||
| 238 | to use and maintain. Instead, copy and rename an existing major mode | ||
| 239 | definition and alter the copy---or use the @code{define-derived-mode} | ||
| 240 | macro to define a @dfn{derived mode} (@pxref{Derived Modes}). For | ||
| 241 | example, Rmail Edit mode is a major mode that is very similar to Text | ||
| 242 | mode except that it provides two additional commands. Its definition | ||
| 243 | is distinct from that of Text mode, but uses that of Text mode. | ||
| 244 | |||
| 245 | Even if the new mode is not an obvious derivative of any other mode, | ||
| 246 | we recommend to use @code{define-derived-mode}, since it automatically | ||
| 247 | enforces the most important coding conventions for you. | ||
| 248 | |||
| 249 | For a very simple programming language major mode that handles | ||
| 250 | comments and fontification, you can use @code{define-generic-mode}. | ||
| 251 | @xref{Generic Modes}. | ||
| 252 | |||
| 253 | Rmail Edit mode offers an example of changing the major mode | ||
| 254 | temporarily for a buffer, so it can be edited in a different way (with | ||
| 255 | ordinary Emacs commands rather than Rmail commands). In such cases, the | ||
| 256 | temporary major mode usually provides a command to switch back to the | ||
| 257 | buffer's usual mode (Rmail mode, in this case). You might be tempted to | ||
| 258 | present the temporary redefinitions inside a recursive edit and restore | ||
| 259 | the usual ones when the user exits; but this is a bad idea because it | ||
| 260 | constrains the user's options when it is done in more than one buffer: | ||
| 261 | recursive edits must be exited most-recently-entered first. Using an | ||
| 262 | alternative major mode avoids this limitation. @xref{Recursive | ||
| 263 | Editing}. | ||
| 264 | |||
| 265 | The standard GNU Emacs Lisp library directory tree contains the code | ||
| 266 | for several major modes, in files such as @file{text-mode.el}, | ||
| 267 | @file{texinfo.el}, @file{lisp-mode.el}, @file{c-mode.el}, and | ||
| 268 | @file{rmail.el}. They are found in various subdirectories of the | ||
| 269 | @file{lisp} directory. You can study these libraries to see how modes | ||
| 270 | are written. Text mode is perhaps the simplest major mode aside from | ||
| 271 | Fundamental mode. Rmail mode is a complicated and specialized mode. | ||
| 272 | |||
| 273 | @node Major Mode Conventions | 253 | @node Major Mode Conventions |
| 274 | @subsection Major Mode Conventions | 254 | @subsection Major Mode Conventions |
| 275 | @cindex major mode conventions | 255 | @cindex major mode conventions |
| 276 | @cindex conventions for writing major modes | 256 | @cindex conventions for writing major modes |
| 277 | 257 | ||
| 278 | The code for existing major modes follows various coding conventions, | 258 | The code for every major mode should follow various coding |
| 279 | including conventions for local keymap and syntax table initialization, | 259 | conventions, including conventions for local keymap and syntax table |
| 280 | global names, and hooks. Please follow these conventions when you | 260 | initialization, function and variable names, and hooks. |
| 281 | define a new major mode. (Fundamental mode is an exception to many | 261 | |
| 282 | of these conventions, because its definition is to present the global | 262 | If you use the @code{define-derived-mode} macro, it will take care of |
| 283 | state of Emacs.) | 263 | many of these conventions automatically. @xref{Derived Modes}. Note |
| 264 | also that fundamental mode is an exception to many of these conventions, | ||
| 265 | because its definition is to present the global state of Emacs. | ||
| 284 | 266 | ||
| 285 | This list of conventions is only partial, because each major mode | 267 | The following list of conventions is only partial. Each major mode |
| 286 | should aim for consistency in general with other Emacs major modes. | 268 | should aim for consistency in general with other Emacs major modes, as |
| 287 | This makes Emacs as a whole more coherent. It is impossible to list | 269 | this makes Emacs as a whole more coherent. It is impossible to list |
| 288 | here all the possible points where this issue might come up; if the | 270 | here all the possible points where this issue might come up; if the |
| 289 | Emacs developers point out an area where your major mode deviates from | 271 | Emacs developers point out an area where your major mode deviates from |
| 290 | the usual conventions, please make it compatible. | 272 | the usual conventions, please make it compatible. |
| 291 | 273 | ||
| 292 | @itemize @bullet | 274 | @itemize @bullet |
| 293 | @item | 275 | @item |
| 294 | Define a command whose name ends in @samp{-mode}, with no arguments, | 276 | Define a major mode command whose name ends in @samp{-mode}. When |
| 295 | that switches to the new mode in the current buffer. This command | 277 | called with no arguments, this command should switch to the new mode in |
| 296 | should set up the keymap, syntax table, and buffer-local variables in an | 278 | the current buffer by setting up the keymap, syntax table, and |
| 297 | existing buffer, without changing the buffer's contents. | 279 | buffer-local variables in an existing buffer. It should not change the |
| 280 | buffer's contents. | ||
| 298 | 281 | ||
| 299 | @item | 282 | @item |
| 300 | Write a documentation string for this command that describes the | 283 | Write a documentation string for this command that describes the special |
| 301 | special commands available in this mode. @kbd{C-h m} | 284 | commands available in this mode. @xref{Mode Help}. |
| 302 | (@code{describe-mode}) in your mode will display this string. | ||
| 303 | 285 | ||
| 304 | The documentation string may include the special documentation | 286 | The documentation string may include the special documentation |
| 305 | substrings, @samp{\[@var{command}]}, @samp{\@{@var{keymap}@}}, and | 287 | substrings, @samp{\[@var{command}]}, @samp{\@{@var{keymap}@}}, and |
| 306 | @samp{\<@var{keymap}>}, which enable the documentation to adapt | 288 | @samp{\<@var{keymap}>}, which allow the help display to adapt |
| 307 | automatically to the user's own key bindings. @xref{Keys in | 289 | automatically to the user's own key bindings. @xref{Keys in |
| 308 | Documentation}. | 290 | Documentation}. |
| 309 | 291 | ||
| @@ -527,10 +509,9 @@ mode when creating new buffers (@pxref{Auto Major Mode}), but with such | |||
| 527 | Dired, Rmail, and Buffer List use this feature. | 509 | Dired, Rmail, and Buffer List use this feature. |
| 528 | 510 | ||
| 529 | The @code{define-derived-mode} macro automatically marks the derived | 511 | The @code{define-derived-mode} macro automatically marks the derived |
| 530 | mode as special if the parent mode is special. The special mode | 512 | mode as special if the parent mode is special. Special mode is a |
| 531 | @code{special-mode} provides a convenient parent for other special | 513 | convenient parent for such modes to inherit from; @xref{Basic Major |
| 532 | modes to inherit from; it sets @code{buffer-read-only} to @code{t}, | 514 | Modes}. |
| 533 | and does little else. | ||
| 534 | 515 | ||
| 535 | @item | 516 | @item |
| 536 | If you want to make the new mode the default for files with certain | 517 | If you want to make the new mode the default for files with certain |
| @@ -564,16 +545,6 @@ Even if you never load the file more than once, someone else will. | |||
| 564 | automatically selects a major mode for the new buffer when a file is | 545 | automatically selects a major mode for the new buffer when a file is |
| 565 | visited. It also processes local variables specified in the file text. | 546 | visited. It also processes local variables specified in the file text. |
| 566 | 547 | ||
| 567 | @deffn Command fundamental-mode | ||
| 568 | Fundamental mode is a major mode that is not specialized for anything | ||
| 569 | in particular. Other major modes are defined in effect by comparison | ||
| 570 | with this one---their definitions say what to change, starting from | ||
| 571 | Fundamental mode. The @code{fundamental-mode} function does @emph{not} | ||
| 572 | run any mode hooks; you're not supposed to customize it. (If you want Emacs | ||
| 573 | to behave differently in Fundamental mode, change the @emph{global} | ||
| 574 | state of Emacs.) | ||
| 575 | @end deffn | ||
| 576 | |||
| 577 | @deffn Command normal-mode &optional find-file | 548 | @deffn Command normal-mode &optional find-file |
| 578 | This function establishes the proper major mode and buffer-local variable | 549 | This function establishes the proper major mode and buffer-local variable |
| 579 | bindings for the current buffer. First it calls @code{set-auto-mode} | 550 | bindings for the current buffer. First it calls @code{set-auto-mode} |
| @@ -599,23 +570,22 @@ by the default value of @code{major-mode} (see below). | |||
| 599 | 570 | ||
| 600 | @cindex file mode specification error | 571 | @cindex file mode specification error |
| 601 | @code{normal-mode} uses @code{condition-case} around the call to the | 572 | @code{normal-mode} uses @code{condition-case} around the call to the |
| 602 | major mode function, so errors are caught and reported as a @samp{File | 573 | major mode command, so errors are caught and reported as a @samp{File |
| 603 | mode specification error}, followed by the original error message. | 574 | mode specification error}, followed by the original error message. |
| 604 | @end deffn | 575 | @end deffn |
| 605 | 576 | ||
| 606 | @defun set-auto-mode &optional keep-mode-if-same | 577 | @defun set-auto-mode &optional keep-mode-if-same |
| 607 | @cindex visited file mode | 578 | @cindex visited file mode |
| 608 | This function selects the major mode that is appropriate for the | 579 | This function selects the major mode that is appropriate for the |
| 609 | current buffer. It bases its decision (in order of precedence) on | 580 | current buffer. It bases its decision (in order of precedence) on the |
| 610 | the @w{@samp{-*-}} line, on any @samp{mode:} local variable near the | 581 | @w{@samp{-*-}} line, on any @samp{mode:} local variable near the end of |
| 611 | end of a file, on the @w{@samp{#!}} line (using | 582 | a file, on the @w{@samp{#!}} line (using @code{interpreter-mode-alist}), |
| 612 | @code{interpreter-mode-alist}), on the text at the beginning of the | 583 | on the text at the beginning of the buffer (using |
| 613 | buffer (using @code{magic-mode-alist}), and finally on the visited | 584 | @code{magic-mode-alist}), and finally on the visited file name (using |
| 614 | file name (using @code{auto-mode-alist}). @xref{Choosing Modes, , How | 585 | @code{auto-mode-alist}). @xref{Choosing Modes, , How Major Modes are |
| 615 | Major Modes are Chosen, emacs, The GNU Emacs Manual}. | 586 | Chosen, emacs, The GNU Emacs Manual}. If @code{enable-local-variables} |
| 616 | If @code{enable-local-variables} is @code{nil}, @code{set-auto-mode} | 587 | is @code{nil}, @code{set-auto-mode} does not check the @w{@samp{-*-}} |
| 617 | does not check the @w{@samp{-*-}} line, or near the end of the file, | 588 | line, or near the end of the file, for any mode tag. |
| 618 | for any mode tag. | ||
| 619 | 589 | ||
| 620 | If @var{keep-mode-if-same} is non-@code{nil}, this function does not | 590 | If @var{keep-mode-if-same} is non-@code{nil}, this function does not |
| 621 | call the mode command if the buffer is already in the proper major | 591 | call the mode command if the buffer is already in the proper major |
| @@ -624,21 +594,6 @@ mode. For instance, @code{set-visited-file-name} sets this to | |||
| 624 | have set. | 594 | have set. |
| 625 | @end defun | 595 | @end defun |
| 626 | 596 | ||
| 627 | @defopt major-mode | ||
| 628 | The buffer-local value of this variable holds the major mode | ||
| 629 | currently active. The default value of this variable holds the | ||
| 630 | default major mode for new buffers. The standard default value is | ||
| 631 | @code{fundamental-mode}. | ||
| 632 | |||
| 633 | If the default value of @code{major-mode} is @code{nil}, Emacs uses | ||
| 634 | the (previously) current buffer's major mode as the default major mode | ||
| 635 | of a new buffer. However, if that major mode symbol has a @code{mode-class} | ||
| 636 | property with value @code{special}, then it is not used for new buffers; | ||
| 637 | Fundamental mode is used instead. The modes that have this property are | ||
| 638 | those such as Dired and Rmail that are useful only with text that has | ||
| 639 | been specially prepared. | ||
| 640 | @end defopt | ||
| 641 | |||
| 642 | @defun set-buffer-major-mode buffer | 597 | @defun set-buffer-major-mode buffer |
| 643 | This function sets the major mode of @var{buffer} to the default value of | 598 | This function sets the major mode of @var{buffer} to the default value of |
| 644 | @code{major-mode}; if that is @code{nil}, it uses the | 599 | @code{major-mode}; if that is @code{nil}, it uses the |
| @@ -745,18 +700,17 @@ init file.) | |||
| 745 | @cindex help for major mode | 700 | @cindex help for major mode |
| 746 | @cindex documentation for major mode | 701 | @cindex documentation for major mode |
| 747 | 702 | ||
| 748 | The @code{describe-mode} function is used to provide information | 703 | The @code{describe-mode} function is provides information about major |
| 749 | about major modes. It is normally called with @kbd{C-h m}. The | 704 | modes. It is normally bound to @kbd{C-h m}. It uses the value of the |
| 750 | @code{describe-mode} function uses the value of @code{major-mode}, | 705 | variable @code{major-mode} (which is why every major mode command needs |
| 751 | which is why every major mode function needs to set the | 706 | to set this variable). |
| 752 | @code{major-mode} variable. | ||
| 753 | 707 | ||
| 754 | @deffn Command describe-mode | 708 | @deffn Command describe-mode |
| 755 | This function displays the documentation of the current major mode. | 709 | This function displays the documentation of the current major mode. |
| 756 | 710 | ||
| 757 | The @code{describe-mode} function calls the @code{documentation} | 711 | The @code{describe-mode} function calls the @code{documentation} |
| 758 | function using the value of @code{major-mode} as an argument. Thus, it | 712 | function using the value of @code{major-mode} as an argument. Thus, it |
| 759 | displays the documentation string of the major mode function. | 713 | displays the documentation string of the major mode command. |
| 760 | (@xref{Accessing Documentation}.) | 714 | (@xref{Accessing Documentation}.) |
| 761 | @end deffn | 715 | @end deffn |
| 762 | 716 | ||
| @@ -772,11 +726,12 @@ documentation of the major mode. | |||
| 772 | @subsection Defining Derived Modes | 726 | @subsection Defining Derived Modes |
| 773 | @cindex derived mode | 727 | @cindex derived mode |
| 774 | 728 | ||
| 775 | The recommended way to define a new major mode is to derive it | 729 | The recommended way to define a new major mode is to derive it from an |
| 776 | from an existing one using @code{define-derived-mode}. If there is no | 730 | existing one using @code{define-derived-mode}. If there is no closely |
| 777 | closely related mode, you can inherit from @code{text-mode}, | 731 | related mode, you should inherit from either @code{text-mode}, |
| 778 | @code{special-mode}, @code{prog-mode}, or in the worst case | 732 | @code{special-mode}, or @code{prog-mode}. @xref{Basic Major Modes}. If |
| 779 | @code{fundamental-mode}. | 733 | none of these are suitable, you can inherit from @code{fundamental-mode} |
| 734 | (@pxref{Major Modes}). | ||
| 780 | 735 | ||
| 781 | @defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} | 736 | @defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} |
| 782 | This macro defines @var{variant} as a major mode command, using | 737 | This macro defines @var{variant} as a major mode command, using |
| @@ -877,6 +832,64 @@ Do not write an @code{interactive} spec in the definition; | |||
| 877 | @code{define-derived-mode} does that automatically. | 832 | @code{define-derived-mode} does that automatically. |
| 878 | @end defmac | 833 | @end defmac |
| 879 | 834 | ||
| 835 | @defun derived-mode-p &rest modes | ||
| 836 | This function returns non-@code{nil} if the current major mode is | ||
| 837 | derived from any of the major modes given by the symbols @var{modes}. | ||
| 838 | @end defun | ||
| 839 | |||
| 840 | @node Basic Major Modes | ||
| 841 | @subsection Basic Major Modes | ||
| 842 | |||
| 843 | Apart from Fundamental mode, there are three major modes that other | ||
| 844 | major modes commonly derive from: Text mode, Prog mode, and Special | ||
| 845 | mode. While Text mode is useful in its own right (e.g. for editing | ||
| 846 | files ending in @file{.txt}), Prog mode and Special mode exist mainly to | ||
| 847 | let other modes derive from them. | ||
| 848 | |||
| 849 | @vindex prog-mode-hook | ||
| 850 | As far as possible, new major modes should be derived, either directly | ||
| 851 | or indirectly, from one of these three modes. One reason is that this | ||
| 852 | allows users to customize a single mode hook | ||
| 853 | (e.g. @code{prog-mode-hook}) for an entire family of relevant modes | ||
| 854 | (e.g. all programming language modes). | ||
| 855 | |||
| 856 | @deffn Command text-mode | ||
| 857 | Text mode is a major mode for editing human languages. It defines the | ||
| 858 | @samp{"} and @samp{\} characters as having punctuation syntax | ||
| 859 | (@pxref{Syntax Class Table}), and binds @kbd{M-@key{TAB}} to | ||
| 860 | @code{ispell-complete-word} (@pxref{Spelling,,, emacs, The GNU Emacs | ||
| 861 | Manual}). | ||
| 862 | |||
| 863 | An example of a major mode derived from Text mode is HTML mode. | ||
| 864 | @xref{HTML Mode,,SGML and HTML Modes, emacs, The GNU Emacs Manual}. | ||
| 865 | @end deffn | ||
| 866 | |||
| 867 | @deffn Command prog-mode | ||
| 868 | Prog mode is a basic major mode for buffers containing programming | ||
| 869 | language source code. Most of the programming language major modes | ||
| 870 | built into Emacs are derived from it. | ||
| 871 | |||
| 872 | Prog mode binds @code{parse-sexp-ignore-comments} to @code{t} | ||
| 873 | (@pxref{Motion via Parsing}) and @code{bidi-paragraph-direction} to | ||
| 874 | @code{left-to-right} (@pxref{Bidirectional Display}). | ||
| 875 | @end deffn | ||
| 876 | |||
| 877 | @deffn Command special-mode | ||
| 878 | Special mode is a basic major mode for buffers containing text that is | ||
| 879 | produced specially by Emacs, rather than from a file. Major modes | ||
| 880 | derived from Special mode are given a @code{mode-class} property of | ||
| 881 | @code{special} (@pxref{Major Mode Conventions}). | ||
| 882 | |||
| 883 | Special mode sets the buffer to read-only. Its keymap defines several | ||
| 884 | common bindings, including @kbd{q} for @code{quit-window}, @kbd{z} for | ||
| 885 | @code{kill-this-buffer}, and @kbd{g} for @code{revert-buffer} | ||
| 886 | (@pxref{Reverting}). | ||
| 887 | |||
| 888 | An example of a major mode derived from Special mode is Buffer Menu | ||
| 889 | mode, which is used by the @samp{*Buffer List*} buffer. @xref{List | ||
| 890 | Buffers,,Listing Existing Buffers, emacs, The GNU Emacs Manual}. | ||
| 891 | @end deffn | ||
| 892 | |||
| 880 | @node Generic Modes | 893 | @node Generic Modes |
| 881 | @subsection Generic Modes | 894 | @subsection Generic Modes |
| 882 | @cindex generic mode | 895 | @cindex generic mode |
| @@ -921,7 +934,7 @@ before it runs the mode hook variable @code{@var{mode}-hook}. | |||
| 921 | @node Mode Hooks | 934 | @node Mode Hooks |
| 922 | @subsection Mode Hooks | 935 | @subsection Mode Hooks |
| 923 | 936 | ||
| 924 | Every major mode function should finish by running its mode hook and | 937 | Every major mode command should finish by running its mode hook and |
| 925 | the mode-independent normal hook @code{after-change-major-mode-hook}. | 938 | the mode-independent normal hook @code{after-change-major-mode-hook}. |
| 926 | It does this by calling @code{run-mode-hooks}. If the major mode is a | 939 | It does this by calling @code{run-mode-hooks}. If the major mode is a |
| 927 | derived mode, that is if it calls another major mode (the parent mode) | 940 | derived mode, that is if it calls another major mode (the parent mode) |
| @@ -966,7 +979,7 @@ construct. | |||
| 966 | 979 | ||
| 967 | @defvar after-change-major-mode-hook | 980 | @defvar after-change-major-mode-hook |
| 968 | This is a normal hook run by @code{run-mode-hooks}. It is run at the | 981 | This is a normal hook run by @code{run-mode-hooks}. It is run at the |
| 969 | very end of every properly-written major mode function. | 982 | very end of every properly-written major mode command. |
| 970 | @end defvar | 983 | @end defvar |
| 971 | 984 | ||
| 972 | @node Example Major Modes | 985 | @node Example Major Modes |
| @@ -1194,8 +1207,8 @@ And here is the code to set up the keymap for Lisp mode: | |||
| 1194 | @end group | 1207 | @end group |
| 1195 | @end smallexample | 1208 | @end smallexample |
| 1196 | 1209 | ||
| 1197 | Finally, here is the complete major mode function definition for | 1210 | Finally, here is the complete major mode command definition for Lisp |
| 1198 | Lisp mode. | 1211 | mode. |
| 1199 | 1212 | ||
| 1200 | @smallexample | 1213 | @smallexample |
| 1201 | @group | 1214 | @group |
| @@ -2752,10 +2765,10 @@ highlighting patterns. See the variables | |||
| 2752 | @code{c-font-lock-extra-types}, @code{c++-font-lock-extra-types}, | 2765 | @code{c-font-lock-extra-types}, @code{c++-font-lock-extra-types}, |
| 2753 | and @code{java-font-lock-extra-types}, for example. | 2766 | and @code{java-font-lock-extra-types}, for example. |
| 2754 | 2767 | ||
| 2755 | @strong{Warning:} major mode functions must not call | 2768 | @strong{Warning:} major mode commands must not call |
| 2756 | @code{font-lock-add-keywords} under any circumstances, either directly | 2769 | @code{font-lock-add-keywords} under any circumstances, either directly |
| 2757 | or indirectly, except through their mode hooks. (Doing so would lead | 2770 | or indirectly, except through their mode hooks. (Doing so would lead to |
| 2758 | to incorrect behavior for some minor modes.) They should set up their | 2771 | incorrect behavior for some minor modes.) They should set up their |
| 2759 | rules for search-based fontification by setting | 2772 | rules for search-based fontification by setting |
| 2760 | @code{font-lock-keywords}. | 2773 | @code{font-lock-keywords}. |
| 2761 | @end defun | 2774 | @end defun |
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 6d63bb7b750..26def7858b7 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -597,6 +597,7 @@ FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.} | |||
| 597 | @end group | 597 | @end group |
| 598 | @end example | 598 | @end example |
| 599 | 599 | ||
| 600 | @cindex @samp{##} read syntax | ||
| 600 | @ifinfo | 601 | @ifinfo |
| 601 | @c This uses ``colon'' instead of a literal `:' because Info cannot | 602 | @c This uses ``colon'' instead of a literal `:' because Info cannot |
| 602 | @c cope with a `:' in a menu | 603 | @c cope with a `:' in a menu |
| @@ -605,9 +606,12 @@ FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.} | |||
| 605 | @ifnotinfo | 606 | @ifnotinfo |
| 606 | @cindex @samp{#:} read syntax | 607 | @cindex @samp{#:} read syntax |
| 607 | @end ifnotinfo | 608 | @end ifnotinfo |
| 608 | Normally the Lisp reader interns all symbols (@pxref{Creating | 609 | As an exception to the rule that a symbol's name serves as its |
| 609 | Symbols}). To prevent interning, you can write @samp{#:} before the | 610 | printed representation, @samp{##} is the printed representation for an |
| 610 | name of the symbol. | 611 | interned symbol whose name is an empty string. Furthermore, |
| 612 | @samp{#:@var{foo}} is the printed representation for an uninterned | ||
| 613 | symbol whose name is @var{foo}. (Normally, the Lisp reader interns | ||
| 614 | all symbols; @pxref{Creating Symbols}.) | ||
| 611 | 615 | ||
| 612 | @node Sequence Type | 616 | @node Sequence Type |
| 613 | @subsection Sequence Types | 617 | @subsection Sequence Types |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 8533b77b219..7d05f8f3468 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -544,10 +544,11 @@ parent process normally resumes control. The low-level primitive for | |||
| 544 | killing Emacs is @code{kill-emacs}. | 544 | killing Emacs is @code{kill-emacs}. |
| 545 | 545 | ||
| 546 | @deffn Command kill-emacs &optional exit-data | 546 | @deffn Command kill-emacs &optional exit-data |
| 547 | This command exits the Emacs process and kills it. | 547 | This command calls the hook @code{kill-emacs-hook}, then exits the |
| 548 | Emacs process and kills it. | ||
| 548 | 549 | ||
| 549 | If @var{exit-data} is an integer, then it is used as the exit status | 550 | If @var{exit-data} is an integer, that is used as the exit status of |
| 550 | of the Emacs process. (This is useful primarily in batch operation; see | 551 | the Emacs process. (This is useful primarily in batch operation; see |
| 551 | @ref{Batch Mode}.) | 552 | @ref{Batch Mode}.) |
| 552 | 553 | ||
| 553 | If @var{exit-data} is a string, its contents are stuffed into the | 554 | If @var{exit-data} is a string, its contents are stuffed into the |
| @@ -555,35 +556,44 @@ terminal input buffer so that the shell (or whatever program next reads | |||
| 555 | input) can read them. | 556 | input) can read them. |
| 556 | @end deffn | 557 | @end deffn |
| 557 | 558 | ||
| 558 | All the information in the Emacs process, aside from files that have | 559 | @cindex SIGTERM |
| 559 | been saved, is lost when the Emacs process is killed. Because killing | 560 | @cindex SIGHUP |
| 560 | Emacs inadvertently can lose a lot of work, Emacs queries for | 561 | @cindex SIGINT |
| 561 | confirmation before actually terminating if you have buffers that need | 562 | @cindex operating system signal |
| 562 | saving or subprocesses that are running. This is done in the function | 563 | The @code{kill-emacs} function is normally called via the |
| 563 | @code{save-buffers-kill-emacs}, the higher level function from which | 564 | higher-level command @kbd{C-x C-c} |
| 564 | @code{kill-emacs} is usually called. | 565 | (@code{save-buffers-kill-terminal}). @xref{Exiting,,, emacs, The GNU |
| 566 | Emacs Manual}. It is also called automatically if Emacs receives a | ||
| 567 | @code{SIGTERM} or @code{SIGHUP} operating system signal (e.g. when the | ||
| 568 | controlling terminal is disconnected), or if it receives a | ||
| 569 | @code{SIGINT} signal while running in batch mode (@pxref{Batch Mode}). | ||
| 565 | 570 | ||
| 566 | @defvar kill-emacs-query-functions | 571 | @defvar kill-emacs-hook |
| 567 | After asking the standard questions, @code{save-buffers-kill-emacs} | 572 | This normal hook is run by @code{kill-emacs}, before it kills Emacs. |
| 568 | calls the functions in the list @code{kill-emacs-query-functions}, in | 573 | |
| 569 | order of appearance, with no arguments. These functions can ask for | 574 | Because @code{kill-emacs} can be called in situations where user |
| 570 | additional confirmation from the user. If any of them returns | 575 | interaction is impossible (e.g. when the terminal is disconnected), |
| 571 | @code{nil}, @code{save-buffers-kill-emacs} does not kill Emacs, and | 576 | functions on this hook should not attempt to interact with the user. |
| 572 | does not run the remaining functions in this hook. Calling | 577 | If you want to interact with the user when Emacs is shutting down, use |
| 573 | @code{kill-emacs} directly does not run this hook. | 578 | @code{kill-emacs-query-functions}, described below. |
| 574 | @end defvar | 579 | @end defvar |
| 575 | 580 | ||
| 576 | @defvar kill-emacs-hook | 581 | When Emacs is killed, all the information in the Emacs process, |
| 577 | This variable is a normal hook; once @code{save-buffers-kill-emacs} is | 582 | aside from files that have been saved, is lost. Because killing Emacs |
| 578 | finished with all file saving and confirmation, it calls | 583 | inadvertently can lose a lot of work, the |
| 579 | @code{kill-emacs} which runs the functions in this hook. | 584 | @code{save-buffers-kill-terminal} command queries for confirmation if |
| 580 | 585 | you have buffers that need saving or subprocesses that are running. | |
| 581 | @code{kill-emacs} may be invoked directly (that is not via | 586 | It also runs the abnormal hook @code{kill-emacs-query-functions}: |
| 582 | @code{save-buffers-kill-emacs}) if the terminal is disconnected, or in | 587 | |
| 583 | similar situations where interaction with the user is not possible. | 588 | @defvar kill-emacs-query-functions |
| 584 | Thus, if your hook needs to interact with the user, put it on | 589 | When @code{save-buffers-kill-terminal} is killing Emacs, it calls the |
| 585 | @code{kill-emacs-query-functions}; if it needs to run regardless of | 590 | functions in this hook, after asking the standard questions and before |
| 586 | how Emacs is killed, put it on @code{kill-emacs-hook}. | 591 | calling @code{kill-emacs}. The functions are called in order of |
| 592 | appearance, with no arguments. Each function can ask for additional | ||
| 593 | confirmation from the user. If any of them returns @code{nil}, | ||
| 594 | @code{save-buffers-kill-emacs} does not kill Emacs, and does not run | ||
| 595 | the remaining functions in this hook. Calling @code{kill-emacs} | ||
| 596 | directly does not run this hook. | ||
| 587 | @end defvar | 597 | @end defvar |
| 588 | 598 | ||
| 589 | @node Suspending Emacs | 599 | @node Suspending Emacs |
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index 3b7718814b5..c192e3bf4b7 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -786,8 +786,7 @@ Major and Minor Modes | |||
| 786 | * Major Modes:: Defining major modes. | 786 | * Major Modes:: Defining major modes. |
| 787 | * Minor Modes:: Defining minor modes. | 787 | * Minor Modes:: Defining minor modes. |
| 788 | * Mode Line Format:: Customizing the text that appears in the mode line. | 788 | * Mode Line Format:: Customizing the text that appears in the mode line. |
| 789 | * Imenu:: How a mode can provide a menu | 789 | * Imenu:: Providing a menu of definitions made in a buffer. |
| 790 | of definitions in the buffer. | ||
| 791 | * Font Lock Mode:: How modes can highlight text according to syntax. | 790 | * Font Lock Mode:: How modes can highlight text according to syntax. |
| 792 | * Desktop Save Mode:: How modes can have buffer state saved between | 791 | * Desktop Save Mode:: How modes can have buffer state saved between |
| 793 | Emacs sessions. | 792 | Emacs sessions. |
| @@ -799,15 +798,15 @@ Hooks | |||
| 799 | 798 | ||
| 800 | Major Modes | 799 | Major Modes |
| 801 | 800 | ||
| 802 | * Major Mode Basics:: | ||
| 803 | * Major Mode Conventions:: Coding conventions for keymaps, etc. | 801 | * Major Mode Conventions:: Coding conventions for keymaps, etc. |
| 804 | * Auto Major Mode:: How Emacs chooses the major mode automatically. | 802 | * Auto Major Mode:: How Emacs chooses the major mode automatically. |
| 805 | * Mode Help:: Finding out how to use a mode. | 803 | * Mode Help:: Finding out how to use a mode. |
| 806 | * Derived Modes:: Defining a new major mode based on another major | 804 | * Derived Modes:: Defining a new major mode based on another major |
| 807 | mode. | 805 | mode. |
| 806 | * Basic Major Modes:: Modes that other modes are often derived from. | ||
| 808 | * Generic Modes:: Defining a simple major mode that supports | 807 | * Generic Modes:: Defining a simple major mode that supports |
| 809 | comment syntax and Font Lock mode. | 808 | comment syntax and Font Lock mode. |
| 810 | * Mode Hooks:: Hooks run at the end of major mode functions. | 809 | * Mode Hooks:: Hooks run at the end of major mode commands. |
| 811 | * Example Major Modes:: Text mode and Lisp modes. | 810 | * Example Major Modes:: Text mode and Lisp modes. |
| 812 | 811 | ||
| 813 | Minor Modes | 812 | Minor Modes |
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 22a51d3235c..8e78a5fb5ca 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -785,8 +785,7 @@ Major and Minor Modes | |||
| 785 | * Major Modes:: Defining major modes. | 785 | * Major Modes:: Defining major modes. |
| 786 | * Minor Modes:: Defining minor modes. | 786 | * Minor Modes:: Defining minor modes. |
| 787 | * Mode Line Format:: Customizing the text that appears in the mode line. | 787 | * Mode Line Format:: Customizing the text that appears in the mode line. |
| 788 | * Imenu:: How a mode can provide a menu | 788 | * Imenu:: Providing a menu of definitions made in a buffer. |
| 789 | of definitions in the buffer. | ||
| 790 | * Font Lock Mode:: How modes can highlight text according to syntax. | 789 | * Font Lock Mode:: How modes can highlight text according to syntax. |
| 791 | * Desktop Save Mode:: How modes can have buffer state saved between | 790 | * Desktop Save Mode:: How modes can have buffer state saved between |
| 792 | Emacs sessions. | 791 | Emacs sessions. |
| @@ -798,15 +797,15 @@ Hooks | |||
| 798 | 797 | ||
| 799 | Major Modes | 798 | Major Modes |
| 800 | 799 | ||
| 801 | * Major Mode Basics:: | ||
| 802 | * Major Mode Conventions:: Coding conventions for keymaps, etc. | 800 | * Major Mode Conventions:: Coding conventions for keymaps, etc. |
| 803 | * Auto Major Mode:: How Emacs chooses the major mode automatically. | 801 | * Auto Major Mode:: How Emacs chooses the major mode automatically. |
| 804 | * Mode Help:: Finding out how to use a mode. | 802 | * Mode Help:: Finding out how to use a mode. |
| 805 | * Derived Modes:: Defining a new major mode based on another major | 803 | * Derived Modes:: Defining a new major mode based on another major |
| 806 | mode. | 804 | mode. |
| 805 | * Basic Major Modes:: Modes that other modes are often derived from. | ||
| 807 | * Generic Modes:: Defining a simple major mode that supports | 806 | * Generic Modes:: Defining a simple major mode that supports |
| 808 | comment syntax and Font Lock mode. | 807 | comment syntax and Font Lock mode. |
| 809 | * Mode Hooks:: Hooks run at the end of major mode functions. | 808 | * Mode Hooks:: Hooks run at the end of major mode commands. |
| 810 | * Example Major Modes:: Text mode and Lisp modes. | 809 | * Example Major Modes:: Text mode and Lisp modes. |
| 811 | 810 | ||
| 812 | Minor Modes | 811 | Minor Modes |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 092aa6fb387..24c0fd54422 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-08-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * MACHINES: Remove obsolete info and update a bit (Bug#9404). | ||
| 4 | |||
| 5 | * PROBLEMS: Remove obsolete comment re Yellow Dog (Bug#9403). | ||
| 6 | |||
| 1 | 2011-08-24 Steve Chapel <schapel@laptop.stevechapel.com> (tiny change) | 7 | 2011-08-24 Steve Chapel <schapel@laptop.stevechapel.com> (tiny change) |
| 2 | 8 | ||
| 3 | * refcards/refcard.tex: Add a few more commands. (Bug#9343) | 9 | * refcards/refcard.tex: Add a few more commands. (Bug#9343) |
diff --git a/etc/MACHINES b/etc/MACHINES index 126ae40cb57..1e68376b94a 100644 --- a/etc/MACHINES +++ b/etc/MACHINES | |||
| @@ -24,227 +24,13 @@ file, and then edit the `configure' script to tell it which | |||
| 24 | configuration name(s) should select your new machine description and | 24 | configuration name(s) should select your new machine description and |
| 25 | system description files. | 25 | system description files. |
| 26 | 26 | ||
| 27 | Some obsolete platforms are unsupported beginning with Emacs 23.1, see | 27 | Some obsolete platforms are unsupported beginning with Emacs 23.1. See |
| 28 | the list at the end of this file. | 28 | the list at the end of this file. |
| 29 | 29 | ||
| 30 | 30 | ||
| 31 | ** Alpha (DEC) running GNU/Linux (alpha-dec-linux-gnu) | ||
| 32 | |||
| 33 | DEC C compiler version 5.9 (DEC C V5.9-005 on Digital UNIX V4.0f) | ||
| 34 | is reported to produce bogus binaries of Emacs 21.2 when the | ||
| 35 | command-line switches "-O4 -arch ev6 -tune ev6" are used. Using | ||
| 36 | just -O4 produces a good executable. | ||
| 37 | |||
| 38 | For 4.0 revision 564, and 4.0A and 4.0B, Emacs 20 seems to work | ||
| 39 | with no special configuration options. However, if you use GCC as | ||
| 40 | your compiler, you will need version 2.8.1 or later, as older | ||
| 41 | versions fail to build with a message "Invalid dimension for the | ||
| 42 | charset-ID 160". | ||
| 43 | |||
| 44 | ** Apple Macintosh running Mac OS X | ||
| 45 | |||
| 46 | ** Apple PowerPC Macintosh running GNU/Linux | ||
| 47 | |||
| 48 | ** HP 9000 series 700 or 800 (Spectrum) (hppa1.0-hp-hpux or hppa1.1-hp-hpux) | ||
| 49 | |||
| 50 | Emacs 20 may work on HPUX 10. You need patch PHSS_6202 to install | ||
| 51 | the Xaw and Xmu libraries. On HPUX 10.20 you may need to compile with GCC; | ||
| 52 | when Emacs was compiled with HP's C compiler, HP92453-01 A.10.32.03, | ||
| 53 | the subprocess features failed to work. | ||
| 54 | |||
| 55 | If you turn on the DSUSP character (delayed suspend), Emacs 19.26 | ||
| 56 | does not know how to turn it off on HPUX. You need to turn it off manually. | ||
| 57 | |||
| 58 | If you are running HP/UX release 8.0 or later, you need the optional | ||
| 59 | "C/ANSI C" software in order to build Emacs (older releases of HP/UX | ||
| 60 | do not require any special software). If the file "/etc/filesets/C" | ||
| 61 | exists on your machine, you have this software, otherwise you do not. | ||
| 62 | |||
| 63 | ** IBM RS/6000 (rs6000-ibm-aix*) | ||
| 64 | |||
| 65 | Emacs 19.26 is believed to work; its pretest was tested. | ||
| 66 | |||
| 67 | Compiling with the system's `cc' and CFLAGS containing `-O5' might | ||
| 68 | fail because libXbsd isn't found. This is a compiler bug; | ||
| 69 | re-configure Emacs so that it isn't compiled with `-O5'. | ||
| 70 | |||
| 71 | On AIX 4.3.x and 4.4, compiling with /bin/c89 fails because it | ||
| 72 | treats certain warnings as errors. Use `cc' instead. | ||
| 73 | |||
| 74 | At last report, Emacs didn't run well on terminals. Informed | ||
| 75 | persons say that the tty VMIN and VTIME settings have been | ||
| 76 | corrupted; if you have a fix, please send it to us. | ||
| 77 | |||
| 78 | Compiling with -O using the IBM compiler has been known to make | ||
| 79 | Emacs work incorrectly. There are reports that IBM compiler versions | ||
| 80 | earlier than 1.03.00.02 fail even without -O. | ||
| 81 | |||
| 82 | As of 19.11, if you strip the Emacs executable, it ceases to work. | ||
| 83 | |||
| 84 | If anyone can fix the above problems, or confirm that they don't happen | ||
| 85 | with certain versions of various programs, we would appreciate it. | ||
| 86 | |||
| 87 | ** IBM System/390 running GNU/Linux (s390-*-linux-gnu) | ||
| 88 | |||
| 89 | As of Emacs 21.2, a 31-bit only version is supported on this system. | ||
| 90 | |||
| 91 | ** Intel 386 (i386-*-freebsd, i386-*-linux-gnu, | ||
| 92 | i386-*-cygwin, i386-*-msdos, i386-*-windowsnt. | ||
| 93 | i386 can be replaced with i486, i586, or i686) | ||
| 94 | |||
| 95 | In the above configurations, * means that the manufacturer's name | ||
| 96 | you specify does not matter, and you can use any name you like | ||
| 97 | (but it should not contain any dashes or stars). | ||
| 98 | |||
| 99 | Use i386-*-linux-gnu for GNU/Linux systems; Emacs runs as of version 19.26. | ||
| 100 | Use i386-*-cygwin for Cygwin; Emacs builds as of version 22.1, in both X11 | ||
| 101 | and non-X11 modes. (The Cygwin site has source and binaries for 21.2.) | ||
| 102 | |||
| 103 | On GNU/Linux systems, Emacs 19.23 was said to work properly with libc | ||
| 104 | version 4.5.21, but not with 4.5.19. | ||
| 105 | |||
| 106 | On GNU/Linux, configure may fail to put these definitions in config.h: | ||
| 107 | |||
| 108 | #define HAVE_GETTIMEOFDAY | ||
| 109 | #define HAVE_MKDIR | ||
| 110 | #define HAVE_RMDIR | ||
| 111 | #define HAVE_XSCREENNUMBEROFSCREEN | ||
| 112 | |||
| 113 | To work around the problem, add those definitions by hand. | ||
| 114 | It is possible that this problem happens only with X11R6. | ||
| 115 | Newer system versions have fixed it. | ||
| 116 | |||
| 117 | On NetBSD and FreeBSD, at one time, it was necessary to use | ||
| 118 | GNU make, not the system's make. Assuming it's installed as gmake, | ||
| 119 | do `gmake install MAKE=gmake'. However, more recently it is | ||
| 120 | reported that using the system Make on NetBSD 1.3.1 works ok. | ||
| 121 | |||
| 122 | Note that use of Linux with GCC 2.4 and the DLL 4.4 libraries | ||
| 123 | requires the experimental "net 2" network patches (no relation to | ||
| 124 | Berkeley Net 2). There is a report that (some version of) Linux | ||
| 125 | requires including `/usr/src/linux/include/linux' in buffer.c | ||
| 126 | but no coherent explanation of why that might be so. If it is so, | ||
| 127 | in current versions of Linux, something else should probably be changed. | ||
| 128 | |||
| 129 | You may find that adding -I/usr/X/include or -I/usr/netinclude or both | ||
| 130 | to CFLAGS avoids compilation errors on certain systems. | ||
| 131 | |||
| 132 | Some versions convince sysdep.c to try to use `struct tchars' | ||
| 133 | but define `struct tc' instead; add `#define tchars tc' | ||
| 134 | to config.h to solve this problem. | ||
| 135 | |||
| 136 | ** Iris 4D (mips-sgi-irix6.*) | ||
| 137 | |||
| 138 | Emacs 21.3 is reported to work on IRIX 6.5.x. | ||
| 139 | |||
| 140 | You can build a 64-bit executable (with larger maximum buffer size) | ||
| 141 | on Irix 6.5 by specifying the 64-bit ABI using the `-64' compiler | ||
| 142 | flag or otherwise (see cc(1)). | ||
| 143 | |||
| 144 | If compiling with GCC on Irix 6 yields an error "conflicting types | ||
| 145 | for `initstate'", install GCC 2.95 or a newer version, and this | ||
| 146 | problem should go away. It is possible that this problem results | ||
| 147 | from upgrading the operating system without reinstalling GCC; so you | ||
| 148 | could also try reinstalling the same version of GCC, and telling us | ||
| 149 | whether that fixes the problem. | ||
| 150 | |||
| 151 | ** Sun 4 (sparc), Sun 386 (sparc-sun-solaris2.*, | ||
| 152 | i386-sun-solaris2.*, sparc*-*-linux-gnu) | ||
| 153 | |||
| 154 | To build a 32-bit Emacs (i.e. if you are having any sort of problem | ||
| 155 | bootstrapping a 64-bit version), you can use the Sun Studio compiler | ||
| 156 | and configure Emacs with: | ||
| 157 | env CC="cc -xarch=v7" CFLAGS='' ./configure # on SPARC systems | ||
| 158 | env CC="cc -xarch=386" CFLAGS='' ./configure # on x86 systems | ||
| 159 | On Solaris 2.10, it is also possible to use /usr/sfw/bin/gcc to build | ||
| 160 | a 32-bit version of Emacs. Just make sure you point ./configure to | ||
| 161 | the right compiler: | ||
| 162 | |||
| 163 | env CC='/usr/sfw/bin/gcc -m32' ./configure | ||
| 164 | |||
| 165 | To build a 64-bit Emacs (with larger maximum buffer size and | ||
| 166 | including large file support) on a Solaris system which supports | ||
| 167 | 64-bit executables, use the Sun compiler, configuring something like | ||
| 168 | this (see the cc documentation for information on 64-bit | ||
| 169 | compilation): | ||
| 170 | |||
| 171 | env CC="cc -xarch=v9" CFLAGS='' ./configure # on SPARC systems | ||
| 172 | env CC="cc -xarch=amd64" CFLAGS='' ./configure # on x86 systems | ||
| 173 | |||
| 174 | As of version 2.95, GCC doesn't support the 64-bit ABI properly, but | ||
| 175 | later releases may. | ||
| 176 | |||
| 177 | Some versions of Solaris 8 have a bug in their XIM (X Input Method) | ||
| 178 | implementation which causes Emacs to dump core when one of several | ||
| 179 | frames is closed. To avoid this, either install patch 108773-12 | ||
| 180 | (for Sparc) or 108874-12 (for x86), or configure Emacs with the | ||
| 181 | `--with-xim=no' switch (you can use Leim input methods instead). | ||
| 182 | |||
| 183 | On Solaris 2.7, building Emacs with WorkShop Compilers 5.0 98/12/15 | ||
| 184 | C 5.0 failed, apparently with non-default CFLAGS, most probably due to | ||
| 185 | compiler bugs. Using Sun Solaris 2.7 Sun WorkShop 6 update 1 C | ||
| 186 | release was reported to work without problems. It worked OK on | ||
| 187 | another system with Solaris 8 using apparently the same 5.0 compiler | ||
| 188 | and the default CFLAGS. | ||
| 189 | |||
| 190 | Emacs 21.1 and 21.2 built with Sun's ProWorks PC3.0.1 compiler on | ||
| 191 | Intel/Solaris 8 was reported to abort and dump core during startup. | ||
| 192 | Using GCC or a newer SUN compiler (Sun WokShop 6 update 2 C 5.3 | ||
| 193 | 2001/05/15) solves the problem. | ||
| 194 | |||
| 195 | Emacs 20.5 and later work on SPARC GNU/Linux with the 32-bit ABI. | ||
| 196 | As of release 2.95, GCC doesn't work properly with the 64-bit ABI | ||
| 197 | (applicable on UltraSPARC), but that isn't the default mode. | ||
| 198 | |||
| 199 | There are reports that using SunSoft cc with -xO4 -xdepend produces | ||
| 200 | bad code for some part of Emacs. | ||
| 201 | |||
| 202 | Some people report that Emacs crashes immediately on startup when | ||
| 203 | used with a non-X terminal, but we think this is due to compiling | ||
| 204 | with GCC and failing to use GCC's "fixed" system header files. | ||
| 205 | |||
| 206 | Some Sun versions of X windows use the clipboard, not the selections, | ||
| 207 | for transferring text between clients. The Cut, Paste and Copy items | ||
| 208 | in the menu bar Edit menu work with the clipboard. | ||
| 209 | |||
| 210 | If you compile with Sun's ANSI compiler acc, you need additional options | ||
| 211 | when linking temacs, such as | ||
| 212 | /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1 | ||
| 213 | (those should be added just before the libraries) and you need to | ||
| 214 | add -lansi just before -lc. The precise file names depend on the | ||
| 215 | compiler version, so we cannot easily arrange to supply them. | ||
| 216 | |||
| 217 | On Solaris 2, you need to install patch 100947-02 to fix a system bug. | ||
| 218 | Presumably this patch comes from Sun. You must alter the definition of | ||
| 219 | LD_SWITCH_SYSTEM if your X11 libraries are not in /usr/openwin/lib. | ||
| 220 | You must make sure that /usr/ucblib is not in your LD_LIBRARY_PATH. | ||
| 221 | |||
| 222 | On Solaris, do not use /usr/ucb/cc. Use /opt/SUNWspro/bin/cc. Make | ||
| 223 | sure that /usr/ccs/bin and /opt/SUNWspro/bin are in your PATH before | ||
| 224 | /usr/ucb. (Most free software packages have the same requirement on | ||
| 225 | Solaris.) With this compiler, use `/opt/SUNWspro/bin/cc -E' as the | ||
| 226 | preprocessor. If this inserts extra whitespace into its output (see | ||
| 227 | the PROBLEMS file) then add the option `-Xs'. | ||
| 228 | |||
| 229 | If you have trouble using open-network-stream, get the distribution | ||
| 230 | of `bind' (the BSD name-server), build libresolv.a, and link Emacs | ||
| 231 | with -lresolv, by editing LIBRESOLV in src/Makefile. This problem is | ||
| 232 | due to obsolete software in the nonshared standard library. | ||
| 233 | |||
| 234 | Note that Emacs on a Sun is not really as big as it looks. As | ||
| 235 | dumped, it includes around 200k of zeros between the original text | ||
| 236 | section and the original data section (now remapped as part of the | ||
| 237 | text). These are never swapped in. | ||
| 238 | |||
| 239 | ** SuperH (sh[34]*-*-linux-gnu) | ||
| 240 | |||
| 241 | Emacs 23.0.60 was reported to work on GNU/Linux (October 2008). | ||
| 242 | Tested on a little-endian sh4 system (cpu type SH7751R) running | ||
| 243 | Gentoo Linux 2008.0. | ||
| 244 | |||
| 245 | * Here are notes about some of the systems supported: | 31 | * Here are notes about some of the systems supported: |
| 246 | 32 | ||
| 247 | ** Linux (actually GNU/Linux) | 33 | ** GNU/Linux |
| 248 | 34 | ||
| 249 | Most of the complete systems which use the Linux kernel are close | 35 | Most of the complete systems which use the Linux kernel are close |
| 250 | enough to the GNU system to be considered variant GNU systems. We | 36 | enough to the GNU system to be considered variant GNU systems. We |
| @@ -263,31 +49,63 @@ the list at the end of this file. | |||
| 263 | people to write more free software. See the file LINUX-GNU in this | 49 | people to write more free software. See the file LINUX-GNU in this |
| 264 | directory for more explanation. | 50 | directory for more explanation. |
| 265 | 51 | ||
| 52 | *** 64-bit GNU/Linux | ||
| 53 | |||
| 54 | No special procedures should be needed to build a 64-bit Emacs on a | ||
| 55 | 64-bit GNU/Linux system. To build a 32-bit Emacs, first ensure that | ||
| 56 | the necessary 32-bit system libraries and include files are | ||
| 57 | installed. Then use: | ||
| 58 | |||
| 59 | ./configure CC='gcc -m32' --build=i386-linux-gnu \ | ||
| 60 | --x-libraries=/usr/X11R6/lib | ||
| 61 | |||
| 62 | (using the location of the 32-bit X libraries on your system). | ||
| 63 | |||
| 64 | *** IBM System/390 running GNU/Linux (s390-*-linux-gnu) | ||
| 65 | |||
| 66 | As of Emacs 21.2, a 31-bit only version is supported on this system. | ||
| 67 | |||
| 68 | *** SuperH (sh[34]*-*-linux-gnu) | ||
| 69 | |||
| 70 | Emacs 23.0.60 was reported to work on GNU/Linux (October 2008). | ||
| 71 | This was tested on a little-endian sh4 system (cpu type SH7751R) running | ||
| 72 | Gentoo Linux 2008.0. | ||
| 73 | |||
| 266 | ** Mac OS X | 74 | ** Mac OS X |
| 267 | 75 | ||
| 268 | For installation instructions see the file nextstep/INSTALL. | 76 | For installation instructions see the file nextstep/INSTALL. |
| 269 | 77 | ||
| 270 | ** MSDOS | 78 | ** Microsoft Windows |
| 271 | 79 | ||
| 272 | For installation on MSDOS, see the file msdos/INSTALL. | 80 | For installation instructions see the file nt/INSTALL. |
| 81 | |||
| 82 | ** MS-DOS | ||
| 83 | |||
| 84 | For installation instructions see the file msdos/INSTALL. | ||
| 273 | See the "MS-DOS" chapter of the manual for information about using | 85 | See the "MS-DOS" chapter of the manual for information about using |
| 274 | Emacs on MSDOS. | 86 | Emacs on MS-DOS. |
| 275 | 87 | ||
| 276 | ** MS-Windows NT/95/98/ME/2000 | 88 | ** Solaris |
| 277 | 89 | ||
| 278 | For installation on all versions of the MS-Windows platform, see the | 90 | On Solaris it is also possible to use either GCC or Solaris Studio |
| 279 | file nt/INSTALL. | 91 | to build Emacs, by pointing ./configure to the right compiler: |
| 280 | 92 | ||
| 281 | ** X86_64 GNU/Linux | 93 | ./configure CC='/usr/sfw/bin/gcc' # GCC |
| 94 | ./configure CC='cc' # Solaris Studio | ||
| 282 | 95 | ||
| 283 | No special procedures should be needed to build a 64-bit Emacs. To | 96 | On Solaris, do not use /usr/ucb/cc. Use /opt/SUNWspro/bin/cc. Make |
| 284 | build a 32-bit Emacs, first ensure that the necessary 32-bit system | 97 | sure that /usr/ccs/bin and /opt/SUNWspro/bin are in your PATH before |
| 285 | libraries and include files are installed. Then use: | 98 | /usr/ucb. (Most free software packages have the same requirement on |
| 99 | Solaris.) With this compiler, use `/opt/SUNWspro/bin/cc -E' as the | ||
| 100 | preprocessor. If this inserts extra whitespace into its output (see | ||
| 101 | the PROBLEMS file) then add the option `-Xs'. | ||
| 286 | 102 | ||
| 287 | env CC="gcc -m32" ./configure --build=i386-linux-gnu \ | 103 | To build a 64-bit Emacs (with larger maximum buffer size) on a |
| 288 | --x-libraries=/usr/X11R6/lib | 104 | Solaris system which supports 64-bit executables, specify the -m64 |
| 105 | compiler option. For example: | ||
| 289 | 106 | ||
| 290 | (using the location of the 32-bit X libraries on your system). | 107 | ./configure CC='/usr/sfw/bin/gcc -m64' # GCC |
| 108 | ./configure CC='cc -m64' # Solaris Studio | ||
| 291 | 109 | ||
| 292 | 110 | ||
| 293 | * Obsolete platforms | 111 | * Obsolete platforms |
| @@ -43,10 +43,12 @@ to configure. Note that other libraries used by Emacs, RSVG and GConf, | |||
| 43 | also depend on Gtk+. You can disable them with --without-rsvg and | 43 | also depend on Gtk+. You can disable them with --without-rsvg and |
| 44 | --without-gconf. | 44 | --without-gconf. |
| 45 | 45 | ||
| 46 | --- | ||
| 46 | ** There is a new configure option --enable-use-lisp-union-type. | 47 | ** There is a new configure option --enable-use-lisp-union-type. |
| 47 | This is only useful for Emacs developers to debug certain types of bugs. | 48 | This is only useful for Emacs developers to debug certain types of bugs. |
| 48 | This is not a new feature; only the configure flag is new. | 49 | This is not a new feature; only the configure flag is new. |
| 49 | 50 | ||
| 51 | --- | ||
| 50 | ** There is a new configure option --with-wide-int. | 52 | ** There is a new configure option --with-wide-int. |
| 51 | With it, Emacs integers typically have 62 bits, even on 32-bit machines. | 53 | With it, Emacs integers typically have 62 bits, even on 32-bit machines. |
| 52 | 54 | ||
| @@ -55,11 +57,12 @@ With it, Emacs integers typically have 62 bits, even on 32-bit machines. | |||
| 55 | Type `C-u C-h t' to choose it in case your language setup doesn't | 57 | Type `C-u C-h t' to choose it in case your language setup doesn't |
| 56 | automatically select it. | 58 | automatically select it. |
| 57 | 59 | ||
| 58 | ** Emacs can be compiled with support for the ImageMagick library. | 60 | ** Emacs can be compiled with ImageMagick support. |
| 59 | Emacs links to ImageMagick if version 6.2.8 or newer of the library is | 61 | Emacs links to ImageMagick if version 6.2.8 or newer of the library is |
| 60 | present at build time. To disable ImageMagick support, use the | 62 | present at build time. To inhibit ImageMagick, use the configure |
| 61 | `--without-imagemagick' configure option. | 63 | option `--without-imagemagick' . |
| 62 | 64 | ||
| 65 | --- | ||
| 63 | ** The standalone programs digest-doc and sorted-doc are removed. | 66 | ** The standalone programs digest-doc and sorted-doc are removed. |
| 64 | Emacs now uses Lisp commands `doc-file-to-man' and `doc-file-to-info'. | 67 | Emacs now uses Lisp commands `doc-file-to-man' and `doc-file-to-info'. |
| 65 | 68 | ||
| @@ -86,6 +89,7 @@ and also when HOME is set to C:\ by default. | |||
| 86 | 89 | ||
| 87 | * Changes in Emacs 24.1 | 90 | * Changes in Emacs 24.1 |
| 88 | 91 | ||
| 92 | +++ | ||
| 89 | ** auto-mode-case-fold is now enabled by default. | 93 | ** auto-mode-case-fold is now enabled by default. |
| 90 | 94 | ||
| 91 | ** Completion | 95 | ** Completion |
| @@ -153,7 +157,7 @@ If you had that set, then then you need to put | |||
| 153 | in your ~/.authinfo file instead. | 157 | in your ~/.authinfo file instead. |
| 154 | 158 | ||
| 155 | ** Emacs server and client changes | 159 | ** Emacs server and client changes |
| 156 | 160 | +++ | |
| 157 | *** New option `server-port' specifies the port on which the Emacs | 161 | *** New option `server-port' specifies the port on which the Emacs |
| 158 | server should listen. | 162 | server should listen. |
| 159 | +++ | 163 | +++ |
| @@ -212,6 +216,7 @@ the variable `glyphless-char-display-control'. | |||
| 212 | On character terminals, these methods are used for characters that | 216 | On character terminals, these methods are used for characters that |
| 213 | cannot be encoded by the `terminal-coding-system'. | 217 | cannot be encoded by the `terminal-coding-system'. |
| 214 | 218 | ||
| 219 | --- | ||
| 215 | *** New input methods for Farsi: farsi and farsi-translit. | 220 | *** New input methods for Farsi: farsi and farsi-translit. |
| 216 | 221 | ||
| 217 | ** Improved GTK integration | 222 | ** Improved GTK integration |
| @@ -245,9 +250,6 @@ Emacs.pane.menubar.font: Courier-12 | |||
| 245 | Also, the first dash (which does not indicate anything) is just | 250 | Also, the first dash (which does not indicate anything) is just |
| 246 | displayed as a space. | 251 | displayed as a space. |
| 247 | 252 | ||
| 248 | ** On Nextstep/OSX, the menu bar can be hidden by customizing | ||
| 249 | ns-auto-hide-menu-bar. | ||
| 250 | |||
| 251 | ** Basic SELinux support has been added. | 253 | ** Basic SELinux support has been added. |
| 252 | This requires Emacs to be linked with libselinux at build time. | 254 | This requires Emacs to be linked with libselinux at build time. |
| 253 | 255 | ||
| @@ -267,10 +269,10 @@ for remote machines which support SELinux. | |||
| 267 | higher-resolution time stamps. | 269 | higher-resolution time stamps. |
| 268 | 270 | ||
| 269 | ** Changes for exiting Emacs | 271 | ** Changes for exiting Emacs |
| 270 | 272 | +++ | |
| 271 | *** The function kill-emacs is now run upon receipt of the signals | 273 | *** The function kill-emacs is now run upon receipt of the signals |
| 272 | SIGTERM and SIGHUP, and upon SIGINT in batch mode. | 274 | SIGTERM and SIGHUP, and upon SIGINT in batch mode. |
| 273 | 275 | +++ | |
| 274 | *** kill-emacs-hook is now also run in batch mode. | 276 | *** kill-emacs-hook is now also run in batch mode. |
| 275 | If you have code that adds something to kill-emacs-hook, you should | 277 | If you have code that adds something to kill-emacs-hook, you should |
| 276 | consider if it is still appropriate to add it in the noninteractive case. | 278 | consider if it is still appropriate to add it in the noninteractive case. |
| @@ -303,10 +305,10 @@ scrolls the window so as to avoid positioning point inside the scroll | |||
| 303 | margin. | 305 | margin. |
| 304 | 306 | ||
| 305 | ** Trash changes | 307 | ** Trash changes |
| 306 | 308 | +++ | |
| 307 | *** `delete-by-moving-to-trash' now only affects commands that specify | 309 | *** `delete-by-moving-to-trash' now only affects commands that specify |
| 308 | trashing. This avoids inadvertently trashing temporary files. | 310 | trashing. This avoids inadvertently trashing temporary files. |
| 309 | 311 | +++ | |
| 310 | *** Calling `delete-file' or `delete-directory' with a prefix argument | 312 | *** Calling `delete-file' or `delete-directory' with a prefix argument |
| 311 | now forces true deletion, regardless of `delete-by-moving-to-trash'. | 313 | now forces true deletion, regardless of `delete-by-moving-to-trash'. |
| 312 | 314 | ||
| @@ -315,15 +317,12 @@ for `list-colors-display'. | |||
| 315 | 317 | ||
| 316 | ** An Emacs Lisp package manager is now included. | 318 | ** An Emacs Lisp package manager is now included. |
| 317 | This is a convenient way to download and install additional packages, | 319 | This is a convenient way to download and install additional packages, |
| 318 | from a package repository at elpa.gnu.org. | 320 | from a package repository at http://elpa.gnu.org. |
| 319 | |||
| 320 | +++ | 321 | +++ |
| 321 | *** `M-x list-packages' shows a list of packages, which can be | 322 | *** `M-x list-packages' shows a list of packages, which can be |
| 322 | selected for installation. | 323 | selected for installation. |
| 323 | |||
| 324 | +++ | 324 | +++ |
| 325 | *** New command `describe-package', bound to `C-h P'. | 325 | *** New command `describe-package', bound to `C-h P'. |
| 326 | |||
| 327 | +++ | 326 | +++ |
| 328 | *** By default, all installed packages are loaded and activated | 327 | *** By default, all installed packages are loaded and activated |
| 329 | automatically when Emacs starts up. To disable this, set | 328 | automatically when Emacs starts up. To disable this, set |
| @@ -385,15 +384,12 @@ pops up *Messages*" feature, which can now easily be changed. | |||
| 385 | * Editing Changes in Emacs 24.1 | 384 | * Editing Changes in Emacs 24.1 |
| 386 | 385 | ||
| 387 | ** Search changes | 386 | ** Search changes |
| 388 | |||
| 389 | +++ | 387 | +++ |
| 390 | *** C-y in Isearch is now bound to isearch-yank-kill, instead of | 388 | *** C-y in Isearch is now bound to isearch-yank-kill, instead of |
| 391 | isearch-yank-line. | 389 | isearch-yank-line. |
| 392 | |||
| 393 | --- | 390 | --- |
| 394 | *** M-y in Isearch is now bound to isearch-yank-pop, instead of | 391 | *** M-y in Isearch is now bound to isearch-yank-pop, instead of |
| 395 | isearch-yank-kill. | 392 | isearch-yank-kill. |
| 396 | |||
| 397 | +++ | 393 | +++ |
| 398 | *** M-s C-e in Isearch is now bound to isearch-yank-line. | 394 | *** M-s C-e in Isearch is now bound to isearch-yank-line. |
| 399 | 395 | ||
| @@ -410,9 +406,9 @@ also deletes newlines around point. | |||
| 410 | ** Deletion changes | 406 | ** Deletion changes |
| 411 | 407 | ||
| 412 | *** New option `delete-active-region'. | 408 | *** New option `delete-active-region'. |
| 413 | If non-nil, C-d, [delete], and DEL delete the region if it is active | 409 | If non-nil, [delete] and DEL delete the region if it is active and no |
| 414 | and no prefix argument is given. If set to `kill', these commands | 410 | prefix argument is given. If set to `kill', these commands kill |
| 415 | kill instead. | 411 | instead. |
| 416 | 412 | ||
| 417 | *** New command `delete-forward-char', bound to [delete]. | 413 | *** New command `delete-forward-char', bound to [delete]. |
| 418 | This is meant for interactive use, and obeys `delete-active-region'. | 414 | This is meant for interactive use, and obeys `delete-active-region'. |
| @@ -422,7 +418,7 @@ The command `delete-char' does not obey `delete-active-region'. | |||
| 422 | Apart from obeying `delete-active-region', its behavior is unchanged. | 418 | Apart from obeying `delete-active-region', its behavior is unchanged. |
| 423 | However, the byte compiler now warns if it is called from Lisp; you | 419 | However, the byte compiler now warns if it is called from Lisp; you |
| 424 | should use delete-char with a negative argument instead. | 420 | should use delete-char with a negative argument instead. |
| 425 | 421 | --- | |
| 426 | *** The option `mouse-region-delete-keys' has been deleted. | 422 | *** The option `mouse-region-delete-keys' has been deleted. |
| 427 | 423 | ||
| 428 | ** Selection changes. | 424 | ** Selection changes. |
| @@ -483,10 +479,8 @@ between applications. | |||
| 483 | +++ | 479 | +++ |
| 484 | *** Support for X cut buffers has been removed. | 480 | *** Support for X cut buffers has been removed. |
| 485 | 481 | ||
| 486 | *** Support for X clipboard managers has been added. | 482 | *** X clipboard managers are now supported. |
| 487 | 483 | To inhibit this, change `x-select-enable-clipboard-manager' to nil. | |
| 488 | **** To inhibit use of the clipboard manager, set | ||
| 489 | `x-select-enable-clipboard-manager' to nil. | ||
| 490 | 484 | ||
| 491 | ** New command `rectangle-number-lines', bound to `C-x r N', numbers | 485 | ** New command `rectangle-number-lines', bound to `C-x r N', numbers |
| 492 | the lines in the current rectangle. With an prefix argument, this | 486 | the lines in the current rectangle. With an prefix argument, this |
| @@ -669,6 +663,7 @@ in the Rmail incoming message. | |||
| 669 | ** shell-mode can track your cwd by reading it from your prompt. | 663 | ** shell-mode can track your cwd by reading it from your prompt. |
| 670 | Just set shell-dir-cookie-re to an appropriate regexp. | 664 | Just set shell-dir-cookie-re to an appropriate regexp. |
| 671 | 665 | ||
| 666 | --- | ||
| 672 | ** SQL Mode enhancements. | 667 | ** SQL Mode enhancements. |
| 673 | 668 | ||
| 674 | *** `sql-dialect' is an alias for `sql-product'. | 669 | *** `sql-dialect' is an alias for `sql-product'. |
| @@ -850,6 +845,7 @@ bidirectional editing introduced in Emacs 24. If you need the | |||
| 850 | bidirectional properties of a character, use `get-char-code-property' | 845 | bidirectional properties of a character, use `get-char-code-property' |
| 851 | with the last argument `bidi-class'. | 846 | with the last argument `bidi-class'. |
| 852 | 847 | ||
| 848 | +++ | ||
| 853 | ** `copy-directory' now copies the source directory as a subdirectory | 849 | ** `copy-directory' now copies the source directory as a subdirectory |
| 854 | of the target directory, if the latter is an existing directory. The | 850 | of the target directory, if the latter is an existing directory. The |
| 855 | new optional arg COPY-CONTENTS, if non-nil, makes the function copy | 851 | new optional arg COPY-CONTENTS, if non-nil, makes the function copy |
| @@ -865,7 +861,7 @@ coordinate in the POSITION list now counts from the top of the text | |||
| 865 | area, excluding any header line. Previously, it counted from the top | 861 | area, excluding any header line. Previously, it counted from the top |
| 866 | of the header line. | 862 | of the header line. |
| 867 | 863 | ||
| 868 | ** Remove obsolete name `e' (use `float-e' instead). | 864 | ** Removed obsolete name `e' (use `float-e' instead). |
| 869 | 865 | ||
| 870 | ** A backquote not followed by a space is now always treated as new-style. | 866 | ** A backquote not followed by a space is now always treated as new-style. |
| 871 | 867 | ||
| @@ -876,6 +872,7 @@ programmer-visible consequences. | |||
| 876 | ** Passing a nil argument to a minor mode function now turns the mode | 872 | ** Passing a nil argument to a minor mode function now turns the mode |
| 877 | ON unconditionally. | 873 | ON unconditionally. |
| 878 | 874 | ||
| 875 | +++ | ||
| 879 | ** During startup, Emacs no longer adds entries for `menu-bar-lines' | 876 | ** During startup, Emacs no longer adds entries for `menu-bar-lines' |
| 880 | and `tool-bar-lines' to `default-frame-alist' and `initial-frame-alist'. | 877 | and `tool-bar-lines' to `default-frame-alist' and `initial-frame-alist'. |
| 881 | With these alist entries omitted, `make-frame' checks the value of the | 878 | With these alist entries omitted, `make-frame' checks the value of the |
| @@ -990,6 +987,7 @@ connection, directly or via STARTTLS. To do STARTTLS, additional | |||
| 990 | parameters (`:end-of-command', `:success', `:capabilities-command') | 987 | parameters (`:end-of-command', `:success', `:capabilities-command') |
| 991 | must also be supplied. | 988 | must also be supplied. |
| 992 | 989 | ||
| 990 | +++ | ||
| 993 | ** pre/post-command-hook are not reset to nil upon error. | 991 | ** pre/post-command-hook are not reset to nil upon error. |
| 994 | Instead, the offending function is removed. | 992 | Instead, the offending function is removed. |
| 995 | 993 | ||
| @@ -1001,7 +999,8 @@ Emacs server instances. | |||
| 1001 | ** `call-process' allows a `(:file "file")' spec to redirect STDOUT to | 999 | ** `call-process' allows a `(:file "file")' spec to redirect STDOUT to |
| 1002 | a file. | 1000 | a file. |
| 1003 | 1001 | ||
| 1004 | ** Removed the stack-trace-on-error variable. | 1002 | --- |
| 1003 | ** Variable `stack-trace-on-error' removed. | ||
| 1005 | Also the debugger can now "continue" from an error, which means it will jump | 1004 | Also the debugger can now "continue" from an error, which means it will jump |
| 1006 | to the error handler as if the debugger had not been invoked instead of | 1005 | to the error handler as if the debugger had not been invoked instead of |
| 1007 | jumping all the way to the top-level. | 1006 | jumping all the way to the top-level. |
| @@ -1014,8 +1013,8 @@ The variable is now used to load all kind of supported dynamic libraries, | |||
| 1014 | not just image libraries. The previous name is still available as an | 1013 | not just image libraries. The previous name is still available as an |
| 1015 | obsolete alias. | 1014 | obsolete alias. |
| 1016 | 1015 | ||
| 1017 | ** New variable syntax-propertize-function to set syntax-table properties. | 1016 | ** New variable `syntax-propertize-function'. |
| 1018 | Replaces font-lock-syntactic-keywords which are now obsolete. | 1017 | This replaces `font-lock-syntactic-keywords' which is now obsolete. |
| 1019 | This allows syntax-table properties to be set independently from font-lock: | 1018 | This allows syntax-table properties to be set independently from font-lock: |
| 1020 | just call syntax-propertize to make sure the text is propertized. | 1019 | just call syntax-propertize to make sure the text is propertized. |
| 1021 | Together with this new variable come a new hook | 1020 | Together with this new variable come a new hook |
| @@ -1031,6 +1030,7 @@ syntactic rules. | |||
| 1031 | 1030 | ||
| 1032 | ** frame-local variables cannot be let-bound any more. | 1031 | ** frame-local variables cannot be let-bound any more. |
| 1033 | 1032 | ||
| 1033 | +++ | ||
| 1034 | ** prog-mode is a new major-mode meant to be the parent of programming mode. | 1034 | ** prog-mode is a new major-mode meant to be the parent of programming mode. |
| 1035 | The prog-mode-hook it defines can be used to enable features for | 1035 | The prog-mode-hook it defines can be used to enable features for |
| 1036 | programming modes. For example: | 1036 | programming modes. For example: |
| @@ -1040,6 +1040,7 @@ programming modes. | |||
| 1040 | 1040 | ||
| 1041 | ** define-minor-mode accepts a new keyword :variable. | 1041 | ** define-minor-mode accepts a new keyword :variable. |
| 1042 | 1042 | ||
| 1043 | +++ | ||
| 1043 | ** `delete-file' and `delete-directory' now accept optional arg TRASH. | 1044 | ** `delete-file' and `delete-directory' now accept optional arg TRASH. |
| 1044 | Trashing is performed if TRASH and `delete-by-moving-to-trash' are | 1045 | Trashing is performed if TRASH and `delete-by-moving-to-trash' are |
| 1045 | both non-nil. Interactively, TRASH defaults to t, unless a prefix | 1046 | both non-nil. Interactively, TRASH defaults to t, unless a prefix |
| @@ -1105,6 +1106,7 @@ the GnuTLS logging conventions. The output is in *Messages*. | |||
| 1105 | 1106 | ||
| 1106 | *** New hook `isearch-update-post-hook' that runs in `isearch-update'. | 1107 | *** New hook `isearch-update-post-hook' that runs in `isearch-update'. |
| 1107 | 1108 | ||
| 1109 | +++ | ||
| 1108 | ** Progress reporters can now "spin". | 1110 | ** Progress reporters can now "spin". |
| 1109 | The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can | 1111 | The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can |
| 1110 | now be nil, or omitted. This makes a "non-numeric" reporter. Each | 1112 | now be nil, or omitted. This makes a "non-numeric" reporter. Each |
| @@ -1127,6 +1129,7 @@ as well as those in the -*- line. | |||
| 1127 | 1129 | ||
| 1128 | ** keymaps can inherit from multiple parents. | 1130 | ** keymaps can inherit from multiple parents. |
| 1129 | 1131 | ||
| 1132 | +++ | ||
| 1130 | ** New reader macro ## which stands for the empty symbol. | 1133 | ** New reader macro ## which stands for the empty symbol. |
| 1131 | This means that the empty symbol can now be read back. Also, #: by itself | 1134 | This means that the empty symbol can now be read back. Also, #: by itself |
| 1132 | (when not immediately followed by a possible symbol character) stands for | 1135 | (when not immediately followed by a possible symbol character) stands for |
| @@ -1158,6 +1161,9 @@ with the USER_LIBS build variable. | |||
| 1158 | 1161 | ||
| 1159 | ** New make target `dist' to create binary distribution for MS Windows. | 1162 | ** New make target `dist' to create binary distribution for MS Windows. |
| 1160 | 1163 | ||
| 1164 | ** On Nextstep/OSX, the menu bar can be hidden by customizing | ||
| 1165 | ns-auto-hide-menu-bar. | ||
| 1166 | |||
| 1161 | 1167 | ||
| 1162 | ---------------------------------------------------------------------- | 1168 | ---------------------------------------------------------------------- |
| 1163 | This file is part of GNU Emacs. | 1169 | This file is part of GNU Emacs. |
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 2f344955cb2..1869124987a 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS | |||
| @@ -2648,43 +2648,6 @@ of PURESIZE in puresize.h. | |||
| 2648 | But in some of the cases listed above, this problem is a consequence | 2648 | But in some of the cases listed above, this problem is a consequence |
| 2649 | of something else that is wrong. Be sure to check and fix the real problem. | 2649 | of something else that is wrong. Be sure to check and fix the real problem. |
| 2650 | 2650 | ||
| 2651 | *** Linux: Emacs crashes when dumping itself on Mac PPC running Yellow Dog GNU/Linux. | ||
| 2652 | |||
| 2653 | The crashes happen inside the function Fmake_symbol; here's a typical | ||
| 2654 | C backtrace printed by GDB: | ||
| 2655 | |||
| 2656 | 0x190c0c0 in Fmake_symbol () | ||
| 2657 | (gdb) where | ||
| 2658 | #0 0x190c0c0 in Fmake_symbol () | ||
| 2659 | #1 0x1942ca4 in init_obarray () | ||
| 2660 | #2 0x18b3500 in main () | ||
| 2661 | #3 0x114371c in __libc_start_main (argc=5, argv=0x7ffff5b4, envp=0x7ffff5cc, | ||
| 2662 | |||
| 2663 | This could happen because GCC version 2.95 and later changed the base | ||
| 2664 | of the load address to 0x10000000. Emacs needs to be told about this, | ||
| 2665 | but we currently cannot do that automatically, because that breaks | ||
| 2666 | other versions of GNU/Linux on the MacPPC. Until we find a way to | ||
| 2667 | distinguish between the Yellow Dog and the other varieties of | ||
| 2668 | GNU/Linux systems on the PPC, you will have to manually uncomment the | ||
| 2669 | following section near the end of the file src/m/macppc.h in the Emacs | ||
| 2670 | distribution: | ||
| 2671 | |||
| 2672 | #if 0 /* This breaks things on PPC GNU/Linux except for Yellowdog, | ||
| 2673 | even with identical GCC, as, ld. Let's take it out until we | ||
| 2674 | know what's really going on here. */ | ||
| 2675 | /* GCC 2.95 and newer on GNU/Linux PPC changed the load address to | ||
| 2676 | 0x10000000. */ | ||
| 2677 | #if defined __linux__ | ||
| 2678 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) | ||
| 2679 | #define DATA_SEG_BITS 0x10000000 | ||
| 2680 | #endif | ||
| 2681 | #endif | ||
| 2682 | #endif /* 0 */ | ||
| 2683 | |||
| 2684 | Remove the "#if 0" and "#endif" directives which surround this, save | ||
| 2685 | the file, and then reconfigure and rebuild Emacs. The dumping process | ||
| 2686 | should now succeed. | ||
| 2687 | |||
| 2688 | *** OpenBSD 4.0 macppc: Segfault during dumping. | 2651 | *** OpenBSD 4.0 macppc: Segfault during dumping. |
| 2689 | 2652 | ||
| 2690 | The build aborts with signal 11 when the command `./temacs --batch | 2653 | The build aborts with signal 11 when the command `./temacs --batch |
diff --git a/leim/ChangeLog b/leim/ChangeLog index 2dbccf9be39..426c679fe1f 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-08-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * quail/latin-ltx.el: Complete the super and subscript letters. | ||
| 4 | |||
| 1 | 2011-08-20 Glenn Morris <rgm@gnu.org> | 5 | 2011-08-20 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * Makefile.in (OTHERS): | 7 | * Makefile.in (OTHERS): |
diff --git a/leim/quail/latin-ltx.el b/leim/quail/latin-ltx.el index cc3be3a44c6..fb788378737 100644 --- a/leim/quail/latin-ltx.el +++ b/leim/quail/latin-ltx.el | |||
| @@ -351,16 +351,65 @@ system, including many technical ones. Examples: | |||
| 351 | ("^9" ?⁹) | 351 | ("^9" ?⁹) |
| 352 | ("^=" ?⁼) | 352 | ("^=" ?⁼) |
| 353 | ("^\\gamma" ?ˠ) | 353 | ("^\\gamma" ?ˠ) |
| 354 | ;; FIXME: It'd be nicer to generate some of these rules via something like | ||
| 355 | ;; (map (lambda (name char) | ||
| 356 | ;; (cond ((string-match "MODIFIER SMALL LETTER \\(.\\)" name) | ||
| 357 | ;; (list (string ?^ (downcase (aref name (match-beginning 1)))) | ||
| 358 | ;; char))) | ||
| 359 | ;; ...))) | ||
| 360 | ("^a" ?ᵃ) | ||
| 361 | ("^b" ?ᵇ) | ||
| 362 | ("^c" ?ᶜ) | ||
| 363 | ("^d" ?ᵈ) | ||
| 364 | ("^e" ?ᵉ) | ||
| 365 | ("^f" ?ᶠ) | ||
| 366 | ("^g" ?ᵍ) | ||
| 354 | ("^h" ?ʰ) | 367 | ("^h" ?ʰ) |
| 368 | ;; ("^i" ?) ;; FIXME: can't find MODIFIER SMALL LETTER I !?! | ||
| 355 | ("^j" ?ʲ) | 369 | ("^j" ?ʲ) |
| 370 | ("^k" ?ᵏ) | ||
| 356 | ("^l" ?ˡ) | 371 | ("^l" ?ˡ) |
| 372 | ("^m" ?ᵐ) | ||
| 357 | ("^n" ?ⁿ) | 373 | ("^n" ?ⁿ) |
| 358 | ("^o" ?º) | 374 | ("^o" ?ᵒ) |
| 375 | ("^o_" ?º) | ||
| 376 | ("^p" ?ᵖ) | ||
| 377 | ;; ("^q" ?) ;; FIXME: can't find MODIFIER SMALL LETTER Q !?! | ||
| 359 | ("^r" ?ʳ) | 378 | ("^r" ?ʳ) |
| 360 | ("^s" ?ˢ) | 379 | ("^s" ?ˢ) |
| 380 | ("^t" ?ᵗ) | ||
| 381 | ("^u" ?ᵘ) | ||
| 382 | ("^v" ?ᵛ) | ||
| 361 | ("^w" ?ʷ) | 383 | ("^w" ?ʷ) |
| 362 | ("^x" ?ˣ) | 384 | ("^x" ?ˣ) |
| 363 | ("^y" ?ʸ) | 385 | ("^y" ?ʸ) |
| 386 | ("^z" ?ᶻ) | ||
| 387 | ("^A" ?ᴬ) | ||
| 388 | ("^B" ?ᴮ) | ||
| 389 | ;; ("^C" ?) ;; FIXME: can't find MODIFIER CAPITAL LETTER C !?! | ||
| 390 | ("^D" ?ᴰ) | ||
| 391 | ("^E" ?ᴱ) | ||
| 392 | ;; ("^F" ?) ;; FIXME: can't find MODIFIER CAPITAL LETTER F !?! | ||
| 393 | ("^G" ?ᴳ) | ||
| 394 | ("^H" ?ᴴ) | ||
| 395 | ("^I" ?ᴵ) | ||
| 396 | ("^J" ?ᴶ) | ||
| 397 | ("^K" ?ᴷ) | ||
| 398 | ("^L" ?ᴸ) | ||
| 399 | ("^M" ?ᴹ) | ||
| 400 | ("^N" ?ᴺ) | ||
| 401 | ("^O" ?ᴼ) | ||
| 402 | ("^P" ?ᴾ) | ||
| 403 | ;; ("^Q" ?) ;; FIXME: can't find MODIFIER CAPITAL LETTER Q !?! | ||
| 404 | ("^R" ?ᴿ) | ||
| 405 | ;; ("^S" ?) ;; FIXME: can't find MODIFIER CAPITAL LETTER S !?! | ||
| 406 | ("^T" ?ᵀ) | ||
| 407 | ("^U" ?ᵁ) | ||
| 408 | ("^V" ?ⱽ) | ||
| 409 | ("^W" ?ᵂ) | ||
| 410 | ;; ("^X" ?) ;; FIXME: can't find MODIFIER CAPITAL LETTER X !?! | ||
| 411 | ;; ("^Y" ?) ;; FIXME: can't find MODIFIER CAPITAL LETTER Y !?! | ||
| 412 | ;; ("^Z" ?) ;; FIXME: can't find MODIFIER CAPITAL LETTER Z !?! | ||
| 364 | ("^{SM}" ?℠) | 413 | ("^{SM}" ?℠) |
| 365 | ("^{TEL}" ?℡) | 414 | ("^{TEL}" ?℡) |
| 366 | ("^{TM}" ?™) | 415 | ("^{TM}" ?™) |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8a57fe75405..15296e09b46 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,48 @@ | |||
| 1 | 2011-08-29 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * isearch.el (isearch-done): Don't display message "Mark saved" | ||
| 4 | when arg `edit' is non-nil to prevent its flicker in the echo area. | ||
| 5 | |||
| 6 | 2011-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 7 | |||
| 8 | * emacs-lisp/package.el (package-menu-mark-delete): Allow marking | ||
| 9 | obsolete packages for deletion. | ||
| 10 | |||
| 11 | 2011-08-28 Christoph Scholtes <cschol2112@googlemail.com> | ||
| 12 | |||
| 13 | * help-mode.el (help-mode-map): Add special-mode-map to parent. | ||
| 14 | (help-mode): Derive help-mode from special-mode. Don't invoke | ||
| 15 | view-mode from help-mode. | ||
| 16 | (help-xref-override-view-map): Remove. | ||
| 17 | (help-make-xrefs): Remove minor-mode-overriding-map-alist since | ||
| 18 | view-mode is not used anymore. | ||
| 19 | |||
| 20 | 2011-08-28 Chong Yidong <cyd@stupidchicken.com> | ||
| 21 | |||
| 22 | * server.el (server-port): Doc fix. | ||
| 23 | |||
| 24 | * cus-theme.el (custom-theme-choose-mode): Inherit from | ||
| 25 | special-mode (Bug#9124). | ||
| 26 | (custom-theme-choose-mode-map): Add special-mode to parent. | ||
| 27 | |||
| 28 | 2011-08-28 Alan Mackenzie <acm@muc.de> | ||
| 29 | |||
| 30 | * progmodes/cc-fonts.el | ||
| 31 | (c-make-font-lock-BO-decl-search-function): New function. | ||
| 32 | (c-basic-matchers-after - "Fontify the clauses after various | ||
| 33 | keywords"): Extract the three keyword lists for the 3 erroneous | ||
| 34 | constructs from the list of four, and use the new function above | ||
| 35 | in place of an old one. | ||
| 36 | |||
| 37 | 2011-08-28 Deniz Dogan <deniz@dogan.se> | ||
| 38 | |||
| 39 | * net/rcirc.el (rcirc-insert-prev-input) | ||
| 40 | (rcirc-insert-next-input): Remove unused argument. | ||
| 41 | |||
| 42 | 2011-08-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 43 | |||
| 44 | * shell.el (shell-parse-pcomplete-arguments): Unquote args (bug#9160). | ||
| 45 | |||
| 1 | 2011-08-27 Alan Mackenzie <acm@muc.de> | 46 | 2011-08-27 Alan Mackenzie <acm@muc.de> |
| 2 | 47 | ||
| 3 | * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Make it | 48 | * progmodes/cc-menus.el (cc-imenu-c++-generic-expression): Make it |
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 04a9e728b22..1f33c3e8256 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el | |||
| @@ -521,7 +521,8 @@ It includes all faces in list FACES." | |||
| 521 | 521 | ||
| 522 | (defvar custom-theme-choose-mode-map | 522 | (defvar custom-theme-choose-mode-map |
| 523 | (let ((map (make-keymap))) | 523 | (let ((map (make-keymap))) |
| 524 | (set-keymap-parent map widget-keymap) | 524 | (set-keymap-parent map (make-composed-keymap widget-keymap |
| 525 | special-mode-map)) | ||
| 525 | (suppress-keymap map) | 526 | (suppress-keymap map) |
| 526 | (define-key map "\C-x\C-s" 'custom-theme-save) | 527 | (define-key map "\C-x\C-s" 'custom-theme-save) |
| 527 | (define-key map "n" 'widget-forward) | 528 | (define-key map "n" 'widget-forward) |
| @@ -530,7 +531,7 @@ It includes all faces in list FACES." | |||
| 530 | map) | 531 | map) |
| 531 | "Keymap for `custom-theme-choose-mode'.") | 532 | "Keymap for `custom-theme-choose-mode'.") |
| 532 | 533 | ||
| 533 | (define-derived-mode custom-theme-choose-mode nil "Themes" | 534 | (define-derived-mode custom-theme-choose-mode special-mode "Themes" |
| 534 | "Major mode for selecting Custom themes. | 535 | "Major mode for selecting Custom themes. |
| 535 | Do not call this mode function yourself. It is meant for internal use." | 536 | Do not call this mode function yourself. It is meant for internal use." |
| 536 | (use-local-map custom-theme-choose-mode-map) | 537 | (use-local-map custom-theme-choose-mode-map) |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 88282606aa8..caf0ec2e8b8 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -1440,7 +1440,7 @@ If optional arg BUTTON is non-nil, describe its associated package." | |||
| 1440 | (defun package-menu-mark-delete (num) | 1440 | (defun package-menu-mark-delete (num) |
| 1441 | "Mark a package for deletion and move to the next line." | 1441 | "Mark a package for deletion and move to the next line." |
| 1442 | (interactive "p") | 1442 | (interactive "p") |
| 1443 | (if (string-equal (package-menu-get-status) "installed") | 1443 | (if (member (package-menu-get-status) '("installed" "obsolete")) |
| 1444 | (tabulated-list-put-tag "D" t) | 1444 | (tabulated-list-put-tag "D" t) |
| 1445 | (forward-line))) | 1445 | (forward-line))) |
| 1446 | 1446 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5c8b4333332..feee3c49f3a 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-08-27 Daiki Ueno <ueno@unixuser.org> | ||
| 2 | |||
| 3 | * mml-smime.el (mml-smime-epg-verify): Don't use the 4th arg of | ||
| 4 | mm-replace-in-string for compatibility issues. | ||
| 5 | * mml2015.el (mml2015-epg-verify): Ditto. | ||
| 6 | |||
| 1 | 2011-08-26 Katsumi Yamaoka <yamaoka@jpl.org> | 7 | 2011-08-26 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 8 | ||
| 3 | * mailcap.el (mailcap-mime-data): Regexp-quote MIME subtype. | 9 | * mailcap.el (mailcap-mime-data): Regexp-quote MIME subtype. |
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el index 43c91604ec5..7a7b3f6d82d 100644 --- a/lisp/gnus/mml-smime.el +++ b/lisp/gnus/mml-smime.el | |||
| @@ -531,7 +531,7 @@ Content-Disposition: attachment; filename=smime.p7m | |||
| 531 | (mm-set-handle-multipart-parameter | 531 | (mm-set-handle-multipart-parameter |
| 532 | mm-security-handle 'gnus-info "Corrupted") | 532 | mm-security-handle 'gnus-info "Corrupted") |
| 533 | (throw 'error handle)) | 533 | (throw 'error handle)) |
| 534 | (setq part (mm-replace-in-string part "\n" "\r\n" t) | 534 | (setq part (mm-replace-in-string part "\n" "\r\n") |
| 535 | context (epg-make-context 'CMS)) | 535 | context (epg-make-context 'CMS)) |
| 536 | (condition-case error | 536 | (condition-case error |
| 537 | (setq plain (epg-verify-string context (mm-get-part signature) part)) | 537 | (setq plain (epg-verify-string context (mm-get-part signature) part)) |
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 7d8a4119c0e..b9310beed58 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el | |||
| @@ -923,7 +923,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'." | |||
| 923 | (mm-set-handle-multipart-parameter | 923 | (mm-set-handle-multipart-parameter |
| 924 | mm-security-handle 'gnus-info "Corrupted") | 924 | mm-security-handle 'gnus-info "Corrupted") |
| 925 | (throw 'error handle)) | 925 | (throw 'error handle)) |
| 926 | (setq part (mm-replace-in-string part "\n" "\r\n" t) | 926 | (setq part (mm-replace-in-string part "\n" "\r\n") |
| 927 | signature (mm-get-part signature) | 927 | signature (mm-get-part signature) |
| 928 | context (epg-make-context)) | 928 | context (epg-make-context)) |
| 929 | (condition-case error | 929 | (condition-case error |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 1a96f29c4cc..64c114c993d 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -35,13 +35,12 @@ | |||
| 35 | 35 | ||
| 36 | (defvar help-mode-map | 36 | (defvar help-mode-map |
| 37 | (let ((map (make-sparse-keymap))) | 37 | (let ((map (make-sparse-keymap))) |
| 38 | (set-keymap-parent map button-buffer-map) | 38 | (set-keymap-parent map (make-composed-keymap button-buffer-map |
| 39 | 39 | special-mode-map)) | |
| 40 | (define-key map [mouse-2] 'help-follow-mouse) | 40 | (define-key map [mouse-2] 'help-follow-mouse) |
| 41 | (define-key map "\C-c\C-b" 'help-go-back) | 41 | (define-key map "\C-c\C-b" 'help-go-back) |
| 42 | (define-key map "\C-c\C-f" 'help-go-forward) | 42 | (define-key map "\C-c\C-f" 'help-go-forward) |
| 43 | (define-key map "\C-c\C-c" 'help-follow-symbol) | 43 | (define-key map "\C-c\C-c" 'help-follow-symbol) |
| 44 | ;; Documentation only, since we use minor-mode-overriding-map-alist. | ||
| 45 | (define-key map "\r" 'help-follow) | 44 | (define-key map "\r" 'help-follow) |
| 46 | map) | 45 | map) |
| 47 | "Keymap for help mode.") | 46 | "Keymap for help mode.") |
| @@ -266,37 +265,13 @@ The format is (FUNCTION ARGS...).") | |||
| 266 | 'help-function 'customize-create-theme | 265 | 'help-function 'customize-create-theme |
| 267 | 'help-echo (purecopy "mouse-2, RET: edit this theme file")) | 266 | 'help-echo (purecopy "mouse-2, RET: edit this theme file")) |
| 268 | 267 | ||
| 269 | ;;;###autoload | 268 | (define-derived-mode help-mode special-mode "Help" |
| 270 | (defun help-mode () | ||
| 271 | "Major mode for viewing help text and navigating references in it. | 269 | "Major mode for viewing help text and navigating references in it. |
| 272 | Entry to this mode runs the normal hook `help-mode-hook'. | 270 | Entry to this mode runs the normal hook `help-mode-hook'. |
| 273 | Commands: | 271 | Commands: |
| 274 | \\{help-mode-map}" | 272 | \\{help-mode-map}" |
| 275 | (interactive) | ||
| 276 | (kill-all-local-variables) | ||
| 277 | (use-local-map help-mode-map) | ||
| 278 | (setq mode-name "Help") | ||
| 279 | (setq major-mode 'help-mode) | ||
| 280 | |||
| 281 | (view-mode) | ||
| 282 | (set (make-local-variable 'view-no-disable-on-exit) t) | ||
| 283 | ;; With Emacs 22 `view-exit-action' could delete the selected window | ||
| 284 | ;; disregarding whether the help buffer was shown in that window at | ||
| 285 | ;; all. Since `view-exit-action' is called with the help buffer as | ||
| 286 | ;; argument it seems more appropriate to have it work on the buffer | ||
| 287 | ;; only and leave it to `view-mode-exit' to delete any associated | ||
| 288 | ;; window(s). | ||
| 289 | (setq view-exit-action | ||
| 290 | (lambda (buffer) | ||
| 291 | ;; Use `with-current-buffer' to make sure that `bury-buffer' | ||
| 292 | ;; also removes BUFFER from the selected window. | ||
| 293 | (with-current-buffer buffer | ||
| 294 | (bury-buffer)))) | ||
| 295 | |||
| 296 | (set (make-local-variable 'revert-buffer-function) | 273 | (set (make-local-variable 'revert-buffer-function) |
| 297 | 'help-mode-revert-buffer) | 274 | 'help-mode-revert-buffer)) |
| 298 | |||
| 299 | (run-mode-hooks 'help-mode-hook)) | ||
| 300 | 275 | ||
| 301 | ;;;###autoload | 276 | ;;;###autoload |
| 302 | (defun help-mode-setup () | 277 | (defun help-mode-setup () |
| @@ -403,13 +378,6 @@ it does not already exist." | |||
| 403 | (error "Current buffer is not in Help mode")) | 378 | (error "Current buffer is not in Help mode")) |
| 404 | (current-buffer)))) | 379 | (current-buffer)))) |
| 405 | 380 | ||
| 406 | (defvar help-xref-override-view-map | ||
| 407 | (let ((map (make-sparse-keymap))) | ||
| 408 | (set-keymap-parent map view-mode-map) | ||
| 409 | (define-key map "\r" nil) | ||
| 410 | map) | ||
| 411 | "Replacement keymap for `view-mode' in help buffers.") | ||
| 412 | |||
| 413 | ;;;###autoload | 381 | ;;;###autoload |
| 414 | (defun help-make-xrefs (&optional buffer) | 382 | (defun help-make-xrefs (&optional buffer) |
| 415 | "Parse and hyperlink documentation cross-references in the given BUFFER. | 383 | "Parse and hyperlink documentation cross-references in the given BUFFER. |
| @@ -594,9 +562,6 @@ that." | |||
| 594 | (current-buffer))) | 562 | (current-buffer))) |
| 595 | (when (or help-xref-stack help-xref-forward-stack) | 563 | (when (or help-xref-stack help-xref-forward-stack) |
| 596 | (insert "\n"))) | 564 | (insert "\n"))) |
| 597 | ;; View mode steals RET from us. | ||
| 598 | (set (make-local-variable 'minor-mode-overriding-map-alist) | ||
| 599 | (list (cons 'view-mode help-xref-override-view-map))) | ||
| 600 | (set-buffer-modified-p old-modified))))) | 565 | (set-buffer-modified-p old-modified))))) |
| 601 | 566 | ||
| 602 | ;;;###autoload | 567 | ;;;###autoload |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 8764952dbf5..6eab3dbcbc4 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -952,7 +952,7 @@ NOPUSH is t and EDIT is t." | |||
| 952 | (or (and transient-mark-mode mark-active) | 952 | (or (and transient-mark-mode mark-active) |
| 953 | (progn | 953 | (progn |
| 954 | (push-mark isearch-opoint t) | 954 | (push-mark isearch-opoint t) |
| 955 | (or executing-kbd-macro (> (minibuffer-depth) 0) | 955 | (or executing-kbd-macro (> (minibuffer-depth) 0) edit |
| 956 | (message "Mark saved where search started"))))) | 956 | (message "Mark saved where search started"))))) |
| 957 | 957 | ||
| 958 | (and (not edit) isearch-recursive-edit (exit-recursive-edit))) | 958 | (and (not edit) isearch-recursive-edit (exit-recursive-edit))) |
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index de2c3adba95..71b3fe0c4a1 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el | |||
| @@ -815,18 +815,19 @@ If SILENT is non-nil, do not print the message in any irc buffer." | |||
| 815 | 815 | ||
| 816 | (defvar rcirc-input-ring nil) | 816 | (defvar rcirc-input-ring nil) |
| 817 | (defvar rcirc-input-ring-index 0) | 817 | (defvar rcirc-input-ring-index 0) |
| 818 | |||
| 818 | (defun rcirc-prev-input-string (arg) | 819 | (defun rcirc-prev-input-string (arg) |
| 819 | (ring-ref rcirc-input-ring (+ rcirc-input-ring-index arg))) | 820 | (ring-ref rcirc-input-ring (+ rcirc-input-ring-index arg))) |
| 820 | 821 | ||
| 821 | (defun rcirc-insert-prev-input (arg) | 822 | (defun rcirc-insert-prev-input () |
| 822 | (interactive "p") | 823 | (interactive) |
| 823 | (when (<= rcirc-prompt-end-marker (point)) | 824 | (when (<= rcirc-prompt-end-marker (point)) |
| 824 | (delete-region rcirc-prompt-end-marker (point-max)) | 825 | (delete-region rcirc-prompt-end-marker (point-max)) |
| 825 | (insert (rcirc-prev-input-string 0)) | 826 | (insert (rcirc-prev-input-string 0)) |
| 826 | (setq rcirc-input-ring-index (1+ rcirc-input-ring-index)))) | 827 | (setq rcirc-input-ring-index (1+ rcirc-input-ring-index)))) |
| 827 | 828 | ||
| 828 | (defun rcirc-insert-next-input (arg) | 829 | (defun rcirc-insert-next-input () |
| 829 | (interactive "p") | 830 | (interactive) |
| 830 | (when (<= rcirc-prompt-end-marker (point)) | 831 | (when (<= rcirc-prompt-end-marker (point)) |
| 831 | (delete-region rcirc-prompt-end-marker (point-max)) | 832 | (delete-region rcirc-prompt-end-marker (point-max)) |
| 832 | (setq rcirc-input-ring-index (1- rcirc-input-ring-index)) | 833 | (setq rcirc-input-ring-index (1- rcirc-input-ring-index)) |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 9c0c62ccdf6..1c58b8a9a7f 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1047,21 +1047,21 @@ | |||
| 1047 | 1047 | ||
| 1048 | 2011-07-28 Achim Gratz <stromeko@nexgo.de> | 1048 | 2011-07-28 Achim Gratz <stromeko@nexgo.de> |
| 1049 | 1049 | ||
| 1050 | * org.el (defcustom org-log-into-drawer): correct typo. | 1050 | * org.el (org-log-into-drawer): Correct typo. |
| 1051 | 1051 | ||
| 1052 | * org-clock.el (org-clock-into-drawer): New function to change the | 1052 | * org-clock.el (org-clock-into-drawer): New function to change the |
| 1053 | location of clock events based on properties CLOCK_INTO_DRAWER or, | 1053 | location of clock events based on properties CLOCK_INTO_DRAWER or, |
| 1054 | as fallback, LOG_INTO_DRAWER, like it is already possible for | 1054 | as fallback, LOG_INTO_DRAWER, like it is already possible for |
| 1055 | state change logs. | 1055 | state change logs. |
| 1056 | 1056 | ||
| 1057 | * org-clock.el (org-clock-jump-to-current-clock): add statement to | 1057 | * org-clock.el (org-clock-jump-to-current-clock): Add statement to |
| 1058 | let clause to bind org-clock-into-drawer to result of function | 1058 | let clause to bind `org-clock-into-drawer' to result of function |
| 1059 | eval | 1059 | eval. |
| 1060 | 1060 | ||
| 1061 | * org-clock.el (org-clock-find-position): add statement to let | 1061 | * org-clock.el (org-clock-find-position): Add statement to let |
| 1062 | clause to bind org-clock-into-drawer to result of function eval, | 1062 | clause to bind `org-clock-into-drawer' to result of function eval, |
| 1063 | change let to let* since the binding is used later in the same | 1063 | change let to let* since the binding is used later in the same |
| 1064 | clause | 1064 | clause. |
| 1065 | 1065 | ||
| 1066 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 1066 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> |
| 1067 | 1067 | ||
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 3d5dc30d823..bca95c97e8b 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -398,6 +398,59 @@ | |||
| 398 | 398 | ||
| 399 | nil))) | 399 | nil))) |
| 400 | 400 | ||
| 401 | (defun c-make-font-lock-BO-decl-search-function (regexp &rest highlights) | ||
| 402 | ;; This function makes a byte compiled function that first moves back | ||
| 403 | ;; to the beginning of the current declaration (if any), then searches | ||
| 404 | ;; forward for matcher elements (as in `font-lock-keywords') and | ||
| 405 | ;; fontifies them. | ||
| 406 | ;; | ||
| 407 | ;; The motivation for moving back to the declaration start is to | ||
| 408 | ;; establish a context for the current text when, e.g., a character | ||
| 409 | ;; is typed on a C++ inheritance continuation line, or a jit-lock | ||
| 410 | ;; chunk starts there. | ||
| 411 | ;; | ||
| 412 | ;; The new function works much like a matcher element in | ||
| 413 | ;; `font-lock-keywords'. It cuts out a little bit of the overhead | ||
| 414 | ;; compared to a real matcher. The main reason is however to pass the | ||
| 415 | ;; real search limit to the anchored matcher(s), since most (if not | ||
| 416 | ;; all) font-lock implementations arbitrarily limit anchored matchers | ||
| 417 | ;; to the same line, and also to insulate against various other | ||
| 418 | ;; irritating differences between the different (X)Emacs font-lock | ||
| 419 | ;; packages. | ||
| 420 | ;; | ||
| 421 | ;; REGEXP is the matcher, which must be a regexp. Only matches | ||
| 422 | ;; where the beginning is outside any comment or string literal are | ||
| 423 | ;; significant. | ||
| 424 | ;; | ||
| 425 | ;; HIGHLIGHTS is a list of highlight specs, just like in | ||
| 426 | ;; `font-lock-keywords', with these limitations: The face is always | ||
| 427 | ;; overridden (no big disadvantage, since hits in comments etc are | ||
| 428 | ;; filtered anyway), there is no "laxmatch", and an anchored matcher | ||
| 429 | ;; is always a form which must do all the fontification directly. | ||
| 430 | ;; `limit' is a variable bound to the real limit in the context of | ||
| 431 | ;; the anchored matcher forms. | ||
| 432 | ;; | ||
| 433 | ;; This function does not do any hidden buffer changes, but the | ||
| 434 | ;; generated functions will. (They are however used in places | ||
| 435 | ;; covered by the font-lock context.) | ||
| 436 | |||
| 437 | ;; Note: Replace `byte-compile' with `eval' to debug the generated | ||
| 438 | ;; lambda more easily. | ||
| 439 | (byte-compile | ||
| 440 | `(lambda (limit) | ||
| 441 | (let ( ;; The font-lock package in Emacs is known to clobber | ||
| 442 | ;; `parse-sexp-lookup-properties' (when it exists). | ||
| 443 | (parse-sexp-lookup-properties | ||
| 444 | (cc-eval-when-compile | ||
| 445 | (boundp 'parse-sexp-lookup-properties)))) | ||
| 446 | (goto-char | ||
| 447 | (let ((here (point))) | ||
| 448 | (if (eq (car (c-beginning-of-decl-1)) 'same) | ||
| 449 | (point) | ||
| 450 | here))) | ||
| 451 | ,(c-make-font-lock-search-form regexp highlights)) | ||
| 452 | nil))) | ||
| 453 | |||
| 401 | (defun c-make-font-lock-context-search-function (normal &rest state-stanzas) | 454 | (defun c-make-font-lock-context-search-function (normal &rest state-stanzas) |
| 402 | ;; This function makes a byte compiled function that works much like | 455 | ;; This function makes a byte compiled function that works much like |
| 403 | ;; a matcher element in `font-lock-keywords', with the following | 456 | ;; a matcher element in `font-lock-keywords', with the following |
| @@ -1828,24 +1881,32 @@ higher." | |||
| 1828 | c-label-face-name nil t)))))) | 1881 | c-label-face-name nil t)))))) |
| 1829 | 1882 | ||
| 1830 | ;; Fontify the clauses after various keywords. | 1883 | ;; Fontify the clauses after various keywords. |
| 1831 | ,@(when (or (c-lang-const c-type-list-kwds) | 1884 | ,@(when (or (c-lang-const c-type-list-kwds) |
| 1832 | (c-lang-const c-ref-list-kwds) | 1885 | (c-lang-const c-ref-list-kwds) |
| 1833 | (c-lang-const c-colon-type-list-kwds) | 1886 | (c-lang-const c-colon-type-list-kwds)) |
| 1834 | (c-lang-const c-paren-type-kwds)) | 1887 | `((,(c-make-font-lock-BO-decl-search-function |
| 1835 | `((,(c-make-font-lock-search-function | 1888 | (concat "\\<\\(" |
| 1836 | (concat "\\<\\(" | 1889 | (c-make-keywords-re nil |
| 1837 | (c-make-keywords-re nil | 1890 | (append (c-lang-const c-type-list-kwds) |
| 1838 | (append (c-lang-const c-type-list-kwds) | 1891 | (c-lang-const c-ref-list-kwds) |
| 1839 | (c-lang-const c-ref-list-kwds) | 1892 | (c-lang-const c-colon-type-list-kwds))) |
| 1840 | (c-lang-const c-colon-type-list-kwds) | 1893 | "\\)\\>") |
| 1841 | (c-lang-const c-paren-type-kwds))) | 1894 | '((c-fontify-types-and-refs ((c-promote-possible-types t)) |
| 1842 | "\\)\\>") | 1895 | (c-forward-keyword-clause 1) |
| 1843 | '((c-fontify-types-and-refs ((c-promote-possible-types t)) | 1896 | (if (> (point) limit) (goto-char limit)))))))) |
| 1844 | (c-forward-keyword-clause 1) | 1897 | |
| 1845 | (if (> (point) limit) (goto-char limit)))))))) | 1898 | ,@(when (c-lang-const c-paren-type-kwds) |
| 1846 | 1899 | `((,(c-make-font-lock-search-function | |
| 1847 | ,@(when (c-major-mode-is 'java-mode) | 1900 | (concat "\\<\\(" |
| 1848 | `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face)))) | 1901 | (c-make-keywords-re nil |
| 1902 | (c-lang-const c-paren-type-kwds)) | ||
| 1903 | "\\)\\>") | ||
| 1904 | '((c-fontify-types-and-refs ((c-promote-possible-types t)) | ||
| 1905 | (c-forward-keyword-clause 1) | ||
| 1906 | (if (> (point) limit) (goto-char limit)))))))) | ||
| 1907 | |||
| 1908 | ,@(when (c-major-mode-is 'java-mode) | ||
| 1909 | `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face)))) | ||
| 1849 | )) | 1910 | )) |
| 1850 | 1911 | ||
| 1851 | (c-lang-defconst c-matchers-1 | 1912 | (c-lang-defconst c-matchers-1 |
diff --git a/lisp/server.el b/lisp/server.el index c91f10b6584..63d46a365c9 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -112,7 +112,10 @@ If set, the server accepts remote connections; otherwise it is local." | |||
| 112 | (put 'server-host 'risky-local-variable t) | 112 | (put 'server-host 'risky-local-variable t) |
| 113 | 113 | ||
| 114 | (defcustom server-port nil | 114 | (defcustom server-port nil |
| 115 | "The port number that the server process should listen on." | 115 | "The port number that the server process should listen on. |
| 116 | This variable only takes effect when the Emacs server is using | ||
| 117 | TCP instead of local sockets. A nil value means to use a random | ||
| 118 | port number." | ||
| 116 | :group 'server | 119 | :group 'server |
| 117 | :type '(choice | 120 | :type '(choice |
| 118 | (string :tag "Port number") | 121 | (string :tag "Port number") |
diff --git a/lisp/shell.el b/lisp/shell.el index 01d1a688f0e..909ebb48afc 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -393,10 +393,28 @@ to `dirtrack-mode'." | |||
| 393 | (while (< (point) end) | 393 | (while (< (point) end) |
| 394 | (skip-chars-forward " \t\n") | 394 | (skip-chars-forward " \t\n") |
| 395 | (push (point) begins) | 395 | (push (point) begins) |
| 396 | (looking-at "\\(?:[^\s\t\n\\]\\|'[^']*'\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\"\\|\\\\.\\)*\\(?:\\\\\\|'[^']*\\|\"\\(?:[^\"\\]\\|\\\\.\\)*\\)?") | 396 | (let ((arg ())) |
| 397 | (goto-char (match-end 0)) | 397 | (while (looking-at |
| 398 | (push (buffer-substring-no-properties (car begins) (point)) | 398 | (eval-when-compile |
| 399 | args)) | 399 | (concat |
| 400 | "\\(?:[^\s\t\n\\\"']+" | ||
| 401 | "\\|'\\([^']*\\)'?" | ||
| 402 | "\\|\"\\(\\(?:[^\"\\]\\|\\\\.\\)*\\)\"?" | ||
| 403 | "\\|\\\\\\(\\(?:.\\|\n\\)?\\)\\)"))) | ||
| 404 | (goto-char (match-end 0)) | ||
| 405 | (cond | ||
| 406 | ((match-beginning 3) ;Backslash escape. | ||
| 407 | (push (if (= (match-beginning 3) (match-end 3)) | ||
| 408 | "\\" (match-string 3)) | ||
| 409 | arg)) | ||
| 410 | ((match-beginning 2) ;Double quote. | ||
| 411 | (push (replace-regexp-in-string | ||
| 412 | "\\\\\\(.\\)" "\\1" (match-string 2)) | ||
| 413 | arg)) | ||
| 414 | ((match-beginning 1) ;Single quote. | ||
| 415 | (push (match-string 1) arg)) | ||
| 416 | (t (push (match-string 0) arg)))) | ||
| 417 | (push (mapconcat #'identity (nreverse arg) "") args))) | ||
| 400 | (cons (nreverse args) (nreverse begins))))) | 418 | (cons (nreverse args) (nreverse begins))))) |
| 401 | 419 | ||
| 402 | (defun shell-completion-vars () | 420 | (defun shell-completion-vars () |
diff --git a/src/ChangeLog b/src/ChangeLog index 7eb18593993..ceed28a7a7f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2011-08-29 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * image.c (parse_image_spec): Check for nonnegative, not for positive, | ||
| 4 | when checking :margin (Bug#9390). | ||
| 5 | (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR): | ||
| 6 | Renamed from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, | ||
| 7 | so that the name doesn't mislead. All uses changed. | ||
| 8 | |||
| 9 | 2011-08-28 Johan Bockgård <bojohan@gnu.org> | ||
| 10 | |||
| 11 | * term.c (init_tty) [HAVE_GPM]: Move mouse settings after | ||
| 12 | set_tty_hooks. | ||
| 13 | |||
| 14 | 2011-08-27 Eli Zaretskii <eliz@gnu.org> | ||
| 15 | |||
| 16 | * xdisp.c (move_it_to): Don't bail out early when reaching | ||
| 17 | position beyond to_charpos, if we are scanning backwards. | ||
| 18 | (move_it_vertically_backward): When DY == 0, make sure we get to | ||
| 19 | the first character in the line after the newline. | ||
| 20 | |||
| 1 | 2011-08-27 Paul Eggert <eggert@cs.ucla.edu> | 21 | 2011-08-27 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 22 | ||
| 3 | * ccl.c: Improve and simplify overflow checking (Bug#9196). | 23 | * ccl.c: Improve and simplify overflow checking (Bug#9196). |
diff --git a/src/image.c b/src/image.c index d0d28bea582..d6bfc4050ca 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -691,7 +691,7 @@ enum image_value_type | |||
| 691 | IMAGE_STRING_OR_NIL_VALUE, | 691 | IMAGE_STRING_OR_NIL_VALUE, |
| 692 | IMAGE_SYMBOL_VALUE, | 692 | IMAGE_SYMBOL_VALUE, |
| 693 | IMAGE_POSITIVE_INTEGER_VALUE, | 693 | IMAGE_POSITIVE_INTEGER_VALUE, |
| 694 | IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, | 694 | IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, |
| 695 | IMAGE_NON_NEGATIVE_INTEGER_VALUE, | 695 | IMAGE_NON_NEGATIVE_INTEGER_VALUE, |
| 696 | IMAGE_ASCENT_VALUE, | 696 | IMAGE_ASCENT_VALUE, |
| 697 | IMAGE_INTEGER_VALUE, | 697 | IMAGE_INTEGER_VALUE, |
| @@ -798,12 +798,12 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords, | |||
| 798 | return 0; | 798 | return 0; |
| 799 | break; | 799 | break; |
| 800 | 800 | ||
| 801 | case IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR: | 801 | case IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR: |
| 802 | if (RANGED_INTEGERP (1, value, INT_MAX)) | 802 | if (RANGED_INTEGERP (0, value, INT_MAX)) |
| 803 | break; | 803 | break; |
| 804 | if (CONSP (value) | 804 | if (CONSP (value) |
| 805 | && RANGED_INTEGERP (1, XCAR (value), INT_MAX) | 805 | && RANGED_INTEGERP (0, XCAR (value), INT_MAX) |
| 806 | && RANGED_INTEGERP (1, XCDR (value), INT_MAX)) | 806 | && RANGED_INTEGERP (0, XCDR (value), INT_MAX)) |
| 807 | break; | 807 | break; |
| 808 | return 0; | 808 | return 0; |
| 809 | 809 | ||
| @@ -2256,7 +2256,7 @@ static const struct image_keyword xbm_format[XBM_LAST] = | |||
| 2256 | {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, | 2256 | {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, |
| 2257 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0}, | 2257 | {":background", IMAGE_STRING_OR_NIL_VALUE, 0}, |
| 2258 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 2258 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 2259 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 2259 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 2260 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 2260 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 2261 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 2261 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 2262 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 2262 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -3051,7 +3051,7 @@ static const struct image_keyword xpm_format[XPM_LAST] = | |||
| 3051 | {":file", IMAGE_STRING_VALUE, 0}, | 3051 | {":file", IMAGE_STRING_VALUE, 0}, |
| 3052 | {":data", IMAGE_STRING_VALUE, 0}, | 3052 | {":data", IMAGE_STRING_VALUE, 0}, |
| 3053 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 3053 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 3054 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 3054 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 3055 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 3055 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 3056 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 3056 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 3057 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 3057 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -4980,7 +4980,7 @@ static const struct image_keyword pbm_format[PBM_LAST] = | |||
| 4980 | {":file", IMAGE_STRING_VALUE, 0}, | 4980 | {":file", IMAGE_STRING_VALUE, 0}, |
| 4981 | {":data", IMAGE_STRING_VALUE, 0}, | 4981 | {":data", IMAGE_STRING_VALUE, 0}, |
| 4982 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 4982 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 4983 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 4983 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 4984 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 4984 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 4985 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 4985 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 4986 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 4986 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -5395,7 +5395,7 @@ static const struct image_keyword png_format[PNG_LAST] = | |||
| 5395 | {":data", IMAGE_STRING_VALUE, 0}, | 5395 | {":data", IMAGE_STRING_VALUE, 0}, |
| 5396 | {":file", IMAGE_STRING_VALUE, 0}, | 5396 | {":file", IMAGE_STRING_VALUE, 0}, |
| 5397 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 5397 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 5398 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 5398 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 5399 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 5399 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 5400 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 5400 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 5401 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 5401 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -6015,7 +6015,7 @@ static const struct image_keyword jpeg_format[JPEG_LAST] = | |||
| 6015 | {":data", IMAGE_STRING_VALUE, 0}, | 6015 | {":data", IMAGE_STRING_VALUE, 0}, |
| 6016 | {":file", IMAGE_STRING_VALUE, 0}, | 6016 | {":file", IMAGE_STRING_VALUE, 0}, |
| 6017 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 6017 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 6018 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 6018 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 6019 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 6019 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 6020 | {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 6020 | {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 6021 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 6021 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -6565,7 +6565,7 @@ static const struct image_keyword tiff_format[TIFF_LAST] = | |||
| 6565 | {":data", IMAGE_STRING_VALUE, 0}, | 6565 | {":data", IMAGE_STRING_VALUE, 0}, |
| 6566 | {":file", IMAGE_STRING_VALUE, 0}, | 6566 | {":file", IMAGE_STRING_VALUE, 0}, |
| 6567 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 6567 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 6568 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 6568 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 6569 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 6569 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 6570 | {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 6570 | {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 6571 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 6571 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -7002,7 +7002,7 @@ static const struct image_keyword gif_format[GIF_LAST] = | |||
| 7002 | {":data", IMAGE_STRING_VALUE, 0}, | 7002 | {":data", IMAGE_STRING_VALUE, 0}, |
| 7003 | {":file", IMAGE_STRING_VALUE, 0}, | 7003 | {":file", IMAGE_STRING_VALUE, 0}, |
| 7004 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 7004 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 7005 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 7005 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 7006 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 7006 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 7007 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 7007 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 7008 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 7008 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -7487,7 +7487,7 @@ static struct image_keyword imagemagick_format[IMAGEMAGICK_LAST] = | |||
| 7487 | {":data", IMAGE_STRING_VALUE, 0}, | 7487 | {":data", IMAGE_STRING_VALUE, 0}, |
| 7488 | {":file", IMAGE_STRING_VALUE, 0}, | 7488 | {":file", IMAGE_STRING_VALUE, 0}, |
| 7489 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 7489 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 7490 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 7490 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 7491 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 7491 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 7492 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 7492 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 7493 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 7493 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -8010,7 +8010,7 @@ static const struct image_keyword svg_format[SVG_LAST] = | |||
| 8010 | {":data", IMAGE_STRING_VALUE, 0}, | 8010 | {":data", IMAGE_STRING_VALUE, 0}, |
| 8011 | {":file", IMAGE_STRING_VALUE, 0}, | 8011 | {":file", IMAGE_STRING_VALUE, 0}, |
| 8012 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 8012 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 8013 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 8013 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 8014 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 8014 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 8015 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 8015 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 8016 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 8016 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| @@ -8405,7 +8405,7 @@ static const struct image_keyword gs_format[GS_LAST] = | |||
| 8405 | {":loader", IMAGE_FUNCTION_VALUE, 0}, | 8405 | {":loader", IMAGE_FUNCTION_VALUE, 0}, |
| 8406 | {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1}, | 8406 | {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1}, |
| 8407 | {":ascent", IMAGE_ASCENT_VALUE, 0}, | 8407 | {":ascent", IMAGE_ASCENT_VALUE, 0}, |
| 8408 | {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, | 8408 | {":margin", IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR, 0}, |
| 8409 | {":relief", IMAGE_INTEGER_VALUE, 0}, | 8409 | {":relief", IMAGE_INTEGER_VALUE, 0}, |
| 8410 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 8410 | {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
| 8411 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, | 8411 | {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, |
diff --git a/src/term.c b/src/term.c index f3bf3a947cb..8672a2417c8 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3138,11 +3138,6 @@ init_tty (const char *name, const char *terminal_type, int must_succeed) | |||
| 3138 | encode_terminal_src_size = 0; | 3138 | encode_terminal_src_size = 0; |
| 3139 | encode_terminal_dst_size = 0; | 3139 | encode_terminal_dst_size = 0; |
| 3140 | 3140 | ||
| 3141 | #ifdef HAVE_GPM | ||
| 3142 | terminal->mouse_position_hook = term_mouse_position; | ||
| 3143 | tty->mouse_highlight.mouse_face_window = Qnil; | ||
| 3144 | #endif | ||
| 3145 | |||
| 3146 | 3141 | ||
| 3147 | #ifndef DOS_NT | 3142 | #ifndef DOS_NT |
| 3148 | set_tty_hooks (terminal); | 3143 | set_tty_hooks (terminal); |
| @@ -3402,6 +3397,11 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ | |||
| 3402 | tty->TN_max_colors = 16; /* Required to be non-zero for tty-display-color-p */ | 3397 | tty->TN_max_colors = 16; /* Required to be non-zero for tty-display-color-p */ |
| 3403 | #endif /* DOS_NT */ | 3398 | #endif /* DOS_NT */ |
| 3404 | 3399 | ||
| 3400 | #ifdef HAVE_GPM | ||
| 3401 | terminal->mouse_position_hook = term_mouse_position; | ||
| 3402 | tty->mouse_highlight.mouse_face_window = Qnil; | ||
| 3403 | #endif | ||
| 3404 | |||
| 3405 | terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); | 3405 | terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD)); |
| 3406 | init_kboard (terminal->kboard); | 3406 | init_kboard (terminal->kboard); |
| 3407 | KVAR (terminal->kboard, Vwindow_system) = Qnil; | 3407 | KVAR (terminal->kboard, Vwindow_system) = Qnil; |
diff --git a/src/xdisp.c b/src/xdisp.c index 7e06938b3d3..8261291f8cc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8414,7 +8414,14 @@ move_it_to (struct it *it, EMACS_INT to_charpos, int to_x, int to_y, int to_vpos | |||
| 8414 | else if (BUFFERP (it->object) | 8414 | else if (BUFFERP (it->object) |
| 8415 | && (it->method == GET_FROM_BUFFER | 8415 | && (it->method == GET_FROM_BUFFER |
| 8416 | || it->method == GET_FROM_STRETCH) | 8416 | || it->method == GET_FROM_STRETCH) |
| 8417 | && IT_CHARPOS (*it) >= to_charpos) | 8417 | && IT_CHARPOS (*it) >= to_charpos |
| 8418 | /* Under bidi iteration, a call to set_iterator_to_next | ||
| 8419 | can scan far beyond to_charpos if the initial | ||
| 8420 | portion of the next line needs to be reordered. In | ||
| 8421 | that case, give move_it_in_display_line_to another | ||
| 8422 | chance below. */ | ||
| 8423 | && !(it->bidi_p | ||
| 8424 | && it->bidi_it.scan_dir == -1)) | ||
| 8418 | skip = MOVE_POS_MATCH_OR_ZV; | 8425 | skip = MOVE_POS_MATCH_OR_ZV; |
| 8419 | else | 8426 | else |
| 8420 | skip = move_it_in_display_line_to (it, to_charpos, -1, MOVE_TO_POS); | 8427 | skip = move_it_in_display_line_to (it, to_charpos, -1, MOVE_TO_POS); |
| @@ -8549,7 +8556,8 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 8549 | reseat_1 (it, it->current.pos, 1); | 8556 | reseat_1 (it, it->current.pos, 1); |
| 8550 | 8557 | ||
| 8551 | /* We are now surely at a line start. */ | 8558 | /* We are now surely at a line start. */ |
| 8552 | it->current_x = it->hpos = 0; | 8559 | it->current_x = it->hpos = 0; /* FIXME: this is incorrect when bidi |
| 8560 | reordering is in effect. */ | ||
| 8553 | it->continuation_lines_width = 0; | 8561 | it->continuation_lines_width = 0; |
| 8554 | 8562 | ||
| 8555 | /* Move forward and see what y-distance we moved. First move to the | 8563 | /* Move forward and see what y-distance we moved. First move to the |
| @@ -8583,10 +8591,25 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 8583 | if (dy == 0) | 8591 | if (dy == 0) |
| 8584 | { | 8592 | { |
| 8585 | /* DY == 0 means move to the start of the screen line. The | 8593 | /* DY == 0 means move to the start of the screen line. The |
| 8586 | value of nlines is > 0 if continuation lines were involved. */ | 8594 | value of nlines is > 0 if continuation lines were involved, |
| 8595 | or if the original IT position was at start of a line. */ | ||
| 8587 | RESTORE_IT (it, it, it2data); | 8596 | RESTORE_IT (it, it, it2data); |
| 8588 | if (nlines > 0) | 8597 | if (nlines > 0) |
| 8589 | move_it_by_lines (it, nlines); | 8598 | move_it_by_lines (it, nlines); |
| 8599 | /* The above code moves us to some position NLINES down, | ||
| 8600 | usually to its first glyph (leftmost in an L2R line), but | ||
| 8601 | that's not necessarily the start of the line, under bidi | ||
| 8602 | reordering. We want to get to the character position | ||
| 8603 | that is immediately after the newline of the previous | ||
| 8604 | line. */ | ||
| 8605 | if (it->bidi_p && IT_CHARPOS (*it) > BEGV | ||
| 8606 | && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') | ||
| 8607 | { | ||
| 8608 | EMACS_INT nl_pos = | ||
| 8609 | find_next_newline_no_quit (IT_CHARPOS (*it) - 1, -1); | ||
| 8610 | |||
| 8611 | move_it_to (it, nl_pos, -1, -1, -1, MOVE_TO_POS); | ||
| 8612 | } | ||
| 8590 | bidi_unshelve_cache (it3data, 1); | 8613 | bidi_unshelve_cache (it3data, 1); |
| 8591 | } | 8614 | } |
| 8592 | else | 8615 | else |