Mercurial > emacs
changeset 90159:08185296b491
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-44
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 272-288)
- src/xdisp.c (dump_glyph_row): Don't display overlay_arrow_p field.
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 67)
- Update from CVS
line wrap: on
line diff
--- a/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,8 @@ +2005-04-23 Andreas Schwab <schwab@suse.de> + + * configure.in: Remove duplicate match for powerpc configuration. + * configure: Regenerate. + 2005-04-20 Thien-Thi Nguyen <ttn@gnu.org> * configure.in: Check for <pwd.h>.
--- a/admin/FOR-RELEASE Thu Apr 28 04:56:56 2005 +0000 +++ b/admin/FOR-RELEASE Thu May 05 00:04:55 2005 +0000 @@ -7,8 +7,6 @@ * NEW FEATURES -** Face remapping. - ** Make VC-over-Tramp work where possible, or at least fail gracefully if something isn't supported over Tramp. To be done by Andre Spiegel <spiegel@gnu.org>. @@ -33,10 +31,6 @@ invalid pointer from string_free_list. -* LOSSAGE - -** Clean up flymake.el to follow Emacs Lisp conventions. - * BUGS ** Ange-ftp should ignore irrelevant IPv6 errors: @@ -92,9 +86,10 @@ *** Update man/info.texi. -*** Update man/ack.texi. +** Add missing years in copyright notices of all files. -** Add missing years in copyright notices of all files. +Please record your name here and say which part of the distribution +you're going to handle. ** Update AUTHORS.
--- a/configure Thu Apr 28 04:56:56 2005 +0000 +++ b/configure Thu May 05 00:04:55 2005 +0000 @@ -1816,11 +1816,6 @@ machine=arm opsys=gnu-linux ;; - ppc-*-linux | \ - powerpc-*-linux* ) - machine=macppc opsys=gnu-linux - ;; - ## Altos 3068 m68*-altos-sysv* ) machine=altos opsys=usg5-2
--- a/configure.in Thu Apr 28 04:56:56 2005 +0000 +++ b/configure.in Thu May 05 00:04:55 2005 +0000 @@ -337,11 +337,6 @@ machine=arm opsys=gnu-linux ;; - ppc-*-linux | \ - powerpc-*-linux* ) - machine=macppc opsys=gnu-linux - ;; - ## Altos 3068 m68*-altos-sysv* ) machine=altos opsys=usg5-2
--- a/etc/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/etc/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,26 @@ +2005-05-02 Richard M. Stallman <rms@gnu.org> + + * NEWS: More rearrangements. + +2005-05-02 Chong Yidong <cyd@stupidchicken.com> + + * NEWS: Items rearranged in logical order. + +2005-05-01 Lars Hansen <larsh@math.ku.dk> + + * NEWS: Correct key binding for dired-mark-omitted. + +2005-04-25 Dan Nicolaescu <dann@ics.uci.edu> + + * NEWS: Mention xterm key bindings. + + * e/eterm.ti: Add a comment. + * e/eterm: Regenerate. + +2005-04-25 Alex Ott <ott@jet.msk.su> + + * TUTORIAL.ru: Update. + 2005-04-13 Pavel Jan,Am(Bk <Pavel@Janik.cz> * TUTORIAL.sk: Updated header. @@ -16,7 +39,7 @@ 2005-04-10 Masatake YAMATO <jet@gyve.org> - * compilation.txt (symbol): Added gcov-file + * compilation.txt (symbol): Added gcov-file gcov-bb-file gcov-never-called-line gcov-called-line . 2005-04-08 Kenichi Handa <handa@m17n.org>
--- a/etc/NEWS Thu Apr 28 04:56:56 2005 +0000 +++ b/etc/NEWS Thu May 05 00:04:55 2005 +0000 @@ -92,17 +92,13 @@ * Installation Changes in Emacs 22.1 -** Emacs includes now support for loading image libraries on demand. -(Currently this feature is only used on MS Windows.) You can configure -the supported image types and their associated dynamic libraries by -setting the variable `image-library-alist'. - ---- -** New translations of the Emacs Tutorial are available in the following - languages: Brasilian, Bulgarian, Chinese (both with simplified and - traditional characters), French, and Italian. Type `C-u C-h t' to - choose one of them in case your language setup doesn't automatically - select the right one. +--- +** Emacs now supports new configure options `--program-prefix', +`--program-suffix' and `--program-transform-name' that affect the names of +installed programs. + +--- +** Emacs can now be built without sound support. --- ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' @@ -110,17 +106,9 @@ provides a way to display multilingual text in menus (with some caveats). --- -** Emacs can now be built without sound support. - ---- ** The `emacsserver' program has been removed, replaced with elisp code. --- -** Emacs now supports new configure options `--program-prefix', -`--program-suffix' and `--program-transform-name' that affect the names of -installed programs. - ---- ** By default, Emacs now uses a setgid helper program to update game scores. The directory ${localstatedir}/games/emacs is the normal place for game scores to be stored. This may be controlled by the @@ -137,7 +125,7 @@ +++ ** The Emacs Lisp Reference Manual is now part of the distribution. -The ELisp reference manual in Info format is built as part of the +The Emacs Lisp Reference Manual in Info format is built as part of the Emacs build procedure and installed together with the Emacs User Manual. A menu item was added to the menu bar that makes it easy accessible (Help->More Manuals->Emacs Lisp Reference). @@ -152,6 +140,22 @@ (Help->More Manuals->Introduction to Emacs Lisp). --- +** New translations of the Emacs Tutorial are available in the +following languages: Brasilian Portuguese, Bulgarian, Chinese (both +with simplified and traditional characters), French, and Italian. +Type `C-u C-h t' to choose one of them in case your language setup +doesn't automatically select the right one. + +--- +** A French translation of the `Emacs Survival Guide' is available. + +--- +** Emacs now includes support for loading image libraries on demand. +(Currently this feature is only used on MS Windows.) You can configure +the supported image types and their associated dynamic libraries by +setting the variable `image-library-alist'. + +--- ** Support for Cygwin was added. --- @@ -173,100 +177,610 @@ the files mac/README and mac/INSTALL for build instructions. --- -** A French translation of the `Emacs Survival Guide' is available. - ---- ** Building with -DENABLE_CHECKING does not automatically build with union types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. + +* Startup Changes in Emacs 22.1 + +** New command line option -Q or --quick. +This is like using -q --no-site-file, but in addition it also disables +the fancy startup screen. + ++++ +** New command line option -D or --basic-display. +Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and +the blinking cursor. + ++++ +** New command line option -nbc or --no-blinking-cursor disables +the blinking cursor on graphical terminals. + ++++ +** The command line option --no-windows has been changed to +--no-window-system. The old one still works, but is deprecated. + ++++ +** The -f option, used from the command line to call a function, +now reads arguments for the function interactively if it is +an interactively callable function. + ++++ +** Emacs can now be invoked in full-screen mode on a windowed display. +When Emacs is invoked on a window system, the new command-line options +`--fullwidth', `--fullheight', and `--fullscreen' produce a frame +whose width, height, or both width and height take up the entire +screen size. (For now, this does not work with some window managers.) + ++++ +** Emacs now displays a splash screen by default even if command-line +arguments were given. The new command-line option --no-splash +disables the splash screen; see also the variable +`inhibit-startup-message' (which is also aliased as +`inhibit-splash-screen'). + ++++ +** New user option `inhibit-startup-buffer-menu'. +When loading many files, for instance with `emacs *', Emacs normally +displays a buffer menu. This option turns the buffer menu off. + ++++ +** Init file changes +You can now put the init files .emacs and .emacs_SHELL under +~/.emacs.d or directly under ~. Emacs will find them in either place. + ++++ +** Emacs now reads the standard abbrevs file ~/.abbrev_defs +automatically at startup, if it exists. When Emacs offers to save +modified buffers, it saves the abbrevs too if they have changed. It +can do this either silently or asking for confirmation first, +according to the value of `save-abbrevs'. -* Changes in Emacs 22.1 - -** Improved Thai support. A new minor mode `thai-word-mode' (which is -automatically activated if you select Thai as a language -environment) changes key bindings of most word-oriented commands to -versions which recognize Thai words. Affected commands are - M-f (forward-word) - M-b (backward-word) - M-d (kill-word) - M-DEL (backward-kill-word) - M-t (transpose-words) - M-q (fill-paragraph) - -** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead. - -** iso-acc.el is now obsolete. Use one of the latin input methods instead. - ---- -** Language environment and various default coding systems are setup -more correctly according to the current locale name. If the locale -name doesn't specify a charset, the default is what glibc defines. -This change may result in using the different coding systems as -default in some locale (e.g. vi_VN). - -+++ -** The commands copy-file, rename-file, make-symbolic-link and -add-name-to-file, when given a directory as the "new name" argument, -convert it to a file name by merging in the within-directory part of -the existing file's name. (This is the same convention that shell -commands cp, mv, and ln follow.) Thus, M-x copy-file RET ~/foo RET -/tmp RET copies ~/foo to /tmp/foo. +* Editing Changes in Emacs 22.1 + ++++ +** The mode line position information now comes before the major mode. +When the file is maintained under version control, that information +appears between the position information and the major mode. + ++++ +** M-g is now a prefix key. +M-g g and M-g M-g run goto-line. +M-g n and M-g M-n run next-error (like C-x `). +M-g p and M-g M-p run previous-error. +++ ** M-o now is the prefix key for setting text properties; M-o M-o requests refontification. +++ -** M-g is now a prefix key. - -M-g g and M-g M-g run goto-line. -M-g n and M-g M-n run next-error (like C-x `). -M-g p and M-g M-p run previous-error. - -+++ -** font-lock-lines-before specifies a number of lines before the -current line that should be refontified when you change the buffer. -The default value is 1. - -+++ ** C-u M-x goto-line now switches to the most recent previous buffer, and goes to the specified line in that buffer. When goto-line starts to execute, if there's a number in the buffer at point then it acts as the default argument for the minibuffer. ---- -** Emacs now responds to mouse-clicks on the mode-line, header-line and -display margin, when run in an xterm. ++++ +** You can now switch buffers in a cyclic order with C-x C-left and +(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right +can be used as well. + ++++ +** The old bindings C-M-delete and C-M-backspace have been deleted, +since there are situations where one or the other will shut down +the operating system or your X server. + ++++ +** `undo-only' does an undo which does not redo any previous undo. + ++++ +** When the undo information of the current command gets really large +(beyond the value of `undo-outer-limit'), Emacs discards it and warns +you about it. +++ ** M-SPC (just-one-space) when given a numeric argument N converts whitespace around point to N spaces. +++ -** Control characters and escape glyphs are now shown in the new +** line-move-ignore-invisible now defaults to t. + +--- +** New commands to operate on pairs of open and close characters: +`insert-pair', `delete-pair', `raise-sexp'. + +--- +** New command `kill-whole-line' kills an entire line at once. +By default, it is bound to C-S-<backspace>. + ++++ +** Yanking text now discards certain text properties that can +be inconvenient when you did not expect them. The variable +`yank-excluded-properties' specifies which ones. Insertion +of register contents and rectangles also discards these properties. + ++++ +** The default values of paragraph-start and indent-line-function have +been changed to reflect those used in Text mode rather than those used +in Indented-Text mode. + ++++ +** Movement commands `beginning-of-buffer', `end-of-buffer', +`beginning-of-defun', `end-of-defun' do not set the mark if the mark +is already active in Transient Mark mode. + +** Mark Changes: + ++++ +*** A prefix argument is no longer required to repeat a jump to a +previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the +mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. + ++++ +*** Marking commands extend the region when invoked multiple times. If +you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or +C-M-h (mark-defun) repeatedly, the marked region extends each time, so +you can mark the next two sexps with M-C-SPC M-C-SPC, for example. +This feature also works for mark-end-of-sentence, if you bind that to +a key. It also extends the region when the mark is active in Transient +Mark mode, regardless of the last command. To start a new region with +one of marking commands in Transient Mark mode, you can deactivate the +active region with C-g, or set the new mark with C-SPC. + ++++ +*** M-h (mark-paragraph) now accepts a prefix arg. +With positive arg, M-h marks the current and the following paragraphs; +if the arg is negative, it marks the current and the preceding +paragraphs. + ++++ +*** Some commands do something special in Transient Mark mode when the +mark is active--for instance, they limit their operation to the +region. Even if you don't normally use Transient Mark mode, you might +want to get this behavior from a particular command. There are two +ways you can enable Transient Mark mode and activate the mark, for one +command only. + +One method is to type C-SPC C-SPC; this enables Transient Mark mode +and sets the mark at point. The other method is to type C-u C-x C-x. +This enables Transient Mark mode temporarily but does not alter the +mark or the region. + +After these commands, Transient Mark mode remains enabled until you +deactivate the mark. That typically happens when you type a command +that alters the buffer, but you can also deactivate the mark by typing +C-g. + +** Help command changes: + ++++ +*** Changes in C-h bindings: + +C-h e displays the *Messages* buffer. + +C-h followed by a control character is used for displaying files + that do not change: + +C-h C-f displays the FAQ. +C-h C-e displays the PROBLEMS file. + +The info-search bindings on C-h C-f, C-h C-k and C-h C-i +have been moved to C-h F, C-h K and C-h S. + +C-h c, C-h k, C-h w, and C-h f now handle remapped interactive commands. + +- C-h c and C-h k report the actual command (after possible remapping) + run by the key sequence. + +- C-h w and C-h f on a command which has been remapped now report the + command it is remapped to, and the keys which can be used to run + that command. + +For example, if C-k is bound to kill-line, and kill-line is remapped +to new-kill-line, these commands now report: + +- C-h c and C-h k C-k reports: + C-k runs the command new-kill-line + +- C-h w and C-h f kill-line reports: + kill-line is remapped to new-kill-line which is on C-k, <deleteline> + +- C-h w and C-h f new-kill-line reports: + new-kill-line is on C-k + +--- +*** Help commands `describe-function' and `describe-key' now show function +arguments in lowercase italics on displays that support it. To change the +default, customize face `help-argument-name' or redefine the function +`help-default-arg-highlight'. + ++++ +*** C-h v and C-h f commands now include a hyperlink to the C source for +variables and functions defined in C (if the C source is available). + ++++ +*** Help mode now only makes hyperlinks for faces when the face name is +preceded or followed by the word `face'. It no longer makes +hyperlinks for variables without variable documentation, unless +preceded by one of the words `variable' or `option'. It now makes +hyperlinks to Info anchors (or nodes) if the anchor (or node) name is +enclosed in single quotes and preceded by `info anchor' or `Info +anchor' (in addition to earlier `info node' and `Info node'). + ++++ +*** The new command `describe-char' (C-u C-x =) pops up a buffer with +description various information about a character, including its +encodings and syntax, its text properties, how to input, overlays, and +widgets at point. You can get more information about some of them, by +clicking on mouse-sensitive areas or moving there and pressing RET. + ++++ +*** New command `display-local-help' displays any local help at point +in the echo area. It is bound to `C-h .'. It normally displays the +same string that would be displayed on mouse-over using the +`help-echo' property, but, in certain cases, it can display a more +keyboard oriented alternative. + ++++ +*** New user option `help-at-pt-display-when-idle' allows to +automatically show the help provided by `display-local-help' on +point-over, after suitable idle time. The amount of idle time is +determined by the user option `help-at-pt-timer-delay' and defaults +to one second. This feature is turned off by default. + +** Buffer Menu changes + ++++ +*** New command `Buffer-menu-toggle-files-only' toggles display of file +buffers only in the Buffer Menu. It is bound to `T' in Buffer Menu +mode. + ++++ +*** `buffer-menu' and `list-buffers' now list buffers whose names begin +with a space, when those buffers are visiting files. Normally buffers +whose names begin with space are omitted. + +--- +*** The new options `buffers-menu-show-directories' and +`buffers-menu-show-status' let you control how buffers are displayed +in the menu dropped down when you click "Buffers" from the menu bar. + +`buffers-menu-show-directories' controls whether the menu displays +leading directories as part of the file name visited by the buffer. +If its value is `unless-uniquify', the default, directories are +shown unless uniquify-buffer-name-style' is non-nil. The value of nil +and t turn the display of directories off and on, respectively. + +`buffers-menu-show-status' controls whether the Buffers menu includes +the modified and read-only status of the buffers. By default it is +t, and the status is shown. + +Setting these variables directly does not take effect until next time +the Buffers menu is regenerated. + +** File Operation Changes: + ++++ +*** find-file-read-only visits multiple files in read-only mode, +when the file name contains wildcard characters. + ++++ +*** find-alternate-file replaces the current file with multiple files, +when the file name contains wildcard characters. + ++++ +*** Auto Compression mode is now enabled by default. + +--- +*** C-x C-f RET, typing nothing in the minibuffer, is no longer a special case. + +Since the default input is the current directory, this has the effect +of specifying the current directory. Normally that means to visit the +directory with Dired. + ++++ +*** When you are root, and you visit a file whose modes specify +read-only, the Emacs buffer is now read-only too. Type C-x C-q if you +want to make the buffer writable. (As root, you can in fact alter the +file.) + ++++ +*** C-x s (save-some-buffers) now offers an option `d' to diff a buffer +against its file, so you can see what changes you would be saving. + ++++ +*** The commands copy-file, rename-file, make-symbolic-link and +add-name-to-file, when given a directory as the "new name" argument, +convert it to a file name by merging in the within-directory part of +the existing file's name. (This is the same convention that shell +commands cp, mv, and ln follow.) Thus, M-x copy-file RET ~/foo RET +/tmp RET copies ~/foo to /tmp/foo. + +--- +*** When used interactively, `format-write-file' now asks for confirmation +before overwriting an existing file, unless a prefix argument is +supplied. This behavior is analogous to `write-file'. + +--- +*** The variable `auto-save-file-name-transforms' now has a third element that +controls whether or not the function `make-auto-save-file-name' will +attempt to construct a unique auto-save name (e.g. for remote files). + ++++ +*** If the user visits a file larger than `large-file-warning-threshold', +Emacs prompts her for confirmation. + ++++ +*** require-final-newline now has two new possible values: + +`visit' means add a newline (as an undoable change) if it's needed +when visiting the file. + +`visit-save' means add a newline (as an undoable change) if it's +needed when visiting the file, and also add a newline if it's needed +when saving the file. + ++++ +*** The new option mode-require-final-newline controls how certain +major modes enable require-final-newline. Any major mode that's +designed for a kind of file that should normally end in a newline +sets require-final-newline based on mode-require-final-newline. +So you can customize mode-require-final-newline to control what these +modes do. + ++++ +** The max size of buffers and integers has been doubled. +On 32bit machines, it is now 256M (i.e. 268435455). + +** Minibuffer changes: + ++++ +*** There's a new face `minibuffer-prompt'. +Emacs adds this face to the list of text properties stored in the +variable `minibuffer-prompt-properties', which is used to display the +prompt string. + +--- +*** Enhanced visual feedback in *Completions* buffer. + +Completions lists use faces to highlight what all completions +have in common and where they begin to differ. + +The common prefix shared by all possible completions uses the face +`completions-common-part', while the first character that isn't the +same uses the face `completions-first-difference'. By default, +`completions-common-part' inherits from `default', and +`completions-first-difference' inherits from `bold'. The idea of +`completions-common-part' is that you can use it to make the common +parts less visible than normal, so that the rest of the differing +parts is, by contrast, slightly highlighted. + ++++ +*** File-name completion can now ignore directories. +If an element of the list in `completion-ignored-extensions' ends in a +slash `/', it indicates a subdirectory that should be ignored when +completing file names. Elements of `completion-ignored-extensions' +which do not end in a slash are never considered when a completion +candidate is a directory. + ++++ +*** The completion commands TAB, SPC and ? in the minibuffer apply only +to the text before point. If there is text in the buffer after point, +it remains unchanged. + ++++ +*** New user option `history-delete-duplicates'. +If set to t when adding a new history element, all previous identical +elements are deleted. + +** Redisplay Changes + ++++ +*** Control characters and escape glyphs are now shown in the new escape-glyph face. +++ -** Non-breaking space and hyphens are now prefixed with an escape +*** Non-breaking space and hyphens are now prefixed with an escape character, unless the new user variable `show-nonbreak-escape' is set to nil. ---- -** The type-break package now allows `type-break-file-name' to be nil -and if so, doesn't store any data across sessions. This is handy if -you don't want the .type-break file in your home directory or are -annoyed by the need for interaction when you kill Emacs. - ---- -** display-battery has been replaced by display-battery-mode. - ---- -** calculator.el now has radix grouping mode, which is available when -`calculator-output-radix' is non-nil. In this mode a separator -character is used every few digits, making it easier to see byte -boundries etc. For more info, see the documentation of the variable -`calculator-radix-grouping-mode'. ++++ +*** The parameters of automatic hscrolling can now be customized. +The variable `hscroll-margin' determines how many columns away from +the window edge point is allowed to get before automatic hscrolling +will horizontally scroll the window. The default value is 5. + +The variable `hscroll-step' determines how many columns automatic +hscrolling scrolls the window when point gets too close to the +window edge. If its value is zero, the default, Emacs scrolls the +window so as to center point. If its value is an integer, it says how +many columns to scroll. If the value is a floating-point number, it +gives the fraction of the window's width to scroll the window. + +The variable `automatic-hscrolling' was renamed to +`auto-hscroll-mode'. The old name is still available as an alias. + +*** Moving or scrolling through images (and other lines) taller that +the window now works sensible, by automatically adjusting the window's +vscroll property. + ++++ +*** In graphical mode, with a C program, GUD Tooltips have been extended to +display the #define directive associated with an identifier when program is +not executing. + ++++ +*** The new face `mode-line-inactive' is used to display the mode line +of non-selected windows. The `mode-line' face is now used to display +the mode line of the currently selected window. + +The new variable `mode-line-in-non-selected-windows' controls whether +the `mode-line-inactive' face is used. + ++++ +*** You can now customize the use of window fringes. To control this +for all frames, use M-x fringe-mode or the Show/Hide submenu of the +top-level Options menu, or customize the `fringe-mode' variable. To +control this for a specific frame, use the command M-x +set-fringe-style. + ++++ +*** The buffer boundaries (i.e. first and last line in the buffer) may +now be marked with angle bitmaps in the fringes. In addition, up and +down arrow bitmaps may be shown at the top and bottom of the left or +right fringe if the window can be scrolled in either direction. + +This behavior is activated by setting the buffer-local variable +`indicate-buffer-boundaries' to a non-nil value. The default value of +this variable is found in `default-indicate-buffer-boundaries'. + +If value is `left' or `right', both angle and arrow bitmaps are +displayed in the left or right fringe, resp. + +Value may also be an alist which specifies the presense and position +of each bitmap individually. + +For example, ((top . left) (t . right)) places the top angle bitmap +in left fringe, the bottom angle bitmap in right fringe, and both +arrow bitmaps in right fringe. To show just the angle bitmaps in the +left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). + ++++ +*** On window systems, lines which are exactly as wide as the window +(not counting the final newline character) are no longer broken into +two lines on the display (with just the newline on the second line). +Instead, the newline now "overflows" into the right fringe, and the +cursor will be displayed in the fringe when positioned on that newline. + +The new user option 'overflow-newline-into-fringe' may be set to nil to +revert to the old behavior of continuing such lines. + ++++ +*** When display margins are present in a window, the fringes are now +displayed between the margins and the buffer's text area, rather than +at the edges of the window. + ++++ +*** A window may now have individual fringe and scroll-bar settings, +in addition to the individual display margin settings. + +Such individual settings are now preserved when windows are split +horizontally or vertically, a saved window configuration is restored, +or when the frame is resized. + +** Cursor Display Changes + ++++ +*** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is +now controlled by the variable `blink-cursor-alist'. + ++++ +*** The X resource cursorBlink can be used to turn off cursor blinking. + ++++ +*** Emacs can produce an underscore-like (horizontal bar) cursor. +The underscore cursor is set by putting `(cursor-type . hbar)' in +default-frame-alist. It supports variable heights, like the `bar' +cursor does. + ++++ +*** Display of hollow cursors now obeys the buffer-local value (if any) +of `cursor-in-non-selected-windows' in the buffer that the cursor +appears in. + ++++ +*** The variable `cursor-in-non-selected-windows' can now be set to any +of the recognized cursor types. + ++++ +** font-lock-lines-before specifies a number of lines before the +current line that should be refontified when you change the buffer. +The default value is 1. + +--- +** JIT-lock changes + +*** The default settings for JIT stealth lock parameters are changed. +The default value for the user option jit-lock-stealth-time is now 16 +instead of 3, and the default value of jit-lock-stealth-nice is now +0.5 instead of 0.125. The new defaults should lower the CPU usage +when Emacs is fontifying in the background. + + +*** jit-lock can now be delayed with `jit-lock-defer-time'. + +If this variable is non-nil, its value should be the amount of Emacs +idle time in seconds to wait before starting fontification. For +example, if you set `jit-lock-defer-time' to 0.25, fontification will +only happen after 0.25s of idle time. + +*** contextual refontification is now separate from stealth fontification. + +jit-lock-defer-contextually is renamed jit-lock-contextually and +jit-lock-context-time determines the delay after which contextual +refontification takes place. + +** Menu Bar changes + +--- +*** A menu item "Show/Hide" was added to the top-level menu "Options". +This menu allows you to turn various display features on and off (such +as the fringes, the tool bar, the speedbar, and the menu bar itself). +You can also move the vertical scroll bar to either side here or turn +it off completely. There is also a menu-item to toggle displaying of +current date and time, current line and column number in the +mode-line. + +--- +*** Speedbar has moved from the "Tools" top level menu to "Show/Hide". + ++++ +** You can now customize fill-nobreak-predicate to control where +filling can break lines. The value is now normally a list of +functions, but it can also be a single function, for compatibility. + +We provide two sample predicates, fill-single-word-nobreak-p and +fill-french-nobreak-p, for use in the value of fill-nobreak-predicate. + ++++ +** New display feature: focus follows the mouse from one Emacs window +to another, even within a frame. If you set the variable +mouse-autoselect-window to non-nil value, moving the mouse to a +different Emacs window will select that window (minibuffer window can +be selected only when it is active). The default is nil, so that this +feature is not enabled. + ++++ +** On X, when the window manager requires that you click on a frame to +select it (give it focus), the selected window and cursor position +normally changes according to the mouse click position. If you set +the variable x-mouse-click-focus-ignore-position to t, the selected +window and cursor position do not change when you click on a frame +to give it focus. + ++++ +** When you specify a frame size with --geometry, the size applies to +all frames you create. A position specified with --geometry only +affects the initial frame. + ++++ +** `special-display-buffer-names' and `special-display-regexps' now +understand two new boolean pseudo-frame-parameters `same-frame' and +`same-window'. + +--- +** New commands `scan-buf-next-region' and `scan-buf-previous-region' +move to the start of the next (previous, respectively) region with +non-nil help-echo property and display any help found there in the +echo area, using `display-local-help'. + ++++ +** In processing a local variables list, Emacs strips the prefix and +suffix are from every line before processing all the lines. + ++++ +** `apply-macro-to-region-lines' now operates on all lines that begin +in the region, rather than on all complete lines in the region. +++ ** You can now follow links by clicking Mouse-1 on the link. @@ -299,109 +813,328 @@ `mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'. +++ -** require-final-newline now has two new possible values: - -`visit' means add a newline (as an undoable change) if it's needed -when visiting the file. - -`visit-save' means add a newline (as an undoable change) if it's -needed when visiting the file, and also add a newline if it's needed -when saving the file. - -+++ -** The new option mode-require-final-newline controls how certain -major modes enable require-final-newline. Any major mode that's -designed for a kind of file that should normally end in a newline -sets require-final-newline based on mode-require-final-newline. -So you can customize mode-require-final-newline to control what these -modes do. - -+++ -** When the undo information of the current command gets really large -(beyond the value of `undo-outer-limit'), Emacs discards it and warns -you about it. - -+++ -** line-move-ignore-invisible now defaults to t. +** Emacs normally highlights mouse sensitive text whenever the mouse +is over the text. By setting the new variable `mouse-highlight', you +can optionally enable mouse highlighting only after you move the +mouse, so that highlighting disappears when you press a key. You can +also disable mouse highlighting. + ++++ +** You can now customize if selecting a region by dragging the mouse +shall not copy the selected text to the kill-ring by setting the new +variable mouse-drag-copy-region to nil. + +--- +** mouse-wheels can now scroll a specific fraction of the window +(rather than a fixed number of lines) and the scrolling is `progressive'. + +--- +** Unexpected yanking of text due to accidental clicking on the mouse +wheel button (typically mouse-2) during wheel scrolling is now avoided. +This behavior can be customized via the mouse-wheel-click-event and +mouse-wheel-inhibit-click-time variables. + ++++ +** Under X, mouse-wheel-mode is turned on by default. + ++++ +** M-x setenv now expands environment variables of the form `$foo' and +`${foo}' in the specified new value of the environment variable. To +include a `$' in the value, use `$$'. + ++++ +** Unquoted `$' in file names do not signal an error any more when +the corresponding environment variable does not exist. +Instead, the `$ENVVAR' text is left as is, so that `$$' quoting +is only rarely needed. + +--- +** Language environment and various default coding systems are setup +more correctly according to the current locale name. If the locale +name doesn't specify a charset, the default is what glibc defines. +This change may result in using the different coding systems as +default in some locale (e.g. vi_VN). + ++++ +** The default for the paper size (variable ps-paper-type) is taken +from the locale. + ++++ +** The keyboard-coding-system is now automatically set based on your +current locale settings if you are not using a window system. This +may mean that the META key doesn't work but generates non-ASCII +characters instead, depending on how the terminal (or terminal +emulator) works. Use `set-keyboard-coding-system' (or customize +keyboard-coding-system) if you prefer META to work (the old default) +or if the locale doesn't describe the character set actually generated +by the keyboard. See Info node `Single-Byte Character Support'. + ++++ +** The new command `revert-buffer-with-coding-system' (C-x RET r) +revisits the current file using a coding system that you specify. + ++++ +** New command `recode-region' decodes the region again by a specified +coding system. + ++++ +** The new command `recode-file-name' changes the encoding of the name +of a file. + +--- +** New command `ucs-insert' inserts a character specified by its +unicode. + ++++ +** The new command `set-file-name-coding-system' (C-x RET F) sets +coding system for encoding and decoding file names. A new menu item +(Options->Mule->Set Coding Systems->For File Name) invokes this +command. + ++++ +** New command quail-show-key shows what key (or key sequence) to type +in the current input method to input a character at point. + ++++ +** Limited support for character `unification' has been added. +Emacs now knows how to translate between different representations of +the same characters in various Emacs charsets according to standard +Unicode mappings. This applies mainly to characters in the ISO 8859 +sets plus some other 8-bit sets, but can be extended. For instance, +translation works amongst the Emacs ...-iso8859-... charsets and the +mule-unicode-... ones. + +By default this translation happens automatically on encoding. +Self-inserting characters are translated to make the input conformant +with the encoding of the buffer in which it's being used, where +possible. + +You can force a more complete unification with the user option +unify-8859-on-decoding-mode. That maps all the Latin-N character sets +into Unicode characters (from the latin-iso8859-1 and +mule-unicode-0100-24ff charsets) on decoding. Note that this mode +will often effectively clobber data with an iso-2022 encoding. + +--- +** There is support for decoding Greek and Cyrillic characters into +either Unicode (the mule-unicode charsets) or the iso-8859 charsets, +when possible. The latter are more space-efficient. This is +controlled by user option utf-fragment-on-decoding. + +--- +** New language environments: French, Ukrainian, Tajik, +Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6, +Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian, +Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up +automatically according to the locale.) + +--- +** New input methods: latin-alt-postfix, latin-postfix, latin-prefix, +ukrainian-computer, belarusian, bulgarian-bds, russian-computer, +vietnamese-telex, lithuanian-numeric, lithuanian-keyboard, +latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml, +bulgarian-phonetic, dutch, slovenian, croatian, malayalam-inscript, +tamil-inscript. + +--- +** New input method chinese-sisheng for inputting Chinese Pinyin +characters. + +--- +** Improved Thai support. A new minor mode `thai-word-mode' (which is +automatically activated if you select Thai as a language +environment) changes key bindings of most word-oriented commands to +versions which recognize Thai words. Affected commands are + M-f (forward-word) + M-b (backward-word) + M-d (kill-word) + M-DEL (backward-kill-word) + M-t (transpose-words) + M-q (fill-paragraph) + +--- +** Indian support has been updated. +The in-is13194 coding system is now Unicode-based. CDAC fonts are +assumed. There is a framework for supporting various +Indian scripts, but currently only Devanagari, Malayalam and Tamil are +supported. + +--- +** A UTF-7 coding system is available in the library `utf-7'. + +--- +** The utf-8/16 coding systems have been enhanced. +By default, untranslatable utf-8 sequences are simply composed into +single quasi-characters. User option `utf-translate-cjk-mode' (it is +turned on by default) arranges to translate many utf-8 CJK character +sequences into real Emacs characters in a similar way to the Mule-UCS +system. As this loads a fairly big data on demand, people who are not +interested in CJK characters may want to customize it to nil. +You can augment/amend the CJK translation via hash tables +`ucs-mule-cjk-to-unicode' and `ucs-unicode-to-mule-cjk'. The utf-8 +coding system now also encodes characters from most of Emacs's +one-dimensional internal charsets, specifically the ISO-8859 ones. +The utf-16 coding system is affected similarly. + +--- +** A new coding system `euc-tw' has been added for traditional Chinese +in CNS encoding; it accepts both Big 5 and CNS as input; on saving, +Big 5 is then converted to CNS. + +--- +** Many new coding systems are available by loading the `code-pages' +library. These include complete versions of most of those in +codepage.el, based on Unicode mappings. `codepage-setup' is now +obsolete and is used only in the MS-DOS port of Emacs. windows-1252 +and windows-1251 are preloaded since the former is so common and the +latter is used by GNU locales. + +--- +** New variable `utf-translate-cjk-unicode-range' controls which +Unicode characters to translate in `utf-translate-cjk-mode'. + +--- +** iso-10646-1 (`Unicode') fonts can be used to display any range of +characters encodable by the utf-8 coding system. Just specify the +fontset appropriately. + ++++ +** Vertical scrolling is now possible within incremental search. +To enable this feature, customize the new user option +`isearch-allow-scroll'. User written commands which satisfy stringent +constraints can be marked as "scrolling commands". See the Emacs manual +for details. + ++++ +** C-w in incremental search now grabs either a character or a word, +making the decision in a heuristic way. This new job is done by the +command `isearch-yank-word-or-char'. To restore the old behavior, +bind C-w to `isearch-yank-word' in `isearch-mode-map'. + ++++ +** C-y in incremental search now grabs the next line if point is already +at the end of a line. + ++++ +** C-M-w deletes and C-M-y grabs a character in isearch mode. +Another method to grab a character is to enter the minibuffer by `M-e' +and to type `C-f' at the end of the search string in the minibuffer. + ++++ +** M-% typed in isearch mode invokes `query-replace' or +`query-replace-regexp' (depending on search mode) with the current +search string used as the string to replace. + ++++ +** Isearch no longer adds `isearch-resume' commands to the command +history by default. To enable this feature, customize the new +user option `isearch-resume-in-command-history'. + +--- +** New user option `query-replace-skip-read-only': when non-nil, +`query-replace' and related functions simply ignore +a match if part of it has a read-only property. + ++++ +** When used interactively, the commands `query-replace-regexp' and +`replace-regexp' allow \,expr to be used in a replacement string, +where expr is an arbitrary Lisp expression evaluated at replacement +time. In many cases, this will be more convenient than using +`query-replace-regexp-eval'. `\#' in a replacement string now refers +to the count of replacements already made by the replacement command. +All regular expression replacement commands now allow `\?' in the +replacement string to specify a position where the replacement string +can be edited for each replacement. + ++++ +** query-replace uses isearch lazy highlighting when the new user option +`query-replace-lazy-highlight' is non-nil. + +--- +** The current match in query-replace is highlighted in new face +`query-replace' which by default inherits from isearch face. + ++++ +** M-x compare-windows now can automatically skip non-matching text to +resync points in both windows. + ++++ +** The commands M-x customize-face and M-x customize-face-other-window +now look at the character after point. If a face or faces are +specified for that character, the commands by default customize those +faces. + +--- +** The face-customization widget has been reworked to be less confusing. +In particular, when you enable a face attribute using the corresponding +check-box, there's no longer a redundant `*' option in value selection +for that attribute; the values you can choose are only those which make +sense for the attribute. When an attribute is de-selected by unchecking +its check-box, then the (now ignored, but still present temporarily in +case you re-select the attribute) value is hidden. + ++++ +** When you set or reset a variable's value in a Customize buffer, +the previous value becomes the "backup value" of the variable. +You can go back to that backup value by selecting "Use Backup Value" +under the "[State]" button. + +** Dired mode: + +--- +*** New faces dired-header, dired-mark, dired-marked, dired-flagged, +dired-ignored, dired-directory, dired-symlink, dired-warning +introduced for Dired mode instead of font-lock faces. + ++++ +*** New Dired command `dired-compare-directories' marks files +with different file attributes in two dired buffers. + ++++ +*** New Dired command `dired-do-touch' (bound to T) changes timestamps +of marked files with the value entered in the minibuffer. + ++++ +*** In Dired's ! command (dired-do-shell-command), `*' and `?' now +control substitution of the file names only when they are surrounded +by whitespace. This means you can now use them as shell wildcards +too. If you want to use just plain `*' as a wildcard, type `*""'; the +doublequotes make no difference in the shell, but they prevent +special treatment in `dired-do-shell-command'. + ++++ +*** In Dired, the w command now copies the current line's file name +into the kill ring. With a zero prefix arg, copies absolute file names. + ++++ +** The variables dired-free-space-program and dired-free-space-args +have been renamed to directory-free-space-program and +directory-free-space-args, and they now apply whenever Emacs puts a +directory listing into a buffer. + ++++ +** Dired-x: + ++++ +*** Omitting files is now a minor mode, dired-omit-mode. The mode toggling +command is bound to M-o. A new command dired-mark-omitted, bound to * O, +marks omitted files. The variable dired-omit-files-p is obsoleted, use the +mode toggling function instead. +++ ** In Outline mode, hide-body no longer hides lines at the top of the file that precede the first header line. +++ -** In Enriched mode, `set-left-margin' and `set-right-margin' are now -by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' -and `C-c C-r'. - -+++ -** In processing a local variables list, Emacs strips the prefix and -suffix are from every line before processing all the lines. - -+++ -** `apply-macro-to-region-lines' now operates on all lines that begin -in the region, rather than on all complete lines in the region. - ---- -** global-whitespace-mode is a new alias for whitespace-global-mode. - -+++ -** There are now two new regular expression operators, \_< and \_>, -for matching the beginning and end of a symbol. A symbol is a -non-empty sequence of either word or symbol constituent characters, as -specified by the syntax table. ---- -*** rx.el has new corresponding `symbol-end' and `symbol-start' elements. - -+++ -** Passing resources on the command line now works on MS Windows. -You can use --xrm to pass resource settings to Emacs, overriding any -existing values. For example: - - emacs --xrm "Emacs.Background:red" --xrm "Emacs.Geometry:100x20" - -will start up Emacs on an initial frame of 100x20 with red background, -irrespective of geometry or background setting on the Windows registry. +** Occur, Info, and comint-derived modes now support using +M-x font-lock-mode to toggle fontification. The variable +`Info-fontify' is no longer applicable; to disable fontification, +remove `turn-on-font-lock' from `Info-mode-hook'. --- ** The terminal emulation code in term.el has been improved, it can run most curses applications now. -** New features in evaluation commands - -+++ -*** The function `eval-defun' (C-M-x) called on defface reinitializes -the face to the value specified in the defface expression. - -+++ -*** Typing C-x C-e twice prints the value of the integer result -in additional formats (octal, hexadecimal, character) specified -by the new function `eval-expression-print-format'. The same -function also defines the result format for `eval-expression' (M-:), -`eval-print-last-sexp' (C-j) and some edebug evaluation functions. - ---- -** New input method chinese-sisheng for inputting Chinese Pinyin -characters. - -+++ -** New command quail-show-key shows what key (or key sequence) to type -in the current input method to input a character at point. - -+++ -** You can now switch buffers in a cyclic order with C-x C-left and -(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right -can be used as well. - ---- -** Commands winner-redo and winner-undo, from winner.el, are now bound to -C-c <left> and C-c <right>, respectively. This is an incompatible change. - ---- -** Help commands `describe-function' and `describe-key' now show function -arguments in lowercase italics on displays that support it. To change the -default, customize face `help-argument-name' or redefine the function -`help-default-arg-highlight'. - --- ** The comint prompt can now be made read-only, using the new user option `comint-prompt-read-only'. This is not enabled by default, @@ -425,75 +1158,18 @@ kill-ring, but does not delete it. +++ -** You can now use next-error (C-x `) and previous-error to advance to -the next/previous matching line found by M-x occur. +** The new command `comint-insert-previous-argument' in comint-derived +modes (shell-mode etc) inserts arguments from previous command lines, +like bash's `ESC .' binding. It is bound by default to `C-c .', but +otherwise behaves quite similarly to the bash version. + +** `comint-use-prompt-regexp-instead-of-fields' has been renamed +`comint-use-prompt-regexp'. The old name has been kept as an alias, +but declared obsolete. +++ ** Telnet now prompts you for a port number with C-u M-x telnet. -+++ -** New command line option -Q or --quick. - -This is like using -q --no-site-file, but in addition it also disables -the fancy startup screen. - -+++ -** New command line option -D or --basic-display. - -Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and -the blinking cursor. - -+++ -** New command line option -nbc or --no-blinking-cursor disables -the blinking cursor on graphical terminals. - -+++ -** C-h v and C-h f commands now include a hyperlink to the C source for -variables and functions defined in C (if the C source is available). - ---- -** When used interactively, `format-write-file' now asks for confirmation -before overwriting an existing file, unless a prefix argument is -supplied. This behavior is analogous to `write-file'. - -+++ -** You can now use Auto Revert mode to `tail' a file. -If point is at the end of a file buffer before reverting, Auto Revert -mode keeps it at the end after reverting. Similarly if point is -displayed at the end of a file buffer in any window, it stays at -the end of the buffer in that window. This allows to tail a file: -just put point at the end of the buffer and it stays there. This -rule applies to file buffers. For non-file buffers, the behavior may -be mode dependent. - -If you are sure that the file will only change by growing at the end, -then you can tail the file more efficiently by using the new minor -mode Auto Revert Tail mode. The function `auto-revert-tail-mode' -toggles this mode. - -+++ -** Auto Revert mode is now more careful to avoid excessive reverts and -other potential problems when deciding which non-file buffers to -revert. This matters especially if Global Auto Revert mode is enabled -and `global-auto-revert-non-file-buffers' is non-nil. Auto Revert -mode only reverts a non-file buffer if the buffer has a non-nil -`revert-buffer-function' and a non-nil `buffer-stale-function', which -decides whether the buffer should be reverted. Currently, this means -that auto reverting works for Dired buffers (although this may not -work properly on all operating systems) and for the Buffer Menu. - -+++ -** If the new user option `auto-revert-check-vc-info' is non-nil, Auto -Revert mode reliably updates version control info (such as the version -control number in the mode line), in all version controlled buffers in -which it is active. If the option is nil, the default, then this info -only gets updated whenever the buffer gets reverted. - -+++ -** New command `Buffer-menu-toggle-files-only' toggles display of file -buffers only in the Buffer Menu. It is bound to `T' in Buffer Menu -mode. - --- ** M-x compile has become more robust and reliable @@ -564,6 +1240,14 @@ file. +++ +** M-x grep now tries to avoid appending `/dev/null' to the command line +by using GNU grep `-H' option instead. M-x grep automatically +detects whether this is possible or not the first time it is invoked. +When `-H' is used, the grep command line supplied by the user is passed +unchanged to the system to execute, which allows more complicated +command lines to be used than was possible before. + ++++ ** New options `next-error-highlight' and `next-error-highlight-no-select' specify the method of highlighting of the corresponding source line in new face `next-error'. @@ -580,235 +1264,27 @@ ** M-x diff uses diff-mode instead of compilation-mode. +++ -** M-x compare-windows now can automatically skip non-matching text to -resync points in both windows. - ---- -** New command `strokes-global-set-stroke-string'. -This is like `strokes-global-set-stroke', but it allows you to bind -the stroke directly to a string to insert. This is convenient for -using strokes as an input method. - -** Gnus package - ---- -*** Gnus now includes Sieve and PGG -Sieve is a library for managing Sieve scripts. PGG is a library to handle -PGP/MIME. - ---- -*** There are many news features, bug fixes and improvements. -See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. - -+++ -** Desktop package - -+++ -*** Desktop saving is now a minor mode, desktop-save-mode. Variable -desktop-enable is obsolete. Customize desktop-save-mode to enable desktop -saving. - ---- -*** Buffers are saved in the desktop file in the same order as that in the -buffer list. - -+++ -*** The desktop package can be customized to restore only some buffers immediately, -remaining buffers are restored lazily (when Emacs is idle). - -+++ -*** New commands: - - desktop-revert reverts to the last loaded desktop. - - desktop-change-dir kills current desktop and loads a new. - - desktop-save-in-desktop-dir saves desktop in the directory from which - it was loaded. - - desktop-lazy-complete runs the desktop load to completion. - - desktop-lazy-abort aborts lazy loading of the desktop. - ---- -*** New customizable variables: - - desktop-save. Determins whether the desktop should be saved when it is - killed. - - desktop-file-name-format. Format in which desktop file names should be saved. - - desktop-path. List of directories in which to lookup the desktop file. - - desktop-locals-to-save. List of local variables to save. - - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear. - - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear' - should not delete. - - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are - restored lazily (when Emacs is idle). - - desktop-lazy-verbose. Verbose reporting of lazily created buffers. - - desktop-lazy-idle-delay. Idle delay before starting to create buffers. - -+++ -*** New command line option --no-desktop - ---- -*** New hooks: - - desktop-after-read-hook run after a desktop is loaded. - - desktop-no-desktop-file-hook run when no desktop file is found. - ---- -** The saveplace.el package now filters out unreadable files. -When you exit Emacs, the saved positions in visited files no longer -include files that aren't readable, e.g. files that don't exist. -Customize the new option `save-place-forget-unreadable-files' to nil -to get the old behavior. The new options `save-place-save-skipped' -and `save-place-skip-check-regexp' allow further fine-tuning of this -feature. - -+++ -** You can have several Emacs servers on the same machine. - - % emacs --eval '(setq server-name "foo")' -f server-start & - % emacs --eval '(setq server-name "bar")' -f server-start & - % emacsclient -s foo file1 - % emacsclient -s bar file2 - -+++ -** On window systems, lines which are exactly as wide as the window -(not counting the final newline character) are no longer broken into -two lines on the display (with just the newline on the second line). -Instead, the newline now "overflows" into the right fringe, and the -cursor will be displayed in the fringe when positioned on that newline. - -The new user option 'overflow-newline-into-fringe' may be set to nil to -revert to the old behavior of continuing such lines. - -+++ -** The buffer boundaries (i.e. first and last line in the buffer) may -now be marked with angle bitmaps in the fringes. In addition, up and -down arrow bitmaps may be shown at the top and bottom of the left or -right fringe if the window can be scrolled in either direction. - -This behavior is activated by setting the buffer-local variable -`indicate-buffer-boundaries' to a non-nil value. The default value of -this variable is found in `default-indicate-buffer-boundaries'. - -If value is `left' or `right', both angle and arrow bitmaps are -displayed in the left or right fringe, resp. - -Value may also be an alist which specifies the presense and position -of each bitmap individually. - -For example, ((top . left) (t . right)) places the top angle bitmap -in left fringe, the bottom angle bitmap in right fringe, and both -arrow bitmaps in right fringe. To show just the angle bitmaps in the -left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). - -+++ -** New command `display-local-help' displays any local help at point -in the echo area. It is bound to `C-h .'. It normally displays the -same string that would be displayed on mouse-over using the -`help-echo' property, but, in certain cases, it can display a more -keyboard oriented alternative. - -+++ -** New user option `help-at-pt-display-when-idle' allows to -automatically show the help provided by `display-local-help' on -point-over, after suitable idle time. The amount of idle time is -determined by the user option `help-at-pt-timer-delay' and defaults -to one second. This feature is turned off by default. - ---- -** New commands `scan-buf-next-region' and `scan-buf-previous-region' -move to the start of the next (previous, respectively) region with -non-nil help-echo property and display any help found there in the -echo area, using `display-local-help'. - -+++ -** Help mode now only makes hyperlinks for faces when the face name is -preceded or followed by the word `face'. It no longer makes -hyperlinks for variables without variable documentation, unless -preceded by one of the words `variable' or `option'. It now makes -hyperlinks to Info anchors (or nodes) if the anchor (or node) name is -enclosed in single quotes and preceded by `info anchor' or `Info -anchor' (in addition to earlier `info node' and `Info node'). - -+++ -** The max size of buffers and integers has been doubled. -On 32bit machines, it is now 256M (i.e. 268435455). - -+++ -** The -f option, used from the command line to call a function, -now reads arguments for the function interactively if it is -an interactively callable function. - ---- -** sql changes. - -*** The variable `sql-product' controls the highlightng of different -SQL dialects. This variable can be set globally via Customize, on a -buffer-specific basis via local variable settings, or for the current -session using the new SQL->Product submenu. (This menu replaces the -SQL->Highlighting submenu.) - -The following values are supported: - - ansi ANSI Standard (default) - db2 DB2 - informix Informix - ingres Ingres - interbase Interbase - linter Linter - ms Microsoft - mysql MySQL - oracle Oracle - postgres Postgres - solid Solid - sqlite SQLite - sybase Sybase - -The current product name will be shown on the mode line following the -SQL mode indicator. - -The technique of setting `sql-mode-font-lock-defaults' directly in -your .emacs will no longer establish the default highlighting -- Use -`sql-product' to accomplish this. - -ANSI keywords are always highlighted. - -*** The function `sql-add-product-keywords' can be used to add -font-lock rules to the product specific rules. For example, to have -all identifiers ending in "_t" under MS SQLServer treated as a type, -you would use the following line in your .emacs file: - - (sql-add-product-keywords 'ms - '(("\\<\\w+_t\\>" . font-lock-type-face))) - -*** Oracle support includes keyword highlighting for Oracle 9i. Most -SQL and PL/SQL keywords are implemented. SQL*Plus commands are -highlighted in `font-lock-doc-face'. - -*** Microsoft SQLServer support has been significantly improved. -Keyword highlighting for SqlServer 2000 is implemented. -sql-interactive-mode defaults to use osql, rather than isql, because -osql flushes its error stream more frequently. Thus error messages -are displayed when they occur rather than when the session is -terminated. - -If the username and password are not provided to `sql-ms', osql is -called with the -E command line argument to use the operating system -credentials to authenticate the user. - -*** Postgres support is enhanced. -Keyword highlighting of Postgres 7.3 is implemented. Prompting for -the username and the pgsql `-U' option is added. - -*** MySQL support is enhanced. -Keyword higlighting of MySql 4.0 is implemented. - -*** Imenu support has been enhanced to locate tables, views, indexes, -packages, procedures, functions, triggers, sequences, rules, and -defaults. - -*** Added SQL->Start SQLi Session menu entry which calls the -appropriate sql-interactive-mode wrapper for the current setting of -`sql-product'. - ---- -** M-x view-file and commands that use it now avoid interfering -with special modes such as Tar mode. +** In the *Occur* buffer, `o' switches to it in another window, and +C-o displays the current line's occurrence in another window without +switching to it. + ++++ +** You can now use next-error (C-x `) and previous-error to advance to +the next/previous matching line found by M-x occur. + ++++ +** The new command `multi-occur' is just like `occur', except it can +search multiple buffers. There is also a new command +`multi-occur-by-filename-regexp' which allows you to specify the +buffers to search by their filename. Internally, Occur mode has been +rewritten, and now uses font-lock, among other changes. + ++++ +** font-lock: in modes like C and Lisp where the fontification assumes that +an open-paren in column 0 is always outside of any string or comment, +font-lock now highlights any such open-paren-in-column-zero in bold-red +if it is inside a string or a comment, to indicate that it can cause +trouble with fontification and/or indentation. ** Enhancements to apropos commands: @@ -827,82 +1303,457 @@ matching item. +++ -** The old bindings C-M-delete and C-M-backspace have been deleted, -since there are situations where one or the other will shut down -the operating system or your X server. +** You can have several Emacs servers on the same machine. + + % emacs --eval '(setq server-name "foo")' -f server-start & + % emacs --eval '(setq server-name "bar")' -f server-start & + % emacsclient -s foo file1 + % emacsclient -s bar file2 + ++++ +** The `emacsclient' command understands the options `--eval' and +`--display' which tell Emacs respectively to evaluate the given elisp +expression and to use the given display when visiting files. + ++++ +** User option `server-mode' can be used to start a server process. + ++++ +** New user option `add-log-always-start-new-record'. +When this option is enabled, M-x add-change-log-entry always +starts a new record regardless of when the last record is. + +** Menu support: + +--- +*** Dialogs and menus pop down if you type C-g. + +--- +*** The menu item "Open File..." has been split into two items, "New File..." +and "Open File...". "Open File..." now opens only existing files. This is +to support existing GUI file selection dialogs better. + ++++ +*** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be +disabled by customizing the variable `use-file-dialog'. + +** X Windows Support: + ++++ +*** Emacs now supports drag and drop for X. Dropping a file on a window + opens it, dropping text inserts the text. Dropping a file on a dired + buffer copies or moves the file to that directory. + ++++ +*** Under X11, it is possible to swap Alt and Meta (and Super and Hyper). +The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym', +and `x-super-keysym' can be used to choose which keysyms Emacs should +use for the modifiers. For example, the following two lines swap +Meta and Alt: + (setq x-alt-keysym 'meta) + (setq x-meta-keysym 'alt) + ++++ +*** The X resource useXIM can be used to turn off use of XIM, which may +speed up Emacs with slow networking to the X server. + +If the configure option `--without-xim' was used to turn off use of +XIM by default, the X resource useXIM can be used to turn it on. + +--- +*** The new variable `x-select-request-type' controls how Emacs +requests X selection. The default value is nil, which means that +Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING, +and use the more appropriately result. + +--- +*** The scrollbar under LessTif or Motif has a smoother drag-scrolling. +On the other hand, the size of the thumb does not represent the actual +amount of text shown any more (only a crude approximation of it). + +--- +*** The pop up menus for Lucid now stay up if you do a fast click and can +be navigated with the arrow keys (like Gtk+, Mac and W32). + ++++ +*** The Lucid menus can display multilingual text in your locale. You have +to explicitly specify a fontSet resource for this to work, for example +`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'. + +--- +*** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing +ESC, like they do for Gtk+, Mac and W32. + ++++ +** For Gtk+ version 2.4, you can make Emacs use the old file dialog +by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use +the new dialog. + +** Xterm support: + +--- +*** Emacs now responds to mouse-clicks on the mode-line, header-line and +display margin, when run in an xterm. + +--- +*** Improved key bindings support when running in an xterm. +When emacs is running in an xterm more key bindings are available. The +following should work: +{C,S,C-S,A}-{right,left,up,down,prior,next,delete,insert,F1-12}. +These key bindings work on xterm from X.org 6.8, they might not work on +some older versions of xterm, or on some proprietary versions. + +** Changes in support of colors on character terminals + ++++ +*** The new command-line option --color=MODE lets you specify a standard +mode for a tty color support. It is meant to be used on character +terminals whose capabilities are not set correctly in the terminal +database, or with terminal emulators which support colors, but don't +set the TERM environment variable to a name of a color-capable +terminal. "emacs --color" uses the same color commands as GNU `ls' +when invoked with "ls --color", so if your terminal can support colors +in "ls --color", it will support "emacs --color" as well. See the +user manual for the possible values of the MODE parameter. + +--- +*** Emacs now supports several character terminals which provide more +than 8 colors. For example, for `xterm', 16-color, 88-color, and +256-color modes are supported. Emacs automatically notes at startup +the extended number of colors, and defines the appropriate entries for +all of these colors. + ++++ +*** Emacs now uses the full range of available colors for the default +faces when running on a color terminal, including 16-, 88-, and +256-color xterms. This means that when you run "emacs -nw" on an +88-color or 256-color xterm, you will see essentially the same face +colors as on X. + +--- +*** There's a new support for colors on `rxvt' terminal emulator. + +--- +** M-x view-file and commands that use it now avoid interfering +with special modes such as Tar mode. + ++++ +** Filesets are collections of files. You can define a fileset in +various ways, such as based on a directory tree or based on +program files that include other program files. + +Once you have defined a fileset, you can perform various operations on +all the files in it, such as visiting them or searching and replacing +in them. + +--- +** Commands winner-redo and winner-undo, from winner.el, are now bound to +C-c <left> and C-c <right>, respectively. This is an incompatible change. + +--- +** global-whitespace-mode is a new alias for whitespace-global-mode. + ++++ +** The command `list-text-properties-at' has been deleted because +C-u C-x = gives the same information and more. + +* New modes and packages in Emacs 22.1 + ++++ +** New package benchmark.el contains simple support for convenient +timing measurements of code (including the garbage collection component). + ++++ +** Calc is now part of the Emacs distribution. + +Calc is an advanced desk calculator and mathematical tool written in +Emacs Lisp. Its documentation is in a separate manual; within Emacs, +type "C-h i m calc RET" to read that manual. A reference card is +available in `etc/calccard.tex' and `etc/calccard.ps'. + +--- +** `cfengine-mode' is a major mode for editing GNU Cfengine +configuration files. + ++++ +** The new package conf-mode.el handles thousands of configuration files, with +varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, +var : value, var value or keyword var value) and sections ([section] or +section { }). Many files under /etc/, or with suffixes like .cf through +.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are +recognized. + +--- +** CUA mode is now part of the Emacs distribution. + +The new cua package provides CUA-like keybindings using C-x for +cut (kill), C-c for copy, C-v for paste (yank), and C-z for undo. +With cua, the region can be set and extended using shifted movement +keys (like pc-selection-mode) and typed text replaces the active +region (like delete-selection-mode). Do not enable these modes with +cua-mode. Customize the variable `cua-mode' to enable cua. + +In addition, cua provides unified rectangle support with visible +rectangle highlighting: Use S-return to start a rectangle, extend it +using the movement commands (or mouse-3), and cut or copy it using C-x +or C-c (using C-w and M-w also works). + +Use M-o and M-c to `open' or `close' the rectangle, use M-b or M-f, to +fill it with blanks or another character, use M-u or M-l to upcase or +downcase the rectangle, use M-i to increment the numbers in the +rectangle, use M-n to fill the rectangle with a numeric sequence (such +as 10 20 30...), use M-r to replace a regexp in the rectangle, and use +M-' or M-/ to restrict command on the rectangle to a subset of the +rows. See the commentary in cua-base.el for more rectangle commands. + +Cua also provides unified support for registers: Use a numeric +prefix argument between 0 and 9, i.e. M-0 .. M-9, for C-x, C-c, and +C-v to cut or copy into register 0-9, or paste from register 0-9. + +The last text deleted (not killed) is automatically stored in +register 0. This includes text deleted by typing text. + +Finally, cua provides a global mark which is set using S-C-space. +When the global mark is active, any text which is cut or copied is +automatically inserted at the global mark position. See the +commentary in cua-base.el for more global mark related commands. + +The features of cua also works with the standard emacs bindings for +kill, copy, yank, and undo. If you want to use cua mode, but don't +want the C-x, C-c, C-v, and C-z bindings, you may customize the +`cua-enable-cua-keys' variable. + +Note: This version of cua mode is not backwards compatible with older +versions of cua.el and cua-mode.el. To ensure proper operation, you +must remove older versions of cua.el or cua-mode.el as well as the +loading and customization of those packages from the .emacs file. + ++++ +** The new package dns-mode.el add syntax highlight of DNS master files. +The key binding C-c C-s (`dns-mode-soa-increment-serial') can be used +to increment the SOA serial. + +--- +** The new global minor mode `file-name-shadow-mode' modifies the way +filenames being entered by the user in the minibuffer are displayed, so +that it's clear when part of the entered filename will be ignored due to +emacs' filename parsing rules. The ignored portion can be made dim, +invisible, or otherwise less visually noticable. The display method may +be displayed by customizing the variable `file-name-shadow-properties'. + ++++ +** The new package flymake.el does on-the-fly syntax checking of program +source files. See the Flymake's Info manual for more details. + +--- +** The new Lisp library fringe.el controls the appearance of fringes. + +--- +** GDB-Script-mode is used for files like .gdbinit. + ++++ +** The new package gdb-ui.el provides an enhanced graphical interface to +GDB. You can interact with GDB through the GUD buffer in the usual way, but +there are also further buffers which control the execution and describe the +state of your program. It separates the input/output of your program from +that of GDB and watches expressions in the speedbar. It also uses features of +Emacs 21 such as the display margin for breakpoints, and the toolbar. + +Use M-x gdba to start GDB-UI. + +--- +** The new package ibuffer provides a powerful, completely +customizable replacement for buff-menu.el. + +--- +** Ido mode is now part of the Emacs distribution. + +The ido (interactively do) package is an extension of the iswitchb +package to do interactive opening of files and directories in addition +to interactive buffer switching. Ido is a superset of iswitchb (with +a few exceptions), so don't enable both packages. + ++++ +** Image files are normally visited in Image mode, which lets you toggle +between viewing the image and viewing the text using C-c C-c. + ++++ +** The new keypad setup package provides several common bindings for +the numeric keypad which is available on most keyboards. The numeric +keypad typically has the digits 0 to 9, a decimal point, keys marked ++, -, /, and *, an Enter key, and a NumLock toggle key. The keypad +package only controls the use of the digit and decimal keys. + +By customizing the variables `keypad-setup', `keypad-shifted-setup', +`keypad-numlock-setup', and `keypad-numlock-shifted-setup', or by +using the function `keypad-setup', you can rebind all digit keys and +the decimal key of the keypad in one step for each of the four +possible combinations of the Shift key state (not pressed/pressed) and +the NumLock toggle state (off/on). + +The choices for the keypad keys in each of the above states are: +`Plain numeric keypad' where the keys generates plain digits, +`Numeric keypad with decimal key' where the character produced by the +decimal key can be customized individually (for internationalization), +`Numeric Prefix Arg' where the keypad keys produce numeric prefix args +for emacs editing commands, `Cursor keys' and `Shifted Cursor keys' +where the keys work like (shifted) arrow keys, home/end, etc., and +`Unspecified/User-defined' where the keypad keys (kp-0, kp-1, etc.) +are left unspecified and can be bound individually through the global +or local keymaps. + ++++ +** The new kmacro package provides a simpler user interface to +emacs' keyboard macro facilities. + +Basically, it uses two function keys (default F3 and F4) like this: +F3 starts a macro, F4 ends the macro, and pressing F4 again executes +the last macro. While defining the macro, F3 inserts a counter value +which automatically increments every time the macro is executed. + +There is now a keyboard macro ring which stores the most recently +defined macros. + +The C-x C-k sequence is now a prefix for the kmacro keymap which +defines bindings for moving through the keyboard macro ring, +C-x C-k C-p and C-x C-k C-n, editing the last macro C-x C-k C-e, +manipulating the macro counter and format via C-x C-k C-c, +C-x C-k C-a, and C-x C-k C-f. See the commentary in kmacro.el +for more commands. + +The normal macro bindings C-x (, C-x ), and C-x e now interfaces to +the keyboard macro ring. + +The C-x e command now automatically terminates the current macro +before calling it, if used while defining a macro. + +In addition, when ending or calling a macro with C-x e, the macro can +be repeated immediately by typing just the `e'. You can customize +this behavior via the variable kmacro-call-repeat-key and +kmacro-call-repeat-with-arg. + +Keyboard macros can now be debugged and edited interactively. +C-x C-k SPC steps through the last keyboard macro one key sequence +at a time, prompting for the actions to take. + ++++ +** The new package longlines.el provides a minor mode for editing text +files composed of long lines, based on the `use-hard-newlines' +mechanism. The long lines are broken up by inserting soft newlines, +which are automatically removed when saving the file to disk or +copying into the kill ring, clipboard, etc. By default, Longlines +mode inserts soft newlines automatically during editing, a behavior +referred to as "soft word wrap" in other text editors. This is +similar to Refill mode, but more reliable. To turn the word wrap +feature off, set `longlines-auto-wrap' to nil. + +--- +** The old Octave mode bindings C-c f and C-c i have been changed +to C-c C-f and C-c C-i. The C-c C-i subcommands now have duplicate +bindings on control characters--thus, C-c C-i C-b is the same as +C-c C-i b, and so on. + +** The printing package is now part of the Emacs distribution. + +If you enable the printing package by including (require 'printing) in +the .emacs file, the normal Print item on the File menu is replaced +with a Print sub-menu which allows you to preview output through +ghostview, use ghostscript to print (if you don't have a PostScript +printer) or send directly to printer a PostScript code generated by +`ps-print' package. Use M-x pr-help for more information. + ++++ +** The new python.el package is used to edit Python and Jython programs. + +--- +** The minor mode Reveal mode makes text visible on the fly as you +move your cursor into hidden regions of the buffer. +It should work with any package that uses overlays to hide parts +of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ... + +There is also Global Reveal mode which affects all buffers. + +--- +** The ruler-mode.el library provides a minor mode for displaying an +"active" ruler in the header line. You can use the mouse to visually +change the `fill-column', `window-margins' and `tab-stop-list' +settings. + ++++ +** SES mode (ses-mode) is a new major mode for creating and editing +spreadsheet files. Besides the usual Emacs features (intuitive command +letters, undo, cell formulas in Lisp, plaintext files, etc.) it also offers +viral immunity and import/export of tab-separated values. + ++++ +** The new global minor mode `size-indication-mode' (off by default) +shows the size of accessible part of the buffer on the mode line. + ++++ +** The new package table.el implements editable, WYSIWYG, embedded +`text tables' in Emacs buffers. It simulates the effect of putting +these tables in a special major mode. The package emulates WYSIWYG +table editing available in modern word processors. The package also +can generate a table source in typesetting and markup languages such +as latex and html from the visually laid out text table. + ++++ +** The thumbs.el package allows you to preview image files as thumbnails +and can be invoked from a Dired buffer. + ++++ +** Tramp is now part of the distribution. + +This package is similar to Ange-FTP: it allows you to edit remote +files. But whereas Ange-FTP uses FTP to access the remote host, +Tramp uses a shell connection. The shell connection is always used +for filename completion and directory listings and suchlike, but for +the actual file transfer, you can choose between the so-called +`inline' methods (which transfer the files through the shell +connection using base64 or uu encoding) and the `out-of-band' methods +(which invoke an external copying program such as `rcp' or `scp' or +`rsync' to do the copying). + +Shell connections can be acquired via `rsh', `ssh', `telnet' and also +`su' and `sudo'. Ange-FTP is still supported via the `ftp' method. + +If you want to disable Tramp you should set + + (setq tramp-default-method "ftp") + +--- +** The library tree-widget.el provides a new widget to display a set +of hierarchical data as an outline. For example, the tree-widget is +well suited to display a hierarchy of directories and files. + +--- +** The URL package (which had been part of W3) is now part of Emacs. --- ** New minor mode, Visible mode, toggles invisibility in the current buffer. When enabled, it makes all invisible text visible. When disabled, it restores the previous value of `buffer-invisibility-spec'. ---- -** New command `kill-whole-line' kills an entire line at once. -By default, it is bound to C-S-<backspace>. - ---- -** New commands to operate on pairs of open and close characters: -`insert-pair', `delete-pair', `raise-sexp'. - -+++ -** A prefix argument of C-M-q in Emacs Lisp mode pretty-printifies the -list starting after point. - -** Dired mode: - ---- -*** New faces dired-header, dired-mark, dired-marked, dired-flagged, -dired-ignored, dired-directory, dired-symlink, dired-warning -introduced for Dired mode instead of font-lock faces. - -*** New Dired command `dired-compare-directories' marks files -with different file attributes in two dired buffers. - -+++ -*** New Dired command `dired-do-touch' (bound to T) changes timestamps -of marked files with the value entered in the minibuffer. - -+++ -*** In Dired's ! command (dired-do-shell-command), `*' and `?' now -control substitution of the file names only when they are surrounded -by whitespace. This means you can now use them as shell wildcards -too. If you want to use just plain `*' as a wildcard, type `*""'; the -doublequotes make no difference in the shell, but they prevent -special treatment in `dired-do-shell-command'. - -+++ -*** In Dired, the w command now copies the current line's file name -into the kill ring. With a zero prefix arg, copies absolute file names. - -+++ -** Dired-x: - -+++ -*** Omitting files is now a minor mode, dired-omit-mode. The mode toggling -command is bound to M-o. A new command dired-mark-omitted, bound to M-O, -marks omitted files. The variable dired-omit-files-p is obsoleted, use the -mode toggling function instead. - -+++ -** find-file-read-only visits multiple files in read-only mode, -when the file name contains wildcard characters. - -+++ -** find-alternate-file replaces the current file with multiple files, -when the file name contains wildcard characters. - -** FFAP - -+++ -*** New ffap commands and keybindings: C-x C-r (`ffap-read-only'), -C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'), -C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'), -C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame'). - ---- -*** FFAP accepts wildcards in a file name by default. C-x C-f passes -it to `find-file' with non-nil WILDCARDS argument, which visits -multiple files, and C-x d passes it to `dired'. ++++ +** The wdired.el package allows you to use normal editing commands on Dired +buffers to change filenames, permissions, etc... + +* Changes in specialized modes and packages: + ++++ +** There is a new user option `mail-default-directory' that allows you +to specify the value of `default-directory' for mail buffers. This +directory is used for auto-save files of mail buffers. It defaults to +"~/". + ++++ +** Emacs can now indicate in the mode-line the presence of new e-mail +in a directory or in a file. See the documentation of the user option +`display-time-mail-directory'. + +--- +** PO translation files are decoded according to their MIME headers +when Emacs visits them. ** Info mode: @@ -965,1062 +1816,27 @@ --- *** Info-index offers completion. ---- -** Support for the SQLite interpreter has been added to sql.el by calling -'sql-sqlite'. - -** BibTeX mode: -*** The new command bibtex-url browses a URL for the BibTeX entry at -point (bound to C-c C-l and mouse-2, RET on clickable fields). - -*** The new command bibtex-entry-update (bound to C-c C-u) updates -an existing BibTeX entry. - -*** New `bibtex-entry-format' option `required-fields', enabled by default. - -*** bibtex-maintain-sorted-entries can take values `plain', -`crossref', and `entry-class' which control the sorting scheme used -for BibTeX entries. `bibtex-sort-entry-class' controls the sorting -scheme `entry-class'. TAB completion for reference keys and -automatic detection of duplicates does not require anymore that -bibtex-maintain-sorted-entries is non-nil. - -*** If the new variable bibtex-parse-keys-fast is non-nil, -use fast but simplified algorithm for parsing BibTeX keys. - -*** If the new variable bibtex-autoadd-commas is non-nil, -automatically add missing commas at end of BibTeX fields. - -*** The new variable bibtex-autofill-types contains a list of entry -types for which fields are filled automatically (if possible). - -*** The new command bibtex-complete completes word fragment before -point according to context (bound to M-tab). - -*** The new commands bibtex-find-entry and bibtex-find-crossref -locate entries and crossref'd entries (bound to C-c C-s and C-c C-x). -Crossref fields are clickable (bound to mouse-2, RET). - -*** In BibTeX mode the command fill-paragraph (bound to M-q) fills -individual fields of a BibTeX entry. - -*** The new variables bibtex-files and bibtex-file-path define a set -of BibTeX files that are searched for entry keys. - -*** The new command bibtex-validate-globally checks for duplicate keys -in multiple BibTeX files. - -*** The new command bibtex-copy-summary-as-kill pushes summary -of BibTeX entry to kill ring (bound to C-c C-t). - -+++ -** When display margins are present in a window, the fringes are now -displayed between the margins and the buffer's text area, rather than -at the edges of the window. - -+++ -** A window may now have individual fringe and scroll-bar settings, -in addition to the individual display margin settings. - -Such individual settings are now preserved when windows are split -horizontally or vertically, a saved window configuration is restored, -or when the frame is resized. - -+++ -** New functions frame-current-scroll-bars and window-current-scroll-bars. - -These functions return the current locations of the vertical and -horizontal scroll bars in a frame or window. - -+++ -** Emacs now supports drag and drop for X. Dropping a file on a window - opens it, dropping text inserts the text. Dropping a file on a dired - buffer copies or moves the file to that directory. - -+++ -** Under X, mouse-wheel-mode is turned on by default. - -+++ -** The X resource useXIM can be used to turn off use of XIM, which may -speed up Emacs with slow networking to the X server. - -If the configure option `--without-xim' was used to turn off use of -XIM by default, the X resource useXIM can be used to turn it on. - -+++ -** The X resource cursorBlink can be used to turn off cursor blinking. - -+++ -** `undo-only' does an undo which does not redo any previous undo. - ---- -** `uniquify-strip-common-suffix' tells uniquify to prefer -`file|dir1' and `file|dir2' to `file|dir1/subdir' and `file|dir2/subdir'. - -+++ -** If the user visits a file larger than `large-file-warning-threshold', -Emacs prompts her for confirmation. - ---- -** A UTF-7 coding system is available in the library `utf-7'. - ---- -** GUD mode has its own tool bar for controlling execution of the inferior -and other common debugger commands. - ---- -** recentf changes. - -The recent file list is now automatically cleanup when recentf mode is -enabled. The new option `recentf-auto-cleanup' controls when to do -automatic cleanup. - -The `recentf-keep' option replaces `recentf-keep-non-readable-files-p' -and provides a more general mechanism to customize which file names to -keep in the recent list. - -With the more advanced option: `recentf-filename-handler', you can -specify a function that transforms filenames handled by recentf. For -example, if set to `file-truename', the same file will not be in the -recent list with different symbolic links. - -To follow naming convention, `recentf-menu-append-commands-flag' -replaces the misnamed option `recentf-menu-append-commands-p'. The -old name remains available as alias, but has been marked obsolete. - -+++ -** The default for the paper size (variable ps-paper-type) is taken -from the locale. - -+++ -** Init file changes - -You can now put the init files .emacs and .emacs_SHELL under -~/.emacs.d or directly under ~. Emacs will find them in either place. - ---- -** partial-completion-mode now does partial completion on directory names. - ---- -** skeleton.el now supports using - to mark the skeleton-point without - interregion interaction. @ has reverted to only setting - skeleton-positions and no longer sets skeleton-point. Skeletons - which used @ to mark skeleton-point independent of _ should now use - - instead. The updated skeleton-insert docstring explains these new - features along with other details of skeleton construction. - ---- -** MH-E changes. - -Upgraded to MH-E version 7.82. There have been major changes since -version 5.0.2; see MH-E-NEWS for details. - -+++ -** The `emacsclient' command understands the options `--eval' and -`--display' which tell Emacs respectively to evaluate the given elisp -expression and to use the given display when visiting files. - -+++ -** User option `server-mode' can be used to start a server process. - -+++ -** The mode line position information now comes before the major mode. -When the file is maintained under version control, that information -appears between the position information and the major mode. - -+++ -** C-x s (save-some-buffers) now offers an option `d' to diff a buffer -against its file, so you can see what changes you would be saving. - -+++ -** You can now customize the use of window fringes. To control this -for all frames, use M-x fringe-mode or the Show/Hide submenu of the -top-level Options menu, or customize the `fringe-mode' variable. To -control this for a specific frame, use the command M-x -set-fringe-style. - -+++ -** There is a new user option `mail-default-directory' that allows you -to specify the value of `default-directory' for mail buffers. This -directory is used for auto-save files of mail buffers. It defaults to -"~/". - -+++ -** When you are root, and you visit a file whose modes specify -read-only, the Emacs buffer is now read-only too. Type C-x C-q if you -want to make the buffer writable. (As root, you can in fact alter the -file.) - -+++ -** The new command `revert-buffer-with-coding-system' (C-x RET r) -revisits the current file using a coding system that you specify. - -+++ -** The new command `recode-file-name' changes the encoding of the name -of a file. - ---- -** `ps-print' can now print characters from the mule-unicode charsets. - -Printing text with characters from the mule-unicode-* sets works with -ps-print, provided that you have installed the appropriate BDF fonts. -See the file INSTALL for URLs where you can find these fonts. - ---- -** The new options `buffers-menu-show-directories' and -`buffers-menu-show-status' let you control how buffers are displayed -in the menu dropped down when you click "Buffers" from the menu bar. - -`buffers-menu-show-directories' controls whether the menu displays -leading directories as part of the file name visited by the buffer. -If its value is `unless-uniquify', the default, directories are -shown unless uniquify-buffer-name-style' is non-nil. The value of nil -and t turn the display of directories off and on, respectively. - -`buffers-menu-show-status' controls whether the Buffers menu includes -the modified and read-only status of the buffers. By default it is -t, and the status is shown. - -Setting these variables directly does not take effect until next time -the Buffers menu is regenerated. - -+++ -** The commands M-x customize-face and M-x customize-face-other-window -now look at the character after point. If a face or faces are -specified for that character, the commands by default customize those -faces. - ---- -** New language environments: French, Ukrainian, Tajik, -Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6, -Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian, -Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up -automatically according to the locale.) - ---- -** Indian support has been updated. -The in-is13194 coding system is now Unicode-based. CDAC fonts are -assumed. There is a framework for supporting various -Indian scripts, but currently only Devanagari, Malayalam and Tamil are -supported. - ---- -** New input methods: latin-alt-postfix, latin-postfix, latin-prefix, -ukrainian-computer, belarusian, bulgarian-bds, russian-computer, -vietnamese-telex, lithuanian-numeric, lithuanian-keyboard, -latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml, -bulgarian-phonetic, dutch, slovenian, croatian, malayalam-inscript, -tamil-inscript. - ---- -** A new coding system `euc-tw' has been added for traditional Chinese -in CNS encoding; it accepts both Big 5 and CNS as input; on saving, -Big 5 is then converted to CNS. - ---- -** Many new coding systems are available by loading the `code-pages' -library. These include complete versions of most of those in -codepage.el, based on Unicode mappings. `codepage-setup' is now -obsolete and is used only in the MS-DOS port of Emacs. windows-1252 -and windows-1251 are preloaded since the former is so common and the -latter is used by GNU locales. - ---- -** The utf-8/16 coding systems have been enhanced. -By default, untranslatable utf-8 sequences are simply composed into -single quasi-characters. User option `utf-translate-cjk-mode' (it is -turned on by default) arranges to translate many utf-8 CJK character -sequences into real Emacs characters in a similar way to the Mule-UCS -system. As this loads a fairly big data on demand, people who are not -interested in CJK characters may want to customize it to nil. -You can augment/amend the CJK translation via hash tables -`ucs-mule-cjk-to-unicode' and `ucs-unicode-to-mule-cjk'. The utf-8 -coding system now also encodes characters from most of Emacs's -one-dimensional internal charsets, specifically the ISO-8859 ones. -The utf-16 coding system is affected similarly. - ---- -** New variable `utf-translate-cjk-unicode-range' controls which -Unicode characters to translate in `utf-translate-cjk-mode'. - ---- -** iso-10646-1 (`Unicode') fonts can be used to display any range of -characters encodable by the utf-8 coding system. Just specify the -fontset appropriately. - ---- -** New command `ucs-insert' inserts a character specified by its -unicode. - -+++ -** Limited support for character `unification' has been added. -Emacs now knows how to translate between different representations of -the same characters in various Emacs charsets according to standard -Unicode mappings. This applies mainly to characters in the ISO 8859 -sets plus some other 8-bit sets, but can be extended. For instance, -translation works amongst the Emacs ...-iso8859-... charsets and the -mule-unicode-... ones. - -By default this translation happens automatically on encoding. -Self-inserting characters are translated to make the input conformant -with the encoding of the buffer in which it's being used, where -possible. - -You can force a more complete unification with the user option -unify-8859-on-decoding-mode. That maps all the Latin-N character sets -into Unicode characters (from the latin-iso8859-1 and -mule-unicode-0100-24ff charsets) on decoding. Note that this mode -will often effectively clobber data with an iso-2022 encoding. - ---- -** There is support for decoding Greek and Cyrillic characters into -either Unicode (the mule-unicode charsets) or the iso-8859 charsets, -when possible. The latter are more space-efficient. This is -controlled by user option utf-fragment-on-decoding. - -+++ -** The new command `set-file-name-coding-system' (C-x RET F) sets -coding system for encoding and decoding file names. A new menu item -(Options->Mule->Set Coding Systems->For File Name) invokes this -command. - ---- -** The scrollbar under LessTif or Motif has a smoother drag-scrolling. -On the other hand, the size of the thumb does not represent the actual -amount of text shown any more (only a crude approximation of it). - ---- -** The pop up menus for Lucid now stay up if you do a fast click and can -be navigated with the arrow keys (like Gtk+, Mac and W32). - -+++ -** The Lucid menus can display multilingual text in your locale. You have -to explicitly specify a fontSet resource for this to work, for example -`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'. - ---- -** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing -ESC, like they do for Gtk+, Mac and W32. - ---- -** Dialogs and menus pop down when pressing C-g. - ---- -** The menu item "Open File..." has been split into two items, "New File..." -and "Open File...". "Open File..." now opens only existing files. This is -to support existing GUI file selection dialogs better. - -+++ -** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be -disabled by customizing the variable `use-file-dialog'. - -+++ -** For Gtk+ version 2.4, you can make Emacs use the old file dialog -by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use -the new dialog. - -+++ -** Emacs can produce an underscore-like (horizontal bar) cursor. -The underscore cursor is set by putting `(cursor-type . hbar)' in -default-frame-alist. It supports variable heights, like the `bar' -cursor does. - -+++ -** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is -now controlled by the variable `blink-cursor-alist'. - -** Filesets are collections of files. You can define a fileset in -various ways, such as based on a directory tree or based on -program files that include other program files. - -Once you have defined a fileset, you can perform various operations on -all the files in it, such as visiting them or searching and replacing -in them. - ---- -** PO translation files are decoded according to their MIME headers -when Emacs visits them. - ---- -** The game `mpuz' is enhanced. - -`mpuz' now allows the 2nd factor not to have two identical digits. By -default, all trivial operations involving whole lines are performed -automatically. The game uses faces for better visual feedback. - ---- -** The new variable `x-select-request-type' controls how Emacs -requests X selection. The default value is nil, which means that -Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING, -and use the more appropriately result. - -+++ -** The parameters of automatic hscrolling can now be customized. -The variable `hscroll-margin' determines how many columns away from -the window edge point is allowed to get before automatic hscrolling -will horizontally scroll the window. The default value is 5. - -The variable `hscroll-step' determines how many columns automatic -hscrolling scrolls the window when point gets too close to the -window edge. If its value is zero, the default, Emacs scrolls the -window so as to center point. If its value is an integer, it says how -many columns to scroll. If the value is a floating-point number, it -gives the fraction of the window's width to scroll the window. - -The variable `automatic-hscrolling' was renamed to -`auto-hscroll-mode'. The old name is still available as an alias. - -** TeX modes: - -*** C-c C-c prompts for a command to run, and tries to offer a good default. - -+++ -*** The user option `tex-start-options-string' has been replaced -by two new user options: `tex-start-options', which should hold -command-line options to feed to TeX, and `tex-start-commands' which should hold -TeX commands to use at startup. - ---- -*** verbatim environments are now highlighted in courier by font-lock -and super/sub-scripts are made into super/sub-scripts. - -+++ -*** New major mode doctex-mode for *.dtx files. - -+++ -** New display feature: focus follows the mouse from one Emacs window -to another, even within a frame. If you set the variable -mouse-autoselect-window to non-nil value, moving the mouse to a -different Emacs window will select that window (minibuffer window can -be selected only when it is active). The default is nil, so that this -feature is not enabled. - -+++ -** On X, when the window manager requires that you click on a frame to -select it (give it focus), the selected window and cursor position -normally changes according to the mouse click position. If you set -the variable x-mouse-click-focus-ignore-position to t, the selected -window and cursor position do not change when you click on a frame -to give it focus. - -+++ -** The new command `describe-char' (C-u C-x =) pops up a buffer with -description various information about a character, including its -encodings and syntax, its text properties, how to input, overlays, and -widgets at point. You can get more information about some of them, by -clicking on mouse-sensitive areas or moving there and pressing RET. - -+++ -** The new command `multi-occur' is just like `occur', except it can -search multiple buffers. There is also a new command -`multi-occur-by-filename-regexp' which allows you to specify the -buffers to search by their filename. Internally, Occur mode has been -rewritten, and now uses font-lock, among other changes. - -+++ -** The default values of paragraph-start and indent-line-function have -been changed to reflect those used in Text mode rather than those used -in Indented-Text mode. - ---- -** New user option `query-replace-skip-read-only': when non-nil, -`query-replace' and related functions simply ignore -a match if part of it has a read-only property. - -+++ -** When used interactively, the commands `query-replace-regexp' and -`replace-regexp' allow \,expr to be used in a replacement string, -where expr is an arbitrary Lisp expression evaluated at replacement -time. In many cases, this will be more convenient than using -`query-replace-regexp-eval'. `\#' in a replacement string now refers -to the count of replacements already made by the replacement command. -All regular expression replacement commands now allow `\?' in the -replacement string to specify a position where the replacement string -can be edited for each replacement. - -+++ -** query-replace uses isearch lazy highlighting when the new user option -`query-replace-lazy-highlight' is non-nil. - ---- -** The current match in query-replace is highlighted in new face -`query-replace' which by default inherits from isearch face. - -+++ -** Emacs normally highlights mouse sensitive text whenever the mouse -is over the text. By setting the new variable `mouse-highlight', you -can optionally enable mouse highlighting only after you move the -mouse, so that highlighting disappears when you press a key. You can -also disable mouse highlighting. - -+++ -** You can now customize if selecting a region by dragging the mouse -shall not copy the selected text to the kill-ring by setting the new -variable mouse-drag-copy-region to nil. - -+++ -** font-lock: in modes like C and Lisp where the fontification assumes that -an open-paren in column 0 is always outside of any string or comment, -font-lock now highlights any such open-paren-in-column-zero in bold-red -if it is inside a string or a comment, to indicate that it can cause -trouble with fontification and/or indentation. - -+++ -** There's a new face `minibuffer-prompt'. -Emacs adds this face to the list of text properties stored in the -variable `minibuffer-prompt-properties', which is used to display the -prompt string. - -+++ -** The new face `mode-line-inactive' is used to display the mode line -of non-selected windows. The `mode-line' face is now used to display -the mode line of the currently selected window. - -The new variable `mode-line-in-non-selected-windows' controls whether -the `mode-line-inactive' face is used. - ---- -** A menu item "Show/Hide" was added to the top-level menu "Options". -This menu allows you to turn various display features on and off (such -as the fringes, the tool bar, the speedbar, and the menu bar itself). -You can also move the vertical scroll bar to either side here or turn -it off completely. There is also a menu-item to toggle displaying of -current date and time, current line and column number in the -mode-line. - ---- -** Speedbar has moved from the "Tools" top level menu to "Show/Hide". - -+++ -** Emacs can now indicate in the mode-line the presence of new e-mail -in a directory or in a file. See the documentation of the user option -`display-time-mail-directory'. - ---- -** LDAP support now defaults to ldapsearch from OpenLDAP version 2. - -+++ -** You can now disable pc-selection-mode after enabling it. -M-x pc-selection-mode behaves like a proper minor mode, and with no -argument it toggles the mode. - -Turning off PC-Selection mode restores the global key bindings -that were replaced by turning on the mode. - -+++ -** Emacs now displays a splash screen by default even if command-line -arguments were given. The new command-line option --no-splash -disables the splash screen; see also the variable -`inhibit-startup-message' (which is also aliased as -`inhibit-splash-screen'). - -** Changes in support of colors on character terminals - -+++ -*** The new command-line option --color=MODE lets you specify a standard -mode for a tty color support. It is meant to be used on character -terminals whose capabilities are not set correctly in the terminal -database, or with terminal emulators which support colors, but don't -set the TERM environment variable to a name of a color-capable -terminal. "emacs --color" uses the same color commands as GNU `ls' -when invoked with "ls --color", so if your terminal can support colors -in "ls --color", it will support "emacs --color" as well. See the -user manual for the possible values of the MODE parameter. - ---- -*** Emacs now supports several character terminals which provide more -than 8 colors. For example, for `xterm', 16-color, 88-color, and -256-color modes are supported. Emacs automatically notes at startup -the extended number of colors, and defines the appropriate entries for -all of these colors. - -+++ -*** Emacs now uses the full range of available colors for the default -faces when running on a color terminal, including 16-, 88-, and -256-color xterms. This means that when you run "emacs -nw" on an -88-color or 256-color xterm, you will see essentially the same face -colors as on X. - ---- -*** There's a new support for colors on `rxvt' terminal emulator. - -+++ -** Emacs can now be invoked in full-screen mode on a windowed display. - -When Emacs is invoked on a window system, the new command-line options -`--fullwidth', `--fullheight', and `--fullscreen' produce a frame -whose width, height, or both width and height take up the entire -screen size. (For now, this does not work with some window managers.) - ---- -** Emacs now tries to set up buffer coding systems for HTML/XML files -automatically. - -+++ -** The new command `comint-insert-previous-argument' in comint-derived -modes (shell-mode etc) inserts arguments from previous command lines, -like bash's `ESC .' binding. It is bound by default to `C-c .', but -otherwise behaves quite similarly to the bash version. - -+++ -** Changes in C-h bindings: - -C-h e displays the *Messages* buffer. - -C-h followed by a control character is used for displaying files - that do not change: - -C-h C-f displays the FAQ. -C-h C-e displays the PROBLEMS file. - -The info-search bindings on C-h C-f, C-h C-k and C-h C-i -have been moved to C-h F, C-h K and C-h S. - -C-h c, C-h k, C-h w, and C-h f now handle remapped interactive commands. - -- C-h c and C-h k report the actual command (after possible remapping) - run by the key sequence. - -- C-h w and C-h f on a command which has been remapped now report the - command it is remapped to, and the keys which can be used to run - that command. - -For example, if C-k is bound to kill-line, and kill-line is remapped -to new-kill-line, these commands now report: - -- C-h c and C-h k C-k reports: - C-k runs the command new-kill-line - -- C-h w and C-h f kill-line reports: - kill-line is remapped to new-kill-line which is on C-k, <deleteline> - -- C-h w and C-h f new-kill-line reports: - new-kill-line is on C-k - -+++ -** Vertical scrolling is now possible within incremental search. -To enable this feature, customize the new user option -`isearch-allow-scroll'. User written commands which satisfy stringent -constraints can be marked as "scrolling commands". See the Emacs manual -for details. - -+++ -** C-w in incremental search now grabs either a character or a word, -making the decision in a heuristic way. This new job is done by the -command `isearch-yank-word-or-char'. To restore the old behavior, -bind C-w to `isearch-yank-word' in `isearch-mode-map'. - -+++ -** C-y in incremental search now grabs the next line if point is already -at the end of a line. - -+++ -** C-M-w deletes and C-M-y grabs a character in isearch mode. -Another method to grab a character is to enter the minibuffer by `M-e' -and to type `C-f' at the end of the search string in the minibuffer. - -+++ -** M-% typed in isearch mode invokes `query-replace' or -`query-replace-regexp' (depending on search mode) with the current -search string used as the string to replace. - -+++ -** Isearch no longer adds `isearch-resume' commands to the command -history by default. To enable this feature, customize the new -user option `isearch-resume-in-command-history'. - -+++ -** New user option `history-delete-duplicates'. -If set to t when adding a new history element, all previous identical -elements are deleted. - -+++ -** Yanking text now discards certain text properties that can -be inconvenient when you did not expect them. The variable -`yank-excluded-properties' specifies which ones. Insertion -of register contents and rectangles also discards these properties. - -+++ -** Occur, Info, and comint-derived modes now support using -M-x font-lock-mode to toggle fontification. The variable -`Info-fontify' is no longer applicable; to disable fontification, -remove `turn-on-font-lock' from `Info-mode-hook'. - -+++ -** M-x grep now tries to avoid appending `/dev/null' to the command line -by using GNU grep `-H' option instead. M-x grep automatically -detects whether this is possible or not the first time it is invoked. -When `-H' is used, the grep command line supplied by the user is passed -unchanged to the system to execute, which allows more complicated -command lines to be used than was possible before. - ---- -** The face-customization widget has been reworked to be less confusing. -In particular, when you enable a face attribute using the corresponding -check-box, there's no longer a redundant `*' option in value selection -for that attribute; the values you can choose are only those which make -sense for the attribute. When an attribute is de-selected by unchecking -its check-box, then the (now ignored, but still present temporarily in -case you re-select the attribute) value is hidden. - -+++ -** When you set or reset a variable's value in a Customize buffer, -the previous value becomes the "backup value" of the variable. -You can go back to that backup value by selecting "Use Backup Value" -under the "[State]" button. - ---- -** The new customization type `float' specifies numbers with floating -point (no integers are allowed). - -+++ -** In GUD mode, when talking to GDB, C-x C-a C-j "jumps" the program -counter to the specified source line (the one where point is). - ---- -** GUD mode improvements for jdb: - -*** Search for source files using jdb classpath and class - information. Fast startup since there is no need to scan all - source files up front. There is also no need to create and maintain - lists of source directories to scan. Look at `gud-jdb-use-classpath' - and `gud-jdb-classpath' customization variables documentation. - -*** Supports the standard breakpoint (gud-break, gud-clear) - set/clear operations from java source files under the classpath, stack - traversal (gud-up, gud-down), and run until current stack finish - (gud-finish). - -*** Supports new jdb (Java 1.2 and later) in addition to oldjdb - (Java 1.1 jdb). - -*** The previous method of searching for source files has been - preserved in case someone still wants/needs to use it. - Set gud-jdb-use-classpath to nil. - - Added Customization Variables - -*** gud-jdb-command-name. What command line to use to invoke jdb. - -*** gud-jdb-use-classpath. Allows selection of java source file searching - method: set to t for new method, nil to scan gud-jdb-directories for - java sources (previous method). - -*** gud-jdb-directories. List of directories to scan and search for java - classes using the original gud-jdb method (if gud-jdb-use-classpath - is nil). - - Minor Improvements - -*** The STARTTLS elisp wrapper (starttls.el) can now use GNUTLS -instead of the OpenSSL based "starttls" tool. For backwards -compatibility, it prefers "starttls", but you can toggle -`starttls-use-gnutls' to switch to GNUTLS (or simply remove the -"starttls" tool). - -*** Do not allow debugger output history variable to grow without bounds. - -+++ -** hide-ifdef-mode now uses overlays rather than selective-display -to hide its text. This should be mostly transparent but slightly -changes the behavior of motion commands like C-e and C-p. - -+++ -** Unquoted `$' in file names do not signal an error any more when -the corresponding environment variable does not exist. -Instead, the `$ENVVAR' text is left as is, so that `$$' quoting -is only rarely needed. - ---- -** JIT-lock changes -*** jit-lock can now be delayed with `jit-lock-defer-time'. - -If this variable is non-nil, its value should be the amount of Emacs -idle time in seconds to wait before starting fontification. For -example, if you set `jit-lock-defer-time' to 0.25, fontification will -only happen after 0.25s of idle time. - -*** contextual refontification is now separate from stealth fontification. - -jit-lock-defer-contextually is renamed jit-lock-contextually and -jit-lock-context-time determines the delay after which contextual -refontification takes place. - -+++ -** Marking commands extend the region when invoked multiple times. If -you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or -C-M-h (mark-defun) repeatedly, the marked region extends each time, so -you can mark the next two sexps with M-C-SPC M-C-SPC, for example. -This feature also works for mark-end-of-sentence, if you bind that to -a key. It also extends the region when the mark is active in Transient -Mark mode, regardless of the last command. To start a new region with -one of marking commands in Transient Mark mode, you can deactivate the -active region with C-g, or set the new mark with C-SPC. - -+++ -** Some commands do something special in Transient Mark mode when the -mark is active--for instance, they limit their operation to the -region. Even if you don't normally use Transient Mark mode, you might -want to get this behavior from a particular command. There are two -ways you can enable Transient Mark mode and activate the mark, for one -command only. - -One method is to type C-SPC C-SPC; this enables Transient Mark mode -and sets the mark at point. The other method is to type C-u C-x C-x. -This enables Transient Mark mode temporarily but does not alter the -mark or the region. - -After these commands, Transient Mark mode remains enabled until you -deactivate the mark. That typically happens when you type a command -that alters the buffer, but you can also deactivate the mark by typing -C-g. - -+++ -** A prefix argument is no longer required to repeat a jump to a -previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the -mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. - -+++ -** Movement commands `beginning-of-buffer', `end-of-buffer', -`beginning-of-defun', `end-of-defun' do not set the mark if the mark -is already active in Transient Mark mode. - -+++ -** In the *Occur* buffer, `o' switches to it in another window, and -C-o displays the current line's occurrence in another window without -switching to it. - -+++ -** When you specify a frame size with --geometry, the size applies to -all frames you create. A position specified with --geometry only -affects the initial frame. - -+++ -** M-h (mark-paragraph) now accepts a prefix arg. -With positive arg, M-h marks the current and the following paragraphs; -if the arg is negative, it marks the current and the preceding -paragraphs. - -+++ -** The variables dired-free-space-program and dired-free-space-args -have been renamed to directory-free-space-program and -directory-free-space-args, and they now apply whenever Emacs puts a -directory listing into a buffer. - ---- -** mouse-wheels can now scroll a specific fraction of the window -(rather than a fixed number of lines) and the scrolling is `progressive'. - ---- -** Unexpected yanking of text due to accidental clicking on the mouse -wheel button (typically mouse-2) during wheel scrolling is now avoided. -This behavior can be customized via the mouse-wheel-click-event and -mouse-wheel-inhibit-click-time variables. - -+++ -** The keyboard-coding-system is now automatically set based on your -current locale settings if you are not using a window system. This -may mean that the META key doesn't work but generates non-ASCII -characters instead, depending on how the terminal (or terminal -emulator) works. Use `set-keyboard-coding-system' (or customize -keyboard-coding-system) if you prefer META to work (the old default) -or if the locale doesn't describe the character set actually generated -by the keyboard. See Info node `Single-Byte Character Support'. - -+++ -** Emacs now reads the standard abbrevs file ~/.abbrev_defs -automatically at startup, if it exists. When Emacs offers to save -modified buffers, it saves the abbrevs too if they have changed. It -can do this either silently or asking for confirmation first, -according to the value of `save-abbrevs'. - -+++ -** Display of hollow cursors now obeys the buffer-local value (if any) -of `cursor-in-non-selected-windows' in the buffer that the cursor -appears in. - -+++ -** The variable `cursor-in-non-selected-windows' can now be set to any -of the recognized cursor types. - ---- -** The variable `auto-save-file-name-transforms' now has a third element that -controls whether or not the function `make-auto-save-file-name' will -attempt to construct a unique auto-save name (e.g. for remote files). - -+++ -** There is a new calendar package, icalendar.el, that can be used to -convert Emacs diary entries to/from the iCalendar format. - -+++ -** Diary sexp entries can have custom marking in the calendar. -Diary sexp functions which only apply to certain days (such as -`diary-block' or `diary-cyclic') now take an optional parameter MARK, -which is the name of a face or a single-character string indicating -how to highlight the day in the calendar display. Specifying a -single-character string as @var{mark} places the character next to the -day in the calendar. Specifying a face highlights the day with that -face. This lets you have different colors or markings for vacations, -appointments, paydays or anything else using a sexp. - -+++ -** The new function `calendar-goto-day-of-year' (g D) prompts for a -year and day number, and moves to that date. Negative day numbers -count backward from the end of the year. - -+++ -** The new Calendar function `calendar-goto-iso-week' (g w) -prompts for a year and a week number, and moves to the first -day of that ISO week. - ---- -** The new variable `calendar-minimum-window-height' affects the -window generated by the function `generate-calendar-window'. - ---- -** The functions `holiday-easter-etc' and `holiday-advent' now take -optional arguments, in order to only report on the specified holiday -rather than all. This makes customization of variables such as -`christian-holidays' simpler. - ---- -** The function `simple-diary-display' now by default sets a header line. -This can be controlled through the variables `diary-header-line-flag' -and `diary-header-line-format'. - -+++ -** The procedure for activating appointment reminders has changed: use -the new function `appt-activate'. The new variable -`appt-display-format' controls how reminders are displayed, replacing -appt-issue-message, appt-visible, and appt-msg-window. - -+++ -** The new functions `diary-from-outlook', `diary-from-outlook-gnus', -and `diary-from-outlook-rmail' can be used to import diary entries -from Outlook-format appointments in mail messages. The variable -`diary-outlook-formats' can be customized to recognize additional -formats. - - -** VC Changes - -+++ -*** The key C-x C-q no longer checks files in or out, it only changes -the read-only state of the buffer (toggle-read-only). We made this -change because we held a poll and found that many users were unhappy -with the previous behavior. If you do prefer this behavior, you -can bind `vc-toggle-read-only' to C-x C-q in your .emacs: - - (global-set-key "\C-x\C-q" 'vc-toggle-read-only) - -The function `vc-toggle-read-only' will continue to exist. - -+++ -*** There is a new user option `vc-cvs-global-switches' that allows -you to specify switches that are passed to any CVS command invoked -by VC. These switches are used as "global options" for CVS, which -means they are inserted before the command name. For example, this -allows you to specify a compression level using the "-z#" option for -CVS. - -+++ -*** New backends for Subversion and Meta-CVS. - -** EDiff changes. - -+++ -*** When comparing directories. -Typing D brings up a buffer that lists the differences between the contents of -directories. Now it is possible to use this buffer to copy the missing files -from one directory to another. - -+++ -*** When comparing files or buffers. -Typing the = key now offers to perform the word-by-word comparison of the -currently highlighted regions in an inferior Ediff session. If you answer 'n' -then it reverts to the old behavior and asks the user to select regions for -comparison. - -*** The new command `ediff-backup' compares a file with its most recent -backup using `ediff'. If you specify the name of a backup file, -`ediff-backup' compares it with the file of which it is a backup. - -+++ -** Etags changes. - -*** New regular expressions features - -**** New syntax for regular expressions, multi-line regular expressions. -The syntax --ignore-case-regexp=/regex/ is now undocumented and retained -only for backward compatibility. The new equivalent syntax is ---regex=/regex/i. More generally, it is --regex=/TAGREGEX/TAGNAME/MODS, -where `/TAGNAME' is optional, as usual, and MODS is a string of 0 or -more characters among `i' (ignore case), `m' (multi-line) and `s' -(single-line). The `m' and `s' modifiers behave as in Perl regular -expressions: `m' allows regexps to match more than one line, while `s' -(which implies `m') means that `.' matches newlines. The ability to -span newlines allows writing of much more powerful regular expressions -and rapid prototyping for tagging new languages. - -**** Regular expressions can use char escape sequences as in Gcc. -The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v, -respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, -CR, TAB, VT, - -**** Regular expressions can be bound to a given language. -The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags -only for files of language LANGUAGE, and ignored otherwise. This is -particularly useful when storing regexps in a file. - -**** Regular expressions can be read from a file. -The --regex=@regexfile option means read the regexps from a file, one -per line. Lines beginning with space or tab are ignored. - -*** New language parsing features - -**** The `::' qualifier triggers C++ parsing in C file. -Previously, only the `template' and `class' keywords had this effect. - -**** The gnucc __attribute__ keyword is now recognised and ignored. - -**** New language HTML. -Title and h1, h2, h3 are tagged. Also, tags are generated when name= is -used inside an anchor and whenever id= is used. - -**** In Makefiles, constants are tagged. -If you want the old behavior instead, thus avoiding to increase the -size of the tags file, use the --no-globals option. - -**** New language Lua. -All functions are tagged. - -**** In Perl, packages are tags. -Subroutine tags are named from their package. You can jump to sub tags -as you did before, by the sub name, or additionally by looking for -package::sub. - -**** In Prolog, etags creates tags for rules in addition to predicates. - -**** New language PHP. -Tags are functions, classes and defines. -If the --members option is specified to etags, tags are variables also. - -**** New default keywords for TeX. -The new keywords are def, newcommand, renewcommand, newenvironment and -renewenvironment. - -*** Honour #line directives. -When Etags parses an input file that contains C preprocessor's #line -directives, it creates tags using the file name and line number -specified in those directives. This is useful when dealing with code -created from Cweb source files. When Etags tags the generated file, it -writes tags pointing to the source file. - -*** New option --parse-stdin=FILE. -This option is mostly useful when calling etags from programs. It can -be used (only once) in place of a file name on the command line. Etags -reads from standard input and marks the produced tags as belonging to -the file FILE. +** Lisp mode changes: + +--- +*** Lisp mode now uses font-lock-doc-face for the docstrings. + ++++ +*** A prefix argument of C-M-q in Emacs Lisp mode pretty-printifies the +list starting after point. + +*** New features in evaluation commands + ++++ +*** The function `eval-defun' (C-M-x) called on defface reinitializes +the face to the value specified in the defface expression. + ++++ +*** Typing C-x C-e twice prints the value of the integer result +in additional formats (octal, hexadecimal, character) specified +by the new function `eval-expression-print-format'. The same +function also defines the result format for `eval-expression' (M-:), +`eval-print-last-sexp' (C-j) and some edebug evaluation functions. +++ ** CC Mode changes. @@ -2311,34 +2127,47 @@ The function c-toggle-syntactic-indentation can be used to toggle syntactic indentation. -+++ -** The command line option --no-windows has been changed to ---no-window-system. The old one still works, but is deprecated. - -+++ -** The command `list-text-properties-at' has been deleted because -C-u C-x = gives the same information and more. - -+++ -** `buffer-menu' and `list-buffers' now list buffers whose names begin -with a space, when those buffers are visiting files. Normally buffers -whose names begin with space are omitted. - -+++ -** You can now customize fill-nobreak-predicate to control where -filling can break lines. The value is now normally a list of -functions, but it can also be a single function, for compatibility. - -We provide two sample predicates, fill-single-word-nobreak-p and -fill-french-nobreak-p, for use in the value of fill-nobreak-predicate. - -+++ -** New user option `add-log-always-start-new-record'. -When this option is enabled, M-x add-change-log-entry always -starts a new record regardless of when the last record is. - -+++ -** SGML mode has indentation and supports XML syntax. +--- +** Perl mode has a new variable `perl-indent-continued-arguments'. + +** Fortran mode changes: + +--- +*** Fortran mode does more font-locking by default. Use level 3 +highlighting for the old default. + ++++ +*** Fortran mode has a new variable `fortran-directive-re'. +Adapt this to match the format of any compiler directives you use. +Lines that match are never indented, and are given distinctive font-locking. + ++++ +*** F90 mode and Fortran mode have new navigation commands +`f90-end-of-block', `f90-beginning-of-block', `f90-next-block', +`f90-previous-block', `fortran-end-of-block', +`fortran-beginning-of-block'. + +--- +*** F90 mode and Fortran mode have support for hs-minor-mode (hideshow). +It cannot deal with every code format, but ought to handle a sizeable +majority. + +--- +*** The new function `f90-backslash-not-special' can be used to change +the syntax of backslashes in F90 buffers. + +--- +** Prolog mode has a new variable `prolog-font-lock-keywords' +to support use of font-lock. + +** HTML/SGML changes: + +--- +*** Emacs now tries to set up buffer coding systems for HTML/XML files +automatically. + ++++ +*** SGML mode has indentation and supports XML syntax. The new variable `sgml-xml-mode' tells SGML mode to use XML syntax. When this option is enabled, SGML tags are inserted in XML style, i.e., there is always a closing tag. @@ -2346,84 +2175,398 @@ from the file name or buffer contents. +++ -** `xml-mode' is now an alias for `sgml-mode', which has XML support. - ---- -** Lisp mode now uses font-lock-doc-face for the docstrings. - ---- -** Perl mode has a new variable `perl-indent-continued-arguments'. - ---- -** Fortran mode does more font-locking by default. Use level 3 -highlighting for the old default. - -+++ -** Fortran mode has a new variable `fortran-directive-re'. -Adapt this to match the format of any compiler directives you use. -Lines that match are never indented, and are given distinctive font-locking. - -+++ -** F90 mode and Fortran mode have new navigation commands -`f90-end-of-block', `f90-beginning-of-block', `f90-next-block', -`f90-previous-block', `fortran-end-of-block', -`fortran-beginning-of-block'. - ---- -** F90 mode and Fortran mode have support for hs-minor-mode (hideshow). -It cannot deal with every code format, but ought to handle a sizeable -majority. - ---- -** The new function `f90-backslash-not-special' can be used to change -the syntax of backslashes in F90 buffers. - ---- -** Prolog mode has a new variable `prolog-font-lock-keywords' -to support use of font-lock. - -+++ -** `special-display-buffer-names' and `special-display-regexps' now -understand two new boolean pseudo-frame-parameters `same-frame' and -`same-window'. - -+++ -** M-x setenv now expands environment variables of the form `$foo' and -`${foo}' in the specified new value of the environment variable. To -include a `$' in the value, use `$$'. - -+++ -** File-name completion can now ignore directories. -If an element of the list in `completion-ignored-extensions' ends in a -slash `/', it indicates a subdirectory that should be ignored when -completing file names. Elements of `completion-ignored-extensions' -which do not end in a slash are never considered when a completion -candidate is a directory. - -+++ -** The completion commands TAB, SPC and ? in the minibuffer apply only -to the text before point. If there is text in the buffer after point, -it remains unchanged. - ---- -** Enhanced visual feedback in *Completions* buffer. - -Completions lists use faces to highlight what all completions -have in common and where they begin to differ. - -The common prefix shared by all possible completions uses the face -`completions-common-part', while the first character that isn't the -same uses the face `completions-first-difference'. By default, -`completions-common-part' inherits from `default', and -`completions-first-difference' inherits from `bold'. The idea of -`completions-common-part' is that you can use it to make the common -parts less visible than normal, so that the rest of the differing -parts is, by contrast, slightly highlighted. - -+++ -** New user option `inhibit-startup-buffer-menu'. -When loading many files, for instance with `emacs *', Emacs normally -displays a buffer menu. This option turns the buffer menu off. +*** `xml-mode' is now an alias for `sgml-mode', which has XML support. + +** TeX modes: + ++++ +*** C-c C-c prompts for a command to run, and tries to offer a good default. + ++++ +*** The user option `tex-start-options-string' has been replaced +by two new user options: `tex-start-options', which should hold +command-line options to feed to TeX, and `tex-start-commands' which should hold +TeX commands to use at startup. + +--- +*** verbatim environments are now highlighted in courier by font-lock +and super/sub-scripts are made into super/sub-scripts. + ++++ +*** New major mode doctex-mode for *.dtx files. + +** BibTeX mode: +*** The new command bibtex-url browses a URL for the BibTeX entry at +point (bound to C-c C-l and mouse-2, RET on clickable fields). + +*** The new command bibtex-entry-update (bound to C-c C-u) updates +an existing BibTeX entry. + +*** New `bibtex-entry-format' option `required-fields', enabled by default. + +*** bibtex-maintain-sorted-entries can take values `plain', +`crossref', and `entry-class' which control the sorting scheme used +for BibTeX entries. `bibtex-sort-entry-class' controls the sorting +scheme `entry-class'. TAB completion for reference keys and +automatic detection of duplicates does not require anymore that +bibtex-maintain-sorted-entries is non-nil. + +*** If the new variable bibtex-parse-keys-fast is non-nil, +use fast but simplified algorithm for parsing BibTeX keys. + +*** If the new variable bibtex-autoadd-commas is non-nil, +automatically add missing commas at end of BibTeX fields. + +*** The new variable bibtex-autofill-types contains a list of entry +types for which fields are filled automatically (if possible). + +*** The new command bibtex-complete completes word fragment before +point according to context (bound to M-tab). + +*** The new commands bibtex-find-entry and bibtex-find-crossref +locate entries and crossref'd entries (bound to C-c C-s and C-c C-x). +Crossref fields are clickable (bound to mouse-2, RET). + +*** In BibTeX mode the command fill-paragraph (bound to M-q) fills +individual fields of a BibTeX entry. + +*** The new variables bibtex-files and bibtex-file-path define a set +of BibTeX files that are searched for entry keys. + +*** The new command bibtex-validate-globally checks for duplicate keys +in multiple BibTeX files. + +*** The new command bibtex-copy-summary-as-kill pushes summary +of BibTeX entry to kill ring (bound to C-c C-t). + ++++ +** In Enriched mode, `set-left-margin' and `set-right-margin' are now +by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' +and `C-c C-r'. + +** GUD changes: + ++++ +*** In GUD mode, when talking to GDB, C-x C-a C-j "jumps" the program +counter to the specified source line (the one where point is). + +--- +*** GUD mode has its own tool bar for controlling execution of the inferior +and other common debugger commands. + +--- +** GUD mode improvements for jdb: + +*** Search for source files using jdb classpath and class + information. Fast startup since there is no need to scan all + source files up front. There is also no need to create and maintain + lists of source directories to scan. Look at `gud-jdb-use-classpath' + and `gud-jdb-classpath' customization variables documentation. + +*** Supports the standard breakpoint (gud-break, gud-clear) + set/clear operations from java source files under the classpath, stack + traversal (gud-up, gud-down), and run until current stack finish + (gud-finish). + +*** Supports new jdb (Java 1.2 and later) in addition to oldjdb + (Java 1.1 jdb). + +*** The previous method of searching for source files has been + preserved in case someone still wants/needs to use it. + Set gud-jdb-use-classpath to nil. + + Added Customization Variables + +*** gud-jdb-command-name. What command line to use to invoke jdb. + +*** gud-jdb-use-classpath. Allows selection of java source file searching + method: set to t for new method, nil to scan gud-jdb-directories for + java sources (previous method). + +*** gud-jdb-directories. List of directories to scan and search for java + classes using the original gud-jdb method (if gud-jdb-use-classpath + is nil). + + Minor Improvements + +*** The STARTTLS elisp wrapper (starttls.el) can now use GNUTLS +instead of the OpenSSL based "starttls" tool. For backwards +compatibility, it prefers "starttls", but you can toggle +`starttls-use-gnutls' to switch to GNUTLS (or simply remove the +"starttls" tool). + +*** Do not allow debugger output history variable to grow without bounds. + +** Auto-Revert changes: + ++++ +*** You can now use Auto Revert mode to `tail' a file. +If point is at the end of a file buffer before reverting, Auto Revert +mode keeps it at the end after reverting. Similarly if point is +displayed at the end of a file buffer in any window, it stays at +the end of the buffer in that window. This allows to tail a file: +just put point at the end of the buffer and it stays there. This +rule applies to file buffers. For non-file buffers, the behavior may +be mode dependent. + +If you are sure that the file will only change by growing at the end, +then you can tail the file more efficiently by using the new minor +mode Auto Revert Tail mode. The function `auto-revert-tail-mode' +toggles this mode. + ++++ +*** Auto Revert mode is now more careful to avoid excessive reverts and +other potential problems when deciding which non-file buffers to +revert. This matters especially if Global Auto Revert mode is enabled +and `global-auto-revert-non-file-buffers' is non-nil. Auto Revert +mode only reverts a non-file buffer if the buffer has a non-nil +`revert-buffer-function' and a non-nil `buffer-stale-function', which +decides whether the buffer should be reverted. Currently, this means +that auto reverting works for Dired buffers (although this may not +work properly on all operating systems) and for the Buffer Menu. + ++++ +*** If the new user option `auto-revert-check-vc-info' is non-nil, Auto +Revert mode reliably updates version control info (such as the version +control number in the mode line), in all version controlled buffers in +which it is active. If the option is nil, the default, then this info +only gets updated whenever the buffer gets reverted. + +--- +** recentf changes. + +The recent file list is now automatically cleanup when recentf mode is +enabled. The new option `recentf-auto-cleanup' controls when to do +automatic cleanup. + +The `recentf-keep' option replaces `recentf-keep-non-readable-files-p' +and provides a more general mechanism to customize which file names to +keep in the recent list. + +With the more advanced option: `recentf-filename-handler', you can +specify a function that transforms filenames handled by recentf. For +example, if set to `file-truename', the same file will not be in the +recent list with different symbolic links. + +To follow naming convention, `recentf-menu-append-commands-flag' +replaces the misnamed option `recentf-menu-append-commands-p'. The +old name remains available as alias, but has been marked obsolete. + ++++ +** Desktop package + ++++ +*** Desktop saving is now a minor mode, desktop-save-mode. Variable +desktop-enable is obsolete. Customize desktop-save-mode to enable desktop +saving. + +--- +*** Buffers are saved in the desktop file in the same order as that in the +buffer list. + ++++ +*** The desktop package can be customized to restore only some buffers immediately, +remaining buffers are restored lazily (when Emacs is idle). + ++++ +*** New commands: + - desktop-revert reverts to the last loaded desktop. + - desktop-change-dir kills current desktop and loads a new. + - desktop-save-in-desktop-dir saves desktop in the directory from which + it was loaded. + - desktop-lazy-complete runs the desktop load to completion. + - desktop-lazy-abort aborts lazy loading of the desktop. + +--- +*** New customizable variables: + - desktop-save. Determins whether the desktop should be saved when it is + killed. + - desktop-file-name-format. Format in which desktop file names should be saved. + - desktop-path. List of directories in which to lookup the desktop file. + - desktop-locals-to-save. List of local variables to save. + - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear. + - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear' + should not delete. + - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are + restored lazily (when Emacs is idle). + - desktop-lazy-verbose. Verbose reporting of lazily created buffers. + - desktop-lazy-idle-delay. Idle delay before starting to create buffers. + ++++ +*** New command line option --no-desktop + +--- +*** New hooks: + - desktop-after-read-hook run after a desktop is loaded. + - desktop-no-desktop-file-hook run when no desktop file is found. + +--- +** The saveplace.el package now filters out unreadable files. +When you exit Emacs, the saved positions in visited files no longer +include files that aren't readable, e.g. files that don't exist. +Customize the new option `save-place-forget-unreadable-files' to nil +to get the old behavior. The new options `save-place-save-skipped' +and `save-place-skip-check-regexp' allow further fine-tuning of this +feature. + +** EDiff changes. + ++++ +*** When comparing directories. +Typing D brings up a buffer that lists the differences between the contents of +directories. Now it is possible to use this buffer to copy the missing files +from one directory to another. + ++++ +*** When comparing files or buffers. +Typing the = key now offers to perform the word-by-word comparison of the +currently highlighted regions in an inferior Ediff session. If you answer 'n' +then it reverts to the old behavior and asks the user to select regions for +comparison. + +*** The new command `ediff-backup' compares a file with its most recent +backup using `ediff'. If you specify the name of a backup file, +`ediff-backup' compares it with the file of which it is a backup. + ++++ +** Etags changes. + +*** New regular expressions features + +**** New syntax for regular expressions, multi-line regular expressions. +The syntax --ignore-case-regexp=/regex/ is now undocumented and retained +only for backward compatibility. The new equivalent syntax is +--regex=/regex/i. More generally, it is --regex=/TAGREGEX/TAGNAME/MODS, +where `/TAGNAME' is optional, as usual, and MODS is a string of 0 or +more characters among `i' (ignore case), `m' (multi-line) and `s' +(single-line). The `m' and `s' modifiers behave as in Perl regular +expressions: `m' allows regexps to match more than one line, while `s' +(which implies `m') means that `.' matches newlines. The ability to +span newlines allows writing of much more powerful regular expressions +and rapid prototyping for tagging new languages. + +**** Regular expressions can use char escape sequences as in Gcc. +The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v, +respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, +CR, TAB, VT, + +**** Regular expressions can be bound to a given language. +The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags +only for files of language LANGUAGE, and ignored otherwise. This is +particularly useful when storing regexps in a file. + +**** Regular expressions can be read from a file. +The --regex=@regexfile option means read the regexps from a file, one +per line. Lines beginning with space or tab are ignored. + +*** New language parsing features + +**** The `::' qualifier triggers C++ parsing in C file. +Previously, only the `template' and `class' keywords had this effect. + +**** The gnucc __attribute__ keyword is now recognised and ignored. + +**** New language HTML. +Title and h1, h2, h3 are tagged. Also, tags are generated when name= is +used inside an anchor and whenever id= is used. + +**** In Makefiles, constants are tagged. +If you want the old behavior instead, thus avoiding to increase the +size of the tags file, use the --no-globals option. + +**** New language Lua. +All functions are tagged. + +**** In Perl, packages are tags. +Subroutine tags are named from their package. You can jump to sub tags +as you did before, by the sub name, or additionally by looking for +package::sub. + +**** In Prolog, etags creates tags for rules in addition to predicates. + +**** New language PHP. +Tags are functions, classes and defines. +If the --members option is specified to etags, tags are variables also. + +**** New default keywords for TeX. +The new keywords are def, newcommand, renewcommand, newenvironment and +renewenvironment. + +*** Honour #line directives. +When Etags parses an input file that contains C preprocessor's #line +directives, it creates tags using the file name and line number +specified in those directives. This is useful when dealing with code +created from Cweb source files. When Etags tags the generated file, it +writes tags pointing to the source file. + +*** New option --parse-stdin=FILE. +This option is mostly useful when calling etags from programs. It can +be used (only once) in place of a file name on the command line. Etags +reads from standard input and marks the produced tags as belonging to +the file FILE. + +** VC Changes + ++++ +*** The key C-x C-q no longer checks files in or out, it only changes +the read-only state of the buffer (toggle-read-only). We made this +change because we held a poll and found that many users were unhappy +with the previous behavior. If you do prefer this behavior, you +can bind `vc-toggle-read-only' to C-x C-q in your .emacs: + + (global-set-key "\C-x\C-q" 'vc-toggle-read-only) + +The function `vc-toggle-read-only' will continue to exist. + ++++ +*** There is a new user option `vc-cvs-global-switches' that allows +you to specify switches that are passed to any CVS command invoked +by VC. These switches are used as "global options" for CVS, which +means they are inserted before the command name. For example, this +allows you to specify a compression level using the "-z#" option for +CVS. + ++++ +*** New backends for Subversion and Meta-CVS. + ++++ +*** vc-annotate-mode enhancements + +In vc-annotate mode, you can now use the following key bindings for +enhanced functionality to browse the annotations of past revisions, or +to view diffs or log entries directly from vc-annotate-mode: + + P: annotates the previous revision + N: annotates the next revision + J: annotates the revision at line + A: annotates the revision previous to line + D: shows the diff of the revision at line with its previous revision + L: shows the log of the revision at line + W: annotates the workfile (most up to date) version + +** pcl-cvs changes: + ++++ +*** In pcl-cvs mode, there is a new `d y' command to view the diffs +between the local version of the file and yesterday's head revision +in the repository. + ++++ +*** In pcl-cvs mode, there is a new `d r' command to view the changes +anyone has committed to the repository since you last executed +"checkout", "update" or "commit". That means using cvs diff options +-rBASE -rHEAD. + +** Gnus package + +--- +*** Gnus now includes Sieve and PGG +Sieve is a library for managing Sieve scripts. PGG is a library to handle +PGP/MIME. + +--- +*** There are many news features, bug fixes and improvements. +See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. --- ** Rmail now displays 5-digit message ids in its summary buffer. @@ -2437,6 +2580,256 @@ used instead of the native one. --- +** MH-E changes. + +Upgraded to MH-E version 7.82. There have been major changes since +version 5.0.2; see MH-E-NEWS for details. + +** Calendar changes: + ++++ +*** There is a new calendar package, icalendar.el, that can be used to +convert Emacs diary entries to/from the iCalendar format. + ++++ +*** Diary sexp entries can have custom marking in the calendar. +Diary sexp functions which only apply to certain days (such as +`diary-block' or `diary-cyclic') now take an optional parameter MARK, +which is the name of a face or a single-character string indicating +how to highlight the day in the calendar display. Specifying a +single-character string as @var{mark} places the character next to the +day in the calendar. Specifying a face highlights the day with that +face. This lets you have different colors or markings for vacations, +appointments, paydays or anything else using a sexp. + ++++ +*** The new function `calendar-goto-day-of-year' (g D) prompts for a +year and day number, and moves to that date. Negative day numbers +count backward from the end of the year. + ++++ +*** The new Calendar function `calendar-goto-iso-week' (g w) +prompts for a year and a week number, and moves to the first +day of that ISO week. + +--- +*** The new variable `calendar-minimum-window-height' affects the +window generated by the function `generate-calendar-window'. + +--- +*** The functions `holiday-easter-etc' and `holiday-advent' now take +optional arguments, in order to only report on the specified holiday +rather than all. This makes customization of variables such as +`christian-holidays' simpler. + +--- +*** The function `simple-diary-display' now by default sets a header line. +This can be controlled through the variables `diary-header-line-flag' +and `diary-header-line-format'. + ++++ +*** The procedure for activating appointment reminders has changed: use +the new function `appt-activate'. The new variable +`appt-display-format' controls how reminders are displayed, replacing +appt-issue-message, appt-visible, and appt-msg-window. + ++++ +*** The new functions `diary-from-outlook', `diary-from-outlook-gnus', +and `diary-from-outlook-rmail' can be used to import diary entries +from Outlook-format appointments in mail messages. The variable +`diary-outlook-formats' can be customized to recognize additional +formats. + +--- +** sql changes. + +*** The variable `sql-product' controls the highlightng of different +SQL dialects. This variable can be set globally via Customize, on a +buffer-specific basis via local variable settings, or for the current +session using the new SQL->Product submenu. (This menu replaces the +SQL->Highlighting submenu.) + +The following values are supported: + + ansi ANSI Standard (default) + db2 DB2 + informix Informix + ingres Ingres + interbase Interbase + linter Linter + ms Microsoft + mysql MySQL + oracle Oracle + postgres Postgres + solid Solid + sqlite SQLite + sybase Sybase + +The current product name will be shown on the mode line following the +SQL mode indicator. + +The technique of setting `sql-mode-font-lock-defaults' directly in +your .emacs will no longer establish the default highlighting -- Use +`sql-product' to accomplish this. + +ANSI keywords are always highlighted. + +*** The function `sql-add-product-keywords' can be used to add +font-lock rules to the product specific rules. For example, to have +all identifiers ending in "_t" under MS SQLServer treated as a type, +you would use the following line in your .emacs file: + + (sql-add-product-keywords 'ms + '(("\\<\\w+_t\\>" . font-lock-type-face))) + +*** Oracle support includes keyword highlighting for Oracle 9i. Most +SQL and PL/SQL keywords are implemented. SQL*Plus commands are +highlighted in `font-lock-doc-face'. + +*** Microsoft SQLServer support has been significantly improved. +Keyword highlighting for SqlServer 2000 is implemented. +sql-interactive-mode defaults to use osql, rather than isql, because +osql flushes its error stream more frequently. Thus error messages +are displayed when they occur rather than when the session is +terminated. + +If the username and password are not provided to `sql-ms', osql is +called with the -E command line argument to use the operating system +credentials to authenticate the user. + +*** Postgres support is enhanced. +Keyword highlighting of Postgres 7.3 is implemented. Prompting for +the username and the pgsql `-U' option is added. + +*** MySQL support is enhanced. +Keyword higlighting of MySql 4.0 is implemented. + +*** Imenu support has been enhanced to locate tables, views, indexes, +packages, procedures, functions, triggers, sequences, rules, and +defaults. + +*** Added SQL->Start SQLi Session menu entry which calls the +appropriate sql-interactive-mode wrapper for the current setting of +`sql-product'. + +--- +*** Support for the SQLite interpreter has been added to sql.el by calling +'sql-sqlite'. + +** FFAP changes: + ++++ +*** New ffap commands and keybindings: C-x C-r (`ffap-read-only'), +C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'), +C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'), +C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame'). + +--- +*** FFAP accepts wildcards in a file name by default. C-x C-f passes +it to `find-file' with non-nil WILDCARDS argument, which visits +multiple files, and C-x d passes it to `dired'. + +--- +** skeleton.el now supports using - to mark the skeleton-point without + interregion interaction. @ has reverted to only setting + skeleton-positions and no longer sets skeleton-point. Skeletons + which used @ to mark skeleton-point independent of _ should now use - + instead. The updated skeleton-insert docstring explains these new + features along with other details of skeleton construction. + +--- +** New variable `hs-set-up-overlay' allows customization of the overlay +used to effect hiding for hideshow minor mode. Integration with isearch +handles the overlay property `display' specially, preserving it during +temporary overlay showing in the course of an isearch operation. + ++++ +** hide-ifdef-mode now uses overlays rather than selective-display +to hide its text. This should be mostly transparent but slightly +changes the behavior of motion commands like C-e and C-p. + +--- +** partial-completion-mode now does partial completion on directory names. + +--- +** The type-break package now allows `type-break-file-name' to be nil +and if so, doesn't store any data across sessions. This is handy if +you don't want the .type-break file in your home directory or are +annoyed by the need for interaction when you kill Emacs. + +--- +** `ps-print' can now print characters from the mule-unicode charsets. + +Printing text with characters from the mule-unicode-* sets works with +ps-print, provided that you have installed the appropriate BDF fonts. +See the file INSTALL for URLs where you can find these fonts. + +--- +** New command `strokes-global-set-stroke-string'. +This is like `strokes-global-set-stroke', but it allows you to bind +the stroke directly to a string to insert. This is convenient for +using strokes as an input method. + +--- +** LDAP support now defaults to ldapsearch from OpenLDAP version 2. + ++++ +** You can now disable pc-selection-mode after enabling it. +M-x pc-selection-mode behaves like a proper minor mode, and with no +argument it toggles the mode. + +Turning off PC-Selection mode restores the global key bindings +that were replaced by turning on the mode. + +--- +** `uniquify-strip-common-suffix' tells uniquify to prefer +`file|dir1' and `file|dir2' to `file|dir1/subdir' and `file|dir2/subdir'. + +--- +** Support for `magic cookie' standout modes has been removed. +Emacs will still work on terminals that require magic cookies in order +to use standout mode, however they will not be able to display +mode-lines in inverse-video. + +--- +** The game `mpuz' is enhanced. + +`mpuz' now allows the 2nd factor not to have two identical digits. By +default, all trivial operations involving whole lines are performed +automatically. The game uses faces for better visual feedback. + +--- +** display-battery has been replaced by display-battery-mode. + +--- +** calculator.el now has radix grouping mode, which is available when +`calculator-output-radix' is non-nil. In this mode a separator +character is used every few digits, making it easier to see byte +boundries etc. For more info, see the documentation of the variable +`calculator-radix-grouping-mode'. + +--- +** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead. + +--- +** iso-acc.el is now obsolete. Use one of the latin input methods instead. + +--- +** cplus-md.el has been removed to avoid problems with Custom. + +* Changes for non-free operating systems + ++++ +** Passing resources on the command line now works on MS Windows. +You can use --xrm to pass resource settings to Emacs, overriding any +existing values. For example: + + emacs --xrm "Emacs.Background:red" --xrm "Emacs.Geometry:100x20" + +will start up Emacs on an initial frame of 100x20 with red background, +irrespective of geometry or background setting on the Windows registry. + +--- ** On MS Windows, the "system caret" now follows the cursor. This enables Emacs to work better with programs that need to track the cursor, for example screen magnifiers and text to speech programs. @@ -2489,326 +2882,13 @@ the clipboard should work correctly for your local language without any customizations. -+++ -** Under X11, it is possible to swap Alt and Meta (and Super and Hyper). -The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym', -and `x-super-keysym' can be used to choose which keysyms Emacs should -use for the modifiers. For example, the following two lines swap -Meta and Alt: - (setq x-alt-keysym 'meta) - (setq x-meta-keysym 'alt) - -+++ -** vc-annotate-mode enhancements - -In vc-annotate mode, you can now use the following key bindings for -enhanced functionality to browse the annotations of past revisions, or -to view diffs or log entries directly from vc-annotate-mode: - - P: annotates the previous revision - N: annotates the next revision - J: annotates the revision at line - A: annotates the revision previous to line - D: shows the diff of the revision at line with its previous revision - L: shows the log of the revision at line - W: annotates the workfile (most up to date) version - -+++ -** In pcl-cvs mode, there is a new `d y' command to view the diffs -between the local version of the file and yesterday's head revision -in the repository. - -+++ -** In pcl-cvs mode, there is a new `d r' command to view the changes -anyone has committed to the repository since you last executed -"checkout", "update" or "commit". That means using cvs diff options --rBASE -rHEAD. - ---- -** New variable `hs-set-up-overlay' allows customization of the overlay -used to effect hiding for hideshow minor mode. Integration with isearch -handles the overlay property `display' specially, preserving it during -temporary overlay showing in the course of an isearch operation. - -+++ -** New command `recode-region' decodes the region again by a specified -coding system. - +--- ** On Mac OS, the value of the variable `keyboard-coding-system' is now dynamically changed according to the current keyboard script. The variable `mac-keyboard-text-encoding' and the constants `kTextEncodingMacRoman', `kTextEncodingISOLatin1', and `kTextEncodingISOLatin2' are obsolete. -* New modes and packages in Emacs 22.1 - -+++ -** The new package longlines.el provides a minor mode for editing text -files composed of long lines, based on the `use-hard-newlines' -mechanism. The long lines are broken up by inserting soft newlines, -which are automatically removed when saving the file to disk or -copying into the kill ring, clipboard, etc. By default, Longlines -mode inserts soft newlines automatically during editing, a behavior -referred to as "soft word wrap" in other text editors. This is -similar to Refill mode, but more reliable. To turn the word wrap -feature off, set `longlines-auto-wrap' to nil. - -+++ -** The new package conf-mode.el handles thousands of configuration files, with -varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, -var : value, var value or keyword var value) and sections ([section] or -section { }). Many files under /etc/, or with suffixes like .cf through -.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are -recognized. - -+++ -** The new package dns-mode.el add syntax highlight of DNS master files. -The key binding C-c C-s (`dns-mode-soa-increment-serial') can be used -to increment the SOA serial. - -+++ -** The new package flymake.el does on-the-fly syntax checking of program -source files. See the Flymake's Info manual for more details. - -** The library tree-widget.el provides a new widget to display a set -of hierarchical data as an outline. For example, the tree-widget is -well suited to display a hierarchy of directories and files. - -+++ -** The wdired.el package allows you to use normal editing commands on Dired -buffers to change filenames, permissions, etc... - -+++ -** The thumbs.el package allows you to preview image files as thumbnails -and can be invoked from a Dired buffer. - -+++ -** The new python.el package is used to edit Python and Jython programs. - -** The URL package (which had been part of W3) is now part of Emacs. - -+++ -** The new global minor mode `size-indication-mode' (off by default) -shows the size of accessible part of the buffer on the mode line. - ---- -** GDB-Script-mode is used for files like .gdbinit. - ---- -** Ido mode is now part of the Emacs distribution. - -The ido (interactively do) package is an extension of the iswitchb -package to do interactive opening of files and directories in addition -to interactive buffer switching. Ido is a superset of iswitchb (with -a few exceptions), so don't enable both packages. - ---- -** CUA mode is now part of the Emacs distribution. - -The new cua package provides CUA-like keybindings using C-x for -cut (kill), C-c for copy, C-v for paste (yank), and C-z for undo. -With cua, the region can be set and extended using shifted movement -keys (like pc-selection-mode) and typed text replaces the active -region (like delete-selection-mode). Do not enable these modes with -cua-mode. Customize the variable `cua-mode' to enable cua. - -In addition, cua provides unified rectangle support with visible -rectangle highlighting: Use S-return to start a rectangle, extend it -using the movement commands (or mouse-3), and cut or copy it using C-x -or C-c (using C-w and M-w also works). - -Use M-o and M-c to `open' or `close' the rectangle, use M-b or M-f, to -fill it with blanks or another character, use M-u or M-l to upcase or -downcase the rectangle, use M-i to increment the numbers in the -rectangle, use M-n to fill the rectangle with a numeric sequence (such -as 10 20 30...), use M-r to replace a regexp in the rectangle, and use -M-' or M-/ to restrict command on the rectangle to a subset of the -rows. See the commentary in cua-base.el for more rectangle commands. - -Cua also provides unified support for registers: Use a numeric -prefix argument between 0 and 9, i.e. M-0 .. M-9, for C-x, C-c, and -C-v to cut or copy into register 0-9, or paste from register 0-9. - -The last text deleted (not killed) is automatically stored in -register 0. This includes text deleted by typing text. - -Finally, cua provides a global mark which is set using S-C-space. -When the global mark is active, any text which is cut or copied is -automatically inserted at the global mark position. See the -commentary in cua-base.el for more global mark related commands. - -The features of cua also works with the standard emacs bindings for -kill, copy, yank, and undo. If you want to use cua mode, but don't -want the C-x, C-c, C-v, and C-z bindings, you may customize the -`cua-enable-cua-keys' variable. - -Note: This version of cua mode is not backwards compatible with older -versions of cua.el and cua-mode.el. To ensure proper operation, you -must remove older versions of cua.el or cua-mode.el as well as the -loading and customization of those packages from the .emacs file. - -+++ -** The new keypad setup package provides several common bindings for -the numeric keypad which is available on most keyboards. The numeric -keypad typically has the digits 0 to 9, a decimal point, keys marked -+, -, /, and *, an Enter key, and a NumLock toggle key. The keypad -package only controls the use of the digit and decimal keys. - -By customizing the variables `keypad-setup', `keypad-shifted-setup', -`keypad-numlock-setup', and `keypad-numlock-shifted-setup', or by -using the function `keypad-setup', you can rebind all digit keys and -the decimal key of the keypad in one step for each of the four -possible combinations of the Shift key state (not pressed/pressed) and -the NumLock toggle state (off/on). - -The choices for the keypad keys in each of the above states are: -`Plain numeric keypad' where the keys generates plain digits, -`Numeric keypad with decimal key' where the character produced by the -decimal key can be customized individually (for internationalization), -`Numeric Prefix Arg' where the keypad keys produce numeric prefix args -for emacs editing commands, `Cursor keys' and `Shifted Cursor keys' -where the keys work like (shifted) arrow keys, home/end, etc., and -`Unspecified/User-defined' where the keypad keys (kp-0, kp-1, etc.) -are left unspecified and can be bound individually through the global -or local keymaps. - -+++ -** The new kmacro package provides a simpler user interface to -emacs' keyboard macro facilities. - -Basically, it uses two function keys (default F3 and F4) like this: -F3 starts a macro, F4 ends the macro, and pressing F4 again executes -the last macro. While defining the macro, F3 inserts a counter value -which automatically increments every time the macro is executed. - -There is now a keyboard macro ring which stores the most recently -defined macros. - -The C-x C-k sequence is now a prefix for the kmacro keymap which -defines bindings for moving through the keyboard macro ring, -C-x C-k C-p and C-x C-k C-n, editing the last macro C-x C-k C-e, -manipulating the macro counter and format via C-x C-k C-c, -C-x C-k C-a, and C-x C-k C-f. See the commentary in kmacro.el -for more commands. - -The normal macro bindings C-x (, C-x ), and C-x e now interfaces to -the keyboard macro ring. - -The C-x e command now automatically terminates the current macro -before calling it, if used while defining a macro. - -In addition, when ending or calling a macro with C-x e, the macro can -be repeated immediately by typing just the `e'. You can customize -this behavior via the variable kmacro-call-repeat-key and -kmacro-call-repeat-with-arg. - -Keyboard macros can now be debugged and edited interactively. -C-x C-k SPC steps through the last keyboard macro one key sequence -at a time, prompting for the actions to take. - ---- -** The old Octave mode bindings C-c f and C-c i have been changed -to C-c C-f and C-c C-i. The C-c C-i subcommands now have duplicate -bindings on control characters--thus, C-c C-i C-b is the same as -C-c C-i b, and so on. - -** The printing package is now part of the Emacs distribution. - -If you enable the printing package by including (require 'printing) in -the .emacs file, the normal Print item on the File menu is replaced -with a Print sub-menu which allows you to preview output through -ghostview, use ghostscript to print (if you don't have a PostScript -printer) or send directly to printer a PostScript code generated by -`ps-print' package. Use M-x pr-help for more information. - -+++ -** Calc is now part of the Emacs distribution. - -Calc is an advanced desk calculator and mathematical tool written in -Emacs Lisp. Its documentation is in a separate manual; within Emacs, -type "C-h i m calc RET" to read that manual. A reference card is -available in `etc/calccard.tex' and `etc/calccard.ps'. - -+++ -** Tramp is now part of the distribution. - -This package is similar to Ange-FTP: it allows you to edit remote -files. But whereas Ange-FTP uses FTP to access the remote host, -Tramp uses a shell connection. The shell connection is always used -for filename completion and directory listings and suchlike, but for -the actual file transfer, you can choose between the so-called -`inline' methods (which transfer the files through the shell -connection using base64 or uu encoding) and the `out-of-band' methods -(which invoke an external copying program such as `rcp' or `scp' or -`rsync' to do the copying). - -Shell connections can be acquired via `rsh', `ssh', `telnet' and also -`su' and `sudo'. Ange-FTP is still supported via the `ftp' method. - -If you want to disable Tramp you should set - - (setq tramp-default-method "ftp") - ---- -** The new global minor mode `file-name-shadow-mode' modifies the way -filenames being entered by the user in the minibuffer are displayed, so -that it's clear when part of the entered filename will be ignored due to -emacs' filename parsing rules. The ignored portion can be made dim, -invisible, or otherwise less visually noticable. The display method may -be displayed by customizing the variable `file-name-shadow-properties'. - ---- -** The ruler-mode.el library provides a minor mode for displaying an -"active" ruler in the header line. You can use the mouse to visually -change the `fill-column', `window-margins' and `tab-stop-list' -settings. - ---- -** The minor mode Reveal mode makes text visible on the fly as you -move your cursor into hidden regions of the buffer. -It should work with any package that uses overlays to hide parts -of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ... - -There is also Global Reveal mode which affects all buffers. - ---- -** The new package ibuffer provides a powerful, completely -customizable replacement for buff-menu.el. - -+++ -** The new package table.el implements editable, WYSIWYG, embedded -`text tables' in Emacs buffers. It simulates the effect of putting -these tables in a special major mode. The package emulates WYSIWYG -table editing available in modern word processors. The package also -can generate a table source in typesetting and markup languages such -as latex and html from the visually laid out text table. - -+++ -** SES mode (ses-mode) is a new major mode for creating and editing -spreadsheet files. Besides the usual Emacs features (intuitive command -letters, undo, cell formulas in Lisp, plaintext files, etc.) it also offers -viral immunity and import/export of tab-separated values. - ---- -** Support for `magic cookie' standout modes has been removed. -Emacs will still work on terminals that require magic cookies in order -to use standout mode, however they will not be able to display -mode-lines in inverse-video. - ---- -** cplus-md.el has been removed to avoid problems with Custom. - -+++ -** New package benchmark.el contains simple support for convenient -timing measurements of code (including the garbage collection component). - ---- -** The new Lisp library fringe.el controls the appearance of fringes. - ---- -** `cfengine-mode' is a major mode for editing GNU Cfengine -configuration files. - * Incompatible Lisp Changes in Emacs 22.1 +++ @@ -2829,93 +2909,397 @@ * Lisp Changes in Emacs 22.1 -** New functions, macros, and commands - -+++ -*** The new function `filter-buffer-substring' extracts a buffer -substring, passes it through a set of filter functions, and returns -the filtered substring. It is used instead of `buffer-substring' or -`delete-and-extract-region' when copying text into a user-accessible -data structure, like the kill-ring, X clipboard, or a register. The -list of filter function is specified by the new variable -`buffer-substring-filters'. For example, Longlines mode uses -`buffer-substring-filters' to remove soft newlines from the copied -text. - -+++ -*** (while-no-input BODY...) runs BODY, but only so long as no input -arrives. If the user types or clicks anything, BODY stops as if a -quit had occurred. while-no-input returns the value of BODY, if BODY -finishes. It returns nil if BODY was aborted. - -+++ -*** New function `looking-back' checks whether a regular expression matches -the text before point. Specifying the LIMIT argument bounds how far -back the match can start; this is a way to keep it from taking too long. - -+++ -*** New functions `make-progress-reporter', `progress-reporter-update', ++++ +** The option --script FILE runs Emacs in batch mode and loads FILE. +It is useful for writing Emacs Lisp shell script files, because they +can start with this line: + + #!/usr/bin/emacs --script + ++++ +** The option --directory DIR now modifies `load-path' immediately. +Directories are added to the front of `load-path' in the order they +appear on the command line. For example, with this command line: + + emacs -batch -L .. -L /tmp --eval "(require 'foo)" + +Emacs looks for library `foo' in the parent directory, then in /tmp, then +in the other directories in `load-path'. (-L is short for --directory.) + ++++ +** The default value of `sentence-end' is now defined using the new +variable `sentence-end-without-space', which contains such characters +that end a sentence without following spaces. + +The function `sentence-end' should be used to obtain the value of the +variable `sentence-end'. If the variable `sentence-end' is nil, then +this function returns the regexp constructed from the variables +`sentence-end-without-period', `sentence-end-double-space' and +`sentence-end-without-space'. + ++++ +** The argument to forward-word, backward-word, forward-to-indentation +and backward-to-indentation is now optional, and defaults to 1. + ++++ +** If a command sets transient-mark-mode to `only', that +enables Transient Mark mode for the following command only. +During that following command, the value of transient-mark-mode +is `identity'. If it is still `identity' at the end of the command, +it changes to nil. + ++++ +** The new hook `before-save-hook' is invoked by `basic-save-buffer' +before saving buffers. This allows packages to perform various final +tasks, for example; it can be used by the copyright package to make +sure saved files have the current year in any copyright headers. + ++++ +** If a buffer sets buffer-save-without-query to non-nil, +save-some-buffers will always save that buffer without asking +(if it's modified). + +--- +** list-buffers-noselect now takes an additional argument, BUFFER-LIST. +If it is non-nil, it specifies which buffers to list. + ++++ +** The kill-buffer-hook is now permanent-local. + ++++ +** `auto-save-file-format' has been renamed to +`buffer-auto-save-file-format' and made into a permanent local. + ++++ +** Functions `file-name-sans-extension' and `file-name-extension' now +ignore the leading dots in file names, so that file names such as +`.emacs' are treated as extensionless. + ++++ +** copy-file now takes an additional option arg MUSTBENEW. + +This argument works like the MUSTBENEW argument of write-file. + ++++ +** If the second argument to `copy-file' is the name of a directory, +the file is copied to that directory instead of signaling an error. + ++++ +** `visited-file-modtime' and `calendar-time-from-absolute' now return +a list of two integers, instead of a cons. + ++++ +** `file-chase-links' now takes an optional second argument LIMIT which +specifies the maximum number of links to chase through. If after that +many iterations the file name obtained is still a symbolic link, +`file-chase-links' returns it anyway. + ++++ +** The function `commandp' takes an additional optional +argument. If it is non-nil, then `commandp' checks +for a function that could be called with `call-interactively', +and does not return t for keyboard macros. + ++++ +** An interactive specification may now use the code letter 'U' to get +the up-event that was discarded in case the last key sequence read for a +previous 'k' or 'K' argument was a down-event; otherwise nil is used. + +--- +** Functions y-or-n-p, read-char, read-key-sequence and the like, that +display a prompt but don't use the minibuffer, now display the prompt +using the text properties (esp. the face) of the prompt string. + ++++ +** read-from-minibuffer now accepts an additional argument KEEP-ALL +saying to put all inputs in the history list, even empty ones. + ++++ +** The `read-file-name' function now takes an additional argument which +specifies a predicate which the file name read must satify. The +new variable `read-file-name-predicate' contains the predicate argument +while reading the file name from the minibuffer; the predicate in this +variable is used by read-file-name-internal to filter the completion list. + +--- +** The new variable `read-file-name-function' can be used by lisp code +to override the internal read-file-name function. + ++++ +** The new variable `read-file-name-completion-ignore-case' specifies +whether completion ignores case when reading a file name with the +`read-file-name' function. + ++++ +** The new function `read-directory-name' can be used instead of +`read-file-name' to read a directory name; when used, completion +will only show directories. + ++++ +** The new variable search-spaces-regexp controls how to search +for spaces in a regular expression. If it is non-nil, it should be a +regular expression, and any series of spaces stands for that regular +expression. If it is nil, spaces stand for themselves. + +Spaces inside of constructs such as [..] and *, +, ? are never +replaced with search-spaces-regexp. + ++++ +** There are now two new regular expression operators, \_< and \_>, +for matching the beginning and end of a symbol. A symbol is a +non-empty sequence of either word or symbol constituent characters, as +specified by the syntax table. + ++++ +** skip-chars-forward and skip-chars-backward now handle +character classes such as [:alpha:], along with individual characters +and ranges. + +--- +** In `replace-match', the replacement text no longer inherits +properties from surrounding text. + ++++ +** The list returned by `(match-data t)' now has the buffer as a final +element, if the last match was on a buffer. `set-match-data' +accepts such a list for restoring the match state. + ++++ +** Variable aliases have been implemented: + +*** defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] + +This function defines the symbol ALIAS-VAR as a variable alias for +symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR +returns the value of BASE-VAR, and changing the value of ALIAS-VAR +changes the value of BASE-VAR. + +DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has +the same documentation as BASE-VAR. + +*** indirect-variable VARIABLE + +This function returns the variable at the end of the chain of aliases +of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not +defined as an alias, the function returns VARIABLE. + +It might be noteworthy that variables aliases work for all kinds of +variables, including buffer-local and frame-local variables. + ++++ +*** The macro define-obsolete-variable-alias combines defvaralias and +make-obsolete-variable. The macro define-obsolete-function-alias +combines defalias and make-obsolete. + ++++ +** Enhancements to keymaps. + +*** Cleaner way to enter key sequences. + +You can enter a constant key sequence in a more natural format, the +same one used for saving keyboard macros, using the macro `kbd'. For +example, + +(kbd "C-x C-f") => "\^x\^f" + +*** Interactive commands can be remapped through keymaps. + +This is an alternative to using defadvice or substitute-key-definition +to modify the behavior of a key binding using the normal keymap +binding and lookup functionality. + +When a key sequence is bound to a command, and that command is +remapped to another command, that command is run instead of the +original command. + +Example: +Suppose that minor mode my-mode has defined the commands +my-kill-line and my-kill-word, and it wants C-k (and any other key +bound to kill-line) to run the command my-kill-line instead of +kill-line, and likewise it wants to run my-kill-word instead of +kill-word. + +Instead of rebinding C-k and the other keys in the minor mode map, +command remapping allows you to directly map kill-line into +my-kill-line and kill-word into my-kill-word through the minor mode +map using define-key: + + (define-key my-mode-map [remap kill-line] 'my-kill-line) + (define-key my-mode-map [remap kill-word] 'my-kill-word) + +Now, when my-mode is enabled, and the user enters C-k or M-d, +the commands my-kill-line and my-kill-word are run. + +Notice that only one level of remapping is supported. In the above +example, this means that if my-kill-line is remapped to other-kill, +then C-k still runs my-kill-line. + +The following changes have been made to provide command remapping: + +- Command remappings are defined using `define-key' with a prefix-key + `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD + to definition DEF in keymap MAP. The definition is not limited to + another command; it can be anything accepted for a normal binding. + +- The new function `command-remapping' returns the binding for a + remapped command in the current keymaps, or nil if not remapped. + +- key-binding now remaps interactive commands unless the optional + third argument NO-REMAP is non-nil. + +- where-is-internal now returns nil for a remapped command (e.g. + kill-line if my-mode is enabled), and the actual key binding for + the command it is remapped to (e.g. C-k for my-kill-line). + It also has a new optional fifth argument, NO-REMAP, which inhibits + remapping if non-nil (e.g. it returns C-k for kill-line and + <kill-line> for my-kill-line). + +- The new variable `this-original-command' contains the original + command before remapping. It is equal to `this-command' when the + command was not remapped. + +*** If text has a `keymap' property, that keymap takes precedence +over minor mode keymaps. + +*** The `keymap' property now also works at the ends of overlays and +text-properties, according to their stickiness. This also means that it +works with empty overlays. The same hold for the `local-map' property. + +*** Dense keymaps now handle inheritance correctly. +Previously a dense keymap would hide all of the simple-char key +bindings of the parent keymap. + +*** `define-key-after' now accepts keys longer than 1. + +*** New function `current-active-maps' returns a list of currently +active keymaps. + +*** New function `describe-buffer-bindings' inserts the list of all +defined keys and their definitions. + +*** New function `keymap-prompt' returns the prompt-string of a keymap + +*** (map-keymap FUNCTION KEYMAP) applies the function to each binding +in the keymap. + +*** New variable emulation-mode-map-alists. + +Lisp packages using many minor mode keymaps can now maintain their own +keymap alist separate from minor-mode-map-alist by adding their keymap +alist to this list. + ++++ +** Atomic change groups. + +To perform some changes in the current buffer "atomically" so that +they either all succeed or are all undone, use `atomic-change-group' +around the code that makes changes. For instance: + + (atomic-change-group + (insert foo) + (delete-region x y)) + +If an error (or other nonlocal exit) occurs inside the body of +`atomic-change-group', it unmakes all the changes in that buffer that +were during the execution of the body. The change group has no effect +on any other buffers--any such changes remain. + +If you need something more sophisticated, you can directly call the +lower-level functions that `atomic-change-group' uses. Here is how. + +To set up a change group for one buffer, call `prepare-change-group'. +Specify the buffer as argument; it defaults to the current buffer. +This function returns a "handle" for the change group. You must save +the handle to activate the change group and then finish it. + +Before you change the buffer again, you must activate the change +group. Pass the handle to `activate-change-group' afterward to +do this. + +After you make the changes, you must finish the change group. You can +either accept the changes or cancel them all. Call +`accept-change-group' to accept the changes in the group as final; +call `cancel-change-group' to undo them all. + +You should use `unwind-protect' to make sure the group is always +finished. The call to `activate-change-group' should be inside the +`unwind-protect', in case the user types C-g just after it runs. +(This is one reason why `prepare-change-group' and +`activate-change-group' are separate functions.) Once you finish the +group, don't use the handle again--don't try to finish the same group +twice. + +To make a multibuffer change group, call `prepare-change-group' once +for each buffer you want to cover, then use `nconc' to combine the +returned values, like this: + + (nconc (prepare-change-group buffer-1) + (prepare-change-group buffer-2)) + +You can then activate the multibuffer change group with a single call +to `activate-change-group', and finish it with a single call to +`accept-change-group' or `cancel-change-group'. + +Nested use of several change groups for the same buffer works as you +would expect. Non-nested use of change groups for the same buffer +will lead to undesirable results, so don't let it happen; the first +change group you start for any given buffer should be the last one +finished. + ++++ +** Progress reporters. +The new functions `make-progress-reporter', `progress-reporter-update', `progress-reporter-force-update', `progress-reporter-done', and `dotimes-with-progress-reporter' provide a simple and efficient way for a command to present progress messages for the user. +++ -*** The new primitive `get-internal-run-time' returns the processor -run time used by Emacs since start-up. - -+++ -*** The new function `called-interactively-p' does what many people -have mistakenly believed `interactive-p' did: it returns t if the -calling function was called through `call-interactively'. This should -only be used when you cannot add a new "interactive" argument to the -command. - -+++ -*** The new function `assoc-string' replaces `assoc-ignore-case' and -`assoc-ignore-representation', which are still available, but have -been declared obsolete. - ---- -*** New function quail-find-key returns a list of keys to type in the -current input method to input a character. - -+++ -*** New functions posn-at-point and posn-at-x-y return -click-event-style position information for a given visible buffer -position or for a given window pixel coordinate. - -+++ -*** The new primitive `set-file-times' sets a file's access and -modification times. Magic file name handlers can handle this -operation. - -+++ -*** The new function syntax-after returns the syntax code -of the character after a specified buffer position, taking account -of text properties as well as the character code. - -*** `syntax-class' extracts the class of a syntax code (as returned -by syntax-after). - -+++ -*** New function `line-number-at-pos' returns line number of current -line in current buffer, or if optional buffer position is given, line -number of corresponding line in current buffer. - -+++ -*** New function `macroexpand-all' expands all macros in a form. -It is similar to the Common-Lisp function of the same name. -One difference is that it guarantees to return the original argument -if no expansion is done, which may be tested using `eq'. - -+++ -*** New macro with-local-quit temporarily sets inhibit-quit to nil for use -around potentially blocking or long-running code in timers -and post-command-hooks. - ---- -** easy-mmode-define-global-mode has been renamed to -define-global-minor-mode. The old name remains as an alias. +** New `yank-handler' text property may be used to control how +previously killed text on the kill-ring is reinserted. + +The value of the yank-handler property must be a list with one to four +elements with the following format: + (FUNCTION PARAM NOEXCLUDE UNDO). + +The `insert-for-yank' function looks for a yank-handler property on +the first character on its string argument (typically the first +element on the kill-ring). If a yank-handler property is found, +the normal behavior of `insert-for-yank' is modified in various ways: + + When FUNCTION is present and non-nil, it is called instead of `insert' +to insert the string. FUNCTION takes one argument--the object to insert. + If PARAM is present and non-nil, it replaces STRING as the object +passed to FUNCTION (or `insert'); for example, if FUNCTION is +`yank-rectangle', PARAM should be a list of strings to insert as a +rectangle. + If NOEXCLUDE is present and non-nil, the normal removal of the +yank-excluded-properties is not performed; instead FUNCTION is +responsible for removing those properties. This may be necessary +if FUNCTION adjusts point before or after inserting the object. + If UNDO is present and non-nil, it is a function that will be called +by `yank-pop' to undo the insertion of the current object. It is +called with two arguments, the start and end of the current region. +FUNCTION may set `yank-undo-function' to override the UNDO value. + +*** The functions kill-new, kill-append, and kill-region now have an +optional argument to specify the yank-handler text property to put on +the killed text. + +*** The function yank-pop will now use a non-nil value of the variable +`yank-undo-function' (instead of delete-region) to undo the previous +yank or yank-pop command (or a call to insert-for-yank). The function +insert-for-yank automatically sets that variable according to the UNDO +element of the string argument's yank-handler text property if present. + +*** The function `insert-for-yank' now supports strings where the +`yank-handler' property does not span the first character of the +string. The old behavior is available if you call +`insert-for-yank-1' instead. + +*** The new function insert-for-yank normally works like `insert', but +removes the text properties in the `yank-excluded-properties' list. +However, the insertion of the text may be modified by a `yank-handler' +text property. +++ ** An element of buffer-undo-list can now have the form (apply FUNNAME @@ -2928,6 +3312,160 @@ range BEG...END and increased the buffer size by DELTA. +++ +** If the buffer's undo list for the current command gets longer than +undo-outer-limit, garbage collection empties it. This is to prevent +it from using up the available memory and choking Emacs. + ++++ +** Enhancements to process support + +*** Function list-processes now has an optional argument; if non-nil, +only the processes whose query-on-exit flag is set are listed. + +*** New set-process-query-on-exit-flag and process-query-on-exit-flag +functions. The existing process-kill-without-query function is still +supported, but new code should use the new functions. + +*** Function signal-process now accepts a process object or process +name in addition to a process id to identify the signalled process. + +*** Processes now have an associated property list where programs can +maintain process state and other per-process related information. + +The new functions process-get and process-put are used to access, add, +and modify elements on this property list. + +The new low-level functions process-plist and set-process-plist are +used to access and replace the entire property list of a process. + +*** Function accept-process-output now has an optional fourth arg +`just-this-one'. If non-nil, only output from the specified process +is handled, suspending output from other processes. If value is an +integer, also inhibit running timers. This feature is generally not +recommended, but may be necessary for specific applications, such as +speech synthesis. + +*** Adaptive read buffering of subprocess output. + +On some systems, when emacs reads the output from a subprocess, the +output data is read in very small blocks, potentially resulting in +very poor performance. This behavior can be remedied to some extent +by setting the new variable process-adaptive-read-buffering to a +non-nil value (the default), as it will automatically delay reading +from such processes, to allowing them to produce more output before +emacs tries to read it. + +*** The new function `call-process-shell-command' executes a shell +command command synchronously in a separate process. + +*** The new function `process-file' is similar to `call-process', but +obeys file handlers. The file handler is chosen based on +default-directory. + +*** The new function `set-process-filter-multibyte' sets the +multibyteness of a string given to a process's filter. + +*** The new function `process-filter-multibyte-p' returns t if a +string given to a process's filter is multibyte. + +*** A filter function of a process is called with a multibyte string +if the filter's multibyteness is t. That multibyteness is decided by +the value of `default-enable-multibyte-characters' when the process is +created and can be changed later by `set-process-filter-multibyte'. + +*** If a process's coding system is raw-text or no-conversion and its +buffer is multibyte, the output of the process is at first converted +to multibyte by `string-to-multibyte' then inserted in the buffer. +Previously, it was converted to multibyte by `string-as-multibyte', +which was not compatible with the behavior of file reading. + ++++ +** Enhanced networking support. + +*** There is a new `make-network-process' function which supports +opening of stream and datagram connections to a server, as well as +create a stream or datagram server inside emacs. + +- A server is started using :server t arg. +- Datagram connection is selected using :type 'datagram arg. +- A server can open on a random port using :service t arg. +- Local sockets are supported using :family 'local arg. +- Non-blocking connect is supported using :nowait t arg. +- The process' property list may be initialized using :plist PLIST arg; + a copy of the server process' property list is automatically inherited + by new client processes created to handle incoming connections. + +To test for the availability of a given feature, use featurep like this: + (featurep 'make-network-process '(:type datagram)) + +*** Original open-network-stream is now emulated using make-network-process. + +*** New function open-network-stream-nowait. + +This function initiates a non-blocking connect and returns immediately +without waiting for the connection to be established. It takes the +filter and sentinel functions as arguments; when the non-blocking +connect completes, the sentinel is called with a status string +matching "open" or "failed". + +*** New function open-network-stream-server. + +This function creates a network server process for a TCP service. +When a client connects to the specified service, a new subprocess +is created to handle the new connection, and the sentinel function +is called for the new process. + +*** New functions process-datagram-address and set-process-datagram-address. + +These functions are used with datagram-based network processes to get +and set the current address of the remote partner. + +*** New function format-network-address. + +This function reformats the lisp representation of a network address +to a printable string. For example, an IP address A.B.C.D and port +number P is represented as a five element vector [A B C D P], and the +printable string returned for this vector is "A.B.C.D:P". See the doc +string for other formatting options. + +*** By default, the function process-contact still returns (HOST SERVICE) +for a network process. Using the new optional KEY arg, the complete list +of network process properties or a specific property can be selected. + +Using :local and :remote as the KEY, the address of the local or +remote end-point is returned. An Inet address is represented as a 5 +element vector, where the first 4 elements contain the IP address and +the fifth is the port number. + +*** Network processes can now be stopped and restarted with +`stop-process' and `continue-process'. For a server process, no +connections are accepted in the stopped state. For a client process, +no input is received in the stopped state. + +*** New function network-interface-list. + +This function returns a list of network interface names and their +current network addresses. + +*** New function network-interface-info. + +This function returns the network address, hardware address, current +status, and other information about a specific network interface. + +*** The sentinel is now called when a network process is deleted with +delete-process. The status message passed to the sentinel for a +deleted network process is "deleted". The message passed to the +sentinel when the connection is closed by the remote peer has been +changed to "connection broken by remote peer". + ++++ +** New function `force-window-update' can initiate a full redisplay of +one or all windows. Normally, this is not needed as changes in window +contents are detected automatically. However, certain implicit +changes to mode lines, header lines, or display properties may require +forcing an explicit window update. + ++++ ** The line-move, scroll-up, and scroll-down functions will now modify the window vscroll to scroll through display rows that are taller that the height of the window, for example in the presense of @@ -2935,139 +3473,152 @@ variable `auto-window-vscroll' to nil. +++ -** If a buffer sets buffer-save-without-query to non-nil, -save-some-buffers will always save that buffer without asking -(if it's modified). - -+++ -** The function symbol-file tells you which file defined -a certain function or variable. - -+++ -** Lisp code can now test if a given buffer position is inside a -clickable link with the new function `mouse-on-link-p'. This is the -function used by the new `mouse-1-click-follows-link' functionality. - -+++ -** `set-auto-mode' now gives the interpreter magic line (if present) -precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration -will give the buffer XML or SGML mode, based on the new var -`magic-mode-alist'. - ---- -** To manipulate the File menu using easy-menu, you must specify the -proper name "file". In previous Emacs versions, you had to specify -"files", even though the menu item itself was changed to say "File" -several versions ago. - -+++ -** read-from-minibuffer now accepts an additional argument KEEP-ALL -saying to put all inputs in the history list, even empty ones. - -+++ -** The new variable search-spaces-regexp controls how to search -for spaces in a regular expression. If it is non-nil, it should be a -regular expression, and any series of spaces stands for that regular -expression. If it is nil, spaces stand for themselves. - -Spaces inside of constructs such as [..] and *, +, ? are never -replaced with search-spaces-regexp. - ---- -** list-buffers-noselect now takes an additional argument, BUFFER-LIST. -If it is non-nil, it specifies which buffers to list. - ---- -** set-buffer-file-coding-system now takes an additional argument, -NOMODIFY. If it is non-nil, it means don't mark the buffer modified. - -+++ -** An interactive specification may now use the code letter 'U' to get -the up-event that was discarded in case the last key sequence read for a -previous 'k' or 'K' argument was a down-event; otherwise nil is used. - -+++ -** Function `translate-region' accepts also a char-table as TABLE -argument. - -+++ -** Major mode functions now run the new normal hook -`after-change-major-mode-hook', at their very end, after the mode hooks. - -+++ -** `auto-save-file-format' has been renamed to -`buffer-auto-save-file-format' and made into a permanent local. - -+++ -** Both the variable and the function `disabled-command-hook' have -been renamed to `disabled-command-function'. The variable -`disabled-command-hook' has been kept as an obsolete alias. - -+++ ** Function `compute-motion' now calculates the usable window width if the WIDTH argument is nil. If the TOPOS argument is nil, the usable window height and width is used. +++ -** `visited-file-modtime' and `calendar-time-from-absolute' now return -a list of two integers, instead of a cons. - -+++ -** If a command sets transient-mark-mode to `only', that -enables Transient Mark mode for the following command only. -During that following command, the value of transient-mark-mode -is `identity'. If it is still `identity' at the end of the command, -it changes to nil. - -+++ -** Cleaner way to enter key sequences. - -You can enter a constant key sequence in a more natural format, the -same one used for saving keyboard macros, using the macro `kbd'. For -example, - -(kbd "C-x C-f") => "\^x\^f" - -+++ -** The sentinel is now called when a network process is deleted with -delete-process. The status message passed to the sentinel for a -deleted network process is "deleted". The message passed to the -sentinel when the connection is closed by the remote peer has been -changed to "connection broken by remote peer". - -+++ -** If the buffer's undo list for the current command gets longer than -undo-outer-limit, garbage collection empties it. This is to prevent -it from using up the available memory and choking Emacs. - -+++ -** skip-chars-forward and skip-chars-backward now handle -character classes such as [:alpha:], along with individual characters -and ranges. - -+++ ** Function pos-visible-in-window-p now returns the pixel coordinates and partial visiblity state of the corresponding row, if the PARTIALLY arg is non-nil. -+++ -** The function `eql' is now available without requiring the CL package. - -+++ -** The display space :width and :align-to text properties are now -supported on text terminals. - -+++ -** Support for displaying image slices - -*** New display property (slice X Y WIDTH HEIGHT) may be used with -an image property to display only a specific slice of the image. - -*** Function insert-image has new optional fourth arg to -specify image slice (X Y WIDTH HEIGHT). - -*** New function insert-sliced-image inserts a given image as a -specified number of evenly sized slices (rows x columns). +** Changes in using window objects: + ++++ +*** You can now make a window as short as one line. + +A window that is just one line tall does not display either a mode +line or a header line, even if the variables `mode-line-format' and +`header-line-format' call for them. A window that is two lines tall +cannot display both a mode line and a header line at once; if the +variables call for both, only the mode line actually appears. + ++++ +*** The new function `window-inside-edges' returns the edges of the +actual text portion of the window, not including the scroll bar or +divider line, the fringes, the display margins, the header line and +the mode line. + ++++ +*** The new functions `window-pixel-edges' and `window-inside-pixel-edges' +return window edges in units of pixels, rather than columns and lines. + ++++ +*** The new macro `with-selected-window' temporarily switches the +selected window without impacting the order of buffer-list. + ++++ +*** `select-window' takes an optional second argument `norecord', like +`switch-to-buffer'. + ++++ +*** `save-selected-window' now saves and restores the selected window +of every frame. This way, it restores everything that can be changed +by calling `select-window'. + ++++ +*** The function `set-window-buffer' now has an optional third argument +KEEP-MARGINS which will preserve the window's current margin, fringe, +and scroll-bar settings if non-nil. + ++++ +** Customizable fringe bitmaps + +*** New function 'define-fringe-bitmap' can now be used to create new +fringe bitmaps, as well as change the built-in fringe bitmaps. + +To change a built-in bitmap, do (require 'fringe) and use the symbol +identifing the bitmap such as `left-truncation or `continued-line'. + +*** New function 'destroy-fringe-bitmap' may be used to destroy a +previously created bitmap, or restore a built-in bitmap. + +*** New function 'set-fringe-bitmap-face' can now be used to set a +specific face to be used for a specific fringe bitmap. The face is +automatically merged with the `fringe' face, so normally, the face +should only specify the foreground color of the bitmap. + +*** There are new display properties, left-fringe and right-fringe, +that can be used to show a specific bitmap in the left or right fringe +bitmap of the display line. + +Format is 'display '(left-fringe BITMAP [FACE]), where BITMAP is a +symbol identifying a fringe bitmap, either built-in or defined with +`define-fringe-bitmap', and FACE is an optional face name to be used +for displaying the bitmap instead of the default `fringe' face. +When specified, FACE is automatically merged with the `fringe' face. + +*** New function `fringe-bitmaps-at-pos' returns the current fringe +bitmaps in the display line at a given buffer position. + ++++ +** Controlling the default left and right fringe widths. + +The default left and right fringe widths for all windows of a frame +can now be controlled by setting the `left-fringe' and `right-fringe' +frame parameters to an integer value specifying the width in pixels. +Setting the width to 0 effectively removes the corresponding fringe. + +The actual default fringe widths for the frame may deviate from the +specified widths, since the combined fringe widths must match an +integral number of columns. The extra width is distributed evenly +between the left and right fringe. For force a specific fringe width, +specify the width as a negative integer (if both widths are negative, +only the left fringe gets the specified width). + +Setting the width to nil (the default), restores the default fringe +width which is the minimum number of pixels necessary to display any +of the currently defined fringe bitmaps. The width of the built-in +fringe bitmaps is 8 pixels. + ++++ +** Per-window fringe and scrollbar settings + +*** Windows can now have their own individual fringe widths and +position settings. + +To control the fringe widths of a window, either set the buffer-local +variables `left-fringe-width', `right-fringe-width', or call +`set-window-fringes'. + +To control the fringe position in a window, that is, whether fringes +are positioned between the display margins and the window's text area, +or at the edges of the window, either set the buffer-local variable +`fringes-outside-margins' or call `set-window-fringes'. + +The function `window-fringes' can be used to obtain the current +settings. To make `left-fringe-width', `right-fringe-width', and +`fringes-outside-margins' take effect, you must set them before +displaying the buffer in a window, or use `set-window-buffer' to force +an update of the display margins. + +*** Windows can now have their own individual scroll-bar settings +controlling the width and position of scroll-bars. + +To control the scroll-bar of a window, either set the buffer-local +variables `scroll-bar-mode' and `scroll-bar-width', or call +`set-window-scroll-bars'. The function `window-scroll-bars' can be +used to obtain the current settings. To make `scroll-bar-mode' and +`scroll-bar-width' take effect, you must set them before displaying +the buffer in a window, or use `set-window-buffer' to force an update +of the display margins. + ++++ +** When using non-toolkit scroll bars with the default width, +the scroll-bar-width frame parameter value is nil. + ++++ +** Multiple overlay arrows can now be defined and managed via the new +variable `overlay-arrow-variable-list'. It contains a list of +varibles which contain overlay arrow position markers, including +the original `overlay-arrow-position' variable. + +Each variable on this list may have individual `overlay-arrow-string' +and `overlay-arrow-bitmap' properties that specify an overlay arrow +string (for non-window terminals) or fringe bitmap (for window +systems) to display at the corresponding overlay arrow position. +If either property is not set, the default `overlay-arrow-string' or +'overlay-arrow-fringe-bitmap' will be used. +++ ** New line-height and line-spacing properties for newline characters @@ -3172,127 +3723,16 @@ The form `(- EXPR ...)' negates or subtracts the value of the expressions. +++ -** Normally, the cursor is displayed at the end of any overlay and -text property string that may be present at the current window -position. The cursor may now be placed on any character of such -strings by giving that character a non-nil `cursor' text property. - -** The first face specification element in a defface can specify -`default' instead of frame classification. Then its attributes act as -defaults that apply to all the subsequent cases (and may be overridden -by them). - -+++ -** New face attribute `min-colors' can be used to tailor the face color -to the number of colors supported by a display, and define the -foreground and background colors accordingly so that they look best on -a terminal that supports at least this many colors. This is now the -preferred method for defining default faces in a way that makes a good -use of the capabilities of the display. - -+++ -** Customizable fringe bitmaps - -*** New function 'define-fringe-bitmap' can now be used to create new -fringe bitmaps, as well as change the built-in fringe bitmaps. - -To change a built-in bitmap, do (require 'fringe) and use the symbol -identifing the bitmap such as `left-truncation or `continued-line'. - -*** New function 'destroy-fringe-bitmap' may be used to destroy a -previously created bitmap, or restore a built-in bitmap. - -*** New function 'set-fringe-bitmap-face' can now be used to set a -specific face to be used for a specific fringe bitmap. The face is -automatically merged with the `fringe' face, so normally, the face -should only specify the foreground color of the bitmap. - -*** There are new display properties, left-fringe and right-fringe, -that can be used to show a specific bitmap in the left or right fringe -bitmap of the display line. - -Format is 'display '(left-fringe BITMAP [FACE]), where BITMAP is a -symbol identifying a fringe bitmap, either built-in or defined with -`define-fringe-bitmap', and FACE is an optional face name to be used -for displaying the bitmap instead of the default `fringe' face. -When specified, FACE is automatically merged with the `fringe' face. - -*** New function `fringe-bitmaps-at-pos' returns the current fringe -bitmaps in the display line at a given buffer position. - -+++ -** Multiple overlay arrows can now be defined and managed via the new -variable `overlay-arrow-variable-list'. It contains a list of -varibles which contain overlay arrow position markers, including -the original `overlay-arrow-position' variable. - -Each variable on this list may have individual `overlay-arrow-string' -and `overlay-arrow-bitmap' properties that specify an overlay arrow -string (for non-window terminals) or fringe bitmap (for window -systems) to display at the corresponding overlay arrow position. -If either property is not set, the default `overlay-arrow-string' or -'overlay-arrow-fringe-bitmap' will be used. - -+++ -** The default value of `sentence-end' is now defined using the new -variable `sentence-end-without-space' which contains such characters -that end a sentence without following spaces. - -+++ -** The function `sentence-end' should be used to obtain the value of -the variable `sentence-end'. If the variable `sentence-end' is nil, -then this function returns the regexp constructed from the variables -`sentence-end-without-period', `sentence-end-double-space' and -`sentence-end-without-space'. - -+++ -** The flags, width, and precision options for %-specifications in function -`format' are now documented. Some flags that were accepted but not -implemented (such as "*") are no longer accepted. - -+++ -** New function `delete-dups' destructively removes `equal' duplicates -from a list. Of several `equal' occurrences of an element in the list, -the first one is kept. - -+++ -** `declare' is now a macro. This change was made mostly for -documentation purposes and should have no real effect on Lisp code. - -+++ -** The new hook `before-save-hook' is invoked by `basic-save-buffer' -before saving buffers. This allows packages to perform various final -tasks, for example; it can be used by the copyright package to make -sure saved files have the current year in any copyright headers. - -+++ -** The function `insert-for-yank' now supports strings where the -`yank-handler' property does not span the first character of the -string. The old behavior is available if you call -`insert-for-yank-1' instead. - -+++ -** New function `get-char-property-and-overlay' accepts the same -arguments as `get-char-property' and returns a cons whose car is the -return value of `get-char-property' called with those arguments and -whose cdr is the overlay in which the property was found, or nil if -it was found as a text property or not found at all. - -+++ (lispref) -??? (man) -** The mouse pointer shape in void text areas (i.e. after the end of a -line or below the last line in the buffer) of the text window is now -controlled by the new variable `void-text-area-pointer'. The default -is to use the `arrow' (non-text) pointer. Other choices are `text' -(or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'. - -+++ -** The mouse pointer shape over an image can now be controlled by the -:pointer image property. - -+++ -** The mouse pointer shape over ordinary text or images may now be -controlled/overriden via the `pointer' text property. +** Support for displaying image slices + +*** New display property (slice X Y WIDTH HEIGHT) may be used with +an image property to display only a specific slice of the image. + +*** Function insert-image has new optional fourth arg to +specify image slice (X Y WIDTH HEIGHT). + +*** New function insert-sliced-image inserts a given image as a +specified number of evenly sized slices (rows x columns). +++ ** Images may now have an associated image map via the :map property. @@ -3317,6 +3757,27 @@ an event is composed by combining the ID of the hot-spot with the mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'. ++++ (lispref) +??? (man) +** The mouse pointer shape in void text areas (i.e. after the end of a +line or below the last line in the buffer) of the text window is now +controlled by the new variable `void-text-area-pointer'. The default +is to use the `arrow' (non-text) pointer. Other choices are `text' +(or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'. + ++++ +** The mouse pointer shape over an image can now be controlled by the +:pointer image property. + ++++ +** Lisp code can now test if a given buffer position is inside a +clickable link with the new function `mouse-on-link-p'. This is the +function used by the new `mouse-1-click-follows-link' functionality. + ++++ +** The mouse pointer shape over ordinary text or images may now be +controlled/overriden via the `pointer' text property. + ** Mouse event enhancements: +++ @@ -3365,44 +3826,58 @@ of that object, and the total width and height of that object. +++ -** New function `force-window-update' can initiate a full redisplay of -one or all windows. Normally, this is not needed as changes in window -contents are detected automatically. However, certain implicit -changes to mode lines, header lines, or display properties may require -forcing an explicit window update. - ---- -** New function `redirect-debugging-output' can be used to redirect -debugging output on the stderr file handle to a file. - -+++ -** `split-string' now includes null substrings in the returned list if -the optional argument SEPARATORS is non-nil and there are matches for -SEPARATORS at the beginning or end of the string. If SEPARATORS is -nil, or if the new optional third argument OMIT-NULLS is non-nil, all -empty matches are omitted from the returned list. - -+++ -** `makehash' is now obsolete. Use `make-hash-table' instead. - -+++ -** If optional third argument APPEND to `add-to-list' is non-nil, a -new element gets added at the end of the list instead of at the -beginning. This change actually occurred in Emacs-21.1, but was not -documented. - -** Major modes can define `eldoc-print-current-symbol-info-function' -locally to provide Eldoc functionality by some method appropriate to -the language. - ---- -** New coding system property `mime-text-unsuitable' indicates that -the coding system's `mime-charset' is not suitable for MIME text -parts, e.g. utf-16. - -+++ -** The argument to forward-word, backward-word, forward-to-indentation -and backward-to-indentation is now optional, and defaults to 1. +** At the end of a command, point moves out from within invisible +text, in the same way it moves out from within text covered by an +image or composition property. + +This makes it generally unnecessary to mark invisible text as intangible. +This is particularly good because the intangible property often has +unexpected side-effects since the property applies to everything +(including `goto-char', ...) whereas this new code is only run after +post-command-hook and thus does not care about intermediate states. + ++++ +** Normally, the cursor is displayed at the end of any overlay and +text property string that may be present at the current window +position. The cursor may now be placed on any character of such +strings by giving that character a non-nil `cursor' text property. + ++++ +** The display space :width and :align-to text properties are now +supported on text terminals. + ++++ +** Arguments for remove-overlays are now optional, so that you can +remove all overlays in the buffer by just calling (remove-overlay). + ++++ +** New variable char-property-alias-alist. + +This variable allows you to create alternative names for text +properties. It works at the same level as `default-text-properties', +although it applies to overlays as well. This variable was introduced +to implement the `font-lock-face' property. + ++++ +** New function `get-char-property-and-overlay' accepts the same +arguments as `get-char-property' and returns a cons whose car is the +return value of `get-char-property' called with those arguments and +whose cdr is the overlay in which the property was found, or nil if +it was found as a text property or not found at all. + ++++ +** The new frame parameter `tty-color-mode' specifies the mode to use +for color support on character terminal frames. Its value can be a +number of colors to support, or a symbol. See the Emacs Lisp +Reference manual for more detailed documentation. + ++++ +** The new face attribute `min-colors' can be used to tailor the face +color to the number of colors supported by a display, and define the +foreground and background colors accordingly so that they look best on +a terminal that supports at least this many colors. This is now the +preferred method for defining default faces in a way that makes a good +use of the capabilities of the display. +++ ** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able @@ -3413,42 +3888,223 @@ does that, this value may not be accurate. +++ -** The new function `window-inside-edges' returns the edges of the -actual text portion of the window, not including the scroll bar or -divider line, the fringes, the display margins, the header line and -the mode line. - -+++ -** The new functions `window-pixel-edges' and `window-inside-pixel-edges' -return window edges in units of pixels, rather than columns and lines. - -+++ -** The kill-buffer-hook is now permanent-local. - -+++ -** `select-window' takes an optional second argument `norecord', like -`switch-to-buffer'. - -+++ -** The new macro `with-selected-window' temporarily switches the -selected window without impacting the order of buffer-list. - -+++ -** The `keymap' property now also works at the ends of overlays and -text-properties, according to their stickiness. This also means that it -works with empty overlays. The same hold for the `local-map' property. - -+++ -** (map-keymap FUNCTION KEYMAP) applies the function to each binding -in the keymap. - ---- -** VC changes for backends: -*** (vc-switches BACKEND OPERATION) is a new function for use by backends. -*** The new `find-version' backend function replaces the `destfile' -parameter of the `checkout' backend function. -Old code still works thanks to a default `find-version' behavior that -uses the old `destfile' parameter. +** New function display-supports-face-attributes-p may be used to test +whether a given set of face attributes is actually displayable. + +A new predicate `supports' has also been added to the `defface' face +specification language, which can be used to do this test for faces +defined with defface. + +--- +** The special treatment of faces whose names are of the form `fg:COLOR' +or `bg:COLOR' has been removed. Lisp programs should use the +`defface' facility for defining faces with specific colors, or use +the feature of specifying the face attributes :foreground and :background +directly in the `face' property instead of using a named face. + ++++ +** The first face specification element in a defface can specify +`default' instead of frame classification. Then its attributes act as +defaults that apply to all the subsequent cases (and may be overridden +by them). + ++++ +** The variable `face-font-rescale-alist' specifies how much larger +(or smaller) font we should use. For instance, if the value is +'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10 +point, we actually use a font of 13 point if the font matches +SOME-FONTNAME-PATTERN. + +--- +** `set-fontset-font', `fontset-info', `fontset-font' now operate on +the default fontset if the argument NAME is nil.. + +--- +** The function face-differs-from-default-p now truly checks whether the +given face displays differently from the default face or not (previously +it did only a very cursory check). + ++++ +** face-attribute, face-foreground, face-background, and face-stipple now +accept a new optional argument, INHERIT, which controls how face +inheritance is used when determining the value of a face attribute. + ++++ +** New functions face-attribute-relative-p and merge-face-attribute +help with handling relative face attributes. + ++++ +** The priority of faces in an :inherit attribute face-list is reversed. +If a face contains an :inherit attribute with a list of faces, earlier +faces in the list override later faces in the list; in previous releases +of Emacs, the order was the opposite. This change was made so that +:inherit face-lists operate identically to face-lists in text `face' +properties. + ++++ +** New standard font-lock face `font-lock-preprocessor-face'. + ++++ +** New special text property `font-lock-face'. + +This property acts like the `face' property, but it is controlled by +M-x font-lock-mode. It is not, strictly speaking, a builtin text +property. Instead, it is implemented inside font-core.el, using the +new variable `char-property-alias-alist'. + +--- +** jit-lock obeys a new text-property `jit-lock-defer-multiline'. +If a piece of text with that property gets contextually refontified +(see jit-lock-defer-contextually), then all of that text will +be refontified. This is useful when the syntax of a textual element +depends on text several lines further down (and when font-lock-multiline +is not appropriate to solve that problem). For example in Perl: + + s{ + foo + }{ + bar + }e + +Adding/removing the last `e' changes the `bar' from being a piece of +text to being a piece of code, so you'd put a jit-lock-defer-multiline +property over the second half of the command to force (deferred) +refontification of `bar' whenever the `e' is added/removed. + ++++ +** font-lock can manage arbitrary text-properties beside `face'. +*** the FACENAME returned in font-lock-keywords can be a list +of the form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set +other properties than `face'. +*** font-lock-extra-managed-props can be set to make sure those extra +properties are automatically cleaned up by font-lock. + +--- +** The precedence of file-name-handlers has been changed. +Instead of blindly choosing the first handler that matches, +find-file-name-handler now gives precedence to a file-name handler +that matches near the end of the file name. More specifically, the +handler whose (match-beginning 0) is the largest is chosen. +In case of ties, the old "first matched" rule applies. + ++++ +** A file name handler can declare which operations it handles. + +You do this by putting an `operation' property on the handler name +symbol. The property value should be a list of the operations that +the handler really handles. It won't be called for any other +operations. + +This is useful for autoloaded handlers, to prevent them from being +autoloaded when not really necessary. + ++++ +** `set-auto-mode' now gives the interpreter magic line (if present) +precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration +will give the buffer XML or SGML mode, based on the new var +`magic-mode-alist'. + ++++ +** Major mode functions now run the new normal hook +`after-change-major-mode-hook', at their very end, after the mode hooks. + +--- +** If a major mode function has a non-nil `no-clone-indirect' +property, `clone-indirect-buffer' signals an error if you use +it in that buffer. + ++++ +** Major modes can define `eldoc-documentation-function' +locally to provide Eldoc functionality by some method appropriate to +the language. + ++++ +** define-derived-mode by default creates a new empty abbrev table. +It does not copy abbrevs from the parent mode's abbrev table. + ++++ +** define-minor-mode now accepts arbitrary additional keyword arguments +and simply passes them to defcustom, if applicable. + ++++ +** The new function `run-mode-hooks' and the new macro `delay-mode-hooks' +are used by define-derived-mode to make sure the mode hook for the +parent mode is run at the end of the child mode. + ++++ +** `minor-mode-list' now holds a list of minor mode commands. + ++++ +** Both the variable and the function `disabled-command-hook' have +been renamed to `disabled-command-function'. The variable +`disabled-command-hook' has been kept as an obsolete alias. + ++++ +** The function `eql' is now available without requiring the CL package. + ++++ +** If optional third argument APPEND to `add-to-list' is non-nil, a +new element gets added at the end of the list instead of at the +beginning. This change actually occurred in Emacs-21.1, but was not +documented. + ++++ +** The escape sequence \s is now interpreted as a SPACE character, +unless it is followed by a `-' in a character constant (e.g. ?\s-A), +in which case it is still interpreted as the super modifier. +In strings, \s is always interpreted as a space. + ++++ +** A hex escape in a string forces the string to be multibyte. +An octal escape makes it unibyte. + ++++ +** `split-string' now includes null substrings in the returned list if +the optional argument SEPARATORS is non-nil and there are matches for +SEPARATORS at the beginning or end of the string. If SEPARATORS is +nil, or if the new optional third argument OMIT-NULLS is non-nil, all +empty matches are omitted from the returned list. + ++++ +** New function `string-to-multibyte' converts a unibyte string to a +multibyte string with the same individual character codes. + ++++ +** The function `number-sequence' returns a list of equally-separated +numbers. For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). +By default, the separation is 1, but you can specify a different separation +as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5). + ++++ +** `sit-for' can now be called with args (SECONDS &optional NODISP). + ++++ +** A function's docstring can now hold the function's usage info on +its last line. It should match the regexp "\n\n(fn.*)\\'". + ++++ +** The `defmacro' form may contain declarations specifying how to +indent the macro in Lisp mode and how to debug it with Edebug. The +syntax of defmacro has been extended to + + (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...) + +DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The +declaration specifiers supported are: + +(indent INDENT) + Set NAME's `lisp-indent-function' property to INDENT. + +(edebug DEBUG) + Set NAME's `edebug-form-spec' property to DEBUG. (This is + equivalent to writing a `def-edebug-spec' for the macro. + ++++ +** The functions all-completions and try-completion now accept lists +of strings as well as hash-tables additionally to alists, obarrays +and functions. Furthermore, the function `test-completion' is now +exported to Lisp. The keys in alists and hash tables may be either +strings or symbols, which are automatically converted with to strings. +++ ** The new macro dynamic-completion-table supports using functions @@ -3477,108 +4133,43 @@ `lazy-completion-table' must be used to initialize the value of VAR. +++ -** `minor-mode-list' now holds a list of minor mode commands. - -+++ -** The new function `modify-all-frames-parameters' modifies parameters -for all (existing and future) frames. - -+++ -** `sit-for' can now be called with args (SECONDS &optional NODISP). - -+++ -** New standard font-lock face `font-lock-preprocessor-face'. - -+++ -** The macro `with-syntax-table' does not copy the table any more. - -+++ -** The variable `face-font-rescale-alist' specifies how much larger -(or smaller) font we should use. For instance, if the value is -'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10 -point, we actually use a font of 13 point if the font matches -SOME-FONTNAME-PATTERN. - -+++ -** The function `number-sequence' returns a list of equally-separated -numbers. For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). -By default, the separation is 1, but you can specify a different separation -as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5). - -+++ -** `file-chase-links' now takes an optional second argument LIMIT which -specifies the maximum number of links to chase through. If after that -many iterations the file name obtained is still a symbolic link, -`file-chase-links' returns it anyway. - ---- -** `set-fontset-font', `fontset-info', `fontset-font' now operate on -the default fontset if the argument NAME is nil.. - -+++ -** The escape sequence \s is now interpreted as a SPACE character, -unless it is followed by a `-' in a character constant (e.g. ?\s-A), -in which case it is still interpreted as the super modifier. -In strings, \s is always interpreted as a space. - -+++ -** New function `set-process-filter-multibyte' sets the multibyteness -of a string given to a process's filter. - -+++ -** New function `process-filter-multibyte-p' returns t if -a string given to a process's filter is multibyte. - -+++ -** A filter function of a process is called with a multibyte string if -the filter's multibyteness is t. That multibyteness is decided by the -value of `default-enable-multibyte-characters' when the process is -created and can be changed later by `set-process-filter-multibyte'. - -+++ -** If a process's coding system is raw-text or no-conversion and its -buffer is multibyte, the output of the process is at first converted -to multibyte by `string-to-multibyte' then inserted in the buffer. -Previously, it was converted to multibyte by `string-as-multibyte', -which was not compatible with the behavior of file reading. - -+++ -** New function `string-to-multibyte' converts a unibyte string to a -multibyte string with the same individual character codes. - -+++ -** New variables `gc-elapsed' and `gcs-done' provide extra information -on garbage collection. - -+++ -** New function `decode-coding-inserted-region' decodes a region as if -it is read from a file without decoding. - -+++ -** New function `locale-info' accesses locale information. - -+++ -** `save-selected-window' now saves and restores the selected window -of every frame. This way, it restores everything that can be changed -by calling `select-window'. - ---- -** `easy-menu-define' now allows you to use nil for the symbol name -if you don't need to give the menu a name. If you install the menu -into other keymaps right away (MAPS is non-nil), it usually doesn't -need to have a name. - +** `load-history' can now have elements of the form (t . FUNNAME), +which means FUNNAME was previously defined as an autoload (before the +current file redefined it). + ++++ +** `load-history' now records (defun . FUNNAME) when a function is +defined. For a variable, it records just the variable name. + +--- +** The variable `recursive-load-depth-limit' has been deleted. +Emacs now signals an error if the same file is loaded with more +than 3 levels of nesting. + ++++ +** The function symbol-file can now search specifically for function or +variable definitions. + ++++ +** `provide' and `featurep' now accept an optional second argument +to test/provide subfeatures. Also `provide' now checks `after-load-alist' +and runs any code associated with the provided feature. + ++++ +** `declare' is now a macro. This change was made mostly for +documentation purposes and should have no real effect on Lisp code. + ++++ ** Byte compiler changes: ---- -*** `(featurep 'xemacs)' is treated by the compiler as nil. This -helps to avoid noisy compiler warnings in code meant to run under both -Emacs and XEmacs and may sometimes make the result significantly more -efficient. Since byte code from recent versions of XEmacs won't -generally run in Emacs and vice versa, this optimization doesn't lose -you anything. - -+++ +*** The byte-compiler now displays the actual line and character +position of errors, where possible. Additionally, the form of its +warning and error messages have been brought more in line with the +output of other GNU tools. + +*** The new macro `with-no-warnings' suppresses all compiler warnings +inside its body. In terms of execution, it is equivalent to `progn'. + *** You can avoid warnings for possibly-undefined symbols with a simple convention that the compiler understands. (This is mostly useful in code meant to be portable to different Emacs versions.) @@ -3595,44 +4186,19 @@ macro expansion), but such tests may be nested. Note that `when' and `unless' expand to `if', but `cond' doesn't. -+++ -*** The new macro `with-no-warnings' suppresses all compiler warnings -inside its body. In terms of execution, it is equivalent to `progn'. - -+++ -** The new translation table `translation-table-for-input' -is used for customizing self-insertion. The character to -be inserted is translated through it. - -+++ -** `load-history' can now have elements of the form (t . FUNNAME), -which means FUNNAME was previously defined as an autoload (before the -current file redefined it). - -+++ -** `load-history' now records (defun . FUNNAME) when a function is -defined. For a variable, it records just the variable name. - -+++ -** New Lisp library testcover.el works with edebug to help you determine -whether you've tested all your Lisp code. Function testcover-start -instruments all functions in a given file. Then test your code. Function -testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to -show where coverage is lacking. Command testcover-next-mark (bind it to -a key!) will move point forward to the next spot that has a splotch. - -*** Normally, a red splotch indicates the form was never completely evaluated; -a brown splotch means it always evaluated to the same value. The red -splotches are skipped for forms that can't possibly complete their evaluation, -such as `error'. The brown splotches are skipped for forms that are expected -to always evaluate to the same value, such as (setq x 14). - -*** For difficult cases, you can add do-nothing macros to your code to help -out the test coverage tool. The macro `noreturn' suppresses a red splotch. -It is an error if the argument to `noreturn' does return. The macro 1value -suppresses a brown splotch for its argument. This macro is a no-op except -during test-coverage -- then it signals an error if the argument actually -returns differing values. +*** `(featurep 'xemacs)' is treated by the compiler as nil. This +helps to avoid noisy compiler warnings in code meant to run under both +Emacs and XEmacs and may sometimes make the result significantly more +efficient. Since byte code from recent versions of XEmacs won't +generally run in Emacs and vice versa, this optimization doesn't lose +you anything. + +*** The local variable `no-byte-compile' in elisp files is now obeyed. + +--- +** When a Lisp file uses CL functions at run-time, compiling the file +now issues warnings about these calls, unless the file performs +(require 'cl) when loaded. +++ ** New function unsafep returns nil if the given Lisp form can't possibly @@ -3640,66 +4206,36 @@ unsafe (calls dangerous function, alters global variable, etc). +++ -** The new variable `print-continuous-numbering', when non-nil, says -that successive calls to print functions should use the same -numberings for circular structure references. This is only relevant -when `print-circle' is non-nil. - -When you bind `print-continuous-numbering' to t, you should -also bind `print-number-table' to nil. - -+++ -** When using non-toolkit scroll bars with the default width, -the scroll-bar-width frame parameter value is nil. - -+++ -** The new function copy-abbrev-table returns a new abbrev table that -is a copy of a given abbrev table. - -+++ -** The option --script FILE runs Emacs in batch mode and loads FILE. -It is useful for writing Emacs Lisp shell script files, because they -can start with this line: - - #!/usr/bin/emacs --script - -+++ -** The option --directory DIR now modifies `load-path' immediately. -Directories are added to the front of `load-path' in the order they -appear on the command line. For example, with this command line: - - emacs -batch -L .. -L /tmp --eval "(require 'foo)" - -Emacs looks for library `foo' in the parent directory, then in /tmp, then -in the other directories in `load-path'. (-L is short for --directory.) - -+++ -** A function's docstring can now hold the function's usage info on -its last line. It should match the regexp "\n\n(fn.*)\\'". - ---- -** New CCL functions `lookup-character' and `lookup-integer' access -hash tables defined by the Lisp function `define-translation-hash-table'. - -+++ -** The new function `minibufferp' returns non-nil if its optional buffer -argument is a minibuffer. If the argument is omitted it defaults to -the current buffer. - -+++ ** There is a new Warnings facility; see the functions `warn' and `display-warning'. -+++ -** The functions all-completions and try-completion now accept lists -of strings as well as hash-tables additionally to alists, obarrays -and functions. Furthermore, the function `test-completion' is now -exported to Lisp. The keys in alists and hash tables may be either -strings or symbols, which are automatically converted with to strings. - ---- -** When pure storage overflows while dumping, Emacs now prints how -much pure storage it will approximately need. +--- +** VC changes for backends: +*** (vc-switches BACKEND OPERATION) is a new function for use by backends. +*** The new `find-version' backend function replaces the `destfile' +parameter of the `checkout' backend function. +Old code still works thanks to a default `find-version' behavior that +uses the old `destfile' parameter. + ++++ +** Already true in Emacs 21.1, but not emphasized clearly enough: + +Multibyte buffers can now faithfully record all 256 character codes +from 0 to 255. As a result, most of the past reasons to use unibyte +buffers no longer exist. We only know of three reasons to use them +now: + +1. If you prefer to use unibyte text all of the time. + +2. For reading files into temporary buffers, when you want to avoid +the time it takes to convert the format. + +3. For binary files where format conversion would be pointless and +wasteful. + +--- +** set-buffer-file-coding-system now takes an additional argument, +NOMODIFY. If it is non-nil, it means don't mark the buffer modified. +++ ** The new variable `auto-coding-functions' lets you specify functions @@ -3711,6 +4247,69 @@ ** The new function `merge-coding-systems' fills in unspecified aspects of one coding system from another coding system. +--- +** New coding system property `mime-text-unsuitable' indicates that +the coding system's `mime-charset' is not suitable for MIME text +parts, e.g. utf-16. + ++++ +** New function `decode-coding-inserted-region' decodes a region as if +it is read from a file without decoding. + ++++ +** Function `translate-region' accepts also a char-table as TABLE +argument. + ++++ +** The new translation table `translation-table-for-input' +is used for customizing self-insertion. The character to +be inserted is translated through it. + +--- +** New CCL functions `lookup-character' and `lookup-integer' access +hash tables defined by the Lisp function `define-translation-hash-table'. + ++++ +** The flags, width, and precision options for %-specifications in function +`format' are now documented. Some flags that were accepted but not +implemented (such as "*") are no longer accepted. + +--- +** New function `redirect-debugging-output' can be used to redirect +debugging output on the stderr file handle to a file. + ++++ +** `makehash' is now obsolete. Use `make-hash-table' instead. + ++++ +** The macro `with-syntax-table' does not copy the table any more. + ++++ +** New variables `gc-elapsed' and `gcs-done' provide extra information +on garbage collection. + ++++ +** New function `locale-info' accesses locale information. + ++++ +** The new variable `print-continuous-numbering', when non-nil, says +that successive calls to print functions should use the same +numberings for circular structure references. This is only relevant +when `print-circle' is non-nil. + +When you bind `print-continuous-numbering' to t, you should +also bind `print-number-table' to nil. + +--- +** When pure storage overflows while dumping, Emacs now prints how +much pure storage it will approximately need. + ++++ +** File local variables. + +A file local variables list cannot specify a string with text +properties--any specified text properties are discarded. + +++ ** The variable `safe-local-eval-forms' specifies a list of forms that are ok to evaluate when they appear in an `eval' local variables @@ -3730,66 +4329,6 @@ confirmation as before. +++ -** Controlling the default left and right fringe widths. - -The default left and right fringe widths for all windows of a frame -can now be controlled by setting the `left-fringe' and `right-fringe' -frame parameters to an integer value specifying the width in pixels. -Setting the width to 0 effectively removes the corresponding fringe. - -The actual default fringe widths for the frame may deviate from the -specified widths, since the combined fringe widths must match an -integral number of columns. The extra width is distributed evenly -between the left and right fringe. For force a specific fringe width, -specify the width as a negative integer (if both widths are negative, -only the left fringe gets the specified width). - -Setting the width to nil (the default), restores the default fringe -width which is the minimum number of pixels necessary to display any -of the currently defined fringe bitmaps. The width of the built-in -fringe bitmaps is 8 pixels. - -+++ -** Per-window fringes settings - -Windows can now have their own individual fringe widths and position -settings. - -To control the fringe widths of a window, either set the buffer-local -variables `left-fringe-width', `right-fringe-width', or call -`set-window-fringes'. - -To control the fringe position in a window, that is, whether fringes -are positioned between the display margins and the window's text area, -or at the edges of the window, either set the buffer-local variable -`fringes-outside-margins' or call `set-window-fringes'. - -The function `window-fringes' can be used to obtain the current -settings. To make `left-fringe-width', `right-fringe-width', and -`fringes-outside-margins' take effect, you must set them before -displaying the buffer in a window, or use `set-window-buffer' to force -an update of the display margins. - -+++ -** Per-window vertical scroll-bar settings - -Windows can now have their own individual scroll-bar settings -controlling the width and position of scroll-bars. - -To control the scroll-bar of a window, either set the buffer-local -variables `scroll-bar-mode' and `scroll-bar-width', or call -`set-window-scroll-bars'. The function `window-scroll-bars' can be -used to obtain the current settings. To make `scroll-bar-mode' and -`scroll-bar-width' take effect, you must set them before displaying -the buffer in a window, or use `set-window-buffer' to force an update -of the display margins. - -+++ -** The function `set-window-buffer' now has an optional third argument -KEEP-MARGINS which will preserve the window's current margin, fringe, -and scroll-bar settings if non-nil. - -+++ ** Renamed hooks to better follow the naming convention: find-file-hooks to find-file-hook, find-file-not-found-hooks to find-file-not-found-functions, @@ -3805,500 +4344,14 @@ name remains available as an alias, but has been marked obsolete. +++ -** The `read-file-name' function now takes an additional argument which -specifies a predicate which the file name read must satify. The -new variable `read-file-name-predicate' contains the predicate argument -while reading the file name from the minibuffer; the predicate in this -variable is used by read-file-name-internal to filter the completion list. - ---- -** The new variable `read-file-name-function' can be used by lisp code -to override the internal read-file-name function. - -+++ -** The new variable `read-file-name-completion-ignore-case' specifies -whether completion ignores case when reading a file name with the -`read-file-name' function. - -+++ -** The new function `read-directory-name' can be used instead of -`read-file-name' to read a directory name; when used, completion -will only show directories. - -+++ ** The new function `file-remote-p' tests a file name and returns non-nil if it specifies a remote file (one that Emacs accesses using its own special methods and not directly through the file system). The value in that case is an identifier for the remote file system. ---- -** When a Lisp file uses CL functions at run-time, compiling the file -now issues warnings about these calls, unless the file performs -(require 'cl) when loaded. - -+++ -** The `defmacro' form may contain declarations specifying how to -indent the macro in Lisp mode and how to debug it with Edebug. The -syntax of defmacro has been extended to - - (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...) - -DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The -declaration specifiers supported are: - -(indent INDENT) - Set NAME's `lisp-indent-function' property to INDENT. - -(edebug DEBUG) - Set NAME's `edebug-form-spec' property to DEBUG. (This is - equivalent to writing a `def-edebug-spec' for the macro. - -+++ -** Interactive commands can be remapped through keymaps. - -This is an alternative to using defadvice or substitute-key-definition -to modify the behavior of a key binding using the normal keymap -binding and lookup functionality. - -When a key sequence is bound to a command, and that command is -remapped to another command, that command is run instead of the -original command. - -Example: -Suppose that minor mode my-mode has defined the commands -my-kill-line and my-kill-word, and it wants C-k (and any other key -bound to kill-line) to run the command my-kill-line instead of -kill-line, and likewise it wants to run my-kill-word instead of -kill-word. - -Instead of rebinding C-k and the other keys in the minor mode map, -command remapping allows you to directly map kill-line into -my-kill-line and kill-word into my-kill-word through the minor mode -map using define-key: - - (define-key my-mode-map [remap kill-line] 'my-kill-line) - (define-key my-mode-map [remap kill-word] 'my-kill-word) - -Now, when my-mode is enabled, and the user enters C-k or M-d, -the commands my-kill-line and my-kill-word are run. - -Notice that only one level of remapping is supported. In the above -example, this means that if my-kill-line is remapped to other-kill, -then C-k still runs my-kill-line. - -The following changes have been made to provide command remapping: - -- Command remappings are defined using `define-key' with a prefix-key - `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD - to definition DEF in keymap MAP. The definition is not limited to - another command; it can be anything accepted for a normal binding. - -- The new function `command-remapping' returns the binding for a - remapped command in the current keymaps, or nil if not remapped. - -- key-binding now remaps interactive commands unless the optional - third argument NO-REMAP is non-nil. - -- where-is-internal now returns nil for a remapped command (e.g. - kill-line if my-mode is enabled), and the actual key binding for - the command it is remapped to (e.g. C-k for my-kill-line). - It also has a new optional fifth argument, NO-REMAP, which inhibits - remapping if non-nil (e.g. it returns C-k for kill-line and - <kill-line> for my-kill-line). - -- The new variable `this-original-command' contains the original - command before remapping. It is equal to `this-command' when the - command was not remapped. - -+++ -** New variable emulation-mode-map-alists. - -Lisp packages using many minor mode keymaps can now maintain their own -keymap alist separate from minor-mode-map-alist by adding their keymap -alist to this list. - -+++ -** Atomic change groups. - -To perform some changes in the current buffer "atomically" so that -they either all succeed or are all undone, use `atomic-change-group' -around the code that makes changes. For instance: - - (atomic-change-group - (insert foo) - (delete-region x y)) - -If an error (or other nonlocal exit) occurs inside the body of -`atomic-change-group', it unmakes all the changes in that buffer that -were during the execution of the body. The change group has no effect -on any other buffers--any such changes remain. - -If you need something more sophisticated, you can directly call the -lower-level functions that `atomic-change-group' uses. Here is how. - -To set up a change group for one buffer, call `prepare-change-group'. -Specify the buffer as argument; it defaults to the current buffer. -This function returns a "handle" for the change group. You must save -the handle to activate the change group and then finish it. - -Before you change the buffer again, you must activate the change -group. Pass the handle to `activate-change-group' afterward to -do this. - -After you make the changes, you must finish the change group. You can -either accept the changes or cancel them all. Call -`accept-change-group' to accept the changes in the group as final; -call `cancel-change-group' to undo them all. - -You should use `unwind-protect' to make sure the group is always -finished. The call to `activate-change-group' should be inside the -`unwind-protect', in case the user types C-g just after it runs. -(This is one reason why `prepare-change-group' and -`activate-change-group' are separate functions.) Once you finish the -group, don't use the handle again--don't try to finish the same group -twice. - -To make a multibuffer change group, call `prepare-change-group' once -for each buffer you want to cover, then use `nconc' to combine the -returned values, like this: - - (nconc (prepare-change-group buffer-1) - (prepare-change-group buffer-2)) - -You can then activate the multibuffer change group with a single call -to `activate-change-group', and finish it with a single call to -`accept-change-group' or `cancel-change-group'. - -Nested use of several change groups for the same buffer works as you -would expect. Non-nested use of change groups for the same buffer -will lead to undesirable results, so don't let it happen; the first -change group you start for any given buffer should be the last one -finished. - -+++ -** New variable char-property-alias-alist. - -This variable allows you to create alternative names for text -properties. It works at the same level as `default-text-properties', -although it applies to overlays as well. This variable was introduced -to implement the `font-lock-face' property. - -+++ -** New special text property `font-lock-face'. - -This property acts like the `face' property, but it is controlled by -M-x font-lock-mode. It is not, strictly speaking, a builtin text -property. Instead, it is implemented inside font-core.el, using the -new variable `char-property-alias-alist'. - -+++ -** New function remove-list-of-text-properties. - -The new function `remove-list-of-text-properties' is almost the same -as `remove-text-properties'. The only difference is that it takes -a list of property names as argument rather than a property list. - -+++ -** New function insert-for-yank. - -This function normally works like `insert' but removes the text -properties in the `yank-excluded-properties' list. However, if the -inserted text has a `yank-handler' text property on the first -character of the string, the insertion of the text may be modified in -a number of ways. See the description of `yank-handler' below. - -+++ -** New function insert-buffer-substring-as-yank. - -This function works like `insert-buffer-substring', but removes the -text properties in the `yank-excluded-properties' list. - -+++ -** New function insert-buffer-substring-no-properties. - -This function is like insert-buffer-substring, but removes all -text properties from the inserted substring. - -+++ -** New `yank-handler' text property may be used to control how -previously killed text on the kill-ring is reinserted. - -The value of the yank-handler property must be a list with one to four -elements with the following format: - (FUNCTION PARAM NOEXCLUDE UNDO). - -The `insert-for-yank' function looks for a yank-handler property on -the first character on its string argument (typically the first -element on the kill-ring). If a yank-handler property is found, -the normal behavior of `insert-for-yank' is modified in various ways: - - When FUNCTION is present and non-nil, it is called instead of `insert' -to insert the string. FUNCTION takes one argument--the object to insert. - If PARAM is present and non-nil, it replaces STRING as the object -passed to FUNCTION (or `insert'); for example, if FUNCTION is -`yank-rectangle', PARAM should be a list of strings to insert as a -rectangle. - If NOEXCLUDE is present and non-nil, the normal removal of the -yank-excluded-properties is not performed; instead FUNCTION is -responsible for removing those properties. This may be necessary -if FUNCTION adjusts point before or after inserting the object. - If UNDO is present and non-nil, it is a function that will be called -by `yank-pop' to undo the insertion of the current object. It is -called with two arguments, the start and end of the current region. -FUNCTION may set `yank-undo-function' to override the UNDO value. - -+++ -*** The functions kill-new, kill-append, and kill-region now have an -optional argument to specify the yank-handler text property to put on -the killed text. - -+++ -*** The function yank-pop will now use a non-nil value of the variable -`yank-undo-function' (instead of delete-region) to undo the previous -yank or yank-pop command (or a call to insert-for-yank). The function -insert-for-yank automatically sets that variable according to the UNDO -element of the string argument's yank-handler text property if present. - -+++ -** New function display-supports-face-attributes-p may be used to test -whether a given set of face attributes is actually displayable. - -A new predicate `supports' has also been added to the `defface' face -specification language, which can be used to do this test for faces -defined with defface. - ---- -** The function face-differs-from-default-p now truly checks whether the -given face displays differently from the default face or not (previously -it did only a very cursory check). - -+++ -** face-attribute, face-foreground, face-background, and face-stipple now -accept a new optional argument, INHERIT, which controls how face -inheritance is used when determining the value of a face attribute. - -+++ -** New functions face-attribute-relative-p and merge-face-attribute -help with handling relative face attributes. - -+++ -** The priority of faces in an :inherit attribute face-list is reversed. -If a face contains an :inherit attribute with a list of faces, earlier -faces in the list override later faces in the list; in previous releases -of Emacs, the order was the opposite. This change was made so that -:inherit face-lists operate identically to face-lists in text `face' -properties. - -+++ -** Enhancements to process support - -*** Function list-processes now has an optional argument; if non-nil, -only the processes whose query-on-exit flag is set are listed. - -*** New set-process-query-on-exit-flag and process-query-on-exit-flag -functions. The existing process-kill-without-query function is still -supported, but new code should use the new functions. - -*** Function signal-process now accepts a process object or process -name in addition to a process id to identify the signalled process. - -*** Processes now have an associated property list where programs can -maintain process state and other per-process related information. - -The new functions process-get and process-put are used to access, add, -and modify elements on this property list. - -The new low-level functions process-plist and set-process-plist are -used to access and replace the entire property list of a process. - -*** Function accept-process-output now has an optional fourth arg -`just-this-one'. If non-nil, only output from the specified process -is handled, suspending output from other processes. If value is an -integer, also inhibit running timers. This feature is generally not -recommended, but may be necessary for specific applications, such as -speech synthesis. - ---- -*** Adaptive read buffering of subprocess output. - -On some systems, when emacs reads the output from a subprocess, the -output data is read in very small blocks, potentially resulting in -very poor performance. This behavior can be remedied to some extent -by setting the new variable process-adaptive-read-buffering to a -non-nil value (the default), as it will automatically delay reading -from such processes, to allowing them to produce more output before -emacs tries to read it. - -+++ -** Enhanced networking support. - -*** There is a new `make-network-process' function which supports -opening of stream and datagram connections to a server, as well as -create a stream or datagram server inside emacs. - -- A server is started using :server t arg. -- Datagram connection is selected using :type 'datagram arg. -- A server can open on a random port using :service t arg. -- Local sockets are supported using :family 'local arg. -- Non-blocking connect is supported using :nowait t arg. -- The process' property list may be initialized using :plist PLIST arg; - a copy of the server process' property list is automatically inherited - by new client processes created to handle incoming connections. - -To test for the availability of a given feature, use featurep like this: - (featurep 'make-network-process '(:type datagram)) - -*** Original open-network-stream is now emulated using make-network-process. - -*** New function open-network-stream-nowait. - -This function initiates a non-blocking connect and returns immediately -without waiting for the connection to be established. It takes the -filter and sentinel functions as arguments; when the non-blocking -connect completes, the sentinel is called with a status string -matching "open" or "failed". - -*** New function open-network-stream-server. - -This function creates a network server process for a TCP service. -When a client connects to the specified service, a new subprocess -is created to handle the new connection, and the sentinel function -is called for the new process. - -*** New functions process-datagram-address and set-process-datagram-address. - -These functions are used with datagram-based network processes to get -and set the current address of the remote partner. - -*** New function format-network-address. - -This function reformats the lisp representation of a network address -to a printable string. For example, an IP address A.B.C.D and port -number P is represented as a five element vector [A B C D P], and the -printable string returned for this vector is "A.B.C.D:P". See the doc -string for other formatting options. - -*** By default, the function process-contact still returns (HOST SERVICE) -for a network process. Using the new optional KEY arg, the complete list -of network process properties or a specific property can be selected. - -Using :local and :remote as the KEY, the address of the local or -remote end-point is returned. An Inet address is represented as a 5 -element vector, where the first 4 elements contain the IP address and -the fifth is the port number. - -*** Network processes can now be stopped and restarted with -`stop-process' and `continue-process'. For a server process, no -connections are accepted in the stopped state. For a client process, -no input is received in the stopped state. - -*** New function network-interface-list. - -This function returns a list of network interface names and their -current network addresses. - -*** New function network-interface-info. - -This function returns the network address, hardware address, current -status, and other information about a specific network interface. - -+++ -** New function copy-tree. - -+++ -** New function substring-no-properties. - -+++ -** New function minibuffer-selected-window. - -+++ -** New function `call-process-shell-command'. - -+++ -** New function `process-file'. - -This is similar to `call-process', but obeys file handlers. The file -handler is chosen based on default-directory. - ---- -** The dummy function keys made by easymenu -are now always lower case. If you specify the -menu item name "Ada", for instance, it uses `ada' -as the "key" bound by that key binding. - -This is relevant only if Lisp code looks for -the bindings that were made with easymenu. - -+++ -** The function `commandp' takes an additional optional -argument. If it is non-nil, then `commandp' checks -for a function that could be called with `call-interactively', -and does not return t for keyboard macros. - ---- -** master-mode.el implements a minor mode for scrolling a slave -buffer without leaving your current buffer, the master buffer. - -It can be used by sql.el, for example: the SQL buffer is the master -and its SQLi buffer is the slave. This allows you to scroll the SQLi -buffer containing the output from the SQL buffer containing the -commands. - -This is how to use sql.el and master.el together: the variable -sql-buffer contains the slave buffer. It is a local variable in the -SQL buffer. - -(add-hook 'sql-mode-hook - (function (lambda () - (master-mode t) - (master-set-slave sql-buffer)))) -(add-hook 'sql-set-sqli-hook - (function (lambda () - (master-set-slave sql-buffer)))) - -+++ -** File local variables. - -A file local variables list cannot specify a string with text -properties--any specified text properties are discarded. - -+++ -** New function window-body-height. - -This is like window-height but does not count the mode line -or the header line. - -+++ -** New function format-mode-line. - -This returns the mode-line or header-line of the selected (or a -specified) window as a string with or without text properties. - -+++ -** New function `safe-get'. - -This function is like `get', but never signals an error for -a malformed symbol property list. - -+++ -** New function `safe-plist-get'. - -This function is like `plist-get', but never signals an error for -a malformed property list. - -+++ -** New functions `lax-plist-get' and `lax-plist-put'. - -These functions are like `plist-get' and `plist-put' except that they -compare the property name using `equal' rather than `eq'. - -+++ -** New function `tool-bar-local-item-from-menu' - -The `tool-bar-add-item-from-menu' must not be used (as previously -recommended) for making entries in the tool bar for local keymaps. -Instead, use the function `tool-bar-local-item-from-menu', which lets -you specify the map to use as an argument. ++++ +** Functions `get' and `plist-get' no longer signals an error for +a malformed property list. They also detect cyclic lists. +++ ** The function `atan' now accepts an optional second argument. @@ -4308,19 +4361,10 @@ equivalent to the standard C library function `atan2'.) +++ -** You can now make a window as short as one line. - -A window that is just one line tall does not display either a mode -line or a header line, even if the variables `mode-line-format' and -`header-line-format' call for them. A window that is two lines tall -cannot display both a mode line and a header line at once; if the -variables call for both, only the mode line actually appears. - -+++ -** The new frame parameter `tty-color-mode' specifies the mode to use -for color support on character terminal frames. Its value can be a -number of colors to support, or a symbol. See the Emacs Lisp -Reference manual for more detailed documentation. +** New function format-mode-line. + +This returns the mode-line or header-line of the selected (or a +specified) window as a string with or without text properties. +++ ** The new mode-line construct `(:propertize ELT PROPS...)' can be @@ -4343,41 +4387,6 @@ cl-indent package. See the new user option `lisp-backquote-indentation'. +++ -** Already true in Emacs 21.1, but not emphasized clearly enough: - -Multibyte buffers can now faithfully record all 256 character codes -from 0 to 255. As a result, most of the past reasons to use unibyte -buffers no longer exist. We only know of three reasons to use them -now: - -1. If you prefer to use unibyte text all of the time. - -2. For reading files into temporary buffers, when you want to avoid -the time it takes to convert the format. - -3. For binary files where format conversion would be pointless and -wasteful. - -+++ -** If text has a `keymap' property, that keymap takes precedence -over minor mode keymaps. - -+++ -** A hex escape in a string forces the string to be multibyte. -An octal escape makes it unibyte. - -+++ -** At the end of a command, point moves out from within invisible -text, in the same way it moves out from within text covered by an -image or composition property. - -This makes it generally unnecessary to mark invisible text as intangible. -This is particularly good because the intangible property often has -unexpected side-effects since the property applies to everything -(including `goto-char', ...) whereas this new code is only run after -post-command-hook and thus does not care about intermediate states. - -+++ ** field-beginning and field-end now accept an additional optional argument, LIMIT. @@ -4389,44 +4398,6 @@ flag. --- -** Support for Mocklisp has been removed. - ---- -** The function insert-string is now obsolete. - ---- -** The precedence of file-name-handlers has been changed. -Instead of blindly choosing the first handler that matches, -find-file-name-handler now gives precedence to a file-name handler -that matches near the end of the file name. More specifically, the -handler whose (match-beginning 0) is the largest is chosen. -In case of ties, the old "first matched" rule applies. - ---- -** Dense keymaps now handle inheritance correctly. -Previously a dense keymap would hide all of the simple-char key -bindings of the parent keymap. - ---- -** jit-lock obeys a new text-property `jit-lock-defer-multiline'. -If a piece of text with that property gets contextually refontified -(see jit-lock-defer-contextually), then all of that text will -be refontified. This is useful when the syntax of a textual element -depends on text several lines further down (and when font-lock-multiline -is not appropriate to solve that problem). For example in Perl: - - s{ - foo - }{ - bar - }e - -Adding/removing the last `e' changes the `bar' from being a piece of -text to being a piece of code, so you'd put a jit-lock-defer-multiline -property over the second half of the command to force (deferred) -refontification of `bar' whenever the `e' is added/removed. - ---- ** describe-vector now takes a second argument `describer' which is called to print the entries' values. It defaults to `princ'. @@ -4434,137 +4405,33 @@ ** defcustom and other custom declarations now use a default group (the last prior group defined in the same file) when no :group was given. +--- +** The new customization type `float' specifies numbers with floating +point (no integers are allowed). + +++ ** emacsserver now runs pre-command-hook and post-command-hook when it receives a request from emacsclient. --- -** The variable `recursive-load-depth-limit' has been deleted. -Emacs now signals an error if the same file is loaded with more -than 3 levels of nesting. - ---- -** If a major mode function has a non-nil `no-clone-indirect' -property, `clone-indirect-buffer' signals an error if you use -it in that buffer. - ---- -** In `replace-match', the replacement text no longer inherits -properties from surrounding text. - -+++ -** The list returned by `(match-data t)' now has the buffer as a final -element, if the last match was on a buffer. `set-match-data' -accepts such a list for restoring the match state. - -+++ -** New function `buffer-local-value'. - -This function returns the buffer-local binding of VARIABLE (a symbol) -in buffer BUFFER. If VARIABLE does not have a buffer-local binding in -buffer BUFFER, it returns the default value of VARIABLE instead. - ---- ** New function `text-clone-create'. Text clones are chunks of text that are kept identical by transparently propagating changes from one clone to the other. +++ -** font-lock can manage arbitrary text-properties beside `face'. -*** the FACENAME returned in font-lock-keywords can be a list -of the form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set -other properties than `face'. -*** font-lock-extra-managed-props can be set to make sure those extra -properties are automatically cleaned up by font-lock. - ---- -** The special treatment of faces whose names are of the form `fg:COLOR' -or `bg:COLOR' has been removed. Lisp programs should use the -`defface' facility for defining faces with specific colors, or use -the feature of specifying the face attributes :foreground and :background -directly in the `face' property instead of using a named face. - -+++ -** The new function `run-mode-hooks' and the new macro `delay-mode-hooks' -are used by define-derived-mode to make sure the mode hook for the -parent mode is run at the end of the child mode. - -+++ -** define-minor-mode now accepts arbitrary additional keyword arguments -and simply passes them to defcustom, if applicable. - -+++ -** define-derived-mode by default creates a new empty abbrev table. -It does not copy abbrevs from the parent mode's abbrev table. - -+++ -** `provide' and `featurep' now accept an optional second argument -to test/provide subfeatures. Also `provide' now checks `after-load-alist' -and runs any code associated with the provided feature. - -+++ -** Functions `file-name-sans-extension' and `file-name-extension' now -ignore the leading dots in file names, so that file names such as -`.emacs' are treated as extensionless. - -+++ ** Functions `user-uid' and `user-real-uid' now return floats if the user UID doesn't fit in a Lisp integer. Function `user-full-name' accepts a float as UID parameter. ---- -** `define-key-after' now accepts keys longer than 1. - -+++ -** The local variable `no-byte-compile' in elisp files is now obeyed. - -+++ -** The Emacs Lisp byte-compiler now displays the actual line and -character position of errors, where possible. Additionally, the form -of its warning and error messages have been brought more in line with -the output of other GNU tools. - -+++ -** New functions `keymap-prompt' and `current-active-maps'. - ---- -** New function `describe-buffer-bindings'. - +++ ** New vars `exec-suffixes' and `load-suffixes' used when searching for an executable resp. an elisp file. +++ -** Variable aliases have been implemented: - -*** defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] - -This function defines the symbol ALIAS-VAR as a variable alias for -symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR -returns the value of BASE-VAR, and changing the value of ALIAS-VAR -changes the value of BASE-VAR. - -DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has -the same documentation as BASE-VAR. - -*** indirect-variable VARIABLE - -This function returns the variable at the end of the chain of aliases -of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not -defined as an alias, the function returns VARIABLE. - -It might be noteworthy that variables aliases work for all kinds of -variables, including buffer-local and frame-local variables. - -+++ ** Functions from `post-gc-hook' are run at the end of garbage collection. The hook is run with GC inhibited, so use it with care. +++ -** If the second argument to `copy-file' is the name of a directory, -the file is copied to that directory instead of signaling an error. - -+++ ** The variables most-positive-fixnum and most-negative-fixnum hold the largest and smallest possible integer values. @@ -4574,30 +4441,194 @@ formerly used for that purpose is now an alias for locale-coding-system. --- -** Functions y-or-n-p, read-char, read-key-sequence and the like, that -display a prompt but don't use the minibuffer, now display the prompt -using the text properties (esp. the face) of the prompt string. - ---- ** New function x-send-client-message sends a client message when running under X. -+++ -** Arguments for remove-overlays are now optional, so that you can remove -all overlays in the buffer by just calling (remove-overlay). +--- +** easy-mmode-define-global-mode has been renamed to +define-global-minor-mode. The old name remains as an alias. + +--- +** To manipulate the File menu using easy-menu, you must specify the +proper name "file". In previous Emacs versions, you had to specify +"files", even though the menu item itself was changed to say "File" +several versions ago. + +--- +** The dummy function keys made by easymenu are now always lower case. +If you specify the menu item name "Ada", for instance, it uses `ada' +as the "key" bound by that key binding. + +This is relevant only if Lisp code looks for the bindings that were +made with easymenu. + +--- +** `easy-menu-define' now allows you to use nil for the symbol name +if you don't need to give the menu a name. If you install the menu +into other keymaps right away (MAPS is non-nil), it usually doesn't +need to have a name. + +--- +** rx.el has new corresponding `symbol-end' and `symbol-start' elements. + +** New functions, macros, and commands: + ++++ +*** The new function `assoc-string' replaces `assoc-ignore-case' and +`assoc-ignore-representation', which are still available, but have +been declared obsolete. + ++++ +*** The new function `buffer-local-value' returns the buffer-local +binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not +have a buffer-local binding in buffer BUFFER, it returns the default +value of VARIABLE instead. + ++++ +*** The new function `called-interactively-p' does what many people +have mistakenly believed `interactive-p' did: it returns t if the +calling function was called through `call-interactively'. This should +only be used when you cannot add a new "interactive" argument to the +command. + +*** The new function copy-abbrev-table returns a new abbrev table that +is a copy of a given abbrev table. + ++++ +*** New function copy-tree makes a copy of a tree, recursively copying +both cars and cdrs. + ++++ +*** New function `delete-dups' destructively removes `equal' +duplicates from a list. Of several `equal' occurrences of an element +in the list, the first one is kept. + ++++ +*** The new function `filter-buffer-substring' extracts a buffer +substring, passes it through a set of filter functions, and returns +the filtered substring. It is used instead of `buffer-substring' or +`delete-and-extract-region' when copying text into a user-accessible +data structure, like the kill-ring, X clipboard, or a register. The +list of filter function is specified by the new variable +`buffer-substring-filters'. For example, Longlines mode uses +`buffer-substring-filters' to remove soft newlines from the copied +text. + ++++ +*** New functions frame-current-scroll-bars and window-current-scroll-bars. + +These functions return the current locations of the vertical and +horizontal scroll bars in a frame or window. + ++++ +*** The new primitive `get-internal-run-time' returns the processor +run time used by Emacs since start-up. + ++++ +*** The new function insert-buffer-substring-as-yank works like +`insert-buffer-substring', but removes the text properties in the +`yank-excluded-properties' list. + ++++ +*** The new function insert-buffer-substring-no-properties is like +insert-buffer-substring, but removes all text properties from the +inserted substring. + ++++ +*** The new functions `lax-plist-get' and `lax-plist-put' are like +`plist-get' and `plist-put', except that they compare the property +name using `equal' rather than `eq'. + ++++ +*** New function `line-number-at-pos' returns the line number of the +current line in the current buffer, or if optional buffer position is +given, line number of corresponding line in current buffer. + ++++ +*** New function `looking-back' checks whether a regular expression matches +the text before point. Specifying the LIMIT argument bounds how far +back the match can start; this is a way to keep it from taking too long. + ++++ +*** New function `macroexpand-all' expands all macros in a form. +It is similar to the Common-Lisp function of the same name. +One difference is that it guarantees to return the original argument +if no expansion is done, which may be tested using `eq'. + +*** The new function `minibufferp' returns non-nil if its optional +buffer argument is a minibuffer. If the argument is omitted, it +defaults to the current buffer. + ++++ +*** New function minibuffer-selected-window returns the window which +was selected when entering the minibuffer. + ++++ +*** The new function `modify-all-frames-parameters' modifies parameters +for all (existing and future) frames. + ++++ +*** New functions posn-at-point and posn-at-x-y return +click-event-style position information for a given visible buffer +position or for a given window pixel coordinate. + +--- +*** New function quail-find-key returns a list of keys to type in the +current input method to input a character. + ++++ +*** The new function `rassq-delete-all' deletes all elements from an +alist whose cdr is `eq' to a specified value. + ++++ +*** The new function remove-list-of-text-properties is almost the same +as `remove-text-properties'. The only difference is that it takes a +list of property names as argument rather than a property list. + ++++ +*** The new primitive `set-file-times' sets a file's access and +modification times. Magic file name handlers can handle this +operation. + ++++ +*** New function substring-no-properties returns a substring without +text properties. + ++++ +*** The new function syntax-after returns the syntax code +of the character after a specified buffer position, taking account +of text properties as well as the character code. + ++++ +*** `syntax-class' extracts the class of a syntax code (as returned +by syntax-after). + ++++ +*** New function `tool-bar-local-item-from-menu' + +The `tool-bar-add-item-from-menu' must not be used (as previously +recommended) for making entries in the tool bar for local keymaps. +Instead, use the function `tool-bar-local-item-from-menu', which lets +you specify the map to use as an argument. + ++++ +*** New function window-body-height. +This is like window-height but does not count the mode line +or the header line. + ++++ +*** (while-no-input BODY...) runs BODY, but only so long as no input +arrives. If the user types or clicks anything, BODY stops as if a +quit had occurred. while-no-input returns the value of BODY, if BODY +finishes. It returns nil if BODY was aborted. + ++++ +*** New macro with-local-quit temporarily sets inhibit-quit to nil for use +around potentially blocking or long-running code in timers +and post-command-hooks. ** New packages: -+++ -*** The new package gdb-ui.el provides an enhanced graphical interface to -GDB. You can interact with GDB through the GUD buffer in the usual way, but -there are also further buffers which control the execution and describe the -state of your program. It separates the input/output of your program from -that of GDB and watches expressions in the speedbar. It also uses features of -Emacs 21 such as the display margin for breakpoints, and the toolbar. - -Use M-x gdba to start GDB-UI. - *** The new package syntax.el provides an efficient way to find the current syntactic context (as returned by parse-partial-sexp). @@ -4616,6 +4647,54 @@ require the full power of widgets. Emacs uses buttons for such things as help and apropos buffers. +--- +*** master-mode.el implements a minor mode for scrolling a slave +buffer without leaving your current buffer, the master buffer. + +It can be used by sql.el, for example: the SQL buffer is the master +and its SQLi buffer is the slave. This allows you to scroll the SQLi +buffer containing the output from the SQL buffer containing the +commands. + +This is how to use sql.el and master.el together: the variable +sql-buffer contains the slave buffer. It is a local variable in the +SQL buffer. + +(add-hook 'sql-mode-hook + (function (lambda () + (master-mode t) + (master-set-slave sql-buffer)))) +(add-hook 'sql-set-sqli-hook + (function (lambda () + (master-set-slave sql-buffer)))) + ++++ +*** New Lisp library testcover.el works with edebug to help you determine +whether you've tested all your Lisp code. Function testcover-start +instruments all functions in a given file. Then test your code. Function +testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to +show where coverage is lacking. Command testcover-next-mark (bind it to +a key!) will move point forward to the next spot that has a splotch. + +Normally, a red splotch indicates the form was never completely +evaluated; a brown splotch means it always evaluated to the same +value. The red splotches are skipped for forms that can't possibly +complete their evaluation, such as `error'. The brown splotches are +skipped for forms that are expected to always evaluate to the same +value, such as (setq x 14). + +For difficult cases, you can add do-nothing macros to your code to +help out the test coverage tool. The macro `noreturn' suppresses a +red splotch. It is an error if the argument to `noreturn' does +return. The macro 1value suppresses a brown splotch for its argument. +This macro is a no-op except during test-coverage -- then it signals +an error if the argument actually returns differing values. + +--- +** Support for Mocklisp has been removed. + +--- +** The function insert-string is now obsolete. * Installation changes in Emacs 21.3
--- a/etc/TUTORIAL.ru Thu Apr 28 04:56:56 2005 +0000 +++ b/etc/TUTORIAL.ru Thu May 05 00:04:55 2005 +0000 @@ -1,64 +1,69 @@ -õÞÅÂÎÉË Emacs. õÓÌÏ×ÉÑ ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÑ ÓÍÏÔÒÉÔÅ × ËÏÎÃÅ ÆÁÊÌÁ -Copyright (c) 1985, 1996, 2004 Free Software Foundation, Inc. +õÞÅÂÎÉË Emacs. õÓÌÏ×ÉÑ ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÑ ÐÒÉ×ÅÄÅÎÙ × ËÏÎÃÅ ÆÁÊÌÁ +Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation, Inc. -äÌÑ ÕÐÒÁ×ÌÅÎÉÑ Emacs ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÅÔÓÑ ËÌÀÞ (ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ ËÌÁ×ÉÁÔÕÒÙ -É/ÉÌÉ ËÎÏÐÏË ÍÙÛÉ), ×ËÌÀÞÁÀÝÉÊ × ÓÅÂÑ ËÌÁ×ÉÛÕ CONTROL (ÉÎÏÇÄÁ ÏÔÍÅÞÁÅÍÁÑ -ËÁË CTRL ÉÌÉ CTL) ÉÌÉ ËÌÁ×ÉÛÕ META (ÉÎÏÇÄÁ ÐÏÍÅÞÅÎÎÕÀ ËÁË ALT ÉÌÉ EDIT). ÷ -ÄÁÌØÎÅÊÛÅÍ ×ÍÅÓÔÏ ÔÏÇÏ, ÞÔÏÂÙ ËÁÖÄÙÊ ÒÁÚ ÐÉÓÁÔØ META ÉÌÉ CONTROL, ÍÙ ÂÕÄÅÍ -ÉÓÐÏÌØÚÏ×ÁÔØ ÓÌÅÄÕÀÝÅÅ ÓÏËÒÁÝÅÎÉÅ: +äÌÑ ÕÐÒÁ×ÌÅÎÉÑ Emacs ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÅÔÓÑ ËÌÀÞ (key -- ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ +ËÌÁ×ÉÁÔÕÒÙ É/ÉÌÉ ËÎÏÐÏË ÍÙÛÉ), ×ËÌÀÞÁÀÝÉÊ × ÓÅÂÑ ËÌÁ×ÉÛÕ CONTROL (ÉÎÏÇÄÁ +ÏÔÍÅÞÁÅÍÁÑ ËÁË CTRL ÉÌÉ CTL) ÉÌÉ ËÌÁ×ÉÛÕ META (ÉÎÏÇÄÁ ÐÏÍÅÞÅÎÎÕÀ ËÁË ALT ÉÌÉ +EDIT). ÷ ÄÁÌØÎÅÊÛÅÍ, ×ÍÅÓÔÏ ÔÏÇÏ, ÞÔÏÂÙ ËÁÖÄÙÊ ÒÁÚ ÐÉÓÁÔØ META ÉÌÉ CONTROL, +ÍÙ ÂÕÄÅÍ ÉÓÐÏÌØÚÏ×ÁÔØ ÓÌÅÄÕÀÝÉÅ ÓÏËÒÁÝÅÎÉÑ: - C-<chr> ÓÌÅÄÕÅÔ ÕÄÅÒÖÉ×ÁÔØ ËÌÁ×ÉÛÕ CONTROL, ÐÏËÁ ÎÁÂÉÒÁÅÔÓÑ ÓÉÍ×ÏÌ <chr>. - ôÁË, C-f ÄÏÌÖÎÏ ÏÚÎÁÞÁÔØ: ÎÁÖÁÔØ ËÌÁ×ÉÛÕ CONTROL É f. - M-<chr> ÓÌÅÄÕÅÔ ÕÄÅÒÖÉ×ÁÔØ ËÌÁ×ÉÛÕ META, ÐÏËÁ ÎÁÂÉÒÁÅÔÓÑ ÓÉÍ×ÏÌ <chr>. åÓÌÉ - ÎÅÔ ËÌÁ×ÉÛÉ META, ALT ÉÌÉ EDIT, ÔÏ ÎÁÖÍÉÔÅ <ESC>, ÏÔÐÕÓÔÉÔÅ ÅÅ, - Á ÐÏÔÏÍ ÎÁÂÅÒÉÔÅ ÓÉÍ×ÏÌ <chr>. + C-<chr> -- ÓÌÅÄÕÅÔ ÕÄÅÒÖÉ×ÁÔØ ËÌÁ×ÉÛÕ CONTROL, ÐÏËÁ ÎÁÂÉÒÁÅÔÓÑ ÓÉÍ×ÏÌ + <chr>. ôÁË, C-f ÄÏÌÖÎÏ ÏÚÎÁÞÁÔØ: ÎÁÖÁÔØ ËÌÁ×ÉÛÕ CONTROL É f. + M-<chr> -- ÓÌÅÄÕÅÔ ÕÄÅÒÖÉ×ÁÔØ ËÌÁ×ÉÛÕ META, ÐÏËÁ ÎÁÂÉÒÁÅÔÓÑ ÓÉÍ×ÏÌ + <chr>. åÓÌÉ ÎÅÔ ËÌÁ×ÉÛÉ META, ALT ÉÌÉ EDIT, ÔÏ ÎÁÖÍÉÔÅ <ESC>, + ÏÔÐÕÓÔÉÔÅ ÅÅ, Á ÐÏÔÏÍ ÎÁÂÅÒÉÔÅ ÓÉÍ×ÏÌ <chr>. -÷ÁÖÎÏÅ ÚÁÍÅÞÁÎÉÅ: ÄÌÑ ÚÁ×ÅÒÛÅÎÉÑ ÓÅÁÎÓÁ Emacs, ÎÁÂÅÒÉÔÅ C-x C-c. (ä×Á +÷ÁÖÎÏÅ ÚÁÍÅÞÁÎÉÅ: ÄÌÑ ÚÁ×ÅÒÛÅÎÉÑ ÓÅÁÎÓÁ Emacs, ÎÁÂÅÒÉÔÅ C-x C-c (Ä×Á ÓÉÍ×ÏÌÁ). óÉÍ×ÏÌÙ ">>" Ó ÌÅ×ÏÊ ÓÔÏÒÏÎÙ ÕËÁÚÙ×ÁÀÔ, ÞÔÏ ×ÁÍ ÎÕÖÎÏ ÄÅÌÁÔØ, ÞÔÏÂÙ ÐÒÉÍÅÎÉÔØ ËÏÍÁÎÄÕ. îÁÐÒÉÍÅÒ: -<<óÅÒÅÄÉÎÁ ÓÔÒÁÎÉÃÙ ÏÓÔÁ×ÌÅÎÁ ÐÕÓÔÏÊ ÄÌÑ ÕÞÅÂÎÙÈ ÃÅÌÅÊ. ôÅËÓÔ ÐÒÏÄÏÌÖÁÅÔÓÑ ÎÉÖÅ>> ->> ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-v (ðÒÏÓÍÏÔÒ ÓÌÅÄÕÀÝÅÇÏ ÜËÒÁÎÁ) ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁ - ÓÌÅÄÕÀÝÉÊ ÜËÒÁÎ. (÷ÙÐÏÌÎÉÔÅ ÜÔÏ, ÕÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ CONTROL ÎÁÖÉÍÁÑ v). - ôÅÐÅÒØ ×Ù ÄÏÌÖÎÙ ÜÔÏ ÓÄÅÌÁÔØ ÅÝÅ ÒÁÚ, ËÏÇÄÁ ÚÁËÏÎÞÉÔÅ ÞÉÔÁÔØ ÜËÒÁÎ. +<<ðÕÓÔÙÅ ÓÔÒÏËÉ ×ÏËÒÕÇ ×ÓÔÁ×ÌÅÎÙ ËÏÍÁÎÄÏÊ help-with-tutorial>> +[óÅÒÅÄÉÎÁ ÓÔÒÁÎÉÃÙ ÏÓÔÁ×ÌÅÎÁ ÐÕÓÔÏÊ × ÕÞÅÂÎÙÈ ÃÅÌÑÈ. ôÅËÓÔ ÐÒÏÄÏÌÖÁÅÔÓÑ ÎÉÖÅ] +>> ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-v (ÐÒÏÓÍÏÔÒ ÓÌÅÄÕÀÝÅÇÏ ÜËÒÁÎÁ) ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁ + ÓÌÅÄÕÀÝÉÊ ÜËÒÁÎ. (×ÙÐÏÌÎÉÔÅ ÜÔÕ ËÏÍÁÎÄÕ ÕÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ CONTROL É + ÎÁÖÉÍÁÑ v). ôÅÐÅÒØ ×Ù ÄÏÌÖÎÙ ÜÔÏ ÓÄÅÌÁÔØ ÅÝÅ ÒÁÚ, ËÏÇÄÁ ÚÁËÏÎÞÉÔÅ ÞÉÔÁÔØ + ÜËÒÁÎ. -ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ ÎÁ ÔÏ, ÞÔÏ, ÐÏËÁ ×Ù Ä×ÉÖÅÔÅÓØ Ó ÜËÒÁÎÁ ÎÁ ÜËÒÁÎ, -ÐÅÒÅËÒÙ×ÁÀÔÓÑ Ä×Å ÓÔÒÏÞËÉ; ÜÔÏ ÏÂÅÓÐÅÞÉ×ÁÅÔ ÎÅËÏÔÏÒÕÀ ÎÅÐÒÅÒÙ×ÎÏÓÔØ, ÔÁË -ÞÔÏ ×Ù ÍÏÖÅÔÅ ÐÒÏÄÏÌÖÉÔØ ÞÉÔÁÔØ ÔÅËÓÔ. +ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ ÎÁ ÔÏ, ÞÔÏ, ÐÒÉ ÐÅÒÅÈÏÄÅ Ó ÜËÒÁÎÁ ÎÁ ÜËÒÁÎ ÐÅÒÅËÒÙ×ÁÀÔÓÑ +Ä×Å ÓÔÒÏÞËÉ -- ÜÔÏ ÏÂÅÓÐÅÞÉ×ÁÅÔ ÎÅËÏÔÏÒÕÀ ÎÅÐÒÅÒÙ×ÎÏÓÔØ ×ÏÓÐÒÉÑÔÉÑ, ÔÁË ÞÔÏ +×Ù ÍÏÖÅÔÅ ÐÒÏÄÏÌÖÁÔØ ÞÉÔÁÔØ ÔÅËÓÔ ÎÅ ÔÅÒÑÑ ÎÉÔÉ ÐÏ×ÅÓÔ×Ï×ÁÎÉÑ. -ðÅÒ×ÏÅ, ÞÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÚÎÁÔØ -- ËÁË ÐÅÒÅÄ×ÉÇÁÔØÓÑ ÐÏ ÔÅËÓÔÕ ÉÚ ÏÄÎÏÇÏ -ÍÅÓÔÁ × ÄÒÕÇÏÅ. ÷Ù ÕÖÅ ÚÎÁÅÔÅ, ËÁË ÐÅÒÅÍÅÓÔÉÔØÓÑ ×ÐÅÒÅÄ ÏÄÉÎ ÜËÒÁÎ, -ÉÓÐÏÌØÚÕÑ ËÌÀÞ C-v. äÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁÚÁÄ ÎÁ ÏÄÉÎ ÜËÒÁÎ, ÎÁÖÍÉÔÅ M-v -(ÕÄÅÒÖÉ×ÁÊÔÅ ËÌÁ×ÉÛÕ META É ÎÁÂÅÒÉÔÅ v, ÉÌÉ ÎÁÖÍÉÔÅ <ESC>v, ÅÓÌÉ Õ ×ÁÓ ÎÅÔ -ËÌÁ×ÉÛÙ META, EDIT, ÉÌÉ ALT). +ðÅÒ×ÏÅ, ÞÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÚÎÁÔØ -- ÜÔÏ ÔÏ, ËÁË ÐÅÒÅÄ×ÉÇÁÔØÓÑ ÐÏ ÔÅËÓÔÕ ÉÚ +ÏÄÎÏÇÏ ÍÅÓÔÁ × ÄÒÕÇÏÅ. ÷Ù ÕÖÅ ÚÎÁÅÔÅ, ËÁË ÐÅÒÅÍÅÓÔÉÔØÓÑ ×ÐÅÒÅÄ ÎÁ ÏÄÉÎ +ÜËÒÁÎ, ÉÓÐÏÌØÚÕÑ ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ C-v. äÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁÚÁÄ ÎÁ ÏÄÉÎ ÜËÒÁÎ, +ÎÁÖÍÉÔÅ M-v (ÕÄÅÒÖÉ×ÁÊÔÅ ËÌÁ×ÉÛÕ META É ÎÁÂÅÒÉÔÅ v, ÉÌÉ ÎÁÖÍÉÔÅ <ESC> É +ÚÁÔÅÍ v, Á ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ËÌÁ×ÉÛÉ META, EDIT ÉÌÉ ALT). ->> ÐÏÐÒÏÂÕÊÔÅ ÎÁÂÒÁÔØ M-v É ÐÏÔÏÍ C-v, ÎÅÓËÏÌØËÏ ÒÁÚ. - +>> ÐÏÐÒÏÂÕÊÔÅ ÎÁÂÒÁÔØ M-v, Á ÚÁÔÅÍ C-v, ÎÅÓËÏÌØËÏ ÒÁÚ. -* ëòáôëáñ ó÷ïäëá ----------------- +* ëòáôëéê ðåòåþåîø ëïíáîä +------------------------- äÌÑ ÐÒÏÓÍÏÔÒÁ ÉÓÐÏÌØÚÕÀÔÓÑ ÓÌÅÄÕÀÝÉÅ ËÏÍÁÎÄÙ: C-v ðÅÒÅÊÔÉ ÎÁ ÏÄÉÎ ÜËÒÁÎ ×ÐÅÒÅÄ M-v ðÅÒÅÊÔÉ ÎÁ ÏÄÉÎ ÜËÒÁÎ ÎÁÚÁÄ - C-l ïÞÉÓÔÉÔØ ÜËÒÁÎ É ÏÔÏÂÒÁÚÉÔØ ×ÓÅ ÚÁÎÏ×Ï, ÒÁÚÍÅÓÔÉ× - ÔÅËÓÔ, ÎÁÈÏÄÑÝÉÊÓÑ ×ÏÚÌÅ ËÕÒÓÏÒÁ, × ÃÅÎÔÒÅ ÜËÒÁÎÁ. - (üÔÏ CONTROL-L, Á ÎÅ CONTROL-1.) + C-l ïÞÉÓÔÉÔØ ÜËÒÁÎ É ÏÔÏÂÒÁÚÉÔØ ×ÓÅ ÚÁÎÏ×Ï, ÒÁÚÍÅÓÔÉ× ÔÅËÓÔ, ÎÁÈÏÄÑÝÉÊÓÑ + ×ÏÚÌÅ ËÕÒÓÏÒÁ, × ÃÅÎÔÒÅ ÜËÒÁÎÁ. (ÜÔÏ CONTROL-L, Á ÎÅ CONTROL-1.) >> îÁÊÄÉÔÅ ËÕÒÓÏÒ, É ÚÁÐÏÍÎÉÔÅ ÔÅËÓÔ ×ÏÚÌÅ ÎÅÇÏ. ðÏÔÏÍ ÎÁÖÍÉÔÅ C-l. îÁÊÄÉÔÅ ËÕÒÓÏÒ ÓÎÏ×Á É ÕÂÅÄÉÔÅÓØ, ÞÔÏ ×ÏÚÌÅ ÎÅÇÏ ×ÓÅ ÔÏÔ ÖÅ ÔÅËÓÔ. +÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ËÌÁ×ÉÛÉ PageUp É PageDn ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÍÅÖÄÕ +ÜËÒÁÎÁÍÉ (ÅÓÌÉ ÏÎÉ ÅÓÔØ ÎÁ ×ÁÛÅÍ ÔÅÒÍÉÎÁÌÅ), ÎÏ ×Ù ÓÍÏÖÅÔÅ ÒÁÂÏÔÁÔØ ÂÏÌÅÅ +ÜÆÆÅËÔÉ×ÎÏ, ÅÓÌÉ ÂÕÄÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÓÏÞÅÔÁÎÉÑ C-v É M-v. + * âáúï÷ùå ëïíáîäù õðòá÷ìåîéñ ëõòóïòïí ------------------------------------- ä×ÉÖÅÎÉÅ ÏÔ ÜËÒÁÎÁ Ë ÜËÒÁÎÕ ÕÄÏÂÎÏ, ÎÏ ËÁË ÐÅÒÅÍÅÓÔÉÔØÓÑ × ÏÐÒÅÄÅÌÅÎÎÏÅ -ÍÅÓÔÏ ÔÅËÓÔÁ ÎÁ ÜËÒÁÎÅ? +ÍÅÓÔÏ × ÔÅËÓÔÅ ÎÁ ÜËÒÁÎÅ? -åÓÔØ ÎÅÓËÏÌØËÏ ÓÐÏÓÏÂÏ× ÓÄÅÌÁÔØ ÜÔÏ. ïÓÎÏ×ÎÏÊ ÓÐÏÓÏ -- ÉÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÙ -C-p, C-b, C-f É C-n. ëÁÖÄÁÑ ÉÚ ÜÔÉÈ ËÏÍÁÎÄ ÐÅÒÅÄ×ÉÇÁÅÔ ËÕÒÓÏÒ ÎÁ ÏÄÎÕ -ÓÔÒÏËÕ ÉÌÉ ËÏÌÏÎËÕ ÎÁ ÜËÒÁÎÅ × ÏÐÒÅÄÅÌÅÎÎÏÍ ÎÁÐÒÁ×ÌÅÎÉÉ. üÔÁ ÔÁÂÌÉÃÁ -ÐÏËÁÚÙ×ÁÅÔ ÞÅÔÙÒÅ ËÏÍÁÎÄÙ É ÞÅÔÙÒÅ ÎÁÐÒÁ×ÌÅÎÉÑ ÉÈ Ä×ÉÖÅÎÉÑ: +åÓÔØ ÎÅÓËÏÌØËÏ ÓÐÏÓÏÂÏ× ×ÙÐÏÌÎÅÎÉÑ ÜÔÏÊ ÏÐÅÒÁÃÉÉ. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ +ËÌÁ×ÉÛÉ ÕÐÒÁ×ÌÅÎÉÑ ËÕÒÓÏÒÏÍ (ÓÔÒÅÌËÉ), ÎÏ ÂÏÌÅÅ ÜÆÆÅËÔÉ×ÎÙÍ ÂÕÄÅÔ ÓÏÈÒÁÎÅÎÉÅ +ÒÕË × ÉÈ ÓÔÁÎÄÁÒÔÎÏÊ ÐÏÚÉÃÉÉ É ÉÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÙ C-p, C-b, C-f É C-n. üÔÉ +ËÏÍÁÎÄÙ ÜË×É×ÁÌÅÎÔÎÙ ÞÅÔÙÒÅÍ ËÌÁ×ÉÛÁÍ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ, ËÁË ÜÔÏ ÐÏËÁÚÁÎÏ +ÎÁ ÓÈÅÍÅ: ðÒÅÄÙÄÕÝÁÑ ÓÔÒÏËÁ, C-p : @@ -68,13 +73,14 @@ : óÌÅÄÕÀÝÁÑ ÓÔÒÏËÁ, C-n ->> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÓÔÒÏËÕ ÒÑÄÏÍ Ó ÄÉÁÇÒÁÍÍÏÊ, ÉÓÐÏÌØÚÕÑ C-n ÉÌÉ C-p. - ðÏÔÏÍ, ÎÁÖÍÉÔÅ C-l É ÐÏÓÍÏÔÒÉÔÅ ËÁË ÄÉÁÇÒÁÍÍÁ ÒÁÚÍÅÓÔÉÔÓÑ × ÃÅÎÔÒÅ - ÜËÒÁÎÁ. +>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÓÔÒÏËÕ ÒÑÄÏÍ Ó ÄÉÁÇÒÁÍÍÏÊ, ÉÓÐÏÌØÚÕÑ ÓÏÞÅÔÁÎÉÑ + ËÌÁ×ÉÛ C-n ÉÌÉ C-p. ðÏÔÏÍ, ÎÁÖÍÉÔÅ C-l É ÐÏÓÍÏÔÒÉÔÅ ËÁË ÄÉÁÇÒÁÍÍÁ + ÐÅÒÅÍÅÓÔÉÔÓÑ × ÃÅÎÔÒ ÜËÒÁÎÁ. -÷ÁÍ ÂÕÄÅÔ ÎÅÓÌÏÖÎÏ ÚÁÐÏÍÎÉÔØ ÜÔÉ ËÏÍÁÎÄÙ ÐÏ ÂÕË×ÁÍ -- B-ÎÁÚÁÄ (backward) É -F-×ÐÅÒÅÄ (forward). üÔÏ ÏÓÎÏ×ÎÙÅ ËÏÍÁÎÄÙ ÐÏÚÉÃÉÏÎÉÒÏ×ÁÎÉÑ ËÕÒÓÏÒÁ, ËÏÔÏÒÙÍÉ -÷Ù ÂÕÄÅÔÅ ÐÏÌØÚÏ×ÁÔØÓÑ ÷óåçäá, ÔÁË ÞÔÏ ÂÕÄÅÔ ÎÅÐÌÏÈÏ ÉÈ ×ÙÕÞÉÔØ. +÷ÁÍ ÂÕÄÅÔ ÎÅÓÌÏÖÎÏ ÚÁÐÏÍÎÉÔØ ÜÔÉ ËÏÍÁÎÄÙ ÐÏ ÐÅÒ×ÙÍ ÂÕË×ÁÍ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÈ +ÓÌÏ× -- B-ÎÁÚÁÄ (backward) É F-×ÐÅÒÅÄ (forward). üÔÏ ÏÓÎÏ×ÎÙÅ ËÏÍÁÎÄÙ +ÐÏÚÉÃÉÏÎÉÒÏ×ÁÎÉÑ ËÕÒÓÏÒÁ, ËÏÔÏÒÙÍÉ ÷Ù ÂÕÄÅÔÅ ÐÏÌØÚÏ×ÁÔØÓÑ ÷óåçäá, ÔÁË ÞÔÏ +ÂÕÄÅÔ ÎÅÐÌÏÈÏ ÉÈ ×ÙÕÞÉÔØ. >> îÁÖÍÉÔÅ ÎÅÓËÏÌØËÏ ÒÁÚ C-n, ÞÔÏÂÙ ÏÐÕÓÔÉÔØ ËÕÒÓÏÒ ×ÎÉÚ ÎÁ ÜÔÕ ÓÔÒÏËÕ. @@ -94,8 +100,9 @@ C-f ÍÏÖÅÔ ÐÅÒÅÍÅÝÁÔØ ËÕÒÓÏÒ ÞÅÒÅÚ ÓÉÍ×ÏÌ ÐÅÒÅ×ÏÄÁ ÓÔÒÏËÉ ÔÁË ÖÅ, ËÁË É C-b. >> ðÏÐÒÏÂÕÊÔÅ ÎÅÓËÏÌØËÏ ÒÁÚ ÐÒÉÍÅÎÉÔØ C-b ÔÁË, ÞÔÏÂÙ ÷Ù Õ×ÉÄÅÌÉ, ËÁË - Ä×ÉÖÅÔÓÑ ËÕÒÓÏÒ. äÁÌÅÅ ÉÓÐÏÌØÚÕÊÔÅ C-f ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ ÎÁ ËÏÎÅà - ÓÔÒÏËÉ. îÁÖÍÉÔÅ C-f ÅÝÅ ÒÁÚ, ÞÔÏÂÙ ÐÅÒÅÊÔÉ Ë ÎÁÞÁÌÕ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÉ. + Ä×ÉÖÅÔÓÑ ËÕÒÓÏÒ. äÁÌÅÅ ÉÓÐÏÌØÚÕÊÔÅ ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ C-f ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ + ÎÁ ËÏÎÅà ÓÔÒÏËÉ. îÁÖÍÉÔÅ C-f ÅÝÅ ÒÁÚ, ÞÔÏÂÙ ÐÅÒÅÊÔÉ Ë ÎÁÞÁÌÕ ÓÌÅÄÕÀÝÅÊ + ÓÔÒÏËÉ. ëÏÇÄÁ ×Ù ÐÅÒÅÍÅÝÁÅÔÅÓØ ÚÁ ×ÅÒÈÎÉÊ ÉÌÉ ÎÉÖÎÉÊ ËÒÁÊ ÜËÒÁÎÁ, ÔÅËÓÔ, ÎÁÈÏÄÑÝÉÊÓÑ ÚÁ ÜËÒÁÎÏÍ, ÓÄ×ÉÇÁÅÔÓÑ ×ÎÕÔÒØ ÜËÒÁÎÁ. üÔÏ ÎÁÚÙ×ÁÅÔÓÑ "ÐÒÏËÒÕÔËÁ @@ -103,7 +110,7 @@ ÔÅËÓÔÁ ÂÅÚ ÐÅÒÅÍÅÝÅÎÉÑ ÅÇÏ ÚÁ ÐÒÅÄÅÌÙ ÜËÒÁÎÁ. >> ðÏÐÒÏÂÕÊÔÅ ÐÅÒÅÍÅÓÔÉÔØ ËÕÒÓÏÒ ÚÁ ÎÉÖÎÀÀ ÇÒÁÎÉÃÕ ÜËÒÁÎÁ, ÉÓÐÏÌØÚÕÑ C-n, É - ÐÏÓÍÏÔÒÉÔÅ, ÞÔÏ ÉÚÍÅÎÉÔÓÑ. + ÐÏÓÍÏÔÒÉÔÅ, ÞÔÏ ÐÒÏÉÚÏÊÄÅÔ. åÓÌÉ ÐÏÓÉÍ×ÏÌØÎÏÅ ÐÅÒÅÍÅÝÅÎÉÅ ÓÌÉÛËÏÍ ÍÅÄÌÅÎÎÏ, ÷Ù ÍÏÖÅÔÅ Ä×ÉÇÁÔØÓÑ ÐÏ ÓÌÏ×ÁÍ. M-f (META-f) ÐÅÒÅÍÅÝÁÅÔ ×ÐÅÒÅÄ ÎÁ ÓÌÏ×Ï, Á M-b ÎÁÚÁÄ ÎÁ ÓÌÏ×Ï. @@ -128,8 +135,8 @@ ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ÎÁÞÁÌÏ É ËÏÎÅà ÓÔÒÏËÉ, Á M-a É M-e ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ÎÁÞÁÌÏ É ËÏÎÅà ÐÒÅÄÌÏÖÅÎÉÑ. ->> ðÏÐÒÏÂÕÊÔÅ ÎÁÖÁÔØ ÐÁÒÕ ÒÁÚ C-a, É ÐÏÔÏÍ ÐÁÒÕ ÒÁÚ C-e. ðÏÐÒÏÂÕÊÔÅ ÐÁÒÕ - ÒÁÚ ÎÁÖÁÔØ M-a, ÐÏÓÌÅ ÜÔÏÇÏ ÐÁÒÕ ÒÁÚ ÎÁÖÁÔØ M-e. +>> ðÏÐÒÏÂÕÊÔÅ ÎÁÖÁÔØ ÐÁÒÕ ÒÁÚ C-a, Á ÐÏÔÏÍ ÐÁÒÕ ÒÁÚ C-e. ðÏÐÒÏÂÕÊÔÅ ÐÁÒÕ ÒÁÚ + ÎÁÖÁÔØ M-a, ÐÏÓÌÅ ÜÔÏÇÏ ÐÁÒÕ ÒÁÚ ÎÁÖÁÔØ M-e. ðÏÓÍÏÔÒÉÔÅ, ÞÔÏ ÐÏ×ÔÏÒ C-a ÎÉÞÅÇÏ ÎÅ ÉÚÍÅÎÑÅÔ, Á ÐÏ×ÔÏÒ M-a ÐÒÏÄÏÌÖÁÅÔ Ä×ÉÖÅÎÉÅ ËÕÒÓÏÒÁ Ë ÓÌÅÄÕÀÝÅÍÕ ÐÒÅÄÌÏÖÅÎÉÀ. üÔÏ ÎÅ ÓÏÈÒÁÎÑÅÔ ÁÎÁÌÏÇÉÀ, ÎÏ @@ -139,7 +146,7 @@ ËÕÒÓÏÒ ÐÏËÁÚÙ×ÁÅÔ ÍÅÓÔÏ ÎÁ ÜËÒÁÎÅ × ËÁËÏÊ ÔÏÞËÅ ÂÕÄÅÔ ÒÁÓÐÏÌÏÖÅÎ ××ÏÄÉÍÙÊ ÔÅËÓÔ. -úÄÅÓØ ÓÏÂÒÁÎÙ ÐÒÏÓÔÙÅ ËÏÍÁÎÄÙ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ, ×ËÌÀÞÁÑ Ä×ÉÖÅÎÉÅ ÐÏ +úÄÅÓØ ÓÏÂÒÁÎÙ ÏÓÎÏ×ÎÙÅ ËÏÍÁÎÄÙ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ, ×ËÌÀÞÁÑ Ä×ÉÖÅÎÉÅ ÐÏ ÓÌÏ×ÁÍ É ÐÒÅÄÌÏÖÅÎÉÑÍ: C-f îÁ ÓÉÍ×ÏÌ ×ÐÅÒÅÄ @@ -189,10 +196,10 @@ ÐÏ×ÔÏÒÅÎÉÊ ÄÌÑ ËÏÍÁÎÄÙ, ÎÁÖÍÉÔÅ C-u, ÐÏÔÏÍ ÞÉÓÌÏ ÐÏ×ÔÏÒÅÎÉÊ, É ÕËÁÖÉÔÅ ËÏÍÁÎÄÕ. åÓÌÉ Õ ×ÁÓ ÅÓÔØ ËÌÁ×ÉÛÁ META (ÉÌÉ EDIT ÉÌÉ ALT), ÔÏ ÃÉÆÒÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÍÏÖÎÏ ÚÁÄÁÔØ ÄÒÕÇÉÍ ÓÐÏÓÏÂÏÍ: ÎÁÂÅÒÉÔÅ ÃÉÆÒÙ, ÕÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ -META. íÙ ÒÅËÏÍÅÎÄÕÅÍ ÏÓ×ÏÉÔØ ÉÓÐÏÌØÚÏ×ÁÎÉÅ C-u, ÐÏÓËÏÌØËÕ ÜÔÁ -ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ ËÌÁ×ÉÛ ÒÁÂÏÔÁÅÔ ÎÁ ÌÀÂÏÍ ÔÅÒÍÉÎÁÌÅ. þÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ -ÔÁËÖÅ ÎÁÚÙ×ÁÅÔÓÑ "ÐÒÅÆÉËÓÎÙÍ ÁÒÇÕÍÅÎÔÏÍ", ÐÏÓËÏÌØËÕ ×Ù ÎÁÂÉÒÁÅÔÅ ÁÒÇÕÍÅÎÔ ÄÏ -×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄÙ. +META. íÙ ÒÅËÏÍÅÎÄÕÅÍ ÐÒÉ×ÙËÎÕÔØ Ë ÉÓÐÏÌØÚÏ×ÁÎÉÀ C-u, ÐÏÓËÏÌØËÕ ÜÔÏ ÓÏÞÅÔÁÎÉÅ +ËÌÁ×ÉÛ ÒÁÂÏÔÁÅÔ ÎÁ ÌÀÂÏÍ ÔÅÒÍÉÎÁÌÅ. þÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÔÁËÖÅ ÎÁÚÙ×ÁÅÔÓÑ +"ÐÒÅÆÉËÓÎÙÍ ÁÒÇÕÍÅÎÔÏÍ", ÐÏÓËÏÌØËÕ ×Ù ÚÁÄÁÅÔÅ ÁÒÇÕÍÅÎÔ ÄÏ ×ÙÐÏÌÎÅÎÉÑ +ËÏÍÁÎÄÙ. îÁÐÒÉÍÅÒ, C-u 8 C-f ÐÅÒÅÍÅÓÔÉÔ ËÕÒÓÏÒ ÎÁ ×ÏÓÅÍØ ÓÉÍ×ÏÌÏ× ×ÐÅÒÅÄ. @@ -201,9 +208,9 @@ íÎÏÇÉÅ ËÏÍÁÎÄÙ ÉÓÐÏÌØÚÕÀÔ ÞÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ËÁË ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÊ, ÎÏ ÎÅËÏÔÏÒÙÅ ËÏÍÁÎÄÙ ÉÓÐÏÌØÚÕÀÔ ÅÇÏ ÄÒÕÇÉÍ ÓÐÏÓÏÂÏÍ. îÅËÏÔÏÒÙÅ ËÏÍÁÎÄÙ (ÎÏ ÎÉ -ÏÄÎÁ ÉÚ ÎÉÈ ÎÅ ÂÙÌÁ ÅÝÅ ÉÚÕÞÅÎÁ ÚÄÅÓØ) ÉÓÐÏÌØÚÕÀÔ ÅÇÏ ËÁË ÆÌÁÇ -- ÎÁÌÉÞÉÅ -ÐÒÅÆÉËÓÎÏÇÏ ÁÒÇÕÍÅÎÔÁ ×ÎÅ ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÅÇÏ ÚÎÁÞÅÎÉÑ, ÉÚÍÅÎÑÅÔ ÐÏ×ÅÄÅÎÉÅ -ËÏÍÁÎÄÙ. +ÏÄÎÁ ÉÚ ÎÉÈ ÎÅ ÂÙÌÁ ÅÝÅ ÏÐÉÓÁÎÁ × ÄÁÎÎÏÍ ÔÅËÓÔÅ) ÉÓÐÏÌØÚÕÀÔ ÅÇÏ ËÁË ÆÌÁÇ -- +ÎÁÌÉÞÉÅ ÐÒÅÆÉËÓÎÏÇÏ ÁÒÇÕÍÅÎÔÁ ×ÎÅ ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÅÇÏ ÚÎÁÞÅÎÉÑ, ÉÚÍÅÎÑÅÔ +ÐÏ×ÅÄÅÎÉÅ ËÏÍÁÎÄÙ. äÒÕÇÉÍ ×ÉÄÏÍ ÉÓËÌÀÞÅÎÉÊ Ñ×ÌÑÀÔÓÑ ËÌÀÞÉ C-v É M-v. ðÒÉ ÐÏÌÕÞÅÎÉÉ ÞÉÓÌÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ, ÏÎÉ ÐÒÏËÒÕÞÉ×ÁÀÔ ÜËÒÁÎ ××ÅÒÈ ÉÌÉ ×ÎÉÚ ÎÁ ÕËÁÚÁÎÎÏÅ ÞÉÓÌÏ ÓÔÒÏË, @@ -215,9 +222,10 @@ üÔÁ ËÏÍÁÎÄÁ ÄÏÌÖÎÁ ÐÒÏËÒÕÔÉÔØ ÜËÒÁÎ ÎÁ 8 ÓÔÒÏË ××ÅÒÈ. åÓÌÉ ×Ù ÈÏÔÉÔÅ ÐÒÏËÒÕÔÉÔØ ÅÇÏ ×ÎÉÚ, ÍÏÖÅÔÅ ÚÁÄÁÔØ ÁÒÇÕÍÅÎÔ ÄÌÑ M-v. -åÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ ÏËÏÎÎÕÀ ÓÉÓÔÅÍÕ, ÔÁËÕÀ ËÁË X11 ÉÌÉ MS-Windows, ÄÏÌÖÎÁ -ÂÙÔØ ÐÒÑÍÏÕÇÏÌØÎÁÑ ÏÂÌÁÓÔØ, ÉÍÅÎÕÅÍÁÑ ÐÏÌÏÓÏÊ ÐÒÏËÒÕÔËÉ Ó ÌÅ×ÏÊ ÓÔÏÒÏÎÙ ÏËÎÁ -Emacs. ÷Ù ÍÏÖÅÔÅ ÐÒÏËÒÕÞÉ×ÁÔØ ÔÅËÓÔ, ÉÓÐÏÌØÚÕÑ ÍÁÎÉÐÕÌÑÔÏÒ ÍÙÛØ. +åÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ ÏËÏÎÎÕÀ ÓÉÓÔÅÍÕ, ÔÁËÕÀ ËÁË X11 ÉÌÉ MS-Windows, ÔÏ ÄÏÌÖÎÁ +ÂÙÔØ ×ÉÄÎÁ ÐÒÑÍÏÕÇÏÌØÎÁÑ ÏÂÌÁÓÔØ, ÉÍÅÎÕÅÍÁÑ ÐÏÌÏÓÏÊ ÐÒÏËÒÕÔËÉ, ËÏÔÏÒÁÑ ×ÉÄÎÁ +Ó ÌÅ×ÏÊ ÓÔÏÒÏÎÙ ÏËÎÁ Emacs. ÷Ù ÍÏÖÅÔÅ ÐÒÏËÒÕÞÉ×ÁÔØ ÔÅËÓÔ, ÉÓÐÏÌØÚÕÑ +ÍÁÎÉÐÕÌÑÔÏÒ ÍÙÛØ. >> ðÏÐÒÏÂÕÊÔÅ ÐÅÒÅÍÅÝÁÔØ ÍÙÛØ ÐÒÉ ÎÁÖÁÔÏÊ ÓÒÅÄÎÅÊ ËÎÏÐËÅ ÍÙÛÉ. ÷Ù Õ×ÉÄÉÔÅ ËÁË ÔÅËÓÔ ÐÒÏËÒÕÞÉ×ÁÅÔÓÑ ××ÅÒÈ É ×ÎÉÚ. @@ -226,163 +234,174 @@ * õðòá÷ìåîéå ëõòóïòïí îá X-ôåòíéîáìå ------------------------------------ -åÓÌÉ Õ ×ÁÓ X-ÔÅÒÍÉÎÁÌ, ÔÏ ×ÁÍ, ×ÅÒÏÑÔÎÏ, ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ËÕÒÓÏÒÏÍ ÐÏËÁÖÅÔÓÑ -ÂÏÌÅÅ ÌÅÇËÉÍ ÉÓÐÏÌØÚÏ×ÁÔØ ËÌÁ×ÉÛÉ ÎÁ ÃÉÆÒÏ×ÏÊ ËÌÁ×ÉÁÔÕÒÅ (ÓÐÒÁ×Á). óÔÒÅÌËÉ -×ÌÅ×Ï, ×ÐÒÁ×Ï, ××ÅÒÈ É ×ÎÉÚ ÐÅÒÅÄ×ÉÇÁÀÔ ËÕÒÓÏÒ × ÏÖÉÄÁÅÍÏÍ ÎÁÐÒÁ×ÌÅÎÉÉ; ÏÎÉ -ÒÁÂÏÔÁÀÔ ÔÏÞÎÏ ÔÁËÖÅ ËÁË C-b, C-f, C-p É C-n, ÎÏ ÌÅÇÞÅ × ÎÁÂÏÒÅ É -ÚÁÐÏÍÉÎÁÎÉÉ. ÷Ù ÔÁË ÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÓÏÞÅÔÁÎÉÑ C-left É C-right ÄÌÑ -ÐÅÒÅÄ×ÉÖÅÎÉÑ ÐÏ ÓÌÏ×ÁÍ, É C-up É C-down ÄÌÑ ÐÅÒÅÄ×ÉÖÅÎÉÑ ÐÏ ÂÌÏËÁÍ (Ô.Å. -ÐÁÒÁÇÒÁÆÁÍ, ÅÓÌÉ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ). åÓÌÉ Õ ×ÁÓ ÅÓÔØ ËÎÏÐËÉ ÐÏÍÅÞÅÎÎÙÅ -HOME (ÉÌÉ BEGIN) ÉÌÉ END, ÔÏ ÏÎÉ ÂÕÄÕÔ ÐÅÒÅÍÅÝÁÔØ ËÕÒÓÏÒ × ÎÁÞÁÌÏ É ËÏÎÅà -ÓÔÒÏËÉ, ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ, É C-home É C-end ÂÕÄÕÔ ÐÅÒÅÍÅÝÁÔØ × ÎÁÞÁÌÏ É ËÏÎÅà -ÆÁÊÌÁ. åÓÌÉ ÎÁ ×ÁÛÅÊ ËÌÁ×ÉÁÔÕÒÅ ÅÓÔØ ËÎÏÐËÉ PgUp É PgDn, ÔÏ ×Ù ÍÏÖÅÔÅ ÉÈ -ÉÓÐÏÌØÚÏ×ÁÔØ ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ××ÅÒÈ É ×ÎÉÚ ÐÏÜËÒÁÎÎÏ, ÔÁËÖÅ ËÁË É M-v É C-v. +åÓÌÉ Õ ×ÁÓ X-ÔÅÒÍÉÎÁÌ, ÔÏ ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ËÕÒÓÏÒÏÍ, ×ÁÍ ×ÅÒÏÑÔÎÏ ÐÏËÁÖÅÔÓÑ +ÂÏÌÅÅ ÌÅÇËÉÍ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ËÌÁ×ÉÛ ËÕÒÓÏÒÁ ÎÁ ÃÉÆÒÏ×ÏÊ ËÌÁ×ÉÁÔÕÒÅ +(ÓÐÒÁ×Á). óÔÒÅÌËÉ ×ÌÅ×Ï, ×ÐÒÁ×Ï, ××ÅÒÈ É ×ÎÉÚ ÐÅÒÅÄ×ÉÇÁÀÔ ËÕÒÓÏÒ × +ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÍ ÎÁÐÒÁ×ÌÅÎÉÉ -- ÏÎÉ ÒÁÂÏÔÁÀÔ ÔÏÞÎÏ ÔÁËÖÅ ËÁË C-b, C-f, C-p É +C-n, ÎÏ ÌÅÇÞÅ × ÎÁÂÏÒÅ É ÚÁÐÏÍÉÎÁÎÉÉ. ÷Ù ÔÁË ÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ +ÓÏÞÅÔÁÎÉÑ C-left É C-right ÄÌÑ ÐÅÒÅÄ×ÉÖÅÎÉÑ ÐÏ ÓÌÏ×ÁÍ, É C-up É C-down ÄÌÑ +ÐÅÒÅÄ×ÉÖÅÎÉÑ ÐÏ ÂÌÏËÁÍ (Ô.Å. ÐÁÒÁÇÒÁÆÁÍ, ÅÓÌÉ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ). åÓÌÉ +Õ ×ÁÓ ÅÓÔØ ËÎÏÐËÉ ÐÏÍÅÞÅÎÎÙÅ HOME (ÉÌÉ BEGIN) É/ÉÌÉ END, ÔÏ ÏÎÉ ÂÕÄÕÔ +ÐÅÒÅÍÅÝÁÔØ ËÕÒÓÏÒ × ÎÁÞÁÌÏ É ËÏÎÅà ÓÔÒÏËÉ, Á C-home É C-end ÂÕÄÕÔ ÐÅÒÅÍÅÝÁÔØ +× ÎÁÞÁÌÏ É ËÏÎÅà ÆÁÊÌÁ. åÓÌÉ ÎÁ ×ÁÛÅÊ ËÌÁ×ÉÁÔÕÒÅ ÅÓÔØ ËÎÏÐËÉ PgUp É PgDn, +ÔÏ ×Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÉÈ ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ××ÅÒÈ É ×ÎÉÚ ÐÏÓÔÒÁÎÉÞÎÏ, +ÁÎÁÌÏÇÉÞÎÏ ÉÓÐÏÌØÚÏ×ÁÎÉÀ M-v É C-v. -÷ÓÅ ÜÔÉ ËÏÍÁÎÄÙ ÍÏÇÕÔ ÐÏÌÕÞÁÔØ ÃÉÆÒÏ×ÏÊ ÁÒÇÕÍÅÎÔ, ËÁË ÒÁÓÓËÁÚÁÎÏ ×ÙÛÅ. ÷Ù -ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÕÓËÏÒÅÎÎÙÊ ÓÐÏÓÏ ××ÏÄÁ ÜÔÏÇÏ ÁÒÇÕÍÅÎÔÁ: ÐÒÏÓÔÏ ÎÁÖÍÉÔÅ -CONTROL ÉÌÉ META É ÎÁÂÅÒÉÔÅ ÞÉÓÌÏ. îÁÐÒÉÍÅÒ, ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁ 12 ÓÌÏ× -×ÐÒÁ×Ï, ÎÁÂÅÒÉÔÅ C-1 C-2 C-right. úÁÐÏÍÎÉÔÅ ÞÔÏ ÔÁË ÏÞÅÎØ ÌÅÇËÏ ÎÁÂÉÒÁÔØ, -ÐÏÔÏÍÕ ÞÔÏ ×Ù ÎÅ ÏÔÐÕÓËÁÅÔÅ ËÎÏÐËÕ CONTROL ÍÅÖÄÕ ÎÁÖÁÔÉÑÍÉ. +÷ÓÅ ÜÔÉ ËÏÍÁÎÄÙ ÍÏÇÕÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÃÉÆÒÏ×ÏÊ ÁÒÇÕÍÅÎÔ, ÔÁË, ËÁË Ï ÜÔÏÍ +ÒÁÓÓËÁÚÁÎÏ ×ÙÛÅ. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÕÓËÏÒÅÎÎÙÊ ÓÐÏÓÏ ××ÏÄÁ ÜÔÏÇÏ +ÁÒÇÕÍÅÎÔÁ: ÐÒÏÓÔÏ ÎÁÖÍÉÔÅ CONTROL ÉÌÉ META É ÎÁÂÅÒÉÔÅ ÞÉÓÌÏ. îÁÐÒÉÍÅÒ, ÄÌÑ +ÐÅÒÅÍÅÝÅÎÉÑ ÎÁ 12 ÓÌÏ× ×ÐÒÁ×Ï, ÎÁÂÅÒÉÔÅ C-1 C-2 C-right. úÁÐÏÍÎÉÔÅ ÞÔÏ ÔÁË +ÏÞÅÎØ ÌÅÇËÏ ÎÁÂÉÒÁÔØ, ÐÏÔÏÍÕ ÞÔÏ ×Ù ÎÅ ÏÔÐÕÓËÁÅÔÅ ËÎÏÐËÕ CONTROL ÍÅÖÄÕ +ÎÁÖÁÔÉÑÍÉ. * åóìé EMACS úá÷éó ------------------ -åÓÌÉ Emacs ÐÅÒÅÓÔÁÌ ÒÅÁÇÉÒÏ×ÁÔØ ÎÁ ×ÁÛÉ ËÏÍÁÎÄÙ, ×Ù ÍÏÖÅÔÅ ÏÓÔÁÎÏ×ÉÔØ ÜÔÏ, -ÐÒÏÓÔÏ ÎÁÖÁ× C-g. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g, ÞÔÏÂÙ ÏÓÔÁÎÏ×ÉÔØ ×ÙÐÏÌÎÅÎÉÅ -ËÏÍÁÎÄÙ, ËÏÔÏÒÁÑ ÓÌÉÛËÏÍ ÄÏÌÇÏ ×ÙÐÏÌÎÑÅÔÓÑ. +åÓÌÉ Emacs ÐÅÒÅÓÔÁÌ ÒÅÁÇÉÒÏ×ÁÔØ ÎÁ ×ÁÛÉ ËÏÍÁÎÄÙ, ÔÏ ×Ù ÍÏÖÅÔÅ ÉÚÂÅÖÁÔØ ÜÔÏÇÏ +ÐÒÏÓÔÏ ÎÁÖÁ× C-g. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g, ÞÔÏÂÙ ÏÓÔÁÎÏ×ÉÔØ ×ÙÐÏÌÎÅÎÉÅ +ËÏÍÁÎÄ, ËÏÔÏÒÙÅ ÓÌÉÛËÏÍ ÄÏÌÇÏ ×ÙÐÏÌÎÑÀÔÓÑ. -÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g ÄÌÑ ÏÔÍÅÎÙ ÃÉÆÒÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ ÉÌÉ ÎÁÞÁÔÏÊ -ËÏÍÁÎÄÙ, ËÏÔÏÒÕÀ ×Ù ÎÅ ÈÏÔÉÔÅ ÚÁ×ÅÒÛÁÔØ. +÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g ÄÌÑ ÏÔÍÅÎÙ ÎÁÂÒÁÎÎÏÇÏ ÃÉÆÒÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ +ÉÌÉ ËÏÍÁÎÄÙ, ËÏÔÏÒÁÑ ÎÁÞÁÌÁ ×ÙÐÏÌÎÑÔØÓÑ, ÎÏ ËÏÔÏÒÕÀ ×Ù ÎÅ ÈÏÔÉÔÅ ÚÁ×ÅÒÛÁÔØ. >> îÁÂÅÒÉÔÅ C-u 100 ÄÌÑ ÚÁÄÁÎÉÑ ÁÒÇÕÍÅÎÔÁ 100, ÐÏÔÏÍ ÎÁÖÍÉÔÅ C-g. ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-f. ëÕÒÓÏÒ ÄÏÌÖÅÎ ÐÅÒÅÍÅÓÔÉÔØÓÑ ×ÓÅÇÏ ÎÁ ÏÄÉÎ ÓÉÍ×ÏÌ, ÐÏÔÏÍÕ ÞÔÏ ×Ù ÏÔÍÅÎÉÌÉ ÁÒÇÕÍÅÎÔ ÎÁÖÁÔÉÅÍ C-g. -åÓÌÉ ×Ù ÎÁÖÁÌÉ <ESC> ÐÏ ÏÛÉÂËÅ, ×Ù ÔÁË ÖÅ ÍÏÖÅÔÅ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÜÔÏÇÏ -ÎÁÖÁÔÉÅÍ C-g. +åÓÌÉ ×Ù ÎÁÖÁÌÉ <ESC> ÐÏ ÏÛÉÂËÅ, ÔÏ ×Ù ÔÁË ÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g ÞÔÏÂÙ +ÉÚÂÅÖÁÔØ ×ÏÚÄÅÊÓÔ×ÉÑ ÄÁÎÎÏÊ ËÏÍÁÎÄÙ. * úáðòåýåîîùå ëïíáîäù (DISABLED COMMANDS) ----------------------------------------- îÅËÏÔÏÒÙÅ ËÏÍÁÎÄÙ Emacs "ÚÁÐÒÅÝÅÎÙ", ÐÏÓËÏÌØËÕ ÎÁÞÉÎÁÀÝÉÅ ÐÏÌØÚÏ×ÁÔÅÌÉ ÍÏÇÕÔ -ÉÈ ÓÌÕÞÁÊÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ. +ÓÌÕÞÁÊÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÉÈ ÄÌÑ ÓÏ×ÅÒÛÅÎÉÑ ÏÐÁÓÎÙÈ ÄÅÊÓÔ×ÉÊ. åÓÌÉ ×Ù ÎÁÂÒÁÌÉ ÏÄÎÕ ÉÚ ÚÁÐÒÅÝÅÎÎÙÈ ËÏÍÁÎÄ, ÔÏ Emacs ÐÏËÁÖÅÔ ÓÏÏÂÝÅÎÉÅ -ÇÏ×ÏÒÑÝÅÅ Ï ÔÏÍ, ËÁËÁÑ ËÏÍÁÎÄÁ ×ÙÚÙ×ÁÅÔÓÑ, É ÓÐÒÏÓÉÔ, ÈÏÔÉÔÅ ÌÉ ×Ù -ÐÒÏÄÏÌÖÉÔØ É ×ÙÐÏÌÎÉÔØ ÜÔÕ ËÏÍÁÎÄÕ. +ÇÏ×ÏÒÑÝÅÅ Ï ÔÏÍ, ËÁËÁÑ ËÏÍÁÎÄÁ ×ÙÚÙ×ÁÅÔÓÑ, É ÚÁÐÒÏÓÉÔ Õ ×ÁÓ, ÈÏÔÉÔÅ ÌÉ ×Ù +ÐÒÏÄÏÌÖÁÔØ ÒÁÂÏÔÕ É ×ÙÐÏÌÎÑÔØ ÄÁÎÎÕÀ ËÏÍÁÎÄÕ. -åÓÌÉ ×Ù ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÈÏÔÉÔÅ ÐÏÐÒÏÂÏ×ÁÔØ ×ÙÐÏÌÎÉÔØ ËÏÍÁÎÄÕ, ÔÏ ÎÁÖÍÉÔÅ -ËÌÁ×ÉÛÕ ðÒÏÂÅÌ (Space) × ÏÔ×ÅÔ ÎÁ ÜÔÏÔ ×ÏÐÒÏÓ. ïÂÙÞÎÏ, ÅÓÌÉ ×Ù ÎÅ ÈÏÔÉÔÅ -×ÙÐÏÌÎÑÔØ ÚÁÐÒÅÝÅÎÎÕÀ ËÏÍÁÎÄÕ, ÔÏ ÏÔ×ÅÞÁÊÔÅ ÎÁ ×ÏÐÒÏÓ ÎÁÖÁÔÉÅÍ ËÌÁ×ÉÛÉ "n". +åÓÌÉ ×Ù ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÐÏÐÒÏÂÏ×ÁÔØ ×ÙÐÏÌÎÉÔØ ËÏÍÁÎÄÕ, ÔÏ ÎÁÖÍÉÔÅ ËÌÁ×ÉÛÕ +<SPC> (ÐÒÏÂÅÌ) × ÏÔ×ÅÔ ÎÁ ÚÁÄÁÎÎÙÊ ×ÏÐÒÏÓ. ïÂÙÞÎÏ, ÅÓÌÉ ×Ù ÎÅ ÈÏÔÉÔÅ +×ÙÐÏÌÎÑÔØ ÚÁÐÒÅÝÅÎÎÕÀ ËÏÍÁÎÄÕ, ÔÏ ÏÔ×ÅÔØÔÅ ÎÁ ×ÏÐÒÏÓ ÎÁÖÁÔÉÅÍ ËÌÁ×ÉÛÉ "n". ->> îÁÖÍÉÔÅ `C-x C-l' (×ÙËÌÀÞÅÎÎÁÑ ËÏÍÁÎÄÁ), ÐÏÔÏÍ ÏÔ×ÅÔØÔÅ "n" ÎÁ ×ÏÐÒÏÓ. +>> îÁÖÍÉÔÅ `C-x C-l' (×ÙËÌÀÞÅÎÎÁÑ ËÏÍÁÎÄÁ), Á ÐÏÔÏÍ ÏÔ×ÅÔØÔÅ "n" ÎÁ ÚÁÄÁÎÎÙÊ + ×ÏÐÒÏÓ. * ïëîá ------ -Emacs ÍÏÖÅÔ ÉÍÅÔØ ÎÅÓËÏÌØËÏ ÏËÏÎ, ËÁÖÄÏÅ ÉÚ ËÏÔÏÒÙÈ ÏÔÏÂÒÁÖÁÅÔ Ó×ÏÊ ÔÅËÓÔ. -íÙ ÏÂßÑÓÎÉÍ ÐÏÚÖÅ ËÁË ÉÓÐÏÌØÚÏ×ÁÔØ ÍÎÏÖÅÓÔ×Ï ÏËÏÎ. ðÒÑÍÏ ÓÅÊÞÁÓ ÍÙ ÈÏÔÉÍ -ÏÂßÑÓÎÉÔØ ËÁË ÉÚÂÁ×ÌÑÔØÓÑ ÏÔ ÌÉÛÎÉÈ ÏËÏÎ É ×ÅÒÎÕÔØÓÑ Ë ÒÅÄÁËÔÉÒÏ×ÁÎÉÀ × -ÏÄÎÏÍ ÏËÎÅ. ÷ÙÐÏÌÎÉÔØ ÜÔÏ ÏÞÅÎØ ÐÒÏÓÔÏ: +Emacs ÍÏÖÅÔ ÏÔÏÂÒÁÖÁÔØ ÉÎÆÏÒÍÁÃÉÀ × ÎÅÓËÏÌØËÉÈ ÏËÎÁÈ, ËÁÖÄÏÅ ÉÚ ËÏÔÏÒÙÈ +ÏÔÏÂÒÁÖÁÅÔ Ó×ÏÊ ÔÅËÓÔ. ðÏÚÖÅ ÍÙ ÏÂßÑÓÎÉÍ ËÁË ÒÁÂÏÔÁÔØ Ó ÎÅÓËÏÌØËÉÍÉ ÏËÎÁÍÉ. +ðÒÑÍÏ ÓÅÊÞÁÓ ÍÙ ÈÏÔÉÍ ÏÂßÑÓÎÉÔØ ×ÁÍ ËÁË ÉÚÂÁ×ÌÑÔØÓÑ ÏÔ ÌÉÛÎÉÈ ÏËÏÎ É +×ÅÒÎÕÔØÓÑ Ë ÒÅÄÁËÔÉÒÏ×ÁÎÉÀ × ÏÄÎÏÍ ÏËÎÅ. üÔÏ ÏÞÅÎØ ÐÒÏÓÔÏ ÓÄÅÌÁÔØ: C-x 1 ïÄÎÏ ÏËÎÏ. (ÚÁËÒÙÔØ ×ÓÅ ÄÒÕÇÉÅ ÏËÎÁ). -üÔÏ CONTROL-x ÓÏ ÓÌÅÄÕÀÝÅÊ ÃÉÆÒÏÊ 1. C-x 1 ÒÁÚ×ÅÒÎÅÔ ÏËÎÏ, ËÏÔÏÒÏÅ ÓÏÄÅÒÖÉÔ +üÔÏ CONTROL-x ÓÏ ÓÌÅÄÕÀÝÅÊ ÃÉÆÒÏÊ 1. C-x 1 ÒÁÚ×ÅÒÎÅÔ ÏËÎÏ, ËÏÔÏÒÏÅ ÓÏÄÅÒÖÉÔ ËÕÒÓÏÒ, ÔÁË, ÞÔÏÂÙ ÏÎÏ ÚÁÎÑÌÏ ×ÅÓØ ÜËÒÁÎ. ðÒÉ ÜÔÏÍ ÂÕÄÕÔ ÕÄÁÌÅÎÙ ×ÓÅ ÏÓÔÁÌØÎÙÅ ÏËÎÁ. >> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÜÔÕ ÓÔÒÏËÕ É ÎÁÖÍÉÔÅ C-u 0 C-l. >> îÁÂÅÒÉÔÅ CONTROL-h k CONTROL-f. - ðÏÓÍÏÔÒÉÔÅ, ËÁË ÔÅËÕÝÅÅ ÏËÎÏ ÓÏÖÍÅÔÓÑ, ËÏÇÄÁ ÎÏ×ÏÅ - ÐÏÑ×ÉÔÓÑ É ÏÔÏÂÒÁÚÉÔ ÄÏËÕÍÅÎÔÁÃÉÀ ÎÁ ËÏÍÁÎÄÕ CONTROL-f. + ðÏÓÍÏÔÒÉÔÅ, ËÁË ÔÅËÕÝÅÅ ÏËÎÏ ÓÏÖÍÅÔÓÑ, ËÏÇÄÁ ÎÏ×ÏÅ ÐÏÑ×ÉÔÓÑ É ÏÔÏÂÒÁÚÉÔ + ÄÏËÕÍÅÎÔÁÃÉÀ ÎÁ ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ CONTROL-f. >> îÁÂÅÒÉÔÅ C-x 1 É ÐÏÓÍÏÔÒÉÔÅ, ËÁË ÏËÎÏ Ó ÄÏËÕÍÅÎÔÁÃÉÅÊ ÉÓÞÅÚÎÅÔ. üÔÁ ËÏÍÁÎÄÁ ÏÔÌÉÞÁÅÔÓÑ ÏÔ ÄÒÕÇÉÈ ËÏÍÁÎÄ, ËÏÔÏÒÙÅ ×Ù ÉÚÕÞÉÌÉ, ÔÅÍ, ÞÔÏ ÏÎÁ ÓÏÓÔÏÉÔ ÉÚ Ä×ÕÈ ÓÉÍ×ÏÌÏ×. ïÎÁ ÎÁÞÉÎÁÅÔÓÑ ÓÏ ÚÎÁËÁ CONTROL-x. åÓÔØ ÃÅÌÙÊ ÎÁÂÏÒ ËÏÍÁÎÄ, ËÏÔÏÒÙÅ ÎÁÞÉÎÁÀÔÓÑ Ó CONTROL-x; ÍÎÏÇÉÅ ÉÚ ÎÉÈ ÒÁÂÏÔÁÀÔ Ó -ÏËÎÁÍÉ, ÂÕÆÅÒÁÍÉ, ÆÁÊÌÁÍÉ É ÁÎÁÌÏÇÉÞÎÙÍÉ ×ÅÝÁÍÉ. üÔÉ ËÏÍÁÎÄÙ ÉÍÅÀÔ ÄÌÉÎÕ 2, -3 ÉÌÉ 4 ÚÎÁËÁ. +ÏËÎÁÍÉ, ÂÕÆÅÒÁÍÉ, ÆÁÊÌÁÍÉ É ÁÎÁÌÏÇÉÞÎÙÍÉ ×ÅÝÁÍÉ. üÔÉ ËÏÍÁÎÄÙ ÓÏÓÔÏÑÔ ÉÚ +Ä×ÕÈ, ÔÒÅÈ ÉÌÉ ÞÅÔÙÒÅÈ ÚÎÁËÏ×. * ÷óôá÷ëá é õäáìåîéå -------------------- -åÓÌÉ ×Ù ÈÏÔÉÔÅ ×ÓÔÁ×ÉÔØ ÔÅËÓÔ, ÐÒÏÓÔÏ ÎÁÂÅÒÉÔÅ ÔÅËÓÔ. óÉÍ×ÏÌÙ, ËÏÔÏÒÙÅ ×Ù +åÓÌÉ ×Ù ÈÏÔÉÔÅ ×ÓÔÁ×ÉÔØ ÔÅËÓÔ, ÔÏ ÐÒÏÓÔÏ ÎÁÂÉÒÁÊÔÅ ÅÇÏ. óÉÍ×ÏÌÙ, ËÏÔÏÒÙÅ ×Ù ÍÏÖÅÔÅ ×ÉÄÅÔØ, ÔÁËÉÅ ËÁË A, 7, *, É ÐÒ. ÐÏÎÉÍÁÀÔÓÑ Emacs'ÏÍ ËÁË ÔÅËÓÔ É -×ÓÔÁ×ÌÑÀÔÓÑ ÎÅÍÅÄÌÅÎÎÏ. îÁÖÍÉÔÅ <Return> (ËÎÏÐËÁ ÐÅÒÅ×ÏÄÁ ËÁÒÅÔËÉ) ÄÌÑ -×ÓÔÁ×ËÉ ÓÉÍ×ÏÌÁ ÎÏ×ÏÊ ÓÔÒÏËÉ. +×ÓÔÁ×ÌÑÀÔÓÑ ÎÅÍÅÄÌÅÎÎÏ. îÁÖÍÉÔÅ <Return> (ËÎÏÐËÁ ÐÅÒÅ×ÏÄÁ ËÁÒÅÔËÉ) ÞÔÏÂÙ +×ÓÔÁ×ÉÔØ ÓÉÍ×ÏÌ ÎÏ×ÏÊ ÓÔÒÏËÉ. -÷Ù ÍÏÖÅÔÅ ÕÄÁÌÉÔØ ÐÏÓÌÅÄÎÉÊ ÎÁÂÒÁÎÎÙÊ ÓÉÍ×ÏÌ ÎÁÖÉÍÁÑ ËÌÁ×ÉÛÕ -<Delete>. ëÌÁ×ÉÛÁ <Delete> ÎÁ ËÌÁ×ÉÁÔÕÒÅ ÍÏÖÅÔ ÂÙÔØ ÏÂÏÚÎÁÞÅÎÁ ËÁË "Del". ÷ -ÎÅËÏÔÏÒÙÈ ÓÌÕÞÁÑÈ, ËÌÁ×ÉÛÁ "Backspace" ÒÁÂÏÔÁÅÔ ËÁË <Delete>, ÎÏ ÎÅ ×ÓÅÇÄÁ! +÷Ù ÍÏÖÅÔÅ ÕÄÁÌÉÔØ ÎÁÂÒÁÎÎÙÊ ÓÉÍ×ÏÌ ÎÁÖÉÍÁÑ ËÌÁ×ÉÛÕ <Delback>. <Delback> -- +ÜÔÏ ËÌÁ×ÉÛÁ ÎÁ ËÌÁ×ÉÁÔÕÒÅ, ËÏÔÏÒÕÀ ×Ù ÉÓÐÏÌØÚÕÅÔÅ É ×ÎÅ Emacs ÄÌÑ ÕÄÁÌÅÎÉÑ +ÐÏÓÌÅÄÎÅÇÏ ÎÁÂÒÁÎÎÏÇÏ ÓÉÍ×ÏÌÁ. ïÂÙÞÎÏ, ÜÔÏ ÂÏÌØÛÁÑ ËÌÁ×ÉÛÁ, ÒÁÓÐÏÌÏÖÅÎÎÁÑ +ÎÁ ÎÅÓËÏÌØËÏ ÓÔÒÏË ×ÙÛÅ ËÌÁ×ÉÛÉ <Return>; ÏÂÙÞÎÏ ÏÎÁ ÐÏÍÅÞÅÎÁ ËÁË "Delete", +"Del" ÉÌÉ "Backspace". -÷ ÏÓÎÏ×ÎÏÍ, <Delete> ÕÄÁÌÑÅÔ ÓÉÍ×ÏÌ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÏ ÐÅÒÅÄ ÔÅËÕÝÅÊ ÐÏÚÉÃÉÅÊ +åÓÌÉ ÂÏÌØÛÁÑ ËÌÁ×ÉÛÁ ÐÏÍÅÞÅÎÁ ËÁË "Backspace", ÔÏ ÜÔÏ ÔÏ, ÞÔÏ ×ÁÍ ÎÕÖÎÏ +ÉÓÐÏÌØÚÏ×ÁÔØ ÔÏÇÄÁ, ËÏÇÄÁ ×Ù ÂÕÄÅÔÅ ÞÉÔÁÔØ ÐÒÏ <Delback>. õ ×ÁÓ ÔÁËÖÅ ÍÏÖÅÔ +ÂÙÔØ ËÌÁ×ÉÛÁ, ÐÏÍÅÞÅÎÎÁÑ ËÁË "Delete", ÎÏ ÏÎÁ ÉÍÅÅÔ ÄÒÕÇÕÀ ÆÕÎËÃÉÀ, ÏÔÌÉÞÎÕÀ +ÏÔ <Delback>. + +÷ ÏÓÎÏ×ÎÏÍ, <Delback> ÕÄÁÌÑÅÔ ÓÉÍ×ÏÌ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÏ ÐÅÒÅÄ ÔÅËÕÝÅÊ ÐÏÚÉÃÉÅÊ ËÕÒÓÏÒÁ. ->> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ ÜÔÏ ÓÅÊÞÁÓ -- ÎÁÂÅÒÉÔÅ ÎÅÓËÏÌØËÏ ÓÉÍ×ÏÌÏ×, ÐÏÔÏÍ - ÕÄÁÌÉÔÅ ÉÈ ÎÁÖÉÍÁÑ <Delete> ÎÅÓËÏÌØËÏ ÒÁÚ. îÅ ×ÏÌÎÕÊÔÅÓØ Ï ÉÚÍÅÎÅÎÉÑÈ - ÜÔÏÇÏ ÆÁÊÌÁ; ×Ù ÎÅ ÉÚÍÅÎÑÅÔÅ ÇÌÁ×ÎÙÊ ÕÞÅÂÎÉË. üÔÏ ×ÁÛÁ ÌÉÞÎÁÑ ËÏÐÉÑ - ÕÞÅÂÎÉËÁ. +>> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ ÜÔÏ ÓÅÊÞÁÓ -- ÎÁÂÅÒÉÔÅ ÎÅÓËÏÌØËÏ ÓÉÍ×ÏÌÏ×, Á ÚÁÔÅÍ + ÕÄÁÌÉÔÅ ÉÈ ÎÁÖÉÍÁÑ <Delback>. îÅ ×ÏÌÎÕÊÔÅÓØ Ï ÉÚÍÅÎÅÎÉÑÈ ÜÔÏÇÏ ÆÁÊÌÁ -- + ×Ù ÎÅ ÉÚÍÅÎÑÅÔÅ ÇÌÁ×ÎÙÊ ÕÞÅÂÎÉË; ÜÔÏ ×ÁÛÁ ÌÉÞÎÁÑ ËÏÐÉÑ ÕÞÅÂÎÉËÁ. -ëÏÇÄÁ ÓÔÒÏËÁ ÔÅËÓÔÁ ÓÔÁÎÏ×ÉÔÓÑ ÓÌÉÛËÏÍ ÂÏÌØÛÏÊ ÄÌÑ ÓÔÒÏËÉ ÜËÒÁÎÁ, ÓÔÒÏËÁ -ÔÅËÓÔÁ "ÐÒÏÄÏÌÖÁÅÔÓÑ" ÎÁ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ. óÉÍ×ÏÌ "ÏÂÒÁÔÎÏÅ ÄÅÌÅÎÉÅ" -("\") (ÉÌÉ ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ ÏËÏÎÎÕÀ ÓÉÓÔÅÍÕ, ÔÏ ÍÁÌÅÎØËÁÑ ÉÚÏÇÎÕÔÁÑ -ÓÔÒÅÌËÁ) Ó ÐÒÁ×ÏÊ ÇÒÁÎÉÃÙ ÐÏËÁÚÙ×ÁÅÔ, ÞÔÏ ÓÔÒÏËÁ ÂÕÄÅÔ ÐÒÏÄÏÌÖÅÎÁ. +ëÏÇÄÁ ÓÔÒÏËÁ ÔÅËÓÔÁ ÓÔÁÎÏ×ÉÔÓÑ ÓÌÉÛËÏÍ ÂÏÌØÛÏÊ ÄÌÑ ÓÔÒÏËÉ ÜËÒÁÎÁ, ÔÏ ÏÎÁ +"ÐÒÏÄÏÌÖÁÅÔÓÑ" ÎÁ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ. óÉÍ×ÏÌ "ÏÂÒÁÔÎÙÊ ÓÌÜÛ" ("\") (ÉÌÉ +ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ ÏËÏÎÎÕÀ ÓÉÓÔÅÍÕ, ÔÏ ÜÔÏ ÂÕÄÅÔ ÚÎÁÞÏË × ×ÉÄÅ ÍÁÌÅÎØËÏÊ +ÉÚÏÇÎÕÔÏÊ ÓÔÒÅÌËÉ) Ó ÐÒÁ×ÏÊ ÇÒÁÎÉÃÙ ÐÏËÁÚÙ×ÁÅÔ, ÞÔÏ ÓÔÒÏËÁ ÂÕÄÅÔ +ÐÒÏÄÏÌÖÁÅÔÓÑ Ó ÐÒÅÄÙÄÕÝÅÊ ÓÔÒÏËÉ. ->> ÷×ÏÄÉÔÅ ÔÅËÓÔ, ÐÏËÁ ÎÅ ÄÏÓÔÉÇÎÉÔÅ ÐÒÁ×ÏÊ ÇÒÁÎÉÃÙ, É ÐÒÏÄÏÌÖÁÊÔÅ - ×ÓÔÁ×ËÕ. ÷Ù Õ×ÉÄÉÔÅ, ËÁË ÐÏÑ×ÉÔÓÑ ÓÉÍ×ÏÌ ÐÒÏÄÏÌÖÅÎÉÑ ÓÔÒÏËÉ. +>> ÷×ÏÄÉÔÅ ÔÅËÓÔ, ÐÏËÁ ÏÎ ÎÅ ÄÏÓÔÉÇÎÅÔ ÐÒÁ×ÏÊ ÇÒÁÎÉÃÙ, É ÐÒÏÄÏÌÖÁÊÔÅ ×ÓÔÁ×ËÕ + ÓÉÍ×ÏÌÏ×. ÷Ù Õ×ÉÄÉÔÅ, ËÁË ÐÏÑ×ÉÔÓÑ ÓÉÍ×ÏÌ ÐÒÏÄÏÌÖÅÎÉÑ ÓÔÒÏËÉ. ->> éÓÐÏÌØÚÕÊÔÅ <Delete> ÄÌÑ ÕÄÁÌÅÎÉÑ ÔÅËÓÔÁ, ÐÏËÁ ÓÔÒÏËÁ ÎÅ ÐÏÍÅÓÔÉÔÓÑ × - ÜËÒÁÎ ÓÎÏ×Á. óÉÍ×ÏÌ ÐÒÏÄÏÌÖÅÎÉÑ ÓÔÒÏËÉ ÉÓÞÅÚÎÅÔ. +>> éÓÐÏÌØÚÕÊÔÅ <Delback> ÄÌÑ ÕÄÁÌÅÎÉÑ ÔÅËÓÔÁ, ÄÏ ÔÅÈ ÐÏÒ, ÐÏËÁ ÓÔÒÏËÁ ÎÅ + ÐÏÍÅÓÔÉÔÓÑ × ÜËÒÁÎ ÓÎÏ×Á. óÉÍ×ÏÌ ÐÒÏÄÏÌÖÅÎÉÑ ÓÔÒÏËÉ ÉÓÞÅÚÎÅÔ Ó ÜËÒÁÎÁ. -íÏÖÎÏ ÕÄÁÌÑÔØ ÓÉÍ×ÏÌ ÎÏ×ÏÊ ÓÔÒÏËÉ ÔÏÞÎÏ ÔÁË ÖÅ, ËÁË É ÌÀÂÏÊ ÄÒÕÇÏÊ. õÄÁÌÅÎÉÅ -ÓÉÍ×ÏÌÁ ÎÏ×ÏÊ ÓÔÒÏËÉ ÍÅÖÄÕ Ä×ÕÍÑ ÓÔÒÏËÁÍÉ ÐÒÉ×ÅÄÅÔ Ë ÓËÌÅÊËÅ ÉÈ × ÏÄÎÕ. åÓÌÉ -ÐÏÌÕÞÅÎÎÁÑ ÓÔÒÏËÁ ÓÌÉÛËÏÍ ÄÌÉÎÎÁÑ, ÞÔÏÂÙ ×ÍÅÓÔÉÔØÓÑ × ÜËÒÁÎ, ÏÎÁ ÂÕÄÅÔ -ÏÔÏÂÒÁÖÅÎÁ ËÁË ÐÒÏÄÏÌÖÅÎÎÁÑ ÓÔÒÏËÁ. +óÉÍ×ÏÌ ÎÏ×ÏÊ ÓÔÒÏËÉ ÍÏÖÎÏ ÕÄÁÌÑÔØ ÔÏÞÎÏ ÔÁË ÖÅ, ËÁË É ÌÀÂÏÊ ÄÒÕÇÏÊ ÓÉÍ×ÏÌ. +õÄÁÌÅÎÉÅ ÓÉÍ×ÏÌÁ ÎÏ×ÏÊ ÓÔÒÏËÉ ÍÅÖÄÕ Ä×ÕÍÑ ÓÔÒÏËÁÍÉ ÐÒÉ×ÅÄÅÔ Ë ÉÈ ÓËÌÅÊËÅ × +ÏÄÎÕ. åÓÌÉ ÐÏÌÕÞÅÎÎÁÑ ÓÔÒÏËÁ ÂÕÄÅÔ ÓÌÉÛËÏÍ ÄÌÉÎÎÏÊ, ÞÔÏÂÙ ×ÍÅÓÔÉÔØÓÑ × +ÜËÒÁÎ, ÔÏ ÏÎÁ ÂÕÄÅÔ ÏÔÏÂÒÁÖÅÎÁ ËÁË ÓÔÒÏËÁ Ó ÐÒÏÄÏÌÖÅÎÉÅÍ, ËÁË ÜÔÏ ÂÙÌÏ +ÏÐÉÓÁÎÏ ×ÙÛÅ. ->> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ × ÎÁÞÁÌÏ ÓÔÒÏËÉ É ÎÁÖÍÉÔÅ <Delete>. üÔÏ ÓÏÅÄÉÎÉÔ +>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ × ÎÁÞÁÌÏ ÓÔÒÏËÉ É ÎÁÖÍÉÔÅ <Delback>. üÔÏ ÓÏÅÄÉÎÉÔ ÔÅËÕÝÕÀ ÓÔÒÏËÕ Ó ÐÒÅÄÙÄÕÝÅÊ. ->> îÁÖÍÉÔÅ <Return> ÄÌÑ ×ÓÔÁ×ËÉ ÓÉÍ×ÏÌÁ ÎÏ×ÏÊ ÓÔÒÏËÉ ÓÎÏ×Á, ×ÍÅÓÔÏ - ÕÄÁÌÅÎÎÏÇÏ ×ÁÍÉ. +>> îÁÖÍÉÔÅ <Return> ÄÌÑ ×ÓÔÁ×ËÉ ÎÏ×ÏÇÏ ÓÉÍ×ÏÌÁ ÓÔÒÏËÉ, ×ÍÅÓÔÏ ÕÄÁÌÅÎÎÏÇÏ + ×ÁÍÉ. ðÏÍÎÉÔÅ, ÞÔÏ ÍÎÏÇÉÅ ËÏÍÁÎÄÙ Emacs ÍÏÇÕÔ ÐÏÌÕÞÁÔØ ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÑ; ÐÒÏÓÔÙÅ -ÓÉÍ×ÏÌÙ ÎÅ Ñ×ÌÑÀÔÓÑ ÉÓËÌÀÞÅÎÉÅÍ. îÁÂÉÒÁÊÔÅ ÐÒÏÓÔÙÅ ÓÉÍ×ÏÌÙ, ×ÓÔÁ×ÌÑÑ ÉÈ ÐÏ -ÎÅÓËÏÌØËÏ ÚÁ ÏÄÉÎ ÒÁÚ. +ÓÉÍ×ÏÌÙ ÎÅ Ñ×ÌÑÀÔÓÑ ÉÓËÌÀÞÅÎÉÅÍ. ÷Ù ÍÏÖÅÔÅ ×ÓÔÁ×ÌÑÔØ ÐÏ ÎÅÓËÏÌØËÏ ÓÉÍ×ÏÌÏ×, +ÉÓÐÏÌØÚÕÑ ÓÞÅÔÞÉËÉ ÐÏ×ÔÏÒÅÎÉÊ. ->> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ ÜÔÏ -- ÎÁÂÅÒÉÔÅ C-u 8 * ÄÌÑ ×ÓÔÁ×ËÉ ********. +>> ðÏÐÒÏÂÕÊÔÅ ÐÒÏ×ÅÒÉÔØ ÜÔÏ -- ÎÁÂÅÒÉÔÅ C-u 8 * ÄÌÑ ×ÓÔÁ×ËÉ ********. -ôÅÐÅÒØ ×Ù ÎÁÕÞÉÌÉÓØ ÏÓÎÏ×ÎÏÍÕ ÓÐÏÓÏÂÕ ÎÁÂÒÁÔØ ÞÔÏ-ÎÉÂÕÄØ × Emacs É -ÉÓÐÒÁ×ÌÑÔØ ÏÛÉÂËÉ. ôÁËÖÅ ×Ù ÍÏÖÅÔÅ ÕÄÁÌÑÔØ ÓÌÏ×Á É ÓÔÒÏËÉ. úÄÅÓØ ÓÏÂÒÁÎÙ -ÏÐÅÒÁÃÉÉ ÕÄÁÌÅÎÉÑ: +ôÅÐÅÒØ ×Ù ÎÁÕÞÉÌÉÓØ ÏÓÎÏ×ÁÍ ÎÁÂÏÒÁ ÔÅËÓÔÁ × Emacs É ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂÏË. ÷Ù +ÔÁËÖÅ ÍÏÖÅÔÅ ÕÄÁÌÑÔØ ÓÌÏ×Á É ÓÔÒÏËÉ. úÄÅÓØ ÐÒÉ×ÅÄÅÎ ÓÐÉÓÏË ÏÐÅÒÁÃÉÊ +ÕÄÁÌÅÎÉÑ: - <Delete> ÕÄÁÌÉÔØ ÓÉÍ×ÏÌ ÐÅÒÅÄ ËÕÒÓÏÒÏÍ + <Delback> ÕÄÁÌÉÔØ ÓÉÍ×ÏÌ ÐÅÒÅÄ ËÕÒÓÏÒÏÍ C-d ÕÄÁÌÉÔØ ÓÉÍ×ÏÌ ÓÌÅÄÕÀÝÉÊ ÚÁ (ÎÁÄ) ËÕÒÓÏÒÏÍ - M-<Delete> õÂÉÔØ ÓÔÒÏËÕ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÏ ÐÅÒÅÄ ËÕÒÓÏÒÏÍ + M-<Delback> õÂÉÔØ ÓÔÒÏËÕ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÏ ÐÅÒÅÄ ËÕÒÓÏÒÏÍ M-d õÂÉÔØ ÓÌÏ×Ï ÓÌÅÄÕÀÝÅÅ ÚÁ ËÕÒÓÏÒÏÍ C-k õÂÉÔØ ×ÓÅ ÏÔ ËÕÒÓÏÒÁ ÄÏ ËÏÎÃÁ ÓÔÒÏËÉ M-k õÂÉÔØ ×ÓÅ ÄÏ ËÏÎÃÁ ÐÒÅÄÌÏÖÅÎÉÑ -úÁÍÅÔØÔÅ, ÞÔÏ <Delete> É C-d ÐÒÏÔÉ× M-<Delete> É M-d ÒÁÓÛÉÒÑÀÔ ÐÁÒÁÌÌÅÌØ, -ÎÁÞÁÔÕÀ C-f É M-f (ÄÁ, <Delete> ÜÔÏ ÎÅ ÒÅÁÌØÎÙÊ ÕÐÒÁ×ÌÑÀÝÉÊ ÓÉÍ×ÏÌ, ÎÏ ÎÅ -ÎÕÖÎÏ ×ÏÌÎÏ×ÁÔØÓÑ Ï ÜÔÏÍ). C-k É M-k, ËÁË É C-e É M-e, ÐÒÏ×ÏÄÑÔ ÐÁÒÁÌÌÅÌØ -ÍÅÖÄÕ ÓÔÒÏËÁÍÉ É ÐÒÅÄÌÏÖÅÎÉÑÍÉ. +úÁÍÅÔØÔÅ, ÞÔÏ <Delback> É C-d, ×ÍÅÓÔÅ Ó M-<Delback> É M-d ÒÁÓÛÉÒÑÀÔ +ÐÁÒÁÌÌÅÌØ, ÎÁÞÁÔÕÀ C-f É M-f (ÄÁ, <Delback> -- ÜÔÏ ÎÅ ÎÁÓÔÏÑÝÉÊ ÕÐÒÁ×ÌÑÀÝÉÊ +ÓÉÍ×ÏÌ, ÎÏ ÎÅ ÎÕÖÎÏ Ï ÜÔÏÍ ×ÏÌÎÏ×ÁÔØÓÑ). C-k É M-k, ËÁË É C-e É M-e, +ÐÒÏ×ÏÄÑÔ ÐÁÒÁÌÌÅÌØ ÍÅÖÄÕ ÓÔÒÏËÁÍÉ É ÐÒÅÄÌÏÖÅÎÉÑÍÉ. -÷Ù ÍÏÖÅÔÅ ÕÄÁÌÉÔØ ÌÀÂÕÀ ÞÁÓÔØ ÂÕÆÅÒÁ ÏÄÎÉÍ ÅÄÉÎÏÏÂÒÁÚÎÙÍ -ÍÅÔÏÄÏÍ. ðÅÒÅÍÅÓÔÉÔÅÓØ ÎÁ ÏÄÉÎ ÉÚ ËÏÎÃÏ× ÒÅÇÉÏÎÁ É ÎÁÂÅÒÉÔÅ type C-@ ÉÌÉ -C-SPC (ÏÄÎÕ ÉÚ ÎÉÈ). (SPC ÏÂÏÚÎÁÞÁÅÔ ËÌÁ×ÉÛÕ ÐÒÏÂÅÌÁ). ðÅÒÅÍÅÓÔÉÔÅÓØ ÎÁ -ÄÒÕÇÏÊ ËÏÎÅà ÒÅÇÉÏÎÁ É ÎÁÂÅÒÉÔÅ C-w. üÔÁ ÏÐÅÒÁÃÉÑ ÕÄÁÌÉÔ ×ÅÓØ ÔÅËÓÔ ÍÅÖÄÕ -Ä×ÕÍÑ ÕËÁÚÁÎÎÙÍÉ ÐÏÚÉÃÉÑÍÉ. +÷Ù ÍÏÖÅÔÅ ÕÄÁÌÉÔØ ÌÀÂÕÀ ÞÁÓÔØ ÂÕÆÅÒÁ ÏÄÎÉÍ ÍÅÔÏÄÏÍ. ðÅÒÅÍÅÓÔÉÔÅÓØ ÎÁ ÏÄÉÎ +ÉÚ ËÏÎÃÏ× ×ÙÂÒÁÎÎÏÊ ÏÂÌÁÓÔÉ É ÎÁÖÍÉÔÅ C-@ ÉÌÉ C-<SPC> (ÏÄÎÏ ÉÚ ÜÔÉÈ +ÓÏÞÅÔÁÎÉÊ). úÄÅÓØ <SPC> ÏÂÏÚÎÁÞÁÅÔ ËÌÁ×ÉÛÕ ÐÒÏÂÅÌÁ. ðÅÒÅÍÅÓÔÉÔÅÓØ ÎÁ ÄÒÕÇÏÊ +ËÏÎÅà ÏÂÌÁÓÔÉ É ÎÁÖÍÉÔÅ C-w. üÔÁ ÏÐÅÒÁÃÉÑ ÕÄÁÌÉÔ ×ÅÓØ ÔÅËÓÔ ÍÅÖÄÕ Ä×ÕÍÑ +ÕËÁÚÁÎÎÙÍÉ ÐÏÚÉÃÉÑÍÉ. ->> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ÂÕË×Å ÷ × ÎÁÞÁÌÏ ÐÒÅÄÙÄÕÝÅÇÏ ÐÁÒÁÇÒÁÆÁ. ->> îÁÂÅÒÉÔÅ C-SPC. Emacs ÄÏÌÖÅÎ ÏÔÏÂÒÁÚÉÔØ × ÎÉÖÎÅÊ ÞÁÓÔÉ ÜËÒÁÎÁ ÓÏÏÂÝÅÎÉÅ +>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ÂÕË×Å ÷ × ÎÁÞÁÌÅ ÐÒÅÄÙÄÕÝÅÇÏ ÐÁÒÁÇÒÁÆÁ. +>> îÁÂÅÒÉÔÅ C-<SPC>. Emacs ÄÏÌÖÅÎ ÏÔÏÂÒÁÚÉÔØ × ÎÉÖÎÅÊ ÞÁÓÔÉ ÜËÒÁÎÁ ÓÏÏÂÝÅÎÉÅ "Mark set". >> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ Ë ÂÕË×Å Ï × ÓÌÏ×Å "ËÏÎÃÏ×", ÎÁ ×ÔÏÒÏÊ ÓÔÒÏËÅ ÐÁÒÁÇÒÁÆÁ. @@ -393,411 +412,450 @@ ÞÔÏ "ÕÂÉÔÙÊ" ÔÅËÓÔ ÍÏÖÅÔ ÂÙÔØ ÚÁÎÏ×Ï ×ÓÔÁ×ÌÅÎ, × ÔÏ ×ÒÅÍÑ ËÁË "ÕÄÁÌÅÎÎÙÅ" ÞÁÓÔÉ ÎÅ ÍÏÇÕÔ ÂÙÔØ ×ÓÔÁ×ÌÅÎÙ. ÷ÓÔÁ×ËÁ "ÕÂÉÔÏÇÏ" ÔÅËÓÔÁ ÎÁÚÙ×ÁÅÔÓÑ "×ÏÓÓÔÁÎÏ×ÌÅÎÉÅ (yanking)". ÷ ÏÂÝÅÍ, ËÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÍÏÇÕÔ ÕÂÉÒÁÔØ ÂÏÌØÛÉÅ -ÞÁÓÔÉ ÔÅËÓÔÁ, ÕÂÉ×ÁÀÔ ÜÔÏÔ ÔÅËÓÔ (ÏÎÉ ÔÁË ÎÁÓÔÒÁÉ×ÁÀÔÓÑ ÔÁË, ÞÔÏ ×Ù ÍÏÖÅÔÅ +ÞÁÓÔÉ ÔÅËÓÔÁ, ÕÂÉ×ÁÀÔ ÜÔÏÔ ÔÅËÓÔ (ÏÎÉ ÎÁÓÔÒÁÉ×ÁÀÔÓÑ ÔÁË, ÞÔÏ ×Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÔÅËÓÔ), × ÔÏ ×ÒÅÍÑ ËÁË ËÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÕÂÉÒÁÀÔ ÔÏÌØËÏ ÏÄÉÎ -ÓÉÍ×ÏÌ, ÉÌÉ ÔÏÌØËÏ ÐÕÓÔÙÅ ÓÔÒÏËÉ É ÐÒÏÂÅÌØÎÙÅ ÓÉÍ×ÏÌÙ, ×ÙÐÏÌÎÑÀÔ ÕÄÁÌÅÎÉÅ -(ÔÁË ÞÔÏ ×Ù ÎÅ ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÔÅËÓÔ). +ÓÉÍ×ÏÌ, ÉÌÉ ÕÄÁÌÑÀÔ ÔÏÌØËÏ ÐÕÓÔÙÅ ÓÔÒÏËÉ É ÐÒÏÂÅÌØÎÙÅ ÓÉÍ×ÏÌÙ, ×ÙÐÏÌÎÑÀÔ +ÏÐÅÒÁÃÉÀ ÕÄÁÌÅÎÉÑ (ÔÁË ÞÔÏ ×Ù ÎÅ ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÔÅËÓÔ). ->> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÎÁÞÁÌÏ ÎÅÐÕÓÔÏÊ ÓÔÒÏËÉ. ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-k, ÞÔÏÂÙ +>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÎÁÞÁÌÏ ÎÅ ÐÕÓÔÏÊ ÓÔÒÏËÉ. ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-k, ÞÔÏÂÙ ÕÂÉÔØ ÔÅËÓÔ × ÜÔÏÊ ÓÔÒÏËÅ. ->> îÁÖÍÉÔÅ C-k ÅÝÅ ÒÁÚ. ÷Ù ×ÉÄÉÔÅ, ÞÔÏ ÜÔÏ ÕÂØÅÔ ÓÉÍ×ÏÌ ÎÏ×ÏÊ ÓÔÒÏËÉ - ÓÌÅÄÕÀÝÉÊ ÚÁ ÜÔÏÊ ÓÔÒÏËÏÊ. +>> îÁÖÍÉÔÅ C-k ÅÝÅ ÒÁÚ. ÷Ù ×ÉÄÉÔÅ, ÞÔÏ ÜÔÏ ÄÅÊÓÔ×ÉÅ ÕÂØÅÔ ÓÉÍ×ÏÌ ÎÏ×ÏÊ + ÓÔÒÏËÉ, ËÏÔÏÒÙÊ ÓÌÅÄÕÅÔ ÚÁ ÜÔÏÊ ÓÔÒÏËÏÊ. -úÁÍÅÔØÔÅ, ÞÔÏ ÐÅÒ×ÏÅ C-k ÕÂÉ×ÁÅÔ ÓÏÄÅÒÖÉÍÏÅ ÓÔÒÏËÉ, Á ×ÔÏÒÏÅ C-k ÕÂÉ×ÁÅÔ -ÓÁÍÕ ÓÔÒÏËÕ É ÐÏÄÎÉÍÁÅÔ ÄÒÕÇÉÅ ÓÔÒÏËÉ ××ÅÒÈ. C-k ÏÂÒÁÂÁÔÙ×ÁÅÔ ÞÉÓÌÏ×ÏÊ -ÁÒÇÕÍÅÎÔ ÓÐÅÃÉÁÌØÎÙÍ ÏÂÒÁÚÏÍ: ÕÂÉ×ÁÅÔ ÓÔÏÌØËÏ ÓÔÒÏË _é_ ÉÈ ÓÏÄÅÒÖÉÍÏÅ. üÔÏ ÎÅ -ÐÒÏÓÔÏ ÐÏ×ÔÏÒÅÎÉÅ. C-u 2 C-k ÕÄÁÌÉÔ Ä×Å ÓÔÒÏÉ É ÚÁ×ÅÒÛÁÀÝÉÅ ÉÈ ÓÉÍ×ÏÌÙ ÎÏ×ÏÊ -ÓÔÒÏËÉ; ××ÏÄ C-k Ä×Á ÒÁÚÁ ÎÅ ÓÄÅÌÁÅÔ ÜÔÏÇÏ. +úÁÍÅÔØÔÅ, ÞÔÏ ÐÅÒ×ÏÅ ×ÙÐÏÌÎÅÎÉÅ C-k ÕÂÉ×ÁÅÔ ÓÏÄÅÒÖÉÍÏÅ ÓÔÒÏËÉ, Á ×ÔÏÒÏÊ +×ÙÚÏ× C-k ÕÂÉ×ÁÅÔ ÓÁÍÕ ÓÔÒÏËÕ É ÐÏÄÎÉÍÁÅÔ ÄÒÕÇÉÅ ÓÔÒÏËÉ ××ÅÒÈ. C-k +ÏÂÒÁÂÁÔÙ×ÁÅÔ ÞÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÓÐÅÃÉÁÌØÎÙÍ ÏÂÒÁÚÏÍ -- ÕÂÉ×ÁÅÔ ÚÁÄÁÎÎÏÅ +ËÏÌÉÞÅÓÔ×Ï ÓÔÒÏË _é_ ÉÈ ÓÏÄÅÒÖÉÍÏÅ. üÔÏ ÎÅ ÐÒÏÓÔÏ ÐÏ×ÔÏÒÅÎÉÅ ËÏÍÁÎÄÙ. C-u 2 +C-k ÕÄÁÌÉÔ Ä×Å ÓÔÒÏËÉ, Á ÔÁËÖÅ ÚÁ×ÅÒÛÁÀÝÉÅ ÉÈ ÓÉÍ×ÏÌÙ ÎÏ×ÏÊ ÓÔÒÏËÉ; +Ä×ÕÈÒÁÚÏ×ÏÅ ×ÙÐÏÌÎÅÎÉÅ C-k ÎÅ ÓÄÅÌÁÅÔ ÜÔÏÇÏ. -÷ÏÚ×ÒÁÔ ÎÁÚÁÄ ÕÂÉÔÏÇÏ ÔÅËÓÔÁ ÎÁÚÙ×ÁÅÔÓÑ "×ÏÓÓÔÁÎÏ×ÌÅÎÉÅ (yanking)". (äÕÍÁÊÔÅ +÷ÏÚ×ÒÁÔ ÕÂÉÔÏÇÏ ÒÁÎÅÅ ÔÅËÓÔÁ ÎÁÚÙ×ÁÅÔÓÑ "×ÏÓÓÔÁÎÏ×ÌÅÎÉÅ (yanking)". (äÕÍÁÊÔÅ Ï ÜÔÏÍ, ËÁË Ï ×ÏÓÓÔÁÎÏ×ÌÅÎÉÉ ÉÌÉ ÐÏÍÅÝÅÎÉÉ ÎÁÚÁÄ, ÎÅËÏÔÏÒÏÇÏ ×ÚÑÔÏÇÏ -ÔÅËÓÔÁ). ÷Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ × ÔÏÍ ÖÅ ÍÅÓÔÅ, ÉÌÉ × ÌÀÂÏÊ -ÄÒÕÇÏÊ ÔÏÞËÅ ÂÕÆÅÒÁ, ÉÌÉ ÄÁÖÅ × ÄÒÕÇÏÍ ÆÁÊÌÅ. ÷Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÔÅËÓÔ -ÎÅÓËÏÌØËÏ ÒÁÚ É ÐÏÌÕÞÉÔØ ÍÎÏÇÏ ËÏÐÉÊ. +ÔÅËÓÔÁ). ÷Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ × ÍÅÓÔÅ ÕÄÁÌÅÎÉÑ, ÉÌÉ × +ÌÀÂÏÊ ÄÒÕÇÏÊ ÔÏÞËÅ ÒÅÄÁËÔÉÒÕÅÍÏÇÏ ÔÅËÓÔÁ, ÉÌÉ ÄÁÖÅ × ÄÒÕÇÏÍ ÆÁÊÌÅ. ÷Ù +ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÔÅËÓÔ ÎÅÓËÏÌØËÏ ÒÁÚ É ÐÏÌÕÞÉÔØ ÎÅÓËÏÌØËÏ ËÏÐÉÊ ÄÁÎÎÏÇÏ +ÔÅËÓÔÁ. -ëÏÍÁÎÄÏÊ ÄÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ÔÅËÓÔÁ Ñ×ÌÑÅÔÓÑ C-y. ïÎÁ ×ÏÓÓÔÁÎÁ×ÌÉ×ÁÅÔ -ÐÏÓÌÅÄÎÉÊ ÕÂÉÔÙÊ ÔÅËÓÔ × ÍÅÓÔÏ ÒÁÓÐÏÌÏÖÅÎÉÅ ËÕÒÓÏÒÁ. - ->> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ ÜÔÏ; ÎÁÂÅÒÉÔÅ C-y, ÞÔÏÂÙ ×ÅÒÎÕÔØ ÔÅËÓÔ ÎÁÚÁÄ. +äÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ÕÂÉÔÏÇÏ ÔÅËÓÔÁ ÉÓÐÏÌØÚÕÅÔÓÑ ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ C-y. äÁÎÎÁÑ +ËÏÍÁÎÄÁ ×ÏÓÓÔÁÎÁ×ÌÉ×ÁÅÔ ÐÏÓÌÅÄÎÉÊ ÕÂÉÔÙÊ ÔÅËÓÔ × ÔÏÞËÅ ÒÁÓÐÏÌÏÖÅÎÉÑ ËÕÒÓÏÒÁ. -ðÏÍÎÉÔÅ, ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÏ×ÁÌÉ ÎÅÓËÏÌØËÏ ËÏÍÁÎÄ C-k × ÓÔÒÏËÅ, ×ÓÅ ÕÂÉÔÙÅ -ÓÔÒÏËÉ ÂÕÄÕÔ ÓÏÈÒÁÎÅÎÙ ×ÍÅÓÔÅ ÔÁË, ÞÔÏ C-y ×ÏÓÓÔÁÎÏ×ÉÔ ÉÈ ×ÍÅÓÔÅ. - ->> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ ÜÔÏ ÓÅÊÞÁÓ, ÎÁÖÍÉÔÅ C-k ÎÅÓËÏÌØËÏ ÒÁÚ. +>> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ ÜÔÕ ËÏÍÁÎÄÕ -- ÎÁÂÅÒÉÔÅ C-y, ÞÔÏÂÙ ×ÅÒÎÕÔØ ÔÅËÓÔ + ÎÁÚÁÄ. -ôÅÐÅÒØ ×ÅÒÎÅÍ ÜÔÏÔ ÕÂÉÔÙÊ ÔÅËÓÔ: +ðÏÍÎÉÔÅ, ÞÔÏ ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÏ×ÁÌÉ ÎÅÓËÏÌØËÏ ËÏÍÁÎÄ C-k × ÏÄÎÏÊ ÓÔÒÏËÅ, ÔÏ +×ÓÅ ÕÂÉÔÙÅ ÓÔÒÏËÉ ÂÕÄÕÔ ÓÏÈÒÁÎÅÎÙ ×ÍÅÓÔÅ, ÔÁË, ÞÔÏ C-y ÔÁËÖÅ ×ÏÓÓÔÁÎÏ×ÉÔ ÉÈ +×ÍÅÓÔÅ. ->> îÁÖÍÉÔÅ C-y. ôÅÐÅÒØ ÐÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÎÅÓËÏÌØËÏ ÓÔÒÏË ×ÎÉÚ, É ÓÎÏ×Á - ÎÁÖÍÉÔÅ C-y. óÅÊÞÁÓ ×Ù ×ÉÄÉÔÅ ËÁË ÍÏÖÎÏ ÓËÏÐÉÒÏ×ÁÔØ ÎÅËÏÔÏÒÙÊ ÔÅËÓÔ. +>> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ ÜÔÏ ÓÅÊÞÁÓ -- ÎÁÖÍÉÔÅ C-k ÎÅÓËÏÌØËÏ ÒÁÚ. + +ôÅÐÅÒØ ×ÅÒÎÅÍ ÕÂÉÔÙÊ ÔÅËÓÔ: -þÔÏ ÄÅÌÁÔØ, ÅÓÌÉ ÅÓÔØ ÎÅËÏÔÏÒÙÊ ÔÅËÓÔ, ËÏÔÏÒÙÊ ×Ù ÈÏÔÉÔÅ ×ÅÒÎÕÔØ ÎÁÚÁÄ É -ÐÏÔÏÍ ÕÂÉÔØ ÞÔÏ-ÔÏ ÅÝÅ? C-y ×ÅÒÎÅÔ ÎÅ ÂÏÌÅÅ ÞÅÍ ÐÏÓÌÅÄÎÉÊ ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ. -îÏ ÐÒÅÄÙÄÕÝÉÊ ÔÅËÓÔ ÎÅ ÂÕÄÅÔ ÐÏÔÅÒÑÎ. ÷Ù ÓÍÏÖÅÔÅ ÅÇÏ ×ÅÒÎÕÔØ ÎÁÚÁÄ, ÉÓÐÏÌØÚÕÑ -ËÏÍÁÎÄÕ M-y. ðÏÓÌÅ ÔÏÇÏ, ËÁË ×Ù ×ÅÒÎÕÌÉ ÐÏÓÌÅÄÎÉÊ ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ, ÎÁÖÍÉÔÅ -M-y, É ÚÁÍÅÎÉÔÅ ÜÔÏÔ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÔÅËÓÔ ÔÅÍ, ËÏÔÏÒÙÊ ÂÙÌ ÕÂÉÔ ÒÁÎÅÅ. -îÁÖÁÔÉÅ M-y ÓÎÏ×Á É ÓÎÏ×Á ÂÕÄÅÔ ×ÏÚ×ÒÁÝÁÔØ ÒÁÎÅÅ ÕÂÉÔÙÊ ÔÅËÓÔ. ëÏÇÄÁ ×Ù -ÄÏÓÔÉÇÎÉÔÅ ÉÓËÏÍÏÇÏ ÔÅËÓÔÁ, ×ÁÍ ÎÅ ÎÕÖÎÏ ÄÅÌÁÔØ ÎÉÞÅÇÏ ÂÏÌÅÅ ÞÔÏÂÙ ÓÏÈÒÁÎÉÔØ -ÅÇÏ. ðÒÏÓÔÏ ÐÒÏÄÏÌÖÁÊÔÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ, ÏÓÔÁ×É× ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÔÅËÓÔ ÔÁÍ, -ÇÄÅ ÏÎ ÅÓÔØ. +>> îÁÖÍÉÔÅ C-y. ôÅÐÅÒØ ÐÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÎÅÓËÏÌØËÏ ÓÔÒÏË ×ÎÉÚ, É ÓÎÏ×Á + ÎÁÖÍÉÔÅ C-y. óÅÊÞÁÓ ×Ù ×ÉÄÉÔÅ ËÁË ÍÏÖÎÏ ÓËÏÐÉÒÏ×ÁÔØ ÎÅËÏÔÏÒÙÊ ÔÅËÓÔ. + +þÔÏ ÄÅÌÁÔØ, ÅÓÌÉ ÅÓÔØ ÎÅËÏÔÏÒÙÊ ÔÅËÓÔ, ËÏÔÏÒÙÊ ×Ù ÈÏÔÉÔÅ ×ÅÒÎÕÔØ ÎÁÚÁÄ, Á +ÐÏÔÏÍ ÕÂÉÔØ ÞÔÏ-ÔÏ ÅÝÅ? ïÄÎÏ ÎÁÖÁÔÉÅ C-y ×ÅÒÎÅÔ ÔÏÌØËÏ ÐÏÓÌÅÄÎÉÊ ÕÄÁÌÅÎÎÙÊ +ÔÅËÓÔ. îÏ ÐÒÅÄÙÄÕÝÉÊ ÔÅËÓÔ ÎÅ ÂÕÄÅÔ ÐÏÔÅÒÑÎ -- ×Ù ÓÍÏÖÅÔÅ ÅÇÏ ×ÅÒÎÕÔØ +ÎÁÚÁÄ, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ M-y. ðÏÓÌÅ ÔÏÇÏ, ËÁË ×Ù ×ÅÒÎÕÌÉ ÐÏÓÌÅÄÎÉÊ +ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ, ÎÁÖÍÉÔÅ M-y, É ÚÁÍÅÎÉÔÅ ÜÔÏÔ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÔÅËÓÔ ÔÅÍ, +ËÏÔÏÒÙÊ ÂÙÌ ÕÂÉÔ ÒÁÎÅÅ. îÁÖÉÍÁÑ M-y ÓÎÏ×Á É ÓÎÏ×Á, ×Ù ÂÕÄÅÔÅ ×ÏÚ×ÒÁÝÁÔØ +ÒÁÎÅÅ ÕÂÉÔÙÅ ÞÁÓÔÉ ÔÅËÓÔÁ. ëÏÇÄÁ ×Ù ÄÏÓÔÉÇÎÉÔÅ ÉÓËÏÍÏÇÏ ÔÅËÓÔÁ, ÔÏ ×ÁÍ ÎÅ +ÎÕÖÎÏ ÄÅÌÁÔØ ÎÉÞÅÇÏ ÞÔÏÂÙ ÓÏÈÒÁÎÉÔØ ÅÇÏ. ðÒÏÓÔÏ ÐÒÏÄÏÌÖÁÊÔÅ ÒÁÂÏÔÁÔØ, +ÏÓÔÁ×É× ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÔÅËÓÔ ÔÁÍ, ÇÄÅ ÏÎ ÅÓÔØ. îÁÖÉÍÁÑ M-y ÄÏÓÔÁÔÏÞÎÏÅ ÞÉÓÌÏ ÒÁÚ, ×Ù ÍÏÖÅÔÅ ×ÅÒÎÕÔØÓÑ × ÎÁÞÁÌØÎÕÀ ÔÏÞËÕ (ÎÁÉÂÏÌÅÅ ÒÁÎÎÅÅ ÕÄÁÌÅÎÉÅ). ->> õÂÅÊÔÅ ÓÔÒÏËÕ, ÐÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ×ÏËÒÕÇ ÜÔÏÊ ÔÏÞËÉ, ÐÏÔÏÍ ÕÄÁÌÉÔÅ ÅÝÅ - ÏÄÎÕ ÓÔÒÏËÕ. úÁÔÅÍ ÉÓÐÏÌØÚÕÊÔÅ C-y ÄÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ×ÔÏÒÏÊ ÕÂÉÔÏÊ - ÓÔÒÏËÉ. úÁÔÅÍ ÉÓÐÏÌØÚÕÊÔÅ M-y, É ÏÎÁ ÂÕÄÅÔ ÚÁÍÅÎÅÎÁ ÐÅÒ×ÏÊ ÕÂÉÔÏÊ - ÓÔÒÏËÏÊ. îÁÖÍÉÔÅ M-y ÅÝÅ ÎÅÓËÏÌØËÏ ÒÁÚ, ÞÔÏÂÙ Õ×ÉÄÅÔØ ÐÏÌÕÞÅÎÎÙÊ - ÒÅÚÕÌØÔÁÔ. ðÒÏÄÏÌÖÁÊÔÅ ÄÅÌÁÔØ ÜÔÏ, ÐÏËÁ ×ÔÏÒÁÑ ÕÂÉÔÁÑ ÓÔÒÏËÁ ÎÅ ×ÅÒÎÅÔÓÑ, - É ÅÝÅ ÞÕÔØ-ÞÕÔØ. åÓÌÉ ×ÁÍ ÈÏÞÅÔÓÑ, ÔÏ ×Ù ÍÏÖÅÔÅ ÚÁÄÁ×ÁÔØ ÄÌÑ M-y - ÐÏÌÏÖÉÔÅÌØÎÙÅ É ÏÔÒÉÃÁÔÅÌØÎÙÅ ÁÒÇÕÍÅÎÔÙ. +>> õÂÅÊÔÅ ÓÔÒÏËÕ, ÐÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ, É ÕÄÁÌÉÔÅ ÅÝÅ ÏÄÎÕ ÓÔÒÏËÕ. úÁÔÅÍ + ÉÓÐÏÌØÚÕÊÔÅ C-y ÄÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ×ÔÏÒÏÊ ÕÂÉÔÏÊ ÓÔÒÏËÉ, Á ÚÁÔÅÍ ÎÁÖÍÉÔÅ + M-y, É ÏÎÁ ÂÕÄÅÔ ÚÁÍÅÎÅÎÁ ÐÅÒ×ÏÊ ÕÂÉÔÏÊ ÓÔÒÏËÏÊ. îÁÖÍÉÔÅ M-y ÅÝÅ + ÎÅÓËÏÌØËÏ ÒÁÚ, ÞÔÏÂÙ Õ×ÉÄÅÔØ ÐÏÌÕÞÅÎÎÙÊ ÒÅÚÕÌØÔÁÔ. ðÒÏÄÏÌÖÁÊÔÅ ×ÙÐÏÌÎÑÔØ + ÜÔÕ ËÏÍÁÎÄÕ ÄÏ ÔÅÈ ÐÏÒ, ÐÏËÁ ×ÔÏÒÁÑ ÕÂÉÔÁÑ ÓÔÒÏËÁ ÎÅ ÂÕÄÅÔ ×ÏÓÓÔÁÎÏ×ÌÅÎÁ + ÓÎÏ×Á. åÓÌÉ ×ÁÍ ÈÏÞÅÔÓÑ, ÔÏ ×Ù ÍÏÖÅÔÅ ÚÁÄÁ×ÁÔØ ÐÏÌÏÖÉÔÅÌØÎÙÅ É + ÏÔÒÉÃÁÔÅÌØÎÙÅ ÁÒÇÕÍÅÎÔÙ ÄÌÑ ËÏÍÁÎÄÙ M-y. * ïôíåîá (UNDO) --------------- -åÓÌÉ ×Ù ÓÄÅÌÁÌÉ ÉÚÍÅÎÅÎÉÑ × ÔÅËÓÔÅ, É ÒÅÛÉÌÉ, ÞÔÏ ÏÛÉÂÌÉÓØ, ÍÏÖÅÔÅ -ÏÔÍÅÎÉÔØ ÉÚÍÅÎÅÎÉÑ ËÏÍÁÎÄÏÊ "ÏÔÍÅÎÁ", C-x u. +åÓÌÉ ×Ù ÓÄÅÌÁÌÉ ÉÚÍÅÎÅÎÉÑ × ÔÅËÓÔÅ, É ÒÅÛÉÌÉ, ÞÔÏ ÏÛÉÂÌÉÓØ, ÔÏ ×Ù ÍÏÖÅÔÅ +ÏÔÍÅÎÉÔØ ÉÚÍÅÎÅÎÉÑ Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ "ÏÔÍÅÎÁ", ËÏÔÏÒÁÑ ÐÒÉ×ÑÚÁÎÁ Ë ÓÏÞÅÔÁÎÉÀ +ËÌÁ×ÉÛ C-x u. ïÂÙÞÎÏ, C-x u ÏÔÍÅÎÑÅÔ ÉÚÍÅÎÅÎÉÑ, ÓÄÅÌÁÎÎÙÅ ÏÄÎÏÊ ËÏÍÁÎÄÏÊ; ÅÓÌÉ ÐÏ×ÔÏÒÉÔØ -C-x u ÎÅÓËÏÌØËÏ ÒÁÚ ÐÏÄÒÑÄ, ËÁÖÄÙÊ ÒÁÚ ÂÕÄÅÔ ÏÔÍÅÎÑÔØÓÑ ÅÝÅ ÏÄÎÁ ËÏÍÁÎÄÁ. +C-x u ÎÅÓËÏÌØËÏ ÒÁÚ ÐÏÄÒÑÄ, ÔÏ ËÁÖÄÙÊ ÒÁÚ ÂÕÄÅÔ ÏÔÍÅÎÑÔØÓÑ ÅÝÅ ÏÄÎÁ ËÏÍÁÎÄÁ. -îÏ ÅÓÔØ Ä×Á ÉÓËÌÀÞÅÎÉÑ: ËÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÎÅ ÉÚÍÅÎÑÀÔ ÔÅËÓÔ, ÎÅ ÕÞÉÔÙ×ÁÀÔÓÑ -(ÜÔÏ ×ËÌÀÞÁÅÔ ËÏÍÁÎÄÙ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ É ÐÒÏËÒÕÔËÉ), É ÓÁÍÏ×ÓÔÁ×ÌÑÀÝÉÅÓÑ -(self-inserting) ÓÉÍ×ÏÌÙ ÏÂÒÁÂÁÔÙ×ÁÀÔÓÑ ÇÒÕÐÐÁÍÉ ÄÏ 20. (üÔÏ ÕÍÅÎØÛÁÅÔ -ÞÉÓÌÏ C-x u ËÏÔÏÒÙÅ ×Ù ÍÏÖÅÔÅ ÎÁÂÒÁÔØ ÄÌÑ ÏÔÍÅÎÙ ××ÏÄÁ ÔÅËÓÔÁ). +îÏ ÅÓÔØ Ä×Á ÉÓËÌÀÞÅÎÉÑ -- ËÏÍÁÎÄÙ ÎÅ ÉÚÍÅÎÑÀÝÉÅ ÔÅËÓÔ, ÎÅ ÕÞÉÔÙ×ÁÀÔÓÑ (ÓÀÄÁ +×ËÌÀÞÁÅÔÓÑ ËÏÍÁÎÄÙ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ É ÐÒÏËÒÕÔËÉ), É ËÏÍÁÎÄÙ ×ÓÔÁ×ËÉ +ÓÉÍ×ÏÌÏ× ÏÂÒÁÂÁÔÙ×ÁÀÔÓÑ ÇÒÕÐÐÁÍÉ ÄÏ 20 ÓÉÍ×ÏÌÏ×. (üÔÏ ÕÍÅÎØÛÁÅÔ ÞÉÓÌÏ +ÎÁÖÁÔÉÊ C-x u ËÏÔÏÒÙÅ ×ÁÍ ÎÕÖÎÏ ÂÕÄÅÔ ÎÁÂÒÁÔØ ÄÌÑ ÏÔÍÅÎÙ ××ÏÄÁ ÔÅËÓÔÁ). ->> õÂÅÊÔÅ ÜÔÕ ÓÔÒÏËÕ ÉÓÐÏÌØÚÕÑ C-k, ÚÁÔÅÍ ÎÁÂÅÒÉÔÅ C-x u É ÏÎÁ ÄÏÌÖÎÁ +>> õÂÅÊÔÅ ÜÔÕ ÓÔÒÏËÕ Ó ÐÏÍÏÝØÀ C-k, Á ÚÁÔÅÍ ÎÁÂÅÒÉÔÅ C-x u É ÓÔÒÏËÁ ÄÏÌÖÎÁ ×ÅÒÎÕÔØÓÑ ÎÁÚÁÄ. -C-_ ÁÌØÔÅÒÎÁÔÉ×ÎÁÑ ËÏÍÁÎÄÁ ÏÔÍÅÎÙ; ÏÎÁ ÒÁÂÏÔÁÅÔ ÔÁËÖÅ ËÁË É C-x u, ÎÏ ÌÅÇÞÅ -× ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÎÅÓËÏÌØËÏ ÒÁÚ ÐÏÄÒÑÄ. îÅÕÄÏÂÎÏÅ ÐÏÌÏÖÅÎÉÅ C-_ ÎÁ ÎÅËÏÔÏÒÙÈ -ËÌÁ×ÉÁÔÕÒÁÈ ÄÅÌÁÅÔ ÎÅÏÞÅ×ÉÄÎÙÍ ÓÐÏÓÏ ÅÅ ÎÁÂÏÒÁ. ðÏÜÔÏÍÕ ÍÙ ÐÒÅÄÌÁÇÁÅÍ -ÉÓÐÏÌØÚÏ×ÁÔØ C-x u. îÁ ÎÅËÏÔÏÒÙÈ ÔÅÒÍÉÎÁÌÁÈ, ×Ù ÍÏÖÅÔÅ ÎÁÂÉÒÁÔØ C-_, ÎÁÖÉÍÁÑ -/ É ÕÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ CONTROL. +C-_ -- ÜÔÏ ÅÝÅ ËÏÍÁÎÄÁ ÏÔÍÅÎÙ; ÏÎÁ ÒÁÂÏÔÁÅÔ ÔÏÞÎÏ ÔÁËÖÅ ËÁË É C-x u, ÎÏ +ÌÅÇÞÅ × ÉÓÐÏÌØÚÏ×ÁÎÉÉ, ÅÓÌÉ ×ÁÍ ÎÕÖÎÏ ×ÙÐÏÌÎÉÔØ ÅÅ ÎÅÓËÏÌØËÏ ÒÁÚ +ÐÏÄÒÑÄ. îÅÕÄÏÂÎÏÅ ÐÏÌÏÖÅÎÉÅ C-_ ÎÁ ÎÅËÏÔÏÒÙÈ ËÌÁ×ÉÁÔÕÒÁÈ ÄÅÌÁÅÔ ÎÅ ÏÞÅ×ÉÄÎÙÍ +ÓÐÏÓÏ ÅÅ ÎÁÂÏÒÁ. ðÏÜÔÏÍÕ ÍÙ ÐÒÅÄÌÁÇÁÅÍ ÉÓÐÏÌØÚÏ×ÁÔØ C-x u. îÁ ÎÅËÏÔÏÒÙÈ +ÔÅÒÍÉÎÁÌÁÈ, ×Ù ÍÏÖÅÔÅ ÎÁÂÉÒÁÔØ C-_, ÎÁÖÉÍÁÑ / É ÕÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ CONTROL. -þÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÄÌÑ C-_ ÉÌÉ C-x u ÒÁÂÏÔÁÅÔ ËÁË ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÑ. +þÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÄÌÑ C-_ ÉÌÉ C-x u ÉÓÐÏÌØÚÕÅÔÓÑ ËÁË ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÊ. -÷Ù ÍÏÖÅÔÅ ÏÔÍÅÎÉÔØ ÕÄÁÌÅÎÉÅ ÔÅËÓÔÁ ÔÏÞÎÏ ÔÁË ÖÅ, ËÁË ÏÔÍÅÎÕ ÕÂÉÔÉÑ -ÔÅËÓÔÁ. ïÔÌÉÞÉÅ ÍÅÖÄÕ ÕÂÉÊÓÔ×ÏÍ É ÕÄÁÌÅÎÉÅÍ ÞÅÇÏ-ÌÉÂÏ ÚÁËÌÀÞÁÅÔÓÑ × ÔÏÍ, ÞÔÏ -×Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÕÂÉÔÙÊ ÔÅËÓÔ Ó ÐÏÍÏÝØÀ C-y; ÎÏ ÜÔÏ ÎÅ ÄÅÌÁÅÔ ÒÁÚÌÉÞÉÊ -ÄÌÑ ÏÔÍÅÎÙ. +÷Ù ÍÏÖÅÔÅ ÏÔÍÅÎÉÔØ ÕÄÁÌÅÎÉÅ ÔÅËÓÔÁ ÔÏÞÎÏ ÔÁË ÖÅ, ËÁË É ÏÔÍÅÎÕ ÕÂÉÔÉÑ ÔÅËÓÔÁ. +ïÔÌÉÞÉÅ ÍÅÖÄÕ ÕÂÉÊÓÔ×ÏÍ É ÕÄÁÌÅÎÉÅÍ ÞÅÇÏ-ÌÉÂÏ ÚÁËÌÀÞÁÅÔÓÑ × ÔÏÍ, ÞÔÏ ×Ù +ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÕÂÉÔÙÊ ÔÅËÓÔ Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ C-y; ÎÏ ÄÌÑ ËÏÍÁÎÄÙ +ÏÔÍÅÎÙ ÎÅÔ ÎÉËÁËÏÊ ÒÁÚÎÉÃÙ ÍÅÖÄÕ ÜÔÉÍÉ ÏÐÅÒÁÃÉÑÍÉ. * æáêìù ------- -þÔÏÂÙ ÓÏÚÄÁÎÎÙÊ ÔÅËÓÔ ÍÏÖÎÏ ÂÙÌÏ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÐÏÚÖÅ, ×Ù ÄÏÌÖÎÙ ÅÇÏ -ÐÏÍÅÓÔÉÔØ × ÆÁÊÌ. éÎÁÞÅ, ÏÎ ÉÓÞÅÚÎÅÔ, ËÏÇÄÁ ×Ù ×ÙÊÄÉÔÅ ÉÚ Emacs. ÷Ù ÐÏÍÅÝÁÅÔÅ -×ÁÛ ÔÅËÓÔ × ÆÁÊÌ, "ÏÔËÒÙ×ÁÑ" ÆÁÊÌ. (åÝÅ ÜÔÏ ÎÁÚÙ×ÁÀÔ "ÐÏÓÅÔÉÔØ" ÆÁÊÌ.) +þÔÏÂÙ ÓÏÚÄÁÎÎÙÊ ÔÅËÓÔ ÍÏÖÎÏ ÂÙÌÏ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÐÏÚÖÅ, ×Ù ÄÏÌÖÎÙ ÐÏÍÅÓÔÉÔØ +ÅÇÏ × ÆÁÊÌ. éÎÁÞÅ, ÏÎ ÉÓÞÅÚÎÅÔ, ËÏÇÄÁ ×Ù ÐÏËÉÎÅÔÅ Emacs. ÷Ù ÐÏÍÅÝÁÅÔÅ ×ÁÛ +ÔÅËÓÔ × ÆÁÊÌ, "ÏÔËÒÙ×ÁÑ" ÆÁÊÌ (üÔÕ ÏÐÅÒÁÃÉÀ ÔÁËÖÅ ÎÁÚÙ×ÁÀÔ "ÐÏÓÅÔÉÔØ" ÆÁÊÌ). -ïÔËÒÙÔØ ÆÁÊÌ ÏÚÎÁÞÁÅÔ ÐÏÓÍÏÔÒÅÔØ ÅÇÏ ÓÏÄÅÒÖÉÍÏÅ, ÉÓÐÏÌØÚÕÑ Emacs. ÷Ï ÍÎÏÇÉÈ -ÓÌÕÞÁÑÈ, ÜÔÏ ÐÒÏÉÓÈÏÄÉÔ, ËÏÇÄÁ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÆÁÊÌ ÓÁÍÉ. ïÄÎÁËÏ ×ÁÛÉ +ïÔËÒÙÔØ ÆÁÊÌ ÏÚÎÁÞÁÅÔ ÐÏÓÍÏÔÒÅÔØ ÅÇÏ ÓÏÄÅÒÖÉÍÏÅ, Ó ÐÏÍÏÝØÀ Emacs. ÷Ï ÍÎÏÇÉÈ +ÓÌÕÞÁÑÈ, ÜÔÏ ÐÒÏÉÓÈÏÄÉÔ ÔÏÇÄÁ, ËÏÇÄÁ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÆÁÊÌ ÓÁÍÉ. ïÄÎÁËÏ ×ÁÛÉ ÉÚÍÅÎÅÎÉÑ, ÓÄÅÌÁÎÎÙÅ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ Emacs ÎÅ ÂÕÄÕÔ ÚÁÆÉËÓÉÒÏ×ÁÎÙ, ÐÏËÁ ×Ù -ÎÅ ÓÏÈÒÁÎÉÔÅ ÆÁÊÌ. ôÁË ×Ù ÍÏÖÅÔÅ ÎÅ ÏÓÔÁ×ÌÑÔØ ÐÏÌÕÉÚÍÅÎÅÎÎÙÊ ÆÁÊÌ × ÓÉÓÔÅÍÅ, -ÅÓÌÉ ×Ù ÎÅ ÈÏÔÉÔÅ ÜÔÏÇÏ. äÁÖÅ ËÏÇÄÁ ×Ù ÓÏÈÒÁÎÑÅÔÅ ÆÁÊÌ, Emacs ÏÓÔÁ×ÌÑÅÔ -ÏÒÉÇÉÎÁÌØÎÙÊ ÆÁÊÌ Ó ÉÚÍÅÎÅÎÎÙÍ ÉÍÅÎÅÍ, ÞÔÏÂÙ ×Ù ÍÏÇÌÉ ÐÏÚÖÅ ÒÅÛÉÔØ, ÞÔÏ ×ÁÛÉ -ÉÚÍÅÎÅÎÉÑ ÂÙÌÉ ÏÛÉÂÏÞÎÙ. +ÎÅ ÓÏÈÒÁÎÉÔÅ ÆÁÊÌ. ÷Ù ÍÏÖÅÔÅ ÎÅ ÏÓÔÁ×ÌÑÔØ ÞÁÓÔÉÞÎÏ ÉÚÍÅÎÅÎÎÙÊ ÆÁÊÌ × +ÓÉÓÔÅÍÅ, ÅÓÌÉ ×Ù ÎÅ ÈÏÔÉÔÅ ÅÇÏ ÓÏÈÒÁÎÑÔØ. äÁÖÅ ËÏÇÄÁ ×Ù ÓÏÈÒÁÎÑÅÔÅ ÆÁÊÌ, ÔÏ +Emacs ÏÓÔÁ×ÌÑÅÔ ÏÒÉÇÉÎÁÌØÎÙÊ ÆÁÊÌ, ÎÏ Ó ÄÒÕÇÉÍ ÉÍÅÎÅÍ, ÔÁË ÞÔÏ ×Ù ÐÏÚÖÅ +ÍÏÖÅÔÅ ÏÔÍÅÎÉÔØ ×ÁÛÉ ÉÚÍÅÎÅÎÉÑ, ×ÅÒÎÕ×ÛÉÓØ Ë ÐÒÅÄÙÄÕÝÅÊ ×ÅÒÓÉÉ ÆÁÊÌÁ. åÓÌÉ ×Ù ÐÏÓÍÏÔÒÉÔÅ × ÎÉÖÎÀÀ ÞÁÓÔØ ÜËÒÁÎÁ, ÔÏ ×Ù Õ×ÉÄÉÔÅ ÓÔÒÏËÕ, ËÏÔÏÒÁÑ -ÎÁÞÉÎÁÅÔÓÑ Ó ÔÉÒÅ É ÎÁÞÉÎÁÅÔÓÑ Ó "--:-- TUTORIAL.ru" ÉÌÉ ÞÅÇÏ-ÔÏ -ÐÏÄÏÂÎÏÇÏ. üÔÁ ÞÁÓÔØ ÜËÒÁÎÁ ×ÓÅÇÄÁ ÐÏËÁÚÙ×ÁÅÔ ÉÍÑ ÆÁÊÌÁ, ËÏÔÏÒÙÊ ×Ù -ÏÔËÒÙÌÉ. éÔÁË, ÓÅÊÞÁÓ ×Ù ÏÔËÒÙÌÉ ÆÁÊÌ Ó ÉÍÅÎÅÍ "TUTORIAL.ru", ËÏÔÏÒÙÊ -Ñ×ÌÑÅÔÓÑ ×ÁÛÅÊ ÐÅÒÓÏÎÁÌØÎÏÊ ËÏÐÉÅÊ ÕÞÅÂÎÉËÁ Emacs. äÌÑ ÌÀÂÏÇÏ ÆÁÊÌÁ, ËÏÔÏÒÙÊ -×Ù ÏÔËÒÏÅÔÅ, ÉÍÑ ÜÔÏÇÏ ÆÁÊÌÁ ÐÏÑ×ÉÔÓÑ × ÜÔÏÍ ÍÅÓÔÅ. +ÎÁÞÉÎÁÅÔÓÑ Ó ÔÉÒÅ É ÅÅ ÎÁÞÁÌÏ ×ÙÇÌÑÄÉÔ ÐÒÉÍÅÒÎÏ ÔÁË "--:-- TUTORIAL.ru". üÔÁ +ÞÁÓÔØ ÜËÒÁÎÁ ×ÓÅÇÄÁ ÐÏËÁÚÙ×ÁÅÔ ÉÍÑ ÏÔËÒÙÔÏÇÏ ×ÁÍÉ ÆÁÊÌÁ. éÔÁË, ÓÅÊÞÁÓ ×Ù +ÏÔËÒÙÌÉ ÆÁÊÌ Ó ÉÍÅÎÅÍ "TUTORIAL.ru", ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ ×ÁÛÅÊ ÐÅÒÓÏÎÁÌØÎÏÊ +ËÏÐÉÅÊ ÕÞÅÂÎÉËÁ Emacs. äÌÑ ÌÀÂÏÇÏ ÆÁÊÌÁ, ËÏÔÏÒÙÊ ×Ù ÏÔËÒÏÅÔÅ, ÅÇÏ ÉÍÑ ÂÕÄÅÔ +ÐÏËÁÚÁÎÏ × ÜÔÏÊ ÓÔÒÏËÅ. -ïÄÎÏÊ ÉÚ ÓÐÅÃÉÁÌØÎÙÈ ×ÅÝÅÊ, ËÏÔÏÒÕÀ ×ÁÍ ÎÕÖÎÏ ÚÎÁÔØ Ï ËÏÍÁÎÄÅ ÏÔËÒÙÔÉÑ ÆÁÊÌÁ, -ÜÔÏ ÔÏ, ÞÔÏ ×Ù ÄÏÌÖÎÙ ××ÅÓÔÉ ÉÍÑ ÆÁÊÌÁ, ËÏÔÏÒÙÊ ÎÕÖÎÏ ÞÉÔÁÔØ. íÙ ÜÔÏ -ÎÁÚÙ×ÁÅÍ ËÏÍÁÎÄÏÊ, "ÞÉÔÁÀÝÅÊ ÁÒÇÕÍÅÎÔ Ó ÔÅÒÍÉÎÁÌÁ" (× ÜÔÏÍ ÓÌÕÞÁÅ, ÁÒÇÕÍÅÎÔÏÍ -Ñ×ÌÑÅÔÓÑ ÉÍÑ ÆÁÊÌÁ). ðÏÓÌÅ ××ÏÄÁ ËÏÍÁÎÄÙ +ïÄÎÏÊ ÉÚ ×ÅÝÅÊ, ËÏÔÏÒÙÅ ×ÁÍ ÎÕÖÎÏ ÚÎÁÔØ Ï ËÏÍÁÎÄÅ ÏÔËÒÙÔÉÑ ÆÁÊÌÁ -- ÜÔÏ ÔÏ, +ÞÔÏ ×Ù ÄÏÌÖÎÙ ××ÅÓÔÉ ÉÍÑ ÆÁÊÌÁ, ËÏÔÏÒÙÊ ÎÕÖÎÏ ÏÔËÒÙÔØ. ôÁËÉÅ ËÏÍÁÎÄÙ ÍÙ +ÎÁÚÙ×ÁÅÍ ËÏÍÁÎÄÁÍÉ "ÞÉÔÁÀÝÉÍÉ ÁÒÇÕÍÅÎÔ Ó ÔÅÒÍÉÎÁÌÁ" (× ÎÁÛÅÍ ÓÌÕÞÁÅ, +ÁÒÇÕÍÅÎÔÏÍ Ñ×ÌÑÅÔÓÑ ÉÍÑ ÆÁÊÌÁ). ðÏÓÌÅ ××ÏÄÁ ËÏÍÁÎÄÙ C-x C-f ïÔËÒÙÔØ (ÎÁÊÔÉ) ÆÁÊÌ -Emacs ÐÏÐÒÏÓÉÔ ×ÁÓ ××ÅÓÔÉ ÉÍÑ ÆÁÊÌÁ. éÍÑ ÆÁÊÌÁ ×Ù ÎÁÂÅÒÅÔÅ × ÎÉÖÎÅÊ ÓÔÒÏËÅ -ÜËÒÁÎÁ. îÉÖÎÑÑ ÓÔÒÏËÁ ÎÁÚÙ×ÁÅÔÓÑ ÍÉÎÉ-ÂÕÆÅÒ, ÏÎ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ËÏÒÏÔËÏÇÏ -××ÏÄÁ. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÂÙÞÎÙÅ ËÏÍÁÎÄÙ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ Emacs ÄÌÑ -ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÉÍÅÎÉ. +Emacs ÐÏÐÒÏÓÉÔ ×ÁÓ ××ÅÓÔÉ ÉÍÑ ÆÁÊÌÁ. éÍÑ ÆÁÊÌÁ ÎÁÂÉÒÁÅÔÓÑ × ÎÉÖÎÅÊ ÓÔÒÏËÅ +ÜËÒÁÎÁ. îÉÖÎÑÑ ÓÔÒÏËÁ ÎÁÚÙ×ÁÅÔÓÑ ÍÉÎÉ-ÂÕÆÅÒÏÍ -- ÏÎ ÓÐÅÃÉÁÌØÎÏ ÉÓÐÏÌØÚÕÅÔÓÑ +ÄÌÑ ××ÏÄÁ ÎÅÂÏÌØÛÏÇÏ ËÏÌÉÞÅÓÔ×Á ÄÁÎÎÙÈ. äÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÉÍÅÎÉ ÆÁÊÌÁ ×Ù +ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÂÙÞÎÙÅ ËÏÍÁÎÄÙ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ Emacs. -ëÏÇÄÁ ×Ù ××ÏÄÉÔÅ ÉÍÑ ÆÁÊÌÁ (ÉÌÉ ÌÀÂÕÀ ÉÎÆÏÒÍÁÃÉÀ × ÍÉÎÉ-ÂÕÆÅÒ), ×Ù ÍÏÖÅÔÅ -ÏÔÍÅÎÉÔØ ËÏÍÁÎÄÕ ÎÁÖÁ× C-g. +ëÏÇÄÁ ×Ù ××ÏÄÉÔÅ ÉÍÑ ÆÁÊÌÁ (ÉÌÉ ÌÀÂÕÀ ÄÒÕÇÕÀ ÉÎÆÏÒÍÁÃÉÀ × ÍÉÎÉ-ÂÕÆÅÒÅ), ×Ù +ÍÏÖÅÔÅ ÏÔÍÅÎÉÔØ ÔÅËÕÝÕÀ ËÏÍÁÎÄÕ ÎÁÖÁ× C-g. ->> îÁÖÍÉÔÅ C-x C-f, ÚÁÔÅÍ ÎÁÖÍÉÔÅ C-g. üÔÏ ÏÔÍÅÎÉÔ ÍÉÎÉ-ÂÕÆÅÒ, É ËÏÍÁÎÄÕ - C-x C-f, ËÏÔÏÒÁÑ ÉÓÐÏÌØÚÏ×ÁÌÁ ÍÉÎÉ-ÂÕÆÅÒ. ÷ ÉÔÏÇÅ, ×Ù ÎÅ ÏÔËÒÙÌÉ ÎÉ ÏÄÎÏÇÏ - ÆÁÊÌÁ. +>> îÁÖÍÉÔÅ C-x C-f, Á ÚÁÔÅÍ ÎÁÖÍÉÔÅ C-g. üÔÏ ÄÅÊÓÔ×ÉÅ ÏÔÍÅÎÉÔ ××ÏÄ ÄÁÎÎÙÈ × + ÍÉÎÉ-ÂÕÆÅÒÅ, É ÚÁÏÄÎÏ É ËÏÍÁÎÄÕ C-x C-f, ËÏÔÏÒÁÑ ÉÓÐÏÌØÚÏ×ÁÌÁ ÍÉÎÉ-ÂÕÆÅÒ + ÄÌÑ ÐÏÌÕÞÅÎÉÑ ÁÒÇÕÍÅÎÔÁ. ÷ ÉÔÏÇÅ, ×Ù ÎÅ ÏÔËÒÙÌÉ ÎÉ ÏÄÎÏÇÏ ÆÁÊÌÁ. ëÏÇÄÁ ×Ù ÚÁ×ÅÒÛÉÔÅ ××ÏÄ ÉÍÅÎÉ ÆÁÊÌÁ, ÎÁÖÍÉÔÅ <Return>. äÁÌÅÅ ÓÒÁÂÏÔÁÅÔ ËÏÍÁÎÄÁ C-x C-f, ËÏÔÏÒÁÑ ÏÔËÒÏÅÔ ÕËÁÚÁÎÎÙÊ ×ÁÍÉ ÆÁÊÌ. íÉÎÉ-ÂÕÆÅÒ ÉÓÞÅÚÎÅÔ, ËÏÇÄÁ ËÏÍÁÎÄÁ C-x C-f ÚÁ×ÅÒÛÉÔÓÑ. -é ÍÇÎÏ×ÅÎÉÅÍ ÐÏÚÖÅ ÓÏÄÅÒÖÉÍÏÅ ÆÁÊÌÁ ÐÏÑ×ÉÔÓÑ ÎÁ ÜËÒÁÎÅ, É ×Ù ÓÍÏÖÅÔÅ ÅÇÏ -ÒÅÄÁËÔÉÒÏ×ÁÔØ. ëÏÇÄÁ ×Ù ÚÁËÏÎÞÉÔÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ, ÞÔÏÂÙ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ, -ÎÁÂÅÒÉÔÅ ËÏÍÁÎÄÕ +á ÍÇÎÏ×ÅÎÉÅÍ ÐÏÚÖÅ ÓÏÄÅÒÖÉÍÏÅ ÆÁÊÌÁ ÐÏÑ×ÉÔÓÑ ÎÁ ÜËÒÁÎÅ, É ×Ù ÓÍÏÖÅÔÅ ÅÇÏ +ÒÅÄÁËÔÉÒÏ×ÁÔØ. ëÏÇÄÁ ×Ù ÚÁËÏÎÞÉÔÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ, ÔÏ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ +ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ, ÎÁÂÅÒÉÔÅ ËÏÍÁÎÄÕ C-x C-s óÏÈÒÁÎÉÔØ ÆÁÊÌ -üÔÏ ÓËÏÐÉÒÕÅÔ ÔÅËÓÔ ÉÚ Emacs × ÆÁÊÌ. ÷ ÐÅÒ×ÙÊ ÒÁÚ, ËÏÇÄÁ ×Ù ÜÔÏ ÓÄÅÌÁÅÔÅ, -Emacs ÐÅÒÅÉÍÅÎÕÅÔ ÏÒÉÇÉÎÁÌØÎÙÊ ÆÁÊÌ × ÆÁÊÌ Ó ÎÏ×ÙÍ ÉÍÅÎÅÍ, ÞÔÏÂÙ ÏÎ ÎÅ -ÐÏÔÅÒÑÌÓÑ. îÏ×ÏÅ ÉÍÑ ÐÏÌÕÞÁÅÔÓÑ ÄÏÂÁ×ÌÅÎÉÅÍ ÓÉÍ×ÏÌÁ "~" Ë ÏÒÉÇÉÎÁÌØÎÏÍÕ -ÉÍÅÎÉ ÆÁÊÌÁ. +üÔÁ ËÏÍÁÎÄÁ ÓËÏÐÉÒÕÅÔ ÔÅËÓÔ ÉÚ Emacs × ÆÁÊÌ. ÷ ÐÅÒ×ÙÊ ÒÁÚ, ËÏÇÄÁ ×Ù ÜÔÏ +ÓÄÅÌÁÅÔÅ, Emacs ÐÅÒÅÉÍÅÎÕÅÔ ÏÒÉÇÉÎÁÌØÎÙÊ ÆÁÊÌ × ÆÁÊÌ Ó ÎÏ×ÙÍ ÉÍÅÎÅÍ, ÞÔÏÂÙ +ÎÅ ÐÏÔÅÒÑÌÏÓØ ÐÒÅÄÙÄÕÝÅÅ ÓÏÄÅÒÖÉÍÏÅ ÆÁÊÌÁ. îÏ×ÏÅ ÉÍÑ ÐÏÌÕÞÁÅÔÓÑ ÄÏÂÁ×ÌÅÎÉÅÍ +ÓÉÍ×ÏÌÁ "~" Ë ÏÒÉÇÉÎÁÌØÎÏÍÕ ÉÍÅÎÉ ÆÁÊÌÁ. -ëÏÇÄÁ ÓÏÈÒÁÎÅÎÉÅ ÚÁ×ÅÒÛÉÔÓÑ, Emacs ÎÁÐÅÞÁÔÁÅÔ ÉÍÑ ÚÁÐÉÓÁÎÎÏÇÏ ÆÁÊÌÁ. ÷Ù -ÄÏÌÖÎÙ ÓÏÈÒÁÎÑÔØ ÉÚÍÅÎÅÎÉÑ ÄÏÓÔÁÔÏÞÎÏ ÞÁÓÔÏ, ÞÔÏÂÙ ÎÅ ÐÏÔÅÒÑÔØ ÍÎÏÇÏ -ÒÁÂÏÔÙ, ÅÓÌÉ ×ÄÒÕÇ ÓÉÓÔÅÍÁ ÚÁ×ÉÓÎÅÔ. +ëÏÇÄÁ ÓÏÈÒÁÎÅÎÉÅ ÚÁ×ÅÒÛÉÔÓÑ, Emacs ÏÔÏÂÒÁÚÉÔ ÉÍÑ ÚÁÐÉÓÁÎÎÏÇÏ ÆÁÊÌÁ. ÷Ù +ÄÏÌÖÎÙ ÓÏÈÒÁÎÑÔØ ÉÚÍÅÎÅÎÉÑ ÄÏÓÔÁÔÏÞÎÏ ÞÁÓÔÏ, ÞÔÏÂÙ ÎÅ ÐÏÔÅÒÑÔØ ×ÎÅÓÅÎÎÙÅ +ÉÚÍÅÎÅÎÉÑ, ÅÓÌÉ ÓÉÓÔÅÍÁ ×ÄÒÕÇ ÚÁ×ÉÓÎÅÔ. >> îÁÂÅÒÉÔÅ C-x C-s, ÓÏÈÒÁÎÉÔÅ ×ÁÛÕ ËÏÐÉÀ ÕÞÅÂÎÉËÁ. ÷ ÎÉÖÎÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ ÄÏÌÖÎÁ ÐÏÑ×ÉÔØÓÑ ÎÁÄÐÉÓØ "Wrote ...TUTORIAL.ru". -úáíåþáîéå: îÁ ÎÅËÏÔÏÒÙÈ ÓÉÓÔÅÍÁÈ, ××ÏÄ C-x C-s ÚÁÂÌÏËÉÒÕÅÔ ÜËÒÁÎ É ×Ù ÎÅ -Õ×ÉÄÉÔÅ ÐÏÓÌÅÄÕÀÝÅÇÏ ×Ù×ÏÄÁ Emacs`Á. üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÏÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ -ÉÍÅÅÔ "ÏÓÏÂÅÎÎÏÓÔØ", ÉÍÅÎÕÅÍÕÀ "flow control", ÐÅÒÅÈ×ÁÔÙ×ÁÀÝÕÀ C-s É ÎÅ -ÐÒÏÐÕÓËÁÀÝÕÀ ÜÔÏÔ ÓÉÍ×ÏÌ Ë Emacs`Õ. äÌÑ ÒÁÚÂÌÏËÉÒÏ×ËÉ ÜËÒÁÎÁ, ÎÁÖÍÉÔÅ C-q. -óÍÏÔÒÉÔÅ ÒÁÚÄÅÌ "Spontaneous Entry to Incremental Search" ÒÕËÏ×ÏÄÓÔ×Á Emacs, -ÞÔÏÂÙ ÕÚÎÁÔØ, ËÁË ÂÏÒÏÔØÓÑ Ó ÜÔÏÊ "ÏÓÏÂÅÎÎÏÓÔØÀ". +úáíåþáîéå: îÁ ÎÅËÏÔÏÒÙÈ ÓÉÓÔÅÍÁÈ, ××ÏÄ C-x C-s ÚÁÂÌÏËÉÒÕÅÔ ÜËÒÁÎ, ÔÁË ÞÔÏ ×Ù +ÎÅ Õ×ÉÄÉÔÅ ÐÏÓÌÅÄÕÀÝÅÇÏ ×Ù×ÏÄÁ Emacs`Á. ôÁËÏÅ ÐÏ×ÅÄÅÎÉÅ ÏÚÎÁÞÁÅÔ, ÞÔÏ +ÏÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ ÉÍÅÅÔ "ÏÓÏÂÅÎÎÏÓÔØ", ÉÍÅÎÕÅÍÕÀ "flow control", +ÐÅÒÅÈ×ÁÔÙ×ÁÀÝÕÀ ÓÏÞÅÔÁÎÉÅ C-s É ÎÅ ÐÒÏÐÕÓËÁÀÝÕÀ ÜÔÏÔ ÓÉÍ×ÏÌ Ë Emacs`Õ. äÌÑ +ÓÎÑÔÉÑ ÂÌÏËÉÒÏ×ËÉ ÜËÒÁÎÁ, ÎÁÖÍÉÔÅ C-q. ïÂÒÁÔÉÔÅÓØ Ë ÒÁÚÄÅÌÕ "Spontaneous +Entry to Incremental Search" ÒÕËÏ×ÏÄÓÔ×Á Emacs, ÞÔÏÂÙ ÕÚÎÁÔØ Ï ÔÏÍ, ËÁË +ÂÏÒÏÔØÓÑ Ó ÜÔÏÊ "ÏÓÏÂÅÎÎÏÓÔØÀ". ÷Ù ÍÏÖÅÔÅ ÏÔËÒÙÔØ ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ ÄÌÑ ÐÒÏÓÍÏÔÒÁ ÉÌÉ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ. ÷Ù -ÔÁËÖÅ ÍÏÖÅÔÅ ÎÁÊÔÉ ÆÁÊÌ, ËÏÔÏÒÏÇÏ ÅÝÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ. äÒÕÇÉÍÉ ÓÌÏ×ÁÍÉ -- -ÓÏÚÄÁÔØ ÆÁÊÌ Ó ÐÏÍÏÝØÀ Emacs: ÎÁÊÔÉ ÆÁÊÌ, ÓÏÚÄÁÔØ ÎÏ×ÙÊ, É ÎÁÞÁÔØ ××ÏÄÉÔØ -ÔÅËÓÔ. ëÏÇÄÁ ×Ù ÓËÁÖÉÔÅ "ÓÏÈÒÁÎÉ" ÆÁÊÌ, Emacs ÓÏÚÄÁÓÔ ÒÅÁÌØÎÙÊ ÆÁÊÌ Ó -ÎÁÂÒÁÎÎÙÍ ×ÁÍÉ ÔÅËÓÔÏÍ. äÁÌÅÅ, ËÁË ×Ù ÐÏÎÑÌÉ, ×Ù ÂÕÄÅÔÅ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÕÖÅ -ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ. +ÔÁËÖÅ ÍÏÖÅÔÅ ÏÔËÒÙÔØ ÆÁÊÌ, ËÏÔÏÒÏÇÏ ÅÝÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ. äÒÕÇÉÍÉ ÓÌÏ×ÁÍÉ -- +ÓÏÚÄÁÔØ ÆÁÊÌ Ó ÐÏÍÏÝØÀ Emacs ÍÏÖÎÏ ÔÁË: ÎÁÊÔÉ ÆÁÊÌ, ÓÏÚÄÁÔØ ÎÏ×ÙÊ, É ÎÁÞÁÔØ +××ÏÄÉÔØ ÔÅËÓÔ. ëÏÇÄÁ ×Ù ×ÙÐÏÌÎÉÔÅ ËÏÍÁÎÄÕ ÓÏÈÒÁÎÅÎÉÑ ÆÁÊÌÁ, ÔÏ Emacs ÓÏÚÄÁÓÔ +ÎÁÓÔÏÑÝÉÊ ÆÁÊÌ Ó ÎÁÂÒÁÎÎÙÍ ×ÁÍÉ ÔÅËÓÔÏÍ. äÁÌÅÅ, ËÁË ×Ù ÐÏÎÑÌÉ, ×Ù ÂÕÄÅÔÅ +ÒÅÄÁËÔÉÒÏ×ÁÔØ ÕÖÅ ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ. * âõæåòá -------- -åÓÌÉ ×Ù ÎÁÈÏÄÉÔÅ ×ÔÏÒÏÊ ÆÁÊÌ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ C-x C-f, ÔÏ ÐÅÒ×ÙÊ ÏÓÔÁÅÔÓÑ -×ÎÕÔÒÉ Emacs. ÷Ù ÍÏÖÅÔÅ ÐÅÒÅËÌÀÞÉÔØÓÑ ÎÁÚÁÄ, ÎÁÊÄÑ ÅÇÏ ÓÎÏ×Á C-x C-f. üÔÏ -ÓÐÏÓÏ ÚÁÇÒÕÚÉÔØ ÎÅÓËÏÌØËÏ ÆÁÊÌÏ× × Emacs. +åÓÌÉ ×Ù ÏÔËÒÙ×ÁÅÔÅ ×ÔÏÒÏÊ ÆÁÊÌ ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ C-x C-f, ÔÏ ÐÅÒ×ÙÊ ÆÁÊÌ +ÏÓÔÁÅÔÓÑ ×ÎÕÔÒÉ Emacs. ÷Ù ÍÏÖÅÔÅ ÐÅÒÅËÌÀÞÉÔØÓÑ ÎÁÚÁÄ, ÏÔËÒÙ× ÅÇÏ ÓÎÏ×Á Ó +ÐÏÍÏÝØÀ C-x C-f. ôÁËÉÍ ÏÂÒÁÚÏÍ ×Ù ÍÏÖÅÔÅ ÚÁÇÒÕÚÉÔØ ÎÅÓËÏÌØËÏ ÆÁÊÌÏ× × Emacs. ->> óÏÚÄÁÊÔÅ ÆÁÊÌ Ó ÉÍÅÎÅÍ "foo", ÎÁÂÉÒÁÑ C-x C-f foo <Return>. - ÷ÓÔÁ×ØÔÅ ËÁËÏÊ-ÎÉÂÕÄØ ÔÅËÓÔ, ÏÔÒÅÄÁËÔÉÒÕÊÔÅ ÅÇÏ, É ÓÏÈÒÁÎÉÔÅ "foo", +>> óÏÚÄÁÊÔÅ ÆÁÊÌ Ó ÉÍÅÎÅÍ "foo", ÎÁÂÒÁ× C-x C-f foo <Return>. + ÷ÓÔÁ×ØÔÅ ËÁËÏÊ-ÎÉÂÕÄØ ÔÅËÓÔ, ÉÚÍÅÎÉÔÅ ÅÇÏ, É ÓÏÈÒÁÎÉÔÅ ÆÁÊÌ "foo", ÎÁÂÒÁ× C-x C-s. - îÁËÏÎÅÃ, ÎÁÂÅÒÉÔÅ C-x C-f TUTORIAL.ru <Return>, - ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ ÎÁÚÁÄ Ë ÕÞÅÂÎÉËÕ. + îÁËÏÎÅÃ, ÎÁÂÅÒÉÔÅ C-x C-f TUTORIAL.ru <Return>, ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ + ÎÁÚÁÄ Ë ÕÞÅÂÎÉËÕ. -Emacs ÓÏÈÒÁÎÑÅÔ ÔÅËÓÔ ËÁÖÄÏÇÏ ÆÁÊÌÁ ×ÎÕÔÒÉ × ÏÂßÅËÔÅ, ÎÁÚÙ×ÁÅÍÏÍ "ÂÕÆÅÒ" +Emacs ÈÒÁÎÉÔ ÔÅËÓÔ ËÁÖÄÏÇÏ ÆÁÊÌÁ ×ÎÕÔÒÉ × ÏÂßÅËÔÅ, ÎÁÚÙ×ÁÅÍÏÍ "ÂÕÆÅÒ" ("buffer"). ïÔËÒÙÔÉÅ ÆÁÊÌÁ ÓÏÚÄÁÅÔ ÎÏ×ÙÊ ÂÕÆÅÒ ×ÎÕÔÒÉ Emacs. þÔÏÂÙ Õ×ÉÄÅÔØ -ÓÐÉÓÏË ÂÕÆÅÒÏ×, ÓÏÚÄÁÎÎÙÈ × ÔÅËÕÝÅÍ Emacs, ÎÁÂÅÒÉÔÅ +ÓÐÉÓÏË ÂÕÆÅÒÏ×, ÓÏÚÄÁÎÎÙÈ × ÔÅËÕÝÅÍ ÓÅÁÎÓÅ Emacs, ÎÁÂÅÒÉÔÅ C-x C-b óÐÉÓÏË ÂÕÆÅÒÏ× ->> ðÏÐÒÏÂÕÊÔÅ C-x C-b ÓÅÊÞÁÓ. +>> ðÏÐÒÏÂÕÊÔÅ ×ÙÐÏÌÎÉÔØ C-x C-b ÐÒÑÍÏ ÓÅÊÞÁÓ. -íÙ ×ÉÄÉÍ, ÞÔÏ ËÁÖÄÙÊ ÂÕÆÅÒ ÉÍÅÅÔ ÉÍÑ, É ÍÏÖÅÔ ÉÍÅÔØ ÉÍÑ ÆÁÊÌÁ, ÓÏÄÅÒÖÉÍÏÅ -ËÏÔÏÒÏÇÏ × ÎÅÍ ÈÒÁÎÉÔÓÑ. îÅËÏÔÏÒÙÅ ÂÕÆÅÒÁ ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÔ ÆÁÊÌÁÍ. îÁÐÒÉÍÅÒ, -ÂÕÆÅÒ, ÎÁÚ×ÁÎÎÙÊ "*Buffer List*", ÎÅ ÓÏÄÅÒÖÉÔ ÎÉËÁËÏÇÏ ÆÁÊÌÁ. ÷ ÜÔÏÍ ÂÕÆÅÒÅ -ÓÏÄÅÒÖÉÔÓÑ ÓÐÉÓÏË ÂÕÆÅÒÏ×, ËÏÔÏÒÙÊ ÂÙÌ ÓÏÚÄÁÎ ËÏÍÁÎÄÏÊ C-x C-b. ìàâïê ÔÅËÓÔ, -ËÏÔÏÒÙÊ ×Ù ×ÉÄÉÔÅ × ÏËÎÅ Emacs, ×ÓÅÇÄÁ Ñ×ÌÑÅÔÓÑ ÞÁÓÔØÀ ËÁËÏÇÏ-ÌÉÂÏ ÂÕÆÅÒÁ. +íÙ ×ÉÄÉÍ, ÞÔÏ ËÁÖÄÙÊ ÂÕÆÅÒ ÉÍÅÅÔ ÉÍÑ, É ÍÏÖÅÔ ÉÍÅÔØ Ó×ÑÚÁÎÎÏÅ Ó ÎÉÍ ÉÍÑ +ÆÁÊÌÁ, ÓÏÄÅÒÖÉÍÏÅ ËÏÔÏÒÏÇÏ × ÈÒÁÎÉÔÓÑ × ÄÁÎÎÏÍ ÂÕÆÅÒÅ. ìàâïê ÔÅËÓÔ, ËÏÔÏÒÙÊ +×Ù ×ÉÄÉÔÅ × ÏËÎÅ Emacs, ×ÓÅÇÄÁ Ñ×ÌÑÅÔÓÑ ÞÁÓÔØÀ ËÁËÏÇÏ-ÌÉÂÏ ÂÕÆÅÒÁ. >> îÁÂÅÒÉÔÅ C-x 1, ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÓÐÉÓËÁ ÂÕÆÅÒÏ×. -åÓÌÉ ×Ù ÉÚÍÅÎÑÅÔÅ ÔÅËÓÔ ÏÄÎÏÇÏ ÆÁÊÌÁ, ÐÏÔÏÍ ÏÔËÒÙ×ÁÅÔÅ ÄÒÕÇÏÊ, ÔÏ ÐÅÒ×ÙÊ -ÏÓÔÁÅÔÓÑ ÎÅÓÏÈÒÁÎÅÎÎÙÍ. éÚÍÅÎÅÎÉÑ ÏÓÔÁÎÕÔÓÑ ×ÎÕÔÒÉ Emacs, × ÆÁÊÌÏ×ÏÍ -ÂÕÆÅÒÅ. óÏÚÄÁÎÉÅ ÉÌÉ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ ÓÌÅÄÕÀÝÅÇÏ ÆÁÊÌÏ×ÏÇÏ ÂÕÆÅÒÁ ÎÅ +ëÏÇÄÁ Õ ×ÁÓ ÅÓÔØ ÎÅÓËÏÌØËÏ ÂÕÆÅÒÏ×, ÔÏÌØËÏ ÏÄÉÎ ÉÚ ÎÉÈ Ñ×ÌÑÅÔÓÑ "ÔÅËÕÝÉÍ" × +ËÏÎËÒÅÔÎÙÊ ÍÏÍÅÎÔ ×ÒÅÍÅÎÉ. üÔÏ ÔÏÔ ÂÕÆÅÒ, ËÏÔÏÒÙÊ ×Ù ÉÚÍÅÎÑÅÔÅ. åÓÌÉ ×Ù +ÈÏÔÉÔÅ ÉÚÍÅÎÉÔØ ÄÁÎÎÙÅ × ÄÒÕÇÏÍ ÂÕÆÅÒÅ, ÔÏ ×Ù ÄÏÌÖÎÙ "ÐÅÒÅËÌÀÞÉÔØÓÑ" × ÎÅÇÏ. +åÓÌÉ ×Ù ÈÏÔÉÔÅ ÐÅÒÅËÌÀÞÉÔØÓÑ × ÂÕÆÅÒ, Ó×ÑÚÁÎÎÙÊ Ó ÆÁÊÌÏÍ, ÔÏ ×Ù ÍÏÖÅÔÅ +ÏÔËÒÙÔØ ÜÔÏÔ ÆÁÊÌ ÓÎÏ×Á Ó ÐÏÍÏÝØÀ C-x C-f. îÏ ÅÓÔØ ÂÏÌÅÅ ÐÒÏÓÔÏÊ ÓÐÏÓÏ -- +ÉÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÕ C-x b. ÷ ËÁÞÅÓÔ×Å ÁÒÇÕÍÅÎÔÁ ÄÌÑ ÄÁÎÎÏÊ ËÏÍÁÎÄÙ ×Ù +ÄÏÌÖÎÙ ÕËÁÚÁÔØ ÉÍÑ ÂÕÆÅÒÁ. + +>> îÁÂÅÒÉÔÅ C-x b foo <Return> ÄÌÑ ÐÅÒÅËÌÀÞÅÎÉÑ × ÂÕÆÅÒ "foo", ËÏÔÏÒÙÊ + ÈÒÁÎÉÔ ÔÅËÓÔ ÆÁÊÌÁ "foo". úÁÔÅÍ ÎÁÂÅÒÉÔÅ C-x b TUTORIAL <Return> ÄÌÑ + ×ÏÚ×ÒÁÝÅÎÉÑ × ÂÕÆÅÒ Ó ÄÁÎÎÙÍ ÕÞÅÂÎÉËÏÍ. + +þÁÝÅ ×ÓÅÇÏ ÉÍÑ ÂÕÆÅÒÁ ÓÏ×ÐÁÄÁÅÔ Ó ÉÍÅÎÅÍ ÆÁÊÌÁ (ÔÏÌØËÏ ÂÅÚ ÉÍÅÎÉ ËÁÔÁÌÏÇÏ×). +ïÄÎÁËÏ ÜÔÏ ÎÅ ×ÓÅÇÄÁ Ñ×ÌÑÅÔÓÑ ÐÒÁ×ÄÏÊ. óÐÉÓÏË ÂÕÆÅÒÏ×, ËÏÔÏÒÙÊ ×Ù ÓÏÚÄÁÅÔÅ +Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ C-x C-b ×ÓÅÇÄÁ ÐÏËÁÚÙ×ÁÅÔ ×ÁÍ ÉÍÅÎÁ ×ÓÅÈ ÂÕÆÅÒÏ×. + +ìàâïê ÔÅËÓÔ, ËÏÔÏÒÙÊ ×Ù ×ÉÄÉÔÅ × ÏËÎÅ Emacs, ×ÓÅÇÄÁ Ñ×ÌÑÅÔÓÑ ÞÁÓÔØÀ +ËÁËÏÇÏ-ÌÉÂÏ ÂÕÆÅÒÁ. îÅËÏÔÏÒÙÅ ÂÕÆÅÒÁ ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÔ ÆÁÊÌÁÍ. îÁÐÒÉÍÅÒ, +ÂÕÆÅÒ Ó ÉÍÅÎÅÍ "*Buffer List*" ÎÅ Ó×ÑÚÁÎ ÎÉ Ó ËÁËÉÍ ÆÁÊÌÏÍ. üÔÏ ÂÕÆÅÒ, +ËÏÔÏÒÙÊ ÓÏÄÅÒÖÉÔ ÓÐÉÓÏË ÂÕÆÅÒÏ×, ËÏÔÏÒÙÊ ×Ù ÓÏÚÄÁÌÉ ÉÓÐÏÌØÚÕÑ C-x C-b. +âÕÆÅÒ Ó ÉÍÅÎÅÍ "*Messages*" ÔÁËÖÅ ÎÅ Ó×ÑÚÁÎ ÎÉ Ó ËÁËÉÍ ÆÁÊÌÏÍ; ÏÎ ÓÏÄÅÒÖÉÔ +ÓÏÏÂÝÅÎÉÑ, ËÏÔÏÒÙÅ ÏÔÏÂÒÁÖÁÀÔÓÑ × ÓÁÍÏÊ ÎÉÖÎÅÊ ÓÔÒÏËÅ ÏËÎÁ Emacs × ÔÅÞÅÎÉÉ +ÔÅËÕÝÅÊ ÓÅÓÓÉÉ ÒÁÂÏÔÙ Ó ÒÅÄÁËÔÏÒÏÍ. + +>> îÁÂÅÒÉÔÅ C-x b *Messages* <Return> ÄÌÑ ÐÒÏÓÍÏÔÒÁ ÓÏÄÅÒÖÉÍÏÇÏ ÂÕÆÅÒÁ + ÓÏÏÂÝÅÎÉÊ. úÁÔÅÍ ÎÁÂÅÒÉÔÅ C-x b TUTORIAL <Return> ÄÌÑ ×ÏÚ×ÒÁÔÁ × ÄÁÎÎÙÊ + ÕÞÅÂÎÉË. + +åÓÌÉ ×Ù ÉÚÍÅÎÑÅÔÅ ÔÅËÓÔ ÏÄÎÏÇÏ ÆÁÊÌÁ, Á ÚÁÔÅÍ ÏÔËÒÙ×ÁÅÔÅ ÄÒÕÇÏÊ, ÔÏ ÔÅËÓÔ × +ÐÅÒ×ÏÍ ÂÕÆÅÒÅ ÏÓÔÁÅÔÓÑ ÎÅ ÓÏÈÒÁÎÅÎÎÙÍ. éÚÍÅÎÅÎÉÑ ÏÓÔÁÎÕÔÓÑ ×ÎÕÔÒÉ Emacs, × +ÂÕÆÅÒÅ, Ó×ÑÚÁÎÎÏÍ Ó ÆÁÊÌÏÍ. óÏÚÄÁÎÉÅ ÉÌÉ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ ÓÌÅÄÕÀÝÅÇÏ ÂÕÆÅÒÁ ÎÅ ÓËÁÚÙ×ÁÅÔÓÑ ÎÁ ÐÅÒ×ÏÍ ÂÕÆÅÒÅ. üÔÏ ÏÞÅÎØ ÕÄÏÂÎÏ, ÎÏ ÉÍÅÊÔÅ × ×ÉÄÕ, ÞÔÏ ×ÁÍ -ÎÕÖÎÏ ÉÍÅÔØ ÕÄÏÂÎÙÊ ÓÐÏÓÏ ÓÏÈÒÁÎÉÔØ ÐÅÒ×ÙÊ ÆÁÊÌÏ×ÙÊ ÂÕÆÅÒ. âÙÌÏ ÂÙ -ÎÅÐÒÉÑÔÎÏ ËÁÖÄÙÊ ÒÁÚ ×ÏÚ×ÒÁÝÁÔØÓÑ ÎÁÚÁÄ Ó ÐÏÍÏÝØÀ C-x C-f É ÐÏÔÏÍ -ÉÓÐÏÌØÚÏ×ÁÔØ C-x C-s. ðÏÜÔÏÍÕ ÓÕÝÅÓÔ×ÕÅÔ ËÏÍÁÎÄÁ +ÎÕÖÎÏ ÉÍÅÔØ ÓÐÏÓÏ ÓÏÈÒÁÎÉÔØ ÐÅÒ×ÙÊ ÆÁÊÌÏ×ÙÊ ÂÕÆÅÒ. âÙÌÏ ÂÙ ÎÅÐÒÉÑÔÎÏ +ËÁÖÄÙÊ ÒÁÚ ×ÏÚ×ÒÁÝÁÔØÓÑ ÎÁÚÁÄ ÉÓÐÏÌØÚÕÑ C-x C-f É ÐÏÔÏÍ ÉÓÐÏÌØÚÏ×ÁÔØ C-x C-s +ÄÌÑ ÓÏÈÒÁÎÅÎÉÑ ÄÁÎÎÙÈ. ðÏÜÔÏÍÕ ÓÕÝÅÓÔ×ÕÅÔ ËÏÍÁÎÄÁ C-x s óÏÈÒÁÎÉÔØ ÎÅËÏÔÏÒÙÅ ÂÕÆÅÒÁ. (Save some buffers) -C-x s ÓÐÒÁÛÉ×ÁÅÔ ×ÁÓ Ï ËÁÖÄÏÍ ÂÕÆÅÒÅ, ËÏÔÏÒÙÊ ÓÏÄÅÒÖÉÔ ÎÅÓÏÈÒÁÎÅÎÎÙÅ -ÉÚÍÅÎÅÎÉÑ. äÌÑ ËÁÖÄÏÇÏ ÔÁËÏÇÏ ÂÕÆÅÒÁ Õ ×ÁÓ ÓÐÒÁÛÉ×ÁÀÔ: ÓÏÈÒÁÎÑÔØ ÉÌÉ ÎÅ -ÓÏÈÒÁÎÑÔØ ÉÚÍÅÎÅÎÉÑ. +C-x s ÚÁÐÒÁÛÉ×ÁÅÔ Õ ×ÁÓ ÐÏÄÔ×ÅÒÖÄÅÎÉÅ Ï ÓÏÈÒÁÎÅÎÉÉ ÄÌÑ ËÁÖÄÏÇÏ ÂÕÆÅÒÁ, +ËÏÔÏÒÙÊ ÓÏÄÅÒÖÉÔ ÎÅ ÓÏÈÒÁÎÅÎÎÙÅ ÉÚÍÅÎÅÎÉÑ. äÌÑ ËÁÖÄÏÇÏ ÔÁËÏÇÏ ÂÕÆÅÒÁ Õ ×ÁÓ +ÚÁÐÒÏÓÑÔ: ÓÏÈÒÁÎÑÔØ ÉÌÉ ÎÅ ÓÏÈÒÁÎÑÔØ ÉÚÍÅÎÅÎÉÑ. >> ÷ÓÔÁ×ØÔÅ ÓÔÒÏËÕ ÔÅËÓÔÁ, ÐÏÔÏÍ ÎÁÂÅÒÉÔÅ C-x s. - õ ×ÁÓ ÄÏÌÖÎÙ ÓÐÒÏÓÉÔØ, ÓÏÈÒÁÎÑÔØ ÌÉ ÂÕÆÅÒ Ó ÉÍÅÎÅÍ TUTORIAL.ru. - ïÔ×ÅÔØÔÅ ÎÁ ×ÏÐÒÏÓ ÄÁ, ÎÁÂÒÁ× "y". + õ ×ÁÓ ÄÏÌÖÎÙ ÓÐÒÏÓÉÔØ, ÓÏÈÒÁÎÑÔØ ÌÉ ÂÕÆÅÒ Ó ÉÍÅÎÅÍ TUTORIAL.ru. ïÔ×ÅÔØÔÅ + ÎÁ ×ÏÐÒÏÓ ÕÔ×ÅÒÄÉÔÅÌØÎÏ, ÎÁÂÒÁ× "y". -* òáóûéòåîîùê îáâïò ëïíáîä +* òáóûéòåîéå îáâïòá ëïíáîä -------------------------- -õ Emacs ÏÞÅÎØ ÍÎÏÇÏ ËÏÍÁÎÄ, ÏÎÉ ÍÏÇÕÔ ÂÙÔØ ÎÁÚÎÁÞÅÎÙ ÎÁ ×ÓÅ control- É meta- -ÓÉÍ×ÏÌÙ. Emacs ÏÂÈÏÄÉÔ ÜÔÏ, ÉÓÐÏÌØÚÕÑ X-ËÏÍÁÎÄÕ (eXtend). åÓÔØ Ä×Å +õ Emacs ÏÞÅÎØ ÍÎÏÇÏ ËÏÍÁÎÄ, É ÏÎÉ ÎÅ ÍÏÇÕÔ ÂÙÔØ ÎÁÚÎÁÞÅÎÙ ÎÁ ×ÓÅ control- É +meta- ÓÉÍ×ÏÌÙ. Emacs ÏÂÈÏÄÉÔ ÜÔÏ, ÉÓÐÏÌØÚÕÑ X-ËÏÍÁÎÄÕ (eXtend). åÓÔØ Ä×Å ×ÏÚÍÏÖÎÏÓÔÉ: - C-x óÉÍ×ÏÌ ÒÁÓÛÉÒÅÎÉÑ (Character eXtend). - úÁ ÎÉÍ ÓÌÅÄÕÅÍ ÏÄÉÎ ÓÉÍ×ÏÌ. - M-x éÍÅÎÏ×ÁÎÎÙÅ ÒÁÓÛÉÒÅÎÎÙÅ ËÏÍÁÎÄÙ (Named command eXtend). - úÁ ÎÉÍ ÓÌÅÄÕÅÔ ÉÍÑ ËÏÍÁÎÄÙ. + C-x òÁÓÛÉÒÅÎÉÅ Ó ÐÏÍÏÝØÀ ××ÏÄÁ ÐÒÅÆÉËÓÁ. úÁ ÎÉÍ ÓÌÅÄÕÅÍ ÏÄÉÎ ÓÉÍ×ÏÌ. + M-x òÁÓÛÉÒÅÎÉÅ ÎÁÂÏÒÁ ËÏÍÁÎÄ Ó ÐÏÍÏÝØÀ ÉÈ ÎÁÉÍÅÎÏ×ÁÎÉÑ. úÁ ÎÉÍ ÓÌÅÄÕÅÔ ÉÍÑ + ËÏÍÁÎÄÙ. -üÔÏ ËÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÀÔÓÑ, ÎÏ ×Ù ÕÖÅ ×ÙÕÞÉÌÉ ÎÅËÏÔÏÒÙÅ ÉÚ -ÎÉÈ. ÷Ù ÕÖÅ ×ÉÄÅÌÉ: ËÏÍÁÎÄÙ ÒÁÂÏÔÙ Ó ÆÁÊÌÁÍÉ C-x C-f -- ÏÔËÒÙÔØ, É C-x C-s --- ÓÏÈÒÁÎÉÔØ. äÒÕÇÏÊ ÐÒÉÍÅÒ - ÚÁ×ÅÒÛÅÎÉÑ ÒÁÂÏÔÙ Ó Emacs -- ÜÔÏ ËÏÍÁÎÄÁ C-x -C-c. (îÅ ×ÏÌÎÕÊÔÅÓØ Ï ÔÏÍ, ÞÔÏ ×Ù ÐÏÔÅÒÑÅÔÅ ÓÄÅÌÁÎÎÙÅ ÉÚÍÅÎÅÎÉÑ, C-x C-c -ÐÒÅÄÌÁÇÁÅÔ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ ÐÅÒÅÄ ÔÅÍ, ËÁË ÕÄÁÌÉÔ ÂÕÆÅÒ Emacs.) +üÔÏ ÐÏÌÅÚÎÙÅ ËÏÍÁÎÄÙ, ÎÏ ÏÎÉ ÉÓÐÏÌØÚÕÀÔÓÑ ÍÅÎÅÅ ÞÁÓÔÏ, ÞÅÍ ÔÅ ËÏÍÁÎÄÙ, +ËÏÔÏÒÙÅ ÍÙ ÉÚÕÞÉÌÉ. ÷Ù ÕÖÅ ×ÉÄÅÌÉ ÎÅËÏÔÏÒÙÅ ÉÚ ÎÉÈ: ËÏÍÁÎÄÙ ÒÁÂÏÔÙ Ó ÆÁÊÌÁÍÉ +C-x C-f -- ÏÔËÒÙÔØ ÆÁÊÌ, É C-x C-s -- ÓÏÈÒÁÎÉÔØ ÆÁÊÌ. äÒÕÇÏÊ ÐÒÉÍÅÒ -- +ËÏÍÁÎÄÁ ÚÁ×ÅÒÛÅÎÉÑ ÒÁÂÏÔÙ Ó Emacs -- C-x C-c. (îÅ ×ÏÌÎÕÊÔÅÓØ Ï ÔÏÍ, ÞÔÏ ×Ù +ÐÏÔÅÒÑÅÔÅ ÓÄÅÌÁÎÎÙÅ ÉÚÍÅÎÅÎÉÑ, C-x C-c ÐÒÅÄÌÁÇÁÅÔ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ ÐÅÒÅÄ +ÕÄÁÌÅÎÉÅÍ ÂÕÆÅÒÁ Emacs). -C-z ÜÔÏ ËÏÍÁÎÄÁ *×ÒÅÍÅÎÎÏÇÏ* ×ÙÈÏÄÁ ÉÚ Emacs -- ×Ù ÍÏÖÅÔÅ ×ÅÒÎÕÔØÓÑ × ÔÕ ÖÅ +C-z -- ÜÔÏ ËÏÍÁÎÄÁ *×ÒÅÍÅÎÎÏÇÏ* ×ÙÈÏÄÁ ÉÚ Emacs. ÷Ù ÍÏÖÅÔÅ ×ÅÒÎÕÔØÓÑ × ÔÕ ÖÅ ÓÅÓÓÉÀ Emacs ÐÏÚÖÅ. -îÁ ÓÉÓÔÅÍÁÈ, ËÏÔÏÒÙÅ ÄÏÐÕÓËÁÀÔ ÜÔÏ, C-z "ÐÒÉÏÓÔÁÎÁ×ÌÉ×ÁÀÔ" ("suspends") -Emacs; ×ÏÚ×ÒÁÝÁÀÔ × ÏÂÏÌÏÞËÕ (shell), ÎÏ ÎÅ ÚÁËÒÙ×ÁÀÔ Emacs. ÷ ÂÏÌØÛÉÎÓÔ×Å -ÏÂÏÌÏÞÅË ×Ù ÍÏÖÅÔÅ ÐÒÏÄÏÌÖÉÔØ ÒÁÂÏÔÕ × Emacs, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ `fg' ÉÌÉ -`%emacs'. +îÁ ÓÉÓÔÅÍÁÈ, ËÏÔÏÒÙÅ ÒÅÁÌÉÚÕÀÔ ÜÔÕ ×ÏÚÍÏÖÎÏÓÔØ, ËÏÍÁÎÄÁ C-z +"ÐÒÉÏÓÔÁÎÁ×ÌÉ×ÁÅÔ" ("suspends") Emacs; ×ÏÚ×ÒÁÝÁÅÔ × ËÏÍÁÎÄÎÙÊ ÐÒÏÃÅÓÓÏÒ +(shell), ÎÏ ÎÅ ÚÁËÒÙ×ÁÀÔ Emacs. ÷ ÂÏÌØÛÉÎÓÔ×Å ËÏÍÁÎÄÎÙÈ ÐÒÏÃÅÓÓÏÒÏ× ×Ù +ÍÏÖÅÔÅ ×ÅÒÎÕÔØÓÑ × Emacs, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ `fg' ÉÌÉ `%emacs'. -÷ ÓÉÓÔÅÍÁÈ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÝÉÈ ÐÒÉÏÓÔÁÎÏ×ËÕ ÐÒÏÃÅÓÓÏ×, C-z ÓÏÚÄÁÅÔ ÎÏ×ÕÀ -ÏÂÏÌÏÞËÕ (subshell), ÚÁÐÕÝÅÎÎÕÀ ÉÚ-ÐÏÄ Emacs, ÞÔÏÂÙ ÄÁÔØ ×ÁÍ ×ÏÚÍÏÖÎÏÓÔØ -×ÙÐÏÌÎÉÔØ ÄÒÕÇÕÀ ÐÒÏÇÒÁÍÍÕ, É ÐÏÔÏÍ ×ÅÒÎÕÔØÓÑ × Emacs; ÜÔÏ ÎÅ ÎÁÓÔÏÑÝÉÊ -×ÙÈÏÄ ÉÚ Emacs. ÷ ÜÔÏÍ ÓÌÕÞÁÅ, ËÏÍÁÎÄÁ `exit' ×ÅÒÎÅÔ ×ÁÓ × Emacs ÉÚ -ÏÂÏÌÏÞËÉ. +÷ ÓÉÓÔÅÍÁÈ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÝÉÈ ÐÒÉÏÓÔÁÎÏ×ËÕ ÐÒÏÃÅÓÓÏ×, C-z ÓÏÚÄÁÅÔ ÎÏ×ÙÊ +ËÏÍÁÎÄÎÙÊ ÐÒÏÃÅÓÓÏÒ (subshell), ÚÁÐÕÝÅÎÎÙÊ ÉÚ-ÐÏÄ Emacs, ÞÔÏÂÙ ÄÁÔØ ×ÁÍ +×ÏÚÍÏÖÎÏÓÔØ ×ÙÐÏÌÎÉÔØ ÄÒÕÇÕÀ ÐÒÏÇÒÁÍÍÕ, É ÚÁÔÅÍ ×ÅÒÎÕÔØÓÑ × Emacs (ÜÔÏ ÎÅ +ÎÁÓÔÏÑÝÉÊ ×ÙÈÏÄ ÉÚ Emacs). ÷ ÔÁËÉÈ ÓÉÓÔÅÍÁ ÄÌÑ ×ÏÚ×ÒÁÔÁ × Emacs ×ÁÍ ÎÕÖÎÏ +ÉÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÕ `exit'. -éÓÐÏÌØÚÕÊÔÅ C-x C-c, ÅÓÌÉ ×Ù ÈÏÔÉÔÅ ×ÙÊÔÉ (log out) ÉÚ ÓÉÓÔÅÍÙ. üÔÏ ÔÁËÖÅ -ÉÓÐÏÌØÚÕÅÔÓÑ, ÞÔÏÂÙ ×ÙÊÔÉ ÉÚ Emacs, ×ÙÚ×ÁÎÎÏÇÏ ÉÚ ÐÏÞÔÏ×ÏÊ ÐÒÏÇÒÁÍÍÙ, ÉÌÉ ÄÒÕÇÏÊ -ÕÔÉÌÉÔÙ, ËÏÔÏÒÁÑ ÍÏÖÅÔ ÎÅ ÚÎÁÔØ, ËÁË ÓÐÒÁ×ÉÔØÓÑ Ó ÐÒÉÏÓÔÁÎÏ×ÌÅÎÎÙÍ Emacs. -ïÂÙÞÎÏ, ÅÓÌÉ ×Ù ÎÅ ×ÙÈÏÄÉÔÅ ÉÚ ÓÉÓÔÅÍÙ, ÌÕÞÛÅ ÐÒÉÏÓÔÁÎÏ×ÉÔØ Emacs, -ÉÓÐÏÌØÚÕÑ C-z ×ÍÅÓÔÏ ×ÙÈÏÄÁ ÉÈ ÎÅÇÏ. +þÔÏÂÙ ÐÏËÉÎÕÔØ Emacs ÉÓÐÏÌØÚÕÊÔÅ ËÏÍÁÎÄÕ C-x C-c. ïÂÙÞÎÏ ÜÔÏ ÎÕÖÎÏ ÔÏÇÄÁ, +ËÏÇÄÁ ×Ù ÈÏÔÉÔÅ ÚÁËÏÎÞÉÔØ ÓÅÁÎÓ ÒÁÂÏÔÙ Ó ËÏÍÐØÀÔÅÒÏÍ. üÔÏ ÓÏÞÅÔÁÎÉÅ ÔÁËÖÅ +ÉÓÐÏÌØÚÕÅÔÓÑ, ÞÔÏÂÙ ×ÙÊÔÉ ÉÚ Emacs, ×ÙÚ×ÁÎÎÏÇÏ ÉÚ ÐÏÞÔÏ×ÏÊ ÐÒÏÇÒÁÍÍÙ, ÉÌÉ +ÄÒÕÇÏÊ ÕÔÉÌÉÔÙ, ËÏÔÏÒÁÑ ÍÏÖÅÔ ÎÅ ÚÎÁÔØ, ËÁË ÓÐÒÁ×ÉÔØÓÑ Ó ÐÒÉÏÓÔÁÎÏ×ÌÅÎÎÙÍ +Emacs. ïÂÙÞÎÏ, ÅÓÌÉ ×Ù ÎÅ ÓÏÂÉÒÁÅÔÅÓØ ×ÙÈÏÄÉÔØ ÉÚ ÓÉÓÔÅÍÙ, ÔÏ ÌÕÞÛÅ +ÐÒÉÏÓÔÁÎÏ×ÉÔØ Emacs, ÉÓÐÏÌØÚÕÑ C-z ×ÍÅÓÔÏ ÔÏÇÏ, ÞÔÏÂÙ ÐÏËÉÄÁÔØ ÅÇÏ ÓÏ×ÓÅÍ. -óÕÝÅÓÔ×ÕÅÔ ÏÞÅÎØ ÍÎÏÇÏ C-x ËÏÍÁÎÄ. üÔÉ ×Ù ÕÖÅ ×ÙÕÞÉÌÉ: +óÕÝÅÓÔ×ÕÅÔ ÏÞÅÎØ ÍÎÏÇÏ ËÏÍÁÎÄ, ÉÓÐÏÌØÚÕÀÝÉÈ ÐÒÅÆÉËÓ C-x. ÷Ù ÕÖÅ ÉÚÕÞÉÌÉ +ÓÌÅÄÕÀÝÉÅ ËÏÍÁÎÄÙ: - C-x C-f ïÔËÒÙÔØ ÆÁÊÌ. - C-x C-s óÏÈÒÁÎÉÔØ ÆÁÊÌ. - C-x C-b óÐÉÓÏË ÂÕÆÅÒÏ×. - C-x C-c ÷ÙÈÏÄ ÉÚ Emacs. - C-x 1 õÄÁÌÑÅÔ ×ÓÅ ÏËÎÁ ËÒÏÍÅ ÏÄÎÏÇÏ. - C-x u ïÔÍÅÎÁ. + C-x C-f ïÔËÒÙÔØ ÆÁÊÌ + C-x C-s óÏÈÒÁÎÉÔØ ÆÁÊÌ + C-x s óÏÈÒÁÎÉÔØ ÎÅËÏÔÏÒÙÅ ÆÁÊÌÙ + C-x C-b óÐÉÓÏË ÂÕÆÅÒÏ× + C-x b ðÅÒÅËÌÀÞÉÔØÓÑ × ÂÕÆÅÒ + C-x C-c ÷ÙÈÏÄ ÉÚ Emacs + C-x 1 õÄÁÌÑÅÔ ×ÓÅ ÏËÎÁ ËÒÏÍÅ ÏÄÎÏÇÏ + C-x u ïÔÍÅÎÁ -éÍÅÎÏ×ÁÎÎÙÅ ÒÁÓÛÉÒÅÎÎÙÅ ËÏÍÁÎÄÙ ÉÓÐÏÌØÚÕÀÔÓÑ ÇÏÒÁÚÄÏ ÒÅÖÅ, ÉÌÉ ÉÓÐÏÌØÚÕÀÔÓÑ -ÔÏÌØËÏ × ÏÐÒÅÄÅÌÅÎÎÙÈ ÒÅÖÉÍÁÈ. ÷ ËÁÞÅÓÔ×Å ÐÒÉÍÅÒÁ ËÏÍÁÎÄÁ ÚÁÍÅÎÁ ÓÔÒÏËÉ, -ËÏÔÏÒÁÑ ÚÁÍÅÎÑÅÔ ÏÄÎÕ ÓÔÒÏËÕ ÎÁ ÄÒÕÇÕÀ ×Ï ×ÓÅÍ ÔÅËÓÔÅ. ëÏÇÄÁ ×Ù ÎÁÂÅÒÅÔÅ -M-x, Emacs ÐÒÅÄÌÏÖÉÔ ×ÁÍ ××ÅÓÔÉ ÉÍÑ ËÏÍÁÎÄÙ × ÎÉÖÎÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ; × ÎÁÛÅÍ -ÓÌÕÞÁÅ, "replace-string". ôÏÌØËÏ ÎÁÂÅÒÉÔÅ "repl s<TAB>", É Emacs ÄÏÐÏÌÎÉÔ -ÉÍÑ. (<TAB> -- ÜÔÏ ËÌÁ×ÉÛÁ ÔÁÂÕÌÑÃÉÉ, ÏÂÙÞÎÏ ÎÁÈÏÄÑÝÁÑÓÑ ×ÙÛÅ ËÌÁ×ÉÛ -CapsLock ÉÌÉ Shift ÓÌÅ×Á ÎÁ ËÌÁ×ÉÁÔÕÒÅ). úÁ×ÅÒÛÉÔÅ ÉÍÑ ××ÏÄÏÍ <Return>. +éÍÅÎÏ×ÁÎÎÙÅ ËÏÍÁÎÄÙ -- ÜÔÏ ËÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÉÓÐÏÌØÚÕÀÔÓÑ ÇÏÒÁÚÄÏ ÒÅÖÅ, ÉÌÉ +ÉÓÐÏÌØÚÕÀÔÓÑ ÔÏÌØËÏ × ÏÐÒÅÄÅÌÅÎÎÙÈ ÒÅÖÉÍÁÈ. ÷ ËÁÞÅÓÔ×Å ÐÒÉÍÅÒÁ ÍÏÖÎÏ +ÐÒÉ×ÅÓÔÉ ËÏÍÁÎÄÕ ÚÁÍÅÎÙ ÓÔÒÏËÉ, ËÏÔÏÒÁÑ ÚÁÍÅÎÑÅÔ ÏÄÎÕ ÓÔÒÏËÕ ÎÁ ÄÒÕÇÕÀ ×Ï +×ÓÅÍ ÔÅËÓÔÅ. ëÏÇÄÁ ×Ù ÎÁÂÅÒÅÔÅ M-x, Emacs ÐÒÅÄÌÏÖÉÔ ×ÁÍ ××ÅÓÔÉ ÉÍÑ ËÏÍÁÎÄÙ; +× ÎÁÛÅÍ ÓÌÕÞÁÅ, ÜÔÏ ËÏÍÁÎÄÁ "replace-string". îÁÂÅÒÉÔÅ ÌÉÛØ "repl s<TAB>", +É Emacs ÄÏÐÏÌÎÉÔ ÉÍÑ. (<TAB> -- ÜÔÏ ËÌÁ×ÉÛÁ ÔÁÂÕÌÑÃÉÉ, ÏÂÙÞÎÏ ÎÁÈÏÄÑÝÁÑÓÑ +×ÙÛÅ ËÌÁ×ÉÛ CapsLock ÉÌÉ Shift × ÌÅ×ÏÊ ÞÁÓÔÉ ËÌÁ×ÉÁÔÕÒÙ). úÁ×ÅÒÛÉÔÅ ÉÍÑ +ÎÁÖÁÔÉÅÍ <Return>. ëÏÍÁÎÄÁ ÚÁÍÅÎÙ ÓÔÒÏËÉ (replace-string) ÔÒÅÂÕÅÔ Ä×Á ÁÒÇÕÍÅÎÔÁ -- ÓÔÒÏËÕ, ËÏÔÏÒÁÑ ÂÕÄÅÔ ÚÁÍÅÎÅÎÁ, É ÓÔÒÏËÕ, ÎÁ ËÏÔÏÒÕÀ ÎÕÖÎÏ ÚÁÍÅÎÉÔØ. ÷Ù ÄÏÌÖÎÙ ÚÁ×ÅÒÛÁÔØ ËÁÖÄÙÊ ÁÒÇÕÍÅÎÔ ××ÏÄÏÍ <Return>. >> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ Ä×Å ÐÕÓÔÙÅ ÓÔÒÏËÉ ÎÉÖÅ ÜÔÏÊ. - îÁÂÅÒÉÔÅ M-x repl s<Return>changed<Return>altered<Return>. + îÁÂÅÒÉÔÅ M-x repl s<Return>ÆÁÊÌ<Return>ÆÁÊÌÙ<Return>. - úÁÍÅÔØÔÅ, ËÁË ÜÔÁ ÓÔÒÏËÁ ÉÚÍÅÎÉÔÓÑ: ×Ù ÚÁÍÅÎÉÔÅ ÓÌÏ×Ï c-h-a-n-g-e-d - ÓÌÏ×ÏÍ "altered" ×ÅÚÄÅ, ÇÄÅ ÏÎÏ ×ÓÔÒÅÔÉÔÓÑ, ÎÉÖÅ ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ. + úÁÍÅÔØÔÅ, ËÁË ÜÔÁ ÓÔÒÏËÁ ÉÚÍÅÎÉÔÓÑ: ×Ù ÚÁÍÅÎÉÔÅ ÓÌÏ×Ï Æ-Á-Ê-Ì + ÓÌÏ×ÏÍ "ÆÁÊÌÙ" ×ÅÚÄÅ, ÇÄÅ ÏÎÏ ×ÓÔÒÅÔÉÔÓÑ, ÎÉÖÅ ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ. -* á÷ôïóïèòáîåîéå ----------------- +* á÷ôïíáôéþåóëïå óïèòáîåîéå +--------------------------- -ëÏÇÄÁ ×Ù ÉÚÍÅÎÑÅÔÅ ÆÁÊÌ, ÎÏ ÎÅ ÓÏÈÒÁÎÑÅÔÅ ÅÇÏ, ÔÏ × ÓÌÕÞÁÅ ËÒÁÈÁ ÓÉÓÔÅÍÙ -×Ù ÍÏÖÅÔÅ ÐÏÔÅÒÑÔØ ÉÎÆÏÒÍÁÃÉÀ. þÔÏÂÙ ÚÁÝÉÔÉÔØ ×ÁÓ ÏÔ ÜÔÏÇÏ, Emacs -ÐÅÒÉÏÄÉÞÅÓËÉ ÓÏÈÒÁÎÑÅÔ ËÁÖÄÙÊ ÆÁÊÌ, ËÏÔÏÒÙÊ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ. á×ÔÏÓÏÈÒÁÎÅÎÉÅ +ëÏÇÄÁ ×Ù ÉÚÍÅÎÑÅÔÅ ÆÁÊÌ, ÎÏ ÎÅ ÓÏÈÒÁÎÑÅÔÅ ÅÇÏ, ÔÏ × ÓÌÕÞÁÅ ËÒÁÈÁ ÓÉÓÔÅÍÙ ×Ù +ÍÏÖÅÔÅ ÐÏÔÅÒÑÔØ ÉÎÆÏÒÍÁÃÉÀ. þÔÏÂÙ ÚÁÝÉÔÉÔØ ×ÁÓ ÏÔ ÜÔÏÇÏ, Emacs ÐÅÒÉÏÄÉÞÅÓËÉ +ÓÏÈÒÁÎÑÅÔ ËÁÖÄÙÊ ÆÁÊÌ, ËÏÔÏÒÙÊ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ. á×ÔÏÍÁÔÉÞÅÓËÏÅ ÓÏÈÒÁÎÅÎÉÅ ÐÒÏÉÓÈÏÄÉÔ × ÆÁÊÌ, ÉÍÑ ËÏÔÏÒÏÇÏ ÔÁËÏÅ ÖÅ, ÎÏ ÎÁÞÉÎÁÅÔÓÑ É ÚÁËÁÎÞÉ×ÁÅÔÓÑ -ÓÉÍ×ÏÌÏÍ "#"; ÎÁÐÒÉÍÅÒ, ÅÓÌÉ ×ÁÛ ÆÁÊÌ ÎÁÚÙ×ÁÅÔÓÑ "hello.c", ÔÏ -Á×ÔÏÓÏÈÒÁÎÅÎÎÙÊ ÆÁÊÌ ÂÕÄÅÔ ÎÁÚÙ×ÁÔØÓÑ "#hello.c#". ëÏÇÄÁ ×Ù ÓÏÈÒÁÎÉÔÅ ÆÁÊÌ -ÏÂÙÞÎÙÍ ÓÐÏÓÏÂÏÍ, Emacs ÕÄÁÌÉÔ Á×ÔÏÓÏÈÒÁÎÅÎÎÙÊ ÆÁÊÌ. +ÓÉÍ×ÏÌÏÍ "#"; ÎÁÐÒÉÍÅÒ, ÅÓÌÉ ×ÁÛ ÆÁÊÌ ÎÁÚÙ×ÁÅÔÓÑ "hello.c", ÔÏ Á×ÔÏÍÁÔÉÞÅÓËÉ +ÓÏÈÒÁÎÅÎÎÙÊ ÆÁÊÌ ÂÕÄÅÔ ÎÁÚÙ×ÁÔØÓÑ "#hello.c#". ëÏÇÄÁ ×Ù ÓÏÈÒÁÎÉÔÅ ÆÁÊÌ +ÏÂÙÞÎÙÍ ÓÐÏÓÏÂÏÍ, Emacs ÕÄÁÌÉÔ Á×ÔÏÍÁÔÉÞÅÓËÉ ÓÏÈÒÁÎÅÎÎÙÊ ÆÁÊÌ. -åÓÌÉ ÓÉÓÔÅÍÁ ÚÁ×ÉÓÌÁ, ×Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ×ÁÛÉ ÉÚÍÅÎÅÎÉÑ, ËÏÔÏÒÙÊ ÂÙÌÉ -ÓÏÈÒÁÎÅÎÙ Á×ÔÏÍÁÔÉÞÅÓËÉ, ÐÕÔÅÍ ÏÔËÒÙÔÉÑ ÎÏÒÍÁÌØÎÏÇÏ ÆÁÊÌÁ (ÆÁÊÌÁ, ËÏÔÏÒÙÊ ×Ù -ÒÅÄÁËÔÉÒÏ×ÁÌÉ, ÎÅ Á×ÔÏÓÏÈÒÁÎÅÎÎÏÇÏ), É ÚÁÔÅÍ ÎÁÂÒÁ× M-x recover-file<return>. -ëÏÇÄÁ Õ ×ÁÓ ÓÐÒÏÓÑÔ ÐÏÄÔ×ÅÒÖÄÅÎÉÅ, ÎÁÂÅÒÉÔÅ yes<return>, ÞÔÏÂÙ ×ÏÓÓÔÁÎÏ×ÉÔØ -Á×ÔÏÓÏÈÒÁÎÅÎÎÙÅ ÄÁÎÎÙÅ. +åÓÌÉ ÓÉÓÔÅÍÁ ÚÁ×ÉÓÌÁ, ÔÏ ×Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ×ÁÛÉ ÉÚÍÅÎÅÎÉÑ, ËÏÔÏÒÙÊ ÂÙÌÉ +ÓÏÈÒÁÎÅÎÙ Á×ÔÏÍÁÔÉÞÅÓËÉ, ÐÕÔÅÍ ÏÔËÒÙÔÉÑ ÎÕÖÎÏÇÏ ÆÁÊÌÁ (ÆÁÊÌÁ, ËÏÔÏÒÙÊ ×Ù +ÒÅÄÁËÔÉÒÏ×ÁÌÉ, ÎÅ ÓÏÈÒÁÎÅÎÎÏÇÏ), É ÚÁÔÅÍ ÎÁÂÒÁ× M-x recover-file<return>. +ëÏÇÄÁ Õ ×ÁÓ ÚÁÐÒÏÓÑÔ ÐÏÄÔ×ÅÒÖÄÅÎÉÅ, ÎÁÂÅÒÉÔÅ yes<return>, ÞÔÏÂÙ +×ÏÓÓÔÁÎÏ×ÉÔØ Á×ÔÏÍÁÔÉÞÅÓËÉ ÓÏÈÒÁÎÅÎÎÙÅ ÄÁÎÎÙÅ. * ïâìáóôø üèï (ECHO AREA) ------------------------- -åÓÌÉ Emacs ×ÉÄÉÔ, ÞÔÏ ×Ù ÍÅÄÌÅÎÎÏ ÎÁÂÉÒÁÅÔÅ ËÏÍÁÎÄÙ, ÏÎ ÐÏËÁÚÙ×ÁÅÔ ÉÈ ×ÁÍ -×ÎÉÚÕ ÜËÒÁÎÁ, × ÏÂÌÁÓÔÉ ÎÁÚÙ×ÁÅÍÏÊ "ÏÂÌÁÓÔØ ÜÈÏ". ïÂÌÁÓÔØ ÜÈÏ -- ÜÔÏ ÓÁÍÁÑ -ÎÉÖÎÑÑ ÓÔÒÏËÁ ÜËÒÁÎÁ. +åÓÌÉ Emacs ×ÉÄÉÔ, ÞÔÏ ×Ù ÍÅÄÌÅÎÎÏ ÎÁÂÉÒÁÅÔÅ ËÏÍÁÎÄÙ ÉÚ ÎÅÓËÏÌØËÉÈ ÓÉÍ×ÏÌÏ×, +ÔÏ ÏÎ ÐÏËÁÚÙ×ÁÅÔ ÉÈ ×ÁÍ ×ÎÉÚÕ ÜËÒÁÎÁ, × ÏÂÌÁÓÔÉ ÎÁÚÙ×ÁÅÍÏÊ "ÏÂÌÁÓÔØ ÜÈÏ". +ïÂÌÁÓÔØ ÜÈÏ -- ÜÔÏ ÓÁÍÁÑ ÎÉÖÎÑÑ ÓÔÒÏËÁ ÜËÒÁÎÁ. -* óôòïëá òåöéíá ---------------- +* óôòïëá óïóôïñîéñ +------------------ -óÔÒÏËÁ ÓÒÁÚÕ ÎÁÄ ÏÂÌÁÓÔØÀ ÜÈÏ ÎÁÚÙ×ÁÅÔÓÑ "ÓÔÒÏËÁ ÓÏÓÔÏÑÎÉÑ". -÷ÙÇÌÑÄÉÔ ÜÔÁ ÓÔÒÏËÁ ÐÒÉÍÅÒÎÏ ÔÁË: +óÔÒÏËÁ ÓÒÁÚÕ ÎÁÄ ÏÂÌÁÓÔØÀ ÜÈÏ ÎÁÚÙ×ÁÅÔÓÑ "ÓÔÒÏËÏÊ ÓÏÓÔÏÑÎÉÑ". ÷ÙÇÌÑÄÉÔ ÜÔÁ +ÓÔÒÏËÁ ÐÒÉÍÅÒÎÏ ÔÁË: ---:** TUTORIAL.ru (Fundamental)--L670--58%---------------- +--:** TUTORIAL.ru 63% L749 (Fundamental)----------------------- üÔÁ ÓÔÒÏËÁ ÓÏÏÂÝÁÅÔ ÐÏÌÅÚÎÕÀ ÉÎÆÏÒÍÁÃÉÀ Ï ÓÏÓÔÏÑÎÉÉ Emacs É ÔÅËÓÔÁ, ËÏÔÏÒÙÊ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ. -÷Ù ÕÖÅ ÚÎÁÅÔÅ, ÞÔÏ ÏÚÎÁÞÁÅÔ ÉÍÑ ÆÁÊÌÁ -- ÜÔÏ ÆÁÊÌ, ËÏÔÏÒÙÊ ×Ù ÏÔËÒÙÌÉ. -NN%-- +÷Ù ÕÖÅ ÚÎÁÅÔÅ, ÞÔÏ ÏÚÎÁÞÁÅÔ ÉÍÑ ÆÁÊÌÁ -- ÜÔÏ ÆÁÊÌ, ËÏÔÏÒÙÊ ×Ù ÏÔËÒÙÌÉ. NN% ÐÏËÁÚÙ×ÁÅÔ ÔÅËÕÝÕÀ ÐÏÚÉÃÉÀ ËÕÒÓÏÒÁ × ÔÅËÓÔÅ; ÜÔÏ ÏÚÎÁÞÁÅÔ ÞÔÏ NN ÐÒÏÃÅÎÔÏ× -ÔÅËÓÔÁ ×ÙÛÅ, ÞÅÍ ÎÁÞÁÌÏ ÜËÒÁÎÁ. åÓÌÉ ÐÅÒ×ÁÑ ÓÔÒÏËÁ ÎÁÈÏÄÉÔÓÑ × ÐÅÒ×ÏÊ ÓÔÒÏËÅ -ÜËÒÁÎÁ, ×Ù ÔÁÍ Õ×ÉÄÉÔÅ --Top-- ×ÍÅÓÔÏ --00%--. åÓÌÉ ÎÁ ÜËÒÁÎÅ ÏÔÏÂÒÁÖÁÅÔÓÑ -ÐÏÓÌÅÄÎÑÑ ÓÔÒÏËÁ, ÔÏ ÂÕÄÅÔ ÏÔÏÂÒÁÖÅÎÏ --Bot--. åÓÌÉ ÔÅËÓÔ ÎÁÓÔÏÌØËÏ ÍÁÌ, ÞÔÏ -×ÅÓØ ×ÍÅÝÁÅÔÓÑ × ÜËÒÁÎ, ÓÔÒÏËÁ ÓÏÓÔÏÑÎÉÑ ÓÏÏÂÝÉÔ --All--. +ÔÅËÓÔÁ ÎÁÈÏÄÑÔÓÑ ×ÙÛÅ, ÞÅÍ ÎÁÞÁÌÏ ÜËÒÁÎÁ. åÓÌÉ ÐÅÒ×ÁÑ ÓÔÒÏËÁ ×ÓÅÇÏ ÔÅËÓÔÁ +ÎÁÈÏÄÉÔÓÑ × ÐÅÒ×ÏÊ ÓÔÒÏËÅ ÜËÒÁÎÁ, ×Ù ÔÁÍ Õ×ÉÄÉÔÅ "Top" ×ÍÅÓÔÏ "0%". åÓÌÉ ÎÁ +ÜËÒÁÎÅ ÏÔÏÂÒÁÖÁÅÔÓÑ ÐÏÓÌÅÄÎÑÑ ÓÔÒÏËÁ, ÔÏ ÂÕÄÅÔ ÏÔÏÂÒÁÖÅÎÏ "Bot". åÓÌÉ ÔÅËÓÔ +ÎÁÓÔÏÌØËÏ ÍÁÌ, ÞÔÏ ×ÅÓØ ×ÍÅÝÁÅÔÓÑ × ÜËÒÁÎ, ÔÏ ÓÔÒÏËÁ ÓÏÓÔÏÑÎÉÑ ÓÏÏÂÝÉÔ +"All". -âÕË×Á L É ÃÉÆÒÙ ÐÏËÁÚÙ×ÁÀÔ ÐÏÚÉÃÉÀ ÄÒÕÇÉÍ ÓÐÏÓÏÂÏÍ: ÏÎÉ ÐÏËÁÚÙ×ÁÀÔ ÎÏÍÅÒ -ÔÅËÕÝÅÊ ÓÔÒÏËÉ Ó ËÕÒÓÏÒÏÍ. +âÕË×Á L É ÃÉÆÒÙ ÐÏËÁÚÙ×ÁÀÔ ÐÏÚÉÃÉÀ ÄÒÕÇÉÍ ÓÐÏÓÏÂÏÍ -- ÏÎÉ ÐÏËÁÚÙ×ÁÀÔ ÎÏÍÅÒ +ÓÔÒÏËÉ × ËÏÔÏÒÏÊ ÎÁÈÏÄÉÔÓÑ ËÕÒÓÏÒ. -ú×ÅÚÄÏÞËÉ × ÎÁÞÁÌÅ ÓÔÒÏËÉ ÏÚÎÁÞÁÀÔ, ÞÔÏ ×Ù ÉÚÍÅÎÑÌÉ ÔÅËÓÔ. ëÁË ÔÏÌØËÏ ×Ù -ÏÔËÒÙÌÉ ÉÌÉ ÓÏÈÒÁÎÉÌÉ ÆÁÊÌ, ÜÔÁ ÞÁÓÔØ ÓÔÒÏËÉ ÂÕÄÅÔ ÓÏÄÅÒÖÁÔØ ÎÅ Ú×ÅÚÄÏÞËÉ, Á -ÔÉÒÅ. +ú×ÅÚÄÏÞËÉ × ÎÁÞÁÌÅ ÓÔÒÏËÉ ÏÚÎÁÞÁÀÔ, ÞÔÏ ×Ù ÉÚÍÅÎÑÌÉ ÔÅËÓÔ. ðÒÉ ÏÔËÒÙÔÉÉ ÉÌÉ +ÓÏÈÒÁÎÅÎÉÉ ÆÁÊÌÁ, ÜÔÁ ÞÁÓÔØ ÓÔÒÏËÉ ÂÕÄÅÔ ÓÏÄÅÒÖÁÔØ ÎÅ Ú×ÅÚÄÏÞËÉ, Á ÔÉÒÅ. -þÁÓÔØ ÓÔÒÏËÉ ÓÔÁÔÕÓÁ ×ÎÕÔÒÉ ÓËÏÂÏË ÓÏÏÂÝÁÅÔ ×ÁÍ ÒÅÖÉÍ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ, -ËÏÔÏÒÙÍ ×Ù ÐÏÌØÚÕÅÔÅÓØ. óÔÁÎÄÁÒÔÎÙÊ ÒÅÖÉÍ -- Fundamental, ÅÇÏ ×Ù ÉÓÐÏÌØÚÕÅÔÅ -É ÓÅÊÞÁÓ. üÔÏ ÐÒÉÍÅÒ "ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ" ("major mode"). +þÁÓÔØ ÓÔÒÏËÉ ÓÔÁÔÕÓÁ ×ÎÕÔÒÉ ÓËÏÂÏË ÓÏÏÂÝÁÅÔ ×ÁÍ Ï ÒÅÖÉÍÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ, +ËÏÔÏÒÙÍ ×Ù ÓÅÊÞÁÓ ÉÓÐÏÌØÚÕÅÔÅ. óÔÁÎÄÁÒÔÎÙÊ ÒÅÖÉÍ -- Fundamental, ÏÎ +ÉÓÐÏÌØÚÕÅÔÓÑ É ÄÁÎÎÏÍ ÄÏËÕÍÅÎÔÅ. üÔÏ ÐÒÉÍÅÒ "ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ" ("major +mode"). -Emacs ÉÍÅÅÔ ÍÎÏÇÏ ÒÁÚÌÉÞÎÙÈ ÏÓÎÏ×ÎÙÈ ÒÅÖÉÍÏ×. îÅËÏÔÏÒÙÅ ÉÚ ÒÅÖÉÍÏ× ÏÚÎÁÞÁÀÔ, -ÞÔÏ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ ÎÁ ÒÁÚÌÉÞÎÏÍ ÑÚÙËÅ É/ÉÌÉ ÒÁÚÌÉÞÎÙÅ ×ÉÄÙ ÔÅËÓÔÁ, -ÔÁËÉÅ ËÁË Lisp-ÒÅÖÉÍ, Text-ÒÅÖÉÍ É ÐÒ. ÷ ÌÀÂÏÅ ×ÒÅÍÑ ÄÅÊÓÔ×ÕÅÔ ÔÏÌØËÏ ÏÄÉÎ -ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ, É ÅÇÏ ÎÁÚ×ÁÎÉÅ ×Ù ÍÏÖÅÔÅ ÎÁÊÔÉ × ÓËÏÂËÁÈ, ÇÄÅ ÓÅÊÞÁÓ -ÎÁÈÏÄÉÔÓÑ ÓÌÏ×Ï "Fundamental" (ÂÁÚÏ×ÙÊ). +Emacs ÉÍÅÅÔ ÍÎÏÇÏ ÒÁÚÌÉÞÎÙÈ ÏÓÎÏ×ÎÙÈ ÒÅÖÉÍÏ×. îÅËÏÔÏÒÙÅ ÉÚ ÒÅÖÉÍÏ× +ÉÓÐÏÌØÚÕÀÔÓÑ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÔÅËÓÔÁ ÎÁ ÒÁÚÌÉÞÎÙÈ ÑÚÙËÁÈ É/ÉÌÉ ÒÁÚÌÉÞÎÙÈ +×ÉÄÏ× ÔÅËÓÔÁ, ÔÁËÉÅ ËÁË Lisp-ÒÅÖÉÍ, Text-ÒÅÖÉÍ É ÐÒ. ÷ ËÁÖÄÙÊ ÍÏÍÅÎÔ +×ÒÅÍÅÎÉ ÄÅÊÓÔ×ÕÅÔ ÔÏÌØËÏ ÏÄÉÎ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ, É ÅÇÏ ÎÁÚ×ÁÎÉÅ ×Ù ÍÏÖÅÔÅ ÎÁÊÔÉ +× ÓËÏÂËÁÈ -- ÔÁÍ, ÇÄÅ ÓÅÊÞÁÓ ÎÁÈÏÄÉÔÓÑ ÓÌÏ×Ï "Fundamental" (ÂÁÚÏ×ÙÊ). -ëÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÉÍÅÅÔ ÎÅÓËÏÌØËÏ ÏÔÌÉÞÉÔÅÌØÎÙÈ ËÏÍÁÎÄ. îÁÐÒÉÍÅÒ, ËÏÍÁÎÄÙ -ÓÏÚÄÁÎÉÑ ËÏÍÍÅÎÔÁÒÉÑ × ÐÒÏÇÒÁÍÍÅ, É ÐÏÓËÏÌØËÕ × ËÁÖÄÏÍ ÑÚÙËÅ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ -ËÏÍÍÅÎÔÁÒÉÉ ÚÁÐÉÓÙ×ÁÀÔÓÑ ÐÏ-Ó×ÏÅÍÕ, ËÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ×ÓÔÁ×ÌÑÅÔ ÉÈ -ÐÏ-ÒÁÚÎÏÍÕ. ëÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÉÍÅÅÔ ÉÍÅÎÏ×ÁÎÎÕÀ ËÏÍÁÎÄÕ, ËÏÔÏÒÁÑ ×ËÌÀÞÁÅÔ -ÅÇÏ. îÁÐÒÉÍÅÒ, M-x fundamental-mode - ËÏÍÁÎÄÁ, ËÏÔÏÒÁÑ ÐÅÒÅËÌÀÞÁÅÔ × ÂÁÚÏ×ÙÊ -(Fundamental) ÒÅÖÉÍ. +ëÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÚÁÓÔÁ×ÌÑÅÔ ÎÅËÏÔÏÒÙÅ ËÏÍÁÎÄÙ ×ÅÓÔÉ ÓÅÂÑ ÎÅÍÎÏÇÏ ÐÏ +ÄÒÕÇÏÍÕ. îÁÐÒÉÍÅÒ, ÜÔÏ ËÏÍÁÎÄÙ ÓÏÚÄÁÎÉÑ ËÏÍÍÅÎÔÁÒÉÅ× × ÐÒÏÇÒÁÍÍÅ, É +ÐÏÓËÏÌØËÕ × ËÁÖÄÏÍ ÑÚÙËÅ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ ËÏÍÍÅÎÔÁÒÉÉ ÚÁÐÉÓÙ×ÁÀÔÓÑ +ÐÏ-Ó×ÏÅÍÕ, ÔÏ É ËÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ×ÓÔÁ×ÌÑÅÔ ÉÈ ÐÏ-ÒÁÚÎÏÍÕ. ëÁÖÄÙÊ +ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÉÍÅÅÔ ÉÍÅÎÏ×ÁÎÎÕÀ ËÏÍÁÎÄÕ, ËÏÔÏÒÁÑ ×ËÌÀÞÁÅÔ ÅÇÏ. îÁÐÒÉÍÅÒ, +M-x fundamental-mode -- ÜÔÏ ËÏÍÁÎÄÁ, ËÏÔÏÒÁÑ ×ËÌÀÞÁÅÔ ÂÁÚÏ×ÙÊ (Fundamental) +ÒÅÖÉÍ. -åÓÌÉ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÒÕÓÓËÉÊ ÔÅËÓÔ, ÎÁÐÒÉÍÅÒ ËÁË ÜÔÏÔ (ËÏÎÅÞÎÏ, ÎÅ ÉÍÅÎÎÏ -ÜÔÏÔ, Á TUTORIAL) ÆÁÊÌ, ×Ù ×ÅÒÏÑÔÎÏ ÄÏÌÖÎÙ ÐÅÒÅËÌÀÞÉÔØÓÑ × Text-ÒÅÖÉÍ. +åÓÌÉ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ ÎÁ ÅÓÔÅÓÔ×ÅÎÎÏÍ ÑÚÙËÅ, ÎÁÐÒÉÍÅÒ, ËÁË ÜÔÏÔ ÆÁÊÌ, +ÔÏ ×Ù ×ÅÒÏÑÔÎÏ ÄÏÌÖÎÙ ÐÅÒÅËÌÀÞÉÔØÓÑ × Text-ÒÅÖÉÍ. >> îÁÂÅÒÉÔÅ M-x text mode<Return>. îÅ ×ÏÌÎÕÊÔÅÓØ, ÎÉ ÏÄÎÁ ÉÚ ×ÙÕÞÅÎÎÙÈ ×ÁÍÉ ËÏÍÁÎÄ Emacs ÎÅ ÉÚÍÅÎÉÌÁÓØ. îÏ ×Ù -ÍÏÖÅÔÅ ÚÁÍÅÔÉÔØ, ÞÔÏ M-f É M-b ÔÅÐÅÒØ ÒÁÚÌÉÞÁÀÔ ÁÐÏÓÔÒÏÆÙ ËÁË ÞÁÓÔÉ ÓÌÏ×Á. -òÁÎÅÅ, × ÂÁÚÏ×ÏÍ ÒÅÖÉÍÅ (Fundamental mode), M-f É M-b ÐÏÎÉÍÁÌÉ ÁÐÏÓÔÒÏÆÙ -ËÁË ÒÁÚÄÅÌÉÔÅÌÉ ÓÌÏ×. +ÍÏÖÅÔÅ ÚÁÍÅÔÉÔØ, ÞÔÏ M-f É M-b ÔÅÐÅÒØ ÒÁÓÓÍÁÔÒÉ×ÁÀÔ ÁÐÏÓÔÒÏÆÙ ËÁË ÞÁÓÔØ +ÓÌÏ×Á. òÁÎÅÅ, × ÂÁÚÏ×ÏÍ ÒÅÖÉÍÅ (Fundamental mode), M-f É M-b ÐÏÎÉÍÁÌÉ +ÁÐÏÓÔÒÏÆÙ ËÁË ÒÁÚÄÅÌÉÔÅÌÉ ÓÌÏ×. ïÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÏÂÙÞÎÏ ÄÅÌÁÅÔ ÎÅÂÏÌØÛÉÅ ÉÚÍÅÎÅÎÉÑ, ÔÁËÉÅ ËÁË: ÂÏÌØÛÉÎÓÔ×Ï -ËÏÍÁÎÄ ÄÅÌÁÀÔ "ÔÕ ÖÅ ÒÁÂÏÔÕ" × ËÁÖÄÏÍ ÉÚ ÒÅÖÉÍÏ×, ÎÏ ÉÈ ÒÁÂÏÔÁ ÏÔÌÉÞÁÅÔÓÑ -ËÁËÏÊ-ÎÉÂÕÄØ ÍÅÌÏÞØÀ. +ËÏÍÁÎÄ ÄÅÌÁÀÔ "ÏÄÎÕ É ÔÕ ÖÅ ÒÁÂÏÔÕ" × ËÁÖÄÏÍ ÉÚ ÒÅÖÉÍÏ×, ÎÏ ÉÈ ÄÅÊÓÔ×ÉÅ +ÏÔÌÉÞÁÅÔÓÑ ËÁËÏÊ-ÎÉÂÕÄØ ÍÅÌÏÞØÀ. -äÌÑ ÐÒÏÓÍÏÔÒÁ ÄÏËÕÍÅÎÔÁÃÉÉ Ï ×ÁÛÅÍ ÔÅËÕÝÅÍ ÏÓÎÏ×ÎÏÍ ÒÅÖÉÍÅ, ÎÁÖÍÉÔÅ C-h m. +äÌÑ ÐÒÏÓÍÏÔÒÁ ÄÏËÕÍÅÎÔÁÃÉÉ Ï ÔÅËÕÝÅÍ ÏÓÎÏ×ÎÏÍ ÒÅÖÉÍÅ, ÎÁÖÍÉÔÅ C-h m. ->> éÓÐÏÌØÚÕÊÔÅ C-u C-v ÏÄÉÎ ÒÁÚ ÉÌÉ ÂÏÌÅÅ, ÞÔÏÂÙ ÒÁÓÐÏÌÏÖÉÔØ ÜÔÕ ÓÔÒÏËÕ ÂÌÉÖÅ - Ë ×ÅÒÈÕ ÜËÒÁÎÁ. +>> éÓÐÏÌØÚÕÊÔÅ C-u C-v ÏÄÉÎ ÒÁÚ ÉÌÉ ÂÏÌÅÅ, ÞÔÏÂÙ ÒÁÓÐÏÌÏÖÉÔØ ÜÔÕ ÓÔÒÏËÕ + ÂÌÉÖÅ Ë ×ÅÒÈÕ ÜËÒÁÎÁ. >> îÁÂÅÒÉÔÅ C-h m, ÞÔÏÂÙ ÐÏÓÍÏÔÒÅÔØ ÏÔÌÉÞÉÑ Text-ÒÅÖÉÍÁ ÏÔ ÂÁÚÏ×ÏÇÏ. >> îÁÂÅÒÉÔÅ C-x 1, ÞÔÏÂÙ ÕÂÒÁÔØ ÄÏËÕÍÅÎÔÁÃÉÀ Ó ÇÌÁÚ ÄÏÌÏÊ :) -ïÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÎÁÚÙ×ÁÅÔÓÑ ÏÓÎÏ×ÎÙÍ ÐÏÔÏÍÕ, ÞÔÏ ÅÓÔØ ÎÅÓËÏÌØËÏ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ -(minor) ÒÅÖÉÍÏ×. äÏÐÏÌÎÉÔÅÌØÎÙÅ ÒÅÖÉÍÙ ÎÅ Ñ×ÌÑÀÔÓÑ ÁÌØÔÅÒÎÁÔÉ×ÁÍÉ ÏÓÎÏ×ÎÙÍ, -ÏÎÉ ÔÏÌØËÏ ÎÅÍÎÏÇÏ ÉÚÍÅÎÑÀÔ ÉÈ ÐÏ×ÅÄÅÎÉÅ. ëÁÖÄÙÊ ÄÏÐÏÌÎÉÔÅÌØÎÙÊ ÒÅÖÉÍ -×ËÌÀÞÁÅÔÓÑ/×ÙËÌÀÞÁÅÔÓÑ ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ÄÒÕÇÉÈ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ ÒÅÖÉÍÏ×, É -ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ×ÁÛÅÇÏ ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ -ÂÅÚ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ, ÉÌÉ Ó ÌÀÂÏÊ ÉÈ ËÏÍÂÉÎÁÃÉÅÊ. +ïÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÎÁÚÙ×ÁÅÔÓÑ ÏÓÎÏ×ÎÙÍ ÐÏÔÏÍÕ, ÞÔÏ ÔÁËÖÅ ÓÕÝÅÓÔ×ÕÀÔ +ÄÏÐÏÌÎÉÔÅÌØÎÙÅ (minor) ÒÅÖÉÍÙ. äÏÐÏÌÎÉÔÅÌØÎÙÅ ÒÅÖÉÍÙ ÎÅ Ñ×ÌÑÀÔÓÑ +ÁÌØÔÅÒÎÁÔÉ×ÁÍÉ ÏÓÎÏ×ÎÙÍ, ÏÎÉ ÔÏÌØËÏ ÎÅÍÎÏÇÏ ÉÚÍÅÎÑÀÔ ÉÈ ÐÏ×ÅÄÅÎÉÅ. ëÁÖÄÙÊ +ÄÏÐÏÌÎÉÔÅÌØÎÙÊ ÒÅÖÉÍ ×ËÌÀÞÁÅÔÓÑ/×ÙËÌÀÞÁÅÔÓÑ ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ÄÒÕÇÉÈ +ÄÏÐÏÌÎÉÔÅÌØÎÙÈ ÒÅÖÉÍÏ×, É ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ×ÁÛÅÇÏ ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ. ÷Ù ÍÏÖÅÔÅ +ÉÓÐÏÌØÚÏ×ÁÔØ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÂÅÚ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ, ÉÌÉ Ó ÌÀÂÏÊ ÉÈ ËÏÍÂÉÎÁÃÉÅÊ. ïÄÉÎ ÉÚ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ ÒÅÖÉÍÏ× ÏÞÅÎØ ÐÏÌÅÚÅÎ, ÏÓÏÂÅÎÎÏ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ -ÔÅËÓÔÁ - ÜÔÏ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ (Auto Fill mode). ëÏÇÄÁ ÜÔÏÔ ÒÅÖÉÍ -×ËÌÀÞÅÎ, Emacs ÒÁÚÒÙ×ÁÅÔ ÓÔÒÏËÉ ÍÅÖÄÕ ÓÌÏ×ÁÍÉ Á×ÔÏÍÁÔÉÞÅÓËÉ, ËÏÇÄÁ ×Ù -×ÓÔÁ×ÌÑÅÔÅ ÔÅËÓÔ É ÄÅÌÁÅÔÅ ÓÔÒÏËÉ ÓÌÉÛËÏÍ ÄÌÉÎÎÙÍÉ. +ÔÅËÓÔÁ -- ÜÔÏ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ (Auto Fill mode). ëÏÇÄÁ ÜÔÏÔ ÒÅÖÉÍ +×ËÌÀÞÅÎ, ÔÏ Emacs ÒÁÚÒÙ×ÁÅÔ ÓÔÒÏËÉ ÍÅÖÄÕ ÓÌÏ×ÁÍÉ Á×ÔÏÍÁÔÉÞÅÓËÉ, × ÔÅÈ +ÓÌÕÞÁÑÈ ËÏÇÄÁ ×Ù ×ÓÔÁ×ÌÑÅÔÅ ÔÅËÓÔ É ÄÅÌÁÅÔÅ ÓÔÒÏËÉ ÓÌÉÛËÏÍ ÄÌÉÎÎÙÍÉ. ÷Ù ÍÏÖÅÔÅ ×ËÌÀÞÉÔØ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ, ÎÁÂÒÁ× M-x auto fill mode<Return>. -ëÏÇÄÁ ÜÔÏÔ ÒÅÖÉÍ ×ËÌÀÞÅÎ, ÅÇÏ ÍÏÖÎÏ ×ÙËÌÀÞÉÔØ - M-x auto fill mode<Return>. -åÓÌÉ ÒÅÖÉÍ ×ËÌÀÞÅÎ -- ËÏÍÁÎÄÁ ÅÇÏ ×ÙËÌÀÞÉÔ, ÅÓÌÉ ×ÙËÌÀÞÅÎ -- ×ËÌÀÞÉÔ. íÙ -ÎÁÚÙ×ÁÅÍ ÜÔÏ ËÏÍÁÎÄÏÊ "ÐÅÒÅËÌÀÞÅÎÉÑ ÒÅÖÉÍÁ". +ëÏÇÄÁ ÜÔÏÔ ÒÅÖÉÍ ×ËÌÀÞÅÎ, ÅÇÏ ÍÏÖÎÏ ×ÙËÌÀÞÉÔØ Ó ÐÏÍÏÝØÀ ÔÏÊ ÖÅ ËÏÍÁÎÄÙ -- +M-x auto fill mode<Return>. åÓÌÉ ÒÅÖÉÍ ×ËÌÀÞÅÎ, ÔÏ ÔÁËÁÑ ËÏÍÁÎÄÁ ÅÇÏ +×ÙËÌÀÞÉÔ, ÅÓÌÉ ×ÙËÌÀÞÅÎ, ÔÏ ×ËÌÀÞÉÔ. íÙ ÎÁÚÙ×ÁÅÍ ÜÔÏ ËÏÍÁÎÄÏÊ "ÐÅÒÅËÌÀÞÅÎÉÑ +ÒÅÖÉÍÁ". ->> îÁÂÅÒÉÔÅ M-x auto fill mode<Return>. úÁÔÅÍ ××ÏÄÉÔÅ ÓÔÒÏËÕ ÉÚ ÓÌÏ× - "ÆÙ×Á " ÐÏËÁ ÎÅ Õ×ÉÄÉÔÅ, ËÁË ÏÎÁ ÒÁÚÄÅÌÉÔÓÑ ÎÁ Ä×Å ÓÔÒÏËÉ. ÷Ù ÄÏÌÖÎÙ - ÐÏÍÅÝÁÔØ ÐÒÏÂÅÌÙ ÍÅÖÄÕ ÓÌÏ×ÁÍÉ, ÐÏÔÏÍÕ ÞÔÏ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ ÒÁÚÄÅÌÑÅÔ - ÓÔÒÏËÉ ÔÏÌØËÏ ÐÏ ÐÒÏÂÅÌÁÍ. +>> îÁÂÅÒÉÔÅ M-x auto fill mode<Return>. úÁÔÅÍ ××ÏÄÉÔÅ ÓÔÒÏËÕ ÉÚ ÓÌÏ× "ÆÙ×Á " + ÐÏËÁ ÎÅ Õ×ÉÄÉÔÅ, ËÁË ÏÎÁ ÒÁÚÄÅÌÉÔÓÑ ÎÁ Ä×Å ÓÔÒÏËÉ. ÷Ù ÄÏÌÖÎÙ ÐÏÍÅÝÁÔØ + ÐÒÏÂÅÌÙ ÍÅÖÄÕ ÓÌÏ×ÁÍÉ, ÐÏÔÏÍÕ ÞÔÏ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ ÒÁÚÂÉ×ÁÅÔ ÓÔÒÏËÉ + ÔÏÌØËÏ ÐÏ ÐÒÏÂÅÌÁÍ. -çÒÁÎÉÃÁ ÏÂÙÞÎÏ ×ÙÓÔÁ×ÌÅÎÁ ÎÁ 70-ÔÉ ÓÉÍ×ÏÌÁÈ, ÎÏ ×Ù ÍÏÖÅÔÅ ÉÚÍÅÎÉÔØ ÅÅ -ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ C-x f. ÷Ù ÄÏÌÖÎÙ ÚÁÄÁÔØ ÇÒÁÎÉÃÕ × ×ÉÄÅ ÞÉÓÌÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ -ÄÌÑ ÜÔÏÊ ËÏÍÁÎÄÙ. +çÒÁÎÉÃÁ ÒÁÚÂÉÅÎÉÑ ÏÂÙÞÎÏ ÒÁ×ÎÁ 70-ÔÉ ÓÉÍ×ÏÌÁÍ, ÎÏ ×Ù ÍÏÖÅÔÅ ÉÚÍÅÎÉÔØ ÅÅ +ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ C-x f. ÷Ù ÄÏÌÖÎÙ ÚÁÄÁÔØ ÇÒÁÎÉÃÕ × ×ÉÄÅ ÞÉÓÌÏ×ÏÇÏ +ÁÒÇÕÍÅÎÔÁ ÄÌÑ ÜÔÏÊ ËÏÍÁÎÄÙ. ->> ÷×ÅÄÉÔÅ C-x f Ó ÁÒÇÕÍÅÎÔÏÍ 20. (C-u 2 0 C-x f). úÁÔÅÍ ××ÅÄÉÔÅ - ËÁËÏÊ-ÎÉÂÕÄØ ÔÅËÓÔ, É ÐÏÓÍÏÔÒÉÔÅ ËÁË Emacs ÚÁÐÏÌÎÑÅÔ ÓÔÒÏËÉ ÐÏ 20 - ÓÉÍ×ÏÌÏ× × ËÁÖÄÏÊ. ÷ÅÒÎÉÔÅ ÚÎÁÞÅÎÉÅ ÇÒÁÎÉÃÙ 70 ÎÁÚÁÄ, - ÓÎÏ×Á ÉÓÐÏÌØÚÕÑ C-x f. +>> ÷×ÅÄÉÔÅ C-x f Ó ÁÒÇÕÍÅÎÔÏÍ 20 (C-u 2 0 C-x f). úÁÔÅÍ ××ÅÄÉÔÅ ËÁËÏÊ-ÎÉÂÕÄØ + ÔÅËÓÔ, É ÐÏÓÍÏÔÒÉÔÅ ËÁË Emacs ÚÁÐÏÌÎÑÅÔ ÓÔÒÏËÉ ÐÏ 20 ÓÉÍ×ÏÌÏ× × ËÁÖÄÏÊ. + ÷ÅÒÎÉÔÅ ÚÎÁÞÅÎÉÅ ÇÒÁÎÉÃÙ ÒÁ×ÎÏÅ 70 ÎÁÚÁÄ, ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ C-x f. -åÓÌÉ ×Ù ÓÄÅÌÁÌÉ ÉÚÍÅÎÅÎÉÑ × ÓÅÒÅÄÉÎÅ ÐÁÒÁÇÒÁÆÁ, Á×ÔÏÚÁÐÏÌÎÅÎÉÅ ÎÅ ÐÅÒÅÓÔÒÏÉÔ -ÔÅËÓÔ ÄÌÑ ×ÁÓ. þÔÏÂÙ ÐÅÒÅÓÔÒÏÉÔØ ÐÁÒÁÇÒÁÆ, ÎÁÂÅÒÉÔÅ M-q (META-q) × ÔÏ ×ÒÅÍÑ, -ËÏÇÄÁ ËÕÒÓÏÒ ÎÁÈÏÄÉÔÓÑ ×ÎÕÔÒÉ ÐÁÒÁÇÒÁÆÁ. +åÓÌÉ ×Ù ÓÄÅÌÁÌÉ ÉÚÍÅÎÅÎÉÑ × ÓÅÒÅÄÉÎÅ ÐÁÒÁÇÒÁÆÁ, ÔÏ Á×ÔÏÚÁÐÏÌÎÅÎÉÅ ÎÅ +ÐÅÒÅÆÏÒÍÁÔÉÒÕÅÔ ÔÅËÓÔ Á×ÔÏÍÁÔÉÞÅÓËÉ. þÔÏÂÙ ÐÅÒÅÆÏÒÍÁÔÉÒÏ×ÁÔØ ÐÁÒÁÇÒÁÆ, +ÎÁÂÅÒÉÔÅ M-q (META-q) ËÏÇÄÁ ËÕÒÓÏÒ ÎÁÈÏÄÉÔÓÑ ×ÎÕÔÒÉ ÐÁÒÁÇÒÁÆÁ. >> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ × ÐÒÅÄÙÄÕÝÉÊ ÐÁÒÁÇÒÁÆ, É ÎÁÖÍÉÔÅ M-q. @@ -805,12 +863,12 @@ * ðïéóë ------- -Emacs ÕÍÅÅÔ ÉÓËÁÔØ ÓÔÒÏËÉ (ÎÅÐÒÅÒÙ×ÎÙÅ ÇÒÕÐÐÙ ÓÉÍ×ÏÌÏ× ÉÌÉ ÓÌÏ×Á) ×ÐÅÒÅÄ -ÐÏ ÔÅËÓÔÕ, ÉÌÉ ÎÁÚÁÄ. ðÏÉÓË ÓÔÒÏËÉ - ÜÔÏ ËÏÍÁÎÄÁ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ; ÏÎÁ +Emacs ÕÍÅÅÔ ÉÓËÁÔØ ÓÔÒÏËÉ (ÎÅÐÒÅÒÙ×ÎÙÅ ÇÒÕÐÐÙ ÓÉÍ×ÏÌÏ× ÉÌÉ ÓÌÏ×Á) ×ÐÅÒÅÄ ÉÌÉ +ÎÁÚÁÄ ÐÏ ÔÅËÓÔÕ. ðÏÉÓË ÓÔÒÏËÉ -- ÜÔÏ ËÏÍÁÎÄÁ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ; ÏÎÁ ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ÓÌÅÄÕÀÝÕÀ ÔÏÞËÕ, ÇÄÅ ÎÁÊÄÅÎÁ ÉÓËÏÍÁÑ ÓÔÒÏËÁ. -ëÏÍÁÎÄÁ ÐÏÉÓËÁ Emacs ÏÔÌÉÞÁÀÔÓÑ ÏÔ ÁÎÁÌÏÇÉÞÎÙÈ ËÏÍÁÎÄ ÂÏÌØÛÉÎÓÔ×Á ÄÒÕÇÉÈ -ÒÅÄÁËÔÏÒÏ× ÔÅÍ, ÞÔÏ ÏÎÁ ÉÎËÒÅÍÅÎÔÁÌØÎÁÑ. üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÐÏÉÓË ÐÒÏÉÓÈÏÄÉÔ +ëÏÍÁÎÄÁ ÐÏÉÓËÁ Emacs ÏÔÌÉÞÁÅÔÓÑ ÏÔ ÁÎÁÌÏÇÉÞÎÙÈ ËÏÍÁÎÄ ÂÏÌØÛÉÎÓÔ×Á ÄÒÕÇÉÈ +ÒÅÄÁËÔÏÒÏ× ÔÅÍ, ÞÔÏ ÏÎÁ ÉÎËÒÅÍÅÎÔÁÌØÎÁÑ. üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÐÏÉÓË ÐÒÏÉÓÈÏÄÉÔ ÐÏ ÍÅÒÅ, ÔÏÇÏ ËÁË ×Ù ÎÁÂÉÒÁÅÔÅ ÉÓËÏÍÕÀ ÓÔÒÏËÕ. ëÏÍÁÎÄÁ, ÎÁÞÉÎÁÀÝÁÑ ÐÏÉÓË ×ÐÅÒÅÄ -- C-s, Á C-r ÉÝÅÔ ÎÁÚÁÄ. ðïäïöäéôå! îÅ @@ -820,240 +878,261 @@ ÷ÁÍ ÓÏÏÂÝÁÅÔÓÑ, ÞÔÏ Emacs ÖÄÅÔ ××ÏÄÁ ÓÌÏ×Á, ËÏÔÏÒÏÅ ×Ù ÈÏÔÉÔÅ ÎÁÊÔÉ. <Return> ÚÁ×ÅÒÛÁÅÔ ÐÏÉÓË. ->> ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-s ÄÌÑ ÎÁÞÁÌÁ ÐÏÉÓËÁ. íÅÄÌÅÎÎÏ, ÏÄÎÕ ÂÕË×Õ ÚÁ ÏÄÉÎ ÒÁÚ, - ÎÁÂÉÒÁÊÔÅ ÓÌÏ×Ï 'ËÕÒÓÏÒ', ÏÓÔÁÎÁ×ÌÉ×ÁÑÓØ ÐÏÓÌÅ ËÁÖÄÏÊ ××ÅÄÅÎÎÏÊ ÂÕË×Ù É - ÚÁÍÅÞÁÑ ÞÔÏ ÐÒÏÉÓÈÏÄÉÔ Ó ËÕÒÓÏÒÏÍ. +>> ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-s ÄÌÑ ÎÁÞÁÌÁ ÐÏÉÓËÁ. íÅÄÌÅÎÎÏ, ÐÏ ÏÄÎÏÊ ÂÕË×Å, ÎÁÂÉÒÁÊÔÅ + ÓÌÏ×Ï 'ËÕÒÓÏÒ', ÏÓÔÁÎÁ×ÌÉ×ÁÑÓØ ÐÏÓÌÅ ËÁÖÄÏÊ ××ÅÄÅÎÎÏÊ ÂÕË×Ù É ÚÁÍÅÞÁÑ ÞÔÏ + ÐÒÏÉÓÈÏÄÉÔ Ó ËÕÒÓÏÒÏÍ. óÅÊÞÁÓ ×Ù ÎÁÛÌÉ ÐÅÒ×ÏÅ ×ÈÏÖÄÅÎÉÅ ÓÌÏ×Á "ËÕÒÓÏÒ". >> îÁÖÍÉÔÅ C-s ÓÎÏ×Á, ÞÔÏÂÙ ÎÁÊÔÉ ÓÌÅÄÕÀÝÅÅ ×ÈÏÖÄÅÎÉÅ ÓÌÏ×Á "ËÕÒÓÏÒ". ->> ôÅÐÅÒØ ÎÁÖÍÉÔÅ <Delete> ÞÅÔÙÒÅ ÒÁÚÁ É ÐÒÏÓÌÅÄÉÔÅ ÚÁ ÐÅÒÅÍÅÝÅÎÉÑÍÉ ËÕÒÓÏÒÁ. +>> ôÅÐÅÒØ ÎÁÖÍÉÔÅ <Delback> ÞÅÔÙÒÅ ÒÁÚÁ É ÐÒÏÓÌÅÄÉÔÅ ÚÁ ÐÅÒÅÍÅÝÅÎÉÑÍÉ ËÕÒÓÏÒÁ. >> îÁÖÍÉÔÅ <Return> ÄÌÑ ÚÁ×ÅÒÛÅÎÉÑ ÐÏÉÓËÁ. -÷Ù ×ÉÄÅÌÉ, ÞÔÏ ÐÒÏÉÓÈÏÄÉÌÏ? Emacs × ÒÅÖÉÍÅ ÉÎËÒÅÍÅÎÔÁÌØÎÏÇÏ ÐÏÉÓËÁ ÐÙÔÁÌÓÑ -ÐÅÒÅÈÏÄÉÔØ Ë ÓÔÒÏËÁÍ, ÓÏ×ÐÁÄÁÀÝÉÍ Ó ÎÁÂÉÒÁÅÍÏÊ ×ÁÍÉ, ÐÏÄÓ×ÅÞÉ×ÁÑ ÉÈ ÄÌÑ ×ÁÓ. +÷Ù ÚÁÍÅÔÉÌÉ, ÞÔÏ ÐÒÏÉÓÈÏÄÉÌÏ? Emacs × ÒÅÖÉÍÅ ÉÎËÒÅÍÅÎÔÁÌØÎÏÇÏ ÐÏÉÓËÁ ÐÙÔÁÌÓÑ +ÐÅÒÅÈÏÄÉÔØ Ë ÓÔÒÏËÁÍ, ÓÏ×ÐÁÄÁÀÝÉÍ Ó ÎÁÂÉÒÁÅÍÏÊ ×ÁÍÉ ÓÔÒÏËÏÊ, ÐÏÄÓ×ÅÞÉ×ÁÑ ÉÈ. þÔÏÂÙ ÐÅÒÅÊÔÉ Ë ÓÌÅÄÕÀÝÅÍÕ ×ÈÏÖÄÅÎÉÑ ÓÌÏ×Á 'ËÕÒÓÏÒ' ÐÒÏÓÔÏ ÎÁÖÍÉÔÅ C-s -ÓÎÏ×Á. åÓÌÉ ÂÏÌØÛÅ ÎÅÔ ×ÈÏÖÄÅÎÉÊ, Emacs ÉÚÄÁÓÔ Ú×ÕËÏ×ÏÊ ÓÉÇÎÁÌ, É ÓÏÏÂÝÉÔ, -ÞÔÏ ×ÁÛ ÐÏÉÓË ÎÅ ÕÄÁÌÓÑ ("failing"), C-g ÔÁËÖÅ ÍÏÖÅÔ ÏÔÍÅÎÉÔØ ÐÏÉÓË. +ÓÎÏ×Á. åÓÌÉ ÂÏÌØÛÅ ÎÅÔ ×ÈÏÖÄÅÎÉÊ, ÔÏ Emacs ÉÚÄÁÓÔ Ú×ÕËÏ×ÏÊ ÓÉÇÎÁÌ, É +ÓÏÏÂÝÉÔ, ÞÔÏ ×ÁÛ ÐÏÉÓË ÎÅ ÕÄÁÌÓÑ ("failing"), C-g ÔÁËÖÅ ÍÏÖÅÔ ÏÔÍÅÎÉÔØ +ÐÏÉÓË. -úáíåþáîéå: îÁ ÎÅËÏÔÏÒÙÈ ÓÉÓÔÅÍÁÈ ××ÏÄ C-s ÚÁÍÏÒÏÚÉÔ ÜËÒÁÎ, É ×Ù ÎÅ Õ×ÉÄÉÔÅ -ÐÏÓÌÅÄÕÀÝÅÇÏ ×Ù×ÏÄÁ Emacs`Á. üÔÏ ÏÚÎÁÞÁÅÔ, ÞÔÏ ÏÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ ÉÍÅÅÔ -"ÏÓÏÂÅÎÎÏÓÔØ", ÉÍÅÎÕÅÍÕÀ "flow control", ÐÅÒÅÈ×ÁÔÙ×ÁÀÝÕÀ C-s É ÎÅ ÐÒÏÐÕÓËÁÀÝÕÀ -ÜÔÏÔ ÓÉÍ×ÏÌ Ë Emacs`Õ. äÌÑ ÒÁÚÍÏÒÏÚËÉ ÜËÒÁÎÁ, ÎÁÖÍÉÔÅ C-q. óÍÏÔÒÉÔÅ ÒÁÚÄÅÌ -"Spontaneous Entry to Incremental Search" ÒÕËÏ×ÏÄÓÔ×Á Emacs, ÞÔÏÂÙ ÕÚÎÁÔØ, -ËÁË ÂÏÒÏÔØÓÑ Ó ÜÔÏÊ "ÏÓÏÂÅÎÎÏÓÔØÀ". +úáíåþáîéå: îÁ ÎÅËÏÔÏÒÙÈ ÓÉÓÔÅÍÁÈ, ××ÏÄ C-x C-s ÚÁÂÌÏËÉÒÕÅÔ ÜËÒÁÎ, ÔÁË ÞÔÏ ×Ù +ÎÅ Õ×ÉÄÉÔÅ ÐÏÓÌÅÄÕÀÝÅÇÏ ×Ù×ÏÄÁ Emacs`Á. ôÁËÏÅ ÐÏ×ÅÄÅÎÉÅ ÏÚÎÁÞÁÅÔ, ÞÔÏ +ÏÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ ÉÍÅÅÔ "ÏÓÏÂÅÎÎÏÓÔØ", ÉÍÅÎÕÅÍÕÀ "flow control", +ÐÅÒÅÈ×ÁÔÙ×ÁÀÝÕÀ ÓÏÞÅÔÁÎÉÅ C-s É ÎÅ ÐÒÏÐÕÓËÁÀÝÕÀ ÜÔÏÔ ÓÉÍ×ÏÌ Ë Emacs`Õ. äÌÑ +ÓÎÑÔÉÑ ÂÌÏËÉÒÏ×ËÉ ÜËÒÁÎÁ, ÎÁÖÍÉÔÅ C-q. ïÂÒÁÔÉÔÅÓØ Ë ÒÁÚÄÅÌÕ "Spontaneous +Entry to Incremental Search" ÒÕËÏ×ÏÄÓÔ×Á Emacs, ÞÔÏÂÙ ÕÚÎÁÔØ Ï ÔÏÍ, ËÁË +ÂÏÒÏÔØÓÑ Ó ÜÔÏÊ "ÏÓÏÂÅÎÎÏÓÔØÀ". -åÓÌÉ ×Ù ×Ï ×ÒÅÍÑ ÉÎËÒÅÍÅÎÔÁÌØÎÏÇÏ ÐÏÉÓËÁ ÎÁÖÍÅÔÅ <Delete>, ×Ù ÍÏÖÅÔÅ ÚÁÍÅÔÉÔØ, -ÞÔÏ ÐÏÓÌÅÄÎÉÊ ÓÉÍ×ÏÌ × ÉÓËÏÍÏÊ ÓÔÒÏËÅ ÕÄÁÌÉÌÓÑ, É ÐÏÉÓË ×ÅÒÎÕÌÓÑ Ë ÐÒÅÄÙÄÕÝÅÍÕ -ÎÁÊÄÅÎÎÏÍÕ ÍÅÓÔÕ. îÁÐÒÉÍÅÒ, ÐÒÅÄÐÏÌÏÖÉÍ, ÞÔÏ ×Ù ÎÁÂÒÁÌÉ "Ë", ÐÏÉÓË ÐÅÒÅÊÄÅÔ Ë -ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ ÓÉÍ×ÏÌÁ "Ë". ôÅÐÅÒØ, ÅÓÌÉ ×Ù ÎÁÂÅÒÅÔÅ "Õ", ËÕÒÓÏÒ ÐÅÒÅÊÄÅÔ Ë -ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ "ËÕ". îÁÖÁÔÉÅ <Delete> ÕÄÁÌÉÔ ÓÉÍ×ÏÌ "Õ" ÉÚ ÓÔÒÏËÉ ÐÏÉÓËÁ, É -ËÕÒÓÏÒ ×ÅÒÎÅÔÓÑ Ë ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ "Ë". +åÓÌÉ ×Ù ×Ï ×ÒÅÍÑ ÉÎËÒÅÍÅÎÔÁÌØÎÏÇÏ ÐÏÉÓËÁ ÎÁÖÍÅÔÅ <Delback>, ÔÏ ×Ù ÚÁÍÅÔÉÔÅ, +ÞÔÏ ÐÏÓÌÅÄÎÉÊ ÓÉÍ×ÏÌ × ÉÓËÏÍÏÊ ÓÔÒÏËÅ ÕÄÁÌÉÌÓÑ, É ÐÏÉÓË ×ÅÒÎÕÌÓÑ Ë +ÐÒÅÄÙÄÕÝÅÍÕ ÎÁÊÄÅÎÎÏÍÕ ÍÅÓÔÕ. îÁÐÒÉÍÅÒ, ÐÒÅÄÐÏÌÏÖÉÍ, ÞÔÏ ×Ù ÎÁÂÒÁÌÉ "Ë", +ÐÏÉÓË ÐÅÒÅÊÄÅÔ Ë ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ ÓÉÍ×ÏÌÁ "Ë". ôÅÐÅÒØ, ÅÓÌÉ ×Ù ÎÁÂÅÒÅÔÅ +"Õ", ËÕÒÓÏÒ ÐÅÒÅÊÄÅÔ Ë ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ "ËÕ". îÁÖÁÔÉÅ <Delback> ÕÄÁÌÉÔ +ÓÉÍ×ÏÌ "Õ" ÉÚ ÓÔÒÏËÉ ÐÏÉÓËÁ, É ËÕÒÓÏÒ ×ÅÒÎÅÔÓÑ Ë ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ "Ë". åÓÌÉ ×Ù ×Ï ×ÒÅÍÑ ÐÏÉÓËÁ ××ÅÄÅÔÅ control- ÉÌÉ meta- ÓÉÍ×ÏÌ (ÚÁ ÎÅËÏÔÏÒÙÍÉ -ÉÓËÌÀÞÅÎÉÑÍÉ -- ÓÉÍ×ÏÌÙ ×ÙÚÙ×ÁÀÝÉÅ ÐÏÉÓË, Á ÉÍÅÎÎÏ C-s É C-r), ÐÏÉÓË -ÐÒÅËÒÁÔÉÔÓÑ. +ÉÓËÌÀÞÅÎÉÑÍÉ, ÔÁËÉÍÉ, ËÁË ÓÉÍ×ÏÌÙ ÎÁÞÉÎÁÀÝÉÅ ÐÏÉÓË, Á ÉÍÅÎÎÏ C-s É C-r), +ÐÏÉÓË ÐÒÅËÒÁÔÉÔÓÑ. -C-s ÎÁÞÉÎÁÅÔ ÐÏÉÓË É ÓÍÏÔÒÉÔ ÎÁ ÌÀÂÙÅ ×ÈÏÖÄÅÎÉÑ ÉÓËÏÍÏÊ ÓÔÒÏËÉ ðïóìå ÔÅËÕÝÅÊ -ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ. åÓÌÉ ×Ù ÈÏÔÉÔÅ ÎÁÊÔÉ ÞÔÏ-ÔÏ ÒÁÎÅÅ × ÔÅËÓÔÅ, ÎÁÖÍÉÔÅ C-r. -÷ÓÅ, ÞÔÏ ÍÙ ÇÏ×ÏÒÉÌÉ Ï C-s, ÐÒÉÍÅÎÉÍÏ É Ë C-r, ÚÁ ÉÓËÌÀÞÅÎÉÅÍ ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÇÏ -ÎÁÐÒÁ×ÌÅÎÉÑ ÐÏÉÓËÁ. +C-s ÎÁÞÉÎÁÅÔ ÐÏÉÓË É ÉÝÅÔ ÌÀÂÙÅ ×ÈÏÖÄÅÎÉÑ ÉÓËÏÍÏÊ ÓÔÒÏËÉ ðïóìå ÔÅËÕÝÅÊ +ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ. åÓÌÉ ×Ù ÈÏÔÉÔÅ ÎÁÊÔÉ ÞÔÏ-ÔÏ ÒÁÎÅÅ × ÔÅËÓÔÅ, ÔÏ ÎÁÖÍÉÔÅ +C-r. ÷ÓÅ, ÞÔÏ ÍÙ ÇÏ×ÏÒÉÌÉ Ï C-s, ÐÒÉÍÅÎÉÍÏ É Ë C-r, ÚÁ ÉÓËÌÀÞÅÎÉÅÍ +ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÇÏ ÎÁÐÒÁ×ÌÅÎÉÑ ÐÏÉÓËÁ. * íîïöåóô÷ï ïëïî (MULTIPLE WINDOWS) ----------------------------------- -ïÄÎÁ ÉÚ ÐÒÉÑÔÎÙÈ ÏÓÏÂÅÎÎÏÓÔÅÊ Emacs ÜÔÏ ÔÏ, ÞÔÏ ×Ù ÍÏÖÅÔÅ ÏÄÎÏ×ÒÅÍÅÎÎÏ -ÏÔÏÂÒÁÖÁÔØ ÎÁ ÜËÒÁÎÅ ÂÏÌÅÅ ÞÅÍ ÏÄÎÏ ÏËÎÏ. +ïÄÎÁ ÉÚ ÐÒÉÑÔÎÙÈ ÏÓÏÂÅÎÎÏÓÔÅÊ Emacs Ñ×ÌÑÅÔÓÑ ÔÏ, ÞÔÏ ×Ù ÍÏÖÅÔÅ ÏÄÎÏ×ÒÅÍÅÎÎÏ +ÏÔÏÂÒÁÖÁÔØ ÎÁ ÜËÒÁÎÅ ÎÅÓËÏÌØËÏ ÏËÏÎ. ->> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÜÔÕ ÌÉÎÉÀ, É ÎÁÂÅÒÉÔÅ C-u 0 C-l (ÜÔÏ CONTROL-L, Á +>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÜÔÕ ÓÔÒÏËÕ, É ÎÁÂÅÒÉÔÅ C-u 0 C-l (ÜÔÏ CONTROL-L, Á ÎÅ CONTROL-1). >> ôÅÐÅÒØ ÎÁÂÅÒÉÔÅ C-x 2, ÞÔÏ ÒÁÚÄÅÌÉÔ ÜËÒÁÎ ÎÁ Ä×Á ÏËÎÁ. ïÂÁ ÏËÎÁ ÏÔÏÂÒÁÖÁÀÔ ÕÞÅÂÎÉË. ëÕÒÓÏÒ ÏÓÔÁÌÓÑ × ×ÅÒÈÎÅÍ ÏËÎÅ. >> îÁÖÍÉÔÅ C-M-v ÄÌÑ ÐÒÏËÒÕÔËÉ ÎÉÖÎÅÇÏ ÏËÎÁ. - (ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ÎÁÓÔÏÑÝÅÊ ËÎÏÐËÉ META (Alt), ÎÁÖÍÉÔÅ ESC C-v.) + (ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ÎÁÓÔÏÑÝÅÊ ËÎÏÐËÉ META (Alt), ÔÏ ÎÁÖÍÉÔÅ <ESC> C-v.) ->> îÁÖÍÉÔÅ C-x o ("o" ÏÔ ÓÌÏ×Á "other" - ÄÒÕÇÏÅ) ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ × +>> îÁÖÍÉÔÅ C-x o ("o" ÏÔ ÓÌÏ×Á "other" -- ÄÒÕÇÏÅ) ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ × ÎÉÖÎÅÅ ÏËÎÏ. ->> éÓÐÏÌØÚÕÊÔÅ C-v É M-v × ÎÉÖÎÅÍ ÏËÎÅ, ÞÔÏÂÙ ÐÒÏËÒÕÞÉ×ÁÔØ ÅÇÏ. +>> éÓÐÏÌØÚÕÊÔÅ C-v É M-v × ÎÉÖÎÅÍ ÏËÎÅ, ÄÌÑ ÐÒÏËÒÕÔËÉ ÔÅËÓÔÁ. ðÒÏÄÏÌÖÉÔÅ ÞÔÅÎÉÅ ÜÔÉÈ ÉÎÓÔÒÕËÃÉÊ × ×ÅÒÈÎÅÍ ÏËÎÅ. >> îÁÖÍÉÔÅ C-x o ÓÎÏ×Á, ÞÔÏÂÙ ÐÅÒÅÍÅÓÔÉÔØ ËÕÒÓÏÒ ÎÁÚÁÄ × ×ÅÒÈÎÅÅ ÏËÎÏ. ëÕÒÓÏÒ × ×ÅÒÈÎÅÍ ÏËÎÅ ÔÁÍ ÖÅ, ÇÄÅ É ÂÙÌ ÄÏ ÔÏÇÏ. ÷Ù ÍÏÖÅÔÅ ÐÒÏÄÏÌÖÁÔØ ÐÅÒÅËÌÀÞÁÔØÓÑ ÍÅÖÄÕ ÏËÎÁÍÉ, ÉÓÐÏÌØÚÕÑ C-x o. ëÁÖÄÏÅ -ÏËÎÏ ÈÒÁÎÉÔ Ó×ÏÀ ÐÏÚÉÃÉÀ ËÕÒÓÏÒÁ, ÎÏ ÔÏÌØËÏ ÏÄÎÏ ÐÏËÁÚÙ×ÁÅÔ ËÕÒÓÏÒ. ÷ÓÅ +ÏËÎÏ ÈÒÁÎÉÔ Ó×ÏÀ ÐÏÚÉÃÉÀ ËÕÒÓÏÒÁ, ÎÏ ÔÏÌØËÏ ÏÄÎÏ ÐÏËÁÚÙ×ÁÅÔ ËÕÒÓÏÒ. ÷ÓÅ ÏÂÙÞÎÙÅ ËÏÍÁÎÄÙ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÐÒÉÍÅÎÑÀÔÓÑ Ë ÏËÎÕ, × ËÏÔÏÒÏÍ ÏÔÏÂÒÁÖÁÅÔÓÑ -ËÕÒÓÏÒ. íÙ ÎÁÚÙ×ÁÅÍ ÜÔÏ ÏËÎÏ "×ÙÂÒÁÎÎÙÍ" ("selected window"). +ËÕÒÓÏÒ. íÙ ÎÁÚÙ×ÁÅÍ ÜÔÏ ÏËÎÏ "×ÙÂÒÁÎÎÙÍ" ("selected window"). -ëÏÍÁÎÄÁ C-M-v ÏÞÅÎØ ÕÄÏÂÎÁ, ËÏÇÄÁ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ × ÏÄÎÏÍ ÏËÎÅ, É -ÉÓÐÏÌØÚÕÅÔÅ ×ÔÏÒÏÅ × ËÁÞÅÓÔ×Å ÓÐÒÁ×ÏÞÎÉËÁ. ÷Ù ÍÏÖÅÔÅ ×ÓÅÇÄÁ ÓÏÈÒÁÎÑÔØ ËÕÒÓÏÒ -× ÏËÎÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ É ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏ ÐÒÏÄ×ÉÇÁÔØÓÑ ×Ï ×ÔÏÒÏÍ, ÉÓÐÏÌØÚÕÑ -C-M-v. +ëÏÍÁÎÄÁ C-M-v ÏÞÅÎØ ÕÄÏÂÎÁ, ËÏÇÄÁ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ × ÏÄÎÏÍ ÏËÎÅ, Á +×ÔÏÒÏÅ ÉÓÐÏÌØÚÕÅÔÅ × ËÁÞÅÓÔ×Å ÓÐÒÁ×ÏÞÎÉËÁ. ÷Ù ÍÏÖÅÔÅ ×ÓÅÇÄÁ ÓÏÈÒÁÎÑÔØ +ËÕÒÓÏÒ × ÏËÎÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ É ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏ ÐÒÏÄ×ÉÇÁÔØÓÑ ×Ï ×ÔÏÒÏÍ, +ÉÓÐÏÌØÚÕÑ C-M-v. -C-M-v - ÐÒÉÍÅÒ CONTROL-META ÓÉÍ×ÏÌÁ. åÓÌÉ Õ ×ÁÓ ÅÓÔØ ÎÁÓÔÏÑÝÁÑ ËÎÏÐËÁ META -(Alt), ÔÏ ×Ù ÍÏÖÅÔÅ ÎÁÂÒÁÔØ C-M-v, ÎÁÖÁ× ÏÄÎÏ×ÒÅÍÅÎÎÏ CONTROL É META É, -ÎÅ ÏÔÐÕÓËÁÑ ÉÈ, ÎÁÖÁÔØ v. é ÎÅ ×ÁÖÎÏ, ËÁËÁÑ ÉÚ ËÌÁ×ÉÛ ÂÕÄÅÔ ÎÁÖÁÔÁ ÐÅÒ×ÏÊ, +C-M-v -- ÐÒÉÍÅÒ CONTROL-META ÓÉÍ×ÏÌÁ. åÓÌÉ Õ ×ÁÓ ÅÓÔØ ÎÁÓÔÏÑÝÁÑ ËÎÏÐËÁ META +(Alt), ÔÏ ×Ù ÍÏÖÅÔÅ ÎÁÂÒÁÔØ C-M-v, ÎÁÖÁ× ÏÄÎÏ×ÒÅÍÅÎÎÏ CONTROL É META É, ÎÅ +ÏÔÐÕÓËÁÑ ÉÈ, ÎÁÖÁÔØ v. é ÎÅ ×ÁÖÎÏ, ËÁËÁÑ ÉÚ ËÌÁ×ÉÛ ÂÕÄÅÔ ÎÁÖÁÔÁ ÐÅÒ×ÏÊ, CONTROL ÉÌÉ META, ÐÏÓËÏÌØËÕ ÜÔÉ ËÎÏÐËÉ ÍÏÄÉÆÉÃÉÒÕÀÔ ÔÉÐ ÓÉÍ×ÏÌÁ. -åÓÌÉ Õ ×ÁÓ ÎÅÔ ÎÁÓÔÏÑÝÅÊ ËÎÏÐËÉ META, É ×Ù ÉÓÐÏÌØÚÕÅÔÅ ESC ×ÍÅÓÔÏ ÎÅÅ, -ÐÏÒÑÄÏË ÄÏÌÖÅÎ ÂÙÔØ ÓÌÅÄÕÀÝÉÍ: ×Ù ÄÏÌÖÎÙ ÎÁÖÁÔØ ESC, Á ÚÁÔÅÍ CTRL-v; -CONTROL-ESC v ÎÅ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ. ðÏÔÏÍÕ, ÞÔÏ ESC ÉÍÅÅÔ Ó×ÏÊ ÓÏÂÓÔ×ÅÎÎÙÊ -ÓÉÍ×ÏÌ -- ÜÔÏ ÎÅ ÍÏÄÉÆÉÃÉÒÕÀÝÁÑ ËÎÏÐËÁ. +åÓÌÉ Õ ×ÁÓ ÎÅÔ ÎÁÓÔÏÑÝÅÊ ËÎÏÐËÉ META, É ×ÍÅÓÔÏ ÎÅÅ ×Ù ÉÓÐÏÌØÚÕÅÔÅ <ESC>, ÔÏ +ÐÏÒÑÄÏË ÄÏÌÖÅÎ ÂÙÔØ ÓÌÅÄÕÀÝÉÍ: ×Ù ÄÏÌÖÎÙ ÎÁÖÁÔØ <ESC>, Á ÚÁÔÅÍ CTRL-v; +CONTROL-<ESC> v ÎÅ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ. üÔÏ ÐÒÏÉÓÈÏÄÉÔ ÐÏÔÏÍÕ, ÞÔÏ <ESC> ÉÍÅÅÔ +Ó×ÏÊ ÓÏÂÓÔ×ÅÎÎÙÊ ÓÉÍ×ÏÌ -- ÜÔÏ ÎÅ ÍÏÄÉÆÉÃÉÒÕÀÝÁÑ ËÎÏÐËÁ. ->> îÁÖÍÉÔÅ C-x 1 (× ×ÅÒÈÎÅÍ ÏËÎÅ), ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÎÉÖÎÅÇÏ. +>> îÁÖÍÉÔÅ C-x 1 (× ×ÅÒÈÎÅÍ ÏËÎÅ), ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÎÉÖÎÅÇÏ ÏËÎÁ. -(åÓÌÉ ×Ù ÎÁÖÁÌÉ C-x 1 × ÎÉÖÎÅÍ ÏËÎÅ, ÔÏ ×Ù ÉÚÂÁ×ÉÌÉÓØ ÏÔ ×ÅÒÈÎÅÇÏ. ðÏÎÉÍÁÊÔÅ -ÜÔÕ ËÏÍÁÎÄÕ ËÁË "ïÓÔÁ×ÉÔØ ÔÏÌØËÏ ÏÄÎÏ ÏËÎÏ, ÔÏ, × ËÏÔÏÒÏÍ Ñ ÓÅÊÞÁÓ ÎÁÈÏÖÕÓØ"). +(åÓÌÉ ÂÙ ×Ù ÎÁÖÁÌÉ C-x 1 × ÎÉÖÎÅÍ ÏËÎÅ, ÔÏ ×Ù ÂÙ ÉÚÂÁ×ÉÌÉÓØ ÏÔ ×ÅÒÈÎÅÇÏ. +ðÏÎÉÍÁÊÔÅ ÜÔÕ ËÏÍÁÎÄÕ ËÁË "ïÓÔÁ×ÉÔØ ÔÏÌØËÏ ÏÄÎÏ ÏËÎÏ -- ÔÏ, × ËÏÔÏÒÏÍ Ñ +ÓÅÊÞÁÓ ÎÁÈÏÖÕÓØ"). -÷ÁÍ ÎÅ ÎÕÖÎÏ ÏÔÏÂÒÁÖÁÔØ ÏÄÉÎ É ÔÏÔ ÖÅ ÂÕÆÅÒ × ÏÂÏÉÈ ÏËÎÁÈ. åÓÌÉ ×Ù +÷ÁÍ ÎÅ ÎÕÖÎÏ ÏÔÏÂÒÁÖÁÔØ ÏÄÉÎ É ÔÏÔ ÖÅ ÂÕÆÅÒ × ÏÂÏÉÈ ÏËÎÁÈ. åÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ C-x C-f, ÞÔÏÂÙ ÏÔËÒÙÔØ ÆÁÊÌ × ÏÄÎÏÍ ÏËÎÅ, ÄÒÕÇÏÅ ÏÓÔÁÎÅÔÓÑ ÂÅÚ ÉÚÍÅÎÅÎÉÑ. ÷Ù ÍÏÖÅÔÅ ÏÔËÒÙ×ÁÔØ ÆÁÊÌÙ × ËÁÖÄÏÍ ÏËÎÅ ÎÅÚÁ×ÉÓÉÍÏ. åÓÔØ ÄÒÕÇÏÊ ÐÕÔØ ÉÓÐÏÌØÚÏ×ÁÔØ Ä×Á ÏËÎÁ, ÏÔÏÂÒÁÖÁÀÝÉÈ ÒÁÚÎÙÅ ÆÁÊÌÙ: ->> îÁÂÅÒÉÔÅ C-x 4 C-f, ÚÁÔÅÍ ÉÍÑ ÏÄÎÏÇÏ É ×ÁÛÉÈ ÆÁÊÌÏ×. úÁ×ÅÒÛÉÔÅ <Return>. - ðÏÓÍÏÔÒÉÔÅ, ÞÔÏ ×ÙÂÒÁÎÎÙÊ ÆÁÊÌ ÐÏÑ×ÉÌÓÑ × ÎÉÖÎÅÍ ÏËÎÅ. ëÕÒÓÏÒ ÐÅÒÅÛÅÌ - ÔÕÄÁ ÖÅ. +>> îÁÂÅÒÉÔÅ C-x 4 C-f, É ××ÅÄÉÔÅ ÉÍÑ ÏÄÎÏÇÏ É ×ÁÛÉÈ ÆÁÊÌÏ×. úÁ×ÅÒÛÉÔÅ ××ÏÄ + ÎÁÖÁÔÉÅÍ <Return>. úÁÍÅÔØÔÅ, ÞÔÏ ×ÙÂÒÁÎÎÙÊ ÆÁÊÌ ÐÏÑ×ÉÌÓÑ × ÎÉÖÎÅÍ ÏËÎÅ. + ëÕÒÓÏÒ ÐÅÒÅÛÅÌ ÔÕÄÁ ÖÅ. ->> îÁÂÅÒÉÔÅ C-x o, ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ × ×ÅÒÈÎÅÅ ÏËÎÏ, É C-x 1, ÞÔÏÂÙ ÕÄÁÌÉÔØ - ÎÉÖÎÅÅ ÏËÎÏ. +>> îÁÂÅÒÉÔÅ C-x o, ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ × ×ÅÒÈÎÅÅ ÏËÎÏ, É ÚÁÔÅÍ C-x 1, ÞÔÏÂÙ + ÕÄÁÌÉÔØ ÎÉÖÎÅÅ ÏËÎÏ. * òåëõòóé÷îùå õòï÷îé òåäáëôéòï÷áîéñ (RECURSIVE EDITING LEVELS) -------------------------------------------------------------- -éÎÏÇÄÁ ×Ù ÂÕÄÅÔÅ ×ËÌÀÞÁÔØ ÔÁË ÎÁÚÙ×ÁÅÍÙÅ "ÒÅËÕÒÓÉ×ÎÙÅ ÕÒÏ×ÎÉ -ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ". îÁ ÜÔÏ ÕËÁÚÙ×ÁÀÔ ÐÒÑÍÏÕÇÏÌØÎÙÅ ÓËÏÂËÉ × ÓÔÒÏËÅ ÓÏÓÔÏÑÎÉÑ, -ÏËÒÕÖÁÀÝÉÅ ÏÂÙÞÎÙÅ ÓËÏÂËÉ ×ÏËÒÕÇ ÉÍÅÎÉ ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ. îÁÐÒÉÍÅÒ, ×Ù ÍÏÖÅÔÅ -Õ×ÉÄÅÔØ [(Fundamental)] ×ÍÅÓÔÏ (Fundamental). +éÎÏÇÄÁ ×Ù ÂÕÄÅÔÅ ÐÏÐÁÄÁÔØ × ÔÁË ÎÁÚÙ×ÁÅÍÙÅ "ÒÅËÕÒÓÉ×ÎÙÅ ÕÒÏ×ÎÉ +ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ". îÁ ÜÔÏ ÕËÁÚÙ×ÁÀÔ ÐÒÑÍÏÕÇÏÌØÎÙÅ ÓËÏÂËÉ × ÓÔÒÏËÅ ÓÔÁÔÕÓÁ, +ÏËÒÕÖÁÀÝÉÅ ÏÂÙÞÎÙÅ ÓËÏÂËÉ ×ÏËÒÕÇ ÉÍÅÎÉ ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ. îÁÐÒÉÍÅÒ, ×Ù +Õ×ÉÄÉÔÅ [(Fundamental)] ×ÍÅÓÔÏ (Fundamental). -þÔÏÂÙ ×ÙÊÔÉ ÉÚ ÒÅËÕÒÓÉ×ÎÙÈ ÕÒÏ×ÎÅÊ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ, ÎÁÖÍÉÔÅ ESC ESC ESC. üÔÏ -ÍÎÏÇÏÃÅÌÅ×ÁÑ ËÏÍÁÎÄÁ "×ÙÈÏÄ". ÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÅÅ ËÁË ÄÌÑ -ÕÎÉÞÔÏÖÅÎÉÑ ÌÉÛÎÉÈ ÏËÏÎ, ÔÁË É ÄÌÑ ×ÙÈÏÄÁ ÉÚ ÍÉÎÉ-ÂÕÆÅÒÁ. +þÔÏÂÙ ×ÙÊÔÉ ÉÚ ÒÅËÕÒÓÉ×ÎÙÈ ÕÒÏ×ÎÅÊ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ, ÎÁÖÍÉÔÅ <ESC> <ESC> +<ESC>. üÔÏ ÍÎÏÇÏÃÅÌÅ×ÁÑ ËÏÍÁÎÄÁ "×ÙÈÏÄ". ÷Ù ÔÁËÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÅÅ, +ËÁË ÄÌÑ ÕÎÉÞÔÏÖÅÎÉÑ ÌÉÛÎÉÈ ÏËÏÎ, ÔÁË É ÄÌÑ ×ÙÈÏÄÁ ÉÚ ÍÉÎÉ-ÂÕÆÅÒÁ. ->> îÁÖÍÉÔÅ M-x, ÞÔÏÂÙ ÐÏÐÁÓÔØ × ÍÉÎÉ-ÂÕÆÅÒ; ÚÁÔÅÍ ÎÁÖÍÉÔÅ ESC ESC ESC, - ÞÔÏÂÙ ÐÏËÉÎÕÔØ ÅÇÏ. +>> îÁÖÍÉÔÅ M-x, ÞÔÏÂÙ ÐÏÐÁÓÔØ × ÍÉÎÉ-ÂÕÆÅÒ, Á ÚÁÔÅÍ ÎÁÖÍÉÔÅ <ESC> <ESC> + <ESC>, ÞÔÏÂÙ ÐÏËÉÎÕÔØ ÅÇÏ. -÷Ù ÎÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g, ÞÔÏÂÙ ×ÙÊÔÉ ÉÚ ÒÅËÕÒÓÉ×ÎÙÈ ÕÒÏ×ÎÅÊ -ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ. ðÏÔÏÍÕ, ÞÔÏ C-g ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÏÔÍÅÎÙ ËÏÍÁÎÄÙ É +÷Ù ÎÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g, ÄÌÑ ×ÙÈÏÄÁ ÉÚ ÒÅËÕÒÓÉ×ÎÙÈ ÕÒÏ×ÎÅÊ +ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ. üÔÏ ÐÏÔÏÍÕ, ÞÔÏ C-g ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÏÔÍÅÎÙ ËÏÍÁÎÄÙ É ÁÒÇÕÍÅÎÔÏ× âåú ÒÅËÕÒÓÉ×ÎÙÈ ÕÒÏ×ÎÅÊ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ. -* ëáë ðïìõþéôø ðïíïýø (GETTING MORE HELP) ------------------------------------------ +* ëáë ðïìõþéôø äïðïìîéôåìøîõà ðïíïýø +------------------------------------ ÷ ÜÔÏÍ ÕÞÅÂÎÉËÅ ÍÙ ÐÏÐÙÔÁÌÉÓØ ÓÎÁÂÄÉÔØ ×ÁÓ ÔÏÌØËÏ ÔÏÊ ÉÎÆÏÒÍÁÃÉÅÊ, ËÏÔÏÒÁÑ -ÐÏÍÏÖÅÔ ÎÁÞÁÔØ ÉÓÐÏÌØÚÏ×ÁÔØ Emacs. ïÞÅÎØ ÍÎÏÇÏ ÉÎÆÏÒÍÁÃÉÉ ÄÏÓÔÕÐÎÏ × Emacs, -É ÎÅ×ÏÚÍÏÖÎÏ ×ÓÀ ÅÅ ÐÒÅÄÓÔÁ×ÉÔØ ÚÄÅÓØ. ïÄÎÁËÏ, ×Ù ÍÏÖÅÔÅ ×ÙÕÞÉÔØ ÂÏÌØÛÅ -×ÏÚÍÏÖÎÏÓÔÅÊ Emacs É ÕÚÎÁÔØ ÄÒÕÇÉÅ ÐÏÌÅÚÎÙÅ ÏÓÏÂÅÎÎÏÓÔÉ. Emacs ÐÒÅÄÏÓÔÁ×ÌÑÅÔ -ËÏÍÁÎÄÙ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÁÃÉÉ Ï ËÏÍÁÎÄÁÈ Emacs. üÔÉ ËÏÍÁÎÄÙ "ÐÏÍÏÝÉ" -("help") ×ÓÅ ÎÁÞÉÎÁÀÔÓÑ Ó ÓÉÍ×ÏÌÁ CONTROL-h, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ "ÓÉÍ×ÏÌÏÍ -ÐÏÍÏÝÉ". +ÐÏÍÏÖÅÔ ×ÁÍ ÎÁÞÁÔØ ÐÏÌØÚÏ×ÁÔØÓÑ Emacs. ïÞÅÎØ ÍÎÏÇÏ ÉÎÆÏÒÍÁÃÉÉ ÄÏÓÔÕÐÎÏ × +Emacs, É ÎÅ×ÏÚÍÏÖÎÏ ×ÓÀ ÅÅ ÐÒÅÄÓÔÁ×ÉÔØ ÚÄÅÓØ. ïÄÎÁËÏ, ×Ù ÍÏÖÅÔÅ ×ÙÕÞÉÔØ +ÂÏÌØÛÅ ×ÏÚÍÏÖÎÏÓÔÅÊ Emacs É ÕÚÎÁÔØ ÄÒÕÇÉÅ ÐÏÌÅÚÎÙÅ ÏÓÏÂÅÎÎÏÓÔÉ. Emacs +ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ËÏÍÁÎÄÙ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÁÃÉÉ Ï ËÏÍÁÎÄÁÈ Emacs. üÔÉ ËÏÍÁÎÄÙ +"ÓÐÒÁ×ËÉ" ("help") ×ÓÅ ÎÁÞÉÎÁÀÔÓÑ Ó ÓÉÍ×ÏÌÁ CONTROL-h, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ +"ÓÉÍ×ÏÌÏÍ ÐÏÍÏÝÉ". -þÔÏÂÙ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÓÏÂÅÎÎÏÓÔÉ ðÏÍÏÝÉ, ÎÁÖÍÉÔÅ C-h, É ÚÁÔÅÍ ÓÉÍ×ÏÌ, ËÏÔÏÒÙÊ -ÒÁÓÓËÁÖÅÔ, ËÁËÏÊ ÉÍÅÎÎÏ ×ÉÄ ÐÏÍÏÝÉ ×Ù ÈÏÔÉÔÅ ÐÏÌÕÞÉÔØ. åÓÌÉ ×Ù äåêóô÷éôåìøîï -ÒÁÓÔÅÒÑÌÉÓØ, ÎÁÂÅÒÉÔÅ C-h ?, É Emacs ÒÁÓÓËÁÖÅÔ ×ÁÍ ËÁËÕÀ ÐÏÍÏÝØ ÏÎ ÍÏÖÅÔ ×ÁÍ -ÐÒÅÄÏÓÔÁ×ÉÔØ. åÓÌÉ ×Ù ÎÁÖÁÌÉ C-h É ÐÅÒÅÄÕÍÁÌÉ ÏÂÒÁÝÁÔØÓÑ Ë ÐÏÍÏÝÉ, ÐÒÏÓÔÏ -ÎÁÖÍÉÔÅ C-g, ÞÔÏÂÙ ÏÔÍÅÎÉÔØ ÜÔÕ ËÏÍÁÎÄÕ. +þÔÏÂÙ ÉÓÐÏÌØÚÏ×ÁÔØ ×ÏÚÍÏÖÎÏÓÔÉ ÓÐÒÁ×ËÉ, ÎÁÖÍÉÔÅ C-h, É ÚÁÔÅÍ ÓÉÍ×ÏÌ, ËÏÔÏÒÙÊ +ÒÁÓÓËÁÖÅÔ, ËÁËÏÊ ÉÍÅÎÎÏ ×ÉÄ ÓÐÒÁ×ËÉ ×Ù ÈÏÔÉÔÅ ÐÏÌÕÞÉÔØ. åÓÌÉ ×Ù +äåêóô÷éôåìøîï ÒÁÓÔÅÒÑÌÉÓØ, ÎÁÂÅÒÉÔÅ C-h ?, É Emacs ÒÁÓÓËÁÖÅÔ ×ÁÍ Ï ÔÏÍ, +ËÁËÕÀ ÓÐÒÁ×ËÕ ÏÎ ÍÏÖÅÔ ×ÁÍ ÐÒÅÄÏÓÔÁ×ÉÔØ. åÓÌÉ ×Ù ÎÁÖÁÌÉ C-h É ÐÅÒÅÄÕÍÁÌÉ +ÏÂÒÁÝÁÔØÓÑ Ë ÓÐÒÁ×ËÅ, ÔÏ ÐÒÏÓÔÏ ÎÁÖÍÉÔÅ C-g, ÞÔÏÂÙ ÏÔÍÅÎÉÔØ ÜÔÕ ËÏÍÁÎÄÕ. -(ëÏÅ-ÇÄÅ ÐÅÒÅÎÁÚÎÁÞÁÀÔ ÓÉÍ×ÏÌ C-h. òÅÁÌØÎÏÊ ÎÅÏÂÈÏÄÉÍÏÓÔÉ × ÜÔÏÍ ÎÅÔ, -ÓÏÏÂÝÉÔÅ Ï ÎÅÊ ÓÉÓÔÅÍÎÏÍÕ ÁÄÍÉÎÉÓÔÒÁÔÏÒÕ. ôÅÍ ×ÒÅÍÅÎÅÍ, ÅÓÌÉ C-h ÎÅ ×ÙÚÙ×ÁÅÔ -ÓÏÏÂÝÅÎÉÅ ÐÏÍÏÝÉ ×ÎÉÚÕ ÜËÒÁÎÁ, ÐÏÐÒÏÂÕÊÔÅ ×ÍÅÓÔÏ ÜÔÏÇÏ ÎÁÖÁÔØ ËÌÁ×ÉÛÕ F1 ÉÌÉ -ÎÁÂÒÁÔØ M-x help RET). +(ëÏÅ-ÇÄÅ ÐÅÒÅÎÁÚÎÁÞÁÀÔ ÓÉÍ×ÏÌ C-h. òÅÁÌØÎÏÊ ÎÅÏÂÈÏÄÉÍÏÓÔÉ × ÜÔÏÍ ÎÅÔ, É +ÅÓÌÉ ÜÔÏ ÔÁË, ÔÏ ÓÏÏÂÝÉÔÅ Ï ÜÔÏÍ ÓÉÓÔÅÍÎÏÍÕ ÁÄÍÉÎÉÓÔÒÁÔÏÒÕ. ôÅÍ ×ÒÅÍÅÎÅÍ, +ÅÓÌÉ C-h ÎÅ ×ÙÚÙ×ÁÅÔ ÓÏÏÂÝÅÎÉÅ ÐÏÍÏÝÉ ×ÎÉÚÕ ÜËÒÁÎÁ, ÔÏ ÐÏÐÒÏÂÕÊÔÅ ×ÍÅÓÔÏ +ÜÔÏÇÏ ÎÁÖÁÔØ ËÌÁ×ÉÛÕ F1 ÉÌÉ ÎÁÂÒÁÔØ M-x help RET). -óÁÍÁÑ ÏÓÎÏ×ÎÁÑ ×ÏÚÍÏÖÎÏÓÔØ ðïíïýé - C-h c. îÁÖÍÉÔÅ C-h, ÚÁÔÅÍ c, É ÓÉÍ×ÏÌ -ËÏÍÁÎÄÙ ÉÌÉ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ, É Emacs ÏÔÏÂÒÁÚÉÔ ÏÞÅÎØ ËÒÁÔËÏÅ ÏÐÉÓÁÎÉÅ -ËÏÍÁÎÄÙ. +ïÄÎÁ ÉÚ ÓÁÍÙÈ ÇÌÁ×ÎÙÈ ÆÕÎËÃÉÊ ÓÐÒÁ×ËÉ -- C-h c. îÁÖÍÉÔÅ C-h, ÚÁÔÅÍ c, É +ÓÉÍ×ÏÌ ËÏÍÁÎÄÙ ÉÌÉ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ, É Emacs ÏÔÏÂÒÁÚÉÔ ËÒÁÔËÏÅ ÎÁÂÒÁÎÎÏÊ +ÏÐÉÓÁÎÉÅ ËÏÍÁÎÄÙ. >> îÁÖÍÉÔÅ C-h c C-p. - óÏÏÂÝÅÎÉÅ ÄÏÌÖÎÏ ×ÙÇÌÑÄÅÔØ ÐÒÉÍÅÒÎÏ ÔÁË + +óÏÏÂÝÅÎÉÅ ÄÏÌÖÎÏ ×ÙÇÌÑÄÅÔØ ÐÒÉÍÅÒÎÏ ÔÁË: C-p runs the command previous-line - (C-p ×ÙÐÏÌÎÑÅÔ ËÏÍÁÎÄÕ previous-line {ÐÒÅÄÙÄÕÝÁÑ-ÓÔÒÏËÁ}) + (C-p ×ÙÐÏÌÎÑÅÔ ËÏÍÁÎÄÕ previous-line {ÐÒÅÄÙÄÕÝÁÑ-ÓÔÒÏËÁ}) ÷ÁÍ ÓÏÏÂÝÁÀÔ "ÉÍÑ ÆÕÎËÃÉÉ". éÍÅÎÁ ÆÕÎËÃÉÊ ÉÓÐÏÌØÚÕÀÔÓÑ × ÏÓÎÏ×ÎÏÍ ÄÌÑ -ÎÁÓÔÒÏÊËÉ É ÒÁÓÛÉÒÅÎÉÑ Emacs. éÍÅÎÁ ÆÕÎËÃÉÊ ×ÙÂÒÁÎÙ ÔÁË, ÞÔÏÂÙ ÐÏËÁÚÁÔØ, -ÞÔÏ ÉÍÅÎÎÏ ËÏÍÁÎÄÁ ÄÅÌÁÅÔ, ÔÁËÖÅ ÏÎÉ ÐÏÚ×ÏÌÑÀÔ Ó ÐÏÍÏÝØÀ ÜÔÏÊ ËÒÁÔËÏÊ +ÎÁÓÔÒÏÊËÉ É ÒÁÓÛÉÒÅÎÉÑ Emacs. éÍÅÎÁ ÆÕÎËÃÉÊ ×ÙÂÒÁÎÙ ÔÁË, ÞÔÏÂÙ ÐÏËÁÚÁÔØ, ÞÔÏ +ÉÍÅÎÎÏ ËÏÍÁÎÄÁ ÄÅÌÁÅÔ, Á ÔÁËÖÅ ÏÎÉ ÐÏÚ×ÏÌÑÀÔ Ó ÐÏÍÏÝØÀ ÜÔÏÊ ËÒÁÔËÏÊ ÉÎÆÏÒÍÁÃÉÉ ÌÅÇÞÅ ÚÁÐÏÍÎÉÔØ ÕÖÅ ×ÙÕÞÅÎÎÙÅ ËÏÍÁÎÄÙ. -íÎÏÇÏÓÉÍ×ÏÌØÎÙÅ ËÏÍÁÎÄÙ, ÔÁËÉÅ ËÁË C-x C-s É (ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ËÎÏÐËÉ META ÉÌÉ -EDIT ÉÌÉ ALT) <ESC>v ÔÁËÖÅ ÂÕÄÕÔ ÄÏÓÔÕÐÎÙ ÐÏÓÌÅ C-h c. +íÎÏÇÏÓÉÍ×ÏÌØÎÙÅ ÓÏÞÅÔÁÎÉÑ ËÌÁ×ÉÛ, ÔÁËÉÅ ËÁË C-x C-s É (ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ËÎÏÐËÉ +META ÉÌÉ EDIT ÉÌÉ ALT) <ESC>v ÔÁËÖÅ ÂÕÄÕÔ ÄÏÓÔÕÐÎÙ ÄÌÑ ÐÏÌÕÞÅÎÉÑ ÓÐÒÁ×ËÉ Ó +ÐÏÍÏÝØÀ C-h c. -ðÏÌÕÞÉÔÅ ÂÏÌØÛÅ ÉÎÆÏÒÍÁÃÉÉ Ï ËÏÍÁÎÄÅ ÉÓÐÏÌØÚÕÑ C-h k ×ÍÅÓÔÏ C-h c. +÷Ù ÍÏÖÅÔÅ ÐÏÌÕÞÉÔØ ÂÏÌØÛÅ ÉÎÆÏÒÍÁÃÉÉ Ï ËÏÍÁÎÄÅ ÉÓÐÏÌØÚÕÑ C-h k ×ÍÅÓÔÏ C-h c. >> îÁÂÅÒÉÔÅ C-h k C-p. ÷Ù Õ×ÉÄÉÔÅ ÏÐÉÓÁÎÉÅ ÆÕÎËÃÉÉ, Á ÔÁËÖÅ ÅÅ ÉÍÑ × ÏÔÄÅÌØÎÏÍ ÏËÎÅ Emacs. ëÏÇÄÁ ×Ù -ÚÁ×ÅÒÛÉÔÅ ÞÔÅÎÉÅ, ÎÁÖÍÉÔÅ C-x 1, ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÔÅËÓÔÁ ÐÏÍÏÝÉ. ÷Ù -ÍÏÖÅÔÅ ×ÙÐÏÌÎÉÔØ ËÁËÏÅ-ÔÏ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ ×Ï ×ÒÅÍÑ ÐÒÏÓÍÏÔÒÁ ÔÅËÓÔÁ ÓÐÒÁ×ËÉ, -Á ÔÏÌØËÏ ÚÁÔÅÍ ÎÁÖÁÔØ C-x 1. +ÚÁ×ÅÒÛÉÔÅ ÞÔÅÎÉÅ, ÎÁÖÍÉÔÅ C-x 1, ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÔÅËÓÔÁ ÓÐÒÁ×ËÉ. ÷Ù +ÍÏÖÅÔÅ ×ÙÐÏÌÎÉÔØ ÉÚÍÅÎÅÎÉÅ ÔÅËÓÔÁ ×Ï ×ÒÅÍÑ ÐÒÏÓÍÏÔÒÁ ÔÅËÓÔÁ ÓÐÒÁ×ËÉ, Á +ÔÏÌØËÏ ÚÁÔÅÍ ÎÁÖÁÔØ C-x 1. -åÓÔØ ÅÝÅ ÎÅÓËÏÌØËÏ ÐÏÌÅÚÎÙÈ ÏÐÃÉÊ C-h: +åÓÔØ ÅÝÅ ÎÅÓËÏÌØËÏ ÐÏÌÅÚÎÙÈ ÆÕÎËÃÉÊ, ÄÏÓÔÕÐÎÙÈ ÞÅÒÅÚ C-h: C-h f ïÐÉÓÙ×ÁÅÔ ÆÕÎËÃÉÀ. ÷ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÎÁÂÒÁÔØ ÉÍÑ ÆÕÎËÃÉÉ. >> ðÏÐÒÏÂÕÊÔÅ ÎÁÂÒÁÔØ C-h f previous-line<Return>. - üÔÏ ÒÁÓÐÅÞÁÔÁÅÔ ÉÎÆÏÒÍÁÃÉÀ Emacs Ï ÜÔÏÊ ÆÕÎËÃÉÉ, ËÏÔÏÒÁÑ ×ÙÐÏÌÎÑÅÔÓÑ - ËÏÍÁÎÄÏÊ C-p. + üÔÏ ÒÁÓÐÅÞÁÔÁÅÔ ÉÎÆÏÒÍÁÃÉÀ Emacs Ï ÆÕÎËÃÉÉ, ËÏÔÏÒÁÑ ×ÙÐÏÌÎÑÅÔÓÑ ËÏÍÁÎÄÏÊ + C-p. áÎÁÌÏÇÉÞÎÁÑ ËÏÍÁÎÄÁ C-h v ÏÔÏÂÒÁÖÁÅÔ ÄÏËÕÍÅÎÔÁÃÉÀ Ï ÐÅÒÅÍÅÎÎÙÈ, ÚÎÁÞÅÎÉÅ ËÏÔÏÒÙÈ ×Ù ÍÏÖÅÔÅ ÉÚÍÅÎÉÔØ ÄÌÑ ÎÁÓÔÒÏÊËÉ ÐÏ×ÅÄÅÎÉÑ Emacs. ÷ÁÍ ÎÕÖÎÏ ÎÁÂÒÁÔØ ÉÍÑ ÐÅÒÅÍÅÎÎÏÊ, ËÏÇÄÁ Emacs ÚÁÐÒÏÓÉÔ ÅÇÏ. - C-h a Hyper Apropos. ÷×ÅÄÉÔÅ ËÌÀÞÅ×ÏÅ ÓÌÏ×Ï É Emacs ÐÏËÁÖÅÔ ×ÁÍ - ÓÐÉÓÏË ×ÓÅÈ ÆÕÎËÃÉÊ É ÐÅÒÅÍÅÎÎÙÈ, ÉÍÅÎÁ ËÏÔÏÒÙÈ ÓÏÄÅÒÖÁÔ ÜÔÏ - ÓÌÏ×Ï. ëÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÍÏÇÕÔ ÂÙÔØ ×ÙÚ×ÁÎÙ ÞÅÒÅÚ Meta-x, - ÂÕÄÕÔ ÏÔÍÅÞÅÎÙ Ú×ÅÚÄÏÞËÏÊ ÓÌÅ×Á. + C-h a (Hyper Apropos). ÷×ÅÄÉÔÅ ËÌÀÞÅ×ÏÅ ÓÌÏ×Ï É Emacs ÐÏËÁÖÅÔ ×ÁÍ ÓÐÉÓÏË + ×ÓÅÈ ÆÕÎËÃÉÊ É ÐÅÒÅÍÅÎÎÙÈ, ÉÍÅÎÁ ËÏÔÏÒÙÈ ÓÏÄÅÒÖÁÔ ÜÔÏ + ÓÌÏ×Ï. ëÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÍÏÇÕÔ ÂÙÔØ ×ÙÚ×ÁÎÙ ÞÅÒÅÚ Meta-x, ÂÕÄÕÔ + ÏÔÍÅÞÅÎÙ Ú×ÅÚÄÏÞËÏÊ ÓÌÅ×Á. >> îÁÂÅÒÉÔÅ C-h a file<Return>. -ÜÔÏ ÏÔÏÂÒÁÚÉÔ ÐÏÌÎÙÊ ÓÐÉÓÏË ÆÕÎËÃÉÊ É ÐÅÒÅÍÅÎÎÙÈ, ÉÍÅÎÁ ËÏÔÏÒÙÈ ÎÁÞÉÎÁÀÔÓÑ -Ó "newline". îÁÖÍÉÔÅ <Return> ÉÌÉ ËÌÉËÎÉÔÅ ÓÒÅÄÎÅÊ ËÎÏÐËÏÊ ÍÙÛËÉ, ÞÔÏÂÙ -ÐÏÌÕÞÉÔØ ÂÏÌØÛÅ ÉÎÆÏÒÍÁÃÉÉ Ï ÆÕÎËÃÉÉ ÉÌÉ ÐÅÒÅÍÅÎÎÏÊ. îÁÖÍÉÔÅ `q', ÞÔÏÂÙ -×ÙÊÔÉ ÉÚ hyper-apropos. - -üÔÏ ÏÔÏÂÒÁÚÉÔ × ÄÒÕÇÏÍ ÏËÎÅ ÓÐÉÓÏË ×ÓÅÈ ËÏÍÁÎÄ M-x ÓÏ ÓÌÏ×ÏÍ "file" × ÉÈ -ÉÍÅÎÁÈ. ôÁËÖÅ × ÓÐÉÓËÅ ËÒÏÍÅ ËÏÍÁÎÄ ÔÁËÉÈ, ËÁË find-file, ×Ù Õ×ÉÄÉÔÅ -ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÅ ÓÉÍ×ÏÌØÎÙÅ ËÏÍÁÎÄÙ ÔÁËÉÅ, ËÁË C-x C-f. +üÔÏ ÏÔÏÂÒÁÚÉÔ × ÄÒÕÇÏÍ ÏËÎÅ ÓÐÉÓÏË ×ÓÅÈ ËÏÍÁÎÄ M-x Õ ËÏÔÏÒÙÈ × ÉÍÅÎÁÈ +ÓÏÄÅÒÖÉÔÓÑ ÓÌÏ×Ï "file". ôÁËÖÅ × ÓÐÉÓËÅ ËÒÏÍÅ ËÏÍÁÎÄ ÔÁËÉÈ, ËÁË find-file, +×Ù Õ×ÉÄÉÔÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÅ ÓÉÍ×ÏÌØÎÙÅ ËÏÍÁÎÄÙ ÔÁËÉÅ, ËÁË C-x C-f. >> îÁÂÅÒÉÔÅ C-M-v ÄÌÑ ÐÒÏËÒÕÔËÉ ÏËÎÁ ÓÐÒÁ×ËÉ. ÷ÙÐÏÌÎÉÔÅ ÜÔÏ ÎÅÓËÏÌØËÏ ÒÁÚ. >> îÁÂÅÒÉÔÅ C-x 1 ÄÌÑ ÕÄÁÌÅÎÉÑ ÏËÎÁ ÓÐÒÁ×ËÉ. - C-h i þÉÔÁÔØ ÉÎÔÅÒÁËÔÉ×ÎÙÅ ÒÕËÏ×ÏÄÓÔ×Á (a.k.a. Info). üÔÁ ËÏÍÁÎÄÁ - ÐÅÒÅÈÏÄÉÔ × ÓÐÅÃÉÁÌØÎÙÊ ÂÕÆÅÒ Ó ÉÍÅÎÅÍ `*info*', ÇÄÅ ×Ù - ÍÏÖÅÔÅ ÞÉÔÁÔØ ÉÎÔÅÒÁËÔÉ×ÎÙÅ ÒÕËÏ×ÏÄÓÔ×Á ÄÌÑ ÐÁËÅÔÏ×, - ÕÓÔÁÎÏ×ÌÅÎÎÙÈ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. îÁÂÅÒÉÔÅ m emacs <Return> ÄÌÑ - ÞÔÅÎÉÑ ÒÕËÏ×ÏÄÓÔ×Á ÐÏ Emacs. åÓÌÉ ×Ù ÎÉËÏÇÄÁ ÒÁÎÅÅ ÎÅ - ÉÓÐÏÌØÚÏ×ÁÌÉ Info, ÔÏ ÎÁÂÅÒÉÔÅ ? É Emacs ÏÔËÒÏÅÔ ÕÞÅÂÎÉË ÐÏ - ×ÏÚÍÏÖÎÏÓÔÑÍ ÒÅÖÉÍÁ Info. ïÄÎÁÖÄÙ ÏÚÎÁËÏÍÉ×ÛÉÓØ Ó ÜÔÉÍ - ÕÞÅÂÎÉËÏÍ, ×Ù ÄÏÌÖÎÙ ÉÓÐÏÌØÚÏ×ÁÔØ ÒÕËÏ×ÏÄÓÔ×Ï Emacs Info × - ËÁÞÅÓÔ×Å ÏÓÎÏ×ÎÏÊ ÄÏËÕÍÅÎÔÁÃÉÉ. + C-h i þÉÔÁÔØ ÉÎÔÅÒÁËÔÉ×ÎÙÅ ÒÕËÏ×ÏÄÓÔ×Á (ÔÁË ÎÁÚÙ×ÁÅÍÙÅ Info). üÔÁ ËÏÍÁÎÄÁ + ÐÅÒÅÈÏÄÉÔ × ÓÐÅÃÉÁÌØÎÙÊ ÂÕÆÅÒ Ó ÉÍÅÎÅÍ `*info*', ÇÄÅ ×Ù ÍÏÖÅÔÅ + ÞÉÔÁÔØ ÉÎÔÅÒÁËÔÉ×ÎÙÅ ÒÕËÏ×ÏÄÓÔ×Á ÄÌÑ ÐÁËÅÔÏ×, ÕÓÔÁÎÏ×ÌÅÎÎÙÈ × ×ÁÛÅÊ + ÓÉÓÔÅÍÅ. îÁÂÅÒÉÔÅ m emacs <Return> ÄÌÑ ÞÔÅÎÉÑ ÒÕËÏ×ÏÄÓÔ×Á ÐÏ + Emacs. åÓÌÉ ×Ù ÎÉËÏÇÄÁ ÒÁÎÅÅ ÎÅ ÉÓÐÏÌØÚÏ×ÁÌÉ Info, ÔÏ ÎÁÂÅÒÉÔÅ ? É + Emacs ÏÔËÒÏÅÔ ÕÞÅÂÎÉË ÐÏ ×ÏÚÍÏÖÎÏÓÔÑÍ ÒÅÖÉÍÁ Info. ïÄÎÁÖÄÙ + ÏÚÎÁËÏÍÉ×ÛÉÓØ Ó ÜÔÉÍ ÕÞÅÂÎÉËÏÍ, ×Ù ÄÏÌÖÎÙ ÉÓÐÏÌØÚÏ×ÁÔØ ÒÕËÏ×ÏÄÓÔ×Ï + Emacs Info × ËÁÞÅÓÔ×Å ÏÓÎÏ×ÎÏÊ ÄÏËÕÍÅÎÔÁÃÉÉ. + + +* äïðïìîéôåìøîùå ÷ïúíïöîïóôé +---------------------------- + +÷Ù ÍÏÖÅÔÅ ÕÚÎÁÔØ ÂÏÌØÛÅ Ï Emacs ÞÉÔÁÑ ÅÇÏ ÒÕËÏ×ÏÄÓÔ×Ï, ËÎÉÇÉ ÉÌÉ +ÉÎÔÅÒÁËÔÉ×ÎÙÊ ÓÐÒÁ×ÏÞÎÉË (ÉÓÐÏÌØÚÕÊÔÅ ÍÅÎÀ Help ÉÌÉ ÎÁÂÅÒÉÔÅ F10 h r). ÷ÁÍ +ÏÓÏÂÅÎÎÏ ÐÏÎÒÁ×ÑÔÓÑ Ä×Å ÆÕÎËÃÉÉ -- ÄÏÐÏÌÎÅÎÉÅ, ËÏÔÏÒÏÅ ÓÏËÒÁÝÁÅÔ ËÏÌÉÞÅÓÔ×Ï +ÎÁÖÉÍÁÅÍÙÈ ËÌÁ×ÉÛ, É dired, ËÏÔÏÒÙÊ ÏÂÌÅÇÞÁÅÔ ÒÁÂÏÔÕ Ó ÆÁÊÌÁÍÉ. + +äÏÐÏÌÎÅÎÉÅ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÉÚÂÅÖÁÔØ ÎÁÂÏÒÁ ÌÉÛÎÉÈ ÓÉÍ×ÏÌÏ×. +îÁÐÒÉÍÅÒ, ÅÓÌÉ ×Ù ÈÏÔÉÔÅ ÐÅÒÅËÌÀÞÉÔØÓÑ × ÂÕÆÅÒ *Messages*, ÔÏ ×Ù ÍÏÖÅÔÅ +ÎÁÂÒÁÔØ C-x b *M<Tab> É Emacs ÚÁÐÏÌÎÉÔ ÏÓÔÁÔÏË ÉÍÅÎÉ ÂÕÆÅÒÁ, ÐÏÓËÏÌØËÕ ÏÎ +ÍÏÖÅÔ ÏÐÒÅÄÅÌÉÔØ ÅÇÏ ÉÚ ÔÏÇÏ, ÞÔÏ ×Ù ÕÖÅ ÎÁÂÒÁÌÉ. äÏÐÏÌÎÅÎÉÑ ÏÐÉÓÁÎÙ × +Info-×ÅÒÓÉÉ ÒÕËÏ×ÏÄÓÔ×Á ÐÏ Emacs × ÒÁÚÄÅÌÅ "Completion". + +Dired ÐÏÚ×ÏÌÑÅÔ ×ÁÍ ÏÔÏÂÒÁÖÁÔØ ÓÐÉÓÏË ÆÁÊÌÏ× × ËÁÔÁÌÏÇÅ (Á ÔÁËÖÅ +ÐÏÄËÁÔÁÌÏÇÁÈ, × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔ ÎÁÓÔÒÏÊËÉ), ÐÅÒÅÍÅÝÁÔØÓÑ ÐÏ ÓÐÉÓËÕ ÆÁÊÌÏ×, +ÏÔËÒÙ×ÁÔØ ÉÈ, ÐÅÒÅÉÍÅÎÏ×Ù×ÁÔØ, ÕÄÁÌÑÔØ É ×ÙÐÏÌÎÑÔØ ÐÒÏÞÉÅ ÄÅÊÓÔ×ÉÑ ÎÁÄ +ÆÁÊÌÁÍÉ. Dired ÏÐÉÓÁÎ × Info-×ÅÒÓÉÉ ÒÕËÏ×ÏÄÓÔ×Á ÐÏ Emacs × ÒÁÚÄÅÌÅ "Dired". + +÷ ÒÕËÏ×ÏÄÓÔ×Å ÔÁËÖÅ ÏÐÉÓÁÎÙ ÐÒÏÞÉÅ ×ÏÚÍÏÖÎÏÓÔÉ Emacs. * úáëìàþåîéå ------------ -úÁÐÏÍÎÉÔÅ, ÞÔÏÂÙ ÓÏ×ÓÅÍ ×ÙÊÔÉ ÉÚ Emacs, ÉÓÐÏÌØÚÕÅÔÓÑ ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ -C-x C-c. á ÞÔÏÂÙ ×ÒÅÍÅÎÎÏ ×ÙÊÔÉ × ÏÂÏÌÏÞËÕ (shell) É ÐÏÔÏÍ ×ÅÒÎÕÔØÓÑ +úÁÐÏÍÎÉÔÅ, ÞÔÏ ÄÌÑ ÔÏÇÏ ÞÔÏÂÙ ÓÏ×ÓÅÍ ×ÙÊÔÉ ÉÚ Emacs, ÉÓÐÏÌØÚÕÅÔÓÑ ÓÏÞÅÔÁÎÉÅ +ËÌÁ×ÉÛ C-x C-c. á ÞÔÏÂÙ ×ÒÅÍÅÎÎÏ ×ÙÊÔÉ × ÏÂÏÌÏÞËÕ (shell) É ÐÏÔÏÍ ×ÅÒÎÕÔØÓÑ ÏÂÒÁÔÎÏ, ÉÓÐÏÌØÚÕÊÔÅ C-z. üÔÏÔ ÕÞÅÂÎÉË ÄÏÌÖÅÎ ÂÙÔØ ÐÏÎÑÔÅÎ ×ÓÅÍ ÎÏ×ÙÍ ÐÏÌØÚÏ×ÁÔÅÌÑÍ, ÎÏ ÅÓÌÉ ×Ù ÎÁÊÄÅÔÅ ÞÔÏ-ÎÉÂÕÄØ ÎÅÑÓÎÏÅ, ÎÅ ÎÕÖÎÏ ÓÉÄÅÔØ É ÐÏÒÉÃÁÔØ ÓÅÂÑ -- ÖÁÌÕÊÔÅÓØ! -* COPYING ---------- +* õóìï÷éñ òáóðòïóôòáîåîéñ +------------------------- üÔÏÔ ÕÞÅÂÎÉË ÐÒÏÉÚÏÛÅÌ ÉÚ ÄÌÉÎÎÏÊ ÓÅÒÉÉ ÕÞÅÂÎÉËÏ× Emacs, ÎÁÞÁÔÏÊ Ó ÏÄÎÁÖÄÙ -ÎÁÐÉÓÁÎÎÏÇÏ by Stuart Cracraft ÄÌÑ ÏÒÉÇÉÎÁÌØÎÏÇÏ Emacs. +ÎÁÐÉÓÁÎÎÏÇÏ Stuart Cracraft ÄÌÑ ÏÒÉÇÉÎÁÌØÎÏÇÏ Emacs. üÔÁ ×ÅÒÓÉÑ ÕÞÅÂÎÉËÁ, ËÁË É GNU Emacs, ÚÁÝÉÝÅÎÁ ÐÒÁ×ÁÍÉ ËÏÐÉÒÏ×ÁÎÉÑ (copyrighted), É ÐÒÉÈÏÄÉÔ Ó ÏÇÒÁÎÉÞÅÎÉÑÍÉ ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÑ ËÏÐÉÊ ÓÏ ÓÌÅÄÕÀÝÉÍÉ ÓÏÇÌÁÛÅÎÉÑÍÉ: -Copyright (c) 1985, 1996 Free Software Foundation +Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the @@ -1066,16 +1145,14 @@ under the above conditions, provided also that they carry prominent notices stating who last altered them. -õÓÌÏ×ÉÑ ËÏÐÉÒÏ×ÁÎÉÑ ÓÁÍÏÇÏ Emacs ÂÏÌÅÅ ÓÌÏÖÎÙÅ, ÎÏ × ÔÏÍ ÖÅ ÄÕÈÅ. +õÓÌÏ×ÉÑ ËÏÐÉÒÏ×ÁÎÉÑ ÓÁÍÏÇÏ Emacs ÂÏÌÅÅ ÓÌÏÖÎÙÅ, ÎÏ ÐÒÉÍÅÒÎÏ × ÔÏÍ ÖÅ ÄÕÈÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÒÏÞÔÉÔÅ ÆÁÊÌ COPYING É ÚÁÔÅÍ ÄÁÊÔÅ ËÏÐÉÀ GNU Emacs ×ÁÛÉÍ ÄÒÕÚØÑÍ. ðÏÍÏÇÉÔÅ ÕÎÉÞÔÏÖÉÔØ ÏÂÓÔÒÕËÃÉÏÎÉÚÍ × ÏÂÌÁÓÔÉ ÐÒÏÇÒÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ ("×ÌÁÄÅÎÉÅ"), ÉÓÐÏÌØÚÕÑ, ÓÏÚÄÁ×ÁÑ É ÒÁÓÐÒÏÓÔÒÁÎÑÑ Ó×ÏÂÏÄÎÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ! -// ÚÁÍÅÞÁÎÉÑ, ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂÏË Ó ÎÅÔÅÒÐÅÎÉÅÍ ÖÄÕ ÐÏ ÁÄÒÅÓÕ ottalex@narod.ru +// ÚÁÍÅÞÁÎÉÑ, ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂÏË Ó ÖÄÕ ÐÏ ÁÄÒÅÓÕ alexott@gmail.com. // Alex Ott. -// âÏÌØÛÏÅ ÓÐÁÓÉÂÏ ÷ÌÁÄÉÍÉÒÕ âÏÒÍÏÔÏ×Õ, ÎÁ ÂÁÚÅ ÐÅÒÅ×ÏÄÁ ËÏÔÏÒÏÇÏ ÂÙÌ ÓÄÅÌÁÎ -// ÜÔÏÔ ÐÅÒÅ×ÏÄ ;;; Local Variables: ;;; coding: cyrillic-koi8
--- a/etc/e/eterm.ti Thu Apr 28 04:56:56 2005 +0000 +++ b/etc/e/eterm.ti Thu May 05 00:04:55 2005 +0000 @@ -1,4 +1,4 @@ -eterm, +eterm|Emacs term.el terminal emulator term-protocol-version 0.96, colors#8, cols#80, lines#24,
--- a/lisp/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,11 +1,590 @@ +2005-05-05 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/cmacexp.el (c-macro-preprocessor): Update for BSD and + use gcc instead of cpp. + + * progmodes/gdb-ui.el (gdb-cpp-define-alist-flags): New variable. + (gdb-create-define-alist): Use. it. + (gdb-cpp-define-alist-program): Update for MS-DOS? + +2005-05-04 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/cmacexp.el (c-macro-preprocessor): Update for Mac OSX. + +2005-05-03 Ulf Jasper <ulf.jasper@web.de> + + * calendar/icalendar.el (icalendar-version): Now at 0.12. + (icalendar-duration-correction): Remove. + (icalendar--get-event-properties): Split result at commas. + (icalendar--decode-isoduration): New optional argument + DURATION-CORRECTION. + (icalendar--convert-ordinary-to-ical, icalendar--convert-sexp-to-ical) + (icalendar--convert-yearly-to-ical, icalendar--convert-weekly-to-ical) + (icalendar--convert-block-to-ical, icalendar--convert-float-to-ical) + (icalendar--convert-date-to-ical, icalendar--convert-cyclic-to-ical) + (icalendar--convert-anniversary-to-ical): New functions, extracted + from icalendar-export-region, with bug fixes. + (icalendar-export-region): Use the above functions. + (icalendar-import-buffer): Check before saving diary file. + (icalendar--convert-recurring-to-diary) + (icalendar--convert-non-recurring-all-day-to-diary) + (icalendar--convert-non-recurring-not-all-day-to-diary): New functions, + extracted from icalendar--convert-ical-to-diary, with bug fixes. + (icalendar--convert-ical-to-diary): Use the above functions. + +2005-05-03 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/cc-mode.el (cc-define-alist, cc-create-define-alist): + Remove these recent additions. + (c-mode): Restore to before 2005-04-28. + + * progmodes/cc-vars.el (cc-define-list-program): Remove this + recent addition. + + * progmodes/gdb-ui.el (gdb-cpp-define-alist-program) + (gdb-define-alist): New variables. + (gdb-create-define-alist): New function. + (gdb-set-gud-minor-mode-1): Handle gdb-define-alist. + (gdb-source, gdb-memory-set-repeat-count): Replace string-to-int + with string-to-number. + (gdb-reset): Kill gdb-define-alist. Move assignments outside loop. + + * progmodes/gud.el: Replace string-to-int with string-to-number. + (gud-find-file): Handle gdb-define-alist. + + * tooltip.el (tooltip-gud-tips): Use gdb-define-alist. + +2005-05-02 Jay Belanger <belanger@truman.edu> + + * calc/calc-aent.el (math-read-token): + * calc/calc-bin.el (calc-word-size): + * calc/calc-ext.el (calc-read-number-fancy): + * calc/calc-forms.el (calc-time, calc-date-notation, math-this-year) + (math-parse-date, math-parse-standard-date, calcFunc-tzone): + * calc/calc-frac.el (calc-over-notation): + * calc/calc-graph.el (calc-graph-plot, calc-graph-set-styles) + (calc-graph-num-points, calc-graph-init): + * calc/calc-prog.el (calc-read-parse-table-part) + (calc-edit-macro-repeats): + * calc/calc-yank.el (calc-do-grab-rectangle): + * calc/calc.el (calcDigit-key, math-read-number, math-read-bignum): + Replace `string-to-int' by `string-to-number'. + +2005-05-02 Kim F. Storm <storm@cua.dk> + + * kmacro.el: Use executing-kbd-macro-index variable. + +2005-05-02 Thien-Thi Nguyen <ttn@gnu.org> + + * net/rlogin.el (rlogin-parse-words): Delete func. + (rlogin): Use split-string, not rlogin-parse-words. + Also, if there are option-like elements in the parsed args, + take the host to be the first arg immediately following them. + Suggested by Michael Mauger. + +2005-05-01 Luc Teirlinck <teirllm@auburn.edu> + + * subr.el (executing-macro): Use `define-obsolete-variable-alias'. + +2005-05-02 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/cc-mode.el (cc-create-define-alist): Use a shell. + (cc-mode-cpp-program): Rename to cc-define-list-program and + move to cc-vars.el. + + * progmodes/cc-vars.el (cc-define-list-program): + Change to "gcc -E -dM -". Make customizable. + +2005-05-02 Kim F. Storm <storm@cua.dk> + + * emulation/cua-base.el: Fix check for CUA-mode if no init file. + +2005-05-02 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/cc-mode.el (cc-mode-cpp-program): Change to "gcc -E". + + * international/mule-util.el (truncate-string): Remove alias and + obsolete declaration. + + * international/mule-cmds.el (update-iso-coding-systems): + Remove alias and obsolete declaration. + + * international/mule.el (coding-system-parent): Remove alias and + obsolete declaration. + + * subr.el (define-function, sref): Remove aliases and obsolete + declarations. + (chars-in-region): Remove obsolete declaration. + +2005-05-01 Richard M. Stallman <rms@gnu.org> + + * info.el (Info-mode): Set widen-automatically to nil, locally. + + * simple.el (widen-automatically): New variable. + (pop-global-mark): Obey widen-automatically. + +2005-05-01 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (function-key-map): Call substitute-key-definition + before the keymap size is increased by a lot of define-key calls. + +2005-05-01 Richard M. Stallman <rms@gnu.org> + + * subr.el (add-to-invisibility-spec, remove-from-invisibility-spec): + Rename ARG to ELEMENT. Doc fix. + +2005-05-01 Nick Roberts <nickrob@snap.net.nz> + + * allout.el (allout-exposure): Remove macro and obsolete declaration. + Remove references to allout-exposure/change to allout-new-exposure. + + * emacs-lisp/bytecomp.el (dot, dot-min, dot-max): Don't create + bytecode symbols. + + * subr.el (dot, dot-marker, dot-min, dot-max, buffer-flush-undo) + (compiled-function-p, focus-frame, unfocus-frame): + Remove aliases and obsolete declarations. + Back out inadvertant changes from previous commit. + +2005-05-01 Luc Teirlinck <teirllm@auburn.edu> + + * files.el (require-final-newline): Make Custom tags consistent + with mode-require-final-newline. + (mode-require-final-newline): Doc fix. + +2005-05-01 Lute Kamstra <lute@gnu.org> + + * international/latexenc.el (latexenc-find-file-coding-system): + Fix regular expressions. Suggested by David Kastrup <dak@gnu.org> + and Stefan Monnier <monnier@iro.umontreal.ca>. + +2005-05-01 Nick Roberts <nickrob@snap.net.nz> + + * subr.el (string-to-int): Make obsolete. + +2005-04-30 Richard M. Stallman <rms@gnu.org> + + * simple.el (next-error-overlay-arrow-position): Turn off, for ttys. + + * loadup.el: load jka-comp-hook. + + * jka-compr.el: Many functions and vars moved to jka-compr-hook.el. + (jka-compr-handler): Add autoload. `put' calls moved + to jka-compr-hook.el. + (compression, jka-compr): defgroups moved to jka-compr-hook.el. + (jka-compr-inhibit): Autoload. + + * jka-comp-hook.el: New file. + Enable the mode by default. + + * files.el (backup-buffer-copy): Use copy-file instead + of write-region, and put back the 'excl. + +2005-04-30 Chong Yidong <cyd@stupidchicken.com> + + * progmodes/flymake.el (flymake-split-string) + (flymake-split-string, flymake-log, flymake-pid-to-names) + (flymake-reg-names, flymake-get-source-buffer-name) + (flymake-unreg-names, flymake-add-line-err-info) + (flymake-add-err-info): Clarify docstrings. + (flymake-popup-menu, flymake-make-emacs-menu) + (flymake-make-xemacs-menu): Add docstrings. + (flymake-get-buffer-*, flymake-set-buffer-*): Functions deleted. + Set variables directly throughout. + +2005-04-30 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/cc-mode.el (cc-create-define-alist): Check that file + exists. Initialise cc-define-alist. + (c-mode): Add cc-create-define-alist locally to after-save-hook. + If there is no file (Macroexpansion) don't create an alist. + +2005-04-29 Sam Steingold <sds@gnu.org> + + * progmodes/cc-mode.el (cc-mode-cpp-program): New user variable. + (cc-create-define-alist): Use it instead of the hard-coded string. + +2005-04-29 Stefan Monnier <monnier@iro.umontreal.ca> + + * international/mule-conf.el (file-coding-system-alist): Fix regexp + for latexenc. + +2005-04-29 Lute Kamstra <lute@gnu.org> + + * emacs-lisp/generic.el: Improve commentary section. + (define-generic-mode): Improve docstring. + +2005-04-29 Carsten Dominik <dominik@science.uva.nl> + + * textmodes/org.el (many places): Change to quiet the byte compiler. + (org-prefix-format-compiled): New variable. + (org-compile-prefix-format): New function. + (org-timeline, org-agenda, org-diary): Call org-compile-prefix-format. + (org-agenda-prefix-format,org-timeline-prefix-format): New options. + (org-agenda-get-scheduled): Check if file is opened in `org-mode'. + (org-get-entries-from-diary): Use `org-get-time-of-day' for + consistency with entries from `org-mode' files. + (org-get-time-of-day): Fix bug with partial matches early in a line. + (org-non-link-chars): New constant. + (org-link-regexp): Respect `org-non-link-chars'. + (org-agenda-day-view): Remove command. + (org-agenda-toggle-week-view): Rename from `org-agenda-week-view'. + (org-follow-bbdb-link, org-store-link): Search also company field. + (org-highlight-overlay): New variable. + (org-highlight, org-unhighlight): New functions. + (org-agenda-mode): Add pre-command-hook to remove highlight. + (org-evaluate-time-range): Behavior depends upon whether time stamp + contains a time or not. + (org-show-subtree, org-show-entry): New functions. + (org-agenda-cleanup-fancy-diary): Remove empty lines. + +2005-04-28 Luc Teirlinck <teirllm@auburn.edu> + + * comint.el (comint-output-filter-functions): Add autoload cookie. + +2005-04-28 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-everywhere): Fix last change. + +2005-04-28 Arne J,Ax(Brgensen <arne@arnested.dk> + + * international/latexenc.el: New file. + * international/mule-conf.el (file-coding-system-alist): For .tex, + .ltx, .dtx and .drv extensions, use `latexenc-find-file-coding-system'. + +2005-04-28 Lute Kamstra <lute@gnu.org> + + * font-lock.el (font-lock-add-keywords) + (font-lock-remove-keywords): Clarify docstring. + (font-lock-keywords-alist, font-lock-removed-keywords-alist): + Don't start docstrings with a `*'. + (font-lock-update-removed-keyword-alist): Give it a docstring. + + * generic-x.el: Update commentary section. + Only require font-lock when compiling. + Define all modes conditionally. + Place all generic modes in the generic-x-modes customization group. + (generic-x-modes): New customization group. + (generic-default-modes, generic-mswindows-modes) + (generic-unix-modes, generic-other-modes): New constants. + (generic-define-mswindows-modes, generic-define-unix-modes): + Update docstrings. Make them obsolete. + (generic-extras-enable-list): New default value. Update docstring. + Improve :type. Change :set function. + (bat-generic-mode-syntax-table, rul-generic-mode-syntax-table): + Fix docstring. + + * emacs-lisp/generic.el (generic-mode-internal): + Simplify font-lock-defaults. + (define-generic-mode): Fix docstring. + +2005-04-28 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/grep.el (grep-mode-font-lock-keywords): Use the + font-lock-face property to highlight matches. + +2005-04-28 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/cc-mode.el: (cc-create-define-alist): New function. + (cc-define-alist): New variable. + (c-mode): Make it local and initialise it. + + * progmodes/gdb-ui.el (gdb-active-process): New variable. + (gdb-exited): New function. + (gdb-annotation-rules): Use it. + (gdb-starting): Set gdb-active-process to t. + (gdb-stopping): Amend doc string. + (gdb-reset): Set gdb-active-process to nil. + + * tooltip.el (tooltip-gud-tips): Show the associated #define + directives when a C program under GDB is not executing. + +2005-04-27 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/cperl-mode.el (cperl-mode): Don't precompile the + font-lock-fontify-syntactic-keywords. + + * font-lock.el (font-lock-default-fontify-region): Don't force + parse-sexp-lookup-properties to nil. + +2005-04-27 Alexander Klimov <alserkli@inbox.ru> (tiny change) + + * man.el (man-mode-syntax-table): Set up `:' to have + word-constituent syntax. + +2005-04-27 Lute Kamstra <lute@gnu.org> + + * novice.el (disable-command): Don't add spurious newlines to the + init file. Reported by Dan Jacobson <jidanni@jidanni.org>. + +2005-04-26 Jay Belanger <belanger@truman.edu> + + * calc/calc-yank.el (calc-edit-finish): Make sure there is more + than one window before deleting window. + +2005-04-26 Luc Teirlinck <teirllm@auburn.edu> + + * shell.el (shell-prompt-pattern): Doc fix. + (shell-mode): Set paragraph-separate buffer locally to "\\'". + + * comint.el (comint-prompt-regexp, comint-get-old-input) + (comint-use-prompt-regexp) + (comint-use-prompt-regexp-instead-of-fields) + (comint-replace-by-expanded-history, comint-send-input) + (comint-output-filter, comint-get-old-input-default) + (comint-line-beginning-position, comint-bol, comint-show-output) + (comint-backward-matching-input, comint-forward-matching-input) + (comint-next-prompt, comint-previous-prompt): + Rename `comint-use-prompt-regexp-instead-of-fields' to + `comint-use-prompt-regexp'. Keep old name as alias and declare + obsolete. + (comint-use-prompt-regexp): Shorten first line of doc string. + + * ielm.el (inferior-emacs-lisp-mode): Adapt to above name change. + Set paragraph-separate buffer locally to "\\'". + + * hippie-exp.el (try-expand-line, try-expand-line-all-buffers): + Adapt to above name change. + + * net/net-utils.el (nslookup-prompt-regexp, ftp-prompt-regexp) + (smbclient-prompt-regexp): Ditto. + + * progmodes/inf-lisp.el (inferior-lisp-prompt): Ditto. + +2005-04-27 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gdb-ui.el (gdb-location-alist): Rename from + gdb-location-list. + Break lines that are over 80 characters wide. + +2005-04-26 Stefan Monnier <monnier@iro.umontreal.ca> + + * pcvs-info.el (cvs-fileinfo->full-path, cvs-display-full-path): + New fun and var, to preserve compatibility. + + * pcvs.el, pcvs-info.el: Rename "full-path" -> "full-name". + +2005-04-26 Dominique de Waleffe <ddw@missioncriticalit.com> (tiny change) + + * pcvs-info.el (cvs-fileinfo->backup-file): Don't pass the full file + name to file-newer-than-file-p. + +2005-04-26 Richard M. Stallman <rms@gnu.org> + + * simple.el (line-move-1): Avoid using vertical-motion in easy cases. + + * progmodes/python.el (python-mode): + Use new name eldoc-documentation-function. + + * hexl.el (hexl-mode): Use new name eldoc-documentation-function. + + * emacs-lisp/eldoc.el (eldoc-mode): Doc fix. + (eldoc-documentation-function): + Rename from eldoc-print-current-symbol-info-function. Calls changed. + +2005-04-26 Nick Roberts <nickrob@snap.net.nz> + + * emacs-lisp/byte-run.el (define-obsolete-function-alias): New macro. + +2005-04-25 Dan Nicolaescu <dann@ics.uci.edu> + + * term/xterm.el (function-key-map): Fix strings for + {C,S,A,C-S}-f[1-4]. Use substitute-key-definition to bind + {C,S,A,C-S}-{f1-f12}. + +2005-04-26 Kenichi Handa <handa@m17n.org> + + * international/mule-cmds.el (select-safe-coding-system): + Fix previous change. + +2005-04-26 Lute Kamstra <lute@gnu.org> + + * emacs-lisp/easy-mmode.el (define-minor-mode): Fix docstring. + + * font-lock.el (font-lock-fontify-region-function): Fix docstring. + (font-lock-comment-delimiter-face): Ditto. + + * calc/calc.el (calc-trail-mode): Don't set font-lock-defaults. + +2005-04-25 Jay Belanger <belanger@truman.edu> + + * calc/calc-help.el (calc-view-news): Let-bind inhibit-read-only + to t while inserting information; use help-mode. + +2005-04-25 Dan Nicolaescu <dann@ics.uci.edu> + + * term.el (ansi-term-color-vector): Use the xterm colors. + (term-raw-map): Don't add mappings for \eO and \e[. Map deletechar. + +2005-04-25 Lute Kamstra <lute@gnu.org> + + * font-core.el (font-lock-defaults): Fix docstring. + + * font-lock.el (font-lock-syntactic-face-function): Fix docstring. + +2005-04-25 Kenichi Handa <handa@m17n.org> + + * international/mule-cmds.el (select-safe-coding-system): + Don't check consistency with coding: spec, etc if raw-text or + no-conversion was found to be safe. + +2005-04-24 Richard M. Stallman <rms@gnu.org> + + * mail/sendmail.el (mail-font-lock-keywords): Match any number of + citation markers at start of each line. + + * mail/rmail.el (rmail-font-lock-keywords): Match any number of + citation markers at start of each line. + + * font-lock.el (font-lock-comment-delimiter-face): Doc fix. + + * files.el (mode-require-final-newline): Fix previous change. + (require-final-newline): Fix type label. + +2005-04-24 Glenn Morris <gmorris@ast.cam.ac.uk> + + * progmodes/f90.el (f90-calculate-indent): Fix treatment of first + statement in buffer (broken by 2004-11-24 change). + +2005-04-24 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-everywhere): Save and restore old read-buffer-function + and read-file-name-function values. Don't overwrite existing + non-nil values if ido-mode is enabled without ido-everywhere. + +2005-04-24 Luc Teirlinck <teirllm@auburn.edu> + + * files.el (mode-require-final-newline): Minor doc fix. + +2005-04-24 Eli Zaretskii <eliz@gnu.org> + + * subr.el (syntax-after): Doc fix. + (syntax-class): If argument is nil, return nil. Mask off upper 16 + bits, not 8 bits. + + * files.el (mode-require-final-newline): Doc fix. + (backup-buffer-copy): Fix last change. + +2005-04-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * term/mac-win.el: Require select. Set selection-coding-system to + mac-system-coding-system. Call menu-bar-enable-clipboard. + (x-last-selected-text-clipboard, x-last-selected-text-primary) + (x-select-enable-clipboard): New variables. + (x-select-text, x-get-selection, x-selection-value) + (x-get-selection-value, mac-select-convert-to-string) + (mac-services-open-file, mac-services-open-selection) + (mac-services-insert-text): New functions. + (CLIPBOARD, FIND): Put mac-scrap-name property. + (com.apple.traditional-mac-plain-text, public.utf16-plain-text) + (public.tiff): Put mac-ostype property. + (selection-converter-alist): Add entries for them. + (mac-application-menu-map): New keymap. + (interprogram-cut-function, interprogram-paste-function): Set to + x-select-text and x-get-selection-value, respectively. + (split-window-keep-point): Set to t. + +2005-04-23 Richard M. Stallman <rms@gnu.org> + + * files.el (read-directory-name): Always pass non-nil + DEFAULT-FILENAME arg to read-file-name. + (backup-buffer-copy, basic-save-buffer-2): Take care against + writing thru an unexpected existing symlink. + (revert-buffer): In indirect buffer, revert the base buffer. + (magic-mode-alist): Doc fix. + (buffer-stale-function): Doc fix. + (minibuffer-with-setup-hook): Avoid warning. + (mode-require-final-newline): Doc and custom fix. + + * follow.el (follow-end-of-buffer): Use with-no-warnings. + + * font-lock.el (font-lock-comment-face): On terminals with few colors, + use the default appearance. + (font-lock-comment-delimiter-face): New face, new variable. + + * imenu.el (imenu--generic-function): The official position of a + definition is the start of the line that BEG is in. + + * midnight.el (midnight-timer): Move defvar up. + + * mouse.el (mouse-drag-region-1): Delete some debugging code. + + * saveplace.el (save-place-to-alist): Use with-no-warnings. + + * startup.el (command-line): Use with-no-warnings. + + * window.el (window-size-fixed): New defvar. + + * emacs-lisp/easymenu.el (easy-menu-do-define): Use defalias, not fset. + + * mail/rmail.el (rmail-font-lock-keywords): + Use font-lock-comment-delimiter-face. + + * mail/sendmail.el (mail-font-lock-keywords): + Use font-lock-comment-delimiter-face. + + * progmodes/compile.el (next-error-highlight-timer): New defvar. + +2005-04-23 SAITO Takuya <tabmore@rivo.mediatti.net> (tiny change) + + * progmodes/compile.el (compilation-mode-font-lock-keywords): + Specify t for LAXMATCH when matching directories. + Save match data around compilation-compat-error-properties form. + +2005-04-23 David Kastrup <dak@gnu.org> + + * textmodes/tex-mode.el (TeX-mode, plain-TeX-mode, LaTeX-mode): + Mention that the autoloaded aliases should be kept for AUCTeX. + +2005-04-23 Andreas Schwab <schwab@suse.de> + + * isearch.el (isearch-forward): Doc fix. + +2005-04-23 Eli Zaretskii <eliz@gnu.org> + + * jit-lock.el (jit-lock-stealth-time): Change default value to 16. + (jit-lock-stealth-nice): Change default value to 0.5. + +2005-04-23 Eric Hanchrow <offby1@blarg.net> (tiny change) + + * abbrev.el (write-abbrev-file): Write table entries in + alphabetical order by table name. + +2005-04-22 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-read-internal): Fix `list' completion. + +2005-04-22 Kenichi Handa <handa@m17n.org> + + * recentf.el (recentf-save-file-coding-system): New variable. + (recentf-save-list): Encode the file by + recentf-save-file-coding-system and add coding: tag. + +2005-04-22 Nick Roberts <nickrob@snap.net.nz> + + * emacs-lisp/byte-run.el (define-obsolete-variable-alias): New macro. + +2005-04-21 Lute Kamstra <lute@gnu.org> + + * loadhist.el (unload-feature): Don't remove a function from hooks + if it is about to be restored to an autoload . Remove functions + that will become unbound from auto-mode-alist. Simplify the code. + + * subr.el (assq-delete-all): New implementation that is linear, + not quadratic. Suggested by David Kastrup <dak@gnu.org>. + (rassq-delete-all): New function. + + * menu-bar.el (menu-bar-options-save, menu-bar-showhide-menu): + Add size-indication-mode. + 2005-04-21 Kenichi Handa <handa@m17n.org> * international/mule-cmds.el: Add autoload for widget-value in - eval-when-compile + eval-when-compile. 2005-04-21 Nick Roberts <nickrob@snap.net.nz> - * menu-bar.el (menu-bar-options-save, menu-bar-showhide-menu): + * menu-bar.el (menu-bar-options-save, menu-bar-showhide-menu): Add tooltip-mode. * bindings.el (mode-line-mode-menu): Remove tooltip-mode. @@ -372,8 +951,8 @@ 2005-04-11 Rajesh Vaidheeswarran <rv@gnu.org> * whitespace.el (whitespace-buffer-leading) - (whitespace-buffer-trailing): Revert the incorrect test - inversion. However, fix the highlight area for the leading and + (whitespace-buffer-trailing): Revert the incorrect test inversion. + However, fix the highlight area for the leading and trailing whitespaces to show space. 2005-04-11 Rajesh Vaidheeswarran <rv@gnu.org>
--- a/lisp/abbrev.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/abbrev.el Thu May 05 00:04:55 2005 +0000 @@ -92,11 +92,11 @@ (interactive) (push-mark (save-excursion - (let ((tables abbrev-table-name-list)) - (while tables - (insert-abbrev-table-description (car tables) t) - (setq tables (cdr tables)))) - (point)))) + (let ((tables abbrev-table-name-list)) + (while tables + (insert-abbrev-table-description (car tables) t) + (setq tables (cdr tables)))) + (point)))) (defun list-abbrevs (&optional local) "Display a list of defined abbrevs. @@ -168,23 +168,23 @@ (interactive "P") (if arg (kill-all-abbrevs)) (save-excursion - (goto-char (point-min)) - (while (and (not (eobp)) (re-search-forward "^(" nil t)) - (let* ((buf (current-buffer)) - (table (read buf)) - abbrevs name hook exp count sys) - (forward-line 1) - (while (progn (forward-line 1) - (not (eolp))) - (setq name (read buf) count (read buf)) - (if (equal count '(sys)) - (setq sys t count (read buf))) - (setq exp (read buf)) - (skip-chars-backward " \t\n\f") - (setq hook (if (not (eolp)) (read buf))) - (skip-chars-backward " \t\n\f") - (setq abbrevs (cons (list name exp hook count sys) abbrevs))) - (define-abbrev-table table abbrevs))))) + (goto-char (point-min)) + (while (and (not (eobp)) (re-search-forward "^(" nil t)) + (let* ((buf (current-buffer)) + (table (read buf)) + abbrevs name hook exp count sys) + (forward-line 1) + (while (progn (forward-line 1) + (not (eolp))) + (setq name (read buf) count (read buf)) + (if (equal count '(sys)) + (setq sys t count (read buf))) + (setq exp (read buf)) + (skip-chars-backward " \t\n\f") + (setq hook (if (not (eolp)) (read buf))) + (skip-chars-backward " \t\n\f") + (setq abbrevs (cons (list name exp hook count sys) abbrevs))) + (define-abbrev-table table abbrevs))))) (defun read-abbrev-file (&optional file quietly) "Read abbrev definitions from file written with `write-abbrev-file'. @@ -201,7 +201,7 @@ Optional argument FILE is the name of the file to read; it defaults to the value of `abbrev-file-name'. Does not display any message." - ;(interactive "fRead abbrev file: ") + ;(interactive "fRead abbrev file: ") (read-abbrev-file file t)) (defun write-abbrev-file (&optional file) @@ -221,7 +221,17 @@ (let ((coding-system-for-write 'emacs-mule)) (with-temp-file file (insert ";;-*-coding: emacs-mule;-*-\n") - (dolist (table abbrev-table-name-list) + (dolist (table + ;; We sort the table in order to ease the automatic + ;; merging of different versions of the user's abbrevs + ;; file. This is useful, for example, for when the + ;; user keeps their home directory in a revision + ;; control system, and is therefore keeping multiple + ;; slightly-differing copies loosely synchronized. + (sort (copy-sequence abbrev-table-name-list) + (lambda (s1 s2) + (string< (symbol-name s1) + (symbol-name s2))))) (insert-abbrev-table-description table nil))))) (defun add-mode-abbrev (arg)
--- a/lisp/allout.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/allout.el Thu May 05 00:04:55 2005 +0000 @@ -3975,18 +3975,16 @@ Cursor is left at start position. -Use this instead of obsolete `allout-exposure'. - Examples: -\(allout-exposure (-1 () () () 1) 0) +\(allout-new-exposure (-1 () () () 1) 0) Close current topic at current level so only the immediate subtopics are shown, except also show the children of the third subtopic; and close the next topic at the current level. -\(allout-exposure : -1 0) +\(allout-new-exposure : -1 0) Close all topics at current level to expose only their immediate children, except for the last topic at the current level, in which even its immediate children are hidden. -\(allout-exposure -2 : -1 *) +\(allout-new-exposure -2 : -1 *) Expose children and grandchildren of first topic at current level, and expose children of subsequent topics at current level *except* for the last, which should be opened completely." @@ -3995,17 +3993,6 @@ (allout-next-heading))) (error "allout-new-exposure: Can't find any outline topics")) (list 'allout-expose-topic (list 'quote spec)))) -;;;_ > allout-exposure '() -(defmacro allout-exposure (&rest spec) - "Literal frontend for `allout-old-expose-topic', doesn't evaluate arguments -and retains start position." - (list 'save-excursion - '(if (not (or (allout-goto-prefix) - (allout-next-heading))) - (error "Can't find any outline topics")) - (cons 'allout-old-expose-topic - (mapcar (function (lambda (x) (list 'quote x))) spec)))) -(make-obsolete 'allout-exposure 'allout-new-exposure "19.23") ;;;_ #7 Systematic outline presentation - copying, printing, flattening
--- a/lisp/calc/calc-aent.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-aent.el Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-aent.el --- algebraic entry functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <belanger@truman.edu> @@ -734,7 +734,7 @@ math-exp-pos (match-end 1)) (if (eq (string-match "\\$\\([1-9][0-9]*\\)" math-exp-str math-exp-pos) math-exp-pos) - (setq math-expr-data (- (string-to-int (math-match-substring + (setq math-expr-data (- (string-to-number (math-match-substring math-exp-str 1)))) (string-match "\\$+" math-exp-str math-exp-pos) (setq math-expr-data (- (match-end 0) (match-beginning 0)))) @@ -743,7 +743,7 @@ ((eq ch ?\#) (if (eq (string-match "#\\([1-9][0-9]*\\)" math-exp-str math-exp-pos) math-exp-pos) - (setq math-expr-data (string-to-int + (setq math-expr-data (string-to-number (math-match-substring math-exp-str 1)) math-exp-pos (match-end 0)) (setq math-expr-data 1
--- a/lisp/calc/calc-bin.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-bin.el Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-bin.el --- binary functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <belanger@truman.edu> @@ -135,7 +135,7 @@ (if (equal n "") calc-word-size (if (string-match "\\`[-+]?[0-9]+\\'" n) - (string-to-int n) + (string-to-number n) (error "Expected an integer"))) (prefix-numeric-value n))) (or (= n calc-word-size)
--- a/lisp/calc/calc-ext.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-ext.el Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-ext.el --- various extension functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <belanger@truman.edu> @@ -2815,7 +2815,7 @@ ;; Integer+fraction with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$" s) - (let ((radix (string-to-int (math-match-substring s 1))) + (let ((radix (string-to-number (math-match-substring s 1))) (int (math-match-substring s 3)) (num (math-match-substring s 4)) (den (math-match-substring s 5))) @@ -2829,7 +2829,7 @@ ;; Fraction with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)$" s) - (let ((radix (string-to-int (math-match-substring s 1))) + (let ((radix (string-to-number (math-match-substring s 1))) (num (math-match-substring s 3)) (den (math-match-substring s 4))) (let ((num (if (> (length num) 0) (math-read-radix num radix) 1)) @@ -2839,7 +2839,7 @@ ;; Float with explicit radix and exponent ((or (string-match "^0*\\(\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+\\)[eE]\\([-+]?[0-9]+\\)$" s) (string-match "^\\(\\([0-9]+\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z.]+\\) *\\* *\\2\\.? *\\^ *\\([-+]?[0-9]+\\)$" s)) - (let ((radix (string-to-int (math-match-substring s 2))) + (let ((radix (string-to-number (math-match-substring s 2))) (mant (math-match-substring s 1)) (exp (math-match-substring s 4))) (let ((mant (math-read-number mant)) @@ -2849,7 +2849,7 @@ ;; Float with explicit radix, no exponent ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)\\.\\([0-9a-zA-Z]*\\)$" s) - (let ((radix (string-to-int (math-match-substring s 1))) + (let ((radix (string-to-number (math-match-substring s 1))) (int (math-match-substring s 3)) (fracs (math-match-substring s 4))) (let ((int (if (> (length int) 0) (math-read-radix int radix) 0)) @@ -2861,7 +2861,7 @@ ;; Integer with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]+\\)$" s) (math-read-radix (math-match-substring s 3) - (string-to-int (math-match-substring s 1)))) + (string-to-number (math-match-substring s 1)))) ;; C language hexadecimal notation ((and (eq calc-language 'c)
--- a/lisp/calc/calc-forms.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-forms.el Thu May 05 00:04:55 2005 +0000 @@ -39,9 +39,9 @@ (calc-enter-result 0 "time" (list 'mod (list 'hms - (string-to-int (substring time 11 13)) - (string-to-int (substring time 14 16)) - (string-to-int (substring time 17 19))) + (string-to-number (substring time 11 13)) + (string-to-number (substring time 14 16)) + (string-to-number (substring time 17 19))) (list 'hms 24 0 0)))))) (defun calc-to-hms (arg) @@ -80,7 +80,7 @@ (if (equal fmt "") (setq fmt "1")) (if (string-match "\\` *[0-9] *\\'" fmt) - (setq fmt (nth (string-to-int fmt) calc-standard-date-formats))) + (setq fmt (nth (string-to-number fmt) calc-standard-date-formats))) (or (string-match "[a-zA-Z]" fmt) (error "Bad date format specifier")) (and arg @@ -441,7 +441,7 @@ (defun math-this-year () - (string-to-int (substring (current-time-string) -4))) + (string-to-number (substring (current-time-string) -4))) (defun math-leap-year-p (year) (if (Math-lessp year 1752) @@ -730,14 +730,14 @@ (if (or (string-match "\\([0-9][0-9]?\\):\\([0-9][0-9]?\\)\\(:\\([0-9][0-9]?\\(\\.[0-9]+\\)?\\)\\)? *\\([ap]m?\\|[ap]\\. *m\\.\\|noon\\|n\\>\\|midnight\\|mid\\>\\|m\\>\\)?" math-pd-str) (string-match "\\([0-9][0-9]?\\)\\(\\)\\(\\(\\(\\)\\)\\) *\\([ap]m?\\|[ap]\\. *m\\.\\|noon\\|n\\>\\|midnight\\|mid\\>\\|m\\>\\)" math-pd-str)) (let ((ampm (math-match-substring math-pd-str 6))) - (setq hour (string-to-int (math-match-substring math-pd-str 1)) + (setq hour (string-to-number (math-match-substring math-pd-str 1)) minute (math-match-substring math-pd-str 2) second (math-match-substring math-pd-str 4) math-pd-str (concat (substring math-pd-str 0 (match-beginning 0)) (substring math-pd-str (match-end 0)))) (if (equal minute "") (setq minute 0) - (setq minute (string-to-int minute))) + (setq minute (string-to-number minute))) (if (equal second "") (setq second 0) (setq second (math-read-number second))) @@ -801,7 +801,7 @@ (setq temp 0) (while (string-match "[0-9]+" math-pd-str temp) (and c (throw 'syntax "Too many numbers in date")) - (setq c (string-to-int (math-match-substring math-pd-str 0))) + (setq c (string-to-number (math-match-substring math-pd-str 0))) (or b (setq b c c nil)) (or a (setq a b b nil)) (setq temp (match-end 0))) @@ -1021,7 +1021,7 @@ (string-match "\\` *[0-9][0-9][0-9]" math-pd-str) (string-match "\\` *[0-9][0-9]" math-pd-str)) (string-match "\\` *[0-9]+" math-pd-str))) - (and (setq num (string-to-int + (and (setq num (string-to-number (math-match-substring math-pd-str 0)) math-pd-str (substring math-pd-str (match-end 0))) nil)) @@ -1236,13 +1236,13 @@ (setq p (cdr p)))) (if (looking-at "\\([-+][0-9]?[0-9]\\)\\([0-9][0-9]\\)?\\(\\'\\|[^0-9]\\)") (setq offset (math-add - (string-to-int (buffer-substring + (string-to-number (buffer-substring (match-beginning 1) (match-end 1))) (if (match-beginning 2) - (math-div (string-to-int (buffer-substring - (match-beginning 2) - (match-end 2))) + (math-div (string-to-number (buffer-substring + (match-beginning 2) + (match-end 2))) 60) 0))))) (if p
--- a/lisp/calc/calc-frac.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-frac.el Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-frac.el --- fraction functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <belanger@truman.edu> @@ -56,7 +56,7 @@ (if (string-match "\\`\\([^ 0-9][^ 0-9]?\\)[0-9]*\\'" fmt) (let ((n nil)) (if (/= (match-end 0) (match-end 1)) - (setq n (string-to-int (substring fmt (match-end 1))) + (setq n (string-to-number (substring fmt (match-end 1))) fmt (math-match-substring fmt 1))) (if (eq n 0) (error "Bad denominator")) (calc-change-mode 'calc-frac-format (list fmt n) t))
--- a/lisp/calc/calc-graph.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-graph.el Thu May 05 00:04:55 2005 +0000 @@ -407,13 +407,13 @@ (prin1-to-string output))))) (setq calc-graph-resolution (calc-graph-find-command "samples")) (if calc-graph-resolution - (setq calc-graph-resolution (string-to-int calc-graph-resolution)) + (setq calc-graph-resolution (string-to-number calc-graph-resolution)) (setq calc-graph-resolution (if calc-graph-is-splot calc-graph-default-resolution-3d calc-graph-default-resolution))) (setq precision (calc-graph-find-command "precision")) (if precision - (setq precision (string-to-int precision)) + (setq precision (string-to-number precision)) (setq precision calc-graph-default-precision)) (calc-graph-set-command "terminal") (calc-graph-set-command "output") @@ -1078,11 +1078,11 @@ (setq mode (buffer-substring (match-beginning 1) (match-end 1)))) (if (looking-at "[ \ta-z]+\\([0-9]+\\)") - (setq lstyle (string-to-int + (setq lstyle (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) (if (looking-at "[ \ta-z]+[0-9]+[ \t]+\\([0-9]+\\)") - (setq pstyle (string-to-int + (setq pstyle (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))))) (setq lenbl (or (equal mode "lines") (equal mode "linespoints")) @@ -1195,11 +1195,11 @@ (if (equal res "") (message "Default resolution is %d" calc-graph-default-resolution) - (setq calc-graph-default-resolution (string-to-int res))) + (setq calc-graph-default-resolution (string-to-number res))) (if (equal res "") (message "Default 3D resolution is %d" calc-graph-default-resolution-3d) - (setq calc-graph-default-resolution-3d (string-to-int res)))) + (setq calc-graph-default-resolution-3d (string-to-number res)))) (calc-graph-set-command "samples" (if (not (equal res "")) res)))) (defun calc-graph-device (name flag) @@ -1456,7 +1456,7 @@ (goto-char origin) (re-search-forward "G N U P L O T.*\n.*version \\([0-9]+\\)\\." nil t)) - (setq calc-gnuplot-version (string-to-int (buffer-substring + (setq calc-gnuplot-version (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) (setq calc-gnuplot-version 1))
--- a/lisp/calc/calc-help.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-help.el Thu May 05 00:04:55 2005 +0000 @@ -393,12 +393,14 @@ (error "Can't locate Calc sources")) (calc-quit) (switch-to-buffer "*Help*") - (erase-buffer) - (insert-file-contents (expand-file-name "README" (car path))) - (search-forward "Summary of changes") - (forward-line -1) - (delete-region (point-min) (point)) - (goto-char (point-min)))) + (let ((inhibit-read-only t)) + (erase-buffer) + (insert-file-contents (expand-file-name "README" (car path))) + (search-forward "Summary of changes") + (forward-line -1) + (delete-region (point-min) (point)) + (goto-char (point-min))) + (help-mode))) (defvar calc-help-long-names '((?b . "binary/business") (?g . "graphics")
--- a/lisp/calc/calc-prog.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-prog.el Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-prog.el --- user programmability functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <belanger@truman.edu> @@ -637,7 +637,7 @@ (setq part (nconc part (list (if (= (match-beginning 1) (match-end 1)) 0 - (string-to-int + (string-to-number (buffer-substring (1+ (match-beginning 1)) (match-end 1))))))) @@ -727,7 +727,7 @@ (goto-char calc-edit-top) (while (re-search-forward "^\\([0-9]+\\)\\*" nil t) - (let ((num (string-to-int (match-string 1))) + (let ((num (string-to-number (match-string 1))) (line (buffer-substring (point) (line-end-position)))) (goto-char (line-beginning-position)) (kill-line 1)
--- a/lisp/calc/calc-yank.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc-yank.el Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-yank.el --- kill-ring functionality for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <belanger@truman.edu> @@ -231,7 +231,7 @@ pos j))))) (if (string-match "\\` *-?[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]? *\\'" (car data)) - (setq vals (list 'vec (string-to-int (car data)))) + (setq vals (list 'vec (string-to-number (car data)))) (if (and (null arg) (string-match "[[{][^][{}]*[]}]" (car data))) (setq pos (match-beginning 0) @@ -528,7 +528,7 @@ (goto-char calc-edit-top) (if (buffer-modified-p) (eval calc-edit-handler)) - (if one-window + (if (and one-window (not (one-window-p t))) (delete-window)) (if (get-buffer-window return) (select-window (get-buffer-window return))
--- a/lisp/calc/calc.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calc/calc.el Thu May 05 00:04:55 2005 +0000 @@ -1174,8 +1174,6 @@ (setq buffer-read-only t) (make-local-variable 'overlay-arrow-position) (make-local-variable 'overlay-arrow-string) - (set (make-local-variable 'font-lock-defaults) - '(nil t nil nil nil (font-lock-core-only . t))) (when buf (set (make-local-variable 'calc-main-buffer) buf)) (when (= (buffer-size) 0) @@ -2138,7 +2136,7 @@ (t (insert (char-to-string last-command-char)) (if (or (and (calc-minibuffer-contains "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9][0-9]?\\)#[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\)?\\|.[0-9a-zA-Z]*\\(e[-+]?[0-9]*\\)?\\)?\\'") - (let ((radix (string-to-int + (let ((radix (string-to-number (buffer-substring (match-beginning 2) (match-end 2))))) (and (>= radix 2) @@ -3280,7 +3278,7 @@ (eq (aref digs 0) ?0)) (math-read-number (concat "8#" digs)) (if (<= (length digs) 6) - (string-to-int digs) + (string-to-number digs) (cons 'bigpos (math-read-bignum digs)))))) ;; Clean up the string if necessary @@ -3317,7 +3315,7 @@ (exp (math-match-substring s 2))) (let ((mant (if (> (length mant) 0) (math-read-number mant) 1)) (exp (if (<= (length exp) (if (memq (aref exp 0) '(?+ ?-)) 8 7)) - (string-to-int exp)))) + (string-to-number exp)))) (and mant exp (Math-realp mant) (> exp -4000000) (< exp 4000000) (let ((mant (math-float mant))) (list 'float (nth 1 mant) (+ (nth 2 mant) exp))))))) @@ -3332,9 +3330,9 @@ (defun math-read-bignum (s) ; [l X] (if (> (length s) 3) - (cons (string-to-int (substring s -3)) + (cons (string-to-number (substring s -3)) (math-read-bignum (substring s 0 -3))) - (list (string-to-int s)))) + (list (string-to-number s)))) (defconst math-tex-ignore-words
--- a/lisp/calendar/icalendar.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/calendar/icalendar.el Thu May 05 00:04:55 2005 +0000 @@ -28,6 +28,13 @@ ;; This package is documented in the Emacs Manual. +;; Please note: +;; - Diary entries which have a start time but no end time are assumed to +;; last for one hour when they are exported. +;; - Weekly diary entries are assumed to occur the first time in the first +;; week of the year 2000 when they are exported. +;; - Yearly diary entries are assumed to occur the first time in the year +;; 1900 when they are exported. ;;; History: @@ -75,11 +82,11 @@ ;; + the parser is too soft ;; + error log is incomplete ;; + nice to have: #include "webcal://foo.com/some-calendar.ics" +;; + timezones, currently all times are local! ;; * Export from diary to ical ;; + diary-date, diary-float, and self-made sexp entries are not ;; understood -;; + timezones, currently all times are local! ;; * Other things ;; + clean up all those date/time parsing functions @@ -90,7 +97,7 @@ ;;; Code: -(defconst icalendar-version 0.11 +(defconst icalendar-version 0.12 "Version number of icalendar.el.") ;; ====================================================================== @@ -145,16 +152,8 @@ :type 'string :group 'icalendar) -(defcustom icalendar-duration-correction - t - "Workaround for all-day events. -If non-nil the length=duration of iCalendar appointments that -have a length of exactly n days is decreased by one day. This -fixes problems with all-day events, which appear to be one day -longer than they are." - :type 'boolean - :group 'icalendar) - +(defvar icalendar-debug nil + "Enable icalendar debug messages.") ;; ====================================================================== ;; NO USER SERVICABLE PARTS BELOW THIS LINE @@ -162,8 +161,6 @@ (defconst icalendar--weekday-array ["SU" "MO" "TU" "WE" "TH" "FR" "SA"]) -(defvar icalendar-debug nil ".") - ;; ====================================================================== ;; all the other libs we need ;; ====================================================================== @@ -295,7 +292,7 @@ (while props (setq pp (car props)) (if (eq (car pp) prop) - (setq result (cons (car (cddr pp)) result))) + (setq result (append (split-string (car (cddr pp)) ",") result))) (setq props (cdr props))) result)) @@ -411,12 +408,15 @@ ;; isodatetimestring == nil nil)) -(defun icalendar--decode-isoduration (isodurationstring) - "Return ISODURATIONSTRING in format like `decode-time'. +(defun icalendar--decode-isoduration (isodurationstring + &optional duration-correction) + "Convert ISODURATIONSTRING into format provided by `decode-time'. Converts from ISO-8601 to Emacs representation. If ISODURATIONSTRING specifies UTC time (trailing letter Z) the decoded time is given in the local time zone! +Optional argument DURATION-CORRECTION shortens result by one day. + FIXME: TZID-attributes are ignored....! FIXME: multiple comma-separated values should be allowed!" (if isodurationstring @@ -442,7 +442,7 @@ (setq days (read (substring isodurationstring (match-beginning 3) (match-end 3)))) - (when icalendar-duration-correction + (when duration-correction (setq days (1- days)))) ((match-beginning 4) ;days and time (if (match-beginning 5) @@ -710,14 +710,14 @@ "?"))) ;; prepare buffer with error messages (save-current-buffer - (set-buffer (get-buffer-create " *icalendar-errors*")) + (set-buffer (get-buffer-create "*icalendar-errors*")) (erase-buffer)) ;; here we go (save-excursion (goto-char min) (while (re-search-forward - "^\\([^ \t\n].*\\)\\(\\(\n[ \t].*\\)*\\)" max t) + "^\\([^ \t\n].+\\)\\(\\(\n[ \t].*\\)*\\)" max t) (setq entry-main (match-string 1)) (if (match-beginning 2) (setq entry-rest (match-string 2)) @@ -728,369 +728,42 @@ (car (cddr (current-time))))) (condition-case error-val (progn - (cond - ;; anniversaries - ((string-match - (concat nonmarker - "%%(diary-anniversary \\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-anniversary %s" entry-main) - (let* ((datetime (substring entry-main (match-beginning 1) - (match-end 1))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 2) - (match-end 2)))) - (startisostring (icalendar--datestring-to-isodate - datetime)) - (endisostring (icalendar--datestring-to-isodate - datetime 1))) - (setq contents - (concat "\nDTSTART;VALUE=DATE:" startisostring - "\nDTEND;VALUE=DATE:" endisostring - "\nSUMMARY:" summary - "\nRRULE:FREQ=YEARLY;INTERVAL=1" - ;; the following is redundant, - ;; but korganizer seems to expect this... ;( - ;; and evolution doesn't understand it... :( - ;; so... who is wrong?! - ";BYMONTH=" - (substring startisostring 4 6) - ";BYMONTHDAY=" - (substring startisostring 6 8)))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; cyclic events - ;; %%(diary-cyclic ) - ((string-match - (concat nonmarker - "%%(diary-cyclic \\([^ ]+\\) +" - "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-cyclic %s" entry-main) - (let* ((frequency (substring entry-main (match-beginning 1) - (match-end 1))) - (datetime (substring entry-main (match-beginning 2) - (match-end 2))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 3) - (match-end 3)))) - (startisostring (icalendar--datestring-to-isodate - datetime)) - (endisostring (icalendar--datestring-to-isodate - datetime 1))) - (setq contents - (concat "\nDTSTART;VALUE=DATE:" startisostring - "\nDTEND;VALUE=DATE:" endisostring - "\nSUMMARY:" summary - "\nRRULE:FREQ=DAILY;INTERVAL=" frequency - ;; strange: korganizer does not expect - ;; BYSOMETHING here... - ))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; diary-date -- FIXME - ((string-match - (concat nonmarker - "%%(diary-date \\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-date %s" entry-main) - (error "`diary-date' is not supported yet")) - ;; float events -- FIXME - ((string-match - (concat nonmarker - "%%(diary-float \\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-float %s" entry-main) - (error "`diary-float' is not supported yet")) - ;; block events - ((string-match - (concat nonmarker - "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)" - " +\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" - "\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-block %s" entry-main) - (let* ((startstring (substring entry-main - (match-beginning 1) - (match-end 1))) - (endstring (substring entry-main - (match-beginning 2) - (match-end 2))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 3) - (match-end 3)))) - (startisostring (icalendar--datestring-to-isodate - startstring)) - (endisostring (icalendar--datestring-to-isodate - endstring 1))) - (setq contents - (concat "\nDTSTART;VALUE=DATE:" startisostring - "\nDTEND;VALUE=DATE:" endisostring - "\nSUMMARY:" summary)) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest)))))) - ;; other sexp diary entries -- FIXME - ((string-match - (concat nonmarker - "%%(\\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-sexp %s" entry-main) - (error "sexp-entries are not supported yet")) - ;; weekly by day - ;; Monday 8:30 Team meeting - ((and (string-match - (concat nonmarker - "\\([a-z]+\\)\\s-+" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)" - "\\([ap]m\\)?" - "\\(-0?" - "\\([1-9][0-9]?:[0-9][0-9]\\)" - "\\([ap]m\\)?\\)?" - "\\)?" - "\\s-*\\(.*\\)$") - entry-main) - (icalendar--get-weekday-abbrev - (substring entry-main (match-beginning 1) - (match-end 1)))) - (icalendar--dmsg "weekly %s" entry-main) - (let* ((day (icalendar--get-weekday-abbrev - (substring entry-main (match-beginning 1) - (match-end 1)))) - (starttimestring (icalendar--diarytime-to-isotime - (if (match-beginning 3) - (substring entry-main - (match-beginning 3) - (match-end 3)) - nil) - (if (match-beginning 4) - (substring entry-main - (match-beginning 4) - (match-end 4)) - nil))) - (endtimestring (icalendar--diarytime-to-isotime - (if (match-beginning 6) - (substring entry-main - (match-beginning 6) - (match-end 6)) - nil) - (if (match-beginning 7) - (substring entry-main - (match-beginning 7) - (match-end 7)) - nil))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 8) - (match-end 8))))) - (when starttimestring - (unless endtimestring - (let ((time (read - (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" - (+ 10000 time)))))) - (setq contents - (concat "\nDTSTART;" - (if starttimestring - "VALUE=DATE-TIME:" - "VALUE=DATE:") - ;; find the correct week day, - ;; 1st january 2000 was a saturday - (format - "200001%02d" - (+ (icalendar--get-weekday-number day) 2)) - (or starttimestring "") - "\nDTEND;" - (if endtimestring - "VALUE=DATE-TIME:" - "VALUE=DATE:") - (format - "200001%02d" - ;; end is non-inclusive! - (+ (icalendar--get-weekday-number day) - (if endtimestring 2 3))) - (or endtimestring "") - "\nSUMMARY:" summary - "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" - day))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; yearly by day - ;; 1 May Tag der Arbeit - ((string-match - (concat nonmarker - (if european-calendar-style - "0?\\([1-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" - "\\([a-z]+\\)\\s-+0?\\([1-9]+[0-9]?\\)\\s-+") - "\\*?\\s-*" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" - "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" - "\\)?" - "\\s-*\\([^0-9]+.*\\)$" ; must not match years - ) - entry-main) - (icalendar--dmsg "yearly %s" entry-main) - (let* ((daypos (if european-calendar-style 1 2)) - (monpos (if european-calendar-style 2 1)) - (day (read (substring entry-main - (match-beginning daypos) - (match-end daypos)))) - (month (icalendar--get-month-number - (substring entry-main - (match-beginning monpos) - (match-end monpos)))) - (starttimestring (icalendar--diarytime-to-isotime - (if (match-beginning 4) - (substring entry-main - (match-beginning 4) - (match-end 4)) - nil) - (if (match-beginning 5) - (substring entry-main - (match-beginning 5) - (match-end 5)) - nil))) - (endtimestring (icalendar--diarytime-to-isotime - (if (match-beginning 7) - (substring entry-main - (match-beginning 7) - (match-end 7)) - nil) - (if (match-beginning 8) - (substring entry-main - (match-beginning 8) - (match-end 8)) - nil))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 9) - (match-end 9))))) - (when starttimestring - (unless endtimestring - (let ((time (read - (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" - (+ 10000 time)))))) - (setq contents - (concat "\nDTSTART;" - (if starttimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - (format "1900%02d%02d" month day) - (or starttimestring "") - "\nDTEND;" - (if endtimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - ;; end is not included! shift by one day - (icalendar--date-to-isodate - (list month day 1900) - (if endtimestring 0 1)) - (or endtimestring "") - "\nSUMMARY:" - summary - "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=" - (format "%2d" month) - ";BYMONTHDAY=" - (format "%2d" day)))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; "ordinary" events, start and end time given - ;; 1 Feb 2003 Hs Hochzeitsfeier, Dreieich - ((string-match - (concat nonmarker - "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-+" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" - "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" - "\\)?" - "\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "ordinary %s" entry-main) - (let* ((startdatestring (icalendar--datestring-to-isodate - (substring entry-main - (match-beginning 1) - (match-end 1)))) - (starttimestring (icalendar--diarytime-to-isotime - (if (match-beginning 3) - (substring entry-main - (match-beginning 3) - (match-end 3)) - nil) - (if (match-beginning 4) - (substring entry-main - (match-beginning 4) - (match-end 4)) - nil))) - (endtimestring (icalendar--diarytime-to-isotime - (if (match-beginning 6) - (substring entry-main - (match-beginning 6) - (match-end 6)) - nil) - (if (match-beginning 7) - (substring entry-main - (match-beginning 7) - (match-end 7)) - nil))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 8) - (match-end 8))))) - (unless startdatestring - (error "Could not parse date")) - (when starttimestring - (unless endtimestring - (let ((time - (read (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" - (+ 10000 time)))))) - (setq contents (concat - "\nDTSTART;" - (if starttimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - startdatestring - (or starttimestring "") - "\nDTEND;" - (if endtimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - (icalendar--datestring-to-isodate - (substring entry-main - (match-beginning 1) - (match-end 1)) - (if endtimestring 0 1)) - (or endtimestring "") - "\nSUMMARY:" - summary)) - ;; could not parse the date - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest)))))) - ;; everything else - (t - ;; Oops! what's that? - (error "Could not parse entry"))) + (setq contents + (or + ;; anniversaries -- %%(diary-anniversary ...) + (icalendar--convert-anniversary-to-ical nonmarker + entry-main) + ;; cyclic events -- %%(diary-cyclic ...) + (icalendar--convert-cyclic-to-ical nonmarker entry-main) + ;; diary-date -- %%(diary-date ...) + (icalendar--convert-date-to-ical nonmarker entry-main) + ;; float events -- %%(diary-float ...) + (icalendar--convert-float-to-ical nonmarker entry-main) + ;; block events -- %%(diary-block ...) + (icalendar--convert-block-to-ical nonmarker entry-main) + ;; other sexp diary entries + (icalendar--convert-sexp-to-ical nonmarker entry-main) + ;; weekly by day -- Monday 8:30 Team meeting + (icalendar--convert-weekly-to-ical nonmarker entry-main) + ;; yearly by day -- 1 May Tag der Arbeit + (icalendar--convert-yearly-to-ical nonmarker entry-main) + ;; "ordinary" events, start and end time given + ;; 1 Feb 2003 blah + (icalendar--convert-ordinary-to-ical nonmarker entry-main) + ;; everything else + ;; Oops! what's that? + (error "Could not parse entry"))) + (unless (string= entry-rest "") + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest)))) (setq result (concat result header contents "\nEND:VEVENT"))) ;; handle errors (error (setq found-error t) (save-current-buffer - (set-buffer (get-buffer-create " *icalendar-errors*")) + (set-buffer (get-buffer-create "*icalendar-errors*")) (insert (format "Error in line %d -- %s: `%s'\n" (count-lines (point-min) (point)) (cadr error-val) @@ -1110,6 +783,518 @@ (save-buffer)))) found-error)) +;; subroutines +(defun icalendar--convert-ordinary-to-ical (nonmarker entry-main) + "Convert \"ordinary\" diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((datetime (substring entry-main (match-beginning 1) + (match-end 1))) + (startisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring (icalendar--datestring-to-isodate + datetime 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (icalendar--dmsg "ordinary %s" entry-main) + + (unless startisostring + (error "Could not parse date")) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + startisostring + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + (if starttimestring + startisostring + endisostring) + (or endtimestring "") + "\nSUMMARY:" + summary)) + ;; no match + nil)) + +(defun icalendar--convert-weekly-to-ical (nonmarker entry-main) + "Convert weekly diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (and (string-match (concat nonmarker + "\\([a-z]+\\)\\s-+" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\([ap]m\\)?" + "\\(-0?" + "\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)$") + entry-main) + (icalendar--get-weekday-abbrev + (substring entry-main (match-beginning 1) + (match-end 1)))) + (let* ((day (icalendar--get-weekday-abbrev + (substring entry-main (match-beginning 1) + (match-end 1)))) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (icalendar--dmsg "weekly %s" entry-main) + + (when starttimestring + (unless endtimestring + (let ((time (read + (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring + "VALUE=DATE-TIME:" + "VALUE=DATE:") + ;; find the correct week day, + ;; 1st january 2000 was a saturday + (format + "200001%02d" + (+ (icalendar--get-weekday-number day) 2)) + (or starttimestring "") + "\nDTEND;" + (if endtimestring + "VALUE=DATE-TIME:" + "VALUE=DATE:") + (format + "200001%02d" + ;; end is non-inclusive! + (+ (icalendar--get-weekday-number day) + (if endtimestring 2 3))) + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" + day)) + ;; no match + nil)) + +(defun icalendar--convert-yearly-to-ical (nonmarker entry-main) + "Convert yearly diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + (if european-calendar-style + "0?\\([1-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" + "\\([a-z]+\\)\\s-+0?\\([1-9]+[0-9]?\\)\\s-+") + "\\*?\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\([^0-9]+.*\\)$" ; must not match years + ) + entry-main) + (let* ((daypos (if european-calendar-style 1 2)) + (monpos (if european-calendar-style 2 1)) + (day (read (substring entry-main + (match-beginning daypos) + (match-end daypos)))) + (month (icalendar--get-month-number + (substring entry-main + (match-beginning monpos) + (match-end monpos)))) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil) + (if (match-beginning 5) + (substring entry-main + (match-beginning 5) + (match-end 5)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil) + (if (match-beginning 8) + (substring entry-main + (match-beginning 8) + (match-end 8)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 9) + (match-end 9))))) + (icalendar--dmsg "yearly %s" entry-main) + + (when starttimestring + (unless endtimestring + (let ((time (read + (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + (format "1900%02d%02d" month day) + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + ;; end is not included! shift by one day + (icalendar--date-to-isodate + (list month day 1900) + (if endtimestring 0 1)) + (or endtimestring "") + "\nSUMMARY:" + summary + "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=" + (format "%2d" month) + ";BYMONTHDAY=" + (format "%2d" day))) + ;; no match + nil)) + +(defun icalendar--convert-sexp-to-ical (nonmarker entry-main) + "Convert complex sexp diary entry to icalendar format -- unsupported! + +FIXME! + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(\\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (progn + (icalendar--dmsg "diary-sexp %s" entry-main) + (error "Sexp-entries are not supported yet")) + ;; no match + nil)) + +(defun icalendar--convert-block-to-ical (nonmarker entry-main) + "Convert block diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)" + " +\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((startstring (substring entry-main + (match-beginning 1) + (match-end 1))) + (endstring (substring entry-main + (match-beginning 2) + (match-end 2))) + (startisostring (icalendar--datestring-to-isodate + startstring)) + (endisostring (icalendar--datestring-to-isodate + endstring)) + (endisostring+1 (icalendar--datestring-to-isodate + endstring 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil) + (if (match-beginning 5) + (substring entry-main + (match-beginning 5) + (match-end 5)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil) + (if (match-beginning 8) + (substring entry-main + (match-beginning 8) + (match-end 8)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 9) + (match-end 9))))) + (icalendar--dmsg "diary-block %s" entry-main) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (if starttimestring + ;; with time -> write rrule + (concat "\nDTSTART;VALUE=DATE-TIME:" + startisostring + starttimestring + "\nDTEND;VALUE=DATE-TIME:" + startisostring + endtimestring + "\nSUMMARY:" + summary + "\nRRULE:FREQ=DAILY;INTERVAL=1;UNTIL=" + endisostring) + ;; no time -> write long event + (concat "\nDTSTART;VALUE=DATE:" startisostring + "\nDTEND;VALUE=DATE:" endisostring+1 + "\nSUMMARY:" summary))) + ;; no match + nil)) + +(defun icalendar--convert-float-to-ical (nonmarker entry-main) + "Convert float diary entry to icalendar format -- unsupported! + +FIXME! + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-float \\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (progn + (icalendar--dmsg "diary-float %s" entry-main) + (error "`diary-float' is not supported yet")) + ;; no match + nil)) + +(defun icalendar--convert-date-to-ical (nonmarker entry-main) + "Convert `diary-date' diary entry to icalendar format -- unsupported! + +FIXME! + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-date \\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (progn + (icalendar--dmsg "diary-date %s" entry-main) + (error "`diary-date' is not supported yet")) + ;; no match + nil)) + +(defun icalendar--convert-cyclic-to-ical (nonmarker entry-main) + "Convert `diary-cyclic' diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-cyclic \\([^ ]+\\) +" + "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((frequency (substring entry-main (match-beginning 1) + (match-end 1))) + (datetime (substring entry-main (match-beginning 2) + (match-end 2))) + (startisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring+1 (icalendar--datestring-to-isodate + datetime 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil) + (if (match-beginning 5) + (substring entry-main + (match-beginning 5) + (match-end 5)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil) + (if (match-beginning 8) + (substring entry-main + (match-beginning 8) + (match-end 8)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 9) + (match-end 9))))) + (icalendar--dmsg "diary-cyclic %s" entry-main) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + startisostring + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + (if endtimestring endisostring endisostring+1) + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=DAILY;INTERVAL=" frequency + ;; strange: korganizer does not expect + ;; BYSOMETHING here... + )) + ;; no match + nil)) + +(defun icalendar--convert-anniversary-to-ical (nonmarker entry-main) + "Convert `diary-anniversary' diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-anniversary \\([^)]+\\))\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((datetime (substring entry-main (match-beginning 1) + (match-end 1))) + (startisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring (icalendar--datestring-to-isodate + datetime 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (icalendar--dmsg "diary-anniversary %s" entry-main) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + startisostring + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + endisostring + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=YEARLY;INTERVAL=1" + ;; the following is redundant, + ;; but korganizer seems to expect this... ;( + ;; and evolution doesn't understand it... :( + ;; so... who is wrong?! + ";BYMONTH=" + (substring startisostring 4 6) + ";BYMONTHDAY=" + (substring startisostring 6 8))) + ;; no match + nil)) + ;; ====================================================================== ;; Import -- convert icalendar to emacs-diary ;; ====================================================================== @@ -1170,10 +1355,12 @@ ical-contents diary-file do-not-ask non-marking)) (when diary-file - ;; save the diary file - (save-current-buffer - (set-buffer (find-buffer-visiting diary-file)) - (save-buffer))) + ;; save the diary file if it is visited already + (let ((b (find-buffer-visiting diary-file))) + (when b + (save-current-buffer + (set-buffer b) + (save-buffer))))) (message "Converting icalendar...done") ;; return t if no error occured (not ical-errors)) @@ -1185,10 +1372,6 @@ (defalias 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer) (make-obsolete 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer) -;; ====================================================================== -;; private area -;; ====================================================================== - (defun icalendar--format-ical-event (event) "Create a string representation of an iCalendar EVENT." (let ((string icalendar-import-format) @@ -1226,7 +1409,7 @@ events are created as non-marking. This function attempts to return t if something goes wrong. In this case an error string which describes all the errors and problems is -written into the buffer ` *icalendar-errors*'." +written into the buffer `*icalendar-errors*'." (let* ((ev (icalendar--all-events ical-list)) (error-string "") (event-ok t) @@ -1238,14 +1421,16 @@ (setq ev (cdr ev)) (setq event-ok nil) (condition-case error-val - (let* ((dtstart (icalendar--decode-isodatetime - (icalendar--get-event-property e 'DTSTART))) + (let* ((dtstart (icalendar--get-event-property e 'DTSTART)) + (dtstart-dec (icalendar--decode-isodatetime dtstart)) (start-d (icalendar--datetime-to-diary-date - dtstart)) - (start-t (icalendar--datetime-to-colontime dtstart)) - (dtend (icalendar--decode-isodatetime - (icalendar--get-event-property e 'DTEND))) + dtstart-dec)) + (start-t (icalendar--datetime-to-colontime dtstart-dec)) + (dtend (icalendar--get-event-property e 'DTEND)) + (dtend-dec (icalendar--decode-isodatetime dtend)) + (dtend-1-dec (icalendar--decode-isodatetime dtend -1)) end-d + end-1-d end-t (subject (icalendar--convert-string-for-import (or (icalendar--get-event-property e 'SUMMARY) @@ -1253,165 +1438,50 @@ (rrule (icalendar--get-event-property e 'RRULE)) (rdate (icalendar--get-event-property e 'RDATE)) (duration (icalendar--get-event-property e 'DURATION))) - (icalendar--dmsg "%s: %s" start-d subject) + (icalendar--dmsg "%s: `%s'" start-d subject) ;; check whether start-time is missing - (if (and (icalendar--get-event-property-attributes - e 'DTSTART) - (string= (cadr (icalendar--get-event-property-attributes - e 'DTSTART)) - "DATE")) + (if (and dtstart + (string= + (cadr (icalendar--get-event-property-attributes + e 'DTSTART)) + "DATE")) (setq start-t nil)) (when duration - (let ((dtend2 (icalendar--add-decoded-times - dtstart - (icalendar--decode-isoduration duration)))) - (if (and dtend (not (eq dtend dtend2))) + (let ((dtend-dec-d (icalendar--add-decoded-times + dtstart-dec + (icalendar--decode-isoduration duration))) + (dtend-1-dec-d (icalendar--add-decoded-times + dtstart-dec + (icalendar--decode-isoduration duration + t)))) + (if (and dtend-dec (not (eq dtend-dec dtend-dec-d))) (message "Inconsistent endtime and duration for %s" subject)) - (setq dtend dtend2))) - (setq end-d (if dtend - (icalendar--datetime-to-diary-date dtend) + (setq dtend-dec dtend-dec-d) + (setq dtend-1-dec dtend-1-dec-d))) + (setq end-d (if dtend-dec + (icalendar--datetime-to-diary-date dtend-dec) start-d)) - (setq end-t (if dtend - (icalendar--datetime-to-colontime dtend) + (setq end-1-d (if dtend-1-dec + (icalendar--datetime-to-diary-date dtend-1-dec) + start-d)) + (setq end-t (if (and + dtend-dec + (not (string= + (cadr + (icalendar--get-event-property-attributes + e 'DTEND)) + "DATE"))) + (icalendar--datetime-to-colontime dtend-dec) start-t)) (icalendar--dmsg "start-d: %s, end-d: %s" start-d end-d) (cond ;; recurring event (rrule - (icalendar--dmsg "recurring event") - (let* ((rrule-props (icalendar--split-value rrule)) - (frequency (cadr (assoc 'FREQ rrule-props))) - (until (cadr (assoc 'UNTIL rrule-props))) - (interval (read (cadr (assoc 'INTERVAL rrule-props))))) - (cond ((string-equal frequency "WEEKLY") - (if (not start-t) - (progn - ;; weekly and all-day - (icalendar--dmsg "weekly all-day") - (if until - (let ((fro - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - (icalendar--get-event-property - e - 'DTSTART)))) - (unt - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until -1)))) - (setq diary-string - (format - (concat "%%%%(and " - "(diary-cyclic %d %s) " - "(diary-block %s %s))") - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until -1))))) - (setq diary-string - (format "%%%%(and (diary-cyclic %d %s))" - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart)))) - (setq event-ok t)) - ;; weekly and not all-day - (let* ((byday (cadr (assoc 'BYDAY rrule-props))) - (weekday - (icalendar--get-weekday-number byday))) - (icalendar--dmsg "weekly not-all-day") - (if until - (let ((fro - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - (icalendar--get-event-property - e - 'DTSTART)))) - (unt - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until)))) - (setq diary-string - (format - (concat "%%%%(and " - "(diary-cyclic %d %s) " - "(diary-block %s %s)) " - "%s%s%s") - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until)) - start-t - (if end-t "-" "") (or end-t "")))) - ;; no limit - ;; FIXME!!!! - ;; DTSTART;VALUE=DATE-TIME:20030919T090000 - ;; DTEND;VALUE=DATE-TIME:20030919T113000 - (setq diary-string - (format - "%%%%(and (diary-cyclic %s %s)) %s%s%s" - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart) - start-t - (if end-t "-" "") (or end-t "")))) - (setq event-ok t)))) - ;; yearly - ((string-equal frequency "YEARLY") - (icalendar--dmsg "yearly") - (setq diary-string - (format - "%%%%(and (diary-anniversary %s))" - (icalendar--datetime-to-diary-date dtstart))) - (setq event-ok t)) - ;; FIXME: war auskommentiert: - ((and (string-equal frequency "DAILY") - ;;(not (string= start-d end-d)) - ;;(not start-t) - ;;(not end-t) - ) - (let ((ds (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - (icalendar--get-event-property - e 'DTSTART)))) - (de (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until -1)))) - (setq diary-string - (format - "%%%%(and (diary-block %s %s))" - ds de))) - (setq event-ok t)))) - ;; Handle exceptions from recurrence rules - (let ((ex-dates (icalendar--get-event-properties e - 'EXDATE))) - (while ex-dates - (let* ((ex-start (icalendar--decode-isodatetime - (car ex-dates))) - (ex-d (icalendar--datetime-to-diary-date - ex-start))) - (setq diary-string - (icalendar--rris "^%%(\\(and \\)?" - (format - "%%%%(and (not (diary-date %s)) " - ex-d) - diary-string))) - (setq ex-dates (cdr ex-dates)))) - ;; FIXME: exception rules are not recognized - (if (icalendar--get-event-property e 'EXRULE) - (setq diary-string - (concat diary-string - "\n Exception rules: " - (icalendar--get-event-properties - e 'EXRULE))))) + (setq diary-string + (icalendar--convert-recurring-to-diary e dtstart-dec start-t + end-t)) + (setq event-ok t)) (rdate (icalendar--dmsg "rdate event") (setq diary-string "") @@ -1423,35 +1493,22 @@ ;; non-recurring event ;; all-day event ((not (string= start-d end-d)) - (icalendar--dmsg "non-recurring event") - (let ((ds (icalendar--datetime-to-diary-date dtstart)) - (de (icalendar--datetime-to-diary-date dtend))) - (setq diary-string - (format "%%%%(and (diary-block %s %s))" - ds de))) + (setq diary-string + (icalendar--convert-non-recurring-all-day-to-diary + e start-d end-1-d)) (setq event-ok t)) ;; not all-day ((and start-t (or (not end-t) (not (string= start-t end-t)))) - (icalendar--dmsg "not all day event") - (cond (end-t - (setq diary-string - (format "%s %s-%s" - (icalendar--datetime-to-diary-date - dtstart "/") - start-t end-t))) - (t - (setq diary-string - (format "%s %s" - (icalendar--datetime-to-diary-date - dtstart "/") - start-t)))) + (setq diary-string + (icalendar--convert-non-recurring-not-all-day-to-diary + e dtstart-dec dtend-dec start-t end-t)) (setq event-ok t)) ;; all-day event (t (icalendar--dmsg "all day event") (setq diary-string (icalendar--datetime-to-diary-date - dtstart "/")) + dtstart-dec "/")) (setq event-ok t))) ;; add all other elements unless the user doesn't want to have ;; them @@ -1478,12 +1535,237 @@ (message error-string)))) (if found-error (save-current-buffer - (set-buffer (get-buffer-create " *icalendar-errors*")) + (set-buffer (get-buffer-create "*icalendar-errors*")) (erase-buffer) (insert error-string))) (message "Converting icalendar...done") found-error)) +;; subroutines for importing +(defun icalendar--convert-recurring-to-diary (e dtstart-dec start-t end-t) + "Convert recurring icalendar event E to diary format. + +DTSTART-DEC is the DTSTART property of E. +START-T is the event's start time in diary format. +END-T is the event's end time in diary format." + (icalendar--dmsg "recurring event") + (let* ((rrule (icalendar--get-event-property e 'RRULE)) + (rrule-props (icalendar--split-value rrule)) + (frequency (cadr (assoc 'FREQ rrule-props))) + (until (cadr (assoc 'UNTIL rrule-props))) + (count (cadr (assoc 'COUNT rrule-props))) + (interval (read (or (cadr (assoc 'INTERVAL rrule-props)) "1"))) + (dtstart-conv (icalendar--datetime-to-diary-date dtstart-dec)) + (until-conv (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime until))) + (until-1-conv (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime until -1))) + (result "")) + + ;; FIXME FIXME interval!!!!!!!!!!!!! + + (when count + (if until + (message "Must not have UNTIL and COUNT -- ignoring COUNT element!") + (let ((until-1 0)) + (cond ((string-equal frequency "DAILY") + (setq until (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (read count) interval) 0 0))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (- (read count) 1) interval) + 0 0))) + ) + ((string-equal frequency "WEEKLY") + (setq until (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (read count) 7 interval) 0 0))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (- (read count) 1) 7 + interval) 0 0))) + ) + ((string-equal frequency "MONTHLY") + (setq until (icalendar--add-decoded-times + dtstart-dec (list 0 0 0 0 (* (- (read count) 1) + interval) 0))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec (list 0 0 0 0 (* (- (read count) 1) + interval) 0))) + ) + ((string-equal frequency "YEARLY") + (setq until (icalendar--add-decoded-times + dtstart-dec (list 0 0 0 0 0 (* (- (read count) 1) + interval)))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 0 0 (* (- (read count) 1) + interval)))) + ) + (t + (message "Cannot handle COUNT attribute for `%s' events." + frequency))) + (setq until-conv (icalendar--datetime-to-diary-date until)) + (setq until-1-conv (icalendar--datetime-to-diary-date until-1)) + )) + ) + (cond ((string-equal frequency "WEEKLY") + (if (not start-t) + (progn + ;; weekly and all-day + (icalendar--dmsg "weekly all-day") + (if until + (setq result + (format + (concat "%%%%(and " + "(diary-cyclic %d %s) " + "(diary-block %s %s))") + (* interval 7) + dtstart-conv + dtstart-conv + (if count until-1-conv until-conv) + )) + (setq result + (format "%%%%(and (diary-cyclic %d %s))" + (* interval 7) + dtstart-conv)))) + ;; weekly and not all-day + (let* ((byday (cadr (assoc 'BYDAY rrule-props))) + (weekday + (icalendar--get-weekday-number byday))) + (icalendar--dmsg "weekly not-all-day") + (if until + (setq result + (format + (concat "%%%%(and " + "(diary-cyclic %d %s) " + "(diary-block %s %s)) " + "%s%s%s") + (* interval 7) + dtstart-conv + dtstart-conv + until-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))) + ;; no limit + ;; FIXME!!!! + ;; DTSTART;VALUE=DATE-TIME:20030919T090000 + ;; DTEND;VALUE=DATE-TIME:20030919T113000 + (setq result + (format + "%%%%(and (diary-cyclic %s %s)) %s%s%s" + (* interval 7) + dtstart-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))))))) + ;; yearly + ((string-equal frequency "YEARLY") + (icalendar--dmsg "yearly") + (if until + (setq result (format + (concat "%%%%(and (diary-date %s %s t) " + "(diary-block %s %s)) %s%s%s") + (if european-calendar-style (nth 3 dtstart-dec) + (nth 4 dtstart-dec)) + (if european-calendar-style (nth 4 dtstart-dec) + (nth 3 dtstart-dec)) + dtstart-conv + until-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))) + (setq result (format + "%%%%(and (diary-anniversary %s)) %s%s%s" + dtstart-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))))) + ;; monthly + ((string-equal frequency "MONTHLY") + (icalendar--dmsg "monthly") + (setq result + (format + "%%%%(and (diary-date %s %s %s) (diary-block %s %s)) %s%s%s" + (if european-calendar-style (nth 3 dtstart-dec) "t") + (if european-calendar-style "t" (nth 3 dtstart-dec)) + "t" + dtstart-conv + (if until + until-conv + "1 1 9999") ;; FIXME: should be unlimited + (or start-t "") + (if end-t "-" "") (or end-t "")))) + ;; daily + ((and (string-equal frequency "DAILY")) + (if until + (setq result + (format + (concat "%%%%(and (diary-cyclic %s %s) " + "(diary-block %s %s)) %s%s%s") + interval dtstart-conv dtstart-conv + (if count until-1-conv until-conv) + (or start-t "") + (if end-t "-" "") (or end-t ""))) + (setq result + (format + "%%%%(and (diary-cyclic %s %s)) %s%s%s" + interval + dtstart-conv + (or start-t "") + (if end-t "-" "") (or end-t "")))))) + ;; Handle exceptions from recurrence rules + (let ((ex-dates (icalendar--get-event-properties e 'EXDATE))) + (while ex-dates + (let* ((ex-start (icalendar--decode-isodatetime + (car ex-dates))) + (ex-d (icalendar--datetime-to-diary-date + ex-start))) + (setq result + (icalendar--rris "^%%(\\(and \\)?" + (format + "%%%%(and (not (diary-date %s)) " + ex-d) + result))) + (setq ex-dates (cdr ex-dates)))) + ;; FIXME: exception rules are not recognized + (if (icalendar--get-event-property e 'EXRULE) + (setq result + (concat result + "\n Exception rules: " + (icalendar--get-event-properties + e 'EXRULE)))) + result)) + +(defun icalendar--convert-non-recurring-all-day-to-diary (event start-d end-d) + "Convert non-recurring icalendar EVENT to diary format. + +DTSTART is the decoded DTSTART property of E. +Argument START-D gives the first day. +Argument END-D gives the last day." + (icalendar--dmsg "non-recurring all-day event") + (format "%%%%(and (diary-block %s %s))" start-d end-d)) + +(defun icalendar--convert-non-recurring-not-all-day-to-diary (event dtstart-dec + dtend-dec + start-t + end-t) + "Convert recurring icalendar EVENT to diary format. + +DTSTART-DEC is the decoded DTSTART property of E. +DTEND-DEC is the decoded DTEND property of E. +START-T is the event's start time in diary format. +END-T is the event's end time in diary format." + (icalendar--dmsg "not all day event") + (cond (end-t + (format "%s %s-%s" + (icalendar--datetime-to-diary-date + dtstart-dec "/") + start-t end-t)) + (t + (format "%s %s" + (icalendar--datetime-to-diary-date + dtstart-dec "/") + start-t)))) + (defun icalendar--add-diary-entry (string diary-file non-marking &optional subject) "Add STRING to the diary file DIARY-FILE.
--- a/lisp/comint.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/comint.el Thu May 05 00:04:55 2005 +0000 @@ -159,7 +159,7 @@ Defaults to \"^\", the null string at BOL. This variable is only used if the variable -`comint-use-prompt-regexp-instead-of-fields' is non-nil. +`comint-use-prompt-regexp' is non-nil. Good choices: Canonical Lisp: \"^[^> \\n]*>+:? *\" (Lucid, franz, kcl, T, cscheme, oaklisp) @@ -353,7 +353,7 @@ default is `comint-get-old-input-default', which either grabs the current input field or grabs the current line and strips off leading text matching `comint-prompt-regexp', depending on the value of -`comint-use-prompt-regexp-instead-of-fields'.") +`comint-use-prompt-regexp'.") (defvar comint-dynamic-complete-functions '(comint-replace-by-expanded-history comint-dynamic-complete-filename) @@ -373,6 +373,7 @@ "Abnormal hook run before input is sent to the process. These functions get one argument, a string containing the text to send.") +;;;###autoload (defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "Functions to call after output is inserted into the buffer. One possible function is `comint-postoutput-scroll-to-bottom'. @@ -406,8 +407,8 @@ ;; Note: If it is decided to purge comint-prompt-regexp from the source ;; entirely, searching for uses of this variable will help to identify ;; places that need attention. -(defcustom comint-use-prompt-regexp-instead-of-fields nil - "*If non-nil, use `comint-prompt-regexp' to distinguish prompts from user-input. +(defcustom comint-use-prompt-regexp nil + "*If non-nil, use `comint-prompt-regexp' to recognize prompts. If nil, then program output and user-input are given different `field' properties, which Emacs commands can use to distinguish them (in particular, common movement commands such as begining-of-line respect @@ -415,6 +416,13 @@ :type 'boolean :group 'comint) +;; Autoload is necessary for Custom to recognize old alias. +;;;###autoload +(defvaralias 'comint-use-prompt-regexp-instead-of-fields + 'comint-use-prompt-regexp) +(make-obsolete-variable 'comint-use-prompt-regexp-instead-of-fields + 'comint-use-prompt-regexp "22.1") + (defcustom comint-mode-hook '(turn-on-font-lock) "Hook run upon entry to `comint-mode'. This is run before the process is cranked up." @@ -1150,7 +1158,7 @@ Returns t if successful." (interactive) (if (and comint-input-autoexpand - (if comint-use-prompt-regexp-instead-of-fields + (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (save-excursion (beginning-of-line) @@ -1419,10 +1427,10 @@ If the interpreter is the csh, `comint-get-old-input' is the default: - If `comint-use-prompt-regexp-instead-of-fields' is nil, then + If `comint-use-prompt-regexp' is nil, then either return the current input field, if point is on an input field, or the current line, if point is on an output field. - If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then + If `comint-use-prompt-regexp' is non-nil, then return the current line with any initial string matching the regexp `comint-prompt-regexp' removed. `comint-input-filter-functions' monitors input for \"cd\", \"pushd\", and @@ -1487,14 +1495,14 @@ font-lock-face comint-highlight-input mouse-face highlight help-echo "mouse-2: insert after prompt as new input")) - (unless comint-use-prompt-regexp-instead-of-fields + (unless comint-use-prompt-regexp ;; Give old user input a field property of `input', to ;; distinguish it from both process output and unsent ;; input. The terminating newline is put into a special ;; `boundary' field to make cursor movement between input ;; and output fields smoother. (put-text-property beg end 'field 'input))) - (unless (or no-newline comint-use-prompt-regexp-instead-of-fields) + (unless (or no-newline comint-use-prompt-regexp) ;; Cover the terminating newline (add-text-properties end (1+ end) '(rear-nonsticky t @@ -1708,7 +1716,7 @@ (goto-char (process-mark process)) ; in case a filter moved it - (unless comint-use-prompt-regexp-instead-of-fields + (unless comint-use-prompt-regexp (let ((inhibit-read-only t) (inhibit-modification-hooks t)) (add-text-properties comint-last-output-start (point) @@ -1844,10 +1852,10 @@ (defun comint-get-old-input-default () "Default for `comint-get-old-input'. -If `comint-use-prompt-regexp-instead-of-fields' is nil, then either +If `comint-use-prompt-regexp' is nil, then either return the current input field, if point is on an input field, or the current line, if point is on an output field. -If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then return +If `comint-use-prompt-regexp' is non-nil, then return the current line with any initial string matching the regexp `comint-prompt-regexp' removed." (let ((bof (field-beginning))) @@ -1880,10 +1888,10 @@ (defun comint-line-beginning-position () "Return the buffer position of the beginning of the line, after any prompt. -If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then the -prompt skip is done by skipping text matching the regular expression -`comint-prompt-regexp', a buffer local variable." - (if comint-use-prompt-regexp-instead-of-fields +If `comint-use-prompt-regexp' is non-nil, then the prompt skip is done by +skipping text matching the regular expression `comint-prompt-regexp', +a buffer local variable." + (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (save-excursion (beginning-of-line) @@ -1901,9 +1909,9 @@ (defun comint-bol (&optional arg) "Go to the beginning of line, then skip past the prompt, if any. If prefix argument is given (\\[universal-argument]) the prompt is not skipped. -If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then the -prompt skip is done by skipping text matching the regular expression -`comint-prompt-regexp', a buffer local variable." +If `comint-use-prompt-regexp' is non-nil, then the prompt skip is done +by skipping text matching the regular expression `comint-prompt-regexp', +a buffer local variable." (interactive "P") (if arg ;; Unlike `beginning-of-line', forward-line ignores field boundaries @@ -2034,7 +2042,7 @@ (interactive) (push-mark) (let ((pos (or (marker-position comint-last-input-end) (point-max)))) - (cond (comint-use-prompt-regexp-instead-of-fields + (cond (comint-use-prompt-regexp (goto-char pos) (beginning-of-line 0) (set-window-start (selected-window) (point)) @@ -2127,13 +2135,13 @@ (defun comint-backward-matching-input (regexp n) "Search backward through buffer for input fields that match REGEXP. -If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then input -fields are identified by lines that match `comint-prompt-regexp'. +If `comint-use-prompt-regexp' is non-nil, then input fields are identified +by lines that match `comint-prompt-regexp'. With prefix argument N, search for Nth previous match. If N is negative, find the next or Nth next match." (interactive (comint-regexp-arg "Backward input matching (regexp): ")) - (if comint-use-prompt-regexp-instead-of-fields + (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (let* ((re (concat comint-prompt-regexp ".*" regexp)) (pos (save-excursion (end-of-line (if (> n 0) 0 1)) @@ -2159,8 +2167,8 @@ (defun comint-forward-matching-input (regexp arg) "Search forward through buffer for input fields that match REGEXP. -If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then input -fields are identified by lines that match `comint-prompt-regexp'. +If `comint-use-prompt-regexp' is non-nil, then input fields are identified +by lines that match `comint-prompt-regexp'. With prefix argument N, search for Nth following match. If N is negative, find the previous or Nth previous match." @@ -2170,11 +2178,11 @@ (defun comint-next-prompt (n) "Move to end of Nth next prompt in the buffer. -If `comint-use-prompt-regexp-instead-of-fields' is nil, then this means -the beginning of the Nth next `input' field, otherwise, it means the Nth -occurrence of text matching `comint-prompt-regexp'." +If `comint-use-prompt-regexp' is nil, then this means the beginning of +the Nth next `input' field, otherwise, it means the Nth occurrence of +text matching `comint-prompt-regexp'." (interactive "p") - (if comint-use-prompt-regexp-instead-of-fields + (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (let ((paragraph-start comint-prompt-regexp)) (end-of-line (if (> n 0) 1 0)) @@ -2207,9 +2215,9 @@ (defun comint-previous-prompt (n) "Move to end of Nth previous prompt in the buffer. -If `comint-use-prompt-regexp-instead-of-fields' is nil, then this means -the beginning of the Nth previous `input' field, otherwise, it means the Nth -occurrence of text matching `comint-prompt-regexp'." +If `comint-use-prompt-regexp' is nil, then this means the beginning of +the Nth previous `input' field, otherwise, it means the Nth occurrence of +text matching `comint-prompt-regexp'." (interactive "p") (comint-next-prompt (- n))) @@ -3022,7 +3030,7 @@ ;; appropriate magic default by examining what we think is the prompt)? ;; ;; Fixme: look for appropriate fields, rather than regexp, if -;; `comint-use-prompt-regexp-instead-of-fields' is true. +;; `comint-use-prompt-regexp' is true. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Variables
--- a/lisp/emacs-lisp/byte-run.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/emacs-lisp/byte-run.el Thu May 05 00:04:55 2005 +0000 @@ -114,6 +114,18 @@ (put function 'byte-obsolete-info (list new handler when))) function) +(defmacro define-obsolete-function-alias (function new + &optional when docstring) + "Set FUNCTION's function definition to NEW and warn that FUNCTION is obsolete. +If provided, WHEN should be a string indicating when FUNCTION was +first made obsolete, for example a date or a release number. The +optional argument DOCSTRING specifies the documentation string +for FUNCTION; if DOCSTRING is omitted or nil, FUNCTION uses the +documentation string of NEW unluess it already has one." + `(progn + (defalias ,function ,new ,docstring) + (make-obsolete ,function ,new ,when))) + (defun make-obsolete-variable (variable new &optional when) "Make the byte-compiler warn that VARIABLE is obsolete. The warning will say that NEW should be used instead. @@ -129,6 +141,18 @@ (put variable 'byte-obsolete-variable (cons new when)) variable) +(defmacro define-obsolete-variable-alias (variable new + &optional when docstring) + "Make VARIABLE a variable alias for NEW and warn that VARIABLE is obsolete. +If provided, WHEN should be a string indicating when VARIABLE was +first made obsolete, for example a date or a release number. The +optional argument DOCSTRING specifies the documentation string +for VARIABLE; if DOCSTRING is omitted or nil, VARIABLE uses the +documentation string of NEW unless it already has one." + `(progn + (defvaralias ,variable ,new ,docstring) + (make-obsolete-variable ,variable ,new ,when))) + (defmacro dont-compile (&rest body) "Like `progn', but the body always runs interpreted (not compiled). If you think you need this, you're probably making a mistake somewhere."
--- a/lisp/emacs-lisp/bytecomp.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Thu May 05 00:04:55 2005 +0000 @@ -2900,9 +2900,6 @@ (put 'byte-concatN 'byte-opcode-invert 'concat) (put 'byte-insertN 'byte-opcode-invert 'insert) -(byte-defop-compiler (dot byte-point) 0) -(byte-defop-compiler (dot-max byte-point-max) 0) -(byte-defop-compiler (dot-min byte-point-min) 0) (byte-defop-compiler point 0) ;;(byte-defop-compiler mark 0) ;; obsolete (byte-defop-compiler point-max 0)
--- a/lisp/emacs-lisp/easy-mmode.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/emacs-lisp/easy-mmode.el Thu May 05 00:04:55 2005 +0000 @@ -95,8 +95,8 @@ will be passed to `defcustom' if the minor mode is global): :group GROUP Custom group name to use in all generated `defcustom' forms. Defaults to MODE without the possible trailing \"-mode\". - (This default may not be a valid customization group defined - with `defgroup'. Make sure it is.) + Don't use this default group name unless you have written a + `defgroup' to define that group properly. :global GLOBAL If non-nil specifies that the minor mode is not meant to be buffer-local, so don't make the variable MODE buffer-local. By default, the mode is buffer-local.
--- a/lisp/emacs-lisp/easymenu.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/emacs-lisp/easymenu.el Thu May 05 00:04:55 2005 +0000 @@ -160,18 +160,18 @@ (let ((keymap (easy-menu-create-menu (car menu) (cdr menu)))) (when symbol (set symbol keymap) - (fset symbol - `(lambda (event) ,doc (interactive "@e") - ;; FIXME: XEmacs uses popup-menu which calls the binding - ;; while x-popup-menu only returns the selection. - (x-popup-menu event - (or (and (symbolp ,symbol) - (funcall - (or (plist-get (get ,symbol 'menu-prop) - :filter) - 'identity) - (symbol-function ,symbol))) - ,symbol))))) + (defalias symbol + `(lambda (event) ,doc (interactive "@e") + ;; FIXME: XEmacs uses popup-menu which calls the binding + ;; while x-popup-menu only returns the selection. + (x-popup-menu event + (or (and (symbolp ,symbol) + (funcall + (or (plist-get (get ,symbol 'menu-prop) + :filter) + 'identity) + (symbol-function ,symbol))) + ,symbol))))) (mapcar (lambda (map) (define-key map (vector 'menu-bar (easy-menu-intern (car menu))) (cons 'menu-item
--- a/lisp/emacs-lisp/eldoc.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/emacs-lisp/eldoc.el Thu May 05 00:04:55 2005 +0000 @@ -45,7 +45,7 @@ ;; Major modes for other languages may use Eldoc by defining an ;; appropriate function as the buffer-local value of -;; `eldoc-print-current-symbol-info-function'. +;; `eldoc-documentation-function'. ;;; Code: @@ -139,16 +139,11 @@ ;;;###autoload (define-minor-mode eldoc-mode "Toggle ElDoc mode on or off. -Show the defined parameters for the elisp function near point. - -For the emacs lisp function at the beginning of the sexp which point is -within, show the defined parameters for the function in the echo area. -This information is extracted directly from the function or macro if it is -in pure lisp. If the emacs function is a subr, the parameters are obtained -from the documentation string if possible. - -If point is over a documented variable, print that variable's docstring -instead. +In ElDoc mode, the echo area displays information about a +function or variable in the text where point is. If point is +on a documented variable, it displays that variable's doc string. +Otherwise it displays the argument list of the function called +in the expression point is on. With prefix ARG, turn ElDoc mode on if and only if ARG is positive." :group 'eldoc :lighter eldoc-minor-mode-string @@ -167,7 +162,6 @@ (eldoc-mode 1)) -;; Idle timers are part of Emacs 19.31 and later. (defun eldoc-schedule-timer () (or (and eldoc-timer (memq eldoc-timer timer-idle-list)) @@ -235,7 +229,7 @@ (not (eq (selected-window) (minibuffer-window))))) -(defvar eldoc-print-current-symbol-info-function nil +(defvar eldoc-documentation-function nil "If non-nil, function to call to return doc string. The function of no args should return a one-line string for displaying doc about a function etc. appropriate to the context around point. @@ -249,8 +243,8 @@ (defun eldoc-print-current-symbol-info () (condition-case err (and (eldoc-display-message-p) - (if eldoc-print-current-symbol-info-function - (eldoc-message (funcall eldoc-print-current-symbol-info-function)) + (if eldoc-documentation-function + (eldoc-message (funcall eldoc-documentation-function)) (let* ((current-symbol (eldoc-current-symbol)) (current-fnsym (eldoc-fnsym-in-current-sexp)) (doc (cond
--- a/lisp/emacs-lisp/generic.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/emacs-lisp/generic.el Thu May 05 00:04:55 2005 +0000 @@ -35,15 +35,15 @@ ;; ;; Each generic mode can define the following: ;; -;; * List of comment-characters. The entries in this list should be -;; either a character, a one or two character string or a cons pair. -;; If the entry is a character or a string, it is added to the -;; mode's syntax table with `comment-start' syntax. If the entry is -;; a cons pair, the elements of the pair are considered to be -;; `comment-start' and `comment-end' respectively. (The latter -;; should be nil if you want comments to end at end of line.) -;; LIMITATIONS: Emacs does not support comment strings of more than -;; two characters in length. +;; * List of comment-characters. The elements of this list should be +;; either a character, a one or two character string, or a cons +;; cell. If the entry is a character or a string, it is added to +;; the mode's syntax table with "comment starter" syntax. If the +;; entry is a cons cell, the `car' and `cdr' of the pair are +;; considered the "comment starter" and "comment ender" +;; respectively. (The latter should be nil if you want comments to +;; end at the end of the line.) Emacs does not support comment +;; strings of more than two characters in length. ;; ;; * List of keywords to font-lock. Each keyword should be a string. ;; If you have additional keywords which should be highlighted in a @@ -121,40 +121,42 @@ &rest custom-keyword-args) "Create a new generic mode MODE. -MODE is the name of the command for the generic mode; it need not -be quoted. The optional DOCSTRING is the documentation for the -mode command. If you do not supply it, a default documentation -string will be used instead. +MODE is the name of the command for the generic mode; don't quote +it. The optional DOCSTRING is the documentation for the mode +command. If you do not supply it, `define-generic-mode' uses a +default documentation string instead. -COMMENT-LIST is a list, whose entries are either a single -character, a one or two character string or a cons pair. If the -entry is a character or a string, it is added to the mode's -syntax table with `comment-start' syntax. If the entry is a cons -pair, the elements of the pair are considered to be -`comment-start' and `comment-end' respectively. (The latter -should be nil if you want comments to end at end of line.) Note -that Emacs has limitations regarding comment characters. +COMMENT-LIST is a list in which each element is either a +character, a string of one or two characters, or a cons cell. A +character or a string is set up in the mode's syntax table as a +\"comment starter\". If the entry is a cons cell, the `car' is +set up as a \"comment starter\" and the `cdr' as a \"comment +ender\". (Use nil for the latter if you want comments to end at +the end of the line.) Note that the syntax table has limitations +about what comment starters and enders are actually possible. KEYWORD-LIST is a list of keywords to highlight with `font-lock-keyword-face'. Each keyword should be a string. FONT-LOCK-LIST is a list of additional expressions to highlight. -Each entry in the list should have the same form as an entry in -`font-lock-keywords'. +Each element of this list should have the same form as an element +of `font-lock-keywords'. AUTO-MODE-LIST is a list of regular expressions to add to -`auto-mode-alist'. These regexps are added to `auto-mode-alist' -as soon as `define-generic-mode' is called. +`auto-mode-alist'. These regular expressions are added when +Emacs runs the macro expansion. FUNCTION-LIST is a list of functions to call to do some -additional setup. +additional setup. The mode command calls these functions just +before it runs the mode hook. -The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and -values. They will be passed to the generated `defcustom' form of -the mode hook variable MODE-hook. Defaults to MODE without the -possible trailing \"-mode\". (This default may not be a valid -customization group defined with `defgroup'. Make sure it is.) -You can specify keyword arguments without specifying a docstring. +The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and values +to include in the generated `defcustom' form for the mode hook +variable `MODE-hook'. The default value for the `:group' keyword +is MODE with the final \"-mode\" (if any) removed. (Don't use +this default group name unless you have written a `defgroup' to +define that group properly.) You can specify keyword arguments +without specifying a docstring. See the file generic-x.el for some examples of `define-generic-mode'." (declare (debug (sexp def-form def-form def-form form def-form @@ -178,7 +180,7 @@ (unless (plist-get custom-keyword-args :group) (setq custom-keyword-args - (plist-put custom-keyword-args + (plist-put custom-keyword-args :group `',(intern (replace-regexp-in-string "-mode\\'" "" name))))) @@ -226,7 +228,7 @@ (when keyword-list (push (concat "\\_<" (regexp-opt keyword-list t) "\\_>") generic-font-lock-keywords)) - (setq font-lock-defaults '(generic-font-lock-keywords nil)) + (setq font-lock-defaults '(generic-font-lock-keywords)) ;; Call a list of functions (mapcar 'funcall function-list)
--- a/lisp/emulation/cua-base.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/emulation/cua-base.el Thu May 05 00:04:55 2005 +0000 @@ -1397,10 +1397,11 @@ ;;;###autoload '(error (concat "\n\n" ;;;###autoload "CUA-mode is now part of the standard GNU Emacs distribution,\n" ;;;###autoload "so you may now enable and customize CUA via the Options menu.\n\n" -;;;###autoload "Your " (file-name-nondirectory user-init-file) " loads an older version of CUA-mode which does\n" -;;;###autoload "not work correctly with this version of GNU Emacs.\n" +;;;###autoload "You have loaded an older version of CUA-mode which does\n" +;;;###autoload "not work correctly with this version of GNU Emacs.\n\n" +;;;###autoload (if user-init-file (concat ;;;###autoload "To correct this, remove the loading and customization of the\n" -;;;###autoload "old version from the " user-init-file " file.\n\n"))) +;;;###autoload "old version from the " user-init-file " file.\n\n"))))) (provide 'cua)
--- a/lisp/files.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/files.el Thu May 05 00:04:55 2005 +0000 @@ -286,30 +286,30 @@ :type '(choice (const :tag "When visiting" visit) (const :tag "When saving" t) (const :tag "When visiting or saving" visit-save) - (const :tag "Never" nil) - (other :tag "Ask" ask)) + (const :tag "Don't add newlines" nil) + (other :tag "Ask each time" ask)) :group 'editing-basics) (defcustom mode-require-final-newline t "*Whether to add a newline at end of file, in certain major modes. Those modes set `require-final-newline' to this value when you enable them. -They do so because they are used for files that are supposed +They do so because they are often used for files that are supposed to end in newlines, and the question is how to arrange that. A value of t means do this only when the file is about to be saved. A value of `visit' means do this right after the file is visited. A value of `visit-save' means do it at both of those times. Any other non-nil value means ask user whether to add a newline, when saving. -nil means don't add newlines. - -You will have to be careful if you set this to nil: you will have -to remember to manually add a final newline whenever you finish a -file that really needs one." + +nil means do not add newlines. That is a risky choice in this variable +since this value is used for modes for files that ought to have final newlines. +So if you set this to nil, you must explicitly check and add +a final newline, whenever you save a file that really needs one." :type '(choice (const :tag "When visiting" visit) (const :tag "When saving" t) (const :tag "When visiting or saving" visit-save) - (const :tag "Never" nil) - (other :tag "Ask" ask)) + (const :tag "Don't add newlines" nil) + (other :tag "Ask each time" ask)) :group 'editing-basics :version "22.1") @@ -529,8 +529,8 @@ Value is not expanded---you must call `expand-file-name' yourself. Default name to DEFAULT-DIRNAME if user exits with the same non-empty string that was inserted by this function. - (If DEFAULT-DIRNAME is omitted, the current buffer's directory is used, - except that if INITIAL is specified, that combined with DIR is used.) + (If DEFAULT-DIRNAME is omitted, DIR combined with INITIAL is used, + or just DIR if INITIAL is nil.) If the user exits with an empty minibuffer, this function returns an empty string. (This can only happen if the user erased the pre-inserted contents or if `insert-default-directory' is nil.) @@ -544,7 +544,10 @@ (unless default-dirname (setq default-dirname (if initial (concat dir initial) default-directory))) - (read-file-name prompt dir default-dirname mustmatch initial + (read-file-name prompt dir (or default-dirname + (if initial (expand-file-name initial dir) + dir)) + mustmatch initial 'file-directory-p)) @@ -940,12 +943,13 @@ Recursive uses of the minibuffer will not be affected." (declare (indent 1) (debug t)) (let ((hook (make-symbol "setup-hook"))) - `(let ((,hook - (lambda () - ;; Clear out this hook so it does not interfere - ;; with any recursive minibuffer usage. - (remove-hook 'minibuffer-setup-hook ,hook) - (,fun)))) + `(let (,hook) + (setq ,hook + (lambda () + ;; Clear out this hook so it does not interfere + ;; with any recursive minibuffer usage. + (remove-hook 'minibuffer-setup-hook ,hook) + (,fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook ,hook) @@ -1973,8 +1977,13 @@ ("%![^V]" . ps-mode) ("# xmcd " . conf-unix-mode)) "Alist of buffer beginnings vs. corresponding major mode functions. -Each element looks like (REGEXP . FUNCTION). FUNCTION will be -called, unless it is nil (to allow `auto-mode-alist' to override).") +Each element looks like (REGEXP . FUNCTION). After visiting a file, +if REGEXP matches the text at the beginning of the buffer, +`normal-mode' will call FUNCTION rather than allowing `auto-mode-alist' +to decide the buffer's major mode. + +If FUNCTION is nil, then it is not called. (That is a way of saying +\"allow `auto-mode-alist' to decide for these files.") (defun set-auto-mode (&optional keep-mode-if-same) "Select major mode appropriate for current buffer. @@ -2740,15 +2749,26 @@ (file-error nil)))))) (defun backup-buffer-copy (from-name to-name modes) - (condition-case () - (copy-file from-name to-name t t) - (file-error - ;; If copying fails because file TO-NAME - ;; is not writable, delete that file and try again. - (if (and (file-exists-p to-name) - (not (file-writable-p to-name))) - (delete-file to-name)) - (copy-file from-name to-name t t))) + (let ((umask (default-file-modes))) + (unwind-protect + (progn + ;; Create temp files with strict access rights. It's easy to + ;; loosen them later, whereas it's impossible to close the + ;; time-window of loose permissions otherwise. + (set-default-file-modes ?\700) + (while (condition-case () + (progn + (condition-case nil + (delete-file to-name) + (file-error nil)) + (copy-file from-name to-name t t 'excl) + nil) + (file-already-exists t)) + ;; The file was somehow created by someone else between + ;; `delete-file' and `copy-file', so let's try again. + nil)) + ;; Reset the umask. + (set-default-file-modes umask))) (and modes (set-file-modes to-name (logand modes #o1777)))) @@ -3331,39 +3351,41 @@ ;; This requires write access to the containing dir, ;; which is why we don't try it if we don't have that access. (let ((realname buffer-file-name) - tempname nogood i succeed + tempname succeed + (umask (default-file-modes)) (old-modtime (visited-file-modtime))) - (setq i 0) - (setq nogood t) - ;; Find the temporary name to write under. - (while nogood - (setq tempname (format - (if (and (eq system-type 'ms-dos) - (not (msdos-long-file-names))) - "%s#%d.tm#" ; MSDOS limits files to 8+3 - (if (memq system-type '(vax-vms axp-vms)) - "%s$tmp$%d" - "%s#tmp#%d")) - dir i)) - (setq nogood (file-exists-p tempname)) - (setq i (1+ i))) + ;; Create temp files with strict access rights. It's easy to + ;; loosen them later, whereas it's impossible to close the + ;; time-window of loose permissions otherwise. (unwind-protect - (progn (clear-visited-file-modtime) - (write-region (point-min) (point-max) - tempname nil realname - buffer-file-truename) - (setq succeed t)) - ;; If writing the temp file fails, - ;; delete the temp file. - (or succeed - (progn - (condition-case nil - (delete-file tempname) - (file-error nil)) - (set-visited-file-modtime old-modtime)))) - ;; Since we have created an entirely new file - ;; and renamed it, make sure it gets the - ;; right permission bits set. + (progn + (clear-visited-file-modtime) + (set-default-file-modes ?\700) + ;; Try various temporary names. + ;; This code follows the example of make-temp-file, + ;; but it calls write-region in the appropriate way + ;; for saving the buffer. + (while (condition-case () + (progn + (setq tempname + (make-temp-name + (expand-file-name "tmp" dir))) + (write-region (point-min) (point-max) + tempname nil realname + buffer-file-truename 'excl) + nil) + (file-already-exists t)) + ;; The file was somehow created by someone else between + ;; `make-temp-name' and `write-region', let's try again. + nil) + (setq succeed t)) + ;; Reset the umask. + (set-default-file-modes umask) + ;; If we failed, restore the buffer's modtime. + (unless succeed + (set-visited-file-modtime old-modtime))) + ;; Since we have created an entirely new file, + ;; make sure it gets the right permission bits set. (setq setmodes (or setmodes (cons (file-modes buffer-file-name) buffer-file-name))) ;; We succeeded in writing the temp file, @@ -3649,7 +3671,7 @@ (defvar buffer-stale-function nil "Function to check whether a non-file buffer needs reverting. This should be a function with one optional argument NOCONFIRM. -Auto Revert Mode sets NOCONFIRM to t. The function should return +Auto Revert Mode passes t for NOCONFIRM. The function should return non-nil if the buffer should be reverted. A return value of `fast' means that the need for reverting was not checked, but that reverting the buffer is fast. The buffer is current when @@ -3718,91 +3740,93 @@ (interactive (list (not current-prefix-arg))) (if revert-buffer-function (funcall revert-buffer-function ignore-auto noconfirm) - (let* ((auto-save-p (and (not ignore-auto) - (recent-auto-save-p) - buffer-auto-save-file-name - (file-readable-p buffer-auto-save-file-name) - (y-or-n-p - "Buffer has been auto-saved recently. Revert from auto-save file? "))) - (file-name (if auto-save-p - buffer-auto-save-file-name - buffer-file-name))) - (cond ((null file-name) - (error "Buffer does not seem to be associated with any file")) - ((or noconfirm - (and (not (buffer-modified-p)) - (let ((tail revert-without-query) - (found nil)) - (while tail - (if (string-match (car tail) file-name) - (setq found t)) - (setq tail (cdr tail))) - found)) - (yes-or-no-p (format "Revert buffer from file %s? " - file-name))) - (run-hooks 'before-revert-hook) - ;; If file was backed up but has changed since, - ;; we shd make another backup. - (and (not auto-save-p) - (not (verify-visited-file-modtime (current-buffer))) - (setq buffer-backed-up nil)) - ;; Get rid of all undo records for this buffer. - (or (eq buffer-undo-list t) - (setq buffer-undo-list nil)) - ;; Effectively copy the after-revert-hook status, - ;; since after-find-file will clobber it. - (let ((global-hook (default-value 'after-revert-hook)) - (local-hook-p (local-variable-p 'after-revert-hook)) - (local-hook (and (local-variable-p 'after-revert-hook) - after-revert-hook))) - (let (buffer-read-only - ;; Don't make undo records for the reversion. - (buffer-undo-list t)) - (if revert-buffer-insert-file-contents-function - (funcall revert-buffer-insert-file-contents-function - file-name auto-save-p) - (if (not (file-exists-p file-name)) - (error (if buffer-file-number - "File %s no longer exists!" - "Cannot revert nonexistent file %s") - file-name)) - ;; Bind buffer-file-name to nil - ;; so that we don't try to lock the file. - (let ((buffer-file-name nil)) - (or auto-save-p - (unlock-buffer))) - (widen) - (let ((coding-system-for-read - ;; Auto-saved file shoule be read by Emacs' - ;; internal coding. - (if auto-save-p 'auto-save-coding - (or coding-system-for-read - buffer-file-coding-system-explicit)))) - ;; This force after-insert-file-set-coding - ;; (called from insert-file-contents) to set - ;; buffer-file-coding-system to a proper value. - (kill-local-variable 'buffer-file-coding-system) - - ;; Note that this preserves point in an intelligent way. - (if preserve-modes - (let ((buffer-file-format buffer-file-format)) - (insert-file-contents file-name (not auto-save-p) - nil nil t)) - (insert-file-contents file-name (not auto-save-p) - nil nil t))))) - ;; Recompute the truename in case changes in symlinks - ;; have changed the truename. - (setq buffer-file-truename - (abbreviate-file-name (file-truename buffer-file-name))) - (after-find-file nil nil t t preserve-modes) - ;; Run after-revert-hook as it was before we reverted. - (setq-default revert-buffer-internal-hook global-hook) - (if local-hook-p - (set (make-local-variable 'revert-buffer-internal-hook) - local-hook) - (kill-local-variable 'revert-buffer-internal-hook)) - (run-hooks 'revert-buffer-internal-hook)) - t))))) + (with-current-buffer (or (buffer-base-buffer (current-buffer)) + (current-buffer)) + (let* ((auto-save-p (and (not ignore-auto) + (recent-auto-save-p) + buffer-auto-save-file-name + (file-readable-p buffer-auto-save-file-name) + (y-or-n-p + "Buffer has been auto-saved recently. Revert from auto-save file? "))) + (file-name (if auto-save-p + buffer-auto-save-file-name + buffer-file-name))) + (cond ((null file-name) + (error "Buffer does not seem to be associated with any file")) + ((or noconfirm + (and (not (buffer-modified-p)) + (let ((tail revert-without-query) + (found nil)) + (while tail + (if (string-match (car tail) file-name) + (setq found t)) + (setq tail (cdr tail))) + found)) + (yes-or-no-p (format "Revert buffer from file %s? " + file-name))) + (run-hooks 'before-revert-hook) + ;; If file was backed up but has changed since, + ;; we shd make another backup. + (and (not auto-save-p) + (not (verify-visited-file-modtime (current-buffer))) + (setq buffer-backed-up nil)) + ;; Get rid of all undo records for this buffer. + (or (eq buffer-undo-list t) + (setq buffer-undo-list nil)) + ;; Effectively copy the after-revert-hook status, + ;; since after-find-file will clobber it. + (let ((global-hook (default-value 'after-revert-hook)) + (local-hook-p (local-variable-p 'after-revert-hook)) + (local-hook (and (local-variable-p 'after-revert-hook) + after-revert-hook))) + (let (buffer-read-only + ;; Don't make undo records for the reversion. + (buffer-undo-list t)) + (if revert-buffer-insert-file-contents-function + (funcall revert-buffer-insert-file-contents-function + file-name auto-save-p) + (if (not (file-exists-p file-name)) + (error (if buffer-file-number + "File %s no longer exists!" + "Cannot revert nonexistent file %s") + file-name)) + ;; Bind buffer-file-name to nil + ;; so that we don't try to lock the file. + (let ((buffer-file-name nil)) + (or auto-save-p + (unlock-buffer))) + (widen) + (let ((coding-system-for-read + ;; Auto-saved file shoule be read by Emacs' + ;; internal coding. + (if auto-save-p 'auto-save-coding + (or coding-system-for-read + buffer-file-coding-system-explicit)))) + ;; This force after-insert-file-set-coding + ;; (called from insert-file-contents) to set + ;; buffer-file-coding-system to a proper value. + (kill-local-variable 'buffer-file-coding-system) + + ;; Note that this preserves point in an intelligent way. + (if preserve-modes + (let ((buffer-file-format buffer-file-format)) + (insert-file-contents file-name (not auto-save-p) + nil nil t)) + (insert-file-contents file-name (not auto-save-p) + nil nil t))))) + ;; Recompute the truename in case changes in symlinks + ;; have changed the truename. + (setq buffer-file-truename + (abbreviate-file-name (file-truename buffer-file-name))) + (after-find-file nil nil t t preserve-modes) + ;; Run after-revert-hook as it was before we reverted. + (setq-default revert-buffer-internal-hook global-hook) + (if local-hook-p + (set (make-local-variable 'revert-buffer-internal-hook) + local-hook) + (kill-local-variable 'revert-buffer-internal-hook)) + (run-hooks 'revert-buffer-internal-hook)) + t)))))) (defun recover-this-file () "Recover the visited file--get contents from its last auto-save file."
--- a/lisp/follow.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/follow.el Thu May 05 00:04:55 2005 +0000 @@ -980,7 +980,8 @@ (t (select-window (car (reverse followers))))) (goto-char pos) - (end-of-buffer arg))) + (with-no-warnings + (end-of-buffer arg)))) ;;}}}
--- a/lisp/font-core.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/font-core.el Thu May 05 00:04:55 2005 +0000 @@ -32,7 +32,7 @@ "Defaults for Font Lock mode specified by the major mode. Defaults should be of the form: - (KEYWORDS KEYWORDS-ONLY CASE-FOLD SYNTAX-ALIST SYNTAX-BEGIN ...) + (KEYWORDS [KEYWORDS-ONLY [CASE-FOLD [SYNTAX-ALIST [SYNTAX-BEGIN ...]]]]) KEYWORDS may be a symbol (a variable or function whose value is the keywords to use for fontification) or a list of symbols. If KEYWORDS-ONLY is non-nil, @@ -66,11 +66,10 @@ around a text block relevant to that mode). Other variables include that for syntactic keyword fontification, -`font-lock-syntactic-keywords' -and those for buffer-specialized fontification functions, -`font-lock-fontify-buffer-function', `font-lock-unfontify-buffer-function', -`font-lock-fontify-region-function', `font-lock-unfontify-region-function', -`font-lock-inhibit-thing-lock' and `font-lock-maximum-size'.") +`font-lock-syntactic-keywords' and those for buffer-specialized fontification +functions, `font-lock-fontify-buffer-function', +`font-lock-unfontify-buffer-function', `font-lock-fontify-region-function', +`font-lock-unfontify-region-function', and `font-lock-inhibit-thing-lock'.") (make-variable-buffer-local 'font-lock-defaults) (defvar font-lock-defaults-alist nil
--- a/lisp/font-lock.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/font-lock.el Thu May 05 00:04:55 2005 +0000 @@ -309,6 +309,9 @@ (defvar font-lock-comment-face 'font-lock-comment-face "Face name to use for comments.") +(defvar font-lock-comment-delimiter-face 'font-lock-comment-delimiter-face + "Face name to use for comment delimiters.") + (defvar font-lock-string-face 'font-lock-string-face "Face name to use for strings.") @@ -463,12 +466,12 @@ optimized.") (defvar font-lock-keywords-alist nil - "*Alist of `font-lock-keywords' local to a `major-mode'. + "Alist of `font-lock-keywords' local to a `major-mode'. This is normally set via `font-lock-add-keywords' and `font-lock-remove-keywords'.") (defvar font-lock-removed-keywords-alist nil - "*Alist of `font-lock-keywords' removed from `major-mode'. + "Alist of `font-lock-keywords' removed from `major-mode'. This is normally set via `font-lock-add-keywords' and `font-lock-remove-keywords'.") @@ -493,7 +496,7 @@ "Function to determine which face to use when fontifying syntactically. The function is called with a single parameter (the state as returned by `parse-partial-sexp' at the beginning of the region to highlight) and -should return a face.") +should return a face. This is normally set via `font-lock-defaults'.") (defvar font-lock-syntactic-keywords nil "A list of the syntactic keywords to highlight. @@ -565,8 +568,8 @@ (defvar font-lock-fontify-region-function 'font-lock-default-fontify-region "Function to use for fontifying a region. It should take two args, the beginning and end of the region, and an optional -third arg VERBOSE. If non-nil, the function should print status messages. -This is normally set via `font-lock-defaults'.") +third arg VERBOSE. If VERBOSE is non-nil, the function should print status +messages. This is normally set via `font-lock-defaults'.") (defvar font-lock-unfontify-region-function 'font-lock-default-unfontify-region "Function to use for unfontifying a region. @@ -643,6 +646,7 @@ ;;;###autoload (defun font-lock-add-keywords (mode keywords &optional append) "Add highlighting KEYWORDS for MODE. + MODE should be a symbol, the major mode command name, such as `c-mode' or nil. If nil, highlighting keywords are added for the current buffer. KEYWORDS should be a list; see the variable `font-lock-keywords'. @@ -660,9 +664,9 @@ adds two fontification patterns for C mode, to fontify `FIXME:' words, even in comments, and to fontify `and', `or' and `not' words as keywords. -When used from an elisp package (such as a minor mode), it is recommended -to use nil for MODE (and place the call in a loop or on a hook) to avoid -subtle problems due to details of the implementation. +When used from a Lisp program (such as a minor mode), it is recommended to +use nil for MODE (and place the call on a hook) to avoid subtle problems +due to details of the implementation. Note that some modes have specialized support for additional patterns, e.g., see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types', @@ -703,9 +707,7 @@ (font-lock-compile-keywords font-lock-keywords t))))))) (defun font-lock-update-removed-keyword-alist (mode keywords append) - ;; Update `font-lock-removed-keywords-alist' when adding new - ;; KEYWORDS to MODE. - ;; + "Update `font-lock-removed-keywords-alist' when adding new KEYWORDS to MODE." ;; When font-lock is enabled first all keywords in the list ;; `font-lock-keywords-alist' are added, then all keywords in the ;; list `font-lock-removed-keywords-alist' are removed. If a @@ -753,9 +755,9 @@ MODE should be a symbol, the major mode command name, such as `c-mode' or nil. If nil, highlighting keywords are removed for the current buffer. -When used from an elisp package (such as a minor mode), it is recommended -to use nil for MODE (and place the call in a loop or on a hook) to avoid -subtle problems due to details of the implementation." +When used from a Lisp program (such as a minor mode), it is recommended to +use nil for MODE (and place the call on a hook) to avoid subtle problems +due to details of the implementation." (cond (mode ;; Remove one keyword at the time. (dolist (keyword keywords) @@ -1004,7 +1006,8 @@ (defun font-lock-default-fontify-region (beg end loudly) (save-buffer-state - ((parse-sexp-lookup-properties font-lock-syntactic-keywords) + ((parse-sexp-lookup-properties + (or parse-sexp-lookup-properties font-lock-syntactic-keywords)) (old-syntax-table (syntax-table))) (unwind-protect (save-restriction @@ -1615,7 +1618,7 @@ ;; But now we do it the custom way. Note that `defface' will not overwrite any ;; faces declared above via `custom-declare-face'. -(defface font-lock-comment-face +(defface font-lock-comment-delimiter-face '((((class grayscale) (background light)) (:foreground "DimGray" :weight bold :slant italic)) (((class grayscale) (background dark)) @@ -1633,6 +1636,27 @@ (((class color) (min-colors 8) (background dark)) (:foreground "red1")) (t (:weight bold :slant italic))) + "Font Lock mode face used to highlight comment delimiters." + :group 'font-lock-highlighting-faces) + +(defface font-lock-comment-face + '((((class grayscale) (background light)) + (:foreground "DimGray" :weight bold :slant italic)) + (((class grayscale) (background dark)) + (:foreground "LightGray" :weight bold :slant italic)) + (((class color) (min-colors 88) (background light)) + (:foreground "Firebrick")) + (((class color) (min-colors 88) (background dark)) + (:foreground "chocolate1")) + (((class color) (min-colors 16) (background light)) + (:foreground "red")) + (((class color) (min-colors 16) (background dark)) + (:foreground "red1")) + (((class color) (min-colors 8) (background light)) + ) + (((class color) (min-colors 8) (background dark)) + ) + (t (:weight bold :slant italic))) "Font Lock mode face used to highlight comments." :group 'font-lock-highlighting-faces)
--- a/lisp/generic-x.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/generic-x.el Thu May 05 00:04:55 2005 +0000 @@ -1,4 +1,4 @@ -;;; generic-x.el --- Extra Modes for generic-mode +;;; generic-x.el --- A collection of generic modes ;; Copyright (C) 1997, 1998, 2003, 2005 Free Software Foundation, Inc. @@ -25,7 +25,7 @@ ;;; Commentary: ;; -;; This file contains some pre-defined generic-modes. +;; This file contains a collection generic modes. ;; ;; INSTALLATION: ;; @@ -34,12 +34,18 @@ ;; (require 'generic-x) ;; ;; You can decide which modes to load by setting the variable -;; `generic-extras-enable-list'. Some platform-specific modes are -;; affected by the variables `generic-define-mswindows-modes' and -;; `generic-define-unix-modes' (which see). +;; `generic-extras-enable-list'. Its default value is platform- +;; specific. The recommended way to set this variable is through +;; customize: +;; +;; M-x customize-option RET generic-extras-enable-list RET ;; -;; You can also send in new modes; if the file types a reasonably common, -;; we would like to install them. +;; This lets you select generic modes from the list of available +;; modes. If you manually set `generic-extras-enable-list' in your +;; .emacs, do it BEFORE loading generic-x with (require 'generic-x). +;; +;; You can also send in new modes; if the file types are reasonably +;; common, we would like to install them. ;; ;; DEFAULT GENERIC MODE: ;; @@ -54,13 +60,13 @@ ;; PROBLEMS WHEN USED WITH FOLDING MODE: ;; ;; [The following relates to the obsolete selective-display technique. -;; Folding mode should use invisible text properties instead. -- Dave +;; Folding mode should use invisible text properties instead. -- Dave ;; Love] ;; ;; From Anders Lindgren <andersl@csd.uu.se> ;; ;; Problem summary: Wayne Adams has found a problem when using folding -;; mode in conjuction with font-lock for a mode defined in +;; mode in conjunction with font-lock for a mode defined in ;; `generic-x.el'. ;; ;; The problem, as Wayne described it, was that error messages of the @@ -69,18 +75,18 @@ ;; > - various msgs including "Fontifying region...(error Stack ;; > overflow in regexp matcher)" appear ;; -;; I have just tracked down the cause of the problem. The regexp:s in -;; `generic-x.el' does not take into account the way that folding -;; hides sections of the buffer. The technique is known as +;; I have just tracked down the cause of the problem. The regexp's in +;; `generic-x.el' do not take into account the way that folding hides +;; sections of the buffer. The technique is known as ;; `selective-display' and has been available for a very long time (I -;; started using it back in the good old' Emacs 18 days). Basically, a +;; started using it back in the good old Emacs 18 days). Basically, a ;; section is hidden by creating one very long line were the newline ;; character (C-j) is replaced by a linefeed (C-m) character. ;; ;; Many other hiding packages, besides folding, use the same technique, ;; the problem should occur when using them as well. ;; -;; The erroronous lines in `generic-extras' look like the following (this +;; The erroneous lines in `generic-x.el' look like the following (this ;; example is from the `ini' section): ;; ;; '(("^\\(\\[.*\\]\\)" 1 'font-lock-constant-face) @@ -92,17 +98,17 @@ ;; [foo] ;; bar = xxx ;; -;; However, since the `.' regexp symbol match the linefeed character the -;; entire folded section is searched, resulting in a regexp stack +;; However, since the `.' regexp symbol matches the linefeed character +;; the entire folded section is searched, resulting in a regexp stack ;; overflow. ;; -;; Solution suggestion 2: Instead of using ".", use the sequence -;; "[^\n\r]". This will make the rules behave just as before, but they -;; will work together with selective-display. +;; Solution suggestion: Instead of using ".", use the sequence +;; "[^\n\r]". This will make the rules behave just as before, but +;; they will work together with selective-display. ;;; Code: -(require 'font-lock) +(eval-when-compile (require 'font-lock)) (defgroup generic-x nil "A collection of generic modes." @@ -110,6 +116,11 @@ :group 'data :version "20.3") +(defgroup generic-x-modes nil + "Individual modes in the collection of generic modes." + :group 'generic-x + :version "22.1") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Default-Generic mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -147,7 +158,7 @@ :type '(choice (const :tag "Don't check file names" nil) regexp)) ;; This generic mode is always defined -(define-generic-mode default-generic-mode (list ?#) nil nil nil nil :group 'generic) +(define-generic-mode default-generic-mode (list ?#) nil nil nil nil :group 'generic-x-modes) ;; A more general solution would allow us to enter generic-mode for ;; *any* comment character, but would require us to synthesize a new @@ -185,55 +196,101 @@ ;; Other Generic modes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defcustom generic-extras-enable-list nil - "*List of generic modes to enable by default. -Each entry in the list should be a symbol. The variables -`generic-define-mswindows-modes' and `generic-define-unix-modes' -also affect which generic modes are defined. Please note that if -you set this variable after generic-x is loaded, you must reload -generic-x to enable the specified modes." - :group 'generic-x - :type '(repeat sexp)) +;; If you add a generic mode to this file, put it in one of these four +;; lists as well. + +(defconst generic-default-modes + '(apache-conf-generic-mode + apache-log-generic-mode + hosts-generic-mode + java-manifest-generic-mode + java-properties-generic-mode + javascript-generic-mode + show-tabs-generic-mode + vrml-generic-mode) + "List of generic modes that are defined by default.") + +(defconst generic-mswindows-modes + '(bat-generic-mode + inf-generic-mode + ini-generic-mode + rc-generic-mode + reg-generic-mode + rul-generic-mode) + "List of generic modes that are defined by default on MS-Windows.") + +(defconst generic-unix-modes + '(alias-generic-mode + etc-fstab-generic-mode + etc-modules-conf-generic-mode + etc-passwd-generic-mode + etc-services-generic-mode + fvwm-generic-mode + inetd-conf-generic-mode + mailagent-rules-generic-mode + mailrc-generic-mode + named-boot-generic-mode + named-database-generic-mode + prototype-generic-mode + resolve-conf-generic-mode + samba-generic-mode + x-resource-generic-mode) + "List of generic modes that are defined by default on Unix.") + +(defconst generic-other-modes + '(astap-generic-mode + ibis-generic-mode + pkginfo-generic-mode + spice-generic-mode) + "List of generic mode that are not defined by default.") (defcustom generic-define-mswindows-modes (memq system-type '(windows-nt ms-dos)) - "*If non-nil, some MS-Windows specific generic modes will be defined." + "*Non-nil means the modes in `generic-mswindows-modes' will be defined. +This is a list of MS-Windows specific generic modes. This variable +only effects the default value of `generic-extras-enable-list'." :group 'generic-x - :type 'boolean) + :type 'boolean + :version "22.1") +(make-obsolete-variable 'generic-define-mswindows-modes 'generic-extras-enable-list "22.1") (defcustom generic-define-unix-modes (not (memq system-type '(windows-nt ms-dos))) - "*If non-nil, some Unix specific generic modes will be defined." + "*Non-nil means the modes in `generic-unix-modes' will be defined. +This is a list of Unix specific generic modes. This variable only +effects the default value of `generic-extras-enable-list'." :group 'generic-x - :type 'boolean) + :type 'boolean + :version "22.1") +(make-obsolete-variable 'generic-define-unix-modes 'generic-extras-enable-list "22.1") -(and generic-define-mswindows-modes - (setq generic-extras-enable-list - (append '(bat-generic-mode - ini-generic-mode - inf-generic-mode - rc-generic-mode - reg-generic-mode - rul-generic-mode - hosts-generic-mode - apache-conf-generic-mode - apache-log-generic-mode) - generic-extras-enable-list))) - -(and generic-define-unix-modes - (setq generic-extras-enable-list - (append '(apache-conf-generic-mode - apache-log-generic-mode - samba-generic-mode - hosts-generic-mode - fvwm-generic-mode - x-resource-generic-mode - alias-generic-mode - inetd-conf-generic-mode - etc-services-generic-mode - etc-passwd-generic-mode - etc-fstab-generic-mode) - generic-extras-enable-list))) +(defcustom generic-extras-enable-list + (append generic-default-modes + (if generic-define-mswindows-modes generic-mswindows-modes) + (if generic-define-unix-modes generic-unix-modes) + nil) + "List of generic modes to define. +Each entry in the list should be a symbol. If you set this variable +directly, without using customize, you must reload generic-x to put +your changes into effect." + :group 'generic-x + :type (let (list) + (dolist (mode + (sort (append generic-default-modes + generic-mswindows-modes + generic-unix-modes + generic-other-modes + nil) + (lambda (a b) + (string< (symbol-name b) + (symbol-name a)))) + (cons 'set list)) + (push `(const ,mode) list))) + :set (lambda (s v) + (set-default s v) + (unless load-in-progress + (load "generic-x"))) + :version "22.1") ;;; Apache (when (memq 'apache-conf-generic-mode generic-extras-enable-list) @@ -252,7 +309,7 @@ ("*Directories*" "^\\s-*<Directory\\s-*\\([^>]+\\)>" 1) ("*Locations*" "^\\s-*<Location\\s-*\\([^>]+\\)>" 1)))))) "Generic mode for Apache or HTTPD configuration files." - :group 'generic-x)) + :group 'generic-x-modes)) (when (memq 'apache-log-generic-mode generic-extras-enable-list) @@ -266,7 +323,7 @@ '("access_log\\'") nil "Mode for Apache log files" - :group 'generic-x)) + :group 'generic-x-modes)) ;;; Samba (when (memq 'samba-generic-mode generic-extras-enable-list) @@ -281,7 +338,7 @@ '("smb\\.conf\\'") '(generic-bracket-support) "Generic mode for Samba configuration files." - :group 'generic-x)) + :group 'generic-x-modes)) ;;; Fvwm ;; This is pretty basic. Also, modes for other window managers could @@ -307,7 +364,7 @@ '("\\.fvwmrc\\'" "\\.fvwm2rc\\'") nil "Generic mode for FVWM configuration files." - :group 'generic-x)) + :group 'generic-x-modes)) ;;; X Resource ;; I'm pretty sure I've seen an actual mode to do this, but I don't @@ -321,7 +378,7 @@ '("\\.Xdefaults\\'" "\\.Xresources\\'" "\\.Xenvironment\\'" "\\.ad\\'") nil "Generic mode for X Resource configuration files." - :group 'generic-x)) + :group 'generic-x-modes)) ;;; Hosts (when (memq 'hosts-generic-mode generic-extras-enable-list) @@ -333,7 +390,7 @@ '("[hH][oO][sS][tT][sS]\\'") nil "Generic mode for HOSTS files." - :group 'generic-x)) + :group 'generic-x-modes)) ;;; Windows INF files (when (memq 'inf-generic-mode generic-extras-enable-list) @@ -345,7 +402,7 @@ '("\\.[iI][nN][fF]\\'") '(generic-bracket-support) "Generic mode for MS-Windows INF files." - :group 'generic-x)) + :group 'generic-x-modes)) ;;; Windows INI files ;; Should define escape character as well! @@ -368,7 +425,7 @@ "Generic mode for MS-Windows INI files. You can use `ini-generic-mode-find-file-hook' to enter this mode automatically for INI files whose names do not end in \".ini\"." - :group 'generic-x) + :group 'generic-x-modes) (defun ini-generic-mode-find-file-hook () "Hook function to enter Ini-Generic mode automatically for INI files. @@ -397,7 +454,7 @@ (setq imenu-generic-expression '((nil "^\\s-*\\(.*\\)\\s-*=" 1)))))) "Generic mode for MS-Windows Registry files." - :group 'generic-x)) + :group 'generic-x-modes)) ;;; DOS/Windows BAT files (when (memq 'bat-generic-mode generic-extras-enable-list) @@ -472,10 +529,10 @@ "\\`[aA][uU][tT][oO][eE][xX][eE][cC]\\.") '(generic-bat-mode-setup-function) "Generic mode for MS-Windows BAT files." - :group 'generic-x) + :group 'generic-x-modes) (defvar bat-generic-mode-syntax-table nil - "Syntax table in use in bat-generic-mode buffers.") + "Syntax table in use in `bat-generic-mode' buffers.") (defvar bat-generic-mode-keymap (make-sparse-keymap) "Keymap for bet-generic-mode.") @@ -552,7 +609,7 @@ (setq imenu-generic-expression '((nil "\\s-/\\([^/]+\\)/[i, \t\n]" 1)))))) "Mode for Mailagent rules files." - :group 'generic-x)) + :group 'generic-x-modes)) ;; Solaris/Sys V prototype files (when (memq 'prototype-generic-mode generic-extras-enable-list) @@ -576,7 +633,7 @@ '("prototype\\'") nil "Mode for Sys V prototype files." - :group 'generic-x)) + :group 'generic-x-modes)) ;; Solaris/Sys V pkginfo files (when (memq 'pkginfo-generic-mode generic-extras-enable-list) @@ -590,10 +647,12 @@ '("pkginfo\\'") nil "Mode for Sys V pkginfo files." - :group 'generic-x)) + :group 'generic-x-modes)) ;; Javascript mode ;; Includes extra keywords from Armando Singer [asinger@MAIL.COLGATE.EDU] +(when (memq 'javascript-generic-mode generic-extras-enable-list) + (define-generic-mode javascript-generic-mode '("//" ("/*" . "*/")) '("break" @@ -668,9 +727,11 @@ '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1) ("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1)))))) "Mode for JavaScript files." - :group 'generic-x) + :group 'generic-x-modes)) ;; VRML files +(when (memq 'vrml-generic-mode generic-extras-enable-list) + (define-generic-mode vrml-generic-mode '(?#) '("DEF" @@ -720,9 +781,11 @@ "DEF\\s-+\\([-A-Za-z0-9_]+\\)\\s-+\\([A-Za-z0-9]+\\)\\s-*{" 1)))))) "Generic Mode for VRML files." - :group 'generic-x) + :group 'generic-x-modes)) ;; Java Manifests +(when (memq 'java-manifest-generic-mode generic-extras-enable-list) + (define-generic-mode java-manifest-generic-mode '(?#) '("Name" @@ -740,9 +803,11 @@ '("[mM][aA][nN][iI][fF][eE][sS][tT]\\.[mM][fF]\\'") nil "Mode for Java Manifest files" - :group 'generic-x) + :group 'generic-x-modes)) ;; Java properties files +(when (memq 'java-properties-generic-mode generic-extras-enable-list) + (define-generic-mode java-properties-generic-mode '(?! ?#) nil @@ -771,7 +836,7 @@ (setq imenu-generic-expression '((nil "^\\([^#! \t\n\r=:]+\\)" 1)))))) "Mode for Java properties files." - :group 'generic-x) + :group 'generic-x-modes)) ;; C shell alias definitions (when (memq 'alias-generic-mode generic-extras-enable-list) @@ -790,7 +855,7 @@ (setq imenu-generic-expression '((nil "^\\(alias\\|unalias\\)\\s-+\\([-a-zA-Z0-9_]+\\)" 2)))))) "Mode for C Shell alias files." - :group 'generic-x)) + :group 'generic-x-modes)) ;;; Windows RC files ;; Contributed by ACorreir@pervasive-sw.com (Alfred Correira) @@ -883,7 +948,7 @@ '("\\.[rR][cC]\\'") nil "Generic mode for MS-Windows Resource files." - :group 'generic-x)) + :group 'generic-x-modes)) ;; InstallShield RUL files ;; Contributed by Alfred.Correira@Pervasive.Com @@ -1436,7 +1501,7 @@ "Function argument constants used in InstallShield 3 and 5.")) (defvar rul-generic-mode-syntax-table nil - "Syntax table to use in rul-generic-mode buffers.") + "Syntax table to use in `rul-generic-mode' buffers.") (setq rul-generic-mode-syntax-table (make-syntax-table c++-mode-syntax-table)) @@ -1504,7 +1569,7 @@ '("\\.[rR][uU][lL]\\'") '(generic-rul-mode-setup-function) "Generic mode for InstallShield RUL files." - :group 'generic-x) + :group 'generic-x-modes) (define-skeleton rul-if "Insert an if statement." @@ -1531,6 +1596,8 @@ > "end;")) ;; Additions by ACorreir@pervasive-sw.com (Alfred Correira) +(when (memq 'mailrc-generic-mode generic-extras-enable-list) + (define-generic-mode mailrc-generic-mode '(?#) '("alias" @@ -1553,7 +1620,7 @@ '("\\.mailrc\\'") nil "Mode for mailrc files." - :group 'generic-x) + :group 'generic-x-modes)) ;; Inetd.conf (when (memq 'inetd-conf-generic-mode generic-extras-enable-list) @@ -1574,7 +1641,7 @@ (lambda () (setq imenu-generic-expression '((nil "^\\([-A-Za-z0-9_]+\\)" 1)))))) - :group 'generic-x)) + :group 'generic-x-modes)) ;; Services (when (memq 'etc-services-generic-mode generic-extras-enable-list) @@ -1593,7 +1660,7 @@ (lambda () (setq imenu-generic-expression '((nil "^\\([-A-Za-z0-9_]+\\)" 1)))))) - :group 'generic-x)) + :group 'generic-x-modes)) ;; Password and Group files (when (memq 'etc-passwd-generic-mode generic-extras-enable-list) @@ -1636,7 +1703,7 @@ (lambda () (setq imenu-generic-expression '((nil "^\\([-A-Za-z0-9_]+\\):" 1)))))) - :group 'generic-x)) + :group 'generic-x-modes)) ;; Fstab (when (memq 'etc-fstab-generic-mode generic-extras-enable-list) @@ -1687,9 +1754,11 @@ (lambda () (setq imenu-generic-expression '((nil "^\\([/-A-Za-z0-9_]+\\)\\s-+" 1)))))) - :group 'generic-x)) + :group 'generic-x-modes)) ;; From Jacques Duthen <jacques.duthen@sncf.fr> +(when (memq 'show-tabs-generic-mode generic-extras-enable-list) + (eval-when-compile (defconst show-tabs-generic-mode-font-lock-defaults-1 @@ -1711,7 +1780,7 @@ (((class color)) (:background "red")) (t (:weight bold))) "Font Lock mode face used to highlight TABs." - :group 'generic-x) + :group 'generic-x-modes) (defface show-tabs-space-face '((((class grayscale) (background light)) (:background "DimGray" :weight bold)) @@ -1720,7 +1789,7 @@ (((class color)) (:background "yellow")) (t (:weight bold))) "Font Lock mode face used to highlight spaces." - :group 'generic-x) + :group 'generic-x-modes) (define-generic-mode show-tabs-generic-mode nil ;; no comment char @@ -1730,12 +1799,14 @@ ;; '(show-tabs-generic-mode-hook-fun) nil "Generic mode to show tabs and trailing spaces" - :group 'generic-x) + :group 'generic-x-modes)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; DNS modes ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(when (memq 'named-boot-generic-mode generic-extras-enable-list) + (define-generic-mode named-boot-generic-mode ;; List of comment characters '(?\;) @@ -1752,7 +1823,9 @@ '("/etc/named.boot\\'") ;; List of set up functions to call nil - :group 'generic-x) + :group 'generic-x-modes)) + +(when (memq 'named-database-generic-mode generic-extras-enable-list) (define-generic-mode named-database-generic-mode ;; List of comment characters @@ -1766,7 +1839,7 @@ nil ;; List of set up functions to call nil - :group 'generic-x) + :group 'generic-x-modes) (defvar named-database-time-string "%Y%m%d%H" "Timestring for named serial numbers.") @@ -1774,7 +1847,9 @@ (defun named-database-print-serial () "Print a serial number based on the current date." (interactive) - (insert (format-time-string named-database-time-string (current-time)))) + (insert (format-time-string named-database-time-string (current-time))))) + +(when (memq 'resolve-conf-generic-mode generic-extras-enable-list) (define-generic-mode resolve-conf-generic-mode ;; List of comment characters @@ -1787,12 +1862,14 @@ '("/etc/resolv[e]?.conf\\'") ;; List of set up functions to call nil - :group 'generic-x) + :group 'generic-x-modes)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Modes for spice and common electrical engineering circuit netlist formats ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(when (memq 'spice-generic-mode generic-extras-enable-list) + (define-generic-mode spice-generic-mode nil '("and" @@ -1830,7 +1907,9 @@ (lambda() (setq font-lock-defaults '(generic-font-lock-keywords nil t))))) "Generic mode for SPICE circuit netlist files." - :group 'generic-x) + :group 'generic-x-modes)) + +(when (memq 'ibis-generic-mode generic-extras-enable-list) (define-generic-mode ibis-generic-mode '(?|) @@ -1840,7 +1919,9 @@ '("\\.[iI][bB][sS]\\'") '(generic-bracket-support) "Generic mode for IBIS circuit netlist files." - :group 'generic-x) + :group 'generic-x-modes)) + +(when (memq 'astap-generic-mode generic-extras-enable-list) (define-generic-mode astap-generic-mode nil @@ -1876,7 +1957,9 @@ (lambda() (setq font-lock-defaults '(generic-font-lock-keywords nil t))))) "Generic mode for ASTAP circuit netlist files." - :group 'generic-x) + :group 'generic-x-modes)) + +(when (memq 'etc-modules-conf-generic-mode generic-extras-enable-list) (define-generic-mode etc-modules-conf-generic-mode ;; List of comment characters @@ -1919,7 +2002,7 @@ '("/etc/modules.conf" "/etc/conf.modules") ;; List of set up functions to call nil - :group 'generic-x) + :group 'generic-x-modes)) (provide 'generic-x)
--- a/lisp/gnus/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/gnus/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,24 @@ +2005-04-24 Teodor Zlatanov <tzz@lifelogs.com> + + * spam-report.el (spam-report-unplug-agent) + (spam-report-plug-agent, spam-report-deagentize) + (spam-report-agentize, spam-report-url-ping-temp-agent-function): + support for the Agent in spam-report: when unplugged, report to a + file; when plugged, submit all the requests. + [Added missing offline functionality from trunk.] + +2005-04-24 Reiner Steib <Reiner.Steib@gmx.de> + + * spam-report.el (spam-report-url-to-file) + (spam-report-requests-file): New function and variable for offline + reporting. + (spam-report-url-ping-function): Add `spam-report-url-to-file' + and user defined function. + (spam-report-process-queue): New function. + Process requests from `spam-report-requests-file'. + (spam-report-url-ping-mm-url): Autoload. + [Added missing offline functionality from trunk.] + 2005-04-18 Katsumi Yamaoka <yamaoka@jpl.org> * qp.el (quoted-printable-encode-region): Save excursion.
--- a/lisp/gnus/spam-report.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/gnus/spam-report.el Thu May 05 00:04:55 2005 +0000 @@ -59,14 +59,32 @@ (defcustom spam-report-url-ping-function 'spam-report-url-ping-plain - "Function to use for url ping spam reporting." + "Function to use for url ping spam reporting. +The function must accept the arguments `host' and `report'." :type '(choice (const :tag "Connect directly" spam-report-url-ping-plain) (const :tag "Use the external program specified in `mm-url-program'" - spam-report-url-ping-mm-url)) + spam-report-url-ping-mm-url) + (const :tag "Store request URLs in `spam-report-requests-file'" + spam-report-url-to-file) + (function :tag "User defined function" nil)) :group 'spam-report) +(defcustom spam-report-requests-file + (nnheader-concat gnus-directory "spam/" "spam-report-requests.url") + ;; Is there a convention for the extension of such a file? + ;; Should we use `spam-directory'? + "File where spam report request are stored." + :type 'file + :group 'spam-report) + +(defvar spam-report-url-ping-temp-agent-function nil + "Internal variable for `spam-report-agentize' and `spam-report-deagentize'. +This variable will store the value of `spam-report-url-ping-function' from +before `spam-report-agentize' was run, so that `spam-report-deagentize' can +undo that change.") + (defun spam-report-gmane (&rest articles) "Report an article as spam through Gmane" (dolist (article articles) @@ -75,10 +93,11 @@ (string-match spam-report-gmane-regex gnus-newsgroup-name))) (gnus-message 6 "Reporting spam article %d to spam.gmane.org..." article) (if spam-report-gmane-use-article-number - (spam-report-url-ping "spam.gmane.org" - (format "/%s:%d" - (gnus-group-real-name gnus-newsgroup-name) - article)) + (spam-report-url-ping + "spam.gmane.org" + (format "/%s:%d" + (gnus-group-real-name gnus-newsgroup-name) + article)) (with-current-buffer nntp-server-buffer (gnus-request-head article gnus-newsgroup-name) (goto-char (point-min)) @@ -113,14 +132,113 @@ (format "GET %s HTTP/1.1\nUser-Agent: %s (spam-report.el)\nHost: %s\n\n" report (gnus-emacs-version) host))))) +;;;###autoload +(defun spam-report-process-queue (&optional file keep) + "Report all queued requests from `spam-report-requests-file'. + +If FILE is given, use it instead of `spam-report-requests-file'. +If KEEP is t, leave old requests in the file. If KEEP is the +symbol `ask', query before flushing the queue file." + (interactive + (list (read-file-name + "File: " + (file-name-directory spam-report-requests-file) + spam-report-requests-file + nil + (file-name-nondirectory spam-report-requests-file)) + current-prefix-arg)) + (if (eq spam-report-url-ping-function 'spam-report-url-to-file) + (error (concat "Cannot process requests when " + "`spam-report-url-ping-function' is " + "`spam-report-url-to-file'.")) + (gnus-message 7 "Processing requests using `%s'." + spam-report-url-ping-function)) + (or file (setq file spam-report-requests-file)) + (save-excursion + (set-buffer (find-file-noselect file)) + (goto-char (point-min)) + (while (and (not (eobp)) + (re-search-forward + "http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t)) + (funcall spam-report-url-ping-function (match-string 1) (match-string 2)) + (forward-line 1)) + (if (or (eq keep nil) + (and (eq keep 'ask) + (y-or-n-p + (format + "Flush requests from `%s'? " (current-buffer))))) + (progn + (gnus-message 7 "Flushing request file `%s'" + spam-report-requests-file) + (erase-buffer) + (save-buffer) + (kill-buffer (current-buffer))) + (gnus-message 7 "Keeping requests in `%s'" spam-report-requests-file)))) + +;;;###autoload (defun spam-report-url-ping-mm-url (host report) "Ping a host through HTTP, addressing a specific GET resource. Use the external program specified in `mm-url-program' to connect to server." (with-temp-buffer - (let ((url (concat "http://" host "/" report))) + (let ((url (concat "http://" host report))) (mm-url-insert url t)))) +;;;###autoload +(defun spam-report-url-to-file (host report) + "Collect spam report requests in `spam-report-requests-file'. +Customize `spam-report-url-ping-function' to use this function." + (let ((url (concat "http://" host report)) + (file spam-report-requests-file)) + (gnus-make-directory (file-name-directory file)) + (gnus-message 9 "Writing URL `%s' to file `%s'" url file) + (with-temp-buffer + (insert url) + (newline) + (append-to-file (point-min) (point-max) file)))) + +;;;###autoload +(defun spam-report-agentize () + "Add spam-report support to the Agent. +Spam reports will be queued with \\[spam-report-url-to-file] when +the Agent is unplugged, and will be submitted in a batch when the +Agent is plugged." + (interactive) + (add-hook 'gnus-agent-plugged-hook 'spam-report-plug-agent) + (add-hook 'gnus-agent-unplugged-hook 'spam-report-unplug-agent)) + +;;;###autoload +(defun spam-report-deagentize () + "Remove spam-report support from the Agent. +Spam reports will be queued with the method used when +\\[spam-report-agentize] was run." + (interactive) + (remove-hook 'gnus-agent-plugged-hook 'spam-report-plug-agent) + (remove-hook 'gnus-agent-unplugged-hook 'spam-report-unplug-agent)) + +(defun spam-report-plug-agent () + "Adjust spam report settings for plugged state. +Process queued spam reports." + ;; Process the queue, unless the user only wanted to report to a file + ;; anyway. + (unless (equal spam-report-url-ping-temp-agent-function + 'spam-report-url-to-file) + (spam-report-process-queue)) + ;; Set the reporting function, if we have memorized something otherwise, + ;; stick with plain URL reporting. + (setq spam-report-url-ping-function + (or spam-report-url-ping-temp-agent-function + 'spam-report-url-ping-plain))) + +(defun spam-report-unplug-agent () + "Restore spam report settings for unplugged state." + ;; save the old value + (setq spam-report-url-ping-temp-agent-function + spam-report-url-ping-function) + ;; store all reports to file + (setq spam-report-url-ping-function + 'spam-report-url-to-file)) + (provide 'spam-report) ;;; arch-tag: f6683295-ec89-4ab5-8803-8cc842293022
--- a/lisp/help.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/help.el Thu May 05 00:04:55 2005 +0000 @@ -611,6 +611,7 @@ If non-nil UNTRANSLATED is a vector of the untranslated events. It can also be a number in which case the untranslated events from the last key hit are used." + ;; UP-EVENT is the up-event that was discarded by reading KEY, or nil. (interactive "kDescribe key: \np\nU") (if (numberp untranslated) (setq untranslated (this-single-command-raw-keys))) @@ -634,7 +635,8 @@ ;; Don't bother user with strings from (e.g.) the select-paste menu. (if (stringp (aref key (1- (length key)))) (aset key (1- (length key)) "(any string)")) - (if (stringp (aref untranslated (1- (length untranslated)))) + (if (and untranslated + (stringp (aref untranslated (1- (length untranslated))))) (aset untranslated (1- (length untranslated)) "(any string)")) (with-output-to-temp-buffer (help-buffer)
--- a/lisp/hexl.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/hexl.el Thu May 05 00:04:55 2005 +0000 @@ -284,7 +284,7 @@ (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t) ;; Set a callback function for eldoc. - (set (make-local-variable 'eldoc-print-current-symbol-info-function) + (set (make-local-variable 'eldoc-documentation-function) 'hexl-print-current-point-info) (eldoc-add-command-completions "hexl-") (eldoc-remove-command "hexl-save-buffer"
--- a/lisp/hippie-exp.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/hippie-exp.el Thu May 05 00:04:55 2005 +0000 @@ -634,7 +634,7 @@ string). It returns t if a new completion is found, nil otherwise." (let ((expansion ()) (strip-prompt (and (get-buffer-process (current-buffer)) - comint-use-prompt-regexp-instead-of-fields + comint-use-prompt-regexp comint-prompt-regexp))) (if (not old) (progn @@ -681,7 +681,7 @@ string). It returns t if a new completion is found, nil otherwise." (let ((expansion ()) (strip-prompt (and (get-buffer-process (current-buffer)) - comint-use-prompt-regexp-instead-of-fields + comint-use-prompt-regexp comint-prompt-regexp)) (buf (current-buffer)) (orig-case-fold-search case-fold-search)) @@ -708,7 +708,7 @@ (widen)) (goto-char he-search-loc) (setq strip-prompt (and (get-buffer-process (current-buffer)) - comint-use-prompt-regexp-instead-of-fields + comint-use-prompt-regexp comint-prompt-regexp)) (setq expansion (let ((case-fold-search orig-case-fold-search))
--- a/lisp/ido.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/ido.el Thu May 05 00:04:55 2005 +0000 @@ -56,7 +56,7 @@ ;; so I invented a common "ido-" namespace for the merged packages. ;; ;; This version is based on ido.el version 1.57 released on -;; gnu.emacs.sources adapted for emacs 21.5 to use command remapping +;; gnu.emacs.sources adapted for emacs 22.1 to use command remapping ;; and optionally hooking the read-buffer and read-file-name functions. ;; ;; Prefix matching was added by Klaus Berndl <klaus.berndl@sdm.de> based on @@ -1346,12 +1346,19 @@ (setq ido-everywhere (if arg (> (prefix-numeric-value arg) 0) (not ido-everywhere))) - (setq read-file-name-function - (and ido-everywhere (memq ido-mode '(both file)) - 'ido-read-file-name)) - (setq read-buffer-function - (and ido-everywhere (memq ido-mode '(both buffer)) - 'ido-read-buffer))) + (when (get 'ido-everywhere 'file) + (setq read-file-name-function (car (get 'ido-everywhere 'file))) + (put 'ido-everywhere 'file nil)) + (when (get 'ido-everywhere 'buffer) + (setq read-buffer-function (car (get 'ido-everywhere 'buffer))) + (put 'ido-everywhere 'buffer nil)) + (when ido-everywhere + (when (memq ido-mode '(both file)) + (put 'ido-everywhere 'file (cons read-file-name-function nil)) + (setq read-file-name-function 'ido-read-file-name)) + (when (memq ido-mode '(both buffer)) + (put 'ido-everywhere 'buffer (cons read-buffer-function nil)) + (setq read-buffer-function 'ido-read-buffer)))) ;;; IDO KEYMAP @@ -1793,7 +1800,7 @@ (ido-name (car ido-matches)))) (cond - ((eq item 'buffer) + ((memq item '(buffer list)) (setq done t)) ((string-equal "./" ido-selected)
--- a/lisp/ielm.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/ielm.el Thu May 05 00:04:55 2005 +0000 @@ -482,6 +482,7 @@ (interactive) (comint-mode) (setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt))) + (set (make-local-variable 'paragraph-separate) "\\'") (make-local-variable 'paragraph-start) (setq paragraph-start comint-prompt-regexp) (setq comint-input-sender 'ielm-input-sender) @@ -538,7 +539,7 @@ ;; Add a silly header (insert ielm-header) (ielm-set-pm (point-max)) - (unless comint-use-prompt-regexp-instead-of-fields + (unless comint-use-prompt-regexp (let ((inhibit-read-only t)) (add-text-properties (point-min) (point-max)
--- a/lisp/imenu.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/imenu.el Thu May 05 00:04:55 2005 +0000 @@ -777,7 +777,7 @@ depending on PATTERNS." (let ((index-alist (list 'dummy)) - prev-pos beg + prev-pos (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) (not (local-variable-p 'font-lock-defaults))) imenu-case-fold-search @@ -807,7 +807,7 @@ (index (nth 2 pat)) (function (nth 3 pat)) (rest (nthcdr 4 pat)) - start) + start beg) ;; Go backwards for convenience of adding items in order. (goto-char (point-max)) (while (and (re-search-backward regexp nil t) @@ -815,32 +815,35 @@ ;; because it means a bad regexp was specified. (not (= (match-beginning 0) (match-end 0)))) (setq start (point)) - (goto-char (match-end index)) - (setq beg (match-beginning index)) - ;; Go to the start of the match. + ;; Record the start of the line in which the match starts. ;; That's the official position of this definition. - (goto-char start) + (goto-char (match-beginning index)) + (beginning-of-line) + (setq beg (point)) (imenu-progress-message prev-pos nil t) ;; Add this sort of submenu only when we've found an ;; item for it, avoiding empty, duff menus. (unless (assoc menu-title index-alist) (push (list menu-title) index-alist)) (if imenu-use-markers - (setq start (copy-marker start))) + (setq beg (copy-marker beg))) (let ((item (if function (nconc (list (match-string-no-properties index) - start function) + beg function) rest) (cons (match-string-no-properties index) - start))) + beg))) ;; This is the desired submenu, ;; starting with its title (or nil). (menu (assoc menu-title index-alist))) ;; Insert the item unless it is already present. (unless (member item (cdr menu)) (setcdr menu - (cons item (cdr menu)))))))) + (cons item (cdr menu))))) + ;; Go to the start of the match, to make sure we + ;; keep making progress backwards. + (goto-char start)))) (set-syntax-table old-table))) (imenu-progress-message prev-pos 100 t) ;; Sort each submenu by position.
--- a/lisp/info.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/info.el Thu May 05 00:04:55 2005 +0000 @@ -3243,6 +3243,8 @@ (make-local-variable 'line-move-ignore-invisible) (setq line-move-ignore-invisible t) (make-local-variable 'desktop-save-buffer) + (make-local-variable 'widen-automatically) + (setq widen-automatically nil) (setq desktop-save-buffer 'Info-desktop-buffer-misc-data) (add-hook 'kill-buffer-hook 'Info-kill-buffer nil t) (add-hook 'clone-buffer-hook 'Info-clone-buffer-hook nil t)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/international/latexenc.el Thu May 05 00:04:55 2005 +0000 @@ -0,0 +1,171 @@ +;;; latexenc.el --- guess correct coding system in LaTeX files + +;; Copyright (C) 2005 Free Software Foundation, Inc. + +;; Author: Arne J,Ax(Brgensen <arne@arnested.dk> +;; Keywords: mule, coding system, latex + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This code tries to guess the correct coding system of a LaTeX file. + +;; First it searches for a \inputencoding{...} or +;; \usepackage[...]{inputenc} line in the file and looks up the ... in +;; `latex-inputenc-coding-alist' to find the corresponding coding +;; system. + +;; If this fails it will search for AUCTeX's TeX-master or tex-mode's +;; tex-main-file variable in the local variables section and visit +;; that file to get the coding system from the master file. This check +;; can be disabled by setting `latexenc-dont-use-TeX-master-flag' to +;; t. + +;; If we have still not found a coding system we will try to use the +;; standard tex-mode's `tex-guess-main-file' and get the coding system +;; from the main file. This check can be disabled by setting +;; `latexenc-dont-use-tex-guess-main-file-flag' to t. + +;; The functionality is enabled by adding the function +;; `latexenc-find-file-coding-system' to `file-coding-system-alist' +;; like this + +;; (add-to-list 'file-coding-system-alist +;; '("\\.tex\\|\\.ltx\\|\\.dtx\\|\\.drv\\'" . latexenc-find-file-coding-system)) + +;;; Code: + +;;;###autoload +(defcustom latex-inputenc-coding-alist + '(("ansinew" . windows-1252) ; MS Windows ANSI encoding, extension of Latin-1 + ("applemac" . mac-roman) + ("ascii" . us-ascii) + ("cp1250" . windows-1250) ; MS Windows encoding, codepage 1250 + ("cp1252" . windows-1252) ; synonym of ansinew + ("cp1257" . cp1257) + ("cp437de" . cp437) ; IBM code page 437 (German version): 225 is \ss + ("cp437" . cp437) ; IBM code page 437: 225 is \beta + ("cp850" . cp850) ; IBM code page 850 + ("cp852" . cp852) ; IBM code page 852 + ;; ("cp858" . undecided) ; IBM code page 850 but with a euro symbol + ("cp865" . cp865) ; IBM code page 865 + ;; The DECMultinational charaterset used by the OpenVMS system + ;; ("decmulti" . undecided) + ("latin1" . iso-8859-1) + ("latin2" . iso-8859-2) + ("latin3" . iso-8859-3) + ("latin4" . iso-8859-4) + ("latin5" . iso-8859-5) + ("latin9" . iso-8859-15) + ;; ("latin10" . undecided) + ;; ("macce" . undecided) ; Apple Central European + ("next" . next) ; The Next encoding + ("utf8" . utf-8) + ("utf8x" . utf-8)) ; used by the Unicode LaTeX package + "Mapping from encoding names used by LaTeX's \"inputenc.sty\" to Emacs coding systems. +Used by the function `latexenc-find-file-coding-system'." + :group 'files + :group 'mule + :type '(alist :key-type (string :tag "LaTeX input encoding") + :value-type (coding-system :tag "Coding system"))) + +;;;###autoload +(defun latexenc-inputenc-to-coding-system (inputenc) + "Return the corresponding coding-system for the specified input encoding. +Return nil if no matching coding system can be found." + (cdr (assoc inputenc latex-inputenc-coding-alist))) + +;;;###autoload +(defun latexenc-coding-system-to-inputenc (cs) + "Return the corresponding input encoding for the specified coding system. +Return nil if no matching input encoding can be found." + (let (result) + (catch 'result + (dolist (elem latex-inputenc-coding-alist result) + (let ((elem-cs (cdr elem))) + (when (and (coding-system-p elem-cs) + (coding-system-p cs) + (eq (coding-system-base cs) (coding-system-base elem-cs))) + (setq result (car elem)) + (throw 'result result))))))) + +(defvar latexenc-dont-use-TeX-master-flag nil + "Non-nil means don't follow TeX-master to find the coding system.") + +(defvar latexenc-dont-use-tex-guess-main-file-flag nil + "Non-nil means don't use tex-guessmain-file to find the coding system.") + +;;;###autoload +(defun latexenc-find-file-coding-system (arg-list) + "Determine the coding system of a LaTeX file if it uses \"inputenc.sty\". +The mapping from LaTeX's \"inputenc.sty\" encoding names to Emacs +coding system names is determined from `latex-inputenc-coding-alist'." + (if (eq (car arg-list) 'insert-file-contents) + (save-excursion + ;; try to find the coding system in this file + (goto-char (point-min)) + (if (or + (re-search-forward "^[^%\n]*\\\\inputencoding{\\(.*\\)}" nil t) + (re-search-forward "^[^%\n]*\\\\usepackage\\[\\(.*\\)\\]{inputenc}" nil t)) + (let* ((match (match-string 1)) + (sym (intern match))) + (when (latexenc-inputenc-to-coding-system match) + (setq sym (latexenc-inputenc-to-coding-system match)) + (when (coding-system-p sym) + sym + (if (and (require 'code-pages nil t) (coding-system-p sym)) + sym + 'undecided)))) + ;; else try to find it in the master/main file + (let (latexenc-main-file) + ;; is there a TeX-master or tex-main-file in the local variable section + (unless latexenc-dont-use-TeX-master-flag + (goto-char (point-max)) + (when (re-search-backward "^%+ *\\(TeX-master\\|tex-main-file\\): *\"\\(.+\\)\"" nil t) + (let ((file (concat (file-name-directory (nth 1 arg-list)) (match-string 2)))) + (if (file-exists-p file) + (setq latexenc-main-file file) + (if (boundp 'TeX-default-extension) + (when (file-exists-p (concat file "." TeX-default-extension)) + (setq latexenc-main-file (concat file "." TeX-default-extension))) + (dolist (ext '("drv" "dtx" "ltx" "tex")) + (if (file-exists-p (concat file "." ext)) + (setq latexenc-main-file (concat file "." ext))))))))) + ;; try tex-modes tex-guess-main-file + (when (and (not latexenc-dont-use-tex-guess-main-file-flag) + (not latexenc-main-file)) + (when (fboundp 'tex-guess-main-file) + (let ((tex-start-of-header "\\\\document\\(style\\|class\\)") + (default-directory (file-name-directory (nth 1 arg-list)))) + (setq latexenc-main-file (tex-guess-main-file))))) + ;; if we found a master/main file get the coding system from it + (if (and latexenc-main-file + (file-readable-p latexenc-main-file)) + (let* ((latexenc-dont-use-tex-guess-main-file-flag t) + (latexenc-dont-use-TeX-master-flag t) + (latexenc-main-buffer (find-file-noselect latexenc-main-file t))) + (or (buffer-local-value 'coding-system-for-write latexenc-main-buffer) + (buffer-local-value 'buffer-file-coding-system latexenc-main-buffer))) + 'undecided)))) + 'undecided)) + +(provide 'latexenc) + +;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1 +;;; latexenc.el ends here
--- a/lisp/international/mule-cmds.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/international/mule-cmds.el Thu May 05 00:04:55 2005 +0000 @@ -354,9 +354,6 @@ (setq default-process-coding-system (cons output-coding input-coding)))) -(defalias 'update-iso-coding-systems 'update-coding-systems-internal) -(make-obsolete 'update-iso-coding-systems 'update-coding-systems-internal "20.3") - (defun prefer-coding-system (coding-system) "Add CODING-SYSTEM at the front of the priority list for automatic detection. This also sets the following coding systems: @@ -905,7 +902,10 @@ ;; give when file is re-read. ;; But don't do this if we explicitly ignored the cookie ;; by using `find-file-literally'. - (unless (or (stringp from) find-file-literally) + (unless (or (stringp from) + find-file-literally + (and coding-system + (memq (coding-system-type coding-system) '(0 5)))) (let ((auto-cs (save-excursion (save-restriction (widen)
--- a/lisp/international/mule-conf.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/international/mule-conf.el Thu May 05 00:04:55 2005 +0000 @@ -1443,7 +1443,8 @@ ;; the beginning of a doc string, work. ("\\(\\`\\|/\\)loaddefs.el\\'" . (raw-text . raw-text-unix)) ("\\.tar\\'" . (no-conversion . no-conversion)) - ( "\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system) + ( "\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system) + ("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system) ("" . (undecided . nil))))
--- a/lisp/international/mule-util.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/international/mule-util.el Thu May 05 00:04:55 2005 +0000 @@ -211,12 +211,6 @@ ;; (prin1-to-string (cdr ret))) ;; (prin1-to-string ret)))))) -;;; For backward compatibility ... -;;;###autoload -(defalias 'truncate-string 'truncate-string-to-width) - -;;;###autoload -(make-obsolete 'truncate-string 'truncate-string-to-width "20.1") ;;; Nested alist handler. Nested alist is alist whose elements are ;;; also nested alist.
--- a/lisp/international/mule.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/international/mule.el Thu May 05 00:04:55 2005 +0000 @@ -843,9 +843,6 @@ (plist-get (coding-system-plist coding-system) (intern (concat ":" (symbol-name prop))))))) -(defalias 'coding-system-parent 'coding-system-base) -(make-obsolete 'coding-system-parent 'coding-system-base "20.3") - (defun coding-system-eol-type-mnemonic (coding-system) "Return the string indicating end-of-line format of CODING-SYSTEM." (let* ((eol-type (coding-system-eol-type coding-system))
--- a/lisp/isearch.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/isearch.el Thu May 05 00:04:55 2005 +0000 @@ -527,9 +527,9 @@ starting point. Type \\[isearch-query-replace] to start `query-replace' with string to\ -replace from last search string. + replace from last search string. Type \\[isearch-query-replace-regexp] to start `query-replace-regexp'\ -with string to replace from last search string.. + with string to replace from last search string.. Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity. Type \\[isearch-toggle-regexp] to toggle regular-expression mode.
--- a/lisp/jit-lock.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/jit-lock.el Thu May 05 00:04:55 2005 +0000 @@ -69,7 +69,7 @@ :group 'jit-lock) -(defcustom jit-lock-stealth-time 3 +(defcustom jit-lock-stealth-time 16 "*Time in seconds to wait before beginning stealth fontification. Stealth fontification occurs if there is no input within this time. If nil, stealth fontification is never performed. @@ -80,7 +80,7 @@ :group 'jit-lock) -(defcustom jit-lock-stealth-nice 0.125 +(defcustom jit-lock-stealth-nice 0.5 "*Time in seconds to pause between chunks of stealth fontification. Each iteration of stealth fontification is separated by this amount of time, thus reducing the demand that stealth fontification makes on the system.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/jka-comp-hook.el Thu May 05 00:04:55 2005 +0000 @@ -0,0 +1,293 @@ +;;; jka-comp-hook.el --- preloaded code to enable jka-compr.el + +;; Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. + +;; Author: jka@ece.cmu.edu (Jay K. Adams) +;; Maintainer: FSF +;; Keywords: data + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This file contains the code to enable and disable Auto-Compression mode. +;; It is preloaded. The guts of this mode are in jka-compr.el, which +;; is loaded only when you really try to uncompress something. + +;;; Code: + +(defgroup compression nil + "Data compression utilities" + :group 'data) + +(defgroup jka-compr nil + "jka-compr customization" + :group 'compression) + +;;; I have this defined so that .Z files are assumed to be in unix +;;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt. +(defcustom jka-compr-compression-info-list + ;;[regexp + ;; compr-message compr-prog compr-args + ;; uncomp-message uncomp-prog uncomp-args + ;; can-append auto-mode-flag strip-extension-flag file-magic-bytes] + '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" + "compressing" "compress" ("-c") + "uncompressing" "uncompress" ("-c") + nil t "\037\235"] + ;; Formerly, these had an additional arg "-c", but that fails with + ;; "Version 0.1pl2, 29-Aug-97." (RedHat 5.1 GNU/Linux) and + ;; "Version 0.9.0b, 9-Sept-98". + ["\\.bz2\\'" + "bzip2ing" "bzip2" nil + "bunzip2ing" "bzip2" ("-d") + nil t "BZh"] + ["\\.tbz\\'" + "bzip2ing" "bzip2" nil + "bunzip2ing" "bzip2" ("-d") + nil nil "BZh"] + ["\\.tgz\\'" + "compressing" "gzip" ("-c" "-q") + "uncompressing" "gzip" ("-c" "-q" "-d") + t nil "\037\213"] + ["\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" + "compressing" "gzip" ("-c" "-q") + "uncompressing" "gzip" ("-c" "-q" "-d") + t t "\037\213"] + ;; dzip is gzip with random access. Its compression program can't + ;; read/write stdin/out, so .dz files can only be viewed without + ;; saving, having their contents decompressed with gzip. + ["\\.dz\\'" + nil nil nil + "uncompressing" "gzip" ("-c" "-q" "-d") + nil t "\037\213"]) + + "List of vectors that describe available compression techniques. +Each element, which describes a compression technique, is a vector of +the form [REGEXP COMPRESS-MSG COMPRESS-PROGRAM COMPRESS-ARGS +UNCOMPRESS-MSG UNCOMPRESS-PROGRAM UNCOMPRESS-ARGS +APPEND-FLAG STRIP-EXTENSION-FLAG FILE-MAGIC-CHARS], where: + + regexp is a regexp that matches filenames that are + compressed with this format + + compress-msg is the message to issue to the user when doing this + type of compression (nil means no message) + + compress-program is a program that performs this compression + (nil means visit file in read-only mode) + + compress-args is a list of args to pass to the compress program + + uncompress-msg is the message to issue to the user when doing this + type of uncompression (nil means no message) + + uncompress-program is a program that performs this compression + + uncompress-args is a list of args to pass to the uncompress program + + append-flag is non-nil if this compression technique can be + appended + + strip-extension-flag non-nil means strip the regexp from file names + before attempting to set the mode. + + file-magic-chars is a string of characters that you would find + at the beginning of a file compressed in this way. + +Because of the way `call-process' is defined, discarding the stderr output of +a program adds the overhead of starting a shell each time the program is +invoked." + :type '(repeat (vector regexp + (choice :tag "Compress Message" + (string :format "%v") + (const :tag "No Message" nil)) + (choice :tag "Compress Program" + (string) + (const :tag "None" nil)) + (repeat :tag "Compress Arguments" string) + (choice :tag "Uncompress Message" + (string :format "%v") + (const :tag "No Message" nil)) + (choice :tag "Uncompress Program" + (string) + (const :tag "None" nil)) + (repeat :tag "Uncompress Arguments" string) + (boolean :tag "Append") + (boolean :tag "Strip Extension") + (string :tag "Magic Bytes"))) + :group 'jka-compr) + +(defcustom jka-compr-mode-alist-additions + (list (cons "\\.tgz\\'" 'tar-mode) (cons "\\.tbz\\'" 'tar-mode)) + "A list of pairs to add to `auto-mode-alist' when jka-compr is installed." + :type '(repeat (cons string symbol)) + :group 'jka-compr) + +(defcustom jka-compr-load-suffixes '(".gz") + "List of suffixes to try when loading files." + :type '(repeat string) + :group 'jka-compr) + +;; List of all the elements we actually added to file-coding-system-alist. +(defvar jka-compr-added-to-file-coding-system-alist nil) + +(defvar jka-compr-file-name-handler-entry + nil + "The entry in `file-name-handler-alist' used by the jka-compr I/O functions.") + +(defun jka-compr-build-file-regexp () + (mapconcat + 'jka-compr-info-regexp + jka-compr-compression-info-list + "\\|")) + +;;; Functions for accessing the return value of jka-compr-get-compression-info +(defun jka-compr-info-regexp (info) (aref info 0)) +(defun jka-compr-info-compress-message (info) (aref info 1)) +(defun jka-compr-info-compress-program (info) (aref info 2)) +(defun jka-compr-info-compress-args (info) (aref info 3)) +(defun jka-compr-info-uncompress-message (info) (aref info 4)) +(defun jka-compr-info-uncompress-program (info) (aref info 5)) +(defun jka-compr-info-uncompress-args (info) (aref info 6)) +(defun jka-compr-info-can-append (info) (aref info 7)) +(defun jka-compr-info-strip-extension (info) (aref info 8)) +(defun jka-compr-info-file-magic-bytes (info) (aref info 9)) + + +(defun jka-compr-get-compression-info (filename) + "Return information about the compression scheme of FILENAME. +The determination as to which compression scheme, if any, to use is +based on the filename itself and `jka-compr-compression-info-list'." + (catch 'compression-info + (let ((case-fold-search nil)) + (mapcar + (function (lambda (x) + (and (string-match (jka-compr-info-regexp x) filename) + (throw 'compression-info x)))) + jka-compr-compression-info-list) + nil))) + +(defun jka-compr-install () + "Install jka-compr. +This adds entries to `file-name-handler-alist' and `auto-mode-alist' +and `inhibit-first-line-modes-suffixes'." + + (setq jka-compr-file-name-handler-entry + (cons (jka-compr-build-file-regexp) 'jka-compr-handler)) + + (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry + file-name-handler-alist)) + + (setq jka-compr-added-to-file-coding-system-alist nil) + + (mapcar + (function (lambda (x) + ;; Don't do multibyte encoding on the compressed files. + (let ((elt (cons (jka-compr-info-regexp x) + '(no-conversion . no-conversion)))) + (setq file-coding-system-alist + (cons elt file-coding-system-alist)) + (setq jka-compr-added-to-file-coding-system-alist + (cons elt jka-compr-added-to-file-coding-system-alist))) + + (and (jka-compr-info-strip-extension x) + ;; Make entries in auto-mode-alist so that modes + ;; are chosen right according to the file names + ;; sans `.gz'. + (setq auto-mode-alist + (cons (list (jka-compr-info-regexp x) + nil 'jka-compr) + auto-mode-alist)) + ;; Also add these regexps to + ;; inhibit-first-line-modes-suffixes, so that a + ;; -*- line in the first file of a compressed tar + ;; file doesn't override tar-mode. + (setq inhibit-first-line-modes-suffixes + (cons (jka-compr-info-regexp x) + inhibit-first-line-modes-suffixes))))) + jka-compr-compression-info-list) + (setq auto-mode-alist + (append auto-mode-alist jka-compr-mode-alist-additions)) + + ;; Make sure that (load "foo") will find /bla/foo.el.gz. + (setq load-suffixes + (apply 'append + (mapcar (lambda (suffix) + (cons suffix + (mapcar (lambda (ext) (concat suffix ext)) + jka-compr-load-suffixes))) + load-suffixes)))) + + +(defun jka-compr-installed-p () + "Return non-nil if jka-compr is installed. +The return value is the entry in `file-name-handler-alist' for jka-compr." + + (let ((fnha file-name-handler-alist) + (installed nil)) + + (while (and fnha (not installed)) + (and (eq (cdr (car fnha)) 'jka-compr-handler) + (setq installed (car fnha))) + (setq fnha (cdr fnha))) + + installed)) + +(define-minor-mode auto-compression-mode + "Toggle automatic file compression and uncompression. +With prefix argument ARG, turn auto compression on if positive, else off. +Returns the new status of auto compression (non-nil means on)." + :global t :group 'jka-compr + (let* ((installed (jka-compr-installed-p)) + (flag auto-compression-mode)) + (cond + ((and flag installed) t) ; already installed + ((and (not flag) (not installed)) nil) ; already not installed + (flag (jka-compr-install)) + (t (jka-compr-uninstall))))) + +(defmacro with-auto-compression-mode (&rest body) + "Evalute BODY with automatic file compression and uncompression enabled." + (let ((already-installed (make-symbol "already-installed"))) + `(let ((,already-installed (jka-compr-installed-p))) + (unwind-protect + (progn + (unless ,already-installed + (jka-compr-install)) + ,@body) + (unless ,already-installed + (jka-compr-uninstall)))))) +(put 'with-auto-compression-mode 'lisp-indent-function 0) + + +;;; This is what we need to know about jka-compr-handler +;;; in order to decide when to call it. + +(put 'jka-compr-handler 'safe-magic t) +(put 'jka-compr-handler 'operations '(jka-compr-byte-compiler-base-file-name + write-region insert-file-contents + file-local-copy load)) + +;;; Turn on the mode. +(auto-compression-mode 1) + +(provide 'jka-comp-hook) + +;; arch-tag: 4bd73429-f400-45fe-a065-270a113e31a8 +;;; jka-comp-hook.el ends here \ No newline at end of file
--- a/lisp/jka-compr.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/jka-compr.el Thu May 05 00:04:55 2005 +0000 @@ -100,15 +100,6 @@ ;;; Code: -(defgroup compression nil - "Data compression utilities" - :group 'data) - -(defgroup jka-compr nil - "jka-compr customization" - :group 'compression) - - (defcustom jka-compr-shell "sh" "*Shell to be used for calling compression programs. The value of this variable only matters if you want to discard the @@ -120,118 +111,6 @@ (defvar jka-compr-use-shell (not (memq system-type '(ms-dos windows-nt)))) -;;; I have this defined so that .Z files are assumed to be in unix -;;; compress format; and .gz files, in gzip format, and .bz2 files in bzip fmt. -(defcustom jka-compr-compression-info-list - ;;[regexp - ;; compr-message compr-prog compr-args - ;; uncomp-message uncomp-prog uncomp-args - ;; can-append auto-mode-flag strip-extension-flag file-magic-bytes] - '(["\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" - "compressing" "compress" ("-c") - "uncompressing" "uncompress" ("-c") - nil t "\037\235"] - ;; Formerly, these had an additional arg "-c", but that fails with - ;; "Version 0.1pl2, 29-Aug-97." (RedHat 5.1 GNU/Linux) and - ;; "Version 0.9.0b, 9-Sept-98". - ["\\.bz2\\'" - "bzip2ing" "bzip2" nil - "bunzip2ing" "bzip2" ("-d") - nil t "BZh"] - ["\\.tbz\\'" - "bzip2ing" "bzip2" nil - "bunzip2ing" "bzip2" ("-d") - nil nil "BZh"] - ["\\.tgz\\'" - "zipping" "gzip" ("-c" "-q") - "unzipping" "gzip" ("-c" "-q" "-d") - t nil "\037\213"] - ["\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" - "zipping" "gzip" ("-c" "-q") - "unzipping" "gzip" ("-c" "-q" "-d") - t t "\037\213"] - ;; dzip is gzip with random access. Its compression program can't - ;; read/write stdin/out, so .dz files can only be viewed without - ;; saving, having their contents decompressed with gzip. - ["\\.dz\\'" - nil nil nil - "unzipping" "gzip" ("-c" "-q" "-d") - nil t "\037\213"]) - - "List of vectors that describe available compression techniques. -Each element, which describes a compression technique, is a vector of -the form [REGEXP COMPRESS-MSG COMPRESS-PROGRAM COMPRESS-ARGS -UNCOMPRESS-MSG UNCOMPRESS-PROGRAM UNCOMPRESS-ARGS -APPEND-FLAG STRIP-EXTENSION-FLAG FILE-MAGIC-CHARS], where: - - regexp is a regexp that matches filenames that are - compressed with this format - - compress-msg is the message to issue to the user when doing this - type of compression (nil means no message) - - compress-program is a program that performs this compression - (nil means visit file in read-only mode) - - compress-args is a list of args to pass to the compress program - - uncompress-msg is the message to issue to the user when doing this - type of uncompression (nil means no message) - - uncompress-program is a program that performs this compression - - uncompress-args is a list of args to pass to the uncompress program - - append-flag is non-nil if this compression technique can be - appended - - strip-extension-flag non-nil means strip the regexp from file names - before attempting to set the mode. - - file-magic-chars is a string of characters that you would find - at the beginning of a file compressed in this way. - -Because of the way `call-process' is defined, discarding the stderr output of -a program adds the overhead of starting a shell each time the program is -invoked." - :type '(repeat (vector regexp - (choice :tag "Compress Message" - (string :format "%v") - (const :tag "No Message" nil)) - (choice :tag "Compress Program" - (string) - (const :tag "None" nil)) - (repeat :tag "Compress Arguments" string) - (choice :tag "Uncompress Message" - (string :format "%v") - (const :tag "No Message" nil)) - (choice :tag "Uncompress Program" - (string) - (const :tag "None" nil)) - (repeat :tag "Uncompress Arguments" string) - (boolean :tag "Append") - (boolean :tag "Strip Extension") - (string :tag "Magic Bytes"))) - :group 'jka-compr) - -(defcustom jka-compr-mode-alist-additions - (list (cons "\\.tgz\\'" 'tar-mode) (cons "\\.tbz\\'" 'tar-mode)) - "A list of pairs to add to `auto-mode-alist' when jka-compr is installed." - :type '(repeat (cons string symbol)) - :group 'jka-compr) - -(defcustom jka-compr-load-suffixes '(".gz") - "List of suffixes to try when loading files." - :type '(repeat string) - :group 'jka-compr) - -;; List of all the elements we actually added to file-coding-system-alist. -(defvar jka-compr-added-to-file-coding-system-alist nil) - -(defvar jka-compr-file-name-handler-entry - nil - "The entry in `file-name-handler-alist' used by the jka-compr I/O functions.") - (defvar jka-compr-really-do-compress nil "Non-nil in a buffer whose visited file was uncompressed on visiting it. This means compress the data on writing the file, even if the @@ -764,12 +643,13 @@ (put 'byte-compiler-base-file-name 'jka-compr 'jka-compr-byte-compiler-base-file-name) +;;;###autoload (defvar jka-compr-inhibit nil "Non-nil means inhibit automatic uncompression temporarily. Lisp programs can bind this to t to do that. It is not recommended to set this variable permanently to anything but nil.") -(put 'jka-compr-handler 'safe-magic t) +;;;###autoload (defun jka-compr-handler (operation &rest args) (save-match-data (let ((jka-op (get operation 'jka-compr))) @@ -790,65 +670,6 @@ (apply operation args))) -(defun jka-compr-build-file-regexp () - (mapconcat - 'jka-compr-info-regexp - jka-compr-compression-info-list - "\\|")) - - -(defun jka-compr-install () - "Install jka-compr. -This adds entries to `file-name-handler-alist' and `auto-mode-alist' -and `inhibit-first-line-modes-suffixes'." - - (setq jka-compr-file-name-handler-entry - (cons (jka-compr-build-file-regexp) 'jka-compr-handler)) - - (setq file-name-handler-alist (cons jka-compr-file-name-handler-entry - file-name-handler-alist)) - - (setq jka-compr-added-to-file-coding-system-alist nil) - - (mapcar - (function (lambda (x) - ;; Don't do multibyte encoding on the compressed files. - (let ((elt (cons (jka-compr-info-regexp x) - '(no-conversion . no-conversion)))) - (setq file-coding-system-alist - (cons elt file-coding-system-alist)) - (setq jka-compr-added-to-file-coding-system-alist - (cons elt jka-compr-added-to-file-coding-system-alist))) - - (and (jka-compr-info-strip-extension x) - ;; Make entries in auto-mode-alist so that modes - ;; are chosen right according to the file names - ;; sans `.gz'. - (setq auto-mode-alist - (cons (list (jka-compr-info-regexp x) - nil 'jka-compr) - auto-mode-alist)) - ;; Also add these regexps to - ;; inhibit-first-line-modes-suffixes, so that a - ;; -*- line in the first file of a compressed tar - ;; file doesn't override tar-mode. - (setq inhibit-first-line-modes-suffixes - (cons (jka-compr-info-regexp x) - inhibit-first-line-modes-suffixes))))) - jka-compr-compression-info-list) - (setq auto-mode-alist - (append auto-mode-alist jka-compr-mode-alist-additions)) - - ;; Make sure that (load "foo") will find /bla/foo.el.gz. - (setq load-suffixes - (apply 'append - (mapcar (lambda (suffix) - (cons suffix - (mapcar (lambda (ext) (concat suffix ext)) - jka-compr-load-suffixes))) - load-suffixes)))) - - (defun jka-compr-uninstall () "Uninstall jka-compr. This removes the entries in `file-name-handler-alist' and `auto-mode-alist' @@ -908,59 +729,6 @@ (push suffix suffixes))) (setq load-suffixes (nreverse suffixes)))) - -(defun jka-compr-installed-p () - "Return non-nil if jka-compr is installed. -The return value is the entry in `file-name-handler-alist' for jka-compr." - - (let ((fnha file-name-handler-alist) - (installed nil)) - - (while (and fnha (not installed)) - (and (eq (cdr (car fnha)) 'jka-compr-handler) - (setq installed (car fnha))) - (setq fnha (cdr fnha))) - - installed)) - - -;;; Add the file I/O hook if it does not already exist. -;;; Make sure that jka-compr-file-name-handler-entry is eq to the -;;; entry for jka-compr in file-name-handler-alist. -(and (jka-compr-installed-p) - (jka-compr-uninstall)) - - -;;;###autoload -(define-minor-mode auto-compression-mode - "Toggle automatic file compression and uncompression. -With prefix argument ARG, turn auto compression on if positive, else off. -Returns the new status of auto compression (non-nil means on)." - :global t :group 'jka-compr - (let* ((installed (jka-compr-installed-p)) - (flag auto-compression-mode)) - (cond - ((and flag installed) t) ; already installed - ((and (not flag) (not installed)) nil) ; already not installed - (flag (jka-compr-install)) - (t (jka-compr-uninstall))))) - - -;;;###autoload -(defmacro with-auto-compression-mode (&rest body) - "Evalute BODY with automatic file compression and uncompression enabled." - (let ((already-installed (make-symbol "already-installed"))) - `(let ((,already-installed (jka-compr-installed-p))) - (unwind-protect - (progn - (unless ,already-installed - (jka-compr-install)) - ,@body) - (unless ,already-installed - (jka-compr-uninstall)))))) -(put 'with-auto-compression-mode 'lisp-indent-function 0) - - (provide 'jka-compr) ;;; arch-tag: 3f15b630-e9a7-46c4-a22a-94afdde86ebc
--- a/lisp/kmacro.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/kmacro.el Thu May 05 00:04:55 2005 +0000 @@ -960,9 +960,9 @@ (defun kmacro-step-edit-prompt (macro index) ;; Show step-edit prompt (let ((keys (and (not kmacro-step-edit-appending) - index (substring macro index executing-macro-index))) + index (substring macro index executing-kbd-macro-index))) (future (and (not kmacro-step-edit-appending) - (substring macro executing-macro-index))) + (substring macro executing-kbd-macro-index))) (message-log-max nil) (curmsg (current-message))) @@ -1020,12 +1020,12 @@ (not (eq kmacro-step-edit-action t))) ;; Find the actual end of this key sequence. ;; Must be able to backtrack in case we actually execute it. - (setq restore-index executing-macro-index) + (setq restore-index executing-kbd-macro-index) (let (unread-command-events) (quoted-insert 0) (when unread-command-events - (setq executing-macro-index (- executing-macro-index (length unread-command-events)) - next-index executing-macro-index))))) + (setq executing-kbd-macro-index (- executing-kbd-macro-index (length unread-command-events)) + next-index executing-kbd-macro-index))))) ;; Query the user; stop macro exection temporarily (let ((macro executing-kbd-macro) @@ -1045,7 +1045,7 @@ (when unread-command-events (setq kmacro-step-edit-new-macro (substring kmacro-step-edit-new-macro 0 (- (length unread-command-events))) - executing-macro-index (- executing-macro-index (length unread-command-events))))) + executing-kbd-macro-index (- executing-kbd-macro-index (length unread-command-events))))) (setq current-prefix-arg nil prefix-arg nil) (setq act 'ignore)) @@ -1099,24 +1099,24 @@ (setq act t) t) ((member act '(insert-1 insert)) - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) (setq kmacro-step-edit-inserting (if (eq act 'insert-1) 1 t)) nil) ((member act '(replace-1 replace)) (setq kmacro-step-edit-inserting (if (eq act 'replace-1) 1 t)) (setq kmacro-step-edit-prefix-index nil) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-appending t)) nil) ((eq act 'append) (setq kmacro-step-edit-inserting t) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-appending t)) t) ((eq act 'append-end) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-inserting t kmacro-step-edit-appending t) @@ -1124,21 +1124,21 @@ (setq act t) t) ((eq act 'help) - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) (setq kmacro-step-edit-help (not kmacro-step-edit-help)) nil) (t ;; Ignore unknown responses - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) nil)) - (if (> executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (if (> executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) (setq kmacro-step-edit-new-macro (vconcat kmacro-step-edit-new-macro (substring executing-kbd-macro (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) - (if (eq act t) nil executing-macro-index))) + (if (eq act t) nil executing-kbd-macro-index))) kmacro-step-edit-prefix-index nil)) (if restore-index - (setq executing-macro-index restore-index))) + (setq executing-kbd-macro-index restore-index))) (t (setq this-command 'ignore))) (setq kmacro-step-edit-key-index next-index))) @@ -1151,7 +1151,7 @@ (executing-kbd-macro nil) (defining-kbd-macro nil) cmd keys next-index) - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) kmacro-step-edit-prefix-index nil) (kmacro-step-edit-prompt macro nil) ;; Now, we have read a key sequence from the macro, but we don't want @@ -1172,8 +1172,8 @@ (setq kmacro-step-edit-inserting nil) (when unread-command-events (setq keys (substring keys 0 (- (length unread-command-events))) - executing-macro-index (- executing-macro-index (length unread-command-events)) - next-index executing-macro-index + executing-kbd-macro-index (- executing-kbd-macro-index (length unread-command-events)) + next-index executing-kbd-macro-index unread-command-events nil))) (setq cmd 'ignore) nil) @@ -1217,7 +1217,7 @@ ((eq kmacro-step-edit-active 'ignore) (setq this-command 'ignore)) ((eq kmacro-step-edit-active 'append-end) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-inserting t kmacro-step-edit-appending t @@ -1243,8 +1243,8 @@ (when kmacro-step-edit-active (add-hook 'pre-command-hook 'kmacro-step-edit-pre-command nil nil) (if kmacro-step-edit-key-index - (setq executing-macro-index kmacro-step-edit-key-index) - (setq kmacro-step-edit-key-index executing-macro-index)))) + (setq executing-kbd-macro-index kmacro-step-edit-key-index) + (setq kmacro-step-edit-key-index executing-kbd-macro-index)))) (defun kmacro-step-edit-macro ()
--- a/lisp/loadhist.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/loadhist.el Thu May 05 00:04:55 2005 +0000 @@ -188,27 +188,34 @@ (string-match "-hooks?\\'" (symbol-name x))) (memq x unload-feature-special-hooks))) ; Known abnormal hooks etc. (dolist (y unload-hook-features-list) - (when (eq (car-safe y) 'defun) - (remove-hook x (cdr y)))))))) + (when (and (eq (car-safe y) 'defun) + (not (get (cdr y) 'autoload))) + (remove-hook x (cdr y))))))) + ;; Remove any feature-symbols from auto-mode-alist as well. + (dolist (y unload-hook-features-list) + (when (and (eq (car-safe y) 'defun) + (not (get (cdr y) 'autoload))) + (setq auto-mode-alist + (rassq-delete-all (cdr y) auto-mode-alist))))) (when (fboundp 'elp-restore-function) ; remove ELP stuff first (dolist (elt unload-hook-features-list) (when (symbolp elt) (elp-restore-function elt)))) (dolist (x unload-hook-features-list) (if (consp x) - (progn - ;; Remove any feature names that this file provided. - (when (eq (car x) 'provide) - (setq features (delq (cdr x) features))) - (when (eq (car x) 'defun) - (let ((fun (cdr x))) - (when (fboundp fun) - (when (fboundp 'ad-unadvise) - (ad-unadvise fun)) - (fmakunbound fun) - (let ((aload (get fun 'autoload))) - (when aload - (fset fun (cons 'autoload aload)))))))) + (cond + ;; Remove any feature names that this file provided. + ((eq (car x) 'provide) + (setq features (delq (cdr x) features))) + ((eq (car x) 'defun) + (let ((fun (cdr x))) + (when (fboundp fun) + (when (fboundp 'ad-unadvise) + (ad-unadvise fun)) + (fmakunbound fun) + (let ((aload (get fun 'autoload))) + (when aload + (fset fun (cons 'autoload aload)))))))) ;; Kill local values as much as possible. (dolist (buf (buffer-list)) (with-current-buffer buf @@ -217,8 +224,7 @@ (unless (local-variable-if-set-p x) (makunbound x)))) ;; Delete the load-history element for this file. - (let ((elt (assoc file load-history))) - (setq load-history (delq elt load-history))))) + (setq load-history (delq (assoc file load-history) load-history)))) (provide 'loadhist)
--- a/lisp/loadup.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/loadup.el Thu May 05 00:04:55 2005 +0000 @@ -179,6 +179,7 @@ (message "%s" (garbage-collect)) (load "vc-hooks") +(load "jka-comp-hook") (load "ediff-hook") (if (fboundp 'x-show-tip) (load "tooltip")) (message "%s" (garbage-collect))
--- a/lisp/mail/rmail.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/mail/rmail.el Thu May 05 00:04:55 2005 +0000 @@ -662,11 +662,12 @@ ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. `(,cite-chars (,(concat "\\=[ \t]*" - "\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" - "\\(" cite-chars "[ \t]*\\)\\)+" + "\\(\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" + "\\(" cite-chars "[ \t]*\\)\\)+\\)" "\\(.*\\)") (beginning-of-line) (end-of-line) - (3 font-lock-comment-face nil t))) + (1 font-lock-comment-delimiter-face nil t) + (5 font-lock-comment-face nil t))) '("^\\(X-[a-z0-9-]+\\|In-reply-to\\|Date\\):.*\\(\n[ \t]+.*\\)*$" . font-lock-string-face)))) "Additional expressions to highlight in Rmail mode.")
--- a/lisp/mail/sendmail.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/mail/sendmail.el Thu May 05 00:04:55 2005 +0000 @@ -378,11 +378,12 @@ ;; Use MATCH-ANCHORED to effectively anchor the regexp left side. `(,cite-chars (,(concat "\\=[ \t]*" - "\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" - "\\(" cite-chars "[ \t]*\\)\\)+" + "\\(\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?" + "\\(" cite-chars "[ \t]*\\)\\)+\\)" "\\(.*\\)") (beginning-of-line) (end-of-line) - (3 font-lock-comment-face nil t))) + (1 font-lock-comment-delimiter-face nil t) + (5 font-lock-comment-face nil t))) '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*\\(\n[ \t]+.*\\)*$" . font-lock-string-face)))) "Additional expressions to highlight in Mail mode.")
--- a/lisp/man.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/man.el Thu May 05 00:04:55 2005 +0000 @@ -387,6 +387,7 @@ (let ((table (copy-syntax-table (standard-syntax-table)))) (modify-syntax-entry ?. "w" table) (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?: "w" table) ; for PDL::Primitive in Perl man pages table) "Syntax table used in Man mode buffers.")
--- a/lisp/menu-bar.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/menu-bar.el Thu May 05 00:04:55 2005 +0000 @@ -639,9 +639,9 @@ (let ((need-save nil)) ;; These are set with menu-bar-make-mm-toggle, which does not ;; put on a customized-value property. - (dolist (elt '(line-number-mode column-number-mode cua-mode show-paren-mode - transient-mark-mode global-font-lock-mode - blink-cursor-mode)) + (dolist (elt '(line-number-mode column-number-mode size-indication-mode + cua-mode show-paren-mode transient-mark-mode + global-font-lock-mode blink-cursor-mode)) (and (customize-mark-to-save elt) (setq need-save t))) ;; These are set with `customize-set-variable'. @@ -692,6 +692,11 @@ "Line Numbers" "Show the current line number in the mode line")) +(define-key menu-bar-showhide-menu [size-indication-mode] + (menu-bar-make-mm-toggle size-indication-mode + "Size Indication" + "Show the size of the buffer in the mode line")) + (define-key menu-bar-showhide-menu [linecolumn-separator] '("--"))
--- a/lisp/midnight.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/midnight.el Thu May 05 00:04:55 2005 +0000 @@ -48,6 +48,11 @@ :group 'calendar :version "20.3") +(defvar midnight-timer nil + "Timer running the `midnight-hook' `midnight-delay' seconds after midnight. +Use `cancel-timer' to stop it and `midnight-delay-set' to change +the time when it is run.") + (defcustom midnight-mode nil "*Non-nil means run `midnight-hook' at midnight. Setting this variable outside customize has no effect; @@ -204,11 +209,6 @@ (multiple-value-bind (sec min hrs) (decode-time) (- (* 24 60 60) (* 60 60 hrs) (* 60 min) sec))) -(defvar midnight-timer nil - "Timer running the `midnight-hook' `midnight-delay' seconds after midnight. -Use `cancel-timer' to stop it and `midnight-delay-set' to change -the time when it is run.") - ;;;###autoload (defun midnight-delay-set (symb tm) "Modify `midnight-timer' according to `midnight-delay'.
--- a/lisp/mouse.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/mouse.el Thu May 05 00:04:55 2005 +0000 @@ -908,7 +908,6 @@ (track-mouse (while (progn (setq event (read-event)) - (setq mve (cons event (and (boundp 'mve) mve))) (or (mouse-movement-p event) (memq (car-safe event) '(switch-frame select-window)))) (if (memq (car-safe event) '(switch-frame select-window))
--- a/lisp/net/net-utils.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/net/net-utils.el Thu May 05 00:04:55 2005 +0000 @@ -160,7 +160,7 @@ "Regexp to match the nslookup prompt. This variable is only used if the variable -`comint-use-prompt-regexp-instead-of-fields' is non-nil." +`comint-use-prompt-regexp' is non-nil." :group 'net-utils :type 'regexp) @@ -183,7 +183,7 @@ "Regexp which matches the FTP program's prompt. This variable is only used if the variable -`comint-use-prompt-regexp-instead-of-fields' is non-nil." +`comint-use-prompt-regexp' is non-nil." :group 'net-utils :type 'regexp) @@ -201,7 +201,7 @@ "Regexp which matches the smbclient program's prompt. This variable is only used if the variable -`comint-use-prompt-regexp-instead-of-fields' is non-nil." +`comint-use-prompt-regexp' is non-nil." :group 'net-utils :type 'regexp)
--- a/lisp/net/rlogin.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/net/rlogin.el Thu May 05 00:04:55 2005 +0000 @@ -179,10 +179,15 @@ (let* ((process-connection-type rlogin-process-connection-type) (args (if rlogin-explicit-args - (append (rlogin-parse-words input-args) + (append (split-string input-args) rlogin-explicit-args) - (rlogin-parse-words input-args))) - (host (car args)) + (split-string input-args))) + (host (let ((tail args)) + ;; Find first arg that doesn't look like an option. + ;; This still loses for args that take values, feh. + (while (and tail (= ?- (aref (car tail) 0))) + (setq tail (cdr tail))) + (car tail))) (user (or (car (cdr (member "-l" args))) (user-login-name))) (buffer-name (if (string= user (user-login-name)) @@ -281,19 +286,6 @@ (goto-char orig-point))))))) -;; Parse a line into its constituent parts (words separated by -;; whitespace). Return a list of the words. -(defun rlogin-parse-words (line) - (let ((list nil) - (posn 0) - (match-data (match-data))) - (while (string-match "[^ \t\n]+" line posn) - (setq list (cons (substring line (match-beginning 0) (match-end 0)) - list)) - (setq posn (match-end 0))) - (set-match-data (match-data)) - (nreverse list))) - (defun rlogin-send-Ctrl-C () (interactive) (process-send-string nil "\C-c"))
--- a/lisp/novice.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/novice.el Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ ;;; novice.el --- handling of disabled commands ("novice mode") for Emacs -;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004 +;; Copyright (C) 1985, 1986, 1987, 1994, 2002, 2004, 2005 ;; Free Software Foundation, Inc. ;; Maintainer: FSF @@ -182,9 +182,10 @@ (if (search-forward (concat "(put '" (symbol-name command) " ") nil t) (delete-region (progn (beginning-of-line) (point)) - (progn (forward-line 1) (point)))) - (goto-char (point-max)) - (insert "\n(put '" (symbol-name command) " 'disabled t)\n") + (progn (forward-line 1) (point))) + (goto-char (point-max)) + (insert ?\n)) + (insert "(put '" (symbol-name command) " 'disabled t)\n") (save-buffer)))) (provide 'novice)
--- a/lisp/pcvs-info.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/pcvs-info.el Thu May 05 00:04:55 2005 +0000 @@ -41,11 +41,13 @@ ;;;; config variables ;;;; -(defcustom cvs-display-full-path t - "*Specifies how the filenames should look like in the listing. -If t, their full path name will be displayed, else only the filename." +(defcustom cvs-display-full-name t + "*Specifies how the filenames should be displayed in the listing. +If non-nil, their full filename name will be displayed, else only the +non-directory part." :group 'pcl-cvs :type '(boolean)) +(define-obsolete-variable-alias 'cvs-display-full-path 'cvs-display-full-name) (defcustom cvs-allow-dir-commit nil "*Allow `cvs-mode-commit' on directories. @@ -165,7 +167,7 @@ ;; In addition to the above, the following values can be extracted: ;; handled ;; t if this file doesn't require further action. - ;; full-path ;; The complete relative filename. + ;; full-name ;; The complete relative filename. ;; pp-name ;; The printed file name ;; backup-file;; For MERGED and CONFLICT files after a \"cvs update\", ;; this is a full path to the backup file where the @@ -201,7 +203,7 @@ ;; Fake selectors: -(defun cvs-fileinfo->full-path (fileinfo) +(defun cvs-fileinfo->full-name (fileinfo) "Return the full path for the file that is described in FILEINFO." (let ((dir (cvs-fileinfo->dir fileinfo))) (if (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE) @@ -209,11 +211,12 @@ ;; Here, I use `concat' rather than `expand-file-name' because I want ;; the resulting path to stay relative if `dir' is relative. (concat dir (cvs-fileinfo->file fileinfo))))) +(define-obsolete-function-alias 'cvs-fileinfo->full-path 'cvs-fileinfo->full-name) (defun cvs-fileinfo->pp-name (fi) "Return the filename of FI as it should be displayed." - (if cvs-display-full-path - (cvs-fileinfo->full-path fi) + (if cvs-display-full-name + (cvs-fileinfo->full-name fi) (cvs-fileinfo->file fi))) (defun cvs-fileinfo->backup-file (fileinfo) @@ -225,10 +228,11 @@ (concat "\\`" (regexp-quote cvs-bakprefix) (regexp-quote file) "\\(\\.[0-9]+\\.[0-9]+\\)+\\'"))) bf) - (dolist (f files bf) + (dolist (f files) (when (and (file-readable-p f) (or (null bf) (file-newer-than-file-p f bf))) - (setq bf (concat dir f)))))) + (setq bf f))) + (concat dir bf))) ;; (defun cvs-fileinfo->handled (fileinfo) ;; "Tell if this requires further action" @@ -327,7 +331,7 @@ (insert (case type (DIRCHANGE (concat "In directory " - (cvs-add-face (cvs-fileinfo->full-path fileinfo) + (cvs-add-face (cvs-fileinfo->full-name fileinfo) 'cvs-header-face t 'cvs-goal-column t) ":"))
--- a/lisp/pcvs.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/pcvs.el Thu May 05 00:04:55 2005 +0000 @@ -233,7 +233,7 @@ nil ;don't update display while running "status" "-v" - (cvs-fileinfo->full-path (car marked))) + (cvs-fileinfo->full-name (car marked))) (goto-char (point-min)) (let ((tags (cvs-status-get-tags))) (when (listp tags) tags))))))) @@ -512,7 +512,7 @@ (let* ((dir+files+rest (if (or (null fis) (not single-dir)) ;; not single-dir mode: just process the whole thing - (list "" (mapcar 'cvs-fileinfo->full-path fis) nil) + (list "" (mapcar 'cvs-fileinfo->full-name fis) nil) ;; single-dir mode: extract the same-dir-elements (let ((dir (cvs-fileinfo->dir (car fis)))) ;; output the concerned dir so the parser can translate paths @@ -611,7 +611,7 @@ (append (cvs-flags-query 'cvs-cvs-flags nil 'noquery) (if cvs-cvsroot (list "-d" cvs-cvsroot)) args - (mapcar 'cvs-fileinfo->full-path fis)))))) + (mapcar 'cvs-fileinfo->full-name fis)))))) (defun cvs-update-header (cmd add) (let* ((hf (ewoc-get-hf cvs-cookies)) @@ -831,7 +831,7 @@ (and (or (eq (cvs-fileinfo->type fi) 'REMOVED) (and (eq (cvs-fileinfo->type fi) 'CONFLICT) (eq (cvs-fileinfo->subtype fi) 'REMOVED))) - (file-exists-p (cvs-fileinfo->full-path fi)))) + (file-exists-p (cvs-fileinfo->full-name fi)))) ;; called at the following times: ;; - postparse ((eq cvs-auto-remove-handled t) cvs-auto-remove-directories nil) @@ -1406,7 +1406,7 @@ (defun cvs-mode-files (&rest -cvs-mode-files-args) (cvs-mode! (lambda () - (mapcar 'cvs-fileinfo->full-path + (mapcar 'cvs-fileinfo->full-name (apply 'cvs-mode-marked -cvs-mode-files-args))))) ;; @@ -1564,7 +1564,7 @@ ;; find directories and look for fis needing a description (dolist (fi fis) (cond - ((file-directory-p (cvs-fileinfo->full-path fi)) (push fi dirs)) + ((file-directory-p (cvs-fileinfo->full-name fi)) (push fi dirs)) ((eq (cvs-fileinfo->type fi) 'UNKNOWN) (setq needdesc t)))) ;; prompt for description if necessary (let* ((msg (if (and needdesc @@ -1642,8 +1642,8 @@ Signal an error if there is no backup file." (let ((backup-file (cvs-fileinfo->backup-file fileinfo))) (unless backup-file - (error "%s has no backup file" (cvs-fileinfo->full-path fileinfo))) - (list backup-file (cvs-fileinfo->full-path fileinfo)))) + (error "%s has no backup file" (cvs-fileinfo->full-name fileinfo))) + (list backup-file (cvs-fileinfo->full-name fileinfo)))) ;; ;; Emerge support @@ -1697,7 +1697,7 @@ (defun cvs-retrieve-revision (fileinfo rev) "Retrieve the given REVision of the file in FILEINFO into a new buffer." - (let* ((file (cvs-fileinfo->full-path fileinfo)) + (let* ((file (cvs-fileinfo->full-name fileinfo)) (buffile (concat file "." rev))) (or (find-buffer-visiting buffile) (with-current-buffer (create-file-buffer buffile) @@ -1729,7 +1729,7 @@ (interactive) (let ((fi (cvs-mode-marked 'merge nil :one t :file t))) (let ((merge (cvs-fileinfo->merge fi)) - (file (cvs-fileinfo->full-path fi)) + (file (cvs-fileinfo->full-name fi)) (backup-file (cvs-fileinfo->backup-file fi))) (if (not (and merge backup-file)) (let ((buf (find-file-noselect file))) @@ -1760,7 +1760,7 @@ (list (or rev1 (cvs-flags-query 'cvs-idiff-version)) rev2))) (let ((fi (cvs-mode-marked 'diff "idiff" :one t :file t))) - (let* ((file (cvs-fileinfo->full-path fi)) + (let* ((file (cvs-fileinfo->full-name fi)) (rev1-buf (cvs-retrieve-revision fi (or rev1 "BASE"))) (rev2-buf (if rev2 (cvs-retrieve-revision fi rev2))) ;; this binding is used by cvs-ediff-startup-hook @@ -1778,13 +1778,13 @@ (error "idiff-other cannot be applied to more than 2 files at a time")) (let* ((fi1 (car fis)) (rev1-buf (if rev1 (cvs-retrieve-revision fi1 rev1) - (find-file-noselect (cvs-fileinfo->full-path fi1)))) + (find-file-noselect (cvs-fileinfo->full-name fi1)))) rev2-buf) (if (cdr fis) (let ((fi2 (nth 1 fis))) (setq rev2-buf (if rev2 (cvs-retrieve-revision fi2 rev2) - (find-file-noselect (cvs-fileinfo->full-path fi2))))) + (find-file-noselect (cvs-fileinfo->full-name fi2))))) (error "idiff-other doesn't know what other file/buffer to use")) (let* (;; this binding is used by cvs-ediff-startup-hook (cvs-transient-buffers (list rev1-buf rev2-buf))) @@ -1799,7 +1799,7 @@ (let (ret) (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) (when (cvs-string-prefix-p - (expand-file-name (cvs-fileinfo->full-path fi) dir) + (expand-file-name (cvs-fileinfo->full-name fi) dir) buffer-file-name) (setq ret t))) ret))) @@ -2002,7 +2002,7 @@ (set-buffer cvs-buf) (setq default-directory odir)) (let ((buf (if rev (cvs-retrieve-revision fi rev) - (find-file-noselect (cvs-fileinfo->full-path fi))))) + (find-file-noselect (cvs-fileinfo->full-name fi))))) (funcall (cond ((eq other 'dont-select) 'display-buffer) (other (if view 'view-buffer-other-window @@ -2093,14 +2093,14 @@ (silent (or (not cvs-confirm-removals) (cvs-every (lambda (fi) (or (not (file-exists-p - (cvs-fileinfo->full-path fi))) + (cvs-fileinfo->full-name fi))) (cvs-applicable-p fi 'safe-rm))) files))) (tmpbuf (cvs-temp-buffer))) (when (and (not silent) (equal cvs-confirm-removals 'list)) (with-current-buffer tmpbuf (let ((inhibit-read-only t)) - (cvs-insert-strings (mapcar 'cvs-fileinfo->full-path fis)) + (cvs-insert-strings (mapcar 'cvs-fileinfo->full-name fis)) (cvs-pop-to-buffer-same-frame (current-buffer)) (shrink-window-if-larger-than-buffer)))) (if (not (or silent @@ -2119,7 +2119,7 @@ (progn (message "Aborting") nil) (dolist (fi files) (let* ((type (cvs-fileinfo->type fi)) - (file (cvs-fileinfo->full-path fi))) + (file (cvs-fileinfo->full-name fi))) (when (or all (eq type 'UNKNOWN)) (when (file-exists-p file) (delete-file file)) (unless all (setf (cvs-fileinfo->type fi) 'DEAD) t)))) @@ -2166,7 +2166,7 @@ (interactive) (let ((marked (cvs-get-marked (cvs-ignore-marks-p "byte-compile")))) (dolist (fi marked) - (let ((filename (cvs-fileinfo->full-path fi))) + (let ((filename (cvs-fileinfo->full-name fi))) (when (string-match "\\.el\\'" filename) (byte-compile-file filename)))))) @@ -2237,7 +2237,7 @@ (defun cvs-revert-if-needed (fis) (dolist (fileinfo fis) - (let* ((file (cvs-fileinfo->full-path fileinfo)) + (let* ((file (cvs-fileinfo->full-name fileinfo)) (buffer (find-buffer-visiting file))) ;; For a revert to happen the user must be editing the file... (unless (or (null buffer)
--- a/lisp/progmodes/cmacexp.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/cmacexp.el Thu May 05 00:04:55 2005 +0000 @@ -118,6 +118,7 @@ (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") ((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C") + ((memq system-type '(darwin berkeley-unix)) "gcc -E -C -") (t "/lib/cpp -C")) "The preprocessor used by the cmacexp package.
--- a/lisp/progmodes/compile.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/compile.el Thu May 05 00:04:55 2005 +0000 @@ -710,7 +710,7 @@ `(,(car elt) (compilation-directory-properties ,(car elt) ,(cdr elt)) - t)) + t t)) (cdr compilation-directory-matcher))))) ;; Compiler warning/error lines. @@ -733,11 +733,12 @@ ;; allowed `line' to be a function that computed the actual ;; error location. Let's do our best. `(,(car item) - (0 (compilation-compat-error-properties - (funcall ',line (cons (match-string ,file) - (cons default-directory - ',(nthcdr 4 item))) - ,(if col `(match-string ,col))))) + (0 (save-match-data + (compilation-compat-error-properties + (funcall ',line (cons (match-string ,file) + (cons default-directory + ',(nthcdr 4 item))) + ,(if col `(match-string ,col)))))) (,file compilation-error-face t)) (unless (or (null (nth 5 item)) (integerp (nth 5 item))) @@ -1589,6 +1590,8 @@ (point)))) (set-window-point w mk)) +(defvar next-error-highlight-timer) + (defun compilation-goto-locus (msg mk end-mk) "Jump to an error corresponding to MSG at MK. All arguments are markers. If END-MK is non-nil, mark is set there
--- a/lisp/progmodes/cperl-mode.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/cperl-mode.el Thu May 05 00:04:55 2005 +0000 @@ -1514,14 +1514,14 @@ (set 'font-lock-unfontify-region-function ; not present with old Emacs 'cperl-font-lock-unfontify-region-function) (make-local-variable 'cperl-syntax-done-to) - ;; Another bug: unless font-lock-syntactic-keywords, font-lock - ;; ignores syntax-table text-property. (t) is a hack - ;; to make font-lock think that font-lock-syntactic-keywords - ;; are defined (make-local-variable 'font-lock-syntactic-keywords) (setq font-lock-syntactic-keywords (if cperl-syntaxify-by-font-lock - '(t (cperl-fontify-syntaxically)) + '((cperl-fontify-syntaxically)) + ;; unless font-lock-syntactic-keywords, font-lock (pre-22.1) + ;; used to ignore syntax-table text-properties. (t) is a hack + ;; to make font-lock think that font-lock-syntactic-keywords + ;; are defined. '(t))))) (make-local-variable 'cperl-old-style) (if (boundp 'normal-auto-fill-function) ; 19.33 and later
--- a/lisp/progmodes/f90.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/f90.el Thu May 05 00:04:55 2005 +0000 @@ -1109,9 +1109,15 @@ (let (icol cont (case-fold-search t) (pnt (point))) (save-excursion (if (not (f90-previous-statement)) - ;; First statement in buffer. + ;; If f90-previous-statement returns nil, we must have been + ;; called from on or before the first line of the first statement. (setq icol (if (save-excursion - (f90-next-statement) + ;; f90-previous-statement has moved us over + ;; comment/blank lines, so we need to get + ;; back to the first code statement. + (when (looking-at "[ \t]*\\([!#]\\|$\\)") + (f90-next-statement)) + (skip-chars-forward " \t0-9") (f90-looking-at-program-block-start)) 0 ;; No explicit PROGRAM start statement.
--- a/lisp/progmodes/flymake.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/flymake.el Thu May 05 00:04:55 2005 +0000 @@ -62,7 +62,8 @@ (replace-in-string str regexp rep))) (defun flymake-split-string (str pattern) - "Split, then remove first and/or last in case it's empty." + "Split STR into a list of substrings bounded by PATTERN. +Zero-length substrings at the beginning and end of the list are omitted." (let* ((splitted (split-string str pattern))) (if (and (> (length splitted) 0) (= 0 (length (elt splitted 0)))) (setq splitted (cdr splitted))) @@ -86,7 +87,12 @@ (lambda (&optional arg) (save-excursion (end-of-line arg) (point))))) (defun flymake-popup-menu (pos menu-data) - (if (and (fboundp 'popup-menu) (fboundp 'make-event)) + "Pop up the flymake menu at position POS, using the data MENU-DATA. +POS is a list of the form ((X Y) WINDOW), where X and Y are +pixels positions from the top left corner of WINDOW's frame. +MENU-DATA is a list of error and warning messages returned by +`flymake-make-err-menu-data'." + (if (featurep 'xemacs) (let* ((x-pos (nth 0 (nth 0 pos))) (y-pos (nth 1 (nth 0 pos))) (fake-event-props '(button 1 x 1 y 1))) @@ -96,6 +102,10 @@ (x-popup-menu pos (flymake-make-emacs-menu menu-data)))) (defun flymake-make-emacs-menu (menu-data) + "Return a menu specifier using MENU-DATA. +MENU-DATA is a list of error and warning messages returned by +`flymake-make-err-menu-data'. +See `x-popup-menu' for the menu specifier format." (let* ((menu-title (nth 0 menu-data)) (menu-items (nth 1 menu-data)) (menu-commands nil)) @@ -109,6 +119,7 @@ (defun flymake-nop ()) (defun flymake-make-xemacs-menu (menu-data) + "Return a menu specifier using MENU-DATA." (let* ((menu-title (nth 0 menu-data)) (menu-items (nth 1 menu-data)) (menu-commands nil)) @@ -152,7 +163,11 @@ :type 'integer) (defun flymake-log (level text &rest args) - "Log a message with optional arguments." + "Log a message at level LEVEL. +If LEVEL is higher than `flymake-log-level', the message is +ignored. Otherwise, it is printed using `message'. +TEXT is a format control string, and the remaining arguments ARGS +are the string substitutions (see `format')." (if (<= level flymake-log-level) (let* ((msg (apply 'format text args))) (message msg) @@ -176,69 +191,37 @@ tmp)) (defvar flymake-pid-to-names (flymake-makehash) - "pid -> source buffer name, output file name mapping.") + "Hash table mapping PIDs to source buffer names and output files.") (defun flymake-reg-names (pid source-buffer-name) - "Save into in PID map." + "Associate PID with SOURCE-BUFFER-NAME in `flymake-pid-to-names'." (unless (stringp source-buffer-name) (error "Invalid buffer name")) (puthash pid (list source-buffer-name) flymake-pid-to-names)) (defun flymake-get-source-buffer-name (pid) - "Return buffer name stored in PID map." + "Return buffer name associated with PID in `flymake-pid-to-names'." (nth 0 (gethash pid flymake-pid-to-names))) (defun flymake-unreg-names (pid) - "Delete PID->buffer name mapping." + "Remove the entry associated with PID from `flymake-pid-to-names'." (remhash pid flymake-pid-to-names)) -(defun flymake-get-buffer-var (buffer var-name) - "Switch to BUFFER if necessary and return local variable VAR-NAME." - (unless (bufferp buffer) - (error "Invalid buffer")) - - (if (eq buffer (current-buffer)) - (symbol-value var-name) - (with-current-buffer buffer - (symbol-value var-name)))) - -(defun flymake-set-buffer-var (buffer var-name var-value) - "Switch to BUFFER if necessary and set local variable VAR-NAME to VAR-VALUE." - (unless (bufferp buffer) - (error "Invalid buffer")) - - (if (eq buffer (current-buffer)) - (set var-name var-value) - (with-current-buffer buffer - (set var-name var-value)))) - (defvar flymake-buffer-data (flymake-makehash) "Data specific to syntax check tool, in name-value pairs.") (make-variable-buffer-local 'flymake-buffer-data) -(defun flymake-get-buffer-data (buffer) - (flymake-get-buffer-var buffer 'flymake-buffer-data)) - -(defun flymake-set-buffer-data (buffer data) - (flymake-set-buffer-var buffer 'flymake-buffer-data data)) - (defun flymake-get-buffer-value (buffer name) - (gethash name (flymake-get-buffer-data buffer))) + (gethash name (with-current-buffer buffer flymake-buffer-data))) (defun flymake-set-buffer-value (buffer name value) - (puthash name value (flymake-get-buffer-data buffer))) + (puthash name value (with-current-buffer buffer flymake-buffer-data))) (defvar flymake-output-residual nil) (make-variable-buffer-local 'flymake-output-residual) -(defun flymake-get-buffer-output-residual (buffer) - (flymake-get-buffer-var buffer 'flymake-output-residual)) - -(defun flymake-set-buffer-output-residual (buffer residual) - (flymake-set-buffer-var buffer 'flymake-output-residual residual)) - (defcustom flymake-allowed-file-name-masks '((".+\\.c$" flymake-simple-make-init flymake-simple-cleanup flymake-get-real-file-name) (".+\\.cpp$" flymake-simple-make-init flymake-simple-cleanup flymake-get-real-file-name) @@ -642,35 +625,38 @@ (flymake-parse-residual source-buffer) (flymake-post-syntax-check source-buffer exit-status command) - (flymake-set-buffer-is-running source-buffer nil)))) + (setq flymake-is-running nil)))) (error (let ((err-str (format "Error in process sentinel for buffer %s: %s" source-buffer (error-message-string err)))) (flymake-log 0 err-str) - (flymake-set-buffer-is-running source-buffer nil))))))) + (with-current-buffer source-buffer + (setq flymake-is-running nil)))))))) (defun flymake-post-syntax-check (source-buffer exit-status command) - (flymake-set-buffer-err-info source-buffer (flymake-get-buffer-new-err-info source-buffer)) - (flymake-set-buffer-new-err-info source-buffer nil) - - (flymake-set-buffer-err-info source-buffer (flymake-fix-line-numbers - (flymake-get-buffer-err-info source-buffer) - 1 - (flymake-count-lines source-buffer))) + (with-current-buffer source-buffer + (setq flymake-err-info flymake-new-err-info) + (setq flymake-new-err-info nil) + (setq flymake-err-info + (flymake-fix-line-numbers + flymake-err-info 1 (flymake-count-lines source-buffer)))) (flymake-delete-own-overlays source-buffer) - (flymake-highlight-err-lines source-buffer (flymake-get-buffer-err-info source-buffer)) - - (let ((err-count (flymake-get-err-count (flymake-get-buffer-err-info source-buffer) "e")) - (warn-count (flymake-get-err-count (flymake-get-buffer-err-info source-buffer) "w"))) + (flymake-highlight-err-lines + source-buffer (with-current-buffer source-buffer flymake-err-info)) + (let (err-count warn-count) + (with-current-buffer source-buffer + (setq err-count (flymake-get-err-count flymake-err-info "e")) + (setq warn-count (flymake-get-err-count flymake-err-info "w")) + (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" + (buffer-name source-buffer) err-count warn-count + (- (flymake-float-time) flymake-check-start-time)) + (setq flymake-check-start-time nil)) - (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" - (buffer-name source-buffer) err-count warn-count - (- (flymake-float-time) (flymake-get-buffer-check-start-time source-buffer))) - (flymake-set-buffer-check-start-time source-buffer nil) (if (and (equal 0 err-count) (equal 0 warn-count)) (if (equal 0 exit-status) (flymake-report-status source-buffer "" "") ; PASSED - (if (not (flymake-get-buffer-check-was-interrupted source-buffer)) + (if (not (with-current-buffer source-buffer + flymake-check-was-interrupted)) (flymake-report-fatal-status (current-buffer) "CFGERR" (format "Configuration error has occured while running %s" command)) (flymake-report-status source-buffer nil ""))) ; "STOPPED" @@ -679,38 +665,34 @@ (defun flymake-parse-output-and-residual (source-buffer output) "Split OUTPUT into lines, merge in residual if necessary." (with-current-buffer source-buffer - (let* ((buffer-residual (flymake-get-buffer-output-residual source-buffer)) + (let* ((buffer-residual flymake-output-residual) (total-output (if buffer-residual (concat buffer-residual output) output)) (lines-and-residual (flymake-split-output total-output)) (lines (nth 0 lines-and-residual)) (new-residual (nth 1 lines-and-residual))) - - (flymake-set-buffer-output-residual source-buffer new-residual) - (flymake-set-buffer-new-err-info source-buffer (flymake-parse-err-lines - (flymake-get-buffer-new-err-info source-buffer) - source-buffer lines))))) + (with-current-buffer source-buffer + (setq flymake-output-residual new-residual) + (setq flymake-new-err-info + (flymake-parse-err-lines + flymake-new-err-info + source-buffer lines)))))) (defun flymake-parse-residual (source-buffer) "Parse residual if it's non empty." (with-current-buffer source-buffer - (when (flymake-get-buffer-output-residual source-buffer) - (flymake-set-buffer-new-err-info source-buffer (flymake-parse-err-lines - (flymake-get-buffer-new-err-info source-buffer) - source-buffer - (list (flymake-get-buffer-output-residual source-buffer)))) - (flymake-set-buffer-output-residual source-buffer nil)))) + (when flymake-output-residual + (setq flymake-new-err-info + (flymake-parse-err-lines + flymake-new-err-info + source-buffer + (list flymake-output-residual))) + (setq flymake-output-residual nil)))) (defvar flymake-err-info nil "Sorted list of line numbers and lists of err info in the form (file, err-text).") (make-variable-buffer-local 'flymake-err-info) -(defun flymake-get-buffer-err-info (buffer) - (flymake-get-buffer-var buffer 'flymake-err-info)) - -(defun flymake-set-buffer-err-info (buffer err-info) - (flymake-set-buffer-var buffer 'flymake-err-info err-info)) - (defun flymake-er-make-er (line-no line-err-info-list) (list line-no line-err-info-list)) @@ -725,12 +707,6 @@ (make-variable-buffer-local 'flymake-new-err-info) -(defun flymake-get-buffer-new-err-info (buffer) - (flymake-get-buffer-var buffer 'flymake-new-err-info)) - -(defun flymake-set-buffer-new-err-info (buffer new-err-info) - (flymake-set-buffer-var buffer 'flymake-new-err-info new-err-info)) - ;; getters/setters for line-err-info: (file, line, type, text). (defun flymake-ler-make-ler (file line type text &optional full-file) (list file line type text full-file)) @@ -1067,7 +1043,11 @@ (and (not (flymake-ler-get-file line-one)) (not (flymake-ler-get-file line-two))))))) (defun flymake-add-line-err-info (line-err-info-list line-err-info) - "Insert new err info favoring sorting: err-type e/w, filename nil/non-nil." + "Update LINE-ERR-INFO-LIST with the error LINE-ERR-INFO. +For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'. +The new element is inserted in the proper position, according to +the predicate `flymake-line-err-info-is-less-or-equal'. +The updated value of LINE-ERR-INFO-LIST is returned." (if (not line-err-info-list) (list line-err-info) (let* ((count (length line-err-info-list)) @@ -1079,7 +1059,10 @@ line-err-info-list))) (defun flymake-add-err-info (err-info-list line-err-info) - "Add error info (file line type text) to err info list preserving sort order." + "Update ERR-INFO-LIST with the error LINE-ERR-INFO, preserving sort order. +Returns the updated value of ERR-INFO-LIST. +For the format of ERR-INFO-LIST, see `flymake-err-info'. +For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'." (let* ((line-no (if (flymake-ler-get-file line-err-info) 1 (flymake-ler-get-line line-err-info))) (info-and-pos (flymake-find-err-info err-info-list line-no)) (exists (car info-and-pos)) @@ -1202,16 +1185,16 @@ (unless (bufferp buffer) (error "Expected a buffer")) (with-current-buffer buffer - (flymake-log 3 "flymake is running: %s" (flymake-get-buffer-is-running buffer)) - (when (and (not (flymake-get-buffer-is-running buffer)) + (flymake-log 3 "flymake is running: %s" flymake-is-running) + (when (and (not flymake-is-running) (flymake-can-syntax-check-file (buffer-file-name buffer))) (when (or (not flymake-compilation-prevents-syntax-check) (not (flymake-compilation-is-running))) ;+ (flymake-rep-ort-status buffer "COMP") (flymake-clear-buildfile-cache) (flymake-clear-project-include-dirs-cache) - (flymake-set-buffer-check-was-interrupted buffer nil) - (flymake-set-buffer-data buffer (flymake-makehash 'equal)) + (setq flymake-check-was-interrupted nil) + (setq flymake-buffer-data (flymake-makehash 'equal)) (let* ((source-file-name (buffer-file-name buffer)) (init-f (flymake-get-init-function source-file-name)) @@ -1225,7 +1208,7 @@ (flymake-log 0 "init function %s for %s failed, cleaning up" init-f source-file-name) (funcall cleanup-f buffer)) (progn - (flymake-set-buffer-last-change-time buffer nil) + (setq flymake-last-change-time nil) (flymake-start-syntax-check-process buffer cmd args dir)))))))) (defun flymake-start-syntax-check-process (buffer cmd args dir) @@ -1242,9 +1225,10 @@ (flymake-reg-names (process-id process) (buffer-name buffer)) - (flymake-set-buffer-is-running buffer t) - (flymake-set-buffer-last-change-time buffer nil) - (flymake-set-buffer-check-start-time buffer (flymake-float-time)) + (with-current-buffer buffer + (setq flymake-is-running t) + (setq flymake-last-change-time nil) + (setq flymake-check-start-time (flymake-float-time))) (flymake-report-status buffer nil "*") (flymake-log 2 "started process %d, command=%s, dir=%s" @@ -1264,7 +1248,8 @@ (signal-process pid 9) (let* ((buffer-name (flymake-get-source-buffer-name pid))) (when (and buffer-name (get-buffer buffer-name)) - (flymake-set-buffer-check-was-interrupted (get-buffer buffer-name) t))) + (with-current-buffer (get-buffer buffer-name) + (setq flymake-check-was-interrupted t)))) (flymake-log 1 "killed process %d" pid)) (defun flymake-stop-all-syntax-checks () @@ -1288,56 +1273,26 @@ (make-variable-buffer-local 'flymake-is-running) -(defun flymake-get-buffer-is-running (buffer) - (flymake-get-buffer-var buffer 'flymake-is-running)) - -(defun flymake-set-buffer-is-running (buffer is-running) - (flymake-set-buffer-var buffer 'flymake-is-running is-running)) - (defvar flymake-timer nil "Timer for starting syntax check.") (make-variable-buffer-local 'flymake-timer) -(defun flymake-get-buffer-timer (buffer) - (flymake-get-buffer-var buffer 'flymake-timer)) - -(defun flymake-set-buffer-timer (buffer timer) - (flymake-set-buffer-var buffer 'flymake-timer timer)) - (defvar flymake-last-change-time nil "Time of last buffer change.") (make-variable-buffer-local 'flymake-last-change-time) -(defun flymake-get-buffer-last-change-time (buffer) - (flymake-get-buffer-var buffer 'flymake-last-change-time)) - -(defun flymake-set-buffer-last-change-time (buffer change-time) - (flymake-set-buffer-var buffer 'flymake-last-change-time change-time)) - (defvar flymake-check-start-time nil "Time at which syntax check was started.") (make-variable-buffer-local 'flymake-check-start-time) -(defun flymake-get-buffer-check-start-time (buffer) - (flymake-get-buffer-var buffer 'flymake-check-start-time)) - -(defun flymake-set-buffer-check-start-time (buffer check-start-time) - (flymake-set-buffer-var buffer 'flymake-check-start-time check-start-time)) - (defvar flymake-check-was-interrupted nil "Non-nil if syntax check was killed by `flymake-compile'.") (make-variable-buffer-local 'flymake-check-was-interrupted) -(defun flymake-get-buffer-check-was-interrupted (buffer) - (flymake-get-buffer-var buffer 'flymake-check-was-interrupted)) - -(defun flymake-set-buffer-check-was-interrupted (buffer interrupted) - (flymake-set-buffer-var buffer 'flymake-check-was-interrupted interrupted)) - (defcustom flymake-no-changes-timeout 0.5 "Time to wait after last change before starting compilation." :group 'flymake @@ -1345,12 +1300,13 @@ (defun flymake-on-timer-event (buffer) "Start a syntax check for buffer BUFFER if necessary." - ;;+(flymake-log 3 "timer: running=%s, time=%s, cur-time=%s" (flymake-get-buffer-is-running buffer) (flymake-get-buffer-last-change-time buffer) (flymake-float-time)) - (when (and (bufferp buffer) (not (flymake-get-buffer-is-running buffer))) + (when (bufferp buffer) (with-current-buffer buffer - (when (and (flymake-get-buffer-last-change-time buffer) - (> (flymake-float-time) (+ flymake-no-changes-timeout (flymake-get-buffer-last-change-time buffer)))) - (flymake-set-buffer-last-change-time buffer nil) + (when (and (not flymake-is-running) + flymake-last-change-time + (> (flymake-float-time) (+ flymake-no-changes-timeout flymake-last-change-time))) + + (setq flymake-last-change-time nil) (flymake-log 3 "starting syntax check as more than 1 second passed since last change") (flymake-start-syntax-check buffer))))) @@ -1391,7 +1347,7 @@ "Display a menu with errors/warnings for current line if it has errors and/or warnings." (interactive) (let* ((line-no (flymake-current-line-no)) - (line-err-info-list (nth 0 (flymake-find-err-info (flymake-get-buffer-err-info (current-buffer)) line-no))) + (line-err-info-list (nth 0 (flymake-find-err-info flymake-err-info line-no))) (menu-data (flymake-make-err-menu-data line-no line-err-info-list)) (choice nil) (mouse-pos (flymake-get-point-pixel-pos)) @@ -1442,46 +1398,27 @@ (make-variable-buffer-local 'flymake-mode-line) -(defun flymake-get-buffer-mode-line (buffer) - (flymake-get-buffer-var buffer 'flymake-mode-line)) - -(defun flymake-set-buffer-mode-line (buffer mode-line-string) - (flymake-set-buffer-var buffer 'flymake-mode-line mode-line-string)) - (defvar flymake-mode-line-e-w nil) (make-variable-buffer-local 'flymake-mode-line-e-w) -(defun flymake-get-buffer-mode-line-e-w (buffer) - (flymake-get-buffer-var buffer 'flymake-mode-line-e-w)) - -(defun flymake-set-buffer-mode-line-e-w (buffer e-w) - (flymake-set-buffer-var buffer 'flymake-mode-line-e-w e-w)) - (defvar flymake-mode-line-status nil) (make-variable-buffer-local 'flymake-mode-line-status) -(defun flymake-get-buffer-mode-line-status (buffer) - (flymake-get-buffer-var buffer 'flymake-mode-line-status)) - -(defun flymake-set-buffer-mode-line-status (buffer status) - (flymake-set-buffer-var buffer 'flymake-mode-line-status status)) - (defun flymake-report-status (buffer e-w &optional status) "Show status in mode line." (when (bufferp buffer) (with-current-buffer buffer (when e-w - (flymake-set-buffer-mode-line-e-w buffer e-w) - ) + (setq flymake-mode-line-e-w e-w)) (when status - (flymake-set-buffer-mode-line-status buffer status)) + (setq flymake-mode-line-status status)) (let* ((mode-line " Flymake")) - (when (> (length (flymake-get-buffer-mode-line-e-w buffer)) 0) - (setq mode-line (concat mode-line ":" (flymake-get-buffer-mode-line-e-w buffer)))) - (setq mode-line (concat mode-line (flymake-get-buffer-mode-line-status buffer))) - (flymake-set-buffer-mode-line buffer mode-line) + (when (> (length flymake-mode-line-e-w) 0) + (setq mode-line (concat mode-line ":" flymake-mode-line-e-w))) + (setq mode-line (concat mode-line flymake-mode-line-status)) + (setq flymake-mode-line mode-line) (force-mode-line-update))))) (defun flymake-display-warning (warning) @@ -1532,7 +1469,8 @@ (flymake-report-status (current-buffer) "" "") - (flymake-set-buffer-timer (current-buffer) (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) + (setq flymake-timer + (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) (setq flymake-mode t) (flymake-log 1 "flymake mode turned ON for buffer %s" (buffer-name (current-buffer))) @@ -1550,12 +1488,11 @@ (flymake-delete-own-overlays (current-buffer)) - (when (flymake-get-buffer-timer (current-buffer)) - (cancel-timer (flymake-get-buffer-timer (current-buffer))) - (flymake-set-buffer-timer (current-buffer) nil)) + (when flymake-timer + (cancel-timer flymake-timer) + (setq flymake-timer nil)) - (flymake-set-buffer-is-running (current-buffer) nil) - + (setq flymake-is-running nil) (setq flymake-mode nil) (flymake-log 1 "flymake mode turned OFF for buffer %s" (buffer-name (current-buffer))))) @@ -1571,7 +1508,7 @@ (when (and flymake-start-syntax-check-on-newline (equal new-text "\n")) (flymake-log 3 "starting syntax check as new-line has been seen") (flymake-start-syntax-check-for-current-buffer)) - (flymake-set-buffer-last-change-time (current-buffer) (flymake-float-time)))) + (setq flymake-last-change-time (flymake-float-time)))) (defun flymake-after-save-hook () (if (local-variable-p 'flymake-mode (current-buffer)) ; (???) other way to determine whether flymake is active in buffer being saved? @@ -1580,9 +1517,9 @@ (flymake-start-syntax-check-for-current-buffer)))) ; no more mode 3. cannot start check if mode 3 (to temp copies) is active - (???) (defun flymake-kill-buffer-hook () - (when (flymake-get-buffer-timer (current-buffer)) - (cancel-timer (flymake-get-buffer-timer (current-buffer))) - (flymake-set-buffer-timer (current-buffer) nil))) + (when flymake-timer + (cancel-timer flymake-timer) + (setq flymake-timer nil))) (defun flymake-find-file-hook () ;;+(when flymake-start-syntax-check-on-find-file @@ -1636,9 +1573,9 @@ (defun flymake-goto-next-error () "Go to next error in err ring." (interactive) - (let ((line-no (flymake-get-next-err-line-no (flymake-get-buffer-err-info (current-buffer)) (flymake-current-line-no)))) + (let ((line-no (flymake-get-next-err-line-no flymake-err-info (flymake-current-line-no)))) (when (not line-no) - (setq line-no (flymake-get-first-err-line-no (flymake-get-buffer-err-info (current-buffer)))) + (setq line-no (flymake-get-first-err-line-no flymake-err-info)) (flymake-log 1 "passed end of file")) (if line-no (flymake-goto-line line-no) @@ -1647,9 +1584,9 @@ (defun flymake-goto-prev-error () "Go to prev error in err ring." (interactive) - (let ((line-no (flymake-get-prev-err-line-no (flymake-get-buffer-err-info (current-buffer)) (flymake-current-line-no)))) + (let ((line-no (flymake-get-prev-err-line-no flymake-err-info (flymake-current-line-no)))) (when (not line-no) - (setq line-no (flymake-get-last-err-line-no (flymake-get-buffer-err-info (current-buffer)))) + (setq line-no (flymake-get-last-err-line-no flymake-err-info)) (flymake-log 1 "passed beginning of file")) (if line-no (flymake-goto-line line-no) @@ -1721,7 +1658,8 @@ Delete temp file." (let* ((temp-source-file-name (flymake-get-buffer-value buffer "temp-source-file-name"))) (flymake-safe-delete-file temp-source-file-name) - (flymake-set-buffer-last-change-time buffer nil))) + (with-current-buffer buffer + (setq flymake-last-change-time nil)))) (defun flymake-get-real-file-name (buffer file-name-from-err-msg) "Translate file name from error message to \"real\" file name.
--- a/lisp/progmodes/gdb-ui.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/gdb-ui.el Thu May 05 00:04:55 2005 +0000 @@ -79,8 +79,11 @@ (defvar gdb-overlay-arrow-position nil) (defvar gdb-server-prefix nil) (defvar gdb-flush-pending-output nil) -(defvar gdb-location-list nil "Alist of breakpoint numbers and full filenames.") +(defvar gdb-location-alist nil + "Alist of breakpoint numbers and full filenames.") (defvar gdb-find-file-unhook nil) +(defvar gdb-active-process nil "GUD tooltips display variable values when t, \ +and #define directives otherwise.") (defvar gdb-buffer-type nil "One of the symbols bound in `gdb-buffer-rules'.") @@ -193,6 +196,43 @@ :group 'gud :version "22.1") +(defcustom gdb-cpp-define-alist-program + (cond ((eq system-type 'ms-dos) "gcc -E -dM -o - -") + (t "gcc -E -dM -")) + "The program name for generating an alist of #define directives. +This list is used to display the #define directive associated +with an identifier as a tooltip. It works in a debug session with +GDB, when tooltip-gud-tips-p is t." + :type 'string + :group 'gud + :version "22.1") + +(defcustom gdb-cpp-define-alist-flags "" + "*Preprocessor flags used by `gdb-create-define-alist'." + :type 'string + :group 'gud + :version "22.1") + +(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") + +(defun gdb-create-define-alist () + "Create an alist of #define directives for GUD tooltips." + (let* ((file (buffer-file-name)) + (output + (with-output-to-string + (with-current-buffer standard-output + (call-process shell-file-name + (if (file-exists-p file) file nil) + (list t nil) nil "-c" + (concat gdb-cpp-define-alist-program " " + gdb-cpp-define-alist-flags))))) + (define-list (split-string output "\n" t)) + (name)) + (setq gdb-define-alist nil) + (dolist (define define-list) + (setq name (nth 1 (split-string define "[( ]"))) + (push (cons name define) gdb-define-alist)))) + (defun gdb-set-gud-minor-mode (buffer) "Set gud-minor-mode from find-file if appropriate." (goto-char (point-min)) @@ -205,13 +245,16 @@ (defun gdb-set-gud-minor-mode-1 (buffer) (goto-char (point-min)) - (if (and (search-forward "Located in " nil t) - (looking-at "\\S-*") - (string-equal (buffer-file-name buffer) - (match-string 0))) - (with-current-buffer buffer - (set (make-local-variable 'gud-minor-mode) 'gdba) - (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)))) + (when (and (search-forward "Located in " nil t) + (looking-at "\\S-*") + (string-equal (buffer-file-name buffer) + (match-string 0))) + (with-current-buffer buffer + (set (make-local-variable 'gud-minor-mode) 'gdba) + (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) + (make-local-variable 'gdb-define-alist) + (gdb-create-define-alist) + (add-hook 'after-save-hook 'gdb-create-define-alist nil t)))) (defun gdb-set-gud-minor-mode-existing-buffers () (dolist (buffer (buffer-list)) @@ -281,7 +324,7 @@ (setq gdb-output-sink 'user) (setq gdb-server-prefix "server ") (setq gdb-flush-pending-output nil) - (setq gdb-location-list nil) + (setq gdb-location-alist nil) (setq gdb-find-file-unhook nil) ;; (setq gdb-buffer-type 'gdba) @@ -301,7 +344,7 @@ (run-hooks 'gdba-mode-hook)) (defcustom gdb-use-colon-colon-notation nil - "If non-nil use FUN::VAR format to display variables in the speedbar." ; + "If non-nil use FUN::VAR format to display variables in the speedbar." :type 'boolean :group 'gud :version "22.1") @@ -430,7 +473,8 @@ (let ((varnum (match-string 1))) (gdb-enqueue-input (list - (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) + (if (with-current-buffer gud-comint-buffer + (eq gud-minor-mode 'gdba)) (concat "server interpreter mi \"-var-evaluate-expression " varnum "\"\n") (concat "-var-evaluate-expression " varnum "\n")) @@ -482,7 +526,8 @@ (list (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) - (concat "server interpreter mi \"-var-assign " varnum " " value "\"\n") + (concat "server interpreter mi \"-var-assign " + varnum " " value "\"\n") (concat "-var-assign " varnum " " value "\n")) 'ignore)))) @@ -773,8 +818,8 @@ ("post-prompt" gdb-post-prompt) ("source" gdb-source) ("starting" gdb-starting) - ("exited" gdb-stopping) - ("signalled" gdb-stopping) + ("exited" gdb-exited) + ("signalled" gdb-exited) ("signal" gdb-stopping) ("breakpoint" gdb-stopping) ("watchpoint" gdb-stopping) @@ -800,7 +845,7 @@ (setq gud-last-frame (cons (match-string 1 args) - (string-to-int (match-string 2 args)))) + (string-to-number (match-string 2 args)))) (setq gdb-current-address (match-string 3 args)) ;; cover for auto-display output which comes *before* ;; stopped annotation @@ -850,6 +895,7 @@ "An annotation handler for `starting'. This says that I/O for the subprocess is now the program being debugged, not GDB." + (setq gdb-active-process t) (let ((sink gdb-output-sink)) (cond ((eq sink 'user) @@ -862,7 +908,7 @@ (error "Unexpected `starting' annotation"))))) (defun gdb-stopping (ignored) - "An annotation handler for `exited' and other annotations. + "An annotation handler for `breakpoint' and other annotations. They say that I/O for the subprocess is now GDB, not the program being debugged." (if gdb-use-inferior-io-buffer @@ -874,6 +920,15 @@ (gdb-resync) (error "Unexpected stopping annotation")))))) +(defun gdb-exited (ignored) + "An annotation handler for `exited' and `signalled'. +They say that I/O for the subprocess is now GDB, not the program +being debugged and that the program is no longer running. This +function is used to change the focus of GUD tooltips to #define +directives." + (setq gdb-active-process nil) + (gdb-stopping ignored)) + (defun gdb-frame-begin (ignored) (let ((sink gdb-output-sink)) (cond @@ -981,7 +1036,8 @@ (match-beginning 0)))) ;; ;; Everything after, we save, to combine with later input. - (setq gud-marker-acc (substring gud-marker-acc (match-beginning 0)))) + (setq gud-marker-acc (substring gud-marker-acc + (match-beginning 0)))) ;; ;; In case we know the gud-marker-acc contains no partial annotations: (progn @@ -1045,7 +1101,7 @@ ;; annotation rule binding of whatever gdb sends to tell us this command ;; might have changed it's output. ;; -;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed. +;; NAME is the function name. DEMAND-PREDICATE tests if output is really needed. ;; GDB-COMMAND is a string of such. OUTPUT-HANDLER is the function bound to the ;; input in the input queue (see comment about ``gdb communications'' above). @@ -1077,8 +1133,9 @@ ;; put customisation here (,custom-defun))) -(defmacro def-gdb-auto-updated-buffer (buffer-key trigger-name gdb-command - output-handler-name custom-defun) +(defmacro def-gdb-auto-updated-buffer (buffer-key + trigger-name gdb-command + output-handler-name custom-defun) `(progn (def-gdb-auto-update-trigger ,trigger-name ;; The demand predicate: @@ -1225,7 +1282,7 @@ '(mouse-face highlight help-echo "mouse-2, RET: visit breakpoint")) (unless (file-exists-p file) - (setq file (cdr (assoc bptno gdb-location-list)))) + (setq file (cdr (assoc bptno gdb-location-alist)))) (unless (string-equal file "File not found") (if file (with-current-buffer (find-file-noselect file) @@ -1233,13 +1290,15 @@ 'gdba) (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) - ;; only want one breakpoint icon at each location + ;; only want one breakpoint icon at each + ;; location (save-excursion (goto-line (string-to-number line)) (gdb-put-breakpoint-icon (eq flag ?y) bptno))) (gdb-enqueue-input - (list (concat "list " - (match-string-no-properties 1) ":1\n") + (list + (concat "list " + (match-string-no-properties 1) ":1\n") 'ignore)) (gdb-enqueue-input (list "info source\n" @@ -1351,7 +1410,7 @@ (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+")) + "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*\\(.\\)\\s-*\\S-*\\s-*\\S-*:[0-9]+")) (gdb-enqueue-input (list (concat gdb-server-prefix @@ -1383,14 +1442,15 @@ (if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)) (looking-at "\\([0-9]+\\) .* in .* at\\s-+\\(\\S-*\\):\\([0-9]+\\)") (looking-at - "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\\(\\S-*\\):\\([0-9]+\\)")) + "\\([0-9]+\\)\\s-*\\S-*\\s-*\\S-*\\s-*.\\s-*\\S-*\\s-*\ +\\(\\S-*\\):\\([0-9]+\\)")) (let ((bptno (match-string 1)) (file (match-string 2)) (line (match-string 3))) (save-selected-window (let* ((buf (find-file-noselect (if (file-exists-p file) file - (cdr (assoc bptno gdb-location-list))))) + (cdr (assoc bptno gdb-location-alist))))) (window (display-buffer buf))) (with-current-buffer buf (goto-line (string-to-number line)) @@ -1481,7 +1541,8 @@ (interactive (list last-input-event)) (if event (mouse-set-point event)) (gdb-enqueue-input - (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n") 'ignore)) + (list (concat gdb-server-prefix "frame " + (gdb-get-frame-number) "\n") 'ignore)) (gud-display-frame)) @@ -1668,7 +1729,7 @@ (save-selected-window (select-window (posn-window (event-start event))) (let* ((arg (read-from-minibuffer "Repeat count: ")) - (count (string-to-int arg))) + (count (string-to-number arg))) (if (< count 0) (error "Non-negative numbers only") (customize-set-variable 'gdb-memory-repeat-count count) @@ -1976,7 +2037,8 @@ (let ((menu (make-sparse-keymap "GDB-Windows"))) (define-key gud-menu-map [displays] - `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba))) + `(menu-item "GDB-Windows" ,menu + :visible (memq gud-minor-mode '(gdbmi gdba)))) (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer)) (define-key menu [threads] '("Threads" . gdb-display-threads-buffer)) (define-key menu [memory] '("Memory" . gdb-display-memory-buffer)) @@ -1987,11 +2049,13 @@ :enable gdb-use-inferior-io-buffer)) (define-key menu [locals] '("Locals" . gdb-display-locals-buffer)) (define-key menu [frames] '("Stack" . gdb-display-stack-buffer)) - (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer))) + (define-key menu [breakpoints] + '("Breakpoints" . gdb-display-breakpoints-buffer))) (let ((menu (make-sparse-keymap "GDB-Frames"))) (define-key gud-menu-map [frames] - `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba))) + `(menu-item "GDB-Frames" ,menu + :visible (memq gud-minor-mode '(gdbmi gdba)))) (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer)) (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer)) (define-key menu [memory] '("Memory" . gdb-frame-memory-buffer)) @@ -2002,7 +2066,8 @@ :enable gdb-use-inferior-io-buffer)) (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer)) (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer)) - (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer))) + (define-key menu [breakpoints] + '("Breakpoints" . gdb-frame-breakpoints-buffer))) (let ((menu (make-sparse-keymap "GDB-UI"))) (define-key gud-menu-map [ui] @@ -2129,12 +2194,15 @@ (gdb-remove-breakpoint-icons (point-min) (point-max) t) (setq gud-minor-mode nil) (kill-local-variable 'tool-bar-map) - (setq gud-running nil)))))) + (kill-local-variable 'gdb-define-alist)))))) (when (markerp gdb-overlay-arrow-position) (move-marker gdb-overlay-arrow-position nil) (setq gdb-overlay-arrow-position nil)) (setq overlay-arrow-variable-list - (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))) + (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) + (setq gud-running nil) + (setq gdb-active-process nil) + (remove-hook 'after-save-hook 'gdb-create-define-alist t)) (defun gdb-source-info () "Find the source file where the program starts and displays it with related @@ -2157,9 +2225,9 @@ (catch 'file-not-found (if (search-forward "Located in " nil t) (if (looking-at "\\S-*") - (push (cons bptno (match-string 0)) gdb-location-list)) + (push (cons bptno (match-string 0)) gdb-location-alist)) (gdb-resync) - (push (cons bptno "File not found") gdb-location-list) + (push (cons bptno "File not found") gdb-location-alist) (message-box "Cannot find source file for breakpoint location.\n\ Add directory to search path for source files using the GDB command, dir.") (throw 'file-not-found nil)) @@ -2214,7 +2282,7 @@ (unless buffer (setq buffer (current-buffer))) (dolist (overlay (overlays-in start end)) - (when (overlay-get overlay 'put-break) + (when (overlay-get overlay 'put-break) (delete-overlay overlay)))) (defun gdb-put-breakpoint-icon (enabled bptno) @@ -2416,7 +2484,8 @@ (setq gdb-input-queue (delete item gdb-input-queue)))))) (gdb-enqueue-input - (list (concat gdb-server-prefix "disassemble " gdb-current-address "\n") + (list (concat gdb-server-prefix "disassemble " + gdb-current-address "\n") 'gdb-assembler-handler)) (push 'gdb-invalidate-assembler gdb-pending-triggers) (setq gdb-previous-address gdb-current-address)
--- a/lisp/progmodes/grep.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/grep.el Thu May 05 00:04:55 2005 +0000 @@ -1,7 +1,7 @@ ;;; grep.el --- run compiler as inferior of Emacs, parse error messages ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2001, 2002, 2004 Free Software Foundation, Inc. +;; 2001, 2002, 2004, 2005 Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org> ;; Maintainer: FSF @@ -294,7 +294,10 @@ (2 compilation-line-face)) ;; Highlight grep matches and delete markers ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)" - (2 grep-match-face) + ;; Refontification does not work after the markers have been + ;; deleted. So we use the font-lock-face property here as Font + ;; Lock does not clear that. + (2 (list 'face nil 'font-lock-face grep-match-face)) ((lambda (p)) (progn ;; Delete markers with `replace-match' because it updates
--- a/lisp/progmodes/gud.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/gud.el Thu May 05 00:04:55 2005 +0000 @@ -228,6 +228,10 @@ (with-current-buffer buf (set (make-local-variable 'gud-minor-mode) minor-mode) (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) + (when (memq gud-minor-mode '(gdbmi gdba)) + (make-local-variable 'gdb-define-alist) + (unless gdb-define-alist (gdb-create-define-alist)) + (add-hook 'after-save-hook 'gdb-create-define-alist nil t)) (make-local-variable 'gud-keep-buffer)) buf))) @@ -474,7 +478,7 @@ ;; Extract the frame position from the marker. gud-last-frame (cons (match-string 1 gud-marker-acc) - (string-to-int (match-string 2 gud-marker-acc))) + (string-to-number (match-string 2 gud-marker-acc))) ;; Append any text before the marker to the output we're going ;; to return - we don't include the marker in this text. @@ -775,14 +779,14 @@ gud-marker-acc start) (setq gud-last-frame (cons (match-string 3 gud-marker-acc) - (string-to-int (match-string 4 gud-marker-acc))))) + (string-to-number (match-string 4 gud-marker-acc))))) ;; System V Release 4.0 quite often clumps two lines together ((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n\\([0-9]+\\):" gud-marker-acc start) (setq gud-sdb-lastfile (match-string 2 gud-marker-acc)) (setq gud-last-frame (cons gud-sdb-lastfile - (string-to-int (match-string 3 gud-marker-acc))))) + (string-to-number (match-string 3 gud-marker-acc))))) ;; System V Release 4.0 ((string-match "^\\(BREAKPOINT\\|STEPPED\\) process [0-9]+ function [^ ]+ in \\(.+\\)\n" gud-marker-acc start) @@ -791,7 +795,7 @@ gud-marker-acc start)) (setq gud-last-frame (cons gud-sdb-lastfile - (string-to-int (match-string 1 gud-marker-acc))))) + (string-to-number (match-string 1 gud-marker-acc))))) (t (setq gud-sdb-lastfile nil))) (setq start (match-end 0))) @@ -877,7 +881,7 @@ gud-marker-acc start)) (setq gud-last-frame (cons (match-string 2 gud-marker-acc) - (string-to-int (match-string 1 gud-marker-acc))) + (string-to-number (match-string 1 gud-marker-acc))) start (match-end 0))) ;; Search for the last incomplete line in this chunk @@ -924,7 +928,7 @@ ;; Extract the frame position from the marker. gud-last-frame (cons (match-string 1 gud-marker-acc) - (string-to-int (match-string 2 gud-marker-acc))) + (string-to-number (match-string 2 gud-marker-acc))) ;; Append any text before the marker to the output we're going ;; to return - we don't include the marker in this text. @@ -1032,7 +1036,7 @@ (if (file-exists-p file) (setq gud-last-frame (cons (match-string 1 result) - (string-to-int (match-string 2 result)))))) + (string-to-number (match-string 2 result)))))) result) ((string-match ; kluged-up marker as above "\032\032\\([0-9]*\\):\\(.*\\)\n" result) @@ -1040,7 +1044,7 @@ (if (and file (file-exists-p file)) (setq gud-last-frame (cons file - (string-to-int (match-string 1 result)))))) + (string-to-number (match-string 1 result)))))) (setq result (substring result 0 (match-beginning 0)))))) (or result ""))) @@ -1077,7 +1081,7 @@ (while (string-match re gud-marker-acc start) (setq gud-last-frame (cons (match-string 4 gud-marker-acc) - (string-to-int (match-string 3 gud-marker-acc))) + (string-to-number (match-string 3 gud-marker-acc))) start (match-end 0))) ;; Search for the last incomplete line in this chunk @@ -1196,7 +1200,7 @@ result) (string-match "[^: \t]+:[ \t]+\\([^:]+\\): [^:]+: \\([0-9]+\\):" result)) - (let ((line (string-to-int (match-string 2 result))) + (let ((line (string-to-number (match-string 2 result))) (file (gud-file-name (match-string 1 result)))) (if file (setq gud-last-frame (cons file line)))))) @@ -1298,7 +1302,7 @@ ;; Extract the frame position from the marker. gud-last-frame (cons (match-string 1 gud-marker-acc) - (string-to-int (match-string 3 gud-marker-acc))) + (string-to-number (match-string 3 gud-marker-acc))) ;; Append any text before the marker to the output we're going ;; to return - we don't include the marker in this text. @@ -1396,7 +1400,7 @@ gud-last-frame (let ((file (match-string gud-pdb-marker-regexp-file-group gud-marker-acc)) - (line (string-to-int + (line (string-to-number (match-string gud-pdb-marker-regexp-line-group gud-marker-acc)))) (if (string-equal file "<string>") @@ -2028,7 +2032,7 @@ ;; (<file-name> . <line-number>) . (if (if (match-beginning 1) (let (n) - (setq n (string-to-int (substring + (setq n (string-to-number (substring gud-marker-acc (1+ (match-beginning 1)) (- (match-end 1) 2)))) @@ -2039,7 +2043,7 @@ (gud-jdb-find-source (match-string 2 gud-marker-acc))) (setq gud-last-frame (cons file-found - (string-to-int + (string-to-number (let ((numstr (match-string 4 gud-marker-acc))) (if (string-match "[.,]" numstr) @@ -2187,7 +2191,7 @@ ;; Extract the frame position from the marker. gud-last-frame (cons (match-string 2 gud-marker-acc) - (string-to-int (match-string 4 gud-marker-acc))) + (string-to-number (match-string 4 gud-marker-acc))) ;; Append any text before the marker to the output we're going ;; to return - we don't include the marker in this text. @@ -2977,6 +2981,7 @@ (message "gud-find-class: class for file %s not found in gud-jdb-class-source-alist!" f) nil)))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; GDB script mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- a/lisp/progmodes/inf-lisp.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/inf-lisp.el Thu May 05 00:04:55 2005 +0000 @@ -167,7 +167,7 @@ Inferior Lisp buffer. This variable is only used if the variable -`comint-use-prompt-regexp-instead-of-fields' is non-nil. +`comint-use-prompt-regexp' is non-nil. More precise choices: Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\"
--- a/lisp/progmodes/python.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/progmodes/python.el Thu May 05 00:04:55 2005 +0000 @@ -1680,7 +1680,7 @@ ;;;; Modes. (defvar outline-heading-end-regexp) -(defvar eldoc-print-current-symbol-info-function) +(defvar eldoc-documentation-function) ;;;###autoload (define-derived-mode python-mode fundamental-mode "Python" @@ -1740,7 +1740,7 @@ 'python-beginning-of-defun) (set (make-local-variable 'end-of-defun-function) 'python-end-of-defun) (setq imenu-create-index-function #'python-imenu-create-index) - (set (make-local-variable 'eldoc-print-current-symbol-info-function) + (set (make-local-variable 'eldoc-documentation-function) #'python-eldoc-function) (add-hook 'eldoc-mode-hook '(lambda () (run-python 0 t)) nil t) ; need it running
--- a/lisp/recentf.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/recentf.el Thu May 05 00:04:55 2005 +0000 @@ -1137,6 +1137,12 @@ ";;; Automatically generated by `recentf' on %s.\n" "Header to be written into the `recentf-save-file'.") +(defconst recentf-save-file-coding-system + (if (coding-system-p 'utf-8-emacs) + 'utf-8-emacs + 'emacs-mule) + "Coding system of the file `recentf-save-file'.") + (defun recentf-save-list () "Save the recent list. Write data into the file specified by `recentf-save-file'." @@ -1144,9 +1150,13 @@ (condition-case error (with-temp-buffer (erase-buffer) + (set-buffer-file-coding-system recentf-save-file-coding-system) (insert (format recentf-save-file-header (current-time-string))) (recentf-dump-variable 'recentf-list recentf-max-saved-items) (recentf-dump-variable 'recentf-filter-changer-state) + (insert "\n\n;;; Local Variables:\n" + (format ";;; coding: %s\n" recentf-save-file-coding-system) + ";;; End:\n") (write-file (expand-file-name recentf-save-file)) nil) (error @@ -1207,6 +1217,6 @@ (provide 'recentf) (run-hooks 'recentf-load-hook) - + ;;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a ;;; recentf.el ends here
--- a/lisp/saveplace.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/saveplace.el Thu May 05 00:04:55 2005 +0000 @@ -166,7 +166,8 @@ (let ((cell (assoc buffer-file-name save-place-alist)) (position (if (not (eq major-mode 'hexl-mode)) (point) - (1+ (hexl-current-address))))) + (with-no-warnings + (1+ (hexl-current-address)))))) (if cell (setq save-place-alist (delq cell save-place-alist))) (if (and save-place
--- a/lisp/shell.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/shell.el Thu May 05 00:04:55 2005 +0000 @@ -136,8 +136,9 @@ This variable is used to initialise `comint-prompt-regexp' in the shell buffer. -This variable is only used if the variable -`comint-use-prompt-regexp-instead-of-fields' is non-nil. +If `comint-use-prompt-regexp' is nil, then this variable is only used +to determine paragraph boundaries. See Info node `Shell Prompts' for +how Shell mode treats paragraphs. The pattern should probably not match more than one line. If it does, Shell mode may become confused trying to distinguish prompt from input @@ -422,6 +423,7 @@ (setq comint-file-name-chars shell-file-name-chars) (setq comint-file-name-quote-list shell-file-name-quote-list) (setq comint-dynamic-complete-functions shell-dynamic-complete-functions) + (set (make-local-variable 'paragraph-separate) "\\'") (make-local-variable 'paragraph-start) (setq paragraph-start comint-prompt-regexp) (make-local-variable 'font-lock-defaults)
--- a/lisp/simple.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/simple.el Thu May 05 00:04:55 2005 +0000 @@ -113,7 +113,9 @@ (defvar next-error-highlight-timer nil) (defvar next-error-overlay-arrow-position nil) -(put 'next-error-overlay-arrow-position 'overlay-arrow-string "=>") +;; This is nil so as not to really display anything on text +;; terminals. On text terminals, it would hide part of the file name. +(put 'next-error-overlay-arrow-position 'overlay-arrow-string "") (add-to-list 'overlay-arrow-variable-list 'next-error-overlay-arrow-position) (defvar next-error-last-buffer nil @@ -3199,6 +3201,14 @@ commands which are sensitive to the Transient Mark mode." :global t :group 'editing-basics :require nil) +(defvar widen-automatically t + "Non-nil means it is ok for commands to call `widen' when they want to. +Some commands will do this in order to go to positions outside +the current accessible part of the buffer. + +If `widen-automatically' is nil, these commands will do something else +as a fallback, and won't change the buffer bounds.") + (defun pop-global-mark () "Pop off global mark ring and jump to the top location." (interactive) @@ -3215,7 +3225,9 @@ (set-buffer buffer) (or (and (>= position (point-min)) (<= position (point-max))) - (widen)) + (if widen-automatically + (error "Global mark position is outside accessible part of buffer") + (widen))) (goto-char position) (switch-to-buffer buffer))) @@ -3403,19 +3415,37 @@ (goto-char (next-char-property-change (point)))) ;; Now move a line. (end-of-line) - (and (zerop (vertical-motion 1)) - (if (not noerror) - (signal 'end-of-buffer nil) - (setq done t))) + ;; If there's no invisibility here, move over the newline. + (if (not (line-move-invisible-p (point))) + ;; We avoid vertical-motion when possible + ;; because that has to fontify. + (if (eobp) + (if (not noerror) + (signal 'end-of-buffer nil) + (setq done t)) + (forward-line 1)) + ;; Otherwise move a more sophisticated way. + ;; (What's the logic behind this code?) + (and (zerop (vertical-motion 1)) + (if (not noerror) + (signal 'end-of-buffer nil) + (setq done t)))) (unless done (setq arg (1- arg)))) + ;; The logic of this is the same as the loop above, + ;; it just goes in the other direction. (while (and (< arg 0) (not done)) (beginning-of-line) - - (if (zerop (vertical-motion -1)) - (if (not noerror) - (signal 'beginning-of-buffer nil) - (setq done t))) + (if (or (bobp) (not (line-move-invisible-p (1- (point))))) + (if (bobp) + (if (not noerror) + (signal 'beginning-of-buffer nil) + (setq done t)) + (forward-line -1)) + (if (zerop (vertical-motion -1)) + (if (not noerror) + (signal 'beginning-of-buffer nil) + (setq done t)))) (unless done (setq arg (1+ arg)) (while (and ;; Don't move over previous invis lines
--- a/lisp/startup.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/startup.el Thu May 05 00:04:55 2005 +0000 @@ -995,7 +995,8 @@ ;; the session manager and we have a session manager connection. (if (and (boundp 'x-session-previous-id) (stringp x-session-previous-id)) - (emacs-session-restore x-session-previous-id))) + (with-no-warnings + (emacs-session-restore x-session-previous-id)))) (defcustom initial-scratch-message (purecopy "\ ;; This buffer is for notes you don't want to save, and for Lisp evaluation.
--- a/lisp/subr.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/subr.el Thu May 05 00:04:55 2005 +0000 @@ -753,35 +753,16 @@ ;;;; Obsolescent names for functions. -(defalias 'dot 'point) -(defalias 'dot-marker 'point-marker) -(defalias 'dot-min 'point-min) -(defalias 'dot-max 'point-max) (defalias 'window-dot 'window-point) (defalias 'set-window-dot 'set-window-point) (defalias 'read-input 'read-string) (defalias 'send-string 'process-send-string) (defalias 'send-region 'process-send-region) (defalias 'show-buffer 'set-window-buffer) -(defalias 'buffer-flush-undo 'buffer-disable-undo) (defalias 'eval-current-buffer 'eval-buffer) -(defalias 'compiled-function-p 'byte-code-function-p) -(defalias 'define-function 'defalias) -(defalias 'sref 'aref) -(make-obsolete 'sref 'aref "20.4") (make-obsolete 'char-bytes "now always returns 1." "20.4") -(make-obsolete 'chars-in-region "use (abs (- BEG END))." "20.3") -(make-obsolete 'dot 'point "before 19.15") -(make-obsolete 'dot-max 'point-max "before 19.15") -(make-obsolete 'dot-min 'point-min "before 19.15") -(make-obsolete 'dot-marker 'point-marker "before 19.15") -(make-obsolete 'buffer-flush-undo 'buffer-disable-undo "before 19.15") (make-obsolete 'baud-rate "use the `baud-rate' variable instead." "before 19.15") -(make-obsolete 'compiled-function-p 'byte-code-function-p "before 19.15") -(make-obsolete 'define-function 'defalias "20.1") -(make-obsolete 'focus-frame "it does nothing." "19.32") -(make-obsolete 'unfocus-frame "it does nothing." "19.32") (defun insert-string (&rest args) "Mocklisp-compatibility insert function. @@ -798,9 +779,6 @@ "Return the value of the `baud-rate' variable." baud-rate) -(defalias 'focus-frame 'ignore "") -(defalias 'unfocus-frame 'ignore "") - ;;;; Obsolescence declarations for variables, and aliases. @@ -809,12 +787,15 @@ (make-obsolete-variable 'unread-command-char "use `unread-command-events' instead. That variable is a list of events to reread, so it now uses nil to mean `no event', instead of -1." "before 19.15") -(make-obsolete-variable 'executing-macro 'executing-kbd-macro "before 19.34") (make-obsolete-variable 'post-command-idle-hook "use timers instead, with `run-with-idle-timer'." "before 19.34") (make-obsolete-variable 'post-command-idle-delay "use timers instead, with `run-with-idle-timer'." "before 19.34") +;; Lisp manual only updated in 22.1. +(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro + "before 19.34") + (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions) (make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "22.1") (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions) @@ -843,7 +824,7 @@ ;;; Should this be an obsolete name? If you decide it should, you get ;;; to go through all the sources and change them. -(defalias 'string-to-int 'string-to-number) +(define-obsolete-function-alias 'string-to-int 'string-to-number) ;;;; Hook manipulation functions. @@ -2279,7 +2260,8 @@ table)) (defun syntax-after (pos) - "Return the raw syntax of the char after POS." + "Return the raw syntax of the char after POS. +If POS is outside the buffer's accessible portion, return nil." (unless (or (< pos (point-min)) (>= pos (point-max))) (let ((st (if parse-sexp-lookup-properties (get-char-property pos 'syntax-table)))) @@ -2287,22 +2269,23 @@ (aref (or st (syntax-table)) (char-after pos)))))) (defun syntax-class (syntax) - "Return the syntax class part of the syntax descriptor SYNTAX." - (logand (car syntax) 255)) + "Return the syntax class part of the syntax descriptor SYNTAX. +If SYNTAX is nil, return nil." + (and syntax (logand (car syntax) 65535))) -(defun add-to-invisibility-spec (arg) - "Add elements to `buffer-invisibility-spec'. +(defun add-to-invisibility-spec (element) + "Add ELEMENT to `buffer-invisibility-spec'. See documentation for `buffer-invisibility-spec' for the kind of elements that can be added." (if (eq buffer-invisibility-spec t) (setq buffer-invisibility-spec (list t))) (setq buffer-invisibility-spec - (cons arg buffer-invisibility-spec))) + (cons element buffer-invisibility-spec))) -(defun remove-from-invisibility-spec (arg) - "Remove elements from `buffer-invisibility-spec'." +(defun remove-from-invisibility-spec (element) + "Remove ELEMENT from `buffer-invisibility-spec'." (if (consp buffer-invisibility-spec) - (setq buffer-invisibility-spec (delete arg buffer-invisibility-spec)))) + (setq buffer-invisibility-spec (delete element buffer-invisibility-spec)))) (defun global-set-key (key command) "Give KEY a global binding as COMMAND. @@ -2376,15 +2359,34 @@ (eq (car-safe object) 'lambda))) (defun assq-delete-all (key alist) - "Delete from ALIST all elements whose car is KEY. + "Delete from ALIST all elements whose car is `eq' to KEY. Return the modified alist. Elements of ALIST that are not conses are ignored." - (let ((tail alist)) - (while tail - (if (and (consp (car tail)) (eq (car (car tail)) key)) - (setq alist (delq (car tail) alist))) - (setq tail (cdr tail))) - alist)) + (while (and (consp (car alist)) + (eq (car (car alist)) key)) + (setq alist (cdr alist))) + (let ((tail alist) tail-cdr) + (while (setq tail-cdr (cdr tail)) + (if (and (consp (car tail-cdr)) + (eq (car (car tail-cdr)) key)) + (setcdr tail (cdr tail-cdr)) + (setq tail tail-cdr)))) + alist) + +(defun rassq-delete-all (value alist) + "Delete from ALIST all elements whose cdr is `eq' to VALUE. +Return the modified alist. +Elements of ALIST that are not conses are ignored." + (while (and (consp (car alist)) + (eq (cdr (car alist)) value)) + (setq alist (cdr alist))) + (let ((tail alist) tail-cdr) + (while (setq tail-cdr (cdr tail)) + (if (and (consp (car tail-cdr)) + (eq (cdr (car tail-cdr)) value)) + (setcdr tail (cdr tail-cdr)) + (setq tail tail-cdr)))) + alist) (defun make-temp-file (prefix &optional dir-flag suffix) "Create a temporary file.
--- a/lisp/term.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/term.el Thu May 05 00:04:55 2005 +0000 @@ -711,9 +711,10 @@ :group 'term :type 'string) +;;; Use the same colors that xterm uses, see `xterm-standard-colors'. (defvar ansi-term-color-vector - [unspecified "black" "red" "green" "yellow" "blue" - "magenta" "cyan" "white"]) + [unspecified "black" "red3" "green3" "yellow3" "blue2" + "magenta3" "cyan3" "white"]) ;;; Inspiration came from comint.el -mm (defvar term-buffer-maximum-size 2048 @@ -886,7 +887,9 @@ (i 0)) (while (< i 128) (define-key map (make-string 1 i) 'term-send-raw) - (define-key esc-map (make-string 1 i) 'term-send-raw-meta) + ;; Avoid O and [. They are used in escape sequences for various keys. + (unless (or (eq i ?O) (eq i 91)) + (define-key esc-map (make-string 1 i) 'term-send-raw-meta)) (setq i (1+ i))) (define-key map "\e" esc-map) (setq term-raw-map map) @@ -907,6 +910,7 @@ (define-key term-raw-map [right] 'term-send-right) (define-key term-raw-map [left] 'term-send-left) (define-key term-raw-map [delete] 'term-send-del) + (define-key term-raw-map [deletechar] 'term-send-del) (define-key term-raw-map [backspace] 'term-send-backspace) (define-key term-raw-map [home] 'term-send-home) (define-key term-raw-map [end] 'term-send-end)
--- a/lisp/term/mac-win.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/term/mac-win.el Thu May 05 00:04:55 2005 +0000 @@ -74,7 +74,7 @@ (require 'mouse) (require 'scroll-bar) (require 'faces) -;;(require 'select) +(require 'select) (require 'menu-bar) (require 'fontset) (require 'dnd) @@ -1143,23 +1143,232 @@ (define-key special-event-map [language-change] 'mac-handle-language-change) -;;;; Selections and cut buffers +;;;; Selections and Services menu + +;; Setup to use the Mac clipboard. +(set-selection-coding-system mac-system-coding-system) + +;;; We keep track of the last text selected here, so we can check the +;;; current selection against it, and avoid passing back our own text +;;; from x-get-selection-value. +(defvar x-last-selected-text-clipboard nil + "The value of the CLIPBOARD selection last time we selected or +pasted text.") +(defvar x-last-selected-text-primary nil + "The value of the PRIMARY X selection last time we selected or +pasted text.") + +(defcustom x-select-enable-clipboard t + "*Non-nil means cutting and pasting uses the clipboard. +This is in addition to the primary selection." + :type 'boolean + :group 'killing) + +;;; Make TEXT, a string, the primary X selection. +(defun x-select-text (text &optional push) + (x-set-selection 'PRIMARY text) + (setq x-last-selected-text-primary text) + (when x-select-enable-clipboard + (x-set-selection 'CLIPBOARD text) + (setq x-last-selected-text-clipboard text)) + ) + +(defun x-get-selection (&optional type data-type) + "Return the value of a selection. +The argument TYPE (default `PRIMARY') says which selection, +and the argument DATA-TYPE (default `STRING') says +how to convert the data. + +TYPE may be any symbol \(but nil stands for `PRIMARY'). However, +only a few symbols are commonly used. They conventionally have +all upper-case names. The most often used ones, in addition to +`PRIMARY', are `SECONDARY' and `CLIPBOARD'. -;; Setup to use the Mac clipboard. The functions mac-cut-function and -;; mac-paste-function are defined in mac.c. -(set-selection-coding-system 'compound-text-mac) +DATA-TYPE is usually `STRING', but can also be one of the symbols +in `selection-converter-alist', which see." + (let ((data (x-get-selection-internal (or type 'PRIMARY) + (or data-type 'STRING))) + (coding (or next-selection-coding-system + selection-coding-system))) + (when (and (stringp data) + (setq data-type (get-text-property 0 'foreign-selection data))) + (cond ((eq data-type 'public.utf16-plain-text) + (let ((encoded (and (fboundp 'mac-code-convert-string) + (mac-code-convert-string data + 'utf-16 coding)))) + (if encoded + (let ((coding-save last-coding-system-used)) + (setq data (decode-coding-string encoded coding)) + (setq last-coding-system-used coding-save)) + (setq data + (decode-coding-string data 'utf-16))))) + ((eq data-type 'com.apple.traditional-mac-plain-text) + (setq data (decode-coding-string data coding)))) + (put-text-property 0 (length data) 'foreign-selection data-type data)) + data)) + +(defun x-selection-value (type) + (let (text tiff-image) + (setq text (condition-case nil + (x-get-selection type 'public.utf16-plain-text) + (error nil))) + (if (not text) + (setq text (condition-case nil + (x-get-selection type + 'com.apple.traditional-mac-plain-text) + (error nil)))) + (if text + (remove-text-properties 0 (length text) '(foreign-selection nil) text)) + (setq tiff-image (condition-case nil + (x-get-selection type 'public.tiff) + (error nil))) + (when tiff-image + (remove-text-properties 0 (length tiff-image) + '(foreign-selection nil) tiff-image) + (setq tiff-image (create-image tiff-image 'tiff t)) + (or text (setq text " ")) + (put-text-property 0 (length text) 'display tiff-image text)) + text)) + +;;; Return the value of the current selection. +;;; Treat empty strings as if they were unset. +;;; If this function is called twice and finds the same text, +;;; it returns nil the second time. This is so that a single +;;; selection won't be added to the kill ring over and over. +(defun x-get-selection-value () + (let (clip-text primary-text) + (when x-select-enable-clipboard + (setq clip-text (x-selection-value 'CLIPBOARD)) + (if (string= clip-text "") (setq clip-text nil)) -(setq interprogram-cut-function - '(lambda (str push) - (mac-cut-function - (encode-coding-string str selection-coding-system t) push))) + ;; Check the CLIPBOARD selection for 'newness', is it different + ;; from what we remebered them to be last time we did a + ;; cut/paste operation. + (setq clip-text + (cond;; check clipboard + ((or (not clip-text) (string= clip-text "")) + (setq x-last-selected-text-clipboard nil)) + ((eq clip-text x-last-selected-text-clipboard) nil) + ((string= clip-text x-last-selected-text-clipboard) + ;; Record the newer string, + ;; so subsequent calls can use the `eq' test. + (setq x-last-selected-text-clipboard clip-text) + nil) + (t + (setq x-last-selected-text-clipboard clip-text)))) + ) + + (setq primary-text (x-selection-value 'PRIMARY)) + ;; Check the PRIMARY selection for 'newness', is it different + ;; from what we remebered them to be last time we did a + ;; cut/paste operation. + (setq primary-text + (cond;; check primary selection + ((or (not primary-text) (string= primary-text "")) + (setq x-last-selected-text-primary nil)) + ((eq primary-text x-last-selected-text-primary) nil) + ((string= primary-text x-last-selected-text-primary) + ;; Record the newer string, + ;; so subsequent calls can use the `eq' test. + (setq x-last-selected-text-primary primary-text) + nil) + (t + (setq x-last-selected-text-primary primary-text)))) + + ;; As we have done one selection, clear this now. + (setq next-selection-coding-system nil) + + ;; At this point we have recorded the current values for the + ;; selection from clipboard (if we are supposed to) and primary, + ;; So return the first one that has changed (which is the first + ;; non-null one). + (or clip-text primary-text) + )) + +(put 'CLIPBOARD 'mac-scrap-name "com.apple.scrap.clipboard") +(if (eq system-type 'darwin) + (put 'FIND 'mac-scrap-name "com.apple.scrap.find")) +(put 'com.apple.traditional-mac-plain-text 'mac-ostype "TEXT") +(put 'public.utf16-plain-text 'mac-ostype "utxt") +(put 'public.tiff 'mac-ostype "TIFF") -(setq interprogram-paste-function - '(lambda () - (let ((clipboard (mac-paste-function))) - (if clipboard - (decode-coding-string clipboard selection-coding-system t))))) +(defun mac-select-convert-to-string (selection type value) + (let ((str (cdr (xselect-convert-to-string selection nil value))) + coding) + (setq coding (or next-selection-coding-system selection-coding-system)) + (if coding + (setq coding (coding-system-base coding)) + (setq coding 'raw-text)) + (when str + ;; If TYPE is nil, this is a local request, thus return STR as + ;; is. Otherwise, encode STR. + (if (not type) + str + (let ((inhibit-read-only t)) + (remove-text-properties 0 (length str) '(composition nil) str) + (cond + ((eq type 'public.utf16-plain-text) + (let (s) + (when (and (fboundp 'mac-code-convert-string) + (memq coding (find-coding-systems-string str))) + (setq coding (coding-system-change-eol-conversion coding 'mac)) + (setq s (mac-code-convert-string + (encode-coding-string str coding) + coding 'utf-16))) + (setq str (or s (encode-coding-string str 'utf-16-mac))))) + ((eq type 'com.apple.traditional-mac-plain-text) + (setq coding (coding-system-change-eol-conversion coding 'mac)) + (setq str (encode-coding-string str coding))) + (t + (error "Unknown selection type: %S" type)) + ))) + + (setq next-selection-coding-system nil) + (cons type str)))) +(setq selection-converter-alist + (nconc + '((public.utf16-plain-text . mac-select-convert-to-string) + (com.apple.traditional-mac-plain-text . mac-select-convert-to-string) + ;; This is not enabled by default because the `Import Image' + ;; menu makes Emacs crash or hang for unknown reasons. + ;; (public.tiff . nil) + ) + selection-converter-alist)) + +(defun mac-services-open-file () + (interactive) + (find-file-existing (x-selection-value mac-services-selection))) + +(defun mac-services-open-selection () + (interactive) + (switch-to-buffer (generate-new-buffer "*untitled*")) + (insert (x-selection-value mac-services-selection)) + (sit-for 0) + (save-buffer) ; It pops up the save dialog. + ) + +(defun mac-services-insert-text () + (interactive) + (let ((text (x-selection-value mac-services-selection))) + (if (not buffer-read-only) + (insert text) + (kill-new text) + (message + (substitute-command-keys + "The text from the Services menu can be accessed with \\[yank]"))))) + +(defvar mac-application-menu-map (make-sparse-keymap)) +(define-key mac-application-menu-map [quit] 'save-buffers-kill-emacs) +(define-key mac-application-menu-map [services perform open-file] + 'mac-services-open-file) +(define-key mac-application-menu-map [services perform open-selection] + 'mac-services-open-selection) +(define-key mac-application-menu-map [services paste] + 'mac-services-insert-text) +(define-key mac-application-menu-map [preferences] 'customize) +(define-key mac-application-menu-map [about] 'display-splash-screen) +(global-set-key [menu-bar application] mac-application-menu-map) ;;; Do the actual Windows setup here; the above code just defines ;;; functions and variables that we use now. @@ -1444,12 +1653,25 @@ (error "Suspending an Emacs running under Mac makes no sense")) (add-hook 'suspend-hook 'x-win-suspend-error) +;;; Arrange for the kill and yank functions to set and check the clipboard. +(setq interprogram-cut-function 'x-select-text) +(setq interprogram-paste-function 'x-get-selection-value) + + +;;; Turn off window-splitting optimization; Mac is usually fast enough +;;; that this is only annoying. +(setq split-window-keep-point t) + ;; Don't show the frame name; that's redundant. (setq-default mode-line-frame-identification " ") ;; Turn on support for mouse wheels. (mouse-wheel-mode 1) + +;; Enable CLIPBOARD copy/paste through menu bar commands. +(menu-bar-enable-clipboard) + (defun mac-drag-n-drop (event) "Edit the files listed in the drag-n-drop EVENT. Switch to a buffer editing the last file dropped."
--- a/lisp/term/xterm.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/term/xterm.el Thu May 05 00:04:55 2005 +0000 @@ -26,6 +26,66 @@ ;;; Code: +;;; The terminal intialization C code file might have initialized +;;; function keys F13->F60 from the termcap/terminfo information. On +;;; a PC-style keyboard these keys correspond to +;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The +;;; code here subsitutes the corresponding defintions in +;;; function-key-map. This substitution is needed because if a key +;;; definition if found in function-key-map, there are no further +;;; lookups in other keymaps. +(substitute-key-definition [f13] [S-f1] function-key-map) +(substitute-key-definition [f14] [S-f2] function-key-map) +(substitute-key-definition [f15] [S-f3] function-key-map) +(substitute-key-definition [f16] [S-f4] function-key-map) +(substitute-key-definition [f17] [S-f5] function-key-map) +(substitute-key-definition [f18] [S-f6] function-key-map) +(substitute-key-definition [f19] [S-f7] function-key-map) +(substitute-key-definition [f20] [S-f8] function-key-map) +(substitute-key-definition [f21] [S-f9] function-key-map) +(substitute-key-definition [f22] [S-f10] function-key-map) +(substitute-key-definition [f23] [S-f11] function-key-map) +(substitute-key-definition [f24] [S-f12] function-key-map) + +(substitute-key-definition [f25] [C-f1] function-key-map) +(substitute-key-definition [f26] [C-f2] function-key-map) +(substitute-key-definition [f27] [C-f3] function-key-map) +(substitute-key-definition [f28] [C-f4] function-key-map) +(substitute-key-definition [f29] [C-f5] function-key-map) +(substitute-key-definition [f30] [C-f6] function-key-map) +(substitute-key-definition [f31] [C-f7] function-key-map) +(substitute-key-definition [f32] [C-f8] function-key-map) +(substitute-key-definition [f33] [C-f9] function-key-map) +(substitute-key-definition [f34] [C-f10] function-key-map) +(substitute-key-definition [f35] [C-f11] function-key-map) +(substitute-key-definition [f36] [C-f12] function-key-map) + +(substitute-key-definition [f37] [C-S-f1] function-key-map) +(substitute-key-definition [f38] [C-S-f2] function-key-map) +(substitute-key-definition [f39] [C-S-f3] function-key-map) +(substitute-key-definition [f40] [C-S-f4] function-key-map) +(substitute-key-definition [f41] [C-S-f5] function-key-map) +(substitute-key-definition [f42] [C-S-f6] function-key-map) +(substitute-key-definition [f43] [C-S-f7] function-key-map) +(substitute-key-definition [f44] [C-S-f8] function-key-map) +(substitute-key-definition [f45] [C-S-f9] function-key-map) +(substitute-key-definition [f46] [C-S-f10] function-key-map) +(substitute-key-definition [f47] [C-S-f11] function-key-map) +(substitute-key-definition [f48] [C-S-f12] function-key-map) + +(substitute-key-definition [f49] [A-f1] function-key-map) +(substitute-key-definition [f50] [A-f2] function-key-map) +(substitute-key-definition [f51] [A-f3] function-key-map) +(substitute-key-definition [f52] [A-f4] function-key-map) +(substitute-key-definition [f53] [A-f5] function-key-map) +(substitute-key-definition [f54] [A-f6] function-key-map) +(substitute-key-definition [f55] [A-f7] function-key-map) +(substitute-key-definition [f56] [A-f8] function-key-map) +(substitute-key-definition [f57] [A-f9] function-key-map) +(substitute-key-definition [f58] [A-f10] function-key-map) +(substitute-key-definition [f59] [A-f11] function-key-map) +(substitute-key-definition [f60] [A-f12] function-key-map) + (let ((map (make-sparse-keymap))) (define-key map "\e[A" [up]) (define-key map "\e[B" [down]) @@ -51,10 +111,15 @@ (define-key map "\e[24~" [f12]) (define-key map "\e[29~" [print]) - (define-key map "\e[11;2~" [S-f1]) - (define-key map "\e[12;2~" [S-f2]) - (define-key map "\e[13;2~" [S-f3]) - (define-key map "\e[14;2~" [S-f4]) + (define-key map "\eOP" [f1]) + (define-key map "\eOQ" [f2]) + (define-key map "\eOR" [f3]) + (define-key map "\eOS" [f4]) + + (define-key map "\eO2P" [S-f1]) + (define-key map "\eO2Q" [S-f2]) + (define-key map "\eO2R" [S-f3]) + (define-key map "\eO2S" [S-f4]) (define-key map "\e[15;2~" [S-f5]) (define-key map "\e[17;2~" [S-f6]) (define-key map "\e[18;2~" [S-f7]) @@ -64,10 +129,10 @@ (define-key map "\e[23;2~" [S-f11]) (define-key map "\e[24;2~" [S-f12]) - (define-key map "\e[11;5~" [C-f1]) - (define-key map "\e[12;5~" [C-f2]) - (define-key map "\e[13;5~" [C-f3]) - (define-key map "\e[14;5~" [C-f4]) + (define-key map "\eO5P" [C-f1]) + (define-key map "\eO5Q" [C-f2]) + (define-key map "\eO5R" [C-f3]) + (define-key map "\eO5S" [C-f4]) (define-key map "\e[15;5~" [C-f5]) (define-key map "\e[17;5~" [C-f6]) (define-key map "\e[18;5~" [C-f7]) @@ -77,10 +142,10 @@ (define-key map "\e[23;5~" [C-f11]) (define-key map "\e[24;5~" [C-f12]) - (define-key map "\e[11;6~" [C-S-f1]) - (define-key map "\e[12;6~" [C-S-f2]) - (define-key map "\e[13;6~" [C-S-f3]) - (define-key map "\e[14;6~" [C-S-f4]) + (define-key map "\eO6P" [C-S-f1]) + (define-key map "\eO6Q" [C-S-f2]) + (define-key map "\eO6R" [C-S-f3]) + (define-key map "\eO6S" [C-S-f4]) (define-key map "\e[15;6~" [C-S-f5]) (define-key map "\e[17;6~" [C-S-f6]) (define-key map "\e[18;6~" [C-S-f7]) @@ -90,10 +155,10 @@ (define-key map "\e[23;6~" [C-S-f11]) (define-key map "\e[24;6~" [C-S-f12]) - (define-key map "\e[11;3~" [A-f1]) - (define-key map "\e[12;3~" [A-f2]) - (define-key map "\e[13;3~" [A-f3]) - (define-key map "\e[14;3~" [A-f4]) + (define-key map "\eO3P" [A-f1]) + (define-key map "\eO3Q" [A-f2]) + (define-key map "\eO3R" [A-f3]) + (define-key map "\eO3S" [A-f4]) (define-key map "\e[15;3~" [A-f5]) (define-key map "\e[17;3~" [A-f6]) (define-key map "\e[18;3~" [A-f7])
--- a/lisp/textmodes/org.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/textmodes/org.el Thu May 05 00:04:55 2005 +0000 @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik <dominik at science dot uva dot nl> ;; Keywords: outlines, hypermedia, calendar ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 3.06 +;; Version: 3.08 ;; ;; This file is part of GNU Emacs. ;; @@ -79,6 +79,16 @@ ;; ;; Changes: ;; ------- +;; Version 3.08 +;; - "|" no longer allowed as part of a link, to allow links in tables. +;; - The prefix of items in the agenda buffer can be configured. +;; - Cleanup. +;; +;; Version 3.07 +;; - Some folding incinsistencies removed. +;; - BBDB links to company-only entries. +;; - Bug fixes and global cleanup. +;; ;; Version 3.06 ;; - M-S-RET inserts a new TODO heading. ;; - New startup option `content'. @@ -131,14 +141,14 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl) (require 'calendar)) (require 'outline) (require 'time-date) (require 'easymenu) ;;; Customization variables -(defvar org-version "3.06" +(defvar org-version "3.08" "The version number of the file org.el.") (defun org-version () (interactive) @@ -194,8 +204,7 @@ the following lines anywhere in the buffer: #+STARTUP: dlcheck - #+STARTUP: nodlcheck -" + #+STARTUP: nodlcheck" :group 'org-startup :type 'boolean) @@ -215,8 +224,8 @@ :group 'org) (defcustom org-todo-keywords '("TODO" "DONE") - "List of TODO entry keywords.\\<org-mode-map> -By default, this is '(\"TODO\" \"DONE\"). The last entry in the list is + "List of TODO entry keywords. +\\<org-mode-map>By default, this is '(\"TODO\" \"DONE\"). The last entry in the list is considered to mean that the entry is \"done\". All the other mean that action is required, and will make the entry show up in todo lists, diaries etc. @@ -228,8 +237,8 @@ :type '(repeat (string :tag "Keyword"))) (defcustom org-todo-interpretation 'sequence - "Controls how TODO keywords are interpreted.\\<org-mode-map> -Possible values are `sequence' and `type'. + "Controls how TODO keywords are interpreted. +\\<org-mode-map>Possible values are `sequence' and `type'. This variable is only relevant if `org-todo-keywords' contains more than two states. There are two ways how these keywords can be used: @@ -256,7 +265,7 @@ RELAXED will not be changed REMIND, but directly to DONE. You can create a large number of types. To initially select a -type, it is then best to use C-u \\[org-todo] in order to specify the +type, it is then best to use \\[universal-argument] \\[org-todo] in order to specify the type with completion. Of course, you can also type the keyword directly into the buffer. M-TAB completes TODO keywords at the beginning of a headline." @@ -304,7 +313,7 @@ (defcustom org-after-todo-state-change-hook nil "Hook which is run after the state of a TODO item was changed. The new state (a string with a todo keyword, or nil) is available in the -lisp variable `state'." +Lisp variable `state'." :group 'org-keywords :type 'hook) @@ -313,7 +322,7 @@ "Do TODO items have priorities?") (make-variable-buffer-local 'org-todo-kwd-priority-p) (defvar org-todo-kwd-max-priority nil - "Maximum priority of TODO items") + "Maximum priority of TODO items.") (make-variable-buffer-local 'org-todo-kwd-max-priority) (defvar org-ds-keyword-length 12 "Maximum length of the Deadline and SCHEDULED keywords.") @@ -352,6 +361,15 @@ "Matches the SCHEDULED keyword together with a time stamp.") (make-variable-buffer-local 'org-scheduled-time-regexp) +(defvar org-category nil + "Variable used by org files to set a category for agenda display. +Such files should use a file variable to set it, for example + + -*- mode: org; org-category: \"ELisp\" + +If the file does not specify a category, the file's base name +is used instead.") + (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (eq major-mode 'org-mode) @@ -359,8 +377,8 @@ '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" "STARTUP"))) (splitre "[ \t]+") kwds int key value cat) - (save-restriction - (save-excursion + (save-excursion + (save-restriction (widen) (goto-char (point-min)) (while (re-search-forward re nil t) @@ -383,7 +401,7 @@ (let ((opts (org-split-string value splitre)) (set '(("fold" org-startup-folded t) ("nofold" org-startup-folded nil) - ("content" org-startup-folded 'content) + ("content" org-startup-folded content) ("dlcheck" org-startup-with-deadline-check t) ("nodlcheck" org-startup-with-deadline-check nil))) l var val) @@ -515,8 +533,7 @@ :type 'boolean) (defcustom org-agenda-include-diary nil - "Non-nil means, when preparing the agenda, also get the -entries from the emacs calendars diary." + "If non-nil, include in the agenda entries from the Emacs Calendar's diary." :group 'org-agenda :type 'boolean) @@ -566,6 +583,43 @@ (const priority-up) (const priority-down)))) +(defcustom org-agenda-prefix-format " %-12:c% s" + "Format specification for the prefix of items in the agenda buffer. +This format works similar to a printf format, with the following meaning: + + %c the category of the item, \"Diary\" for entries from the diary, or + as given by the CATEGORY keyword or derived from the file name. + %t the time-of-day specification if one applies to the entry, in the + format HH:MM + %s Scheduling/Deadline information, a short string + +In addition to the normal printf field modifiers like field width and +padding instructions, in this format you can also add an additional +punctuation or whitespace character just before the final format letter. +This character will be appended to the field value if the value is not +empty. For example, the format \"%-12:c\" leads to \"Diary: \" if +the category is \"Diary\". If the category were be empty, no additional +colon would be interted. + +Including `%t' in the format string leads to a double time specification +because the headline/diary item will contain the time specification as +well. However, using `%t' in the format will result in a canonical 24 +hour time specification at a consistent position in the prefix, while the +time specification in the headline/diary item may be at any position and in +various formats. +Example: + (setq org-agenda-prefix-format \" %-12:c% t% s\")" + :type 'string + :group 'org-agenda) + +(defcustom org-timeline-prefix-format " % s" + "Like `org-agenda-prefix-format', but for the timeline of a single file." + :type 'string + :group 'org-agenda) + +(defvar org-prefix-format-compiled nil + "The compiled version of `org-???-prefix-format'.") + (defcustom org-sort-agenda-notime-is-late t "Non-nil means, items without time are considered late. This is only relevant for sorting. When t, items which have no explicit @@ -574,15 +628,6 @@ :group 'org-agenda :type 'boolean) -(defvar org-category nil - "Variable used by org files to set a category for agenda display. -Such files should use a file variable to set it, for example - - -*- mode: org; org-category: \"ELisp\" - -If the file does not specify a category, the file's base name -is used instead.") - (defgroup org-structure nil "Options concerning structure editing in Org-mode." :tag "Org Structure" @@ -647,7 +692,10 @@ (defcustom org-allow-space-in-links t "Non-nil means, file names in links may contain space characters. -When nil, it becomes possible to put several links into a line." +When nil, it becomes possible to put several links into a line. +Note that in tables, a link never extends accross fields, so in a table +it is always possible to put several links into a line. +Changing this varable requires a re-launch of Emacs of become effective." :group 'org-link :type 'boolean) @@ -667,7 +715,7 @@ location to an internal list. These links accumulate during a session. The command `org-insert-link' can be used to insert links into any Org-mode file (offering completion for all stored links). When this -option is nil, every link which has been inserted once using `C-c C-l' +option is nil, every link which has been inserted once using \\[org-insert-link] will be removed from the list, to make completing the unused links more efficient." :group 'org-link @@ -682,15 +730,15 @@ this link in another window or frame. This variable can be used to set this up for the different types of links. For VM, use any of - vm-visit-folder - vm-visit-folder-other-frame + `vm-visit-folder' + `vm-visit-folder-other-frame' For Gnus, use any of - gnus - gnus-other-frame + `gnus' + `gnus-other-frame' For FILE, use any of - find-file - find-file-other-window - find-file-other-frame + `find-file' + `find-file-other-window' + `find-file-other-frame' For the calendar, use the variable `calendar-setup'. For BBDB, it is currently only possible to display the matches in another window." @@ -792,10 +840,10 @@ and the corresponding command. Possible values for the command are: `emacs' The file will be visited by the current Emacs process. `default' Use the default application for this file type. - string A command to be executed by a shell. %s will be replaced + string A command to be executed by a shell; %s will be replaced by the path to the file. - sexp A lisp form which will be evaluated. The file path will - be available in the lisp variable `file'. + sexp A Lisp form which will be evaluated. The file path will + be available in the Lisp variable `file'. For more examples, see the system specific constants `org-file-apps-defaults-macosx' `org-file-apps-defaults-windowsnt' @@ -1076,7 +1124,7 @@ :type 'boolean) (defcustom org-export-with-tables t - "Non-nil means, lines starting with \"|\" define a table + "If non-nil, lines starting with \"|\" define a table For example: | Name | Address | Birthday | @@ -1150,7 +1198,7 @@ :type 'boolean) (defcustom org-export-html-with-timestamp nil - "Non-nil means, write `org-export-html-html-helper-timestamp' + "If non-nil, write `org-export-html-html-helper-timestamp' into the exported html text. Otherwise, the buffer will just be saved to a file." :group 'org-export @@ -1348,6 +1396,7 @@ (defvar org-cursor-color) (defvar org-time-was-given) (defvar org-ts-what) + (defvar mark-active) (defvar timecnt) (defvar levels-open) (defvar title) @@ -1383,6 +1432,17 @@ (defvar org-struct-menu) (defvar org-org-menu) +;; We use a before-change function to check if a table might need +;; an update. +(defvar org-table-may-need-update t + "Indicates of a table might need an update. +This variable is set by `org-before-change-function'. `org-table-align' +sets it back to nil.") + +(defvar org-mode-hook nil) +(defvar org-inhibit-startup nil) ; Dynamically-scoped param. + + ;;;###autoload (defun org-mode (&optional arg) "Outline-based notes management and organizer, alias @@ -1437,14 +1497,15 @@ (goto-char (point-min)) (insert " -*- mode: org -*-\n\n"))) (run-hooks 'org-mode-hook) - (unless (boundp 'org-inhibit-startup) + (unless org-inhibit-startup (if org-startup-with-deadline-check (call-interactively 'org-check-deadlines) (cond ((eq org-startup-folded t) - (org-cycle)) - ((eq org-startup-folded 'contents) - (org-cycle) (org-cycle)))))) + (org-cycle '(4))) + ((eq org-startup-folded 'content) + (let ((this-command 'org-cycle) (last-command 'org-cycle)) + (org-cycle '(4)) (org-cycle '(4)))))))) ;;; Font-Lock stuff @@ -1456,10 +1517,13 @@ (require 'font-lock) +(defconst org-non-link-chars "\t\n\r|") (defconst org-link-regexp (if org-allow-space-in-links - "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^\t\n\r]+[^ \t\n\r]\\)" - "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^ \t\n\r]+\\)" + (concat + "\\(https?\\|ftp\\|mailto|\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^" org-non-link-chars "]+[^ " org-non-link-chars "]\\)") + (concat + "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^ " org-non-link-chars "]+\\)") ) "Regular expression for matching links.") (defconst org-ts-lengths @@ -1502,6 +1566,8 @@ (org-back-to-heading t) (- (match-end 0) (match-beginning 0)))) +(defvar org-font-lock-keywords nil) + (defun org-set-font-lock-defaults () (let ((org-font-lock-extra-keywords (list @@ -1550,13 +1616,10 @@ '(org-font-lock-keywords t nil nil backward-paragraph)) (kill-local-variable 'font-lock-keywords) nil)) -(defvar org-font-lock-keywords nil) - (defun org-unfontify-region (beg end &optional maybe_loudly) "Remove fontification and activation overlays from links." (font-lock-default-unfontify-region beg end) - (let* ((modified (buffer-modified-p)) ;; FIXME: Why did I add this??? - (buffer-undo-list t) + (let* ((buffer-undo-list t) (inhibit-read-only t) (inhibit-point-motion-hooks t) (inhibit-modification-hooks t) deactivate-mark buffer-file-name buffer-file-truename) @@ -1651,15 +1714,15 @@ (save-excursion (org-back-to-heading) (outline-up-heading arg) - (show-subtree))) + (org-show-subtree))) ((save-excursion (beginning-of-line 1) (looking-at outline-regexp)) ;; At a heading: rotate between three different views (org-back-to-heading) - (let ((goal-column 0) beg eoh eol eos nxh) + (let ((goal-column 0) eoh eol eos) ;; First, some boundaries (save-excursion - (org-back-to-heading) (setq beg (point)) + (org-back-to-heading) (save-excursion (beginning-of-line 2) (while (and (not (eobp)) ;; this is like `next-line' @@ -1667,7 +1730,7 @@ (beginning-of-line 2)) (setq eol (point))) (outline-end-of-heading) (setq eoh (point)) (outline-end-of-subtree) (setq eos (point)) - (outline-next-heading) (setq nxh (point))) + (outline-next-heading)) ;; Find out what to do next and set `this-command' (cond ((= eos eoh) @@ -1676,7 +1739,7 @@ (setq org-cycle-subtree-status nil)) ((>= eol eos) ;; Entire subtree is hidden in one line: open it - (show-entry) + (org-show-entry) (show-children) (message "CHILDREN") (setq org-cycle-subtree-status 'children) @@ -1684,7 +1747,7 @@ ((and (eq last-command this-command) (eq org-cycle-subtree-status 'children)) ;; We just showed the children, now show everything. - (show-subtree) + (org-show-subtree) (message "SUBTREE") (setq org-cycle-subtree-status 'subtree) (run-hook-with-args 'org-cycle-hook 'subtree)) @@ -1733,9 +1796,9 @@ "Move cursor to the first headline and recenter the headline. Optional argument N means, put the headline into the Nth line of the window." (goto-char (point-min)) - (re-search-forward (concat "^" outline-regexp)) - (beginning-of-line) - (recenter (prefix-numeric-value N))) + (when (re-search-forward (concat "^" outline-regexp) nil t) + (beginning-of-line) + (recenter (prefix-numeric-value N)))) (defvar org-goto-window-configuration nil) (defvar org-goto-marker nil) @@ -1836,9 +1899,9 @@ current-prefix-arg arg) (throw 'exit nil)) -(defun org-goto-left (&optional arg) +(defun org-goto-left () "Finish org-goto by going to the new location." - (interactive "P") + (interactive) (if (org-on-heading-p) (progn (beginning-of-line 1) @@ -1847,9 +1910,9 @@ (throw 'exit nil)) (error "Not on a heading"))) -(defun org-goto-right (&optional arg) +(defun org-goto-right () "Finish org-goto by going to the new location." - (interactive "P") + (interactive) (if (org-on-heading-p) (progn (outline-end-of-subtree) @@ -1870,9 +1933,9 @@ (defvar org-ignore-region nil "To temporarily disable the active region.") -(defun org-insert-heading (&optional arg) +(defun org-insert-heading () "Insert a new heading with same depth at point." - (interactive "P") + (interactive) (let* ((head (save-excursion (condition-case nil (org-back-to-heading) @@ -1903,34 +1966,36 @@ (insert (car org-todo-keywords) " ") (insert (match-string 2) " "))) -(defun org-promote-subtree (&optional arg) +(defun org-promote-subtree () "Promote the entire subtree. See also `org-promote'." - (interactive "P") - (org-map-tree 'org-promote)) - -(defun org-demote-subtree (&optional arg) + (interactive) + (save-excursion + (org-map-tree 'org-promote))) + +(defun org-demote-subtree () "Demote the entire subtree. See `org-demote'. See also `org-promote'." - (interactive "P") - (org-map-tree 'org-demote)) - -(defun org-do-promote (&optional arg) + (interactive) + (save-excursion + (org-map-tree 'org-demote))) + +(defun org-do-promote () "Promote the current heading higher up the tree. -If the region is active in transient-mark-mode, promote all headings +If the region is active in t`ransient-mark-mode', promote all headings in the region." - (interactive "P") + (interactive) (save-excursion (if (org-region-active-p) (org-map-region 'org-promote (region-beginning) (region-end)) (org-promote))) (org-fix-position-after-promote)) -(defun org-do-demote (&optional arg) +(defun org-do-demote () "Demote the current heading lower down the tree. -If the region is active in transient-mark-mode, demote all headings +If the region is active in `transient-mark-mode', demote all headings in the region." - (interactive "P") + (interactive) (save-excursion (if (org-region-active-p) (org-map-region 'org-demote (region-beginning) (region-end)) @@ -1945,7 +2010,7 @@ (defun org-promote () "Promote the current heading higher up the tree. -If the region is active in transient-mark-mode, promote all headings +If the region is active in `transient-mark-mode', promote all headings in the region." (org-back-to-heading t) (let* ((level (save-match-data (funcall outline-level))) @@ -1957,7 +2022,7 @@ (defun org-demote () "Demote the current heading lower down the tree. -If the region is active in transient-mark-mode, demote all headings +If the region is active in `transient-mark-mode', demote all headings in the region." (org-back-to-heading t) (let* ((level (save-match-data (funcall outline-level))) @@ -2066,17 +2131,17 @@ "Was the last copied subtree folded? This is used to fold the tree back after pasting.") -(defun org-cut-subtree (&optional arg) +(defun org-cut-subtree () "Cut the current subtree into the clipboard. This is a short-hand for marking the subtree and then cutting it." - (interactive "p") - (org-copy-subtree arg 'cut)) - -(defun org-copy-subtree (&optional arg cut) + (interactive) + (org-copy-subtree 'cut)) + +(defun org-copy-subtree (&optional cut) "Cut the current subtree into the clipboard. This is a short-hand for marking the subtree and then copying it. If CUT is non nil, actually cut the subtree." - (interactive "p") + (interactive) (let (beg end folded) (org-back-to-heading) (setq beg (point)) @@ -2338,7 +2403,7 @@ ;; Fixup cursor location if close to the keyword (if (and (outline-on-heading-p) (not (bolp)) - (save-excursion (goto-char (point-at-bol)) + (save-excursion (beginning-of-line 1) (looking-at org-todo-line-regexp)) (< (point) (+ 2 (or (match-end 2) (match-end 1))))) (progn @@ -2681,7 +2746,7 @@ A deadline is considered due if it happens within `org-deadline-warning-days' days from today's date. If the deadline appears in an entry marked DONE, it is not shown. The prefix arg NDAYS can be used to test that many -days. If the prefix is a raw C-u prefix, all deadlines are shown." +days. If the prefix is a raw \\[universal-argument] prefix, all deadlines are shown." (interactive "P") (let* ((org-warn-days (cond @@ -2718,6 +2783,7 @@ (error "Not at a time-stamp range, and none found in current line."))) (let* ((ts1 (match-string 1)) (ts2 (match-string 2)) + (havetime (or (> (length ts1) 15) (> (length ts2) 15))) (match-end (match-end 0)) (time1 (org-time-string-to-time ts1)) (time2 (org-time-string-to-time ts2)) @@ -2725,17 +2791,27 @@ (t2 (time-to-seconds time2)) (diff (abs (- t2 t1))) (negative (< (- t2 t1) 0)) - (ys (floor (* 365 24 60 60))) + ;; (ys (floor (* 365 24 60 60))) (ds (* 24 60 60)) (hs (* 60 60)) (fy "%dy %dd %02d:%02d") + (fy1 "%dy %dd") (fd "%dd %02d:%02d") + (fd1 "%dd") (fh "%02d:%02d") y d h m align) - (setq y (floor (/ diff ys)) diff (mod diff ys) - d (floor (/ diff ds)) diff (mod diff ds) - h (floor (/ diff hs)) diff (mod diff hs) - m (floor (/ diff 60))) + ;; FIXME: Should I re-introduce years, make year refer to same date? + ;; This would be the only useful way to have years, actually. + (if havetime + (setq ; y (floor (/ diff ys)) diff (mod diff ys) + y 0 + d (floor (/ diff ds)) diff (mod diff ds) + h (floor (/ diff hs)) diff (mod diff hs) + m (floor (/ diff 60))) + (setq ; y (floor (/ diff ys)) diff (mod diff ys) + y 0 + d (floor (+ (/ diff ds) 0.5)) + h 0 m 0)) (if (not to-buffer) (message (org-make-tdiff-string y d h m)) (when (org-at-table-p) @@ -2746,8 +2822,8 @@ "\\( *-? *[0-9]+y\\)?\\( *[0-9]+d\\)? *[0-9][0-9]:[0-9][0-9]") (replace-match "")) (if negative (insert " -")) - (if (> y 0) (insert " " (format fy y d h m)) - (if (> d 0) (insert " " (format fd d h m)) + (if (> y 0) (insert " " (format (if havetime fy fy1) y d h m)) + (if (> d 0) (insert " " (format (if havetime fd fd1) d h m)) (insert " " (format fh h m)))) (if align (org-table-align)) (message "Time difference inserted")))) @@ -2770,7 +2846,7 @@ (defun org-parse-time-string (s) "Parse the standard Org-mode time string. -This should be a lot faster than the normal parse-time-string." +This should be a lot faster than the normal `parse-time-string'." (if (string-match org-ts-regexp1 s) (list 0 (string-to-number (or (match-string 8 s) "0")) @@ -2927,7 +3003,7 @@ ;;; Define the mode (defvar org-agenda-mode-map (make-sparse-keymap) - "Keymap for org-agenda-mode.") + "Keymap for `org-agenda-mode'.") (defvar org-agenda-menu) (defvar org-agenda-follow-mode nil) @@ -2949,6 +3025,7 @@ (easy-menu-add org-agenda-menu) (if org-startup-truncated (setq truncate-lines t)) (add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) + (add-hook 'pre-command-hook 'org-unhighlight nil 'local) (setq org-agenda-follow-mode nil) (easy-menu-change '("Agenda") "Agenda Files" @@ -2968,7 +3045,7 @@ (define-key org-agenda-mode-map "l" 'org-agenda-recenter) (define-key org-agenda-mode-map "t" 'org-agenda-todo) (define-key org-agenda-mode-map "." 'org-agenda-goto-today) -(define-key org-agenda-mode-map "w" 'org-agenda-week-view) +(define-key org-agenda-mode-map "w" 'org-agenda-toggle-week-view) (define-key org-agenda-mode-map [(shift right)] 'org-agenda-date-later) (define-key org-agenda-mode-map [(shift left)] 'org-agenda-date-earlier) @@ -3043,7 +3120,8 @@ ["Next Dates" org-agenda-later (local-variable-p 'starting-day)] ["Previous Dates" org-agenda-earlier (local-variable-p 'starting-day)] "--" - ["Week/Day View" org-agenda-week-view (local-variable-p 'starting-day)] + ["Week/Day View" org-agenda-toggle-week-view + (local-variable-p 'starting-day)] ["Include Diary" org-agenda-toggle-diary :style toggle :selected org-agenda-include-diary :active t] "--" @@ -3060,7 +3138,7 @@ )) (defvar org-agenda-markers nil - "List of all currently active markers created by org-agenda") + "List of all currently active markers created by `org-agenda'.") (defvar org-agenda-last-marker-time (time-to-seconds (current-time)) "Creation time of the last agenda marker.") @@ -3074,7 +3152,7 @@ m)) (defun org-agenda-maybe-reset-markers (&optional force) - "Reset markers created by org-agenda. But only if they are old enough." + "Reset markers created by `org-agenda'. But only if they are old enough." (if (or force (> (- (time-to-seconds (current-time)) org-agenda-last-marker-time) @@ -3106,21 +3184,23 @@ (when (and (buffer-modified-p buf) file (y-or-n-p (format "Save file %s? " file))) - (save-excursion - (set-buffer buf) (save-buffer))) + (with-current-buffer buf (save-buffer))) (kill-buffer buf)))) +(defvar org-respect-restriction nil) ; Dynamically-scoped param. + (defun org-timeline (&optional include-all) "Show a time-sorted view of the entries in the current org file. Only entries with a time stamp of today or later will be listed. With -one C-u prefix argument, past entries will also be listed. -With two C-u prefixes, all unfinished TODO items will also be shown, +one \\[universal-argument] prefix argument, past entries will also be listed. +With two \\[universal-argument] prefixes, all unfinished TODO items will also be shown, under the current date. If the buffer contains an active region, only check the region for dates." (interactive "P") (require 'calendar) (org-agenda-maybe-reset-markers 'force) + (org-compile-prefix-format org-timeline-prefix-format) (let* ((dopast include-all) (dotodo (equal include-all '(16))) (entry (buffer-file-name)) @@ -3135,7 +3215,7 @@ (today (time-to-days (current-time))) (org-respect-restriction t) (past t) - s e rtn d pos) + s e rtn d) (setq org-agenda-redo-command (list 'progn (list 'switch-to-buffer-other-window (current-buffer)) @@ -3188,13 +3268,14 @@ "Produce a weekly view from all files in variable `org-agenda-files'. The view will be for the current week, but from the overview buffer you will be able to go to other weeks. -With one C-u prefix argument INCLUDE-ALL, all unfinished TODO items will +With one \\[universal-argument] prefix argument INCLUDE-ALL, all unfinished TODO items will also be shown, under the current date. START-DAY defaults to TODAY, or to the most recent match for the weekday given in `org-agenda-start-on-weekday'. NDAYS defaults to `org-agenda-ndays'." (interactive "P") (org-agenda-maybe-reset-markers 'force) + (org-compile-prefix-format org-agenda-prefix-format) (require 'calendar) (let* ((org-agenda-start-on-weekday (if (or (equal ndays 1) @@ -3306,31 +3387,31 @@ (throw 'nextfile t)) (t (error "Abort")))))) -(defun org-agenda-quit (arg) +(defun org-agenda-quit () "Exit agenda by removing the window or the buffer." - (interactive "P") + (interactive) (let ((buf (current-buffer))) (if (not (one-window-p)) (delete-window)) (kill-buffer buf) (org-agenda-maybe-reset-markers 'force))) -(defun org-agenda-exit (arg) +(defun org-agenda-exit () "Exit agenda by removing the window or the buffer. Also kill all Org-mode buffers which have been loaded by `org-agenda'. Org-mode buffers visited directly by the user will not be touched." - (interactive "P") + (interactive) (org-release-buffers org-agenda-new-buffers) (setq org-agenda-new-buffers nil) - (org-agenda-quit arg)) - -(defun org-agenda-redo (&optional arg) - "Rebuild Agenda" - (interactive "P") + (org-agenda-quit)) + +(defun org-agenda-redo () + "Rebuild Agenda." + (interactive) (eval org-agenda-redo-command)) -(defun org-agenda-goto-today (arg) +(defun org-agenda-goto-today () "Go to today." - (interactive "P") + (interactive) (if (boundp 'starting-day) (let ((cmd (car org-agenda-redo-command)) (iall (nth 1 org-agenda-redo-command)) @@ -3357,17 +3438,9 @@ (org-agenda (if (boundp 'include-all-loc) include-all-loc nil) (- starting-day (* arg org-agenda-ndays)))) -(defun org-agenda-day-view (arg) - "Switch agenda to single day view." - (interactive "P") - (unless (boundp 'starting-day) - (error "Not allowed")) - (setq org-agenda-ndays 1) - (org-agenda include-all-loc starting-day 1)) - -(defun org-agenda-week-view (arg) - "Switch agenda to week view." - (interactive "P") +(defun org-agenda-toggle-week-view () + "Toggle weekly/daily view for aagenda." + (interactive) (unless (boundp 'starting-day) (error "Not allowed")) (setq org-agenda-ndays @@ -3397,6 +3470,21 @@ (if (not (re-search-backward "^\\S-" nil t arg)) (error "No previous date before this line in this buffer."))) +;; Initialize the highlight +(defvar org-hl (funcall (if org-xemacs-p 'make-extent 'make-overlay) 1 1)) +(funcall (if org-xemacs-p 'set-extent-property 'overlay-put) org-hl + 'face 'highlight) + +(defun org-highlight (begin end &optional buffer) + "Highlight a region with overlay." + (funcall (if org-xemacs-p 'set-extent-endpoints 'move-overlay) + org-hl begin end (or buffer (current-buffer)))) + +(defun org-unhighlight () + "Detach overlay INDEX." + (funcall (if org-xemacs-p 'detach-extent 'delete-overlay) org-hl)) + + (defun org-agenda-follow-mode () "Toggle follow mode in an agenda buffer." (interactive) @@ -3430,21 +3518,22 @@ (get-text-property (point) 'org-marker)) (org-agenda-show))) +(defvar org-disable-diary nil) ;Dynamically-scoped param. + (defun org-get-entries-from-diary (date) - "Get the (emacs calendar) diary entries for DATE." + "Get the (Emacs Calendar) diary entries for DATE." (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*") (diary-display-hook '(fancy-diary-display)) (list-diary-entries-hook (cons 'org-diary-default-entry list-diary-entries-hook)) - entries - (disable-org-diary t)) + entries tod tods + (org-disable-diary t)) (save-excursion (save-window-excursion (list-diary-entries date 1))) (if (not (get-buffer fancy-diary-buffer)) (setq entries nil) - (save-excursion - (switch-to-buffer fancy-diary-buffer) + (with-current-buffer fancy-diary-buffer (setq buffer-read-only nil) (if (= (point-max) 1) ;; No entries @@ -3452,11 +3541,6 @@ ;; Omit the date and other unnecessary stuff (org-agenda-cleanup-fancy-diary) ;; Add prefix to each line and extend the text properties - (goto-char (point-min)) - (while (and (re-search-forward "^" nil t) (not (eobp))) - (replace-match " Diary: ") - (add-text-properties (point-at-bol) (point) - (text-properties-at (point)))) (if (= (point-max) 1) (setq entries nil) (setq entries (buffer-substring (point-min) (- (point-max) 1))))) @@ -3467,31 +3551,33 @@ (setq entries (mapcar (lambda (x) - (if (string-match "\\<\\([012][0-9]\\):\\([0-6][0-9]\\)" x) - (add-text-properties - 1 (length x) - (list 'time-of-day - (+ (* 100 (string-to-number - (match-string 1 x))) - (string-to-number (match-string 2 x)))) - x)) + (setq x (org-format-agenda-item "" x "Diary")) + ;; Extend the text properties to the beginning of the line + (add-text-properties + 0 (length x) + (text-properties-at (1- (length x)) x) + x) x) entries))))) (defun org-agenda-cleanup-fancy-diary () "Remove unwanted stuff in buffer created by fancy-diary-display. This gets rid of the date, the underline under the date, and -the dummy entry installed by org-mode to ensure non-empty diary for each -date." +the dummy entry installed by `org-mode' to ensure non-empty diary for each +date. Itt also removes lines that contain only whitespace." (goto-char (point-min)) (if (looking-at ".*?:[ \t]*") (progn (replace-match "") (re-search-forward "\n=+$" nil t) (replace-match "") - (while (re-search-backward "^ +" nil t) (replace-match ""))) + (while (re-search-backward "^ +\n?" nil t) (replace-match ""))) (re-search-forward "\n=+$" nil t) (delete-region (point-min) (min (point-max) (1+ (match-end 0))))) + (goto-char (point-min)) + (while (re-search-forward "^ +\n" nil t) + (replace-match "")) + (goto-char (point-min)) (if (re-search-forward "^Org-mode dummy\n?" nil t) (replace-match ""))) @@ -3501,7 +3587,7 @@ (eval-after-load "diary-lib" '(defadvice add-to-diary-list (before org-mark-diary-entry activate) "Make the position visible." - (if (and (boundp 'disable-org-diary) ;; called from org-agenda + (if (and org-disable-diary ;; called from org-agenda (stringp string) (buffer-file-name)) (add-text-properties @@ -3606,7 +3692,7 @@ ;;;###autoload (defun org-diary (&rest args) - "Returns diary information from org-files. + "Return diary information from org-files. This function can be used in a \"sexp\" diary entry in the Emacs calendar. It accesses org files and extracts information from those files to be listed in the diary. The function accepts arguments specifying what @@ -3649,6 +3735,7 @@ by the caller, because this is how the calendar works. Don't use this function from a program - use `org-agenda-get-day-entries' instead." (org-agenda-maybe-reset-markers) + (org-compile-agenda-prefix-format org-agenda-prefix-format) (setq args (or args '(:deadline :scheduled :timestamp))) (let* ((files (if (and entry (stringp entry) (string-match "\\S-" entry)) (list entry) @@ -3656,14 +3743,14 @@ file rtn results) ;; If this is called during org-agenda, don't return any entries to ;; the calendar. Org Agenda will list these entries itself. - (if (boundp 'disable-org-diary) (setq files nil)) + (if org-disable-diary (setq files nil)) (while (setq file (pop files)) (setq rtn (apply 'org-agenda-get-day-entries file date args)) (setq results (append results rtn))) (concat (org-finalize-agenda-entries results) "\n"))) (defun org-agenda-get-day-entries (file date &rest args) - "Does the work for `org-diary' and `org-agenda' + "Does the work for `org-diary' and `org-agenda'. FILE is the path to a file to be checked for entries. DATE is date like the one returned by `calendar-current-date'. ARGS are symbols indicating which kind of entries should be extracted. For details about these, see @@ -3672,26 +3759,26 @@ (let* ((org-startup-with-deadline-check nil) (org-startup-folded nil) (buffer (if (file-exists-p file) -; (find-file-noselect file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) - (respect-narrow-p (boundp 'org-respect-restriction)) arg results rtn) (if (not buffer) ;; If file does not exist, make sure an error message ends up in diary (format "ORG-AGENDA-ERROR: No such org-file %s" file) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer + (unless (eq major-mode 'org-mode) + (error "Agenda file %s is not in `org-mode'" file)) (let ((case-fold-search nil)) (save-excursion (save-restriction - (if respect-narrow-p + (if org-respect-restriction (if (org-region-active-p) ;; Respect a region to restrict search (narrow-to-region (region-beginning) (region-end))) ;; If we work for the calendar or many files, ;; get rid of any restriction (widen)) + ;; The way we repeatedly append to `results' makes it O(n^2) :-( (while (setq arg (pop args)) (cond ((and (eq arg :todo) @@ -3748,7 +3835,7 @@ (regexp (concat "[\n\r]\\*+ *\\(" org-not-done-regexp "[^\n\r]*\\)")) marker priority - ee txt pl) + ee txt) (goto-char (point-min)) (while (re-search-forward regexp nil t) (goto-char (match-beginning 1)) @@ -3855,7 +3942,7 @@ (todayp (equal date (calendar-current-date))) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar d2 diff pos pos1 - ee txt head hdmarker) + ee txt head) (goto-char (point-min)) (while (re-search-forward regexp nil t) (setq pos (1- (match-beginning 1)) @@ -3913,7 +4000,7 @@ (regexp org-scheduled-time-regexp) (todayp (equal date (calendar-current-date))) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar - d2 diff marker hdmarker pos pos1 + d2 diff pos pos1 ee txt head) (goto-char (point-min)) (while (re-search-forward regexp nil t) @@ -3990,38 +4077,66 @@ ;; Sort the entries by expiration date. (nreverse ee))) - -(defun org-format-agenda-item (prefix txt) +(defun org-format-agenda-item (prefix txt &optional category) "Format TXT to be inserted into the agenda buffer. In particular, this indents the line and adds a category." - (let ((cat (or org-category - (file-name-sans-extension - (file-name-nondirectory (buffer-file-name))))) - time rtn) - (if (symbolp cat) (setq cat (symbol-name cat))) - (setq rtn (format " %-10s %s%s" (concat cat ":") prefix txt)) - (add-text-properties - 0 2 (list 'category (downcase cat) - 'prefix-length (- (length rtn) (length txt)) - 'time-of-day (org-get-time-of-day rtn)) + (let* ((category (or category + org-category + (file-name-sans-extension + (file-name-nondirectory (buffer-file-name))))) + (extra prefix) + (time-of-day (org-get-time-of-day txt)) + (t1 (if time-of-day (concat "0" (int-to-string time-of-day)) "0000")) + (time (if time-of-day + (concat (substring t1 -4 -2) + ":" (substring t1 -2)) + "")) + rtn) + (if (symbolp category) (setq category (symbol-name category))) + (setq rtn (concat (eval org-prefix-format-compiled) txt)) + (add-text-properties + 0 (length rtn) (list 'category (downcase category) + 'prefix-length (- (length rtn) (length txt)) + 'time-of-day time-of-day) rtn) rtn)) -;; FIXME: Should this be restricted to beginning of string? +(defun org-compile-prefix-format (format) + "Compile the prefix format into a Lisp form that can be evaluated. +The resulting form is returned and stored in the variable +`org-prefix-format-compiled'." + (let ((start 0) varform vars (s format) c) + (while (string-match "%\\([-+]?[0-9.]*\\)\\([ .;,:!?=|/<>]?\\)\\([cts]\\)" + s start) + (setq var (cdr (assoc (match-string 3 s) + '(("c" . category) ("t" . time) ("s" . extra)))) + c (match-string 2 s) + start (1+ (match-beginning 0))) + (if (= (length c) 1) + (setq varform `(if (equal "" ,var) "" (concat ,var ,c))) + (setq varform var)) + (setq s (replace-match "%\\1s" t nil s)) + (push varform vars)) + (setq vars (nreverse vars)) + (setq org-prefix-format-compiled `(format ,s ,@vars)))) + (defun org-get-time-of-day (s) - "Check string S for a time of day." + "Check string S for a time of day. +If found, return it as a military time number between 0 and 2400. +If not found, return nil." (save-match-data - (when (and - (string-match - "\\<\\([012][0-9]\\)\\(:\\([0-6][0-9]\\)\\)?\\([AaPp][Mm]\\)?\\>" s) - (or (match-beginning 2) (match-beginning 4))) - (+ (* 100 (+ (string-to-number (match-string 1 s)) - (if (and (match-beginning 4) - (equal (downcase (match-string 4 s)) "pm")) - 12 0))) - (if (match-beginning 3) - (string-to-number (match-string 3 s)) - 0))))) + (when (or + (string-match + "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\>" s) + (string-match + "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)?\\([AaPp][Mm]\\)\\>" s)) + (+ (* 100 (+ (string-to-number (match-string 1 s)) + (if (and (match-beginning 4) + (equal (downcase (match-string 4 s)) "pm")) + 12 0))) + (if (match-beginning 3) + (string-to-number (match-string 3 s)) + 0))))) (defun org-finalize-agenda-entries (list) "Sort and concatenate the agenda items." @@ -4073,7 +4188,7 @@ (let* ((pri (get-text-property (point-at-bol) 'priority))) (message "Priority is %d" (if pri pri -1000)))) -(defun org-agenda-goto () +(defun org-agenda-goto (&optional highlight) "Go to the Org-mode file which contains the item at point." (interactive) (let* ((marker (or (get-text-property (point) 'org-marker) @@ -4087,7 +4202,8 @@ (org-show-hidden-entry) (save-excursion (and (outline-next-heading) - (org-flag-heading nil)))))) ; show the next heading + (org-flag-heading nil)))) ; show the next heading + (and highlight (org-highlight (point-at-bol) (point-at-eol))))) (defun org-agenda-switch-to () "Go to the Org-mode file which contains the item at point." @@ -4116,14 +4232,14 @@ "Display the Org-mode file which contains the item at point." (interactive) (let ((win (selected-window))) - (org-agenda-goto) + (org-agenda-goto t) (select-window win))) (defun org-agenda-recenter (arg) "Display the Org-mode file which contains the item at point and recenter." (interactive "P") (let ((win (selected-window))) - (org-agenda-goto) + (org-agenda-goto t) (recenter arg) (select-window win))) @@ -4159,8 +4275,7 @@ (hdmarker (get-text-property (point) 'org-hd-marker)) (buffer-read-only nil) newhead) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (widen) (goto-char pos) (org-show-hidden-entry) @@ -4225,18 +4340,14 @@ the same tree node, and the headline of the tree node in the Org-mode file." (interactive) (org-agenda-check-no-diary) - (let* ((props (text-properties-at (point))) - (col (current-column)) - (marker (or (get-text-property (point) 'org-marker) + (let* ((marker (or (get-text-property (point) 'org-marker) (org-agenda-error))) - (pl (get-text-property (point-at-bol) 'prefix-length)) (buffer (marker-buffer marker)) (pos (marker-position marker)) (hdmarker (get-text-property (point) 'org-hd-marker)) (buffer-read-only nil) newhead) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (widen) (goto-char pos) (org-show-hidden-entry) @@ -4271,20 +4382,21 @@ (org-agenda-date-later (- arg) what)) (defun org-agenda-date-prompt (arg) - "Change the date of this item. Date is prompted for, with default today." - (interactive "p") + "Change the date of this item. Date is prompted for, with default today. +The prefix ARG is passed to the `org-time-stamp' command and can therefore +be used to request time specification in the time stamp." + (interactive "P") (org-agenda-check-no-diary) (let* ((marker (or (get-text-property (point) 'org-marker) (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (widen) (goto-char pos) (if (not (org-at-timestamp-p)) (error "Cannot find time stamp")) - (org-time-stamp nil) + (org-time-stamp arg) (message "Time stamp changed to %s" org-last-changed-timestamp)))) (defun org-get-heading () @@ -4295,10 +4407,10 @@ (match-string 1) ""))) -(defun org-agenda-diary-entry (arg) +(defun org-agenda-diary-entry () "Make a diary entry, like the `i' command from the calendar. All the standard commands work: block, weekly etc" - (interactive "P") + (interactive) (require 'diary-lib) (let* ((char (progn (message "Diary entry: [d]ay [w]eekly [m]onthly [y]early [a]nniversary [b]lock [c]yclic") @@ -4344,7 +4456,6 @@ (error "Don't know which date to use for calendar command")) (let* ((oldf (symbol-function 'calendar-cursor-to-date)) (point (point)) - (mark (or (mark t) (point))) (date (calendar-gregorian-from-absolute (get-text-property point 'day))) (displayed-day (extract-calendar-day date)) @@ -4527,11 +4638,25 @@ (defun org-follow-bbdb-link (name) "Follow a BBDB link to NAME." (require 'bbdb) - ;; First try an exact match - (bbdb-name (concat "\\`" name "\\'") nil) - (if (= 0 (buffer-size (get-buffer "*BBDB*"))) - ;; No exact match - try partial match - (bbdb-name name nil))) + (let ((inhibit-redisplay t)) + (catch 'exit + ;; Exact match on name + (bbdb-name (concat "\\`" name "\\'") nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Exact match on name + (bbdb-company (concat "\\`" name "\\'") nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Partial match on name + (bbdb-name name nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; Partial match on company + (bbdb-company name nil) + (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil)) + ;; General match including network address and notes + (bbdb name nil) + (when (= 0 (buffer-size (get-buffer "*BBDB*"))) + (delete-window (get-buffer-window "*BBDB*")) + (error "No matching BBDB record"))))) (defun org-follow-gnus-link (&optional group article) "Follow a Gnus link to GROUP and ARTICLE." @@ -4545,7 +4670,6 @@ (gnus-summary-insert-cached-articles) (gnus-summary-goto-article article nil 'force)) (message "Message could not be found."))))) -;; (if article (gnus-summary-goto-article article nil 'force))) (defun org-follow-vm-link (&optional folder article readonly) "Follow a VM link to FOLDER and ARTICLE." @@ -4681,8 +4805,9 @@ ((eq major-mode 'bbdb-mode) (setq link (concat "bbdb:" - (bbdb-record-name (bbdb-current-record))))) - + (or (bbdb-record-name (bbdb-current-record)) + (bbdb-record-company (bbdb-current-record)))))) + ((eq major-mode 'calendar-mode) (let ((cd (calendar-cursor-to-date))) (setq link @@ -4702,7 +4827,6 @@ (folder (buffer-file-name)) (subject (vm-su-subject message)) (author (vm-su-full-name message)) - (address (vm-su-from message)) (message-id (vm-su-message-id message))) (setq folder (abbreviate-file-name folder)) (if (string-match (concat "^" (regexp-quote vm-folder-directory)) @@ -4747,9 +4871,8 @@ group)) (setq link (concat "gnus:" group))))) - ((or (eq major-mode 'gnus-summary-mode) - (eq major-mode 'gnus-article-mode)) - (gnus-article-show-summary) + ((memq major-mode '(gnus-summary-mode gnus-article-mode)) + (and (eq major-mode 'gnus-article-mode) (gnus-article-show-summary)) (gnus-summary-beginning-of-article) (let* ((group (car gnus-article-current)) (article (cdr gnus-article-current)) @@ -4825,8 +4948,7 @@ (defun org-fixup-message-id-for-http (s) - "Replace special characters in a message id, so that it can be used -in an http query." + "Replace special characters in a message id, so it can be used in an http query." (while (string-match "<" s) (setq s (replace-match "%3C" t t s))) (while (string-match ">" s) @@ -4843,13 +4965,13 @@ press RET at the prompt), the link defaults to the most recently stored link. -With a C-u prefix, prompts for a file to link to. The file name can be +With a \\[universal-argument] prefix, prompts for a file to link to. The file name can be selected using completion. The path to the file will be relative to the current directory if the file is in the current directory or a subdirectory. Otherwise, the link will be the absolute path as completed in the minibuffer (i.e. normally ~/path/to/file). -With two C-u prefixes, enforce an absolute path even if the file +With two \\[universal-argument] prefixes, enforce an absolute path even if the file is in the current directory or below." (interactive "P") (let ((link (if complete-file @@ -4970,11 +5092,10 @@ ;; Find the file (if (not visiting) (find-file-noselect file)) - (save-excursion - (set-buffer (get-file-buffer file)) + (with-current-buffer (get-file-buffer file) (setq reversed (org-notes-order-reversed-p)) - (save-restriction - (save-excursion + (save-excursion + (save-restriction (widen) ;; Ask the User for a location (setq spos (if fastp 1 (org-get-location @@ -5038,12 +5159,6 @@ ;; Emacs package. We call the former org-type tables, and the latter ;; table.el-type tables. -;; We use a before-change function to check if a table might need -;; an update. -(defvar org-table-may-need-update t - "Indicates of a table might need an update. -This variable is set by `org-before-change-function'. `org-table-align' -sets it back to nil.") (defun org-before-change-function (beg end) "Every change indicates that a table might need an update." @@ -5058,7 +5173,7 @@ (defconst org-table1-hline-regexp "^[ \t]*\\+-[-+]" "Detects a table-type table hline.") (defconst org-table-any-line-regexp "^[ \t]*\\(|\\|\\+-[-+]\\)" - "Detects an org-type or table-type table") + "Detects an org-type or table-type table.") (defconst org-table-border-regexp "^[ \t]*[^| \t]" "Searching from within a table (any type) this finds the first line outside the table.") @@ -5210,9 +5325,9 @@ This is being used to correctly align a single field after TAB or RET.") -(defun org-table-align (&optional arg) +(defun org-table-align () "Align the table at point by aligning all vertical bars." - (interactive "P") + (interactive) (let* ( ;; Limits of table (beg (org-table-begin)) @@ -5366,10 +5481,10 @@ (setq org-table-may-need-update t)) (goto-char pos)))))) -(defun org-table-next-field (&optional arg) +(defun org-table-next-field () "Go to the next field in the current table. Before doing so, re-align the table if necessary." - (interactive "P") + (interactive) (if (and org-table-automatic-realign org-table-may-need-update) (org-table-align)) @@ -5388,10 +5503,10 @@ (error (org-table-insert-row 'below)))) -(defun org-table-previous-field (&optional arg) +(defun org-table-previous-field () "Go to the previous field in the table. Before doing so, re-align the table if necessary." - (interactive "P") + (interactive) (if (and org-table-automatic-realign org-table-may-need-update) (org-table-align)) @@ -5404,10 +5519,10 @@ (if (looking-at "| ?") (goto-char (match-end 0)))) -(defun org-table-next-row (&optional arg) +(defun org-table-next-row () "Go to the next row (same column) in the current table. Before doing so, re-align the table if necessary." - (interactive "P") + (interactive) (if (or (looking-at "[ \t]*$") (save-excursion (skip-chars-backward " \t") (bolp))) (newline) @@ -5470,6 +5585,9 @@ (looking-at "[ \t]*$")) (error "Not in table data field"))) +(defvar org-table-clip nil + "Clipboard for table regions") + (defun org-table-blank-field () "Blank the current table field or active region." (interactive) @@ -5497,7 +5615,6 @@ (backward-char 1) (if (looking-at "|[^|\r\n]*") (let* ((pos (match-beginning 0)) - (len (length (match-string 0))) (val (buffer-substring (1+ pos) (match-end 0)))) (if replace (replace-match (concat "|" replace))) @@ -5591,9 +5708,9 @@ (looking-at org-table-hline-regexp)) nil)) -(defun org-table-insert-column (&optional arg) +(defun org-table-insert-column () "Insert a new column into the table." - (interactive "P") + (interactive) (if (not (org-at-table-p)) (error "Not at a table")) (org-table-find-dataline) @@ -5634,9 +5751,9 @@ (error "Please position cursor in a data line for column operations"))))) -(defun org-table-delete-column (&optional arg) +(defun org-table-delete-column () "Delete a column into the table." - (interactive "P") + (interactive) (if (not (org-at-table-p)) (error "Not at a table")) (org-table-find-dataline) @@ -5777,9 +5894,9 @@ (beginning-of-line 0) (move-to-column col))) -(defun org-table-kill-row (&optional arg) +(defun org-table-kill-row () "Delete the current row or horizontal line from the table." - (interactive "P") + (interactive) (if (not (org-at-table-p)) (error "Not at a table")) (let ((col (current-column))) @@ -5788,14 +5905,11 @@ (move-to-column col))) -(defun org-table-cut-region (&optional arg) +(defun org-table-cut-region () "Copy region in table to the clipboard and blank all relevant fields." - (interactive "P") + (interactive) (org-table-copy-region 'cut)) -(defvar org-table-clip nil - "Clipboard for table regions") - (defun org-table-copy-region (&optional cut) "Copy rectangular region in table to clipboard. A special clipboard is used which can only be accessed @@ -5832,20 +5946,19 @@ (setq org-table-clip (nreverse region)) (if cut (org-table-align)))) -(defun org-table-paste-rectangle (&optional arg) +(defun org-table-paste-rectangle () "Paste a rectangular region into a table. The upper right corner ends up in the current field. All involved fields will be overwritten. If the rectangle does not fit into the present table, the table is enlarged as needed. The process ignores horizontal separator lines." - (interactive "P") + (interactive) (unless (and org-table-clip (listp org-table-clip)) (error "First cut/copy a region to paste!")) (org-table-check-inside-data-field) (let* ((clip org-table-clip) (line (count-lines (point-min) (point))) (col (org-table-current-column)) - (l line) (org-enable-table-editor t) (org-table-automatic-realign nil) c cols field) @@ -5864,7 +5977,7 @@ (org-table-align))) (defun org-table-convert () - "Convert from org-mode table to table.el and back. + "Convert from `org-mode' table to table.el and back. Obviously, this only works within limits. When an Org-mode table is converted to table.el, all horizontal separator lines get lost, because table.el uses these as cell boundaries and has no notion of horizontal lines. @@ -5915,7 +6028,7 @@ If there is an active region, and both point and mark are in the same column, the text in the column is wrapped to minimum width for the given number of lines. Generally, this makes the table more compact. A prefix ARG may be -used to change the number of desired lines. For example, `C-2 C-c C-q' +used to change the number of desired lines. For example, `C-2 \\[org-table-wrap]' formats the selected text to two lines. If the region was longer than 2 lines, the remaining lines remain empty. A negative prefix argument reduces the current number of lines by that amount. The wrapped text is pasted back @@ -5984,8 +6097,6 @@ The return value is a list of lines, without newlines at the end." (let* ((words (org-split-string string "[ \t\n]+")) (maxword (apply 'max (mapcar 'length words))) - (black (apply '+ (mapcar 'length words))) - (total (+ black (length words))) w ll) (cond (width (org-do-wrap words (max maxword width))) @@ -6003,7 +6114,7 @@ (defun org-do-wrap (words width) - "Creates lines of maximum width WIDTH (in characters) from word list WORDS." + "Create lines of maximum width WIDTH (in characters) from word list WORDS." (let (lines line) (while words (setq line (pop words)) @@ -6222,10 +6333,10 @@ $;%.1f Reformat current cell to 1 digit after dec.point ($3-32)*5/9 degrees F -> C conversion -When called with a raw C-u prefix, the formula is applied to the current +When called with a raw \\[universal-argument] prefix, the formula is applied to the current field, and to the same same column in all following rows, until reaching a horizontal line or the end of the table. When the command is called with a -numeric prefix argument (like M-3 or C-7 or C-u 24), the formula is applied +numeric prefix argument (like M-3 or C-7 or \\[universal-argument] 24), the formula is applied to the current row, and to the following n-1 rows (but not beyond a separator line)." (interactive "P") @@ -6297,7 +6408,7 @@ ;; modified self-insert. (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) - "Non-nil means, use the optimized table editor version for orgtbl-mode. + "Non-nil means, use the optimized table editor version for `orgtbl-mode'. In the optimized version, the table editor takes over all simple keys that normally just insert a character. In tables, the characters are inserted in a way to minimize disturbing the table structure (i.e. in overwrite mode @@ -6311,21 +6422,21 @@ :type 'boolean) (defvar orgtbl-mode nil - "Variable controlling orgtbl-mode, a minor mode enabling the org-mode + "Variable controlling `orgtbl-mode', a minor mode enabling the `org-mode' table editor in arbitrary modes.") (make-variable-buffer-local 'orgtbl-mode) (defvar orgtbl-mode-map (make-sparse-keymap) - "Keymap for orgtbl-mode.") + "Keymap for `orgtbl-mode'.") ;;;###autoload (defun turn-on-orgtbl () - "Unconditionally turn on orgtbl-mode." + "Unconditionally turn on `orgtbl-mode'." (orgtbl-mode 1)) ;;;###autoload (defun orgtbl-mode (&optional arg) - "The org-mode table editor as a minor mode for use in other modes." + "The `org-mode' table editor as a minor mode for use in other modes." (interactive) (setq orgtbl-mode (if arg (> (prefix-numeric-value arg) 0) (not orgtbl-mode))) @@ -6435,13 +6546,13 @@ (define-key org-mode-map "|" 'self-insert-command)) (defun orgtbl-tab () - "Justification and field motion for orgtbl-mode." + "Justification and field motion for `orgtbl-mode'." (interactive) (org-table-justify-field-maybe) (org-table-next-field)) (defun orgtbl-ret () - "Justification and field motion for orgtbl-mode." + "Justification and field motion for `orgtbl-mode'." (interactive) (org-table-justify-field-maybe) (org-table-next-row)) @@ -6454,7 +6565,7 @@ (if (and (org-at-table-p) (eq N 1) (looking-at "[^|\n]* +|")) - (let (org-table-may-need-update (pos (point))) + (let (org-table-may-need-update) (goto-char (1- (match-end 0))) (delete-backward-char 1) (goto-char (match-beginning 0)) @@ -6869,6 +6980,8 @@ It is supplemented by a number of commonly used TeX macros with appropriate translations.") +(defvar org-last-level nil) ; dynamically scoped variable + (defun org-export-as-ascii (arg) "Export the outline as a pretty ASCII file. If there is an active region, export only the region. @@ -6898,10 +7011,10 @@ (email user-mail-address) (language org-export-default-language) (text nil) - (last-level 1) (todo nil) (lang-words nil)) + (setq org-last-level 1) (org-init-section-numbers) (find-file-noselect filename) @@ -6962,7 +7075,7 @@ (insert (make-string (* (1- level) 4) ?\ ) (format (if todo "%s (*)\n" "%s\n") txt)) - (setq last-level level)) + (setq org-last-level level)) )))) lines))) @@ -7030,11 +7143,11 @@ (setq title (concat (org-section-number level) " " title))) (insert title "\n" (make-string (string-width title) char) "\n")))) -(defun org-export-copy-visible (&optional arg) +(defun org-export-copy-visible () "Copy the visible part of the buffer to another buffer, for printing. Also removes the first line of the buffer if it specifies a mode, and all options lines." - (interactive "P") + (interactive) (let* ((filename (concat (file-name-sans-extension (buffer-file-name)) ".txt")) (buffer (find-file-noselect filename)) @@ -7044,8 +7157,7 @@ "TITLE" "AUTHOR" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE")) (if org-noutline-p "\\(\n\\|$\\)" ""))) s e) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (erase-buffer) (text-mode)) (save-excursion @@ -7174,7 +7286,7 @@ (org-open-file (buffer-file-name))) (defun org-export-as-html-batch () - "Call org-export-as-html, may be used in batch processing as + "Call `org-export-as-html', may be used in batch processing as emacs --batch --load=$HOME/lib/emacs/org.el --eval \"(setq org-export-headline-levels 2)\" @@ -7199,7 +7311,6 @@ (org-skip-comments (org-split-string region "[\r\n]"))) (lines (org-export-find-first-heading-line all_lines)) (level 0) (line "") (origline "") txt todo - (last-level 1) (umax nil) (filename (concat (file-name-sans-extension (buffer-file-name)) ".html")) @@ -7220,6 +7331,7 @@ ) (message "Exporting...") + (setq org-last-level 1) (org-init-section-numbers) ;; Search for the export key lines @@ -7284,15 +7396,15 @@ (if (<= level umax) (progn (setq head-count (+ head-count 1)) - (if (> level last-level) + (if (> level org-last-level) (progn - (setq cnt (- level last-level)) + (setq cnt (- level org-last-level)) (while (>= (setq cnt (1- cnt)) 0) (insert "<ul>")) (insert "\n"))) - (if (< level last-level) + (if (< level org-last-level) (progn - (setq cnt (- last-level level)) + (setq cnt (- org-last-level level)) (while (>= (setq cnt (1- cnt)) 0) (insert "</ul>")) (insert "\n"))) @@ -7302,11 +7414,11 @@ "<li><a href=\"#sec-%d\"><span style='color:red'>%s</span></a></li>\n" "<li><a href=\"#sec-%d\">%s</a></li>\n") head-count txt)) - (setq last-level level)) + (setq org-last-level level)) )))) lines) - (while (> last-level 0) - (setq last-level (1- last-level)) + (while (> org-last-level 0) + (setq org-last-level (1- org-last-level)) (insert "</ul>\n")) )) (setq head-count 0) @@ -7537,17 +7649,14 @@ This has the advantage that cell- or row-spanning is allowed. But it has the disadvantage, that Org-mode's HTML conversions cannot be used." (require 'table) - (save-excursion - (set-buffer (get-buffer-create " org-tmp1 ")) + (with-current-buffer (get-buffer-create " org-tmp1 ") (erase-buffer) (insert (mapconcat 'identity lines "\n")) (goto-char (point-min)) (if (not (re-search-forward "|[^+]" nil t)) (error "Error processing table.")) (table-recognize-table) - (save-excursion - (set-buffer (get-buffer-create " org-tmp2 ")) - (erase-buffer)) + (with-current-buffer (get-buffer-create " org-tmp2 ") (erase-buffer)) (table-generate-source 'html " org-tmp2 ") (set-buffer " org-tmp2 ") (buffer-substring (point-min) (point-max)))) @@ -7711,7 +7820,7 @@ level head-count title level)) (insert (format "\n<H%d>%s</H%d>\n" level title level)))))) -(defun org-html-level-close (level) +(defun org-html-level-close (&rest args) "Terminate one level in HTML export." (insert "</ul>")) @@ -7800,6 +7909,7 @@ (define-key org-mode-map "\C-c/" 'org-occur) ; Minor-mode reserved (define-key org-mode-map "\C-c\C-m" 'org-insert-heading) (define-key org-mode-map "\M-\C-m" 'org-insert-heading) +(define-key org-mode-map [(meta shift return)] 'org-insert-todo-heading) (define-key org-mode-map "\C-c\C-l" 'org-insert-link) (define-key org-mode-map "\C-c\C-o" 'org-open-at-point) (define-key org-mode-map "\C-c\C-z" 'org-time-stamp) ; Alternative binding @@ -7811,8 +7921,6 @@ (define-key org-mode-map "\C-c[" 'org-add-file) (define-key org-mode-map "\C-c]" 'org-remove-file) (define-key org-mode-map "\C-c\C-r" 'org-timeline) -;(define-key org-mode-map [(shift up)] 'org-timestamp-up) -;(define-key org-mode-map [(shift down)] 'org-timestamp-down) (define-key org-mode-map [(shift up)] 'org-shiftup) (define-key org-mode-map [(shift down)] 'org-shiftdown) (define-key org-mode-map [(shift left)] 'org-timestamp-down-day) @@ -7864,7 +7972,7 @@ (if (and (org-table-p) (eq N 1) (looking-at "[^|\n]* +|")) - (let (org-table-may-need-update (pos (point))) + (let (org-table-may-need-update) (goto-char (1- (match-end 0))) (delete-backward-char 1) (goto-char (match-beginning 0)) @@ -7935,25 +8043,27 @@ ((org-at-table-p) (org-table-previous-field)) (t (org-cycle '(4))))) -(defun org-shiftmetaleft (&optional arg) +(defun org-shiftmetaleft () "Call `org-promote-subtree' or `org-table-delete-column'." - (interactive "P") + (interactive) (cond - ((org-at-table-p) (org-table-delete-column arg)) - ((org-on-heading-p) (org-promote-subtree arg)) + ((org-at-table-p) (org-table-delete-column)) + ((org-on-heading-p) (org-promote-subtree)) (t (org-shiftcursor-error)))) -(defun org-shiftmetaright (&optional arg) + +(defun org-shiftmetaright () "Call `org-demote-subtree' or `org-table-insert-column'." - (interactive "P") + (interactive) (cond - ((org-at-table-p) (org-table-insert-column arg)) - ((org-on-heading-p) (org-demote-subtree arg)) + ((org-at-table-p) (org-table-insert-column)) + ((org-on-heading-p) (org-demote-subtree)) (t (org-shiftcursor-error)))) + (defun org-shiftmetaup (&optional arg) "Call `org-move-subtree-up' or `org-table-kill-row'." (interactive "P") (cond - ((org-at-table-p) (org-table-kill-row arg)) + ((org-at-table-p) (org-table-kill-row)) ((org-on-heading-p) (org-move-subtree-up arg)) (t (org-shiftcursor-error)))) (defun org-shiftmetadown (&optional arg) @@ -7969,15 +8079,17 @@ (interactive "P") (cond ((org-at-table-p) (org-table-move-column 'left)) - ((or (org-on-heading-p) (org-region-active-p)) (org-do-promote arg)) + ((or (org-on-heading-p) (org-region-active-p)) (org-do-promote)) (t (backward-word (prefix-numeric-value arg))))) + (defun org-metaright (&optional arg) "Call `org-do-demote' or `org-table-move-column' to right." (interactive "P") (cond ((org-at-table-p) (org-table-move-column nil)) - ((or (org-on-heading-p) (org-region-active-p)) (org-do-demote arg)) + ((or (org-on-heading-p) (org-region-active-p)) (org-do-demote)) (t (forward-word (prefix-numeric-value arg))))) + (defun org-metaup (&optional arg) "Call `org-move-subtree-up' or `org-table-move-row' up." (interactive "P") @@ -7985,6 +8097,7 @@ ((org-at-table-p) (org-table-move-row 'up)) ((org-on-heading-p) (org-move-subtree-up arg)) (t (org-shiftcursor-error)))) + (defun org-metadown (&optional arg) "Call `org-move-subtree-down' or `org-table-move-row' down." (interactive "P") @@ -8007,25 +8120,25 @@ ((org-at-timestamp-p) (org-timestamp-down arg)) (t (org-priority-down)))) -(defun org-copy-special (arg) +(defun org-copy-special () "Call either `org-table-copy' or `org-copy-subtree'." - (interactive "P") + (interactive) (if (org-at-table-p) - (org-table-copy-region arg) - (org-copy-subtree arg))) - -(defun org-cut-special (arg) - "Call either `org-table-copy' or `org-copy-subtree'." - (interactive "P") + (org-table-copy-region) + (org-copy-subtree))) + +(defun org-cut-special () + "Call either `org-table-copy' or `org-cut-subtree'." + (interactive) (if (org-at-table-p) - (org-table-cut-region arg) - (org-cut-subtree arg))) + (org-table-cut-region) + (org-cut-subtree))) (defun org-paste-special (arg) "Call either `org-table-paste-rectangle' or `org-paste-subtree'." (interactive "P") (if (org-at-table-p) - (org-table-paste-rectangle arg) + (org-table-paste-rectangle) (org-paste-subtree arg))) (defun org-ctrl-c-ctrl-c (&optional arg) @@ -8040,12 +8153,12 @@ ((org-at-table.el-p) (require 'table) (beginning-of-line 1) - (re-search-forward "|" (save-excursion (end-of-line 2) (point))) + (re-search-forward "|" (save-excursion (end-of-line 2) (point))) ;FIXME: line-end-position? (table-recognize-table)) ((org-at-table-p) (org-table-align)) ((save-excursion (beginning-of-line 1) (looking-at "#\\+[A-Z]+")) - (let (org-inhibit-startup) (org-mode))) + (let ((org-inhibit-startup t)) (org-mode))) ((org-region-active-p) (org-table-convert-region (region-beginning) (region-end) arg)) ((and (region-beginning) (region-end)) @@ -8054,9 +8167,9 @@ (error "Abort"))) (t (error "No table at point, and no region to make one."))))) -(defun org-return (&optional arg) +(defun org-return () "Call `org-table-next-row' or `newline'." - (interactive "P") + (interactive) (cond ((org-at-table-p) (org-table-justify-field-maybe) @@ -8069,7 +8182,7 @@ (cond ((org-at-table-p) (org-table-wrap-region arg)) - (t (org-insert-heading arg)))) + (t (org-insert-heading)))) ;;; Menu entries @@ -8256,7 +8369,7 @@ ;;; Miscellaneous stuff (defun org-move-line-down (arg) - "Move the current line up." + "Move the current line down. With prefix argument, move it past ARG lines." (interactive "p") (let ((col (current-column)) beg end pos) @@ -8269,13 +8382,13 @@ (move-to-column col))) (defun org-move-line-up (arg) - "Move the current line up." + "Move the current line up. With prefix argument, move it past ARG lines." (interactive "p") (let ((col (current-column)) beg end pos) (beginning-of-line 1) (setq beg (point)) (beginning-of-line 2) (setq end (point)) - (beginning-of-line (+ -2 arg)) + (beginning-of-line (- arg)) (setq pos (move-marker (make-marker) (point))) (insert (delete-and-extract-region beg end)) (goto-char pos) @@ -8284,7 +8397,7 @@ ;; Functions needed for Emacs/XEmacs region compatibility (defun org-region-active-p () - "Is transient-mark-mode on and the region active? + "Is `transient-mark-mode' on and the region active? Works on both Emacs and XEmacs." (if org-ignore-region nil @@ -8403,7 +8516,9 @@ This function considers both visible and invisible heading lines. With argument, move up ARG levels." (if org-noutline-p - (outline-up-heading arg t) + (if (fboundp 'outline-up-heading-all) + (outline-up-heading-all arg) ; emacs 21 version of outline.el + (outline-up-heading arg t)) ; emacs 22 version of outline.el (org-back-to-heading t) (looking-at outline-regexp) (if (<= (- (match-end 0) (match-beginning 0)) arg) @@ -8422,7 +8537,7 @@ (progn (org-back-to-heading t) (org-flag-heading nil))) - (show-entry))) + (org-show-entry))) (defun org-check-occur-regexp (regexp) "If REGEXP starts with \"^\", modify it to check for \\r as well. @@ -8444,7 +8559,7 @@ ;; Check if we should show the entire entry (if entry (progn - (show-entry) + (org-show-entry) (save-excursion ;; FIXME: Is this the fix for points in the -| ;; middle of text? | (and (outline-next-heading) ;; | @@ -8455,6 +8570,28 @@ flag (if flag ?\r ?\n)))))) +(defun org-show-subtree () + "Show everything after this heading at deeper levels." + (outline-flag-region + (point) + (save-excursion + (outline-end-of-subtree) (outline-next-heading) (point)) + (if org-noutline-p nil ?\n))) + +(defun org-show-entry () + "Show the body directly following this heading. +Show the heading too, if it is currently invisible." + (interactive) + (save-excursion + (org-back-to-heading t) + (outline-flag-region + (1- (point)) + (save-excursion + (re-search-forward (concat "[\r\n]\\(" outline-regexp "\\)") nil 'move) + (or (match-beginning 1) (point-max))) + (if org-noutline-p nil ?\n)))) + + (defun org-make-options-regexp (kwds) "Make a regular expression for keyword lines." (concat
--- a/lisp/textmodes/tex-mode.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/textmodes/tex-mode.el Thu May 05 00:04:55 2005 +0000 @@ -828,6 +828,14 @@ (tex-mode-internal) (tex-guess-mode))) +;; The following three autoloaded aliases appear to conflict with +;; AUCTeX. However, even though AUCTeX uses the mixed case variants +;; for all mode relevant variables and hooks, the invocation function +;; and setting of `major-mode' themselves need to be lowercase for +;; AUCTeX to provide a fully functional user-level replacement. So +;; these aliases should remain as they are, in particular since AUCTeX +;; users are likely to use them. + ;;;###autoload (defalias 'TeX-mode 'tex-mode) ;;;###autoload
--- a/lisp/tooltip.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/tooltip.el Thu May 05 00:04:55 2005 +0000 @@ -119,8 +119,10 @@ (defcustom tooltip-gud-tips-p nil "*Non-nil means show tooltips in GUD sessions. -This allows you to display a variable's value in a tooltip simply by -pointing at it with the mouse." +This allows you to display a variable's value in a tooltip simply +by pointing at it with the mouse. In the case of a C program +controlled by GDB, it shows the associated #define directives +when program is not executing." :type 'boolean :tag "GUD" :group 'tooltip) @@ -453,29 +455,45 @@ "Show tip for identifier or selection under the mouse. The mouse must either point at an identifier or inside a selected region for the tip window to be shown. If tooltip-gud-dereference is t, -add a `*' in front of the printed expression. +add a `*' in front of the printed expression. In the case of a C program +controlled by GDB, show the associated #define directives when program is +not executing. This function must return nil if it doesn't handle EVENT." (let (process) (when (and (eventp event) tooltip-gud-tips-p (boundp 'gud-comint-buffer) + gud-comint-buffer + (buffer-name gud-comint-buffer); gud-comint-buffer might be killed (setq process (get-buffer-process gud-comint-buffer)) (posn-point (event-end event)) - (progn (setq tooltip-gud-event event) - (eval (cons 'and tooltip-gud-display)))) + (or (eq gud-minor-mode 'gdba) + (progn (setq tooltip-gud-event event) + (eval (cons 'and tooltip-gud-display))))) (let ((expr (tooltip-expr-to-print event))) (when expr - (let ((cmd (tooltip-gud-print-command expr))) - (unless (null cmd) ; CMD can be nil if unknown debugger - (case gud-minor-mode - (gdba (gdb-enqueue-input - (list (concat cmd "\n") 'gdb-tooltip-print))) - (t - (setq tooltip-gud-original-filter (process-filter process)) - (set-process-filter process 'tooltip-gud-process-output) - (gud-basic-call cmd))) - expr))))))) + (if (and (eq gud-minor-mode 'gdba) + (not gdb-active-process)) + (progn + (with-current-buffer + (window-buffer (let ((mouse (mouse-position))) + (window-at (cadr mouse) + (cddr mouse)))) + (let ((define-elt (assoc expr gdb-define-alist))) + (unless (null define-elt) + (tooltip-show (cdr define-elt)) + expr)))) + (let ((cmd (tooltip-gud-print-command expr))) + (unless (null cmd) ; CMD can be nil if unknown debugger + (case gud-minor-mode + (gdba (gdb-enqueue-input + (list (concat cmd "\n") 'gdb-tooltip-print))) + (t + (setq tooltip-gud-original-filter (process-filter process)) + (set-process-filter process 'tooltip-gud-process-output) + (gud-basic-call cmd))) + expr)))))))) (defun gdb-tooltip-print () (tooltip-show
--- a/lisp/window.el Thu Apr 28 04:56:56 2005 +0000 +++ b/lisp/window.el Thu May 05 00:04:55 2005 +0000 @@ -29,6 +29,15 @@ ;;; Code: +(defvar window-size-fixed nil + "*Non-nil in a buffer means windows displaying the buffer are fixed-size. +If the value is`height', then only the window's height is fixed. +If the value is `width', then only the window's width is fixed. +Any other non-nil value fixes both the width and the height. +Emacs won't change the size of any window displaying that buffer, +unless you explicitly change the size, or Emacs has no other choice.") +(make-variable-buffer-local 'window-size-fixed) + (defmacro save-selected-window (&rest body) "Execute BODY, then select the window that was selected before BODY. Also restore the selected window of each frame as it was at the start
--- a/lispref/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,120 @@ +2005-05-04 Richard M. Stallman <rms@gnu.org> + + * commands.texi (Interactive Codes): Fix Texinfo usage. + Document U more clearly. + +2005-05-01 Luc Teirlinck <teirllm@auburn.edu> + + * variables.texi (Variable Aliases): `make-obsolete-variable' is a + function and not a macro. + + * frames.texi (Pop-Up Menus): Correct and clarify description of + `x-popup-menu'. + (Dialog Boxes): Clarify description of `x-popup-dialog'. + +2005-05-01 Richard M. Stallman <rms@gnu.org> + + * edebug.texi (Checking Whether to Stop): Fix previous change. + +2005-05-01 Luc Teirlinck <teirllm@auburn.edu> + + * display.texi: Fix typos and Texinfo usage. + + * edebug.texi (Checking Whether to Stop): executing-macro -> + executing-kbd-macro. + +2005-05-01 Richard M. Stallman <rms@gnu.org> + + * display.texi (Invisible Text): Correct add-to-invisibility-spec. + +2005-04-30 Richard M. Stallman <rms@gnu.org> + + * files.texi (Magic File Names): Document `operations' property. + +2005-04-29 Lute Kamstra <lute@gnu.org> + + * modes.texi (Generic Modes): New node. + (Major Modes): Add it to the menu. + (Derived Modes): Add "derived mode" to concept index. + +2005-04-28 Lute Kamstra <lute@gnu.org> + + * modes.texi (Defining Minor Modes): Fix previous change. + (Font Lock Mode): Simplify. + (Font Lock Basics): Say that font-lock-defaults is buffer-local + when set and that some parts are optional. Add cross references. + (Search-based Fontification): Say how to specify font-lock-keywords. + Add cross references. Add font-lock-multiline to index. Move + font-lock-keywords-case-fold-search here from node "Other Font + Lock Variables". Document font-lock-add-keywords and + font-lock-remove-keywords + (Other Font Lock Variables): Move font-lock-keywords-only, + font-lock-syntax-table, font-lock-beginning-of-syntax-function, + and font-lock-syntactic-face-function to node "Syntactic Font + Lock". Move font-lock-keywords-case-fold-search to node + "Search-based Fontification". Document font-lock-inhibit-thing-lock + and font-lock-{,un}fontify-{buffer,region}-function. + (Precalculated Fontification): Remove reference to deleted variable + font-lock-core-only. + (Faces for Font Lock): Add font-lock-comment-delimiter-face. + (Syntactic Font Lock): Add intro. Move font-lock-keywords-only, + font-lock-syntax-table, font-lock-beginning-of-syntax-function, + and font-lock-syntactic-face-function here from node "Other Font + Lock Variables". Move font-lock-syntactic-keywords to "Setting + Syntax Properties". Add cross references. + (Setting Syntax Properties): New node. Move + font-lock-syntactic-keywords here from "Syntactic Font Lock". + * syntax.texi (Syntax Properties): Add cross reference. + * hooks.texi (Standard Hooks): Add Font-Lock hooks. + +2005-04-26 Richard M. Stallman <rms@gnu.org> + + * display.texi (Defining Faces): + Document `default' elements of defface spec. + + * modes.texi (Major Mode Conventions): Explain customizing ElDoc mode. + + * variables.texi (Variable Aliases): Clarify text. + +2005-04-25 Chong Yidong <cyd@stupidchicken.com> + + * windows.texi (Window Hooks): Remove reference to obsolete Lazy Lock. + +2005-04-25 Luc Teirlinck <teirllm@auburn.edu> + + * hooks.texi (Standard Hooks): Most minor modes have mode hooks too. + +2005-04-24 Eli Zaretskii <eliz@gnu.org> + + * syntax.texi (Syntax Table Internals): Elaborate documentation of + syntax-after and syntax-class. + + * files.texi (Changing Files): Fix last change's cross-reference. + (Unique File Names): Don't mention "numbers" in the documentation + of make-temp-file and make-temp-name. + +2005-04-23 Richard M. Stallman <rms@gnu.org> + + * files.texi (Changing Files): Document MUSTBENEW arg in copy-file. + +2005-04-22 Nick Roberts <nickrob@snap.net.nz> + + * windows.texi (Cyclic Window Ordering): Clarify window-list. + +2005-04-22 Nick Roberts <nickrob@snap.net.nz> + + * variables.texi (Variable Aliases): Describe make-obsolete-variable + and define-obsolete-variable-alias. + +2005-04-22 Kim F. Storm <storm@cua.dk> + + * symbols.texi (Symbol Plists): Remove safe-get, as get is now safe. + (Other Plists): Remove safe-plist-get, as plist-get is now safe. + +2005-04-21 Lute Kamstra <lute@gnu.org> + + * lists.texi (Association Lists): Document rassq-delete-all. + 2005-04-19 Richard M. Stallman <rms@gnu.org> * modes.texi (Search-based Fontification): Explain that @@ -1044,7 +1161,7 @@ * hooks.texi (Standard Hooks): `disabled-command-hook' has been renamed to `disabled-command-function'. - * commands.texi (Key Sequence Input): Remove unnecessary anchor, + * commands.texi (Key Sequence Input): Remove unnecessary anchor. (Command Loop Info): Replace reference to it. (Disabling Commands): `disabled-command-hook' has been renamed to `disabled-command-function'.
--- a/lispref/commands.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/commands.texi Thu May 05 00:04:55 2005 +0000 @@ -365,8 +365,9 @@ maps. The key sequence argument is represented as a string or vector. The cursor does not move into the echo area. Prompt. -If the key sequence is a down-event, the following up-event is discarded, -but can be read via the @code{U} code character. +If @samp{k} reads a key sequence that ends with a down-event, it also +reads and discards the following up-event. You can get access to that +up-event with the @samp{U} code character. This kind of input is used by commands such as @code{describe-key} and @code{global-set-key}. @@ -425,9 +426,10 @@ parentheses and brackets) do not do so here. Prompt. @item U -A key sequence or @code{nil}. May be used after a @code{k} or @code{K} -argument to get the up-event that was discarded in case the key -sequence read for that argument was a down-event. No I/O. +A key sequence or @code{nil}. Can be used after a @samp{k} or +@samp{K} argument to get the up-event that was discarded (if any) +after @samp{k} or @samp{K} read a down-event. If no up-event has been +discarded, @samp{U} provides @code{nil} as the argument. No I/O. @item v A variable declared to be a user option (i.e., satisfying the @@ -442,8 +444,9 @@ @item X @cindex evaluated expression argument -A Lisp form is read as with @kbd{x}, but then evaluated so that its -value becomes the argument for the command. Prompt. +A Lisp form's value. @samp{X} reads as @samp{x} does, then evaluates +the form so that its value becomes the argument for the command. +Prompt. @item z A coding system name (a symbol). If the user enters null input, the
--- a/lispref/display.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/display.texi Thu May 05 00:04:55 2005 +0000 @@ -717,10 +717,9 @@ @defun add-to-invisibility-spec element This function adds the element @var{element} to -@code{buffer-invisibility-spec} (if it is not already present in that -list). If @code{buffer-invisibility-spec} was @code{t}, it changes to -a list, @code{(t)}, so that text whose @code{invisible} property -is @code{t} remains invisible. +@code{buffer-invisibility-spec}. If @code{buffer-invisibility-spec} +was @code{t}, it changes to a list, @code{(t)}, so that text whose +@code{invisible} property is @code{t} remains invisible. @end defun @defun remove-from-invisibility-spec element @@ -1143,9 +1142,9 @@ @var{end} whose property @var{name} has the value @var{value}. It can move the endpoints of the overlays in the region, or split them. -If @var{name} is omitted or nil, it means to delete all overlays in +If @var{name} is omitted or @code{nil}, it means to delete all overlays in the specified region. If @var{start} and/or @var{end} are omitted or -nil, that means the beginning and end of the buffer respectively. +@code{nil}, that means the beginning and end of the buffer respectively. Therefore, @code{(remove-overlays)} removes all the overlays in the current buffer. @end defun @@ -1557,7 +1556,7 @@ adding blank areas between the images. If the property value is not @code{t}, it is a height spec. A height -spec stands for a numeric height value; this heigh spec specifies the +spec stands for a numeric height value; this height spec specifies the actual line height, @var{line-height}. There are several ways to write a height spec; here's how each of them translates into a numeric height: @@ -1573,7 +1572,7 @@ is @var{ratio} times the height of face @var{face}. @var{ratio} can be any type of number, or @code{nil} which means a ratio of 1. If @var{face} is @code{t}, it refers to the current face. -@item (@code{nil} . @var{ratio}) +@item (nil . @var{ratio}) If the height spec is a cons of the format shown, the numeric height is @var{ratio} times the height of the contents of the line. @end table @@ -1584,7 +1583,7 @@ the line to achieve the total height @var{line-height}. Otherwise, @var{line-height} has no effect. - If you don't specify the @code{line-height} propery, the line's + If you don't specify the @code{line-height} property, the line's height consists of the contents' height plus the line spacing. There are several ways to specify the line spacing for different parts of Emacs text. @@ -1800,19 +1799,28 @@ init file (@pxref{Init File}) to override that specification. The purpose of @var{spec} is to specify how the face should appear on -different kinds of terminals. It should be an alist whose elements have -the form @code{(@var{display} @var{atts})}. Each element's @sc{car}, -@var{display}, specifies a class of terminals. The element's second element, -@var{atts}, is a list of face attributes and their values; it specifies -what the face should look like on that kind of terminal. The possible -attributes are defined in the value of @code{custom-face-attributes}. +different kinds of terminals. It should be an alist whose elements +have the form @code{(@var{display} @var{atts})}. Each element's +@sc{car}, @var{display}, specifies a class of terminals. (The first +element, if it s @sc{car} is @code{default}, is special---it specifies +defaults for the remaining elements). The element's @sc{cadr}, +@var{atts}, is a list of face attributes and their values; it +specifies what the face should look like on that kind of terminal. +The possible attributes are defined in the value of +@code{custom-face-attributes}. The @var{display} part of an element of @var{spec} determines which -frames the element applies to. If more than one element of @var{spec} -matches a given frame, the first matching element is the only one used -for that frame. There are two possibilities for @var{display}: +frames the element matches. If more than one element of @var{spec} +matches a given frame, the first element that matches is the one used +for that frame. There are three possibilities for @var{display}: @table @asis +@item @code{default} +This element of @var{spec} doesn't match any frames; instead, it +specifies defaults that apply to all frames. This kind of element, if +used, must be the first element of @var{spec}. Each of the following +elements can override any or all of these defaults. + @item @code{t} This element of @var{spec} matches all frames. Therefore, any subsequent elements of @var{spec} are never used. Normally @@ -1840,8 +1848,9 @@ The kind of background---either @code{light} or @code{dark}. @item min-colors -An integer that represents the minimum number of colors the frame should -support, it is compared with the result of @code{display-color-cells}. +An integer that represents the minimum number of colors the frame +should support. This matches a frame if its +@code{display-color-cells} value is at least the specified integer. @item supports Whether or not the frame can display the face attributes given in @@ -2975,7 +2984,7 @@ @code{overlay-arrow-variable-list}. @defvar overlay-arrow-variable-list -This variable's value is a list of varibles, each of which specifies +This variable's value is a list of variables, each of which specifies the position of an overlay arrow. The variable @code{overlay-arrow-position} has its normal meaning because it is on this list. @@ -3151,7 +3160,7 @@ @noindent This illustrates that what matters is the property value for each character. If two consecutive characters have the same -object as the @code{display} property value, it's irrelevent +object as the @code{display} property value, it's irrelevant whether they got this property from a single call to @code{put-text-property} or from two different calls.
--- a/lispref/edebug.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/edebug.texi Thu May 05 00:04:55 2005 +0000 @@ -955,9 +955,8 @@ @item The state of keyboard macro execution is saved and restored. While -Edebug is active, @code{executing-macro} is bound to -@code{edebug-continue-kbd-macro}. - +Edebug is active, @code{executing-kbd-macro} is bound to @code{nil} +unless @code{edebug-continue-kbd-macro} is non-@code{nil}. @end itemize
--- a/lispref/files.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/files.texi Thu May 05 00:04:55 2005 +0000 @@ -1364,7 +1364,7 @@ same effect as renaming, aside from momentary intermediate states. @end deffn -@deffn Command copy-file oldname newname &optional ok-if-exists time +@deffn Command copy-file oldname newname &optional ok-if-exists time mustbenew This command copies the file @var{oldname} to @var{newname}. An error is signaled if @var{oldname} does not exist. If @var{newname} names a directory, it copies @var{oldname} into that directory, @@ -1379,6 +1379,10 @@ In an interactive call, a prefix argument specifies a non-@code{nil} value for @var{time}. + +The argument @var{mustbenew} controls whether an existing file can be +overwritten. It works like the similarly-named argument of +@code{write-region} (@pxref{Writing to Files, mustbenew}). @end deffn @deffn Command make-symbolic-link filename newname &optional ok-if-exists @@ -2024,10 +2028,13 @@ @defun make-temp-file prefix &optional dir-flag suffix @tindex make-temp-file -This function creates a temporary file and returns its name. -The name starts with @var{prefix}; it also contains a number that is -different in each Emacs job. If @var{prefix} is a relative file name, -it is expanded against @code{temporary-file-directory}. +This function creates a temporary file and returns its name. Emacs +creates the temporary file's name by adding to @var{prefix} some +random characters that are different in each Emacs job. The result is +guaranteed to be a newly created empty file. On MS-DOS, this function +can truncate the @var{string} prefix to fit into the 8+3 file-name +limits. If @var{prefix} is a relative file name, it is expanded +against @code{temporary-file-directory}. @example @group @@ -2072,13 +2079,13 @@ @end example @defun make-temp-name string -This function generates a string that can be used as a unique file name. -The name starts with @var{string}, and contains a number that is -different in each Emacs job. It is like @code{make-temp-file} except -that it just constructs a name, and does not create a file. Another -difference is that @var{string} should be an absolute file name. On -MS-DOS, this function can truncate the @var{string} prefix to fit into -the 8+3 file-name limits. +This function generates a string that can be used as a unique file +name. The name starts with @var{string}, and has several random +characters appended to it, which are different in each Emacs job. It +is like @code{make-temp-file} except that it just constructs a name, +and does not create a file. Another difference is that @var{string} +should be an absolute file name. On MS-DOS, this function can +truncate the @var{string} prefix to fit into the 8+3 file-name limits. @end defun @defvar temporary-file-directory @@ -2434,7 +2441,7 @@ the file name matches @var{regexp}, the primitives handle that file by calling @var{handler}. -The first argument given to @var{handler} is the name of the + The first argument given to @var{handler} is the name of the primitive, as a symbol; the remaining arguments are the arguments that were passed to that primitive. (The first of these arguments is most often the file name itself.) For example, if you do this: @@ -2451,7 +2458,7 @@ (funcall @var{handler} 'file-exists-p @var{filename}) @end example -When a function takes two or more arguments that must be file names, + When a function takes two or more arguments that must be file names, it checks each of those names for a handler. For example, if you do this: @@ -2472,7 +2479,7 @@ The @var{handler} then needs to figure out whether to handle @var{filename} or @var{dirname}. -If the specified file name matches more than one handler, the one + If the specified file name matches more than one handler, the one whose match starts last in the file name gets precedence. This rule is chosen so that handlers for jobs such as uncompression are handled first, before handlers for jobs such as remote file access. @@ -2568,12 +2575,12 @@ @end flushleft @end iftex -Handlers for @code{insert-file-contents} typically need to clear the + Handlers for @code{insert-file-contents} typically need to clear the buffer's modified flag, with @code{(set-buffer-modified-p nil)}, if the @var{visit} argument is non-@code{nil}. This also has the effect of unlocking the buffer if it is locked. -The handler function must handle all of the above operations, and + The handler function must handle all of the above operations, and possibly others to be added in the future. It need not implement all these operations itself---when it has nothing special to do for a certain operation, it can reinvoke the primitive, to handle the @@ -2596,7 +2603,7 @@ (apply operation args))))) @end smallexample -When a handler function decides to call the ordinary Emacs primitive for + When a handler function decides to call the ordinary Emacs primitive for the operation at hand, it needs to prevent the primitive from calling the same handler once again, thus leading to an infinite recursion. The example above shows how to do this, with the variables @@ -2607,7 +2614,7 @@ each have handlers. @kindex safe-magic (@r{property}) -Handlers that don't really do anything special for actual access to the + Handlers that don't really do anything special for actual access to the file---such as the ones that implement completion of host names for remote file names---should have a non-@code{nil} @code{safe-magic} property. For instance, Emacs normally ``protects'' directory names @@ -2616,6 +2623,15 @@ would be used for them has a non-@code{nil} @code{safe-magic} property, the @samp{/:} is not added. +@kindex operations (@r{property}) + A file name handler can have an @code{operations} property to +declare which operations it handles in a nontrivial way. If this +property has a non-@code{nil} value, it should be a list of +operations; then only those operations will call the handler. This +avoids inefficiency, but its main purpose is for autoloaded handler +functions, so that they won't be loaded except when they have real +work to do. + @defvar inhibit-file-name-handlers This variable holds a list of handlers whose use is presently inhibited for a certain operation.
--- a/lispref/frames.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/frames.texi Thu May 05 00:04:55 2005 +0000 @@ -1360,8 +1360,9 @@ what selection the user makes. The argument @var{position} specifies where on the screen to put the -menu. It can be either a mouse button event (which says to put the menu -where the user actuated the button) or a list of this form: +top left corner of the menu. It can be either a mouse button event +(which says to put the menu where the user actuated the button) or a +list of this form: @example ((@var{xoffset} @var{yoffset}) @var{window}) @@ -1369,7 +1370,8 @@ @noindent where @var{xoffset} and @var{yoffset} are coordinates, measured in -pixels, counting from the top left corner of @var{window}'s frame. +pixels, counting from the top left corner of @var{window}. @var{window} +may be a window or a frame. If @var{position} is @code{t}, it means to use the current mouse position. If @var{position} is @code{nil}, it means to precompute the @@ -1377,8 +1379,13 @@ without actually displaying or popping up the menu. The argument @var{menu} says what to display in the menu. It can be a -keymap or a list of keymaps (@pxref{Menu Keymaps}). Alternatively, it -can have the following form: +keymap or a list of keymaps (@pxref{Menu Keymaps}). In this case, the +return value is the list of events corresponding to the user's choice. +(This list has more than one element if the choice occurred in a +submenu.) Note that @code{x-popup-menu} does not actually execute the +command bound to that sequence of events. + +Alternatively, @var{menu} can have the following form: @example (@var{title} @var{pane1} @var{pane2}...) @@ -1388,11 +1395,13 @@ where each pane is a list of form @example -(@var{title} (@var{line} . @var{item})...) +(@var{title} @var{item1} @var{item2}...) @end example -Each @var{line} should be a string, and each @var{item} should be the -value to return if that @var{line} is chosen. +Each item should normally be a cons cell @code{(@var{line} . @var{value})}, +where @var{line} is a string, and @var{value} is the value to return if +that @var{line} is chosen. An item can also be a string; this makes a +non-selectable line in the menu. @end defun @strong{Usage note:} Don't use @code{x-popup-menu} to display a menu @@ -1443,9 +1452,9 @@ The return value is @var{value} from the chosen alternative. -An element of the list may be just a string instead of a cons cell -@code{(@var{string} . @var{value})}. That makes a box that cannot -be selected. +As for @code{x-popup-menu}, an element of the list may be just a +string instead of a cons cell @code{(@var{string} . @var{value})}. +That makes a box that cannot be selected. If @code{nil} appears in the list, it separates the left-hand items from the right-hand items; items that precede the @code{nil} appear on the @@ -1455,8 +1464,8 @@ Dialog boxes always appear in the center of a frame; the argument @var{position} specifies which frame. The possible values are as in -@code{x-popup-menu}, but the precise coordinates don't matter; only the -frame matters. +@code{x-popup-menu}, but the precise coordinates or the individual +window don't matter; only the frame matters. In some configurations, Emacs cannot display a real dialog box; so instead it displays the same items in a pop-up menu in the center of the
--- a/lispref/hooks.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/hooks.texi Thu May 05 00:04:55 2005 +0000 @@ -19,7 +19,8 @@ Every major mode defines a mode hook named @samp{@var{modename}-mode-hook}. The major mode command runs this normal hook with @code{run-mode-hooks} as the very last thing it does. -@xref{Mode Hooks}. Mode hooks are omitted in the list below. +@xref{Mode Hooks}. Most minor modes have mode hooks too. Mode hooks +are omitted in the list below. The variables whose names end in @samp{-hooks} or @samp{-functions} are usually @dfn{abnormal hooks}; their values are lists of functions, but @@ -147,6 +148,27 @@ @item first-change-hook @xref{Change Hooks}. +@item font-lock-beginning-of-syntax-function +@xref{Syntactic Font Lock}. + +@item font-lock-fontify-buffer-function +@xref{Other Font Lock Variables}. + +@item font-lock-fontify-region-function +@xref{Other Font Lock Variables}. + +@item font-lock-mark-block-function +@xref{Other Font Lock Variables}. + +@item font-lock-syntactic-face-function +@xref{Syntactic Font Lock}. + +@item font-lock-unfontify-buffer-function +@xref{Other Font Lock Variables}. + +@item font-lock-unfontify-region-function +@xref{Other Font Lock Variables}. + @item initial-calendar-window-hook @inforef{Calendar Customizing,, emacs-xtra}.
--- a/lispref/lists.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/lists.texi Thu May 05 00:04:55 2005 +0000 @@ -1667,6 +1667,15 @@ @end example @end defun +@defun rassq-delete-all value alist +This function deletes from @var{alist} all the elements whose @sc{cdr} +is @code{eq} to @var{value}. It returns the shortened alist, and +often modifies the original list structure of @var{alist}. +@code{rassq-delete-all} is like @code{assq-delete-all} except that it +compares the @sc{cdr} of each @var{alist} association instead of the +@sc{car}. +@end defun + @ignore arch-tag: 31fb8a4e-4aa8-4a74-a206-aa00451394d4 @end ignore
--- a/lispref/modes.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/modes.texi Thu May 05 00:04:55 2005 +0000 @@ -103,6 +103,8 @@ * Mode Help:: Finding out how to use a mode. * Derived Modes:: Defining a new major mode based on another major mode. +* Generic Modes:: Defining a simple major mode that supports + comment syntax and Font Lock mode. * Mode Hooks:: Hooks run at the end of major mode functions. @end menu @@ -255,6 +257,11 @@ @code{imenu-create-index-function} (@pxref{Imenu}). @item +The mode can specify a local value for +@code{eldoc-documentation-function} to tell ElDoc mode how to handle +this mode. + +@item Use @code{defvar} or @code{defcustom} to set mode-related variables, so that they are not reinitialized if they already have a value. (Such reinitialization could discard customizations made by the user.) @@ -793,6 +800,7 @@ @node Derived Modes @subsection Defining Derived Modes +@cindex derived mode It's often useful to define a new major mode in terms of an existing one. An easy way to do this is to use @code{define-derived-mode}. @@ -855,6 +863,57 @@ @code{define-derived-mode} does that automatically. @end defmac +@node Generic Modes +@subsection Generic Modes +@cindex generic mode + +@dfn{Generic modes} are simple major modes with basic support for +comment syntax and Font Lock mode. They are primarily useful for +configuration files. To define a generic mode, use the macro +@code{define-generic-mode}. See the file @file{generic-x.el} for some +examples of the use of @code{define-generic-mode}. + +@defmac define-generic-mode mode comment-list keyword-list font-lock-list auto-mode-list function-list &optional docstring &rest custom-keyword-args +This macro creates a new generic mode. The argument @var{mode} (an +unquoted symbol) is the major mode command. The optional argument +@var{docstring} is the documentation for the mode command. If you do +not supply it, @code{define-generic-mode} uses a default documentation +string instead. + +@var{comment-list} is a list in which each element is either a +character, a string of one or two characters, or a cons cell. A +character or a string is set up in the mode's syntax table as a +``comment starter.'' If the entry is a cons cell, the @sc{car} is set +up as a ``comment starter'' and the @sc{cdr} as a ``comment ender.'' +(Use @code{nil} for the latter if you want comments to end at the end +of the line.) Note that the syntax table has limitations about what +comment starters and enders are actually possible. @xref{Syntax +Tables}. + +@var{keyword-list} is a list of keywords to highlight with +@code{font-lock-keyword-face}. Each keyword should be a string. +@var{font-lock-list} is a list of additional expressions to highlight. +Each element of this list should have the same form as an element of +@code{font-lock-keywords}. @xref{Search-based Fontification}. + +@var{auto-mode-list} is a list of regular expressions to add to the +variable @code{auto-mode-alist}. These regular expressions are added +when Emacs runs the macro expansion. + +@var{function-list} is a list of functions to call to do some +additional setup. The mode command calls these functions just before +it runs the mode hook. + +The optional @var{custom-keyword-args} are pairs of keywords and +values to include in the generated @code{defcustom} form for the mode +hook variable @code{@var{mode}-hook}. The default value for the +@samp{:group} keyword is @var{mode} with the final @samp{-mode} (if +any) removed. Don't use this default group name unless you have +written a @code{defgroup} to define that group properly (@pxref{Group +Definitions}). You can specify keyword arguments without specifying a +docstring. +@end defmac + @node Mode Hooks @subsection Mode Hooks @@ -1129,9 +1188,10 @@ @table @code @item :group @var{group} Custom group name to use in all generated @code{defcustom} forms. -Defaults to @var{mode} without the possible trailing @samp{-mode}. Be -aware that this default may not be a valid customization group defined -with @code{defgroup}. Please make sure it is. +Defaults to @var{mode} without the possible trailing @samp{-mode}. +@strong{Warning:} don't use this default group name unless you have +written a @code{defgroup} to define that group properly. @xref{Group +Definitions}. @item :global @var{global} If non-@code{nil} specifies that the minor mode should be global. @@ -2020,12 +2080,11 @@ which contexts. This section explains how to customize Font Lock for a particular major mode. - Font Lock mode finds text to highlight in two ways: through syntactic -parsing based on the syntax table, and through searching (usually for -regular expressions). Syntactic fontification happens first; it finds -comments and string constants, and highlights them using -@code{font-lock-comment-face} and @code{font-lock-string-face} -(@pxref{Faces for Font Lock}). Search-based fontification follows. + Font Lock mode finds text to highlight in two ways: through +syntactic parsing based on the syntax table, and through searching +(usually for regular expressions). Syntactic fontification happens +first; it finds comments and string constants and highlights them. +Search-based fontification happens second. @menu * Font Lock Basics:: Overview of customizing Font Lock. @@ -2036,7 +2095,8 @@ * Precalculated Fontification:: How Lisp programs that produce the buffer contents can also specify how to fontify it. * Faces for Font Lock:: Special faces specifically for Font Lock. -* Syntactic Font Lock:: Defining character syntax based on context +* Syntactic Font Lock:: Fontification based on syntax tables. +* Setting Syntax Properties:: Defining character syntax based on context using the Font Lock mechanism. @end menu @@ -2051,45 +2111,48 @@ @defvar font-lock-defaults This variable is set by major modes, as a buffer-local variable, to -specify how to fontify text in that mode. The value should look like -this: +specify how to fontify text in that mode. It automatically becomes +buffer-local when you set it. The value should look like this: @example -(@var{keywords} @var{keywords-only} @var{case-fold} - @var{syntax-alist} @var{syntax-begin} @var{other-vars}@dots{}) +(@var{keywords} [@var{keywords-only} [@var{case-fold} + [@var{syntax-alist} [@var{syntax-begin} @var{other-vars}@dots{}]]]]) @end example The first element, @var{keywords}, indirectly specifies the value of -@code{font-lock-keywords}. It can be a symbol, a variable whose value -is the list to use for @code{font-lock-keywords}. It can also be a list of -several such symbols, one for each possible level of fontification. The -first symbol specifies how to do level 1 fontification, the second -symbol how to do level 2, and so on. +@code{font-lock-keywords} which directs search-based fontification. +It can be a symbol, a variable or a function whose value is the list +to use for @code{font-lock-keywords}. It can also be a list of +several such symbols, one for each possible level of fontification. +The first symbol specifies how to do level 1 fontification, the second +symbol how to do level 2, and so on. @xref{Levels of Font Lock}. The second element, @var{keywords-only}, specifies the value of the variable @code{font-lock-keywords-only}. If this is non-@code{nil}, syntactic fontification (of strings and comments) is not performed. +@xref{Syntactic Font Lock}. The third element, @var{case-fold}, specifies the value of -@code{font-lock-keywords-case-fold-search}. If it is non-@code{nil}, Font Lock -mode ignores case when searching as directed by +@code{font-lock-keywords-case-fold-search}. If it is non-@code{nil}, +Font Lock mode ignores case when searching as directed by @code{font-lock-keywords}. -If the fourth element, @var{syntax-alist}, is non-@code{nil}, it should be -a list of cons cells of the form @code{(@var{char-or-string} +If the fourth element, @var{syntax-alist}, is non-@code{nil}, it +should be a list of cons cells of the form @code{(@var{char-or-string} . @var{string})}. These are used to set up a syntax table for -fontification (@pxref{Syntax Table Functions}). The resulting syntax -table is stored in @code{font-lock-syntax-table}. +syntactic fontification (@pxref{Syntax Table Functions}). The +resulting syntax table is stored in @code{font-lock-syntax-table}. The fifth element, @var{syntax-begin}, specifies the value of -@code{font-lock-beginning-of-syntax-function} (see below). +@code{font-lock-beginning-of-syntax-function}. All the remaining elements (if any) are collectively called @var{other-vars}. Each of these elements should have the form -@code{(@var{variable} . @var{value})}---which means, make @var{variable} -buffer-local and then set it to @var{value}. You can use these -@var{other-vars} to set other variables that affect fontification, -aside from those you can control with the first five elements. +@code{(@var{variable} . @var{value})}---which means, make +@var{variable} buffer-local and then set it to @var{value}. You can +use these @var{other-vars} to set other variables that affect +fontification, aside from those you can control with the first five +elements. @xref{Other Font Lock Variables}. @end defvar @node Search-based Fontification @@ -2097,7 +2160,8 @@ The most important variable for customizing Font Lock mode is @code{font-lock-keywords}. It specifies the search criteria for -search-based fontification. +search-based fontification. You should specify the value of this +variable with @var{keywords} in @code{font-lock-defaults}. @defvar font-lock-keywords This variable's value is a list of the keywords to highlight. Be @@ -2187,7 +2251,8 @@ @code{font-lock-extra-managed-props} so that the properties will also be cleared out when they are no longer appropriate. Alternatively, you can set the variable @code{font-lock-unfontify-region-function} to -a function that clears these properties. +a function that clears these properties. @xref{Other Font Lock +Variables}. @item (@var{matcher} . @var{subexp-highlighter}) In this kind of element, @var{subexp-highlighter} is a list @@ -2307,6 +2372,7 @@ Its value should have one of the forms described in this table. @end table +@vindex font-lock-multiline @strong{Warning:} Do not design an element of @code{font-lock-keywords} to match text which spans lines; this does not work reliably. While @code{font-lock-fontify-buffer} handles multi-line patterns correctly, @@ -2317,52 +2383,75 @@ setting @code{font-lock-multiline} to @code{t}. But it still will not work in all cases. -@node Other Font Lock Variables -@subsection Other Font Lock Variables - - This section describes additional variables that a major mode -can set by means of @code{font-lock-defaults}. - -@defvar font-lock-keywords-only -Non-@code{nil} means Font Lock should not fontify comments or strings -syntactically; it should only fontify based on -@code{font-lock-keywords}. -@end defvar - -@ignore -Other variables include those for buffer-specialized fontification functions, -`font-lock-fontify-buffer-function', `font-lock-unfontify-buffer-function', -`font-lock-fontify-region-function', `font-lock-unfontify-region-function', -`font-lock-inhibit-thing-lock' and `font-lock-maximum-size'. -@end ignore +You can use @var{case-fold} in @code{font-lock-defaults} to specify +the value of @code{font-lock-keywords-case-fold-search} which says +whether search-based fontification should be case-insensitive. @defvar font-lock-keywords-case-fold-search Non-@code{nil} means that regular expression matching for the sake of @code{font-lock-keywords} should be case-insensitive. @end defvar -@defvar font-lock-syntax-table -This variable specifies the syntax table to use for fontification of -comments and strings. -@end defvar - -@defvar font-lock-beginning-of-syntax-function -If this variable is non-@code{nil}, it should be a function to move -point back to a position that is syntactically at ``top level'' and -outside of strings or comments. Font Lock uses this when necessary -to get the right results for syntactic fontification. - -This function is called with no arguments. It should leave point at the -beginning of any enclosing syntactic block. Typical values are -@code{beginning-of-line} (i.e., the start of the line is known to be -outside a syntactic block), or @code{beginning-of-defun} for programming -modes or @code{backward-paragraph} for textual modes (i.e., the -mode-dependent function is known to move outside a syntactic block). - -If the value is @code{nil}, the beginning of the buffer is used as a -position outside of a syntactic block. This cannot be wrong, but it can -be slow. -@end defvar +You can use @code{font-lock-add-keywords} to add additional +search-based fontification rules to a major mode, and +@code{font-lock-remove-keywords} to removes rules. + +@defun font-lock-add-keywords mode keywords &optional append +This function adds highlighting @var{keywords} for @var{mode}. The +argument @var{keywords} should be a list with the same format as the +variable @code{font-lock-keywords}. @var{mode} should be a symbol, +the major mode command name, such as @code{c-mode}. When Font Lock +mode is turned on in @var{mode}, it adds @var{keywords} to +@code{font-lock-keywords}. @var{mode} can also be @code{nil}; the +highlighting @var{keywords} are immediately added to +@code{font-lock-keywords} in the current buffer in that case. + +By default, @var{keywords} are added at the beginning of +@code{font-lock-keywords}. If the optional argument @var{append} is +@code{set}, they are used to replace the value of +@code{font-lock-keywords}. If @var{append} is any other +non-@code{nil} value, they are added at the end of +@code{font-lock-keywords}. + +For example: + +@smallexample +(font-lock-add-keywords 'c-mode + '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend) + ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face))) +@end smallexample + +adds two fontification patterns for C mode: one to fontify the word +@samp{FIXME}, even in comments, and another to fontify the words +@samp{and}, @samp{or} and @samp{not} as keywords. + +Some modes have specialized support for additional patterns. See the +variables @code{c-font-lock-extra-types}, +@code{c++-font-lock-extra-types}, @code{objc-font-lock-extra-types} +and @code{java-font-lock-extra-types}, for example. +@end defun + +@defun font-lock-remove-keywords mode keywords +This function removes highlighting @var{keywords} for @var{mode}. As +in @code{font-lock-add-keywords}, @var{mode} should be a major mode +command name or @code{nil}. If @code{nil}, the highlighting +@var{keywords} are immediately removed in the current buffer. +@end defun + +@strong{Warning:} Only use a non-@code{nil} @var{mode} argument when +you use @code{font-lock-add-keywords} or +@code{font-lock-remove-keywords} in your @file{.emacs} file. When you +use these functions from a Lisp program (such as a minor mode), we +recommend that you use @code{nil} for @var{mode} (and place the call +on a hook) to avoid subtle problems due to the details of the +implementation. + +@node Other Font Lock Variables +@subsection Other Font Lock Variables + + This section describes additional variables that a major mode can +set by means of @var{other-vars} in @code{font-lock-defaults} +(@pxref{Font Lock Basics}). @defvar font-lock-mark-block-function If this variable is non-@code{nil}, it should be a function that is @@ -2378,25 +2467,38 @@ @end defvar @defvar font-lock-extra-managed-props -Additional properties (other than @code{font-lock-face}) that are -being managed by Font Lock mode. Font Lock mode normally manages only -the @code{font-lock-face} property; if you want it to manage others as -well, you must specify them in a @var{facespec} in -@code{font-lock-keywords} as well as adding them to this list. +This variable specifies additional properties (other than +@code{font-lock-face}) that are being managed by Font Lock mode. It +is used by @code{font-lock-default-unfontify-region}, which normally +only manages the @code{font-lock-face} property. If you want Font +Lock to manage other properties as well, you must specify them in a +@var{facespec} in @code{font-lock-keywords} as well as add them to +this list. @xref{Search-based Fontification}. +@end defvar + +@defvar font-lock-fontify-buffer-function +Function to use for fontifying the buffer. The default value is +@code{font-lock-default-fontify-buffer}. @end defvar -@defvar font-lock-syntactic-face-function -A function to determine which face to use for a given syntactic -element (a string or a comment). The function is called with one -argument, the parse state at point returned by -@code{parse-partial-sexp}, and should return a face. The default -value returns @code{font-lock-comment-face} for comments and -@code{font-lock-string-face} for strings. - -This can be used to highlighting different kinds of strings or -comments differently. It is also sometimes abused together with -@code{font-lock-syntactic-keywords} to highlight elements that span -multiple lines, but this is too obscure to document in this manual. +@defvar font-lock-unfontify-buffer-function +Function to use for unfontifying the buffer. This is used when +turning off Font Lock mode. The default value is +@code{font-lock-default-unfontify-buffer}. +@end defvar + +@defvar font-lock-fontify-region-function +Function to use for fontifying a region. It should take two +arguments, the beginning and end of the region, and an optional third +argument @var{verbose}. If @var{verbose} is non-@code{nil}, the +function should print status messages. The default value is +@code{font-lock-default-fontify-region}. +@end defvar + +@defvar font-lock-unfontify-region-function +Function to use for unfontifying a region. It should take two +arguments, the beginning and end of the region. The default value is +@code{font-lock-default-unfontify-region}. @end defvar @defvar font-lock-lines-before @@ -2407,6 +2509,14 @@ multi-line patterns. @end defvar +@ignore +@defvar font-lock-inhibit-thing-lock +List of Font Lock mode related modes that should not be turned on. +Currently, valid mode names are @code{fast-lock-mode}, +@code{jit-lock-mode} and @code{lazy-lock-mode}. +@end defvar +@end ignore + @node Levels of Font Lock @subsection Levels of Font Lock @@ -2451,16 +2561,9 @@ @code{list-buffers} and @code{occur}. If your mode does not use any of the other machinery of Font Lock -(i.e. it only uses the @code{font-lock-face} property), you can tell -Emacs not to load all of font-lock.el (unless it's already loaded), by -setting the variable @code{font-lock-core-only} to non-@code{nil} as -part of the @code{font-lock-defaults} settings. Here is the canonical -way to do this: - -@example -(set (make-local-variable 'font-lock-defaults) - '(nil t nil nil nil (font-lock-core-only . t))) -@end example +(i.e. it only uses the @code{font-lock-face} property), it should not +set the variable @code{font-lock-defaults}. That way, it will not +cause loading of the @file{font-lock} library. @node Faces for Font Lock @subsection Faces for Font Lock @@ -2478,6 +2581,10 @@ @vindex font-lock-comment-face Used (typically) for comments. +@item font-lock-comment-delimiter-face +@vindex font-lock-comment-delimiter-face +Used (typically) for comments delimiters. + @item font-lock-doc-face @vindex font-lock-doc-face Used (typically) for documentation strings in the code. @@ -2529,14 +2636,78 @@ @node Syntactic Font Lock @subsection Syntactic Font Lock +Syntactic fontification uses the syntax table to find comments and +string constants (@pxref{Syntax Tables}). It highlights them using +@code{font-lock-comment-face} and @code{font-lock-string-face} +(@pxref{Faces for Font Lock}). There are several variables that +affect syntactic fontification; you should set them by means of +@code{font-lock-defaults} (@pxref{Font Lock Basics}). + +@defvar font-lock-keywords-only +Non-@code{nil} means Font Lock should not do syntactic fontification; +it should only fontify based on @code{font-lock-keywords}. The normal +way for a mode to set this variable to @code{t} is with +@var{keywords-only} in @code{font-lock-defaults}. +@end defvar + +@defvar font-lock-syntax-table +This variable holds the syntax table to use for fontification of +comments and strings. Specify it using @var{syntax-alist} in +@code{font-lock-defaults}. +@end defvar + +@c ??? +@c The docstring says that font-lock-syntax-table is semi-obsolete. +@c How the alternative should be used is not clear. --lute + +@defvar font-lock-beginning-of-syntax-function +If this variable is non-@code{nil}, it should be a function to move +point back to a position that is syntactically at ``top level'' and +outside of strings or comments. Font Lock uses this when necessary +to get the right results for syntactic fontification. + +This function is called with no arguments. It should leave point at +the beginning of any enclosing syntactic block. Typical values are +@code{beginning-of-line} (used when the start of the line is known to +be outside a syntactic block), or @code{beginning-of-defun} for +programming modes, or @code{backward-paragraph} for textual modes. + +If the value is @code{nil}, the beginning of the buffer is used as a +position outside of a syntactic block. This cannot be wrong, but it +can be slow. + +Specify this variable using @var{syntax-begin} in +@code{font-lock-defaults}. +@end defvar + +@defvar font-lock-syntactic-face-function +A function to determine which face to use for a given syntactic +element (a string or a comment). The function is called with one +argument, the parse state at point returned by +@code{parse-partial-sexp}, and should return a face. The default +value returns @code{font-lock-comment-face} for comments and +@code{font-lock-string-face} for strings. + +This can be used to highlighting different kinds of strings or +comments differently. It is also sometimes abused together with +@code{font-lock-syntactic-keywords} to highlight elements that span +multiple lines, but this is too obscure to document in this manual. + +Specify this variable using @var{other-vars} in +@code{font-lock-defaults}. +@end defvar + +@node Setting Syntax Properties +@subsection Setting Syntax Properties + Font Lock mode can be used to update @code{syntax-table} properties -automatically. This is useful in languages for which a single syntax -table by itself is not sufficient. +automatically (@pxref{Syntax Properties}). This is useful in +languages for which a single syntax table by itself is not sufficient. @defvar font-lock-syntactic-keywords -This variable enables and controls syntactic Font Lock. It is -normally set via @code{font-lock-defaults}. Its value should be a -list of elements of this form: +This variable enables and controls updating @code{syntax-table} +properties by Font Lock. Its value should be a list of elements of +this form: @example (@var{matcher} @var{subexp} @var{syntax} @var{override} @var{laxmatch}) @@ -2546,10 +2717,10 @@ sort of element of @code{font-lock-keywords}, @example -(@var{matcher} @var{subexp} @var{facename} @var{override} @var{laxmatch}) +(@var{matcher} @var{subexp} @var{facespec} @var{override} @var{laxmatch}) @end example -However, instead of specifying the value @var{facename} to use for the +However, instead of specifying the value @var{facespec} to use for the @code{face} property, it specifies the value @var{syntax} to use for the @code{syntax-table} property. Here, @var{syntax} can be a string (as taken by @code{modify-syntax-entry}), a syntax table, a cons cell @@ -2586,6 +2757,8 @@ as @samp{foo'bar} or @samp{'fubar'}, will not be highlighted as strings. +Major modes normally set this variable with @var{other-vars} in +@code{font-lock-defaults}. @end defvar @node Desktop Save Mode
--- a/lispref/symbols.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/symbols.texi Thu May 05 00:04:55 2005 +0000 @@ -496,8 +496,6 @@ @var{symbol}'s property list. If there is no such property, @code{nil} is returned. Thus, there is no distinction between a value of @code{nil} and the absence of the property. -A @code{wrong-type-argument} error may be signaled if @var{symbol} -has a malformed property list. The name @var{property} is compared with the existing property names using @code{eq}, so any object is a legitimate property. @@ -505,12 +503,6 @@ See @code{put} for an example. @end defun -@defun safe-get symbol property -This function finds the value of the property named @var{property} in -@var{symbol}'s property list. Unlike @code{get}, it just returns -@code{nil} if @var{symbol} has a malformed property list. -@end defun - @defun put symbol property value This function puts @var{value} onto @var{symbol}'s property list under the property name @var{property}, replacing any previous property value. @@ -536,9 +528,7 @@ @defun plist-get plist property This returns the value of the @var{property} property -stored in the property list @var{plist}. -A @code{wrong-type-argument} error may be signaled if @var{plist} is -not a valid property list. For example, +stored in the property list @var{plist}. For example, @example (plist-get '(foo 4) 'foo) @@ -548,16 +538,12 @@ (plist-get '(foo 4 bad) 'bar) @result{} @code{wrong-type-argument} error @end example -@end defun -@defun safe-plist-get plist property -This returns the value of the @var{property} property -stored in the property list @var{plist}. Unlike @code{plist-get}, it -accepts a malformed @var{plist} argument and always returns @code{nil} +It accepts a malformed @var{plist} argument and always returns @code{nil} if @var{property} is not found in the @var{plist}. For example, @example -(safe-plist-get '(foo 4 bad) 'bar) +(plist-get '(foo 4 bad) 'bar) @result{} nil @end example @end defun
--- a/lispref/syntax.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/syntax.texi Thu May 05 00:04:55 2005 +0000 @@ -528,10 +528,12 @@ @section Syntax Properties @kindex syntax-table @r{(text property)} -When the syntax table is not flexible enough to specify the syntax of a -language, you can use @code{syntax-table} text properties to override -the syntax table for specific character occurrences in the buffer. -@xref{Text Properties}. +When the syntax table is not flexible enough to specify the syntax of +a language, you can use @code{syntax-table} text properties to +override the syntax table for specific character occurrences in the +buffer. @xref{Text Properties}. You can use Font Lock mode to set +@code{syntax-table} text properties. @xref{Setting Syntax +Properties}. The valid values of @code{syntax-table} text property are: @@ -940,11 +942,25 @@ @defun syntax-after pos This function returns the syntax code of the character in the buffer after position @var{pos}, taking account of syntax properties as well -as the syntax table. +as the syntax table. If @var{pos} is outside the buffer's accessible +portion (@pxref{Narrowing, accessible portion}), this function returns +@code{nil}. @end defun @defun syntax-class syntax -This function returns the syntax class of a syntax code. +This function returns the syntax class of the syntax code +@var{syntax}. (It masks off the high 16 bits that hold the flags +encoded in the syntax descriptor.) If @var{syntax} is @code{nil}, it +returns @code{nil}; this is so evaluating the expression + +@example +(syntax-class (syntax-after pos)) +@end example + +@noindent +where @code{pos} is outside the buffer's accessible portion, will +yield @code{nil} without throwing errors or producing wrong syntax +class codes. @end defun @node Categories
--- a/lispref/variables.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/variables.texi Thu May 05 00:04:55 2005 +0000 @@ -1714,6 +1714,38 @@ This function returns @var{base-var}. @end defun + Variable aliases are convenient for replacing an old name for a +variable with a new name. @code{make-obsolete-variable} declares that +the old name is obsolete and therefore that it may be removed at some +stage in the future. + +@defun make-obsolete-variable variable new &optional when +This function makes the byte-compiler warn that the variable +@var{variable} is obsolete. If @var{new} is a symbol, it is the +variable's new name; then the warning message says to use @var{new} +instead of @var{variable}. If @var{new} is a string, this is the +message and there is no replacement variable. + +If provided, @var{when} should be a string indicating when the +variable was first made obsolete---for example, a date or a release +number. +@end defun + + You can make two variables synonyms and declare one obsolete at the +same time using the macro @code{define-obsolete-variable-alias}. + +@defmac define-obsolete-variable-alias variable new &optional when docstring +This macro marks the variable @var{variable} as obsolete and also +makes it an alias for the variable @var{new}. + +If provided, @var{when} should be a string indicating when +@var{variable} was first made obsolete. The optional argument +@var{docstring} specifies the documentation string for @var{variable}. +If @var{docstring} is omitted or nil, @var{variable} uses the +documentation string of @var{new} unless it already has one of its +own. +@end defmac + @defun indirect-variable variable This function returns the variable at the end of the chain of aliases of @var{variable}. If @var{variable} is not a symbol, or if @var{variable} is
--- a/lispref/windows.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/lispref/windows.texi Thu May 05 00:04:55 2005 +0000 @@ -665,17 +665,16 @@ @defun window-list &optional frame minibuf window This function returns a list of the windows on @var{frame}, starting -with @var{window}. If @var{frame} is @code{nil} or omitted, the -selected frame is used instead; if @var{window} is @code{nil} or -omitted, the selected window is used instead. +with @var{window}. If @var{frame} is @code{nil} or omitted, +@code{window-list} uses the selected frame instead; if @var{window} is +@code{nil} or omitted, it uses the selected window. -The value of @var{minibuf} determines if the minibuffer window will be -included in the result list. If @var{minibuf} is @code{t}, the -minibuffer window will be included, even if it isn't active. If -@var{minibuf} is @code{nil} or omitted, the minibuffer window will -only be included in the list if it is active. If @var{minibuf} is -neither @code{nil} nor @code{t}, the minibuffer window is not -included, whether or not it is active. +The value of @var{minibuf} determines if the minibuffer window is +included in the result list. If @var{minibuf} is @code{t}, the result +always includes the minibuffer window. If @var{minibuf} is @code{nil} +or omitted, that includes the minibuffer window if it is active. If +@var{minibuf} is neither @code{nil} nor @code{t}, the result never +includes the minibuffer window. @end defun @node Buffers and Windows @@ -2289,8 +2288,7 @@ There are three actions that can change this: scrolling the window, switching buffers in the window, and changing the size of the window. The first two actions run @code{window-scroll-functions}; the last runs -@code{window-size-change-functions}. The paradigmatic use of these -hooks is in the implementation of Lazy Lock mode; see @file{lazy-lock.el}. +@code{window-size-change-functions}. @defvar window-scroll-functions This variable holds a list of functions that Emacs should call before
--- a/mac/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/mac/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,13 @@ +2005-04-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * makefile.MPW (MacObjects): Add macselect.c.x. + (macselect.c.x): New target. + (mac.c): Fix dependency. + + * Emacs.app/Contents/Info.plist: Add NSServices key and data. + + * inc/s-mac.h: Define HAVE_PWD_H. + 2005-04-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * makefile.MPW (NonCarbonLibs): Add LocalesLib. Delete
--- a/mac/Emacs.app/Contents/Info.plist Thu Apr 28 04:56:56 2005 +0000 +++ b/mac/Emacs.app/Contents/Info.plist Thu May 05 00:04:55 2005 +0000 @@ -35,5 +35,46 @@ <string>EMAx</string> <key>CFBundleVersion</key> <string>1.1</string> + <key>NSServices</key> + <array> + <dict> + <key>NSKeyEquivalent</key> + <dict/> + <key>NSMenuItem</key> + <dict> + <key>default</key> + <string>Emacs/Open Selected File</string> + </dict> + <key>NSMessage</key> + <string>open-file</string> + <key>NSPortName</key> + <string>Emacs</string> + <key>NSReturnTypes</key> + <array/> + <key>NSSendTypes</key> + <array> + <string>NSStringPboardType</string> + </array> + </dict> + <dict> + <key>NSKeyEquivalent</key> + <dict/> + <key>NSMenuItem</key> + <dict> + <key>default</key> + <string>Emacs/New Buffer Containing Selection</string> + </dict> + <key>NSMessage</key> + <string>open-selection</string> + <key>NSPortName</key> + <string>Emacs</string> + <key>NSReturnTypes</key> + <array/> + <key>NSSendTypes</key> + <array> + <string>NSStringPboardType</string> + </array> + </dict> + </array> </dict> </plist>
--- a/mac/inc/s-mac.h Thu Apr 28 04:56:56 2005 +0000 +++ b/mac/inc/s-mac.h Thu May 05 00:04:55 2005 +0000 @@ -96,6 +96,8 @@ /* #define HAVE_PTYS */ +#define HAVE_PWD_H 1 + /* * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate * The 4.2 opendir, etc., library functions.
--- a/mac/makefile.MPW Thu Apr 28 04:56:56 2005 +0000 +++ b/mac/makefile.MPW Thu May 05 00:04:55 2005 +0000 @@ -133,6 +133,7 @@ "{Src}mac.c.x" ¶ "{Src}macfns.c.x" ¶ "{Src}macmenu.c.x" ¶ + "{Src}macselect.c.x" ¶ "{Src}macterm.c.x" StdLibraries = ¶ @@ -881,6 +882,14 @@ "{Includes}sys:types.h" ¶ {DISPEXTERN_H_GROUP} +{Src}macselect.c.x Ä ¶ + {CONFIG_H_GROUP} ¶ + "{Src}lisp.h" ¶ + "{Src}macterm.h" ¶ + "{Src}macgui.h" ¶ + "{Src}frame.h" ¶ + {BLOCKINPUT_H_GROUP} + {Src}mac.c Ä ¶ {CONFIG_H_GROUP} ¶ "{Includes}utime.h" ¶ @@ -895,7 +904,14 @@ "{Src}sysselect.h" ¶ "{Src}systime.h" ¶ "{Includes}sys:time.h" ¶ - "{Includes}utsname.h" + "{Includes}utsname.h" ¶ + "{Src}macterm.h" ¶ + "{Src}macgui.h" ¶ + "{Src}frame.h" ¶ + {BLOCKINPUT_H_GROUP} ¶ + "{Src}charset.h" ¶ + "{Src}coding.h" ¶ + "{Src}ccl.h" {Src}macfns.c Ä ¶ {CONFIG_H_GROUP} ¶
--- a/man/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/man/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,61 @@ +2005-04-30 Richard M. Stallman <rms@gnu.org> + + * files.texi (Compressed Files): Auto Compression normally enabled. + + * building.texi (Debugger Operation): Clarify previous change. + +2005-04-29 Carsten Dominik <dominik@science.uva.nl> + + * org.texi: Version 3.08, structure reorganized. + +2005-04-28 Nick Roberts <nickrob@snap.net.nz> + + * building.texi (Debugger Operation): Add description for + GUD tooltips when program is not running. + +2005-04-26 Luc Teirlinck <teirllm@auburn.edu> + + * misc.texi (Shell): Add `Shell Prompts' to menu. + (Shell Mode): Add xref to `Shell Prompts'. Clarify `C-c C-u' + description. Delete remarks moved to new node. + (Shell Prompts): New node. + (History References): Replace remarks moved to `Shell Prompts' + with xref to that node. + (Remote Host): Clarify how to specify the terminal type when + logging in to a different machine. + +2005-04-26 Richard M. Stallman <rms@gnu.org> + + * emacs.texi (Top): Update submenus from files.texi. + + * files.texi (Filesets): Clarify previous change. + + * dired.texi (Misc Dired Features): Clarify previous change. + +2005-04-25 Chong Yidong <cyd@stupidchicken.com> + + * ack.texi (Acknowledgments): Delete info about iso-acc.el + + * dired.texi (Misc Dired Features): Document + dired-compare-directories. + + * files.texi (Filesets): New node. + (File Conveniences): Document Image mode. + + * text.texi (TeX Print): Document tex-compile. + +2005-04-25 Luc Teirlinck <teirllm@auburn.edu> + + * frames.texi (Tooltips): Tooltip mode is enabled by default. + Delete redundant reference to tooltip Custom group. It is + referred too again in the next paragraph. + +2005-04-24 Richard M. Stallman <rms@gnu.org> + + * ack.texi: Delete info about lazy-lock.el and fast-lock.el. + + * faq.texi: Delete info about lazy-lock.el and fast-lock.el. + 2005-04-19 Kim F. Storm <storm@cua.dk> * building.texi (Compilation Mode): Add M-g M-n and M-g M-p bindings.
--- a/man/ack.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/ack.texi Thu May 05 00:04:55 2005 +0000 @@ -696,21 +696,9 @@ hiding selected code within C @code{#ifdef} clauses. @item -Simon Marshall wrote: - -@itemize @minus -@item -@file{fast-lock.el}, which caches the face data computed by Font Lock mode, -@item -@file{lazy-lock.el}, which delays fontification in Font Lock mode -until text is actually displayed, and -@item -@file{regexp-opt.el}, which generates a regular expression from a list -of strings. -@end itemize - -Simon also extended @file{comint.el}, originally written by Olin -Shivers. +Simon Marshall wrote @file{regexp-opt.el}, which generates a regular +expression from a list of strings. He also extended @file{comint.el}, +originally written by Olin Shivers. @item Bengt Martensson, Mark Shapiro, Mike Newton, Aaron Larson, and Stefan @@ -1324,9 +1312,8 @@ of Emacs, and @file{w32-fns.el}, MS-Windows specific support functions. @item -Johan Vromans wrote @file{forms.el} and its associated files, defining a -mode for filling in forms, and @file{iso-acc.el}, a minor mode providing -electric accent keys for text using the ISO-8859 character set. +Johan Vromans wrote @file{forms.el} and its associated files, a +mode for filling in forms. @item Colin Walters wrote @file{ibuffer.el}, a Dired-like major mode for
--- a/man/building.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/building.texi Thu May 05 00:04:55 2005 +0000 @@ -496,8 +496,10 @@ You activate this feature by setting the variable @code{tooltip-gud-tips-p} to @code{t}. Then you can display a variable's value in a tooltip simply by pointing at it with the mouse. -This operates in the GUD buffer and in source buffers with major modes -in the list @code{tooltip-gud-modes}. +In graphical mode, with a C program, you can also display the +@code{#define} directive associated with an identifier when program is +not executing. This operates in the GUD buffer and in source buffers +with major modes in the list @code{tooltip-gud-modes}. @node Commands of GUD @subsection Commands of GUD @@ -907,7 +909,7 @@ debugger}). Arrays and structures display their type only. You must display them -separately to examine their values. @ref{Watch Expressions}. +separately to examine their values. @xref{Watch Expressions}. @item Registers Buffer The registers buffer displays the values held by the registers
--- a/man/dired.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/dired.texi Thu May 05 00:04:55 2005 +0000 @@ -1161,6 +1161,32 @@ headerline, @kbd{w} gives you the absolute name of that directory. Any prefix argument or marked files are ignored in this case. +@findex dired-compare-directories + The command @kbd{M-x dired-compare-directories} is used to compare +the current Dired buffer with another directory. It marks all the files +that are ``different'' between the two directories. It puts these marks +in all Dired buffers where these files are listed, which of course includes +the current buffer. + + The default comparison method (used if you type @key{RET} at the +prompt) is to compare just the file names---each file name that does +not appear in the other directory is ``different''. You can specify +more stringent comparisons by entering a Lisp expression, which can +refer to the variables @code{size1} and @code{size2}, the respective +file sizes; @code{mtime1} and @code{mtime2}, the last modification +times in seconds, as floating point numers; and @code{fa1} and +@code{fa2}, the respective file attribute lists (as returned by the +function @code{file-attributes}). This expression is evaluated for +each pair of like-named files, and if the expression's value is +non-@code{nil}, those files are considered ``different''. + + For instance, @code{M-x dired-compare-directories @key{RET} (> +mtime1 mtime2) @key{RET}} marks files newer in this directory than in +the other, and marks files older in the other directory than in this +one. It also marks files with no counterpart, in both directories, as +always. + +@cindex drag and drop, Dired On the X window system, Emacs supports the ``drag and drop'' protocol. You can drag a file object from another program, and drop it onto a Dired buffer; this either moves, copies, or creates a link
--- a/man/emacs.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/emacs.texi Thu May 05 00:04:55 2005 +0000 @@ -370,23 +370,31 @@ * Comparing Files:: Finding where two files differ. * Misc File Ops:: Other things you can do on files. * Compressed Files:: Accessing compressed files. +* File Archives:: Operating on tar, zip, jar etc. archive files. * Remote Files:: Accessing files on other sites. * Quoted File Names:: Quoting special characters in file names. +* File Name Cache:: Completion against a list of files you often use. +* File Conveniences:: Convenience Features for Finding Files. +* Filesets:: Handling sets of files. Saving Files * Backup:: How Emacs saves the old version of your file. * Interlocking:: How Emacs protects against simultaneous editing of one file by two users. +* Shadowing: File Shadowing. + Copying files to "shadows" automatically. +* Time Stamps:: Emacs can update time stamps on saved files. Version Control * Introduction to VC:: How version control works in general. -* VC Mode Line:: How the mode line shows version control status. +* VC Mode Line:: How the mode line shows version control status. * Basic VC Editing:: How to edit a file under version control. * Old Versions:: Examining and comparing old versions. * Secondary VC Commands:: The commands used a little less frequently. * Branches:: Multiple lines of development. +* Remote Repositories:: Efficient access to remote CVS servers. * Snapshots:: Sets of file versions treated as a unit. * Miscellaneous VC:: Various other commands and features of VC. * Customizing VC:: Variables that change VC's behavior.
--- a/man/faq.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/faq.texi Thu May 05 00:04:55 2005 +0000 @@ -2549,17 +2549,6 @@ @code{font-lock-maximum-decoration} with @kbd{C-h v} (or @kbd{M-x describe-variable @key{RET}}). -@cindex Lazy font-lock -You might also want to investigate @code{fast-lock-mode} and -@code{lazy-lock-mode}, versions of @code{font-lock-mode} that speed up -highlighting. These are the alternatives for @code{jit-lock-mode} in -versions of Emacs before 21.1. The advantage of @code{lazy-lock-mode} -is that it only fontifies buffers when certain conditions are met, such -as after a certain amount of idle time, or after you have finished -scrolling through text. See the documentation for @code{lazy-lock-mode} -by typing @kbd{C-h f @code{lazy-lock-mode}} (@kbd{M-x describe-function -@key{RET} lazy-lock-mode @key{RET}}). - Also see the documentation for the function @code{font-lock-mode}, available by typing @kbd{C-h f font-lock-mode} (@kbd{M-x describe-function @key{RET} font-lock-mode @key{RET}}).
--- a/man/files.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/files.texi Thu May 05 00:04:55 2005 +0000 @@ -37,6 +37,7 @@ * Quoted File Names:: Quoting special characters in file names. * File Name Cache:: Completion against a list of files you often use. * File Conveniences:: Convenience Features for Finding Files. +* Filesets:: Handling sets of files. @end menu @node File Names @@ -3029,17 +3030,10 @@ @cindex mode, Auto Compression @pindex gzip -@findex auto-compression-mode -@vindex auto-compression-mode - Emacs comes with a library that can automatically uncompress -compressed files when you visit them, and automatically recompress them -if you alter them and save them. To enable this feature, type the -command @kbd{M-x auto-compression-mode}. You can enable it permanently -by customizing the variable @code{auto-compression-mode}. - - When automatic compression (which implies automatic uncompression as -well) is enabled, Emacs recognizes compressed files by their file names. -File names ending in @samp{.gz} indicate a file compressed with + Emacs automatically uncompresses compressed files when you visit +them, and automatically recompress them if you alter them and save +them. Emacs recognizes compressed files by their file names. File +names ending in @samp{.gz} indicate a file compressed with @code{gzip}. Other endings indicate other compression programs. Automatic uncompression and compression apply to all the operations in @@ -3047,6 +3041,12 @@ saving it, inserting its contents into a buffer, loading it, and byte compiling it. +@findex auto-compression-mode +@vindex auto-compression-mode + To disable this feature, type the command @kbd{M-x +auto-compression-mode}. You can disenable it permanently by +customizing the variable @code{auto-compression-mode}. + @node File Archives @section File Archives @cindex mode, tar @@ -3325,6 +3325,15 @@ @code{find-file}, which can be used with @code{ffap}. @xref{Completion Options}. +@findex image-mode +@findex image-toggle-display +@cindex images, viewing + Visiting image files automatically selects Image mode. This major +mode allows you to toggle between displaying the file as an image in +the Emacs buffer, and displaying its underlying text representation, +using the command @kbd{C-c C-c} (@code{image-toggle-display}). This +works only when Emacs can display the specific image type. + @findex thumbs-mode @findex mode, thumbs Thumbs mode is a major mode for viewing directories containing many @@ -3335,6 +3344,43 @@ @file{convert} program, which is part of the ImageMagick software package. +@node Filesets +@section Filesets +@cindex filesets + +@findex filesets-init + If you regularly edit a certain group of files, you can define them +as a @dfn{fileset}. This lets you perform certain operations, such as +visiting, @code{query-replace}, and shell commands on all the files +at once. To make use of filesets, you must first add the expression +@code{(filesets-init)} to your @file{.emacs} file (@pxref{Init File}). +This adds a @samp{Filesets} menu to the menu bar. + +@findex filesets-add-buffer +@findex filesets-remove-buffer + The simplest way to define filesets is by adding files to them one +at a time. To add a file to fileset @var{name}, visit the file and +type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If +there is no fileset @var{name}, this creates a new one, which +initially creates only the current file. The command @kbd{M-x +filesets-remove-buffer} removes the current file from a fileset. + + You can also edit the list of filesets directly, with @kbd{M-x +filesets-edit} (or by choosing @samp{Edit Filesets} from the +@samp{Filesets} menu). The editing is performed in a Customize buffer +(@pxref{Easy Customization}). Filesets need not be a simple list of +files---you can also define filesets using regular expression matching +file names. Some examples of these more complicated filesets are +shown in the Customize buffer. Remember to select @samp{Save for +future sessions} if you want to use the same filesets in future Emacs +sessions. + + You can use the command @kbd{M-x filesets-open} to visit all the +files in a fileset, and @kbd{M-x filesets-close} to close them. Use +@kbd{M-x filesets-run-cmd} to run a shell command on all the files in +a fileset. These commands are also available from the @samp{Filesets} +menu, where each existing fileset is represented by a submenu. + @ignore arch-tag: 768d32cb-e15a-4cc1-b7bf-62c00ee12250 @end ignore
--- a/man/frames.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/frames.texi Thu May 05 00:04:55 2005 +0000 @@ -973,10 +973,9 @@ menu items too. @findex tooltip-mode - To use tooltips, enable Tooltip mode with the command @kbd{M-x -tooltip-mode}. The customization group @code{tooltip} controls -various aspects of how tooltips work. When Tooltip mode is disabled, -the help text is displayed in the echo area instead. + You can toggle Tooltip mode with the command @kbd{M-x tooltip-mode}. +When Tooltip mode is disabled, the help text is displayed in the echo +area instead. @vindex tooltip-delay The variables @code{tooltip-delay} specifies how long Emacs should
--- a/man/misc.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/misc.texi Thu May 05 00:04:55 2005 +0000 @@ -342,6 +342,7 @@ * Single Shell:: How to run one shell command and return. * Interactive Shell:: Permanent shell taking input via Emacs. * Shell Mode:: Special Emacs commands used with permanent shell. +* Shell Prompts:: Two ways to recognize shell prompts. * History: Shell History. Repeating previous commands in a shell buffer. * Directory Tracking:: Keeping track when the subshell changes directory. * Options: Shell Options. Options for customizing Shell mode. @@ -405,7 +406,7 @@ either or both of these default initializations.@refill Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete, -unless you end the command with @samp{&} to make it asyncronous. To +unless you end the command with @samp{&} to make it asynchronous. To stop waiting, type @kbd{C-g} to quit; that terminates the shell command with the signal @code{SIGINT}---the same signal that @kbd{C-c} normally generates in the shell. Emacs waits until the command @@ -506,8 +507,8 @@ At end of buffer send line as input; otherwise, copy current line to end of buffer and send it (@code{comint-send-input}). When a line is copied, any prompt at the beginning of the line (text output by -programs preceding your input) is omitted. (See also the variable -@code{comint-use-prompt-regexp-instead-of-fields}.) +programs preceding your input) is omitted. @xref{Shell Prompts}, for +how Shell mode recognizes prompts. @item @key{TAB} @kindex TAB @r{(Shell mode)} @@ -562,7 +563,8 @@ @kindex C-c C-u @r{(Shell mode)} @findex comint-kill-input Kill all text pending at end of buffer to be sent as input -(@code{comint-kill-input}). +(@code{comint-kill-input}). If point is not at end of buffer, +this only kills the part of this text that precedes point. @item C-c C-w @kindex C-c C-w @r{(Shell mode)} @@ -684,10 +686,6 @@ @end example @end table - Shell mode also customizes the paragraph commands so that only shell -prompts start new paragraphs. Thus, a paragraph consists of an input -command plus the output that follows it in the buffer. - @cindex Comint mode @cindex mode, Comint Shell mode is a derivative of Comint mode, a general-purpose mode for @@ -704,6 +702,45 @@ in a subprocess using unmodified Comint mode---without the specializations of Shell mode. +@node Shell Prompts +@subsection Shell Prompts + +@vindex shell-prompt-pattern +@vindex comint-prompt-regexp +@vindex comint-use-prompt-regexp +@cindex prompt, shell + A prompt is text output by a program to show that it is ready to +accept new user input. Normally, Comint mode (and thus Shell mode) +considers the prompt to be any text output by a program at the +beginning of an input line. However, if the variable +@code{comint-use-prompt-regexp} is non-@code{nil}, then Comint mode +uses a regular expression to recognize prompts. In Shell mode, +@code{shell-prompt-pattern} specifies the regular expression. + + The value of @code{comint-use-prompt-regexp} also affects many +motion and paragraph commands. If the value is non-@code{nil}, the +general Emacs motion commands behave as they normally do in buffers +without special text properties. However, if the value is @code{nil}, +the default, then Comint mode divides the buffer into two types of +``fields'' (ranges of consecutive characters having the same +@code{field} text property): input and output. Prompts are part of +the output. Most Emacs motion commands do not cross field boundaries, +unless they move over multiple lines. For instance, when point is in +input on the same line as a prompt, @kbd{C-a} puts point at the +beginning of the input if @code{comint-use-prompt-regexp} is +@code{nil} and at the beginning of the line otherwise. + + In Shell mode, only shell prompts start new paragraphs. Thus, a +paragraph consists of a prompt and the input and output that follow +it. However, if @code{comint-use-prompt-regexp} is @code{nil}, the +default, most paragraph commands do not cross field boundaries. This +means that prompts, ranges of input, and ranges of non-prompt output +behave mostly like separate paragraphs; with this setting, numeric +arguments to most paragraph commands yield essentially undefined +behavior. For the purpose of finding paragraph boundaries, Shell mode +uses @code{shell-prompt-pattern}, regardless of +@code{comint-use-prompt-regexp}. + @node Shell History @subsection Shell Command History @@ -810,7 +847,7 @@ @vindex shell-input-ring-file-name Some shells store their command histories in files so that you can -refer to previous commands from previous shell sessions. Emacs reads +refer to commands from previous shell sessions. Emacs reads the command history file for your chosen shell, to initialize its own command history. The file name is @file{~/.bash_history} for bash, @file{~/.sh_history} for ksh, and @file{~/.history} for other shells. @@ -876,19 +913,8 @@ @key{SPC} perform history expansion by binding @key{SPC} to the command @code{comint-magic-space}. -@vindex shell-prompt-pattern -@vindex comint-prompt-regexp -@vindex comint-use-prompt-regexp-instead-of-fields -@cindex prompt, shell Shell mode recognizes history references when they follow a prompt. -Normally, any text output by a program at the beginning of an input -line is considered a prompt. However, if the variable -@code{comint-use-prompt-regexp-instead-of-fields} is non-@code{nil}, -then Comint mode uses a regular expression to recognize prompts. In -general, the variable @code{comint-prompt-regexp} specifies the -regular expression; Shell mode uses the variable -@code{shell-prompt-pattern} to set up @code{comint-prompt-regexp} in -the shell buffer. +@xref{Shell Prompts}, for how Shell mode recognizes prompts. @node Directory Tracking @subsection Directory Tracking @@ -1119,8 +1145,11 @@ happens automatically; there is no special password processing.) When you log in to a different machine, you need to specify the type -of terminal you're using. Terminal types @samp{ansi} or @samp{vt100} -will work on most systems. +of terminal you're using, by setting the @env{TERM} environment +variable in the environment for the remote login command. (If you use +bash, you do that by writing the variable assignment before the remote +login command, without separating comma.) Terminal types @samp{ansi} +or @samp{vt100} will work on most systems. @c If you are talking to a Bourne-compatible @c shell, and your system understands the @env{TERMCAP} variable, @@ -2078,7 +2107,7 @@ paste (yank), and @kbd{C-z} undo. Standard Emacs commands like @kbd{C-x C-c} still work, because @kbd{C-x} and @kbd{C-c} only take effect when the mark is active. However, if you don't want these -bindings at all, set @code{cua-enable-cua-keys} to nil. +bindings at all, set @code{cua-enable-cua-keys} to @code{nil}. In CUA mode, using @kbd{Shift} together with the movement keys activates the region over which they move. The standard (unshifted)
--- a/man/org.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/org.texi Thu May 05 00:04:55 2005 +0000 @@ -1,9 +1,10 @@ \input texinfo @c %**start of header +@c @setfilename org @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 3.06 +@set VERSION 3.08 @set DATE April 2005 @dircategory Emacs @@ -76,9 +77,9 @@ @menu * Introduction:: Getting started * Document Structure:: A tree works like your brain -* TODO items:: Every tree branch can be a TODO item * Tables:: Pure magic for quick formatting * Hyperlinks:: Notes in context +* TODO items:: Every tree branch can be a TODO item * Timestamps:: Assign date and time to items * Timeline and Agenda:: Use time-stamped items to produce an agenda * Exporting:: Sharing and publishing of notes @@ -93,6 +94,7 @@ * Summary:: Brief summary of what Org-mode does * Installation and Activation:: How to install Org-mode +* Feedback:: Bug reportes, ideas, patches etc. Document Structure @@ -103,6 +105,17 @@ * Structure editing:: Changing sequence and level of headlines * Sparse trees:: Matches embedded in context +Tables + +* Built-in table editor:: Simple tables +* table.el:: Complex tables +* orgtbl-mode:: The table editor as minor mode + +Hyperlinks + +* Links:: URL-like links to the world +* Remember:: Org-trees store quick notes + TODO items * TODO basics:: Marking and displaying TODO entries @@ -115,17 +128,6 @@ * TODO types:: I do this, Fred the rest * Per file keywords:: Different files, different requirements -Tables - -* Built-in table editor:: Simple tables -* table.el:: Complex tables -* orgtbl-mode:: The table editor as minor mode - -Hyperlinks - -* Links:: URL-like links to the world -* Remember:: Org-trees store quick notes - Timestamps * Time stamps:: Assigning a time to a tree entry @@ -169,6 +171,7 @@ @menu * Summary:: Brief summary of what Org-mode does * Installation and Activation:: How to install Org-mode +* Feedback:: Bug reportes, ideas, patches etc. @end menu @node Summary, Installation and Activation, Introduction, Introduction @@ -214,7 +217,7 @@ @page -@node Installation and Activation, , Summary, Introduction +@node Installation and Activation, Feedback, Summary, Introduction @section Installation and Activation @cindex installation @cindex autoload @@ -263,7 +266,32 @@ the file's name is. See also the variable @code{org-insert-mode-line-in-empty-file'}. -@node Document Structure, TODO items, Introduction, Top +@node Feedback, , Installation and Activation, Introduction +@section Feedback +@cindex feedback +@cindex bug reports +@cindex maintainer +@cindex author + +If you find problems with Org-mode, or if you have questions, remarks, +or ideas about it, please contact the maintainer Carsten Dominik at +@value{MAINTAINEREMAIL}. + +For bug reports, please provide as much information as possible, +including the version information of Emacs (@kbd{C-h v emacs-version +@key{RET}}) and Org-mode (@kbd{M-x org-version}), as well as the +Org-mode related setup in @file{.emacs}. If an error occurs, a +traceback can be very useful. Often a small example file helps, along +with clear information about: +@enumerate +@item What exactly did you do? +@item What did you expect to happen? +@item What happened instead? +@end enumerate +@noindent Thanks for helping to improve this mode. + + +@node Document Structure, Tables, Introduction, Top @chapter Document Structure @cindex document structure @cindex structure of document @@ -503,209 +531,7 @@ the document to another file (extension @file{.txt}) which then can be printed in any desired way. -@node TODO items, Tables, Document Structure, Top -@chapter TODO items -@cindex TODO items - -Org-mode does not maintain TODO lists as a separate document. TODO -items are an integral part of the notes file, because TODO items -usually come up while taking notes! With Org-mode, you simply mark -any entry in a tree as being a TODO item. In this way, the -information is not duplicated, and the entire context from which the -item emerged is always present when you check. - -Of course, this technique causes TODO items to be scattered throughout -your file. Org-mode provides methods to give you an overview over all -things you have to do. - -@menu -* TODO basics:: Marking and displaying TODO entries -* TODO extensions:: Workflow and assignments -* Priorities:: Some things are more important than others -@end menu - -@node TODO basics, TODO extensions, TODO items, TODO items -@section Basic TODO functionality - -Any headline can become a TODO item by starting it with the word TODO, -for example - -@example -*** TODO Write letter to Sam Fortune -@end example - -@noindent -The most important commands to work with TODO entries are: - -@table @kbd -@kindex C-c C-t -@item C-c C-t -Rotate the TODO state of the current item between -@example -,-> (unmarked) -> TODO -> DONE --. -'--------------------------------' -@end example -The same rotation can also be done ``remotely'' from the timeline and -agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}). -@kindex C-c C-v -@cindex sparse tree, for TODO -@item C-c C-v -View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds -the entire buffer, but shows all TODO items and the headings hierarchy -above them. With prefix arg, show also the DONE entries. -@item C-u C-c a -A @kbd{C-u} argument to the @code{org-agenda command} (@pxref{Agenda}) -collects all unfinished TODO items into a single place. -@end table - -@node TODO extensions, Priorities, TODO basics, TODO items -@section Extended use of TODO keywords -@cindex extended TODO keywords - -The default implementation of TODO entries is just two states: TODO -and DONE. You can, however, use the TODO feature for more -complicated things by configuring the variables -@code{org-todo-keywords} and @code{org-todo-interpretation}. Using -special setup, you can even use TODO keywords in different ways in -different org files. - -@menu -* Workflow states:: From TODO to DONE in steps -* TODO types:: I do this, Fred the rest -* Per file keywords:: Different files, different requirements -@end menu - -@node Workflow states, TODO types, TODO extensions, TODO extensions -@subsection TODO keywords as workflow states -@cindex TODO workflow -@cindex workflow states as TODO keywords - -You can use TODO keywords to indicate different states in the process -of working on an item, for example - -@lisp -(setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE") - org-todo-interpretation 'sequence) -@end lisp - -With this setup, the command @kbd{C-c C-t} will cycle an entry from -TODO to FEEDBACK, then to VERIFY, and finally too DONE. You may also -use a prefix argument to quickly select a specific state. For example -@kbd{C-3 C-c C-t} will change the state immediately to VERIFY. -If you define many keywords, you can use in-buffer completion (see -@ref{Completion}) to insert these words into the buffer. - -@node TODO types, Per file keywords, Workflow states, TODO extensions -@subsection TODO keywords as types -@cindex TODO types -@cindex names as TODO keywords -@cindex types as TODO keywords - -The second possibility is to use TODO keywords to indicate different -types of action items. For example, you might want to indicate that -items are for ``work'' or ``home''. Or, when you work with several -people on a single project, you might want to assign action items -directly to persons, by using their names as TODO keywords. This -would be set up like this: - -@lisp -(setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE") - org-todo-interpretation 'type) -@end lisp - -In this case, different keywords do not indicate a sequence, but -rather different types. So it is normally not useful to change from -one type to another. Therefore, in this case the the behavior of the -command @kbd{C-c C-t} is changed slightly@footnote{This is also true -for the @kbd{t} command in the timeline and agenda buffers}. When -used several times in succession, it will still cycle through all -names. But when when you return to the item after some time and -execute @kbd{C-c C-t} again, it will switch from each name directly to -DONE. Use prefix arguments or completion to quickly select a specific -name. - -@node Per file keywords, , TODO types, TODO extensions -@subsection Setting up TODO keywords for individual files -@cindex keyword options -@cindex per file keywords - -It can be very useful to use different aspects of the TODO mechanism -in different files, which is not possible with the global settings -described above. For file-local settings, you need to add special -lines to the file which set the keywords and interpretation for that -file only. For example, to set one of the two examples discussed -above, you need one of the following lines, starting in column zero -anywhere in the file: - -@example -#+SEQ_TODO: TODO FEEDBACK VERIFY DONE -#+TYP_TODO: Fred Sara Lucy Mike DONE -@end example - -@cindex Completing option keywords -@kindex M-@key{TAB} -@noindent To make sure you are using the correct keyword, type -@samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion. - -@cindex DONE, final TODO keyword -Remember that the last keyword must always mean that the item is DONE -(you may use a different word, though). Also note that in each file, -only one of the two aspects of TODO keywords can be used. After -changing one of these lines, use @kbd{C-c C-c} with the cursor still -in the line to make the changes known to Org-mode@footnote{Org-mode -parses these lines only when Org-mode is activated after visiting a -file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#-} -is simply restarting Org-mode, making sure that these changes will be -respected.}. - -If you want to use very many keywords, for example when working with a -large group of people, you may split the names over several lines: - -@example -#+TYP_TODO: Fred Sara Lucy Mike -#+TYP_TODO: Luis George Jules Jessica -#+TYP_TODO: Kim Arnold Peter -#+TYP_TODO: DONE -@end example - -@node Priorities, , TODO extensions, TODO items -@section Priorities -@cindex priorities - -If you use Org-mode extensively to organize your work, you may end up -with a number of TODO entries so large that you'd like to prioritize -them. This can be done by placing a @emph{priority cookie} into the -headline, like this - -@example -*** TODO [#A] Write letter to Sam Fortune -@end example - -@noindent -With its standard setup, Org-mode supports priorities @samp{A}, -@samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry -without a cookie is treated as priority @samp{B}. Priorities make a -difference only in the agenda (@pxref{Agenda}). - -@table @kbd -@kindex @kbd{C-c ,} -@item @kbd{C-c ,} -Set the priority of the current item. The command prompts for a -priority character @samp{A}, @samp{B} or @samp{C}. When you press -@key{SPC} instead, the priority cookie is removed from the headline. -The priorities can also be changed ``remotely'' from the timeline and -agenda buffer with the @kbd{,} command (@pxref{Agenda commands}). - -@kindex S-@key{up} -@kindex S-@key{down} -@item S-@key{up} -@itemx S-@key{down} -Increase/decrease priority of current item. Note that these keys are -also used to modify time stamps (@pxref{Creating timestamps}). -@end table - - -@node Tables, Hyperlinks, TODO items, Top +@node Tables, Hyperlinks, Document Structure, Top @chapter Tables @cindex tables @@ -951,14 +777,14 @@ If you like the intuitive way the Org-mode table editor works, you might want to use it also in other modes like text-mode or mail-mode. -The minor mode Orgtbl-mode make this possible. You can always toggle +The minor mode Orgtbl-mode makes this possible. You can always toggle the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for example in mail mode, use @lisp (add-hook 'mail-mode-hook 'turn-on-orgtbl) @end lisp -@node Hyperlinks, Timestamps, Tables, Top +@node Hyperlinks, TODO items, Tables, Top @chapter Hyperlinks @cindex hyperlinks @@ -1006,7 +832,8 @@ @end example A link may contain space characters and is terminated by the end of -the line. Therefore, there can be only one link per line (but see the +the line or, in tables, by the end of the table field. Therefore, +outside of tables there can be only one link per line (but see the variable @code{org-allow-space-in-links}). @cindex storing links @@ -1115,7 +942,210 @@ non-nil, the entire text is also indented so that it starts in the same column as the headline (after the asterisks). -@node Timestamps, Timeline and Agenda, Hyperlinks, Top +@node TODO items, Timestamps, Hyperlinks, Top +@chapter TODO items +@cindex TODO items + +Org-mode does not maintain TODO lists as a separate document. TODO +items are an integral part of the notes file, because TODO items +usually come up while taking notes! With Org-mode, you simply mark +any entry in a tree as being a TODO item. In this way, the +information is not duplicated, and the entire context from which the +item emerged is always present when you check. + +Of course, this technique causes TODO items to be scattered throughout +your file. Org-mode provides methods to give you an overview over all +things you have to do. + +@menu +* TODO basics:: Marking and displaying TODO entries +* TODO extensions:: Workflow and assignments +* Priorities:: Some things are more important than others +@end menu + +@node TODO basics, TODO extensions, TODO items, TODO items +@section Basic TODO functionality + +Any headline can become a TODO item by starting it with the word TODO, +for example + +@example +*** TODO Write letter to Sam Fortune +@end example + +@noindent +The most important commands to work with TODO entries are: + +@table @kbd +@kindex C-c C-t +@item C-c C-t +Rotate the TODO state of the current item between +@example +,-> (unmarked) -> TODO -> DONE --. +'--------------------------------' +@end example +The same rotation can also be done ``remotely'' from the timeline and +agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}). +@kindex C-c C-v +@cindex sparse tree, for TODO +@item C-c C-v +View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds +the entire buffer, but shows all TODO items and the headings hierarchy +above them. With prefix arg, show also the DONE entries. +@item C-u C-c a +A @kbd{C-u} argument to the @code{org-agenda command} (@pxref{Agenda}) +collects all unfinished TODO items into a single place. +@end table + +@node TODO extensions, Priorities, TODO basics, TODO items +@section Extended use of TODO keywords +@cindex extended TODO keywords + +The default implementation of TODO entries is just two states: TODO +and DONE. You can, however, use the TODO feature for more +complicated things by configuring the variables +@code{org-todo-keywords} and @code{org-todo-interpretation}. Using +special setup, you can even use TODO keywords in different ways in +different org files. + +@menu +* Workflow states:: From TODO to DONE in steps +* TODO types:: I do this, Fred the rest +* Per file keywords:: Different files, different requirements +@end menu + +@node Workflow states, TODO types, TODO extensions, TODO extensions +@subsection TODO keywords as workflow states +@cindex TODO workflow +@cindex workflow states as TODO keywords + +You can use TODO keywords to indicate different states in the process +of working on an item, for example + +@lisp +(setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE") + org-todo-interpretation 'sequence) +@end lisp + +With this setup, the command @kbd{C-c C-t} will cycle an entry from +TODO to FEEDBACK, then to VERIFY, and finally too DONE. You may also +use a prefix argument to quickly select a specific state. For example +@kbd{C-3 C-c C-t} will change the state immediately to VERIFY. +If you define many keywords, you can use in-buffer completion (see +@ref{Completion}) to insert these words into the buffer. + +@node TODO types, Per file keywords, Workflow states, TODO extensions +@subsection TODO keywords as types +@cindex TODO types +@cindex names as TODO keywords +@cindex types as TODO keywords + +The second possibility is to use TODO keywords to indicate different +types of action items. For example, you might want to indicate that +items are for ``work'' or ``home''. Or, when you work with several +people on a single project, you might want to assign action items +directly to persons, by using their names as TODO keywords. This +would be set up like this: + +@lisp +(setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE") + org-todo-interpretation 'type) +@end lisp + +In this case, different keywords do not indicate a sequence, but +rather different types. So it is normally not useful to change from +one type to another. Therefore, in this case the the behavior of the +command @kbd{C-c C-t} is changed slightly@footnote{This is also true +for the @kbd{t} command in the timeline and agenda buffers}. When +used several times in succession, it will still cycle through all +names. But when when you return to the item after some time and +execute @kbd{C-c C-t} again, it will switch from each name directly to +DONE. Use prefix arguments or completion to quickly select a specific +name. + +@node Per file keywords, , TODO types, TODO extensions +@subsection Setting up TODO keywords for individual files +@cindex keyword options +@cindex per file keywords + +It can be very useful to use different aspects of the TODO mechanism +in different files, which is not possible with the global settings +described above. For file-local settings, you need to add special +lines to the file which set the keywords and interpretation for that +file only. For example, to set one of the two examples discussed +above, you need one of the following lines, starting in column zero +anywhere in the file: + +@example +#+SEQ_TODO: TODO FEEDBACK VERIFY DONE +#+TYP_TODO: Fred Sara Lucy Mike DONE +@end example + +@cindex Completing option keywords +@kindex M-@key{TAB} +@noindent To make sure you are using the correct keyword, type +@samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion. + +@cindex DONE, final TODO keyword +Remember that the last keyword must always mean that the item is DONE +(you may use a different word, though). Also note that in each file, +only one of the two aspects of TODO keywords can be used. After +changing one of these lines, use @kbd{C-c C-c} with the cursor still +in the line to make the changes known to Org-mode@footnote{Org-mode +parses these lines only when Org-mode is activated after visiting a +file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#-} +is simply restarting Org-mode, making sure that these changes will be +respected.}. + +If you want to use very many keywords, for example when working with a +large group of people, you may split the names over several lines: + +@example +#+TYP_TODO: Fred Sara Lucy Mike +#+TYP_TODO: Luis George Jules Jessica +#+TYP_TODO: Kim Arnold Peter +#+TYP_TODO: DONE +@end example + +@node Priorities, , TODO extensions, TODO items +@section Priorities +@cindex priorities + +If you use Org-mode extensively to organize your work, you may end up +with a number of TODO entries so large that you'd like to prioritize +them. This can be done by placing a @emph{priority cookie} into the +headline, like this + +@example +*** TODO [#A] Write letter to Sam Fortune +@end example + +@noindent +With its standard setup, Org-mode supports priorities @samp{A}, +@samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry +without a cookie is treated as priority @samp{B}. Priorities make a +difference only in the agenda (@pxref{Agenda}). + +@table @kbd +@kindex @kbd{C-c ,} +@item @kbd{C-c ,} +Set the priority of the current item. The command prompts for a +priority character @samp{A}, @samp{B} or @samp{C}. When you press +@key{SPC} instead, the priority cookie is removed from the headline. +The priorities can also be changed ``remotely'' from the timeline and +agenda buffer with the @kbd{,} command (@pxref{Agenda commands}). + +@kindex S-@key{up} +@kindex S-@key{down} +@item S-@key{up} +@itemx S-@key{down} +Increase/decrease priority of current item. Note that these keys are +also used to modify time stamps (@pxref{Creating timestamps}). +@end table + + + +@node Timestamps, Timeline and Agenda, TODO items, Top @chapter Timestamps Items can be labeled with timestamps to make them useful for project @@ -1415,10 +1445,11 @@ @end example @noindent After changing this line, press @kbd{C-c C-c} with the cursor still in -the line, to make the changes know to org-mode. Otherwise, the change -will only be active the next time you visit this file with Emacs. +the line, to make the changes known to org-mode. Otherwise, the +change will only be active the next time you visit this file with +Emacs. -The display in the agenda buffer looks best if the category is no +The display in the agenda buffer looks best if the category is not longer than 10 characters. @subsection Sorting of agenda items @@ -2078,10 +2109,9 @@ @cindex acknowledgments Org-mode was written by Carsten Dominik, who still maintains it at the -Org-mode homepage -@uref{http://www.astro.uva.nl/~dominik/Tools/org/}. The following -people have helped the development along with ideas, suggestions and -patches. +Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}. +The following people have helped the development along with ideas, +suggestions and patches. @itemize @bullet @item @@ -2112,6 +2142,9 @@ @item Carsten Wimmer suggested some changes and helped fix a bug in linking to GNUS. +@item +Stefan Monnier provided a patch with lots of little fixes to keep the +Emacs-Lisp compiler happy. @end itemize @node Bugs, , Acknowledgments, Miscellaneous @@ -2154,6 +2187,7 @@ @bye + @ignore arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac @end ignore
--- a/man/text.texi Thu Apr 28 04:56:56 2005 +0000 +++ b/man/text.texi Thu May 05 00:04:55 2005 +0000 @@ -1540,6 +1540,9 @@ C-f} command (@code{tex-view}). @item C-c C-q Show the printer queue (@code{tex-show-print-queue}). +@item C-c C-c +Invoke some other compilation command on the entire current buffer +(@code{tex-compile}). @end table @findex tex-buffer @@ -1684,6 +1687,15 @@ @kbd{C-c TAB} (@code{tex-bibtex-file}), and then repeat @kbd{C-c C-f} (@code{tex-file}) twice more to get the cross-references correct. +@findex tex-compile +@kindex C-c C-c @r{(@TeX{} mode)} + To invoke some other compilation program on the current @TeX{} +buffer, type @kbd{C-c C-c} (@code{tex-compile}). This command knows +how to pass arguments to many common programs, including +@file{pdflatex}, @file{yap}, @file{xdvi}, and @file{dvips}. You can +select your desired compilation program using the standard completion +keys (@pxref{Completion}). + @node TeX Misc @subsection @TeX{} Mode Miscellany
--- a/nt/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/nt/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,7 @@ +2005-04-23 David Hunter <hunterd42@comcast.net> (tiny change) + + * config.nt (HAVE_PWD_H): Undef. + 2004-06-07 Juanma Barranquero <lektu@terra.es> * INSTALL: Clarify paragraph about compatibility between image
--- a/nt/config.nt Thu Apr 28 04:56:56 2005 +0000 +++ b/nt/config.nt Thu May 05 00:04:55 2005 +0000 @@ -139,6 +139,7 @@ #undef HAVE_TERMIOS_H #undef HAVE_LIMITS_H #undef HAVE_STRING_H +#undef HAVE_PWD_H #undef STDC_HEADERS #undef TIME_WITH_SYS_TIME
--- a/src/ChangeLog Thu Apr 28 04:56:56 2005 +0000 +++ b/src/ChangeLog Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,245 @@ +2005-05-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * mac.c: #undef init_process so not to conflict with system headers. + +2005-05-02 Richard M. Stallman <rms@gnu.org> + + * buffer.c (syms_of_buffer): Define cursor-in-non-selected-windows. + + * buffer.h (struct buffer): Add cursor_in_non_selected_windows slot. + + * xdisp.c (Vcursor_in_non_selected_windows) + (Qcursor_in_non_selected_windows): Vars deleted. + (syms_of_xdisp): Don't initialize them. + (get_window_cursor_type): Use cursor_in_non_selected_windows + buffer slot. + +2005-05-02 Kim F. Storm <storm@cua.dk> + + * macros.c (executing_kbd_macro_index): Rename from + executing_macro_index. All uses changed. + (executing_kbd_macro_iterations): Rename from + executing_macro_iterations. All uses changed. + (executing_kbd_macro): Rename from executing_macro. + All uses changed. + (syms_of_macros): Rename Lisp var executing-macro-index to + executing-kbd-macro-index. + + * xdisp.c (move_it_in_display_line_to): Fix last change. + +2005-05-01 Luc Teirlinck <teirllm@auburn.edu> + + * xmenu.c (Fx_popup_menu): Doc fix. + + * charset.c (syms_of_charset): Delete defsubr for Schars_in_region. + +2005-05-02 Jason Rumney <jasonr@gnu.org> + + * emacs.c (USAGE3, USAGE4): Keep strings below 2048 bytes. + +2005-05-02 Nozomu Ando <nand@mac.com> + + * sysselect.h: Fix typo. + +2005-05-02 Nick Roberts <nickrob@snap.net.nz> + + * charset.c (Fchars_in_region): Remove as obsolete. + +2005-05-01 Kim F. Storm <storm@cua.dk> + + * xdisp.c (move_it_in_display_line_to): Stop if we move beyond + TO_CHARPOS. This may happen if last glyphs was an image or stretch + glyph. + +2005-05-01 Luc Teirlinck <teirllm@auburn.edu> + + * dispnew.c (sit_for): Vexecuting_macro -> Vexecuting_kbd_macro. + +2005-05-01 Richard M. Stallman <rms@gnu.org> + + * xmenu.c [not HAVE_X_TOOLKIT] (xmenu_show): + If user cancels the menu, quit unless FOR_CLICK. + + * macros.c (Vexecuting_kbd_macro): Renamed from Vexecuting_macro. + All uses changed. + (syms_of_macros): Define only executing-kbd-macro, not executing-macro. + * keyboard.c: Change Vexecuting_macro to Vexecuting_kbd_macro. + * macros.h (Vexecuting_kbd_macro): Declare instead of Vexecuting_macro. + * commands.h (Vexecuting_kbd_macro): Likewise. + +2005-05-01 Thien-Thi Nguyen <ttn@gnu.org> + + * sysdep.c (get_frame_size) [VMS]: Use a fresh i/o channel. + +2005-04-30 Richard M. Stallman <rms@gnu.org> + + * fileio.c (Ffind_file_name_handler): Handle the `operations' + property of the file name handler. + (Qoperations): New variable. + (syms_of_fileio): Initialize and staticpro it. + + * xdisp.c (set_message_1): Delete xassert. + +2005-04-29 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * mac.c: Don't include time.h. Include sysselect.h after + systime.h. + + * macfns.c (Fx_server_version): Add BLOCK_INPUT around Gestalt. + + * macgui.h [HAVE_CARBON && MAC_OSX]: Don't undefine/define mktime + before/after including Carbon.h if there is a working mktime. + +2005-04-28 Kim F. Storm <storm@cua.dk> + + * xfaces.c (resolve_face_name): Add arg SIGNAL_P. Calls changed. + Fix cyclic alias check. If alias loop is detected, signal + circular-list error if SIGNAL_P, and return Qdefault if !SIGNAL_P. + +2005-04-28 Lute Kamstra <lute@gnu.org> + + * eval.c (do_autoload): Record only autoloads in the autoload + property of symbols. + +2005-04-28 Nick Roberts <nickrob@snap.net.nz> + + * emacs.c (USAGE1): Add --basic-display and --quick options. + +2005-04-27 Kim F. Storm <storm@cua.dk> + + * data.c (syms_of_data) Staticpro Qcyclic_variable_indirection. + +2005-04-26 Richard M. Stallman <rms@gnu.org> + + * window.c (Fsame_window_p, Fspecial_display_p): Doc fixes. + (syms_of_window): Doc fixes. + + * indent.c (Fvertical_motion): Undo previous change. + +2005-04-26 Kenichi Handa <handa@m17n.org> + + * fns.c (char_table_range): New function. + (Fchar_table_range): Signal an error if characters in the range + have inconsistent values. Don't check the parent. + +2005-04-25 Kenichi Handa <handa@m17n.org> + + * fontset.c (fontset_set): Fix previous change. + +2005-04-24 Richard M. Stallman <rms@gnu.org> + + * indent.c (Fvertical_motion): Bind fontification-functions to nil. + +2005-04-24 Eli Zaretskii <eliz@gnu.org> + + * regex.c (re_search_2, re_match_2_internal): Convert second arg + of RE_TRANSLATE to int, to shut up GCC warnings. + + * fileio.c (Fcopy_file): Doc fix. + [MSDOS]: Fix call to emacs_open: buffer_file_type not defined and + not needed. + +2005-04-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * Makefile.in [HAVE_CARBON] (MAC_OBJ): Add macselect.o. + (SOME_MACHINE_OBJECTS): Likewise. + (mac.o): Depend on ccl.h. + (macselect.o): New target. + + * emacs.c (main) [MAC_OS8 || MAC_OSX && HAVE_CARBON]: Call + syms_of_macselect. + + * frame.c (Fdelete_frame) [MAC_OS]: Call x_clear_frame_selections. + + * mac.c [!TARGET_API_MAC_CARBON]: Don't include charset.h or + coding.h. + (QCLIPBOARD): Remove variable. + (syms_of_mac): Don't initialize it. + (Fmac_paste_function, Fmac_cut_function, Fx_selection_exists_p): + Remove functions. + (syms_of_mac): Don't defsubr them. + [TARGET_API_MAC_CARBON] (Qmime_charset, QNFD, QNFKD, QNFC, QNFKC) + (QHFS_plus_D, QHFS_plus_C): New variables. + (syms_of_mac) [TARGET_API_MAC_CARBON]: Initialize them. + [TARGET_API_MAC_CARBON] (get_cfstring_encoding_from_lisp) + (cfstring_create_normalized): New functions. + [TARGET_API_MAC_CARBON] (Fmac_code_convert_string): Likewise. + (syms_of_mac) [TARGET_API_MAC_CARBON]: Defsubr it. + + * macterm.c (handling_window_update, terminate_flag): Remove + variables. + (do_window_update, do_ae_quit_application, XTread_socket): Don't + use them. + (WNE_SLEEP_AT_SUSPEND, WNE_SLEEP_AT_RESUME): Don't define. + [USE_CARBON_EVENTS && MAC_OSX] (mac_handle_service_event) + (init_service_handler): Move to macselect.c. Remove declarations. + [USE_CARBON_EVENTS && MAC_OSX] (init_service_handler): Add extern. + (Qapplication, Qabout): New variables. + (syms_of_mac): Initialize them. + [USE_CARBON_EVENTS && MAC_OSX] (Qpreferences, Qservices, Qpaste) + (Qperform): New variables. + (syms_of_mac) [USE_CARBON_EVENTS && MAC_OSX]: Initialize them. + (do_get_menus) [TARGET_API_MAC_CARBON]: Don't call AppendResMenu. + (do_menu_choice): Unhighlight menu bar also when menu_id is 0. + (mac_store_application_menu_event, init_menu_bar): New functions. + [USE_CARBON_EVENTS] (mac_handle_command_event) + (init_command_handler): New functions. + (mac_handle_window_event): Return noErr on window update event. + (do_ae_quit_application): Call mac_store_application_menu_event. + (mac_initialize) [USE_CARBON_EVENTS]: Call init_command_handler + and init_menu_bar. + + * macterm.h (x_clear_frame_selections): Add extern. + + * macselect.c: New file for selection processing on Mac OS. + +2005-04-23 Richard M. Stallman <rms@gnu.org> + + * fileio.c (Fcopy_file): New arg MUSTBENEW. + (Frename_file): Pass new arg to Fcopy_file. + + * window.c (window_size_fixed): Variable deleted. + (syms_of_window): Initialize window-size-fixed to nil. + But don't DEFVAR window_size_fixed. + +2005-04-23 Andreas Schwab <schwab@suse.de> + + * m/macppc.h (LD_SWITCH_MACHINE) [LINUX]: Don't define. + (START_FILES, LIB_STANDARD) [LINUX && _ARCH_PPC64]: Override to + use lib64 instead of lib. + (_LP64) [_ARCH_PPC64]: Define if not defined. + +2005-04-23 David Hunter <hunterd42@comcast.net> (tiny change) + + * s/ms-w32.h (HAVE_PWD_H): Define. + +2005-04-22 Kenichi Handa <handa@m17n.org> + + * fns.c (copy_sub_char_table): Explicitly copy the default value + of the sub-chartable. + + * fontset.c (fontset_set): When a sub-chartable is created, + explicitly sets the defalt value. + +2005-04-22 Kim F. Storm <storm@cua.dk> + + * fns.c (Fplist_get): Replace by Fsafe_plist_get. + (Fsafe_plist_get): Rename to Fplist_get. + (Fsafe_get): Remove, as Fget now uses safe Fplist_get. + (defsubr): Remove defsubr for Fsafe_plist_get and Fsafe_get. + + * lisp.h (Fsafe_plist_get, Fsafe_get): Remove EXFUN. + + * xdisp.c (store_mode_line_string, produce_stretch_glyph) + (note_mode_line_or_margin_highlight, note_mouse_highlight): + Use Fplist_get instead of Fsafe_plist_get. + + * xfaces.c (resolve_face_name): Use Fget instead of Fsafe_get. + +2005-04-21 Miles Bader <miles@gnu.org> + + * xdisp.c (dump_glyph_row): Don't display overlay_arrow_p field. + 2005-04-20 Thien-Thi Nguyen <ttn@gnu.org> * sysdep.c: Remove reference to defunct vms-pwd.h. @@ -2763,7 +3005,7 @@ * doc.c: New variable Vbuild_files. (Fsnarf_documentation): If Vbuild_files is nil, populate it with - file names from buildobh.lst. Only attach docstrings from files + file names from buildobj.lst. Only attach docstrings from files that are in Vbuild_files. (syms_of_doc): Defvar Vbuild_files.
--- a/src/ChangeLog.unicode Thu Apr 28 04:56:56 2005 +0000 +++ b/src/ChangeLog.unicode Thu May 05 00:04:55 2005 +0000 @@ -1,3 +1,8 @@ +2005-05-04 Miles Bader <miles@gnu.org> + + * character.c (chars-in-region): Obsolete function removed. + (syms_of_character): Remove its initialization. + 2005-04-28 Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> * w32select.c (validate_coding_system)
--- a/src/Makefile.in Thu Apr 28 04:56:56 2005 +0000 +++ b/src/Makefile.in Thu May 05 00:04:55 2005 +0000 @@ -570,7 +570,7 @@ #ifdef HAVE_CARBON mac = $(dot)$(dot)/mac/ -MAC_OBJ = mac.o macterm.o macfns.o macmenu.o fontset.o fringe.o image.o +MAC_OBJ = mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o fringe.o image.o emacsapp = $(PWD)/$(mac)Emacs.app/ emacsappsrc = ${srcdir}/../mac/Emacs.app/ #endif @@ -597,7 +597,7 @@ in case they are needed there. */ SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ - mac.o macterm.o macfns.o macmenu.o fontset.o \ + mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o \ w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \ w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o @@ -1230,7 +1230,7 @@ scroll.o sysdep.o term.o widget.o window.o xdisp.o xfaces.o xfns.o xmenu.o \ xterm.o xselect.o sound.o: macgui.h mac.o: mac.c process.h sysselect.h blockinput.h atimer.h systime.h charset.h \ - coding.h $(config_h) + coding.h ccl.h $(config_h) macfns.o: macfns.c charset.h macterm.h macgui.h frame.h window.h buffer.h \ dispextern.h macgui.h fontset.h $(INTERVAL_SRC) keyboard.h blockinput.h \ atimer.h systime.h epaths.h termhooks.h coding.h systime.h $(config_h) @@ -1240,6 +1240,7 @@ frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h termopts.h \ termchar.h gnu.h disptab.h buffer.h window.h keyboard.h $(INTERVAL_SRC) \ process.h coding.h $(config_h) +macselect.o: blockinput.h macterm.h macgui.h frame.h $(config_h) ${emacsapp}Contents/Resources/English.lproj: mkdir -p $@
--- a/src/buffer.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/buffer.c Thu May 05 00:04:55 2005 +0000 @@ -5084,6 +5084,7 @@ XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; XSETFASTINT (buffer_local_flags.cursor_type, idx); ++idx; XSETFASTINT (buffer_local_flags.extra_line_spacing, idx); ++idx; + XSETFASTINT (buffer_local_flags.cursor_in_non_selected_windows, idx); ++idx; /* Need more room? */ if (idx >= MAX_PER_BUFFER_VARS) @@ -5954,6 +5955,11 @@ If value is a floating point number, it specifies the spacing relative to the default frame line height. */); + DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", + ¤t_buffer->cursor_in_non_selected_windows, Qt, + doc: /* *Cursor type to display in non-selected windows. +t means to use hollow box cursor. See `cursor-type' for other values. */); + DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, doc: /* List of functions called with no args to query before killing a buffer. */); Vkill_buffer_query_functions = Qnil;
--- a/src/buffer.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/buffer.h Thu May 05 00:04:55 2005 +0000 @@ -765,6 +765,11 @@ /* An integer > 0 means put that number of pixels below text lines in the display of this buffer. */ Lisp_Object extra_line_spacing; + + /* *Cursor type to display in non-selected windows. + t means to use hollow box cursor. + See `cursor-type' for other values. */ + Lisp_Object cursor_in_non_selected_windows; };
--- a/src/character.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/character.c Thu May 05 00:04:55 2005 +0000 @@ -1,7 +1,7 @@ /* Basic character support. Copyright (C) 1995, 1997, 1998, 2001 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2005 Free Software Foundation, Inc. Copyright (C) 2003 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number H13PRO009 @@ -532,23 +532,6 @@ return CHAR_TABLE_REF (Vchar_direction_table, c); } -DEFUN ("chars-in-region", Fchars_in_region, Schars_in_region, 2, 2, 0, - doc: /* Return number of characters between BEG and END. -This is now an obsolete function. We keep it just for backward compatibility. */) - (beg, end) - Lisp_Object beg, end; -{ - int from, to; - - CHECK_NUMBER_COERCE_MARKER (beg); - CHECK_NUMBER_COERCE_MARKER (end); - - from = min (XFASTINT (beg), XFASTINT (end)); - to = max (XFASTINT (beg), XFASTINT (end)); - - return make_number (to - from); -} - /* Return the number of characters in the NBYTES bytes at PTR. This works by looking at the contents and checking for multibyte sequences while assuming that there's no invalid sequence. @@ -943,7 +926,6 @@ defsubr (&Schar_width); defsubr (&Sstring_width); defsubr (&Schar_direction); - defsubr (&Schars_in_region); defsubr (&Sstring); DEFVAR_LISP ("translation-table-vector", &Vtranslation_table_vector,
--- a/src/commands.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/commands.h Thu May 05 00:04:55 2005 +0000 @@ -76,11 +76,11 @@ /* Nonzero means ^G can quit instantly */ extern int immediate_quit; -extern Lisp_Object Vexecuting_macro; +extern Lisp_Object Vexecuting_kbd_macro; /* Nonzero if input is coming from the keyboard */ -#define INTERACTIVE (NILP (Vexecuting_macro) && !noninteractive) +#define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive) /* Set this nonzero to force reconsideration of mode line. */
--- a/src/data.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/data.c Thu May 05 00:04:55 2005 +0000 @@ -3057,6 +3057,7 @@ staticpro (&Qargs_out_of_range); staticpro (&Qvoid_function); staticpro (&Qcyclic_function_indirection); + staticpro (&Qcyclic_variable_indirection); staticpro (&Qvoid_variable); staticpro (&Qsetting_constant); staticpro (&Qinvalid_read_syntax);
--- a/src/dispnew.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/dispnew.c Thu May 05 00:04:55 2005 +0000 @@ -6343,7 +6343,7 @@ { swallow_events (display); - if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_macro)) + if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_kbd_macro)) return Qnil; if (initial_display)
--- a/src/emacs.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/emacs.c Thu May 05 00:04:55 2005 +0000 @@ -264,7 +264,8 @@ --no-shared-memory, -nl do not use shared memory\n\ --no-site-file do not load site-start.el\n\ --no-splash do not display a splash screen on startup\n\ ---no-window-system, -nw don't communicate with X, ignoring $DISPLAY\n\ +--no-window-system, -nw do not communicate with X, ignoring $DISPLAY\n\ +--quick, -Q equivalent to -q --no-site-file\n\ --script FILE run FILE as an Emacs Lisp script\n\ --terminal, -t DEVICE use DEVICE for terminal I/O\n\ --unibyte, --no-multibyte run Emacs in unibyte mode\n\ @@ -294,6 +295,8 @@ Display options:\n\ \n\ --background-color, -bg COLOR window background color\n\ +--basic-display, -D disable many display features;\n\ + used for debugging Emacs\n\ --border-color, -bd COLOR main border color\n\ --border-width, -bw WIDTH width of main border\n\ --color, --color=MODE color mode for character terminals;\n\ @@ -320,16 +323,16 @@ --xrm XRESOURCES set additional X resources\n\ --help display this help and exit\n\ --version output version information and exit\n\ -\n\ +\n" + +#define USAGE4 "\ You can generally also specify long option names with a single -; for\n\ example, -batch as well as --batch. You can use any unambiguous\n\ abbreviation for a --option.\n\ \n\ Various environment variables and window system resources also affect\n\ Emacs' operation. See the main documentation.\n\ -\n" - -#define USAGE4 "\ +\n\ Report bugs to %s. First, please see the Bugs\n\ section of the Emacs manual or the file BUGS.\n" @@ -1318,6 +1321,7 @@ syms_of_fontset (); syms_of_macterm (); syms_of_macmenu (); + syms_of_macselect (); syms_of_data (); syms_of_search (); syms_of_frame (); @@ -1637,6 +1641,7 @@ syms_of_macterm (); syms_of_macfns (); syms_of_macmenu (); + syms_of_macselect (); syms_of_fontset (); #endif /* MAC_OSX && HAVE_CARBON */
--- a/src/eval.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/eval.c Thu May 05 00:04:55 2005 +0000 @@ -1,6 +1,6 @@ /* Evaluator for GNU Emacs Lisp interpreter. - Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000, 2001, 02, 2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1999, 2000, 2001, + 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1982,10 +1982,7 @@ second = Fcdr (first); first = Fcar (first); - /* Note: This test is subtle. The cdr of an autoload-queue entry - may be an atom if the autoload entry was generated by a defalias - or fset. */ - if (CONSP (second)) + if (CONSP (second) && EQ (XCAR (second), Qautoload)) Fput (first, Qautoload, (XCDR (second))); queue = XCDR (queue);
--- a/src/fileio.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/fileio.c Thu May 05 00:04:55 2005 +0000 @@ -175,6 +175,10 @@ whose I/O is done with a special handler. */ Lisp_Object Vfile_name_handler_alist; +/* Property name of a file name handler, + which gives a list of operations it handles.. */ +Lisp_Object Qoperations; + /* Lisp functions for translating file formats */ Lisp_Object Qformat_decode, Qformat_annotate_function; @@ -370,13 +374,16 @@ elt = XCAR (chain); if (CONSP (elt)) { - Lisp_Object string; + Lisp_Object string = XCAR (elt); int match_pos; - string = XCAR (elt); + Lisp_Object handler = XCDR (elt); + Lisp_Object operations = Fget (handler, Qoperations); + if (STRINGP (string) - && (match_pos = fast_string_match (string, filename)) > pos) + && (match_pos = fast_string_match (string, filename)) > pos + && (NILP (operations) || ! NILP (Fmemq (operation, operations)))) { - Lisp_Object handler, tem; + Lisp_Object tem; handler = XCDR (elt); tem = Fmemq (handler, inhibited_handlers); @@ -2393,7 +2400,7 @@ return; } -DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 4, +DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 5, "fCopy file: \nGCopy %s to file: \np\nP", doc: /* Copy FILE to NEWNAME. Both args must be strings. If NEWNAME names a directory, copy FILE there. @@ -2402,11 +2409,20 @@ A number as third arg means request confirmation if NEWNAME already exists. This is what happens in interactive use with M-x. Always sets the file modes of the output file to match the input file. + Fourth arg KEEP-TIME non-nil means give the output file the same last-modified time as the old one. (This works on only some systems.) -A prefix arg makes KEEP-TIME non-nil. */) - (file, newname, ok_if_already_exists, keep_time) - Lisp_Object file, newname, ok_if_already_exists, keep_time; + +A prefix arg makes KEEP-TIME non-nil. + +The optional fifth arg MUSTBENEW, if non-nil, insists on a check +for an existing file with the same name. If MUSTBENEW is `excl', +that means to get an error if the file already exists; never overwrite. +If MUSTBENEW is neither nil nor `excl', that means ask for +confirmation before overwriting, but do go ahead and overwrite the file +if the user confirms. */) + (file, newname, ok_if_already_exists, keep_time, mustbenew) + Lisp_Object file, newname, ok_if_already_exists, keep_time, mustbenew; { int ifd, ofd, n; char buf[16 * 1024]; @@ -2422,6 +2438,9 @@ CHECK_STRING (file); CHECK_STRING (newname); + if (!NILP (mustbenew) && !EQ (mustbenew, Qexcl)) + barf_or_query_if_file_exists (newname, "overwrite", 1, 0, 1); + if (!NILP (Ffile_directory_p (newname))) newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); else @@ -2522,9 +2541,15 @@ #else #ifdef MSDOS /* System's default file type was set to binary by _fmode in emacs.c. */ - ofd = creat (SDATA (encoded_newname), S_IREAD | S_IWRITE); -#else /* not MSDOS */ - ofd = creat (SDATA (encoded_newname), 0666); + ofd = emacs_open (SDATA (encoded_newname), + O_WRONLY | O_TRUNC | O_CREAT + | (EQ (mustbenew, Qexcl) ? O_EXCL : 0), + S_IREAD | S_IWRITE); +#else /* not MSDOS */ + ofd = emacs_open (SDATA (encoded_newname), + O_WRONLY | O_TRUNC | O_CREAT + | (EQ (mustbenew, Qexcl) ? O_EXCL : 0), + 0666); #endif /* not MSDOS */ #endif /* VMS */ if (ofd < 0) @@ -2754,7 +2779,8 @@ Fcopy_file (file, newname, /* We have already prompted if it was an integer, so don't have copy-file prompt again. */ - NILP (ok_if_already_exists) ? Qnil : Qt, Qt); + NILP (ok_if_already_exists) ? Qnil : Qt, + Qt, Qnil); Fdelete_file (file); } else @@ -6334,6 +6360,7 @@ void syms_of_fileio () { + Qoperations = intern ("operations"); Qexpand_file_name = intern ("expand-file-name"); Qsubstitute_in_file_name = intern ("substitute-in-file-name"); Qdirectory_file_name = intern ("directory-file-name"); @@ -6368,6 +6395,7 @@ Qset_visited_file_modtime = intern ("set-visited-file-modtime"); Qauto_save_coding = intern ("auto-save-coding"); + staticpro (&Qoperations); staticpro (&Qexpand_file_name); staticpro (&Qsubstitute_in_file_name); staticpro (&Qdirectory_file_name);
--- a/src/fns.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/fns.c Thu May 05 00:04:55 2005 +0000 @@ -184,8 +184,7 @@ return val; } -/* This does not check for quits. That is safe - since it must terminate. */ +/* This does not check for quits. That is safe since it must terminate. */ DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0, doc: /* Return the length of a list, but avoid error or infinite loop. @@ -1901,6 +1900,7 @@ } +#if 0 /* Unsafe version. */ DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, doc: /* Extract a value from a property list. PLIST is a property list, which is a list of the form @@ -1931,14 +1931,16 @@ return Qnil; } - -DEFUN ("safe-plist-get", Fsafe_plist_get, Ssafe_plist_get, 2, 2, 0, +#endif + +/* This does not check for quits. That is safe since it must terminate. */ + +DEFUN ("plist-get", Fplist_get, Splist_get, 2, 2, 0, doc: /* Extract a value from a property list. PLIST is a property list, which is a list of the form \(PROP1 VALUE1 PROP2 VALUE2...). This function returns the value -corresponding to the given PROP, or nil if PROP is not -one of the properties on the list. -This function never signals an error. */) +corresponding to the given PROP, or nil if PROP is not one of the +properties on the list. This function never signals an error. */) (plist, prop) Lisp_Object plist; Lisp_Object prop; @@ -1971,18 +1973,6 @@ return Fplist_get (XSYMBOL (symbol)->plist, propname); } -DEFUN ("safe-get", Fsafe_get, Ssafe_get, 2, 2, 0, - doc: /* Return the value of SYMBOL's PROPNAME property. -This is the last value stored with `(put SYMBOL PROPNAME VALUE)'. -This function never signals an error. */) - (symbol, propname) - Lisp_Object symbol, propname; -{ - if (!SYMBOLP (symbol)) - return Qnil; - return Fsafe_plist_get (XSYMBOL (symbol)->plist, propname); -} - DEFUN ("plist-put", Fplist_put, Splist_put, 3, 3, 0, doc: /* Change value in PLIST of PROP to VAL. PLIST is a property list, which is a list of the form @@ -5263,9 +5253,7 @@ defsubr (&Sreverse); defsubr (&Ssort); defsubr (&Splist_get); - defsubr (&Ssafe_plist_get); defsubr (&Sget); - defsubr (&Ssafe_get); defsubr (&Splist_put); defsubr (&Sput); defsubr (&Slax_plist_get);
--- a/src/frame.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/frame.c Thu May 05 00:04:55 2005 +0000 @@ -1260,6 +1260,10 @@ if (FRAME_X_P (f)) x_clear_frame_selections (f); #endif +#ifdef MAC_OS + if (FRAME_MAC_P (f)) + x_clear_frame_selections (f); +#endif /* Free glyphs. This function must be called before the window tree of the
--- a/src/keyboard.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/keyboard.c Thu May 05 00:04:55 2005 +0000 @@ -1173,21 +1173,21 @@ cancel_hourglass (); #endif - if (!NILP (executing_macro)) - { - if (executing_macro_iterations == 1) + if (!NILP (executing_kbd_macro)) + { + if (executing_kbd_macro_iterations == 1) sprintf (macroerror, "After 1 kbd macro iteration: "); else sprintf (macroerror, "After %d kbd macro iterations: ", - executing_macro_iterations); + executing_kbd_macro_iterations); } else *macroerror = 0; Vstandard_output = Qt; Vstandard_input = Qt; - Vexecuting_macro = Qnil; - executing_macro = Qnil; + Vexecuting_kbd_macro = Qnil; + executing_kbd_macro = Qnil; current_kboard->Vprefix_arg = Qnil; current_kboard->Vlast_prefix_arg = Qnil; cancel_echoing (); @@ -1288,7 +1288,7 @@ { Lisp_Object val; val = internal_catch (Qexit, command_loop_2, Qnil); - executing_macro = Qnil; + executing_kbd_macro = Qnil; return val; } else @@ -1300,7 +1300,7 @@ other reason. */ any_kboard_state (); internal_catch (Qtop_level, command_loop_2, Qnil); - executing_macro = Qnil; + executing_kbd_macro = Qnil; /* End of file in -batch run causes exit here. */ if (noninteractive) @@ -1453,7 +1453,7 @@ if (NILP (Vunread_command_events) && NILP (Vunread_input_method_events) && NILP (Vunread_post_input_method_events) - && NILP (Vexecuting_macro) + && NILP (Vexecuting_kbd_macro) && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) safe_run_hooks (Qpost_command_idle_hook); } @@ -1582,11 +1582,11 @@ } cmd = read_key_sequence_cmd; - if (!NILP (Vexecuting_macro)) + if (!NILP (Vexecuting_kbd_macro)) { if (!NILP (Vquit_flag)) { - Vexecuting_macro = Qt; + Vexecuting_kbd_macro = Qt; QUIT; /* Make some noise. */ /* Will return since macro now empty. */ } @@ -1685,7 +1685,7 @@ && EQ (current_buffer->selective_display, Qnil) && !detect_input_pending () && NILP (XWINDOW (selected_window)->column_number_displayed) - && NILP (Vexecuting_macro)) + && NILP (Vexecuting_kbd_macro)) direct_output_forward_char (1); goto directly_done; } @@ -1720,7 +1720,7 @@ && EQ (current_buffer->selective_display, Qnil) && !detect_input_pending () && NILP (XWINDOW (selected_window)->column_number_displayed) - && NILP (Vexecuting_macro)) + && NILP (Vexecuting_kbd_macro)) direct_output_forward_char (-1); goto directly_done; } @@ -1733,7 +1733,7 @@ = translate_char (Vtranslation_table_for_input, XFASTINT (last_command_char)); int value; - if (NILP (Vexecuting_macro) + if (NILP (Vexecuting_kbd_macro) && !EQ (minibuf_window, selected_window)) { if (!nonundocount || nonundocount >= 20) @@ -1755,7 +1755,7 @@ || !EQ (current_buffer->selective_display, Qnil) || detect_input_pending () || !NILP (XWINDOW (selected_window)->column_number_displayed) - || !NILP (Vexecuting_macro)); + || !NILP (Vexecuting_kbd_macro)); value = internal_self_insert (c, 0); @@ -1783,7 +1783,7 @@ int scount = SPECPDL_INDEX (); if (display_hourglass_p - && NILP (Vexecuting_macro)) + && NILP (Vexecuting_kbd_macro)) { record_unwind_protect (cancel_hourglass_unwind, Qnil); start_hourglass (); @@ -1801,7 +1801,7 @@ hourglass cursor anyway. But don't cancel the hourglass within a macro just because a command in the macro finishes. */ - if (NILP (Vexecuting_macro)) + if (NILP (Vexecuting_kbd_macro)) unbind_to (scount, Qnil); #endif } @@ -1827,7 +1827,7 @@ if (NILP (Vunread_command_events) && NILP (Vunread_input_method_events) && NILP (Vunread_post_input_method_events) - && NILP (Vexecuting_macro) + && NILP (Vexecuting_kbd_macro) && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) safe_run_hooks (Qpost_command_idle_hook); } @@ -2499,7 +2499,7 @@ this_command_key_count_reset = 0; - if (!NILP (Vexecuting_macro)) + if (!NILP (Vexecuting_kbd_macro)) { /* We set this to Qmacro; since that's not a frame, nobody will try to switch frames on us, and the selected window will @@ -2516,19 +2516,19 @@ /* Exit the macro if we are at the end. Also, some things replace the macro with t to force an early exit. */ - if (EQ (Vexecuting_macro, Qt) - || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) + if (EQ (Vexecuting_kbd_macro, Qt) + || executing_kbd_macro_index >= XFASTINT (Flength (Vexecuting_kbd_macro))) { XSETINT (c, -1); goto exit; } - c = Faref (Vexecuting_macro, make_number (executing_macro_index)); - if (STRINGP (Vexecuting_macro) + c = Faref (Vexecuting_kbd_macro, make_number (executing_kbd_macro_index)); + if (STRINGP (Vexecuting_kbd_macro) && (XINT (c) & 0x80) && (XUINT (c) <= 0xff)) XSETFASTINT (c, CHAR_META | (XINT (c) & ~0x80)); - executing_macro_index++; + executing_kbd_macro_index++; goto from_macro; } @@ -9815,7 +9815,7 @@ /* If enabled, show which key runs this command. */ if (!NILP (Vsuggest_key_bindings) - && NILP (Vexecuting_macro) + && NILP (Vexecuting_kbd_macro) && SYMBOLP (function)) bindings = Fwhere_is_internal (function, Voverriding_local_map, Qt, Qnil, Qnil);
--- a/src/lisp.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/lisp.h Thu May 05 00:04:55 2005 +0000 @@ -2349,7 +2349,6 @@ EXFUN (Freverse, 1); EXFUN (Fnreverse, 1); EXFUN (Fget, 2); -EXFUN (Fsafe_get, 2); EXFUN (Fput, 3); EXFUN (Fequal, 2); EXFUN (Ffillarray, 2); @@ -2372,7 +2371,6 @@ extern Lisp_Object string_make_unibyte P_ ((Lisp_Object)); EXFUN (Fcopy_alist, 1); EXFUN (Fplist_get, 2); -EXFUN (Fsafe_plist_get, 2); EXFUN (Fplist_put, 3); EXFUN (Fplist_member, 2); EXFUN (Frassoc, 2);
--- a/src/m/macppc.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/m/macppc.h Thu May 05 00:04:55 2005 +0000 @@ -86,11 +86,16 @@ #ifdef LINUX #define LINKER $(CC) -nostdlib -#define LD_SWITCH_MACHINE -Xlinker -m -Xlinker elf32ppc /* s/gnu-linux.h defines this to `-z nocombreloc' which does not work here because prefix-args is not used. */ #undef LD_SWITCH_SYSTEM_TEMACS #define LD_SWITCH_MACHINE_TEMACS -Xlinker -znocombreloc +#ifdef _ARCH_PPC64 +#undef START_FILES +#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o +#undef LIB_STANDARD +#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o +#endif #endif #if 0 /* This breaks things on PPC GNU/Linux ecept for Yellowdog, @@ -105,5 +110,11 @@ #endif #endif /* 0 */ +#ifdef _ARCH_PPC64 +#ifndef _LP64 +#define _LP64 +#endif +#endif + /* arch-tag: 41913e4e-e7d1-4023-aadb-210cc31712ed (do not change this comment) */
--- a/src/mac.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/mac.c Thu May 05 00:04:55 2005 +0000 @@ -24,19 +24,20 @@ #include <stdio.h> #include <errno.h> -#include <time.h> #include "lisp.h" #include "process.h" -#include "sysselect.h" +#undef init_process #include "systime.h" +#include "sysselect.h" #include "blockinput.h" + +#include "macterm.h" + +#if TARGET_API_MAC_CARBON #include "charset.h" #include "coding.h" - -#include "macterm.h" - -#ifndef HAVE_CARBON +#else /* not TARGET_API_MAC_CARBON */ #include <Files.h> #include <MacTypes.h> #include <TextUtils.h> @@ -52,7 +53,7 @@ #include <Processes.h> #include <EPPC.h> #include <MacLocales.h> -#endif /* not HAVE_CARBON */ +#endif /* not TARGET_API_MAC_CARBON */ #include <utime.h> #include <dirent.h> @@ -68,8 +69,6 @@ #include <unistd.h> #endif -Lisp_Object QCLIPBOARD; - /* The system script code. */ static int mac_system_script_code; @@ -331,7 +330,7 @@ { CFIndex len = CFDataGetLength (data); Lisp_Object result = make_uninit_string (len); - + CFDataGetBytes (data, CFRangeMake (0, len), SDATA (result)); return result; @@ -894,7 +893,7 @@ if (i < 0) { max_nid++; - XSETINT (node_id, max_nid); + XSETINT (node_id, max_nid); hash_put (h, key, node_id, hash_code); } else @@ -3515,169 +3514,9 @@ } -/* set interprogram-paste-function to mac-paste-function in mac-win.el - to enable Emacs to obtain the contents of the Mac clipboard. */ -DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0, - doc: /* Return the contents of the Mac clipboard as a string. */) - () -{ #if TARGET_API_MAC_CARBON - OSStatus err; - ScrapRef scrap; - ScrapFlavorFlags sff; - Size s; - int i; - char *data; - - BLOCK_INPUT; - err = GetCurrentScrap (&scrap); - if (err == noErr) - err = GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff); - if (err == noErr) - err = GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s); - if (err == noErr && (data = (char*) alloca (s))) - err = GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data); - UNBLOCK_INPUT; - if (err != noErr || s == 0) - return Qnil; - - /* Emacs expects clipboard contents have Unix-style eol's */ - for (i = 0; i < s; i++) - if (data[i] == '\r') - data[i] = '\n'; - - return make_string (data, s); -#else /* not TARGET_API_MAC_CARBON */ - Lisp_Object value; - Handle my_handle; - long scrap_offset, rc, i; - - my_handle = NewHandle (0); /* allocate 0-length data area */ - - rc = GetScrap (my_handle, 'TEXT', &scrap_offset); - if (rc < 0) - return Qnil; - - HLock (my_handle); - - /* Emacs expects clipboard contents have Unix-style eol's */ - for (i = 0; i < rc; i++) - if ((*my_handle)[i] == '\r') - (*my_handle)[i] = '\n'; - - value = make_string (*my_handle, rc); - - HUnlock (my_handle); - - DisposeHandle (my_handle); - - return value; -#endif /* not TARGET_API_MAC_CARBON */ -} - - -/* set interprogram-cut-function to mac-cut-function in mac-win.el - to enable Emacs to write the top of the kill-ring to the Mac clipboard. */ -DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0, - doc: /* Put the value of the string parameter to the Mac clipboard. */) - (value, push) - Lisp_Object value, push; -{ - char *buf; - int len, i; - - /* fixme: ignore the push flag for now */ - - CHECK_STRING (value); - - len = SCHARS (value); - buf = (char *) alloca (len+1); - bcopy (SDATA (value), buf, len); - buf[len] = '\0'; - - /* convert to Mac-style eol's before sending to clipboard */ - for (i = 0; i < len; i++) - if (buf[i] == '\n') - buf[i] = '\r'; - -#if TARGET_API_MAC_CARBON - { - ScrapRef scrap; - - BLOCK_INPUT; - ClearCurrentScrap (); - if (GetCurrentScrap (&scrap) != noErr) - { - UNBLOCK_INPUT; - error ("cannot get current scrap"); - } - - if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len, - buf) != noErr) - { - UNBLOCK_INPUT; - error ("cannot put to scrap"); - } - UNBLOCK_INPUT; - } -#else /* not TARGET_API_MAC_CARBON */ - ZeroScrap (); - PutScrap (len, 'TEXT', buf); -#endif /* not TARGET_API_MAC_CARBON */ - - return Qnil; -} - - -DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p, - 0, 1, 0, - doc: /* Whether there is an owner for the given X Selection. -The arg should be the name of the selection in question, typically one of -the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. -\(Those are literal upper-case symbol names, since that's what X expects.) -For convenience, the symbol nil is the same as `PRIMARY', -and t is the same as `SECONDARY'. */) - (selection) - Lisp_Object selection; -{ - CHECK_SYMBOL (selection); - - /* Return nil for PRIMARY and SECONDARY selections; for CLIPBOARD, check - if the clipboard currently has valid text format contents. */ - - if (EQ (selection, QCLIPBOARD)) - { - Lisp_Object val = Qnil; - -#if TARGET_API_MAC_CARBON - ScrapRef scrap; - ScrapFlavorFlags sff; - - BLOCK_INPUT; - if (GetCurrentScrap (&scrap) == noErr) - if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr) - val = Qt; - UNBLOCK_INPUT; -#else /* not TARGET_API_MAC_CARBON */ - Handle my_handle; - long rc, scrap_offset; - - my_handle = NewHandle (0); - - rc = GetScrap (my_handle, 'TEXT', &scrap_offset); - if (rc >= 0) - val = Qt; - - DisposeHandle (my_handle); -#endif /* not TARGET_API_MAC_CARBON */ - - return val; - } - return Qnil; -} - -#if TARGET_API_MAC_CARBON -static Lisp_Object Qxml; +static Lisp_Object Qxml, Qmime_charset; +static Lisp_Object QNFD, QNFKD, QNFC, QNFKC, QHFS_plus_D, QHFS_plus_C; DEFUN ("mac-get-preference", Fmac_get_preference, Smac_get_preference, 1, 4, 0, doc: /* Return the application preference value for KEY. @@ -3792,6 +3631,218 @@ return result; } + + +static CFStringEncoding +get_cfstring_encoding_from_lisp (obj) + Lisp_Object obj; +{ + CFStringRef iana_name; + CFStringEncoding encoding = kCFStringEncodingInvalidId; + + if (INTEGERP (obj)) + return XINT (obj); + + if (SYMBOLP (obj) && !NILP (obj) && !NILP (Fcoding_system_p (obj))) + { + Lisp_Object coding_spec, plist; + + coding_spec = Fget (obj, Qcoding_system); + plist = XVECTOR (coding_spec)->contents[3]; + obj = Fplist_get (XVECTOR (coding_spec)->contents[3], Qmime_charset); + } + + if (SYMBOLP (obj)) + obj = SYMBOL_NAME (obj); + + if (STRINGP (obj)) + { + iana_name = cfstring_create_with_string (obj); + if (iana_name) + { + encoding = CFStringConvertIANACharSetNameToEncoding (iana_name); + CFRelease (iana_name); + } + } + + return encoding; +} + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 +static CFStringRef +cfstring_create_normalized (str, symbol) + CFStringRef str; + Lisp_Object symbol; +{ + int form = -1; + TextEncodingVariant variant; + float initial_mag = 0.0; + CFStringRef result = NULL; + + if (EQ (symbol, QNFD)) + form = kCFStringNormalizationFormD; + else if (EQ (symbol, QNFKD)) + form = kCFStringNormalizationFormKD; + else if (EQ (symbol, QNFC)) + form = kCFStringNormalizationFormC; + else if (EQ (symbol, QNFKC)) + form = kCFStringNormalizationFormKC; + else if (EQ (symbol, QHFS_plus_D)) + { + variant = kUnicodeHFSPlusDecompVariant; + initial_mag = 1.5; + } + else if (EQ (symbol, QHFS_plus_C)) + { + variant = kUnicodeHFSPlusCompVariant; + initial_mag = 1.0; + } + + if (form >= 0) + { + CFMutableStringRef mut_str = CFStringCreateMutableCopy (NULL, 0, str); + + if (mut_str) + { + CFStringNormalize (mut_str, form); + result = mut_str; + } + } + else if (initial_mag > 0.0) + { + UnicodeToTextInfo uni = NULL; + UnicodeMapping map; + CFIndex length; + UniChar *in_text, *buffer = NULL, *out_buf = NULL; + OSErr err = noErr; + ByteCount out_read, out_size, out_len; + + map.unicodeEncoding = CreateTextEncoding (kTextEncodingUnicodeDefault, + kUnicodeNoSubset, + kTextEncodingDefaultFormat); + map.otherEncoding = CreateTextEncoding (kTextEncodingUnicodeDefault, + variant, + kTextEncodingDefaultFormat); + map.mappingVersion = kUnicodeUseLatestMapping; + + length = CFStringGetLength (str); + out_size = (int)((float)length * initial_mag) * sizeof (UniChar); + if (out_size < 32) + out_size = 32; + + in_text = (UniChar *)CFStringGetCharactersPtr (str); + if (in_text == NULL) + { + buffer = xmalloc (sizeof (UniChar) * length); + if (buffer) + { + CFStringGetCharacters (str, CFRangeMake (0, length), buffer); + in_text = buffer; + } + } + + if (in_text) + err = CreateUnicodeToTextInfo(&map, &uni); + while (err == noErr) + { + out_buf = xmalloc (out_size); + if (out_buf == NULL) + err = mFulErr; + else + err = ConvertFromUnicodeToText (uni, length * sizeof (UniChar), + in_text, + kUnicodeDefaultDirectionMask, + 0, NULL, NULL, NULL, + out_size, &out_read, &out_len, + out_buf); + if (err == noErr && out_read < length * sizeof (UniChar)) + { + xfree (out_buf); + out_size += length; + } + else + break; + } + if (err == noErr) + result = CFStringCreateWithCharacters (NULL, out_buf, + out_len / sizeof (UniChar)); + if (uni) + DisposeUnicodeToTextInfo (&uni); + if (out_buf) + xfree (out_buf); + if (buffer) + xfree (buffer); + } + else + { + result = str; + CFRetain (result); + } + + return result; +} +#endif + +DEFUN ("mac-code-convert-string", Fmac_code_convert_string, Smac_code_convert_string, 3, 4, 0, + doc: /* Convert STRING from SOURCE encoding to TARGET encoding. +The conversion is performed using the converter provided by the system. +Each encoding is specified by either a coding system symbol, a mime +charset string, or an integer as a CFStringEncoding value. +On Mac OS X 10.2 and later, you can do Unicode Normalization by +specifying the optional argument NORMALIZATION-FORM with a symbol NFD, +NFKD, NFC, NFKC, HFS+D, or HFS+C. +On successful conversion, returns the result string, else returns +nil. */) + (string, source, target, normalization_form) + Lisp_Object string, source, target, normalization_form; +{ + Lisp_Object result = Qnil; + CFStringEncoding src_encoding, tgt_encoding; + CFStringRef str = NULL; + CFDataRef data = NULL; + + CHECK_STRING (string); + if (!INTEGERP (source) && !STRINGP (source)) + CHECK_SYMBOL (source); + if (!INTEGERP (target) && !STRINGP (target)) + CHECK_SYMBOL (target); + CHECK_SYMBOL (normalization_form); + + BLOCK_INPUT; + + src_encoding = get_cfstring_encoding_from_lisp (source); + tgt_encoding = get_cfstring_encoding_from_lisp (target); + + string = string_make_unibyte (string); + if (src_encoding != kCFStringEncodingInvalidId + && tgt_encoding != kCFStringEncodingInvalidId) + str = CFStringCreateWithBytes (NULL, SDATA (string), SBYTES (string), + src_encoding, true); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 + if (str) + { + CFStringRef saved_str = str; + + str = cfstring_create_normalized (saved_str, normalization_form); + CFRelease (saved_str); + } +#endif + if (str) + { + data = CFStringCreateExternalRepresentation (NULL, str, + tgt_encoding, '\0'); + CFRelease (str); + } + if (data) + { + result = cfdata_to_lisp (data); + CFRelease (data); + } + + UNBLOCK_INPUT; + + return result; +} #endif /* TARGET_API_MAC_CARBON */ @@ -4232,9 +4283,6 @@ void syms_of_mac () { - QCLIPBOARD = intern ("CLIPBOARD"); - staticpro (&QCLIPBOARD); - #if TARGET_API_MAC_CARBON Qstring = intern ("string"); staticpro (&Qstring); Qnumber = intern ("number"); staticpro (&Qnumber); @@ -4246,13 +4294,21 @@ Qxml = intern ("xml"); staticpro (&Qxml); + + Qmime_charset = intern ("mime-charset"); + staticpro (&Qmime_charset); + + QNFD = intern ("NFD"); staticpro (&QNFD); + QNFKD = intern ("NFKD"); staticpro (&QNFKD); + QNFC = intern ("NFC"); staticpro (&QNFC); + QNFKC = intern ("NFKC"); staticpro (&QNFKC); + QHFS_plus_D = intern ("HFS+D"); staticpro (&QHFS_plus_D); + QHFS_plus_C = intern ("HFS+C"); staticpro (&QHFS_plus_C); #endif - defsubr (&Smac_paste_function); - defsubr (&Smac_cut_function); - defsubr (&Sx_selection_exists_p); #if TARGET_API_MAC_CARBON defsubr (&Smac_get_preference); + defsubr (&Smac_code_convert_string); #endif defsubr (&Smac_clear_font_name_table);
--- a/src/macfns.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/macfns.c Thu May 05 00:04:55 2005 +0000 @@ -2969,8 +2969,13 @@ { int mac_major_version; SInt32 response; - - if (Gestalt (gestaltSystemVersion, &response) != noErr) + OSErr err; + + BLOCK_INPUT; + err = Gestalt (gestaltSystemVersion, &response); + UNBLOCK_INPUT; + + if (err != noErr) error ("Cannot get Mac OS version"); mac_major_version = (response >> 8) & 0xff;
--- a/src/macgui.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/macgui.h Thu May 05 00:04:55 2005 +0000 @@ -32,7 +32,9 @@ #ifdef HAVE_CARBON #undef Z #ifdef MAC_OSX +#if ! HAVE_MKTIME || BROKEN_MKTIME #undef mktime +#endif #undef DEBUG #undef free #undef malloc @@ -43,8 +45,10 @@ #undef min #undef init_process #include <Carbon/Carbon.h> +#if ! HAVE_MKTIME || BROKEN_MKTIME #undef mktime #define mktime emacs_mktime +#endif #undef free #define free unexec_free #undef malloc
--- a/src/macros.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/macros.c Thu May 05 00:04:55 2005 +0000 @@ -31,25 +31,25 @@ /* Kbd macro currently being executed (a string or vector). */ -Lisp_Object Vexecuting_macro; +Lisp_Object Vexecuting_kbd_macro; /* Index of next character to fetch from that macro. */ -EMACS_INT executing_macro_index; +EMACS_INT executing_kbd_macro_index; /* Number of successful iterations so far for innermost keyboard macro. This is not bound at each level, so after an error, it describes the innermost interrupted macro. */ -int executing_macro_iterations; +int executing_kbd_macro_iterations; /* This is the macro that was executing. This is not bound at each level, so after an error, it describes the innermost interrupted macro. We use it only as a kind of flag, so no need to protect it. */ -Lisp_Object executing_macro; +Lisp_Object executing_kbd_macro; extern Lisp_Object real_this_command; @@ -114,7 +114,7 @@ } /* Must convert meta modifier when copying string to vector. */ - cvt = STRINGP (current_kboard->Vlast_kbd_macro); + cvt = STRINGP (current_kboard->Vlast_kbd_macro); for (i = 0; i < len; i++) { Lisp_Object c; @@ -285,17 +285,17 @@ return Qnil; } -/* Restore Vexecuting_macro and executing_macro_index - called when - the unwind-protect in Fexecute_kbd_macro gets invoked. */ +/* Restore Vexecuting_kbd_macro and executing_kbd_macro_index. + Called when the unwind-protect in Fexecute_kbd_macro gets invoked. */ static Lisp_Object pop_kbd_macro (info) Lisp_Object info; { Lisp_Object tem; - Vexecuting_macro = XCAR (info); + Vexecuting_kbd_macro = XCAR (info); tem = XCDR (info); - executing_macro_index = XINT (XCAR (tem)); + executing_kbd_macro_index = XINT (XCAR (tem)); real_this_command = XCDR (tem); Frun_hooks (1, &Qkbd_macro_termination_hook); return Qnil; @@ -318,7 +318,7 @@ struct gcpro gcpro1, gcpro2; int success_count = 0; - executing_macro_iterations = 0; + executing_kbd_macro_iterations = 0; if (!NILP (count)) { @@ -330,17 +330,17 @@ if (!STRINGP (final) && !VECTORP (final)) error ("Keyboard macros must be strings or vectors"); - tem = Fcons (Vexecuting_macro, - Fcons (make_number (executing_macro_index), + tem = Fcons (Vexecuting_kbd_macro, + Fcons (make_number (executing_kbd_macro_index), real_this_command)); record_unwind_protect (pop_kbd_macro, tem); GCPRO2 (final, loopfunc); do { - Vexecuting_macro = final; - executing_macro = final; - executing_macro_index = 0; + Vexecuting_kbd_macro = final; + executing_kbd_macro = final; + executing_kbd_macro_index = 0; current_kboard->Vprefix_arg = Qnil; @@ -354,16 +354,16 @@ command_loop_1 (); - executing_macro_iterations = ++success_count; + executing_kbd_macro_iterations = ++success_count; QUIT; } while (--repeat - && (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro))); + && (STRINGP (Vexecuting_kbd_macro) || VECTORP (Vexecuting_kbd_macro))); - executing_macro = Qnil; + executing_kbd_macro = Qnil; - real_this_command = Vexecuting_macro; + real_this_command = Vexecuting_kbd_macro; UNGCPRO; return unbind_to (pdlcount, Qnil); @@ -372,8 +372,8 @@ void init_macros () { - Vexecuting_macro = Qnil; - executing_macro = Qnil; + Vexecuting_kbd_macro = Qnil; + executing_kbd_macro = Qnil; } void @@ -396,15 +396,13 @@ The value is the symbol `append' while appending to the definition of an existing macro. */); - DEFVAR_LISP ("executing-macro", &Vexecuting_macro, - doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */); + DEFVAR_LISP ("executing-kbd-macro", &Vexecuting_kbd_macro, + doc: /* Currently executing keyboard macro (string or vector). +This is nil when not executing a keyboard macro. */); - DEFVAR_INT ("executing-macro-index", &executing_macro_index, + DEFVAR_INT ("executing-kbd-macro-index", &executing_kbd_macro_index, doc: /* Index in currently executing keyboard macro; undefined if none executing. */); - DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro, - doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */); - DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro, doc: /* Last kbd macro defined, as a string or vector; nil if none defined. */); }
--- a/src/macros.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/macros.h Thu May 05 00:04:55 2005 +0000 @@ -21,24 +21,24 @@ /* Kbd macro currently being executed (a string or vector). */ -extern Lisp_Object Vexecuting_macro; +extern Lisp_Object Vexecuting_kbd_macro; /* Index of next character to fetch from that macro. */ -extern EMACS_INT executing_macro_index; +extern EMACS_INT executing_kbd_macro_index; /* Number of successful iterations so far for innermost keyboard macro. This is not bound at each level, so after an error, it describes the innermost interrupted macro. */ -extern int executing_macro_iterations; +extern int executing_kbd_macro_iterations; /* This is the macro that was executing. This is not bound at each level, so after an error, it describes the innermost interrupted macro. */ -extern Lisp_Object executing_macro; +extern Lisp_Object executing_kbd_macro; /* Finish defining the current keyboard macro. */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/macselect.c Thu May 05 00:04:55 2005 +0000 @@ -0,0 +1,1121 @@ +/* Selection processing for Emacs on Mac OS. + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <config.h> + +#include "lisp.h" +#include "macterm.h" +#include "blockinput.h" + +#if !TARGET_API_MAC_CARBON +#include <Endian.h> +typedef int ScrapRef; +typedef ResType ScrapFlavorType; +#endif /* !TARGET_API_MAC_CARBON */ + +static OSErr get_scrap_from_symbol P_ ((Lisp_Object, int, ScrapRef *)); +static ScrapFlavorType get_flavor_type_from_symbol P_ ((Lisp_Object)); +static int valid_scrap_target_type_p P_ ((Lisp_Object)); +static OSErr clear_scrap P_ ((ScrapRef *)); +static OSErr put_scrap_string P_ ((ScrapRef, Lisp_Object, Lisp_Object)); +static OSErr put_scrap_private_timestamp P_ ((ScrapRef, unsigned long)); +static ScrapFlavorType scrap_has_target_type P_ ((ScrapRef, Lisp_Object)); +static Lisp_Object get_scrap_string P_ ((ScrapRef, Lisp_Object)); +static OSErr get_scrap_private_timestamp P_ ((ScrapRef, unsigned long *)); +static Lisp_Object get_scrap_target_type_list P_ ((ScrapRef)); +static void x_own_selection P_ ((Lisp_Object, Lisp_Object)); +static Lisp_Object x_get_local_selection P_ ((Lisp_Object, Lisp_Object, int)); +static Lisp_Object x_get_foreign_selection P_ ((Lisp_Object, + Lisp_Object, + Lisp_Object)); +EXFUN (Fx_selection_owner_p, 1); +#ifdef MAC_OSX +static OSStatus mac_handle_service_event P_ ((EventHandlerCallRef, + EventRef, void *)); +void init_service_handler P_ ((void)); +#endif + +Lisp_Object QPRIMARY, QSECONDARY, QTIMESTAMP, QTARGETS; + +static Lisp_Object Vx_lost_selection_functions; +/* Coding system for communicating with other programs via scrap. */ +static Lisp_Object Vselection_coding_system; + +/* Coding system for the next communicating with other programs. */ +static Lisp_Object Vnext_selection_coding_system; + +static Lisp_Object Qforeign_selection; + +/* The timestamp of the last input event Emacs received from the + window server. */ +/* Defined in keyboard.c. */ +extern unsigned long last_event_timestamp; + +/* This is an association list whose elements are of the form + ( SELECTION-NAME SELECTION-VALUE SELECTION-TIMESTAMP FRAME) + SELECTION-NAME is a lisp symbol. + SELECTION-VALUE is the value that emacs owns for that selection. + It may be any kind of Lisp object. + SELECTION-TIMESTAMP is the time at which emacs began owning this selection, + as a cons of two 16-bit numbers (making a 32 bit time.) + FRAME is the frame for which we made the selection. + If there is an entry in this alist, and the data for the flavor + type SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP in the corresponding scrap + (if exists) coincides with SELECTION-TIMESTAMP, then it can be + assumed that Emacs owns that selection. + The only (eq) parts of this list that are visible from Lisp are the + selection-values. */ +static Lisp_Object Vselection_alist; + +#define SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP 'Etsp' + +/* This is an alist whose CARs are selection-types and whose CDRs are + the names of Lisp functions to call to convert the given Emacs + selection value to a string representing the given selection type. + This is for Lisp-level extension of the emacs selection + handling. */ +static Lisp_Object Vselection_converter_alist; + +/* A selection name (represented as a Lisp symbol) can be associated + with a named scrap via `mac-scrap-name' property. Likewise for a + selection type with a scrap flavor type via `mac-ostype'. */ +static Lisp_Object Qmac_scrap_name, Qmac_ostype; + +/* Selection name for communication via Services menu. */ +static Lisp_Object Vmac_services_selection; + +/* Get a reference to the scrap corresponding to the symbol SYM. The + reference is set to *SCRAP, and it becomes NULL if there's no + corresponding scrap. Clear the scrap if CLEAR_P is non-zero. */ + +static OSErr +get_scrap_from_symbol (sym, clear_p, scrap) + Lisp_Object sym; + int clear_p; + ScrapRef *scrap; +{ + OSErr err = noErr; + Lisp_Object str = Fget (sym, Qmac_scrap_name); + + if (!STRINGP (str)) + *scrap = NULL; + else + { +#if TARGET_API_MAC_CARBON +#ifdef MAC_OSX + CFStringRef scrap_name = cfstring_create_with_string (str); + OptionBits options = (clear_p ? kScrapClearNamedScrap + : kScrapGetNamedScrap); + + err = GetScrapByName (scrap_name, options, scrap); + CFRelease (scrap_name); +#else /* !MAC_OSX */ + if (clear_p) + err = ClearCurrentScrap (); + if (err == noErr) + err = GetCurrentScrap (scrap); +#endif /* !MAC_OSX */ +#else /* !TARGET_API_MAC_CARBON */ + if (clear_p) + err = ZeroScrap (); + if (err == noErr) + *scrap = 1; +#endif /* !TARGET_API_MAC_CARBON */ + } + + return err; +} + +/* Get a scrap flavor type from the symbol SYM. Return 0 if no + corresponding flavor type. */ + +static ScrapFlavorType +get_flavor_type_from_symbol (sym) + Lisp_Object sym; +{ + ScrapFlavorType val; + Lisp_Object str = Fget (sym, Qmac_ostype); + + if (STRINGP (str) && SBYTES (str) == 4) + return EndianU32_BtoN (*((UInt32 *) SDATA (str))); + + return 0; +} + +/* Check if the symbol SYM has a corresponding scrap flavor type. */ + +static int +valid_scrap_target_type_p (sym) + Lisp_Object sym; +{ + return get_flavor_type_from_symbol (sym) != 0; +} + +/* Clear the scrap whose reference is *SCRAP. */ + +static INLINE OSErr +clear_scrap (scrap) + ScrapRef *scrap; +{ +#if TARGET_API_MAC_CARBON +#ifdef MAC_OSX + return ClearScrap (scrap); +#else + return ClearCurrentScrap (); +#endif +#else /* !TARGET_API_MAC_CARBON */ + return ZeroScrap (); +#endif /* !TARGET_API_MAC_CARBON */ +} + +/* Put Lisp String STR to the scrap SCRAP. The target type is + specified by TYPE. */ + +static OSErr +put_scrap_string (scrap, type, str) + ScrapRef scrap; + Lisp_Object type, str; +{ + ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); + + if (flavor_type == 0) + return noTypeErr; + +#if TARGET_API_MAC_CARBON + return PutScrapFlavor (scrap, flavor_type, kScrapFlavorMaskNone, + SBYTES (str), SDATA (str)); +#else /* !TARGET_API_MAC_CARBON */ + return PutScrap (SBYTES (str), flavor_type, SDATA (str)); +#endif /* !TARGET_API_MAC_CARBON */ +} + +/* Put TIMESTAMP to the scrap SCRAP. The timestamp is used for + checking if the scrap is owned by the process. */ + +static INLINE OSErr +put_scrap_private_timestamp (scrap, timestamp) + ScrapRef scrap; + unsigned long timestamp; +{ +#if TARGET_API_MAC_CARBON + return PutScrapFlavor (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, + kScrapFlavorMaskSenderOnly, + sizeof (timestamp), ×tamp); +#else /* !TARGET_API_MAC_CARBON */ + return PutScrap (sizeof (timestamp), SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, + ×tamp); +#endif /* !TARGET_API_MAC_CARBON */ +} + +/* Check if data for the target type TYPE is available in SCRAP. */ + +static ScrapFlavorType +scrap_has_target_type (scrap, type) + ScrapRef scrap; + Lisp_Object type; +{ + OSErr err; + ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); + + if (flavor_type) + { +#if TARGET_API_MAC_CARBON + ScrapFlavorFlags flags; + + err = GetScrapFlavorFlags (scrap, flavor_type, &flags); + if (err != noErr) + flavor_type = 0; +#else /* !TARGET_API_MAC_CARBON */ + SInt32 size, offset; + + size = GetScrap (NULL, flavor_type, &offset); + if (size < 0) + flavor_type = 0; +#endif /* !TARGET_API_MAC_CARBON */ + } + + return flavor_type; +} + +/* Get data for the target type TYPE from SCRAP and create a Lisp + string. Return nil if failed to get data. */ + +static Lisp_Object +get_scrap_string (scrap, type) + ScrapRef scrap; + Lisp_Object type; +{ + OSErr err; + Lisp_Object result = Qnil; + ScrapFlavorType flavor_type = get_flavor_type_from_symbol (type); +#if TARGET_API_MAC_CARBON + Size size; + + if (flavor_type) + { + err = GetScrapFlavorSize (scrap, flavor_type, &size); + if (err == noErr) + { + do + { + result = make_uninit_string (size); + err = GetScrapFlavorData (scrap, flavor_type, + &size, SDATA (result)); + if (err != noErr) + result = Qnil; + else if (size < SBYTES (result)) + result = make_unibyte_string (SDATA (result), size); + } + while (STRINGP (result) && size > SBYTES (result)); + } + } +#else + Handle handle; + SInt32 size, offset; + + if (flavor_type) + size = GetScrap (NULL, flavor_type, &offset); + if (size >= 0) + { + handle = NewHandle (size); + HLock (handle); + size = GetScrap (handle, flavor_type, &offset); + if (size >= 0) + result = make_unibyte_string (*handle, size); + DisposeHandle (handle); + } +#endif + + return result; +} + +/* Get timestamp from the scrap SCRAP and set to *TIMPSTAMP. */ + +static OSErr +get_scrap_private_timestamp (scrap, timestamp) + ScrapRef scrap; + unsigned long *timestamp; +{ + OSErr err = noErr; +#if TARGET_API_MAC_CARBON + ScrapFlavorFlags flags; + + err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags); + if (err == noErr) + if (!(flags & kScrapFlavorMaskSenderOnly)) + err = noTypeErr; + else + { + Size size = sizeof (*timestamp); + + err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, + &size, timestamp); + if (err == noErr && size != sizeof (*timestamp)) + err = noTypeErr; + } +#else /* !TARGET_API_MAC_CARBON */ + Handle handle; + SInt32 size, offset; + + size = GetScrap (NULL, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &offset); + if (size == sizeof (*timestamp)) + { + handle = NewHandle (size); + HLock (handle); + size = GetScrap (handle, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &offset); + if (size == sizeof (*timestamp)) + *timestamp = *((unsigned long *) *handle); + DisposeHandle (handle); + } + if (size != sizeof (*timestamp)) + err = noTypeErr; +#endif /* !TARGET_API_MAC_CARBON */ + + return err; +} + +/* Get the list of target types in SCRAP. The return value is a list + of target type symbols possibly followed by scrap flavor type + strings. */ + +static Lisp_Object +get_scrap_target_type_list (scrap) + ScrapRef scrap; +{ + Lisp_Object result = Qnil, rest, target_type; +#if TARGET_API_MAC_CARBON + OSErr err; + UInt32 count, i, type; + ScrapFlavorInfo *flavor_info = NULL; + Lisp_Object strings = Qnil; + + err = GetScrapFlavorCount (scrap, &count); + if (err == noErr) + flavor_info = xmalloc (sizeof (ScrapFlavorInfo) * count); + if (err == noErr && flavor_info) + { + err = GetScrapFlavorInfoList (scrap, &count, flavor_info); + if (err != noErr) + { + xfree (flavor_info); + flavor_info = NULL; + } + } +#endif + for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) + { + ScrapFlavorType flavor_type = 0; + + if (CONSP (XCAR (rest)) && SYMBOLP (target_type = XCAR (XCAR (rest))) + && (flavor_type = scrap_has_target_type (scrap, target_type))) + { + result = Fcons (target_type, result); +#if TARGET_API_MAC_CARBON + for (i = 0; i < count; i++) + if (flavor_info[i].flavorType == flavor_type) + { + flavor_info[i].flavorType = 0; + break; + } +#endif + } + } +#if TARGET_API_MAC_CARBON + if (flavor_info) + { + for (i = 0; i < count; i++) + if (flavor_info[i].flavorType) + { + type = EndianU32_NtoB (flavor_info[i].flavorType); + strings = Fcons (make_unibyte_string ((char *) &type, 4), strings); + } + result = nconc2 (result, strings); + xfree (flavor_info); + } +#endif + + return result; +} + +/* Do protocol to assert ourself as a selection owner. + Update the Vselection_alist so that we can reply to later requests for + our selection. */ + +static void +x_own_selection (selection_name, selection_value) + Lisp_Object selection_name, selection_value; +{ + OSErr err; + ScrapRef scrap; + struct gcpro gcpro1, gcpro2; + Lisp_Object rest, handler_fn, value, type; + int count; + + CHECK_SYMBOL (selection_name); + + GCPRO2 (selection_name, selection_value); + + BLOCK_INPUT; + + err = get_scrap_from_symbol (selection_name, 1, &scrap); + if (err == noErr && scrap) + { + /* Don't allow a quit within the converter. + When the user types C-g, he would be surprised + if by luck it came during a converter. */ + count = SPECPDL_INDEX (); + specbind (Qinhibit_quit, Qt); + + for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) + { + if (!(CONSP (XCAR (rest)) + && SYMBOLP (type = XCAR (XCAR (rest))) + && valid_scrap_target_type_p (type) + && SYMBOLP (handler_fn = XCDR (XCAR (rest))))) + continue; + + if (!NILP (handler_fn)) + value = call3 (handler_fn, selection_name, + type, selection_value); + + if (CONSP (value) + && EQ (XCAR (value), type) + && STRINGP (XCDR (value))) + err = put_scrap_string (scrap, type, XCDR (value)); + } + + unbind_to (count, Qnil); + + if (err == noErr) + err = put_scrap_private_timestamp (scrap, last_event_timestamp); + } + + UNBLOCK_INPUT; + + UNGCPRO; + + if (scrap && err != noErr) + error ("Can't set selection"); + + /* Now update the local cache */ + { + Lisp_Object selection_time; + Lisp_Object selection_data; + Lisp_Object prev_value; + + selection_time = long_to_cons (last_event_timestamp); + selection_data = Fcons (selection_name, + Fcons (selection_value, + Fcons (selection_time, + Fcons (selected_frame, Qnil)))); + prev_value = assq_no_quit (selection_name, Vselection_alist); + + Vselection_alist = Fcons (selection_data, Vselection_alist); + + /* If we already owned the selection, remove the old selection data. + Perhaps we should destructively modify it instead. + Don't use Fdelq as that may QUIT. */ + if (!NILP (prev_value)) + { + Lisp_Object rest; /* we know it's not the CAR, so it's easy. */ + for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) + if (EQ (prev_value, Fcar (XCDR (rest)))) + { + XSETCDR (rest, Fcdr (XCDR (rest))); + break; + } + } + } +} + +/* Given a selection-name and desired type, look up our local copy of + the selection value and convert it to the type. + The value is nil or a string. + This function is used both for remote requests (LOCAL_REQUEST is zero) + and for local x-get-selection-internal (LOCAL_REQUEST is nonzero). + + This calls random Lisp code, and may signal or gc. */ + +static Lisp_Object +x_get_local_selection (selection_symbol, target_type, local_request) + Lisp_Object selection_symbol, target_type; + int local_request; +{ + Lisp_Object local_value; + Lisp_Object handler_fn, value, type, check; + int count; + + if (NILP (Fx_selection_owner_p (selection_symbol))) + return Qnil; + + local_value = assq_no_quit (selection_symbol, Vselection_alist); + + /* TIMESTAMP is a special case 'cause that's easiest. */ + if (EQ (target_type, QTIMESTAMP)) + { + handler_fn = Qnil; + value = XCAR (XCDR (XCDR (local_value))); + } +#if 0 + else if (EQ (target_type, QDELETE)) + { + handler_fn = Qnil; + Fx_disown_selection_internal + (selection_symbol, + XCAR (XCDR (XCDR (local_value)))); + value = QNULL; + } +#endif + else + { + /* Don't allow a quit within the converter. + When the user types C-g, he would be surprised + if by luck it came during a converter. */ + count = SPECPDL_INDEX (); + specbind (Qinhibit_quit, Qt); + + CHECK_SYMBOL (target_type); + handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist)); + /* gcpro is not needed here since nothing but HANDLER_FN + is live, and that ought to be a symbol. */ + + if (!NILP (handler_fn)) + value = call3 (handler_fn, + selection_symbol, (local_request ? Qnil : target_type), + XCAR (XCDR (local_value))); + else + value = Qnil; + unbind_to (count, Qnil); + } + + /* Make sure this value is of a type that we could transmit + to another X client. */ + + check = value; + if (CONSP (value) + && SYMBOLP (XCAR (value))) + type = XCAR (value), + check = XCDR (value); + + if (STRINGP (check) + || VECTORP (check) + || SYMBOLP (check) + || INTEGERP (check) + || NILP (value)) + return value; + /* Check for a value that cons_to_long could handle. */ + else if (CONSP (check) + && INTEGERP (XCAR (check)) + && (INTEGERP (XCDR (check)) + || + (CONSP (XCDR (check)) + && INTEGERP (XCAR (XCDR (check))) + && NILP (XCDR (XCDR (check)))))) + return value; + else + return + Fsignal (Qerror, + Fcons (build_string ("invalid data returned by selection-conversion function"), + Fcons (handler_fn, Fcons (value, Qnil)))); +} + + +/* Clear all selections that were made from frame F. + We do this when about to delete a frame. */ + +void +x_clear_frame_selections (f) + FRAME_PTR f; +{ + Lisp_Object frame; + Lisp_Object rest; + + XSETFRAME (frame, f); + + /* Otherwise, we're really honest and truly being told to drop it. + Don't use Fdelq as that may QUIT;. */ + + /* Delete elements from the beginning of Vselection_alist. */ + while (!NILP (Vselection_alist) + && EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (Vselection_alist))))))) + { + /* Let random Lisp code notice that the selection has been stolen. */ + Lisp_Object hooks, selection_symbol; + + hooks = Vx_lost_selection_functions; + selection_symbol = Fcar (Fcar (Vselection_alist)); + + if (!EQ (hooks, Qunbound)) + { + for (; CONSP (hooks); hooks = Fcdr (hooks)) + call1 (Fcar (hooks), selection_symbol); +#if 0 /* This can crash when deleting a frame + from x_connection_closed. Anyway, it seems unnecessary; + something else should cause a redisplay. */ + redisplay_preserve_echo_area (21); +#endif + } + + Vselection_alist = Fcdr (Vselection_alist); + } + + /* Delete elements after the beginning of Vselection_alist. */ + for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) + if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest)))))))) + { + /* Let random Lisp code notice that the selection has been stolen. */ + Lisp_Object hooks, selection_symbol; + + hooks = Vx_lost_selection_functions; + selection_symbol = Fcar (Fcar (XCDR (rest))); + + if (!EQ (hooks, Qunbound)) + { + for (; CONSP (hooks); hooks = Fcdr (hooks)) + call1 (Fcar (hooks), selection_symbol); +#if 0 /* See above */ + redisplay_preserve_echo_area (22); +#endif + } + XSETCDR (rest, Fcdr (XCDR (rest))); + break; + } +} + +/* Do protocol to read selection-data from the server. + Converts this to Lisp data and returns it. */ + +static Lisp_Object +x_get_foreign_selection (selection_symbol, target_type, time_stamp) + Lisp_Object selection_symbol, target_type, time_stamp; +{ + OSErr err; + ScrapRef scrap; + Lisp_Object result = Qnil; + + BLOCK_INPUT; + + err = get_scrap_from_symbol (selection_symbol, 0, &scrap); + if (err == noErr && scrap) + if (EQ (target_type, QTARGETS)) + { + result = get_scrap_target_type_list (scrap); + result = Fvconcat (1, &result); + } + else + { + result = get_scrap_string (scrap, target_type); + if (STRINGP (result)) + Fput_text_property (make_number (0), make_number (SBYTES (result)), + Qforeign_selection, target_type, result); + } + + UNBLOCK_INPUT; + + return result; +} + + +DEFUN ("x-own-selection-internal", Fx_own_selection_internal, + Sx_own_selection_internal, 2, 2, 0, + doc: /* Assert a selection of the given TYPE with the given VALUE. +TYPE is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. +VALUE is typically a string, or a cons of two markers, but may be +anything that the functions on `selection-converter-alist' know about. */) + (selection_name, selection_value) + Lisp_Object selection_name, selection_value; +{ + check_mac (); + CHECK_SYMBOL (selection_name); + if (NILP (selection_value)) error ("selection-value may not be nil"); + x_own_selection (selection_name, selection_value); + return selection_value; +} + + +/* Request the selection value from the owner. If we are the owner, + simply return our selection value. If we are not the owner, this + will block until all of the data has arrived. */ + +DEFUN ("x-get-selection-internal", Fx_get_selection_internal, + Sx_get_selection_internal, 2, 3, 0, + doc: /* Return text selected from some Mac window. +SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. +TYPE is the type of data desired, typically `STRING'. +TIME_STAMP is ignored on Mac. */) + (selection_symbol, target_type, time_stamp) + Lisp_Object selection_symbol, target_type, time_stamp; +{ + Lisp_Object val = Qnil; + struct gcpro gcpro1, gcpro2; + GCPRO2 (target_type, val); /* we store newly consed data into these */ + check_mac (); + CHECK_SYMBOL (selection_symbol); + CHECK_SYMBOL (target_type); + + val = x_get_local_selection (selection_symbol, target_type, 1); + + if (NILP (val)) + { + val = x_get_foreign_selection (selection_symbol, target_type, time_stamp); + goto DONE; + } + + if (CONSP (val) + && SYMBOLP (XCAR (val))) + { + val = XCDR (val); + if (CONSP (val) && NILP (XCDR (val))) + val = XCAR (val); + } + DONE: + UNGCPRO; + return val; +} + +DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal, + Sx_disown_selection_internal, 1, 2, 0, + doc: /* If we own the selection SELECTION, disown it. +Disowning it means there is no such selection. */) + (selection, time) + Lisp_Object selection; + Lisp_Object time; +{ + OSErr err; + ScrapRef scrap; + Lisp_Object local_selection_data; + + check_mac (); + CHECK_SYMBOL (selection); + + if (NILP (Fx_selection_owner_p (selection))) + return Qnil; /* Don't disown the selection when we're not the owner. */ + + local_selection_data = assq_no_quit (selection, Vselection_alist); + + /* Don't use Fdelq as that may QUIT;. */ + + if (EQ (local_selection_data, Fcar (Vselection_alist))) + Vselection_alist = Fcdr (Vselection_alist); + else + { + Lisp_Object rest; + for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest)) + if (EQ (local_selection_data, Fcar (XCDR (rest)))) + { + XSETCDR (rest, Fcdr (XCDR (rest))); + break; + } + } + + /* Let random lisp code notice that the selection has been stolen. */ + + { + Lisp_Object rest; + rest = Vx_lost_selection_functions; + if (!EQ (rest, Qunbound)) + { + for (; CONSP (rest); rest = Fcdr (rest)) + call1 (Fcar (rest), selection); + prepare_menu_bars (); + redisplay_preserve_echo_area (20); + } + } + + BLOCK_INPUT; + + err = get_scrap_from_symbol (selection, 0, &scrap); + if (err == noErr && scrap) + clear_scrap (&scrap); + + UNBLOCK_INPUT; + + return Qt; +} + + +DEFUN ("x-selection-owner-p", Fx_selection_owner_p, Sx_selection_owner_p, + 0, 1, 0, + doc: /* Whether the current Emacs process owns the given Selection. +The arg should be the name of the selection in question, typically one of +the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. +For convenience, the symbol nil is the same as `PRIMARY', +and t is the same as `SECONDARY'. */) + (selection) + Lisp_Object selection; +{ + OSErr err; + ScrapRef scrap; + Lisp_Object result = Qnil, local_selection_data; + + check_mac (); + CHECK_SYMBOL (selection); + if (EQ (selection, Qnil)) selection = QPRIMARY; + if (EQ (selection, Qt)) selection = QSECONDARY; + + local_selection_data = assq_no_quit (selection, Vselection_alist); + + if (NILP (local_selection_data)) + return Qnil; + + BLOCK_INPUT; + + err = get_scrap_from_symbol (selection, 0, &scrap); + if (err == noErr && scrap) + { + unsigned long timestamp; + + err = get_scrap_private_timestamp (scrap, ×tamp); + if (err == noErr + && (timestamp + == cons_to_long (XCAR (XCDR (XCDR (local_selection_data)))))) + result = Qt; + } + else + result = Qt; + + UNBLOCK_INPUT; + + return result; +} + +DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p, + 0, 1, 0, + doc: /* Whether there is an owner for the given Selection. +The arg should be the name of the selection in question, typically one of +the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. +For convenience, the symbol nil is the same as `PRIMARY', +and t is the same as `SECONDARY'. */) + (selection) + Lisp_Object selection; +{ + OSErr err; + ScrapRef scrap; + Lisp_Object result = Qnil, rest; + + /* It should be safe to call this before we have an Mac frame. */ + if (! FRAME_MAC_P (SELECTED_FRAME ())) + return Qnil; + + CHECK_SYMBOL (selection); + if (!NILP (Fx_selection_owner_p (selection))) + return Qt; + if (EQ (selection, Qnil)) selection = QPRIMARY; + if (EQ (selection, Qt)) selection = QSECONDARY; + + BLOCK_INPUT; + + err = get_scrap_from_symbol (selection, 0, &scrap); + if (err == noErr && scrap) + for (rest = Vselection_converter_alist; CONSP (rest); rest = XCDR (rest)) + { + if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) + && scrap_has_target_type (scrap, XCAR (XCAR (rest)))) + { + result = Qt; + break; + } + } + + UNBLOCK_INPUT; + + return result; +} + + +#ifdef MAC_OSX +void +init_service_handler () +{ + EventTypeSpec specs[] = {{kEventClassService, kEventServiceGetTypes}, + {kEventClassService, kEventServiceCopy}, + {kEventClassService, kEventServicePaste}, + {kEventClassService, kEventServicePerform}}; + InstallApplicationEventHandler (NewEventHandlerUPP (mac_handle_service_event), + GetEventTypeCount (specs), specs, NULL, NULL); +} + +extern void mac_store_services_event P_ ((EventRef)); + +static OSStatus +mac_handle_service_event (call_ref, event, data) + EventHandlerCallRef call_ref; + EventRef event; + void *data; +{ + OSStatus err = noErr; + ScrapRef cur_scrap; + + /* Check if Vmac_services_selection is a valid selection that has a + corresponding scrap. */ + if (!SYMBOLP (Vmac_services_selection)) + err = eventNotHandledErr; + else + err = get_scrap_from_symbol (Vmac_services_selection, 0, &cur_scrap); + if (!(err == noErr && cur_scrap)) + return eventNotHandledErr; + + switch (GetEventKind (event)) + { + case kEventServiceGetTypes: + { + CFMutableArrayRef copy_types, paste_types; + CFStringRef type; + Lisp_Object rest; + ScrapFlavorType flavor_type; + + /* Set paste types. */ + err = GetEventParameter (event, kEventParamServicePasteTypes, + typeCFMutableArrayRef, NULL, + sizeof (CFMutableArrayRef), NULL, + &paste_types); + if (err == noErr) + for (rest = Vselection_converter_alist; CONSP (rest); + rest = XCDR (rest)) + if (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))) + && (flavor_type = + get_flavor_type_from_symbol (XCAR (XCAR (rest))))) + { + type = CreateTypeStringWithOSType (flavor_type); + if (type) + { + CFArrayAppendValue (paste_types, type); + CFRelease (type); + } + } + + /* Set copy types. */ + err = GetEventParameter (event, kEventParamServiceCopyTypes, + typeCFMutableArrayRef, NULL, + sizeof (CFMutableArrayRef), NULL, + ©_types); + if (err == noErr + && !NILP (Fx_selection_owner_p (Vmac_services_selection))) + for (rest = get_scrap_target_type_list (cur_scrap); + CONSP (rest) && SYMBOLP (XCAR (rest)); rest = XCDR (rest)) + { + flavor_type = get_flavor_type_from_symbol (XCAR (rest)); + if (flavor_type) + { + type = CreateTypeStringWithOSType (flavor_type); + if (type) + { + CFArrayAppendValue (copy_types, type); + CFRelease (type); + } + } + } + } + break; + + case kEventServiceCopy: + { + ScrapRef specific_scrap; + Lisp_Object rest, data; + + err = GetEventParameter (event, kEventParamScrapRef, + typeScrapRef, NULL, + sizeof (ScrapRef), NULL, &specific_scrap); + if (err == noErr + && !NILP (Fx_selection_owner_p (Vmac_services_selection))) + for (rest = get_scrap_target_type_list (cur_scrap); + CONSP (rest) && SYMBOLP (XCAR (rest)); rest = XCDR (rest)) + { + data = get_scrap_string (cur_scrap, XCAR (rest)); + if (STRINGP (data)) + err = put_scrap_string (specific_scrap, XCAR (rest), data); + } + else + err = eventNotHandledErr; + } + break; + + case kEventServicePaste: + case kEventServicePerform: + { + ScrapRef specific_scrap; + Lisp_Object rest, data; + int data_exists_p = 0; + + err = GetEventParameter (event, kEventParamScrapRef, typeScrapRef, + NULL, sizeof (ScrapRef), NULL, + &specific_scrap); + if (err == noErr) + err = clear_scrap (&cur_scrap); + if (err == noErr) + for (rest = Vselection_converter_alist; CONSP (rest); + rest = XCDR (rest)) + { + if (! (CONSP (XCAR (rest)) && SYMBOLP (XCAR (XCAR (rest))))) + continue; + data = get_scrap_string (specific_scrap, XCAR (XCAR (rest))); + if (STRINGP (data)) + { + err = put_scrap_string (cur_scrap, XCAR (XCAR (rest)), + data); + if (err != noErr) + break; + data_exists_p = 1; + } + } + if (err == noErr) + if (data_exists_p) + mac_store_application_menu_event (event); + else + err = eventNotHandledErr; + } + break; + } + + return err; +} +#endif + + +void +syms_of_macselect () +{ + defsubr (&Sx_get_selection_internal); + defsubr (&Sx_own_selection_internal); + defsubr (&Sx_disown_selection_internal); + defsubr (&Sx_selection_owner_p); + defsubr (&Sx_selection_exists_p); + + Vselection_alist = Qnil; + staticpro (&Vselection_alist); + + DEFVAR_LISP ("selection-converter-alist", &Vselection_converter_alist, + doc: /* An alist associating selection-types with functions. +These functions are called to convert the selection, with three args: +the name of the selection (typically `PRIMARY', `SECONDARY', or `CLIPBOARD'); +a desired type to which the selection should be converted; +and the local selection value (whatever was given to `x-own-selection'). + +The function should return the value to send to the Scrap Manager +\(a string). A return value of nil +means that the conversion could not be done. +A return value which is the symbol `NULL' +means that a side-effect was executed, +and there is no meaningful selection value. */); + Vselection_converter_alist = Qnil; + + DEFVAR_LISP ("x-lost-selection-functions", &Vx_lost_selection_functions, + doc: /* A list of functions to be called when Emacs loses a selection. +\(This happens when a Lisp program explicitly clears the selection.) +The functions are called with one argument, the selection type +\(a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'). */); + Vx_lost_selection_functions = Qnil; + + DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system, + doc: /* Coding system for communicating with other programs. +When sending or receiving text via cut_buffer, selection, and clipboard, +the text is encoded or decoded by this coding system. +The default value is determined by the system script code. */); + Vselection_coding_system = Qnil; + + DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system, + doc: /* Coding system for the next communication with other programs. +Usually, `selection-coding-system' is used for communicating with +other programs. But, if this variable is set, it is used for the +next communication only. After the communication, this variable is +set to nil. */); + Vnext_selection_coding_system = Qnil; + + DEFVAR_LISP ("mac-services-selection", &Vmac_services_selection, + doc: /* Selection name for communication via Services menu. */); + Vmac_services_selection = intern ("CLIPBOARD"); + + QPRIMARY = intern ("PRIMARY"); staticpro (&QPRIMARY); + QSECONDARY = intern ("SECONDARY"); staticpro (&QSECONDARY); + QTIMESTAMP = intern ("TIMESTAMP"); staticpro (&QTIMESTAMP); + QTARGETS = intern ("TARGETS"); staticpro (&QTARGETS); + + Qforeign_selection = intern ("foreign-selection"); + staticpro (&Qforeign_selection); + + Qmac_scrap_name = intern ("mac-scrap-name"); + staticpro (&Qmac_scrap_name); + + Qmac_ostype = intern ("mac-ostype"); + staticpro (&Qmac_ostype); +} + +/* arch-tag: f3c91ad8-99e0-4bd6-9eef-251b2f848732 + (do not change this comment) */
--- a/src/macterm.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/macterm.c Thu May 05 00:04:55 2005 +0000 @@ -7106,14 +7106,11 @@ #define MIN_DOC_SIZE 64 #define MAX_DOC_SIZE 32767 +#if 0 /* sleep time for WaitNextEvent */ #define WNE_SLEEP_AT_SUSPEND 10 #define WNE_SLEEP_AT_RESUME 1 -/* true when cannot handle any Mac OS events */ -static int handling_window_update = 0; - -#if 0 /* the flag appl_is_suspended is used both for determining the sleep time to be passed to WaitNextEvent and whether the cursor should be drawn when updating the display. The cursor is turned off when @@ -7131,8 +7128,6 @@ #define ABOUT_ALERT_ID 128 #define RAM_TOO_LARGE_ALERT_ID 129 -Boolean terminate_flag = false; - /* Contains the string "reverse", which is a constant for mouse button emu.*/ Lisp_Object Qreverse; @@ -7188,11 +7183,11 @@ static DragReceiveHandlerUPP mac_do_receive_dragUPP = NULL; #endif +static Lisp_Object Qapplication, Qabout; #if USE_CARBON_EVENTS #ifdef MAC_OSX -/* Preliminary Support for the OSX Services Menu */ -static OSStatus mac_handle_service_event (EventHandlerCallRef,EventRef,void*); -static void init_service_handler (); +extern void init_service_handler (); +static Lisp_Object Qpreferences, Qservices, Qpaste, Qperform; #endif /* Window Event Handler */ static pascal OSStatus mac_handle_window_event (EventHandlerCallRef, @@ -7350,11 +7345,13 @@ SetMenuBar (menubar_handle); DrawMenuBar (); +#if !TARGET_API_MAC_CARBON menu_handle = GetMenuHandle (M_APPLE); if(menu_handle != NULL) AppendResMenu (menu_handle,'DRVR'); else abort (); +#endif } @@ -7426,8 +7423,6 @@ { Rect r; - handling_window_update = 1; - #if TARGET_API_MAC_CARBON { RgnHandle region = NewRgn (); @@ -7443,8 +7438,6 @@ expose_frame (f, r.left, r.top, r.right - r.left, r.bottom - r.top); UpdateControls (win, win->visRgn); #endif - - handling_window_update = 0; } } @@ -7513,11 +7506,11 @@ menu_id = HiWord (menu_choice); menu_item = LoWord (menu_choice); - if (menu_id == 0) - return; - switch (menu_id) { + case 0: + break; + case M_APPLE: do_apple_menu (menu_item); break; @@ -7767,104 +7760,156 @@ abort (); } +void +mac_store_application_menu_event (event) #if USE_CARBON_EVENTS + EventRef event; +#else + UInt32 event; +#endif +{ + struct input_event buf; + Lisp_Object frame, entry; + + EVENT_INIT (buf); + + XSETFRAME (frame, mac_focus_frame (&one_mac_display_info)); + buf.kind = MENU_BAR_EVENT; + buf.frame_or_window = frame; + buf.arg = frame; + kbd_buffer_store_event (&buf); + + buf.arg = Qapplication; + kbd_buffer_store_event (&buf); + +#if USE_CARBON_EVENTS + switch (GetEventClass (event)) + { #ifdef MAC_OSX -void -init_service_handler () -{ - EventTypeSpec specs[] = {{kEventClassService, kEventServiceGetTypes}, - {kEventClassService, kEventServiceCopy}, - {kEventClassService, kEventServicePaste}}; - InstallApplicationEventHandler (NewEventHandlerUPP (mac_handle_service_event), - 3, specs, NULL, NULL); -} - -/* - MAC_TODO: Check to see if this is called by AEProcessDesc... - */ -OSStatus -mac_handle_service_event (EventHandlerCallRef callRef, - EventRef event, void *data) -{ - OSStatus err = noErr; - switch (GetEventKind (event)) - { - case kEventServiceGetTypes: - { - CFMutableArrayRef copyTypes, pasteTypes; - CFStringRef type; - Boolean selection = true; - /* - GetEventParameter(event, kEventParamServicePasteTypes, - typeCFMutableArrayRef, NULL, - sizeof (CFMutableArrayRef), NULL, &pasteTypes); - */ - GetEventParameter(event, kEventParamServiceCopyTypes, - typeCFMutableArrayRef, NULL, - sizeof (CFMutableArrayRef), NULL, ©Types); - type = CreateTypeStringWithOSType (kScrapFlavorTypeText); - if (type) { - CFArrayAppendValue (copyTypes, type); - //CFArrayAppendValue (pasteTypes, type); - CFRelease (type); + case kEventClassService: + buf.arg = Qservices; + kbd_buffer_store_event (&buf); + switch (GetEventKind (event)) + { + case kEventServicePaste: + entry = Qpaste; + break; + + case kEventServicePerform: + { + OSErr err; + CFStringRef message; + + err = GetEventParameter (event, kEventParamServiceMessageName, + typeCFStringRef, NULL, + sizeof (CFStringRef), NULL, &message); + buf.arg = Qperform; + kbd_buffer_store_event (&buf); + if (err == noErr && message) + entry = intern (SDATA (cfstring_to_lisp (message))); + else + entry = Qnil; + } + break; + + default: + abort (); } - } - case kEventServiceCopy: + break; +#endif /* MAC_OSX */ + case kEventClassCommand: { - ScrapRef currentScrap, specificScrap; - char * buf = ""; - Size byteCount = 0; - - GetCurrentScrap (¤tScrap); - - err = GetScrapFlavorSize (currentScrap, kScrapFlavorTypeText, &byteCount); - if (err == noErr) + HICommand command; + + GetEventParameter(event, kEventParamDirectObject, typeHICommand, + NULL, sizeof (HICommand), NULL, &command); + switch (command.commandID) { - void *buffer = xmalloc (byteCount); - if (buffer != NULL) - { - GetEventParameter (event, kEventParamScrapRef, typeScrapRef, NULL, - sizeof (ScrapRef), NULL, &specificScrap); - - err = GetScrapFlavorData (currentScrap, kScrapFlavorTypeText, - &byteCount, buffer); - if (err == noErr) - PutScrapFlavor (specificScrap, kScrapFlavorTypeText, - kScrapFlavorMaskNone, byteCount, buffer); - xfree (buffer); - } + case kHICommandAbout: + entry = Qabout; + break; +#ifdef MAC_OSX + case kHICommandPreferences: + entry = Qpreferences; + break; +#endif /* MAC_OSX */ + case kHICommandQuit: + entry = Qquit; + break; + default: + abort (); } - err = noErr; } - case kEventServicePaste: - { - /* - // Get the current location - Size byteCount; - ScrapRef specificScrap; - GetEventParameter(event, kEventParamScrapRef, typeScrapRef, NULL, - sizeof(ScrapRef), NULL, &specificScrap); - err = GetScrapFlavorSize(specificScrap, kScrapFlavorTypeText, &byteCount); - if (err == noErr) { - void * buffer = xmalloc(byteCount); - if (buffer != NULL ) { - err = GetScrapFlavorData(specificScrap, kScrapFlavorTypeText, - &byteCount, buffer); - if (err == noErr) { - // Actually place in the buffer - BLOCK_INPUT; - // Get the current "selection" string here - UNBLOCK_INPUT; - } - } - xfree(buffer); - } - */ - } - } - return err; -} -#endif + break; + + default: + abort (); + } +#else /* USE_CARBON_EVENTS */ + switch (event) + { + case kHICommandAbout: + entry = Qabout; + break; + case kHICommandQuit: + entry = Qquit; + break; + default: + abort (); + } +#endif + + buf.arg = entry; + kbd_buffer_store_event (&buf); +} + +#if USE_CARBON_EVENTS +static pascal OSStatus +mac_handle_command_event (next_handler, event, data) + EventHandlerCallRef next_handler; + EventRef event; + void *data; +{ + HICommand command; + OSErr result; + + GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, + sizeof (HICommand), NULL, &command); + + switch (command.commandID) + { + case kHICommandAbout: +#ifdef MAC_OSX + case kHICommandPreferences: +#endif /* MAC_OSX */ + result = CallNextEventHandler (next_handler, event); + if (result != eventNotHandledErr) + return result; + + mac_store_application_menu_event (event); + return noErr; + + default: + break; + } + + return eventNotHandledErr; +} + +static OSErr +init_command_handler (window) + WindowPtr window; +{ + OSErr err = noErr; + EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}}; + static EventHandlerUPP handle_command_eventUPP = NULL; + + if (handle_command_eventUPP == NULL) + handle_command_eventUPP = NewEventHandlerUPP (mac_handle_command_event); + return InstallApplicationEventHandler (handle_command_eventUPP, + GetEventTypeCount (specs), specs, + NULL, NULL); +} static pascal OSStatus mac_handle_window_event (next_handler, event, data) @@ -7888,7 +7933,7 @@ return result; do_window_update (wp); - break; + return noErr; case kEventWindowBoundsChanging: result = CallNextEventHandler (next_handler, event); @@ -8267,14 +8312,30 @@ static pascal OSErr do_ae_quit_application (AppleEvent* message, AppleEvent *reply, long refcon) { - /* FixMe: Do we need an unwind-protect or something here? And what - do we do about unsaved files. Currently just forces quit rather - than doing recursive callback to get user input. */ - - terminate_flag = true; - - /* Fkill_emacs doesn't return. We have to return. (TI) */ +#if USE_CARBON_EVENTS + OSErr err; + EventRef event = NULL; + static const HICommand quit_command = {kEventAttributeNone, kHICommandQuit}; + + err = CreateEvent (NULL, kEventClassCommand, kEventCommandProcess, 0, + kEventAttributeUserEvent, &event); + if (err == noErr) + err = SetEventParameter (event, kEventParamDirectObject, typeHICommand, + sizeof (HICommand), &quit_command); + if (err == noErr) + mac_store_application_menu_event (event); + if (event) + ReleaseEvent (event); + + if (err == noErr) + return noErr; + else + return errAEEventNotHandled; +#else + mac_store_application_menu_event (kHICommandQuit); + return noErr; +#endif } @@ -8474,20 +8535,6 @@ /* So people can tell when we have read the available input. */ input_signal_count++; - /* Don't poll for events to process (specifically updateEvt) if - window update currently already in progress. A call to redisplay - (in do_window_update) can be preempted by another call to - redisplay, causing blank regions to be left on the screen and the - cursor to be left at strange places. */ - if (handling_window_update) - { - UNBLOCK_INPUT; - return 0; - } - - if (terminate_flag) - Fkill_emacs (make_number (1)); - #if USE_CARBON_EVENTS toolbox_dispatcher = GetEventDispatcherTarget (); @@ -9580,9 +9627,41 @@ kbd_buffer_store_event (&e); } } - #endif /* MAC_OSX */ +static void +init_menu_bar () +{ +#ifdef MAC_OSX + OSErr err; + MenuRef menu; + MenuItemIndex menu_index; + + err = GetIndMenuItemWithCommandID (NULL, kHICommandQuit, 1, + &menu, &menu_index); + if (err == noErr) + SetMenuItemCommandKey (menu, menu_index, false, 0); +#if USE_CARBON_EVENTS + EnableMenuCommand (NULL, kHICommandPreferences); + err = GetIndMenuItemWithCommandID (NULL, kHICommandPreferences, 1, + &menu, &menu_index); + if (err == noErr) + { + SetMenuItemCommandKey (menu, menu_index, false, 0); + InsertMenuItemTextWithCFString (menu, NULL, + 0, kMenuItemAttrSeparator, 0); + InsertMenuItemTextWithCFString (menu, CFSTR ("About Emacs"), + 0, 0, kHICommandAbout); + } +#endif /* USE_CARBON_EVENTS */ +#else /* !MAC_OSX */ +#if USE_CARBON_EVENTS + SetMenuItemCommandID (GetMenuHandle (M_APPLE), I_ABOUT, kHICommandAbout); +#endif +#endif +} + + /* Set up use of X before we make the first connection. */ extern frame_parm_handler mac_frame_parm_handlers[]; @@ -9699,13 +9778,17 @@ #if TARGET_API_MAC_CARBON init_required_apple_events (); -#if USE_CARBON_EVENTS && defined (MAC_OSX) +#if USE_CARBON_EVENTS +#ifdef MAC_OSX init_service_handler (); init_quit_char_handler (); -#endif - - DisableMenuCommand (NULL, kHICommandQuit); +#endif /* MAC_OSX */ + + init_command_handler (); + + init_menu_bar (); +#endif /* USE_CARBON_EVENTS */ #ifdef MAC_OSX if (!inhibit_window_system) @@ -9732,6 +9815,16 @@ Qsuper = intern ("super"); Fput (Qsuper, Qmodifier_value, make_number (super_modifier)); + Qapplication = intern ("application"); staticpro (&Qapplication); + Qabout = intern ("about"); staticpro (&Qabout); + +#if USE_CARBON_EVENTS && defined (MAC_OSX) + Qpreferences = intern ("preferences"); staticpro (&Qpreferences); + Qservices = intern ("services"); staticpro (&Qservices); + Qpaste = intern ("paste"); staticpro (&Qpaste); + Qperform = intern ("perform"); staticpro (&Qperform); +#endif + #ifdef MAC_OSX Fprovide (intern ("mac-carbon"), Qnil); #endif
--- a/src/macterm.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/macterm.h Thu May 05 00:04:55 2005 +0000 @@ -620,6 +620,10 @@ #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 +/* Defined in macselect.c */ + +extern void x_clear_frame_selections P_ ((struct frame *)); + /* Defined in mac.c. */ extern OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *));
--- a/src/sysdep.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/sysdep.c Thu May 05 00:04:55 2005 +0000 @@ -1718,10 +1718,16 @@ #else #ifdef VMS + /* Use a fresh channel since the current one may have stale info + (for example, from prior to a suspend); and to avoid a dependency + in the init sequence. */ + int chan; struct sensemode tty; - SYS$QIOW (0, input_fd, IO$_SENSEMODE, &tty, 0, 0, - &tty.class, 12, 0, 0, 0, 0); + SYS$ASSIGN (&input_dsc, &chan, 0, 0); + SYS$QIOW (0, chan, IO$_SENSEMODE, &tty, 0, 0, + &tty.class, 12, 0, 0, 0, 0); + SYS$DASSGN (chan); *widthp = tty.scr_wid; *heightp = tty.scr_len;
--- a/src/sysselect.h Thu Apr 28 04:56:56 2005 +0000 +++ b/src/sysselect.h Thu May 05 00:04:55 2005 +0000 @@ -18,7 +18,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_SYS_SELECT +#ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif
--- a/src/window.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/window.c Thu May 05 00:04:55 2005 +0000 @@ -79,10 +79,6 @@ void *)); static Lisp_Object window_list_1 P_ ((Lisp_Object, Lisp_Object, Lisp_Object)); -/* The value of `window-size-fixed'. */ - -int window_size_fixed; - /* This is the window in which the terminal's cursor should be left when nothing is being done with it. This must always be a leaf window, and its buffer is selected by @@ -3267,9 +3263,10 @@ DEFUN ("special-display-p", Fspecial_display_p, Sspecial_display_p, 1, 1, 0, doc: /* Returns non-nil if a buffer named BUFFER-NAME gets a special frame. -If the value is t, a frame would be created for that buffer -using the default frame parameters. If the value is a list, -it is a list of frame parameters that would be used +If the value is t, `display-buffer' or `pop-to-buffer' would create a +special frame for that buffer using the default frame parameters. + +If the value is a list, it is a list of frame parameters that would be used to make a frame for that buffer. The variables `special-display-buffer-names' and `special-display-regexps' control this. */) @@ -3303,7 +3300,9 @@ } DEFUN ("same-window-p", Fsame_window_p, Ssame_window_p, 1, 1, 0, - doc: /* Returns non-nil if a new buffer named BUFFER-NAME would use the same window. + doc: /* Returns non-nil if a buffer named BUFFER-NAME would use the same window. +More precisely, if `display-buffer' or `pop-to-buffer' would display +that buffer in the selected window rather than (as usual) in some other window. See `same-window-buffer-names' and `same-window-regexps'. */) (buffer_name) Lisp_Object buffer_name; @@ -6669,6 +6668,7 @@ { Qwindow_size_fixed = intern ("window-size-fixed"); staticpro (&Qwindow_size_fixed); + Fset (Qwindow_size_fixed, Qnil); staticpro (&Qwindow_configuration_change_hook); Qwindow_configuration_change_hook @@ -6751,7 +6751,8 @@ DEFVAR_LISP ("special-display-buffer-names", &Vspecial_display_buffer_names, doc: /* *List of buffer names that should have their own special frames. -Displaying a buffer whose name is in this list makes a special frame for it +Displaying a buffer with `display-buffer' or `pop-to-buffer', +if its name is in this list, makes a special frame for it using `special-display-function'. See also `special-display-regexps'. An element of the list can be a list instead of just a string. @@ -6776,9 +6777,9 @@ DEFVAR_LISP ("special-display-regexps", &Vspecial_display_regexps, doc: /* *List of regexps saying which buffers should have their own special frames. -If a buffer name matches one of these regexps, it gets its own frame. -Displaying a buffer whose name is in this list makes a special frame for it -using `special-display-function'. +When displaying a buffer with `display-buffer' or `pop-to-buffer', +if any regexp in this list matches the buffer name, it makes a +special frame for the buffer by calling `special-display-function'. An element of the list can be a list instead of just a string. There are two ways to use a list as an element: @@ -6877,16 +6878,6 @@ The selected frame is the one whose configuration has changed. */); Vwindow_configuration_change_hook = Qnil; - DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, - doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. -If the value is`height', then only the window's height is fixed. -If the value is `width', then only the window's width is fixed. -Any other non-nil value fixes both the width and the height. -Emacs won't change the size of any window displaying that buffer, -unless you explicitly change the size, or Emacs has no other choice. */); - Fmake_variable_buffer_local (Qwindow_size_fixed); - window_size_fixed = 0; - defsubr (&Sselected_window); defsubr (&Sminibuffer_window); defsubr (&Swindow_minibuffer_p);
--- a/src/xdisp.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/xdisp.c Thu May 05 00:04:55 2005 +0000 @@ -622,12 +622,6 @@ static int message_cleared_p; -/* Non-zero means we want a hollow cursor in windows that are not - selected. Zero means there's no cursor in such windows. */ - -Lisp_Object Vcursor_in_non_selected_windows; -Lisp_Object Qcursor_in_non_selected_windows; - /* How to blink the default frame cursor off. */ Lisp_Object Vblink_cursor_alist; @@ -5977,6 +5971,16 @@ { int x, i, ascent = 0, descent = 0; + /* Stop if we move beyond TO_CHARPOS (after an image or stretch glyph). */ + if ((op & MOVE_TO_POS) != 0 + && BUFFERP (it->object) + && it->method == GET_FROM_BUFFER + && IT_CHARPOS (*it) > to_charpos) + { + result = MOVE_POS_MATCH_OR_ZV; + break; + } + /* Stop when ZV reached. We used to stop here when TO_CHARPOS reached as well, but that is too soon if this glyph does not fit on this line. So we handle it @@ -8010,8 +8014,6 @@ const char *s = (const char *) a1; Lisp_Object string = a2; - xassert (BEG == Z); - /* Change multibyteness of the echo buffer appropriately. */ if (message_enable_multibyte != !NILP (current_buffer->enable_multibyte_characters)) @@ -14256,10 +14258,10 @@ { if (glyphs != 1) { - fprintf (stderr, "Row Start End Used oEI><O\\CTZFesm X Y W H V A P\n"); - fprintf (stderr, "=======================================================================\n"); - - fprintf (stderr, "%3d %5d %5d %4d %1.1d%1.1d%1.1d%1.1d%1.1d\ + fprintf (stderr, "Row Start End Used oEI><\\CTZFesm X Y W H V A P\n"); + fprintf (stderr, "======================================================================\n"); + + fprintf (stderr, "%3d %5d %5d %4d %1.1d%1.1d%1.1d%1.1d\ %1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d%1.1d %4d %4d %4d %4d %4d %4d %4d\n", vpos, MATRIX_ROW_START_CHARPOS (row), @@ -14269,7 +14271,6 @@ row->enabled_p, row->truncated_on_left_p, row->truncated_on_right_p, - row->overlay_arrow_p, row->continued_p, MATRIX_ROW_CONTINUATION_LINE_P (row), row->displays_text_p, @@ -16189,7 +16190,7 @@ props = mode_line_string_face_prop; else if (!NILP (mode_line_string_face)) { - Lisp_Object face = Fsafe_plist_get (props, Qface); + Lisp_Object face = Fplist_get (props, Qface); props = Fcopy_sequence (props); if (NILP (face)) face = mode_line_string_face; @@ -16214,7 +16215,7 @@ Lisp_Object face; if (NILP (props)) props = Ftext_properties_at (make_number (0), lisp_string); - face = Fsafe_plist_get (props, Qface); + face = Fplist_get (props, Qface); if (NILP (face)) face = mode_line_string_face; else @@ -19023,14 +19024,14 @@ plist = XCDR (it->object); /* Compute the width of the stretch. */ - if ((prop = Fsafe_plist_get (plist, QCwidth), !NILP (prop)) + if ((prop = Fplist_get (plist, QCwidth), !NILP (prop)) && calc_pixel_width_or_height (&tem, it, prop, font, 1, 0)) { /* Absolute width `:width WIDTH' specified and valid. */ zero_width_ok_p = 1; width = (int)tem; } - else if (prop = Fsafe_plist_get (plist, QCrelative_width), + else if (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0) { /* Relative width `:relative-width FACTOR' specified and valid. @@ -19054,7 +19055,7 @@ x_produce_glyphs (&it2); width = NUMVAL (prop) * it2.pixel_width; } - else if ((prop = Fsafe_plist_get (plist, QCalign_to), !NILP (prop)) + else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop)) && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to)) { if (it->glyph_row == NULL || !it->glyph_row->mode_line_p) @@ -19074,13 +19075,13 @@ width = 1; /* Compute height. */ - if ((prop = Fsafe_plist_get (plist, QCheight), !NILP (prop)) + if ((prop = Fplist_get (plist, QCheight), !NILP (prop)) && calc_pixel_width_or_height (&tem, it, prop, font, 0, 0)) { height = (int)tem; zero_height_ok_p = 1; } - else if (prop = Fsafe_plist_get (plist, QCrelative_height), + else if (prop = Fplist_get (plist, QCrelative_height), NUMVAL (prop) > 0) height = FONT_HEIGHT (font) * NUMVAL (prop); else @@ -19092,7 +19093,7 @@ /* Compute percentage of height used for ascent. If `:ascent ASCENT' is present and valid, use that. Otherwise, derive the ascent from the font in use. */ - if (prop = Fsafe_plist_get (plist, QCascent), + if (prop = Fplist_get (plist, QCascent), NUMVAL (prop) > 0 && NUMVAL (prop) <= 100) ascent = height * NUMVAL (prop) / 100.0; else if (!NILP (prop) @@ -20273,7 +20274,7 @@ /* Use cursor-in-non-selected-windows for non-selected window or frame. */ if (non_selected) { - alt_cursor = Fbuffer_local_value (Qcursor_in_non_selected_windows, w->buffer); + alt_cursor = XBUFFER (w->buffer)->cursor_in_non_selected_windows; return get_specified_cursor_type (alt_cursor, width); } @@ -21390,7 +21391,7 @@ if (IMAGEP (object)) { Lisp_Object image_map, hotspot; - if ((image_map = Fsafe_plist_get (XCDR (object), QCmap), + if ((image_map = Fplist_get (XCDR (object), QCmap), !NILP (image_map)) && (hotspot = find_hot_spot (image_map, dx, dy), CONSP (hotspot)) @@ -21406,10 +21407,10 @@ if (CONSP (hotspot) && (plist = XCAR (hotspot), CONSP (plist))) { - pointer = Fsafe_plist_get (plist, Qpointer); + pointer = Fplist_get (plist, Qpointer); if (NILP (pointer)) pointer = Qhand; - help = Fsafe_plist_get (plist, Qhelp_echo); + help = Fplist_get (plist, Qhelp_echo); if (!NILP (help)) { help_echo_string = help; @@ -21421,7 +21422,7 @@ } } if (NILP (pointer)) - pointer = Fsafe_plist_get (XCDR (object), QCpointer); + pointer = Fplist_get (XCDR (object), QCpointer); } if (STRINGP (string)) @@ -21574,7 +21575,7 @@ if (img != NULL && IMAGEP (img->spec)) { Lisp_Object image_map, hotspot; - if ((image_map = Fsafe_plist_get (XCDR (img->spec), QCmap), + if ((image_map = Fplist_get (XCDR (img->spec), QCmap), !NILP (image_map)) && (hotspot = find_hot_spot (image_map, glyph->slice.x + dx, @@ -21592,10 +21593,10 @@ if (CONSP (hotspot) && (plist = XCAR (hotspot), CONSP (plist))) { - pointer = Fsafe_plist_get (plist, Qpointer); + pointer = Fplist_get (plist, Qpointer); if (NILP (pointer)) pointer = Qhand; - help_echo_string = Fsafe_plist_get (plist, Qhelp_echo); + help_echo_string = Fplist_get (plist, Qhelp_echo); if (!NILP (help_echo_string)) { help_echo_window = window; @@ -21605,7 +21606,7 @@ } } if (NILP (pointer)) - pointer = Fsafe_plist_get (XCDR (img->spec), QCpointer); + pointer = Fplist_get (XCDR (img->spec), QCpointer); } } @@ -22637,8 +22638,6 @@ staticpro (&Qpoly); Qmessage_truncate_lines = intern ("message-truncate-lines"); staticpro (&Qmessage_truncate_lines); - Qcursor_in_non_selected_windows = intern ("cursor-in-non-selected-windows"); - staticpro (&Qcursor_in_non_selected_windows); Qgrow_only = intern ("grow-only"); staticpro (&Qgrow_only); Qinhibit_menubar_update = intern ("inhibit-menubar-update"); @@ -22932,12 +22931,6 @@ go back to their normal size. */); Vresize_mini_windows = Qgrow_only; - DEFVAR_LISP ("cursor-in-non-selected-windows", - &Vcursor_in_non_selected_windows, - doc: /* *Cursor type to display in non-selected windows. -t means to use hollow box cursor. See `cursor-type' for other values. */); - Vcursor_in_non_selected_windows = Qt; - DEFVAR_LISP ("blink-cursor-alist", &Vblink_cursor_alist, doc: /* Alist specifying how to blink the cursor off. Each element has the form (ON-STATE . OFF-STATE). Whenever the
--- a/src/xfaces.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/xfaces.c Thu May 05 00:04:55 2005 +0000 @@ -337,6 +337,8 @@ Lisp_Object Qface_alias; +extern Lisp_Object Qcircular_list; + /* Default stipple pattern used on monochrome displays. This stipple pattern is used on monochrome displays instead of shades of gray for a face background color. See `set-face-stipple' for possible @@ -472,7 +474,7 @@ static void map_tty_color P_ ((struct frame *, struct face *, enum lface_attribute_index, int *)); -static Lisp_Object resolve_face_name P_ ((Lisp_Object)); +static Lisp_Object resolve_face_name P_ ((Lisp_Object, int)); static int may_use_scalable_font_p P_ ((const char *)); static void set_font_frame_param P_ ((Lisp_Object, Lisp_Object)); static int better_font_p P_ ((int *, struct font_name *, struct font_name *, @@ -3266,27 +3268,47 @@ /* Resolve face name FACE_NAME. If FACE_NAME is a string, intern it - to make it a symvol. If FACE_NAME is an alias for another face, - return that face's name. */ + to make it a symbol. If FACE_NAME is an alias for another face, + return that face's name. + + Return default face in case of errors. */ static Lisp_Object -resolve_face_name (face_name) +resolve_face_name (face_name, signal_p) Lisp_Object face_name; -{ - Lisp_Object aliased; - int alias_loop_max = 10; + int signal_p; +{ + Lisp_Object orig_face; + Lisp_Object tortoise, hare; if (STRINGP (face_name)) face_name = intern (SDATA (face_name)); - while (SYMBOLP (face_name)) - { - aliased = Fsafe_get (face_name, Qface_alias); - if (NILP (aliased)) + if (NILP (face_name) || !SYMBOLP (face_name)) + return face_name; + + orig_face = face_name; + tortoise = hare = face_name; + + while (1) + { + face_name = hare; + hare = Fget (hare, Qface_alias); + if (NILP (hare) || !SYMBOLP (hare)) break; - if (--alias_loop_max == 0) + + face_name = hare; + hare = Fget (hare, Qface_alias); + if (NILP (hare) || !SYMBOLP (hare)) break; - face_name = aliased; + + tortoise = Fget (tortoise, Qface_alias); + if (EQ (hare, tortoise)) + { + if (signal_p) + Fsignal (Qcircular_list, Fcons (orig_face, Qnil)); + return Qdefault; + } } return face_name; @@ -3310,7 +3332,7 @@ { Lisp_Object lface; - face_name = resolve_face_name (face_name); + face_name = resolve_face_name (face_name, signal_p); if (f) lface = assq_no_quit (face_name, f->face_alist); @@ -4061,7 +4083,7 @@ CHECK_SYMBOL (face); CHECK_SYMBOL (attr); - face = resolve_face_name (face); + face = resolve_face_name (face, 1); /* If FRAME is 0, change face on all frames, and change the default for new frames. */
--- a/src/xmenu.c Thu Apr 28 04:56:56 2005 +0000 +++ b/src/xmenu.c Thu May 05 00:04:55 2005 +0000 @@ -737,7 +737,7 @@ POSITION is a position specification. This is either a mouse button event or a list ((XOFFSET YOFFSET) WINDOW) where XOFFSET and YOFFSET are positions in pixels from the top left -corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.) +corner of WINDOW. (WINDOW may be a window or a frame object.) This controls the position of the top left of the menu as a whole. If POSITION is t, it means to use the current mouse position. @@ -752,8 +752,11 @@ You can also use a list of keymaps as MENU. Then each keymap makes a separate pane. -When MENU is a keymap or a list of keymaps, the return value -is a list of events. + +When MENU is a keymap or a list of keymaps, the return value is the +list of events corresponding to the user's choice. Note that +`x-popup-menu' does not actually execute the command bound to that +sequence of events. Alternatively, you can specify a menu of multiple panes with a list of the form (TITLE PANE1 PANE2...), @@ -2889,6 +2892,9 @@ } } } + else if (!for_click) + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; } @@ -3519,8 +3525,8 @@ entry = Qnil; break; case XM_NO_SELECT: - /* Make "Cancel" equivalent to C-g unless this menu was popped up by - a mouse press. */ + /* Make "Cancel" equivalent to C-g unless FOR_CLICK (which means + the menu was invoked with a mouse event as POSITION). */ if (! for_click) Fsignal (Qquit, Qnil); entry = Qnil;