From 55815819d91fe264b178703fe3ce6862fd0bf6f7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 24 May 2006 02:16:08 +0000 Subject: [PATCH 001/403] *** empty log message *** --- etc/TODO | 4 ++++ src/ChangeLog | 3 +++ 2 files changed, 7 insertions(+) diff --git a/etc/TODO b/etc/TODO index 757e040562a..ea027d8c5ec 100644 --- a/etc/TODO +++ b/etc/TODO @@ -9,6 +9,10 @@ to the FSF. * Small but important fixes needed in existing features: +** In C-x d, the default if you type RET should be the directory name, +but if you type M-n you should get the visited file name of the +current buffer. + ** whitespace-cleanup should work only on the region if the region is active. ** Distribute a bar cursor of width > 1 evenly between the two glyphs diff --git a/src/ChangeLog b/src/ChangeLog index c2fdb389729..8781aacc368 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -18,6 +18,9 @@ 2006-05-21 Richard Stallman + * xfaces.c (best_matching_font): Abort for best == NULL + before we start to use it. + * buffer.c (syms_of_buffer, Fmake_overlay): Doc fixes. 2006-05-20 Kim F. Storm From 4b3a9ba762af11f671ee66e2ce335f9fd26fa66e Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 24 May 2006 07:54:46 +0000 Subject: [PATCH 002/403] (org-open-at-point): Use renamed variable `org-confirm-shell-link-function'. (org-confirm-shell-link-function): Renamed from `org-confirm-shell-links'. (org-export-directory): New function. (org-export-as-ascii, org-export-as-html, org-export-as-xoxo) (org-export-icalendar): Use `org-export-directory'. (org-indent-item): Keep cursor position. (org-link-file-path-type): New option. (org-export-as-html): Fixed bug with plain lists starting in column 0. (org-export-as-html): Removed deadline formatting, this happens now already in `org-html-handle-time-stamps'. (org-export-html-style): Deadline class removed. (org-insert-labeled-timestamps-at-point): New option. (org-cycle, org-occur, org-scan-tags): Use `org-overview' instead of `hide-sublevels 1', in case the first headline is not level 1. (org-overview, org-content): New fuction. (org-cycle-global-status, org-cycle-subtree-status): Make these variables buffer-local. (org-global-cycle): New command. (org-shifttab): Use `org-global-cycle'. (org-insert-heading, org-insert-item): Go to end of new headline/item after creating it. (org-export-visible): Renames from `org-export-copy-visible'. Now creates a temporary org-file and applies an exporting command to it. (org-table-eval-formula): Support for lisp forms. (org-agenda-todo-ignore-scheduled): New option. (org-agenda-get-todos): Use new option `org-agenda-todo-ignore-scheduled'. (org-export-html-inline-images): New value `maybe'. (org-export-as-html): Inlining of images dependent on link description. (org-archive-subtree): Check for end-of-buffer before trying `kill-line'. (org-agenda-follow-mode): New option. (org-export-with-tags, org-export-with-timestamps): New options. (org-html-handle-time-stamps): New function. (org-keyword-time-regexp): New variable. (org-agenda-get-todos): Use `org-agenda-todo-list-sublevels'. (org-agenda-todo-list-sublevels): New option. (org-html-level-start): When TITLE is nil, just close all levels. (org-parse-key-lines, org-parse-export-options): Functions removed, replaced by `org-infile-export-plist'. (org-combine-plists, org-infile-export-plist) (org-default-export-plist): New functions. (org-export-html-preamble, org-export-html-postamble) (org-export-html-auto-preamble, org-export-html-auto-postamble): New variables. (org-export-publishing-directory): New option. (org-export-as-html, org-export-as-ascii): Use the new property lists for settings. (org-export-copy-visible, org-export-as-xoxo): Respect `org-export-publishing-directory'. (org-link-search, org-store-link, org-file-apps): Support for links to BibTeX database entries.. (org-get-current-options, org-set-regexps-and-options): Implement logging as a startup option. (org-store-link): Make sure context string is never empty (org-insert-link): Use relative path when possible. (org-at-item-checklet-p): New function. (org-shifttab, org-shiftmetaleft, org-shiftmetaright) (org-shiftmetaup, org-shiftmetadown, org-metaleft) (org-metaright, org-metaup, org-metadown, org-shiftup) (org-shiftdown, org-shiftright, org-shiftleft) (org-ctrl-c-ctrl-c, org-cycle, org-return, org-meta-return): Dispatch using `call-interactively'. (org-call-with-arg): New defsubst. (org-tag-alist, org-use-fast-tag-selection): New options. (org-complete): Use `org-tag-alist'. (org-fast-tag-insert, org-fast-tag-selection): New functions. (org-next-item, org-previous-item): New commands. (org-beginning-of-item, org-end-of-item): Added (interactive) to make command. (org-shiftup, org-shiftdown): Accommodate the item-navigation commands. --- lisp/textmodes/org.el | 2183 ++++++++++++++++++++++++++++++----------- 1 file changed, 1599 insertions(+), 584 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index ea9aa4448ee..c7ac5bca365 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 4.26 +;; Version: 4.33 ;; ;; This file is part of GNU Emacs. ;; @@ -52,16 +52,17 @@ ;; (define-key global-map "\C-cl" 'org-store-link) ;; (define-key global-map "\C-ca" 'org-agenda) ;; -;; If you have downloaded Org-mode from the Web, you must byte-compile -;; org.el and put it on your load path. In addition to the Emacs Lisp -;; lines above, you also need to add the following lines to .emacs: +;; Furthermore you need to activate font-lock-mode in org-mode buffers. +;; either of the following two lins will do the trick: ;; -;; (autoload 'org-mode "org" "Org mode" t) -;; (autoload 'org-diary "org" "Diary entries from Org mode") -;; (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t) -;; (autoload 'org-store-link "org" "Store a link to the current location" t) -;; (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t) -;; (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode") +;; (global-font-lock-mode 1) ; for all buffers +;; (add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only +;; +;; If you have downloaded Org-mode from the Web, you have to take additional +;; action: Byte-compile org.el and org-publish.el and put them together with +;; org-install.el on your load path. Then also add to your .emacs file: +;; +;; (require 'org-install) ;; ;; This setup will put all files with extension ".org" into Org-mode. As ;; an alternative, make the first line of a file look like this: @@ -81,6 +82,57 @@ ;; ;; Changes since version 4.10: ;; --------------------------- +;; Version 4.33 +;; - New commands to move through plain lists: S-up and S-down. +;; - Bug fixes and documentation update. +;; +;; Version 4.32 +;; - Fast (single-key-per-tag) interface for setting TAGS. +;; - The list of legal tags can be configured globally and locally. +;; - Elisp and Info links (thanks to Todd Neal). +;; - `org-export-publishing-directory' can be an alist, with different +;; directories for different export types. +;; - All context-sensitive commands use `call-interactively' to dispatch. +;; - `org-confirm-shell-links' renamed to `org-confirm-shell-link-function'. +;; - Bug fixes. +;; +;; Version 4.31 +;; - Bug fixes. +;; +;; Version 4.30 +;; - Modified installation: Autoloads have been collected in org-install.el. +;; - Logging (org-log-done) is now a #+STARTUP option. +;; - Checkboxes in plain list items, following up on Frank Ruell's idea. +;; - File links inserted with C-c C-l will use relative paths if the linked +;; file is in the current directory or a subdirectory of it. +;; - New variable `org-link-file-path-type' to specify preference for +;; relative and absolute paths. +;; - New CSS classes for tags, timestamps, timestamp keywords. +;; - Bug and typo fixes. +;; +;; Version 4.29 +;; - Inlining images in HTML export now depends on wheather the link +;; contains a description or not. +;; - TODO items can be scheduled from the global TODO list using C-c C-s. +;; - TODO items already scheduled can be made to disappear from the global +;; todo list, see `org-agenda-todo-ignore-scheduled'. +;; - In Tables, formulas may also be Lisp forms. +;; - Exporting the visible part of an outline with `C-c C-x v' works now +;; for all available exporters. +;; - Bug fixes, lots of them :-( +;; +;; Version 4.28 +;; - Bug fixes. +;; +;; Version 4.27 +;; - HTML exporter generalized to receive external options. +;; As part of the process, author, email and date have been moved to the +;; end of the HTML file. +;; - Support for customizable file search in file links. +;; - BibTeX database links as first application of the above. +;; - New option `org-agenda-todo-list-sublevels' to turn off listing TODO +;; entries that are sublevels of another TODO entry. +;; ;; Version 4.26 ;; - Bug fixes. ;; @@ -137,7 +189,7 @@ ;;; Customization variables -(defvar org-version "4.26" +(defvar org-version "4.33" "The version number of the file org.el.") (defun org-version () (interactive) @@ -325,6 +377,18 @@ An entry can be toggled between QUOTE and normal with :tag "Org Cycle" :group 'org-structure) +(defcustom org-cycle-global-at-bob t + "Cycle globally if cursor is at beginning of buffer and not at a headline. +This makes it possible to do global cycling without having to use S-TAB or +C-u TAB. For this special case to work, the first line of the buffer +must not be a headline - it may be empty ot some other text. When used in +this way, `org-cycle-hook' is disables temporarily, to make sure the +cursor stays at the beginning of the buffer. +When this option is nil, don't do anything special at the beginning +of the buffer." + :group 'org-cycle + :type 'boolean) + (defcustom org-cycle-emulate-tab t "Where should `org-cycle' emulate TAB. nil Never @@ -376,6 +440,11 @@ body starts at column 0, indentation is not changed at all." :group 'org-edit-structure :type 'boolean) +(defcustom org-insert-heading-hook nil + "Hook being run after inserting a new heading." + :group 'org-edit-structure + :type 'boolean) + (defcustom org-enable-fixed-width-editor t "Non-nil means, lines starting with \":\" are treated as fixed-width. This currently only means, they are never auto-wrapped. @@ -756,6 +825,23 @@ additional URL: prefix, so the format would be \"\"." (const :tag "\"\" (e.g. )" "") (string :tag "Other" :value "<%s>"))) +(defcustom org-link-file-path-type 'adaptive + "How the path name in file links should be stored. +Valid values are: + +relative relative to the current directory, i.e. the directory of the file + into which the link is being inserted. +absolute absolute path, if possible with ~ for home directory. +noabbrev absolute path, no abbreviation of home directory. +adaptive Use relative path for files in the current directory and sub- + directories of it. For other files, use an absolute path." + :group 'org-link + :type '(choice + (const relative) + (const absolute) + (const noabbrev) + (const adaptive))) + (defcustom org-activate-links '(bracket angle plain radio tag date) "Types of links that should be activated in Org-mode files. This is a list of symbols, each leading to the activation of a certain link @@ -898,15 +984,32 @@ When nil, an error will be generated." :group 'org-link-follow :type 'boolean) -(defcustom org-confirm-shell-links 'yes-or-no-p +(defcustom org-confirm-shell-link-function 'yes-or-no-p "Non-nil means, ask for confirmation before executing shell links. Shell links can be dangerous, just thing about a link [[shell:rm -rf ~/*][Google Search]] This link would show up in your Org-mode document as \"Google Search\" -but really it would remove your entire home directory. Dangerous indeed. -Therefore I *definitely* advise agains setting this varaiable to nil. +but really it would remove your entire home directory. +Therefore I *definitely* advise against setting this variable to nil. +Just change it to `y-or-n-p' of you want to confirm with a single key press +rather than having to type \"yes\"." + :group 'org-link-follow + :type '(choice + (const :tag "with yes-or-no (safer)" yes-or-no-p) + (const :tag "with y-or-n (faster)" y-or-n-p) + (const :tag "no confirmation (dangerous)" nil))) + +(defcustom org-confirm-elisp-link-function 'yes-or-no-p + "Non-nil means, ask for confirmation before executing elisp links. +Elisp links can be dangerous, just thing about a link + + [[elisp:(shell-command \"rm -rf ~/*\")][Google Search]] + +This link would show up in your Org-mode document as \"Google Search\" +but really it would remove your entire home directory. +Therefore I *definitely* advise against setting this variable to nil. Just change it to `y-or-n-p' of you want to confirm with a single key press rather than having to type \"yes\"." :group 'org-link-follow @@ -934,7 +1037,11 @@ for some files for which the OS does not have a good default. See `org-file-apps'.") (defconst org-file-apps-defaults-windowsnt - '((t . (w32-shell-execute "open" file))) + (list (cons t + (list (if (featurep 'xemacs) + 'mswindows-shell-execute + 'w32-shell-execute) + "open" 'file))) "Default file applications on a Windows NT system. The system \"open\" is used for most files. See `org-file-apps'.") @@ -946,18 +1053,25 @@ See `org-file-apps'.") ("ltx" . emacs) ("org" . emacs) ("el" . emacs) + ("bib" . emacs) ) "External applications for opening `file:path' items in a document. Org-mode uses system defaults for different file types, but you can use this variable to set the application for a given file -extension. The entries in this list are cons cells with a file extension -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 - 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'. +extension. The entries in this list are cons cells where the car identifies +files and the cdr the corresponding command. Possible values for the +file identifier are + \"ext\" A string identifying an extension + `directory' Matches a directory + t Default for all remaining files + +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 + 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'. For more examples, see the system specific constants `org-file-apps-defaults-macosx' `org-file-apps-defaults-windowsnt' @@ -1085,7 +1199,12 @@ Lisp variable `state'." (defcustom org-log-done nil "When set, insert a (non-active) time stamp when TODO entry is marked DONE. When the state of an entry is changed from nothing to TODO, remove a previous -closing date." +closing date. +This can also be configured on a per-file basis by adding one of +the following lines anywhere in the buffer: + + #+STARTUP: logging + #+STARTUP: nologging" :group 'org-todo :type 'boolean) @@ -1110,6 +1229,14 @@ This is the priority an item get if no explicit priority is given." :tag "Org Time" :group 'org) +(defcustom org-insert-labeled-timestamps-at-point nil + "Non-nil means, SCHEDULED and DEADLINE timestamps are inserted at point. +When nil, these labeled time stamps are forces into the second line of an +entry, just after the headline. When scheduling from the global TODO list, +the time stamp will always be forced into the second line." + :group 'org-time + :type 'boolean) + (defconst org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>") "Formats for `format-time-string' which are used for time stamps. It is not recommended to change this constant.") @@ -1149,6 +1276,32 @@ moved to the new date." :tag "Org Tags" :group 'org) +(defcustom org-tag-alist nil + "List of tags allowed in Org-mode files. +When this list is nil, Org-mode will base TAG input on what is already in the +buffer. +The value of this variable is an alist, the car may be (and should) be a +character that is used to select that tag through the fast-tag-selection +interface. See the manual for details." + :group 'org-tags + :type '(repeat + (cons (character) (string :tag "Tag")))) + +(defcustom org-use-fast-tag-selection 'auto + "Non-nil means, use fast tag selection scheme. +This is a special interface to select and deselect tags with single keys. +When nil, fast selection is never used. +When the symbol `auto', fast selection is used if and only if selection +characters for tags have been configured, either through the variable +`org-tag-alist' or through a #+TAGS line in the buffer. +When t, fast selection is always used and selection keys are assigned +automatically if necessary." + :group 'org-tags + :type '(choice + (const :tag "Always" t) + (const :tag "Never" nil) + (const :tag "When selection characters are configured" 'auto))) + (defcustom org-tags-column 48 "The column to which tags should be indented in a headline. If this number is positive, it specifies the column. If it is negative, @@ -1234,6 +1387,7 @@ key The key (a single char as a string) to be associated with the command. type The command type, any of the following symbols: todo Entries with a specific TODO keyword, in all agenda files. tags Tags match in all agenda files. + tags-todo Tags match in all agenda files, TODO entries only. todo-tree Sparse tree of specific TODO keyword in *current* file. tags-tree Sparse tree with all tags matches in *current* file. occur-tree Occur sparse tree for current file. @@ -1246,13 +1400,31 @@ match What to search for: (list (string :tag "Key") (choice :tag "Type" (const :tag "Tags search in all agenda files" tags) + (const :tag "Tags search of TODO entries, all agenda files" tags-todo) (const :tag "TODO keyword search in all agenda files" todo) (const :tag "Tags sparse tree in current buffer" tags-tree) (const :tag "TODO keyword tree in current buffer" todo-tree) (const :tag "Occur tree in current buffer" occur-tree)) (string :tag "Match")))) -(defcustom org-agenda-include-all-todo t +;; FIXME: Need a toggle for this variable, maybe a mode in the agenda buffer? +(defcustom org-agenda-todo-list-sublevels t + "Non-nil means, check also the sublevels of a TODO entry for TODO entries. +When nil, the sublevels of a TODO entry are not checked, resulting in +potentially much shorter TODO lists." + :group 'org-agenda + :group 'org-todo + :type 'boolean) + +(defcustom org-agenda-todo-ignore-scheduled nil + "Non-nil means, don't show scheduled entries in the global todo list. +The idea behind this is that by scheduling it, you have already taken care +of this item." + :group 'org-agenda + :group 'org-todo + :type 'boolean) + +(defcustom org-agenda-include-all-todo nil "Non-nil means, the agenda will always contain all TODO entries. When nil, date-less entries will only be shown if `org-agenda' is called with a prefix argument. @@ -1274,7 +1446,7 @@ forth between agenda and calendar." :group 'org-agenda :type 'sexp) -(defgroup org-agenda-window-setup nil +(defgroup org-agenda-setup nil "Options concerning setting up the Agenda window in Org Mode." :tag "Org Agenda Window Setup" :group 'org-agenda) @@ -1286,6 +1458,11 @@ Needs to be set before org.el is loaded." :group 'org-agenda-setup :type 'boolean) +(defcustom org-agenda-start-with-follow-mode nil + "The initial value of follwo-mode in a newly created agenda window." + :group 'org-agenda-setup + :type 'boolean) + (defcustom org-select-timeline-window t "Non-nil means, after creating a timeline, move cursor into Timeline window. When nil, cursor will remain in the current window." @@ -1482,7 +1659,7 @@ See also the variables `org-agenda-remove-times-when-in-prefix' and Depending on which command was used last, this may be the compiled version of `org-agenda-prefix-format' or `org-timeline-prefix-format'.") -;; FIXME: There seem to be situations where this does no work. +;; FIXME: There seem to be situations where this does not work. (defcustom org-agenda-remove-times-when-in-prefix t "Non-nil means, remove duplicate time specifications in agenda items. When the format `org-agenda-prefix-format' contains a `%t' specifier, a @@ -1520,6 +1697,23 @@ When this is the symbol `prefix', only remove tags when :tag "Org Export General" :group 'org-export) +(defcustom org-export-publishing-directory "." + "Path to the location where exported files should be located. +This path may be relative to the directory where the Org-mode file lives. +The default is to put them into the same directory as the Org-mode file. +The variable may also be an alist with export types `:html', `:ascii', +`:ical', or `:xoxo' and the corresponding directories. If a direcoty path +is relative, it is interpreted relative to the directory where the exported +Org-mode files lives." + :group 'org-export-general + :type '(choice + (directory) + (repeat + (cons + (choice :tag "Type" + (const :html) (const :ascii) (const :ical) (const :xoxo)) + (directory))))) + (defcustom org-export-language-setup '(("en" "Author" "Date" "Table of Contents") ("da" "Ophavsmand" "Dato" "Indhold") @@ -1591,6 +1785,21 @@ This option can also be set with the +OPTIONS line, e.g. \"\\n:t\"." :group 'org-export-general :type 'boolean) +(defcustom org-export-with-timestamps t + "Nil means, do not export time stamps and associated keywords." + :group 'org-export + :type 'boolean) + +(defcustom org-export-with-tags t + "Nil means, do not export tags, just remove them from headlines." + :group 'org-export-general + :type 'boolean) + +(defcustom org-export-with-timestamps t + "Nil means, do not export timestamps and associated keywords." + :group 'org-export-general + :type 'boolean) + (defgroup org-export-translation nil "Options for translating special ascii sequences for the export backends." :tag "Org Export Translation" @@ -1725,7 +1934,8 @@ Otherwise the buffer will just be saved to a file and stay hidden." :tag "Org Export XML" :group 'org-export) -(defcustom org-export-xml-type 'xoxo ;kw, if we have only one. +;; FIXME: I am told XOXO is not XML, it is semantic-only HTML. +(defcustom org-export-xml-type 'xoxo "The kind of XML to be produced by the XML exporter. Allowed values are: xoxo The XOXO exporter." @@ -1745,8 +1955,11 @@ xoxo The XOXO exporter." font-size: 12pt; } .title { text-align: center; } - .todo, .deadline { color: red; } + .todo { color: red; } .done { color: green; } + .timestamp { color: grey } + .timestamp-kwd { color: CadetBlue } + .tag { background-color:lightblue; font-weight:normal } .target { background-color: lavender; } pre { border: 1pt solid #AEBDCC; @@ -1796,13 +2009,16 @@ When nil, the links still point to the plain `.org' file." :group 'org-export-html :type 'boolean) -(defcustom org-export-html-inline-images t +(defcustom org-export-html-inline-images 'maybe "Non-nil means, inline images into exported HTML pages. -The link will still be to the original location of the image file. -So if you are moving the page, lets say to your public HTML site, -you will have to move the image and maybe change the link." +This is done using an tag. When nil, an anchor with href is used to +link to the image. If this option is `maybe', then images in links with +an empty description will be inlined, while images with a description will +be linked only." :group 'org-export-html - :type 'boolean) + :type '(choice (const :tag "Never" nil) + (const :tag "Always" t) + (const :tag "When there is no description" maybe))) (defcustom org-export-html-expand t "Non-nil means, for HTML export, treat @<...> as HTML tag. @@ -1847,7 +2063,8 @@ Otherwise, the buffer will just be saved to a file and stay hidden." (defcustom org-combined-agenda-icalendar-file "~/org.ics" "The file name for the iCalendar file covering all agenda files. -This file is created with the command \\[org-export-icalendar-all-agenda-files]." +This file is created with the command \\[org-export-icalendar-all-agenda-files]. +The file name should be absolute." :group 'org-export-icalendar :type 'file) @@ -2003,7 +2220,7 @@ color of the frame." (org-compatible-face '((((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) - (((class color) (min-colors 8)) (:foreground "blue")))) ;; FIXME: for dark bg? + (((class color) (min-colors 8)) (:foreground "blue")))) "Face used for level 7 headlines." :group 'org-faces) @@ -2124,7 +2341,7 @@ This face is only used if `org-fontify-done-headline' is set." (org-compatible-face '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) - (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))) ; FIXME: turn off??? + (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))) "Face used for time grids." :group 'org-faces) @@ -2193,21 +2410,46 @@ This face is only used if `org-fontify-done-headline' is set." (defvar org-scheduled-time-regexp nil "Matches the SCHEDULED keyword together with a time stamp.") (make-variable-buffer-local 'org-scheduled-time-regexp) +(defvar org-closed-time-regexp nil + "Matches the CLOSED keyword together with a time stamp.") +(make-variable-buffer-local 'org-closed-time-regexp) + +(defvar org-keyword-time-regexp nil + "Matches any of the 3 keywords, together with the time stamp.") +(make-variable-buffer-local 'org-keyword-time-regexp) +(defvar org-maybe-keyword-time-regexp nil + "Matches a timestamp, possibly preceeded by a keyword.") +(make-variable-buffer-local 'org-keyword-time-regexp) + +(defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t + mouse-map t) + "Properties to remove when a string without properties is wanted.") + +(defsubst org-match-string-no-properties (num &optional string) + (if (featurep 'xemacs) + (let ((s (match-string num string))) + (remove-text-properties 0 (length s) org-rm-props s) + s) + (match-string-no-properties num string))) + +(defsubst org-no-properties (s) + (remove-text-properties 0 (length s) org-rm-props s) + s) (defun org-set-regexps-and-options () "Precompute regular expressions for current buffer." (when (eq major-mode 'org-mode) (let ((re (org-make-options-regexp '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" - "STARTUP" "ARCHIVE"))) + "STARTUP" "ARCHIVE" "TAGS"))) (splitre "[ \t]+") - kwds int key value cat arch) + kwds int key value cat arch tags) (save-excursion (save-restriction (widen) (goto-char (point-min)) (while (re-search-forward re nil t) - (setq key (match-string 1) value (match-string 2)) + (setq key (match-string 1) value (org-match-string-no-properties 2)) (cond ((equal key "CATEGORY") (if (string-match "[ \t]+$" value) @@ -2222,6 +2464,8 @@ This face is only used if `org-fontify-done-headline' is set." ((equal key "TYP_TODO") (setq int 'type kwds (append kwds (org-split-string value splitre)))) + ((equal key "TAGS") + (setq tags (append tags (org-split-string value splitre)))) ((equal key "STARTUP") (let ((opts (org-split-string value splitre)) (set '(("fold" org-startup-folded t) @@ -2235,6 +2479,8 @@ This face is only used if `org-fontify-done-headline' is set." ("oddeven" org-odd-levels-only nil) ("align" org-startup-align-all-tables t) ("noalign" org-startup-align-all-tables nil) + ("logging" org-log-done t) + ("nologging" org-log-done nil) ("dlcheck" org-startup-with-deadline-check t) ("nodlcheck" org-startup-with-deadline-check nil))) l var val) @@ -2250,7 +2496,20 @@ This face is only used if `org-fontify-done-headline' is set." (and cat (set (make-local-variable 'org-category) cat)) (and kwds (set (make-local-variable 'org-todo-keywords) kwds)) (and arch (set (make-local-variable 'org-archive-location) arch)) - (and int (set (make-local-variable 'org-todo-interpretation) int))) + (and int (set (make-local-variable 'org-todo-interpretation) int)) + (when tags + (let (e tg c tgs) + (while (setq e (pop tags)) + (if (string-match "^\\([0-9a-zA-Z_@]+\\)(\\(.\\))$" e) + (push (cons (match-string 1 e) + (string-to-char (match-string 2 e))) + tgs) + (push (list e) tgs))) + (set (make-local-variable 'org-tag-alist) nil) + (while (setq e (pop tgs)) + (or (assoc (car e) org-tag-alist) + (push e org-tag-alist)))))) + ;; Compute the regular expressions and other local variables (setq org-todo-kwd-priority-p (equal org-todo-interpretation 'priority) org-todo-kwd-max-priority (1- (length org-todo-keywords)) @@ -2282,7 +2541,20 @@ This face is only used if `org-fontify-done-headline' is set." org-scheduled-regexp (concat "\\<" org-scheduled-string) org-scheduled-time-regexp - (concat "\\<" org-scheduled-string " *<\\([^>]+\\)>")) + (concat "\\<" org-scheduled-string " *<\\([^>]+\\)>") + org-closed-time-regexp + (concat "\\<" org-closed-string " *\\[\\([^]]+\\)\\]") + org-keyword-time-regexp + (concat "\\<\\(" org-scheduled-string + "\\|" org-deadline-string + "\\|" org-closed-string "\\)" + " *[[<]\\([^]>]+\\)[]>]") ;; FIXME: is this correct? + org-maybe-keyword-time-regexp + (concat "\\(\\<\\(" org-scheduled-string + "\\|" org-deadline-string + "\\|" org-closed-string "\\)\\)?" + " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*?[]>]\\)")) ;; FIXME: is this correct? + (org-set-font-lock-defaults))) ;; Tell the compiler about dynamically scoped variables, @@ -2298,14 +2570,9 @@ This face is only used if `org-fontify-done-headline' is set." (defvar mark-active) ; Emacs only, not available in XEmacs. (defvar timecnt) ; dynamically scoped parameter (defvar levels-open) ; dynamically scoped parameter -(defvar title) ; dynamically scoped parameter -(defvar author) ; dynamically scoped parameter -(defvar email) ; dynamically scoped parameter -(defvar text) ; dynamically scoped parameter (defvar entry) ; dynamically scoped parameter (defvar date) ; dynamically scoped parameter -(defvar language) ; dynamically scoped parameter -(defvar options) ; dynamically scoped parameter +(defvar description) ; dynamically scoped parameter (defvar ans1) ; dynamically scoped parameter (defvar ans2) ; dynamically scoped parameter (defvar starting-day) ; local variable @@ -2330,6 +2597,9 @@ This face is only used if `org-fontify-done-headline' is set." (defvar annotation) ; from remember.el, dynamically scoped in `remember-mode' (defvar initial) ; from remember.el, dynamically scoped in `remember-mode' (defvar orgtbl-mode) ; defined later in this file +(defvar Info-current-file) ; from info.el +(defvar Info-current-node) ; from info.el + ;;; Define the mode (defvar org-mode-map @@ -2372,11 +2642,31 @@ can be exported as a structured ASCII or HTML file. The following commands are available: \\{org-mode-map}" + + ;; Get rid of Outline menus, they are not needed + ;; Need to do this here because define-derived-mode sets up + ;; the keymap so late. + (if (featurep 'xemacs) + (if org-noutline-p + (progn + (easy-menu-remove outline-mode-menu-heading) + (easy-menu-remove outline-mode-menu-show) + (easy-menu-remove outline-mode-menu-hide)) + (delete-menu-item '("Headings")) + (delete-menu-item '("Show")) + (delete-menu-item '("Hide")) + (set-menubar-dirty-flag)) + (define-key org-mode-map [menu-bar headings] 'undefined) + (define-key org-mode-map [menu-bar hide] 'undefined) + (define-key org-mode-map [menu-bar show] 'undefined)) + (easy-menu-add org-org-menu) (easy-menu-add org-tbl-menu) (org-install-agenda-files-menu) (if org-descriptive-links (org-add-to-invisibility-spec '(org-link))) (org-add-to-invisibility-spec '(org-cwidth)) + (when (featurep 'xemacs) + (set (make-local-variable 'line-move-ignore-invisible) t)) (setq outline-regexp "\\*+") ;;(setq outline-regexp "\\(?:\\*+\\|[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\) \\)") (setq outline-level 'org-outline-level) @@ -2405,19 +2695,6 @@ The following commands are available: (= (point-min) (point-max))) (insert " -*- mode: org -*-\n\n")) - ;; Get rid of Outline menus, they are not needed - ;; Need to do this here because define-derived-mode sets up - ;; the keymap so late. - (if (featurep 'xemacs) - (progn - (delete-menu-item '("Headings")) - (delete-menu-item '("Show")) - (delete-menu-item '("Hide")) - (set-menubar-dirty-flag)) - (define-key org-mode-map [menu-bar headings] 'undefined) - (define-key org-mode-map [menu-bar hide] 'undefined) - (define-key org-mode-map [menu-bar show] 'undefined)) - (unless org-inhibit-startup (if org-startup-align-all-tables (org-table-map-tables 'org-table-align)) @@ -2430,24 +2707,13 @@ The following commands are available: (let ((this-command 'org-cycle) (last-command 'org-cycle)) (org-cycle '(4)) (org-cycle '(4)))))))) +(defsubst org-call-with-arg (command arg) + "Call COMMAND interactively, but pretend prefix are was ARG." + (let ((current-prefix-arg arg)) (call-interactively command))) + (defsubst org-current-line (&optional pos) (+ (if (bolp) 1 0) (count-lines (point-min) (or pos (point))))) -(defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t - mouse-map t) - "Properties to remove when a string without properties is wanted.") - -(defsubst org-match-string-no-properties (num &optional string) - (if (featurep 'xemacs) - (let ((s (match-string num string))) - (remove-text-properties 0 (length s) org-rm-props s) - s) - (match-string-no-properties num string))) - -(defsubst org-no-properties (s) - (remove-text-properties 0 (length s) org-rm-props s) - s) - (defun org-current-time () "Current time, possibly rounded to `org-time-stamp-rounding-minutes'." (if (> org-time-stamp-rounding-minutes 0) @@ -2488,7 +2754,7 @@ that will be added to PLIST. Returns the string that was modified." (defconst org-non-link-chars "]\t\n\r<>") (defconst org-link-types '("https?" "ftp" "mailto" "file" "news" "bbdb" "vm" - "wl" "mhe" "rmail" "gnus" "shell")) + "wl" "mhe" "rmail" "gnus" "shell" "info" "elisp")) (defconst org-link-re-with-space (concat "") '(1 'org-special-keyword t)) '("^#.*" (0 'font-lock-comment-face t)) + ;; DONE (if org-fontify-done-headline (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>") '(1 'org-done t) '(2 'org-headline-done t)) (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\>") '(1 'org-done t))) + ;; Table stuff '("^[ \t]*\\(:.*\\)" (1 'org-table t)) '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) @@ -2795,7 +3070,11 @@ between words." ;;; Visibility cycling (defvar org-cycle-global-status nil) +(make-variable-buffer-local 'org-cycle-global-status) (defvar org-cycle-subtree-status nil) +(make-variable-buffer-local 'org-cycle-subtree-status) + +;;;###autoload (defun org-cycle (&optional arg) "Visibility cycling for Org-mode. @@ -2825,15 +3104,17 @@ between words." no headline in line 1, this function will act as if called with prefix arg." (interactive "P") - (if (or (and (bobp) (not (looking-at outline-regexp))) - (equal arg '(4))) - ;; special case: use global cycling - (setq arg t)) + (let* ((outline-regexp + (if org-cycle-include-plain-lists + "\\*+\\|\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) " + outline-regexp)) + (bob-special (and org-cycle-global-at-bob (bobp) + (not (looking-at outline-regexp)))) + (org-cycle-hook (if bob-special nil org-cycle-hook))) - (let ((outline-regexp - (if org-cycle-include-plain-lists - "\\*+\\|\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) " - outline-regexp))) + (if (or bob-special (equal arg '(4))) + ;; special case: use global cycling + (setq arg t)) (cond @@ -2843,7 +3124,7 @@ between words." (progn (if arg (org-table-edit-field t) (org-table-justify-field-maybe) - (org-table-next-field))))) + (call-interactively 'org-table-next-field))))) ((eq arg t) ;; Global cycling @@ -2853,18 +3134,8 @@ between words." ;; We just created the overview - now do table of contents ;; This can be slow in very large buffers, so indicate action (message "CONTENTS...") - (save-excursion - ;; Visit all headings and show their offspring - (goto-char (point-max)) - (catch 'exit - (while (and (progn (condition-case nil - (outline-previous-visible-heading 1) - (error (goto-char (point-min)))) - t) - (looking-at outline-regexp)) - (show-branches) - (if (bobp) (throw 'exit nil)))) - (message "CONTENTS...done")) + (org-content) + (message "CONTENTS...done") (setq org-cycle-global-status 'contents) (run-hook-with-args 'org-cycle-hook 'contents)) @@ -2878,7 +3149,7 @@ between words." (t ;; Default action: go to overview - (hide-sublevels 1) + (org-overview) (message "OVERVIEW") (setq org-cycle-global-status 'overview) (run-hook-with-args 'org-cycle-hook 'overview)))) @@ -2908,10 +3179,10 @@ between words." (outline-next-heading)) ;; Find out what to do next and set `this-command' (cond - ((= eos eoh) + ((and (= eos eoh) ;; Nothing is hidden behind this heading (message "EMPTY ENTRY") - (setq org-cycle-subtree-status nil)) + (setq org-cycle-subtree-status nil))) ((>= eol eos) ;; Entire subtree is hidden in one line: open it (org-show-entry) @@ -2951,6 +3222,44 @@ between words." (org-back-to-heading) (org-cycle)))))) +;;;###autoload +(defun org-global-cycle () + "Cycle the global visibility. For details see `org-cycle'." + (interactive) + (org-cycle '(4))) + +(defun org-overview () + "Switch to overview mode, shoing only top-level headlines. +Really, this shows all headlines with level equal or greater than the level +of the first headline in the buffer. This is important, because if the +first headline is not level one, then (hide-sublevels 1) gives confusing +results." + (interactive) + (hide-sublevels (save-excursion + (goto-char (point-min)) + (if (re-search-forward (concat "^" outline-regexp) nil t) + (progn + (goto-char (match-beginning 0)) + (funcall outline-level)) + 1)))) + +;; FIXME: allow an argument to give a limiting level for this. +(defun org-content () + "Show all headlines in the buffer, like a table of contents" + (interactive) + (save-excursion + ;; Visit all headings and show their offspring + (goto-char (point-max)) + (catch 'exit + (while (and (progn (condition-case nil + (outline-previous-visible-heading 1) + (error (goto-char (point-min)))) + t) + (looking-at outline-regexp)) + (show-branches) + (if (bobp) (throw 'exit nil)))))) + + (defun org-optimize-window-after-visibility-change (state) "Adjust the window after a change in outline visibility. This function is the default value of the hook `org-cycle-hook'." @@ -3071,7 +3380,6 @@ or nil." (kill-buffer "*org-goto*") org-selected-point)) -;; FIXME: It may not be a good idea to temper with the prefix argument... (defun org-goto-ret (&optional arg) "Finish `org-goto' by going to the new location." (interactive "P") @@ -3114,26 +3422,36 @@ or nil." "To temporarily disable the active region.") (defun org-insert-heading (&optional force-heading) - "Insert a new heading or item with same depth at point." + "Insert a new heading or item with same depth at point. +If point is in a plain list and FORCE-HEADING is nil, create a new list item. +If point is at the beginning of a headline, insert a sibling before the +current headline. If point is in the middle of a headline, split the headline +at that position and make the rest of the headline part of the sibling below +the current headline." (interactive "P") - (when (or force-heading (not (org-insert-item))) - (let* ((head (save-excursion - (condition-case nil - (org-back-to-heading) - (error (outline-next-heading))) - (prog1 (match-string 0) - (funcall outline-level))))) - (cond - ((and (org-on-heading-p) (bolp) - (save-excursion (backward-char 1) (not (org-invisible-p)))) - (open-line 1)) - ((bolp) nil) - (t (newline))) - (insert head) - (just-one-space) - (run-hooks 'org-insert-heading-hook)))) + (if (= (buffer-size) 0) + (insert "\n* ") + (when (or force-heading (not (org-insert-item))) + (let* ((head (save-excursion + (condition-case nil + (progn + (org-back-to-heading) + (match-string 0)) + (error "*")))) + pos) + (cond + ((and (org-on-heading-p) (bolp) + (save-excursion (backward-char 1) (not (org-invisible-p)))) + (open-line 1)) + ((bolp) nil) + (t (newline))) + (insert head) (just-one-space) + (setq pos (point)) + (end-of-line 1) + (unless (= (point) pos) (just-one-space) (backward-delete-char 1)) + (run-hooks 'org-insert-heading-hook))))) -(defun org-insert-item () +(defun org-insert-item (&optional checkbox) "Insert a new item at the current level. Return t when things worked, nil when we are not in an item." (when (save-excursion @@ -3144,9 +3462,11 @@ Return t when things worked, nil when we are not in an item." t) (error nil))) (let* ((bul (match-string 0)) + (end (match-end 0)) (eow (save-excursion (beginning-of-line 1) (looking-at "[ \t]*") (match-end 0))) - (eowcol (save-excursion (goto-char eow) (current-column)))) + (eowcol (save-excursion (goto-char eow) (current-column))) + pos) (cond ((and (org-at-item-p) (<= (point) eow)) ;; before the bullet @@ -3155,8 +3475,11 @@ Return t when things worked, nil when we are not in an item." ((<= (point) eow) (beginning-of-line 1)) (t (newline))) - (insert bul) - (just-one-space)) + (insert bul (if checkbox "[ ]" "")) + (just-one-space) + (setq pos (point)) + (end-of-line 1) + (unless (= (point) pos) (just-one-space) (backward-delete-char 1))) (org-maybe-renumber-ordered-list) t)) @@ -3165,16 +3488,19 @@ Return t when things worked, nil when we are not in an item." If the heading has no TODO state, or if the state is DONE, use the first state (TODO by default). Also with prefix arg, force first state." (interactive "P") - (org-insert-heading) - (save-excursion - (org-back-to-heading) - (outline-previous-heading) - (looking-at org-todo-line-regexp)) - (if (or arg - (not (match-beginning 2)) - (equal (match-string 2) org-done-string)) - (insert (car org-todo-keywords) " ") - (insert (match-string 2) " "))) + (when (not (org-insert-item 'checkbox)) + (org-insert-heading) + (save-excursion + (org-back-to-heading) + (if org-noutline-p + (outline-previous-heading) + (outline-previous-visible-heading t)) + (looking-at org-todo-line-regexp)) + (if (or arg + (not (match-beginning 2)) + (equal (match-string 2) org-done-string)) + (insert (car org-todo-keywords) " ") + (insert (match-string 2) " ")))) (defun org-promote-subtree () "Promote the entire subtree. @@ -3510,6 +3836,21 @@ If optional TXT is given, check this string instead of the current kill." ((= llt ?\)) "\\([ \t]*\\([-+]\\|\\([0-9]+)\\)\\)\\|[ \t]+\\*\\)\\( \\|$\\)") (t (error "Invalid value of `org-plain-list-ordered-item-terminator'"))))))) +(defun org-at-item-checkbox-p () + "Is point at a line starting a plain-list item with a checklet?" + (and (org-at-item-p) + (save-excursion + (goto-char (match-end 0)) + (skip-chars-forward " \t") + (looking-at "\\[[ X]\\]")))) + +(defun org-toggle-checkbox () + "Toggle the checkbox in the current line." + (interactive) + (save-excursion + (if (org-at-item-checkbox-p) + (replace-match (if (equal (match-string 0) "[ ]") "[X]" "[ ]") t t)))) + (defun org-get-indentation () "Get the indentation of the current line, interpreting tabs." (save-excursion @@ -3520,6 +3861,7 @@ If optional TXT is given, check this string instead of the current kill." (defun org-beginning-of-item () "Go to the beginning of the current hand-formatted item. If the cursor is not in an item, throw an error." + (interactive) (let ((pos (point)) (limit (save-excursion (org-back-to-heading) (beginning-of-line 2) (point))) @@ -3545,6 +3887,7 @@ If the cursor is not in an item, throw an error." (defun org-end-of-item () "Go to the end of the current hand-formatted item. If the cursor is not in an item, throw an error." + (interactive) (let ((pos (point)) (limit (save-excursion (outline-next-heading) (point))) (ind (save-excursion @@ -3564,11 +3907,47 @@ If the cursor is not in an item, throw an error." (goto-char pos) (error "Not in an item")))) -(defun org-move-item-down (arg) +(defun org-next-item () + "Move to the beginning of the next item in the current plain list. +Error if not at a plain list, or if this is the last item in the list." + (interactive) + (let (beg end ind ind1 (pos (point)) txt) + (org-beginning-of-item) + (setq beg (point)) + (setq ind (org-get-indentation)) + (org-end-of-item) + (setq end (point)) + (setq ind1 (org-get-indentation)) + (unless (and (org-at-item-p) (= ind ind1)) + (goto-char pos) + (error "This is already the last item in the list")))) + +(defun org-previous-item () + "Move to the beginning of the previous item in the current plain list. +Error if not at a plain list, or if this is the last item in the list." + (interactive) + (let (beg end ind ind1 (pos (point)) txt) + (org-beginning-of-item) + (setq beg (point)) + (setq ind (org-get-indentation)) + (goto-char beg) + (catch 'exit + (while t + (beginning-of-line 0) + (if (looking-at "[ \t]*$") + nil + (if (<= (setq ind1 (org-get-indentation)) ind) + (throw 'exit t))))) + (condition-case nil + (org-beginning-of-item) + (error (goto-char pos) + (error "This is already the first item in the list"))))) + +(defun org-move-item-down () "Move the plain list item at point down, i.e. swap with following item. Subitems (items with larger indentation) are considered part of the item, so this really moves item trees." - (interactive "p") + (interactive) (let (beg end ind ind1 (pos (point)) txt) (org-beginning-of-item) (setq beg (point)) @@ -3647,7 +4026,7 @@ doing the renumbering." (defun org-renumber-ordered-list (arg) "Renumber an ordered plain list. -Cursor next to be in the first line of an item, the line that starts +Cursor needs to be in the first line of an item, the line that starts with something like \"1.\" or \"2)\"." (interactive "p") (unless (and (org-at-item-p) @@ -3702,24 +4081,24 @@ with something like \"1.\" or \"2)\"." (interactive "p") (unless (org-at-item-p) (error "Not on an item")) - (let (beg end ind ind1) - (if (memq last-command '(org-shiftmetaright org-shiftmetaleft)) + (save-excursion + (let (beg end ind ind1) + (if (memq last-command '(org-shiftmetaright org-shiftmetaleft)) (setq beg org-last-indent-begin-marker end org-last-indent-end-marker) - (org-beginning-of-item) - (setq beg (move-marker org-last-indent-begin-marker (point))) - (org-end-of-item) - (setq end (move-marker org-last-indent-end-marker (point)))) - (goto-char beg) - (skip-chars-forward " \t") (setq ind (current-column)) - (if (< (+ arg ind) 0) (error "Cannot outdent beyond margin")) - (while (< (point) end) - (beginning-of-line 1) - (skip-chars-forward " \t") (setq ind1 (current-column)) - (delete-region (point-at-bol) (point)) - (indent-to-column (+ ind1 arg)) - (beginning-of-line 2)) - (goto-char beg))) + (org-beginning-of-item) + (setq beg (move-marker org-last-indent-begin-marker (point))) + (org-end-of-item) + (setq end (move-marker org-last-indent-end-marker (point)))) + (goto-char beg) + (skip-chars-forward " \t") (setq ind (current-column)) + (if (< (+ arg ind) 0) (error "Cannot outdent beyond margin")) + (while (< (point) end) + (beginning-of-line 1) + (skip-chars-forward " \t") (setq ind1 (current-column)) + (delete-region (point-at-bol) (point)) + (indent-to-column (+ ind1 arg)) + (beginning-of-line 2))))) ;;; Archiving @@ -3816,7 +4195,7 @@ heading be marked DONE, and the current time will be added." ;; Here we are back in the original buffer. Everything seems to have ;; worked. So now cut the tree and finish up. (let (this-command) (org-cut-subtree)) - (if (looking-at "[ \t]*$") (kill-line)) + (if (and (not (eobp)) (looking-at "[ \t]*$")) (kill-line)) (message "Subtree archived %s" (if (eq this-buffer buffer) (concat "under heading: " heading) @@ -3880,7 +4259,7 @@ At all other locations, this simply calls `ispell-complete-word'." tbl))) tbl) (tag (setq type :tag beg beg1) - (org-get-buffer-tags)) + (or org-tag-alist (org-get-buffer-tags))) (t (progn (ispell-complete-word arg) (throw 'exit nil))))) (pattern (buffer-substring-no-properties beg end)) (completion (try-completion pattern table))) @@ -3960,44 +4339,44 @@ prefix arg, switch to that state." (member (member this org-todo-keywords)) (tail (cdr member)) (state (cond - ((equal arg '(4)) - ;; Read a state with completion - (completing-read "State: " (mapcar (lambda(x) (list x)) - org-todo-keywords) - nil t)) - ((eq arg 'right) - (if this - (if tail (car tail) nil) - (car org-todo-keywords))) - ((eq arg 'left) - (if (equal member org-todo-keywords) - nil - (if this - (nth (- (length org-todo-keywords) (length tail) 2) - org-todo-keywords) - org-done-string))) - (arg - ;; user requests a specific state - (nth (1- (prefix-numeric-value arg)) - org-todo-keywords)) - ((null member) (car org-todo-keywords)) - ((null tail) nil) ;; -> first entry - ((eq org-todo-interpretation 'sequence) - (car tail)) - ((memq org-todo-interpretation '(type priority)) - (if (eq this-command last-command) - (car tail) - (if (> (length tail) 0) org-done-string nil))) - (t nil))) + ((equal arg '(4)) + ;; Read a state with completion + (completing-read "State: " (mapcar (lambda(x) (list x)) + org-todo-keywords) + nil t)) + ((eq arg 'right) + (if this + (if tail (car tail) nil) + (car org-todo-keywords))) + ((eq arg 'left) + (if (equal member org-todo-keywords) + nil + (if this + (nth (- (length org-todo-keywords) (length tail) 2) + org-todo-keywords) + org-done-string))) + (arg + ;; user requests a specific state + (nth (1- (prefix-numeric-value arg)) + org-todo-keywords)) + ((null member) (car org-todo-keywords)) + ((null tail) nil) ;; -> first entry + ((eq org-todo-interpretation 'sequence) + (car tail)) + ((memq org-todo-interpretation '(type priority)) + (if (eq this-command last-command) + (car tail) + (if (> (length tail) 0) org-done-string nil))) + (t nil))) (next (if state (concat " " state " ") " "))) (replace-match next t t) (setq org-last-todo-state-is-todo (not (equal state org-done-string))) (when org-log-done (if (equal state org-done-string) - (org-log-done) + (org-add-planning-info 'closed (current-time) 'scheduled) (if (not this) - (org-log-done t)))) + (org-add-planning-info nil nil 'closed)))) ;; Fixup tag positioning (and org-auto-align-tags (org-set-tags nil t)) (run-hooks 'org-after-todo-state-change-hook))) @@ -4067,25 +4446,79 @@ of `org-todo-keywords'." A timestamp is also inserted - use \\[org-timestamp-up] and \\[org-timestamp-down] to modify it to the correct date." (interactive) - (insert - org-deadline-string " " - (format-time-string (car org-time-stamp-formats) - (org-read-date nil 'to-time))) - (message "%s" (substitute-command-keys - "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date."))) + (org-add-planning-info 'deadline nil 'closed)) (defun org-schedule () "Insert the SCHEDULED: string to schedule a TODO item. A timestamp is also inserted - use \\[org-timestamp-up] and \\[org-timestamp-down] to modify it to the correct date." (interactive) - (insert - org-scheduled-string " " - (format-time-string (car org-time-stamp-formats) - (org-read-date nil 'to-time))) - (message "%s" (substitute-command-keys - "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date."))) + (org-add-planning-info 'scheduled nil 'closed)) +(defun org-add-planning-info (what &optional time &rest remove) + "Insert new timestamp with keyword in the line directly after the headline. +WHAT indicates what kind of time stamp to add. TIME indicated the time to use. +If non is given, the user is prompted for a date. +REMOVE indicates what kind of entries to remove. An old WHAT entry will also +be removed." + (interactive) + (when what (setq time (or time (org-read-date nil 'to-time)))) + (when (and org-insert-labeled-timestamps-at-point + (member what '(scheduled deadline))) + (insert + (if (eq what 'scheduled) org-scheduled-string org-deadline-string) + " " + (format-time-string (car org-time-stamp-formats) time)) + (setq what nil)) + (save-excursion + (let (beg end col list elt (buffer-invisibility-spec nil) ts) + (org-back-to-heading t) + (setq beg (point)) + (looking-at (concat outline-regexp "\\( *\\)[^\r\n]*")) + (goto-char (match-end 1)) + (setq col (current-column)) + (goto-char (1+ (match-end 0))) + (if (and (not (looking-at outline-regexp)) + (looking-at (concat "[^\r\n]*?" org-keyword-time-regexp + "[^\r\n]*"))) + (narrow-to-region (match-beginning 0) (match-end 0)) + (insert "\n") + (backward-char 1) + (narrow-to-region (point) (point)) + (indent-to-column col)) + ;; Check if we have to remove something. + (setq list (cons what remove)) + (while list + (setq elt (pop list)) + (goto-char (point-min)) + (when (or (and (eq elt 'scheduled) + (re-search-forward org-scheduled-time-regexp nil t)) + (and (eq elt 'deadline) + (re-search-forward org-deadline-time-regexp nil t)) + (and (eq elt 'closed) + (re-search-forward org-closed-time-regexp nil t))) + (replace-match "") + (if (looking-at " +") (replace-match "")))) + (goto-char (point-max)) + (when what + (insert + (if (not (equal (char-before) ?\ )) " " "") + (cond ((eq what 'scheduled) org-scheduled-string) + ((eq what 'deadline) org-deadline-string) + ((eq what 'closed) org-closed-string)) + " ") + (insert + (setq ts + (format-time-string + (if (eq what 'closed) + (concat "[" (substring (cdr org-time-stamp-formats) 1 -1) "]") + (car org-time-stamp-formats)) + time)))) + (goto-char (point-min)) + (widen) + (if (looking-at "[ \t]+\r?\n") + (replace-match "")) + ts))) (defun org-occur (regexp &optional callback) "Make a compact tree which shows all matches of REGEXP. @@ -4100,7 +4533,7 @@ that the match should indeed be shown." (let ((cnt 0)) (save-excursion (goto-char (point-min)) - (hide-sublevels 1) + (org-overview) (while (re-search-forward regexp nil t) (when (or (not callback) (save-match-data (funcall callback))) @@ -4348,8 +4781,8 @@ used to insert the time stamp into the buffer to include the time." (parse-time-string (match-string 1)))) ct)) (calendar-move-hook nil) - (view-calendar-holidays-initially nil) (view-diary-entries-initially nil) + (view-calendar-holidays-initially nil) (timestr (format-time-string (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") default-time)) (prompt (format "YYYY-MM-DD [%s]: " timestr)) @@ -4761,7 +5194,6 @@ If there is already a time stamp at the cursor position, update it." (defvar org-agenda-type nil) (defvar org-agenda-force-single-file nil) -;;;###autoload (defun org-agenda-mode () "Mode for time-sorted view on action items in Org-mode files. @@ -4778,7 +5210,7 @@ The following commands are available: (org-add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) (org-add-hook 'pre-command-hook 'org-unhighlight nil 'local) (unless org-agenda-keep-modes - (setq org-agenda-follow-mode nil + (setq org-agenda-follow-mode org-agenda-start-with-follow-mode org-agenda-show-log nil)) (easy-menu-change '("Agenda") "Agenda Files" @@ -4815,6 +5247,8 @@ The following commands are available: (define-key org-agenda-mode-map [?\C-c ?\C-x (left)] 'org-agenda-date-earlier) (define-key org-agenda-mode-map ">" 'org-agenda-date-prompt) +(define-key org-agenda-mode-map "\C-c\C-s" 'org-agenda-schedule) +(define-key org-agenda-mode-map "\C-c\C-d" 'org-agenda-deadline) (let ((l '(1 2 3 4 5 6 7 8 9 0))) (while l (define-key org-agenda-mode-map (int-to-string (pop l)) 'digit-argument))) @@ -4878,10 +5312,12 @@ The following commands are available: ("Tags" ["Show all Tags" org-agenda-show-tags t] ["Set Tags" org-agenda-set-tags t]) - ("Reschedule" + ("Schedule" + ["Schedule" org-agenda-schedule t] + ["Set Deadline" org-agenda-deadline t] + "--" ["Reschedule +1 day" org-agenda-date-later (org-agenda-check-type nil 'agenda 'timeline)] ["Reschedule -1 day" org-agenda-date-earlier (org-agenda-check-type nil 'agenda 'timeline)] - "--" ["Reschedule to ..." org-agenda-date-prompt (org-agenda-check-type nil 'agenda 'timeline)]) ("Priority" ["Set Priority" org-agenda-priority t] @@ -4991,18 +5427,16 @@ C Configure your own agenda commands") ((equal c ?C) (customize-variable 'org-agenda-custom-commands)) ((equal c ?a) (call-interactively 'org-agenda-list)) ((equal c ?t) (call-interactively 'org-todo-list)) - ((equal c ?T) - (setq current-prefix-arg (or arg '(4))) - (call-interactively 'org-todo-list)) + ((equal c ?T) (org-call-with-arg 'org-todo-list (or arg '(4)))) ((equal c ?m) (call-interactively 'org-tags-view)) - ((equal c ?M) - (setq current-prefix-arg (or arg '(4))) - (call-interactively 'org-tags-view)) + ((equal c ?M) (org-call-with-arg 'org-tags-view (or arg '(4)))) ((setq entry (assoc (char-to-string c) org-agenda-custom-commands)) (setq type (nth 1 entry) string (nth 2 entry)) (cond ((eq type 'tags) (org-tags-view current-prefix-arg string)) + ((eq type 'tags-todo) + (org-tags-view '(4) string)) ((eq type 'todo) (org-todo-list string)) ((eq type 'tags-tree) @@ -5432,7 +5866,7 @@ If ERROR is non-nil, throw an error, otherwise just return nil." (if (memq org-agenda-type types) t (if error - (error "Now allowed in %s-type agenda buffers" org-agenda-type) + (error "Not allowed in %s-type agenda buffers" org-agenda-type) nil))) (defun org-agenda-quit () @@ -5977,10 +6411,13 @@ the documentation of `org-diary'." "\\)\\>") org-not-done-regexp) "[^\n\r]*\\)")) + (sched-re (concat ".*\n.*?" org-scheduled-time-regexp)) marker priority category tags ee txt) (goto-char (point-min)) (while (re-search-forward regexp nil t) + (when (not (and org-agenda-todo-ignore-scheduled + (save-match-data (looking-at sched-re)))) (goto-char (match-beginning 1)) (setq marker (org-agenda-new-marker (1+ (match-beginning 0))) category (org-get-category) @@ -5997,7 +6434,9 @@ the documentation of `org-diary'." 'org-marker marker 'org-hd-marker marker 'priority priority 'category category) (push txt ee) - (goto-char (match-end 1))) + (if org-agenda-todo-list-sublevels ; FIXME???? Change needed? + (goto-char (match-end 1)) + (org-end-of-subtree 'invisible)))) (nreverse ee))) (defconst org-agenda-no-heading-message @@ -6354,11 +6793,23 @@ only the correctly processes TXT should be returned - this is used by (if s1 (setq s1 (org-get-time-of-day s1 'string))) (if s2 (setq s2 (org-get-time-of-day s2 'string)))) - (when (and (or (eq org-agenda-remove-tags-when-in-prefix t) - (and org-agenda-remove-tags-when-in-prefix - org-prefix-has-tag)) - (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" txt)) - (setq txt (replace-match "" t t txt))) +; (when (and (or (eq org-agenda-remove-tags-when-in-prefix t) +; (and org-agenda-remove-tags-when-in-prefix +; org-prefix-has-tag)) +; (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" txt)) +; (setq txt (replace-match "" t t txt))) + + ;; FIXME!!! + (when (string-match "\\([ \t]+\\)\\(:[a-zA-Z_@0-9:]+:\\)[ \t]*$" txt) + ;; Tags are in the string + (if (or (eq org-agenda-remove-tags-when-in-prefix t) + (and org-agenda-remove-tags-when-in-prefix + org-prefix-has-tag)) + (setq txt (replace-match "" t t txt)) + (setq txt (replace-match + (concat (make-string (max (- 50 (length txt)) 1) ?\ ) + (match-string 2 txt)) + t t txt)))) ;; Create the final string (if noprefix @@ -6537,7 +6988,8 @@ and by additional input from the age of a schedules or deadline entry." (interactive) (let* ((tags (get-text-property (point-at-bol) 'tags))) (if tags - (message "Tags are :%s:" (mapconcat 'identity tags ":")) + (message "Tags are :%s:" + (org-no-properties (mapconcat 'identity tags ":"))) (message "No tags associated with this line")))) (defun org-agenda-goto (&optional highlight) @@ -6723,7 +7175,7 @@ the same tree node, and the headline of the tree node in the Org-mode file." (beginning-of-line 1))) (defun org-get-tags-at (&optional pos) - "Get a list of all headline targs applicable at POS. + "Get a list of all headline tags applicable at POS. POS defaults to point. If tags are inherited, the list contains the targets in the same sequence as the headlines appear, i.e. the tags of the current headline come last." @@ -6736,7 +7188,9 @@ the tags of the current headline come last." (condition-case nil (while t (if (looking-at "[^\r\n]+?:\\([a-zA-Z_@0-9:]+\\):[ \t]*\\([\n\r]\\|\\'\\)") - (setq tags (append (org-split-string (match-string 1) ":") tags))) + (setq tags (append (org-split-string + (org-match-string-no-properties 1) ":") + tags))) (or org-use-tag-inheritance (error "")) (org-up-heading-all 1)) (error nil)))) @@ -6808,6 +7262,40 @@ be used to request time specification in the time stamp." (org-time-stamp arg) (message "Time stamp changed to %s" org-last-changed-timestamp)))) +(defun org-agenda-schedule (arg) + "Schedule the item at point." + (interactive "P") + (org-agenda-check-type t 'agenda 'timeline 'todo 'tags) + (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)) + (org-insert-labeled-timestamps-at-point nil) + ts) + (with-current-buffer buffer + (widen) + (goto-char pos) + (setq ts (org-schedule)) + (message "Item scheduled for %s" ts)))) + +(defun org-agenda-deadline (arg) + "Schedule the item at point." + (interactive "P") + (org-agenda-check-type t 'agenda 'timeline 'todo 'tags) + (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)) + (org-insert-labeled-timestamps-at-point nil) + ts) + (with-current-buffer buffer + (widen) + (goto-char pos) + (setq ts (org-deadline)) + (message "Deadline for this item set to %s" ts)))) + (defun org-get-heading () "Return the heading of the current entry, without the stars." (save-excursion @@ -6980,7 +7468,7 @@ are included in the output." (save-excursion (goto-char (point-min)) - (when (eq action 'sparse-tree) (hide-sublevels 1)) + (when (eq action 'sparse-tree) (org-overview)) (while (re-search-forward re nil t) (setq todo (if (match-end 1) (match-string 2)) tags (if (match-end 4) (match-string 4))) @@ -7139,11 +7627,11 @@ The prefix arg TODO-ONLY limits the search to TODO entries." (defun org-set-tags (&optional arg just-align) "Set the tags for the current headline. With prefix ARG, realign all tags in headings in the current buffer." - (interactive) - (let* (;(inherit (org-get-inherited-tags)) - (re (concat "^" outline-regexp)) + (interactive "P") + (let* ((re (concat "^" outline-regexp)) (col (current-column)) (current (org-get-tags)) + table current-tags inherited-tags ; computed below when needed tags hd empty invis) (if arg (save-excursion @@ -7153,15 +7641,22 @@ With prefix ARG, realign all tags in headings in the current buffer." (message "All tags realigned to column %d" org-tags-column)) (if just-align (setq tags current) - (setq org-last-tags-completion-table - (or (org-get-buffer-tags) - org-last-tags-completion-table)) - (setq tags - (let ((org-add-colon-after-tag-completion t)) - (completing-read "Tags: " 'org-tags-completion-function - nil nil current 'org-tags-history))) + (setq table (or org-tag-alist (org-get-buffer-tags)) + org-last-tags-completion-table table + current-tags (org-split-string current ":") + inherited-tags (nreverse + (nthcdr (length current-tags) + (nreverse (org-get-tags-at)))) + tags + (if (or (eq t org-use-fast-tag-selection) + (and org-use-fast-tag-selection (cdar table))) + (org-fast-tag-selection current-tags inherited-tags table) + (let ((org-add-colon-after-tag-completion t)) + (completing-read "Tags: " 'org-tags-completion-function + nil nil current 'org-tags-history)))) (while (string-match "[-+&]+" tags) (setq tags (replace-match ":" t t tags)))) + ;; FIXME: still optimize this by not checking when JUST-ALIGN? (unless (setq empty (string-match "\\`[\t ]*\\'" tags)) (unless (string-match ":$" tags) (setq tags (concat tags ":"))) @@ -7212,6 +7707,79 @@ With prefix ARG, realign all tags in headings in the current buffer." (assoc s2 ctable))) )) +(defun org-fast-tag-insert (kwd tags face &optional end) + "Insert KDW, and the TAGS, the latter with face FACE. Also inser END." + (insert (format "%-12s" (concat kwd ":")) + (org-add-props (mapconcat 'identity tags " ") nil 'face face) + (or end ""))) + +(defun org-fast-tag-selection (current inherited table) + "Fast tag selection with single keys. +CURRENT is the current list of tags in the headline, INHERITED is the +list of inherited tags, and TABLE is an alist of tags and corresponding keys. +If the keys are nil, a-z are automatically assigned. +Returns the new tags string, or nil to not change the current settings." + (let* ((maxlen (apply 'max (mapcar (lambda (x) + (string-width (car x))) table))) + (fwidth (+ maxlen 3 1 3)) + (ncol (/ (window-width) fwidth)) + (i-face 'org-done) + (c-face 'org-tag) + tg cnt e c char ntable tbl rtn) + (save-window-excursion + (delete-other-windows) + (split-window-vertically) + (switch-to-buffer-other-window (get-buffer-create " *Org tags*")) + (erase-buffer) + (org-fast-tag-insert "Inherited" inherited i-face "\n") + (org-fast-tag-insert "Current" current c-face "\n\n") + (setq tbl table char (1- ?a) cnt 0) + (while (setq e (pop tbl)) + (setq tg (car e) c (or (cdr e) (setq char (1+ char)))) + (setq tg (org-add-props tg nil 'face + (cond + ((member tg current) c-face) + ((member tg inherited) i-face) + (t nil)))) + (insert "[" c "] " tg (make-string + (- fwidth 4 (length tg)) ?\ )) + (push (cons tg c) ntable) + (when (= (setq cnt (1+ cnt)) ncol) + (insert "\n") + (setq cnt 0))) + (insert "\n") + (goto-char (point-min)) + (if (fboundp 'fit-window-to-buffer) (fit-window-to-buffer)) + (setq rtn + (catch 'exit + (while t + (message "[key]:Toggle SPC: clear current RET accept") + (setq c (read-char-exclusive)) + (cond + ((= c ?\r) (throw 'exit t)) + ((= c ?\C-g) (throw 'exit nil)) + ((= c ?\ ) (setq current nil)) + (t (setq e (rassoc c ntable) tg (car e)) + (if (member tg current) + (setq current (delete tg current)) + (setq current (append current (list tg)))))) + (goto-char (point-min)) + (beginning-of-line 2) + (delete-region (point) (point-at-eol)) + (org-fast-tag-insert "Current" current c-face) + (while (re-search-forward "\\[.\\] \\([a-zA-Z0-9_@]+\\)" nil t) + (setq tg (match-string 1)) + (add-text-properties (match-beginning 1) (match-end 1) + (list 'face + (cond + ((member tg current) c-face) + ((member tg inherited) i-face) + (t nil))))) + (goto-char (point-min))))) + (if rtn + (mapconcat 'identity current ":") + nil)))) + (defun org-get-tags () "Get the TAGS string in the current headline." (unless (org-on-heading-p) @@ -7234,6 +7802,50 @@ With prefix ARG, realign all tags in headings in the current buffer." ;;; Link Stuff +(defvar org-create-file-search-functions nil + "List of functions to construct the right search string for a file link. +These functions are called in turn with point at the location to +which the link should point. + +A function in the hook should first test if it would like to +handle this file type, for example by checking the major-mode or +the file extension. If it decides not to handle this file, it +should just return nil to give other functions a chance. If it +does handle the file, it must return the search string to be used +when following the link. The search string will be part of the +file link, given after a double colon, and `org-open-at-point' +will automatically search for it. If special measures must be +taken to make the search successful, another function should be +added to the companion hook `org-execute-file-search-functions', +which see. + +A function in this hook may also use `setq' to set the variable +`description' to provide a suggestion for the descriptive text to +be used for this link when it gets inserted into an Org-mode +buffer with \\[org-insert-link].") + +(defvar org-execute-file-search-functions nil + "List of functions to execute a file search triggered by a link. + +Functions added to this hook must accept a single argument, the +search string that was part of the file link, the part after the +double colon. The function must first check if it would like to +handle this search, for example by checking the major-mode or the +file extension. If it decides not to handle this search, it +should just return nil to give other functions a chance. If it +does handle the search, it must return a non-nil value to keep +other functions from trying. + +Each function can access the current prefix argument through the +variable `current-prefix-argument'. Note that a single prefix is +used to force opening a link in Emacs, so it may be good to only +use a numeric or double prefix to guide the search function. + +In case this is needed, a function in this hook can also restore +the window configuration before `org-open-at-point' was called using: + + (set-window-configuration org-window-config-before-follow-link)") + (defun org-find-file-at-mouse (ev) "Open file link or URL at mouse." (interactive "e") @@ -7246,6 +7858,10 @@ With prefix ARG, realign all tags in headings in the current buffer." (mouse-set-point ev) (org-open-at-point)) +(defvar org-window-config-before-follow-link nil + "The window configuration before following a link. +This is saved in case the need arises to restore it.") + (defun org-open-at-point (&optional in-emacs) "Open link at or after point. If there is no link at point, this function will search forward up to @@ -7253,6 +7869,7 @@ the end of the current subtree. Normally, files will be opened by an appropriate application. If the optional argument IN-EMACS is non-nil, Emacs will visit the file." (interactive "P") + (setq org-window-config-before-follow-link (current-window-configuration)) (org-remove-occur-highlights nil nil t) (if (org-at-timestamp-p) (org-agenda-list nil (time-to-days (org-time-string-to-time @@ -7337,6 +7954,7 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." ((string= type "file") (if (string-match "::?\\([0-9]+\\)\\'" path) ;; second : optional + ;; FIXME: It is unsafe to allow a single colon. (setq line (string-to-number (match-string 1 path)) path (substring path 0 (match-beginning 0))) (if (string-match "::\\(.+\\)\\'" path) @@ -7350,6 +7968,9 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." ((string= type "bbdb") (org-follow-bbdb-link path)) + ((string= type "info") + (org-follow-info-link path)) + ((string= type "gnus") (let (group article) (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) @@ -7397,8 +8018,8 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (setq cmd (replace-match "<" t t cmd))) (while (string-match "@}" cmd) (setq cmd (replace-match ">" t t cmd))) - (if (or (not org-confirm-shell-links) - (funcall org-confirm-shell-links + (if (or (not org-confirm-shell-link-function) + (funcall org-confirm-shell-link-function (format "Execute \"%s\" in shell? " (org-add-props cmd nil 'face 'org-warning)))) @@ -7407,6 +8028,16 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (shell-command cmd)) (error "Abort")))) + ((string= type "elisp") + (let ((cmd path)) + (if (or (not org-confirm-elisp-link-function) + (funcall org-confirm-elisp-link-function + (format "Execute \"%s\" as elisp? " + (org-add-props cmd nil + 'face 'org-warning)))) + (message "%s => %s" cmd (eval (read cmd))) + (error "Abort")))) + (t (browse-url-at-point)))))) @@ -7423,73 +8054,77 @@ in all files." (pos (point)) (pre "") (post "") words re0 re1 re2 re3 re4 re5 re2a reall camel) - (cond ((save-excursion - (goto-char (point-min)) - (and - (re-search-forward - (concat "<<" (regexp-quote s0) ">>") nil t) - (setq pos (match-beginning 0)))) - ;; There is an exact target for this - (goto-char pos)) - ((string-match "^/\\(.*\\)/$" s) - ;; A regular expression - (cond - ((eq major-mode 'org-mode) - (org-occur (match-string 1 s))) - ;;((eq major-mode 'dired-mode) - ;; (grep (concat "grep -n -e '" (match-string 1 s) "' *"))) - (t (org-do-occur (match-string 1 s))))) - ((or (setq camel (string-match (concat "^" org-camel-regexp "$") s)) - t) - ;; A camel or a normal search string - (when (equal (string-to-char s) ?*) - ;; Anchor on headlines, post may include tags. - (setq pre "^\\*+[ \t]*\\(\\sw+\\)?[ \t]*" - post "[ \t]*\\([ \t]+:[a-zA-Z_@0-9:+]:[ \t]*\\)?$" - s (substring s 1))) - (remove-text-properties - 0 (length s) - '(face nil mouse-face nil keymap nil fontified nil) s) - ;; Make a series of regular expressions to find a match - (setq words - (if camel - (org-camel-to-words s) - (org-split-string s "[ \n\r\t]+")) - re0 (concat "<<" (regexp-quote s0) ">>") - re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>") - re2a (concat "\\<" (mapconcat 'downcase words "[ \t\r\n]+") "\\>") - re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>") - re1 (concat pre re2 post) - re3 (concat pre re4 post) - re5 (concat pre ".*" re4) - re2 (concat pre re2) - re2a (concat pre re2a) - re4 (concat pre re4) - reall (concat "\\(" re0 "\\)\\|\\(" re1 "\\)\\|\\(" re2 - "\\)\\|\\(" re3 "\\)\\|\\(" re4 "\\)\\|\\(" - re5 "\\)" - )) - (cond - ((eq type 'org-occur) (org-occur reall)) - ((eq type 'occur) (org-do-occur (downcase reall) 'cleanup)) - (t (goto-char (point-min)) - (if (or (org-search-not-link re0 nil t) - (org-search-not-link re1 nil t) - (org-search-not-link re2 nil t) - (org-search-not-link re2a nil t) - (org-search-not-link re3 nil t) - (org-search-not-link re4 nil t) - (org-search-not-link re5 nil t) - ) - (goto-char (match-beginning 0)) - (goto-char pos) - (error "No match"))))) - (t - ;; Normal string-search - (goto-char (point-min)) - (if (search-forward s nil t) - (goto-char (match-beginning 0)) - (error "No match")))) + (cond + ;; First check if there are any special + ((run-hook-with-args-until-success 'org-execute-file-search-functions s)) + ;; Now try the builtin stuff + ((save-excursion + (goto-char (point-min)) + (and + (re-search-forward + (concat "<<" (regexp-quote s0) ">>") nil t) + (setq pos (match-beginning 0)))) + ;; There is an exact target for this + (goto-char pos)) + ((string-match "^/\\(.*\\)/$" s) + ;; A regular expression + (cond + ((eq major-mode 'org-mode) + (org-occur (match-string 1 s))) + ;;((eq major-mode 'dired-mode) + ;; (grep (concat "grep -n -e '" (match-string 1 s) "' *"))) + (t (org-do-occur (match-string 1 s))))) + ((or (setq camel (string-match (concat "^" org-camel-regexp "$") s)) + t) + ;; A camel or a normal search string + (when (equal (string-to-char s) ?*) + ;; Anchor on headlines, post may include tags. + (setq pre "^\\*+[ \t]*\\(?:\\sw+\\)?[ \t]*" + post "[ \t]*\\(?:[ \t]+:[a-zA-Z_@0-9:+]:[ \t]*\\)?$" + s (substring s 1))) + (remove-text-properties + 0 (length s) + '(face nil mouse-face nil keymap nil fontified nil) s) + ;; Make a series of regular expressions to find a match + (setq words + (if camel + (org-camel-to-words s) + (org-split-string s "[ \n\r\t]+")) + re0 (concat "\\(<<" (regexp-quote s0) ">>\\)") + re2 (concat "[ \t\r\n]\\(" (mapconcat 'downcase words "[ \t]+") "\\)[ \t\r\n]") + re2a (concat "[ \t\r\n]\\(" (mapconcat 'downcase words "[ \t\r\n]+") "\\)[ \t\r\n]") + re4 (concat "[^a-zA-Z_]\\(" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\)[^a-zA-Z_]") + re1 (concat pre re2 post) + re3 (concat pre re4 post) + re5 (concat pre ".*" re4) + re2 (concat pre re2) + re2a (concat pre re2a) + re4 (concat pre re4) + reall (concat "\\(" re0 "\\)\\|\\(" re1 "\\)\\|\\(" re2 + "\\)\\|\\(" re3 "\\)\\|\\(" re4 "\\)\\|\\(" + re5 "\\)" + )) + (cond + ((eq type 'org-occur) (org-occur reall)) + ((eq type 'occur) (org-do-occur (downcase reall) 'cleanup)) + (t (goto-char (point-min)) + (if (or (org-search-not-link re0 nil t) + (org-search-not-link re1 nil t) + (org-search-not-link re2 nil t) + (org-search-not-link re2a nil t) + (org-search-not-link re3 nil t) + (org-search-not-link re4 nil t) + (org-search-not-link re5 nil t) + ) + (goto-char (match-beginning 1)) ;; Fixme: does every re have group 1? + (goto-char pos) + (error "No match"))))) + (t + ;; Normal string-search + (goto-char (point-min)) + (if (search-forward s nil t) + (goto-char (match-beginning 0)) + (error "No match")))) (and (eq major-mode 'org-mode) (org-show-hierarchy-above)))) (defun org-search-not-link (&rest args) @@ -7609,6 +8244,18 @@ onto the ring." (delete-window (get-buffer-window "*BBDB*")) (error "No matching BBDB record"))))) + +(defun org-follow-info-link (name) + "Follow an info file & node link to NAME." + (if (or (string-match "\\(.*\\)::?\\(.*\\)" name) + (string-match "\\(.*\\)" name)) + (progn + (require 'info) + (if (match-string 2 name) ; If there isn't a node, choose "Top" + (Info-find-node (match-string 1 name) (match-string 2 name)) + (Info-find-node (match-string 1 name) "Top"))) + (message (concat "Could not open: " name)))) + (defun org-follow-gnus-link (&optional group article) "Follow a Gnus link to GROUP and ARTICLE." (require 'gnus) @@ -7792,6 +8439,61 @@ folders." (kill-this-buffer) (error "Message not found")))) +;; BibTeX links + +;; Use the custom search meachnism to construct and use search strings for +;; file links to BibTeX database entries. + +(defun org-create-file-search-in-bibtex () + "Create the search string and description for a BibTeX database entry." + (when (eq major-mode 'bibtex-mode) + ;; yes, we want to construct this search string. + ;; Make a good description for this entry, using names, year and the title + ;; Put it into the `description' variable which is dynamically scoped. + (let ((bibtex-autokey-names 1) + (bibtex-autokey-names-stretch 1) + (bibtex-autokey-name-case-convert-function 'identity) + (bibtex-autokey-name-separator " & ") + (bibtex-autokey-additional-names " et al.") + (bibtex-autokey-year-length 4) + (bibtex-autokey-name-year-separator " ") + (bibtex-autokey-titlewords 3) + (bibtex-autokey-titleword-separator " ") + (bibtex-autokey-titleword-case-convert-function 'identity) + (bibtex-autokey-titleword-length 'infty) + (bibtex-autokey-year-title-separator ": ")) + (setq description (bibtex-generate-autokey))) + ;; Now parse the entry, get the key and return it. + (save-excursion + (bibtex-beginning-of-entry) + (cdr (assoc "=key=" (bibtex-parse-entry)))))) + +(defun org-execute-file-search-in-bibtex (s) + "Find the link search string S as a key for a database entry." + (when (eq major-mode 'bibtex-mode) + ;; Yes, we want to do the search in this file. + ;; We construct a regexp that searches for "@entrytype{" followed by the key + (goto-char (point-min)) + (and (re-search-forward (concat "@[a-zA-Z]+[ \t\n]*{[ \t\n]*" + (regexp-quote s) "[ \t\n]*,") nil t) + (goto-char (match-beginning 0))) + (if (and (match-beginning 0) (equal current-prefix-arg '(16))) + ;; Use double prefix to indicate that any web link should be browsed + (let ((b (current-buffer)) (p (point))) + ;; Restore the window configuration because we just use the web link + (set-window-configuration org-window-config-before-follow-link) + (save-excursion (set-buffer b) (goto-char p) + (bibtex-url))) + (recenter 0)) ; Move entry start to beginning of window + ;; return t to indicate that the search is done. + t)) + +;; Finally add the functions to the right hooks. +(add-hook 'org-create-file-search-functions 'org-create-file-search-in-bibtex) +(add-hook 'org-execute-file-search-functions 'org-execute-file-search-in-bibtex) + +;; end of Bibtex link setup + (defun org-upgrade-old-links (&optional query-description) "Transfer old <...> style links to new [[...]] style links. With arg query-description, ask at each match for a description text to use @@ -7907,7 +8609,7 @@ For some link types, a prefix arg is interpreted: For links to usenet articles, arg negates `org-usenet-links-prefer-google'. For file links, arg negates `org-context-in-file-links'." (interactive "P") - (let (link cpltxt desc txt (pos (point))) + (let (link cpltxt desc description search txt (pos (point))) (cond ((eq major-mode 'bbdb-mode) @@ -7917,6 +8619,13 @@ For file links, arg negates `org-context-in-file-links'." (bbdb-record-company (bbdb-current-record)))) link (org-make-link cpltxt))) + ((eq major-mode 'Info-mode) + (setq link (org-make-link "info:" + (file-name-nondirectory Info-current-file) + ":" Info-current-node)) + (setq cpltxt (concat (file-name-nondirectory Info-current-file) + ":" Info-current-node))) + ((eq major-mode 'calendar-mode) (let ((cd (calendar-cursor-to-date))) (setq link @@ -8020,6 +8729,12 @@ For file links, arg negates `org-context-in-file-links'." (setq cpltxt w3m-current-url link (org-make-link cpltxt))) + ((setq search (run-hook-with-args-until-success + 'org-create-file-search-functions)) + (setq link (concat "file:" (abbreviate-file-name buffer-file-name) + "::" search)) + (setq cpltxt (or description link))) ;; FIXME: is this the best way? + ((eq major-mode 'org-mode) ;; Just link to current headline (setq cpltxt (concat "file:" @@ -8039,12 +8754,13 @@ For file links, arg negates `org-context-in-file-links'." ((org-region-active-p) (buffer-substring (region-beginning) (region-end))) (t (buffer-substring (point-at-bol) (point-at-eol))))) - (setq cpltxt - (concat cpltxt "::" - (if org-file-link-context-use-camel-case - (org-make-org-heading-camel txt) - (org-make-org-heading-search-string txt))) - desc "NONE"))) + (when (string-match "\\S-" txt) + (setq cpltxt + (concat cpltxt "::" + (if org-file-link-context-use-camel-case + (org-make-org-heading-camel txt) + (org-make-org-heading-search-string txt))) + desc "NONE")))) (if (string-match "::\\'" cpltxt) (setq cpltxt (substring cpltxt 0 -2))) (setq link (org-make-link cpltxt))) @@ -8058,12 +8774,14 @@ For file links, arg negates `org-context-in-file-links'." (setq txt (if (org-region-active-p) (buffer-substring (region-beginning) (region-end)) (buffer-substring (point-at-bol) (point-at-eol)))) - (setq cpltxt - (concat cpltxt "::" - (if org-file-link-context-use-camel-case - (org-make-org-heading-camel txt) - (org-make-org-heading-search-string txt))) - desc "NONE")) + ;; Only use search option if there is some text. + (when (string-match "\\S-" txt) + (setq cpltxt + (concat cpltxt "::" + (if org-file-link-context-use-camel-case + (org-make-org-heading-camel txt) + (org-make-org-heading-search-string txt))) + desc "NONE"))) (setq link (org-make-link cpltxt))) ((interactive-p) @@ -8287,16 +9005,39 @@ is in the current directory or below." ;; URL-like link, normalize the use of angular brackets. (setq link (org-make-link (org-remove-angle-brackets link)))) - ;; Check if we are linking to the current file. If yes, simplify the link. + ;; Check if we are linking to the current file with a search option + ;; If yes, simplify the link by using only the search option. (when (string-match "\\]+\\)" link) (let* ((path (match-string 1 link)) (case-fold-search nil) (search (match-string 2 link))) - (when (save-match-data - (equal (file-truename buffer-file-name) - (file-truename path))) - ;; We are linking to this same file, with a search option - (setq link search)))) + (save-match-data + (if (equal (file-truename buffer-file-name) (file-truename path)) + ;; We are linking to this same file, with a search option + (setq link search))))) + + ;; Check if we can/should use a relative path. If yes, simplify the link + (when (string-match "\\ Store as sublevel entry to current headline ;;;###autoload (defun org-remember-apply-template () - "Initialize *remember* buffer with template, invode `org-mode'. + "Initialize *remember* buffer with template, invoke `org-mode'. This function should be placed into `remember-mode-hook' and in fact requires to be run from that hook to fucntion properly." - (when org-remember-templates - (let* ((entry (if (= (length org-remember-templates) 1) - (cdar org-remember-templates) - (message "Select template: %s" - (mapconcat - (lambda (x) (char-to-string (car x))) - org-remember-templates " ")) - (cdr (assoc (read-char-exclusive) org-remember-templates)))) - (tpl (if (consp (cdr entry)) (cadr entry) (cdr entry))) - (file (if (consp (cdr entry)) (nth 2 entry))) - (v-t (format-time-string (car org-time-stamp-formats) (org-current-time))) - (v-T (format-time-string (cdr org-time-stamp-formats) (org-current-time))) - (v-u (concat "[" (substring v-t 1 -1) "]")) - (v-U (concat "[" (substring v-T 1 -1) "]")) - (v-a annotation) ; defined in `remember-mode' - (v-i initial) ; defined in `remember-mode' - (v-n user-full-name) - ) - (unless tpl (setq tpl "") (message "No template") (ding)) - (insert tpl) (goto-char (point-min)) - (while (re-search-forward "%\\([tTuTai]\\)" nil t) - (when (and initial (equal (match-string 0) "%i")) - (save-match-data - (let* ((lead (buffer-substring - (point-at-bol) (match-beginning 0)))) - (setq v-i (mapconcat 'identity + (if org-remember-templates + + (let* ((entry (if (= (length org-remember-templates) 1) + (cdar org-remember-templates) + (message "Select template: %s" + (mapconcat + (lambda (x) (char-to-string (car x))) + org-remember-templates " ")) + (cdr (assoc (read-char-exclusive) org-remember-templates)))) + (tpl (car entry)) + (file (if (consp (cdr entry)) (nth 1 entry))) + (v-t (format-time-string (car org-time-stamp-formats) (org-current-time))) + (v-T (format-time-string (cdr org-time-stamp-formats) (org-current-time))) + (v-u (concat "[" (substring v-t 1 -1) "]")) + (v-U (concat "[" (substring v-T 1 -1) "]")) + (v-a annotation) ; defined in `remember-mode' + (v-i initial) ; defined in `remember-mode' + (v-n user-full-name) + ) + (unless tpl (setq tpl "") (message "No template") (ding)) + (insert tpl) (goto-char (point-min)) + (while (re-search-forward "%\\([tTuTai]\\)" nil t) + (when (and initial (equal (match-string 0) "%i")) + (save-match-data + (let* ((lead (buffer-substring + (point-at-bol) (match-beginning 0)))) + (setq v-i (mapconcat 'identity (org-split-string initial "\n") (concat "\n" lead)))))) - (replace-match - (or (eval (intern (concat "v-" (match-string 1)))) "") - t t)) - (let ((org-startup-folded nil) - (org-startup-with-deadline-check nil)) - (org-mode)) - (if (and file (string-match "\\S-" file) (not (file-directory-p file))) - (set (make-local-variable 'org-default-notes-file) file)) - (goto-char (point-min)) - (if (re-search-forward "%\\?" nil t) (replace-match "")) - (set (make-local-variable 'org-finish-function) 'remember-buffer)))) + (replace-match + (or (eval (intern (concat "v-" (match-string 1)))) "") + t t)) + (let ((org-startup-folded nil) + (org-startup-with-deadline-check nil)) + (org-mode)) + (if (and file (string-match "\\S-" file) (not (file-directory-p file))) + (set (make-local-variable 'org-default-notes-file) file)) + (goto-char (point-min)) + (if (re-search-forward "%\\?" nil t) (replace-match ""))) + (let ((org-startup-folded nil) + (org-startup-with-deadline-check nil)) + (org-mode))) + (set (make-local-variable 'org-finish-function) 'remember-buffer)) ;;;###autoload (defun org-remember-handler () @@ -8439,6 +9184,9 @@ See also the variable `org-reverse-note-order'." (if (not visiting) (find-file-noselect file)) (with-current-buffer (get-file-buffer file) + (save-excursion (and (goto-char (point-min)) + (not (re-search-forward "^\\* " nil t)) + (insert "\n* Notes\n"))) (setq reversed (org-notes-order-reversed-p)) (save-excursion (save-restriction @@ -8866,7 +9614,7 @@ With argument TABLE-TYPE, go to the beginning of a table.el-type table." (if table-type org-table-any-border-regexp org-table-border-regexp) nil t)) - (error "Can't find beginning of table") + (progn (goto-char (point-min)) (point)) (goto-char (match-beginning 0)) (beginning-of-line 2) (point)))) @@ -9213,7 +9961,7 @@ If TABLE-TYPE is non-nil, also check for table.el-type tables." "Please position cursor in a data line for column operations"))))) (defun org-table-delete-column () - "Delete a column into the table." + "Delete a column from the table." (interactive) (if (not (org-at-table-p)) (error "Not at a table")) @@ -9352,7 +10100,7 @@ With prefix ARG, insert above the current line." In particular, this does handle wide and invisible characters." (if (string-match "^[ \t]*|-" s) ;; It's a hline, just map the characters - (setq s (mapcar (lambda (x) (if (member x '(?| ?+)) ?| ?\ )) s)) + (setq s (mapconcat (lambda (x) (if (member x '(?| ?+)) "|" " ")) s "")) (while (string-match "|\\([ \t]*?[^ \t\r\n|][^\r\n|]*\\)|" s) (setq s (replace-match (concat "|" (make-string (org-string-width (match-string 1 s)) @@ -9401,7 +10149,7 @@ also in table column 3. The command will prompt for the sorting method (lambda (a b) (< (car a) (car b))) (lambda (a b) (string< (car a) (car b))))) (setq lns (mapcar (lambda(x) (cons (org-trim (substring x bcol ecol)) x)) - (split-string (buffer-substring beg end) "\n"))) + (org-split-string (buffer-substring beg end) "\n"))) (if numericp (setq lns (mapcar (lambda(x) (cons (string-to-number (car x)) (cdr x))) @@ -9937,7 +10685,7 @@ the current column, to avoid unnecessary parsing." "\n"))) (defun org-table-get-stored-formulas () - "Return an alist with the t=stored formulas directly after current table." + "Return an alist with the stored formulas directly after current table." (interactive) (let (scol eq eq-alist strings string seen) (save-excursion @@ -10217,7 +10965,7 @@ not overwrite the stored one." (org-table-get-formula equation (equal arg '(4))))) (n0 (org-table-current-column)) (modes (copy-sequence org-calc-default-modes)) - n form fmt x ev orig c) + n form fmt x ev orig c lispp) ;; Parse the format string. Since we have a lot of modes, this is ;; a lot of work. However, I think calc still uses most of the time. (if (string-match ";" formula) @@ -10252,7 +11000,8 @@ not overwrite the stored one." (lambda (x) (number-to-string (string-to-number x))) fields))) (setq ndown (1- ndown)) - (setq form (copy-sequence formula)) + (setq form (copy-sequence formula) + lispp (equal (substring form 0 2) "'(")) ;; Insert the references to fields in same row (while (string-match "\\$\\([0-9]+\\)?" form) (setq n (if (match-beginning 1) @@ -10262,7 +11011,9 @@ not overwrite the stored one." (unless x (error "Invalid field specifier \"%s\"" (match-string 0 form))) (if (equal x "") (setq x "0")) - (setq form (replace-match (concat "(" x ")") t t form))) + (setq form (replace-match + (if lispp x (concat "(" x ")")) + t t form))) ;; Insert ranges in current column (while (string-match "\\&[-I0-9]+" form) (setq form (replace-match @@ -10270,8 +11021,14 @@ not overwrite the stored one." (org-table-get-vertical-vector (match-string 0 form) nil n0)) t t form))) - (setq ev (calc-eval (cons form modes) - (if org-table-formula-numbers-only 'num))) +;; (setq ev (calc-eval (cons form modes) +;; FIXME (if org-table-formula-numbers-only 'num))) + + (if lispp + (setq ev (eval (eval (read form))) + ev (if (numberp ev) (number-to-string ev) ev)) + (setq ev (calc-eval (cons form modes) + (if org-table-formula-numbers-only 'num)))) (when org-table-formula-debug (with-output-to-temp-buffer "*Help*" @@ -10827,6 +11584,109 @@ overwritten, and the table is not marked as requiring realignment." (defconst org-level-max 20) +(defvar org-export-html-preamble nil + "Preamble, to be inserted just after . Set by publishing functions.") +(defvar org-export-html-postamble nil + "Preamble, to be inserted just before . Set by publishing functions.") +(defvar org-export-html-auto-preamble t + "Should default preamble be inserted? Set by publishing functions.") +(defvar org-export-html-auto-postamble t + "Should default postamble be inserted? Set by publishing functions.") + +(defconst org-export-plist-vars + '((:language . org-export-default-language) + (:headline-levels . org-export-headline-levels) + (:section-numbers . org-export-with-section-numbers) + (:table-of-contents . org-export-with-toc) + (:emphasize . org-export-with-emphasize) + (:sub-superscript . org-export-with-sub-superscripts) + (:TeX-macros . org-export-with-TeX-macros) + (:fixed-width . org-export-with-fixed-width) + (:timestamps . org-export-with-timestamps) + (:tables . org-export-with-tables) + (:table-auto-headline . org-export-highlight-first-table-line) + (:style . org-export-html-style) + (:convert-org-links . org-export-html-link-org-files-as-html) + (:inline-images . org-export-html-inline-images) + (:expand-quoted-html . org-export-html-expand) + (:timestamp . org-export-html-with-timestamp) + (:publishing-directory . org-export-publishing-directory) + (:preamble . org-export-html-preamble) + (:postamble . org-export-html-postamble) + (:auto-preamble . org-export-html-auto-preamble) + (:auto-postamble . org-export-html-auto-postamble) + (:author . user-full-name) + (:email . user-mail-address))) + +(defun org-default-export-plist () + "Return the property list with default settings for the export variables." + (let ((l org-export-plist-vars) rtn e) + (while (setq e (pop l)) + (setq rtn (cons (car e) (cons (symbol-value (cdr e)) rtn)))) + rtn)) + +(defun org-infile-export-plist () + "Return the property list with file-local settings for export." + (save-excursion + (goto-char 0) + (let ((re (org-make-options-regexp + '("TITLE" "AUTHOR" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE"))) + (text nil) + p key val text options) + (while (re-search-forward re nil t) + (setq key (org-match-string-no-properties 1) + val (org-match-string-no-properties 2)) + (cond + ((string-equal key "TITLE") (setq p (plist-put p :title val))) + ((string-equal key "AUTHOR")(setq p (plist-put p :author val))) + ((string-equal key "EMAIL") (setq p (plist-put p :email val))) + ((string-equal key "LANGUAGE") (setq p (plist-put p :language val))) + ((string-equal key "TEXT") + (setq text (if text (concat text "\n" val) val))) + ((string-equal key "OPTIONS") (setq options val)))) + (setq p (plist-put p :text text)) + (when options + (let ((op '(("H" . :headline-levels) + ("num" . :section-numbers) + ("toc" . :table-of-contents) + ("\\n" . :preserve-breaks) + ("@" . :expand-quoted-html) + (":" . :fixed-width) + ("|" . :tables) + ("^" . :sub-superscript) + ("*" . :emphasize) + ("TeX" . :TeX-macros))) + o) + (while (setq o (pop op)) + (if (string-match (concat (regexp-quote (car o)) + ":\\([^ \t\n\r;,.]*\\)") + options) + (setq p (plist-put p (cdr o) + (car (read-from-string + (match-string 1 options))))))))) + p))) + +(defun org-combine-plists (&rest plists) + "Create a single property list from all plists in PLISTS. +The process starts by copying the last list, and then setting properties +from the other lists. Settings in the first list are the most significant +ones and overrule settings in the other lists." + (let ((rtn (copy-sequence (pop plists))) + p v ls) + (while plists + (setq ls (pop plists)) + (while ls + (setq p (pop ls) v (pop ls)) + (setq rtn (plist-put rtn p v)))) + rtn)) + +(defun org-export-directory (type plist) + (let* ((val (plist-get plist :publishing-directory)) + (dir (if (listp val) + (or (cdr (assoc type val)) ".") + val))) + dir)) + (defun org-export-find-first-heading-line (list) "Remove all lines from LIST which are before the first headline." (let ((orig-list list) @@ -11274,7 +12134,9 @@ The prefix ARG specifies how many levels of the outline should become underlined headlines. The default is 3." (interactive "P") (setq-default org-todo-line-regexp org-todo-line-regexp) - (let* ((region + (let* ((opt-plist (org-combine-plists (org-default-export-plist) + (org-infile-export-plist))) + (region (buffer-substring (if (org-region-active-p) (region-beginning) (point-min)) (if (org-region-active-p) (region-end) (point-max)))) @@ -11287,17 +12149,23 @@ underlined headlines. The default is 3." (level 0) line txt (umax nil) (case-fold-search nil) - (filename (concat (file-name-sans-extension buffer-file-name) + (filename (concat (file-name-as-directory + (org-export-directory :ascii opt-plist)) + (file-name-sans-extension + (file-name-nondirectory buffer-file-name)) ".txt")) (buffer (find-file-noselect filename)) (levels-open (make-vector org-level-max nil)) + (odd org-odd-levels-only) (date (format-time-string "%Y/%m/%d" (current-time))) (time (format-time-string "%X" (org-current-time))) - (author user-full-name) - (title (buffer-name)) + (author (plist-get opt-plist :author)) + (title (or (plist-get opt-plist :title) + (file-name-sans-extension + (file-name-nondirectory buffer-file-name)))) (options nil) - (email user-mail-address) - (language org-export-default-language) + (email (plist-get opt-plist :email)) + (language (plist-get opt-plist :language)) (text nil) (todo nil) (lang-words nil)) @@ -11307,9 +12175,6 @@ underlined headlines. The default is 3." (find-file-noselect filename) - ;; Search for the export key lines - (org-parse-key-lines) - (setq lang-words (or (assoc language org-export-language-setup) (assoc "en" org-export-language-setup))) (if org-export-ascii-show-new-buffer @@ -11317,7 +12182,13 @@ underlined headlines. The default is 3." (set-buffer buffer)) (erase-buffer) (fundamental-mode) - (if options (org-parse-export-options options)) + ;; create local variables for all options, to make sure all called + ;; functions get the correct information + (mapcar (lambda (x) + (set (make-local-variable (cdr x)) + (plist-get opt-plist (car x)))) + org-export-plist-vars) + (set (make-local-variable 'org-odd-levels-only) odd) (setq umax (if arg (prefix-numeric-value arg) org-export-headline-levels)) @@ -11347,7 +12218,8 @@ underlined headlines. The default is 3." level (org-tr-level level) txt (match-string 3 line) todo - (or (and (match-beginning 2) + (or (and org-export-mark-todo-in-toc + (match-beginning 2) (not (equal (match-string 2 line) org-done-string))) ; TODO, not DONE @@ -11390,6 +12262,19 @@ underlined headlines. The default is 3." (t (insert line "\n")))) (normal-mode) (save-buffer) + ;; remove display and invisible chars + (let (beg end s) + (goto-char (point-min)) + (while (setq beg (next-single-property-change (point) 'display)) + (setq end (next-single-property-change beg 'display)) + (delete-region beg end) + (goto-char beg) + (insert "=>")) + (goto-char (point-min)) + (while (setq beg (next-single-property-change (point) 'org-cwidth)) + (setq end (next-single-property-change beg 'org-cwidth)) + (delete-region beg end) + (goto-char beg))) (goto-char (point-min)))) (defun org-search-todo-below (line lines level) @@ -11441,38 +12326,54 @@ underlined headlines. The default is 3." (setq title (concat (org-section-number level) " " title))) (insert title "\n" (make-string (string-width title) char) "\n")))) -(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) - (let* ((filename (concat (file-name-sans-extension buffer-file-name) - ".txt")) - (buffer (find-file-noselect filename)) - (ore (concat - (org-make-options-regexp - '("CATEGORY" "SEQ_TODO" "PRI_TODO" "TYP_TODO" - "STARTUP" "ARCHIVE" - "TITLE" "AUTHOR" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE")) - (if org-noutline-p "\\(\n\\|$\\)" ""))) +(defun org-export-visible (type arg) + "Create a copy of the visible part of the current buffer, and export it. +The copy is created in a temporary buffer and removed after use. +TYPE is the final key (as a string) of the `C-c C-x' key sequence that will +run the export command - in interactive use, the command prompts for this +key. As a special case, if the you type SPC at the prompt, the temporary +org-mode file will not be removed but presented to you so that you can +continue to use it. The prefix arg ARG is passed through to the exporting +command." + (interactive + (list (progn + (message "Export visible: [a]SCII [h]tml [b]rowse HTML [x]OXO [ ]keep buffer") + (char-to-string (read-char-exclusive))) + current-prefix-arg)) + (if (not (member type '("a" "\C-a" "b" "\C-b" "h" "x" " "))) + (error "Invalid export key")) + (let* ((binding (key-binding (concat "\C-c\C-x" type))) + (keepp (equal type " ")) + (file buffer-file-name) + (buffer (get-buffer-create "*Org Export Visible*")) s e) - (with-current-buffer buffer - (erase-buffer) - (text-mode)) + (with-current-buffer buffer (erase-buffer)) (save-excursion (setq s (goto-char (point-min))) (while (not (= (point) (point-max))) (goto-char (org-find-invisible)) (append-to-buffer buffer s (point)) - (setq s (goto-char (org-find-visible))))) - (switch-to-buffer-other-window buffer) - (newline) - (goto-char (point-min)) - (if (looking-at ".*-\\*- mode:.*\n") - (replace-match "")) - (while (re-search-forward ore nil t) - (replace-match "")) - (goto-char (point-min)))) + (setq s (goto-char (org-find-visible)))) + (goto-char (point-min)) + (unless keepp + ;; Copy all comment lines to the end, to make sure #+ settings are + ;; still available for the second export step. Kind of a hack, but + ;; does do the trick. + (if (looking-at "#[^\r\n]*") + (append-to-buffer buffer (match-beginning 0) (1+ (match-end 0)))) + (while (re-search-forward "[\n\r]#[^\n\r]*" nil t) + (append-to-buffer buffer (1+ (match-beginning 0)) + (min (point-max) (1+ (match-end 0)))))) + (set-buffer buffer) + (let ((buffer-file-name file) + (org-inhibit-startup t)) + (org-mode) + (show-all) + (unless keepp (funcall binding arg)))) + (if (not keepp) + (kill-buffer buffer) + (switch-to-buffer-other-window buffer) + (goto-char (point-min))))) (defun org-find-visible () (if (featurep 'noutline) @@ -11506,7 +12407,8 @@ Does include HTML export options as well as TODO and CATEGORY stuff." #+CATEGORY: %s #+SEQ_TODO: %s #+TYP_TODO: %s -#+STARTUP: %s %s %s %s %s +#+STARTUP: %s %s %s %s %s %s +#+TAGS: %s #+ARCHIVE: %s " (buffer-name) (user-full-name) user-mail-address org-export-default-language @@ -11533,6 +12435,8 @@ Does include HTML export options as well as TODO and CATEGORY stuff." (if org-odd-levels-only "odd" "oddeven") (if org-hide-leading-stars "hidestars" "showstars") (if org-startup-align-all-tables "align" "noalign") + (if org-log-done "logging" "nologging") + (if org-tag-alist (mapconcat 'car org-tag-alist " ") "") org-archive-location )) @@ -11606,16 +12510,23 @@ emacs --batch --visit=MyFile --funcall org-export-as-html-batch" (org-export-as-html org-export-headline-levels 'hidden)) -(defun org-export-as-html (arg &optional hidden) +(defun org-export-as-html (arg &optional hidden ext-plist) "Export the outline as a pretty HTML file. If there is an active region, export only the region. The prefix ARG specifies how many levels of the outline should become -headlines. The default is 3. Lower levels will become bulleted lists." +headlines. The default is 3. Lower levels will become bulleted lists. +When HIDDEN is non-nil, don't display the HTML buffer. +EXT-PLIST is a property list with external parameters overriding +org-mode's default settings, but still inferior to file-local settings." (interactive "P") (setq-default org-todo-line-regexp org-todo-line-regexp) (setq-default org-deadline-line-regexp org-deadline-line-regexp) (setq-default org-done-string org-done-string) - (let* ((style org-export-html-style) + (let* ((opt-plist (org-combine-plists (org-default-export-plist) + ext-plist + (org-infile-export-plist))) + + (style (plist-get opt-plist :style)) (odd org-odd-levels-only) (region-p (org-region-active-p)) (region @@ -11629,26 +12540,31 @@ headlines. The default is 3. Lower levels will become bulleted lists." (lines (org-export-find-first-heading-line all_lines)) (level 0) (line "") (origline "") txt todo (umax nil) - (filename (concat (file-name-sans-extension buffer-file-name) - ".html")) + (filename (concat (file-name-as-directory + (org-export-directory :html opt-plist)) + (file-name-sans-extension + (file-name-nondirectory buffer-file-name)) + ".html")) (buffer (find-file-noselect filename)) (levels-open (make-vector org-level-max nil)) (date (format-time-string "%Y/%m/%d" (current-time))) (time (format-time-string "%X" (org-current-time))) - (author user-full-name) - (title (buffer-name)) - (options nil) - (quote-re (concat "^\\*+[ \t]*" org-quote-string "\\>")) + (author (plist-get opt-plist :author)) + (title (or (plist-get opt-plist :title) + (file-name-sans-extension + (file-name-nondirectory buffer-file-name)))) + (quote-re0 (concat "^[ \t]*" org-quote-string "\\>")) + (quote-re (concat "^\\(\\*+\\)\\([ \t]*" org-quote-string "\\>\\)")) (inquote nil) (infixed nil) (in-local-list nil) (local-list-num nil) (local-list-indent nil) (llt org-plain-list-ordered-item-terminator) - (email user-mail-address) - (language org-export-default-language) - (text nil) - (lang-words nil) + (email (plist-get opt-plist :email)) + (language (plist-get opt-plist :language)) + (text (plist-get opt-plist :text)) + (lang-words nil) (target-alist nil) tg (head-count 0) cnt (start 0) @@ -11663,15 +12579,14 @@ headlines. The default is 3. Lower levels will become bulleted lists." table-open type table-buffer table-orig-buffer ind start-is-num starter - rpl path desc desc1 desc2 link + rpl path desc descp desc1 desc2 link ) (message "Exporting...") (setq org-last-level 1) (org-init-section-numbers) - ;; Search for the export key lines - (org-parse-key-lines) + ;; Get the language-dependent settings (setq lang-words (or (assoc language org-export-language-setup) (assoc "en" org-export-language-setup))) @@ -11683,7 +12598,12 @@ headlines. The default is 3. Lower levels will become bulleted lists." (fundamental-mode) (let ((case-fold-search nil) (org-odd-levels-only odd)) - (if options (org-parse-export-options options)) + ;; create local variables for all options, to make sure all called + ;; functions get the correct information + (mapcar (lambda (x) + (set (make-local-variable (cdr x)) + (plist-get opt-plist (car x)))) + org-export-plist-vars) (setq umax (if arg (prefix-numeric-value arg) org-export-headline-levels)) @@ -11702,15 +12622,21 @@ headlines. The default is 3. Lower levels will become bulleted lists." " language (org-html-expand title) (or charset "iso-8859-1") date time author style)) - (if title (insert (concat "

" - (org-html-expand title) "

\n"))) - (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) - (if email (insert (concat "<" - email ">\n"))) - (if (or author email) (insert "
\n")) - (if (and date time) (insert (concat (nth 2 lang-words) ": " - date " " time "
\n"))) - (if text (insert (concat "

\n" (org-html-expand text)))) + + + (insert (or (plist-get opt-plist :preamble) "")) + + (when (plist-get opt-plist :auto-preamble) + (if title (insert (concat "

" + (org-html-expand title) "

\n"))) +; (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) +; (if email (insert (concat "<" +; email ">\n"))) +; (if (or author email) (insert "
\n")) +; (if (and date time) (insert (concat (nth 2 lang-words) ": " +; date " " time "
\n"))) + (if text (insert (concat "

\n" (org-html-expand text))))) + (if org-export-with-toc (progn (insert (format "

%s

\n" (nth 3 lang-words))) @@ -11724,9 +12650,11 @@ headlines. The default is 3. Lower levels will become bulleted lists." level (org-tr-level level) txt (save-match-data (org-html-expand - (match-string 3 line))) + (org-html-cleanup-toc-line + (match-string 3 line)))) todo - (or (and (match-beginning 2) + (or (and org-export-mark-todo-in-toc + (match-beginning 2) (not (equal (match-string 2 line) org-done-string))) ; TODO, not DONE @@ -11785,7 +12713,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." (catch 'nextline ;; end of quote section? - (when (and inquote (string-match "^\\*+" line)) + (when (and inquote (string-match "^\\*+" line)) (insert "\n") (setq inquote nil)) ;; inside a quote section? @@ -11829,8 +12757,11 @@ headlines. The default is 3. Lower levels will become bulleted lists." "\" class=\"target\">" (match-string 1 line) "@ ") t t line))))) + (setq line (org-html-handle-time-stamps line)) + ;; replace "&" by "&", "<" and ">" by "<" and ">" ;; handle @<..> HTML tags (replace "@>..<" by "<..>") + ;; Also handle sub_superscripts and checkboxes FIXME (setq line (org-html-expand line)) ;; Format the links @@ -11841,7 +12772,9 @@ headlines. The default is 3. Lower levels will become bulleted lists." (setq path (match-string 3 line)) (setq desc1 (if (match-end 5) (match-string 5 line)) desc2 (if (match-end 2) (concat type ":" path) path) + descp (and desc1 (not (equal desc1 desc2))) desc (or desc1 desc2)) + ;; FIXME: do we need to unescape here somewhere? (cond ((equal type "internal") (setq rpl @@ -11877,12 +12810,18 @@ headlines. The default is 3. Lower levels will become bulleted lists." (not (string-match "^/.*/$" search))) (setq thefile (concat thefile "#" (org-solidify-link-text - (org-link-unescape search))))))) - (setq rpl (if (and org-export-html-inline-images - file-is-image-p) + (org-link-unescape search))))) + (when (string-match "^file:" desc) + (setq desc (replace-match "" t t desc)) + (if (string-match "\\.org$" desc) + (setq desc (replace-match "" t t desc)))))) + (setq rpl (if (and file-is-image-p + (or (eq t org-export-html-inline-images) + (and org-export-html-inline-images + (not descp)))) (concat "") (concat "" desc ""))))) - ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell")) + ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell" "info" "elisp")) (setq rpl (concat "<" type ":" (save-match-data (org-link-unescape path)) ">")))) @@ -11898,20 +12837,13 @@ headlines. The default is 3. Lower levels will become bulleted lists." (setq line (replace-match "\\2" nil nil line 2)))) - ;; DEADLINES - (if (string-match org-deadline-line-regexp line) - (progn - (if (save-match-data - (string-match "\\&" - nil nil line 1))))) (cond ((string-match "^\\(\\*+\\)[ \t]*\\(.*\\)" line) ;; This is a headline (setq level (org-tr-level (- (match-end 1) (match-beginning 1))) txt (match-string 2 line)) + (if (string-match quote-re0 txt) + (setq txt (replace-match "" t t txt))) (if (<= level umax) (setq head-count (+ head-count 1))) (when in-local-list ;; Close any local lists before inserting a new header line @@ -11945,16 +12877,17 @@ headlines. The default is 3. Lower levels will become bulleted lists." (insert (org-format-table-html table-buffer table-orig-buffer)))) (t ;; Normal lines - (when (and (string-match - (cond - ((eq llt t) "^\\([ \t]*\\)\\(\\([-+*]\\)\\|\\([0-9]+[.)]\\)\\)?\\( +[^ \t\n\r]\\|[ \t]*$\\)") - ((= llt ?.) "^\\([ \t]*\\)\\(\\([-+*]\\)\\|\\([0-9]+\\.\\)\\)?\\( +[^ \t\n\r]\\|[ \t]*$\\)") - ((= llt ?\)) "^\\( \t]*\\)\\(\\([-+*]\\)\\|\\([0-9]+)\\)\\)?\\( +[^ \t\n\r]\\|[ \t]*$\\)") - (t (error "Invalid value of `org-plain-list-ordered-item-terminator'"))) - line)) + (when (string-match + (cond + ((eq llt t) "^\\([ \t]*\\)\\(\\([-+*]\\)\\|\\([0-9]+[.)]\\) \\)?\\( *[^ \t\n\r]\\|[ \t]*$\\)") + ((= llt ?.) "^\\([ \t]*\\)\\(\\([-+*]\\)\\|\\([0-9]+\\.\\) \\)?\\( *[^ \t\n\r]\\|[ \t]*$\\)") + ((= llt ?\)) "^\\( \t]*\\)\\(\\([-+*]\\)\\|\\([0-9]+)\\) \\)?\\( *[^ \t\n\r]\\|[ \t]*$\\)") + (t (error "Invalid value of `org-plain-list-ordered-item-terminator'"))) + line) (setq ind (org-get-string-indentation line) start-is-num (match-beginning 4) - starter (if (match-beginning 2) (match-string 2 line)) + starter (if (match-beginning 2) + (substring (match-string 2 line) 0 -1)) line (substring line (match-beginning 5))) (unless (string-match "[^ \t]" line) ;; empty line. Pretend indentation is large. @@ -11977,15 +12910,46 @@ headlines. The default is 3. Lower levels will become bulleted lists." (setq in-local-list t)) (starter ;; continue current list - (insert "
  • \n")))) + (insert "
  • \n"))) + (if (string-match "^[ \t]*\\[\\([X ]\\)\\]" line) + (setq line + (replace-match + (if (equal (match-string 1 line) "X") + "[X]" + "[X]") + t t line)))) + ;; Empty lines start a new paragraph. If hand-formatted lists ;; are not fully interpreted, lines starting with "-", "+", "*" ;; also start a new paragraph. (if (string-match "^ [-+*]-\\|^[ \t]*$" line) (insert "

    ")) (insert line (if org-export-preserve-breaks "
    \n" "\n")))) )) + + ;; Properly close all local lists and other lists + (when inquote (insert "\n")) + (when in-local-list + ;; Close any local lists before inserting a new header line + (while local-list-num + (insert (if (car local-list-num) "\n" "")) + (pop local-list-num)) + (setq local-list-indent nil + in-local-list nil)) + (org-html-level-start 1 nil umax + (and org-export-with-toc (<= level umax)) + head-count) + + (when (plist-get opt-plist :auto-postamble) + (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) + (if email (insert (concat "
    <" + email ">\n"))) + (if (or author email) (insert "
    \n")) + (if (and date time) (insert (concat (nth 2 lang-words) ": " + date " " time "
    \n")))) + (if org-export-html-with-timestamp (insert org-export-html-html-helper-timestamp)) + (insert (or (plist-get opt-plist :postamble) "")) (insert "\n\n") (normal-mode) (save-buffer) @@ -12140,6 +13104,30 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used." (set-buffer " org-tmp2 ") (buffer-substring (point-min) (point-max)))) +(defun org-html-handle-time-stamps (s) + "Format time stamps in string S, or remove them." + (let (r b) + (while (string-match org-maybe-keyword-time-regexp s) + (or b (setq b (substring s 0 (match-beginning 0)))) + (if (not org-export-with-timestamps) + (setq r (concat r (substring s 0 (match-beginning 0))) + s (substring s (match-end 0))) + (setq r (concat + r (substring s 0 (match-beginning 0)) + (if (match-end 1) + (format "@%s @" + (match-string 1 s))) + (format " @%s@" + (substring (match-string 3 s) 1 -1))) + s (substring s (match-end 0))))) + ;; Line break of line started and ended with time stamp stuff + (if (not r) + s + (setq r (concat r s)) + (unless (string-match "\\S-" (concat b s)) + (setq r (concat r "@
    "))) + r))) + (defun org-html-protect (s) ;; convert & to &, < to < and > to > (let ((start 0)) @@ -12152,6 +13140,14 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used." (setq s (replace-match ">" t t s)))) s) +(defun org-html-cleanup-toc-line (s) + "Remove tags and time staps from lines going into the toc." + (if (string-match " +:[a-zA-Z0-9_@:]+: *$" s) + (setq s (replace-match "" t t s))) + (while (string-match org-maybe-keyword-time-regexp s) + (setq s (replace-match "" t t s))) + s) + (defun org-html-expand (string) "Prepare STRING for HTML export. Applies all active conversions. If there are links in the string, don't modify these." @@ -12212,6 +13208,7 @@ stacked delimiters is N. Escaping delimiters is not possible." "\\(" (org-create-multibrace-regexp "(" ")" org-match-sexp-depth) "\\)" "\\|" "\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ \t\r\n,:\"?<>~;./{}=()]+\\)\\)\\)") +;;;;;;;;;;;;;;;;;;;;;;;;;^ FIXME "The regular expression matching a sub- or superscript.") (defun org-export-html-convert-sub-super (string) @@ -12239,49 +13236,9 @@ stacked delimiters is N. Escaping delimiters is not possible." (setq string (replace-match "\\1\\3\\4" t nil string))) string) -(defun org-parse-key-lines () - "Find the special key lines with the information for exporters." - (save-excursion - (goto-char 0) - (let ((re (org-make-options-regexp - '("TITLE" "AUTHOR" "EMAIL" "TEXT" "OPTIONS" "LANGUAGE"))) - key) - (while (re-search-forward re nil t) - (setq key (match-string 1)) - (cond ((string-equal key "TITLE") - (setq title (match-string 2))) - ((string-equal key "AUTHOR") - (setq author (match-string 2))) - ((string-equal key "EMAIL") - (setq email (match-string 2))) - ((string-equal key "LANGUAGE") - (setq language (match-string 2))) - ((string-equal key "TEXT") - (setq text (concat text "\n" (match-string 2)))) - ((string-equal key "OPTIONS") - (setq options (match-string 2)))))))) - -(defun org-parse-export-options (s) - "Parse the export options line." - (let ((op '(("H" . org-export-headline-levels) - ("num" . org-export-with-section-numbers) - ("toc" . org-export-with-toc) - ("\\n" . org-export-preserve-breaks) - ("@" . org-export-html-expand) - (":" . org-export-with-fixed-width) - ("|" . org-export-with-tables) - ("^" . org-export-with-sub-superscripts) - ("*" . org-export-with-emphasize) - ("TeX" . org-export-with-TeX-macros))) - o) - (while (setq o (pop op)) - (if (string-match (concat (regexp-quote (car o)) ":\\([^ \t\n\r;,.]*\\)") - s) - (set (make-local-variable (cdr o)) - (car (read-from-string (match-string 1 s)))))))) - (defun org-html-level-start (level title umax with-toc head-count) - "Insert a new level in HTML export." + "Insert a new level in HTML export. +When TITLE is nil, just close all open levels." (let ((l (1+ (max level umax)))) (while (<= l org-level-max) (if (aref levels-open (1- l)) @@ -12289,19 +13246,35 @@ stacked delimiters is N. Escaping delimiters is not possible." (org-html-level-close l) (aset levels-open (1- l) nil))) (setq l (1+ l))) - (if (> level umax) - (progn - (if (aref levels-open (1- level)) - (insert "

  • " title "

    \n") - (aset levels-open (1- level) t) - (insert "

    • " title "

      \n"))) - (if org-export-with-section-numbers - (setq title (concat (org-section-number level) " " title))) - (setq level (+ level 1)) - (if with-toc - (insert (format "\n%s\n" - level head-count title level)) - (insert (format "\n%s\n" level title level)))))) + (when title + ;; If title is nil, this means this function is called to close + ;; all levels, so the rest is done only if title is given + (if (> level umax) + (progn + (if (aref levels-open (1- level)) + (insert "

    • " title "

      \n") + (aset levels-open (1- level) t) + (insert "

      • " title "

        \n"))) + (if org-export-with-section-numbers + (setq title (concat (org-section-number level) " " title))) + (setq level (+ level 1)) + ;; FIXME: here we need to handle the tags, somehow. + (when (string-match "\\(:[a-zA-Z0-9_@:]+:\\)[ \t]*$" title) + (setq title (replace-match + (if org-export-with-tags + (save-match-data + (concat + "   " + (mapconcat 'identity (org-split-string + (match-string 1 title) ":") + " ") + "")) + "") + t t title))) + (if with-toc + (insert (format "\n%s\n" + level head-count title level)) + (insert (format "\n%s\n" level title level))))))) (defun org-html-level-close (&rest args) "Terminate one level in HTML export." @@ -12361,9 +13334,9 @@ file, but with extension `.ics'." (interactive) (org-export-icalendar nil buffer-file-name)) -(defun org-export-as-xml () +(defun org-export-as-xml (arg) "Export current buffer as XOXO XML buffer." - (interactive) + (interactive "P") (cond ((eq org-export-xml-type 'xoxo) (org-export-as-xoxo (current-buffer))))) @@ -12380,8 +13353,13 @@ The XOXO buffer is named *xoxo-*" ;; Output everything as XOXO (with-current-buffer (get-buffer buffer) (goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed. - (let* ((filename (concat (file-name-sans-extension buffer-file-name) - ".xml")) + (let* ((opt-plist (org-combine-plists (org-default-export-plist) + (org-infile-export-plist))) + (filename (concat (file-name-as-directory + (org-export-directory :xoxo opt-plist)) + (file-name-sans-extension + (file-name-nondirectory buffer-file-name)) + ".html")) (out (find-file-noselect filename)) (last-level 1) (hanging-li nil)) @@ -12464,19 +13442,29 @@ The file is stored under the name `org-combined-agenda-icalendar-file'." If COMBINE is non-nil, combine all calendar entries into a single large file and store it under the name `org-combined-agenda-icalendar-file'." (save-excursion - (let* (file ical-file ical-buffer category started org-agenda-new-buffers) + (let* ((dir (org-export-directory + :ical (list :publishing-directory + org-export-publishing-directory))) + file ical-file ical-buffer category started org-agenda-new-buffers) + (when combine - (setq ical-file org-combined-agenda-icalendar-file + (setq ical-file + (if (file-name-absolute-p org-combined-agenda-icalendar-file) + org-combined-agenda-icalendar-file + (expand-file-name org-combined-agenda-icalendar-file dir)) ical-buffer (org-get-agenda-file-buffer ical-file)) (set-buffer ical-buffer) (erase-buffer)) (while (setq file (pop files)) (catch 'nextfile (org-check-agenda-file file) - (unless combine - (setq ical-file (concat (file-name-sans-extension file) ".ics")) - (setq ical-buffer (org-get-agenda-file-buffer ical-file)) - (set-buffer ical-buffer) (erase-buffer)) (set-buffer (org-get-agenda-file-buffer file)) + (unless combine + (setq ical-file (concat (file-name-as-directory dir) + (file-name-sans-extension + (file-name-nondirectory buffer-file-name)) + ".ics")) + (setq ical-buffer (org-get-agenda-file-buffer ical-file)) + (with-current-buffer ical-buffer (erase-buffer))) (setq category (or org-category (file-name-sans-extension (file-name-nondirectory buffer-file-name)))) @@ -12611,6 +13599,7 @@ a time), or the day by one (if it does not contain a time)." ;; Make `C-c C-x' a prefix key (define-key org-mode-map "\C-c\C-x" (make-sparse-keymap)) +(define-key org-mode-map "\C-c\C-e" (make-sparse-keymap)) ;; TAB key with modifiers (define-key org-mode-map "\C-i" 'org-cycle) @@ -12708,8 +13697,8 @@ a time), or the day by one (if it does not contain a time)." (define-key org-mode-map "\C-c\C-q" 'org-table-wrap-region) (define-key org-mode-map "\C-c\C-xa" 'org-export-as-ascii) (define-key org-mode-map "\C-c\C-x\C-a" 'org-export-as-ascii) -(define-key org-mode-map "\C-c\C-xv" 'org-export-copy-visible) -(define-key org-mode-map "\C-c\C-x\C-v" 'org-export-copy-visible) +(define-key org-mode-map "\C-c\C-xv" 'org-export-visible) +(define-key org-mode-map "\C-c\C-x\C-v" 'org-export-visible) ;; OPML support is only an option for the future ;(define-key org-mode-map "\C-c\C-xo" 'org-export-as-opml) ;(define-key org-mode-map "\C-c\C-x\C-o" 'org-export-as-opml) @@ -12730,6 +13719,18 @@ a time), or the day by one (if it does not contain a time)." (define-key org-mode-map "\C-c\C-x\M-w" 'org-copy-special) (define-key org-mode-map "\C-c\C-x\C-y" 'org-paste-special) +(define-key org-mode-map "\C-c\C-ef" 'org-publish-current-file) +(define-key org-mode-map "\C-c\C-ep" 'org-publish-current-project) +(define-key org-mode-map "\C-c\C-ec" 'org-publish) +(define-key org-mode-map "\C-c\C-ea" 'org-publish-all) +(define-key org-mode-map "\C-c\C-e\C-f" 'org-publish-current-file) +(define-key org-mode-map "\C-c\C-e\C-p" 'org-publish-current-project) +(define-key org-mode-map "\C-c\C-e\C-c" 'org-publish) +(define-key org-mode-map "\C-c\C-e\C-a" 'org-publish-all) + +(when (featurep 'xemacs) + (define-key org-mode-map 'button3 'popup-mode-menu)) + (defsubst org-table-p () (org-at-table-p)) (defun org-self-insert-command (N) @@ -12803,7 +13804,8 @@ because, in this case the deletion might narrow the column." (goto-char pos) ;; noalign: if there were two spaces at the end, this field ;; does not determine the width of the column. - (if noalign (setq org-table-may-need-update c)))) + (if noalign (setq org-table-may-need-update c))) + (delete-char N)) (delete-char N))) ;; How to do this: Measure non-white length of current string @@ -12834,12 +13836,13 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." (defun org-shifttab () "Global visibility cycling or move to previous table field. -Calls `(org-cycle t)' or `org-table-previous-field', depending on context. +Calls `org-cycle' with argument t, or `org-table-previous-field', depending +on context. See the individual commands for more information." (interactive) (cond - ((org-at-table-p) (org-table-previous-field)) - (t (org-cycle '(4))))) + ((org-at-table-p) (call-interactively 'org-table-previous-field)) + (t (call-interactively 'org-global-cycle)))) (defun org-shiftmetaleft () "Promote subtree or delete table column. @@ -12847,8 +13850,8 @@ Calls `org-promote-subtree' or `org-table-delete-column', depending on context. See the individual commands for more information." (interactive) (cond - ((org-at-table-p) (org-table-delete-column)) - ((org-on-heading-p) (org-promote-subtree)) + ((org-at-table-p) (call-interactively 'org-table-delete-column)) + ((org-on-heading-p) (call-interactively 'org-promote-subtree)) ((org-at-item-p) (call-interactively 'org-outdent-item)) (t (org-shiftcursor-error)))) @@ -12858,8 +13861,8 @@ Calls `org-demote-subtree' or `org-table-insert-column', depending on context. See the individual commands for more information." (interactive) (cond - ((org-at-table-p) (org-table-insert-column)) - ((org-on-heading-p) (org-demote-subtree)) + ((org-at-table-p) (call-interactively 'org-table-insert-column)) + ((org-on-heading-p) (call-interactively 'org-demote-subtree)) ((org-at-item-p) (call-interactively 'org-indent-item)) (t (org-shiftcursor-error)))) @@ -12870,9 +13873,9 @@ Calls `org-move-subtree-up' or `org-table-kill-row' or for more information." (interactive "P") (cond - ((org-at-table-p) (org-table-kill-row)) - ((org-on-heading-p) (org-move-subtree-up arg)) - ((org-at-item-p) (org-move-item-up arg)) + ((org-at-table-p) (call-interactively 'org-table-kill-row)) + ((org-on-heading-p) (call-interactively 'org-move-subtree-up)) + ((org-at-item-p) (call-interactively 'org-move-item-up)) (t (org-shiftcursor-error)))) (defun org-shiftmetadown (&optional arg) "Move subtree down or insert table row. @@ -12881,9 +13884,9 @@ Calls `org-move-subtree-down' or `org-table-insert-row' or commands for more information." (interactive "P") (cond - ((org-at-table-p) (org-table-insert-row arg)) - ((org-on-heading-p) (org-move-subtree-down arg)) - ((org-at-item-p) (org-move-item-down arg)) + ((org-at-table-p) (call-interactively 'org-table-insert-row)) + ((org-on-heading-p) (call-interactively 'org-move-subtree-down)) + ((org-at-item-p) (call-interactively 'org-move-item-down)) (t (org-shiftcursor-error)))) (defun org-metaleft (&optional arg) @@ -12893,9 +13896,10 @@ With no specific context, calls the Emacs default `backward-word'. See the individual commands for more information." (interactive "P") (cond - ((org-at-table-p) (org-table-move-column 'left)) - ((or (org-on-heading-p) (org-region-active-p)) (org-do-promote)) - (t (backward-word (prefix-numeric-value arg))))) + ((org-at-table-p) (org-call-with-arg 'org-table-move-column 'left)) + ((or (org-on-heading-p) (org-region-active-p)) + (call-interactively 'org-do-promote)) + (t (call-interactively 'backward-word)))) (defun org-metaright (&optional arg) "Demote subtree or move table column to right. @@ -12904,9 +13908,10 @@ With no specific context, calls the Emacs default `forward-word'. See the individual commands for more information." (interactive "P") (cond - ((org-at-table-p) (org-table-move-column nil)) - ((or (org-on-heading-p) (org-region-active-p)) (org-do-demote)) - (t (forward-word (prefix-numeric-value arg))))) + ((org-at-table-p) (call-interactively 'org-table-move-column)) + ((or (org-on-heading-p) (org-region-active-p)) + (call-interactively 'org-do-demote)) + (t (call-interactively 'forward-word)))) (defun org-metaup (&optional arg) "Move subtree up or move table row up. @@ -12915,9 +13920,9 @@ Calls `org-move-subtree-up' or `org-table-move-row' or for more information." (interactive "P") (cond - ((org-at-table-p) (org-table-move-row 'up)) - ((org-on-heading-p) (org-move-subtree-up arg)) - ((org-at-item-p) (org-move-item-up arg)) + ((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up)) + ((org-on-heading-p) (call-interactively 'org-move-subtree-up)) + ((org-at-item-p) (call-interactively 'org-move-item-up)) (t (org-shiftcursor-error)))) (defun org-metadown (&optional arg) @@ -12927,43 +13932,46 @@ Calls `org-move-subtree-down' or `org-table-move-row' or commands for more information." (interactive "P") (cond - ((org-at-table-p) (org-table-move-row nil)) - ((org-on-heading-p) (org-move-subtree-down arg)) - ((org-at-item-p) (org-move-item-down arg)) + ((org-at-table-p) (call-interactively 'org-table-move-row)) + ((org-on-heading-p) (call-interactively 'org-move-subtree-down)) + ((org-at-item-p) (call-interactively 'org-move-item-down)) (t (org-shiftcursor-error)))) (defun org-shiftup (&optional arg) - "Increase item in timestamp or increase priority of current item. + "Increase item in timestamp or increase priority of current headline. Calls `org-timestamp-up' or `org-priority-up', depending on context. See the individual commands for more information." (interactive "P") (cond - ((org-at-timestamp-p) (org-timestamp-up arg)) - (t (org-priority-up)))) + ((org-at-timestamp-p) (call-interactively 'org-timestamp-up)) + ((org-on-heading-p) (call-interactively 'org-priority-up)) + ((org-at-item-p) (call-interactively 'org-previous-item)) + (t (call-interactively 'org-beginning-of-item) (beginning-of-line 1)))) (defun org-shiftdown (&optional arg) - "Decrease item in timestamp or decrease priority of current item. + "Decrease item in timestamp or decrease priority of current headline. Calls `org-timestamp-down' or `org-priority-down', depending on context. See the individual commands for more information." (interactive "P") (cond - ((org-at-timestamp-p) (org-timestamp-down arg)) - (t (org-priority-down)))) + ((org-at-timestamp-p) (call-interactively 'org-timestamp-down)) + ((org-on-heading-p) (call-interactively 'org-priority-down)) + (t (call-interactively 'org-next-item)))) (defun org-shiftright () "Next TODO keyword or timestamp one day later, depending on context." (interactive) (cond - ((org-at-timestamp-p) (org-timestamp-up-day)) - ((org-on-heading-p) (org-todo 'right)) + ((org-at-timestamp-p) (call-interactively 'org-timestamp-up-day)) + ((org-on-heading-p) (org-call-with-arg 'org-todo 'right)) (t (org-shiftcursor-error)))) (defun org-shiftleft () "Previous TODO keyword or timestamp one day earlier, depending on context." (interactive) (cond - ((org-at-timestamp-p) (org-timestamp-down-day)) - ((org-on-heading-p) (org-todo 'left)) + ((org-at-timestamp-p) (call-interactively 'org-timestamp-down-day)) + ((org-on-heading-p) (org-call-with-arg 'org-todo 'left)) (t (org-shiftcursor-error)))) (defun org-copy-special () @@ -13028,21 +14036,23 @@ This command does many different things, depending on context: ((and (local-variable-p 'org-finish-function (current-buffer)) (fboundp org-finish-function)) (funcall org-finish-function)) - ((org-on-target-p) (org-update-radio-target-regexp)) - ((org-on-heading-p) (org-set-tags arg)) + ((org-on-target-p) (call-interactively 'org-update-radio-target-regexp)) + ((org-on-heading-p) (call-interactively 'org-set-tags)) ((org-at-table.el-p) (require 'table) (beginning-of-line 1) (re-search-forward "|" (save-excursion (end-of-line 2) (point))) - (table-recognize-table)) + (call-interactively 'table-recognize-table)) ((org-at-table-p) (org-table-maybe-eval-formula) (if arg - (org-table-recalculate t) + (call-interactively 'org-table-recalculate) (org-table-maybe-recalculate-line)) - (org-table-align)) + (call-interactively 'org-table-align)) + ((org-at-item-checkbox-p) + (call-interactively 'org-toggle-checkbox)) ((org-at-item-p) - (org-renumber-ordered-list (prefix-numeric-value arg))) + (call-interactively 'org-renumber-ordered-list)) ((save-excursion (beginning-of-line 1) (looking-at "#\\+\\([A-Z]+\\)")) (cond ((equal (match-string 1) "TBLFM") @@ -13050,9 +14060,10 @@ This command does many different things, depending on context: (save-excursion (beginning-of-line 1) (skip-chars-backward " \r\n\t") - (if (org-at-table-p) (org-table-recalculate t)))) + (if (org-at-table-p) + (org-call-with-arg 'org-table-recalculate t)))) (t - (org-mode-restart)))) + (call-interactively 'org-mode-restart)))) (t (error "C-c C-c can do nothing useful at this location."))))) (defun org-mode-restart () @@ -13070,7 +14081,7 @@ See the individual commands for more information." (cond ((org-at-table-p) (org-table-justify-field-maybe) - (org-table-next-row)) + (call-interactively 'org-table-next-row)) (t (newline)))) (defun org-meta-return (&optional arg) @@ -13080,8 +14091,8 @@ See the individual commands for more information." (interactive "P") (cond ((org-at-table-p) - (org-table-wrap-region arg)) - (t (org-insert-heading arg)))) + (call-interactively 'org-table-wrap-region)) + (t (call-interactively 'org-insert-heading)))) ;;; Menu entries @@ -13226,10 +14237,10 @@ See the individual commands for more information." "--" ("Export" ["ASCII" org-export-as-ascii t] - ["Extract Visible Text" org-export-copy-visible t] + ["Export visible part..." org-export-visible t] ["HTML" org-export-as-html t] ["HTML and Open" org-export-as-html-and-open t] - ["XML (XOXO)" org-export-as-xml t] + ["XOXO" org-export-as-xml t] "--" ["iCalendar this file" org-export-icalendar-this-file t] ["iCalendar all agenda files" org-export-icalendar-all-agenda-files @@ -13238,6 +14249,11 @@ See the individual commands for more information." "--" ["Option Template" org-insert-export-options-template t] ["Toggle Fixed Width" org-toggle-fixed-width-section t]) + ("Publish" + ["Current File" org-publish-current-file t] + ["Current Project" org-publish-current-project t] + ["Project..." org-publish t] + ["All Projects" org-publish-all t]) "--" ("Documentation" ["Show Version" org-version t] @@ -13451,7 +14467,7 @@ that can be added." ;; The following functions capture almost the entire compatibility code ;; between the different versions of outline-mode. The only other ;; places where this is important are the font-lock-keywords, and in -;; `org-export-copy-visible'. Search for `org-noutline-p' to find them. +;; `org-export-visible'. Search for `org-noutline-p' to find them. ;; C-a should go to the beginning of a *visible* line, also in the ;; new outline.el. I guess this should be patched into Emacs? @@ -13503,15 +14519,15 @@ to a visible line beginning. This makes the function of C-a more intuitive." Only visible heading lines are considered, unless INVISIBLE-OK is non-nil." (if org-noutline-p (outline-back-to-heading invisible-ok) - (if (and (memq (char-before) '(?\n ?\r)) + (if (and (or (bobp) (memq (char-before) '(?\n ?\r))) (looking-at outline-regexp)) t (if (re-search-backward (concat (if invisible-ok "\\([\r\n]\\|^\\)" "^") outline-regexp) nil t) (if invisible-ok - (progn (goto-char (match-end 1)) - (looking-at outline-regexp))) + (progn (goto-char (or (match-end 1) (match-beginning 0))) + (looking-at outline-regexp))) (error "Before first heading"))))) (defun org-on-heading-p (&optional invisible-ok) @@ -13585,10 +14601,9 @@ When ENTRY is non-nil, show the entire entry." (if entry (progn (org-show-entry) - (save-excursion ;; FIXME: Is this the fix for points in the -| - ;; middle of text? | - (and (outline-next-heading) ;; | - (org-flag-heading nil)))) ; show the next heading _| + (save-excursion + (and (outline-next-heading) + (org-flag-heading nil)))) (outline-flag-region (max 1 (1- (point))) (save-excursion (outline-end-of-heading) (point)) (if org-noutline-p @@ -13630,7 +14645,7 @@ Show the heading too, if it is currently invisible." (save-excursion (org-back-to-heading t) (outline-flag-region - (1- (point)) + (max 1 (1- (point))) (save-excursion (re-search-forward (concat "[\r\n]\\(" outline-regexp "\\)") nil 'move) (or (match-beginning 1) (point-max))) @@ -13669,6 +14684,6 @@ Show the heading too, if it is currently invisible." (run-hooks 'org-load-hook) + ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd ;;; org.el ends here - From 8ef8f2e63ced6db89dfc0807d8dc536a2eb780c2 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 24 May 2006 07:56:03 +0000 Subject: [PATCH 003/403] (Plain lists): Added new item navigation commands. (External links): Documented elisp and info links. (Custom searches): New section. (Publishing): New chapter. (HTML export): Include a list of supported CSS classes. (Setting tags): Describe the fast-tag-setting interface. --- man/org.texi | 1086 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 861 insertions(+), 225 deletions(-) diff --git a/man/org.texi b/man/org.texi index 40e24d30146..6f8d4c329f2 100644 --- a/man/org.texi +++ b/man/org.texi @@ -1,11 +1,12 @@ \input texinfo + @c %**start of header @c @setfilename org @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 4.26 -@set DATE April 2006 +@set VERSION 4.33 +@set DATE May 2006 @dircategory Emacs @direntry @@ -84,6 +85,7 @@ Software Foundation raise funds for GNU development.'' * Tags:: Tagging headlines and matching sets of tags * Agenda views:: Collecting information into views * Exporting:: Sharing and publishing of notes +* Publishing:: Create a web site of linked Org-mode files * Miscellaneous:: All the rest which did not fit elsewhere * Index:: The fast road to specific information * Key Index:: Key bindings and where they are described @@ -97,7 +99,7 @@ Introduction * Installation and activation:: How to install Org-mode * Feedback:: Bug reports, ideas, patches etc. -Document structure +Document Structure * Outlines:: Org-mode is based on outline-mode * Headlines:: How to typeset org-tree headlines @@ -119,6 +121,7 @@ Tables Calculations in tables * Formula syntax:: How to write a formula +* Lisp formulas:: An alternative way to write formulas * Column formulas:: Formulas valid for all fields in a column * Advanced features:: Field names, parameters and automatic recalc * Named-field formulas:: Formulas valid in single fields @@ -131,7 +134,8 @@ Hyperlinks * Internal links:: Links to other places in the current file * External links:: URL-like links to the world * Handling links:: Creating, inserting and following -* Search Options:: Linking to a specific location +* Search options:: Linking to a specific location +* Custom searches:: When the default search is not enough * Remember:: Org-trees store quick notes Internal links @@ -163,7 +167,7 @@ Tags * Setting tags:: How to assign tags to a headline * Tag searches:: Searching for combinations of tags -Agenda views +Agenda Views * Agenda files:: Files being searched for agenda information * Agenda dispatcher:: Keyboard access to agenda views @@ -184,7 +188,7 @@ Exporting * ASCII export:: Exporting to plain ASCII * HTML export:: Exporting to HTML -* XML export:: Exporting to XML +* XOXO export:: Exporting to XOXO * iCalendar export:: Exporting in iCalendar format * Text interpretation:: How the exporter looks at the file @@ -194,6 +198,27 @@ Text interpretation by the exporter * Enhancing text:: Subscripts, symbols and more * Export options:: How to influence the export settings +Publishing + +* Configuration:: Defining projects +* Sample configuration:: Example projects +* Triggering publication:: Publication commands + +Configuration + +* Project alist:: The central configuration variable +* File sources and destinations:: From here to there +* Selecting files:: What files are part of the project? +* Publishing action:: Setting the function doing the publishing +* Publishing options:: Tweaking HTML export +* Publishing links:: Which links keep working after publishing? +* Project page index:: Publishing a list of project files + +Sample configuration + +* Simple example:: One-component publishing +* Complex example:: A multi-component publishing example + Miscellaneous * Completion:: M-TAB knows what you need @@ -207,6 +232,12 @@ Miscellaneous * Bugs:: Things which do not work perfectly * Acknowledgments:: These people provided feedback and more +Interaction with other packages + +* Extensions:: Third-party extensions for Org-mode +* Cooperation:: Packages Org-mode cooperates with +* Conflicts:: Packages that lead to conflicts + @end detailmenu @end menu @@ -239,21 +270,23 @@ Plain text URL-like links connect to websites, emails, Usenet messages, BBDB entries, and any files related to the projects. For printing and sharing of notes, an Org-mode file can be exported as a structured ASCII file, as HTML, or (todo and agenda items only) as an -iCalendar file. +iCalendar file. It can also serve as a publishing tool for a set of +linked webpages. Org-mode keeps simple things simple. When first fired up, it should -feel like a simple, easy to use outliner. Complexity is not imposed, -but a large amount of functionality is available when you need it. -Org-mode can be used on different levels and in different ways, for +feel like a straightforward, easy to use outliner. Complexity is not +imposed, but a large amount of functionality is available when you need +it. Org-mode can be used on different levels and in different ways, for example: @example @r{@bullet{} as an outline extension with visibility cycling and structure editing} @r{@bullet{} as an ASCII system and table editor for taking structured notes} @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities} -@r{@bullet{} as a simple hypertext system, with HTML export} @r{@bullet{} as a TODO list editor} @r{@bullet{} as a full agenda and planner with deadlines and work scheduling} +@r{@bullet{} as a simple hypertext system, with HTML export} +@r{@bullet{} as a publishing tool to create a set of interlinked webpages} @end example The Org-mode table editor can be integrated into any major mode by @@ -286,19 +319,22 @@ choose suitable keys yourself. (define-key global-map "\C-ca" 'org-agenda) @end lisp -If you have downloaded Org-mode from the Web, you must byte-compile -@file{org.el} and put it on your load path. In addition to the Emacs -Lisp lines above, you also need to add the following lines to +Furthermore, you must activate @code{font-lock-mode} in org-mode +buffers, because significant functionality depends on font-locking being +active. You can do this with either one of the following two lines: +@lisp +(global-font-lock-mode 1) ; for all buffers +(add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only +@end lisp + +If you have downloaded Org-mode from the Web, you must take additional +action: Byte-compile @file{org.el} and @file{org-publish.el} and put +them together with @file{org-install.el} on your load path. Then add to @file{.emacs}: @lisp -;; These lines only if org-mode is not part of the X/Emacs distribution. -(autoload 'org-mode "org" "Org mode" t) -(autoload 'org-diary "org" "Diary entries from Org mode") -(autoload 'org-agenda "org" "Multi-file agenda from Org mode" t) -(autoload 'org-store-link "org" "Store a link to the current location" t) -(autoload 'orgtbl-mode "org" "Org tables as a minor mode" t) -(autoload 'turn-on-orgtbl "org" "Org tables as a minor mode") +;; This line only if org-mode is not part of the X/Emacs distribution. +(require 'org-install) @end lisp @cindex org-mode, turning on @@ -405,33 +441,40 @@ starters. @ref{Clean view} describes a setup to realize this. @cindex hide text Outlines make it possible to hide parts of the text in the buffer. -Org-mode uses a single command bound to the @key{TAB} key to change -the visibility in the buffer. +Org-mode uses just two commands, bound to @key{TAB} and +@kbd{S-@key{TAB}} to change the visibility in the buffer. @cindex subtree visibility states +@cindex subtree cycling @cindex folded, subtree visibility state @cindex children, subtree visibility state @cindex subtree, subtree visibility state @table @kbd @kindex @key{TAB} @item @key{TAB} -Rotate current subtree between the states +@emph{Subtree cycling}: Rotate current subtree between the states @example ,-> FOLDED -> CHILDREN -> SUBTREE --. '-----------------------------------' @end example -At the beginning of the buffer (or when called with @kbd{C-u}), this does -the same as the command @kbd{S-@key{TAB}} below. +The cursor must be on a headline for this to work@footnote{see, however, +the option @code{org-cycle-emulate-tab}.}. When the cursor is at the +beginning of the buffer and the first line is not a headline, then +@key{TAB} actually runs global cycling (see below)@footnote{see the +option @code{org-cycle-global-at-bob}.}. Also when called with a prefix +argument (@kbd{C-u @key{TAB}}), global cycling is invoked. @cindex global visibility states +@cindex global cycling @cindex overview, global visibility state @cindex contents, global visibility state @cindex show all, global visibility state @kindex S-@key{TAB} @item S-@key{TAB} -Rotate the entire buffer between the states +@itemx C-u @key{TAB} +@emph{Global cycling}: Rotate the entire buffer between the states @example ,-> OVERVIEW -> CONTENTS -> SHOW ALL --. @@ -512,7 +555,7 @@ creation of a new headline, use a prefix arg, or first press @key{RET} to get to the beginning of the next line. When this command is used in the middle of a line, the line is split and the rest of the line becomes the new headline. If the command is used at the beginning of a -headline, the new headline is created before the current line. It at +headline, the new headline is created before the current line. If at the beginning of any other line, the content of that line is made the new heading. @kindex M-S-@key{RET} @@ -615,7 +658,7 @@ If the match is in a headline, the headline is made visible. If the match is in the body of an entry, headline and body are made visible. In order to provide minimal context, also the full hierarchy of headlines above the match is shown, as well as the headline following -the match. Each match is also highlighted, the highlights disappear +the match. Each match is also highlighted; the highlights disappear when the buffer is changed with an editing command. @end table @noindent @@ -633,7 +676,7 @@ For example: @noindent will define the key @kbd{C-c a f} as a shortcut for creating a sparse tree matching the string @samp{FIXME}. -Other commands are using sparse trees as well. For example @kbd{C-c +Other commands use sparse trees as well. For example @kbd{C-c C-v} creates a sparse TODO tree (@pxref{TODO basics}). @kindex C-c C-x v @@ -643,9 +686,8 @@ To print a sparse tree, you can use the Emacs command @code{ps-print-buffer-with-faces} which does not print invisible parts of the document @footnote{This does not work under XEmacs, because XEmacs uses selective display for outlining, not text properties.}. -Or you can use the command @kbd{C-c C-x v} to copy the visible part of -the document to another file (extension @file{.txt}) which can then be -printed in any desired way. +Or you can use the command @kbd{C-c C-x v} to export only the visible +part of the document and print the resulting file. @node Plain lists, , Sparse trees, Document structure @@ -657,7 +699,7 @@ printed in any desired way. Headlines define both the structure of the Org-mode file, and also lists (for example, TODO items (@pxref{TODO items}) should be created using -headline levels). However, when taking notes, the plain text is +headline levels). When taking notes, however, the plain text is sometimes easier to read with hand-formatted lists. Org-mode supports editing such lists, and the HTML exporter (@pxref{Exporting}) does parse and format them. @@ -668,7 +710,7 @@ bullet, lines must be indented or they will be seen as top-level headlines. Also, when you are hiding leading stars to get a clean outline view, plain list items starting with a star are visually indistinguishable from true headlines. In short: even though @samp{*} -is supported, it may be better to not use it for plain list items} as +is supported, it may be better not to use it for plain list items} as bullets. Ordered list items start with @samp{1.} or @samp{1)}. Items belonging to the same list must have the same indentation on the first line. In particular, if an ordered list reaches number @samp{10.}, then @@ -693,17 +735,30 @@ But in the end, not individual scenes matter but the film as a whole. @end example Org-mode supports these lists by tuning filling and wrapping commands -to correctly deal with them. Furthermore, the following commands act -on items when the cursor is in the first line of an item (the line -with the bullet or number). +to deal with them correctly. + +@cindex checkboxes +Every item in a plain list can be made a checkbox by starting it with +the string @samp{[ ]}. The checkbox status can conveniently be toggled +with @kbd{C-c C-c}. + +@example +* Stupid mistakes when distributing a new version + - [ ] update also Emacs CVS + - [X] forget to update index.html on the website + - [X] leaving a `(debug)' form in the code +@end example + +The following commands act on items when the cursor is in the first line +of an item (the line with the bullet or number). @table @kbd @kindex @key{TAB} @item @key{TAB} Items can be folded just like headline levels if you set the variable @code{org-cycle-include-plain-lists}. The level of an item is then -given by the indentation of the bullet/number. However, items are -always subordinate to real headlines, the hierarchies remain +given by the indentation of the bullet/number. Items are always +subordinate to real headlines, however; the hierarchies remain completely separated. @kindex M-@key{RET} @item M-@key{RET} @@ -715,6 +770,14 @@ number}, the new item is created @emph{before} the current item. If the command is executed in the white space before the text that is part of an item but does not contain the bullet, a bullet is added to the current line. +@kindex M-S-@key{RET} +@item M-S-@key{RET} +Insert a new item with a checkbox. +@kindex S-@key{up} +@kindex S-@key{down} +@item S-@key{up} +@itemx S-@key{down} +Jump to the previous/next item in the current list. @kindex M-S-@key{up} @kindex M-S-@key{down} @item M-S-@key{up} @@ -734,7 +797,9 @@ would imply a different hierarchy. To use the new hierarchy, break the command chain with a cursor motion or so. @kindex C-c C-c @item C-c C-c -Renumber the ordered list at the cursor. +If there is a checkbox in the item line, toggle the state of the +checkbox. Otherwise, if this is an ordered list, renumber the ordered +list at the cursor. @end table @node Tables, Hyperlinks, Document structure, Top @@ -806,7 +871,7 @@ If not, lines are split at whitespace into fields. You can use a prefix argument to indicate the minimum number of consecutive spaces required to identify a field separator (default: just one).@* If there is no active region, this command creates an empty Org-mode -table. However, it's easier to just start typing, like +table. But it's easier just to start typing, like @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. @tsubheading{Re-aligning and field motion} @@ -953,7 +1018,7 @@ When not empty, copy current field down to next row and move cursor along with it. Depending on the variable @code{org-table-copy-increment}, integer field values will be incremented during copy. This key is also used by CUA-mode -(@pxref{Interaction}). +(@pxref{Cooperation}). @tsubheading{Miscellaneous} @kindex C-c ` @@ -990,7 +1055,7 @@ it off with (setq org-enable-table-editor nil) @end lisp -@noindent The only table command which then still works is +@noindent Then the only table command that still works is @kbd{C-c C-c} to do a manual re-align. @node Narrow columns, Table calculations, Built-in table editor, Tables @@ -1043,19 +1108,20 @@ on a per-file basis with: @cindex spreadsheet capabilities @cindex @file{calc} package -The table editor makes use of the Emacs @file{calc} package to -implement spreadsheet-like capabilities. Org-mode has two levels of -complexity for table calculations. On the basic level, tables do only -horizontal computations, so a field can be computed from other fields -@emph{in the same row}, and Org-mode assumes that there is only one -formula for each column. This is very efficient to work with and -enough for many tasks. On the complex level, columns and individual -fields can be named for easier referencing in formulas, individual -named fields can have their own formula associated with them, and -recalculation can be automated. +The table editor makes use of the Emacs @file{calc} package to implement +spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to +derive fields from other fields. Org-mode has two levels of complexity +for table calculations. On the basic level, tables do only horizontal +computations, so a field can be computed from other fields @emph{in the +same row}, and Org-mode assumes that there is only one formula for each +column. This is very efficient to work with and enough for many tasks. +On the complex level, columns and individual fields can be named for +easier referencing in formulas, individual named fields can have their +own formula associated with them, and recalculation can be automated. @menu * Formula syntax:: How to write a formula +* Lisp formulas:: An alternative way to write formulas * Column formulas:: Formulas valid for all fields in a column * Advanced features:: Field names, parameters and automatic recalc * Named-field formulas:: Formulas valid in single fields @@ -1063,7 +1129,7 @@ recalculation can be automated. * Appetizer:: Taste the power of calc @end menu -@node Formula syntax, Column formulas, Table calculations, Table calculations +@node Formula syntax, Lisp formulas, Table calculations, Table calculations @subsection Formula syntax @cindex formula syntax @cindex syntax, of formulas @@ -1108,8 +1174,8 @@ described below, see @ref{Advanced features}. A formula can contain an optional mode string after a semicolon. This string consists of flags to influence calc's modes@footnote{By default, Org-mode uses the standard calc modes (precision 12, angular -units degrees, fraction and symbolic modes off). However, the display -format has been changed to @code{(float 5)} to keep tables compact. +units degrees, fraction and symbolic modes off). The display format, +however, has been changed to @code{(float 5)} to keep tables compact. The default settings can be configured using the variable @code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to switch the internal precision to 20 digits, @samp{n3}, @samp{s3}, @@ -1120,20 +1186,38 @@ respectively. In addition, you may provide a @code{printf} format specifier to reformat the final result. A few examples: @example - $1+$2 @r{Sum of first and second field} - $1+$2;%.2f @r{Same, format result to two decimals} - exp($2)+exp($1) @r{Math functions can be used} - $;%.1f @r{Reformat current cell to 1 decimal} - ($3-32)*5/9 @r{Degrees F -> C conversion} - $c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}} - tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1} - sin($1);Dp3%.1e @r{Same, but use printf specifier for display} - vmean($2..$7) @r{Compute column range mean, using vector function} - vsum(&III) @r{Sum numbers from 3rd hline above, up to here} - taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree} +$1+$2 @r{Sum of first and second field} +$1+$2;%.2f @r{Same, format result to two decimals} +exp($2)+exp($1) @r{Math functions can be used} +$;%.1f @r{Reformat current cell to 1 decimal} +($3-32)*5/9 @r{Degrees F -> C conversion} +$c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}} +tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1} +sin($1);Dp3%.1e @r{Same, but use printf specifier for display} +vmean($2..$7) @r{Compute column range mean, using vector function} +vsum(&III) @r{Sum numbers from 3rd hline above, up to here} +taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree} @end example -@node Column formulas, Advanced features, Formula syntax, Table calculations +@node Lisp formulas, Column formulas, Formula syntax, Table calculations +@subsection Emacs Lisp forms as formulas +@cindex Lisp forms, as table formulas + +It is also possible to write a formula in Emacs lisp; this can be useful +for string manipulation and control structures. If a formula starts +with a single quote followed by an opening parenthesis, then it is +evaluated as a lisp form. The evaluation should return either a string +or a number. Just as with @file{calc} formulas, you can provide a +format specifier after a semicolon. A few examples: + +@example +@r{swap the first two characters of the content of column 1} +'(concat (substring "$1" 1 2) (substring "$1" 0 1) (substring "$1" 2)) +@r{Add columns 1 and 2, equivalent to the calc's @code{$1+$2}} +'(+ $1 $2) +@end example + +@node Column formulas, Advanced features, Lisp formulas, Table calculations @subsection Column formulas @cindex column formula @cindex formula, for table column @@ -1203,7 +1287,7 @@ features: @noindent @b{Important}: Please note that for these special tables, recalculating the table with @kbd{C-u C-c *} will only affect rows -which are marked @samp{#} or @samp{*}, and named fields. The column +that are marked @samp{#} or @samp{*}, and named fields. The column formulas are not applied in rows with empty first field. @cindex marking characters, tables @@ -1300,7 +1384,7 @@ Detailed information will be displayed. @node Appetizer, , Editing/debugging formulas, Table calculations @subsection Appetizer -Finally, just to wet your appetite on what can be done with the fantastic +Finally, just to whet your appetite on what can be done with the fantastic @file{calc} package, here is a table that computes the Taylor series for a couple of functions (homework: try that with Excel :-) @@ -1326,7 +1410,7 @@ for a couple of functions (homework: try that with Excel :-) @cindex minor mode for tables 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. +might also want to use it in other modes like text-mode or mail-mode. 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 @@ -1369,15 +1453,16 @@ possible. @chapter Hyperlinks @cindex hyperlinks -Just like HMTL, Org-mode provides links inside a file, and external -links to other files, Usenet articles, emails and much more. +Just like HTML, Org-mode provides links inside a file, and external +links to other files, Usenet articles, emails, and much more. @menu * Link format:: How links in Org-mode are formatted * Internal links:: Links to other places in the current file * External links:: URL-like links to the world * Handling links:: Creating, inserting and following -* Search Options:: Linking to a specific location +* Search options:: Linking to a specific location +* Custom searches:: When the default search is not enough * Remember:: Org-trees store quick notes @end menu @@ -1387,7 +1472,7 @@ links to other files, Usenet articles, emails and much more. @cindex format, of links Org-mode will recognize plain URL-like links and activate them as -clickable links. However, the general link format looks like this: +clickable links. The general link format, however, looks like this: @example [[link][description]] @r{or alternatively} [[link]] @@ -1407,7 +1492,7 @@ If you place the cursor at the beginning or just behind the end of the displayed text and press @key{BACKSPACE}, you will remove the (invisible) bracket at that location. This makes the link incomplete and the internals are again displayed as plain text. Inserting the -missing bracket does hide the link internals again. To show the +missing bracket hides the link internals again. To show the internal structure of all links, use the menu entry @code{Org->Hyperlinks->Literal links}. @@ -1422,16 +1507,18 @@ the current file. Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]} lead to a text search in the current file. The link can be followed with @kbd{C-c C-o} when the cursor is on the link, or with a mouse click (@pxref{Handling links}). The preferred -match for such a link is a dedicated target: The same string in double -angular brackets. Targets may be located anywhere, often it is -convenient to put them into a comment line, for example +match for such a link is a dedicated target: the same string in double +angular brackets. Targets may be located anywhere; often it is +convenient to put them into a comment line. For example @example # <> @end example @noindent In HTML export (@pxref{HTML export}), such targets will become -named anchors for direct access through @samp{http} links. +named anchors for direct access through @samp{http} links@footnote{Note +that text before the first headline will never be exported, so the first +such target must be after the first headline.}. If no dedicated target exists, Org-mode will search for the words in the link. In the above example the search would be for @samp{my target}. @@ -1502,30 +1589,35 @@ text search such that @samp{CamelCaseLink} is equivalent to @cindex MH-E links @cindex USENET links @cindex SHELL links +@cindex Info links +@cindex elisp links -Org-mode supports links to files, websites, Usenet and email messages; -and BBDB database entries. External links are URL-like locators. The -following list shows examples for each link type. +Org-mode supports links to files, websites, Usenet and email messages, +and BBDB database entries. External links are URL-like locators. They +start with a short identifying string followed by a colon. There can be +no space after the colon. The following list shows examples for each +link type. @example -http://www.astro.uva.nl/~dominik @r{on the web} -file:/home/dominik/images/jupiter.jpg @r{file, absolute path} -file:papers/last.pdf @r{file, relative path} -news:comp.emacs @r{Usenet link} -mailto:adent@@galaxy.net @r{Mail link} -vm:folder @r{VM folder link} -vm:folder#id @r{VM message link} -vm://myself@@some.where.org/folder#id @r{VM on remote machine} -wl:folder @r{WANDERLUST folder link} -wl:folder#id @r{WANDERLUST message link} -mhe:folder @r{MH-E folder link} -mhe:folder#id @r{MH-E message link} -rmail:folder @r{RMAIL folder link} -rmail:folder#id @r{RMAIL message link} -gnus:group @r{GNUS group link} -gnus:group#id @r{GNUS article link} -bbdb:Richard Stallman @r{BBDB link} -shell:ls *.org @r{A shell command} +http://www.astro.uva.nl/~dominik @r{on the web} +file:/home/dominik/images/jupiter.jpg @r{file, absolute path} +file:papers/last.pdf @r{file, relative path} +news:comp.emacs @r{Usenet link} +mailto:adent@@galaxy.net @r{Mail link} +vm:folder @r{VM folder link} +vm:folder#id @r{VM message link} +vm://myself@@some.where.org/folder#id @r{VM on remote machine} +wl:folder @r{WANDERLUST folder link} +wl:folder#id @r{WANDERLUST message link} +mhe:folder @r{MH-E folder link} +mhe:folder#id @r{MH-E message link} +rmail:folder @r{RMAIL folder link} +rmail:folder#id @r{RMAIL message link} +gnus:group @r{GNUS group link} +gnus:group#id @r{GNUS article link} +bbdb:Richard Stallman @r{BBDB link} +shell:ls *.org @r{A shell command} +elisp:(find-file-other-frame "Elisp.org") @r{An elisp form to evaluate} @end example A link should be enclosed in double brackets and may contain a @@ -1540,10 +1632,10 @@ format}), for example: @cindex plain text external links Org-mode also finds external links in the normal text and activates them as links. If spaces must be part of the link (for example in -@samp{bbdb:Richard Stallman}) or to remove ambiguities about the end of +@samp{bbdb:Richard Stallman}), or you need to remove ambiguities about the end of the link, enclose them in angular brackets. -@node Handling links, Search Options, External links, Hyperlinks +@node Handling links, Search options, External links, Hyperlinks @section Handling links Org-mode provides methods to create a link in the correct syntax, to @@ -1559,13 +1651,16 @@ stored for later insertion into an Org-mode buffer (see below). For Org-mode files, if there is a @samp{<>} at the cursor, the link points to the target. Otherwise it points to the current headline. For VM, RMAIL, WANDERLUST, MH-E, GNUS and BBDB buffers, the link will -indicate to the current article/entry. For W3 and W3M buffers, the link +indicate the current article/entry. For W3 and W3M buffers, the link goes to the current URL. For any other files, the link will point to -the file, with a search string (@pxref{Search Options}) pointing to the +the file, with a search string (@pxref{Search options}) pointing to the contents of the current line. If there is an active region, the -selected words will form the basis of the search string. The key -binding @kbd{C-c l} is only a suggestion - see @ref{Installation and -activation}. +selected words will form the basis of the search string. If the +automatically created link is not working correctly or accurately +enough, you can write custom functions to select the search string and +to do the search for particular file types - see @ref{Custom searches}. +The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation +and activation}. @kindex C-c C-l @cindex link completion @@ -1581,7 +1676,9 @@ that you don't have to use this command to insert a link. Links in Org-mode are plain text, and you can type or paste them straight into the buffer. By using this command, the links are automatically enclosed in double brackets, and you will be asked for the optional descriptive -text. +text. If the link is a @samp{file:} link and the linked file is located +in the same directory as the current file or a subdirectory of it, the +path of the file will be inserted relative to the current directory. @kindex C-u C-c C-l @cindex file name completion @@ -1597,7 +1694,7 @@ is used, if possible with @samp{~/} for your home directory. You can force an absolute path with two @kbd{C-u} prefixes. @item C-c C-l @r{with cursor on existing link} -When the cursor is on an existing link, @kbd{C-c C-l} allows to edit the +When the cursor is on an existing link, @kbd{C-c C-l} allows you to edit the link and description parts of the link. @cindex following links @@ -1607,7 +1704,7 @@ Open link at point. This will launch a web browser for URLs (using @command{browse-url-at-point}), run vm/mh-e/wanderlust/rmail/gnus/bbdb for the corresponding links, and execute the command in a shell link. When the cursor is on an internal link, this commands runs the -corresponding search. When the cursor is on a TAGS list in a headline, +corresponding search. When the cursor is on a TAG list in a headline, it creates the corresponding TAGS view. If the cursor is on a time stamp, it compiles the agenda for that date. Furthermore, it will visit text files in @samp{file:} links with Emacs and select a suitable @@ -1620,7 +1717,7 @@ override the default application and visit the file with Emacs, use a @kindex mouse-1 @item mouse-2 @itemx mouse-1 -On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o} +On links, @kbd{mouse-2} will open the link just as @kbd{C-c C-o} would. Under Emacs 22, also @kbd{mouse-1} will follow a link. @kindex mouse-3 @@ -1643,7 +1740,7 @@ previously recorded positions. @end table -@node Search Options, Remember, Handling links, Hyperlinks +@node Search options, Custom searches, Handling links, Hyperlinks @section Search options in file links @cindex search option in file links @cindex file links, searching @@ -1651,8 +1748,14 @@ previously recorded positions. File links can contain additional information to make Emacs jump to a particular location in the file when following a link. This can be a line number or a search option after a double@footnote{For backward -compatibility, line numbers can also follow a single colon.} colon. -For example: +compatibility, line numbers can also follow a single colon.} colon. For +example, when the command @kbd{C-c l} creates a link (@pxref{Handling +links}) to a file, it encodes the words in the current line as a search +string that can be used to find this line back later when following the +link with @kbd{C-c C-o}. + +Here is the syntax of the different ways to attach a search to a file +link, together with an explanation: @example [[file:~/code/main.c::255]] @@ -1661,8 +1764,6 @@ For example: [[file:~/xx.org::/regexp/]] @end example -@noindent Here is what these options do. - @table @code @item 255 Jump to line 255. @@ -1670,7 +1771,7 @@ Jump to line 255. Search for a link target @samp{<>}, or do a text search for @samp{my target}, similar to the search in internal links, see @ref{Internal links}. In HTML export (@pxref{HTML export}), such a file -link will become an html reference to the corresponding named anchor in +link will become an HTML reference to the corresponding named anchor in the linked file. @item *My Target In an Org-mode file, restrict search to headlines. @@ -1685,10 +1786,33 @@ sparse tree with the matches. As a degenerate case, a file link with an empty file name can be used to search the current file. For example, @code{} does -a search for @samp{find me} in the current file, just like +a search for @samp{find me} in the current file, just as @samp{[[find me]]} would. -@node Remember, , Search Options, Hyperlinks +@node Custom searches, Remember, Search options, Hyperlinks +@section Custom Searches +@cindex custom search strings + +The default mechanism for creating search strings and for doing the +actual search related to a file link may not work correctly in all +cases. For example, BibTeX database files have many entries like +@samp{year="1993"} which would not result in good search strings, +because the only unique identification for a BibTeX entry is the +citation key. + +If you come across such a problem, you can write custom functions to set +the right search string for a particular file type, and to do the search +for the string in the file. Using @code{add-hook}, these functions need +to be added to the hook variables +@code{org-create-file-search-functions} and +@code{org-execute-file-search-functions}. See the docstring for these +variables for more information. Org-mode actually uses this mechanism +for Bib@TeX{} database files, and you can use the corresponding code as +an implementation example. Search for @samp{BibTeX links} in the source +file. + + +@node Remember, , Custom searches, Hyperlinks @section Remember @cindex @file{remember.el} @@ -1698,19 +1822,14 @@ store quick notes with little interruption of your work flow. See @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more information. The notes produced by @emph{Remember} can be stored in different ways, and Org-mode files are a good target. Org-mode allows -to file away notes either to a default file, or directly to the -correct location in your Org-mode outline tree. The following -customization@footnote{The three autoload forms are only necessary if -@file{org.el} is not part of the Emacs distribution or an XEmacs -package.} will tell @emph{Remember} to use org files as target, and to -create annotations compatible with Org-mode links. +you to file away notes either to a default file, or directly to the correct +location in your Org-mode outline tree. The following customization +will tell @emph{Remember} to use org files as target, and to create +annotations compatible with Org-mode links. @example (setq org-directory "~/path/to/my/orgfiles/") (setq org-default-notes-file "~/.notes") -(autoload 'org-remember-annotation "org") -(autoload 'org-remember-apply-template "org") -(autoload 'org-remember-handler "org") (setq remember-annotation-functions '(org-remember-annotation)) (setq remember-handler-functions '(org-remember-handler)) (add-hook 'remember-mode-hook 'org-remember-apply-template) @@ -1833,6 +1952,12 @@ Rotate the TODO state of the current item between The same rotation can also be done ``remotely'' from the timeline and agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}). +@kindex S-@key{right} +@kindex S-@key{left} +@item S-@key{right} +@itemx S-@key{left} +Select the following/preceding TODO state, similar to cycling. Mostly +useful if more than two TODO states are possible (@pxref{TODO extensions}). @kindex C-c C-v @cindex sparse tree, for TODO @item C-c C-v @@ -1907,7 +2032,7 @@ of working on an item, for example: @end lisp @cindex completion, of TODO keywords -Changing these variables becomes only effective in a new Emacs session. +Changing these variables only becomes effective in a new Emacs session. With this setup, the command @kbd{C-c C-t} will cycle an entry from TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also use a prefix argument to quickly select a specific state. For example @@ -1976,7 +2101,7 @@ anywhere in the file: @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, +(although you may use a different word). 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 @@ -2017,7 +2142,7 @@ difference only in the agenda (@pxref{Weekly/Daily agenda}). @table @kbd @kindex @kbd{C-c ,} @item @kbd{C-c ,} -Set the priority of the current item. The command prompts for a +Set the priority of the current headline. 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 @@ -2027,10 +2152,9 @@ agenda buffer with the @kbd{,} command (@pxref{Agenda commands}). @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}). -Furthermore, these keys are also used by CUA-mode -(@pxref{Interaction}). +Increase/decrease priority of current headline. Note that these keys +are also used to modify time stamps (@pxref{Creating timestamps}). +Furthermore, these keys are also used by CUA-mode (@pxref{Conflicts}). @end table @node Timestamps, Tags, TODO items, Top @@ -2060,15 +2184,15 @@ of an org-tree entry. Its presence allows entries to be shown on specific dates in the agenda (@pxref{Weekly/Daily agenda}). We distinguish: @table @var +@item Plain time stamp @cindex timestamp -@item TIMESTAMP A simple time stamp just assigns a date/time to an item. This is just like writing down an appointment in a paper agenda, or like writing down an event in a diary, when you want to take not of when something happened. In the timeline and agenda displays, the headline of an entry associated with a plain time stamp will be shown exactly on that date. -@item TIMERANGE +@item Time stamp range @cindex timerange Two time stamps connected by @samp{--} denote a time range. The headline will be shown on the first and last day of the range, and on @@ -2080,7 +2204,7 @@ example: <2004-08-23 Mon>--<2004-08-26 Thu> @end example -@item SCHEDULED +@item Time stamp with SCHEDULED keyword @cindex SCHEDULED keyword If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you are planning to start working on that task on the given date. So this is @@ -2095,7 +2219,7 @@ automatically be forwarded until completed. SCHEDULED: <2004-12-25 Sat> @end example -@item DEADLINE +@item Time stamp with DEADLINE keyword @cindex DEADLINE keyword If a time stamp is preceded by the word @samp{DEADLINE:}, the task (most likely a TODO item) is supposed to be finished on that date, and @@ -2109,6 +2233,12 @@ continuing until the entry is marked DONE. An example: The editor in charge is DEADLINE: <2004-02-29 Sun> @end example +@item Time stamp with CLOSED keyword +@cindex CLOSED keyword +When @code{org-log-done} is non-nil, Org-mode will automatically insert +a special time stamp each time a TODO entry is marked done +(@pxref{Progress logging}). This time stamp is enclosed in square +brackets instead of angular brackets. @end table @node Creating timestamps, , Time stamps, Timestamps @@ -2155,7 +2285,10 @@ Access the agenda for the date given by the time stamp at point @kindex C-c C-d @item C-c C-d -Insert @samp{DEADLINE} keyword along with a stamp. +Insert @samp{DEADLINE} keyword along with a stamp. The insertion will +happen in the line directly following the headline. +@c FIXME Any CLOSED timestamp will be removed.???????? + @kindex C-c C-w @cindex sparse tree, for deadlines @item C-c C-w @@ -2167,14 +2300,16 @@ all deadlines due tomorrow. @kindex C-c C-s @item C-c C-s -Insert @samp{SCHEDULED} keyword along with a stamp. +Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will +happen in the line directly following the headline. Any CLOSED +timestamp will be removed. @kindex S-@key{left} @kindex S-@key{right} @item S-@key{left} @itemx S-@key{right} Change date at cursor by one day. These key bindings conflict with -CUA-mode (@pxref{Interaction}). +CUA-mode (@pxref{Conflicts}). @kindex S-@key{up} @kindex S-@key{down} @@ -2184,7 +2319,7 @@ Change the item under the cursor in a timestamp. The cursor can be on a year, month, day, hour or minute. Note that if the cursor is not at a time stamp, these same keys modify the priority of an item. (@pxref{Priorities}). The key bindings also conflict with CUA-mode -(@pxref{Interaction}). +(@pxref{Conflicts}). @kindex C-c C-y @@ -2245,9 +2380,9 @@ Choose date in calendar (only if nothing typed into minibuffer). @cindex matching, tags @cindex sparse tree, tag based -If you wish to implement a system to cross-correlate information, an -excellent way is to assign @i{tags} to headline. Org-mode has -extensive support for using tags. +If you wish to implement a system of labels and contexts for +cross-correlating information, an excellent way is to assign @i{tags} to +headlines. Org-mode has extensive support for using tags. Every headline can contain a list of tags, at the end of the headline. Tags are normal words containing letters, numbers, @samp{_}, and @@ -2279,8 +2414,8 @@ the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:}, @samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and Org-mode finds that a certain headline matches the search criterion, it will not check any sublevel headline, assuming that these likely also -match, and that the list of matches can become very long. However, this -may not be what you want, and you can influence inheritance and +match, and that the list of matches can become very long. This may +not be what you want, however, and you can influence inheritance and searching using the variables @code{org-use-tag-inheritance} and @code{org-tags-match-list-sublevels}. @@ -2289,25 +2424,75 @@ searching using the variables @code{org-use-tag-inheritance} and @cindex setting tags @kindex M-@key{TAB} -As Org-mode deals with plain text files, tags can simply be typed into -the buffer. After a colon, @kbd{M-@key{TAB}} offers completion on all -tags being used in the current buffer. There is also a special command -for inserting tags: +Tags can simply be typed into the buffer at the end of a headline. +After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is +also a special command for inserting tags: @table @kbd @kindex C-c C-c @item C-c C-c @cindex completion, of tags -Enter new tags for the current headline. The minibuffer will prompt for -a list of tags and offer completion with respect to all other tags used -in the current buffer. Several tags, separated by colons, may be -specified at the prompt. After pressing @key{RET}, the tags will be -inserted and aligned to @code{org-tags-column}. When called with a -@kbd{C-u} prefix, all tags in the current buffer will be aligned to that -column, just to make things look nice. TAGS are automatically realigned -after promotion, demotion, and TODO state changes (@pxref{TODO basics}). +Enter new tags for the current headline. Org-mode will either offer +completion or a special single-key interface for setting tags, see +below. After pressing @key{RET}, the tags will be inserted and aligned +to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all +tags in the current buffer will be aligned to that column, just to make +things look nice. TAGS are automatically realigned after promotion, +demotion, and TODO state changes (@pxref{TODO basics}). @end table +Org will support tag insertion based on a @emph{list of tags}. By +default this list is constructed dynamically, containing all tags +currently used in the buffer. You may also globally specify a hard list +of tags with the variable @code{org-tag-alist}. Finally you can set +the allowed tags for a given file with lines like + +@example +#+TAGS: @@WORK @@HOME @@TENNISCLUB +#+TAGS: Laptop Car PC Sailboat +@end example + +The default method Org-mode uses to support setting tags is completion. +However, it also implements a much better method: @emph{fast tag +selection}. This method allows to select and deselect tags with a +single key per tag. To function efficiently, you need to assign unique +keys to all tags. This can be done globally with + +@lisp +(setq org-tag-alist '(("@@WORK" . ?w) ("@@HOME" . ?h) ("Laptop" . ?l))) +@end lisp + +@noindent or on a per-file basis with + +@example +#+TAGS: @@WORK(w) @@HOME(h) @@TENNISCLUB(t) +#+TAGS: Laptop(l) Car(c) PC(p) Sailboat(s) +@end example + +@noindent Don't forget to press @kbd{C-c C-c} with the cursor in one of +these lines to activate any changes. + +If selection keys have been configured, pressing @kbd{C-c C-c} will +automatically present you with a special interface, listing inherited +tags, the tags of the current headline, and a list of all legal tags +with corresponding keys. Pressing keys for the tags will add or remove +them from the list of tags in the current line. @key{SPC} clears all +tags for this line, @kbd{RET} accepts the modified set, and @kbd{C-g} +aborts without installing changes. This method lets you assing tags to +a headline with very few keys. With the above setup, you could clear +the current tags and set @samp{@@HOME}, @samp{Laptop} and @samp{PC} tags +with just the following keys: @kbd{C-c C-c @key{SPC} h l p @key{RET}}. + +What if you have globally defined your preferred set of tags using the +variable @code{org-tag-alist}, but would like to use a dynamic tag list +in a specific file? Just add and empty TAGS option line to that file: + +@example +#+TAGS: +@end example + + + @node Tag searches, , Setting tags, Tags @section Tag searches @cindex tag searches @@ -2750,7 +2935,9 @@ Go to the original location of the item and delete other windows. @item f Toggle Follow mode. In Follow mode, as you move the cursor through the agenda buffer, the other window always shows the corresponding -location in the org file. +location in the org file. The initial setting for this mode in new +agenda buffers can be set with the variable +@code{org-agenda-start-with-follow-mode}. @kindex l @item l @@ -2844,6 +3031,14 @@ key for this. @itemx S-@key{down} Decrease the priority of the current item. +@kindex C-c C-s +@item C-c C-s +Schedule this item + +@kindex C-c C-d +@item C-c C-d +Set a deadline for this item. + @kindex S-@key{right} @item S-@key{right} Change the time stamp associated with the current line by one day into @@ -2869,7 +3064,7 @@ on my keyboard. @item i Insert a new entry into the diary. Prompts for the type of entry (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new -entry in the diary, just like @kbd{i d} etc. would do in the calendar. +entry in the diary, just as @kbd{i d} etc. would do in the calendar. The date is taken from the cursor position. @tsubheading{Calendar commands} @@ -2917,14 +3112,14 @@ visit org files will not be removed. @end table -@node Exporting, Miscellaneous, Agenda views, Top +@node Exporting, Publishing, Agenda views, Top @chapter Exporting @cindex exporting Org-mode documents can be exported into a variety of other formats. For printing and sharing of notes, ASCII export produces a readable and -simple version of an Org-mode file. HTML export allows to publish a -notes file on the web, while the XML format provides a solid base for +simple version of an Org-mode file. HTML export allows you to publish a +notes file on the web, while the XOXO format provides a solid base for exchange with a broad range of other applications. To incorporate entries with associated times like deadlines or appointments into a desktop calendar program like iCal, Org-mode can also produce extracts @@ -2937,7 +3132,7 @@ produced. @xref{Text interpretation}, for more details. @menu * ASCII export:: Exporting to plain ASCII * HTML export:: Exporting to HTML -* XML export:: Exporting to XML +* XOXO export:: Exporting to XOXO * iCalendar export:: Exporting in iCalendar format * Text interpretation:: How the exporter looks at the file @end menu @@ -2959,6 +3154,9 @@ Export as ASCII file. If there is an active region, only the region will be exported. For an org file @file{myfile.org}, the ASCII file will be @file{myfile.txt}. The file will be overwritten without warning. +@kindex C-c C-x v a +@item C-c C-x v a +Export only the visible part of the document. @end table @cindex headline levels, for exporting @@ -2974,7 +3172,7 @@ at a different level, specify it with a prefix argument. For example, @noindent creates only top level headlines and does the rest as items. -@node HTML export, XML export, ASCII export, Exporting +@node HTML export, XOXO export, ASCII export, Exporting @section HTML export @cindex HTML export @@ -2992,6 +3190,11 @@ Export as HTML file @file{myfile.html}. @kindex C-c C-x b @item C-c C-x b Export as HTML file and open it with a browser. +@kindex C-c C-x v h +@kindex C-c C-x v b +@item C-c C-x v h +@item C-c C-x v b +Export only the visible part of the document. @end table @cindex headline levels, for exporting @@ -3008,12 +3211,36 @@ at a different level, specify it with a prefix argument. For example, creates two levels of headings and does the rest as items. If you want to include HTML tags which should be interpreted as such, -mark them with a @samp{@@} like in @samp{@@bold text@@}. +mark them with @samp{@@} as in @samp{@@bold text@@}. Plain @samp{<} and @samp{>} are always transformed to @samp{<} and @samp{>} in HTML export. -You can also give style information for the exported file. The -default specification can be configured through the option +@cindex links, in HTML export +@cindex internal links, in HTML export +@cindex external links, in HTML export +Internal links (@pxref{Internal links}) will continue to work in HTML +files only if they match a dedicated @samp{<>}. Automatic links +created by radio targets (@pxref{Radio targets}) will also work in the +HTML file. Links to external files will still work if the HTML file is +in the same directory as the Org-mode file. Links to other @file{.org} +files will be translated into HTML links under the assumption that an +HTML version also exists of the linked file. For information related to +linking files while publishing them to a publishing directory see +@ref{Publishing links}. + +You can also give style information for the exported file. The HTML +exporter assigns the following CSS classes to appropriate parts of the +document - your style specifications may change these: +@example +.todo @r{TODO keywords} +.done @r{the DONE keyword} +.timestamp @r{time stamp} +.timestamp-kwd @r{keyword associated with a time stamp, like SCHEDULED} +.tag @r{tag in a headline} +.target @r{target for links} +@end example + +The default style specification can be configured through the option @code{org-export-html-style}. If you want to use a file-local style, you may use file variables, best wrapped into a COMMENT section at the end of the outline tree. For example: @@ -3037,21 +3264,24 @@ section in the buffer. @c FIXME: More about header and footer styles @c FIXME: Talk about links and targets. -@node XML export, iCalendar export, HTML export, Exporting -@section XML export -@cindex XML export +@node XOXO export, iCalendar export, HTML export, Exporting +@section XOXO export +@cindex XOXO export -Org-mode contains an XML exporter that produces XOXO-style XML. +Org-mode contains an exporter that produces XOXO-style output. Currently, this exporter only handles the general outline structure and does not interpret any additional Org-mode features. @table @kbd @kindex C-c C-x C-x @item C-c C-x C-x -Export as XML file @file{myfile.xml}. +Export as XOXO file @file{myfile.html}. +@kindex C-c C-x v +@item C-c C-x v x +Export only the visible part of the document. @end table -@node iCalendar export, Text interpretation, XML export, Exporting +@node iCalendar export, Text interpretation, XOXO export, Exporting @section iCalendar export @cindex iCalendar export @@ -3231,7 +3461,7 @@ you can: @cindex section-numbers @cindex table of contents @cindex linebreak preservation -@cindex quoted html tags +@cindex quoted HTML tags @cindex fixed-width sections @cindex tables @cindex @TeX{}-like syntax for sub- and superscripts @@ -3242,7 +3472,7 @@ H: @r{set the number of headline levels for export} num: @r{turn on/off section-numbers} toc: @r{turn on/off table of contents} \n: @r{turn on/off linebreak-preservation} -@@: @r{turn on/off quoted html tags} +@@: @r{turn on/off quoted HTML tags} :: @r{turn on/off fixed-width sections} |: @r{turn on/off tables} ^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts.} @@ -3250,7 +3480,313 @@ toc: @r{turn on/off table of contents} TeX: @r{turn on/off @TeX{} macros} @end example -@node Miscellaneous, Index, Exporting, Top +@node Publishing, Miscellaneous, Exporting, Top +@chapter Publishing + +Org-mode includes@footnote{@file{org-publish.el} is not yet part of +emacs, so if you are using @file{org.el} as it comes with Emacs, you +need to download this file separately. Also make sure org.el is at +least version 4.27.} a publishing management system +that allows you to configure automatic HTML conversion of +@emph{projects} composed of interlinked org files. This system is +called @emph{org-publish}. You can also configure org-publish to +automatically upload your exported HTML pages and related attachments, +such as images and source code files, to a web server. Org-publish turns +org-mode into a web-site authoring tool. + +Org-publish has been contributed to Org-mode by David O'Toole. + +@menu +* Configuration:: Defining projects +* Sample configuration:: Example projects +* Triggering publication:: Publication commands +@end menu + +@node Configuration, Sample configuration, Publishing, Publishing +@section Configuration + +Publishing needs significant configuration to specify files, destination +and many other properties of a project. + +@menu +* Project alist:: The central configuration variable +* File sources and destinations:: From here to there +* Selecting files:: What files are part of the project? +* Publishing action:: Setting the function doing the publishing +* Publishing options:: Tweaking HTML export +* Publishing links:: Which links keep working after publishing? +* Project page index:: Publishing a list of project files +@end menu + +@node Project alist, File sources and destinations, Configuration, Configuration +@subsection The variable @code{org-publish-project-alist} + +Org-publish is configured almost entirely through setting the value of +one variable, called @code{org-publish-project-alist}. +Each element of the list configures one project, and may be in one of +the two following forms: + +@lisp +("project-name" :property value :property value ...) + +@r{or} + +("project-name" + ("component1" :property value :property value ...) + ("component2" :property value :property value ...) + ...) +@end lisp + +In both cases, projects are configured by specifying property values. +A project defines the set of files that will be published, as well as +the publishing configuration to use when publishing those files. +When a project takes the second form listed above, the individual +property lists are taken to be "components" of the project, which +group together files requiring different publishing options. + +@node File sources and destinations, Selecting files, Project alist, Configuration +@subsection Sources and destinations for files + +Most properties are optional, but some should always be set. In +particular, org-publish needs to know where to look for source files, +and where to put published files. + +@multitable @columnfractions 0.3 0.7 +@item @code{:base-directory} +@tab Directory containing publishing source files +@item @code{:publishing-directory} +@tab Directory (possibly remote) where output files will be published. +@end multitable +@noindent + +@node Selecting files, Publishing action, File sources and destinations, Configuration +@subsection Selecting files + +By default, all files with extension @file{.org} in the base directory +are considered part of the project. This can be modified by setting the +properties +@multitable @columnfractions 0.25 0.75 +@item @code{:base-extension} +@tab Extension (without the dot!) of source files. This actually is a +regular expression. + +@item @code{:exclude} +@tab Regular expression to match file names that should not be +published, even though they have been selected on the basis of their +extension. + +@item @code{:include} +@tab List of files to be included regardless of @code{:base-extension} +and @code{:exclude}. +@end multitable + +@node Publishing action, Publishing options, Selecting files, Configuration +@subsection Publishing Action + +Publishing means that a file is copied to the destination directory and +possibly transformed in the process. The default transformation is to +export Org-mode files as HTML files, and this is done by the function +@code{org-publish-org-to-html} which calls the HTML exporter +(@pxref{HTML export}). Other files like images only need to be copied +to the publishing destination. For non-Org-mode files, you need to +specify the publishing function. + +@multitable @columnfractions 0.3 0.7 +@item @code{:publishing-function} +@tab Function executing the publication of a file. +@end multitable + +The function must accept two arguments: a property list containing at +least a @code{:publishing-directory} property, and the name of the file +to be published. I should take the specified file, make the necessary +transformation (if any) and place the result into the destination folder. +You can write your own publishing function, but @code{org-publish} +provides one for attachments (files that only need to be copied): +@code{org-publish-attachment}. + +@node Publishing options, Publishing links, Publishing action, Configuration +@subsection Options for the HTML exporter + +The property list can be used to set many export options for the HTML +exporter. In most cases, these properties correspond to user variables +in Org-mode. The table below lists these properties along with the +variable they belong to. See the documentation string for the +respective variable for details. + +@multitable @columnfractions 0.3 0.7 +@item @code{:language} @tab @code{org-export-default-language} +@item @code{:headline-levels} @tab @code{org-export-headline-levels} +@item @code{:section-numbers} @tab @code{org-export-with-section-numbers} +@item @code{:table-of-contents} @tab @code{org-export-with-toc} +@item @code{:emphasize} @tab @code{org-export-with-emphasize} +@item @code{:sub-superscript} @tab @code{org-export-with-sub-superscripts} +@item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros} +@item @code{:fixed-width} @tab @code{org-export-with-fixed-width} +@item @code{:timestamps} .@tab @code{org-export-with-timestamps} +@item @code{:tags} .@tab @code{org-export-with-tags} +@item @code{:tables} @tab @code{org-export-with-tables} +@item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line} +@item @code{:style} @tab @code{org-export-html-style} +@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html} +@item @code{:inline-images} @tab @code{org-export-html-inline-images} +@item @code{:expand-quoted-html} @tab @code{org-export-html-expand} +@item @code{:timestamp} @tab @code{org-export-html-with-timestamp} +@item @code{:publishing-directory} @tab @code{org-export-publishing-directory} +@item @code{:preamble} @tab @code{org-export-html-preamble} +@item @code{:postamble} @tab @code{org-export-html-postamble} +@item @code{:auto-preamble} @tab @code{org-export-html-auto-preamble} +@item @code{:auto-postamble} @tab @code{org-export-html-auto-postamble} +@item @code{:author} @tab @code{user-full-name} +@item @code{:email} @tab @code{user-mail-address} +@end multitable + +When a property is given a value in org-publish-project-alist, its +setting overrides the value of the corresponding user variable (if any) +during publishing. options set within a file (@pxref{Export +options}), however, override everything. + +@node Publishing links, Project page index, Publishing options, Configuration +@subsection Links between published files + +To create a link from one Org-mode file to another, you would use +something like @samp{[[file:foo.org][The foo]]} or simply +@samp{file:foo.org.} (@pxref{Hyperlinks}). Upon publishing this link +becomes a link to @file{foo.html}. In this way, you can interlink the +pages of your "org web" project and the links will work as expected when +you publish them to HTML. + +You may also link to related files, such as images. Provided you are +careful with relative pathnames, and provided you have also configured +org-publish to upload the related files, these links will work +too. @ref{Complex example} for an example of this usage. + +@node Project page index, , Publishing links, Configuration +@subsection Project page index + +The following properties may be used to control publishing of an +index of files or summary page for a given project. + +@multitable @columnfractions 0.25 0.75 +@item @code{:auto-index} +@tab When non-nil, publish an index during org-publish-current-project or +org-publish-all. + +@item @code{:index-filename} +@tab Filename for output of index. Defaults to @file{index.org} (which +becomes @file{index.html}). + +@item @code{:index-title} +@tab Title of index page. Defaults to name of file. + +@item @code{:index-function} +@tab Plugin function to use for generation of index. +Defaults to @code{org-publish-org-index}, which generates a plain list +of links to all files in the project. +@end multitable + +@node Sample configuration, Triggering publication, Configuration, Publishing +@section Sample configuration + +Below we provide two example configurations. The first one is a simple +project publishing only a set of Org-mode files. The second example is +more complex, with a multi-component project. + +@menu +* Simple example:: One-component publishing +* Complex example:: A multi-component publishing example +@end menu + +@node Simple example, Complex example, Sample configuration, Sample configuration +@subsection Example: simple publishing configuration + +This example publishes a set of Org-mode files to the @file{public_html} +directory on the local machine. + +@lisp +(setq org-publish-project-alist + '(("org" + :base-directory "~/org/" + :publishing-directory "~/public_html" + :section-numbers nil + :table-of-contents nil + :style ""))) +@end lisp + +@node Complex example, , Simple example, Sample configuration +@subsection Example: complex publishing configuration + +This more complicated example publishes an entire website, including +org files converted to HTML, image files, emacs lisp source code, and +stylesheets. The publishing-directory is remote and private files are +excluded. + +To ensure that links are preserved, care should be taken to replicate +your directory structure on the web server, and to use relative file +paths. For example, if your org files are kept in @file{~/org} and your +publishable images in @file{~/images}, you'd link to an image with +@c +@example +file:../images/myimage.png +@end example +@c +On the web server, the relative path to the image should be the +same. You can accomplish this by setting up an "images" folder in the +right place on the webserver, and publishing images to it. + +@lisp +(setq org-publish-project-alist + '(("website" + ("orgfiles" + :base-directory "~/org/" + :base-extension "org" + :publishing-directory "/ssh:user@@host:~/html/notebook/" + :publishing-function org-publish-org-to-html + :exclude "PrivatePage.org" ;; regexp + :headline-levels 3 + :section-numbers nil + :table-of-contents nil + :style "" + :auto-preamble t + :auto-postamble nil) + + ("images" + :base-directory "~/images/" + :base-extension "jpg\\|gif\\|png" + :publishing-directory "/ssh:user@@host:~/html/images/" + :publishing-function org-publish-attachment) + + ("other" + :base-directory "~/other/" + :base-extension "css\\|el" + :publishing-directory "/ssh:user@@host:~/html/other/" + :publishing-function org-publish-attachment)))) +@end lisp + +@node Triggering publication, , Sample configuration, Publishing +@section Triggering publication + +Once org-publish is properly configured, you can publish with the +following functions: + +@table @kbd +@item C-c C-e c +Prompts for a specific project to publish. +@item C-c C-e p +Publishes the project the current file is part of. +@item C-c C-e f +Publishes only the current file. +@item C-c C-e a +Publish all projects. +@end table + +Org uses timestamps to track when a file has changed. The above +functions normally only publish changed files. You can override this and +force publishing of all files by giving a prefix argument. + +@node Miscellaneous, Index, Publishing, Top @chapter Miscellaneous @menu @@ -3359,6 +3895,12 @@ variable is @code{org-startup-align-all-tables}, with a default value align @r{align all tables} noalign @r{don't align tables on startup} @end example +Logging when a TODO item is marked DONE (variable @code{org-log-done}) +can be configured using these options. +@example +logging @r{record a timestamp when an item is marked DONE} +nologging @r{don't record when items are marked DONE} +@end example Here are the options for hiding leading stars in outline headings. The corresponding variables are @code{org-hide-leading-stars} and @code{org-odd-levels-only}, both with a default setting @code{nil} @@ -3373,6 +3915,10 @@ oddeven @r{allow all outline levels} These lines that the TODO keywords and their interpretation in the current file. The corresponding variables are @code{org-todo-keywords} and @code{org-todo-interpretation}. +@item #+TAGS: TAG1(c1) TAG2(c2) +These lines (several such lines are allowed) specify the legal tags in +this file, and (potionally) the corresponding @emph{fast tag selection} +keys. The corresponding variable is @code{org-tag-alist}. @item #+CATEGORY: This line sets the category for the agenda file. The category applies for all subsequent lines until the next @samp{#+CATEGORY} line, or the @@ -3392,7 +3938,7 @@ The key @kbd{C-c C-c} has many purposes in org-mode, which are all mentioned scattered throughout this manual. One specific function of this key is to add @emph{tags} to a headline (@pxref{Tags}). In many other circumstances it means something like @emph{Hey Org-mode, look -here and update according to what you see here}. Here is a summary what +here and update according to what you see here}. Here is a summary of what this means in different contexts. @itemize @minus @@ -3401,14 +3947,14 @@ this means in different contexts. @c into the current line, aligned to `org-tags-column'. When called @c with prefix arg, realign all tags in the current buffer. @item -If the cursor is in one of the special #+KEYWORD lines, this +If the cursor is in one of the special @code{#+KEYWORD} lines, this triggers scanning the buffer for these lines and updating the information. @item If the cursor is inside a table, realign the table. This command works even if the automatic table editor has been turned off. @item -If the cursor is on a #+TBLFM line, re-apply the formulas to +If the cursor is on a @code{#+TBLFM} line, re-apply the formulas to the entire table. @item If the cursor is inside a table created by the @file{table.el} package, @@ -3418,8 +3964,11 @@ If the current buffer is a remember buffer, close note and file it. with a prefix argument, file it without further interaction to the default location. @item -If the cursor is on a <<>>, update radio targets and corresponding -links in this buffer. +If the cursor is on a @code{<<>>}, update radio targets and +corresponding links in this buffer. +@item +If the cursor is in a plain list item with a checkbox, toggle the status +of the checkbox. @item If the cursor is on a numbered item in a plain list, renumber the ordered list. @@ -3568,27 +4117,50 @@ rather use @kbd{C-c .} to re-insert the timestamp. @cindex FAQ @enumerate - -@cindex allout.el, conflict with @cindex @code{keymapp nil} error @item @b{When I try to use Org-mode, I always get @code{(wrong-type-argument keymapp nil)}}.@* -This is a conflict with an outdated version of the @file{allout.el} -package which pretends to be also the standard outline-mode but is not. -This happens with older versions of @file{allout.el}, for example the -one distributed with Emacs 21. Upgrade to Emacs 22 and this problem -will disappear. If for some reason you cannot do this, make sure that -org.el is loaded @emph{before} @file{allout.el}, for example by putting -@code{(require 'org)} early enough into your @file{.emacs} file. +@cindex allout.el, conflict with +This is a conflict with an outdated version of the @file{allout.el}. +See @ref{Conflicts}. @item @b{Org-mode seems to be a useful default mode for the various @file{README} files I have scattered through my directories. How do I turn it on for all @file{README} files?} -@c @* -@example +@lisp (add-to-list 'auto-mode-alist '("README$" . org-mode)) -@end example +@end lisp + +@item @b{I would like to use editing features of org-mode in other +modes, is his possible?}@* +@c +Not really. For tables there is @code{orgtbl-mode} which implements the +table editor as a minor mode. For other features you need to switch to +Org-mode temporarily, or prepare text in a different buffer. + +@item @b{Can I get the visibility-cycling features in outline-mode and +outline-minor-mode?}@* +@c +Yes, these functions are written in a way that they are independent of +the outline setup. The following setup provides standard Org-mode +functionality in outline-mode on @key{TAB} and @kbd{S-@key{TAB}}. For +outline-minor-mode, we use @kbd{C-@key{TAB}} instead of @key{TAB}, +because @key{TAB} usually has mode-specific tasks. +@lisp +(add-hook 'outline-minor-mode-hook + (lambda () + (define-key outline-minor-mode-map [(control tab)] 'org-cycle) + (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle))) +(add-hook 'outline-mode-hook + (lambda () + (define-key outline-mode-map [(tab)] 'org-cycle) + (define-key outline-mode-map [(shift tab)] 'org-global-cycle))) +@end lisp + +Or check out @file{outline-magic.el}, which does this and also provides +promotion and demotion functionality. @file{outline-magic.el} is +available at @url{http://www.astro.uva.nl/~dominik/Tools/OutlineMagic}. @item @b{Some of my links stopped working after I upgraded to a version 4.20 or later. Why is this, and how can I fix it?}@* @@ -3617,8 +4189,8 @@ Would I let you down like that? If you must, you can do this org-link-format "<%s>") @end lisp -@item @b{When I am executing shell links I always get a -confirmation prompt and need to type @kbd{yes @key{RET}}, thats 4 key +@item @b{When I am executing shell/elisp links I always get a +confirmation prompt and need to type @kbd{yes @key{RET}}, that's 4 key presses! Can I get rid of this?}@* @c @cindex shell links, confirmation @@ -3628,10 +4200,11 @@ potentially dangerous commands. For example, imagine a link @samp{[[shell:rm -rf ~/*][Google Search]]}. In an Org-mode buffer, this command would look like @samp{Google Search}, but really it would remove your home directory. If you wish, you can make it easier to respond to -the query by setting @code{org-confirm-shell-links} to @code{y-or-n-p}. -Then a single @kbd{y} keypress will be enough to confirm shell links. -It is also possible to turn off this check entirely, but I do not -recommend to do this. Be warned. +the query by setting @code{org-confirm-shell-link-function} and/or +@code{org-confirm-elisp-link-function} to @code{y-or-n-p}. Then a +single @kbd{y} keypress will be enough to confirm those links. It is +also possible to turn off this check entirely, but I do not recommend to +do this. Be warned. @item @b{All these stars are driving me mad, I just find the Emacs outlines unreadable. Can't you just put white space and a single star as a @@ -3681,7 +4254,7 @@ export. Marking can be done with @kbd{C-c @@ C-x C-x}, for example. @item @b{Org-mode takes over the S-cursor keys. I also want to use CUA-mode, is there a way to fix this conflict?}@* -Yes, see @ref{Interaction}. +Yes, see @ref{Conflicts}. @item @b{One of my table columns has started to fill up with @samp{#ERROR}. What is going on?}@* @@ -3712,10 +4285,8 @@ emacs diary?}@* Since the org-mode agenda is much more powerful and can contain the diary (@pxref{Calendar/Diary integration}), you should think twice before deciding to do this. Integrating Org-mode information into the -diary is, however, possible. The following steps are necessary: -Autoload the function @command{org-diary} as shown above under -@ref{Installation and activation}. You also need to use @emph{fancy -diary display} by setting in @file{.emacs}: +diary is, however, possible. You need to turn on @emph{fancy diary +display} by setting in @file{.emacs}: @lisp (add-hook 'diary-display-hook 'fancy-diary-display) @@ -3738,7 +4309,7 @@ You may also select specific files with If you now launch the calendar and press @kbd{d} to display a diary, the headlines of entries containing a timestamp, date range, schedule, or -deadline referring to the selected date will be listed. Just like in +deadline referring to the selected date will be listed. Just like Org-mode's agenda view, the diary for @emph{today} contains additional entries for overdue deadlines and scheduled items. See also the documentation of the @command{org-diary} function. Under XEmacs, it is @@ -3751,20 +4322,50 @@ the agenda buffer. @node Interaction, Bugs, FAQ, Miscellaneous @section Interaction with other packages @cindex packages, interaction with other -Org-mode can cooperate with the following packages: +Org-mode lives in the world of GNU Emacs and interacts in various ways +with other code out there. + +@menu +* Extensions:: Third-party extensions for Org-mode +* Cooperation:: Packages Org-mode cooperates with +* Conflicts:: Packages that lead to conflicts +@end menu + +@node Extensions, Cooperation, Interaction, Interaction +@subsection Third-party extensions for Org-mode + +The following extensions for Org-mode have been written by other people: @table @asis +@cindex @file{org-checklet.el} +@item @file{org-checklet.el} by Frank Ruell +Provides checklist of items which can be either checked or unchecked. +This is similar to the TODO functionality in Org-mode, but never shows +up in the agenda. @file{org-checklet} is freely available at +@url{http://www.emacswiki.org/cgi-bin/emacs/org-checklet.el}. @cindex @file{org-mouse.el} @item @file{org-mouse.el} by Piotr Zielinski This package implements extended mouse functionality for Org-mode. It allows you to cycle visibility and to edit the document structure with the mouse. Best of all, it provides a context-sensitive menu on @key{mouse-3} that changes depending on the context of a mouse-click. -Use a search engine to find this package on the web. -@cindex @file{table.el} -@item @file{table.el} by Takaaki Ota -Org mode cooperates with table.el, see @ref{table.el}. @file{table.el} -is part of Emacs 22. +@file{org-mouse.el} is freely available at @url{http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el}. +@cindex @file{org-publish.el} +@item @file{org-publish.el} by David O'Toole +This package provides facilities for publishing related sets of Org-mode +files together with linked files like images as a webpages. It is +highly configurable and can be used for other publishing purposes as +well. As of Org-mode version 4.30, @file{org-publish.el} is part of +the Org-mode distribution. It is not yet part of Emacs, however, due to +a pending copyright assignment. In the mean time, @file{org-publish.el} +can be downloaded from David's site: +@url{http://dto.freeshell.org/e/org-publish.el}. +@end table + +@node Cooperation, Conflicts, Extensions, Interaction +@subsection Packages that Org-mode cooperates with + +@table @asis @cindex @file{calc.el} @item @file{calc.el} by Dave Gillespie Org-mode uses the calc package for implementing spreadsheet @@ -3787,7 +4388,31 @@ at @url{http://www.astro.uva.nl/~dominik/Tools}. Org-mode checks for the function @code{constants-get}, which has to be autoloaded in your setup. See the installation instructions in the file @file{constants.el}. +@item @file{remember.el} by John Wiegley @cindex @file{remember.el} +Org mode cooperates with remember, see @ref{Remember}. +@file{Remember.el} is not part of Emacs, find it on the web. +@cindex @file{table.el} +@item @file{table.el} by Takaaki Ota +Org mode cooperates with table.el, see @ref{table.el}. @file{table.el} +is part of Emacs 22. +@end table + +@node Conflicts, , Cooperation, Interaction +@subsection Packages that lead to conflicts with Org-mode + +@table @asis + +@cindex @file{allout.el} +@item @file{allout.el} by Ken Manheimer +Startup of Org-mode may fail with the error message +@code{(wrong-type-argument keymapp nil)} when there is an outdated +version @file{allout.el} on the load path, for example the version +distributed with Emacs 21.x. Upgrade to Emacs 22 and this problem will +disappear. If for some reason you cannot do this, make sure that org.el +is loaded @emph{before} @file{allout.el}, for example by putting +@code{(require 'org)} early enough into your @file{.emacs} file. + @cindex @file{CUA.el} @item @file{CUA.el} by Kim. F. Storm Keybindings in Org-mode conflict with the @kbd{S-} keys @@ -3807,11 +4432,13 @@ S-RET -> C-S-RET Yes, these are unfortunately more difficult to remember. If you want to have other replacement keys, look at the variable @code{org-disputed-keys}. -@item @file{remember.el} by John Wiegley -Org mode cooperates with remember, see @ref{Remember}. -@file{Remember.el} is not part of Emacs, find it on the web. +@item @file{windmove.el} by Hovav Shacham +@cindex @file{windmove.el} +Also this package uses the @kbd{S-} keys, so everything written +in the paragraph above about CUA mode also applies here. @end table + @node Bugs, Acknowledgments, Interaction, Miscellaneous @section Bugs @cindex bugs @@ -3835,7 +4462,7 @@ Text in an entry protected with the @samp{QUOTE} keyword should not autowrap. @item When the application called by @kbd{C-c C-o} to open a file link fails -(for example because the application does not exits or refuses to open +(for example because the application does not exist or refuses to open the file), it does so silently. No error message is displayed. @item Plain list items should be able to hold a TODO item. Unfortunately this @@ -3851,9 +4478,8 @@ Recalculating a table line applies the formulas from left to right. If a formula uses @emph{calculated} fields further down the row, multiple recalculation may be needed to get all fields consistent. @item -You can only make a single word boldface or italic. To emphasize -several words in a row, each must have the emphasize markers, like in -@samp{*three* *bold* *words*}. +Several words in a row may @b{*be made bold*}, but this does not work if +the string is distributed over two lines. @item The exporters work well, but could be made more efficient. @end itemize @@ -3881,6 +4507,9 @@ Remember. Pavel Chalmoviansky influenced the agenda treatment of items with specified time. @item +Gregory Chenov patched support for lisp forms into table calculations +and improved XEmacs compatibility. +@item Sacha Chua suggested to copy some linking code from Planner. @item Kees Dullemond inspired the use of narrowed tabled columns. @@ -3888,12 +4517,14 @@ Kees Dullemond inspired the use of narrowed tabled columns. Christian Egli converted the documentation into TeXInfo format, patched CSS formatting into the HTML exporter, and inspired the agenda. @item -Nic Ferrier contributed mailcap and XML support. +Nic Ferrier contributed mailcap and XOXO support. @item Kai Grossjohann pointed out key-binding conflicts caused by Org-mode. @item Stefan Monnier provided a patch to keep the Emacs-Lisp compiler happy. @item +Todd Neal provided patches for links to Info files and elisp forms. +@item Tim O'Callaghan suggested in-file links, search options for general file links, and TAGS. @item @@ -3904,6 +4535,8 @@ among other things. @item Pete Phillips helped the development of the TAGS feature. @item +T.V. Raman reported bugs and suggested improvements. +@item Matthias Rempe (Oelde) provided ideas, Windows support, and quality control. @item @@ -3920,6 +4553,9 @@ things. Linking to VM/BBDB/GNUS was inspired by Tom Shannon's @file{organizer-mode.el}. @item +David O'Toole wrote @file{org-publish.el} and came up with lots is ideas +for small changes. +@item J@"urgen Vollmer contributed code generating the table of contents in HTML output. @item @@ -3931,7 +4567,7 @@ system. John Wiegley wrote @file{emacs-wiki.el} and @file{planner.el}. The development of Org-mode was fully independent, and both systems are really different beasts in their basic ideas and implementation details. -However, I have later looked at John's code and learned from his +I later looked at John's code, however, and learned from his implementation of (i) links where the link itself is hidden and only a description is shown, and (ii) popping up a calendar to select a date. @item From e8166ad7d27d9c415474bbad3b2b7a2ef9880b26 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 24 May 2006 07:56:44 +0000 Subject: [PATCH 004/403] *** empty log message *** --- etc/ChangeLog | 7 +++++ lisp/ChangeLog | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ man/ChangeLog | 9 ++++++ 3 files changed, 97 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 5bd5f1099f1..28c29402c75 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,10 @@ +2006-05-24 Carsten Dominik + + * orgcard.tex: (section{Motion}): Added the item navigation + commands. + (section{Publishing}): New section. + (section{Links}): Documented elisp and shell links. + 2006-05-20 Rodrigo Real * pt-br-refcard.tex: Update. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fa03faa1833..dd9b5169194 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,84 @@ +2006-05-24 Carsten Dominik + + * textmodes/org.el: (org-open-at-point): Use renamed variable + `org-confirm-shell-link-function'. + (org-confirm-shell-link-function): Renamed from + `org-confirm-shell-links'. + (org-export-directory): New function. + (org-export-as-ascii, org-export-as-html, org-export-as-xoxo) + (org-export-icalendar): Use `org-export-directory'. + (org-indent-item): Keep cursor position. + (org-link-file-path-type): New option. + (org-export-as-html): Fixed bug with plain lists starting in + column 0. + (org-export-as-html): Removed deadline formatting, this happens + now already in `org-html-handle-time-stamps'. + (org-export-html-style): Deadline class removed. + (org-insert-labeled-timestamps-at-point): New option. + (org-cycle, org-occur, org-scan-tags): Use `org-overview' instead + of `hide-sublevels 1', in case the first headline is not level 1. + (org-overview, org-content): New fuction. + (org-cycle-global-status, org-cycle-subtree-status): Make these + variables buffer-local. + (org-global-cycle): New command. + (org-shifttab): Use `org-global-cycle'. + (org-insert-heading, org-insert-item): Go to end of new + headline/item after creating it. + (org-export-visible): Renames from `org-export-copy-visible'. Now + creates a temporary org-file and applies an exporting command to + it. + (org-table-eval-formula): Support for lisp forms. + (org-agenda-todo-ignore-scheduled): New option. + (org-agenda-get-todos): Use new option + `org-agenda-todo-ignore-scheduled'. + (org-export-html-inline-images): New value `maybe'. + (org-export-as-html): Inlining of images dependent on link + description. + (org-archive-subtree): Check for end-of-buffer before trying + `kill-line'. + (org-agenda-follow-mode): New option. + (org-export-with-tags, org-export-with-timestamps): New options. + (org-html-handle-time-stamps): New function. + (org-keyword-time-regexp): New variable. + (org-agenda-get-todos): Use `org-agenda-todo-list-sublevels'. + (org-agenda-todo-list-sublevels): New option. + (org-html-level-start): When TITLE is nil, just close all levels. + (org-parse-key-lines, org-parse-export-options): Functions + removed, replaced by `org-infile-export-plist'. + (org-combine-plists, org-infile-export-plist) + (org-default-export-plist): New functions. + (org-export-html-preamble, org-export-html-postamble) + (org-export-html-auto-preamble, org-export-html-auto-postamble): + New variables. + (org-export-publishing-directory): New option. + (org-export-as-html, org-export-as-ascii): Use the new property + lists for settings. + (org-export-copy-visible, org-export-as-xoxo): Respect + `org-export-publishing-directory'. + (org-link-search, org-store-link, org-file-apps): Support for + links to BibTeX database entries.. + (org-get-current-options, org-set-regexps-and-options): Implement + logging as a startup option. + (org-store-link): Make sure context string is never empty + (org-insert-link): Use relative path when possible. + (org-at-item-checklet-p): New function. + (org-shifttab, org-shiftmetaleft, org-shiftmetaright) + (org-shiftmetaup, org-shiftmetadown, org-metaleft) + (org-metaright, org-metaup, org-metadown, org-shiftup) + (org-shiftdown, org-shiftright, org-shiftleft) + (org-ctrl-c-ctrl-c, org-cycle, org-return, org-meta-return): + Dispatch using `call-interactively'. + (org-call-with-arg): New defsubst. + (org-tag-alist, org-use-fast-tag-selection): New options. + (org-complete): Use `org-tag-alist'. + (org-fast-tag-insert, org-fast-tag-selection): New functions. + (org-next-item, org-previous-item): New commands. + (org-beginning-of-item, org-end-of-item): Added (interactive) to + make command. + (org-shiftup, org-shiftdown): Accommodate the item-navigation + commands. + + 2006-05-23 Thien-Thi Nguyen * emacs-lisp/ewoc.el (ewoc-delete): New function. diff --git a/man/ChangeLog b/man/ChangeLog index a20d1bf4356..22b7213dc4a 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,12 @@ +2006-05-24 Carsten Dominik + + * org.texi: (Plain lists): Added new item navigation commands. + (External links): Documented elisp and info links. + (Custom searches): New section. + (Publishing): New chapter. + (HTML export): Include a list of supported CSS classes. + (Setting tags): Describe the fast-tag-setting interface. + 2006-05-22 Reiner Steib * frames.texi (Menu Bars, Tool Bars): Add index entries. From 69da8f9466f3cad0d669dd1e5ea7458c07ce048f Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 24 May 2006 07:57:00 +0000 Subject: [PATCH 005/403] (section{Motion}): Added the item navigation commands. (section{Publishing}): New section. (section{Links}): Documented elisp and shell links. --- etc/orgcard.tex | 103 ++++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 65 deletions(-) diff --git a/etc/orgcard.tex b/etc/orgcard.tex index 45608ac1795..4922bff9317 100644 --- a/etc/orgcard.tex +++ b/etc/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{4.26} +\def\orgversionnumber{4.33} \def\year{2006} % %**start of header @@ -269,19 +269,11 @@ \section{Getting Started} % -%Put the following in your \kbd{~/.emacs}$^1$ \vskip -1mm \beginexample% -%(autoload 'org-mode "org" "Org mode" t) -%(autoload 'org-diary "org" "Org mode diary entries") -%(autoload 'org-agenda "org" "Agenda from Org files" t) -%(autoload 'org-todo-list "org" "Global TODO list" t) -%(autoload 'org-store-link "org" "Store org link" t) -%(autoload 'orgtbl-mode "org" "Orgtbl minor mode" t) -%(autoload 'turn-on-orgtbl "org" "Orgtbl minor mode") (add-to-list 'auto-mode-alist '("\\\\.org\$" . org-mode)) -(define-key global-map "\\C-cl" 'org-store-link)$^2$ -(define-key global-map "\\C-ca" 'org-agenda)$^2$ +(define-key global-map "\\C-cl" 'org-store-link)$^1$ +(define-key global-map "\\C-ca" 'org-agenda)$^1$ \endexample % \metax{For the many customization options try}{M-x org-customize} @@ -302,6 +294,7 @@ \section{Motion} \key{previous heading, same level}{C-c C-b} \key{backward to higher level heading}{C-c C-u} \key{jump to another place in document}{C-c C-j} +\key{previous/next plain list item}{S-UP/DOWN$^3$} \section{Structure Editing} @@ -320,7 +313,7 @@ \section{Structure Editing} \key{yank subtree}{C-c C-x C-y} \key{archive subtree}{C-c \$} -To set archive location for current file, add a line like$^3$: +To set archive location for current file, add a line like$^2$: \vskip -1mm \beginexample% \#+ARCHIVE: archfile::* Archived Tasks @@ -330,10 +323,10 @@ \section{Filtering and Sparse Trees} \key{show sparse tree for all matches of a regexp}{C-c /} \key{view TODO's in sparse tree}{C-c C-v} -\key{global TODO list in agenda mode}{C-c t$^2$} +\key{global TODO list in agenda mode}{C-c t$^1$} \key{create sparse tree with all deadlines due}{C-c C-w} \key{time sorted view of current org file}{C-c C-r} -%\key{agenda for the week}{C-c a$^2$} +%\key{agenda for the week}{C-c a$^1$} %\key{agenda for date at cursor}{C-c C-o} \section{Tags} @@ -351,8 +344,8 @@ \section{TODO Items} \key{set the priority of the current item}{C-c , [ABC]} \key{remove priority cookie from current item}{C-c , SPC} -\key{raise priority of current item}{S-UP$^4$} -\key{lower priority of current item}{S-DOWN$^4$} +\key{raise priority of current item}{S-UP$^3$} +\key{lower priority of current item}{S-DOWN$^3$} \key{\kbd{\#+SEQ_TODO: TODO TRY BLUFF DONE}}{\rm todo workflow} \key{\kbd{\#+TYP_TODO: Phil home work DONE}}{\rm todo types} @@ -366,8 +359,8 @@ \section{Timestamps} \key{insert SCHEDULED timestamp}{C-c C-s} \key{create sparse tree with all deadlines due}{C-c C-w} \key{the time between 2 dates in a time range}{C-c C-y} -\key{change timestamp at cursor by $\pm 1$ day}{S-RIGHT/LEFT$^4$} -\key{change year/month/day at cursor by $\pm 1$}{S-UP/DOWN$^4$} +\key{change timestamp at cursor by $\pm 1$ day}{S-RIGHT/LEFT$^3$} +\key{change year/month/day at cursor by $\pm 1$}{S-UP/DOWN$^3$} \key{access the calendar for the current date}{C-c >} \key{insert timestamp matching date in calendar}{C-c <} \key{access agenda for current date}{C-c C-o} @@ -380,7 +373,7 @@ \section{Timestamps} \section{Links} -\key{globally store link to the current location}{C-c l$^2$} +\key{globally store link to the current location}{C-c l$^1$} \key{insert a link (TAB completes stored links)}{C-c C-l} \key{insert file link with file name completion}{C-u C-c C-l} \key{edit (also hidden part of) link at point}{C-c C-l} @@ -388,13 +381,13 @@ \section{Links} \key{open file links in emacs (\kbd{C-u} : in emacs)}{C-c C-o} \key{open link at point (3: in emacs)}{mouse-2/3} %\key{open file links in emacs}{mouse-3} -\key{record a position in mark ring}{C-c \%} +%\key{record a position in mark ring}{C-c \%} \key{jump back to last followed link(s)}{C-c \&} {\bf Internal Links} \key{\kbd{<>}}{\rm target} -\key{\kbd{<<>>}}{\rm radio target$^3$} +\key{\kbd{<<>>}}{\rm radio target$^2$} \key{\kbd{[[*this text]]}}{\rm find headline} \metax{\kbd{[[this text]]}}{\rm find target or text in buffer} \metax{\kbd{[[this text][description]]}}{\rm optional link text} @@ -405,16 +398,18 @@ \section{Links} \key{\kbd{file:papers/last.pdf}}{\rm file, relative} \key{\kbd{file:projects.org::*that text}}{\rm find headline} \key{\kbd{file:projects.org::find me}}{\rm find tgt/string} -\key{\kbd{file:projects.org::/regexp/}}{\rm regexp search} +%\key{\kbd{file:projects.org::/regexp/}}{\rm regexp search} \key{\kbd{http://www.astro.uva.nl/~dominik}}{\rm on the web} \key{\kbd{mailto:adent@galaxy.net}}{\rm EMail address} \key{\kbd{news:comp.emacs}}{\rm Usenet group} \key{\kbd{bbdb:Richard Stallman}}{\rm BBDB person} -\key{\kbd{shell:ls *.org}}{\rm shell command} \key{\kbd{gnus:group}}{\rm GNUS group} \key{\kbd{gnus:group\#id}}{\rm GNUS message} \key{\kbd{vm|wl|mhe|rmail:folder}}{\rm Mail folder} \key{\kbd{vm|wl|mhe|rmail:folder\#id}}{\rm Mail message} +\key{\kbd{info:emacs:Regexps}}{\rm Info file:node} +\key{\kbd{shell:ls *.org}}{\rm shell command} +\key{\kbd{elisp:(calendar)}}{\rm elisp form} \metax{\kbd{[[external link][description]]}}{\rm optional link text} %\key{\kbd{vm://myself@some.where.org/folder\#id}}{\rm VM remote} @@ -479,7 +474,7 @@ \section{Tables} \key{display column number cursor is in}{C-c ?} \key{sum numbers in current column/rectangle}{C-c +} -\key{copy down with increment}{S-RET$^4$} +\key{copy down with increment}{S-RET$^3$} Formulas typed in field are executed by \kbd{TAB}, \kbd{RET} and \kbd{C-c C-c}. \kbd{=} introduces a column @@ -516,15 +511,15 @@ \section{Agenda Views} \key{remove current file from your agenda}{C-c ]} \key{cycle through agenda file list}{C-,} -\key{compile agenda for the current week}{C-c a a$^2$} -\key{compile global TODO list}{C-c a t$^2$} -\key{compile TODO list for specific keyword}{C-c a T$^2$} -\key{match tags in agenda files}{C-c a m$^2$} +\key{compile agenda for the current week}{C-c a a$^1$} +\key{compile global TODO list}{C-c a t$^1$} +\key{compile TODO list for specific keyword}{C-c a T$^1$} +\key{match tags in agenda files}{C-c a m$^1$} \key{agenda for date at cursor}{C-c C-o} \key{show timeline of current org file}{C-c C-r} \vskip 1mm -To set categories, add lines like$^3$: +To set categories, add lines like$^2$: \vskip -1mm \beginexample% \#+CATEGORY: MyCateg @@ -561,12 +556,10 @@ \section{Agenda Views} \key{show tags of current headline}{T} \key{set tags for current headline}{:} \key{set priority of current item}{p} -\key{raise/lower priority of current item}{S-UP/DOWN$^4$} -%\key{lower priority of current item}{S-DOWN$^4$} +\key{raise/lower priority of current item}{S-UP/DOWN$^3$} \key{display weighted priority of current item}{P} -\key{change timestamp to one day earlier/later}{S-LEFT/RIGHT$^4$} -%\key{change timestamp to one day earlier}{S-LEFT$^4$} -%\key{change timestamp to one day later}{S-RIGHT$^4$} +\key{schedule/set deadline for this item}{C-c C-s/d} +\key{change timestamp to one day earlier/later}{S-LEFT/RIGHT$^3$} \key{change timestamp to today}{>} \key{insert new entry into diary}{i} @@ -629,8 +622,6 @@ \section{Exporting} \key{... which can carry over multiple lines}{\#+TEXT:} \key{settings for the export process - see below}{\#+OPTIONS:} -{\bf Settings for the OPTIONS line} - \key{set number of headline levels for export}{H:2} \key{turn on/off section numbers}{num:t} \key{turn on/off table of contents}{toc:t} @@ -651,6 +642,13 @@ \section{Exporting} \key{toggle COMMENT keyword on entry}{C-c ;} + +\section{Publishing (requires org-publish.el)} +\key{publishcurrent file}{C-c C-e C-f} +\key{publish current project}{C-c C-e C-p} +\key{publish project (prompted for)}{C-c C-e C-c} +\key{publish all projects}{C-c C-e C-a} + \section{Completion} In-buffer completion completes TODO keywords at headline start, TeX @@ -659,8 +657,6 @@ \section{Completion} \key{Complete word at point}{M-TAB} -\newcolumn - \section{Calendar and Diary Integration} To include entries from the Emacs diary in your Org-mode agenda: @@ -668,26 +664,6 @@ \section{Calendar and Diary Integration} (setq org-agenda-include-diary t) \endexample -To include the Org-mode agenda in the normal diary, make sure you're -using the fancy diary display -% -%\beginexample% -%(add-hook 'diary-display-hook 'fancy-diary-display) -%\endexample -% -and in the \kbd{~/diary} file add - -\beginexample% -\&\%\%(org-diary) -\endexample - -to include all the files listed in \kbd{org-agenda-files}. For more -selective file inclusion use a line for each file: - -\beginexample% -\&\%\%(org-diary) ~/path/to/some/org-file.org -\endexample - \section{Remember-mode Integration} See the manual for how to make remember.el use Org-mode links and @@ -712,7 +688,7 @@ \section{CUA and pc-select compatibility} Configure the variable {\tt org-CUA-compatibility} to make Org-mode avoid the \kbd{S-} bindings used by these modes. When set, Org-mode will change the following keybindings (also in the agenda -buffer, but not during date selection). See note mark four$^4$ +buffer, but not during date selection). See note mark four$^3$ throughout the reference card. %\vskip-mm \beginexample @@ -722,16 +698,13 @@ \section{CUA and pc-select compatibility} \endexample \section{Notes} -$^1$ The six autoload forms are only needed if Org-mode is not part of -Emacs, or an XEmacs package. - -$^2$ This is only a suggestion for a binding of this command. Choose +$^1$ This is only a suggestion for a binding of this command. Choose you own key as shown under INSTALLATION. -$^3$ After changing a \kbd{\#+KEYWORD} or \kbd{<<>>} line, +$^2$ After changing a \kbd{\#+KEYWORD} or \kbd{<<>>} line, press \kbd{C-c C-c} with the cursor still in the line to update. -$^4$ Keybinding affected by {\tt org-CUA-compatibility}. +$^3$ Keybinding affected by {\tt org-CUA-compatibility}. \copyrightnotice From dc47c8243dd83bbaab5c593a6e387f416f107b9a Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 24 May 2006 08:06:27 +0000 Subject: [PATCH 006/403] Set idle timer to clean up expired Apple events. (mac-ae-get-url): Redispatch Apple event on unknown scheme. (mac-dispatch-apple-event): Resume Apple event if it is suspended. Optionally set error message in reply. --- lisp/term/mac-win.el | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 8eb8e6a0460..318503db974 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1649,7 +1649,7 @@ Currently the `mailto' scheme is supported." (parsed-url (url-generic-parse-url (mac-ae-text ae)))) (if (string= (url-type parsed-url) "mailto") (url-mailto parsed-url) - (error "Unsupported URL scheme: %s" (url-type parsed-url))))) + (mac-resume-apple-event ae t)))) (setq mac-apple-event-map (make-sparse-keymap)) @@ -1800,9 +1800,9 @@ With numeric ARG, display the font panel if and only if ARG is positive." "Dispatch EVENT according to the keymap `mac-apple-event-map'." (interactive "e") (let* ((binding (lookup-key mac-apple-event-map (mac-event-spec event))) - (service-message - (and (keymapp binding) - (cdr (mac-ae-parameter (mac-event-ae event) "svmg"))))) + (ae (mac-event-ae event)) + (service-message (and (keymapp binding) + (cdr (mac-ae-parameter ae "svmg"))))) (when service-message (setq service-message (intern (decode-coding-string service-message 'utf-8))) @@ -1810,7 +1810,16 @@ With numeric ARG, display the font panel if and only if ARG is positive." ;; Replace (cadr event) with a dummy position so that event-start ;; returns it. (setcar (cdr event) (list (selected-window) (point) '(0 . 0) 0)) - (call-interactively binding))) + (if (null (mac-ae-parameter ae 'emacs-suspension-id)) + (call-interactively binding) + (condition-case err + (progn + (call-interactively binding) + (mac-resume-apple-event ae)) + (error + (mac-ae-set-reply-parameter ae "errs" + (cons "TEXT" (error-message-string err))) + (mac-resume-apple-event ae -10000)))))) ; errAEEventFailed (global-set-key [mac-apple-event] 'mac-dispatch-apple-event) @@ -1820,6 +1829,8 @@ With numeric ARG, display the font panel if and only if ARG is positive." ;; the files should be opened. (add-hook 'after-init-hook 'mac-process-deferred-apple-events) +(run-with-idle-timer 5 t 'mac-cleanup-expired-apple-events) + ;;;; Drag and drop From 2015c1f03f250389b47d74447d47ff64b32c509e Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 24 May 2006 08:07:19 +0000 Subject: [PATCH 007/403] (ae_attr_table): New variable. (syms_of_mac): Intern and staticpro its elements. (mac_aelist_to_lisp): Also convert Apple event attributes. (mac_ae_put_lisp): New function. (create_apple_event_from_event_ref) [MAC_OSX]: Use typeUTF8Text. --- src/mac.c | 179 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 165 insertions(+), 14 deletions(-) diff --git a/src/mac.c b/src/mac.c index f7fcbe9ac88..3b4f63b848a 100644 --- a/src/mac.c +++ b/src/mac.c @@ -270,6 +270,26 @@ posix_to_mac_pathname (const char *ufn, char *mfn, int mfnbuflen) static Lisp_Object Qundecoded_file_name; +static struct { + AEKeyword keyword; + char *name; + Lisp_Object symbol; +} ae_attr_table [] = + {{keyTransactionIDAttr, "transaction-id"}, + {keyReturnIDAttr, "return-id"}, + {keyEventClassAttr, "event-class"}, + {keyEventIDAttr, "event-id"}, + {keyAddressAttr, "address"}, + {keyOptionalKeywordAttr, "optional-keyword"}, + {keyTimeoutAttr, "timeout"}, + {keyInteractLevelAttr, "interact-level"}, + {keyEventSourceAttr, "event-source"}, + /* {keyMissedKeywordAttr, "missed-keyword"}, */ + {keyOriginalAddressAttr, "original-address"}, + {keyReplyRequestedAttr, "reply-requested"}, + {KEY_EMACS_SUSPENSION_ID_ATTR, "emacs-suspension-id"} + }; + static Lisp_Object mac_aelist_to_lisp (desc_list) const AEDescList *desc_list; @@ -281,22 +301,36 @@ mac_aelist_to_lisp (desc_list) Size size; AEKeyword keyword; AEDesc desc; + int attribute_p = 0; err = AECountItems (desc_list, &count); if (err != noErr) return Qnil; result = Qnil; + + again: while (count > 0) { - err = AESizeOfNthItem (desc_list, count, &desc_type, &size); + if (attribute_p) + { + keyword = ae_attr_table[count - 1].keyword; + err = AESizeOfAttribute (desc_list, keyword, &desc_type, &size); + } + else + err = AESizeOfNthItem (desc_list, count, &desc_type, &size); + if (err == noErr) switch (desc_type) { case typeAEList: case typeAERecord: case typeAppleEvent: - err = AEGetNthDesc (desc_list, count, typeWildCard, - &keyword, &desc); + if (attribute_p) + err = AEGetAttributeDesc (desc_list, keyword, typeWildCard, + &desc); + else + err = AEGetNthDesc (desc_list, count, typeWildCard, + &keyword, &desc); if (err != noErr) break; elem = mac_aelist_to_lisp (&desc); @@ -309,8 +343,13 @@ mac_aelist_to_lisp (desc_list) else { elem = make_uninit_string (size); - err = AEGetNthPtr (desc_list, count, typeWildCard, &keyword, - &desc_type, SDATA (elem), size, &size); + if (attribute_p) + err = AEGetAttributePtr (desc_list, keyword, typeWildCard, + &desc_type, SDATA (elem), + size, &size); + else + err = AEGetNthPtr (desc_list, count, typeWildCard, &keyword, + &desc_type, SDATA (elem), size, &size); } if (err != noErr) break; @@ -319,18 +358,35 @@ mac_aelist_to_lisp (desc_list) break; } - if (err != noErr) - elem = Qnil; - else if (desc_list->descriptorType != typeAEList) + if (err == noErr || desc_list->descriptorType == typeAEList) { - keyword = EndianU32_NtoB (keyword); - elem = Fcons (make_unibyte_string ((char *) &keyword, 4), elem); + if (err != noErr) + elem = Qnil; /* Don't skip elements in AEList. */ + else if (desc_list->descriptorType != typeAEList) + { + if (attribute_p) + elem = Fcons (ae_attr_table[count-1].symbol, elem); + else + { + keyword = EndianU32_NtoB (keyword); + elem = Fcons (make_unibyte_string ((char *) &keyword, 4), + elem); + } + } + + result = Fcons (elem, result); } - result = Fcons (elem, result); count--; } + if (desc_list->descriptorType == typeAppleEvent && !attribute_p) + { + attribute_p = 1; + count = sizeof (ae_attr_table) / sizeof (ae_attr_table[0]); + goto again; + } + desc_type = EndianU32_NtoB (desc_list->descriptorType); return Fcons (make_unibyte_string ((char *) &desc_type, 4), result); } @@ -403,6 +459,92 @@ mac_aedesc_to_lisp (desc) return Fcons (make_unibyte_string ((char *) &desc_type, 4), result); } +OSErr +mac_ae_put_lisp (desc, keyword_or_index, obj) + AEDescList *desc; + UInt32 keyword_or_index; + Lisp_Object obj; +{ + OSErr err; + + if (!(desc->descriptorType == typeAppleEvent + || desc->descriptorType == typeAERecord + || desc->descriptorType == typeAEList)) + return errAEWrongDataType; + + if (CONSP (obj) && STRINGP (XCAR (obj)) && SBYTES (XCAR (obj)) == 4) + { + DescType desc_type1 = EndianU32_BtoN (*((UInt32 *) SDATA (XCAR (obj)))); + Lisp_Object data = XCDR (obj), rest; + AEDesc desc1; + + switch (desc_type1) + { + case typeNull: + case typeAppleEvent: + break; + + case typeAEList: + case typeAERecord: + err = AECreateList (NULL, 0, desc_type1 == typeAERecord, &desc1); + if (err == noErr) + { + for (rest = data; CONSP (rest); rest = XCDR (rest)) + { + UInt32 keyword_or_index1 = 0; + Lisp_Object elem = XCAR (rest); + + if (desc_type1 == typeAERecord) + { + if (CONSP (elem) && STRINGP (XCAR (elem)) + && SBYTES (XCAR (elem)) == 4) + { + keyword_or_index1 = + EndianU32_BtoN (*((UInt32 *) + SDATA (XCAR (elem)))); + elem = XCDR (elem); + } + else + continue; + } + + err = mac_ae_put_lisp (&desc1, keyword_or_index1, elem); + if (err != noErr) + break; + } + + if (err == noErr) + { + if (desc->descriptorType == typeAEList) + err = AEPutDesc (desc, keyword_or_index, &desc1); + else + err = AEPutParamDesc (desc, keyword_or_index, &desc1); + } + + AEDisposeDesc (&desc1); + } + return err; + + default: + if (!STRINGP (data)) + break; + if (desc->descriptorType == typeAEList) + err = AEPutPtr (desc, keyword_or_index, desc_type1, + SDATA (data), SBYTES (data)); + else + err = AEPutParamPtr (desc, keyword_or_index, desc_type1, + SDATA (data), SBYTES (data)); + return err; + } + } + + if (desc->descriptorType == typeAEList) + err = AEPutPtr (desc, keyword_or_index, typeNull, NULL, 0); + else + err = AEPutParamPtr (desc, keyword_or_index, typeNull, NULL, 0); + + return err; +} static pascal OSErr mac_coerce_file_name_ptr (type_code, data_ptr, data_size, to_type, handler_refcon, result) @@ -722,8 +864,7 @@ create_apple_event_from_event_ref (event, num_params, names, types, result) '?'); if (data == NULL) break; - /* typeUTF8Text is not available on Mac OS X 10.1. */ - AEPutParamPtr (result, names[i], 'utf8', + AEPutParamPtr (result, names[i], typeUTF8Text, CFDataGetBytePtr (data), CFDataGetLength (data)); CFRelease (data); break; @@ -4661,7 +4802,7 @@ cfstring_create_normalized (str, symbol) } if (in_text) - err = CreateUnicodeToTextInfo(&map, &uni); + err = CreateUnicodeToTextInfo (&map, &uni); while (err == noErr) { out_buf = xmalloc (out_size); @@ -5234,6 +5375,16 @@ syms_of_mac () QHFS_plus_C = intern ("HFS+C"); staticpro (&QHFS_plus_C); #endif + { + int i; + + for (i = 0; i < sizeof (ae_attr_table) / sizeof (ae_attr_table[0]); i++) + { + ae_attr_table[i].symbol = intern (ae_attr_table[i].name); + staticpro (&ae_attr_table[i].symbol); + } + } + defsubr (&Smac_coerce_ae_data); #if TARGET_API_MAC_CARBON defsubr (&Smac_get_preference); From a0293ec7a8f52f8933cd721adbeb59cd00ce380c Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 24 May 2006 08:07:37 +0000 Subject: [PATCH 008/403] (Fx_server_version): Use gestaltSystemVersionMajor etc. --- src/macfns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/macfns.c b/src/macfns.c index 7b8c261f1f0..43d994c1357 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -3024,11 +3024,11 @@ If omitted or nil, that stands for the selected frame's display. */) { if (response >= 0x00001040) { - err = Gestalt ('sys1', &major); /* gestaltSystemVersionMajor */ + err = Gestalt (gestaltSystemVersionMajor, &major); if (err == noErr) - err = Gestalt ('sys2', &minor); /* gestaltSystemVersionMinor */ + err = Gestalt (gestaltSystemVersionMinor, &minor); if (err == noErr) - err = Gestalt ('sys3', &bugfix); /* gestaltSystemVersionBugFix */ + err = Gestalt (gestaltSystemVersionBugFix, &bugfix); } else { From 0ffd2c761b8f19e8dacaa5d86543afa43b02c427 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 24 May 2006 08:08:11 +0000 Subject: [PATCH 009/403] (Qemacs_suspension_id): New variable. (syms_of_macselect): Intern and staticpro it. (struct suspended_ae_info): New struct. (deferred_apple_events, defer_apple_events) (Fmac_process_deferred_apple_events): Use it. (suspended_apple_events): New variable. (mac_handle_apple_event_1): New function. (mac_handle_apple_event): Use it. Don't process previously suspended events. (cleanup_suspended_apple_events, get_suspension_id)n (cleanup_all_suspended_apple_events): New functions. (init_apple_event_handler): Call cleanup_all_suspended_apple_events at exit. (Fmac_cleanup_expired_apple_events, Fmac_ae_set_reply_parameter) (Fmac_resume_apple_event): New defuns. (syms_of_macselect): Defsubr them. --- src/macselect.c | 375 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 328 insertions(+), 47 deletions(-) diff --git a/src/macselect.c b/src/macselect.c index 1b6a1a46cc3..40a3db9ca08 100644 --- a/src/macselect.c +++ b/src/macselect.c @@ -909,14 +909,13 @@ and t is the same as `SECONDARY'. */) } +/*********************************************************************** + Apple event support +***********************************************************************/ int mac_ready_for_apple_events = 0; static Lisp_Object Vmac_apple_event_map; static Lisp_Object Qmac_apple_event_class, Qmac_apple_event_id; -static struct -{ - AppleEvent *buf; - int size, count; -} deferred_apple_events; +static Lisp_Object Qemacs_suspension_id; extern Lisp_Object Qundefined; extern void mac_store_apple_event P_ ((Lisp_Object, Lisp_Object, const AEDesc *)); @@ -927,6 +926,19 @@ struct apple_event_binding Lisp_Object key, binding; }; +struct suspended_ae_info +{ + UInt32 expiration_tick, suspension_id; + AppleEvent apple_event, reply; + struct suspended_ae_info *next; +}; + +/* List of deferred apple events at the startup time. */ +static struct suspended_ae_info *deferred_apple_events = NULL; + +/* List of suspended apple events, in order of expiration_tick. */ +static struct suspended_ae_info *suspended_apple_events = NULL; + static void find_event_binding_fun (key, binding, args, data) Lisp_Object key, binding, args; @@ -1003,6 +1015,12 @@ defer_apple_events (apple_event, reply) const AppleEvent *apple_event, *reply; { OSErr err; + struct suspended_ae_info *new; + + new = xmalloc (sizeof (struct suspended_ae_info)); + bzero (new, sizeof (struct suspended_ae_info)); + new->apple_event.descriptorType = typeNull; + new->reply.descriptorType = typeNull; err = AESuspendTheCurrentEvent (apple_event); @@ -1011,30 +1029,88 @@ defer_apple_events (apple_event, reply) manual says it doesn't. Anyway we create copies of them and save them in `deferred_apple_events'. */ if (err == noErr) - { - if (deferred_apple_events.buf == NULL) - { - deferred_apple_events.size = 16; - deferred_apple_events.count = 0; - deferred_apple_events.buf = - xmalloc (sizeof (AppleEvent) * deferred_apple_events.size); - } - else if (deferred_apple_events.count == deferred_apple_events.size) - { - deferred_apple_events.size *= 2; - deferred_apple_events.buf - = xrealloc (deferred_apple_events.buf, - sizeof (AppleEvent) * deferred_apple_events.size); - } - } - + err = AEDuplicateDesc (apple_event, &new->apple_event); + if (err == noErr) + err = AEDuplicateDesc (reply, &new->reply); if (err == noErr) { - int count = deferred_apple_events.count; + new->next = deferred_apple_events; + deferred_apple_events = new; + } + else + { + AEDisposeDesc (&new->apple_event); + AEDisposeDesc (&new->reply); + xfree (new); + } - AEDuplicateDesc (apple_event, deferred_apple_events.buf + count); - AEDuplicateDesc (reply, deferred_apple_events.buf + count + 1); - deferred_apple_events.count += 2; + return err; +} + +static OSErr +mac_handle_apple_event_1 (class, id, apple_event, reply) + Lisp_Object class, id; + const AppleEvent *apple_event; + AppleEvent *reply; +{ + OSErr err; + static UInt32 suspension_id = 0; + struct suspended_ae_info *new; + + new = xmalloc (sizeof (struct suspended_ae_info)); + bzero (new, sizeof (struct suspended_ae_info)); + new->apple_event.descriptorType = typeNull; + new->reply.descriptorType = typeNull; + + err = AESuspendTheCurrentEvent (apple_event); + if (err == noErr) + err = AEDuplicateDesc (apple_event, &new->apple_event); + if (err == noErr) + err = AEDuplicateDesc (reply, &new->reply); + if (err == noErr) + err = AEPutAttributePtr (&new->apple_event, KEY_EMACS_SUSPENSION_ID_ATTR, + typeUInt32, &suspension_id, sizeof (UInt32)); + if (err == noErr) + { + OSErr err1; + SInt32 reply_requested; + + err1 = AEGetAttributePtr (&new->apple_event, keyReplyRequestedAttr, + typeSInt32, NULL, &reply_requested, + sizeof (SInt32), NULL); + if (err1 != noErr) + { + /* Emulate keyReplyRequestedAttr in older versions. */ + reply_requested = reply->descriptorType != typeNull; + err = AEPutAttributePtr (&new->apple_event, keyReplyRequestedAttr, + typeSInt32, &reply_requested, + sizeof (SInt32)); + } + } + if (err == noErr) + { + SInt32 timeout = 0; + struct suspended_ae_info **p; + + new->suspension_id = suspension_id; + suspension_id++; + err = AEGetAttributePtr (apple_event, keyTimeoutAttr, typeSInt32, + NULL, &timeout, sizeof (SInt32), NULL); + new->expiration_tick = TickCount () + timeout; + + for (p = &suspended_apple_events; *p; p = &(*p)->next) + if ((*p)->expiration_tick >= new->expiration_tick) + break; + new->next = *p; + *p = new; + + mac_store_apple_event (class, id, &new->apple_event); + } + else + { + AEDisposeDesc (&new->reply); + AEDisposeDesc (&new->apple_event); + xfree (new); } return err; @@ -1047,17 +1123,11 @@ mac_handle_apple_event (apple_event, reply, refcon) SInt32 refcon; { OSErr err; + UInt32 suspension_id; AEEventClass event_class; AEEventID event_id; Lisp_Object class_key, id_key, binding; - /* We can't handle an Apple event that requests a reply, but this - seems to be too restrictive. */ -#if 0 - if (reply->descriptorType != typeNull) - return errAEEventNotHandled; -#endif - if (!mac_ready_for_apple_events) { err = defer_apple_events (apple_event, reply); @@ -1066,6 +1136,13 @@ mac_handle_apple_event (apple_event, reply, refcon) return noErr; } + err = AEGetAttributePtr (apple_event, KEY_EMACS_SUSPENSION_ID_ATTR, + typeUInt32, NULL, + &suspension_id, sizeof (UInt32), NULL); + if (err == noErr) + /* Previously suspended event. Pass it to the next handler. */ + return errAEEventNotHandled; + err = AEGetAttributePtr (apple_event, keyEventClassAttr, typeType, NULL, &event_class, sizeof (AEEventClass), NULL); if (err == noErr) @@ -1079,11 +1156,47 @@ mac_handle_apple_event (apple_event, reply, refcon) { if (INTEGERP (binding)) return XINT (binding); - mac_store_apple_event (class_key, id_key, apple_event); - return noErr; + err = mac_handle_apple_event_1 (class_key, id_key, + apple_event, reply); } } - return errAEEventNotHandled; + if (err == noErr) + return noErr; + else + return errAEEventNotHandled; +} + +static int +cleanup_suspended_apple_events (head, all_p) + struct suspended_ae_info **head; + int all_p; +{ + UInt32 current_tick = TickCount (), nresumed = 0; + struct suspended_ae_info *p, *next; + + for (p = *head; p; p = next) + { + if (!all_p && p->expiration_tick > current_tick) + break; + AESetTheCurrentEvent (&p->apple_event); + AEResumeTheCurrentEvent (&p->apple_event, &p->reply, + (AEEventHandlerUPP) kAENoDispatch, 0); + AEDisposeDesc (&p->reply); + AEDisposeDesc (&p->apple_event); + nresumed++; + next = p->next; + xfree (p); + } + *head = p; + + return nresumed; +} + +static void +cleanup_all_suspended_apple_events () +{ + cleanup_suspended_apple_events (&deferred_apple_events, 1); + cleanup_suspended_apple_events (&suspended_apple_events, 1); } void @@ -1109,34 +1222,190 @@ init_apple_event_handler () 0L, false); if (err != noErr) abort (); + + atexit (cleanup_all_suspended_apple_events); } +static UInt32 +get_suspension_id (apple_event) + Lisp_Object apple_event; +{ + Lisp_Object tem; + + CHECK_CONS (apple_event); + CHECK_STRING_CAR (apple_event); + if (SBYTES (XCAR (apple_event)) != 4 + || strcmp (SDATA (XCAR (apple_event)), "aevt") != 0) + error ("Not an apple event"); + + tem = assq_no_quit (Qemacs_suspension_id, XCDR (apple_event)); + if (NILP (tem)) + error ("Suspension ID not available"); + + tem = XCDR (tem); + if (!(CONSP (tem) + && STRINGP (XCAR (tem)) && SBYTES (XCAR (tem)) == 4 + && strcmp (SDATA (XCAR (tem)), "magn") == 0 + && STRINGP (XCDR (tem)) && SBYTES (XCDR (tem)) == 4)) + error ("Bad suspension ID format"); + + return *((UInt32 *) SDATA (XCDR (tem))); +} + + DEFUN ("mac-process-deferred-apple-events", Fmac_process_deferred_apple_events, Smac_process_deferred_apple_events, 0, 0, 0, doc: /* Process Apple events that are deferred at the startup time. */) () { - Lisp_Object result = Qnil; - long i; - if (mac_ready_for_apple_events) return Qnil; BLOCK_INPUT; mac_ready_for_apple_events = 1; - if (deferred_apple_events.buf) + if (deferred_apple_events) { - for (i = 0; i < deferred_apple_events.count; i += 2) + struct suspended_ae_info *prev, *tail, *next; + + /* `nreverse' deferred_apple_events. */ + prev = NULL; + for (tail = deferred_apple_events; tail; tail = next) { - AEResumeTheCurrentEvent (deferred_apple_events.buf + i, - deferred_apple_events.buf + i + 1, + next = tail->next; + tail->next = prev; + prev = tail; + } + + /* Now `prev' points to the first cell. */ + for (tail = prev; tail; tail = next) + { + next = tail->next; + AEResumeTheCurrentEvent (&tail->apple_event, &tail->reply, ((AEEventHandlerUPP) kAEUseStandardDispatch), 0); - AEDisposeDesc (deferred_apple_events.buf + i); - AEDisposeDesc (deferred_apple_events.buf + i + 1); + AEDisposeDesc (&tail->reply); + AEDisposeDesc (&tail->apple_event); + xfree (tail); } - xfree (deferred_apple_events.buf); - bzero (&deferred_apple_events, sizeof (deferred_apple_events)); + deferred_apple_events = NULL; + } + UNBLOCK_INPUT; + + return Qt; +} + +DEFUN ("mac-cleanup-expired-apple-events", Fmac_cleanup_expired_apple_events, Smac_cleanup_expired_apple_events, 0, 0, 0, + doc: /* Clean up expired Apple events. +Return the number of expired events. */) + () +{ + int nexpired; + + BLOCK_INPUT; + nexpired = cleanup_suspended_apple_events (&suspended_apple_events, 0); + UNBLOCK_INPUT; + + return make_number (nexpired); +} + +DEFUN ("mac-ae-set-reply-parameter", Fmac_ae_set_reply_parameter, Smac_ae_set_reply_parameter, 3, 3, 0, + doc: /* Set parameter KEYWORD to DESCRIPTOR on reply of APPLE-EVENT. +KEYWORD is a 4-byte string. DESCRIPTOR is a Lisp representation of an +Apple event descriptor. It has the form of (TYPE . DATA), where TYPE +is a 4-byte string. Valid format of DATA is as follows: + + * If TYPE is "null", then DATA is nil. + * If TYPE is "list", then DATA is a list (DESCRIPTOR1 ... DESCRIPTORn). + * If TYPE is "reco", then DATA is a list ((KEYWORD1 . DESCRIPTOR1) + ... (KEYWORDn . DESCRIPTORn)). + * If TYPE is "aevt", then DATA is ignored and the descriptor is + treated as null. + * Otherwise, DATA is a string. + +If a (sub-)descriptor is in an invalid format, it is silently treated +as null. + +Return t if the parameter is successfully set. Otherwise return nil. */) + (apple_event, keyword, descriptor) + Lisp_Object apple_event, keyword, descriptor; +{ + Lisp_Object result = Qnil; + UInt32 suspension_id; + struct suspended_ae_info *p; + + suspension_id = get_suspension_id (apple_event); + + CHECK_STRING (keyword); + if (SBYTES (keyword) != 4) + error ("Apple event keyword must be a 4-byte string: %s", + SDATA (keyword)); + + BLOCK_INPUT; + for (p = suspended_apple_events; p; p = p->next) + if (p->suspension_id == suspension_id) + break; + if (p && p->reply.descriptorType != typeNull) + { + OSErr err; + + err = mac_ae_put_lisp (&p->reply, + EndianU32_BtoN (*((UInt32 *) SDATA (keyword))), + descriptor); + if (err == noErr) + result = Qt; + } + UNBLOCK_INPUT; + + return result; +} + +DEFUN ("mac-resume-apple-event", Fmac_resume_apple_event, Smac_resume_apple_event, 1, 2, 0, + doc: /* Resume handling of APPLE-EVENT. +Every Apple event handled by the Lisp interpreter is suspended first. +This function resumes such a suspended event either to complete Apple +event handling to give a reply, or to redispatch it to other handlers. + +If optional ERROR-CODE is an integer, it specifies the error number +that is set in the reply. If ERROR-CODE is t, the resumed event is +handled with the standard dispatching mechanism, but it is not handled +by Emacs again, thus it is redispatched to other handlers. + +Return t if APPLE-EVENT is successfully resumed. Otherwise return +nil, which means the event is already resumed or expired. */) + (apple_event, error_code) + Lisp_Object apple_event, error_code; +{ + Lisp_Object result = Qnil; + UInt32 suspension_id; + struct suspended_ae_info **p, *ae; + + suspension_id = get_suspension_id (apple_event); + + BLOCK_INPUT; + for (p = &suspended_apple_events; *p; p = &(*p)->next) + if ((*p)->suspension_id == suspension_id) + break; + if (*p) + { + ae = *p; + *p = (*p)->next; + if (INTEGERP (error_code) + && ae->apple_event.descriptorType != typeNull) + { + SInt32 errn = XINT (error_code); + + AEPutParamPtr (&ae->reply, keyErrorNumber, typeSInt32, + &errn, sizeof (SInt32)); + } + AESetTheCurrentEvent (&ae->apple_event); + AEResumeTheCurrentEvent (&ae->apple_event, &ae->reply, + ((AEEventHandlerUPP) + (EQ (error_code, Qt) ? + kAEUseStandardDispatch : kAENoDispatch)), + 0); + AEDisposeDesc (&ae->reply); + AEDisposeDesc (&ae->apple_event); + xfree (ae); result = Qt; } UNBLOCK_INPUT; @@ -1145,6 +1414,9 @@ DEFUN ("mac-process-deferred-apple-events", Fmac_process_deferred_apple_events, } +/*********************************************************************** + Drag and drop support +***********************************************************************/ #if TARGET_API_MAC_CARBON static Lisp_Object Vmac_dnd_known_types; static pascal OSErr mac_do_track_drag P_ ((DragTrackingMessage, WindowRef, @@ -1337,6 +1609,9 @@ remove_drag_handler (window) } +/*********************************************************************** + Services menu support +***********************************************************************/ #ifdef MAC_OSX void init_service_handler () @@ -1554,6 +1829,9 @@ syms_of_macselect () defsubr (&Sx_selection_owner_p); defsubr (&Sx_selection_exists_p); defsubr (&Smac_process_deferred_apple_events); + defsubr (&Smac_cleanup_expired_apple_events); + defsubr (&Smac_resume_apple_event); + defsubr (&Smac_ae_set_reply_parameter); Vselection_alist = Qnil; staticpro (&Vselection_alist); @@ -1635,6 +1913,9 @@ The types are chosen in the order they appear in the list. */); Qmac_apple_event_id = intern ("mac-apple-event-id"); staticpro (&Qmac_apple_event_id); + + Qemacs_suspension_id = intern ("emacs-suspension-id"); + staticpro (&Qemacs_suspension_id); } /* arch-tag: f3c91ad8-99e0-4bd6-9eef-251b2f848732 From a16ac62430e928e2fa99855a04cb9b14ddb60233 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 24 May 2006 08:08:43 +0000 Subject: [PATCH 010/403] (fn_keycode_to_keycode_table, XTread_socket) [MAC_OSX]: Fix last change. Don't map `fn' modifier if pressed with F1 ... F12. --- src/macterm.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index 8ed33226036..1f25b022f38 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -9632,8 +9632,9 @@ keycode_to_xkeysym (int keyCode, int *xKeySym) #ifdef MAC_OSX /* Table for translating Mac keycode with the laptop `fn' key to that without it. Destination symbols in comments are keys on US - keyboard, and they may not be the same on other types of - keyboards. */ + keyboard, and they may not be the same on other types of keyboards. + If the destination is identical to the source (f1 ... f12), it + doesn't map `fn' key to a modifier. */ static unsigned char fn_keycode_to_keycode_table[] = { /*0x00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /*0x10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -9654,14 +9655,14 @@ static unsigned char fn_keycode_to_keycode_table[] = { /*0x58*/ 0x1f /*kp-6 -> 'o'*/, 0x1a /*kp-7 -> '7'*/, 0, 0x1c /*kp-8 -> '8'*/, /*0x5C*/ 0x19 /*kp-9 -> '9'*/, 0, 0, 0, - /*0x60*/ 0, 0, 0, 0, - /*0x64*/ 0, 0, 0, 0, + /*0x60*/ 0x60 /*f5 = f5*/, 0x61 /*f6 = f6*/, 0x62 /*f7 = f7*/, 0x63 /*f3 = f3*/, + /*0x64*/ 0x64 /*f8 = f8*/, 0x65 /*f9 = f9*/, 0, 0x67 /*f11 = f11*/, /*0x68*/ 0, 0, 0, 0, - /*0x6C*/ 0, 0, 0, 0, + /*0x6C*/ 0, 0x6d /*f10 = f10*/, 0, 0x6f /*f12 = f12*/, /*0x70*/ 0, 0, 0, 0x7b /*home -> left*/, - /*0x74*/ 0x7e /*pgup -> up*/, 0x33 /*delete -> backspace*/, 0, 0x7c /*end -> right*/, - /*0x78*/ 0, 0x7d /*pgdown -> down*/, 0, 0, + /*0x74*/ 0x7e /*pgup -> up*/, 0x33 /*delete -> backspace*/, 0x76 /*f4 = f4*/, 0x7c /*end -> right*/, + /*0x78*/ 0x78 /*f2 = f2*/, 0x7d /*pgdown -> down*/, 0x7a /*f1 = f1*/, 0, /*0x7C*/ 0, 0, 0, 0 }; #endif /* MAC_OSX */ @@ -10311,14 +10312,16 @@ XTread_socket (sd, expected, hold_quit) GetEventParameter (eventRef, kEventParamKeyModifiers, typeUInt32, NULL, sizeof (UInt32), NULL, &modifiers); +#endif + mapped_modifiers &= modifiers; +#if USE_CARBON_EVENTS && defined (MAC_OSX) /* When using Carbon Events, we need to pass raw keyboard events to the TSM ourselves. If TSM handles it, it will pass back noErr, otherwise it will pass back "eventNotHandledErr" and we can process it normally. */ - if (!(modifiers - & mapped_modifiers + if (!(mapped_modifiers & ~(mac_pass_command_to_system ? cmdKey : 0) & ~(mac_pass_control_to_system ? controlKey : 0))) if (SendEventToEventTarget (eventRef, toolbox_dispatcher) @@ -10355,7 +10358,7 @@ XTread_socket (sd, expected, hold_quit) } #ifdef MAC_OSX - if (modifiers & kEventKeyModifierFnMask + if (mapped_modifiers & kEventKeyModifierFnMask && keycode <= 0x7f && fn_keycode_to_keycode_table[keycode]) keycode = fn_keycode_to_keycode_table[keycode]; @@ -10364,8 +10367,14 @@ XTread_socket (sd, expected, hold_quit) { inev.kind = NON_ASCII_KEYSTROKE_EVENT; inev.code = 0xff00 | xkeysym; +#ifdef MAC_OSX + if (modifiers & kEventKeyModifierFnMask + && keycode <= 0x7f + && fn_keycode_to_keycode_table[keycode] == keycode) + modifiers &= ~kEventKeyModifierFnMask; +#endif } - else if (modifiers & mapped_modifiers) + else if (mapped_modifiers) { /* translate the keycode back to determine the original key */ @@ -10444,11 +10453,7 @@ XTread_socket (sd, expected, hold_quit) inev.code = er.message & charCodeMask; } -#if USE_CARBON_EVENTS - inev.modifiers = mac_event_to_emacs_modifiers (eventRef); -#else - inev.modifiers = mac_to_emacs_modifiers (er.modifiers); -#endif + inev.modifiers = mac_to_emacs_modifiers (modifiers); inev.modifiers |= (extra_keyboard_modifiers & (meta_modifier | alt_modifier | hyper_modifier | super_modifier)); From fed1453ae116611352e803f5273c7430a7009081 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 24 May 2006 08:09:11 +0000 Subject: [PATCH 011/403] (TYPE_FILE_NAME): Change from macro to enumerator. (KEY_EMACS_SUSPENSION_ID_ATTR): New enumerator. (keyReplyRequestedAttr) [MAC_OS_X_VERSION_MAX_ALLOWED < 1030]: Likewise. (gestaltSystemVersionMajor, gestaltSystemVersionMinor) (gestaltSystemVersionBugFix) [MAC_OS_X_VERSION_MAX_ALLOWED < 1040]: Likewise. (typeUTF8Text, kEventParamWindowMouseLocation) [MAC_OSX && MAC_OS_X_VERSION_MAX_ALLOWED < 1020]: Likewise. (x_get_focus_frame, mac_ae_put_lisp): Add externs. --- src/macterm.h | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/macterm.h b/src/macterm.h index 8b45777e546..348d9bc4526 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -539,6 +539,48 @@ struct scroll_bar { #define HOURGLASS_WIDTH 16 #define HOURGLASS_HEIGHT 16 +/* Some constants that are used locally. */ +/* Apple event descriptor types */ +enum { + TYPE_FILE_NAME = 'fNam' +}; + +/* Keywords for Apple event attributes */ +enum { + KEY_EMACS_SUSPENSION_ID_ATTR = 'esId' /* typeUInt32 */ +}; + +/* Some constants that are not defined in older versions. */ +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 +/* Keywords for Apple event attributes */ +enum { + keyReplyRequestedAttr = 'repq' +}; +#endif + +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1040 +/* Gestalt selectors */ +enum { + gestaltSystemVersionMajor = 'sys1', + gestaltSystemVersionMinor = 'sys2', + gestaltSystemVersionBugFix = 'sys3' +}; +#endif + +#ifdef MAC_OSX +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1020 +/* Apple event descriptor types */ +enum { + typeUTF8Text = 'utf8' +}; + +/* Carbon event parameter names */ +enum { + kEventParamWindowMouseLocation = 'wmou' +}; +#endif +#endif + struct frame; struct face; struct image; @@ -596,8 +638,6 @@ extern void mac_prepare_for_quickdraw P_ ((struct frame *)); #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 -#define TYPE_FILE_NAME 'fNam' - /* Defined in macselect.c */ extern void x_clear_frame_selections P_ ((struct frame *)); @@ -615,6 +655,7 @@ extern int x_char_height P_ ((struct frame *)); extern void x_sync P_ ((struct frame *)); extern void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); extern void mac_update_title_bar P_ ((struct frame *, int)); +extern Lisp_Object x_get_focus_frame P_ ((struct frame *)); /* Defined in macmenu.c */ @@ -625,6 +666,7 @@ extern void free_frame_menubar P_ ((struct frame *)); extern void mac_clear_font_name_table P_ ((void)); extern Lisp_Object mac_aedesc_to_lisp P_ ((const AEDesc *)); +extern OSErr mac_ae_put_lisp P_ ((AEDescList *, UInt32, Lisp_Object)); #if TARGET_API_MAC_CARBON extern OSErr create_apple_event_from_event_ref P_ ((EventRef, UInt32, EventParamName *, From e4dff88deba9abcef8e0c0e61cec24f08a854134 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 24 May 2006 08:09:31 +0000 Subject: [PATCH 012/403] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ src/ChangeLog | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd9b5169194..2c510192e44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2006-05-24 YAMAMOTO Mitsuharu + + * term/mac-win.el: Set idle timer to clean up expired Apple events. + (mac-ae-get-url): Redispatch Apple event on unknown scheme. + (mac-dispatch-apple-event): Resume Apple event if it is suspended. + Optionally set error message in reply. + 2006-05-24 Carsten Dominik * textmodes/org.el: (org-open-at-point): Use renamed variable diff --git a/src/ChangeLog b/src/ChangeLog index 8781aacc368..dbeca38941e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,43 @@ +2006-05-24 YAMAMOTO Mitsuharu + + * mac.c (ae_attr_table): New variable. + (syms_of_mac): Intern and staticpro its elements. + (mac_aelist_to_lisp): Also convert Apple event attributes. + (mac_ae_put_lisp): New function. + (create_apple_event_from_event_ref) [MAC_OSX]: Use typeUTF8Text. + + * macfns.c (Fx_server_version): Use gestaltSystemVersionMajor etc. + + * macselect.c (Qemacs_suspension_id): New variable. + (syms_of_macselect): Intern and staticpro it. + (struct suspended_ae_info): New struct. + (deferred_apple_events, defer_apple_events) + (Fmac_process_deferred_apple_events): Use it. + (suspended_apple_events): New variable. + (mac_handle_apple_event_1): New function. + (mac_handle_apple_event): Use it. Don't process previously + suspended events. + (cleanup_suspended_apple_events, get_suspension_id)n + (cleanup_all_suspended_apple_events): New functions. + (init_apple_event_handler): Call cleanup_all_suspended_apple_events + at exit. + (Fmac_cleanup_expired_apple_events, Fmac_ae_set_reply_parameter) + (Fmac_resume_apple_event): New defuns. + (syms_of_macselect): Defsubr them. + + * macterm.c (fn_keycode_to_keycode_table, XTread_socket) [MAC_OSX]: + Fix last change. Don't map `fn' modifier if pressed with F1 ... F12. + + * macterm.h (TYPE_FILE_NAME): Change from macro to enumerator. + (KEY_EMACS_SUSPENSION_ID_ATTR): New enumerator. + (keyReplyRequestedAttr) [MAC_OS_X_VERSION_MAX_ALLOWED < 1030]: Likewise. + (gestaltSystemVersionMajor, gestaltSystemVersionMinor) + (gestaltSystemVersionBugFix) [MAC_OS_X_VERSION_MAX_ALLOWED < 1040]: + Likewise. + (typeUTF8Text, kEventParamWindowMouseLocation) + [MAC_OSX && MAC_OS_X_VERSION_MAX_ALLOWED < 1020]: Likewise. + (x_get_focus_frame, mac_ae_put_lisp): Add externs. + 2006-05-23 YAMAMOTO Mitsuharu * macterm.c (fn_keycode_to_xkeysym_table, convert_fn_keycode): Remove. From a62c3993bdb24035abd083a9922cb9baadb1da76 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 24 May 2006 12:04:23 +0000 Subject: [PATCH 013/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2c510192e44..53c130a3167 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-25 Nick Roberts + + * progmodes/gud.el (gud-sentinel): Condition on GUD buffer if it + has not been killed. + 2006-05-24 YAMAMOTO Mitsuharu * term/mac-win.el: Set idle timer to clean up expired Apple events. From a386b0959d81786a197f2c71170ba716c71702df Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 24 May 2006 12:05:03 +0000 Subject: [PATCH 014/403] (gud-sentinel): Condition on GUD buffer if it has not been killed. --- lisp/progmodes/gud.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index bda30b196e1..bbb9df4cb2c 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2693,10 +2693,10 @@ It is saved for when this flag is not set.") ((memq (process-status proc) '(signal exit)) ;; Stop displaying an arrow in a source file. (setq gud-overlay-arrow-position nil) - (with-current-buffer gud-comint-buffer - (if (memq gud-minor-mode-type '(gdbmi gdba)) - (gdb-reset) - (gud-reset))) + (if (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer) + '(gdba gdbmi)) + (gdb-reset) + (gud-reset)) (let* ((obuf (current-buffer))) ;; save-excursion isn't the right thing if ;; process-buffer is current-buffer From 33d74677e73926286cf179457dacebcea3306418 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 24 May 2006 13:22:12 +0000 Subject: [PATCH 015/403] startup.el (command-line): For names of preloaded files, don't append ".elc" (now done in Fload), and call file-truename on the lisp directory. subr.el (eval-after-load): Fix the doc-string. Allow FILE to match ANY loaded file with the right name, not just those in load-path. Put a regexp matching the file name into after-load-alist, rather than the name itself. subr.el: New functions load-history-regexp, load-history-filename-element, do-after-load-evaluation. international/mule.el (load-with-code-conversion): Do the eval-after-load stuff by calling do-after-load-evaluation. --- lisp/international/mule.el | 6 +-- lisp/startup.el | 11 ++-- lisp/subr.el | 106 +++++++++++++++++++++++++++++-------- 3 files changed, 92 insertions(+), 31 deletions(-) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 350b6347b42..72198bb1258 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -98,9 +98,9 @@ Return t if file exists." )) (let (kill-buffer-hook kill-buffer-query-functions) (kill-buffer buffer))) - (let ((hook (assoc file after-load-alist))) - (when hook - (mapcar (function eval) (cdr hook)))) + (unless purify-flag + (do-after-load-evaluation fullname)) + (unless (or nomessage noninteractive) (if source (message "Loading %s (source)...done" file) diff --git a/lisp/startup.el b/lisp/startup.el index 3e2bff1088e..d41c812565f 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -644,18 +644,17 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." ;; Convert preloaded file names to absolute. (let ((lisp-dir - (file-name-directory - (locate-file "simple" load-path - (get-load-suffixes))))) + (file-truename + (file-name-directory + (locate-file "simple" load-path + (get-load-suffixes)))))) (setq load-history (mapcar (lambda (elt) (if (and (stringp (car elt)) (not (file-name-absolute-p (car elt)))) (cons (concat lisp-dir - (car elt) - (if (string-match "[.]el$" (car elt)) - "" ".elc")) + (car elt)) (cdr elt)) elt)) load-history))) diff --git a/lisp/subr.el b/lisp/subr.el index 956fcef64f4..54361e92eec 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1393,32 +1393,94 @@ That function's doc string says which file created it." t)) nil)) +(defun load-history-regexp (file) + "Form a regexp to find FILE in load-history. +FILE, a string, is described in eval-after-load's doc-string." + (if (file-name-absolute-p file) + (setq file (file-truename file))) + (concat (if (file-name-absolute-p file) "\\`" "\\<") + (regexp-quote file) + (if (file-name-extension file) + "" + ;; Note: regexp-opt can't be used here, since we need to call + ;; this before Emacs has been fully started. 2006-05-21 + (concat "\\(" (mapconcat 'regexp-quote load-suffixes "\\|") "\\)?")) + "\\(" (mapconcat 'regexp-quote jka-compr-load-suffixes "\\|") + "\\)?\\'")) + +(defun load-history-filename-element (file-regexp) + "Get the first elt of load-history whose car matches FILE-REGEXP. +Return nil if there isn't one." + (let* ((loads load-history) + (load-elt (and loads (car loads)))) + (save-match-data + (while (and loads + (or (null (car load-elt)) + (not (string-match file-regexp (car load-elt))))) + (setq loads (cdr loads) + load-elt (and loads (car loads))))) + load-elt)) + (defun eval-after-load (file form) "Arrange that, if FILE is ever loaded, FORM will be run at that time. -This makes or adds to an entry on `after-load-alist'. If FILE is already loaded, evaluate FORM right now. -It does nothing if FORM is already on the list for FILE. -FILE must match exactly. Normally FILE is the name of a library, -with no directory or extension specified, since that is how `load' -is normally called. -FILE can also be a feature (i.e. a symbol), in which case FORM is -evaluated whenever that feature is `provide'd." - (let ((elt (assoc file after-load-alist))) - ;; Make sure there is an element for FILE. - (unless elt (setq elt (list file)) (push elt after-load-alist)) - ;; Add FORM to the element if it isn't there. + +If a matching file is loaded again, FORM will be evaluated again. + +If FILE is a string, it may be either an absolute or a relative file +name, and may have an extension \(e.g. \".el\") or may lack one, and +additionally may or may not have an extension denoting a compressed +format \(e.g. \".gz\"). + +When FILE is absolute, it is first converted to a true name by chasing +out symbolic links. Only a file of this name \(see next paragraph for +extensions) will trigger the evaluation of FORM. When FILE is relative, +a file whose absolute true name ends in FILE will trigger evaluation. + +When FILE lacks an extension, a file name with any extension will trigger +evaluation. Otherwise, its extension must match FILE's. A further +extension for a compressed format \(e.g. \".gz\") on FILE will not affect +this name matching. + +Alternatively, FILE can be a feature (i.e. a symbol), in which case FORM +is evaluated whenever that feature is `provide'd. + +Usually FILE is just a library name like \"font-lock\" or a feature name +like 'font-lock. + +This function makes or adds to an entry on `after-load-alist'." + ;; Add this FORM into after-load-alist (regardless of whether we'll be + ;; evaluating it now). + (let* ((regexp-or-feature + (if (stringp file) (load-history-regexp file) file)) + (elt (assoc regexp-or-feature after-load-alist))) + (unless elt + (setq elt (list regexp-or-feature)) + (push elt after-load-alist)) + ;; Add FORM to the element unless it's already there. (unless (member form (cdr elt)) - (nconc elt (list form)) - ;; If the file has been loaded already, run FORM right away. - (if (if (symbolp file) - (featurep file) - ;; Make sure `load-history' contains the files dumped with - ;; Emacs for the case that FILE is one of them. - ;; (load-symbol-file-load-history) - (when (locate-library file) - (assoc (locate-library file) load-history))) - (eval form)))) - form) + (nconc elt (list form))) + + ;; Is there an already loaded file whose name (or `provide' name) + ;; matches FILE? + (if (if (stringp file) + (load-history-filename-element regexp-or-feature) + (featurep file)) + (eval form)))) + +(defun do-after-load-evaluation (abs-file) + "Evaluate all `eval-after-load' forms, if any, for ABS-FILE. +ABS-FILE, a string, should be the absolute true name of a file just loaded." + (let ((after-load-elts after-load-alist) + a-l-element file-elements file-element form) + (while after-load-elts + (setq a-l-element (car after-load-elts) + after-load-elts (cdr after-load-elts)) + (when (and (stringp (car a-l-element)) + (string-match (car a-l-element) abs-file)) + (while (setq a-l-element (cdr a-l-element)) ; discard the file name + (setq form (car a-l-element)) + (eval form)))))) (defun eval-next-after-load (file) "Read the following input sexp, and run it whenever FILE is loaded. From 6bb6da3ec1732ed5cdd8d5fafd06841b2dc1eaa4 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 24 May 2006 13:24:21 +0000 Subject: [PATCH 016/403] lread.c (Vload_history): Enhance doc-string to say that the file is the absolute truename of the loaded file. lread.c (Vafter_load_alist): doc-string: state that an element now has a regexp to match file names, not a file name as such. lread.c (readevalloop): Call file-truename on the name for load-history, except at preloading time. lread.c (Fload): At preloading time, preserve the extension of the filename which goes into load-history. New variable hist_file_name. lread.c (Fload): Do eval-after-load stuff by calling the lisp function do-after-load-evaluation. --- src/lread.c | 68 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/src/lread.c b/src/lread.c index e80b228e768..31f974d9bc0 100644 --- a/src/lread.c +++ b/src/lread.c @@ -87,6 +87,7 @@ Lisp_Object Qascii_character, Qload, Qload_file_name; Lisp_Object Qbackquote, Qcomma, Qcomma_at, Qcomma_dot, Qfunction; Lisp_Object Qinhibit_file_name_operation; Lisp_Object Qeval_buffer_list, Veval_buffer_list; +Lisp_Object Qfile_truename, Qdo_after_load_evaluation; /* ACM 2006/5/16 */ extern Lisp_Object Qevent_symbol_element_mask; extern Lisp_Object Qfile_exists_p; @@ -718,8 +719,8 @@ Return t if the file exists and loads successfully. */) register int fd = -1; int count = SPECPDL_INDEX (); Lisp_Object temp; - struct gcpro gcpro1, gcpro2; - Lisp_Object found, efound; + struct gcpro gcpro1, gcpro2, gcpro3; + Lisp_Object found, efound, hist_file_name; /* 1 means we printed the ".el is newer" message. */ int newer = 0; /* 1 means we are loading a compiled file. */ @@ -727,6 +728,7 @@ Return t if the file exists and loads successfully. */) Lisp_Object handler; int safe_p = 1; char *fmode = "r"; + Lisp_Object tmp[2]; #ifdef DOS_NT fmode = "rt"; #endif /* DOS_NT */ @@ -743,7 +745,7 @@ Return t if the file exists and loads successfully. */) the need to gcpro noerror, nomessage and nosuffix. (Below here, we care only whether they are nil or not.) The presence of this call is the result of a historical accident: - it used to be in every file-operations and when it got removed + it used to be in every file-operation and when it got removed everywhere, it accidentally stayed here. Since then, enough people supposedly have things like (load "$PROJECT/foo.el") in their .emacs that it seemed risky to remove. */ @@ -763,7 +765,6 @@ Return t if the file exists and loads successfully. */) if (SCHARS (file) > 0) { int size = SBYTES (file); - Lisp_Object tmp[2]; found = Qnil; GCPRO2 (file, found); @@ -847,6 +848,13 @@ Return t if the file exists and loads successfully. */) Vloads_in_progress = Fcons (found, Vloads_in_progress); } + /* Get the name for load-history. */ + hist_file_name = (! NILP (Vpurify_flag) + ? Fconcat (2, (tmp[0] = Ffile_name_directory (file), + tmp[1] = Ffile_name_nondirectory (found), + tmp)) + : found) ; + if (!bcmp (SDATA (found) + SBYTES (found) - 4, ".elc", 4)) /* Load .elc files directly, but not when they are @@ -857,7 +865,7 @@ Return t if the file exists and loads successfully. */) struct stat s1, s2; int result; - GCPRO2 (file, found); + GCPRO3 (file, found, hist_file_name); if (!safe_to_load_p (fd)) { @@ -911,14 +919,14 @@ Return t if the file exists and loads successfully. */) if (fd >= 0) emacs_close (fd); - val = call4 (Vload_source_file_function, found, file, + val = call4 (Vload_source_file_function, found, hist_file_name, NILP (noerror) ? Qnil : Qt, NILP (nomessage) ? Qnil : Qt); return unbind_to (count, val); } } - GCPRO2 (file, found); + GCPRO3 (file, found, hist_file_name); #ifdef WINDOWSNT emacs_close (fd); @@ -957,14 +965,15 @@ Return t if the file exists and loads successfully. */) load_descriptor_list = Fcons (make_number (fileno (stream)), load_descriptor_list); load_in_progress++; - readevalloop (Qget_file_char, stream, (! NILP (Vpurify_flag) ? file : found), + readevalloop (Qget_file_char, stream, hist_file_name, Feval, 0, Qnil, Qnil, Qnil, Qnil); unbind_to (count, Qnil); - /* Run any load-hooks for this file. */ - temp = Fassoc (file, Vafter_load_alist); - if (!NILP (temp)) - Fprogn (Fcdr (temp)); + /* Run any eval-after-load forms for this file */ + if (NILP (Vpurify_flag) + && (!NILP (Ffboundp (Qdo_after_load_evaluation)))) + call1 (Qdo_after_load_evaluation, hist_file_name) ; + UNGCPRO; if (saved_doc_string) @@ -1391,6 +1400,12 @@ readevalloop (readcharfun, stream, sourcename, evalfun, GCPRO4 (sourcename, readfun, start, end); + /* Try to ensure sourcename is a truename, except whilst preloading. */ + if (NILP (Vpurify_flag) + && !NILP (sourcename) && Ffile_name_absolute_p (sourcename) + && (!NILP (Ffboundp (Qfile_truename)))) + sourcename = call1 (Qfile_truename, sourcename) ; + LOADHIST_ATTACH (sourcename); continue_reading_p = 1; @@ -3971,16 +3986,17 @@ customize `jka-compr-load-suffixes' rather than the present variable. */); DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, doc: /* An alist of expressions to be evalled when particular files are loaded. -Each element looks like (FILENAME FORMS...). -When `load' is run and the file-name argument is FILENAME, -the FORMS in the corresponding element are executed at the end of loading. +Each element looks like (REGEXP-OR-FEATURE FORMS...). -FILENAME must match exactly! Normally FILENAME is the name of a library, -with no directory specified, since that is how `load' is normally called. -An error in FORMS does not undo the load, -but does prevent execution of the rest of the FORMS. -FILENAME can also be a symbol (a feature) and FORMS are then executed -when the corresponding call to `provide' is made. */); +REGEXP-OR-FEATURE is either a regular expression to match file names, or +a symbol \(a feature name). + +When `load' is run and the file-name argument matches an element's +REGEXP-OR-FEATURE, or when `provide' is run and provides the symbol +REGEXP-OR-FEATURE, the FORMS in the element are executed. + +An error in FORMS does not undo the load, but does prevent execution of +the rest of the FORMS. */); Vafter_load_alist = Qnil; DEFVAR_LISP ("load-history", &Vload_history, @@ -3988,6 +4004,10 @@ when the corresponding call to `provide' is made. */); Each alist element is a list that starts with a file name, except for one element (optional) that starts with nil and describes definitions evaluated from buffers not visiting files. + +The file name is absolute and is the true file name (i.e. it doesn't +contain symbolic links) of the loaded file. + The remaining elements of each list are symbols defined as variables and cons cells of the form `(provide . FEATURE)', `(require . FEATURE)', `(defun . FUNCTION)', `(autoload . SYMBOL)', and `(t . SYMBOL)'. @@ -4118,6 +4138,12 @@ to load. See also `load-dangerous-libraries'. */); Qeval_buffer_list = intern ("eval-buffer-list"); staticpro (&Qeval_buffer_list); + Qfile_truename = intern ("file-truename"); + staticpro (&Qfile_truename) ; + + Qdo_after_load_evaluation = intern ("do-after-load-evaluation"); + staticpro (&Qdo_after_load_evaluation) ; + staticpro (&dump_path); staticpro (&read_objects); From ac9f37df56af312cb844aac7bc53ea6f705a2d75 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 24 May 2006 13:51:11 +0000 Subject: [PATCH 017/403] *** empty log message *** --- lisp/ChangeLog | 497 +++++++++++++++++++++++++++---------------------- src/ChangeLog | 18 ++ 2 files changed, 294 insertions(+), 221 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 53c130a3167..7ddf1a8689d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2006-05-24 Alan Mackenzie + + * startup.el (command-line): For names of preloaded files, don't + append ".elc" (now done in Fload), and call file-truename on the + lisp directory. + + * subr.el (eval-after-load): Fix the doc-string. Allow FILE to + match ANY loaded file with the right name, not just those in + load-path. Put a regexp matching the file name into + after-load-alist, rather than the name itself. + + * subr.el: New functions load-history-regexp, + load-history-filename-element, do-after-load-evaluation. + + * international/mule.el (load-with-code-conversion): Do the + eval-after-load stuff by calling do-after-load-evaluation. + 2006-05-25 Nick Roberts * progmodes/gud.el (gud-sentinel): Condition on GUD buffer if it @@ -925,7 +942,12 @@ than alias `list-diary-entries'. 2006-04-29 Dan Nicolaescu +>>>>>>> 1.9511 +<<<<<<< ChangeLog + * jit-lock.el (jit-lock-function): Check jit-lock-defer-timer is + active before setting 'fontified to 'defer. +======= * help-fns.el (describe-variable): Add info about safe local variables. 2006-04-29 Richard Stallman @@ -2184,6 +2206,7 @@ * term/w32-win.el (mouse-set-font): Mention w32-list-proportional-fonts in the doc string. +>>>>>>> 1.9511 2006-03-18 Kim F. Storm @@ -2191,8 +2214,8 @@ (ido-unc-hosts): New user option to explicitly define list of know UNC-style hosts for completion. (ido-cache-unc-host-shares-time): New user option. - (ido-is-unc-root, ido-is-unc-host, ido-cache-unc-valid): - New helper functions for UNC file-name support. + (ido-is-unc-root, ido-is-unc-host, ido-cache-unc-valid): New + helper functions for UNC file-name support. (ido-may-cache-directory): Check for UNC host. Simplify. (ido-wash-history): Clean out old UNC hosts. (ido-nonreadable-directory-p): UNC hosts are always readable. @@ -2250,7 +2273,7 @@ (gdb-force-mode-line-update): New function. (gdb-resync, gdb-starting, gdb-signal, gdb-exited, gdb-stopped) (gdb-exited): Use them. - (gdb-signal): New function. + (gdb-signal): New fuction. (gdb-annotation-rules): Provide a rule for it. 2006-03-16 Kenichi Handa @@ -2286,7 +2309,7 @@ 2006-03-15 Bill Wohler * image.el (image-load-path-for-library): Fix example by not - recommending that one binds image-load-path. Just defvar it to + recommending that one binds image-load-path. Just defvar it to placate compiler and only use it if previously defined. 2006-03-15 Carsten Dominik @@ -2327,8 +2350,8 @@ * progmodes/gdb-ui.el (gdb-var-list): Change order of first two elements. - (gdb-find-watch-expression): Make it work for arrays too. - Follow change to gdb-var-list. + (gdb-find-watch-expression): Make it work for arrays too. Follow + change to gdb-var-list. (gud-watch): Allow the user to enter variable name with a prexix arg. Create keybindings. (gdb-var-create-handler, gdb-var-evaluate-expression-handler) @@ -2336,7 +2359,8 @@ (gdb-var-delete, gdb-edit-value, gdb-speedbar-expand-node) (gdb-var-list-children-handler-1, gdb-var-update-handler-1): Follow change to gdb-var-list. - (gdb-starting): Don't show the overlay arrows when program is running. + (gdb-starting): Don't show the overlay arrows when program is + running. * progmodes/gud.el (gud-speedbar-buttons): Follow change to gdb-var-list. @@ -2344,21 +2368,21 @@ 2006-03-14 Bill Wohler * image.el (image-load-path-for-library): Pass value of path - rather than symbol. Always return list of directories. - Guarantee that image directory comes first. + rather than symbol. Always return list of directories. Guarantee + that image directory comes first. 2006-03-14 Alan Mackenzie - * font-core.el (font-lock-extend-region\(-function\)?.): - New function/variable. + * font-core.el: New function/variable + font-lock-extend-region\(-function\)?. - * font-lock.el (font-lock-after-change-function): - Call font-lock-extend-region. Obey font-lock-lines-before. + * font-lock.el (font-lock-after-change-function): Call + font-lock-extend-region. Obey font-lock-lines-before. (font-lock-default-fontify-region): Remove reference to font-lock-lines-before. - * jit-lock.el (jit-lock-after-change): - Call font-lock-extend-region. Obey font-lock-lines-before. + * jit-lock.el (jit-lock-after-change): Call + font-lock-extend-region. Obey font-lock-lines-before. 2006-03-14 David Ponce @@ -2385,8 +2409,8 @@ themes sub-directory found in tree-widget-themes-load-path. (tree-widget-themes-directory, tree-widget-theme): Doc fix. (tree-widget--locate-sub-directory): Return all occurrences. - (tree-widget-themes-path): New function. - Replace tree-widget-themes-directory, and return a list of directories. + (tree-widget-themes-path): New function. Replace + tree-widget-themes-directory, and return a list of directories. (tree-widget-set-parent-theme) (tree-widget-lookup-image): Use it. @@ -2531,8 +2555,8 @@ 2006-03-07 Chong Yidong - * files.el (hack-local-variables-confirm): - Set coding-system-for-read to nil before writing to .emacs. + * files.el (hack-local-variables-confirm): Set + coding-system-for-read to nil before writing to .emacs. * arc-mode.el (archive-extract): Check if an existing buffer name comes from a different archive. @@ -2554,8 +2578,8 @@ 2006-03-07 Carsten Dominik - * textmodes/org.el: Move defvars out of eval-when-compile. - Use buffer-file-name variable. + * textmodes/org.el: Move defvars out of eval-when-compile. Use + buffer-file-name variable. (org-agenda-file-to-end, org-agenda-file-to-front): Remove unused arg `file'. (org-level-faces): Remove startup dependency. @@ -2570,7 +2594,8 @@ (org-tag): New face. (org-get-level-face): New function. (org-set-font-lock-defaults): Simplify setup for headlines. - (org-complete): Pass common substring to `display-completion-list'. + (org-complete): Pass common substring to + `display-completion-list'. 2006-03-06 David Ponce @@ -2742,8 +2767,9 @@ * t-mouse.el: New file. (t-mouse-tty): Use with-temp-buffer. Add more terminal types. - (t-mouse-lispy-buffer-posn-from-coords): Remove. - (t-mouse-make-event-element): Use posn-at-x-y instead. + (t-mouse-lispy-buffer-posn-from-coords): Remove. Use the C + primitive... + (t-mouse-make-event-element): ...posn-at-x-y instead. (t-mouse-make-event): Deal with Fedora Core 3. (t-mouse-make-event): Don't sink the `stupid text mode menubar'. (t-mouse-mouse-position-function): New function. Use it instead @@ -2776,7 +2802,8 @@ * textmodes/reftex-index.el (reftex-index-map): Add `follow-mouse' binding. - * textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse' binding. + * textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse' + binding. * textmodes/reftex-sel.el (reftex-select-label-map) (reftex-select-bib-map): Add `follow-mouse' binding. @@ -2955,7 +2982,7 @@ (org-format-org-table-html, org-format-table-table-html): Fix typos in docstrings. -2006-02-23 Carsten Dominik +12006-02-23 Carsten Dominik * textmodes/org.el (org-cleaned-string-for-export) (org-solidify-link-text): New function. @@ -4253,7 +4280,7 @@ (vc-default-update-changelog): Don't use vc-user-login-name, we don't need it here. - * net/tramp-vc.el (vc-user-login-name): Comment out defadvice, it is + * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is no longer necessary. 2006-01-25 Kenichi Handa @@ -5750,7 +5777,7 @@ display-multi-frame-p, use selected-frame when menu-updating-frame is nil. -2005-12-20 Stuart Herring (tiny change) +2005-12-20 Davis Herring (tiny change) * align.el (align-rules-list): Use [ \t] instead of \s- for column separators in text mode. @@ -6354,20 +6381,20 @@ CC Mode update to 5.31. * progmodes/cc-subword.el: Add a dummy `c-subword-mode' for - Emacsen which lack `define-minor-mode'. (Currently Emacs <21. - We might do this function properly in the future). + Emacsen which lack `define-minor-mode'. (Currently Emacs <21. We + might do this function properly in the future). - * progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: - New macros c-sentence-end and c-default-value-sentence end, to cope + * progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: New + macros c-sentence-end and c-default-value-sentence end, to cope with Emacs 22's new function `sentence-end'. 2005-12-08 Martin Stjernholm - * progmodes/cc-cmds.el (c-show-syntactic-information): Solve the + * progmodes/cc-cmds.el (c-show-syntactic-information): Solved the compat issue using `c-put-overlay' and `c-delete-overlay'. - * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay): - New compat macros to handle overlays/extents. + * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay): New + compat macros to handle overlays/extents. 2005-12-08 Alan Mackenzie @@ -6388,19 +6415,20 @@ 2005-12-08 Martin Stjernholm - * progmodes/cc-fonts.el (c-make-syntactic-matcher): - New internal helper. + * progmodes/cc-fonts.el (c-make-syntactic-matcher): New internal + helper. (c-cpp-matchers, c-basic-matchers-before): Use the `eval' construct to make the indirect face lookup work in XEmacs. (c-cpp-matchers): Append the negation char face to the existing - fontification, so that the cpp face doesn't disappear. - Use `c-make-syntactic-matcher' to avoid negation chars in comments - and strings. + fontification, so that the cpp face doesn't disappear. Use + `c-make-syntactic-matcher' to avoid negation chars in comments and + strings. * progmodes/cc-fonts.el (c-negation-char-face-name): New variable - to map to `font-lock-negation-char-face' in emacsen where it exists. + to map to `font-lock-negation-char-face' in emacsen where it + exists. 2005-12-08 Alan Mackenzie @@ -6423,17 +6451,18 @@ (i) Insert a binding for C-c C-backspace into c-bind-special-erase-keys which works in TTYs. (ii) Make sure that when file styles are used, any explicitly - given style variables take priority over those in the style. - Do this by calling `hack-local-variables' a second time. + given style variables take priority over those in the style. Do + this by calling `hack-local-variables' a second time. * progmodes/cc-vars.el: Add language specific customization widgets for AWK to c-doc-comment-style, c-require-final-newline - and c-default-style. Add a defcustom for awk-mode-hook. - Give c-syntactic-element and c-syntactic-context doc-strings by - directly setting their `variable-documentation' propery. - This allows Emacs 22.1 to read these with C-h v. + and c-default-style. Add a defcustom for awk-mode-hook. Give + c-syntactic-element and c-syntactic-context doc-strings by + directly setting their `variable-documentation' propery. This + allows Emacs 22.1 to read these with C-h v. - * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan Monnier). + * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan + Monnier). 2005-12-08 Martin Stjernholm @@ -6459,8 +6488,8 @@ * progmodes/cc-mode.el: Give c-hungry-backspace and c-hungry-delete-forward permanent key bindings. - * progmodes/cc-cmds.el (c-electric-semi&comma): - Bind c-syntactic-context for calls to "criteria functions", for + * progmodes/cc-cmds.el (c-electric-semi&comma): Bind + c-syntactic-context for calls to "criteria functions", for consistency with other calls to user functions. * progmodes/cc-cmds.el (c-indent-command): Expunge use of @@ -6474,7 +6503,7 @@ 2005-12-08 Martin Stjernholm - * progmodes/cc-engine.el (c-on-identifier): Fix bug when at the + * progmodes/cc-engine.el (c-on-identifier): Fixed bug when at the first char of an identifier. * progmodes/cc-engine.el (c-on-identifier): Handle the "operator @@ -6499,14 +6528,14 @@ 2005-12-08 Martin Stjernholm * progmodes/cc-fonts.el (c-cpp-matchers, c-basic-matchers-before): - Incorporate the patterns added in the Emacs development branch + Incorporated the patterns added in the Emacs development branch for the new Emacs 22 face `font-lock-negation-char-face'. * progmodes/cc-fonts.el (c-invalid-face-name): Use "red1" instead of "red" since it stands out better in xterms and DOS terminals. - * progmodes/cc-engine.el (c-literal-faces): - Add `font-lock-comment-delimiter-face' which is new in Emacs 22. + * progmodes/cc-engine.el (c-literal-faces): Added + `font-lock-comment-delimiter-face' which is new in Emacs 22. 2005-12-08 Alan Mackenzie @@ -6514,13 +6543,14 @@ forcibly enable c-electric-flag. * progmodes/cc-vars.el, cc-cmds.el: New clean-up - `comment-close-slash' on c-electric-slash: if enabled, typing `/' just - after the comment-prefix of a C-style comment will close that comment. + `comment-close-slash' on c-electric-slash: if enabled, typing `/' + just after the comment-prefix of a C-style comment will close that + comment. 2005-12-08 Martin Stjernholm * progmodes/cc-fonts.el (c-basic-matchers-before) - (c-complex-decl-matchers): Fix the "not-arrow-prefix" regexp used + (c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used in Pike. * progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has @@ -6529,10 +6559,10 @@ * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el (c-cpp-message-directives, c-cpp-include-directives) (c-opt-cpp-macro-define, c-opt-cpp-macro-define-start) - (c-cpp-expr-directives): Introduce new language constants to + (c-cpp-expr-directives): Introduced new language constants to control cpp syntax in a cleaner way. - (c-cpp-expr-functions): Rename from c-cpp-defined-fns. + (c-cpp-expr-functions): Renamed from c-cpp-defined-fns. (c-cpp-matchers, c-forward-to-cpp-define-body): Use them. @@ -6564,21 +6594,22 @@ (c-guess-basic-syntax): Handle C++ operator identifiers in declarations. - * progmodes/cc-langs.el (c-assignment-operators): Add the + * progmodes/cc-langs.el (c-assignment-operators): Added the trigraph version of ^= too. - * progmodes/cc-langs.el (c-assignment-operators): Add the + * progmodes/cc-langs.el (c-assignment-operators): Added the trigraph version of |= in C++. - * progmodes/cc-fonts.el (c-font-lock-declarators): - Handle `c-decl-hangon-kwds' after the identifier name. + * progmodes/cc-fonts.el (c-font-lock-declarators): Handle + `c-decl-hangon-kwds' after the identifier name. * progmodes/cc-engine.el (c-guess-basic-syntax): When deciding whether an arglist is "nonempty", ignore a comment after the open - paren if it isn't followed by a non-comment token on the same line. + paren if it isn't followed by a non-comment token on the same + line. - * progmodes/cc-engine.el (c-guess-basic-syntax): Case 4: - Enable heuristics below the point to cope with classes inside special + * progmodes/cc-engine.el (c-guess-basic-syntax): Case 4: Enable + heuristics below the point to cope with classes inside special brace lists in Pike. 2005-12-08 Alan Mackenzie @@ -6617,11 +6648,12 @@ * progmodes/cc-cmds.el: Add `c-bytecomp-defun's for c-\(forward\|backward\)-subword. (c-update-modeline): Add the new modeline flag `l' for - `c-electric-flag'. Make the auto-newline flag `a' dependent on `l'. - (c-toggle-auto-state): Rename it to `c-toggle-auto-newline'. - Make the old name an alias of the new name. + `c-electric-flag'. Make the auto-newline flag `a' dependent on + `l'. + (c-toggle-auto-state): Rename it to `c-toggle-auto-newline'. Make + the old name an alias of the new name. (c-toggle-electric-state): New function. - (c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\)): + c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\): Adapt these functions to do electric things only when c-electric-flag is non-nil. (c-point-syntax, c-brace-newlines, c-try-oneliner): Extract these @@ -6637,17 +6669,18 @@ 2005-12-08 Martin Stjernholm * progmodes/cc-cmds.el (c-show-syntactic-information): Show the - anchor position(s) using faces. Thanks to Masatake YAMATO for the idea. + anchor position(s) using faces. Thanks to Masatake YAMATO for the + idea. * progmodes/cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el - (c-submode-indicators): Change name from `c-auto-hungry-string' + (c-submode-indicators): Changed name from `c-auto-hungry-string' since it's now used to track another submode. - (c-update-modeline): Convert to function and extended to check + (c-update-modeline): Converted to function and extended to check `c-subword-move-mode'. (c-forward-into-nomenclature, c-backward-into-nomenclature): - Convert to compat aliases for `c-forward-subword' and + Converted to compat aliases for `c-forward-subword' and `c-backward-subword'. * progmodes/cc-subword.el: New functions and minor mode to handle @@ -6690,10 +6723,10 @@ 2005-12-08 Martin Stjernholm - * progmodes/cc-engine.el (c-forward-label): Fix fontification of + * progmodes/cc-engine.el (c-forward-label): Fixed fontification of macros inside labels. - * progmodes/cc-engine.el (c-looking-at-bos): Obsolete in favor of + * progmodes/cc-engine.el (c-looking-at-bos): Obsoleted in favor of `c-at-statement-start-p' and `c-at-expression-start-p'. * progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an @@ -6707,8 +6740,9 @@ like `c-at-statement-start-p' that additionally recognizes commas and expression parentheses as delimiters. - * progmodes/cc-engine.el (c-looking-at-inexpr-block): Add flag + * progmodes/cc-engine.el (c-looking-at-inexpr-block): Added flag to avoid heuristics that doesn't work for unclosed blocks. + (c-at-statement-start-p): New function. * progmodes/cc-engine.el, cc-fonts.el: Fixes in handling of @@ -6723,53 +6757,54 @@ (c-just-after-func-arglist-p, c-guess-basic-syntax) (c-basic-matchers-before): Use it. - (c-font-lock-objc-iip-decl): Remove. + (c-font-lock-objc-iip-decl): Removed. * progmodes/cc-engine.el (c-guess-basic-syntax): Some improvement in the template arglist recognition. - * progmodes/cc-styles.el (c-style-alist): Fix several + * progmodes/cc-styles.el (c-style-alist): Fixed several inconsistencies in the Whitesmith style. * progmodes/cc-align.el (c-lineup-after-whitesmith-blocks): New lineup function to get lines after Whitesmith style blocks correctly indented. - (c-lineup-whitesmith-in-block): Back out the compensation for + (c-lineup-whitesmith-in-block): Backed out the compensation for opening parens since it's done using `add' lists in the style definition instead. Don't use the anchor position since it varies too much between the syntactic symbols. :P - * progmodes/cc-vars.el (c-valid-offset): Update. + * progmodes/cc-vars.el (c-valid-offset): Updated. - * progmodes/cc-engine.el (c-evaluate-offset): Extend to handle + * progmodes/cc-engine.el (c-evaluate-offset): Extended to handle lists where the offsets are combined according to several - different methods: `first', `min', `max', and `add'. - Report offset evaluation errors with `c-benign-error' so that some kind + different methods: `first', `min', `max', and `add'. Report + offset evaluation errors with `c-benign-error' so that some kind of reindentation still is done. - * progmodes/cc-engine.el (c-guess-basic-syntax): - Anchor `arglist-intro' the same way as `arglist-cont-nonempty' and + * progmodes/cc-engine.el (c-guess-basic-syntax): Anchor + `arglist-intro' the same way as `arglist-cont-nonempty' and `arglist-close'. - * progmodes/cc-engine.el (c-guess-basic-syntax): Fix similar + * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed similar situations for `arglist-cont-nonempty' and `arglist-close'. - * progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New const. + * progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New + constant. * progmodes/cc-defs.el: Use `cc-bytecomp-fboundp' and cc-bytecomp-boundp' in a number of places. - * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a + * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a macro related issue. 2005-12-08 Alan Mackenzie * progmodes/cc-awk.el: Change the terminology of regexps: A char - list is now [asdf], a char class [:alpha:]. - Include code for char classes. - Set c-awk-NL-prop on lines ending in open strings. (Bug fix.) - Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps. + list is now [asdf], a char class [:alpha:]. Include code for char + classes. Set c-awk-NL-prop on lines ending in open strings. (Bug + fix.) Add character classes (e.g. "[:alpha:]") into AWK Mode's + regexps. Remove (nearly all of) the cruft associated with AWK Mode's former concept of "virtual semicolons": @@ -6808,14 +6843,15 @@ 2005-12-08 Alan Mackenzie - * progmodes/cc-awk.el: Move regexps for analysing AWK code to near the - start of the file. ^L now separate sections of the file. - (c-awk-non-eol-esc-pair-re, c-awk-blank-or-comment-line-re) - (c-awk-one-line-possibly-open-string-re) - (c-awk-regexp-one-line-possibly-open-char-class-re) - (c-awk-one-line-possibly-open-regexp-re) - (c-awk-one-line-non-syn-ws*-re): New defonsts. - (c-awk-at-vsemi-p, c-awk-vsemi-status-unknown-p): New functions. + * progmodes/cc-awk.el: Regexps for analysing AWK code have been + moved to near the start of the file. ^L now separate sections of + the file. New defconsts: c-awk-non-eol-esc-pair-re, + c-awk-blank-or-comment-line-re, + c-awk-one-line-possibly-open-string-re, + c-awk-regexp-one-line-possibly-open-char-class-re, + c-awk-one-line-possibly-open-regexp-re, + c-awk-one-line-non-syn-ws*-re. New functions: c-awk-at-vsemi-p, + c-awk-vsemi-status-unknown-p. Amend the concept of "virtual semicolons" (in the indentation engine) for languages like AWK, such that they are now @@ -6823,12 +6859,12 @@ the end of the line. (In AWK Mode, however, the pertinent text property is still physically set on the EOL.) Remove the specific tests for awk-mode, thus facilitating the introduction of other - language modes where EOLs can end statements. - (Note: The funtionality in cc-cmds.el, specifically + language modes where EOLs can end statements. (Note: The + funtionality in cc-cmds.el, specifically c-beginning/end-of-statement has yet to be amended.) - * progmodes/cc-defs.el (c-at-vsemi-p, c-vsemi-status-unknown-p): - New macros. + * progmodes/cc-defs.el: New macros c-at-vsemi-p, + c-vsemi-status-unknown-p. * progmodes/cc-langs.el: Added `#' into AWK Mode's value of c-stmt-delim-chars. New c-lang-defvars: c-at-vsemi-p-fn, @@ -6838,21 +6874,25 @@ c-crosses-statement-barrier-p, c-guess-basic-syntax, replace numerous awkward forms like (if (c-major-mode-is 'awk-mode) (c-awk-prev-line-incomplete-p)) - with (c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new - variable before-ws-ip, the place just after char-before-ip appears. + with + (c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new + variable before-ws-ip, the place just after char-before-ip + appears. * progmodes/cc-mode.el: Fix what's almost a semantic ambiguity in a comment. 2005-12-08 Martin Stjernholm - * progmodes/cc-cmds.el (c-electric-brace): Clean up using + * progmodes/cc-cmds.el (c-electric-brace): Cleaned up using `c-tentative-buffer-changes'. - * progmodes/cc-defs.el (c-region-is-active-p): Simplify and - convert to macro to choose between Emacs and XEmacs at compile time. + * progmodes/cc-defs.el (c-region-is-active-p): Simplified and + converted to macro to choose between Emacs and XEmacs at compile + time. - (c-set-region-active): New set counterpart to `c-region-is-active-p'. + (c-set-region-active): New set counterpart to + `c-region-is-active-p'. (c-tentative-buffer-changes): New macro to handle temporary buffer changes in a convenient way. @@ -6860,7 +6900,7 @@ (c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers for `c-tentative-buffer-changes'. - * progmodes/cc-engine.el (c-looking-at-inexpr-block): Tighten up + * progmodes/cc-engine.el (c-looking-at-inexpr-block): Tightened up the checks for paren sexps between the point and the keyword, to avoid some false alarms. @@ -6869,22 +6909,23 @@ parens. Changed to make use of c-keyword-member' to avoid some repeated regexp matches. - (c-opt-lambda-key, c-opt-inexpr-block-key, c-opt-inexpr-class-key): - These language variable are no longer necessary. + (c-opt-lambda-key, c-opt-inexpr-block-key, + c-opt-inexpr-class-key): These language variable are no longer + necessary. (c-block-stmt-kwds): New language constant used by c-looking-at-inexpr-block'. - (c-guess-basic-syntax): Remove an optional check that looked at + (c-guess-basic-syntax): Removed an optional check that looked at the existence of the now removed language variables. - * progmodes/cc-engine.el (c-fdoc-shift-type-backward) - (c-forward-decl-or-cast-1): Fix invalid recognition of C++ style + * progmodes/cc-engine.el (c-fdoc-shift-type-backward, + c-forward-decl-or-cast-1): Fixed invalid recognition of C++ style object instantiation expressions as declarations in some contexts. This bug only affected languages where the declarator can't be enclosed in parentheses. - * progmodes/cc-styles.el (c-style-alist): Fix the GNU style to + * progmodes/cc-styles.el (c-style-alist): Fixed the GNU style to insert newlines before and after substatement braces. * progmodes/cc-engine.el: Improved the heuristics for recognizing @@ -6894,14 +6935,15 @@ (c-just-after-func-arglist-p): Rewritten to use `c-forward-decl-or-cast-1'. Now behaves a bit differently too. - (c-beginning-of-member-init-list): Remove since it isn't used anymore. + (c-beginning-of-member-init-list): Removed since it isn't used + anymore. - (c-guess-basic-syntax): Adapt case 5B for the new - `c-just-after-func-arglist-p'. Merge cases 5B.1 and 5B.3. - Remove cases 5D.1 and 5D.2 since they aren't trigged anymore (case 5B.1 + (c-guess-basic-syntax): Case 5B adapted for the new + `c-just-after-func-arglist-p'. Cases 5B.1 and 5B.3 merged. Cases + 5D.1 and 5D.2 removed since they aren't trigged anymore (case 5B.1 covers all cases now). - * progmodes/cc-defs.el (c-point): Add `bosws' and `eosws'. + * progmodes/cc-defs.el (c-point): Added `bosws' and `eosws'. 2005-12-08 Alan Mackenzie @@ -6924,15 +6966,15 @@ (c-search-uplist-for-classkey): The old one. It's now a wrapper for compatibility. - (c-add-class-syntax, c-guess-continued-construct) - (c-guess-basic-syntax): Adapt for `c-looking-at-decl-block'. + (c-add-class-syntax, c-guess-continued-construct, + c-guess-basic-syntax): Adapted for `c-looking-at-decl-block'. - (c-decl-block-key): Change to tell apart ambiguous and + (c-decl-block-key): Changed to tell apart ambiguous and unambiguous keywords. Pike specials are now handled directly in the code instead. - (c-block-prefix-disallowed-chars, c-block-prefix-charset): - New language constants and variables to make the backward skip in + (c-block-prefix-disallowed-chars, c-block-prefix-charset): New + language constants and variables to make the backward skip in `c-looking-at-decl-block' as tight as possible. (c-nonsymbol-token-char-list): New language constant. @@ -6943,7 +6985,7 @@ * progmodes/cc-defs.el (c-make-bare-char-alt): New helper for making char classes for `c-syntactic-skip-backward'. - * progmodes/cc-engine.el (c-guess-basic-syntax): Simplify case + * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified case 16D - can't be a class-close at that point. * progmodes/cc-engine.el (c-guess-basic-syntax) @@ -6954,16 +6996,17 @@ `c-guess-basic-syntax' never will look at things outside the current narrowment now. The anchor position for `topmost-intro' is affected by this, but it was so bogus it was basically useless - before, and now it's equally bogus but in a slightly different way. + before, and now it's equally bogus but in a slightly different + way. (c-narrow-out-enclosing-class): Gone. (c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to the narrowed region. - (c-least-enclosing-brace): Remove silly optional argument. + (c-least-enclosing-brace): Removed silly optional argument. - * progmodes/cc-engine.el (c-beginning-of-decl-1): Fix bug where + * progmodes/cc-engine.el (c-beginning-of-decl-1): Fixed bug where the point could be left directly after an open paren when finding the beginning of the first decl in the block. @@ -6988,11 +7031,13 @@ (c-identifier-start, c-identifier-key): Now completely calculated from other constants. - (c-identifier-last-sym-match): Decommission since it's no longer used. + (c-identifier-last-sym-match): Decommissioned since it's no longer + used. - (c-operators): Use `c-identifier-ops'. Document `postfix-if-paren'. + (c-operators): Use `c-identifier-ops'. Documented + `postfix-if-paren'. - * progmodes/cc-engine.el (c-forward-name): Remove the + * progmodes/cc-engine.el (c-forward-name): Removed the optimization when c-identifier-key is equal to c-symbol-key since it doesn't work in byte compiled files. Don't record empty regions as identifiers. @@ -7008,13 +7053,13 @@ * progmodes/cc-defs.el (c-lang-const): Fixes to allow use without an explicit language in functions. - * progmodes/cc-defs.el (c-make-keywords-re): Add an appendable + * progmodes/cc-defs.el (c-make-keywords-re): Added an appendable variant of adornment. - * progmodes/cc-langs.el (c-any-class-key): Remove unused language + * progmodes/cc-langs.el (c-any-class-key): Removed unused language variable. - (c-type-decl-prefix-key): Remove some now unnecessary cruft from + (c-type-decl-prefix-key): Removed some now unnecessary cruft from the Pike value. * progmodes/cc-engine.el (c-on-identifier) @@ -7022,7 +7067,7 @@ correctly in `skip-chars-backward'. Affected the operator lfun syntax in Pike. - * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disable the + * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disabled the diagnostic message about precompiled language vars not being used. * progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword @@ -7032,9 +7077,9 @@ (c-specifier-key, c-not-decl-init-keywords): Some cleanup using new language constants `c-type-start-kwds' and `c-prefix-spec-kwds'. - * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: - Internal cleanups to properly detect the declared identifiers in - various declarations. + * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: Internal + cleanups to properly detect the declared identifiers in various + declarations. (c-decl-start-kwds): New language constant to recognize declarations that can start anywhere. Used for class declarations @@ -7045,7 +7090,7 @@ (c-find-decl-spots): Implement `c-decl-start-kwds'. (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds) - (c-decl-hangon-key, c-forward-decl-or-cast-1): Separate the + (c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the handling of the compiler specific extension keywords into a new language constant `c-decl-hangon-kwds' that defines keyword clauses to be ignored in declarations. @@ -7061,8 +7106,9 @@ (c-forward-decl-or-cast-1): Recognize the declared identifier in class and enum declarations as such and not as part of the type. - (c-forward-decl-or-cast-1, c-forward-label): Relax the - interpretation of PRECEDING-TOKEN-END when there's no preceding token. + (c-forward-decl-or-cast-1, c-forward-label): Relaxed the + interpretation of PRECEDING-TOKEN-END when there's no preceding + token. (c-forward-decl-or-cast-1): Don't disregard sure signs of declarations when there's some syntax error later on. @@ -7075,7 +7121,7 @@ * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el * cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el - * cc-cmds.el, cc-defs.el: Change the policy for marking up + * cc-cmds.el, cc-defs.el: Changed the policy for marking up functions that might do hidden buffer changes: All such internal functions are now marked instead of those that don't. @@ -7090,10 +7136,10 @@ (c-electric-semi&comma, c-electric-colon, c-electric-lt-gt) (c-electric-paren, c-electric-continued-statement, c-indent-command) (c-indent-region, c-mask-paragraph, c-indent-new-comment-line) - (c-context-line-break): Add `c-save-buffer-state' calls to comply + (c-context-line-break): Added `c-save-buffer-state' calls to comply with the changed semantics of the functions above. - * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a bug + * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a bug when macros occur in obscure places. Optimized the sexp movement a bit. @@ -7125,13 +7171,13 @@ * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el: Cleaned up the label handling. Labels are now recognized in a uniform and more robust way, regardless of context. Text properties are put on all - labels to recognize the following declarations better. - Multiword labels are handled both in indentation and fontification for - the benefit of language extensions like Qt. For consistency, keywords - in labels are now fontified with the label face instead. - That also applies to "case" and "default". + labels to recognize the following declarations better. Multiword + labels are handled both in indentation and fontification for the + benefit of language extensions like Qt. For consistency, keywords + in labels are now fontified with the label face instead. That + also applies to "case" and "default". - (c-beginning-of-statement-1): Fix some bugs in the label + (c-beginning-of-statement-1): Fixed some bugs in the label handling. Disregard `c-nonlabel-token-key' in labels that begin with `c-label-kwds'. @@ -7143,68 +7189,70 @@ (c-forward-label): New function to recognize labels. - (c-guess-basic-syntax): Replace uses of `c-label-key' with + (c-guess-basic-syntax): Replaced uses of `c-label-key' with `c-forward-label'. Moved the label recognition cases (14 and 15) earlier since they aren't so context sensitive now. Handle labels on the top level gracefully. Moved access label recognition to the generic label case (CASE 15) - removed CASE 5E. - (c-font-lock-declarations): Add recognition of labels in the + (c-font-lock-declarations): Added recognition of labels in the same round since we need to handle labels in parallell with other declarations to recognize both accurately. It should also improve speed. - (c-simple-decl-matchers, c-basic-matchers-after): - Move `c-font-lock-labels' so that it only is used on decoration level 2 + (c-simple-decl-matchers, c-basic-matchers-after): Moved + `c-font-lock-labels' so that it only is used on decoration level 2 since `c-font-lock-declarations' handles it otherwise. - (c-complex-decl-matchers): Remove the simplistic recognition of + (c-complex-decl-matchers): Removed the simplistic recognition of access labels. - (c-decl-prefix-re): Remove the kludges that was necessary to cope + (c-decl-prefix-re): Removed the kludges that was necessary to cope with labels earlier. (c-decl-start-re): New language variable to make `c-font-lock-declarations' stop for the special protection labels in Objective-C that start with `@'. - (c-label-key): Remove since it's no longer used. + (c-label-key): Removed since it's no longer used. (c-recognize-colon-labels, c-label-prefix-re): New language - constants to support recognition of generic colon-terminated labels. + constants to support recognition of generic colon-terminated + labels. (c-type-decl-end-used): `c-decl-end' is now used whenever there are colon terminated labels. - * progmodes/cc-align.el (c-lineup-arglist): Fix bug when the + * progmodes/cc-align.el (c-lineup-arglist): Fixed bug when the first argument starts with a special brace list. * progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1) - (c-font-lock-declarations): Break out the declaration and cast + (c-font-lock-declarations): Broke out the declaration and cast recognition from `c-font-lock-declarations' to a new function, so that it can be used in the indentation engine. - * progmodes/cc-engine.el (c-find-decl-spots): Fix bug in backing + * progmodes/cc-engine.el (c-find-decl-spots): Fixed bug in backing up to the start of the literal. Fixed bug with the point on the wrong side of the search limit that could happen when the start position is inside a literal. * progmodes/cc-engine.el (c-parse-state) - (c-invalidate-state-cache): Modify the use of `c-state-cache-end' + (c-invalidate-state-cache): Modified the use of `c-state-cache-end' so that it's kept a little bit back to increase the hit rate. - (c-parse-state): Change the macro handling and fixed some + (c-parse-state): Changed the macro handling and fixed some glitches. Macro context is checked more often than necessary now, but otoh less garbage conses are generated. * progmodes/cc-engine.el (c-parse-state) (c-invalidate-state-cache): Cache the last position where `c-state-cache' applies. This can speed up refontification quite - a bit in blocks where there are many non-brace parens before the point. + a bit in blocks where there are many non-brace parens before the + point. (c-state-cache-end): New variable for this. - (c-guess-basic-syntax, c-debug-parse-state): Adapt for the new + (c-guess-basic-syntax, c-debug-parse-state): Adapted for the new cache variable. * progmodes/cc-engine.el (c-find-decl-spots): Take more care to @@ -7215,39 +7263,39 @@ region is a single line inside a literal or macro (typically when the current line is refontified). - * progmodes/cc-engine.el (c-guess-basic-syntax): Simplify calls + * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified calls to `c-add-stmt-syntax' - there's no need to explicitly whack off entries from the paren state. - * progmodes/cc-engine.el (c-add-stmt-syntax): Narrow down the + * progmodes/cc-engine.el (c-add-stmt-syntax): Narrowed down the special case for "else if" clauses. * progmodes/cc-engine.el (c-looking-at-inexpr-block) (c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'. - * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): - New language variable to recognize the gcc extension with statement + * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): New + language variable to recognize the gcc extension with statement blocks inside expressions. - * progmodes/cc-engine.el (c-add-stmt-syntax): Restructure to make + * progmodes/cc-engine.el (c-add-stmt-syntax): Restructured to make it somewhat more comprehensible. The argument AT-BLOCK-START is no longer used and hence removed. - (c-guess-continued-construct, c-guess-basic-syntax): Update calls + (c-guess-continued-construct, c-guess-basic-syntax): Updated calls to `c-add-stmt-syntax'. - * progmodes/cc-engine.el (c-backward-to-decl-anchor): - Use `c-beginning-of-statement-1' instead of duplicating parts of it. + * progmodes/cc-engine.el (c-backward-to-decl-anchor): Use + `c-beginning-of-statement-1' instead of duplicating parts of it. This fixes bogus label recognition. * progmodes/cc-engine.el (c-add-type, c-check-type) - (c-forward-name, c-forward-type): Improve storage of template + (c-forward-name, c-forward-type): Improved storage of template types in `c-found-types' so that they can be recognized better. - (c-syntactic-content): Add option to skip past nested parens. + (c-syntactic-content): Added option to skip past nested parens. - * progmodes/cc-engine.el (c-forward-name): - Set `c-last-identifier-range' all the time. It's less work that way. + * progmodes/cc-engine.el (c-forward-name): Set + `c-last-identifier-range' all the time. It's less work that way. Handle that there might not be an identifier to store in `c-last-identifier-range'. @@ -7255,7 +7303,7 @@ nil from `c-forward-name'. * progmodes/cc-defs.el (c-safe-scan-lists) - (c-(go-)?(up|down)-list-(forward|backward)): Add limit arguments. + (c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments. * progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect' to work even if the form fails. @@ -7263,13 +7311,14 @@ * progmodes/cc-engine.el (c-parse-state): Speedup when moving far down in a large file in one go. - (c-get-fallback-start-pos): New helper function for `c-parse-state'. + (c-get-fallback-start-pos): New helper function for + `c-parse-state'. * progmodes/cc-align.el (c-lineup-assignments): New lineup function which is like `c-lineup-math' but returns nil instead of `c-basic-offset' when it doesn't match. - (c-lineup-math): Change to use `c-lineup-assignments'. + (c-lineup-math): Changed to use `c-lineup-assignments'. 2005-12-08 Alan Mackenzie @@ -7284,7 +7333,7 @@ places to use skip by syntax instead of skip by char class. * progmodes/cc-langs.el (c-unterminated-block-comment-regexp): - Fix a bug in the regexp that caused extreme backtracking. + Fixed a bug in the regexp that caused extreme backtracking. * progmodes/cc-langs.el (c-block-comment-starter) (c-block-comment-ender): New language constants to specify in a @@ -7303,16 +7352,18 @@ (c-simple-ws): New language constant for simple whitespace. - * progmodes/cc-defs.el (c-concat-separated): New convenience function. + * progmodes/cc-defs.el (c-concat-separated): New convenience + function. - * progmodes/cc-defs.el (c-make-keywords-re): Add kludge for bug + * progmodes/cc-defs.el (c-make-keywords-re): Added kludge for bug in `regexp-opt' in Emacs 20 and XEmacs when strings contain newlines. Allow and ignore nil elements in the list. 2005-12-08 Alan Mackenzie * progmodes/cc-cmds.el: Comment out a (n almost certainly - superfluous) check, (eq here (point-max)) in c-beginning-of-statement. + superfluous) check, (eq here (point-max)) in + c-beginning-of-statement. * progmodes/cc-cmds.el: Tidy up the comments in c-beginning-of-statement and subfunctions. @@ -7321,7 +7372,8 @@ more flexible c-put-char-property and c-clear-char-properties. Add the author's email address. - * progmodes/cc-langs.el (c-block-comment-start-regexp): New variable. + * progmodes/cc-langs.el: New variable, + c-block-comment-start-regexp. * progmodes/cc-cmds.el: Fix bug with M-e, when point is inside the closing "*/" of a block comment. @@ -7345,11 +7397,11 @@ * progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix when there are several strings on the same line. - * progmodes/cc-engine.el (c-literal-limits): Remove the + * progmodes/cc-engine.el (c-literal-limits): Removed the compatibility function for older emacsen. `c-literal-limits-fast' has now taken the place of this function. - * progmodes/cc-vars.el (c-emacs-features): Remove compatibility + * progmodes/cc-vars.el (c-emacs-features): Removed compatibility with older emacsen: We now require `pps-extended-state'. 2005-12-08 Alan Mackenzie @@ -7365,18 +7417,19 @@ eachother. Correct a few incidental bugs. * progmodes/cc-cmds.el: Restructure c-beginning-of-statement: - Improve its doc-string. Improve the handling of certain specific cases. + Improve its doc-string. Improve the handling of certain specific + cases. 2005-12-08 Martin Stjernholm * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el - (c-guess-basic-syntax): Change the way class-level labels are + (c-guess-basic-syntax): Changed the way class-level labels are recognized; they can now contain essentially any symbols. (c-opt-extra-label-key): New language variable to cope with the special protection label syntax in Objective-C. - (c-opt-access-key): Remove; this is now handled better by + (c-opt-access-key): Removed; this is now handled better by `c-nonlabel-token-key' and `c-opt-extra-label-key'. (c-complex-decl-matchers): Update to handle that @@ -7389,11 +7442,11 @@ Recognize bitfields better. * progmodes/cc-engine.el (c-beginning-of-inheritance-list): - Remove some cruft and fixed a bug that could cause it to go to a + Removed some cruft and fixed a bug that could cause it to go to a position further down. * progmodes/cc-langs.el, cc-engine.el - (c-beginning-of-statement-1): Improve detection of labels in + (c-beginning-of-statement-1): Improved detection of labels in declaration contexts. (c-beginning-of-decl-1): Use it. @@ -7401,11 +7454,11 @@ (c-nonlabel-token-key): New language constant and variable needed by `c-beginning-of-statement-1'. - * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug that + * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug that manifested itself due to the correction in `c-forward-sexp'. - * progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp): - Make these behave as documented when used at the buffer limits. + * progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp): Made + these behave as documented when used at the buffer limits. * progmodes/cc-mode.el, cc-engine.el, cc-langs.el (c-type-decl-end-used): Made this a language variable. @@ -7414,20 +7467,20 @@ correctly when `combine-after-change-calls' is used together with temporary narrowings. - * progmodes/cc-engine.el (c-beginning-of-statement-1): - Report labels correctly when the start point is immediately after the + * progmodes/cc-engine.el (c-beginning-of-statement-1): Report + labels correctly when the start point is immediately after the colon. - * progmodes/cc-defs.el (c-parse-sexp-lookup-properties): - Remove since it isn't used anymore. + * progmodes/cc-defs.el (c-parse-sexp-lookup-properties): Removed + since it isn't used anymore. * progmodes/cc-cmds.el (c-electric-lt-gt): Detect and mark angle bracket arglists such as template parens in C++. - * progmodes/cc-engine.el (c-syntactic-skip-backward): Fix a bug + * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed a bug in the last check-in. Some optimization. - * progmodes/cc-engine.el (c-syntactic-skip-backward): Fix bug + * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed bug where it could stop at the same level in a preceding sexp when PAREN-LEVEL is set. @@ -7435,7 +7488,7 @@ text property lookup only when it's needed. * progmodes/cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el: - Change the policy for paren marked angle brackets to be more + Changed the policy for paren marked angle brackets to be more persistent; once marked they remain marked even when they're found to be unbalanced in the searched region. This should keep the paren syntax around even when individual lines are refontified in @@ -7449,7 +7502,7 @@ (c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse argument has become `c-parse-and-markup-<>-arglists'. - (c-remove-<>-arglist-properties): Remove - no longer used. + (c-remove-<>-arglist-properties): Removed - no longer used. (c-after-change-check-<>-operators): New function used on `after-change-functions' to avoid that "<" and ">" characters that @@ -7461,26 +7514,28 @@ (c-after-change): Call `c-after-change-check-<>-operators'. (c-font-lock-<>-arglists): Use the context properties set by - `c-font-lock-declarations' to set `c-disallow-comma-in-<>-arglists' - correctly to avoid doing invalid markup. + `c-font-lock-declarations' to set + `c-disallow-comma-in-<>-arglists' correctly to avoid doing invalid + markup. - (c-font-lock-declarations): Remove code that undoes the invalid + (c-font-lock-declarations): Removed code that undoes the invalid markup done by `c-font-lock-<>-arglists'. (c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs after `c-font-lock-declarations'. - * progmodes/cc-engine.el (c-syntactic-skip-backward): - Add paren-level feature. + * progmodes/cc-engine.el (c-syntactic-skip-backward): Added + paren-level feature. - (c-guess-basic-syntax): Improve the anchor position for + (c-guess-basic-syntax): Improved the anchor position for `template-args-cont' in nested template arglists. There's still much to be desired in this area, though. 2005-12-08 Alan Mackenzie * progmodes/cc-cmds.el, cc-engine.el, cc-langs.el, cc-vars.el: - Make the "Text Filling and Line Breaking" commands work for AWK buffers. + Make the "Text Filling and Line Breaking" commands work for AWK + buffers. 2005-12-08 Martin Stjernholm @@ -7519,7 +7574,7 @@ 2005-12-08 Kim F. Storm - * emulation/cua-base.el (cua-use-hyper-key): Replace by ... + * emulation/cua-base.el (cua-use-hyper-key): Replaced by ... (cua-rectangle-modifier-key): ... this. New defcustom. Can now select either meta, hyper, or super modifier for rectangle commands. (cua--rectangle-modifier-key): New defvar. @@ -7528,8 +7583,8 @@ on X, to meta otherwise. Always bind C-return to toggle rectangle. Pass ?\s instead of `space' to cua--M/H-key. - * emulation/cua-rect.el (cua-help-for-rectangle): - Use cua--rectangle-modifier-key. Handle super modifier too. + * emulation/cua-rect.el (cua-help-for-rectangle): Use + cua--rectangle-modifier-key. Handle super modifier too. (cua--init-rectangles): Always bind C-return to toggle rectangle. Pass ?\s instead of `space' to cua--M/H-key and cua--rect-M/H-key. @@ -7540,8 +7595,8 @@ keymap if cua--prefix-override-timer is `shift'. (cua--shift-control-prefix): New function; emulate "type prefix key twice" functionality to handle shifted prefix key override. - (cua--shift-control-c-prefix, cua--shift-control-x-prefix): - New commands. + (cua--shift-control-c-prefix, cua--shift-control-x-prefix): New + commands. (cua--init-keymaps): Bind them to S-C-c and S-C-x. 2005-12-08 Carsten Dominik @@ -8267,7 +8322,7 @@ 2005-11-24 Carsten Dominik - * textmodes/org.el (org-export-plain-list-max-depth): Rename from + * textmodes/org.el (org-export-plain-list-max-depth): Renamed from `org-export-local-list-max-depth'. Change default value to 3. (org-auto-renumber-ordered-lists) (org-plain-list-ordered-item-terminator): New options. @@ -17114,7 +17169,7 @@ * add-log.el (change-log-font-lock-keywords): Make the regexp for date lines stricter. -2005-06-10 Zhang Wei +2005-06-10 Zhang Wei (tiny change) * term/x-win.el (x-clipboard-yank): Use x-selection-value instead of x-get-selection. diff --git a/src/ChangeLog b/src/ChangeLog index dbeca38941e..96d59a6ca90 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2006-05-24 Alan Mackenzie + + * lread.c (Vload_history): Enhance doc-string to say that the file + is the absolute truename of the loaded file. + + * lread.c (Vafter_load_alist): doc-string: state that an element + now has a regexp to match file names, not a file name as such. + + * lread.c (readevalloop): Call file-truename on the name for + load-history, except at preloading time. + + * lread.c (Fload): At preloading time, preserve the extension of + the filename which goes into load-history. New variable + hist_file_name. + + * lread.c (Fload): Do eval-after-load stuff by calling the lisp + function do-after-load-evaluation. + 2006-05-24 YAMAMOTO Mitsuharu * mac.c (ae_attr_table): New variable. From ad9f612529489d8bef2802cf7402f3ac9b998452 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 24 May 2006 14:21:52 +0000 Subject: [PATCH 018/403] * menu-bar.el, international/mule-cmds.el: Remove tooltips for menu entries that open submenus. --- lisp/ChangeLog | 5 +++ lisp/international/mule-cmds.el | 3 +- lisp/menu-bar.el | 59 +++++++++++---------------------- 3 files changed, 26 insertions(+), 41 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ddf1a8689d..3af8aad285b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-24 Chong Yidong + + * menu-bar.el, international/mule-cmds.el: Remove tooltips for + menu entries that open submenus. + 2006-05-24 Alan Mackenzie * startup.el (command-line): For names of preloaded files, don't diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 69dbb5c2445..93c075442f6 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -70,8 +70,7 @@ (make-sparse-keymap "Set Coding System")) (define-key-after mule-menu-keymap [set-language-environment] - (list 'menu-item "Set Language Environment" setup-language-environment-map - :help "Multilingual environment suitable for a specific language")) + (list 'menu-item "Set Language Environment" setup-language-environment-map)) (define-key-after mule-menu-keymap [separator-mule] '("--") t) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 34597f256e6..53939231238 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -300,8 +300,7 @@ A large number or nil slows down menu responsiveness." (define-key menu-bar-search-menu [i-search] - (list 'menu-item "Incremental Search" menu-bar-i-search-menu - :help "Incremental Search finds partial matches while you type the search string.\nIt is most convenient from the keyboard. Try it!")) + (list 'menu-item "Incremental Search" menu-bar-i-search-menu)) (define-key menu-bar-search-menu [separator-tag-isearch] '(menu-item "--")) @@ -369,8 +368,7 @@ A large number or nil slows down menu responsiveness." ;;; Assemble the top-level Edit menu items. (define-key menu-bar-edit-menu [props] - '(menu-item "Text Properties" facemenu-menu - :help "Change properties of text in region")) + '(menu-item "Text Properties" facemenu-menu)) (define-key menu-bar-edit-menu [fill] '(menu-item "Fill" fill-region @@ -382,8 +380,7 @@ A large number or nil slows down menu responsiveness." '(menu-item "--")) (define-key menu-bar-edit-menu [bookmark] - '(menu-item "Bookmarks" menu-bar-bookmark-map - :help "Record positions and jump between them")) + '(menu-item "Bookmarks" menu-bar-bookmark-map)) (defvar menu-bar-goto-menu (make-sparse-keymap "Go To")) @@ -467,8 +464,7 @@ A large number or nil slows down menu responsiveness." (fset 'yank-menu (cons 'keymap yank-menu)) (define-key menu-bar-edit-menu [select-paste] '(menu-item "Select and Paste" yank-menu - :enable (and (cdr yank-menu) (not buffer-read-only)) - :help "Paste (yank) text cut or copied earlier")) + :enable (and (cdr yank-menu) (not buffer-read-only)))) (define-key menu-bar-edit-menu [paste] '(menu-item "Paste" yank :enable (and @@ -641,8 +637,7 @@ by \"Save Options\" in Custom buffers.") ;;; Assemble all the top-level items of the "Options" menu (define-key menu-bar-options-menu [customize] - (list 'menu-item "Customize Emacs" menu-bar-custom-menu - :help "Full customization of every Emacs feature")) + (list 'menu-item "Customize Emacs" menu-bar-custom-menu)) (defun menu-bar-options-save () "Save current values of Options menu items using Custom." @@ -880,8 +875,7 @@ mail status in mode line")) (define-key menu-bar-showhide-menu [showhide-fringe] (list 'menu-item "Fringe" menu-bar-showhide-fringe-menu - :visible `(display-graphic-p) - :help "Select fringe mode")) + :visible `(display-graphic-p))) (defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar")) @@ -925,8 +919,7 @@ mail status in mode line")) (define-key menu-bar-showhide-menu [showhide-scroll-bar] (list 'menu-item "Scroll-bar" menu-bar-showhide-scroll-bar-menu - :visible `(display-graphic-p) - :help "Select scroll-bar mode")) + :visible `(display-graphic-p))) (define-key menu-bar-showhide-menu [showhide-tooltip-mode] (list 'menu-item "Tooltips" 'tooltip-mode @@ -946,8 +939,7 @@ mail status in mode line")) :button `(:toggle . tool-bar-mode))) (define-key menu-bar-options-menu [showhide] - (list 'menu-item "Show/Hide" menu-bar-showhide-menu - :help "Toggle on/off various display features")) + (list 'menu-item "Show/Hide" menu-bar-showhide-menu)) (define-key menu-bar-options-menu [showhide-separator] '("--")) @@ -960,7 +952,7 @@ mail status in mode line")) ;; Most of the MULE menu actually does make sense in unibyte mode, ;; e.g. language selection. ;;; ':visible 'default-enable-multibyte-characters - ':help "Default language, encodings, input method")) + )) ;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) ;(define-key menu-bar-options-menu [preferences] ; (list 'menu-item "Preferences" menu-bar-preferences-menu @@ -1137,14 +1129,13 @@ mail status in mode line")) '(menu-item "Programmable Calculator" calc :help "Invoke the Emacs built-in full scientific calculator")) (define-key menu-bar-tools-menu [calendar] - '(menu-item "Display Calendar" calendar)) + '(menu-item "Calendar" calendar)) (define-key menu-bar-tools-menu [separator-net] '("--")) (define-key menu-bar-tools-menu [directory-search] - '(menu-item "Directory Search" eudc-tools-menu - :help "Query directory servers via LDAP, CCSO PH/QI or BBDB")) + '(menu-item "Directory Search" eudc-tools-menu)) (define-key menu-bar-tools-menu [compose-mail] (list 'menu-item `(format "Send Mail (with %s)" (send-mail-item-name)) @@ -1172,27 +1163,21 @@ mail status in mode line")) (defvar vc-menu-map (make-sparse-keymap "Version Control")) (define-key menu-bar-tools-menu [pcl-cvs] - '(menu-item "PCL-CVS" cvs-global-menu - :help "Module-level interface to CVS")) + '(menu-item "PCL-CVS" cvs-global-menu)) (define-key menu-bar-tools-menu [vc] - (list 'menu-item "Version Control" vc-menu-map - :help "Interface to RCS, CVS, SCCS")) + (list 'menu-item "Version Control" vc-menu-map)) (define-key menu-bar-tools-menu [separator-compare] '("--")) (define-key menu-bar-tools-menu [ediff-misc] - '(menu-item "Ediff Miscellanea" menu-bar-ediff-misc-menu - :help "Ediff manual, customization, sessions, etc.")) + '(menu-item "Ediff Miscellanea" menu-bar-ediff-misc-menu)) (define-key menu-bar-tools-menu [epatch] '(menu-item "Apply Patch" menu-bar-epatch-menu)) (define-key menu-bar-tools-menu [ediff-merge] - '(menu-item "Merge" menu-bar-ediff-merge-menu - :help "Merge different revisions of files/directories")) + '(menu-item "Merge" menu-bar-ediff-merge-menu)) (define-key menu-bar-tools-menu [compare] - '(menu-item "Compare (Ediff)" menu-bar-ediff-menu - :help "Display differences between files/directories")) - + '(menu-item "Compare (Ediff)" menu-bar-ediff-menu)) (define-key menu-bar-tools-menu [separator-spell] '("--")) @@ -1242,8 +1227,7 @@ mail status in mode line")) :help "Keyboard layout for specific input method")) (define-key menu-bar-describe-menu [describe-language-environment] (list 'menu-item "Describe Language Environment" - describe-language-environment-map - :help "Show multilingual settings for a specific language")) + describe-language-environment-map)) (define-key menu-bar-describe-menu [separator-desc-mule] '("--")) @@ -1392,17 +1376,14 @@ key, a click, or a menu-item")) '(menu-item "Find Emacs Packages" finder-by-keyword :help "Find packages and features by keyword")) (define-key menu-bar-help-menu [manuals] - (list 'menu-item "More Manuals" menu-bar-manuals-menu - :help "Search and browse on-line manuals")) + (list 'menu-item "More Manuals" menu-bar-manuals-menu)) (define-key menu-bar-help-menu [emacs-manual] '(menu-item "Read the Emacs Manual" info-emacs-manual :help "Full documentation of Emacs features")) (define-key menu-bar-help-menu [describe] - (list 'menu-item "Describe" menu-bar-describe-menu - :help "Describe commands, variables, keys")) + (list 'menu-item "Describe" menu-bar-describe-menu)) (define-key menu-bar-help-menu [apropos] - (list 'menu-item "Search Documentation" menu-bar-apropos-menu - :help "Look up terms, find commands, options, etc. (Apropos)")) + (list 'menu-item "Search Documentation" menu-bar-apropos-menu)) (define-key menu-bar-help-menu [sep1] '("--")) (define-key menu-bar-help-menu [report-emacs-bug] From 4721e4481fe7e0a5a58d1a377071b6d153405889 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 24 May 2006 14:25:50 +0000 Subject: [PATCH 019/403] Remove conflict indicators. --- lisp/ChangeLog | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3af8aad285b..7edd7b944ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -947,12 +947,10 @@ than alias `list-diary-entries'. 2006-04-29 Dan Nicolaescu ->>>>>>> 1.9511 -<<<<<<< ChangeLog * jit-lock.el (jit-lock-function): Check jit-lock-defer-timer is active before setting 'fontified to 'defer. -======= + * help-fns.el (describe-variable): Add info about safe local variables. 2006-04-29 Richard Stallman @@ -2211,7 +2209,6 @@ * term/w32-win.el (mouse-set-font): Mention w32-list-proportional-fonts in the doc string. ->>>>>>> 1.9511 2006-03-18 Kim F. Storm From 55b76f19f3f849a4a843c6919c8558239eb2c5b7 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 24 May 2006 14:38:44 +0000 Subject: [PATCH 020/403] Restore contents after major mess-up in 2006-05-24T13:51:11Z!acm@muc.de. --- lisp/ChangeLog | 477 +++++++++++++++++++++++-------------------------- 1 file changed, 221 insertions(+), 256 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7edd7b944ab..3fbf773fa7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -948,9 +948,6 @@ 2006-04-29 Dan Nicolaescu - * jit-lock.el (jit-lock-function): Check jit-lock-defer-timer is - active before setting 'fontified to 'defer. - * help-fns.el (describe-variable): Add info about safe local variables. 2006-04-29 Richard Stallman @@ -2216,8 +2213,8 @@ (ido-unc-hosts): New user option to explicitly define list of know UNC-style hosts for completion. (ido-cache-unc-host-shares-time): New user option. - (ido-is-unc-root, ido-is-unc-host, ido-cache-unc-valid): New - helper functions for UNC file-name support. + (ido-is-unc-root, ido-is-unc-host, ido-cache-unc-valid): + New helper functions for UNC file-name support. (ido-may-cache-directory): Check for UNC host. Simplify. (ido-wash-history): Clean out old UNC hosts. (ido-nonreadable-directory-p): UNC hosts are always readable. @@ -2275,7 +2272,7 @@ (gdb-force-mode-line-update): New function. (gdb-resync, gdb-starting, gdb-signal, gdb-exited, gdb-stopped) (gdb-exited): Use them. - (gdb-signal): New fuction. + (gdb-signal): New function. (gdb-annotation-rules): Provide a rule for it. 2006-03-16 Kenichi Handa @@ -2311,7 +2308,7 @@ 2006-03-15 Bill Wohler * image.el (image-load-path-for-library): Fix example by not - recommending that one binds image-load-path. Just defvar it to + recommending that one binds image-load-path. Just defvar it to placate compiler and only use it if previously defined. 2006-03-15 Carsten Dominik @@ -2352,8 +2349,8 @@ * progmodes/gdb-ui.el (gdb-var-list): Change order of first two elements. - (gdb-find-watch-expression): Make it work for arrays too. Follow - change to gdb-var-list. + (gdb-find-watch-expression): Make it work for arrays too. + Follow change to gdb-var-list. (gud-watch): Allow the user to enter variable name with a prexix arg. Create keybindings. (gdb-var-create-handler, gdb-var-evaluate-expression-handler) @@ -2361,8 +2358,7 @@ (gdb-var-delete, gdb-edit-value, gdb-speedbar-expand-node) (gdb-var-list-children-handler-1, gdb-var-update-handler-1): Follow change to gdb-var-list. - (gdb-starting): Don't show the overlay arrows when program is - running. + (gdb-starting): Don't show the overlay arrows when program is running. * progmodes/gud.el (gud-speedbar-buttons): Follow change to gdb-var-list. @@ -2370,21 +2366,21 @@ 2006-03-14 Bill Wohler * image.el (image-load-path-for-library): Pass value of path - rather than symbol. Always return list of directories. Guarantee - that image directory comes first. + rather than symbol. Always return list of directories. + Guarantee that image directory comes first. 2006-03-14 Alan Mackenzie - * font-core.el: New function/variable - font-lock-extend-region\(-function\)?. + * font-core.el (font-lock-extend-region\(-function\)?.): + New function/variable. - * font-lock.el (font-lock-after-change-function): Call - font-lock-extend-region. Obey font-lock-lines-before. + * font-lock.el (font-lock-after-change-function): + Call font-lock-extend-region. Obey font-lock-lines-before. (font-lock-default-fontify-region): Remove reference to font-lock-lines-before. - * jit-lock.el (jit-lock-after-change): Call - font-lock-extend-region. Obey font-lock-lines-before. + * jit-lock.el (jit-lock-after-change): + Call font-lock-extend-region. Obey font-lock-lines-before. 2006-03-14 David Ponce @@ -2411,8 +2407,8 @@ themes sub-directory found in tree-widget-themes-load-path. (tree-widget-themes-directory, tree-widget-theme): Doc fix. (tree-widget--locate-sub-directory): Return all occurrences. - (tree-widget-themes-path): New function. Replace - tree-widget-themes-directory, and return a list of directories. + (tree-widget-themes-path): New function. + Replace tree-widget-themes-directory, and return a list of directories. (tree-widget-set-parent-theme) (tree-widget-lookup-image): Use it. @@ -2557,8 +2553,8 @@ 2006-03-07 Chong Yidong - * files.el (hack-local-variables-confirm): Set - coding-system-for-read to nil before writing to .emacs. + * files.el (hack-local-variables-confirm): + Set coding-system-for-read to nil before writing to .emacs. * arc-mode.el (archive-extract): Check if an existing buffer name comes from a different archive. @@ -2580,8 +2576,8 @@ 2006-03-07 Carsten Dominik - * textmodes/org.el: Move defvars out of eval-when-compile. Use - buffer-file-name variable. + * textmodes/org.el: Move defvars out of eval-when-compile. + Use buffer-file-name variable. (org-agenda-file-to-end, org-agenda-file-to-front): Remove unused arg `file'. (org-level-faces): Remove startup dependency. @@ -2596,8 +2592,7 @@ (org-tag): New face. (org-get-level-face): New function. (org-set-font-lock-defaults): Simplify setup for headlines. - (org-complete): Pass common substring to - `display-completion-list'. + (org-complete): Pass common substring to `display-completion-list'. 2006-03-06 David Ponce @@ -2769,9 +2764,8 @@ * t-mouse.el: New file. (t-mouse-tty): Use with-temp-buffer. Add more terminal types. - (t-mouse-lispy-buffer-posn-from-coords): Remove. Use the C - primitive... - (t-mouse-make-event-element): ...posn-at-x-y instead. + (t-mouse-lispy-buffer-posn-from-coords): Remove. + (t-mouse-make-event-element): Use posn-at-x-y instead. (t-mouse-make-event): Deal with Fedora Core 3. (t-mouse-make-event): Don't sink the `stupid text mode menubar'. (t-mouse-mouse-position-function): New function. Use it instead @@ -2804,8 +2798,7 @@ * textmodes/reftex-index.el (reftex-index-map): Add `follow-mouse' binding. - * textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse' - binding. + * textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse' binding. * textmodes/reftex-sel.el (reftex-select-label-map) (reftex-select-bib-map): Add `follow-mouse' binding. @@ -2984,7 +2977,7 @@ (org-format-org-table-html, org-format-table-table-html): Fix typos in docstrings. -12006-02-23 Carsten Dominik +2006-02-23 Carsten Dominik * textmodes/org.el (org-cleaned-string-for-export) (org-solidify-link-text): New function. @@ -4282,7 +4275,7 @@ (vc-default-update-changelog): Don't use vc-user-login-name, we don't need it here. - * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is + * net/tramp-vc.el (vc-user-login-name): Comment out defadvice, it is no longer necessary. 2006-01-25 Kenichi Handa @@ -5779,7 +5772,7 @@ display-multi-frame-p, use selected-frame when menu-updating-frame is nil. -2005-12-20 Davis Herring (tiny change) +2005-12-20 Stuart Herring (tiny change) * align.el (align-rules-list): Use [ \t] instead of \s- for column separators in text mode. @@ -6383,20 +6376,20 @@ CC Mode update to 5.31. * progmodes/cc-subword.el: Add a dummy `c-subword-mode' for - Emacsen which lack `define-minor-mode'. (Currently Emacs <21. We - might do this function properly in the future). + Emacsen which lack `define-minor-mode'. (Currently Emacs <21. + We might do this function properly in the future). - * progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: New - macros c-sentence-end and c-default-value-sentence end, to cope + * progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: + New macros c-sentence-end and c-default-value-sentence end, to cope with Emacs 22's new function `sentence-end'. 2005-12-08 Martin Stjernholm - * progmodes/cc-cmds.el (c-show-syntactic-information): Solved the + * progmodes/cc-cmds.el (c-show-syntactic-information): Solve the compat issue using `c-put-overlay' and `c-delete-overlay'. - * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay): New - compat macros to handle overlays/extents. + * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay): + New compat macros to handle overlays/extents. 2005-12-08 Alan Mackenzie @@ -6417,20 +6410,19 @@ 2005-12-08 Martin Stjernholm - * progmodes/cc-fonts.el (c-make-syntactic-matcher): New internal - helper. + * progmodes/cc-fonts.el (c-make-syntactic-matcher): + New internal helper. (c-cpp-matchers, c-basic-matchers-before): Use the `eval' construct to make the indirect face lookup work in XEmacs. (c-cpp-matchers): Append the negation char face to the existing - fontification, so that the cpp face doesn't disappear. Use - `c-make-syntactic-matcher' to avoid negation chars in comments and - strings. + fontification, so that the cpp face doesn't disappear. + Use `c-make-syntactic-matcher' to avoid negation chars in comments + and strings. * progmodes/cc-fonts.el (c-negation-char-face-name): New variable - to map to `font-lock-negation-char-face' in emacsen where it - exists. + to map to `font-lock-negation-char-face' in emacsen where it exists. 2005-12-08 Alan Mackenzie @@ -6453,18 +6445,17 @@ (i) Insert a binding for C-c C-backspace into c-bind-special-erase-keys which works in TTYs. (ii) Make sure that when file styles are used, any explicitly - given style variables take priority over those in the style. Do - this by calling `hack-local-variables' a second time. + given style variables take priority over those in the style. + Do this by calling `hack-local-variables' a second time. * progmodes/cc-vars.el: Add language specific customization widgets for AWK to c-doc-comment-style, c-require-final-newline - and c-default-style. Add a defcustom for awk-mode-hook. Give - c-syntactic-element and c-syntactic-context doc-strings by - directly setting their `variable-documentation' propery. This - allows Emacs 22.1 to read these with C-h v. + and c-default-style. Add a defcustom for awk-mode-hook. + Give c-syntactic-element and c-syntactic-context doc-strings by + directly setting their `variable-documentation' propery. + This allows Emacs 22.1 to read these with C-h v. - * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan - Monnier). + * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan Monnier). 2005-12-08 Martin Stjernholm @@ -6490,8 +6481,8 @@ * progmodes/cc-mode.el: Give c-hungry-backspace and c-hungry-delete-forward permanent key bindings. - * progmodes/cc-cmds.el (c-electric-semi&comma): Bind - c-syntactic-context for calls to "criteria functions", for + * progmodes/cc-cmds.el (c-electric-semi&comma): + Bind c-syntactic-context for calls to "criteria functions", for consistency with other calls to user functions. * progmodes/cc-cmds.el (c-indent-command): Expunge use of @@ -6505,7 +6496,7 @@ 2005-12-08 Martin Stjernholm - * progmodes/cc-engine.el (c-on-identifier): Fixed bug when at the + * progmodes/cc-engine.el (c-on-identifier): Fix bug when at the first char of an identifier. * progmodes/cc-engine.el (c-on-identifier): Handle the "operator @@ -6530,14 +6521,14 @@ 2005-12-08 Martin Stjernholm * progmodes/cc-fonts.el (c-cpp-matchers, c-basic-matchers-before): - Incorporated the patterns added in the Emacs development branch + Incorporate the patterns added in the Emacs development branch for the new Emacs 22 face `font-lock-negation-char-face'. * progmodes/cc-fonts.el (c-invalid-face-name): Use "red1" instead of "red" since it stands out better in xterms and DOS terminals. - * progmodes/cc-engine.el (c-literal-faces): Added - `font-lock-comment-delimiter-face' which is new in Emacs 22. + * progmodes/cc-engine.el (c-literal-faces): + Add `font-lock-comment-delimiter-face' which is new in Emacs 22. 2005-12-08 Alan Mackenzie @@ -6545,14 +6536,13 @@ forcibly enable c-electric-flag. * progmodes/cc-vars.el, cc-cmds.el: New clean-up - `comment-close-slash' on c-electric-slash: if enabled, typing `/' - just after the comment-prefix of a C-style comment will close that - comment. + `comment-close-slash' on c-electric-slash: if enabled, typing `/' just + after the comment-prefix of a C-style comment will close that comment. 2005-12-08 Martin Stjernholm * progmodes/cc-fonts.el (c-basic-matchers-before) - (c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used + (c-complex-decl-matchers): Fix the "not-arrow-prefix" regexp used in Pike. * progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has @@ -6561,10 +6551,10 @@ * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el (c-cpp-message-directives, c-cpp-include-directives) (c-opt-cpp-macro-define, c-opt-cpp-macro-define-start) - (c-cpp-expr-directives): Introduced new language constants to + (c-cpp-expr-directives): Introduce new language constants to control cpp syntax in a cleaner way. - (c-cpp-expr-functions): Renamed from c-cpp-defined-fns. + (c-cpp-expr-functions): Rename from c-cpp-defined-fns. (c-cpp-matchers, c-forward-to-cpp-define-body): Use them. @@ -6596,22 +6586,21 @@ (c-guess-basic-syntax): Handle C++ operator identifiers in declarations. - * progmodes/cc-langs.el (c-assignment-operators): Added the + * progmodes/cc-langs.el (c-assignment-operators): Add the trigraph version of ^= too. - * progmodes/cc-langs.el (c-assignment-operators): Added the + * progmodes/cc-langs.el (c-assignment-operators): Add the trigraph version of |= in C++. - * progmodes/cc-fonts.el (c-font-lock-declarators): Handle - `c-decl-hangon-kwds' after the identifier name. + * progmodes/cc-fonts.el (c-font-lock-declarators): + Handle `c-decl-hangon-kwds' after the identifier name. * progmodes/cc-engine.el (c-guess-basic-syntax): When deciding whether an arglist is "nonempty", ignore a comment after the open - paren if it isn't followed by a non-comment token on the same - line. + paren if it isn't followed by a non-comment token on the same line. - * progmodes/cc-engine.el (c-guess-basic-syntax): Case 4: Enable - heuristics below the point to cope with classes inside special + * progmodes/cc-engine.el (c-guess-basic-syntax): Case 4: + Enable heuristics below the point to cope with classes inside special brace lists in Pike. 2005-12-08 Alan Mackenzie @@ -6650,12 +6639,11 @@ * progmodes/cc-cmds.el: Add `c-bytecomp-defun's for c-\(forward\|backward\)-subword. (c-update-modeline): Add the new modeline flag `l' for - `c-electric-flag'. Make the auto-newline flag `a' dependent on - `l'. - (c-toggle-auto-state): Rename it to `c-toggle-auto-newline'. Make - the old name an alias of the new name. + `c-electric-flag'. Make the auto-newline flag `a' dependent on `l'. + (c-toggle-auto-state): Rename it to `c-toggle-auto-newline'. + Make the old name an alias of the new name. (c-toggle-electric-state): New function. - c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\): + (c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\)): Adapt these functions to do electric things only when c-electric-flag is non-nil. (c-point-syntax, c-brace-newlines, c-try-oneliner): Extract these @@ -6671,18 +6659,17 @@ 2005-12-08 Martin Stjernholm * progmodes/cc-cmds.el (c-show-syntactic-information): Show the - anchor position(s) using faces. Thanks to Masatake YAMATO for the - idea. + anchor position(s) using faces. Thanks to Masatake YAMATO for the idea. * progmodes/cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el - (c-submode-indicators): Changed name from `c-auto-hungry-string' + (c-submode-indicators): Change name from `c-auto-hungry-string' since it's now used to track another submode. - (c-update-modeline): Converted to function and extended to check + (c-update-modeline): Convert to function and extended to check `c-subword-move-mode'. (c-forward-into-nomenclature, c-backward-into-nomenclature): - Converted to compat aliases for `c-forward-subword' and + Convert to compat aliases for `c-forward-subword' and `c-backward-subword'. * progmodes/cc-subword.el: New functions and minor mode to handle @@ -6725,10 +6712,10 @@ 2005-12-08 Martin Stjernholm - * progmodes/cc-engine.el (c-forward-label): Fixed fontification of + * progmodes/cc-engine.el (c-forward-label): Fix fontification of macros inside labels. - * progmodes/cc-engine.el (c-looking-at-bos): Obsoleted in favor of + * progmodes/cc-engine.el (c-looking-at-bos): Obsolete in favor of `c-at-statement-start-p' and `c-at-expression-start-p'. * progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an @@ -6742,9 +6729,8 @@ like `c-at-statement-start-p' that additionally recognizes commas and expression parentheses as delimiters. - * progmodes/cc-engine.el (c-looking-at-inexpr-block): Added flag + * progmodes/cc-engine.el (c-looking-at-inexpr-block): Add flag to avoid heuristics that doesn't work for unclosed blocks. - (c-at-statement-start-p): New function. * progmodes/cc-engine.el, cc-fonts.el: Fixes in handling of @@ -6759,54 +6745,53 @@ (c-just-after-func-arglist-p, c-guess-basic-syntax) (c-basic-matchers-before): Use it. - (c-font-lock-objc-iip-decl): Removed. + (c-font-lock-objc-iip-decl): Remove. * progmodes/cc-engine.el (c-guess-basic-syntax): Some improvement in the template arglist recognition. - * progmodes/cc-styles.el (c-style-alist): Fixed several + * progmodes/cc-styles.el (c-style-alist): Fix several inconsistencies in the Whitesmith style. * progmodes/cc-align.el (c-lineup-after-whitesmith-blocks): New lineup function to get lines after Whitesmith style blocks correctly indented. - (c-lineup-whitesmith-in-block): Backed out the compensation for + (c-lineup-whitesmith-in-block): Back out the compensation for opening parens since it's done using `add' lists in the style definition instead. Don't use the anchor position since it varies too much between the syntactic symbols. :P - * progmodes/cc-vars.el (c-valid-offset): Updated. + * progmodes/cc-vars.el (c-valid-offset): Update. - * progmodes/cc-engine.el (c-evaluate-offset): Extended to handle + * progmodes/cc-engine.el (c-evaluate-offset): Extend to handle lists where the offsets are combined according to several - different methods: `first', `min', `max', and `add'. Report - offset evaluation errors with `c-benign-error' so that some kind + different methods: `first', `min', `max', and `add'. + Report offset evaluation errors with `c-benign-error' so that some kind of reindentation still is done. - * progmodes/cc-engine.el (c-guess-basic-syntax): Anchor - `arglist-intro' the same way as `arglist-cont-nonempty' and + * progmodes/cc-engine.el (c-guess-basic-syntax): + Anchor `arglist-intro' the same way as `arglist-cont-nonempty' and `arglist-close'. - * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed similar + * progmodes/cc-engine.el (c-guess-basic-syntax): Fix similar situations for `arglist-cont-nonempty' and `arglist-close'. - * progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New - constant. + * progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New const. * progmodes/cc-defs.el: Use `cc-bytecomp-fboundp' and cc-bytecomp-boundp' in a number of places. - * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a + * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a macro related issue. 2005-12-08 Alan Mackenzie * progmodes/cc-awk.el: Change the terminology of regexps: A char - list is now [asdf], a char class [:alpha:]. Include code for char - classes. Set c-awk-NL-prop on lines ending in open strings. (Bug - fix.) Add character classes (e.g. "[:alpha:]") into AWK Mode's - regexps. + list is now [asdf], a char class [:alpha:]. + Include code for char classes. + Set c-awk-NL-prop on lines ending in open strings. (Bug fix.) + Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps. Remove (nearly all of) the cruft associated with AWK Mode's former concept of "virtual semicolons": @@ -6845,15 +6830,14 @@ 2005-12-08 Alan Mackenzie - * progmodes/cc-awk.el: Regexps for analysing AWK code have been - moved to near the start of the file. ^L now separate sections of - the file. New defconsts: c-awk-non-eol-esc-pair-re, - c-awk-blank-or-comment-line-re, - c-awk-one-line-possibly-open-string-re, - c-awk-regexp-one-line-possibly-open-char-class-re, - c-awk-one-line-possibly-open-regexp-re, - c-awk-one-line-non-syn-ws*-re. New functions: c-awk-at-vsemi-p, - c-awk-vsemi-status-unknown-p. + * progmodes/cc-awk.el: Move regexps for analysing AWK code to near the + start of the file. ^L now separate sections of the file. + (c-awk-non-eol-esc-pair-re, c-awk-blank-or-comment-line-re) + (c-awk-one-line-possibly-open-string-re) + (c-awk-regexp-one-line-possibly-open-char-class-re) + (c-awk-one-line-possibly-open-regexp-re) + (c-awk-one-line-non-syn-ws*-re): New defonsts. + (c-awk-at-vsemi-p, c-awk-vsemi-status-unknown-p): New functions. Amend the concept of "virtual semicolons" (in the indentation engine) for languages like AWK, such that they are now @@ -6861,12 +6845,12 @@ the end of the line. (In AWK Mode, however, the pertinent text property is still physically set on the EOL.) Remove the specific tests for awk-mode, thus facilitating the introduction of other - language modes where EOLs can end statements. (Note: The - funtionality in cc-cmds.el, specifically + language modes where EOLs can end statements. + (Note: The funtionality in cc-cmds.el, specifically c-beginning/end-of-statement has yet to be amended.) - * progmodes/cc-defs.el: New macros c-at-vsemi-p, - c-vsemi-status-unknown-p. + * progmodes/cc-defs.el (c-at-vsemi-p, c-vsemi-status-unknown-p): + New macros. * progmodes/cc-langs.el: Added `#' into AWK Mode's value of c-stmt-delim-chars. New c-lang-defvars: c-at-vsemi-p-fn, @@ -6876,25 +6860,21 @@ c-crosses-statement-barrier-p, c-guess-basic-syntax, replace numerous awkward forms like (if (c-major-mode-is 'awk-mode) (c-awk-prev-line-incomplete-p)) - with - (c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new - variable before-ws-ip, the place just after char-before-ip - appears. + with (c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new + variable before-ws-ip, the place just after char-before-ip appears. * progmodes/cc-mode.el: Fix what's almost a semantic ambiguity in a comment. 2005-12-08 Martin Stjernholm - * progmodes/cc-cmds.el (c-electric-brace): Cleaned up using + * progmodes/cc-cmds.el (c-electric-brace): Clean up using `c-tentative-buffer-changes'. - * progmodes/cc-defs.el (c-region-is-active-p): Simplified and - converted to macro to choose between Emacs and XEmacs at compile - time. + * progmodes/cc-defs.el (c-region-is-active-p): Simplify and + convert to macro to choose between Emacs and XEmacs at compile time. - (c-set-region-active): New set counterpart to - `c-region-is-active-p'. + (c-set-region-active): New set counterpart to `c-region-is-active-p'. (c-tentative-buffer-changes): New macro to handle temporary buffer changes in a convenient way. @@ -6902,7 +6882,7 @@ (c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers for `c-tentative-buffer-changes'. - * progmodes/cc-engine.el (c-looking-at-inexpr-block): Tightened up + * progmodes/cc-engine.el (c-looking-at-inexpr-block): Tighten up the checks for paren sexps between the point and the keyword, to avoid some false alarms. @@ -6911,23 +6891,22 @@ parens. Changed to make use of c-keyword-member' to avoid some repeated regexp matches. - (c-opt-lambda-key, c-opt-inexpr-block-key, - c-opt-inexpr-class-key): These language variable are no longer - necessary. + (c-opt-lambda-key, c-opt-inexpr-block-key, c-opt-inexpr-class-key): + These language variable are no longer necessary. (c-block-stmt-kwds): New language constant used by c-looking-at-inexpr-block'. - (c-guess-basic-syntax): Removed an optional check that looked at + (c-guess-basic-syntax): Remove an optional check that looked at the existence of the now removed language variables. - * progmodes/cc-engine.el (c-fdoc-shift-type-backward, - c-forward-decl-or-cast-1): Fixed invalid recognition of C++ style + * progmodes/cc-engine.el (c-fdoc-shift-type-backward) + (c-forward-decl-or-cast-1): Fix invalid recognition of C++ style object instantiation expressions as declarations in some contexts. This bug only affected languages where the declarator can't be enclosed in parentheses. - * progmodes/cc-styles.el (c-style-alist): Fixed the GNU style to + * progmodes/cc-styles.el (c-style-alist): Fix the GNU style to insert newlines before and after substatement braces. * progmodes/cc-engine.el: Improved the heuristics for recognizing @@ -6937,15 +6916,14 @@ (c-just-after-func-arglist-p): Rewritten to use `c-forward-decl-or-cast-1'. Now behaves a bit differently too. - (c-beginning-of-member-init-list): Removed since it isn't used - anymore. + (c-beginning-of-member-init-list): Remove since it isn't used anymore. - (c-guess-basic-syntax): Case 5B adapted for the new - `c-just-after-func-arglist-p'. Cases 5B.1 and 5B.3 merged. Cases - 5D.1 and 5D.2 removed since they aren't trigged anymore (case 5B.1 + (c-guess-basic-syntax): Adapt case 5B for the new + `c-just-after-func-arglist-p'. Merge cases 5B.1 and 5B.3. + Remove cases 5D.1 and 5D.2 since they aren't trigged anymore (case 5B.1 covers all cases now). - * progmodes/cc-defs.el (c-point): Added `bosws' and `eosws'. + * progmodes/cc-defs.el (c-point): Add `bosws' and `eosws'. 2005-12-08 Alan Mackenzie @@ -6968,15 +6946,15 @@ (c-search-uplist-for-classkey): The old one. It's now a wrapper for compatibility. - (c-add-class-syntax, c-guess-continued-construct, - c-guess-basic-syntax): Adapted for `c-looking-at-decl-block'. + (c-add-class-syntax, c-guess-continued-construct) + (c-guess-basic-syntax): Adapt for `c-looking-at-decl-block'. - (c-decl-block-key): Changed to tell apart ambiguous and + (c-decl-block-key): Change to tell apart ambiguous and unambiguous keywords. Pike specials are now handled directly in the code instead. - (c-block-prefix-disallowed-chars, c-block-prefix-charset): New - language constants and variables to make the backward skip in + (c-block-prefix-disallowed-chars, c-block-prefix-charset): + New language constants and variables to make the backward skip in `c-looking-at-decl-block' as tight as possible. (c-nonsymbol-token-char-list): New language constant. @@ -6987,7 +6965,7 @@ * progmodes/cc-defs.el (c-make-bare-char-alt): New helper for making char classes for `c-syntactic-skip-backward'. - * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified case + * progmodes/cc-engine.el (c-guess-basic-syntax): Simplify case 16D - can't be a class-close at that point. * progmodes/cc-engine.el (c-guess-basic-syntax) @@ -6998,17 +6976,16 @@ `c-guess-basic-syntax' never will look at things outside the current narrowment now. The anchor position for `topmost-intro' is affected by this, but it was so bogus it was basically useless - before, and now it's equally bogus but in a slightly different - way. + before, and now it's equally bogus but in a slightly different way. (c-narrow-out-enclosing-class): Gone. (c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to the narrowed region. - (c-least-enclosing-brace): Removed silly optional argument. + (c-least-enclosing-brace): Remove silly optional argument. - * progmodes/cc-engine.el (c-beginning-of-decl-1): Fixed bug where + * progmodes/cc-engine.el (c-beginning-of-decl-1): Fix bug where the point could be left directly after an open paren when finding the beginning of the first decl in the block. @@ -7033,13 +7010,11 @@ (c-identifier-start, c-identifier-key): Now completely calculated from other constants. - (c-identifier-last-sym-match): Decommissioned since it's no longer - used. + (c-identifier-last-sym-match): Decommission since it's no longer used. - (c-operators): Use `c-identifier-ops'. Documented - `postfix-if-paren'. + (c-operators): Use `c-identifier-ops'. Document `postfix-if-paren'. - * progmodes/cc-engine.el (c-forward-name): Removed the + * progmodes/cc-engine.el (c-forward-name): Remove the optimization when c-identifier-key is equal to c-symbol-key since it doesn't work in byte compiled files. Don't record empty regions as identifiers. @@ -7055,13 +7030,13 @@ * progmodes/cc-defs.el (c-lang-const): Fixes to allow use without an explicit language in functions. - * progmodes/cc-defs.el (c-make-keywords-re): Added an appendable + * progmodes/cc-defs.el (c-make-keywords-re): Add an appendable variant of adornment. - * progmodes/cc-langs.el (c-any-class-key): Removed unused language + * progmodes/cc-langs.el (c-any-class-key): Remove unused language variable. - (c-type-decl-prefix-key): Removed some now unnecessary cruft from + (c-type-decl-prefix-key): Remove some now unnecessary cruft from the Pike value. * progmodes/cc-engine.el (c-on-identifier) @@ -7069,7 +7044,7 @@ correctly in `skip-chars-backward'. Affected the operator lfun syntax in Pike. - * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disabled the + * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disable the diagnostic message about precompiled language vars not being used. * progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword @@ -7079,9 +7054,9 @@ (c-specifier-key, c-not-decl-init-keywords): Some cleanup using new language constants `c-type-start-kwds' and `c-prefix-spec-kwds'. - * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: Internal - cleanups to properly detect the declared identifiers in various - declarations. + * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: + Internal cleanups to properly detect the declared identifiers in + various declarations. (c-decl-start-kwds): New language constant to recognize declarations that can start anywhere. Used for class declarations @@ -7092,7 +7067,7 @@ (c-find-decl-spots): Implement `c-decl-start-kwds'. (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds) - (c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the + (c-decl-hangon-key, c-forward-decl-or-cast-1): Separate the handling of the compiler specific extension keywords into a new language constant `c-decl-hangon-kwds' that defines keyword clauses to be ignored in declarations. @@ -7108,9 +7083,8 @@ (c-forward-decl-or-cast-1): Recognize the declared identifier in class and enum declarations as such and not as part of the type. - (c-forward-decl-or-cast-1, c-forward-label): Relaxed the - interpretation of PRECEDING-TOKEN-END when there's no preceding - token. + (c-forward-decl-or-cast-1, c-forward-label): Relax the + interpretation of PRECEDING-TOKEN-END when there's no preceding token. (c-forward-decl-or-cast-1): Don't disregard sure signs of declarations when there's some syntax error later on. @@ -7123,7 +7097,7 @@ * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el * cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el - * cc-cmds.el, cc-defs.el: Changed the policy for marking up + * cc-cmds.el, cc-defs.el: Change the policy for marking up functions that might do hidden buffer changes: All such internal functions are now marked instead of those that don't. @@ -7138,10 +7112,10 @@ (c-electric-semi&comma, c-electric-colon, c-electric-lt-gt) (c-electric-paren, c-electric-continued-statement, c-indent-command) (c-indent-region, c-mask-paragraph, c-indent-new-comment-line) - (c-context-line-break): Added `c-save-buffer-state' calls to comply + (c-context-line-break): Add `c-save-buffer-state' calls to comply with the changed semantics of the functions above. - * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a bug + * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a bug when macros occur in obscure places. Optimized the sexp movement a bit. @@ -7173,13 +7147,13 @@ * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el: Cleaned up the label handling. Labels are now recognized in a uniform and more robust way, regardless of context. Text properties are put on all - labels to recognize the following declarations better. Multiword - labels are handled both in indentation and fontification for the - benefit of language extensions like Qt. For consistency, keywords - in labels are now fontified with the label face instead. That - also applies to "case" and "default". + labels to recognize the following declarations better. + Multiword labels are handled both in indentation and fontification for + the benefit of language extensions like Qt. For consistency, keywords + in labels are now fontified with the label face instead. + That also applies to "case" and "default". - (c-beginning-of-statement-1): Fixed some bugs in the label + (c-beginning-of-statement-1): Fix some bugs in the label handling. Disregard `c-nonlabel-token-key' in labels that begin with `c-label-kwds'. @@ -7191,70 +7165,68 @@ (c-forward-label): New function to recognize labels. - (c-guess-basic-syntax): Replaced uses of `c-label-key' with + (c-guess-basic-syntax): Replace uses of `c-label-key' with `c-forward-label'. Moved the label recognition cases (14 and 15) earlier since they aren't so context sensitive now. Handle labels on the top level gracefully. Moved access label recognition to the generic label case (CASE 15) - removed CASE 5E. - (c-font-lock-declarations): Added recognition of labels in the + (c-font-lock-declarations): Add recognition of labels in the same round since we need to handle labels in parallell with other declarations to recognize both accurately. It should also improve speed. - (c-simple-decl-matchers, c-basic-matchers-after): Moved - `c-font-lock-labels' so that it only is used on decoration level 2 + (c-simple-decl-matchers, c-basic-matchers-after): + Move `c-font-lock-labels' so that it only is used on decoration level 2 since `c-font-lock-declarations' handles it otherwise. - (c-complex-decl-matchers): Removed the simplistic recognition of + (c-complex-decl-matchers): Remove the simplistic recognition of access labels. - (c-decl-prefix-re): Removed the kludges that was necessary to cope + (c-decl-prefix-re): Remove the kludges that was necessary to cope with labels earlier. (c-decl-start-re): New language variable to make `c-font-lock-declarations' stop for the special protection labels in Objective-C that start with `@'. - (c-label-key): Removed since it's no longer used. + (c-label-key): Remove since it's no longer used. (c-recognize-colon-labels, c-label-prefix-re): New language - constants to support recognition of generic colon-terminated - labels. + constants to support recognition of generic colon-terminated labels. (c-type-decl-end-used): `c-decl-end' is now used whenever there are colon terminated labels. - * progmodes/cc-align.el (c-lineup-arglist): Fixed bug when the + * progmodes/cc-align.el (c-lineup-arglist): Fix bug when the first argument starts with a special brace list. * progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1) - (c-font-lock-declarations): Broke out the declaration and cast + (c-font-lock-declarations): Break out the declaration and cast recognition from `c-font-lock-declarations' to a new function, so that it can be used in the indentation engine. - * progmodes/cc-engine.el (c-find-decl-spots): Fixed bug in backing + * progmodes/cc-engine.el (c-find-decl-spots): Fix bug in backing up to the start of the literal. Fixed bug with the point on the wrong side of the search limit that could happen when the start position is inside a literal. * progmodes/cc-engine.el (c-parse-state) - (c-invalidate-state-cache): Modified the use of `c-state-cache-end' + (c-invalidate-state-cache): Modify the use of `c-state-cache-end' so that it's kept a little bit back to increase the hit rate. - (c-parse-state): Changed the macro handling and fixed some + (c-parse-state): Change the macro handling and fixed some glitches. Macro context is checked more often than necessary now, but otoh less garbage conses are generated. * progmodes/cc-engine.el (c-parse-state) (c-invalidate-state-cache): Cache the last position where `c-state-cache' applies. This can speed up refontification quite - a bit in blocks where there are many non-brace parens before the - point. + a bit in blocks where there are many non-brace parens before the point. (c-state-cache-end): New variable for this. - (c-guess-basic-syntax, c-debug-parse-state): Adapted for the new + (c-guess-basic-syntax, c-debug-parse-state): Adapt for the new cache variable. * progmodes/cc-engine.el (c-find-decl-spots): Take more care to @@ -7265,39 +7237,39 @@ region is a single line inside a literal or macro (typically when the current line is refontified). - * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified calls + * progmodes/cc-engine.el (c-guess-basic-syntax): Simplify calls to `c-add-stmt-syntax' - there's no need to explicitly whack off entries from the paren state. - * progmodes/cc-engine.el (c-add-stmt-syntax): Narrowed down the + * progmodes/cc-engine.el (c-add-stmt-syntax): Narrow down the special case for "else if" clauses. * progmodes/cc-engine.el (c-looking-at-inexpr-block) (c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'. - * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): New - language variable to recognize the gcc extension with statement + * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): + New language variable to recognize the gcc extension with statement blocks inside expressions. - * progmodes/cc-engine.el (c-add-stmt-syntax): Restructured to make + * progmodes/cc-engine.el (c-add-stmt-syntax): Restructure to make it somewhat more comprehensible. The argument AT-BLOCK-START is no longer used and hence removed. - (c-guess-continued-construct, c-guess-basic-syntax): Updated calls + (c-guess-continued-construct, c-guess-basic-syntax): Update calls to `c-add-stmt-syntax'. - * progmodes/cc-engine.el (c-backward-to-decl-anchor): Use - `c-beginning-of-statement-1' instead of duplicating parts of it. + * progmodes/cc-engine.el (c-backward-to-decl-anchor): + Use `c-beginning-of-statement-1' instead of duplicating parts of it. This fixes bogus label recognition. * progmodes/cc-engine.el (c-add-type, c-check-type) - (c-forward-name, c-forward-type): Improved storage of template + (c-forward-name, c-forward-type): Improve storage of template types in `c-found-types' so that they can be recognized better. - (c-syntactic-content): Added option to skip past nested parens. + (c-syntactic-content): Add option to skip past nested parens. - * progmodes/cc-engine.el (c-forward-name): Set - `c-last-identifier-range' all the time. It's less work that way. + * progmodes/cc-engine.el (c-forward-name): + Set `c-last-identifier-range' all the time. It's less work that way. Handle that there might not be an identifier to store in `c-last-identifier-range'. @@ -7305,7 +7277,7 @@ nil from `c-forward-name'. * progmodes/cc-defs.el (c-safe-scan-lists) - (c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments. + (c-(go-)?(up|down)-list-(forward|backward)): Add limit arguments. * progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect' to work even if the form fails. @@ -7313,14 +7285,13 @@ * progmodes/cc-engine.el (c-parse-state): Speedup when moving far down in a large file in one go. - (c-get-fallback-start-pos): New helper function for - `c-parse-state'. + (c-get-fallback-start-pos): New helper function for `c-parse-state'. * progmodes/cc-align.el (c-lineup-assignments): New lineup function which is like `c-lineup-math' but returns nil instead of `c-basic-offset' when it doesn't match. - (c-lineup-math): Changed to use `c-lineup-assignments'. + (c-lineup-math): Change to use `c-lineup-assignments'. 2005-12-08 Alan Mackenzie @@ -7335,7 +7306,7 @@ places to use skip by syntax instead of skip by char class. * progmodes/cc-langs.el (c-unterminated-block-comment-regexp): - Fixed a bug in the regexp that caused extreme backtracking. + Fix a bug in the regexp that caused extreme backtracking. * progmodes/cc-langs.el (c-block-comment-starter) (c-block-comment-ender): New language constants to specify in a @@ -7354,18 +7325,16 @@ (c-simple-ws): New language constant for simple whitespace. - * progmodes/cc-defs.el (c-concat-separated): New convenience - function. + * progmodes/cc-defs.el (c-concat-separated): New convenience function. - * progmodes/cc-defs.el (c-make-keywords-re): Added kludge for bug + * progmodes/cc-defs.el (c-make-keywords-re): Add kludge for bug in `regexp-opt' in Emacs 20 and XEmacs when strings contain newlines. Allow and ignore nil elements in the list. 2005-12-08 Alan Mackenzie * progmodes/cc-cmds.el: Comment out a (n almost certainly - superfluous) check, (eq here (point-max)) in - c-beginning-of-statement. + superfluous) check, (eq here (point-max)) in c-beginning-of-statement. * progmodes/cc-cmds.el: Tidy up the comments in c-beginning-of-statement and subfunctions. @@ -7374,8 +7343,7 @@ more flexible c-put-char-property and c-clear-char-properties. Add the author's email address. - * progmodes/cc-langs.el: New variable, - c-block-comment-start-regexp. + * progmodes/cc-langs.el (c-block-comment-start-regexp): New variable. * progmodes/cc-cmds.el: Fix bug with M-e, when point is inside the closing "*/" of a block comment. @@ -7399,11 +7367,11 @@ * progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix when there are several strings on the same line. - * progmodes/cc-engine.el (c-literal-limits): Removed the + * progmodes/cc-engine.el (c-literal-limits): Remove the compatibility function for older emacsen. `c-literal-limits-fast' has now taken the place of this function. - * progmodes/cc-vars.el (c-emacs-features): Removed compatibility + * progmodes/cc-vars.el (c-emacs-features): Remove compatibility with older emacsen: We now require `pps-extended-state'. 2005-12-08 Alan Mackenzie @@ -7419,19 +7387,18 @@ eachother. Correct a few incidental bugs. * progmodes/cc-cmds.el: Restructure c-beginning-of-statement: - Improve its doc-string. Improve the handling of certain specific - cases. + Improve its doc-string. Improve the handling of certain specific cases. 2005-12-08 Martin Stjernholm * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el - (c-guess-basic-syntax): Changed the way class-level labels are + (c-guess-basic-syntax): Change the way class-level labels are recognized; they can now contain essentially any symbols. (c-opt-extra-label-key): New language variable to cope with the special protection label syntax in Objective-C. - (c-opt-access-key): Removed; this is now handled better by + (c-opt-access-key): Remove; this is now handled better by `c-nonlabel-token-key' and `c-opt-extra-label-key'. (c-complex-decl-matchers): Update to handle that @@ -7444,11 +7411,11 @@ Recognize bitfields better. * progmodes/cc-engine.el (c-beginning-of-inheritance-list): - Removed some cruft and fixed a bug that could cause it to go to a + Remove some cruft and fixed a bug that could cause it to go to a position further down. * progmodes/cc-langs.el, cc-engine.el - (c-beginning-of-statement-1): Improved detection of labels in + (c-beginning-of-statement-1): Improve detection of labels in declaration contexts. (c-beginning-of-decl-1): Use it. @@ -7456,11 +7423,11 @@ (c-nonlabel-token-key): New language constant and variable needed by `c-beginning-of-statement-1'. - * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug that + * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug that manifested itself due to the correction in `c-forward-sexp'. - * progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp): Made - these behave as documented when used at the buffer limits. + * progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp): + Make these behave as documented when used at the buffer limits. * progmodes/cc-mode.el, cc-engine.el, cc-langs.el (c-type-decl-end-used): Made this a language variable. @@ -7469,20 +7436,20 @@ correctly when `combine-after-change-calls' is used together with temporary narrowings. - * progmodes/cc-engine.el (c-beginning-of-statement-1): Report - labels correctly when the start point is immediately after the + * progmodes/cc-engine.el (c-beginning-of-statement-1): + Report labels correctly when the start point is immediately after the colon. - * progmodes/cc-defs.el (c-parse-sexp-lookup-properties): Removed - since it isn't used anymore. + * progmodes/cc-defs.el (c-parse-sexp-lookup-properties): + Remove since it isn't used anymore. * progmodes/cc-cmds.el (c-electric-lt-gt): Detect and mark angle bracket arglists such as template parens in C++. - * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed a bug + * progmodes/cc-engine.el (c-syntactic-skip-backward): Fix a bug in the last check-in. Some optimization. - * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed bug + * progmodes/cc-engine.el (c-syntactic-skip-backward): Fix bug where it could stop at the same level in a preceding sexp when PAREN-LEVEL is set. @@ -7490,7 +7457,7 @@ text property lookup only when it's needed. * progmodes/cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el: - Changed the policy for paren marked angle brackets to be more + Change the policy for paren marked angle brackets to be more persistent; once marked they remain marked even when they're found to be unbalanced in the searched region. This should keep the paren syntax around even when individual lines are refontified in @@ -7504,7 +7471,7 @@ (c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse argument has become `c-parse-and-markup-<>-arglists'. - (c-remove-<>-arglist-properties): Removed - no longer used. + (c-remove-<>-arglist-properties): Remove - no longer used. (c-after-change-check-<>-operators): New function used on `after-change-functions' to avoid that "<" and ">" characters that @@ -7516,28 +7483,26 @@ (c-after-change): Call `c-after-change-check-<>-operators'. (c-font-lock-<>-arglists): Use the context properties set by - `c-font-lock-declarations' to set - `c-disallow-comma-in-<>-arglists' correctly to avoid doing invalid - markup. + `c-font-lock-declarations' to set `c-disallow-comma-in-<>-arglists' + correctly to avoid doing invalid markup. - (c-font-lock-declarations): Removed code that undoes the invalid + (c-font-lock-declarations): Remove code that undoes the invalid markup done by `c-font-lock-<>-arglists'. (c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs after `c-font-lock-declarations'. - * progmodes/cc-engine.el (c-syntactic-skip-backward): Added - paren-level feature. + * progmodes/cc-engine.el (c-syntactic-skip-backward): + Add paren-level feature. - (c-guess-basic-syntax): Improved the anchor position for + (c-guess-basic-syntax): Improve the anchor position for `template-args-cont' in nested template arglists. There's still much to be desired in this area, though. 2005-12-08 Alan Mackenzie * progmodes/cc-cmds.el, cc-engine.el, cc-langs.el, cc-vars.el: - Make the "Text Filling and Line Breaking" commands work for AWK - buffers. + Make the "Text Filling and Line Breaking" commands work for AWK buffers. 2005-12-08 Martin Stjernholm @@ -7576,7 +7541,7 @@ 2005-12-08 Kim F. Storm - * emulation/cua-base.el (cua-use-hyper-key): Replaced by ... + * emulation/cua-base.el (cua-use-hyper-key): Replace by ... (cua-rectangle-modifier-key): ... this. New defcustom. Can now select either meta, hyper, or super modifier for rectangle commands. (cua--rectangle-modifier-key): New defvar. @@ -7585,8 +7550,8 @@ on X, to meta otherwise. Always bind C-return to toggle rectangle. Pass ?\s instead of `space' to cua--M/H-key. - * emulation/cua-rect.el (cua-help-for-rectangle): Use - cua--rectangle-modifier-key. Handle super modifier too. + * emulation/cua-rect.el (cua-help-for-rectangle): + Use cua--rectangle-modifier-key. Handle super modifier too. (cua--init-rectangles): Always bind C-return to toggle rectangle. Pass ?\s instead of `space' to cua--M/H-key and cua--rect-M/H-key. @@ -7597,8 +7562,8 @@ keymap if cua--prefix-override-timer is `shift'. (cua--shift-control-prefix): New function; emulate "type prefix key twice" functionality to handle shifted prefix key override. - (cua--shift-control-c-prefix, cua--shift-control-x-prefix): New - commands. + (cua--shift-control-c-prefix, cua--shift-control-x-prefix): + New commands. (cua--init-keymaps): Bind them to S-C-c and S-C-x. 2005-12-08 Carsten Dominik @@ -8324,7 +8289,7 @@ 2005-11-24 Carsten Dominik - * textmodes/org.el (org-export-plain-list-max-depth): Renamed from + * textmodes/org.el (org-export-plain-list-max-depth): Rename from `org-export-local-list-max-depth'. Change default value to 3. (org-auto-renumber-ordered-lists) (org-plain-list-ordered-item-terminator): New options. @@ -17171,7 +17136,7 @@ * add-log.el (change-log-font-lock-keywords): Make the regexp for date lines stricter. -2005-06-10 Zhang Wei (tiny change) +2005-06-10 Zhang Wei * term/x-win.el (x-clipboard-yank): Use x-selection-value instead of x-get-selection. From 49561a365bf90ba51636ff5b2f888294f83d1a92 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Wed, 24 May 2006 16:48:15 +0000 Subject: [PATCH 021/403] Update refcard translations. Add coding cookie. --- admin/ChangeLog | 6 +++++- admin/FOR-RELEASE | 21 +++++++++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index c43f0697136..9d3273f91ea 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2006-05-24 Reiner Steib + + * FOR-RELEASE: Update refcard translations. Add coding cookie. + 2006-05-21 Chong Yidong * FOR-RELEASE: point-entered /point-left bug fixed. @@ -15,7 +19,7 @@ 2006-04-17 Ramprasad B * ./* (Copyright): Updated Copyright year(s) - + 2006-02-24 Reiner Steib * FOR-RELEASE (BUGS): Add URLs/MIDs. diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index a02eb6821f1..7371dd37a76 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -21,6 +21,22 @@ face name prefixes should be in it for good results. ** Ask maintainers of refcard translations to update them. +Requests to have been sent out on 2006-05-23 (Reiner Steib). + +LANG Translator Status +cs Pavel Janík +de ? (*) +fr Eric Jacoboni +pl WÅ‚odek Bzyl +pt-br Rodrigo Real Done +ru Alex Ott Working +sk Miroslav VaÅ¡ko + +(*) If the assignment of Sven Joachim arrives in time, we can install his +update for de-refcard.tex. + +If there's no update for a translation on 2006-06-07, notify RMS. + ** Send an email to the various distributions, including the GNOME and KDE projects, to use the new Emacs icons in etc/images/icons. @@ -141,7 +157,7 @@ SECTION READERS etc/TUTORIAL rms etc/TUTORIAL.bg Ognyan Kulev etc/TUTORIAL.cn -etc/TUTORIAL.cs Pavel Janík +etc/TUTORIAL.cs Pavel Janík etc/TUTORIAL.de Werner LEMBERG etc/TUTORIAL.es Marcelo Toledo etc/TUTORIAL.fr ttn @@ -153,7 +169,7 @@ etc/TUTORIAL.pl Slawomir Nowaczyk etc/TUTORIAL.pt_BR Marcelo Toledo etc/TUTORIAL.ro etc/TUTORIAL.ru Alex Ott -etc/TUTORIAL.sk Pavel Janík +etc/TUTORIAL.sk Pavel Janík etc/TUTORIAL.sl Primoz PETERLIN etc/TUTORIAL.sv Mats Lidell etc/TUTORIAL.th Virach Sornlertlamvanich @@ -162,4 +178,5 @@ etc/TUTORIAL.zh Local variables: mode: outline +coding: utf-8 end: From 274925dfaed4e039ee62f2461b24710cd76d62e6 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Wed, 24 May 2006 16:50:45 +0000 Subject: [PATCH 022/403] ("jka-cmpr-hook"): Load it before it is needed. --- lisp/loadup.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/loadup.el b/lisp/loadup.el index 4f71af7a488..7d4e25dcbf3 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -81,6 +81,7 @@ (load "help") +(load "jka-cmpr-hook") ;; Any Emacs Lisp source file (*.el) loaded here after can contain ;; multilingual text. (load "international/mule-cmds") @@ -209,7 +210,6 @@ (message "%s" (garbage-collect)) (load "vc-hooks") -(load "jka-cmpr-hook") (load "ediff-hook") (if (fboundp 'x-show-tip) (load "tooltip")) From 944f2d7f33df43409f62a08a060567422d5a7c66 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Wed, 24 May 2006 16:53:18 +0000 Subject: [PATCH 023/403] (BASE_PURESIZE): Increase to 1210000. --- src/puresize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/puresize.h b/src/puresize.h index 1288feff151..67e758ae799 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -43,7 +43,7 @@ Boston, MA 02110-1301, USA. */ #endif #ifndef BASE_PURESIZE -#define BASE_PURESIZE (1205000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) +#define BASE_PURESIZE (1210000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) #endif /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ From d2edd3060e01c303945ec0b0f7c432bef3a0e078 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Wed, 24 May 2006 16:58:21 +0000 Subject: [PATCH 024/403] Added new parameter to `tumme-display-thumbs' to be used from `tumme-next-line-and-display' and similar commands. --- lisp/tumme.el | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index 8f6e43e9cd6..7f407369095 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -547,7 +547,7 @@ before warning the user." :group 'tumme) (defun tumme-dir () - "Return the current thumbnails directory (from `tumme-dir'). + "Return the current thumbnails directory (from variable `tumme-dir'). Create the thumbnails directory if it does not exist." (let ((tumme-dir (file-name-as-directory (expand-file-name tumme-dir)))) @@ -701,7 +701,7 @@ Otherwise, delete overlays." (interactive) (dired-next-line 1) (tumme-display-thumbs - t (or tumme-append-when-browsing nil)) + t (or tumme-append-when-browsing nil) t) (if tumme-dired-disp-props (tumme-dired-display-properties))) @@ -710,7 +710,7 @@ Otherwise, delete overlays." (interactive) (dired-previous-line 1) (tumme-display-thumbs - t (or tumme-append-when-browsing nil)) + t (or tumme-append-when-browsing nil) t) (if tumme-dired-disp-props (tumme-dired-display-properties))) @@ -729,7 +729,7 @@ Otherwise, delete overlays." (interactive) (dired-mark 1) (tumme-display-thumbs - t (or tumme-append-when-browsing nil)) + t (or tumme-append-when-browsing nil) t) (if tumme-dired-disp-props (tumme-dired-display-properties))) @@ -818,7 +818,7 @@ Restore any changes to the window configuration made by calling (message "No saved window configuration"))) ;;;###autoload -(defun tumme-display-thumbs (&optional arg append) +(defun tumme-display-thumbs (&optional arg append do-not-pop) "Display thumbnails of all marked files, in `tumme-thumbnail-buffer'. If a thumbnail image does not exist for a file, it is created on the fly. With prefix argument ARG, display only thumbnail for file at @@ -830,7 +830,14 @@ you have the dired buffer in the left window and the `tumme-thumbnail-buffer' buffer in the right window. With optional argument APPEND, append thumbnail to thumbnail buffer -instead of erasing it first." +instead of erasing it first. + +Option argument DO-NOT-POP controls if `pop-to-buffer' should be +used or not. If non-nil, use `display-buffer' instead of +`pop-to-buffer'. This is used from functions like +`tumme-next-line-and-display' and +`tumme-previous-line-and-display' where we do not want the +thumbnail buffer to be selected." (interactive "P") (let ((buf (tumme-create-thumbnail-buffer)) curr-file thumb-name files count dired-buf beg) @@ -862,7 +869,9 @@ instead of erasing it first." nil) (t (tumme-line-up-dynamic)))) - (pop-to-buffer tumme-thumbnail-buffer))) + (if do-not-pop + (display-buffer tumme-thumbnail-buffer) + (pop-to-buffer tumme-thumbnail-buffer)))) (defun tumme-show-all-from-dir (dir) "Make a preview buffer for all images in DIR and display it. @@ -1658,13 +1667,13 @@ Ask user for number of images to show and the delay in between." (defun tumme-display-thumbs-append () "Append thumbnails to `tumme-thumbnail-buffer'." (interactive) - (tumme-display-thumbs nil t)) + (tumme-display-thumbs nil t t)) ;;;###autoload (defun tumme-display-thumb () "Shorthard for `tumme-display-thumbs' with prefix argument." (interactive) - (tumme-display-thumbs t)) + (tumme-display-thumbs t nil t)) (defun tumme-line-up () "Line up thumbnails according to `tumme-thumbs-per-row'. From 24b0232fdd3a6566e20b614933c069b9c0459d39 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Wed, 24 May 2006 17:04:49 +0000 Subject: [PATCH 025/403] *** empty log message *** --- lisp/ChangeLog | 4 ++++ src/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3fbf773fa7f..d50c357d645 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-05-24 Luc Teirlinck + + * loadup.el ("jka-cmpr-hook"): Load it before it is needed. + 2006-05-24 Chong Yidong * menu-bar.el, international/mule-cmds.el: Remove tooltips for diff --git a/src/ChangeLog b/src/ChangeLog index 96d59a6ca90..affda7614da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-24 Luc Teirlinck + + * puresize.h (BASE_PURESIZE): Increase to 1210000. + 2006-05-24 Alan Mackenzie * lread.c (Vload_history): Enhance doc-string to say that the file From 9f552fb98eba6cf0763ad90a25bb7ddfe431d412 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Wed, 24 May 2006 17:29:18 +0000 Subject: [PATCH 026/403] Removed most of the information in the USAGE section. The manual does a better job. --- lisp/tumme.el | 43 +++++-------------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index 7f407369095..9d9ad87a0aa 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -84,46 +84,13 @@ ;; USAGE ;; ===== ;; -;; If you plan to use tumme much, setting up key bindings for it in -;; dired is a good idea: +;; This information has been moved to the manual. Type `C-h r' to open +;; the Emacs manual and go to the node Thumbnails by typing `g +;; Thumbnails RET'. ;; -;; (tumme-setup-dired-keybindings) -;; -;; Next, do M-x tumme-dired RET. This will ask you for a directory -;; where image files are stored, setup a useful window configuration -;; and enable the two special modes that tumme provides. NOTE: If you -;; do not want tumme to split your windows, call it with a prefix -;; argument. -;; -;; Start viewing thumbnails by doing C-S-n and C-S-p to go up and down -;; in the dired buffer while at the same time displaying a thumbnail -;; image. The thumbnail images will be created on the fly, and -;; cached. This means that the first time you browse your images, it -;; will be a bit slow because the thumbnails are created. If you want -;; to avoid this, you can pre-create the thumbnail images by marking -;; all images in dired (% m \.jpg$ RET) and then do M-x -;; tumme-create-thumbs. -;; -;; Next, try `tumme-display-thumbs' (C-t d). If no file is marked, a -;; thumbnail for the file at point will show up in -;; `tumme-thumbnail-buffer'. If one or more files are marked, -;; thumbnails for those files will be displayed. -;; -;; Pressing TAB will switch to the window containing the -;; `tumme-thumbnail-buffer' buffer. In there you can move between -;; thumbnail images and display a semi-sized version in an Emacs -;; buffer (RET), or the original image in an external viewer -;; (C-RET). By pressing SPC or DEL you will navigate back and fort -;; while at the same time displaying each image in Emacs. You can also -;; navigate using arrow keys. Comment a file by pressing "c". Press -;; TAB to get back to dired. -;; -;; While in dired mode, you can tag and comment files, you can tell -;; `tumme' to mark files with a certain tag (using a regexp) etc. -;; -;; The easiest way to see the available commands is to use the Tumme -;; menus added in tumme-thumbnail-mode and dired-mode. +;; Quickstart: M-x tumme RET DIRNAME RET ;; +;; where DIRNAME is a directory containing image files. ;; ;; LIMITATIONS ;; =========== From 898b4b9a67a6477d2f754c965bed5f57f57c686c Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Wed, 24 May 2006 18:31:36 +0000 Subject: [PATCH 027/403] Renamed `tumme-display-dired-image' to `tumme-dired-display-image'. --- lisp/tumme.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index 9d9ad87a0aa..771ffb783d9 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -1493,7 +1493,7 @@ Note that n, p and and will be hijacked and bound to (define-key dired-mode-map "\C-tt" 'tumme-tag-files) (define-key dired-mode-map "\C-tr" 'tumme-tag-remove) (define-key dired-mode-map [tab] 'tumme-jump-thumbnail-buffer) - (define-key dired-mode-map "\C-ti" 'tumme-display-dired-image) + (define-key dired-mode-map "\C-ti" 'tumme-dired-display-image) (define-key dired-mode-map "\C-tx" 'tumme-dired-display-external) (define-key dired-mode-map "\C-ta" 'tumme-display-thumbs-append) (define-key dired-mode-map "\C-t." 'tumme-display-thumb) @@ -1537,8 +1537,8 @@ Note that n, p and and will be hijacked and bound to [menu-bar tumme tumme-dired-display-external] '("Display in external viewer" . tumme-dired-display-external)) (define-key dired-mode-map - [menu-bar tumme tumme-display-dired-image] - '("Display image" . tumme-display-dired-image)) + [menu-bar tumme tumme-dired-display-image] + '("Display image" . tumme-dired-display-image)) (define-key dired-mode-map [menu-bar tumme tumme-display-thumb] '("Display this thumbnail" . tumme-display-thumb)) @@ -1817,7 +1817,7 @@ With prefix argument ARG, display image in its original size." (display-buffer tumme-display-image-buffer)))))) ;;;###autoload -(defun tumme-display-dired-image (&optional arg) +(defun tumme-dired-display-image (&optional arg) "Display current image file. See documentation for `tumme-display-image' for more information. With prefix argument ARG, display image in its original size." From 1f3eb28e930551928b32623cf3fed313f45fbf22 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Wed, 24 May 2006 18:49:20 +0000 Subject: [PATCH 028/403] Added Thumbnails sub menu under Immediate and started to place `tumme' commands there. I could use some feedback on this change. --- lisp/dired.el | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/lisp/dired.el b/lisp/dired.el index ca50e3b5767..cdfc9a5c04c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1338,6 +1338,44 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate wdired-mode] '(menu-item "Edit File Names" wdired-change-to-wdired-mode)) + (define-key dired-mode-map [menu-bar immediate tumme] + (cons "Thumbnails" (make-sparse-keymap "tumme"))) + + (define-key dired-mode-map + [menu-bar immediate tumme tumme-display-thumbs] + '(menu-item "Display thumbails for marked files" + tumme-display-thumbs)) + + (define-key dired-mode-map + [menu-bar immediate tumme tumme-tag-files] + '(menu-item "Add tag to marked files" + tumme-tag-files)) + + (define-key dired-mode-map + [menu-bar immediate tumme tumme-tag-remove] + '(menu-item "Remove tag from marked files" + tumme-tag-remove)) + + (define-key dired-mode-map + [menu-bar immediate tumme tumme-dired-display-image] + '(menu-item "Display sized image" + tumme-dired-display-image)) + + (define-key dired-mode-map + [menu-bar immediate tumme tumme-dired-display-external] + '(menu-item "Display image in external viewer" + tumme-dired-display-external)) + + (define-key dired-mode-map + [menu-bar immediate tumme tumme-dired-comment-files] + '(menu-item "Add comment to marked files" + tumme-dired-comment-files)) + + (define-key dired-mode-map + [menu-bar immediate tumme tumme-mark-tagged-files] + '(menu-item "Find and mark files with a certain tag" + tumme-mark-tagged-files)) + (define-key map [menu-bar regexp] (cons "Regexp" (make-sparse-keymap "Regexp"))) From d5274d6763fe25b1807064b1a02a07eafd1d7a7e Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Wed, 24 May 2006 19:18:26 +0000 Subject: [PATCH 029/403] Movement tracking on by default. I have tested this for over a year now and it seems to be stable and fast enough for everyday use. --- lisp/tumme.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index 771ffb783d9..2e2afd75399 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -455,7 +455,7 @@ completely fit)." :type 'integer :group 'tumme) -(defcustom tumme-track-movement nil +(defcustom tumme-track-movement t "The current state of the tracking and mirroring. For more information, see the documentation for `tumme-toggle-movement-tracking'." From 938258027036ed4fd26d1a78230e0a3c1e7e9077 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 24 May 2006 21:41:41 +0000 Subject: [PATCH 030/403] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d50c357d645..950d3b9f887 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-05-25 Nick Roberts + + * dired.el (dired-mode-map): Fix breakage. + 2006-05-24 Luc Teirlinck * loadup.el ("jka-cmpr-hook"): Load it before it is needed. From 635abd82ec8ac44226311140ac6d8d7b9c051072 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 24 May 2006 21:42:14 +0000 Subject: [PATCH 031/403] (dired-mode-map): Fix breakage. --- lisp/dired.el | 70 +++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 38 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index cdfc9a5c04c..0ceb71abd55 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1312,6 +1312,38 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate dashes] '("--")) + (define-key map [menu-bar immediate tumme] + (cons "Thumbnails" (make-sparse-keymap "tumme"))) + + (define-key map + [menu-bar immediate tumme tumme-display-thumbs] + '(menu-item "Display thumbails for marked files" + tumme-display-thumbs)) + (define-key map + [menu-bar immediate tumme tumme-tag-files] + '(menu-item "Add tag to marked files" + tumme-tag-files)) + (define-key map + [menu-bar immediate tumme tumme-tag-remove] + '(menu-item "Remove tag from marked files" + tumme-tag-remove)) + (define-key map + [menu-bar immediate tumme tumme-dired-display-image] + '(menu-item "Display sized image" + tumme-dired-display-image)) + (define-key map + [menu-bar immediate tumme tumme-dired-display-external] + '(menu-item "Display image in external viewer" + tumme-dired-display-external)) + (define-key map + [menu-bar immediate tumme tumme-dired-comment-files] + '(menu-item "Add comment to marked files" + tumme-dired-comment-files)) + (define-key map + [menu-bar immediate tumme tumme-mark-tagged-files] + '(menu-item "Find and mark files with a certain tag" + tumme-mark-tagged-files)) + (define-key map [menu-bar immediate compare-directories] '(menu-item "Compare directories..." dired-compare-directories :help "Mark files with different attributes in two dired buffers")) @@ -1338,44 +1370,6 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate wdired-mode] '(menu-item "Edit File Names" wdired-change-to-wdired-mode)) - (define-key dired-mode-map [menu-bar immediate tumme] - (cons "Thumbnails" (make-sparse-keymap "tumme"))) - - (define-key dired-mode-map - [menu-bar immediate tumme tumme-display-thumbs] - '(menu-item "Display thumbails for marked files" - tumme-display-thumbs)) - - (define-key dired-mode-map - [menu-bar immediate tumme tumme-tag-files] - '(menu-item "Add tag to marked files" - tumme-tag-files)) - - (define-key dired-mode-map - [menu-bar immediate tumme tumme-tag-remove] - '(menu-item "Remove tag from marked files" - tumme-tag-remove)) - - (define-key dired-mode-map - [menu-bar immediate tumme tumme-dired-display-image] - '(menu-item "Display sized image" - tumme-dired-display-image)) - - (define-key dired-mode-map - [menu-bar immediate tumme tumme-dired-display-external] - '(menu-item "Display image in external viewer" - tumme-dired-display-external)) - - (define-key dired-mode-map - [menu-bar immediate tumme tumme-dired-comment-files] - '(menu-item "Add comment to marked files" - tumme-dired-comment-files)) - - (define-key dired-mode-map - [menu-bar immediate tumme tumme-mark-tagged-files] - '(menu-item "Find and mark files with a certain tag" - tumme-mark-tagged-files)) - (define-key map [menu-bar regexp] (cons "Regexp" (make-sparse-keymap "Regexp"))) From 1797b033e054fce0d711a34bd93a818d8f8ca85e Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Wed, 24 May 2006 22:27:00 +0000 Subject: [PATCH 032/403] *** empty log message *** --- lisp/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 950d3b9f887..cd92a0c5111 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2006-05-25 Mathias Dahl + + * tumme.el (tumme-display-dired-image): Renamed to + `tumme-dired-display-image'. + (tumme-track-movement): Changed default value to t. + (tumme-display-thumbs): Added new optional parameter DO-NOT-POP, + used from `tumme-next-line-and-display' and similar commands. + + * dired.el (dired-mode-map): Added Thumbnail sub menu under the + Immediate menu. Added some tumme commands there. + 2006-05-25 Nick Roberts * dired.el (dired-mode-map): Fix breakage. From 870560eb10c04f48f7b657664c45894a4820f874 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 24 May 2006 22:28:02 +0000 Subject: [PATCH 033/403] (read-passwd): Copy PROMPT before changing its properties. --- lisp/ChangeLog | 4 ++++ lisp/subr.el | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd92a0c5111..11a86401271 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-05-24 Richard Stallman + + * subr.el (read-passwd): Copy PROMPT before changing its properties. + 2006-05-25 Mathias Dahl * tumme.el (tumme-display-dired-image): Renamed to diff --git a/lisp/subr.el b/lisp/subr.el index 54361e92eec..67731f4d4c6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1637,6 +1637,9 @@ by doing (clear-string STRING)." (sit-for 1)))) success) (let ((pass nil) + ;; Copy it so that add-text-properties won't modify + ;; the object that was passed in by the caller. + (prompt (copy-sequence prompt)) (c 0) (echo-keystrokes 0) (cursor-in-echo-area t) From 379ba58e7676783024bfd1cba67e0c9996ae250a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 May 2006 00:00:50 +0000 Subject: [PATCH 034/403] (ad-enable-advice, ad-activate, ad-disable-advice): Add autoloads. --- lisp/ChangeLog | 3 +++ lisp/emacs-lisp/advice.el | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 11a86401271..bf94fcb539c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-05-24 Richard Stallman + * emacs-lisp/advice.el (ad-enable-advice, ad-activate) + (ad-disable-advice): Add autoloads. + * subr.el (read-passwd): Copy PROMPT before changing its properties. 2006-05-25 Mathias Dahl diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el index 486a3b049ae..d03245bf452 100644 --- a/lisp/emacs-lisp/advice.el +++ b/lisp/emacs-lisp/advice.el @@ -2350,6 +2350,7 @@ FUNCTION was not advised)." (ad-advice-set-enabled advice flag)))))) matched-advices))) +;;;###autoload (defun ad-enable-advice (function class name) "Enables the advice of FUNCTION with CLASS and NAME." (interactive (ad-read-advice-specification "Enable advice of")) @@ -2359,6 +2360,7 @@ FUNCTION was not advised)." function class name)) (error "ad-enable-advice: `%s' is not advised" function))) +;;;###autoload (defun ad-disable-advice (function class name) "Disable the advice of FUNCTION with CLASS and NAME." (interactive (ad-read-advice-specification "Disable advice of")) @@ -3585,6 +3587,7 @@ the value of `ad-redefinition-action' and de/activate again." ;; @@ The top-level advice interface: ;; ================================== +;;;###autoload (defun ad-activate (function &optional compile) "Activate all the advice information of an advised FUNCTION. If FUNCTION has a proper original definition then an advised From 113fe928bb71fc6d99b5b0c7220daa9d16359f43 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 May 2006 00:19:02 +0000 Subject: [PATCH 035/403] (with-local-quit): When handling `quit' signal, make a chance for quit-flag to cause a quit. --- lisp/ChangeLog | 3 +++ lisp/subr.el | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bf94fcb539c..4e4871d0efd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-05-24 Richard Stallman + * subr.el (with-local-quit): When handling `quit' signal, + make a chance for quit-flag to cause a quit. + * emacs-lisp/advice.el (ad-enable-advice, ad-activate) (ad-disable-advice): Add autoloads. diff --git a/lisp/subr.el b/lisp/subr.el index 67731f4d4c6..711f1822189 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1617,7 +1617,7 @@ Optional DEFAULT is a default password to use instead of empty input. This function echoes `.' for each character that the user types. The user ends with RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. C-g quits; if `inhibit-quit' was non-nil around this function, -then it returns nil if the user types C-g. +then it returns nil if the user types C-g, but quit-flag remains set. Once the caller uses the password, it can erase the password by doing (clear-string STRING)." @@ -2321,7 +2321,13 @@ is allowed once again." `(condition-case nil (let ((inhibit-quit nil)) ,@body) - (quit (setq quit-flag t) nil))) + (quit (setq quit-flag t) + ;; This call is to give a chance to handle quit-flag + ;; in case inhibit-quit is nil. + ;; Without this, it will not be handled until the next function + ;; call, and that might allow it to exit thru a condition-case + ;; that intends to handle the quit signal next time. + (eval '(ignore nil))))) (defmacro while-no-input (&rest body) "Execute BODY only as long as there's no pending input. From 60f7e8b6638bd63d6055add0e202e09f04208f5c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 May 2006 00:20:40 +0000 Subject: [PATCH 036/403] (with-local-quit): Doc fix. --- lisp/subr.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 711f1822189..c4fce6624bf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2315,8 +2315,8 @@ See also `with-temp-file' and `with-output-to-string'." (defmacro with-local-quit (&rest body) "Execute BODY, allowing quits to terminate BODY but not escape further. When a quit terminates BODY, `with-local-quit' returns nil but -requests another quit. That quit will be processed, the next time quitting -is allowed once again." +requests another quit. That quit will be processed as soon as quitting +is allowed once again. (Immediately, if `inhibit-quit' is nil.)" (declare (debug t) (indent 0)) `(condition-case nil (let ((inhibit-quit nil)) From 08244b8144daa9b9fdd69fd8d74155b6dd1d9493 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 25 May 2006 04:51:50 +0000 Subject: [PATCH 037/403] * keymaps.texi (Key Sequences): Renamed from Keymap Terminology. Explain string and vector representations of key sequences * keymaps.texi (Changing Key Bindings): * commands.texi (Interactive Codes, Interactive Codes): * help.texi (Describing Characters): Refer to it. --- lispref/ChangeLog | 9 ++++++ lispref/commands.texi | 2 +- lispref/help.texi | 2 +- lispref/keymaps.texi | 68 ++++++++++++++++++++++++++++--------------- 4 files changed, 55 insertions(+), 26 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index de08e3fb459..ec852df16fe 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,12 @@ +2006-05-25 Chong Yidong + + * keymaps.texi (Key Sequences): Renamed from Keymap Terminology. + Explain string and vector representations of key sequences + + * keymaps.texi (Changing Key Bindings): + * commands.texi (Interactive Codes, Interactive Codes): + * help.texi (Describing Characters): Refer to it. + 2006-05-23 Luc Teirlinck * frames.texi (Pointer Shape): @end table -> @end defvar. diff --git a/lispref/commands.texi b/lispref/commands.texi index fa5d95f0408..0723c368bba 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi @@ -362,7 +362,7 @@ An irrelevant argument. This code always supplies @code{nil} as the argument's value. No I/O. @item k -A key sequence (@pxref{Keymap Terminology}). This keeps reading events +A key sequence (@pxref{Key Sequences}). This keeps reading events until a command (or undefined command) is found in the current key maps. The key sequence argument is represented as a string or vector. The cursor does not move into the echo area. Prompt. diff --git a/lispref/help.texi b/lispref/help.texi index 0fe996dfd7c..6173c746d1e 100644 --- a/lispref/help.texi +++ b/lispref/help.texi @@ -497,7 +497,7 @@ can also be used as a rough inverse for @code{key-description}. You call it with a string containing key descriptions, separated by spaces; it returns a string or vector containing the corresponding events. (This may or may not be a single valid key sequence, depending on what -events you use; @pxref{Keymap Terminology}.) If @var{need-vector} is +events you use; @pxref{Key Sequences}.) If @var{need-vector} is non-@code{nil}, the return value is always a vector. @end defun diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index 39a57eddf13..808f3a617a6 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -16,7 +16,7 @@ to look up the next input event; this continues until a command is found. The whole process is called @dfn{key lookup}. @menu -* Keymap Terminology:: Definitions of terms pertaining to keymaps. +* Key Sequences:: What a key sequence looks like as a Lisp object. * Format of Keymaps:: What a keymap looks like as a Lisp object. * Creating Keymaps:: Functions to create and copy keymaps. * Inheritance and Keymaps:: How one keymap can inherit the bindings @@ -37,32 +37,26 @@ found. The whole process is called @dfn{key lookup}. * Menu Keymaps:: Defining a menu as a keymap. @end menu -@node Keymap Terminology -@section Keymap Terminology +@node Key Sequences +@section Key Sequences @cindex key @cindex keystroke @cindex key binding @cindex binding of a key @cindex complete key @cindex undefined key +@cindex key sequence - A @dfn{keymap} is a table mapping event types to definitions (which -can be any Lisp objects, though only certain types are meaningful for -execution by the command loop). Given an event (or an event type) and a -keymap, Emacs can get the event's definition. Events include -characters, function keys, and mouse actions (@pxref{Input Events}). + A keymap determines a binding or definition for a set of @dfn{key +sequences}, or @dfn{keys} for short. A key sequence is a sequence of +one or more input events that form a unit. - A sequence of input events that form a unit is called a -@dfn{key sequence}, or @dfn{key} for short. A sequence of one event -is always a key sequence, and so are some multi-event sequences. - - A keymap determines a binding or definition for any key sequence. If -the key sequence is a single event, its binding is the definition of the -event in the keymap. The binding of a key sequence of more than one -event is found by an iterative process: the binding of the first event -is found, and must be a keymap; then the second event's binding is found -in that keymap, and so on until all the events in the key sequence are -used up. + If a keymap binds a key sequence consisting of a single event, its +binding is the definition of that event. The binding of a key +sequence of more than one event is found by an iterative process: the +binding of the first event is found, and must be a keymap; then the +second event's binding is found in that keymap, and so on until all +the events in the key sequence are used up. If the binding of a key sequence is a keymap, we call the key sequence a @dfn{prefix key}. Otherwise, we call it a @dfn{complete key} (because @@ -99,8 +93,28 @@ keymaps shadow both local and global keymaps. @xref{Active Keymaps}, for details. The Emacs Lisp representation for a key sequence is a string or vector. -You can enter key sequence constants using the ordinary string or vector -representation; it is also convenient to use @code{kbd}: + + In the string representation, alphanumeric characters ordinarily +stand for themselves; for example, @code{"a"} represents @key{a} and +and @code{"1"} represents @key{1}. Control character events are +prefixed by the substring @code{"\C-"}, and meta characters by +@code{"\M-"}; for example, @code{"\C-x"} represents the key @kbd{C-x}. +In addition, the @kbd{}, @kbd{}, @kbd{}, and +@kbd{} events are represented by @code{"\t"}, @code{"\r"}, +@code{"\e"}, and @code{"\d"} respectively. The string representation +of a complete key sequence is then obtained by concatenating the +string representations of each constituent event; thus, @code{"\C-x"} +represents the key sequence @kbd{C-x}. + + Key sequences containing function keys, mouse button events, or +non-ASCII characters such as @kbd{C-=} or @kbd{H-a} cannot be +represented as strings; they have to be represented as vectors. + + In the vector representation, each element of the vector represents +a consecutive input element, in its Lisp form. @xref{Input Events}. +For example, ordinary keyboard events are represented by Lisp +characters (@pxref{Keyboard Events}), so the character @code{?a} +represents @key{a}. @defmac kbd keyseq-text This macro converts the text @var{keyseq-text} (a string constant) @@ -129,7 +143,13 @@ Macro,,, emacs, The GNU Emacs Manual}). @cindex full keymap @cindex sparse keymap - A keymap is a list whose @sc{car} is the symbol @code{keymap}. The + A @dfn{keymap} is a table mapping event types to definitions (which +can be any Lisp objects, though only certain types are meaningful for +execution by the command loop). Given an event (or an event type) and a +keymap, Emacs can get the event's definition. Events include +characters, function keys, and mouse actions (@pxref{Input Events}). + + Each keymap is a list whose @sc{car} is the symbol @code{keymap}. The remaining elements of the list define the key bindings of the keymap. A symbol whose function definition is a keymap is also a keymap. Use the function @code{keymapp} (see below) to test whether an object is a @@ -1197,8 +1217,8 @@ numeric codes for the modifier bits don't appear in compiled files. For the functions below, an error is signaled if @var{keymap} is not a keymap or if @var{key} is not a string or vector representing a key sequence. You can use event types (symbols) as shorthand for events -that are lists. The @code{kbd} macro (@pxref{Keymap Terminology}) is -a convenient way to specify the key sequence. +that are lists. The @code{kbd} macro (@pxref{Key Sequences}) is a +convenient way to specify the key sequence. @defun define-key keymap key binding This function sets the binding for @var{key} in @var{keymap}. (If From cde00df601d2c75adef41ea06776cce9d9f87dd5 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 25 May 2006 04:52:20 +0000 Subject: [PATCH 038/403] * keymaps.texi (Key Sequences): Renamed from Keymap Terminology. --- lispref/elisp.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lispref/elisp.texi b/lispref/elisp.texi index 8d4aa687b48..3eb3298e69a 100644 --- a/lispref/elisp.texi +++ b/lispref/elisp.texi @@ -590,7 +590,7 @@ Defining Commands Keymaps -* Keymap Terminology:: Definitions of terms pertaining to keymaps. +* Key Sequences:: What a key sequence looks like as a Lisp object. * Format of Keymaps:: What a keymap looks like as a Lisp object. * Creating Keymaps:: Functions to create and copy keymaps. * Inheritance and Keymaps:: How one keymap can inherit the bindings From 5299552dcadb2c140cd37f64b325323c19634c3f Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 25 May 2006 08:51:31 +0000 Subject: [PATCH 039/403] (bindat-unpack, bindat-pack): Signal error if RAW-DATA is a multibyte string. --- lisp/emacs-lisp/bindat.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 823fcf869b6..377ff8cc27e 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -345,8 +345,10 @@ (defun bindat-unpack (spec raw-data &optional pos) "Return structured data according to SPEC for binary data in RAW-DATA. -RAW-DATA is a string or vector. Optional third arg POS specifies the -starting offset in RAW-DATA." +RAW-DATA is a unibyte string or vector. Optional third arg POS specifies +the starting offset in RAW-DATA." + (when (multibyte-string-p raw-data) + (error "String is multibyte")) (unless pos (setq pos 0)) (bindat--unpack-group spec)) @@ -581,10 +583,10 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (defun bindat-pack (spec struct &optional raw-data pos) "Return binary data packed according to SPEC for structured data STRUCT. -Optional third arg RAW-DATA is a pre-allocated string or vector to pack into. -Optional fourth arg POS is the starting offset into RAW-DATA. -Note: The result is a multibyte string; use `string-make-unibyte' on it -to make it unibyte if necessary." +Optional third arg RAW-DATA is a pre-allocated unibyte string or vector to +pack into. Optional fourth arg POS is the starting offset into RAW-DATA." + (when (multibyte-string-p raw-data) + (error "Pre-allocated string is multibyte")) (let ((no-return raw-data)) (unless pos (setq pos 0)) (unless raw-data From a2ff8a4801f7e127b57fa91e8ac19a2f5738e2cb Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 25 May 2006 09:01:43 +0000 Subject: [PATCH 040/403] (Bindat Functions): Say "unibyte string" explicitly for `bindat-unpack' and `bindat-pack' descriptions. (Bindat Examples): Don't call `string-make-unibyte' in example. --- lispref/processes.texi | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/lispref/processes.texi b/lispref/processes.texi index 9eb733236a9..501c4a65c57 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi @@ -2245,7 +2245,8 @@ specification, @code{raw-data} to a byte array, and @var{struct} to an alist representing unpacked field data. @defun bindat-unpack spec raw-data &optional pos -This function unpacks data from the byte array @code{raw-data} +This function unpacks data from the unibyte string or byte +array @code{raw-data} according to @var{spec}. Normally this starts unpacking at the beginning of the byte array, but if @var{pos} is non-@code{nil}, it specifies a zero-based starting position to use instead. @@ -2277,13 +2278,9 @@ to @var{spec}. This function returns a byte array packed according to @var{spec} from the data in the alist @var{struct}. Normally it creates and fills a new byte array starting at the beginning. However, if @var{raw-data} -is non-@code{nil}, it specifies a pre-allocated string or vector to +is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to pack into. If @var{pos} is non-@code{nil}, it specifies the starting offset for packing into @code{raw-data}. - -@c ??? Isn't this a bug? Shouldn't it always be unibyte? -Note: The result is a multibyte string; use @code{string-make-unibyte} -on it to make it unibyte if necessary. @end defun @defun bindat-ip-to-string ip @@ -2367,18 +2364,17 @@ COOKIES, indicates the border between entries." (with-temp-buffer (set-buffer-multibyte nil) (insert - (string-make-unibyte - (bindat-pack - fcookie-index-spec - `((:version . 2) - (:count . ,count) - (:longest . ,max) - (:shortest . ,min) - (:flags . 0) - (:delim . ,delim) - (:offset . ,(mapcar (lambda (o) - (list (cons :foo o))) - (nreverse offsets))))))) + (bindat-pack + fcookie-index-spec + `((:version . 2) + (:count . ,count) + (:longest . ,max) + (:shortest . ,min) + (:flags . 0) + (:delim . ,delim) + (:offset . ,(mapcar (lambda (o) + (list (cons :foo o))) + (nreverse offsets)))))) (let ((coding-system-for-write 'raw-text-unix)) (write-file (or index (concat cookies ".dat"))))))) @end lisp From 78b3f5c3fadde997fc50ae5b09c6d409caa25a69 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 25 May 2006 09:02:59 +0000 Subject: [PATCH 041/403] *** empty log message *** --- lisp/ChangeLog | 9 +++++++-- lispref/ChangeLog | 10 ++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4e4871d0efd..6c908eb016a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-25 Thien-Thi Nguyen + + * emacs-lisp/bindat.el (bindat-unpack, bindat-pack): + Signal error if RAW-DATA is a multibyte string. + 2006-05-24 Richard Stallman * subr.el (with-local-quit): When handling `quit' signal, @@ -15,10 +20,10 @@ (tumme-track-movement): Changed default value to t. (tumme-display-thumbs): Added new optional parameter DO-NOT-POP, used from `tumme-next-line-and-display' and similar commands. - + * dired.el (dired-mode-map): Added Thumbnail sub menu under the Immediate menu. Added some tumme commands there. - + 2006-05-25 Nick Roberts * dired.el (dired-mode-map): Fix breakage. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index ec852df16fe..41b7afee629 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,10 +1,16 @@ +2006-05-25 Thien-Thi Nguyen + + * processes.texi (Bindat Functions): Say "unibyte string" + explicitly for bindat-unpack and bindat-pack descriptions. + (Bindat Examples): Don't call `string-make-unibyte' in example. + 2006-05-25 Chong Yidong * keymaps.texi (Key Sequences): Renamed from Keymap Terminology. Explain string and vector representations of key sequences - * keymaps.texi (Changing Key Bindings): - * commands.texi (Interactive Codes, Interactive Codes): + * keymaps.texi (Changing Key Bindings): + * commands.texi (Interactive Codes, Interactive Codes): * help.texi (Describing Characters): Refer to it. 2006-05-23 Luc Teirlinck From 2b1575dfcfc218be2036f99facc68043d9fe7ad5 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 25 May 2006 09:06:38 +0000 Subject: [PATCH 042/403] (setcar): replace an antelope rather than a giraffe with a hippopotamus. --- lispintro/ChangeLog | 5 +++++ lispintro/emacs-lisp-intro.texi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lispintro/ChangeLog b/lispintro/ChangeLog index 731e734f78c..d2316d59aa6 100644 --- a/lispintro/ChangeLog +++ b/lispintro/ChangeLog @@ -1,3 +1,8 @@ +2006-05-25 David Kastrup + + * emacs-lisp-intro.texi (setcar): replace an antelope rather than + a giraffe with a hippopotamus. + 2006-05-19 Thien-Thi Nguyen * emacs-lisp-intro.texi (Digression concerning error): Fix typo. diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index f941f3e44ba..5d513256daf 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi @@ -7061,7 +7061,7 @@ The first element on the list, @code{antelope} is replaced by @code{hippopotamus}. So we can see that @code{setcar} did not add a new element to the list -as @code{cons} would have; it replaced @code{giraffe} with +as @code{cons} would have; it replaced @code{antelope} with @code{hippopotamus}; it @emph{changed} the list. @node setcdr, cons Exercise, setcar, car cdr & cons From 6d991998b2ac01f72456efb569acccd471513279 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Thu, 25 May 2006 11:37:18 +0000 Subject: [PATCH 043/403] (dired-mode-map): Changed menu items for tumme as per suggestions in emacs-devel. --- lisp/dired.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 0ceb71abd55..4644fb2f6c3 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1313,35 +1313,35 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." '("--")) (define-key map [menu-bar immediate tumme] - (cons "Thumbnails" (make-sparse-keymap "tumme"))) + (cons "Thumbnail Images" (make-sparse-keymap "tumme"))) (define-key map [menu-bar immediate tumme tumme-display-thumbs] - '(menu-item "Display thumbails for marked files" + '(menu-item "Display Thumbnails" tumme-display-thumbs)) (define-key map [menu-bar immediate tumme tumme-tag-files] - '(menu-item "Add tag to marked files" + '(menu-item "Add Image Tag.." tumme-tag-files)) (define-key map [menu-bar immediate tumme tumme-tag-remove] - '(menu-item "Remove tag from marked files" + '(menu-item "Remove Image Tag..." tumme-tag-remove)) (define-key map [menu-bar immediate tumme tumme-dired-display-image] - '(menu-item "Display sized image" + '(menu-item "Display Image" tumme-dired-display-image)) (define-key map [menu-bar immediate tumme tumme-dired-display-external] - '(menu-item "Display image in external viewer" + '(menu-item "Display Image Externally" tumme-dired-display-external)) (define-key map [menu-bar immediate tumme tumme-dired-comment-files] - '(menu-item "Add comment to marked files" + '(menu-item "Add Comment" tumme-dired-comment-files)) (define-key map [menu-bar immediate tumme tumme-mark-tagged-files] - '(menu-item "Find and mark files with a certain tag" + '(menu-item "Mark From Image Tag..." tumme-mark-tagged-files)) (define-key map [menu-bar immediate compare-directories] From 5bba9e1e9360ec461a62a7daa4fed64c3e4c8918 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Thu, 25 May 2006 11:42:28 +0000 Subject: [PATCH 044/403] *** empty log message *** --- lisp/dired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index 4644fb2f6c3..990c023b698 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1321,7 +1321,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." tumme-display-thumbs)) (define-key map [menu-bar immediate tumme tumme-tag-files] - '(menu-item "Add Image Tag.." + '(menu-item "Add Image Tag..." tumme-tag-files)) (define-key map [menu-bar immediate tumme tumme-tag-remove] From 3693899406d4ac67ac19f7859182bc406c03b4ce Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Thu, 25 May 2006 12:09:01 +0000 Subject: [PATCH 045/403] (dired-mode-map): `tumme-display-dired-image' was renamed in tumme.el, but there was still a key binding to it here. Changed the binding to the new name. --- lisp/ChangeLog | 23 +++++++++++++++++++++++ lisp/dired.el | 51 +++++++++++++++++++++++++------------------------- 2 files changed, 49 insertions(+), 25 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6c908eb016a..4bb65b1fe31 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-25 Mathias Dahl + + * dired.el (dired-mode-map): `tumme-display-dired-image' was + renamed in tumme.el, but there was still a key binding to it + here. Changed the binding to the new name. + 2006-05-25 Thien-Thi Nguyen * emacs-lisp/bindat.el (bindat-unpack, bindat-pack): @@ -13,6 +19,15 @@ * subr.el (read-passwd): Copy PROMPT before changing its properties. +2006-05-25 Mathias Dahl + + * dired.el (dired-mode-map): Changed menu items for tumme as per + suggestions in emacs-devel. + +2006-05-25 Nick Roberts + + * dired.el (dired-mode-map): Fix breakage. + 2006-05-25 Mathias Dahl * tumme.el (tumme-display-dired-image): Renamed to @@ -20,13 +35,21 @@ (tumme-track-movement): Changed default value to t. (tumme-display-thumbs): Added new optional parameter DO-NOT-POP, used from `tumme-next-line-and-display' and similar commands. +<<<<<<< ChangeLog + (tumme-dired-display-properties): +======= + +>>>>>>> 1.9600 * dired.el (dired-mode-map): Added Thumbnail sub menu under the Immediate menu. Added some tumme commands there. +<<<<<<< ChangeLog +======= 2006-05-25 Nick Roberts * dired.el (dired-mode-map): Fix breakage. +>>>>>>> 1.9600 2006-05-24 Luc Teirlinck diff --git a/lisp/dired.el b/lisp/dired.el index 990c023b698..69825626ddf 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1253,7 +1253,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map "\C-tt" 'tumme-tag-files) (define-key map "\C-tr" 'tumme-tag-remove) (define-key map "\C-tj" 'tumme-jump-thumbnail-buffer) - (define-key map "\C-ti" 'tumme-display-dired-image) + (define-key map "\C-ti" 'tumme-dired-display-image) (define-key map "\C-tx" 'tumme-dired-display-external) (define-key map "\C-ta" 'tumme-display-thumbs-append) (define-key map "\C-t." 'tumme-display-thumb) @@ -1315,34 +1315,35 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate tumme] (cons "Thumbnail Images" (make-sparse-keymap "tumme"))) + (define-key map + [menu-bar immediate tumme tumme-mark-tagged-files] + '(menu-item "Mark From Image Tag..." + tumme-mark-tagged-files)) + (define-key map + [menu-bar immediate tumme tumme-tag-remove] + '(menu-item "Remove Image Tag..." + tumme-tag-remove)) + (define-key map + [menu-bar immediate tumme tumme-tag-files] + '(menu-item "Add Image Tag..." + tumme-tag-files)) + (define-key map + [menu-bar immediate tumme tumme-dired-comment-files] + '(menu-item "Add Comment" + tumme-dired-comment-files)) + (define-key map + [menu-bar immediate tumme tumme-dired-display-external] + '(menu-item "Display Image Externally" + tumme-dired-display-external)) + (define-key map + [menu-bar immediate tumme tumme-dired-display-image] + '(menu-item "Display Image" + tumme-dired-display-image)) (define-key map [menu-bar immediate tumme tumme-display-thumbs] '(menu-item "Display Thumbnails" tumme-display-thumbs)) - (define-key map - [menu-bar immediate tumme tumme-tag-files] - '(menu-item "Add Image Tag..." - tumme-tag-files)) - (define-key map - [menu-bar immediate tumme tumme-tag-remove] - '(menu-item "Remove Image Tag..." - tumme-tag-remove)) - (define-key map - [menu-bar immediate tumme tumme-dired-display-image] - '(menu-item "Display Image" - tumme-dired-display-image)) - (define-key map - [menu-bar immediate tumme tumme-dired-display-external] - '(menu-item "Display Image Externally" - tumme-dired-display-external)) - (define-key map - [menu-bar immediate tumme tumme-dired-comment-files] - '(menu-item "Add Comment" - tumme-dired-comment-files)) - (define-key map - [menu-bar immediate tumme tumme-mark-tagged-files] - '(menu-item "Mark From Image Tag..." - tumme-mark-tagged-files)) + (define-key map [menu-bar immediate compare-directories] '(menu-item "Compare directories..." dired-compare-directories From 776e9e349b9241ba7693b61adf59229a425ab058 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Thu, 25 May 2006 12:21:14 +0000 Subject: [PATCH 046/403] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4bb65b1fe31..d23424b0536 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2006-05-25 Mathias Dahl + * tumme.el (tumme-display-image): Changed documentation string + slightly. + (tumme-dired-display-image): Added call to `display-buffer'. + * dired.el (dired-mode-map): `tumme-display-dired-image' was renamed in tumme.el, but there was still a key binding to it here. Changed the binding to the new name. From f5b5e4fee1947fe025ef60580677705fe3e66705 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Thu, 25 May 2006 12:21:41 +0000 Subject: [PATCH 047/403] * tumme.el (tumme-display-image): Changed documentation string slightly. (tumme-dired-display-image): Added call to `display-buffer'. * dired.el (dired-mode-map): `tumme-display-dired-image' was renamed in tumme.el, but there was still a key binding to it here. Changed the binding to the new name. --- lisp/tumme.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index 2e2afd75399..1fa1622cabd 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -1762,13 +1762,11 @@ Ask user how many thumbnails should be displayed per row." (defun tumme-display-image (file &optional original-size) "Display image FILE in image buffer. -Use this when you want to display the image, semi sized, in a window -next to the thumbnail window - typically a three-window configuration -with dired to the left, thumbnail window to the upper right and image -window to the lower right. The image is sized to fit the display -window (using a temporary file, don't worry). Because of this, it -will not be as quick as opening it directly, but on most modern -systems it should feel snappy enough. +Use this when you want to display the image, semi sized, in a new +window. The image is sized to fit the display window (using a +temporary file, don't worry). Because of this, it will not be as +quick as opening it directly, but on most modern systems it +should feel snappy enough. If optional argument ORIGINAL-SIZE is non-nil, display image in its original size." @@ -1822,7 +1820,8 @@ With prefix argument ARG, display image in its original size." See documentation for `tumme-display-image' for more information. With prefix argument ARG, display image in its original size." (interactive "P") - (tumme-display-image (dired-get-filename) arg)) + (tumme-display-image (dired-get-filename) arg) + (display-buffer tumme-display-image-buffer)) (defun tumme-image-at-point-p () "Return true if there is a tumme thumbnail at point." From b76b35352091d7c97dc8e7dfb42531556af62597 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 25 May 2006 13:43:36 +0000 Subject: [PATCH 048/403] *** empty log message *** --- lisp/ChangeLog | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d23424b0536..7d944be0713 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,12 +1,11 @@ 2006-05-25 Mathias Dahl - * tumme.el (tumme-display-image): Changed documentation string + * tumme.el (tumme-display-image): Change documentation string slightly. - (tumme-dired-display-image): Added call to `display-buffer'. + (tumme-dired-display-image): Add call to `display-buffer'. - * dired.el (dired-mode-map): `tumme-display-dired-image' was - renamed in tumme.el, but there was still a key binding to it - here. Changed the binding to the new name. + * dired.el (dired-mode-map): Bind `tumme-dired-display-image' + to C-t i. 2006-05-25 Thien-Thi Nguyen @@ -25,7 +24,7 @@ 2006-05-25 Mathias Dahl - * dired.el (dired-mode-map): Changed menu items for tumme as per + * dired.el (dired-mode-map): Change menu items for tumme as per suggestions in emacs-devel. 2006-05-25 Nick Roberts @@ -34,26 +33,15 @@ 2006-05-25 Mathias Dahl - * tumme.el (tumme-display-dired-image): Renamed to - `tumme-dired-display-image'. - (tumme-track-movement): Changed default value to t. - (tumme-display-thumbs): Added new optional parameter DO-NOT-POP, + * tumme.el (tumme-display-dired-image): Rename to... + (tumme-dired-display-image): ...this. + (tumme-track-movement): Change default value to t. + (tumme-display-thumbs): Add new optional parameter DO-NOT-POP, used from `tumme-next-line-and-display' and similar commands. -<<<<<<< ChangeLog (tumme-dired-display-properties): -======= - ->>>>>>> 1.9600 - * dired.el (dired-mode-map): Added Thumbnail sub menu under the - Immediate menu. Added some tumme commands there. -<<<<<<< ChangeLog -======= - -2006-05-25 Nick Roberts - - * dired.el (dired-mode-map): Fix breakage. ->>>>>>> 1.9600 + * dired.el (dired-mode-map): Add Thumbnail submenu under the + Immediate menu. Add some tumme commands there. 2006-05-24 Luc Teirlinck From 749d6383a8bb933b58622d6b567e356d57ff0d4e Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 25 May 2006 13:59:39 +0000 Subject: [PATCH 049/403] *** empty log message *** --- lisp/ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7d944be0713..03a0250b811 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -38,7 +38,6 @@ (tumme-track-movement): Change default value to t. (tumme-display-thumbs): Add new optional parameter DO-NOT-POP, used from `tumme-next-line-and-display' and similar commands. - (tumme-dired-display-properties): * dired.el (dired-mode-map): Add Thumbnail submenu under the Immediate menu. Add some tumme commands there. From 0a33fc8dd8eff96d86aaa7781c1df246e1e7059b Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Thu, 25 May 2006 15:08:37 +0000 Subject: [PATCH 050/403] *** empty log message *** --- lisp/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 03a0250b811..8daed2b8801 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-05-25 Mathias Dahl + * dired.el (dired-mode-map): Add help-echo strings to tumme + commands. + * tumme.el (tumme-display-image): Change documentation string slightly. (tumme-dired-display-image): Add call to `display-buffer'. From bc4dbed59035f35ebbb49c3684b583c6180036a6 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Thu, 25 May 2006 15:11:10 +0000 Subject: [PATCH 051/403] * dired.el (dired-mode-map): Add help-echo strings to tumme commands. * dired.el (dired-mode-map): Bind `tumme-dired-display-image' to C-t i. --- lisp/dired.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 69825626ddf..67c9b737bc7 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1317,32 +1317,32 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate tumme tumme-mark-tagged-files] - '(menu-item "Mark From Image Tag..." - tumme-mark-tagged-files)) + '(menu-item "Mark From Image Tag..." tumme-mark-tagged-files + :help "Mark files whose image tags matches regexp")) (define-key map [menu-bar immediate tumme tumme-tag-remove] - '(menu-item "Remove Image Tag..." - tumme-tag-remove)) + '(menu-item "Remove Image Tag..." tumme-tag-remove + :help "Remove image tag from current or marked files")) (define-key map [menu-bar immediate tumme tumme-tag-files] - '(menu-item "Add Image Tag..." - tumme-tag-files)) + '(menu-item "Add Image Tag..." tumme-tag-files + :help "Add image tag to current or marked files")) (define-key map [menu-bar immediate tumme tumme-dired-comment-files] - '(menu-item "Add Comment" - tumme-dired-comment-files)) + '(menu-item "Add Comment..." tumme-dired-comment-files + :help "Add comment to current or marked files")) (define-key map [menu-bar immediate tumme tumme-dired-display-external] - '(menu-item "Display Image Externally" - tumme-dired-display-external)) + '(menu-item "Display Image Externally" tumme-dired-display-external + :help "Display image in external viewer")) (define-key map [menu-bar immediate tumme tumme-dired-display-image] - '(menu-item "Display Image" - tumme-dired-display-image)) + '(menu-item "Display Image" tumme-dired-display-image + :help "Display sized image in a separate window")) (define-key map [menu-bar immediate tumme tumme-display-thumbs] - '(menu-item "Display Thumbnails" - tumme-display-thumbs)) + '(menu-item "Display Thumbnails" tumme-display-thumbs + :help "Display thumbnails for current or marked image files")) (define-key map [menu-bar immediate compare-directories] From 848a925ea6033abd34b1e84aeb64787f34d471ce Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 May 2006 16:27:30 +0000 Subject: [PATCH 052/403] (main, Fdump_emacs): Don't test __linux or __linux__. --- src/emacs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 846bfc7e453..e02a586b31e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1753,7 +1753,7 @@ main (argc, argv GNU/Linux. It might work on some other systems too. Give it a try and tell us if it works on your system. To compile for profiling use something like `make CFLAGS="-pg -g -O -DPROFILING=1'. */ -#if defined (__FreeBSD__) || defined (__linux) +#if defined (__FreeBSD__) || defined (GNU_LINUX) #ifdef PROFILING if (initialized) { @@ -2232,7 +2232,7 @@ You must run Emacs in batch mode in order to dump it. */) if (! noninteractive) error ("Dumping Emacs works only in batch mode"); -#ifdef __linux__ +#ifdef GNU_LINUX if (heap_bss_diff > MAX_HEAP_BSS_DIFF) { fprintf (stderr, "**************************************************\n"); @@ -2244,7 +2244,7 @@ You must run Emacs in batch mode in order to dump it. */) fprintf (stderr, "exec-shield in etc/PROBLEMS for more information.\n"); fprintf (stderr, "**************************************************\n"); } -#endif /* __linux__ */ +#endif /* GNU_LINUX */ /* Bind `command-line-processed' to nil before dumping, so that the dumped Emacs will process its command line From 39a9bed31b4229cdf9bbbd10955df5aa2de4cc54 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 25 May 2006 16:48:37 +0000 Subject: [PATCH 053/403] * keymaps.texi (Key Sequences): Some clarifications. --- lispref/ChangeLog | 4 ++++ lispref/keymaps.texi | 43 +++++++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 41b7afee629..4022efed7ca 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2006-05-25 Chong Yidong + + * keymaps.texi (Key Sequences): Some clarifications. + 2006-05-25 Thien-Thi Nguyen * processes.texi (Bindat Functions): Say "unibyte string" diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index 808f3a617a6..dd6a796805b 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -82,39 +82,36 @@ and can change when bindings are changed. However, a one-event sequence is always a key sequence, because it does not depend on any prefix keys for its well-formedness. - At any time, several primary keymaps are @dfn{active}---that is, in -use for finding key bindings. These are the @dfn{global map}, which is -shared by all buffers; the @dfn{local keymap}, which is usually -associated with a specific major mode; and zero or more @dfn{minor mode -keymaps}, which belong to currently enabled minor modes. (Not all minor -modes have keymaps.) The local keymap bindings shadow (i.e., take -precedence over) the corresponding global bindings. The minor mode -keymaps shadow both local and global keymaps. @xref{Active Keymaps}, -for details. - - The Emacs Lisp representation for a key sequence is a string or vector. + A key sequence can be represented in Emacs Lisp as either a string +or vector. Unless otherwise stated, any Emacs Lisp function that +accepts a key sequence as an argument can handle both representations. In the string representation, alphanumeric characters ordinarily stand for themselves; for example, @code{"a"} represents @key{a} and -and @code{"1"} represents @key{1}. Control character events are +and @code{"2"} represents @key{2}. Control character events are prefixed by the substring @code{"\C-"}, and meta characters by @code{"\M-"}; for example, @code{"\C-x"} represents the key @kbd{C-x}. In addition, the @kbd{}, @kbd{}, @kbd{}, and @kbd{} events are represented by @code{"\t"}, @code{"\r"}, @code{"\e"}, and @code{"\d"} respectively. The string representation of a complete key sequence is then obtained by concatenating the -string representations of each constituent event; thus, @code{"\C-x"} -represents the key sequence @kbd{C-x}. +string representations of each constituent event; thus, @code{"\C-xl"} +represents the key sequence @kbd{C-x l}. Key sequences containing function keys, mouse button events, or non-ASCII characters such as @kbd{C-=} or @kbd{H-a} cannot be -represented as strings; they have to be represented as vectors. +represented by strings; they have to be represented by vectors. In the vector representation, each element of the vector represents a consecutive input element, in its Lisp form. @xref{Input Events}. -For example, ordinary keyboard events are represented by Lisp -characters (@pxref{Keyboard Events}), so the character @code{?a} -represents @key{a}. +For example, the vector @code{[?\C-x ?l]} represents the key sequence +@kbd{C-x l}. + + For examples of key sequences written in string and vector +representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}. + + The @code{kbd} macro provides a convenient way to generate an Emacs +Lisp key sequence: @defmac kbd keyseq-text This macro converts the text @var{keyseq-text} (a string constant) @@ -149,6 +146,16 @@ execution by the command loop). Given an event (or an event type) and a keymap, Emacs can get the event's definition. Events include characters, function keys, and mouse actions (@pxref{Input Events}). + At any time, several primary keymaps are @dfn{active}---that is, in +use for finding key bindings. These are the @dfn{global map}, which is +shared by all buffers; the @dfn{local keymap}, which is usually +associated with a specific major mode; and zero or more @dfn{minor mode +keymaps}, which belong to currently enabled minor modes. (Not all minor +modes have keymaps.) The local keymap bindings shadow (i.e., take +precedence over) the corresponding global bindings. The minor mode +keymaps shadow both local and global keymaps. @xref{Active Keymaps}, +for details. + Each keymap is a list whose @sc{car} is the symbol @code{keymap}. The remaining elements of the list define the key bindings of the keymap. A symbol whose function definition is a keymap is also a keymap. Use From f195dc16c47781de49b353caa82aa3f1e6f17c18 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 25 May 2006 16:54:53 +0000 Subject: [PATCH 054/403] * FOR-RELEASE: Key sequence elisp node done. --- admin/ChangeLog | 4 ++++ admin/FOR-RELEASE | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/ChangeLog b/admin/ChangeLog index 9d3273f91ea..ae2bf668d98 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2006-05-25 Chong Yidong + + * FOR-RELEASE: Key sequence elisp node done. + 2006-05-24 Reiner Steib * FOR-RELEASE: Update refcard translations. Add coding cookie. diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 7371dd37a76..5a8ec3fe8bb 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -78,9 +78,6 @@ It seems that to fix this, w32 server sockets must use WSAAsyncSelect * DOCUMENTATION -** Add a node to the Lisp manual describing key sequences from the -Lisp point of view. - ** Check man/info.texi. ** Check the Emacs Lisp manual. From b3540319ff29b94010974ef9572353248a1b9dbc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 May 2006 17:03:30 +0000 Subject: [PATCH 055/403] (Keymap Basics): New node, split out of Key Sequences. (Keymaps): Update menu. --- lispref/keymaps.texi | 135 ++++++++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 61 deletions(-) diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index dd6a796805b..ed67a028446 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -16,7 +16,8 @@ to look up the next input event; this continues until a command is found. The whole process is called @dfn{key lookup}. @menu -* Key Sequences:: What a key sequence looks like as a Lisp object. +* Key Sequences:: Key sequences as Lisp objects. +* Keymap Basics:: Basic concepts of keymaps. * Format of Keymaps:: What a keymap looks like as a Lisp object. * Creating Keymaps:: Functions to create and copy keymaps. * Inheritance and Keymaps:: How one keymap can inherit the bindings @@ -41,22 +42,75 @@ found. The whole process is called @dfn{key lookup}. @section Key Sequences @cindex key @cindex keystroke +@cindex key sequence + + A @dfn{key sequence}, or @dfn{key} for short, is a sequence of one +or more input events that form a unit. The Emacs Lisp representation +for a key sequence is a string or vector. Unless otherwise stated, +any Emacs Lisp function that accepts a key sequence as an argument can +handle both representations. + + In the string representation, alphanumeric characters ordinarily +stand for themselves; for example, @code{"a"} represents @kbd{a} and +and @code{"2"} represents @kbd{2}. Control character events are +prefixed by the substring @code{"\C-"}, and meta characters by +@code{"\M-"}; for example, @code{"\C-x"} represents the key @kbd{C-x}. +In addition, the @key{TAB}, @key{RET}, @key{ESC}, and @key{DEL} events +are represented by @code{"\t"}, @code{"\r"}, @code{"\e"}, and +@code{"\d"} respectively. The string representation of a complete key +sequence is the concatenation of the string representations of the +constituent events; thus, @code{"\C-xl"} represents the key sequence +@kbd{C-x l}. + + Key sequences containing function keys, mouse button events, or +non-ASCII characters such as @kbd{C-=} or @kbd{H-a} cannot be +represented as strings; they have to be represented as vectors. + + In the vector representation, each element of the vector represents +an input event, in its Lisp form. @xref{Input Events}. For example, +the vector @code{[?\C-x ?l]} represents the key sequence @kbd{C-x l}. + + For examples of key sequences written in string and vector +representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}. + +@defmac kbd keyseq-text +This macro converts the text @var{keyseq-text} (a string constant) +into a key sequence (a string or vector constant). The contents of +@var{keyseq-text} should describe the key sequence using almost the same +syntax used in this manual. More precisely, it uses the same syntax +that Edit Macro mode uses for editing keyboard macros (@pxref{Edit +Keyboard Macro,,, emacs, The GNU Emacs Manual}); you must surround +function key names with @samp{<@dots{}>}. + +@example +(kbd "C-x") @result{} "\C-x" +(kbd "C-x C-f") @result{} "\C-x\C-f" +(kbd "C-x 4 C-f") @result{} "\C-x4\C-f" +(kbd "X") @result{} "X" +(kbd "RET") @result{} "\^M" +(kbd "C-c SPC") @result{} "\C-c@ " +(kbd " SPC") @result{} [f1 32] +(kbd "C-M-") @result{} [C-M-down] +@end example +@end defmac + +@node Keymap Basics +@section Keymap Basics @cindex key binding @cindex binding of a key @cindex complete key @cindex undefined key -@cindex key sequence - A keymap determines a binding or definition for a set of @dfn{key -sequences}, or @dfn{keys} for short. A key sequence is a sequence of -one or more input events that form a unit. + A keymap is a Lisp data structure that specifies @dfn{key bindings} +for various key sequences. - If a keymap binds a key sequence consisting of a single event, its -binding is the definition of that event. The binding of a key -sequence of more than one event is found by an iterative process: the -binding of the first event is found, and must be a keymap; then the -second event's binding is found in that keymap, and so on until all -the events in the key sequence are used up. + A single keymap directly specifies definitions for individual +events. When a key sequence consists of a single event, its binding +in a keymap is the keymap's definition for that event. The binding of +a longer key sequence is found by an iterative process: first find the +definition of the first event (which must itself be a keymap); then +find the second event's definition in that keymap, and so on until all +the events in the key sequence have been processed. If the binding of a key sequence is a keymap, we call the key sequence a @dfn{prefix key}. Otherwise, we call it a @dfn{complete key} (because @@ -82,56 +136,15 @@ and can change when bindings are changed. However, a one-event sequence is always a key sequence, because it does not depend on any prefix keys for its well-formedness. - A key sequence can be represented in Emacs Lisp as either a string -or vector. Unless otherwise stated, any Emacs Lisp function that -accepts a key sequence as an argument can handle both representations. - - In the string representation, alphanumeric characters ordinarily -stand for themselves; for example, @code{"a"} represents @key{a} and -and @code{"2"} represents @key{2}. Control character events are -prefixed by the substring @code{"\C-"}, and meta characters by -@code{"\M-"}; for example, @code{"\C-x"} represents the key @kbd{C-x}. -In addition, the @kbd{}, @kbd{}, @kbd{}, and -@kbd{} events are represented by @code{"\t"}, @code{"\r"}, -@code{"\e"}, and @code{"\d"} respectively. The string representation -of a complete key sequence is then obtained by concatenating the -string representations of each constituent event; thus, @code{"\C-xl"} -represents the key sequence @kbd{C-x l}. - - Key sequences containing function keys, mouse button events, or -non-ASCII characters such as @kbd{C-=} or @kbd{H-a} cannot be -represented by strings; they have to be represented by vectors. - - In the vector representation, each element of the vector represents -a consecutive input element, in its Lisp form. @xref{Input Events}. -For example, the vector @code{[?\C-x ?l]} represents the key sequence -@kbd{C-x l}. - - For examples of key sequences written in string and vector -representations, @ref{Init Rebinding,,, emacs, The GNU Emacs Manual}. - - The @code{kbd} macro provides a convenient way to generate an Emacs -Lisp key sequence: - -@defmac kbd keyseq-text -This macro converts the text @var{keyseq-text} (a string constant) -into a key sequence (a string or vector constant). The contents -of @var{keyseq-text} should describe the key sequence using the syntax -used in this manual. More precisely, it uses the same syntax that -Edit Macro mode uses for editing keyboard macros (@pxref{Edit Keyboard -Macro,,, emacs, The GNU Emacs Manual}). - -@example -(kbd "C-x") @result{} "\C-x" -(kbd "C-x C-f") @result{} "\C-x\C-f" -(kbd "C-x 4 C-f") @result{} "\C-x4\C-f" -(kbd "X") @result{} "X" -(kbd "RET") @result{} "\^M" -(kbd "C-c SPC") @result{} "\C-c@ " -(kbd " SPC") @result{} [f1 32] -(kbd "C-M-") @result{} [C-M-down] -@end example -@end defmac + At any time, several primary keymaps are @dfn{active}---that is, in +use for finding key bindings. These are the @dfn{global map}, which is +shared by all buffers; the @dfn{local keymap}, which is usually +associated with a specific major mode; and zero or more @dfn{minor mode +keymaps}, which belong to currently enabled minor modes. (Not all minor +modes have keymaps.) The local keymap bindings shadow (i.e., take +precedence over) the corresponding global bindings. The minor mode +keymaps shadow both local and global keymaps. @xref{Active Keymaps}, +for details. @node Format of Keymaps @section Format of Keymaps From 18550096c21020f12cfdf2cc0d9b0bae15639e78 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 May 2006 17:03:46 +0000 Subject: [PATCH 056/403] (Top): Update subnode menu. --- lispref/elisp.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lispref/elisp.texi b/lispref/elisp.texi index 3eb3298e69a..0de5da29576 100644 --- a/lispref/elisp.texi +++ b/lispref/elisp.texi @@ -590,7 +590,8 @@ Defining Commands Keymaps -* Key Sequences:: What a key sequence looks like as a Lisp object. +* Key Sequences:: Key sequences as Lisp objects. +* Keymap Basics:: Basic concepts of keymaps. * Format of Keymaps:: What a keymap looks like as a Lisp object. * Creating Keymaps:: Functions to create and copy keymaps. * Inheritance and Keymaps:: How one keymap can inherit the bindings From 403a7bca0afb21612c60b4d26f909af2bb68b159 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 May 2006 17:03:52 +0000 Subject: [PATCH 057/403] *** empty log message *** --- lispref/ChangeLog | 7 +++++++ src/ChangeLog | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 4022efed7ca..e70bb8e77c9 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,10 @@ +2006-05-25 Richard Stallman + + * elisp.texi (Top): Update subnode menu. + + * keymaps.texi (Keymap Basics): New node, split out of Key Sequences. + (Keymaps): Update menu. + 2006-05-25 Chong Yidong * keymaps.texi (Key Sequences): Some clarifications. diff --git a/src/ChangeLog b/src/ChangeLog index affda7614da..afdf48c6b7f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-25 Richard Stallman + + * emacs.c (main, Fdump_emacs): Don't test __linux or __linux__. + 2006-05-24 Luc Teirlinck * puresize.h (BASE_PURESIZE): Increase to 1210000. From f473c8d5af209f42c30bd32f34c466d8d85e1585 Mon Sep 17 00:00:00 2001 From: Rajesh Vaidheeswarran Date: Thu, 25 May 2006 18:09:25 +0000 Subject: [PATCH 058/403] whitespace.el - make whitesspace-cleanup use the current active regoin, if there is one. --- lisp/ChangeLog | 6 ++++++ lisp/whitespace.el | 15 ++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8daed2b8801..c36c59b1228 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-25 Rajesh Vaidheeswarran + * whitespace.el (whitespace-cleanup): change to cleanup + region if one is active + * whitespace.el (whitespace-cleanup-internal): new internal + method + 2006-05-25 Mathias Dahl * dired.el (dired-mode-map): Add help-echo strings to tumme diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 7f3cbd913ca..449606607f6 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -430,7 +430,7 @@ and: (if buffer-read-only (if (not quiet) (message "Can't cleanup: %s is read-only" (buffer-name))) - (whitespace-cleanup)) + (whitespace-cleanup-internal)) (let ((whitespace-leading (if whitespace-check-buffer-leading (whitespace-buffer-leading) nil)) @@ -520,6 +520,11 @@ and: "Cleanup the five different kinds of whitespace problems. See `whitespace-buffer' docstring for a summary of the problems." (interactive) + (if (and transient-mark-mode mark-active) + (whitespace-cleanup-region (region-beginning) (region-end)) + (whitespace-cleanup-internal))) + +(defun whitespace-cleanup-internal () ;; If this buffer really contains a file, then run, else quit. (whitespace-check-whitespace-mode current-prefix-arg) (if (and buffer-file-name whitespace-mode) @@ -563,7 +568,7 @@ See `whitespace-buffer' docstring for a summary of the problems." ;; Call this recursively till everything is taken care of (if whitespace-any - (whitespace-cleanup) + (whitespace-cleanup-internal) (progn (if (not whitespace-silent) (message "%s clean" buffer-file-name)) @@ -577,7 +582,7 @@ See `whitespace-buffer' docstring for a summary of the problems." (save-excursion (save-restriction (narrow-to-region s e) - (whitespace-cleanup)) + (whitespace-cleanup-internal)) (whitespace-buffer t))) (defun whitespace-buffer-leading () @@ -760,7 +765,7 @@ If timer is not set, then set it to scan the files in (if whitespace-auto-cleanup (progn ;;(message "cleaning up whitespace in %s" bufname) - (whitespace-cleanup)) + (whitespace-cleanup-internal)) (progn ;;(message "whitespace-buffer %s." (buffer-name)) (whitespace-buffer t)))) @@ -806,7 +811,7 @@ This is meant to be added buffer-locally to `write-file-functions'." (interactive) (let ((werr nil)) (if whitespace-auto-cleanup - (whitespace-cleanup) + (whitespace-cleanup-internal) (setq werr (whitespace-buffer))) (if (and whitespace-abort-on-error werr) (error (concat "Abort write due to whitespaces in " From f202a77d98bb64a76478ac1634c57f805f636df2 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 20:55:20 +0000 Subject: [PATCH 059/403] (%-Constructs): Add %e, %z, %Z. --- lispref/modes.texi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lispref/modes.texi b/lispref/modes.texi index 9e55ca847fc..7c4896d9532 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -1927,6 +1927,10 @@ The current buffer name, obtained with the @code{buffer-name} function. @item %c The current column number of point. +@item %e +When Emacs is nearly out of memory for Lisp objects, a brief message +saying so. Otherwise, this is empty. + @item %f The visited file name, obtained with the @code{buffer-file-name} function. @xref{Buffer File Name}. @@ -1972,6 +1976,12 @@ Whether the visited file is a text file or a binary file. This is a meaningful distinction only on certain operating systems (@pxref{MS-DOS File Types}). +@item %z +The mnemonics of buffer, terminal, and keyboard coding systems. + +@item %Z +Like @samp{%z}, but including the end-of-line format. + @item %* @samp{%} if the buffer is read only (see @code{buffer-read-only}); @* @samp{*} if the buffer is modified (see @code{buffer-modified-p}); @* From 2c9606674d6d457e958ccb04f1efdf12023b8d42 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 21:12:52 +0000 Subject: [PATCH 060/403] (Fread_from_minibuffer): Decrement number of args. --- src/lisp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lisp.h b/src/lisp.h index 4cf2a4fd539..e606024ea90 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2899,7 +2899,7 @@ extern void syms_of_search P_ ((void)); extern Lisp_Object last_minibuf_string; extern void choose_minibuf_frame P_ ((void)); EXFUN (Fcompleting_read, 8); -EXFUN (Fread_from_minibuffer, 8); +EXFUN (Fread_from_minibuffer, 7); EXFUN (Fread_variable, 2); EXFUN (Fread_buffer, 3); EXFUN (Fread_minibuffer, 2); From b35cd215140b3ebf63ef228dae501fb18ddd80cd Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 21:16:22 +0000 Subject: [PATCH 061/403] (read_minibuf): Remove arg KEEP_ALL. Callers changed. (Fread_from_minibuffer): Remove arg KEEP_ALL. Callers changed. --- src/minibuf.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/minibuf.c b/src/minibuf.c index d4938415a1c..ff56eca3241 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -219,7 +219,7 @@ static Lisp_Object read_minibuf P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, int, Lisp_Object, Lisp_Object, Lisp_Object, - int, int, int)); + int, int)); static Lisp_Object read_minibuf_noninteractive P_ ((Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, int, Lisp_Object, @@ -440,8 +440,7 @@ The current buffer must be a minibuffer. */) static Lisp_Object read_minibuf (map, initial, prompt, backup_n, expflag, - histvar, histpos, defalt, allow_props, inherit_input_method, - keep_all) + histvar, histpos, defalt, allow_props, inherit_input_method) Lisp_Object map; Lisp_Object initial; Lisp_Object prompt; @@ -452,7 +451,6 @@ read_minibuf (map, initial, prompt, backup_n, expflag, Lisp_Object defalt; int allow_props; int inherit_input_method; - int keep_all; { Lisp_Object val; int count = SPECPDL_INDEX (); @@ -747,7 +745,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, last_minibuf_string = val; /* Choose the string to add to the history. */ - if (SCHARS (val) != 0 || keep_all) + if (SCHARS (val) != 0) histstring = val; else if (STRINGP (defalt)) histstring = defalt; @@ -774,8 +772,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag, if (NILP (histval) || (CONSP (histval) /* Don't duplicate the most recent entry in the history. */ - && (keep_all - || NILP (Fequal (histstring, Fcar (histval)))))) + && (NILP (Fequal (histstring, Fcar (histval)))))) { Lisp_Object length; @@ -937,7 +934,7 @@ read_minibuf_unwind (data) } -DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 8, 0, +DEFUN ("read-from-minibuffer", Fread_from_minibuffer, Sread_from_minibuffer, 1, 7, 0, doc: /* Read a string from the minibuffer, prompting with string PROMPT. The optional second arg INITIAL-CONTENTS is an obsolete alternative to DEFAULT-VALUE. It normally should be nil in new code, except when @@ -961,8 +958,6 @@ Sixth arg DEFAULT-VALUE is the default value. If non-nil, it is available the empty string. Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits the current input method and the setting of `enable-multibyte-characters'. -Eight arg KEEP-ALL, if non-nil, says to put all inputs in the history list, - even empty or duplicate inputs. If the variable `minibuffer-allow-text-properties' is non-nil, then the string which is returned includes whatever text properties were present in the minibuffer. Otherwise the value has no text properties. @@ -978,9 +973,9 @@ POSITION in the minibuffer. Any integer value less than or equal to one puts point at the beginning of the string. *Note* that this behavior differs from the way such arguments are used in `completing-read' and some related functions, which use zero-indexing for POSITION. */) - (prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method, keep_all) +(prompt, initial_contents, keymap, read, hist, default_value, inherit_input_method) Lisp_Object prompt, initial_contents, keymap, read, hist, default_value; - Lisp_Object inherit_input_method, keep_all; + Lisp_Object inherit_input_method; { Lisp_Object histvar, histpos, val; struct gcpro gcpro1; @@ -1011,8 +1006,7 @@ and some related functions, which use zero-indexing for POSITION. */) Qnil, !NILP (read), histvar, histpos, default_value, minibuffer_allow_text_properties, - !NILP (inherit_input_method), - !NILP (keep_all)); + !NILP (inherit_input_method)); UNGCPRO; return val; } @@ -1029,7 +1023,7 @@ arguments are used as in `read-from-minibuffer') */) CHECK_STRING (prompt); return read_minibuf (Vminibuffer_local_map, initial_contents, prompt, Qnil, 1, Qminibuffer_history, - make_number (0), Qnil, 0, 0, 0); + make_number (0), Qnil, 0, 0); } DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0, @@ -1067,7 +1061,7 @@ Fifth arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits Lisp_Object val; val = Fread_from_minibuffer (prompt, initial_input, Qnil, Qnil, history, default_value, - inherit_input_method, Qnil); + inherit_input_method); if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (default_value)) val = default_value; return val; @@ -1089,7 +1083,7 @@ the current input method and the setting of`enable-multibyte-characters'. */) CHECK_STRING (prompt); return read_minibuf (Vminibuffer_local_ns_map, initial, prompt, Qnil, 0, Qminibuffer_history, make_number (0), Qnil, 0, - !NILP (inherit_input_method), 0); + !NILP (inherit_input_method)); } DEFUN ("read-command", Fread_command, Sread_command, 1, 2, 0, @@ -1778,7 +1772,7 @@ Completion ignores case if the ambient value of : Vminibuffer_local_must_match_filename_map), init, prompt, make_number (pos), 0, histvar, histpos, def, 0, - !NILP (inherit_input_method), 0); + !NILP (inherit_input_method)); if (STRINGP (val) && SCHARS (val) == 0 && ! NILP (def)) val = def; From dafbe726b89a36010f3f24bb1efe4ace0a5f7f0f Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 21:20:19 +0000 Subject: [PATCH 062/403] (mode-line-format): Fix docstring. --- src/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buffer.c b/src/buffer.c index f53f67ca2c2..722b9460a27 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5440,10 +5440,11 @@ A string is printed verbatim in the mode line except for %-constructs: %p -- print percent of buffer above top of window, or Top, Bot or All. %P -- print percent of buffer above bottom of window, perhaps plus Top, or print Bottom or All. - %m -- print the mode name. %n -- print Narrow if appropriate. + %t -- visited file is text or binary (if OS supports this distinction). %z -- print mnemonics of buffer, terminal, and keyboard coding systems. %Z -- like %z, but including the end-of-line format. + %e -- print error message about full memory. %[ -- print one [ for each recursive editing level. %] similar. %% -- print %. %- -- print infinitely many dashes. Decimal digits after the % specify field width to which to pad. */); From abeb5483f0881a2af8ec6d5792910dd1e86ac9df Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 21:34:01 +0000 Subject: [PATCH 063/403] *** empty log message *** --- lispref/ChangeLog | 6 +++++- src/ChangeLog | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index e70bb8e77c9..a7830e96b5c 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2006-05-25 Juri Linkov + + * modes.texi (%-Constructs): Add %e, %z, %Z. + 2006-05-25 Richard Stallman * elisp.texi (Top): Update subnode menu. @@ -535,7 +539,7 @@ 2005-12-23 Eli Zaretskii - * text.texi (Undo): Remove dupliate descriptions of `apply + * text.texi (Undo): Remove duplicate descriptions of `apply funname' and `apply delta' elements of the undo list. 2005-12-20 Richard M. Stallman diff --git a/src/ChangeLog b/src/ChangeLog index afdf48c6b7f..02d417a23dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2006-05-25 Juri Linkov + + * lisp.h (Fread_from_minibuffer): Decrement number of args. + + * minibuf.c (read_minibuf): Remove arg KEEP_ALL. Callers changed. + (Fread_from_minibuffer): Remove arg KEEP_ALL. Callers changed. + + * buffer.c (mode-line-format): Fix docstring. + 2006-05-25 Richard Stallman * emacs.c (main, Fdump_emacs): Don't test __linux or __linux__. From 22736b2df77fcc6b4819f257b351b3c91cd69848 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 25 May 2006 21:38:45 +0000 Subject: [PATCH 064/403] *** empty log message *** --- man/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 22b7213dc4a..582c00c3675 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-26 Nick Roberts + + * anti.texi (Antinews): Create a node for gdb-ui. + 2006-05-24 Carsten Dominik * org.texi: (Plain lists): Added new item navigation commands. From 6d10dc37bd65a8457b2b10283163b64b3bdc3991 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 25 May 2006 21:39:27 +0000 Subject: [PATCH 065/403] (Antinews): Create a node for gdb-ui. --- man/anti.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/man/anti.texi b/man/anti.texi index bfcd8badae0..9e925ec9e9c 100644 --- a/man/anti.texi +++ b/man/anti.texi @@ -263,7 +263,13 @@ macro. Use @kbd{M-x name-last-kbd-macro} to name the most recently defined macro. @item -The Calc, CUA, GDB-UI, Ibuffer, Ido, Password, Printing, Reveal, +Emacs no longer displays your breakpoints in the source buffer, so you +have to remember where you left them. It can be difficult to inspect +the state of your debugged program from the commamnd line, so Emacs +tries to demonstrate this in the GUD buffer. + +@item +The Calc, CUA, Ibuffer, Ido, Password, Printing, Reveal, Ruler-mode, SES, Table, Tramp, and URL packages have been removed. The Benchmark, Cfengine, Conf, Dns, Flymake, Python, Thumbs, and Wdired modes have also been removed. From d1802d7bfe418252c905a49dc3fa62442ba2e458 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 21:53:31 +0000 Subject: [PATCH 066/403] Remove KEEP-ALL argument of `read-from-minibuffer'. --- etc/NEWS | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e26184400d9..7a49130c201 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -759,7 +759,7 @@ 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. +elements are deleted from the history list. ** Redisplay changes: @@ -4349,10 +4349,6 @@ defaults to the current buffer. *** New function `minibuffer-selected-window' returns the window which was selected when entering the minibuffer. -+++ -*** `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 satisfy. The From 311f8bac681de42381779ab3c578ec071b8958e4 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 21:57:12 +0000 Subject: [PATCH 067/403] (query-replace-read-from, query-replace-read-to): Remove 8th arg KEEP-ALL in read-from-minibuffer. --- lisp/replace.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index f1792b499fc..305573ad0e5 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -113,7 +113,7 @@ wants to replace FROM with TO." (format "%s: " prompt)) nil nil nil query-replace-from-history-variable - nil t t)))) + nil t)))) (if (and (zerop (length from)) lastto lastfrom) (progn (set query-replace-from-history-variable @@ -180,7 +180,7 @@ the original string if not." (read-from-minibuffer (format "%s %s with: " prompt (query-replace-descr from)) nil nil nil - query-replace-to-history-variable from t t)) + query-replace-to-history-variable from t)) regexp-flag)) (defun query-replace-read-args (prompt regexp-flag &optional noerror) From 63d336640effbaa2ebc6d217bc70819d0897e595 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 22:57:50 +0000 Subject: [PATCH 068/403] (Text from Minibuffer): Undocument keep-all. --- lispref/minibuf.texi | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index f69cf03deac..2fca6cc04b8 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi @@ -110,7 +110,7 @@ middle of a Lisp function. Instead, do all minibuffer input as part of reading the arguments for a command, in the @code{interactive} specification. @xref{Defining Commands}. -@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method keep-all +@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method This function is the most general way to get input through the minibuffer. By default, it accepts arbitrary text and returns it as a string; however, if @var{read} is non-@code{nil}, then it uses @@ -162,9 +162,6 @@ the setting of @code{enable-multibyte-characters} (@pxref{Text Representations}) from whichever buffer was current before entering the minibuffer. -If @var{keep-all} is non-@code{nil}, even empty and duplicate inputs -are added to the history list. - Use of @var{initial-contents} is mostly deprecated; we recommend using a non-@code{nil} value only in conjunction with specifying a cons cell for @var{hist}. @xref{Initial Input}. From 92aa92fa3822b3ab87d15275c3198ed8af18a006 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 25 May 2006 23:00:43 +0000 Subject: [PATCH 069/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ lispref/ChangeLog | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c36c59b1228..a5b3f2b8014 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-25 Juri Linkov + + * replace.el (query-replace-read-from, query-replace-read-to): + Remove 8th arg KEEP-ALL in read-from-minibuffer. + 2006-05-25 Rajesh Vaidheeswarran * whitespace.el (whitespace-cleanup): change to cleanup region if one is active diff --git a/lispref/ChangeLog b/lispref/ChangeLog index a7830e96b5c..cab118b70ed 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,5 +1,7 @@ 2006-05-25 Juri Linkov + * minibuf.texi (Text from Minibuffer): Undocument keep-all. + * modes.texi (%-Constructs): Add %e, %z, %Z. 2006-05-25 Richard Stallman From ba13929931fbe5e179bf3ef552dda750300732d7 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 25 May 2006 23:15:57 +0000 Subject: [PATCH 070/403] (Fyes_or_no_p): Fread_from_minibuffer now takes only seven args. --- src/fns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fns.c b/src/fns.c index f1602f0a7fb..b31beb22ff4 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3429,7 +3429,7 @@ is nil, and `use-dialog-box' is non-nil. */) { ans = Fdowncase (Fread_from_minibuffer (prompt, Qnil, Qnil, Qnil, Qyes_or_no_p_history, Qnil, - Qnil, Qnil)); + Qnil)); if (SCHARS (ans) == 3 && !strcmp (SDATA (ans), "yes")) { UNGCPRO; From ae4c2a3be03eedf920c8a98e7b7860c1b0e0dafa Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 25 May 2006 23:17:17 +0000 Subject: [PATCH 071/403] (Fcall_interactively): Fread_from_minibuffer now takes only seven args. --- src/callint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/callint.c b/src/callint.c index 4789fb5582d..ae10e64e1de 100644 --- a/src/callint.c +++ b/src/callint.c @@ -730,7 +730,7 @@ If KEYS is omitted or nil, the return value of `this-command-keys' is used. */) tem = Fread_from_minibuffer (build_string (callint_message), Qnil, Qnil, Qnil, Qnil, Qnil, - Qnil, Qnil); + Qnil); if (! STRINGP (tem) || SCHARS (tem) == 0) args[i] = Qnil; else From d579f53bdd731b5d42fd6c74f0f7c00a2f7a87da Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 25 May 2006 23:22:25 +0000 Subject: [PATCH 072/403] *** empty log message *** --- src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 02d417a23dc..cc3f2e15915 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-05-25 Luc Teirlinck + + * fns.c (Fyes_or_no_p): + * callint.c (Fcall_interactively): Fread_from_minibuffer now takes + only seven args. + 2006-05-25 Juri Linkov * lisp.h (Fread_from_minibuffer): Decrement number of args. From 3165e4509a795c2a9204fda98fa3844fbfcde01a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 26 May 2006 03:33:32 +0000 Subject: [PATCH 073/403] * image.c (png_load): Don't call fclose on NULL. --- src/ChangeLog | 4 ++++ src/image.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index cc3f2e15915..857c7ae7eaf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-25 Chong Yidong + + * image.c (png_load): Don't call fclose on NULL. + 2006-05-25 Luc Teirlinck * fns.c (Fyes_or_no_p): diff --git a/src/image.c b/src/image.c index c317418326f..70ffabc1937 100644 --- a/src/image.c +++ b/src/image.c @@ -6104,7 +6104,6 @@ png_load (f, img) { image_error ("Cannot open image file `%s'", file, Qnil); UNGCPRO; - fclose (fp); return 0; } From 4d687160ec47448124bc93ab3aec2b24d49544c0 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 26 May 2006 03:34:33 +0000 Subject: [PATCH 074/403] * image-mode.el (image-toggle-display): Use buffer contents to generate image for a remote file. --- lisp/ChangeLog | 5 +++++ lisp/image-mode.el | 1 + 2 files changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5b3f2b8014..76f065bc747 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-25 Chong Yidong + + * image-mode.el (image-toggle-display): Use buffer contents to + generate image for a remote file. + 2006-05-25 Juri Linkov * replace.el (query-replace-read-from, query-replace-read-to): diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 1a55676e3c7..66d7fb6c16a 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -139,6 +139,7 @@ and showing the image as an image." ;; was inserted (let* ((image (if (and (buffer-file-name) + (not (file-remote-p (buffer-file-name))) (not (buffer-modified-p)) (not (and (boundp 'archive-superior-buffer) archive-superior-buffer)) From eb286ca8bb2a7dc617ad24573bf1c7a31e56e39b Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 May 2006 04:47:16 +0000 Subject: [PATCH 075/403] (po-find-charset): Pay attention to the case FILENAME is a cons (NAME . BUFFER). (po-find-file-coding-system-guts): Likewise. --- lisp/textmodes/po.el | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lisp/textmodes/po.el b/lisp/textmodes/po.el index 07b9ba1a2b1..eac1cb94105 100644 --- a/lisp/textmodes/po.el +++ b/lisp/textmodes/po.el @@ -41,15 +41,21 @@ Contains canonical charset names that don't correspond to coding systems.") (defun po-find-charset (filename) - "Return PO charset value for FILENAME." + "Return PO charset value for FILENAME. +If FILENAME is a cons, the cdr part is a buffer that already contains +the PO file (but not yet decoded)." (let ((charset-regexp "^\"Content-Type:[ \t]*text/plain;[ \t]*charset=\\(.*\\)\\\\n\"") + (buf (and (consp filename) (cdr filename))) (short-read nil)) + (when buf + (set-buffer buf) + (goto-char (point-min))) ;; Try the first 4096 bytes. In case we cannot find the charset value ;; within the first 4096 bytes (the PO file might start with a long ;; comment) try the next 4096 bytes repeatedly until we'll know for sure ;; we've checked the empty header entry entirely. - (while (not (or short-read (re-search-forward "^msgid" nil t))) + (while (not (or short-read (re-search-forward "^msgid" nil t) buf)) (save-excursion (goto-char (point-max)) (let ((pair (insert-file-contents-literally filename nil @@ -57,7 +63,7 @@ Contains canonical charset names that don't correspond to coding systems.") (1- (+ (point) 4096))))) (setq short-read (< (nth 1 pair) 4096))))) (cond ((re-search-forward charset-regexp nil t) (match-string 1)) - (short-read nil) + ((or short-read buf) nil) ;; We've found the first msgid; maybe, only a part of the msgstr ;; value was loaded. Load the next 1024 bytes; if charset still ;; isn't available, give up. @@ -71,10 +77,13 @@ Contains canonical charset names that don't correspond to coding systems.") (defun po-find-file-coding-system-guts (operation filename) "Return a (DECODING . ENCODING) pair for OPERATION on PO file FILENAME. -Do so according to FILENAME's declared charset." +Do so according to FILENAME's declared charset. +FILENAME may be a cons (NAME . BUFFER). In that case, detect charset +in BUFFER." (and (eq operation 'insert-file-contents) - (file-exists-p filename) + (or (if (consp filename) (buffer-live-p (cdr filename))) + (file-exists-p filename)) (with-temp-buffer (let* ((coding-system-for-read 'no-conversion) (charset (or (po-find-charset filename) "ascii")) From b87f5fcce9c1ad51f188b5c2fe17be5979b5010e Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 May 2006 04:47:25 +0000 Subject: [PATCH 076/403] (tar-extract): Call find-operation-coding-system with (FILENAME . BUFFER). --- lisp/tar-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index f24a91d4145..a02fd1b2ba9 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -736,7 +736,8 @@ appear on disk when you save the tar-file's buffer." (funcall set-auto-coding-function name (- (point-max) (point))))) (car (find-operation-coding-system - 'insert-file-contents name t)))) + 'insert-file-contents + (cons name (current-buffer)) t)))) (multibyte enable-multibyte-characters) (detected (detect-coding-region (point-min) From e0b582b8e1a36463483c76f85c43fd6bf2579885 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 May 2006 04:47:36 +0000 Subject: [PATCH 077/403] (archive-set-buffer-as-visiting-file): Call find-operation-coding-system with (FILENAME . BUFFER). --- lisp/arc-mode.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 0b016b981e2..500ad5ff5fa 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -876,8 +876,9 @@ using `make-temp-file', and the generated name is returned." ;; extracted file existed. (let ((file-name-handler-alist '(("" . archive-file-name-handler)))) - (car (find-operation-coding-system 'insert-file-contents - filename t)))))) + (car (find-operation-coding-system + 'insert-file-contents + (cons filename (current-buffer)) t)))))) (if (and (not coding-system-for-read) (not enable-multibyte-characters)) (setq coding From 47a355de933fe933c6e936ca5745a2bf3047d383 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 May 2006 04:47:47 +0000 Subject: [PATCH 078/403] (decode-coding-inserted-region): Call find-operation-coding-system with (FILENAME . BUFFER). --- lisp/international/mule.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 72198bb1258..b66345ea3a8 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1986,7 +1986,8 @@ Part of the job of this function is setting `buffer-undo-list' appropriately." (or coding (setq coding (car (find-operation-coding-system 'insert-file-contents - filename visit beg end replace)))) + (cons filename (current-buffer)) + visit beg end replace)))) (if (coding-system-p coding) (or enable-multibyte-characters (setq coding From a9e2078b7150478c5783a9ad82f7017fc93a7e69 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 May 2006 04:48:21 +0000 Subject: [PATCH 079/403] (Ffind_operation_coding_system): Allow (FILENAME . BUFFER) in TARGET. --- src/coding.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/coding.c b/src/coding.c index 478e119c003..5ef412a3619 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7457,7 +7457,7 @@ is selected as the TARGET. For example, if OPERATION does file I/O, whichever argument specifies the file name is TARGET. TARGET has a meaning which depends on OPERATION: - For file I/O, TARGET is a file name. + For file I/O, TARGET is a file name (except for the special case below). For process I/O, TARGET is a process name. For network I/O, TARGET is a service name or a port number @@ -7469,6 +7469,12 @@ or a function symbol to call. In the last case, we call the function with one argument, which is a list of all the arguments given to this function. +If OPERATION is `insert-file-contents', the argument corresponding to +TARGET may be a cons (FILENAME . BUFFER). In that case, FILENAME is a +file name to look up, and BUFFER is a buffer that already contains the +file (but not yet decoded). If a function is found as above, the +function must pay attention to this format of TARGET. + usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) (nargs, args) int nargs; @@ -7495,8 +7501,12 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) target_idx = make_number (4); target = args[XINT (target_idx) + 1]; if (!(STRINGP (target) + || (EQ (operation, Qinsert_file_contents) && CONSP (target) + && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) error ("Invalid argument %d", XINT (target_idx) + 1); + if (CONSP (target)) + target = XCAR (target); chain = ((EQ (operation, Qinsert_file_contents) || EQ (operation, Qwrite_region)) From e5307343bcceff290441ba1b5802e7e680487cc0 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 May 2006 04:57:26 +0000 Subject: [PATCH 080/403] (find-operation-coding-system): Mention the new argument format. --- etc/NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 7a49130c201..f4c6b2adbbf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3557,6 +3557,9 @@ w32-use-full-screen-buffer to t. * Incompatible Lisp Changes in Emacs 22.1 +** The function find-operation-coding-system accepts a cons (FILENAME +. BUFFER) in an argument correponding to the target. + --- ** The variables post-command-idle-hook and post-command-idle-delay have been removed. Use run-with-idle-timer instead. From f1c582b4f36feaa5d0c95d600b3b90e0878ebc52 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 May 2006 04:57:35 +0000 Subject: [PATCH 081/403] *** empty log message *** --- etc/ChangeLog | 5 +++++ lisp/ChangeLog | 15 +++++++++++++++ src/ChangeLog | 5 +++++ 3 files changed, 25 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 28c29402c75..854997e27d4 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Kenichi Handa + + * NEWS (find-operation-coding-system): Mention the new argument + format. + 2006-05-24 Carsten Dominik * orgcard.tex: (section{Motion}): Added the item navigation diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 76f065bc747..368b82408ce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2006-05-26 Kenichi Handa + + * textmodes/po.el (po-find-charset): Pay attention to the case + FILENAME is a cons (NAME . BUFFER). + (po-find-file-coding-system-guts): Likewise. + + * arc-mode.el (archive-set-buffer-as-visiting-file): Call + find-operation-coding-system with (FILENAME . BUFFER). + + * tar-mode.el (tar-extract): Call find-operation-coding-system + with (FILENAME . BUFFER). + + * international/mule.el (decode-coding-inserted-region): Call + find-operation-coding-system with (FILENAME . BUFFER). + 2006-05-25 Chong Yidong * image-mode.el (image-toggle-display): Use buffer contents to diff --git a/src/ChangeLog b/src/ChangeLog index 857c7ae7eaf..e375eae460d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Kenichi Handa + + * coding.c (Ffind_operation_coding_system): Allow (FILENAME + . BUFFER) in TARGET. + 2006-05-25 Chong Yidong * image.c (png_load): Don't call fclose on NULL. From 0730c5399b8f55b3f00c4e330b82a4169b9d1553 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 26 May 2006 05:35:42 +0000 Subject: [PATCH 082/403] (ASCII export): Omit command name. (HTML export): Add prefix to all lines in Local Variable example. (Acknowledgments): Typeset names in italics. --- man/org.texi | 173 ++++++++++++++++++++++++++------------------------- 1 file changed, 89 insertions(+), 84 deletions(-) diff --git a/man/org.texi b/man/org.texi index 6f8d4c329f2..3bd9ad69762 100644 --- a/man/org.texi +++ b/man/org.texi @@ -1,11 +1,11 @@ \input texinfo @c %**start of header -@c @setfilename org +@setfilename org @setfilename ../info/org -@settitle Org Mode Manual +@c @settitle Org Mode Manual -@set VERSION 4.33 +@set VERSION 4.34 @set DATE May 2006 @dircategory Emacs @@ -15,6 +15,7 @@ @c Version and Contact Info @set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/org/,maintainers webpage} +@set AUTHOR Carsten Dominik @set MAINTAINER Carsten Dominik @set MAINTAINEREMAIL @email{dominik@@science.uva.nl} @set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer} @@ -358,7 +359,7 @@ the file's name is. See also the variable @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 +or ideas about it, please contact the maintainer @value{MAINTAINER} at @value{MAINTAINEREMAIL}. For bug reports, please provide as much information as possible, @@ -2814,7 +2815,6 @@ Show the global TODO list. This collects the TODO items from all agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in @code{agenda-mode}, so there are commands to examine and manipulate the TODO entries directly from that buffer (@pxref{Agenda commands}). -@xref{Global TODO list}, for more information. @kindex C-c a T @item C-c a T Like the above, but allows selection of a specific TODO keyword. You can @@ -3166,7 +3166,7 @@ will be exported as itemized lists. If you want that transition to occur at a different level, specify it with a prefix argument. For example, @example -@kbd{C-1 C-c C-x a org-export-as-ascii} +@kbd{C-1 C-c C-x a} @end example @noindent @@ -3250,10 +3250,10 @@ end of the outline tree. For example: # Local Variables: # org-export-html-style: " " -# End: *** +# p @{font-weight: normal; color: gray; @} +# h1 @{color: black; @} +# " +# End: @end example Remember to execute @kbd{M-x normal-mode} after changing this to make @@ -3868,7 +3868,7 @@ lines into the buffer (@pxref{Summary of in-buffer settings}). Org-mode uses special lines in the buffer to define settings on a per-file basis. These lines start with a @samp{#+} followed by a keyword, a colon, and then individual words defining a setting. Several -settings words con be in the same line, but you can also have multiple +setting words can be in the same line, but you can also have multiple lines for the keyword. While these settings are described throughout the manual, here is a summary. After changing any of those lines in the buffer, press @kbd{C-c C-c} with the cursor still in the line to @@ -3912,7 +3912,7 @@ odd @r{allow only odd outline levels (1,3,...)} oddeven @r{allow all outline levels} @end example @item #+SEQ_TODO: #+TYP_TODO: -These lines that the TODO keywords and their interpretation in the +These lines set the TODO keywords and their interpretation in the current file. The corresponding variables are @code{org-todo-keywords} and @code{org-todo-interpretation}. @item #+TAGS: TAG1(c1) TAG2(c2) @@ -4489,7 +4489,7 @@ The exporters work well, but could be made more efficient. @cindex acknowledgments @cindex thanks -Org-mode was written by Carsten Dominik, who still maintains it at the +Org-mode was created by @value{AUTHOR}, who still maintains it at the Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}. The following people (in alphabetic order) have helped the development along with ideas, suggestions and patches. Many thanks to all of you, @@ -4497,88 +4497,93 @@ Org-mode would not be what it is without your input. @itemize @bullet @item -Thomas Baumann contributed the code for links to the MH-E email system. -@item -Alex Bochannek provided a patch for rounding time stamps. -@item -Charles Caves' suggestion sparked the implementation of templates for -Remember. -@item -Pavel Chalmoviansky influenced the agenda treatment of items with -specified time. -@item -Gregory Chenov patched support for lisp forms into table calculations -and improved XEmacs compatibility. -@item -Sacha Chua suggested to copy some linking code from Planner. -@item -Kees Dullemond inspired the use of narrowed tabled columns. -@item -Christian Egli converted the documentation into TeXInfo format, patched -CSS formatting into the HTML exporter, and inspired the agenda. -@item -Nic Ferrier contributed mailcap and XOXO support. -@item -Kai Grossjohann pointed out key-binding conflicts caused by Org-mode. -@item -Stefan Monnier provided a patch to keep the Emacs-Lisp compiler happy. -@item -Todd Neal provided patches for links to Info files and elisp forms. -@item -Tim O'Callaghan suggested in-file links, search options for -general file links, and TAGS. -@item -Oliver Oppitz suggested multi-state TODO items. -@item -Scott Otterson sparked the introduction of descriptive text for links, -among other things. -@item -Pete Phillips helped the development of the TAGS feature. -@item -T.V. Raman reported bugs and suggested improvements. -@item -Matthias Rempe (Oelde) provided ideas, Windows support, and quality -control. -@item -Kevin Rogers contributed code to access VM files on remote hosts. -@item -Frank Ruell solved the mystery of the @code{keymapp nil} bug, a conflict -with @file{allout.el}. -@item -Philip Rooke created the Org-mode reference card and provided lots of feedback. -@item -Christian Schlauer proposed angular brackets around links, among other -things. -@item -Linking to VM/BBDB/GNUS was inspired by Tom Shannon's -@file{organizer-mode.el}. -@item -David O'Toole wrote @file{org-publish.el} and came up with lots is ideas -for small changes. -@item -J@"urgen Vollmer contributed code generating the table of contents -in HTML output. -@item -Chris Wallace provided a patch implementing the @samp{QUOTE} keyword. -@item -David Wainberg suggested archiving, and improvements to the linking +@i{Thomas Baumann} contributed the code for links to the MH-E email system. @item -John Wiegley wrote @file{emacs-wiki.el} and @file{planner.el}. The +@i{Alex Bochannek} provided a patch for rounding time stamps. +@item +@i{Charles Cave}'s suggestion sparked the implementation of templates +for Remember. +@item +@i{Pavel Chalmoviansky} influenced the agenda treatment of items with +specified time. +@item +@i{Gregory Chenov} patched support for lisp forms into table +calculations and improved XEmacs compatibility. +@item +@i{Sacha Chua} suggested to copy some linking code from Planner. +@item +@i{Kees Dullemond} inspired the use of narrowed tabled columns. +@item +@i{Christian Egli} converted the documentation into TeXInfo format, +patched CSS formatting into the HTML exporter, and inspired the agenda. +@item +@i{Nic Ferrier} contributed mailcap and XOXO support. +@item +@i{Kai Grossjohann} pointed out key-binding conflicts caused by +Org-mode. +@item +@i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler +happy. +@item +@i{Todd Neal} provided patches for links to Info files and elisp forms. +@item +@i{Tim O'Callaghan} suggested in-file links, search options for general +file links, and TAGS. +@item +@i{Oliver Oppitz} suggested multi-state TODO items. +@item +@i{Scott Otterson} sparked the introduction of descriptive text for +links, among other things. +@item +@i{Pete Phillips} helped the development of the TAGS feature. +@item +@i{T.V. Raman} reported bugs and suggested improvements. +@item +@i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality +control. +@item +@i{Kevin Rogers} contributed code to access VM files on remote hosts. +@item +@i{Frank Ruell} solved the mystery of the @code{keymapp nil} bug, a +conflict with @file{allout.el}. +@item +@i{Philip Rooke} created the Org-mode reference card and provided lots +of feedback. +@item +@i{Christian Schlauer} proposed angular brackets around links, among +other things. +@item +Linking to VM/BBDB/GNUS was inspired by @i{Tom Shannon}'s +@file{organizer-mode.el}. +@item +@i{David O'Toole} wrote @file{org-publish.el} and came up with lots is +ideas for small changes. +@item +@i{J@"urgen Vollmer} contributed code generating the table of contents +in HTML output. +@item +@i{Chris Wallace} provided a patch implementing the @samp{QUOTE} +keyword. +@item +@i{David Wainberg} suggested archiving, and improvements to the linking +system. +@item +@i{John Wiegley} wrote @file{emacs-wiki.el} and @file{planner.el}. The development of Org-mode was fully independent, and both systems are really different beasts in their basic ideas and implementation details. I later looked at John's code, however, and learned from his implementation of (i) links where the link itself is hidden and only a description is shown, and (ii) popping up a calendar to select a date. @item -Carsten Wimmer suggested some changes and helped fix a bug in linking -to GNUS. +@i{Carsten Wimmer} suggested some changes and helped fix a bug in +linking to GNUS. @item -Roland Winkler requested additional keybindings to make Org-mode +@i{Roland Winkler} requested additional keybindings to make Org-mode work on a tty. @item -Piotr Zielinski wrote @file{org-mouse.el} and showed how to follow links -with mouse-1. +@i{Piotr Zielinski} wrote @file{org-mouse.el} and showed how to follow +links with mouse-1. @end itemize @node Index, Key Index, Miscellaneous, Top From 9fd4737345f760fe15d46de0a9f91a99a86ee13e Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 26 May 2006 05:37:27 +0000 Subject: [PATCH 083/403] *** empty log message *** --- lisp/ChangeLog | 11 +++++++++++ man/ChangeLog | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 368b82408ce..ce5cf60fcbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2006-05-26 Carsten Dominik + + * textmodes/org.el: (org-next-item, org-previous-item): Emit more + compact error message. + (org-tags-view): Refresh category table in each file. + (org-table-justify-field-maybe): Removed superfluous arguments to + `format'. + (org-export-as-html): Insert "

        " before postamble. + (org-paste-subtree, org-kill-is-subtree-p): Check for empty kill + ring. + 2006-05-26 Kenichi Handa * textmodes/po.el (po-find-charset): Pay attention to the case diff --git a/man/ChangeLog b/man/ChangeLog index 582c00c3675..66dc37c99ec 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,9 @@ +2006-05-26 Carsten Dominik + + * org.texi (ASCII export): Omit command name. + (HTML export): Add prefix to all lines in Local Variable example. + (Acknowledgments): Typeset names in italics. + 2006-05-26 Nick Roberts * anti.texi (Antinews): Create a node for gdb-ui. From f85d958a56ae7c9e8282b33ee844ffaaf9051924 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 26 May 2006 05:37:59 +0000 Subject: [PATCH 084/403] (org-next-item, org-previous-item): Emit more compact error message. (org-tags-view): Refresh category table in each file. (org-table-justify-field-maybe): Removed superfluous arguments to `format'. (org-export-as-html): Insert "

        " before postamble. (org-paste-subtree, org-kill-is-subtree-p): Check for empty kill ring. --- lisp/textmodes/org.el | 132 +++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 85 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index c7ac5bca365..dafbc92faa9 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 4.33 +;; Version: 4.34 ;; ;; This file is part of GNU Emacs. ;; @@ -30,16 +30,21 @@ ;; Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing ;; project planning with a fast and effective plain-text system. ;; -;; Org-mode develops organizational tasks around a NOTES file that contains -;; information about projects as plain text. Org-mode is implemented on top -;; of outline-mode - ideal to keep the content of large files well structured. -;; It supports ToDo items, deadlines and time stamps, which can be extracted -;; to create a daily/weekly agenda that also integrates the diary of the Emacs -;; calendar. Tables are easily created with a built-in table editor. Plain -;; text URL-like links connect to websites, emails (VM, RMAIL, WANDERLUST), -;; Usenet messages (Gnus), BBDB entries, and any files related to the -;; projects. For printing and sharing of notes, an Org-mode file (or a part -;; of it) can be exported as a structured ASCII file, or as HTML. +;; Org-mode develops organizational tasks around NOTES files that contain +;; information about projects as plain text. Org-mode is implemented on +;; top of outline-mode, which makes it possible to keep the content of +;; large files well structured. Visibility cycling and structure editing +;; help to work with the tree. Tables are easily created with a built-in +;; table editor. Org-mode supports ToDo items, deadlines, time stamps, +;; and scheduling. It dynamically compiles entries into an agenda that +;; utilizes and smoothly integrates much of the Emacs calendar and diary. +;; Plain text URL-like links connect to websites, emails, Usenet +;; messages, BBDB entries, and any files related to the projects. For +;; printing and sharing of notes, an Org-mode file can be exported as a +;; structured ASCII file, as HTML, or (todo and agenda items only) as an +;; iCalendar file. It can also serve as a publishing tool for a set of +;; linked webpages. +;; ;; ;; Installation ;; ------------ @@ -64,8 +69,11 @@ ;; ;; (require 'org-install) ;; -;; This setup will put all files with extension ".org" into Org-mode. As -;; an alternative, make the first line of a file look like this: +;; +;; Activation +;; ---------- +;; The setup above will put all files with extension ".org" into Org-mode. +;; As an alternative, make the first line of a file look like this: ;; ;; MY PROJECTS -*- mode: org; -*- ;; @@ -80,8 +88,11 @@ ;; excellent reference card made by Philip Rooke. This card can be found ;; in the etc/ directory of Emacs 22. ;; -;; Changes since version 4.10: -;; --------------------------- +;; Recent changes +;; -------------- +;; Version 4.34 +;; - Bug fixes. +;; ;; Version 4.33 ;; - New commands to move through plain lists: S-up and S-down. ;; - Bug fixes and documentation update. @@ -133,46 +144,6 @@ ;; - New option `org-agenda-todo-list-sublevels' to turn off listing TODO ;; entries that are sublevels of another TODO entry. ;; -;; Version 4.26 -;; - Bug fixes. -;; -;; Version 4.25 -;; - Revision of the font-lock faces section, with better tty support. -;; - TODO keywords in Agenda buffer are fontified. -;; - Export converts links between .org files to links between .html files. -;; - Better support for bold/italic/underline emphasis. -;; -;; Version 4.24 -;; - Bug fixes. -;; -;; Version 4.23 -;; - Bug fixes. -;; -;; Version 4.22 -;; - Bug fixes. -;; - In agenda buffer, mouse-1 no longer follows link. -;; See `org-agenda-mouse-1-follows-link' and `org-mouse-1-follows-link'. -;; -;; Version 4.20 -;; - Links use now the [[link][description]] format by default. -;; When inserting links, the user is prompted for a description. -;; - If a link has a description, only the description is displayed -;; the link part is hidden. Use C-c C-l to edit the link part. -;; - TAGS are now bold, but in the same color as the headline. -;; - The width of a table column can be limited by using a field "". -;; - New structure for the customization tree. -;; - Bug fixes. -;; -;; Version 4.13 -;; - The list of agenda files can be maintainted in an external file. -;; - Bug fixes. -;; -;; Version 4.12 -;; - Templates for remember buffer. Note that the remember setup changes. -;; To set up templates, see `org-remember-templates'. -;; - The time in new time stamps can be rounded, see new option -;; `org-time-stamp-rounding-minutes'. -;; - Bug fixes (there are *always* more bugs). ;; ;;; Code: @@ -183,13 +154,9 @@ (require 'time-date) (require 'easymenu) -(defvar calc-embedded-close-formula) ; defined by the calc package -(defvar calc-embedded-open-formula) ; defined by the calc package -(defvar font-lock-unfontify-region-function) ; defined by font-lock.el - ;;; Customization variables -(defvar org-version "4.33" +(defvar org-version "4.34" "The version number of the file org.el.") (defun org-version () (interactive) @@ -2548,17 +2515,20 @@ This face is only used if `org-fontify-done-headline' is set." (concat "\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string "\\)" - " *[[<]\\([^]>]+\\)[]>]") ;; FIXME: is this correct? + " *[[<]\\([^]>]+\\)[]>]") org-maybe-keyword-time-regexp (concat "\\(\\<\\(" org-scheduled-string "\\|" org-deadline-string "\\|" org-closed-string "\\)\\)?" - " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*?[]>]\\)")) ;; FIXME: is this correct? + " *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*?[]>]\\)")) (org-set-font-lock-defaults))) ;; Tell the compiler about dynamically scoped variables, ;; and variables from other packages +(defvar calc-embedded-close-formula) ; defined by the calc package +(defvar calc-embedded-open-formula) ; defined by the calc package +(defvar font-lock-unfontify-region-function) ; defined by font-lock.el (defvar zmacs-regions) ; XEmacs regions (defvar original-date) ; dynamically scoped in calendar (defvar org-old-auto-fill-inhibit-regexp) ; local variable used by `orgtbl-mode' @@ -3734,7 +3704,7 @@ If optional TREE is given, use this text instead of the kill ring." (error (substitute-command-keys "The kill is not a (set of) tree(s) - please use \\[yank] to yank anyway"))) - (let* ((txt (or tree (current-kill 0))) + (let* ((txt (or tree (and kill-ring (current-kill 0)))) (^re (concat "^\\(" outline-regexp "\\)")) (re (concat "\\(" outline-regexp "\\)")) (^re_ (concat "\\(" outline-regexp "\\)[ \t]*")) @@ -3797,7 +3767,8 @@ If optional TREE is given, use this text instead of the kill ring." (goto-char (point-min)) (message "Pasted at level %d, with shift by %d levels" new-level shift1))) - (if (and (eq org-subtree-clip (current-kill 0)) + (if (and kill-ring + (eq org-subtree-clip (current-kill 0)) org-subtree-clip-folded) ;; The tree was folded before it was killed/copied (hide-subtree)))) @@ -3809,8 +3780,9 @@ headline level is not the largest headline level in the tree. So this will actually accept several entries of equal levels as well, which is OK for `org-paste-subtree'. If optional TXT is given, check this string instead of the current kill." - (let* ((kill (or txt (current-kill 0) "")) - (start-level (and (string-match (concat "\\`" outline-regexp) kill) + (let* ((kill (or txt (and kill-ring (current-kill 0)) "")) + (start-level (and kill + (string-match (concat "\\`" outline-regexp) kill) (- (match-end 0) (match-beginning 0)))) (re (concat "^" outline-regexp)) (start 1)) @@ -3920,7 +3892,7 @@ Error if not at a plain list, or if this is the last item in the list." (setq ind1 (org-get-indentation)) (unless (and (org-at-item-p) (= ind ind1)) (goto-char pos) - (error "This is already the last item in the list")))) + (error "On last item")))) (defun org-previous-item () "Move to the beginning of the previous item in the current plain list. @@ -3941,7 +3913,7 @@ Error if not at a plain list, or if this is the last item in the list." (condition-case nil (org-beginning-of-item) (error (goto-char pos) - (error "This is already the first item in the list"))))) + (error "On first item"))))) (defun org-move-item-down () "Move the plain list item at point down, i.e. swap with following item. @@ -6434,7 +6406,7 @@ the documentation of `org-diary'." 'org-marker marker 'org-hd-marker marker 'priority priority 'category category) (push txt ee) - (if org-agenda-todo-list-sublevels ; FIXME???? Change needed? + (if org-agenda-todo-list-sublevels (goto-char (match-end 1)) (org-end-of-subtree 'invisible)))) (nreverse ee))) @@ -6793,13 +6765,6 @@ only the correctly processes TXT should be returned - this is used by (if s1 (setq s1 (org-get-time-of-day s1 'string))) (if s2 (setq s2 (org-get-time-of-day s2 'string)))) -; (when (and (or (eq org-agenda-remove-tags-when-in-prefix t) -; (and org-agenda-remove-tags-when-in-prefix -; org-prefix-has-tag)) -; (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" txt)) -; (setq txt (replace-match "" t t txt))) - - ;; FIXME!!! (when (string-match "\\([ \t]+\\)\\(:[a-zA-Z_@0-9:]+:\\)[ \t]*$" txt) ;; Tags are in the string (if (or (eq org-agenda-remove-tags-when-in-prefix t) @@ -7596,6 +7561,7 @@ The prefix arg TODO-ONLY limits the search to TODO entries." (with-current-buffer buffer (unless (eq major-mode 'org-mode) (error "Agenda file %s is not in `org-mode'" file)) + (setq org-category-table (org-get-category-table)) (save-excursion (save-restriction (if org-respect-restriction @@ -8116,7 +8082,7 @@ in all files." (org-search-not-link re4 nil t) (org-search-not-link re5 nil t) ) - (goto-char (match-beginning 1)) ;; Fixme: does every re have group 1? + (goto-char (match-beginning 1)) (goto-char pos) (error "No match"))))) (t @@ -9662,7 +9628,7 @@ Optional argument NEW may specify text to replace the current field content." n (format f s)) (if new (if (<= (length new) l) ;; FIXME: length -> str-width? - (setq n (format f new t t)) ;; FIXME: t t? + (setq n (format f new)) (setq n (concat new "|") org-table-may-need-update t))) (or (equal n o) (let (org-table-may-need-update) @@ -11021,9 +10987,6 @@ not overwrite the stored one." (org-table-get-vertical-vector (match-string 0 form) nil n0)) t t form))) -;; (setq ev (calc-eval (cons form modes) -;; FIXME (if org-table-formula-numbers-only 'num))) - (if lispp (setq ev (eval (eval (read form))) ev (if (numberp ev) (number-to-string ev) ev)) @@ -12761,7 +12724,8 @@ org-mode's default settings, but still inferior to file-local settings." ;; replace "&" by "&", "<" and ">" by "<" and ">" ;; handle @<..> HTML tags (replace "@>..<" by "<..>") - ;; Also handle sub_superscripts and checkboxes FIXME + ;; Also handle sub_superscripts and checkboxes + ;; FIXME: is there no better place for checkboxes (setq line (org-html-expand line)) ;; Format the links @@ -12940,6 +12904,7 @@ org-mode's default settings, but still inferior to file-local settings." head-count) (when (plist-get opt-plist :auto-postamble) + (insert "

        ") (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) (if email (insert (concat "<" email ">\n"))) @@ -13208,7 +13173,6 @@ stacked delimiters is N. Escaping delimiters is not possible." "\\(" (org-create-multibrace-regexp "(" ")" org-match-sexp-depth) "\\)" "\\|" "\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ \t\r\n,:\"?<>~;./{}=()]+\\)\\)\\)") -;;;;;;;;;;;;;;;;;;;;;;;;;^ FIXME "The regular expression matching a sub- or superscript.") (defun org-export-html-convert-sub-super (string) @@ -13258,7 +13222,6 @@ When TITLE is nil, just close all open levels." (if org-export-with-section-numbers (setq title (concat (org-section-number level) " " title))) (setq level (+ level 1)) - ;; FIXME: here we need to handle the tags, somehow. (when (string-match "\\(:[a-zA-Z0-9_@:]+:\\)[ \t]*$" title) (setq title (replace-match (if org-export-with-tags @@ -14684,6 +14647,5 @@ Show the heading too, if it is currently invisible." (run-hooks 'org-load-hook) - ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd ;;; org.el ends here From 438cb727a73f37bdf25feb91949713de325f7ba5 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 26 May 2006 05:38:50 +0000 Subject: [PATCH 085/403] Version number update --- etc/orgcard.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/orgcard.tex b/etc/orgcard.tex index 4922bff9317..2b553260db4 100644 --- a/etc/orgcard.tex +++ b/etc/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{4.33} +\def\orgversionnumber{4.34} \def\year{2006} % %**start of header From 07a7837c9f9412b09095ae79018c007b2a8fb10e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 26 May 2006 06:29:32 +0000 Subject: [PATCH 086/403] * sound.c (alsa_configure): Move get period/buffer_size after setting hwparams. --- src/ChangeLog | 5 +++++ src/sound.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e375eae460d..afad63728e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Jan Dj,Ad(Brv + + * sound.c (alsa_configure): Move get period/buffer_size after + setting hwparams. + 2006-05-26 Kenichi Handa * coding.c (Ffind_operation_coding_system): Allow (FILENAME diff --git a/src/sound.c b/src/sound.c index 2ceefd3bce3..6317b6c6279 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1019,6 +1019,9 @@ alsa_configure (sd) if ((err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val)) < 0) alsa_sound_perror ("Could not set channel count", err); + if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) + alsa_sound_perror ("Could not set parameters", err); + err = snd_pcm_hw_params_get_period_size (p->hwparams, &p->period_size, &dir); if (err < 0) @@ -1028,9 +1031,6 @@ alsa_configure (sd) if (err < 0) alsa_sound_perror("Unable to get buffer size for playback", err); - if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) - alsa_sound_perror ("Could not set parameters", err); - err = snd_pcm_sw_params_current (p->handle, p->swparams); if (err < 0) alsa_sound_perror ("Unable to determine current swparams for playback", From 7dd2e64c5d238be03c7968c68b2ef697288eadff Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 26 May 2006 08:31:36 +0000 Subject: [PATCH 087/403] (ewoc--current-dll): New var. (ewoc--node-next, ewoc--node-prev, ewoc--node-nth): Don't take DLL arg. Instead, use `ewoc--current-dll'. Update all callers. (ewoc--set-buffer-bind-dll-let*): Bind `ewoc--current-dll', not `dll'. (ewoc--adjust): Use `ewoc--current-dll'. (ewoc-next, ewoc-prev, ewoc-nth): Bind `ewoc--current-dll'. --- lisp/ChangeLog | 9 ++++ lisp/emacs-lisp/ewoc.el | 114 +++++++++++++++++++++------------------- 2 files changed, 69 insertions(+), 54 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce5cf60fcbb..ec6e6aab37e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2006-05-26 Thien-Thi Nguyen + + * emacs-lisp/ewoc.el (ewoc--current-dll): New var. + (ewoc--node-next, ewoc--node-prev, ewoc--node-nth): Don't take + DLL arg. Instead, use ewoc--current-dll. Update all callers. + (ewoc--set-buffer-bind-dll-let*): Bind ewoc--current-dll, not `dll'. + (ewoc--adjust): Use ewoc--current-dll. + (ewoc-next, ewoc-prev, ewoc-nth): Bind ewoc--current-dll. + 2006-05-26 Carsten Dominik * textmodes/org.el: (org-next-item, org-previous-item): Emit more diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 2cb90738072..6f14fb37cf5 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -134,7 +134,9 @@ ;; The doubly linked list is implemented as a circular list ;; with a dummy node first and last. The dummy node is used as -;; "the dll" (or rather is the dll handle passed around). +;; "the dll" (or rather the dynamically bound `ewoc--current-dll'). + +(defvar ewoc--current-dll) (defstruct (ewoc--node (:type vector) ;required for ewoc--node-branch hack @@ -146,29 +148,31 @@ \(fn NODE CHILD)") -(defun ewoc--node-next (dll node) +(defun ewoc--node-next (node) "Return the node after NODE, or nil if NODE is the last node." - (unless (eq (ewoc--node-right node) dll) (ewoc--node-right node))) + (let ((R (ewoc--node-right node))) + (unless (eq ewoc--current-dll R) R))) -(defun ewoc--node-prev (dll node) +(defun ewoc--node-prev (node) "Return the node before NODE, or nil if NODE is the first node." - (unless (eq (ewoc--node-left node) dll) (ewoc--node-left node))) + (let ((L (ewoc--node-left node))) + (unless (eq ewoc--current-dll L) L))) -(defun ewoc--node-nth (dll n) - "Return the Nth node from the doubly linked list DLL. -N counts from zero. If DLL is not that long, nil is returned. -If N is negative, return the -(N+1)th last element. -Thus, (ewoc--node-nth dll 0) returns the first node, -and (ewoc--node-nth dll -1) returns the last node." +(defun ewoc--node-nth (n) + "Return the Nth node from the doubly linked list `ewoc--current-dll'. +N counts from zero. If N is negative, return the -(N+1)th last element. +If N is out of range, return nil. +Thus, (ewoc--node-nth 0) returns the first node, +and (ewoc--node-nth -1) returns the last node." ;; Branch 0 ("follow left pointer") is used when n is negative. ;; Branch 1 ("follow right pointer") is used otherwise. (let* ((branch (if (< n 0) 0 1)) - (node (ewoc--node-branch dll branch))) + (node (ewoc--node-branch ewoc--current-dll branch))) (if (< n 0) (setq n (- -1 n))) - (while (and (not (eq dll node)) (> n 0)) + (while (and (not (eq ewoc--current-dll node)) (> n 0)) (setq node (ewoc--node-branch node branch)) (setq n (1- n))) - (unless (eq dll node) node))) + (unless (eq ewoc--current-dll node) node))) (defun ewoc-location (node) "Return the start location of NODE." @@ -186,13 +190,13 @@ and (ewoc--node-nth dll -1) returns the last node." (defmacro ewoc--set-buffer-bind-dll-let* (ewoc varlist &rest forms) "Execute FORMS with ewoc--buffer selected as current buffer, -dll bound to ewoc--dll, and VARLIST bound as in a let*. -dll will be bound when VARLIST is initialized, but the current -buffer will *not* have been changed. +`ewoc--current-dll' bound to the dll, and VARLIST bound as in a let*. +`ewoc--current-dll' will be bound when VARLIST is initialized, but +the current buffer will *not* have been changed. Return value of last form in FORMS." (let ((hnd (make-symbol "ewoc"))) `(let* ((,hnd ,ewoc) - (dll (ewoc--dll ,hnd)) + (ewoc--current-dll (ewoc--dll ,hnd)) ,@varlist) (with-current-buffer (ewoc--buffer ,hnd) ,@forms)))) @@ -213,14 +217,14 @@ BUT if it is the header or the footer in EWOC return nil instead." ;; BEG, to END. BEG and END are buffer positions describing NODE's left ;; neighbor. This operation is functionally equivalent to temporarily ;; setting these nodes' markers' insertion type to t around the pretty-print - ;; call that precedes the call to `ewoc-adjust', and then changing them back + ;; call that precedes the call to `ewoc--adjust', and then changing them back ;; to nil. (when (< beg end) (let (m) (while (and (= beg (setq m (ewoc--node-start-marker node))) (progn (set-marker m end) - (not (eq dll node)))) + (not (eq ewoc--current-dll node)))) (setq node (ewoc--node-right node)))))) (defun ewoc--insert-new-node (node data pretty-printer) @@ -306,20 +310,20 @@ respectively, of the ewoc." "Enter DATA first in EWOC. Return the new node." (ewoc--set-buffer-bind-dll ewoc - (ewoc-enter-after ewoc (ewoc--node-nth dll 0) data))) + (ewoc-enter-after ewoc (ewoc--node-nth 0) data))) (defun ewoc-enter-last (ewoc data) "Enter DATA last in EWOC. Return the new node." (ewoc--set-buffer-bind-dll ewoc - (ewoc-enter-before ewoc (ewoc--node-nth dll -1) data))) + (ewoc-enter-before ewoc (ewoc--node-nth -1) data))) (defun ewoc-enter-after (ewoc node data) "Enter a new element DATA after NODE in EWOC. Return the new node." (ewoc--set-buffer-bind-dll ewoc - (ewoc-enter-before ewoc (ewoc--node-next dll node) data))) + (ewoc-enter-before ewoc (ewoc--node-next node) data))) (defun ewoc-enter-before (ewoc node data) "Enter a new element DATA before NODE in EWOC. @@ -332,28 +336,30 @@ Return the new node." Return nil if NODE is nil or the last element." (when node (ewoc--filter-hf-nodes - ewoc (ewoc--node-next (ewoc--dll ewoc) node)))) + ewoc (let ((ewoc--current-dll (ewoc--dll ewoc))) + (ewoc--node-next node))))) (defun ewoc-prev (ewoc node) "Return the node in EWOC that precedes NODE. Return nil if NODE is nil or the first element." (when node (ewoc--filter-hf-nodes - ewoc - (ewoc--node-prev (ewoc--dll ewoc) node)))) + ewoc (let ((ewoc--current-dll (ewoc--dll ewoc))) + (ewoc--node-prev node))))) (defun ewoc-nth (ewoc n) "Return the Nth node. N counts from zero. Return nil if there is less than N elements. If N is negative, return the -(N+1)th last element. -Thus, (ewoc-nth dll 0) returns the first node, -and (ewoc-nth dll -1) returns the last node. +Thus, (ewoc-nth ewoc 0) returns the first node, +and (ewoc-nth ewoc -1) returns the last node. Use `ewoc-data' to extract the data from the node." ;; Skip the header (or footer, if n is negative). (setq n (if (< n 0) (1- n) (1+ n))) (ewoc--filter-hf-nodes ewoc - (ewoc--node-nth (ewoc--dll ewoc) n))) + (let ((ewoc--current-dll (ewoc--dll ewoc))) + (ewoc--node-nth n)))) (defun ewoc-map (map-function ewoc &rest args) "Apply MAP-FUNCTION to all elements in EWOC. @@ -370,12 +376,12 @@ arguments will be passed to MAP-FUNCTION." (ewoc--set-buffer-bind-dll-let* ewoc ((footer (ewoc--footer ewoc)) (pp (ewoc--pretty-printer ewoc)) - (node (ewoc--node-nth dll 1))) + (node (ewoc--node-nth 1))) (save-excursion (while (not (eq node footer)) (if (apply map-function (ewoc--node-data node) args) (ewoc--refresh-node pp node)) - (setq node (ewoc--node-next dll node)))))) + (setq node (ewoc--node-next node)))))) (defun ewoc-delete (ewoc &rest nodes) "Delete NODES from EWOC." @@ -387,7 +393,7 @@ arguments will be passed to MAP-FUNCTION." (if (eq (ewoc--last-node ewoc) node) (setf (ewoc--last-node ewoc) nil)) (delete-region (ewoc--node-start-marker node) - (ewoc--node-start-marker (ewoc--node-next dll node))) + (ewoc--node-start-marker (ewoc--node-next node))) (set-marker (ewoc--node-start-marker node) nil) (setf L (ewoc--node-left node) R (ewoc--node-right node) @@ -406,14 +412,14 @@ if it changes it. The PREDICATE is called with the element as its first argument. If any ARGS are given they will be passed to the PREDICATE." (ewoc--set-buffer-bind-dll-let* ewoc - ((node (ewoc--node-nth dll 1)) + ((node (ewoc--node-nth 1)) (footer (ewoc--footer ewoc)) (goodbye nil) (inhibit-read-only t)) (while (not (eq node footer)) (unless (apply predicate (ewoc--node-data node) args) (push node goodbye)) - (setq node (ewoc--node-next dll node))) + (setq node (ewoc--node-next node))) (apply 'ewoc-delete ewoc goodbye))) (defun ewoc-locate (ewoc &optional pos guess) @@ -430,22 +436,22 @@ If the EWOC is empty, nil is returned." (cond ;; Nothing present? - ((eq (ewoc--node-nth dll 1) (ewoc--node-nth dll -1)) + ((eq (ewoc--node-nth 1) (ewoc--node-nth -1)) nil) ;; Before second elem? - ((< pos (ewoc--node-start-marker (ewoc--node-nth dll 2))) - (ewoc--node-nth dll 1)) + ((< pos (ewoc--node-start-marker (ewoc--node-nth 2))) + (ewoc--node-nth 1)) ;; After one-before-last elem? - ((>= pos (ewoc--node-start-marker (ewoc--node-nth dll -2))) - (ewoc--node-nth dll -2)) + ((>= pos (ewoc--node-start-marker (ewoc--node-nth -2))) + (ewoc--node-nth -2)) ;; We now know that pos is within a elem. (t ;; Make an educated guess about which of the three known ;; node'es (the first, the last, or GUESS) is nearest. - (let* ((best-guess (ewoc--node-nth dll 1)) + (let* ((best-guess (ewoc--node-nth 1)) (distance (abs (- pos (ewoc--node-start-marker best-guess))))) (when guess (let ((d (abs (- pos (ewoc--node-start-marker guess))))) @@ -453,13 +459,13 @@ If the EWOC is empty, nil is returned." (setq distance d) (setq best-guess guess)))) - (let* ((g (ewoc--node-nth dll -1)) ;Check the last elem + (let* ((g (ewoc--node-nth -1)) ;Check the last elem (d (abs (- pos (ewoc--node-start-marker g))))) (when (< d distance) (setq distance d) (setq best-guess g))) - (when (ewoc--last-node ewoc) ;Check "previous". + (when (ewoc--last-node ewoc) ;Check "previous". (let* ((g (ewoc--last-node ewoc)) (d (abs (- pos (ewoc--node-start-marker g))))) (when (< d distance) @@ -476,14 +482,14 @@ If the EWOC is empty, nil is returned." (ewoc--node-start-marker best-guess)) ;; Loop until we are exactly one node too far down... (while (>= pos (ewoc--node-start-marker best-guess)) - (setq best-guess (ewoc--node-next dll best-guess))) + (setq best-guess (ewoc--node-next best-guess))) ;; ...and return the previous node. - (ewoc--node-prev dll best-guess)) + (ewoc--node-prev best-guess)) ;; Pos is before best-guess (t (while (< pos (ewoc--node-start-marker best-guess)) - (setq best-guess (ewoc--node-prev dll best-guess))) + (setq best-guess (ewoc--node-prev best-guess))) best-guess))))))) (defun ewoc-invalidate (ewoc &rest nodes) @@ -507,10 +513,10 @@ Return the node we moved to." (setq arg (1- arg))) (while (and node (> arg 0)) (setq arg (1- arg)) - (setq node (ewoc--node-prev dll node))) + (setq node (ewoc--node-prev node))) ;; Never step above the first element. (unless (ewoc--filter-hf-nodes ewoc node) - (setq node (ewoc--node-nth dll 1))) + (setq node (ewoc--node-nth 1))) (ewoc-goto-node ewoc node)))) (defun ewoc-goto-next (ewoc arg) @@ -520,10 +526,10 @@ Return the node (or nil if we just passed the last node)." ((node (ewoc-locate ewoc (point)))) (while (and node (> arg 0)) (setq arg (1- arg)) - (setq node (ewoc--node-next dll node))) + (setq node (ewoc--node-next node))) ;; Never step below the first element. ;; (unless (ewoc--filter-hf-nodes ewoc node) - ;; (setq node (ewoc--node-nth dll -2))) + ;; (setq node (ewoc--node-nth -2))) (ewoc-goto-node ewoc node))) (defun ewoc-goto-node (ewoc node) @@ -542,15 +548,15 @@ number of elements needs to be refreshed." (ewoc--set-buffer-bind-dll-let* ewoc ((footer (ewoc--footer ewoc))) (let ((inhibit-read-only t)) - (delete-region (ewoc--node-start-marker (ewoc--node-nth dll 1)) + (delete-region (ewoc--node-start-marker (ewoc--node-nth 1)) (ewoc--node-start-marker footer)) (goto-char (ewoc--node-start-marker footer)) (let ((pp (ewoc--pretty-printer ewoc)) - (node (ewoc--node-nth dll 1))) + (node (ewoc--node-nth 1))) (while (not (eq node footer)) (set-marker (ewoc--node-start-marker node) (point)) (funcall pp (ewoc--node-data node)) - (setq node (ewoc--node-next dll node))))) + (setq node (ewoc--node-next node))))) (set-marker (ewoc--node-start-marker footer) (point)))) (defun ewoc-collect (ewoc predicate &rest args) @@ -567,12 +573,12 @@ If more than two arguments are given the remaining arguments will be passed to PREDICATE." (ewoc--set-buffer-bind-dll-let* ewoc ((header (ewoc--header ewoc)) - (node (ewoc--node-nth dll -2)) + (node (ewoc--node-nth -2)) result) (while (not (eq node header)) (if (apply predicate (ewoc--node-data node) args) (push (ewoc--node-data node) result)) - (setq node (ewoc--node-prev dll node))) + (setq node (ewoc--node-prev node))) (nreverse result))) (defun ewoc-buffer (ewoc) From 85f92a48e10daee87f0c86206b33fc91887f45e9 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Fri, 26 May 2006 09:27:18 +0000 Subject: [PATCH 088/403] *** empty log message *** --- man/anti.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/anti.texi b/man/anti.texi index 9e925ec9e9c..0706bdda650 100644 --- a/man/anti.texi +++ b/man/anti.texi @@ -265,7 +265,7 @@ defined macro. @item Emacs no longer displays your breakpoints in the source buffer, so you have to remember where you left them. It can be difficult to inspect -the state of your debugged program from the commamnd line, so Emacs +the state of your debugged program from the command line, so Emacs tries to demonstrate this in the GUD buffer. @item From b3228584876d117a9d53095e4cff190f97fe8333 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Fri, 26 May 2006 12:40:59 +0000 Subject: [PATCH 089/403] (toggle-truncate-lines): Make arg optional for backward compatibility. --- lisp/ChangeLog | 5 +++++ lisp/simple.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ec6e6aab37e..7ebc95ccfd6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Reiner Steib + + * simple.el (toggle-truncate-lines): Make arg optional for + backward compatibility. + 2006-05-26 Thien-Thi Nguyen * emacs-lisp/ewoc.el (ewoc--current-dll): New var. diff --git a/lisp/simple.el b/lisp/simple.el index 2209603d91c..5d52d867beb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4247,7 +4247,7 @@ The variable `selective-display' has a separate value for each buffer." (defvaralias 'indicate-unused-lines 'indicate-empty-lines) (defvaralias 'default-indicate-unused-lines 'default-indicate-empty-lines) -(defun toggle-truncate-lines (arg) +(defun toggle-truncate-lines (&optional arg) "Toggle whether to fold or truncate long lines on the screen. With arg, truncate long lines iff arg is positive. Note that in side-by-side windows, truncation is always enabled." From 795c20df7a0e555ff9df8280c101636e88fb6c8c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 26 May 2006 15:18:28 +0000 Subject: [PATCH 090/403] * fileio.c (Fcopy_file): Delete argument MUSTBENEW. Incorporate the exclusive file-opening functionality into the behavior when OK-IF-ALREADY-EXISTS is nil. (Frename_file): Call Fcopy_file without MUSTBENEW argument. --- src/ChangeLog | 7 +++++++ src/fileio.c | 38 +++++++++++++++++--------------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index afad63728e7..a960ae6d7c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2006-05-26 Chong Yidong + + * fileio.c (Fcopy_file): Delete argument MUSTBENEW. Incorporate + the exclusive file-opening functionality into the behavior when + OK-IF-ALREADY-EXISTS is nil. + (Frename_file): Call Fcopy_file without MUSTBENEW argument. + 2006-05-26 Jan Dj,Ad(Brv * sound.c (alsa_configure): Move get period/buffer_size after diff --git a/src/fileio.c b/src/fileio.c index 12ce3c411e8..efad98298cf 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2404,32 +2404,31 @@ barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick) return; } -DEFUN ("copy-file", Fcopy_file, Scopy_file, 2, 6, +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. -Signals a `file-already-exists' error if file NEWNAME already exists, -unless a third argument OK-IF-ALREADY-EXISTS is supplied and non-nil. -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. + +This function always sets the file modes of the output file to match +the input file. + +The optional third argument OK-IF-ALREADY-EXISTS specifies what to do +if file NEWNAME already exists. If OK-IF-ALREADY-EXISTS is nil, we +signal a `file-already-exists' error without overwriting. If +OK-IF-ALREADY-EXISTS is a number, we request confirmation from the user +about overwriting; this is what happens in interactive use with M-x. +Any other value for OK-IF-ALREADY-EXISTS means to overwrite the +existing 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. -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. - If PRESERVE-UID-GID is non-nil, we try to transfer the uid and gid of FILE to NEWNAME. */) - (file, newname, ok_if_already_exists, keep_time, mustbenew, preserve_uid_gid) - Lisp_Object file, newname, ok_if_already_exists, keep_time, mustbenew; + (file, newname, ok_if_already_exists, keep_time, preserve_uid_gid) + Lisp_Object file, newname, ok_if_already_exists, keep_time; Lisp_Object preserve_uid_gid; { int ifd, ofd, n; @@ -2446,9 +2445,6 @@ uid and gid of FILE to NEWNAME. */) 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 @@ -2551,12 +2547,12 @@ uid and gid of FILE to NEWNAME. */) /* System's default file type was set to binary by _fmode in emacs.c. */ ofd = emacs_open (SDATA (encoded_newname), O_WRONLY | O_TRUNC | O_CREAT - | (EQ (mustbenew, Qexcl) ? O_EXCL : 0), + | (NILP (ok_if_already_exists) ? 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), + | (NILP (ok_if_already_exists) ? O_EXCL : 0), 0666); #endif /* not MSDOS */ #endif /* VMS */ @@ -2801,7 +2797,7 @@ This is what happens in interactive use with M-x. */) /* 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, Qnil, Qt); + Qt, Qt); Fdelete_file (file); } From 920e95c0c35e32c0e497403d83bc91b70373f996 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 26 May 2006 15:21:21 +0000 Subject: [PATCH 091/403] * files.el (backup-buffer-copy): Remove deleted MUSTBENEW argument to copy-file. --- lisp/ChangeLog | 5 +++++ lisp/files.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7ebc95ccfd6..94cffb889dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Chong Yidong + + * files.el (backup-buffer-copy): Remove deleted MUSTBENEW argument + to copy-file. + 2006-05-26 Reiner Steib * simple.el (toggle-truncate-lines): Make arg optional for diff --git a/lisp/files.el b/lisp/files.el index 2eaeae5ac86..8ecd57a4d24 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2994,7 +2994,7 @@ BACKUPNAME is the backup file name, which is the old file renamed." (condition-case nil (delete-file to-name) (file-error nil)) - (copy-file from-name to-name t t 'excl) + (copy-file from-name to-name nil t) nil) (file-already-exists t)) ;; The file was somehow created by someone else between From f9184978f67016e85db2181ee2bcc61a160ea7c7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 26 May 2006 15:22:24 +0000 Subject: [PATCH 092/403] MUSTBENEW cleanup done. --- admin/FOR-RELEASE | 2 -- 1 file changed, 2 deletions(-) diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 5a8ec3fe8bb..9c76bae9ea7 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -45,8 +45,6 @@ and KDE projects, to use the new Emacs icons in etc/images/icons. ** We need a way a Lisp file encoded in iso-2022 can assure reliable decoding regardless of user options. -** Clean up MUSTBENEW in Fcopy_file. - ** JD Smith's 17 Apr 2006 bug report that CVS operations get mysterious unreproducible failures. From a8dc674f5f0842870c3f5121f2af7ad82d7237e2 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Fri, 26 May 2006 16:44:53 +0000 Subject: [PATCH 093/403] (comint-kill-whole-line): Rename arg to count. Fix doc string. --- lisp/ChangeLog | 5 +++++ lisp/comint.el | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 94cffb889dd..b5d0653be1b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Reiner Steib + + * comint.el (comint-kill-whole-line): Rename arg to count. Fix + doc string. + 2006-05-26 Chong Yidong * files.el (backup-buffer-copy): Remove deleted MUSTBENEW argument diff --git a/lisp/comint.el b/lisp/comint.el index 1b9d8df738f..20b7817b9dc 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2357,19 +2357,19 @@ preceding newline is removed." (when (eq (get-text-property (1- pt) 'read-only) 'fence) (remove-list-of-text-properties (1- pt) pt '(read-only))))))) -(defun comint-kill-whole-line (&optional arg) +(defun comint-kill-whole-line (&optional count) "Kill current line, ignoring read-only and field properties. -With prefix arg, kill that many lines starting from the current line. -If arg is negative, kill backward. Also kill the preceding newline, +With prefix arg COUNT, kill that many lines starting from the current line. +If COUNT is negative, kill backward. Also kill the preceding newline, instead of the trailing one. \(This is meant to make \\[repeat] work well with negative arguments.) -If arg is zero, kill current line but exclude the trailing newline. +If COUNT is zero, kill current line but exclude the trailing newline. The read-only status of newlines is updated with `comint-update-fence', if necessary." (interactive "p") (let ((inhibit-read-only t) (inhibit-field-text-motion t)) - (kill-whole-line arg) - (when (>= arg 0) (comint-update-fence)))) + (kill-whole-line count) + (when (>= count 0) (comint-update-fence)))) (defun comint-kill-region (beg end &optional yank-handler) "Like `kill-region', but ignores read-only properties, if safe. From bd93e3e1aa80960b2c6f49faab96751f456aa6f9 Mon Sep 17 00:00:00 2001 From: Jonathan Yavner Date: Fri, 26 May 2006 17:39:06 +0000 Subject: [PATCH 094/403] * ses.el (defadvice undo-more): Delete this defadvice. The undo overrides will now be done a different way. (ses-set-parameter): Reapply this function for undo. (ses-set-header-row): Reconstruct header row during undo. (ses-widen): New function. (ses-goto-data, ses-reconstruct-all): Use new function. (ses-command-hook): Widen buffer during undo, before unupdating the cells. (ses-insert-row, ses-delete-row): Widen buffer during undo. (ses-load, ses-header-row): Permit empty (zero-row) spreadsheets. (ses-read-cell): Avoid stupid warning for RET RET on a cell whose formula hasn't been executed yet. --- lisp/ChangeLog | 15 ++++++++++ lisp/ses.el | 81 ++++++++++++++++++++++++++------------------------ 2 files changed, 57 insertions(+), 39 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b5d0653be1b..4c8177f51f7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2006-05-26 Jonathan Yavner + + * ses.el (defadvice undo-more): Delete this defadvice. The undo + overrides will now be done a different way. + (ses-set-parameter): Reapply this function for undo. + (ses-set-header-row): Reconstruct header row during undo. + (ses-widen): New function. + (ses-goto-data, ses-reconstruct-all): Use new function. + (ses-command-hook): Widen buffer during undo, before unupdating + the cells. + (ses-insert-row, ses-delete-row): Widen buffer during undo. + (ses-load, ses-header-row): Permit empty (zero-row) spreadsheets. + (ses-read-cell): Avoid stupid warning for RET RET on a cell whose + formula hasn't been executed yet. + 2006-05-26 Reiner Steib * comint.el (comint-kill-whole-line): Rename arg to count. Fix diff --git a/lisp/ses.el b/lisp/ses.el index debb22d84db..fc594167187 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -399,7 +399,7 @@ for safety. This is a macro to prevent propagate-on-load viruses." (defmacro ses-header-row (row) "Load the header row from the spreadsheet file and checks it for safety. This is a macro to prevent propagate-on-load viruses." - (or (and (wholenump row) (< row ses--numrows)) + (or (and (wholenump row) (or (zerop ses--numrows) (< row ses--numrows))) (error "Bad header-row")) (setq ses--header-row row) t) @@ -940,14 +940,18 @@ cell (ROW,COL) has changed." (defun ses-narrowed-p () (/= (- (point-max) (point-min)) (buffer-size))) +(defun ses-widen () + "Turn off narrowing, to be reenabled at end of command loop." + (if (ses-narrowed-p) + (setq ses--deferred-narrow t)) + (widen)) + (defun ses-goto-data (def &optional col) "Move point to data area for (DEF,COL). If DEF is a row number, COL is the column number for a data cell -- otherwise DEF is one of the symbols ses--col-widths, ses--col-printers, ses--default-printer, ses--numrows, or ses--numcols." - (if (ses-narrowed-p) - (setq ses--deferred-narrow t)) - (widen) + (ses-widen) (let ((inhibit-point-motion-hooks t)) ;In case intangible attrs are wrong (goto-char (point-min)) (if col @@ -966,9 +970,6 @@ If ELEM is specified, it is the array subscript within DEF to be set to VALUE." ;;We call ses-goto-data early, using the old values of numrows and ;;numcols in case one of them is being changed. (ses-goto-data def) - (if elem - (ses-aset-with-undo (symbol-value def) elem value) - (ses-set-with-undo def value)) (let ((inhibit-read-only t) (fmt (plist-get '(ses--col-widths "(ses-column-widths %S)" ses--col-printers "(ses-column-printers %S)" @@ -977,9 +978,20 @@ If ELEM is specified, it is the array subscript within DEF to be set to VALUE." ses--file-format " %S ;SES file-format" ses--numrows " %S ;numrows" ses--numcols " %S ;numcols") - def))) - (delete-region (point) (line-end-position)) - (insert (format fmt (symbol-value def)))))) + def)) + oldval) + (if elem + (progn + (setq oldval (aref (symbol-value def) elem)) + (aset (symbol-value def) elem value)) + (setq oldval (symbol-value def)) + (set def value)) + ;;Special undo since it's outside the narrowed buffer + (let (buffer-undo-list) + (delete-region (point) (line-end-position)) + (insert (format fmt (symbol-value def)))) + (push `(apply ses-set-parameter ,def ,oldval ,elem) buffer-undo-list)))) + (defun ses-write-cells () "Write cells in `ses--deferred-write' from local variables to data area. @@ -1278,23 +1290,6 @@ to each symbol." ;; Undo control ;;---------------------------------------------------------------------------- -;; This should be unnecessary, because the feature is now built in. - -(defadvice undo-more (around ses-undo-more activate preactivate) - "For SES mode, allow undo outside of narrowed buffer range." - (if (not (eq major-mode 'ses-mode)) - ad-do-it - ;;Here is some extra code for SES mode. - (setq ses--deferred-narrow - (or ses--deferred-narrow (ses-narrowed-p))) - (widen) - (condition-case x - ad-do-it - (error - ;;Restore narrow if appropriate - (ses-command-hook) - (signal (car x) (cdr x)))))) - (defun ses-begin-change () "For undo, remember point before we start changing hidden stuff." (let ((inhibit-read-only t)) @@ -1303,7 +1298,7 @@ to each symbol." (defun ses-set-with-undo (sym newval) "Like set, but undoable. Result is t if value has changed." - ;;We avoid adding redundant entries to the undo list, but this is + ;;We try to avoid adding redundant entries to the undo list, but this is ;;unavoidable for strings because equal ignores text properties and there's ;;no easy way to get the whole property list to see if it's different! (unless (and (boundp sym) @@ -1346,7 +1341,7 @@ execute cell formulas or print functions." (or (and (= (safe-length params) 3) (numberp (car params)) (numberp (cadr params)) - (> (cadr params) 0) + (>= (cadr params) 0) (numberp (nth 2 params)) (> (nth 2 params) 0)) (error "Invalid SES file")) @@ -1568,11 +1563,12 @@ narrows the buffer now." (let ((old ses--deferred-recalc)) (setq ses--deferred-recalc nil) (ses-update-cells old))) - (if ses--deferred-write - ;;We don't reset the deferred list before starting -- the most - ;;likely error is keyboard-quit, and we do want to keep trying - ;;these writes after a quit. - (ses-write-cells)) + (when ses--deferred-write + ;;We don't reset the deferred list before starting -- the most + ;;likely error is keyboard-quit, and we do want to keep trying + ;;these writes after a quit. + (ses-write-cells) + (push '(apply ses-widen) buffer-undo-list)) (when ses--deferred-narrow ;;We're not allowed to narrow the buffer until after-find-file has ;;read the local variables at the end of the file. Now it's safe to @@ -1794,9 +1790,7 @@ cells." (cons (ses-cell-symbol row col) (ses-cell-references yrow ycol))))))) ;;Delete everything and reconstruct basic data area - (if (ses-narrowed-p) - (setq ses--deferred-narrow t)) - (widen) + (ses-widen) (let ((inhibit-read-only t)) (goto-char (point-max)) (if (search-backward ";; Local Variables:\n" nil t) @@ -1877,7 +1871,9 @@ cell formula was unsafe and user declined confirmation." ses-mode-edit-map t ;Convert to Lisp object 'ses-read-cell-history - (prin1-to-string curval))))) + (prin1-to-string (if (eq (car-safe curval) 'ses-safe-formula) + (cadr curval) + curval)))))) (when (ses-edit-cell row col newval) (ses-command-hook) ;Update cell widths before movement (dolist (x ses-after-entry-functions) @@ -2073,6 +2069,8 @@ before current one." (ses-reset-header-string))) ;;Reconstruct text attributes (ses-setup) + ;;Prepare for undo + (push '(apply ses-widen) buffer-undo-list) ;;Return to current cell (if ses--curcell (ses-jump-safe ses--curcell) @@ -2109,6 +2107,8 @@ current one." (ses-reset-header-string))) ;;Reconstruct attributes (ses-setup) + ;;Prepare for undo + (push '(apply ses-widen) buffer-undo-list) (ses-jump-safe ses--curcell)) (defun ses-insert-column (count &optional col width printer) @@ -2643,7 +2643,10 @@ The top row is row 1. Selecting row 0 displays the default header row." (if (or (< row 0) (> row ses--numrows)) (error "Invalid header-row")) (ses-begin-change) - (ses-set-parameter 'ses--header-row row) + (let ((oldval ses--header-row)) + (let (buffer-undo-list) + (ses-set-parameter 'ses--header-row row)) + (push `(apply ses-set-header-row ,oldval) buffer-undo-list)) (ses-reset-header-string)) (defun ses-mark-row () From ecf783fadafe5bb6ea3a80abfa6380703ce9b2dc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 18:45:09 +0000 Subject: [PATCH 095/403] (main) [PROFILING]: Enable also for __MINGW32__. [__MINGW32__]: MinGW-specific declaration of `etext'. --- src/emacs.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index e02a586b31e..1e817112f48 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1749,16 +1749,21 @@ main (argc, argv #endif } - /* Set up for profiling. This is known to work on FreeBSD and - GNU/Linux. It might work on some other systems too. Give it a - try and tell us if it works on your system. To compile for - profiling use something like `make CFLAGS="-pg -g -O -DPROFILING=1'. */ -#if defined (__FreeBSD__) || defined (GNU_LINUX) + /* Set up for profiling. This is known to work on FreeBSD, + GNU/Linux and MinGW. It might work on some other systems too. + Give it a try and tell us if it works on your system. To compile + for profiling use something like: + `make CFLAGS="-pg -g -O -DPROFILING=1'. */ +#if defined (__FreeBSD__) || defined (GNU_LINUX) || defined(__MINGW32__) #ifdef PROFILING if (initialized) { extern void _mcleanup (); +#ifdef __MINGW32__ + extern unsigned char etext asm ("etext"); +#else extern char etext; +#endif extern void safe_bcopy (); extern void dump_opcode_frequencies (); From 3851cada29f1ff4e5b5d2987b6dbfd972faac849 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 18:45:35 +0000 Subject: [PATCH 096/403] (etext, edata): Remove unused definitions. --- src/w32heap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/w32heap.c b/src/w32heap.c index f1fa196abe7..e1bdd867721 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -42,10 +42,6 @@ OSVERSIONINFO osinfo_cache; unsigned long syspage_mask = 0; -/* These are defined to get Emacs to compile, but are not used. */ -int edata; -int etext; - /* The major and minor versions of NT. */ int w32_major_version; int w32_minor_version; From fb5614e82d7acf6a7e2eb90477a5203a49450810 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 19:11:45 +0000 Subject: [PATCH 097/403] (list-buffers-noselect): For Info buffers, use Info-current-file as the file name. --- lisp/buff-menu.el | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 3094da3bfe8..4998c1edf07 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -116,6 +116,8 @@ This variable determines whether reverting the buffer lists only file buffers. It affects both manual reverting and reverting by Auto Revert Mode.") +(defvar Info-current-file) ;; from info.el + (make-variable-buffer-local 'Buffer-menu-files-only) (if Buffer-menu-mode-map @@ -767,10 +769,24 @@ For more information, see the function `buffer-menu'." ?\s))) (unless file ;; No visited file. Check local value of - ;; list-buffers-directory. - (when (and (boundp 'list-buffers-directory) - list-buffers-directory) - (setq file list-buffers-directory))) + ;; list-buffers-directory and, for Info buffers, + ;; Info-current-file. + (cond ((and (boundp 'list-buffers-directory) + list-buffers-directory) + (setq file list-buffers-directory)) + ((eq major-mode 'Info-mode) + (setq file Info-current-file) + (cond + ((eq file t) + (setq file "*Info Directory*")) + ((eq file 'apropos) + (setq file "*Info Apropos*")) + ((eq file 'history) + (setq file "*Info History*")) + ((eq file 'toc) + (setq file "*Info TOC*")) + ((not (stringp file)) ;; avoid errors + (setq file nil)))))) (push (list buffer bits name (buffer-size) mode file) list)))))) ;; Preserve the original buffer-list ordering, just in case. From 0f7078f033a077cb3a0b7e287cb0d5424d60675e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 19:12:23 +0000 Subject: [PATCH 098/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ src/ChangeLog | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c8177f51f7..04bcbcb849b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Eli Zaretskii + + * buff-menu.el (list-buffers-noselect): For Info buffers, use + Info-current-file as the file name. + 2006-05-26 Jonathan Yavner * ses.el (defadvice undo-more): Delete this defadvice. The undo diff --git a/src/ChangeLog b/src/ChangeLog index a960ae6d7c8..de8a22a0201 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2006-05-26 Eli Zaretskii + + * emacs.c (main) [PROFILING]: Enable also for __MINGW32__. + [__MINGW32__]: MinGW-specific declaration of `etext'. + + * w32heap.c (etext, edata): Remove unused definitions. + 2006-05-26 Chong Yidong * fileio.c (Fcopy_file): Delete argument MUSTBENEW. Incorporate From 038783e6fc602bb2dc181561f6949389f6484a12 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 19:32:02 +0000 Subject: [PATCH 099/403] (Coding Conventions): Advise against using eval-after-load in packages. Add an index entry. --- lispref/tips.texi | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lispref/tips.texi b/lispref/tips.texi index 889ac3e6a6d..8447a779ea0 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi @@ -35,6 +35,7 @@ all. @node Coding Conventions @section Emacs Lisp Coding Conventions +@cindex coding conventions in Emacs Lisp Here are conventions that you should follow when writing Emacs Lisp code intended for widespread use: @@ -52,9 +53,9 @@ don't postpone it. @item Since all global variables share the same name space, and all functions share another name space, you should choose a short word to -distinguish your program from other Lisp programs.@footnote{The +distinguish your program from other Lisp programs@footnote{The benefits of a Common Lisp-style package system are considered not to -outweigh the costs.} Then take care to begin the names of all global +outweigh the costs.}. Then take care to begin the names of all global variables, constants, and functions in your program with the chosen prefix. This helps avoid name conflicts. @@ -175,7 +176,17 @@ compatibility issues. @item Redefining (or advising) an Emacs primitive is discouraged. It may do the right thing for a particular program, but there is no telling what -other programs might break as a result. +other programs might break as a result. In any case, it is a +maintenance burden because the two packages become highly dependent on +each other. + +@item +Likewise, avoid using @code{eval-after-load} (@pxref{Hooks for +Loading}) in libraries and packages. This feature is meant for +personal customizations; using it in a Lisp package increases the +coupling between it and the package mentioned in +@code{eval-after-load}, and thus makes it harder to maintain the two +packages independently. @item If a file does replace any of the functions or library programs of From 28b257dc4c8ba15a4045b13884054d8e626063cd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 19:41:22 +0000 Subject: [PATCH 100/403] Remove 'tiny change' labels from Michael Cadilhac's changes. --- lisp/ChangeLog | 12 ++++++------ src/ChangeLog | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04bcbcb849b..6c630d3a2f9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -346,7 +346,7 @@ have non-nil values. Speed up by using add-to-list instead of manual consing. -2006-05-20 Micha,Ak(Bl Cadilhac (tiny change) +2006-05-20 Micha,Ak(Bl Cadilhac * progmodes/make-mode.el (makefile-mode): Doc fix. @@ -911,7 +911,7 @@ reference to the Lisp manual to the warning about pure space overflow. -2006-05-05 Micha,Ak(Bl Cadilhac (tiny change) +2006-05-05 Micha,Ak(Bl Cadilhac * textmodes/ispell.el (ispell-buffer-local-dict): Add a `no-reload' argument to avoid the call to `ispell-internal-change-dictionary' @@ -1771,7 +1771,7 @@ * files.el (hack-local-variables-confirm) : Clarify message text. Suggested by Ralf Angeli. -2006-04-08 Michael Cadilhac (tiny change) +2006-04-08 Michael Cadilhac * rect.el (kill-rectangle): Don't barf if `kill-read-only-ok' is set. (delete-extract-rectangle-line): Use `filter-buffer-substring' @@ -8599,7 +8599,7 @@ since the last ping. (rcirc-mode): Give rcirc-topic a local binding here. -2005-11-19 Michael Cadilhac (tiny change) +2005-11-19 Michael Cadilhac * subr.el (read-passwd): Fontify the prompt as we do with other prompts. @@ -10210,7 +10210,7 @@ * dired-x.el (dired-virtual): Don't use `dired-insert-headerline'. -2005-10-25 Michael Cadilhac (tiny change) +2005-10-25 Michael Cadilhac * play/blackbox.el (blackbox-redefine-key): New function. (blackbox-mode-map): Use it to remap existing bindings for cursor @@ -11474,7 +11474,7 @@ * progmodes/gdb-ui.el (gdb-fringe-width -> gdb-buffer-fringe-width): Typo. -2005-10-06 Michael Cadilhac (tiny change) +2005-10-06 Michael Cadilhac * play/zone.el (zone): Wrap body with save-window-excursion. diff --git a/src/ChangeLog b/src/ChangeLog index de8a22a0201..8ba00b65ddd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -697,7 +697,7 @@ * puresize.h (BASE_PURESIZE): Increment to 1210000. -2006-04-13 Micha,Ak(Bl Cadilhac (tiny change) +2006-04-13 Micha,Ak(Bl Cadilhac * print.c (Fprin1_to_string): Mention in the `doc' that the behavior is modified by `print-level' and `print-length'. @@ -818,7 +818,7 @@ * xfaces.c (Finternal_merge_in_global_face, try_font_list): Add explicit braces to avoid ambiguous `else'. -2006-04-11 Micha,Ak(Bl Cadilhac (tiny change) +2006-04-11 Micha,Ak(Bl Cadilhac * dispnew.c (init_display): Don't init X display if the user asked for a non-X display. From 6f39188a8c61e02b9438eddc7967d498d9de3527 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 19:44:38 +0000 Subject: [PATCH 101/403] Remove file. --- etc/ledit.l | 152 ---------------------------------------------------- 1 file changed, 152 deletions(-) delete mode 100644 etc/ledit.l diff --git a/etc/ledit.l b/etc/ledit.l deleted file mode 100644 index d53c5d26011..00000000000 --- a/etc/ledit.l +++ /dev/null @@ -1,152 +0,0 @@ -;;; -*- Mode: lisp -*- - -; load in the c functions - -(removeaddress '_signal) -(removeaddress '_switch_to_proc) -(removeaddress '_set_proc_str) - -(cfasl "/src/mdc/ledit/leditcfns.o" '_switch_to_proc 'emacs) - -(getaddress '_set_proc_str 'set_proc_str) - -(declare (special *ledit-infile* ; emacs->lisp tempfile - *ledit-outfile* ; lisp->emacs tempfile - *ledit-ppfile* ; pp->emacs tempfile - *ledit-lisztfile* ; compiler input - *ledit-objfile* ; compiler output - *ledit-initialized*) ; flag - ) - -(setq *ledit-initialized* nil) - -;;; INIT-LEDIT - -(defun init-ledit () - (let ((user (getenv '|USER|))) ;USER must be uppercase - (setq - *ledit-outfile* (concat "/tmp/" user ".l2") ; lisp -> emacs - *ledit-infile* (concat "/tmp/" user ".l1") ; emacs -> lisp - *ledit-ppfile* (concat "/tmp/" user ".l3") ; pp output to emacs. - *ledit-lisztfile* (concat "/tmp/" user ".l4") - *ledit-objfile* (concat "/tmp/" user ".o") - *ledit-initialized* t))) - -;;; LEDIT -; if 1 arg, arg is taken as a tag name to pass to emacs. -; if 2 args, second arg is a keyword. If 2nd arg is pp, -; pp is applied to first arg, and result is sent to emacs -; to put in a buffer called LEDIT (which is first erased.) - -(defun ledit fexpr (args) - (apply #'ledit* args)) - -;;; LEDIT* - -(defun ledit* n - (if (not *ledit-initialized*) (init-ledit)) - (ledit-output (listify n)) - (syscall 10. *ledit-infile*) ; syscall 10 is "delete" - (syscall 10. *ledit-lisztfile*) - (emacs) - (ledit-input) - (syscall 10. *ledit-outfile*) - (syscall 10. *ledit-ppfile*) - t) - -;;; LEDIT-OUTPUT -;;; Egad, what a mess! Doesn't work for XEMACS yet. -;;; Here's an example from Mocklisp: -;;; -> (defun bar (nothing) (bar nothing)) -;;; bar -;;; -> (ledit bar) -;;; should produce... -;;; (progn) (progn tag (setq tag "bar") (&goto-tag)) -;;; and -;;; -> (ledit bar pp) -;;; should stuff this to emacs... -;;; (progn) (switch-to-buffer "LEDIT") (erase-buffer) -;;; (insert-file "/tmp/walter.l3") (lisp-mode) -;;; and this... -;;; (def bar -;;; (lambda (x) -;;; (bar nothing))) -;;; into *LEDIT* - -(defun ledit-output (args) - (if args - (let ((ofile (outfile *ledit-outfile*))) - (format ofile "(progn)") ; this is necessary. - - (cond ((null (cdr args)) ; no keyword -> arg is a tag. - (format ofile "(progn tag (setq tag \"~A\"~ - (&goto-tag))" - (car args))) - ((eq (cadr args) 'pp) ; pp-> pp first arg to emacs - (apply 'pp `((|F| ,*ledit-ppfile*) ,(car args))) - (format ofile "(switch-to-buffer \"LEDIT\")~ - (erase-buffer)") - (format ofile "(insert-file \"~A\")" - *ledit-ppfile*) - (format ofile "(lisp-mode)")) - - (t (format t "~&~A -- unknown option~%" (cdr args)))) - (close ofile)))) - -;;; LISZT* -;;; Need this guy to do compile-input. -;;; Liszt returns 0 if all was well. -;;; Note that in ordinary use the user will have to get used to looking -;;; at "%Warning: ... Compiler declared *foo* special" messages, since -;;; you don't usually want to hunt around in your file, zap in the -;;; declarations, then go back to what you were doing. -;;; Fortunately this doesn't cause the compiler to bomb. -;;; Some sleepless night I will think of a way to get around this. - -(defun liszt* (&rest args) - (apply #'liszt args)) - -;;; LEDIT-INPUT -;;; Although there are two cases here, in practice -;;; it is never the case that there is both input to be -;;; interpreted and input to be compiled. - -(defun ledit-input () - (if (probef *ledit-lisztfile*) - (cond ((getd #'liszt) - (format t ";Compiling LEDIT:") - (and (zerop (liszt* *ledit-lisztfile* '-o *ledit-objfile*)) - (load *ledit-objfile*))) - (t (format t ";Can't compile LEDIT: No liszt.~%;Reading instead:") - (let ((ifile (infile *ledit-lisztfile*))) - (ledit-load ifile) - (close ifile))))) - - (if (probef *ledit-infile*) - (let ((ifile (infile *ledit-infile*))) - (format t ";Reading from LEDIT:~%") - (ledit-load ifile) - (close ifile)))) - -;;; LEDIT-LOAD -;;; A generally useful form of load - -(defun ledit-load (ifile) - (let ((eof-form (list 'eof-form))) - (do ((form (read ifile eof-form) (read ifile eof-form))) - ((eq form eof-form)) - (format t "; ~A~%" (eval form))))) - -(setsyntax #/ 'macro 'ledit) ; make ^E = (ledit) - -;; more robust version of the c function set_proc_str. Does argument checking. -;; set_proc_str sets the string that is stuffed to the tty after franz pauses -;; and the csh wakes up. It is usually "%emacs" or "%vemacs" or "%?emacs" -(defun set-proc-str (arg) - (if (stringp arg) - (set_proc_str arg) - (if (symbolp arg) - (set_proc_str (get-pname arg)) - (error arg " is illegal argument to set-proc-str")))) - -;;; arch-tag: 2e76c01f-8d6a-4d04-b9ab-0eaabec96aee From e7682d9261da6de546550672362e5d4cee8d852e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 20:01:16 +0000 Subject: [PATCH 102/403] (menu-bar-apropos-menu): Move "Find Key in Manual" and "Find Command in Manual" to here. --- lisp/menu-bar.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 53939231238..cc1351b9032 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1302,6 +1302,12 @@ key, a click, or a menu-item")) :help "Find commands whose names match a regexp")) (define-key menu-bar-apropos-menu [sep1] '("--")) +(define-key menu-bar-apropos-menu [emacs-command-node] + '(menu-item "Look Up Command in User Manual..." Info-goto-emacs-command-node + :help "Display manual section that describes a command")) +(define-key menu-bar-apropos-menu [emacs-key-command-node] + '(menu-item "Look Up Key in User Manual..." Info-goto-emacs-key-command-node + :help "Display manual section that describes a key")) (define-key menu-bar-apropos-menu [elisp-index-search] '(menu-item "Look Up Subject in ELisp Manual..." elisp-index-search :help "Find description of a subject in Emacs Lisp manual")) @@ -1334,14 +1340,6 @@ key, a click, or a menu-item")) (define-key menu-bar-manuals-menu [info-elintro] '(menu-item "Introduction to Emacs Lisp" menu-bar-read-lispintro :help "Read the Introduction to Emacs Lisp Programming")) -(define-key menu-bar-manuals-menu [sep3] - '("--")) -(define-key menu-bar-manuals-menu [command] - '(menu-item "Find Command in Manual..." Info-goto-emacs-command-node - :help "Display manual section that describes a command")) -(define-key menu-bar-manuals-menu [key] - '(menu-item "Find Key in Manual..." Info-goto-emacs-key-command-node - :help "Display manual section that describes a key")) (define-key menu-bar-help-menu [eliza] '(menu-item "Emacs Psychotherapist" doctor From fa62821e21aae313dc611f1695c360f47bd31e25 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 20:09:58 +0000 Subject: [PATCH 103/403] (Info-index-next): Use where-is-internal to report actual binding of Info-index-next, rather than hard-coded `,'. --- lisp/info.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 2737999b090..2669b709316 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2866,8 +2866,11 @@ Give an empty topic name to go to the Index node itself." (car (car Info-index-alternatives)) (nth 2 (car Info-index-alternatives)) (if (cdr Info-index-alternatives) - (format "(%s total; use `,' for next)" - (length Info-index-alternatives)) + (format "(%s total; use `%s' for next)" + (length Info-index-alternatives) + (key-description (where-is-internal + 'Info-index-next overriding-local-map + t))) "(Only match)"))) (defun Info-find-index-name (name) From b33ddfab420ea10a8fd176fe427ce60253e6416a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 20:17:58 +0000 Subject: [PATCH 104/403] Remove bogus @setfilename. --- man/org.texi | 1 - 1 file changed, 1 deletion(-) diff --git a/man/org.texi b/man/org.texi index 3bd9ad69762..9639622bbab 100644 --- a/man/org.texi +++ b/man/org.texi @@ -1,7 +1,6 @@ \input texinfo @c %**start of header -@setfilename org @setfilename ../info/org @c @settitle Org Mode Manual From 3d0793e4bfc373d70174678c96c22bbd28cc88b7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 26 May 2006 20:18:16 +0000 Subject: [PATCH 105/403] *** empty log message *** --- etc/ChangeLog | 4 ++++ lisp/ChangeLog | 3 +++ lispref/ChangeLog | 5 +++++ man/ChangeLog | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 854997e27d4..1d386d66286 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2006-05-26 Eli Zaretskii + + * ledit.l: Remove file. + 2006-05-26 Kenichi Handa * NEWS (find-operation-coding-system): Mention the new argument diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6c630d3a2f9..6fb0ce2575a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-05-26 Eli Zaretskii + * menu-bar.el (menu-bar-apropos-menu): Move "Find Key in Manual" + and "Find Command in Manual" to here. + * buff-menu.el (list-buffers-noselect): For Info buffers, use Info-current-file as the file name. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index cab118b70ed..a4bbd6b535e 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-05-26 Eli Zaretskii + + * tips.texi (Coding Conventions): Advise against using + eval-after-load in packages. Add an index entry. + 2006-05-25 Juri Linkov * minibuf.texi (Text from Minibuffer): Undocument keep-all. diff --git a/man/ChangeLog b/man/ChangeLog index 66dc37c99ec..1a7085ef69f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-26 Eli Zaretskii + + * org.texi: Remove bogus @setfilename. + 2006-05-26 Carsten Dominik * org.texi (ASCII export): Omit command name. From 486618617e085f61a7a1f92d3908dfca16c4093d Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 26 May 2006 22:04:22 +0000 Subject: [PATCH 106/403] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6fb0ce2575a..fe3a518c96c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-26 Luc Teirlinck + + * shell.el (shell-mode): Call shell-dirtrack-mode after + list-buffers-directory is made a local variable, to avoid setting + the default value. + 2006-05-26 Eli Zaretskii * menu-bar.el (menu-bar-apropos-menu): Move "Find Key in Manual" From 836788c9cd3b0d66c3a5bc3cc6a7451836525ada Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Fri, 26 May 2006 22:07:04 +0000 Subject: [PATCH 107/403] (dired-mode-map): Move tumme commands to Operate, Regexp and Immediate menus. Change "Add Comment" to "Add Image Comment". Change "Add Image Tag" to "Add Image Tags". --- lisp/dired.el | 76 +++++++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 67c9b737bc7..24bdbb150d0 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1305,6 +1305,18 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate] (cons "Immediate" (make-sparse-keymap "Immediate"))) + (define-key map + [menu-bar immediate tumme-dired-display-external] + '(menu-item "Display Image Externally" tumme-dired-display-external + :help "Display image in external viewer")) + (define-key map + [menu-bar immediate tumme-dired-display-image] + '(menu-item "Display Image" tumme-dired-display-image + :help "Display sized image in a separate window")) + + (define-key map [menu-bar immediate dashes-4] + '("--")) + (define-key map [menu-bar immediate revert-buffer] '(menu-item "Refresh" revert-buffer :help "Update contents of shown directories")) @@ -1312,39 +1324,6 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar immediate dashes] '("--")) - (define-key map [menu-bar immediate tumme] - (cons "Thumbnail Images" (make-sparse-keymap "tumme"))) - - (define-key map - [menu-bar immediate tumme tumme-mark-tagged-files] - '(menu-item "Mark From Image Tag..." tumme-mark-tagged-files - :help "Mark files whose image tags matches regexp")) - (define-key map - [menu-bar immediate tumme tumme-tag-remove] - '(menu-item "Remove Image Tag..." tumme-tag-remove - :help "Remove image tag from current or marked files")) - (define-key map - [menu-bar immediate tumme tumme-tag-files] - '(menu-item "Add Image Tag..." tumme-tag-files - :help "Add image tag to current or marked files")) - (define-key map - [menu-bar immediate tumme tumme-dired-comment-files] - '(menu-item "Add Comment..." tumme-dired-comment-files - :help "Add comment to current or marked files")) - (define-key map - [menu-bar immediate tumme tumme-dired-display-external] - '(menu-item "Display Image Externally" tumme-dired-display-external - :help "Display image in external viewer")) - (define-key map - [menu-bar immediate tumme tumme-dired-display-image] - '(menu-item "Display Image" tumme-dired-display-image - :help "Display sized image in a separate window")) - (define-key map - [menu-bar immediate tumme tumme-display-thumbs] - '(menu-item "Display Thumbnails" tumme-display-thumbs - :help "Display thumbnails for current or marked image files")) - - (define-key map [menu-bar immediate compare-directories] '(menu-item "Compare directories..." dired-compare-directories :help "Mark files with different attributes in two dired buffers")) @@ -1374,6 +1353,14 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar regexp] (cons "Regexp" (make-sparse-keymap "Regexp"))) + (define-key map + [menu-bar regexp tumme-mark-tagged-files] + '(menu-item "Mark From Image Tag..." tumme-mark-tagged-files + :help "Mark files whose image tags matches regexp")) + + (define-key map [menu-bar regexp dashes-1] + '("--")) + (define-key map [menu-bar regexp downcase] '(menu-item "Downcase" dired-downcase ;; When running on plain MS-DOS, there's only one @@ -1461,6 +1448,29 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (define-key map [menu-bar operate] (cons "Operate" (make-sparse-keymap "Operate"))) + (define-key map [menu-bar operate dashes-2] + '("--")) + + (define-key map + [menu-bar operate tumme-tag-remove] + '(menu-item "Remove Image Tag..." tumme-tag-remove + :help "Remove image tag from current or marked files")) + (define-key map + [menu-bar operate tumme-tag-files] + '(menu-item "Add Image Tags..." tumme-tag-files + :help "Add image tags to current or marked files")) + (define-key map + [menu-bar operate tumme-dired-comment-files] + '(menu-item "Add Image Comment..." tumme-dired-comment-files + :help "Add image comment to current or marked files")) + (define-key map + [menu-bar operate tumme-display-thumbs] + '(menu-item "Display Thumbnails" tumme-display-thumbs + :help "Display thumbnails for current or marked image files")) + + (define-key map [menu-bar operate dashes-3] + '("--")) + (define-key map [menu-bar operate query-replace] '(menu-item "Query Replace in Files..." dired-do-query-replace-regexp :help "Replace regexp in marked files")) From 438a5bf6385a53af2356c7c36396d633f62b8ab1 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 26 May 2006 22:07:27 +0000 Subject: [PATCH 108/403] (shell-mode): Call shell-dirtrack-mode after list-buffers-directory is made a local variable, to avoid setting the default value. --- lisp/shell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/shell.el b/lisp/shell.el index bfa9565e8d4..6e87ba41d37 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -433,11 +433,11 @@ buffer." (setq shell-dirstack nil) (make-local-variable 'shell-last-dir) (setq shell-last-dir nil) - (shell-dirtrack-mode 1) (setq comint-input-autoexpand shell-input-autoexpand) ;; This is not really correct, since the shell buffer does not really ;; edit this directory. But it is useful in the buffer list and menus. (make-local-variable 'list-buffers-directory) + (shell-dirtrack-mode 1) (setq list-buffers-directory (expand-file-name default-directory)) ;; shell-dependent assignments. (when (ring-empty-p comint-input-ring) From 9318bb97ff14363c63389e325a22435d76dd1a1a Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Fri, 26 May 2006 22:15:34 +0000 Subject: [PATCH 109/403] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe3a518c96c..a67822f68f3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-27 Mathias Dahl + + * dired.el (dired-mode-map): Move tumme commands to Operate, + Regexp and Immediate menus. Change "Add Comment" to "Add Image + Comment". Change "Add Image Tag" to "Add Image Tags". + 2006-05-26 Luc Teirlinck * shell.el (shell-mode): Call shell-dirtrack-mode after From eb9e5cd1f27037a3a9a543b82eab7b83fb7a5287 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Fri, 26 May 2006 22:33:41 +0000 Subject: [PATCH 110/403] *** empty log message *** --- lisp/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a67822f68f3..5097770c7eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2006-05-27 Mathias Dahl + * dired.el (dired-mode-map): Change `tumme-tag-remove' to + `tumme-delete-tag'. Rename `Remove Image Tag' to `Delete Image + Tag'. + + * tumme.el (tumme-delete-tag): Rename from `tumme-tag-remove'. + (tumme-setup-dired-keybindings): Change `tumme-add-remove' to + `tumme-delete-tag'. + * dired.el (dired-mode-map): Move tumme commands to Operate, Regexp and Immediate menus. Change "Add Comment" to "Add Image Comment". Change "Add Image Tag" to "Add Image Tags". From b305952dc78cbd6ee4747225aa2d29bcf9d3b8ee Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Fri, 26 May 2006 22:33:53 +0000 Subject: [PATCH 111/403] * dired.el (dired-mode-map): Change `tumme-tag-remove' to `tumme-delete-tag'. Rename `Remove Image Tag' to `Delete Image Tag'. * dired.el (dired-mode-map): Move tumme commands to Operate, Regexp and Immediate menus. Change "Add Comment" to "Add Image Comment". Change "Add Image Tag" to "Add Image Tags". --- lisp/dired.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/dired.el b/lisp/dired.el index 24bdbb150d0..f495cf18cb3 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1251,7 +1251,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." ;; thumbnail manipulation (tumme) (define-key map "\C-td" 'tumme-display-thumbs) (define-key map "\C-tt" 'tumme-tag-files) - (define-key map "\C-tr" 'tumme-tag-remove) + (define-key map "\C-tr" 'tumme-delete-tag) (define-key map "\C-tj" 'tumme-jump-thumbnail-buffer) (define-key map "\C-ti" 'tumme-dired-display-image) (define-key map "\C-tx" 'tumme-dired-display-external) @@ -1452,9 +1452,9 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." '("--")) (define-key map - [menu-bar operate tumme-tag-remove] - '(menu-item "Remove Image Tag..." tumme-tag-remove - :help "Remove image tag from current or marked files")) + [menu-bar operate tumme-delete-tag] + '(menu-item "Delete Image Tag..." tumme-delete-tag + :help "Delete image tag from current or marked files")) (define-key map [menu-bar operate tumme-tag-files] '(menu-item "Add Image Tags..." tumme-tag-files From dfb03a8438ad1f91fc354e59ab0288b2c79cb2a2 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Fri, 26 May 2006 22:34:12 +0000 Subject: [PATCH 112/403] (tumme-delete-tag): Rename from `tumme-tag-remove'. (tumme-setup-dired-keybindings): Change `tumme-add-remove' to `tumme-delete-tag'. --- lisp/tumme.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index 1fa1622cabd..99f14f3ccb0 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -968,7 +968,7 @@ displayed." 'tags (tumme-list-tags (tumme-original-file-name)))) ;;;###autoload -(defun tumme-tag-remove (arg) +(defun tumme-delete-tag (arg) "Remove tag for selected file(s). With prefix argument ARG, remove tag from file at point." (interactive "P") @@ -1491,7 +1491,7 @@ Note that n, p and and will be hijacked and bound to (define-key dired-mode-map "\C-td" 'tumme-display-thumbs) (define-key dired-mode-map "\C-tt" 'tumme-tag-files) - (define-key dired-mode-map "\C-tr" 'tumme-tag-remove) + (define-key dired-mode-map "\C-tr" 'tumme-delete-tag) (define-key dired-mode-map [tab] 'tumme-jump-thumbnail-buffer) (define-key dired-mode-map "\C-ti" 'tumme-dired-display-image) (define-key dired-mode-map "\C-tx" 'tumme-dired-display-external) @@ -1513,8 +1513,8 @@ Note that n, p and and will be hijacked and bound to (define-key dired-mode-map [menu-bar tumme tumme-mark-tagged-files] '("Mark tagged files" . tumme-mark-tagged-files)) - (define-key dired-mode-map [menu-bar tumme tumme-tag-remove] - '("Remove tag from files" . tumme-tag-remove)) + (define-key dired-mode-map [menu-bar tumme tumme-delete-tag] + '("Remove tag from files" . tumme-delete-tag)) (define-key dired-mode-map [menu-bar tumme tumme-tag-files] '("Tag files" . tumme-tag-files)) From 81bfcbaa63aa2ca05687593a028012227a83d112 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Fri, 26 May 2006 23:27:45 +0000 Subject: [PATCH 113/403] *** empty log message *** --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5097770c7eb..6a617c3d079 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,7 +2,7 @@ * dired.el (dired-mode-map): Change `tumme-tag-remove' to `tumme-delete-tag'. Rename `Remove Image Tag' to `Delete Image - Tag'. + Tag'. Change "Compare directories..." to "Change Directories...". * tumme.el (tumme-delete-tag): Rename from `tumme-tag-remove'. (tumme-setup-dired-keybindings): Change `tumme-add-remove' to From 27af5d58f03d7792b0942cd1d57524f5fc8e469f Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Fri, 26 May 2006 23:27:55 +0000 Subject: [PATCH 114/403] * dired.el (dired-mode-map): Change `tumme-tag-remove' to `tumme-delete-tag'. Rename `Remove Image Tag' to `Delete Image Tag'. Change "Compare directories..." to "Change Directories...". * dired.el (dired-mode-map): Move tumme commands to Operate, Regexp and Immediate menus. Change "Add Comment" to "Add Image Comment". Change "Add Image Tag" to "Add Image Tags". --- lisp/dired.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index f495cf18cb3..64b73184397 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1325,7 +1325,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." '("--")) (define-key map [menu-bar immediate compare-directories] - '(menu-item "Compare directories..." dired-compare-directories + '(menu-item "Compare Directories..." dired-compare-directories :help "Mark files with different attributes in two dired buffers")) (define-key map [menu-bar immediate backup-diff] '(menu-item "Compare with Backup" dired-backup-diff From f1b64ef1e59bad4490248e41da92affdca31e7ac Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 00:49:32 +0000 Subject: [PATCH 115/403] (Bindat Functions): Explain term "total length". Use it in `bindat-length' and `bindat-pack' descriptions. --- lispref/ChangeLog | 5 +++++ lispref/processes.texi | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index a4bbd6b535e..53f5fd597af 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-05-27 Thien-Thi Nguyen + + * processes.texi (Bindat Functions): Explain term "total length". + Use it in bindat-length and bindat-pack descriptions. + 2006-05-26 Eli Zaretskii * tips.texi (Coding Conventions): Advise against using diff --git a/lispref/processes.texi b/lispref/processes.texi index 501c4a65c57..64b5bdd77bd 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi @@ -2268,10 +2268,17 @@ field @code{c} in the third element of subfield @code{b} of field @code{a}. (This corresponds to @code{struct.a.b[2].c} in C.) @end defun + Although packing and unpacking operations change the organization of +data (in memory), they preserve the data's @dfn{total length}, which is +the sum of all the fields' lengths, in bytes. This value is not +generally inherent in either the specification or alist alone; instead, +both pieces of information contribute to its calculation. Likewise, the +length of a string or array being unpacked may be longer than the data's +total length as described by the specification. + @defun bindat-length spec struct -@c ??? I don't understand this at all -- rms -This function returns the length in bytes of @var{struct}, according -to @var{spec}. +This function returns the total length of the data in @var{struct}, +according to @var{spec}. @end defun @defun bindat-pack spec struct &optional raw-data pos @@ -2281,6 +2288,9 @@ new byte array starting at the beginning. However, if @var{raw-data} is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to pack into. If @var{pos} is non-@code{nil}, it specifies the starting offset for packing into @code{raw-data}. + +When pre-allocating, you should make sure @code{(length @var{raw-data})} +meets or exceeds the total length to avoid an out-of-range error. @end defun @defun bindat-ip-to-string ip From 2a7ee2b3492bb0513951fafaa680e867270051bb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 27 May 2006 08:45:14 +0000 Subject: [PATCH 116/403] Tiny layout change. --- src/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mac.c b/src/mac.c index 3b4f63b848a..5fc9ea4ee28 100644 --- a/src/mac.c +++ b/src/mac.c @@ -545,6 +545,7 @@ mac_ae_put_lisp (desc, keyword_or_index, obj) return err; } + static pascal OSErr mac_coerce_file_name_ptr (type_code, data_ptr, data_size, to_type, handler_refcon, result) From 412f3f1859b20e13d0d16f55852975c7ed74fa53 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 27 May 2006 08:46:03 +0000 Subject: [PATCH 117/403] (mac_handle_apple_event): Return errAEEventNotHandled if key binding is not found. --- src/ChangeLog | 7 ++++++- src/macselect.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8ba00b65ddd..5a0b7621643 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-27 YAMAMOTO Mitsuharu + + * macselect.c (mac_handle_apple_event): Return + errAEEventNotHandled if key binding is not found. + 2006-05-26 Eli Zaretskii * emacs.c (main) [PROFILING]: Enable also for __MINGW32__. @@ -86,7 +91,7 @@ (mac_handle_apple_event_1): New function. (mac_handle_apple_event): Use it. Don't process previously suspended events. - (cleanup_suspended_apple_events, get_suspension_id)n + (cleanup_suspended_apple_events, get_suspension_id) (cleanup_all_suspended_apple_events): New functions. (init_apple_event_handler): Call cleanup_all_suspended_apple_events at exit. diff --git a/src/macselect.c b/src/macselect.c index 40a3db9ca08..3afea1e9813 100644 --- a/src/macselect.c +++ b/src/macselect.c @@ -1159,6 +1159,8 @@ mac_handle_apple_event (apple_event, reply, refcon) err = mac_handle_apple_event_1 (class_key, id_key, apple_event, reply); } + else + err = errAEEventNotHandled; } if (err == noErr) return noErr; From f860b7216f200b4836f07a745fd8f1ddc39480ed Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 08:56:11 +0000 Subject: [PATCH 118/403] (ewoc--create): No longer take HEADER and FOOTER args. Update unique caller. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/ewoc.el | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a617c3d079..888d793e621 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-27 Thien-Thi Nguyen + + * emacs-lisp/ewoc.el (ewoc--create): No longer + take HEADER and FOOTER args. Update unique caller. + 2006-05-27 Mathias Dahl * dired.el (dired-mode-map): Change `tumme-tag-remove' to diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 6f14fb37cf5..d1ededc583d 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -183,8 +183,7 @@ and (ewoc--node-nth -1) returns the last node." (defstruct (ewoc (:constructor nil) - (:constructor ewoc--create - (buffer pretty-printer header footer dll)) + (:constructor ewoc--create (buffer pretty-printer dll)) (:conc-name ewoc--)) buffer pretty-printer header footer dll last-node) @@ -280,9 +279,9 @@ respectively, of the ewoc." (dll (progn (setf (ewoc--node-right dummy-node) dummy-node) (setf (ewoc--node-left dummy-node) dummy-node) dummy-node)) - (new-ewoc - (ewoc--create (current-buffer) - pretty-printer nil nil dll)) + (new-ewoc (ewoc--create (current-buffer) + pretty-printer + dll)) (pos (point)) head foot) (ewoc--set-buffer-bind-dll new-ewoc From ec491f90014dd3e6c15cafba0570fe67355c1413 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 09:37:13 +0000 Subject: [PATCH 119/403] (ewoc-delete): Compute last node once before looping. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/ewoc.el | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 888d793e621..b8720226e8d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,8 @@ * emacs-lisp/ewoc.el (ewoc--create): No longer take HEADER and FOOTER args. Update unique caller. + (ewoc-delete): Compute last node once before looping. + 2006-05-27 Mathias Dahl * dired.el (dired-mode-map): Change `tumme-tag-remove' to diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index d1ededc583d..a02425b0cec 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -385,12 +385,12 @@ arguments will be passed to MAP-FUNCTION." (defun ewoc-delete (ewoc &rest nodes) "Delete NODES from EWOC." (ewoc--set-buffer-bind-dll-let* ewoc - ((L nil) (R nil)) + ((L nil) (R nil) (last (ewoc--last-node ewoc))) (dolist (node nodes) ;; If we are about to delete the node pointed at by last-node, ;; set last-node to nil. - (if (eq (ewoc--last-node ewoc) node) - (setf (ewoc--last-node ewoc) nil)) + (when (eq last node) + (setf last nil (ewoc--last-node ewoc) nil)) (delete-region (ewoc--node-start-marker node) (ewoc--node-start-marker (ewoc--node-next node))) (set-marker (ewoc--node-start-marker node) nil) From 63910b2311ccfd008de65a72e27eebc20033d088 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 10:10:35 +0000 Subject: [PATCH 120/403] (ewoc--node-branch): Merge into unique caller. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/ewoc.el | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b8720226e8d..7072091492c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,8 @@ (ewoc-delete): Compute last node once before looping. + (ewoc--node-branch): Merge into unique caller. + 2006-05-27 Mathias Dahl * dired.el (dired-mode-map): Change `tumme-tag-remove' to diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index a02425b0cec..1e85ef813fc 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -139,15 +139,10 @@ (defvar ewoc--current-dll) (defstruct (ewoc--node - (:type vector) ;required for ewoc--node-branch hack + (:type vector) ;ewoc--node-nth needs this (:constructor ewoc--node-create (start-marker data))) left right data start-marker) -(defalias 'ewoc--node-branch 'aref - "Get the left (CHILD=0) or right (CHILD=1) child of the NODE. - -\(fn NODE CHILD)") - (defun ewoc--node-next (node) "Return the node after NODE, or nil if NODE is the last node." (let ((R (ewoc--node-right node))) @@ -164,13 +159,14 @@ N counts from zero. If N is negative, return the -(N+1)th last element. If N is out of range, return nil. Thus, (ewoc--node-nth 0) returns the first node, and (ewoc--node-nth -1) returns the last node." + ;; Presuming a node is ":type vector", starting with `left' and `right': ;; Branch 0 ("follow left pointer") is used when n is negative. ;; Branch 1 ("follow right pointer") is used otherwise. (let* ((branch (if (< n 0) 0 1)) - (node (ewoc--node-branch ewoc--current-dll branch))) + (node (aref ewoc--current-dll branch))) (if (< n 0) (setq n (- -1 n))) (while (and (not (eq ewoc--current-dll node)) (> n 0)) - (setq node (ewoc--node-branch node branch)) + (setq node (aref node branch)) (setq n (1- n))) (unless (eq ewoc--current-dll node) node))) From 8d20653feeb6d125386855f65a50720f2e5f5dfb Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Sat, 27 May 2006 11:06:06 +0000 Subject: [PATCH 121/403] * tumme.el: Replace a lot of `if ... progn' with `when'. * tumme.el (tumme-delete-tag): Rename from `tumme-tag-remove'. (tumme-setup-dired-keybindings): Change `tumme-add-remove' to `tumme-delete-tag'. --- lisp/tumme.el | 192 +++++++++++++++++++++++--------------------------- 1 file changed, 90 insertions(+), 102 deletions(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index 99f14f3ccb0..8358986cca7 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -881,10 +881,9 @@ displayed." (end-of-line) (setq end (point)) (beginning-of-line) - (if (not (search-forward (format ";%s" tag) end t)) - (progn - (end-of-line) - (insert (format ";%s" tag))))) + (when (not (search-forward (format ";%s" tag) end t)) + (end-of-line) + (insert (format ";%s" tag)))) (goto-char (point-max)) (insert (format "\n%s;%s" file tag)))) files) @@ -903,30 +902,27 @@ displayed." (mapcar (lambda (file) (goto-char (point-min)) - (if (search-forward-regexp - (format "^%s" file) nil t) - (progn - (end-of-line) - (setq end (point)) - (beginning-of-line) - (if (search-forward-regexp (format "\\(;%s\\)" tag) end t) - (progn - (delete-region (match-beginning 1) (match-end 1)) - ;; Check if file should still be in the database. If - ;; it has no tags or comments, it will be removed. - (end-of-line) - (setq end (point)) - (beginning-of-line) - (if (not (search-forward ";" end t)) - (progn - (kill-line 1) - ;; If on empty line at end of buffer - (if (and (eobp) - (looking-at "^$")) - (delete-backward-char 1))))))))) - files) - (save-buffer) - (kill-buffer buf)))) + (when (search-forward-regexp + (format "^%s" file) nil t) + (end-of-line) + (setq end (point)) + (beginning-of-line) + (when (search-forward-regexp (format "\\(;%s\\)" tag) end t) + (delete-region (match-beginning 1) (match-end 1)) + ;; Check if file should still be in the database. If + ;; it has no tags or comments, it will be removed. + (end-of-line) + (setq end (point)) + (beginning-of-line) + (when (not (search-forward ";" end t)) + (kill-line 1) + ;; If on empty line at end of buffer + (when (and (eobp) + (looking-at "^$")) + (delete-backward-char 1))))))) + files) + (save-buffer) + (kill-buffer buf))) (defun tumme-list-tags (file) "Read all tags for image FILE from the image database." @@ -934,17 +930,16 @@ displayed." (let (end buf (tags "")) (setq buf (find-file tumme-db-file)) (goto-char (point-min)) - (if (search-forward-regexp - (format "^%s" file) nil t) - (progn - (end-of-line) - (setq end (point)) - (beginning-of-line) - (if (search-forward ";" end t) - (if (search-forward "comment:" end t) - (if (search-forward ";" end t) - (setq tags (buffer-substring (point) end))) - (setq tags (buffer-substring (point) end)))))) + (when (search-forward-regexp + (format "^%s" file) nil t) + (end-of-line) + (setq end (point)) + (beginning-of-line) + (if (search-forward ";" end t) + (if (search-forward "comment:" end t) + (if (search-forward ";" end t) + (setq tags (buffer-substring (point) end))) + (setq tags (buffer-substring (point) end))))) (kill-buffer buf) (split-string tags ";")))) @@ -1010,17 +1005,16 @@ use only useful if `tumme-track-movement' is nil." (let ((old-buf (current-buffer)) (dired-buf (tumme-associated-dired-buffer)) (file-name (tumme-original-file-name))) - (if (and dired-buf file-name) - (progn - (setq file-name (file-name-nondirectory file-name)) - (set-buffer dired-buf) - (goto-char (point-min)) - (if (not (search-forward file-name nil t)) - (message "Could not track file") - (dired-move-to-filename) - (set-window-point - (tumme-get-buffer-window dired-buf) (point))) - (set-buffer old-buf))))) + (when (and dired-buf file-name) + (setq file-name (file-name-nondirectory file-name)) + (set-buffer dired-buf) + (goto-char (point-min)) + (if (not (search-forward file-name nil t)) + (message "Could not track file") + (dired-move-to-filename) + (set-window-point + (tumme-get-buffer-window dired-buf) (point))) + (set-buffer old-buf)))) (defun tumme-toggle-movement-tracking () "Turn on and off `tumme-track-movement'. @@ -1039,24 +1033,22 @@ the other way around." (let ((file (dired-get-filename)) (old-buf (current-buffer)) prop-val found) - (if (get-buffer tumme-thumbnail-buffer) - (progn - (set-buffer tumme-thumbnail-buffer) - (goto-char (point-min)) - (while (and (not (eobp)) - (not found)) - (if (and (setq prop-val - (get-text-property (point) 'original-file-name)) - (string= prop-val file)) - (setq found t)) - (if (not found) - (forward-char 1))) - (if found - (progn - (set-window-point - (tumme-thumbnail-window) (point)) - (tumme-display-thumb-properties))) - (set-buffer old-buf))))) + (when (get-buffer tumme-thumbnail-buffer) + (set-buffer tumme-thumbnail-buffer) + (goto-char (point-min)) + (while (and (not (eobp)) + (not found)) + (if (and (setq prop-val + (get-text-property (point) 'original-file-name)) + (string= prop-val file)) + (setq found t)) + (if (not found) + (forward-char 1))) + (when found + (set-window-point + (tumme-thumbnail-window) (point)) + (tumme-display-thumb-properties)) + (set-buffer old-buf)))) (defun tumme-dired-next-line (&optional arg) "Call `dired-next-line', then track thumbnail. @@ -1081,29 +1073,27 @@ move ARG lines." (interactive) ;; Before we move, make sure that there is an image two positions ;; forward. - (if (save-excursion + (when (save-excursion (forward-char 2) (tumme-image-at-point-p)) - (progn - (forward-char) - (while (and (not (eobp)) - (not (tumme-image-at-point-p))) - (forward-char)) - (if tumme-track-movement - (tumme-track-original-file)))) + (forward-char) + (while (and (not (eobp)) + (not (tumme-image-at-point-p))) + (forward-char)) + (if tumme-track-movement + (tumme-track-original-file))) (tumme-display-thumb-properties)) (defun tumme-backward-char () "Move to previous image and display properties." (interactive) - (if (not (bobp)) - (progn - (backward-char) - (while (and (not (bobp)) - (not (tumme-image-at-point-p))) - (backward-char)) - (if tumme-track-movement - (tumme-track-original-file)))) + (when (not (bobp)) + (backward-char) + (while (and (not (bobp)) + (not (tumme-image-at-point-p))) + (backward-char)) + (if tumme-track-movement + (tumme-track-original-file))) (tumme-display-thumb-properties)) (defun tumme-next-line () @@ -1664,11 +1654,10 @@ See also `tumme-line-up-dynamic'." (insert "\n") (insert " ") (setq count (1+ count)) - (if (= count (- tumme-thumbs-per-row 1)) - (progn - (forward-char) - (insert "\n") - (setq count 0)))))) + (when (= count (- tumme-thumbs-per-row 1)) + (forward-char) + (insert "\n") + (setq count 0))))) (goto-char (point-min)))) (defun tumme-line-up-dynamic () @@ -2097,19 +2086,18 @@ as initial value." (let (end buf comment-beg comment (base-name (file-name-nondirectory file))) (setq buf (find-file tumme-db-file)) (goto-char (point-min)) - (if (search-forward-regexp - (format "^%s" base-name) nil t) - (progn - (end-of-line) - (setq end (point)) - (beginning-of-line) - (cond ((search-forward ";comment:" end t) - (setq comment-beg (point)) - (if (search-forward ";" end t) - (setq comment-end (- (point) 1)) - (setq comment-end end)) - (setq comment (buffer-substring - comment-beg comment-end)))))) + (when (search-forward-regexp + (format "^%s" base-name) nil t) + (end-of-line) + (setq end (point)) + (beginning-of-line) + (cond ((search-forward ";comment:" end t) + (setq comment-beg (point)) + (if (search-forward ";" end t) + (setq comment-end (- (point) 1)) + (setq comment-end end)) + (setq comment (buffer-substring + comment-beg comment-end))))) (kill-buffer buf) comment))) From 7f934f3dda9a2b7825673c9eb17c78db00ba391e Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 11:16:18 +0000 Subject: [PATCH 122/403] (ewoc--node): Don't define constructor `make-ewoc--node' for this structure. --- lisp/ChangeLog | 3 +++ lisp/emacs-lisp/ewoc.el | 1 + 2 files changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7072091492c..b24a8e2a2f7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,6 +7,9 @@ (ewoc--node-branch): Merge into unique caller. + (ewoc--node): Don't define constructor + make-ewoc--node for this structure. + 2006-05-27 Mathias Dahl * dired.el (dired-mode-map): Change `tumme-tag-remove' to diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 1e85ef813fc..2aa56f04683 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -140,6 +140,7 @@ (defstruct (ewoc--node (:type vector) ;ewoc--node-nth needs this + (:constructor nil) (:constructor ewoc--node-create (start-marker data))) left right data start-marker) From e1d3541a5e8b345087dc39f9ecbbd47132cf2527 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Sat, 27 May 2006 11:18:54 +0000 Subject: [PATCH 123/403] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b24a8e2a2f7..4792bc6c10a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-05-27 Mathias Dahl + + * tumme.el: Change a lot of `(if .. (progn ..)' to `(when ..)'. + 2006-05-27 Thien-Thi Nguyen * emacs-lisp/ewoc.el (ewoc--create): No longer From 18ed6a46bc1a37c5bb58cf0546c0932efbd771c1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 May 2006 11:31:44 +0000 Subject: [PATCH 124/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4792bc6c10a..863881b3a40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -34,6 +34,11 @@ list-buffers-directory is made a local variable, to avoid setting the default value. +2006-05-26 Kevin Ryde + + * info.el (Info-index-next): Use where-is-internal to report + actual binding of Info-index-next, rather than hard-coded `,'. + 2006-05-26 Eli Zaretskii * menu-bar.el (menu-bar-apropos-menu): Move "Find Key in Manual" From 9c2d888b35db9a941e83e859a548b928ccead5f0 Mon Sep 17 00:00:00 2001 From: Mathias Dahl Date: Sat, 27 May 2006 14:20:03 +0000 Subject: [PATCH 125/403] Change a lot of `(if .. (progn ..)' to `(when ..)'. (tumme-remove-tag): Fix bug. --- lisp/ChangeLog | 1 + lisp/tumme.el | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 863881b3a40..cd99ecc3cdc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2006-05-27 Mathias Dahl * tumme.el: Change a lot of `(if .. (progn ..)' to `(when ..)'. + (tumme-remove-tag): Fix bug. 2006-05-27 Thien-Thi Nguyen diff --git a/lisp/tumme.el b/lisp/tumme.el index 8358986cca7..b770c292d35 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -919,10 +919,10 @@ displayed." ;; If on empty line at end of buffer (when (and (eobp) (looking-at "^$")) - (delete-backward-char 1))))))) - files) - (save-buffer) - (kill-buffer buf))) + (delete-backward-char 1)))))) + files) + (save-buffer) + (kill-buffer buf)))) (defun tumme-list-tags (file) "Read all tags for image FILE from the image database." From e4b3f22f102922965235b390fa6e25d17b6af0ec Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 27 May 2006 14:35:49 +0000 Subject: [PATCH 126/403] * files.texi (Changing Files): Document updated argument list for copy-file. --- lispref/ChangeLog | 5 +++++ lispref/files.texi | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 53f5fd597af..b0f92cc27a1 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-05-27 Chong Yidong + + * files.texi (Changing Files): Document updated argument list for + copy-file. + 2006-05-27 Thien-Thi Nguyen * processes.texi (Bindat Functions): Explain term "total length". diff --git a/lispref/files.texi b/lispref/files.texi index 0d944771a2e..f7af725f191 100644 --- a/lispref/files.texi +++ b/lispref/files.texi @@ -1431,7 +1431,7 @@ with @code{add-name-to-file} and then deleting @var{filename} has the same effect as renaming, aside from momentary intermediate states. @end deffn -@deffn Command copy-file oldname newname &optional ok-if-exists time mustbenew +@deffn Command copy-file oldname newname &optional ok-if-exists time preserve-uid-gid 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, @@ -1440,16 +1440,18 @@ preserving its final name component. If @var{time} is non-@code{nil}, then this function gives the new file the same last-modified time that the old one has. (This works on only some operating systems.) If setting the time gets an error, -@code{copy-file} signals a @code{file-date-error} error. +@code{copy-file} signals a @code{file-date-error} error. In an +interactive call, a prefix argument specifies a non-@code{nil} value +for @var{time}. This function copies the file modes, too. -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}). +If argument @var{preserve-uid-gid} is @code{nil}, we let the operating +system decide the user and group ownership of the new file (this is +usually set to the user running Emacs). If @var{preserve-uid-gid} is +non-@code{nil}, we attempt to copy the user and group ownership of the +file. This works only on some operating systems, and only if you have +the correct permissions to do so. @end deffn @deffn Command make-symbolic-link filename newname &optional ok-if-exists From 63b9b239a6c2b8f9ecfbd2a0bec26c168db0407b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 27 May 2006 14:36:59 +0000 Subject: [PATCH 127/403] MUSTBENEW argument deleted from copy-file. --- etc/NEWS | 5 ----- 1 file changed, 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index f4c6b2adbbf..80c2a250ea4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -4254,11 +4254,6 @@ formerly called `auto-save-file-format'. It is now a permanent local. 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. - +++ *** `visited-file-modtime' and `calendar-time-from-absolute' now return a list of two integers, instead of a cons. From 917b82275619a43263eacf113e843fa68b7330da Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 27 May 2006 14:56:11 +0000 Subject: [PATCH 128/403] * keymaps.texi (Key Sequences): Link to input events definition. (Format of Keymaps): Delete material duplicated in Keymap Basics. --- lispref/ChangeLog | 3 +++ lispref/keymaps.texi | 25 +++++-------------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index b0f92cc27a1..84732110f59 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,5 +1,8 @@ 2006-05-27 Chong Yidong + * keymaps.texi (Key Sequences): Link to input events definition. + (Format of Keymaps): Delete material duplicated in Keymap Basics. + * files.texi (Changing Files): Document updated argument list for copy-file. diff --git a/lispref/keymaps.texi b/lispref/keymaps.texi index ed67a028446..f6779b247d0 100644 --- a/lispref/keymaps.texi +++ b/lispref/keymaps.texi @@ -45,10 +45,11 @@ found. The whole process is called @dfn{key lookup}. @cindex key sequence A @dfn{key sequence}, or @dfn{key} for short, is a sequence of one -or more input events that form a unit. The Emacs Lisp representation -for a key sequence is a string or vector. Unless otherwise stated, -any Emacs Lisp function that accepts a key sequence as an argument can -handle both representations. +or more input events that form a unit. Input events include +characters, function keys, and mouse actions (@pxref{Input Events}). +The Emacs Lisp representation for a key sequence is a string or +vector. Unless otherwise stated, any Emacs Lisp function that accepts +a key sequence as an argument can handle both representations. In the string representation, alphanumeric characters ordinarily stand for themselves; for example, @code{"a"} represents @kbd{a} and @@ -153,22 +154,6 @@ for details. @cindex full keymap @cindex sparse keymap - A @dfn{keymap} is a table mapping event types to definitions (which -can be any Lisp objects, though only certain types are meaningful for -execution by the command loop). Given an event (or an event type) and a -keymap, Emacs can get the event's definition. Events include -characters, function keys, and mouse actions (@pxref{Input Events}). - - At any time, several primary keymaps are @dfn{active}---that is, in -use for finding key bindings. These are the @dfn{global map}, which is -shared by all buffers; the @dfn{local keymap}, which is usually -associated with a specific major mode; and zero or more @dfn{minor mode -keymaps}, which belong to currently enabled minor modes. (Not all minor -modes have keymaps.) The local keymap bindings shadow (i.e., take -precedence over) the corresponding global bindings. The minor mode -keymaps shadow both local and global keymaps. @xref{Active Keymaps}, -for details. - Each keymap is a list whose @sc{car} is the symbol @code{keymap}. The remaining elements of the list define the key bindings of the keymap. A symbol whose function definition is a keymap is also a keymap. Use From 2bbacc0e1b061be7f2d47d53c21cbb82c35d54ab Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 17:39:38 +0000 Subject: [PATCH 129/403] (ewoc): Add member `hf-pp' to this structure. (ewoc--wrap): New func. (ewoc-create): Take additional arg NOSEP. If nil, wrap node and header/footer pretty-printers. Save header/footer pretty-printer. (ewoc-set-hf): Use ewoc's header/footer pretty-printer. --- lisp/emacs-lisp/ewoc.el | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 2aa56f04683..8a448f1b47f 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -94,7 +94,7 @@ ;; In the mean time `grep '^(.*ewoc-[^-]' emacs-lisp/ewoc.el' can help ;; you find all the exported functions: ;; -;; (defun ewoc-create (pretty-printer &optional header footer) +;; (defun ewoc-create (pretty-printer &optional header footer nosep) ;; (defalias 'ewoc-data 'ewoc--node-data) ;; (defun ewoc-set-data (node data) ;; (defun ewoc-location (node) @@ -182,7 +182,7 @@ and (ewoc--node-nth -1) returns the last node." (:constructor nil) (:constructor ewoc--create (buffer pretty-printer dll)) (:conc-name ewoc--)) - buffer pretty-printer header footer dll last-node) + buffer pretty-printer header footer dll last-node hf-pp) (defmacro ewoc--set-buffer-bind-dll-let* (ewoc varlist &rest forms) "Execute FORMS with ewoc--buffer selected as current buffer, @@ -253,12 +253,19 @@ NODE and leaving the new node's start there. Return the new node." (goto-char m) (funcall pp (ewoc--node-data node)) (ewoc--adjust m (point) R))) + +(defun ewoc--wrap (func) + (lexical-let ((ewoc--user-pp func)) + (lambda (data) + (funcall ewoc--user-pp data) + (insert "\n")))) + ;;; =========================================================================== ;;; Public members of the Ewoc package ;;;###autoload -(defun ewoc-create (pretty-printer &optional header footer) +(defun ewoc-create (pretty-printer &optional header footer nosep) "Create an empty ewoc. The ewoc will be inserted in the current buffer at the current position. @@ -271,14 +278,20 @@ several lines. The PRETTY-PRINTER should use `insert', and not Optional second and third arguments HEADER and FOOTER are strings, possibly empty, that will always be present at the top and bottom, -respectively, of the ewoc." +respectively, of the ewoc. + +Normally, a newline is automatically inserted after the header, +the footer and every node's printed representation. Optional +fourth arg NOSEP non-nil inhibits this." (let* ((dummy-node (ewoc--node-create 'DL-LIST 'DL-LIST)) (dll (progn (setf (ewoc--node-right dummy-node) dummy-node) (setf (ewoc--node-left dummy-node) dummy-node) dummy-node)) + (wrap (if nosep 'identity 'ewoc--wrap)) (new-ewoc (ewoc--create (current-buffer) - pretty-printer + (funcall wrap pretty-printer) dll)) + (hf-pp (funcall wrap 'insert)) (pos (point)) head foot) (ewoc--set-buffer-bind-dll new-ewoc @@ -286,8 +299,9 @@ respectively, of the ewoc." (unless header (setq header "")) (unless footer (setq footer "")) (setf (ewoc--node-start-marker dll) (copy-marker pos) - foot (ewoc--insert-new-node dll footer 'insert) - head (ewoc--insert-new-node foot header 'insert) + foot (ewoc--insert-new-node dll footer hf-pp) + head (ewoc--insert-new-node foot header hf-pp) + (ewoc--hf-pp new-ewoc) hf-pp (ewoc--footer new-ewoc) foot (ewoc--header new-ewoc) head)) ;; Return the ewoc @@ -592,12 +606,13 @@ Return nil if the buffer has been deleted." "Set the HEADER and FOOTER of EWOC." (ewoc--set-buffer-bind-dll-let* ewoc ((head (ewoc--header ewoc)) - (foot (ewoc--footer ewoc))) + (foot (ewoc--footer ewoc)) + (hf-pp (ewoc--hf-pp ewoc))) (setf (ewoc--node-data head) header (ewoc--node-data foot) footer) (save-excursion - (ewoc--refresh-node 'insert head) - (ewoc--refresh-node 'insert foot)))) + (ewoc--refresh-node hf-pp head) + (ewoc--refresh-node hf-pp foot)))) (provide 'ewoc) From 1b04f30a22bb4a8bdf547c51873143b02c40b45e Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 17:41:18 +0000 Subject: [PATCH 130/403] (cvs-make-cvs-buffer): Specify NOSEP to `ewoc-create'. --- lisp/pcvs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/pcvs.el b/lisp/pcvs.el index 7209c135e52..5e322b9276a 100644 --- a/lisp/pcvs.el +++ b/lisp/pcvs.el @@ -467,7 +467,7 @@ If non-nil, NEW means to create a new buffer no matter what." (cvs-mode) (set (make-local-variable 'list-buffers-directory) buffer-name) ;;(set (make-local-variable 'cvs-temp-buffer) (cvs-temp-buffer)) - (let ((cookies (ewoc-create 'cvs-fileinfo-pp "\n\n" "\n"))) + (let ((cookies (ewoc-create 'cvs-fileinfo-pp "\n\n" "\n" t))) (set (make-local-variable 'cvs-cookies) cookies) (add-hook 'kill-buffer-hook (lambda () From 047ad6f5a2bedb0dab47ee0cbb25b82ef058ed08 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 17:46:37 +0000 Subject: [PATCH 131/403] Rewrite Ewoc entry and move from under "Incompatible Lisp Changes in Emacs 22.1" to under "Changes in Specialized Modes and Packages in Emacs 22.1". --- etc/NEWS | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 80c2a250ea4..de99c76cf07 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3440,6 +3440,27 @@ variable `calculator-radix-grouping-mode'. --- ** cplus-md.el has been deleted. + +** Ewoc changes + +*** The new function `ewoc-delete' deletes specified nodes. + +*** `ewoc-create' now takes optional arg NOSEP, which inhibits insertion of +a newline after each pretty-printed entry and after the header and footer. +This allows you to create multiple-entry ewocs on a single line and to +effect "invisible" nodes by arranging for the pretty-printer to not print +anything for those nodes. + +For example, these two sequences of expressions behave identically: + +;; NOSEP nil +(defun PP (data) (insert (format "%S" data))) +(ewoc-create 'PP "start\n") + +;; NOSEP t +(defun PP (data) (insert (format "%S\n" data))) +(ewoc-create 'PP "start\n\n" "\n" t) + * Changes in Emacs 22.1 on non-free operating systems @@ -3591,24 +3612,6 @@ deleting the part of subprocess output that matches the input. ** The variable `memory-full' now remains t until there is no longer a shortage of memory. -** The ewoc package no longer inserts a newline after each pretty-printed -entry and after the header and footer, to allow for multiple-entry ewocs to -display on a single line. - -To make pre-existing client code behave the same way as before, you must -arrange to insert a newline in three places: the pretty-printer function, -the header and the footer. It is anyway a good idea to specify a non-empty -footer so that markers after the ewoc's buffer text are properly updated. -For example: - -;; before -(defun PP (data) (insert (format "%S" data))) -(ewoc-create 'PP "start\n") - -;; now -(defun PP (data) (insert (format "%S\n" data))) -(ewoc-create 'PP "start\n\n" "\n") - * Lisp Changes in Emacs 22.1 From f3dffabb22006885c815cb496215b642cb8131e0 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 17:58:26 +0000 Subject: [PATCH 132/403] (Display): Add "Abstract Display" to menu. (Abstract Display, Abstract Display Functions) (Abstract Display Example): New nodes. --- lispref/display.texi | 334 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 334 insertions(+) diff --git a/lispref/display.texi b/lispref/display.texi index a77c895276e..3a8b8c1b7c0 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -29,6 +29,7 @@ that Emacs presents to the user. * Display Property:: Enabling special display features. * Images:: Displaying images in Emacs buffers. * Buttons:: Adding clickable buttons to Emacs buffers. +* Abstract Display:: Emacs' Widget for Object Collections. * Blinking:: How Emacs shows the matching open parenthesis. * Usual Display:: The usual conventions for displaying nonprinting chars. * Display Tables:: How to specify other conventions. @@ -4621,6 +4622,339 @@ buffer. If @var{count-current} is non-@code{nil}, count any button at @var{pos} in the search, instead of starting at the next button. @end defun +@node Abstract Display +@section Abstract Display +@cindex ewoc +@cindex display, abstract +@cindex display, arbitrary objects +@cindex model/view/controller +@cindex view part, model/view/controller + + The Ewoc package constructs buffer text that represents a structure +of Lisp objects, and updates the text to follow changes in that +structure. This is like the ``view'' component in the the +``model/view/controller'' design paradigm. + + An @dfn{ewoc} is a structure that organizes information required to +construct buffer text that represents certain Lisp data. The buffer +text of the ewoc has three parts, in order: first, fixed @dfn{header} +text; next, textual descriptions of a series of data elements (Lisp +objects that you specify); and last, fixed @dfn{footer} text. +Specifically, an ewoc contains information on: + +@itemize @bullet +@item +The buffer which its text is generated in. + +@item +The text's start position in the buffer. + +@item +The header and footer strings. + +@item +A doubly-linked chain of @dfn{nodes}, each of which contains: + +@itemize +@item +A @dfn{data element}, a single Lisp object. + +@item +Links to the preceding and following nodes in the chain. +@end itemize + +@item +A @dfn{pretty-printer} function which is responsible for +inserting the textual representation of a data +element value into the current buffer. +@end itemize + + Typically, you define an ewoc with @code{ewoc-create}, and then pass +the resulting ewoc structure to other functions in the Ewoc package to +build nodes within it, and display it in the buffer. Once it is +displayed in the buffer, other functions determine the correspondance +between buffer positions and nodes, move point from one node's textual +representation to another, and so forth. @xref{Abstract Display +Functions}. + + A node @dfn{encapsulates} a data element much the way a variable +holds a value. Normally, encapsulation occurs as a part of adding a +node to the ewoc. You can retrieve the data element value and place a +new value in its place, like so: + +@lisp +(ewoc-data @var{node}) +@result{} value + +(ewoc-set-data @var{node} @var{new-value}) +@result{} @var{new-value} +@end lisp + +@noindent +You can also use, as the data element value, a Lisp object (list or +vector) that is a container for the ``real'' value, or an index into +some other structure. The example (@pxref{Abstract Display Example}) +uses the latter approach. + + When the data changes, you will want to update the text in the +buffer. You can update all nodes by calling @code{ewoc-refresh}, or +just specific nodes using @code{ewoc-invalidate}, or all nodes +satisfying a predicate using @code{ewoc-map}. Alternatively, you can +delete invalid nodes using @code{ewoc-delete} or @code{ewoc-filter}, +and add new nodes in their place. Deleting a node from an ewoc deletes +its associated textual description from buffer, as well. + +@menu +* Abstract Display Functions:: +* Abstract Display Example:: +@end menu + +@node Abstract Display Functions +@subsection Abstract Display Functions + + In this subsection, @var{ewoc} and @var{node} stand for the +structures described above (@pxref{Abstract Display}), while +@var{data} stands for an arbitrary Lisp object used as a data element. + +@defun ewoc-create pretty-printer &optional header footer nosep +This constructs and returns a new ewoc, with no nodes (and thus no data +elements). @var{pretty-printer} should be a function that takes one +argument, a data element of the sort you plan to use in this ewoc, and +inserts its textual description at point using @code{insert} (and never +@code{insert-before-markers}, because that would interfere with the +Ewoc package's internal mechanisms). + +Normally, a newline is automatically inserted after the header, +the footer and every node's textual description. If @var{nosep} +is non-@code{nil}, no newline is inserted. This may be useful for +displaying an entire ewoc on a single line, for example, or for +making nodes ``invisible'' by arranging for @var{pretty-printer} +to do nothing for those nodes. + +An ewoc maintains its text in the buffer that is current when +you create it, so switch to the intended buffer before calling +@code{ewoc-create}. +@end defun + +@defun ewoc-buffer ewoc +This returns the buffer where @var{ewoc} maintains its text. +@end defun + +@defun ewoc-get-hf ewoc +This returns a cons cell @code{(@var{header} . @var{footer})} +made from @var{ewoc}'s header and footer. +@end defun + +@defun ewoc-set-hf ewoc header footer +This sets the header and footer of @var{ewoc} to the strings +@var{header} and @var{footer}, respectively. +@end defun + +@defun ewoc-enter-first ewoc data +@defunx ewoc-enter-last ewoc data +These add a new node encapsulating @var{data}, putting it, respectively, +at the beginning or end of @var{ewoc}'s chain of nodes. +@end defun + +@defun ewoc-enter-before ewoc node data +@defunx ewoc-enter-after ewoc node data +These add a new node encapsulating @var{data}, adding it to +@var{ewoc} before or after @var{node}, respectively. +@end defun + +@defun ewoc-prev ewoc node +@defunx ewoc-next ewoc node +These return, respectively, the previous node and the next node of @var{node} +in @var{ewoc}. +@end defun + +@defun ewoc-nth ewoc n +This returns the node in @var{ewoc} found at zero-based index @var{n}. +A negative @var{n} means count from the end. @code{ewoc-nth} returns +@code{nil} if @var{n} is out of range. +@end defun + +@defun ewoc-data node +This extracts the data encapsulated by @var{node} and returns it. +@end defun + +@defun ewoc-set-data node data +This sets the data encapsulated by @var{node} to @var{data}. +@end defun + +@defun ewoc-locate ewoc &optional pos guess +This determines the node in @var{ewoc} which contains point (or +@var{pos} if specified), and returns that node. If @var{ewoc} has no +nodes, it returns @code{nil}. If @var{pos} is before the first node, +it returns the first node; if @var{pos} is after the last node, it returns +the last node. The optional third arg @var{guess} +should be a node that is likely to be near @var{pos}; this doesn't +alter the result, but makes the function run faster. +@end defun + +@defun ewoc-location node +This returns the start position of @var{node}. +@end defun + +@defun ewoc-goto-prev ewoc arg +@defunx ewoc-goto-next ewoc arg +These move point to the previous or next, respectively, @var{arg}th node +in @var{ewoc}. @code{ewoc-goto-prev} does not move if it is already at +the first node or if @var{ewoc} is empty, whereas @code{ewoc-goto-next} +moves past the last node, returning @code{nil}. Excepting this special +case, these functions return the node moved to. +@end defun + +@defun ewoc-goto-node ewoc node +This moves point to the start of @var{node} in @var{ewoc}. +@end defun + +@defun ewoc-refresh ewoc +This function regenerates the text of @var{ewoc}. It works by +deleting the text between the header and the footer, i.e., all the +data elements' representations, and then calling the pretty-printer +function for each node, one by one, in order. +@end defun + +@defun ewoc-invalidate ewoc &rest nodes +This is similar to @code{ewoc-refresh}, except that only @var{nodes} in +@var{ewoc} are updated instead of the entire set. +@end defun + +@defun ewoc-delete ewoc &rest nodes +This deletes each node in @var{nodes} from @var{ewoc}. +@end defun + +@defun ewoc-filter ewoc predicate &rest args +This calls @var{predicate} for each data element in @var{ewoc} and +deletes those nodes for which @var{predicate} returns @code{nil}. +Any @var{args} are passed to @var{predicate}. +@end defun + +@defun ewoc-collect ewoc predicate &rest args +This calls @var{predicate} for each data element in @var{ewoc} +and returns a list of those elements for which @var{predicate} +returns non-@code{nil}. The elements in the list are ordered +as in the buffer. Any @var{args} are passed to @var{predicate}. +@end defun + +@defun ewoc-map map-function ewoc &rest args +This calls @var{map-function} for each data element in @var{ewoc} and +updates those nodes for which @var{map-function} returns non-@code{nil}. +Any @var{args} are passed to @var{map-function}. +@end defun + +@node Abstract Display Example +@subsection Abstract Display Example + + Here is a simple example using functions of the ewoc package to +implement a ``color components display'', an area in a buffer that +represents a vector of three integers (itself representing a 24-bit RGB +value) in various ways. + +@example +(setq colorcomp-ewoc nil + colorcomp-data nil + colorcomp-mode-map nil + colorcomp-labels ["Red" "Green" "Blue"]) + +(defun colorcomp-pp (data) + (if data + (let ((comp (aref colorcomp-data data))) + (insert (aref colorcomp-labels data) "\t: #x" + (format "%02X" comp) " " + (make-string (ash comp -2) ?#) "\n")) + (let ((cstr (format "#%02X%02X%02X" + (aref colorcomp-data 0) + (aref colorcomp-data 1) + (aref colorcomp-data 2))) + (samp " (sample text) ")) + (insert "Color\t: " + (propertize samp 'face `(foreground-color . ,cstr)) + (propertize samp 'face `(background-color . ,cstr)) + "\n")))) + +(defun colorcomp (color) + "Allow fiddling with COLOR in a new buffer. +The buffer is in Color Components mode." + (interactive "sColor (name or #RGB or #RRGGBB): ") + (when (string= "" color) + (setq color "green")) + (unless (color-values color) + (error "No such color: %S" color)) + (switch-to-buffer + (generate-new-buffer (format "originally: %s" color))) + (kill-all-local-variables) + (setq major-mode 'colorcomp-mode + mode-name "Color Components") + (use-local-map colorcomp-mode-map) + (erase-buffer) + (buffer-disable-undo) + (let ((data (apply 'vector (mapcar (lambda (n) (ash n -8)) + (color-values color)))) + (ewoc (ewoc-create 'colorcomp-pp + "\nColor Components\n\n" + (substitute-command-keys + "\n\\@{colorcomp-mode-map@}")))) + (set (make-local-variable 'colorcomp-data) data) + (set (make-local-variable 'colorcomp-ewoc) ewoc) + (ewoc-enter-last ewoc 0) + (ewoc-enter-last ewoc 1) + (ewoc-enter-last ewoc 2) + (ewoc-enter-last ewoc nil))) +@end example + +@cindex controller part, model/view/controller + This example can be extended to be a ``color selection widget'' (in +other words, the controller part of the ``model/view/controller'' +design paradigm) by defining commands to modify @code{colorcomp-data} +and to ``finish'' the selection process, and a keymap to tie it all +together conveniently. + +@example +(defun colorcomp-mod (index limit delta) + (let ((cur (aref colorcomp-data index))) + (unless (= limit cur) + (aset colorcomp-data index (+ cur delta))) + (ewoc-invalidate + colorcomp-ewoc + (ewoc-nth colorcomp-ewoc index) + (ewoc-nth colorcomp-ewoc -1)))) + +(defun colorcomp-R-more () (interactive) (colorcomp-mod 0 255 1)) +(defun colorcomp-G-more () (interactive) (colorcomp-mod 1 255 1)) +(defun colorcomp-B-more () (interactive) (colorcomp-mod 2 255 1)) +(defun colorcomp-R-less () (interactive) (colorcomp-mod 0 0 -1)) +(defun colorcomp-G-less () (interactive) (colorcomp-mod 1 0 -1)) +(defun colorcomp-B-less () (interactive) (colorcomp-mod 2 0 -1)) + +(defun colorcomp-copy-as-kill-and-exit () + "Copy the color components into the kill ring and kill the buffer. +The string is formatted #RRGGBB (hash followed by six hex digits)." + (interactive) + (kill-new (format "#%02X%02X%02X" + (aref colorcomp-data 0) + (aref colorcomp-data 1) + (aref colorcomp-data 2))) + (kill-buffer nil)) + +(setq colorcomp-mode-map + (let ((m (make-sparse-keymap))) + (suppress-keymap m) + (define-key m "i" 'colorcomp-R-less) + (define-key m "o" 'colorcomp-R-more) + (define-key m "k" 'colorcomp-G-less) + (define-key m "l" 'colorcomp-G-more) + (define-key m "," 'colorcomp-B-less) + (define-key m "." 'colorcomp-B-more) + (define-key m " " 'colorcomp-copy-as-kill-and-exit) + m)) +@end example + +Note that we never modify the data in each node, which is fixed when the +ewoc is created to be either @code{nil} or an index into the vector +@code{colorcomp-data}, the actual color components. + @node Blinking @section Blinking Parentheses @cindex parenthesis matching From 6f11a4c0ee3675820bdbc22d99390746398244c1 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 18:01:36 +0000 Subject: [PATCH 133/403] (Top): Add "Abstract Display" to menu. --- lispref/elisp.texi | 1 + 1 file changed, 1 insertion(+) diff --git a/lispref/elisp.texi b/lispref/elisp.texi index 0de5da29576..3def70e9868 100644 --- a/lispref/elisp.texi +++ b/lispref/elisp.texi @@ -1007,6 +1007,7 @@ Emacs Display * Display Property:: Enabling special display features. * Images:: Displaying images in Emacs buffers. * Buttons:: Adding clickable buttons to Emacs buffers. +* Abstract Display:: Emacs' Widget for Object Collections. * Blinking:: How Emacs shows the matching open parenthesis. * Usual Display:: The usual conventions for displaying nonprinting chars. * Display Tables:: How to specify other conventions. From 096432af4b8c3efcc326a43df569a11a62875709 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 18:02:18 +0000 Subject: [PATCH 134/403] *** empty log message *** --- lisp/ChangeLog | 7 +++++++ lispref/ChangeLog | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd99ecc3cdc..6fadf8613a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -15,6 +15,13 @@ (ewoc--node): Don't define constructor make-ewoc--node for this structure. + * emacs-lisp/ewoc.el (ewoc): Add member `hf-pp' to this structure. + (ewoc--wrap): New func. + (ewoc-create): Take additional arg NOSEP. If nil, wrap node and + header/footer pretty-printers. Save header/footer pretty-printer. + (ewoc-set-hf): Use ewoc's header/footer pretty-printer. + * pcvs.el (cvs-make-cvs-buffer): Specify NOSEP to `ewoc-create'. + 2006-05-27 Mathias Dahl * dired.el (dired-mode-map): Change `tumme-tag-remove' to diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 84732110f59..377f64ec8da 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,10 @@ +2006-05-27 Thien-Thi Nguyen + + * display.texi (Display): Add "Abstract Display" to menu. + (Abstract Display, Abstract Display Functions) + (Abstract Display Example): New nodes. + * elisp.texi (Top): Add "Abstract Display" to menu. + 2006-05-27 Chong Yidong * keymaps.texi (Key Sequences): Link to input events definition. From 0741626e3ff1f0678f29787b7a8a6ee7b2c11c78 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 18:13:15 +0000 Subject: [PATCH 135/403] Commentary and whitespace munging; nfc. --- lisp/emacs-lisp/ewoc.el | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 8a448f1b47f..c35d155b343 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -88,36 +88,7 @@ ;; limit! It is even possible to have another ewoc as an ;; element. In that way some kind of tree hierarchy can be created. ;; -;; Full documentation will, God willing, soon be available in a -;; Texinfo manual. - -;; In the mean time `grep '^(.*ewoc-[^-]' emacs-lisp/ewoc.el' can help -;; you find all the exported functions: -;; -;; (defun ewoc-create (pretty-printer &optional header footer nosep) -;; (defalias 'ewoc-data 'ewoc--node-data) -;; (defun ewoc-set-data (node data) -;; (defun ewoc-location (node) -;; (defun ewoc-enter-first (ewoc data) -;; (defun ewoc-enter-last (ewoc data) -;; (defun ewoc-enter-after (ewoc node data) -;; (defun ewoc-enter-before (ewoc node data) -;; (defun ewoc-next (ewoc node) -;; (defun ewoc-prev (ewoc node) -;; (defun ewoc-nth (ewoc n) -;; (defun ewoc-map (map-function ewoc &rest args) -;; (defun ewoc-filter (ewoc predicate &rest args) -;; (defun ewoc-delete (ewoc &rest nodes) -;; (defun ewoc-locate (ewoc &optional pos guess) -;; (defun ewoc-invalidate (ewoc &rest nodes) -;; (defun ewoc-goto-prev (ewoc arg) -;; (defun ewoc-goto-next (ewoc arg) -;; (defun ewoc-goto-node (ewoc node) -;; (defun ewoc-refresh (ewoc) -;; (defun ewoc-collect (ewoc predicate &rest args) -;; (defun ewoc-buffer (ewoc) -;; (defun ewoc-get-hf (ewoc) -;; (defun ewoc-set-hf (ewoc header footer) +;; The Emacs Lisp Reference Manual documents ewoc.el's "public interface". ;; Coding conventions ;; ================== @@ -125,8 +96,6 @@ ;; All functions of course start with `ewoc'. Functions and macros ;; starting with the prefix `ewoc--' are meant for internal use, ;; while those starting with `ewoc-' are exported for public use. -;; There are currently no global or buffer-local variables used. - ;;; Code: @@ -328,7 +297,6 @@ Return the new node." (ewoc--set-buffer-bind-dll ewoc (ewoc-enter-before ewoc (ewoc--node-nth -1) data))) - (defun ewoc-enter-after (ewoc node data) "Enter a new element DATA after NODE in EWOC. Return the new node." @@ -357,7 +325,6 @@ Return nil if NODE is nil or the first element." ewoc (let ((ewoc--current-dll (ewoc--dll ewoc))) (ewoc--node-prev node))))) - (defun ewoc-nth (ewoc n) "Return the Nth node. N counts from zero. Return nil if there is less than N elements. From b9e17eb3bd9b67f69f3dc815eead591a9de356a6 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 20:32:18 +0000 Subject: [PATCH 136/403] (Bindat Spec): Expand on `repeat' handler. --- lispref/ChangeLog | 2 ++ lispref/processes.texi | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 377f64ec8da..fe808c28ce9 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,5 +1,7 @@ 2006-05-27 Thien-Thi Nguyen + * processes.texi (Bindat Spec): Expand on `repeat' handler. + * display.texi (Display): Add "Abstract Display" to menu. (Abstract Display, Abstract Display Functions) (Abstract Display Example): New nodes. diff --git a/lispref/processes.texi b/lispref/processes.texi index 64b5bdd77bd..ba6ab18a39c 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi @@ -2231,10 +2231,12 @@ of @var{form}. A non-@code{nil} result indicates a match. @end itemize @item repeat @var{count} @var{field-spec}@dots{} +Process the set of @var{field-spec}s recursively, in order, and loop +starting from the first one, for @var{count} times overall (looping +@code{@var{count} @minus{} 1} times). @var{count} may be an integer, or a list of one element naming a previous field. For correct operation, each @var{field-spec} must include a name. -@c ??? What does it MEAN? @end table @node Bindat Functions From 8bc8d8544a54f941717022be1011ad564671be81 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 21:54:27 +0000 Subject: [PATCH 137/403] Fix typos. (Customization): Say "us". --- man/ChangeLog | 5 +++++ man/pcl-cvs.texi | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 1a7085ef69f..1c5f19b8321 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2006-05-27 Thien-Thi Nguyen + + * pcl-cvs.texi: Fix typos. + (Customization): Say "us". + 2006-05-26 Eli Zaretskii * org.texi: Remove bogus @setfilename. diff --git a/man/pcl-cvs.texi b/man/pcl-cvs.texi index b66585b4883..f8fec565deb 100644 --- a/man/pcl-cvs.texi +++ b/man/pcl-cvs.texi @@ -924,7 +924,7 @@ The command that is run is @code{cvs-mode-remove-file}. If you have modified a file, and for some reason decide that you don't want to keep the changes, you can undo them with this command. It works by removing your working copy of the file and then getting the latest -version from the repository (@code{cvs-mode-undo-local-changes}. +version from the repository (@code{cvs-mode-undo-local-changes}). @end table @@ -1024,17 +1024,17 @@ branch) (@code{cvs-mode-diff-head}).@refill Display a @samp{cvs diff} between the base revision of the selected files and the head revision in the repository. This displays the changes anyone has committed to the repository since you last executed -"checkout", "update" or "commit". +"checkout", "update" or "commit" (@code{cvs-mode-diff-repository}).@refill @item d v Display a @samp{cvs diff} between the selected files and the head -revision of the vendor branch in the repository. +revision of the vendor branch in the repository (@code{cvs-mode-diff-vendor}).@refill @item d y Display a @samp{cvs diff} between the selected files and yesterday's -head revision in the repository. +head revision in the repository (@code{cvs-mode-diff-yesterday}).@refill @end table @@ -1082,7 +1082,7 @@ created will be overwritten.@refill @table @kbd @item O Update all selected files with status @samp{Need-update} by running -@samp{cvs update} on them. (@code{cvs-mode-update}). +@samp{cvs update} on them (@code{cvs-mode-update}). @end table @@ -1237,8 +1237,8 @@ argument, these commands move that many messages of files. @cindex @samp{CVSROOT}, overriding If you have an idea about any customization that would be handy but -isn't present in this list, please tell me! -For info on how to reach me, see @ref{Bugs}.@refill +isn't present in this list, please tell us! +For info on how to reach us, see @ref{Bugs}.@refill @table @samp @item cvs-auto-remove-handled From 3dc2d96d22367b6dfb51086ca26566b283522d05 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 27 May 2006 22:22:47 +0000 Subject: [PATCH 138/403] Fix typos. --- man/pcl-cvs.texi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/man/pcl-cvs.texi b/man/pcl-cvs.texi index f8fec565deb..0039b26fd74 100644 --- a/man/pcl-cvs.texi +++ b/man/pcl-cvs.texi @@ -719,12 +719,12 @@ You can mark and unmark files with these commands: @table @kbd @item m This marks the file that the cursor is positioned on. If the cursor is -positioned on a directory all files in that directory are marked. +positioned on a directory all files in that directory are marked (@code{cvs-mode-mark}).@refill @item u Unmark the file that the cursor is positioned on. If the cursor is on a -directory, all files in that directory are unmarked. +directory, all files in that directory are unmarked (@code{cvs-mode-unmark}).@refill @item M @@ -743,7 +743,7 @@ Mark all files matching a regular expression @item S Mark all files in a particular state, such as ``Modified'' or -``Removed''. (@code{cvs-mode-mark-on-state}). +``Removed'' (@code{cvs-mode-mark-on-state}). @item T Toggle use of marks for the next command (@code{cvs-mode-toggle-marks}). @@ -804,7 +804,7 @@ If you are editing the files in your Emacs, an automatic @samp{revert-buffer} will be performed. (If the file contains @samp{$@asis{Id}$} keywords, @samp{cvs commit} will write a new file with the new values substituted. The auto-revert makes sure that you get -them into your buffer). The revert will not occur if you have modified +them into your buffer.) The revert will not occur if you have modified your buffer, or if @samp{cvs-auto-revert} is set to @samp{nil}. @@ -842,7 +842,7 @@ Like @kbd{f}, but use another window Invoke @samp{add-change-log-entry-other-window} to edit a @file{ChangeLog} file. The @file{ChangeLog} file will be found in the directory of the file the cursor points to, or in a parent of that -directory. (@code{cvs-mode-add-change-log-entry-other-window}).@refill +directory (@code{cvs-mode-add-change-log-entry-other-window}).@refill @end table @@ -1003,7 +1003,7 @@ This runs @code{cvs-mode-ignore}. @item = @itemx d = Display a @samp{cvs diff} between the selected files and the version -that they are based on. (@code{cvs-mode-diff}).@refill +that they are based on (@code{cvs-mode-diff}).@refill @item d b If CVS finds a conflict while merging two versions of a file (during a @@ -1017,8 +1017,8 @@ With the @kbd{d b} command you can run a @samp{diff} on the files @item d h Display a @samp{cvs diff} between the selected files and the head -revision in the repository (the most recent version on the current -branch) (@code{cvs-mode-diff-head}).@refill +revision (the most recent version on the current +branch) in the repository (@code{cvs-mode-diff-head}).@refill @item d r Display a @samp{cvs diff} between the base revision of the selected From 26837cd3eabe734e6e077a73e5cb6e0844302203 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 27 May 2006 22:36:40 +0000 Subject: [PATCH 139/403] *** empty log message *** --- src/ChangeLog | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5a0b7621643..6f633ac981b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2006-05-28 Kim F. Storm + + * xdisp.c (get_phys_cursor_geometry): Return computed x and y through + parameters. Adjust x and width in case cursor in on a partially + visible stretch glyph on the left edge. + (erase_phys_cursor): Don't erase into left fringe/margin in case + previous cursor glyph is a partially visible stretch glyph on left. + + * dispextern.h (get_phys_cursor_geometry): Update prototype. + + * xterm.c (x_draw_stretch_glyph_string): Fix problems with invisible + cursor and erasing cursor on partially visible stretch glyph on left. + (x_draw_hollow_cursor): Compute x via get_phys_cursor_geometry. + + * macterm.c: Likewise. + + * w32term.c: Likewise. + 2006-05-27 YAMAMOTO Mitsuharu * macselect.c (mac_handle_apple_event): Return @@ -127,7 +145,7 @@ * xterm.c: Remove declarations already in xterm.h * xterm.h: Add extern declarations for x_clear_errors, - x_fully_uncatch_errors, x_catching_errors and + x_fully_uncatch_errors, x_catching_errors and x_alloc_lighter_color_for_widget. Remove duplicated declarations. 2006-05-21 Richard Stallman @@ -207,7 +225,7 @@ * xfaces.c (better_font_p): Any font beats no font. (best_matching_font): Simplify based on above change. - + * buffer.c (Fprevious_overlay_change, Fnext_overlay_change): Doc fixes. 2006-05-16 Kim F. Storm From f5080b2277726e794384955acb7fd39d845d01df Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 27 May 2006 22:36:58 +0000 Subject: [PATCH 140/403] (get_phys_cursor_geometry): Return computed x and y through parameters. Adjust x and width in case cursor in on a partially visible stretch glyph on the left edge. (erase_phys_cursor): Don't erase into left fringe/margin in case previous cursor glyph is a partially visible stretch glyph on left. --- src/xdisp.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index d74b6d04aa5..6ebc64bf9f5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1986,15 +1986,15 @@ get_glyph_string_clip_rect (s, nr) Set w->phys_cursor_width to width of phys cursor. */ -int -get_phys_cursor_geometry (w, row, glyph, heightp) +void +get_phys_cursor_geometry (w, row, glyph, xp, yp, heightp) struct window *w; struct glyph_row *row; struct glyph *glyph; - int *heightp; + int *xp, *yp, *heightp; { struct frame *f = XFRAME (WINDOW_FRAME (w)); - int y, wd, h, h0, y0; + int x, y, wd, h, h0, y0; /* Compute the width of the rectangle to draw. If on a stretch glyph, and `x-stretch-block-cursor' is nil, don't draw a @@ -2004,6 +2004,14 @@ get_phys_cursor_geometry (w, row, glyph, heightp) #ifdef HAVE_NTGUI wd++; /* Why? */ #endif + + x = w->phys_cursor.x; + if (x < 0) + { + wd += x; + x = 0; + } + if (glyph->type == STRETCH_GLYPH && !x_stretch_cursor_p) wd = min (FRAME_COLUMN_WIDTH (f), wd); @@ -2033,8 +2041,9 @@ get_phys_cursor_geometry (w, row, glyph, heightp) } } + *xp = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, x); + *yp = WINDOW_TO_FRAME_PIXEL_Y (w, y); *heightp = h; - return WINDOW_TO_FRAME_PIXEL_Y (w, y); } /* @@ -21319,7 +21328,7 @@ erase_phys_cursor (w) /* Maybe clear the display under the cursor. */ if (w->phys_cursor_type == HOLLOW_BOX_CURSOR) { - int x, y; + int x, y, left_x; int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); int width; @@ -21327,11 +21336,16 @@ erase_phys_cursor (w) if (cursor_glyph == NULL) goto mark_cursor_off; - x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); + width = cursor_glyph->pixel_width; + left_x = window_box_left_offset (w, TEXT_AREA); + x = w->phys_cursor.x; + if (x < left_x) + width -= left_x - x; + width = min (width, window_box_width (w, TEXT_AREA) - x); y = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, cursor_row->y)); - width = min (cursor_glyph->pixel_width, - window_box_width (w, TEXT_AREA) - w->phys_cursor.x); + x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, max (x, left_x)); + if (width > 0) rif->clear_frame_area (f, x, y, width, cursor_row->visible_height); } From 11d2f3e76d1807e71ef56b4c63fa698b630a3ab1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 27 May 2006 22:37:05 +0000 Subject: [PATCH 141/403] (get_phys_cursor_geometry): Update prototype. --- src/dispextern.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index 43655ab9a19..2e1eae3fdb0 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2693,8 +2693,8 @@ extern void x_fix_overlapping_area P_ ((struct window *, struct glyph_row *, extern void draw_phys_cursor_glyph P_ ((struct window *, struct glyph_row *, enum draw_glyphs_face)); -extern int get_phys_cursor_geometry P_ ((struct window *, struct glyph_row *, - struct glyph *, int *)); +extern void get_phys_cursor_geometry P_ ((struct window *, struct glyph_row *, + struct glyph *, int *, int *, int *)); extern void erase_phys_cursor P_ ((struct window *)); extern void display_and_set_cursor P_ ((struct window *, int, int, int, int, int)); From e8f6b0db19708c117c820c6e504fbf4932462247 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sat, 27 May 2006 22:37:39 +0000 Subject: [PATCH 142/403] (x_draw_stretch_glyph_string): Fix problems with invisible cursor and erasing cursor on partially visible stretch glyph on left. (x_draw_hollow_cursor): Compute x via get_phys_cursor_geometry. --- src/macterm.c | 36 +++++++++++++++++++++++++++--------- src/w32term.c | 35 ++++++++++++++++++++++++++--------- src/xterm.c | 36 +++++++++++++++++++++++++++--------- 3 files changed, 80 insertions(+), 27 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index 1f25b022f38..9a2d6e2a35d 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -3529,19 +3529,28 @@ x_draw_stretch_glyph_string (s) { /* If `x-stretch-block-cursor' is nil, don't draw a block cursor as wide as the stretch glyph. */ - int width = min (FRAME_COLUMN_WIDTH (s->f), s->background_width); + int width, background_width = s->background_width; + int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); + + if (x < left_x) + { + background_width -= left_x - x; + x = left_x; + } + width = min (FRAME_COLUMN_WIDTH (s->f), background_width); /* Draw cursor. */ - x_draw_glyph_string_bg_rect (s, s->x, s->y, width, s->height); + x_draw_glyph_string_bg_rect (s, x, s->y, width, s->height); /* Clear rest using the GC of the original non-cursor face. */ - if (width < s->background_width) + if (width < background_width) { - int x = s->x + width, y = s->y; - int w = s->background_width - width, h = s->height; + int y = s->y; + int w = background_width - width, h = s->height; Rect r; GC gc; + x += width; if (s->row->mouse_face_p && cursor_in_mouse_face_p (s->w)) { @@ -3568,8 +3577,18 @@ x_draw_stretch_glyph_string (s) } } else if (!s->background_filled_p) - x_draw_glyph_string_bg_rect (s, s->x, s->y, s->background_width, - s->height); + { + int background_width = s->background_width; + int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); + + if (x < left_x) + { + background_width -= left_x - x; + x = left_x; + } + if (background_width > 0) + x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); + } s->background_filled_p = 1; } @@ -5396,8 +5415,7 @@ x_draw_hollow_cursor (w, row) return; /* Compute frame-relative coordinates for phys cursor. */ - x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - y = get_phys_cursor_geometry (w, row, cursor_glyph, &h); + get_phys_cursor_geometry (w, row, cursor_glyph, &x, &y, &h); wd = w->phys_cursor_width; /* The foreground of cursor_gc is typically the same as the normal diff --git a/src/w32term.c b/src/w32term.c index 2b5c9da39b6..1b2b5a30503 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2389,20 +2389,29 @@ x_draw_stretch_glyph_string (s) { /* If `x-stretch-block-cursor' is nil, don't draw a block cursor as wide as the stretch glyph. */ - int width = min (FRAME_COLUMN_WIDTH (s->f), s->background_width); + int width, background_width = s->background_width; + int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); + + if (x < left_x) + { + background_width -= left_x - x; + x = left_x; + } + width = min (FRAME_COLUMN_WIDTH (s->f), background_width); /* Draw cursor. */ - x_draw_glyph_string_bg_rect (s, s->x, s->y, width, s->height); + x_draw_glyph_string_bg_rect (s, x, s->y, width, s->height); /* Clear rest using the GC of the original non-cursor face. */ - if (width < s->background_width) + if (width < background_width) { XGCValues *gc = s->face->gc; - int x = s->x + width, y = s->y; - int w = s->background_width - width, h = s->height; + int y = s->y; + int w = background_width - width, h = s->height; RECT r; HDC hdc = s->hdc; + x += width; if (s->row->mouse_face_p && cursor_in_mouse_face_p (s->w)) { @@ -2431,8 +2440,17 @@ x_draw_stretch_glyph_string (s) } } else if (!s->background_filled_p) - x_draw_glyph_string_bg_rect (s, s->x, s->y, s->background_width, - s->height); + { + int background_width = s->background_width; + int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); + + if (x < left_x) + { + background_width -= left_x - x; + x = left_x; + } + if (background_width > 0) + x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); s->background_filled_p = 1; } @@ -4942,8 +4960,7 @@ x_draw_hollow_cursor (w, row) return; /* Compute frame-relative coordinates for phys cursor. */ - rect.left = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - rect.top = get_phys_cursor_geometry (w, row, cursor_glyph, &h); + get_phys_cursor_geometry (w, row, cursor_glyph, &rect.left, &rect.top, &h); rect.bottom = rect.top + h; rect.right = rect.left + w->phys_cursor_width; diff --git a/src/xterm.c b/src/xterm.c index f14f281a634..6624fa79df1 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2531,19 +2531,28 @@ x_draw_stretch_glyph_string (s) { /* If `x-stretch-block-cursor' is nil, don't draw a block cursor as wide as the stretch glyph. */ - int width = min (FRAME_COLUMN_WIDTH (s->f), s->background_width); + int width, background_width = s->background_width; + int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); + + if (x < left_x) + { + background_width -= left_x - x; + x = left_x; + } + width = min (FRAME_COLUMN_WIDTH (s->f), background_width); /* Draw cursor. */ - x_draw_glyph_string_bg_rect (s, s->x, s->y, width, s->height); + x_draw_glyph_string_bg_rect (s, x, s->y, width, s->height); /* Clear rest using the GC of the original non-cursor face. */ - if (width < s->background_width) + if (width < background_width) { - int x = s->x + width, y = s->y; - int w = s->background_width - width, h = s->height; + int y = s->y; + int w = background_width - width, h = s->height; XRectangle r; GC gc; + x += width; if (s->row->mouse_face_p && cursor_in_mouse_face_p (s->w)) { @@ -2574,8 +2583,18 @@ x_draw_stretch_glyph_string (s) } } else if (!s->background_filled_p) - x_draw_glyph_string_bg_rect (s, s->x, s->y, s->background_width, - s->height); + { + int background_width = s->background_width; + int x = s->x, left_x = window_box_left_offset (s->w, TEXT_AREA); + + if (x < left_x) + { + background_width -= left_x - x; + x = left_x; + } + if (background_width > 0) + x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); + } s->background_filled_p = 1; } @@ -7155,8 +7174,7 @@ x_draw_hollow_cursor (w, row) return; /* Compute frame-relative coordinates for phys cursor. */ - x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); - y = get_phys_cursor_geometry (w, row, cursor_glyph, &h); + get_phys_cursor_geometry (w, row, cursor_glyph, &x, &y, &h); wd = w->phys_cursor_width; /* The foreground of cursor_gc is typically the same as the normal From 27e53d7c8688b4d032e71dd728fab98ae9b4202b Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 27 May 2006 22:44:18 +0000 Subject: [PATCH 143/403] *** empty log message *** --- lisp/ChangeLog | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6fadf8613a9..a26ff639b93 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-28 Nick Roberts + + * tumme.el (tumme-show-all-from-dir-max-files): Fix typo. + (tumme-show-all-from-dir): Add autoload. + 2006-05-27 Mathias Dahl * tumme.el: Change a lot of `(if .. (progn ..)' to `(when ..)'. @@ -5,37 +10,33 @@ 2006-05-27 Thien-Thi Nguyen - * emacs-lisp/ewoc.el (ewoc--create): No longer - take HEADER and FOOTER args. Update unique caller. - + * emacs-lisp/ewoc.el (ewoc--create): No longer take HEADER and + FOOTER args. Update unique caller. (ewoc-delete): Compute last node once before looping. - (ewoc--node-branch): Merge into unique caller. - - (ewoc--node): Don't define constructor - make-ewoc--node for this structure. - - * emacs-lisp/ewoc.el (ewoc): Add member `hf-pp' to this structure. + (ewoc--node): Don't define constructor make-ewoc--node for this + structure. + (ewoc): Add member `hf-pp' to this structure. (ewoc--wrap): New func. (ewoc-create): Take additional arg NOSEP. If nil, wrap node and header/footer pretty-printers. Save header/footer pretty-printer. - (ewoc-set-hf): Use ewoc's header/footer pretty-printer. + (ewoc-set-hf): Use ewoc's header/footer pretty-printer. * + * pcvs.el (cvs-make-cvs-buffer): Specify NOSEP to `ewoc-create'. 2006-05-27 Mathias Dahl * dired.el (dired-mode-map): Change `tumme-tag-remove' to - `tumme-delete-tag'. Rename `Remove Image Tag' to `Delete Image + `tumme-delete-tag'. Rename `Remove Image Tag' to `Delete Image Tag'. Change "Compare directories..." to "Change Directories...". - + Move tumme commands to Operate, Regexp and Immediate menus. + Change "Add Comment" to "Add Image Comment". Change "Add Image + Tag" to "Add Image Tags". + * tumme.el (tumme-delete-tag): Rename from `tumme-tag-remove'. (tumme-setup-dired-keybindings): Change `tumme-add-remove' to `tumme-delete-tag'. - * dired.el (dired-mode-map): Move tumme commands to Operate, - Regexp and Immediate menus. Change "Add Comment" to "Add Image - Comment". Change "Add Image Tag" to "Add Image Tags". - 2006-05-26 Luc Teirlinck * shell.el (shell-mode): Call shell-dirtrack-mode after @@ -139,15 +140,12 @@ 2006-05-25 Mathias Dahl * dired.el (dired-mode-map): Add help-echo strings to tumme - commands. + commands. Bind `tumme-dired-display-image' to C-t i. * tumme.el (tumme-display-image): Change documentation string slightly. (tumme-dired-display-image): Add call to `display-buffer'. - * dired.el (dired-mode-map): Bind `tumme-dired-display-image' - to C-t i. - 2006-05-25 Thien-Thi Nguyen * emacs-lisp/bindat.el (bindat-unpack, bindat-pack): From c907d53852f0df91ae434d8a7f52f8d11657c6d1 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Sat, 27 May 2006 22:45:48 +0000 Subject: [PATCH 144/403] (tumme-show-all-from-dir-max-files): Fix typo. (tumme-show-all-from-dir): Add autoload. --- lisp/tumme.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/tumme.el b/lisp/tumme.el index b770c292d35..d6420bf33d7 100644 --- a/lisp/tumme.el +++ b/lisp/tumme.el @@ -508,7 +508,7 @@ Used by `tumme-copy-with-exif-file-name'." :group 'tumme) (defcustom tumme-show-all-from-dir-max-files 50 - "*Maximum number of files to show using`tumme-show-all-from-dir'. + "*Maximum number of files to show using `tumme-show-all-from-dir'. before warning the user." :type 'integer :group 'tumme) @@ -840,6 +840,7 @@ thumbnail buffer to be selected." (display-buffer tumme-thumbnail-buffer) (pop-to-buffer tumme-thumbnail-buffer)))) +;;;###autoload (defun tumme-show-all-from-dir (dir) "Make a preview buffer for all images in DIR and display it. If the number of files in DIR matching `image-file-name-regexp' From 122e29ded4b5a503639a00f643e9778a3bcaeffa Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 28 May 2006 03:58:47 +0000 Subject: [PATCH 145/403] * msb.el (mouse-select-buffer): Minor fix to make popup menu work with no X toolkit. --- lisp/ChangeLog | 5 +++++ lisp/msb.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a26ff639b93..8e2edd4f83f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-27 Chong Yidong + + * msb.el (mouse-select-buffer): Minor fix to make popup menu work + with no X toolkit. + 2006-05-28 Nick Roberts * tumme.el (tumme-show-all-from-dir-max-files): Fix typo. diff --git a/lisp/msb.el b/lisp/msb.el index 61ddce5dae0..d5f32486971 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -1007,7 +1007,7 @@ variable `msb-menu-cond'." (mouse-select-buffer event)) ((and (numberp (car choice)) (null (cdr choice))) - (let ((msb--last-buffer-menu (nthcdr 3 (assq (car choice) + (let ((msb--last-buffer-menu (nthcdr 2 (assq (car choice) msb--last-buffer-menu)))) (mouse-select-buffer event))) ((while (numberp (car choice)) From 6b59b13027349e4c32de9a42ee296de39c9820ab Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 28 May 2006 17:02:37 +0000 Subject: [PATCH 146/403] * replace.el (query-replace-defaults): New variable. (query-replace-read-from): Use `query-replace-defaults' for default value, instead of history list. (query-replace-read-to): Update `query-replace-defaults'. --- lisp/ChangeLog | 7 +++++++ lisp/replace.el | 36 +++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8e2edd4f83f..fe49db5163f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2006-05-28 Chong Yidong + + * replace.el (query-replace-defaults): New variable. + (query-replace-read-from): Use `query-replace-defaults' for + default value, instead of history list. + (query-replace-read-to): Update `query-replace-defaults'. + 2006-05-27 Chong Yidong * msb.el (mouse-select-buffer): Minor fix to make popup menu work diff --git a/lisp/replace.el b/lisp/replace.el index 305573ad0e5..53148be64c5 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -36,6 +36,11 @@ (defvar query-replace-history nil) +(defvar query-replace-defaults nil + "Default values of FROM-STRING and TO-STRING for `query-replace'. +This is a cons cell (FROM-STRING . TO-STRING), or nil if there is +no default value.") + (defvar query-replace-interactive nil "Non-nil means `query-replace' uses the last search string. That becomes the \"string to replace\".") @@ -94,32 +99,27 @@ The return value can also be a pair (FROM . TO) indicating that the user wants to replace FROM with TO." (if query-replace-interactive (car (if regexp-flag regexp-search-ring search-ring)) - (let* ((lastfrom (car (symbol-value query-replace-from-history-variable))) - (lastto (car (symbol-value query-replace-to-history-variable))) - (from + (let ((from ;; The save-excursion here is in case the user marks and copies ;; a region in order to specify the minibuffer input. ;; That should not clobber the region for the query-replace itself. (save-excursion - (when (equal lastfrom lastto) - ;; Typically, this is because the two histlists are shared. - (setq lastfrom (cadr (symbol-value - query-replace-from-history-variable)))) (read-from-minibuffer - (if (and lastto lastfrom) + (if query-replace-defaults (format "%s (default %s -> %s): " prompt - (query-replace-descr lastfrom) - (query-replace-descr lastto)) + (query-replace-descr (car query-replace-defaults)) + (query-replace-descr (cdr query-replace-defaults))) (format "%s: " prompt)) nil nil nil query-replace-from-history-variable nil t)))) - (if (and (zerop (length from)) lastto lastfrom) + (if (and (zerop (length from)) query-replace-defaults) (progn (set query-replace-from-history-variable (cdr (symbol-value query-replace-from-history-variable))) - (cons lastfrom - (query-replace-compile-replacement lastto regexp-flag))) + (cons (car query-replace-defaults) + (query-replace-compile-replacement + (cdr query-replace-defaults) regexp-flag))) ;; Warn if user types \n or \t, but don't reject the input. (and regexp-flag (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) @@ -177,10 +177,12 @@ the original string if not." "Query and return the `to' argument of a query-replace operation." (query-replace-compile-replacement (save-excursion - (read-from-minibuffer - (format "%s %s with: " prompt (query-replace-descr from)) - nil nil nil - query-replace-to-history-variable from t)) + (let ((to (read-from-minibuffer + (format "%s %s with: " prompt (query-replace-descr from)) + nil nil nil + query-replace-to-history-variable from t))) + (setq query-replace-defaults (cons from to)) + to)) regexp-flag)) (defun query-replace-read-args (prompt regexp-flag &optional noerror) From 5dae4b115603351a050276b940700de95ba7a28d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 28 May 2006 17:05:38 +0000 Subject: [PATCH 147/403] Fix last change. --- lisp/replace.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index 53148be64c5..72236c298cd 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -114,12 +114,9 @@ wants to replace FROM with TO." query-replace-from-history-variable nil t)))) (if (and (zerop (length from)) query-replace-defaults) - (progn - (set query-replace-from-history-variable - (cdr (symbol-value query-replace-from-history-variable))) - (cons (car query-replace-defaults) - (query-replace-compile-replacement - (cdr query-replace-defaults) regexp-flag))) + (cons (car query-replace-defaults) + (query-replace-compile-replacement + (cdr query-replace-defaults) regexp-flag)) ;; Warn if user types \n or \t, but don't reject the input. (and regexp-flag (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) From 794033ae3c7e6a9c3d3e822a22dd5ea62d5c034b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 20:18:34 +0000 Subject: [PATCH 148/403] *** empty log message *** --- src/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 6f633ac981b..fecf2dd636e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2006-05-28 Kim F. Storm + + * xdisp.c (set_cursor_from_row): If cursor cannot be set in row, + don't update w->cursor and return 0. Return 1 on success. + (try_cursor_movement): Repeat set_cursor_from_row on successive rows + until it succeeds. + + * dispextern.h (set_cursor_from_row): Update prototype. + 2006-05-28 Kim F. Storm * xdisp.c (get_phys_cursor_geometry): Return computed x and y through From a4f3f618ebf3f27c79ddce6e28fca7a04eae1616 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 20:19:07 +0000 Subject: [PATCH 149/403] (set_cursor_from_row): If cursor cannot be set in row, don't update w->cursor and return 0. Return 1 on success. (try_cursor_movement): Repeat set_cursor_from_row on successive rows until it succeeds. --- src/xdisp.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 6ebc64bf9f5..aa0625532ab 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11620,9 +11620,11 @@ redisplay_window_1 (window) /* Set cursor position of W. PT is assumed to be displayed in ROW. DELTA is the number of bytes by which positions recorded in ROW - differ from current buffer positions. */ + differ from current buffer positions. -void + Return 0 if cursor is not on this row. 1 otherwise. */ + +int set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) struct window *w; struct glyph_row *row; @@ -11772,6 +11774,11 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) SKIP_GLYPHS (glyph, end, x, EQ (glyph->object, string)); } } + + /* If we reached the end of the line, and end was from a string, + cursor is not on this line. */ + if (glyph == end) + return 0; } w->cursor.hpos = glyph - row->glyphs[TEXT_AREA]; @@ -11805,6 +11812,8 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) else CHARPOS (this_line_start_pos) = 0; } + + return 1; } @@ -12488,8 +12497,18 @@ try_cursor_movement (window, startp, scroll_step) rc = CURSOR_MOVEMENT_MUST_SCROLL; else { - set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); - rc = CURSOR_MOVEMENT_SUCCESS; + do + { + if (set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0)) + { + rc = CURSOR_MOVEMENT_SUCCESS; + break; + } + ++row; + } + while (MATRIX_ROW_BOTTOM_Y (row) < last_y + && MATRIX_ROW_START_CHARPOS (row) == PT + && cursor_row_p (w, row)); } } } From c558b5be6c45379c48009b595b1792dff901b26d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 20:19:17 +0000 Subject: [PATCH 150/403] (set_cursor_from_row): Update prototype. --- src/dispextern.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index 2e1eae3fdb0..6654e8beb5a 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2632,8 +2632,8 @@ void remember_mouse_glyph P_ ((struct frame *, int, int, NativeRectangle *)); void mark_window_display_accurate P_ ((Lisp_Object, int)); void redisplay_preserve_echo_area P_ ((int)); -void set_cursor_from_row P_ ((struct window *, struct glyph_row *, - struct glyph_matrix *, int, int, int, int)); +int set_cursor_from_row P_ ((struct window *, struct glyph_row *, + struct glyph_matrix *, int, int, int, int)); void init_iterator P_ ((struct it *, struct window *, int, int, struct glyph_row *, enum face_id)); void init_iterator_to_row_start P_ ((struct it *, struct window *, From c5301b5c3691708104c8bc257ca1893702cd6f0d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 28 May 2006 20:56:34 +0000 Subject: [PATCH 151/403] (makefile-browser-map, makefile-mode-syntax-table): Move init inside decl. (makefile-fill-paragraph): Use the default comment-filling code. --- lisp/ChangeLog | 8 ++- lisp/progmodes/make-mode.el | 102 ++++++++++++++++-------------------- 2 files changed, 51 insertions(+), 59 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe49db5163f..1211aed5d27 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-28 Stefan Monnier + + * progmodes/make-mode.el (makefile-browser-map) + (makefile-mode-syntax-table): Move initialization inside declaration. + (makefile-fill-paragraph): Use the default comment-filling code. + 2006-05-28 Chong Yidong * replace.el (query-replace-defaults): New variable. @@ -44,7 +50,7 @@ Move tumme commands to Operate, Regexp and Immediate menus. Change "Add Comment" to "Add Image Comment". Change "Add Image Tag" to "Add Image Tags". - + * tumme.el (tumme-delete-tag): Rename from `tumme-tag-remove'. (tumme-setup-dired-keybindings): Change `tumme-add-remove' to `tumme-delete-tag'. diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 66507dd78df..d22aedb6058 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -291,6 +291,9 @@ not be enclosed in { } or ( )." ;; that if you change this regexp you might have to fix the imenu index in ;; makefile-imenu-generic-expression. (defconst makefile-macroassign-regex + ;; We used to match not just the varname but also the whole value + ;; (spanning potentially several lines). + ;; "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)" "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)" "Regex used to find macro assignment lines in a makefile.") @@ -623,39 +626,38 @@ The function must satisfy this calling convention: map) "The keymap that is used in Makefile mode.") -(defvar makefile-browser-map nil + +(defvar makefile-browser-map + (let ((map (make-sparse-keymap))) + (define-key map "n" 'makefile-browser-next-line) + (define-key map "\C-n" 'makefile-browser-next-line) + (define-key map "p" 'makefile-browser-previous-line) + (define-key map "\C-p" 'makefile-browser-previous-line) + (define-key map " " 'makefile-browser-toggle) + (define-key map "i" 'makefile-browser-insert-selection) + (define-key map "I" 'makefile-browser-insert-selection-and-quit) + (define-key map "\C-c\C-m" 'makefile-browser-insert-continuation) + (define-key map "q" 'makefile-browser-quit) + ;; disable horizontal movement + (define-key map "\C-b" 'undefined) + (define-key map "\C-f" 'undefined) + map) "The keymap that is used in the macro- and target browser.") -(if makefile-browser-map - () - (setq makefile-browser-map (make-sparse-keymap)) - (define-key makefile-browser-map "n" 'makefile-browser-next-line) - (define-key makefile-browser-map "\C-n" 'makefile-browser-next-line) - (define-key makefile-browser-map "p" 'makefile-browser-previous-line) - (define-key makefile-browser-map "\C-p" 'makefile-browser-previous-line) - (define-key makefile-browser-map " " 'makefile-browser-toggle) - (define-key makefile-browser-map "i" 'makefile-browser-insert-selection) - (define-key makefile-browser-map "I" 'makefile-browser-insert-selection-and-quit) - (define-key makefile-browser-map "\C-c\C-m" 'makefile-browser-insert-continuation) - (define-key makefile-browser-map "q" 'makefile-browser-quit) - ;; disable horizontal movement - (define-key makefile-browser-map "\C-b" 'undefined) - (define-key makefile-browser-map "\C-f" 'undefined)) -(defvar makefile-mode-syntax-table nil) -(if makefile-mode-syntax-table - () - (setq makefile-mode-syntax-table (make-syntax-table)) - (modify-syntax-entry ?\( "() " makefile-mode-syntax-table) - (modify-syntax-entry ?\) ")( " makefile-mode-syntax-table) - (modify-syntax-entry ?\[ "(] " makefile-mode-syntax-table) - (modify-syntax-entry ?\] ")[ " makefile-mode-syntax-table) - (modify-syntax-entry ?\{ "(} " makefile-mode-syntax-table) - (modify-syntax-entry ?\} "){ " makefile-mode-syntax-table) - (modify-syntax-entry ?\' "\" " makefile-mode-syntax-table) - (modify-syntax-entry ?\` "\" " makefile-mode-syntax-table) - (modify-syntax-entry ?# "< " makefile-mode-syntax-table) - (modify-syntax-entry ?\n "> " makefile-mode-syntax-table)) +(defvar makefile-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?\( "() " st) + (modify-syntax-entry ?\) ")( " st) + (modify-syntax-entry ?\[ "(] " st) + (modify-syntax-entry ?\] ")[ " st) + (modify-syntax-entry ?\{ "(} " st) + (modify-syntax-entry ?\} "){ " st) + (modify-syntax-entry ?\' "\" " st) + (modify-syntax-entry ?\` "\" " st) + (modify-syntax-entry ?# "< " st) + (modify-syntax-entry ?\n "> " st) + st)) (defvar makefile-imake-mode-syntax-table (copy-syntax-table makefile-mode-syntax-table)) @@ -1303,29 +1305,8 @@ definition and conveniently use this command." (beginning-of-line) (cond ((looking-at "^#+") - ;; Found a comment. Set the fill prefix, and find the paragraph - ;; boundaries by searching for lines that look like comment-only - ;; lines. - (let ((fill-prefix (match-string-no-properties 0)) - (fill-paragraph-function nil)) - (save-excursion - (save-restriction - (narrow-to-region - ;; Search backwards. - (save-excursion - (while (and (zerop (forward-line -1)) - (looking-at "^#"))) - ;; We may have gone too far. Go forward again. - (or (looking-at "^#") - (forward-line 1)) - (point)) - ;; Search forwards. - (save-excursion - (while (looking-at "^#") - (forward-line)) - (point))) - (fill-paragraph nil) - t)))) + ;; Found a comment. Return nil to let normal filling take place. + nil) ;; Must look for backslashed-region before looking for variable ;; assignment. @@ -1354,7 +1335,9 @@ definition and conveniently use this command." (makefile-backslash-region (point-min) (point-max) nil) (goto-char (point-max)) (if (< (skip-chars-backward "\n") 0) - (delete-region (point) (point-max)))))) + (delete-region (point) (point-max))))) + ;; Return non-nil to indicate it's been filled. + t) ((looking-at makefile-macroassign-regex) ;; Have a macro assign. Fill just this line, and then backslash @@ -1363,10 +1346,13 @@ definition and conveniently use this command." (narrow-to-region (point) (line-beginning-position 2)) (let ((fill-paragraph-function nil)) (fill-paragraph nil)) - (makefile-backslash-region (point-min) (point-max) nil))))) + (makefile-backslash-region (point-min) (point-max) nil)) + ;; Return non-nil to indicate it's been filled. + t) - ;; Always return non-nil so we don't fill anything else. - t) + (t + ;; Return non-nil so we don't fill anything else. + t)))) @@ -1882,5 +1868,5 @@ If it isn't in one, return nil." (provide 'make-mode) -;;; arch-tag: bd23545a-de91-44fb-b1b2-feafbb2635a0 +;; arch-tag: bd23545a-de91-44fb-b1b2-feafbb2635a0 ;;; make-mode.el ends here From f3d50954b606070271ab5ed2f8973086448763c6 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 21:30:49 +0000 Subject: [PATCH 152/403] *** empty log message *** --- lisp/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1211aed5d27..cc5602d44a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-05-28 Kim F. Storm + + * emacs-lisp/bindat.el (bindat--unpack-u8): Use aref also for strings. + 2006-05-28 Stefan Monnier * progmodes/make-mode.el (makefile-browser-map) From 16ddb1aeb78cae06924b19b90762902308c984bd Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 21:31:04 +0000 Subject: [PATCH 153/403] (bindat--unpack-u8): Use aref also for strings. --- lisp/emacs-lisp/bindat.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 377ff8cc27e..65a9ab46c79 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -201,9 +201,7 @@ (defun bindat--unpack-u8 () (prog1 - (if (stringp raw-data) - (string-to-char (substring raw-data pos (1+ pos))) - (aref raw-data pos)) + (aref raw-data pos) (setq pos (1+ pos)))) (defun bindat--unpack-u16 () From 98d0738d275c8dc0e29eefca0acbb97b31a36f37 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 22:19:52 +0000 Subject: [PATCH 154/403] (bindat-idx, bindat-raw): Rename dynamic variables `pos' and `raw-data' for clarity, as eval forms may access these. --- lisp/emacs-lisp/bindat.el | 108 +++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 65a9ab46c79..d05eed2c4a2 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -188,21 +188,20 @@ ;; ([FIELD] eval FORM) ;; is interpreted by evalling FORM for its side effects only. ;; If FIELD is specified, the value is bound to that field. -;; The FORM may access and update `raw-data' and `pos' (see `bindat-unpack'), -;; as well as the lisp data structure in `struct'. +;; The FORM may access and update `bindat-raw' and `bindat-idx' (see `bindat-unpack'). ;;; Code: ;; Helper functions for structure unpacking. -;; Relies on dynamic binding of RAW-DATA and POS +;; Relies on dynamic binding of BINDAT-RAW and BINDAT-IDX -(defvar raw-data) -(defvar pos) +(defvar bindat-raw) +(defvar bindat-idx) (defun bindat--unpack-u8 () (prog1 - (aref raw-data pos) - (setq pos (1+ pos)))) + (aref bindat-raw bindat-idx) + (setq bindat-idx (1+ bindat-idx)))) (defun bindat--unpack-u16 () (let* ((a (bindat--unpack-u8)) (b (bindat--unpack-u8))) @@ -259,16 +258,16 @@ j (lsh j -1))))) bits)) ((eq type 'str) - (let ((s (substring raw-data pos (+ pos len)))) - (setq pos (+ pos len)) + (let ((s (substring bindat-raw bindat-idx (+ bindat-idx len)))) + (setq bindat-idx (+ bindat-idx len)) (if (stringp s) s (string-make-unibyte (concat s))))) ((eq type 'strz) (let ((i 0) s) - (while (and (< i len) (/= (aref raw-data (+ pos i)) 0)) + (while (and (< i len) (/= (aref bindat-raw (+ bindat-idx i)) 0)) (setq i (1+ i))) - (setq s (substring raw-data pos (+ pos i))) - (setq pos (+ pos len)) + (setq s (substring bindat-raw bindat-idx (+ bindat-idx i))) + (setq bindat-idx (+ bindat-idx len)) (if (stringp s) s (string-make-unibyte (concat s))))) ((eq type 'vec) @@ -310,10 +309,10 @@ (setq data (eval len)) (eval len))) ((eq type 'fill) - (setq pos (+ pos len))) + (setq bindat-idx (+ bindat-idx len))) ((eq type 'align) - (while (/= (% pos len) 0) - (setq pos (1+ pos)))) + (while (/= (% bindat-idx len) 0) + (setq bindat-idx (1+ bindat-idx)))) ((eq type 'struct) (setq data (bindat--unpack-group (eval len)))) ((eq type 'repeat) @@ -341,13 +340,13 @@ (setq struct (append data struct)))))) struct)) -(defun bindat-unpack (spec raw-data &optional pos) - "Return structured data according to SPEC for binary data in RAW-DATA. -RAW-DATA is a unibyte string or vector. Optional third arg POS specifies -the starting offset in RAW-DATA." - (when (multibyte-string-p raw-data) +(defun bindat-unpack (spec bindat-raw &optional bindat-idx) + "Return structured data according to SPEC for binary data in BINDAT-RAW. +BINDAT-RAW is a unibyte string or vector. Optional third arg BINDAT-IDX specifies +the starting offset in BINDAT-RAW." + (when (multibyte-string-p bindat-raw) (error "String is multibyte")) - (unless pos (setq pos 0)) + (unless bindat-idx (setq bindat-idx 0)) (bindat--unpack-group spec)) (defun bindat-get-field (struct &rest field) @@ -366,7 +365,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." struct) -;; Calculate raw-data length of structured data +;; Calculate bindat-raw length of structured data (defvar bindat--fixed-length-alist '((u8 . 1) (byte . 1) @@ -405,10 +404,10 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq struct (cons (cons field (eval len)) struct)) (eval len))) ((eq type 'fill) - (setq pos (+ pos len))) + (setq bindat-idx (+ bindat-idx len))) ((eq type 'align) - (while (/= (% pos len) 0) - (setq pos (1+ pos)))) + (while (/= (% bindat-idx len) 0) + (setq bindat-idx (1+ bindat-idx)))) ((eq type 'struct) (bindat--length-group (if field (bindat-get-field struct field) struct) (eval len))) @@ -435,25 +434,25 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq len (cdr type))) (if field (setq last (bindat-get-field struct field))) - (setq pos (+ pos len)))))))) + (setq bindat-idx (+ bindat-idx len)))))))) (defun bindat-length (spec struct) - "Calculate raw-data length for STRUCT according to bindat SPEC." - (let ((pos 0)) + "Calculate bindat-raw length for STRUCT according to bindat SPEC." + (let ((bindat-idx 0)) (bindat--length-group struct spec) - pos)) + bindat-idx)) -;; Pack structured data into raw-data +;; Pack structured data into bindat-raw (defun bindat--pack-u8 (v) - (aset raw-data pos (logand v 255)) - (setq pos (1+ pos))) + (aset bindat-raw bindat-idx (logand v 255)) + (setq bindat-idx (1+ bindat-idx))) (defun bindat--pack-u16 (v) - (aset raw-data pos (logand (lsh v -8) 255)) - (aset raw-data (1+ pos) (logand v 255)) - (setq pos (+ pos 2))) + (aset bindat-raw bindat-idx (logand (lsh v -8) 255)) + (aset bindat-raw (1+ bindat-idx) (logand v 255)) + (setq bindat-idx (+ bindat-idx 2))) (defun bindat--pack-u24 (v) (bindat--pack-u8 (lsh v -16)) @@ -464,9 +463,9 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (bindat--pack-u16 v)) (defun bindat--pack-u16r (v) - (aset raw-data (1+ pos) (logand (lsh v -8) 255)) - (aset raw-data pos (logand v 255)) - (setq pos (+ pos 2))) + (aset bindat-raw (1+ bindat-idx) (logand (lsh v -8) 255)) + (aset bindat-raw bindat-idx (logand v 255)) + (setq bindat-idx (+ bindat-idx 2))) (defun bindat--pack-u24r (v) (bindat--pack-u16r v) @@ -481,7 +480,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq type 'vec len 4)) (cond ((null v) - (setq pos (+ pos len))) + (setq bindat-idx (+ bindat-idx len))) ((memq type '(u8 byte)) (bindat--pack-u8 v)) ((memq type '(u16 word short)) @@ -513,11 +512,11 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (let ((l (length v)) (i 0)) (if (> l len) (setq l len)) (while (< i l) - (aset raw-data (+ pos i) (aref v i)) + (aset bindat-raw (+ bindat-idx i) (aref v i)) (setq i (1+ i))) - (setq pos (+ pos len)))) + (setq bindat-idx (+ bindat-idx len)))) (t - (setq pos (+ pos len))))) + (setq bindat-idx (+ bindat-idx len))))) (defun bindat--pack-group (struct spec) (let (last) @@ -549,10 +548,10 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq struct (cons (cons field (eval len)) struct)) (eval len))) ((eq type 'fill) - (setq pos (+ pos len))) + (setq bindat-idx (+ bindat-idx len))) ((eq type 'align) - (while (/= (% pos len) 0) - (setq pos (1+ pos)))) + (while (/= (% bindat-idx len) 0) + (setq bindat-idx (1+ bindat-idx)))) ((eq type 'struct) (bindat--pack-group (if field (bindat-get-field struct field) struct) (eval len))) @@ -579,18 +578,19 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (bindat--pack-item last type len) )))))) -(defun bindat-pack (spec struct &optional raw-data pos) +(defun bindat-pack (spec struct &optional bindat-raw bindat-idx) "Return binary data packed according to SPEC for structured data STRUCT. -Optional third arg RAW-DATA is a pre-allocated unibyte string or vector to -pack into. Optional fourth arg POS is the starting offset into RAW-DATA." - (when (multibyte-string-p raw-data) +Optional third arg BINDAT-RAW is a pre-allocated unibyte string or vector to +pack into. +Optional fourth arg BINDAT-IDX is the starting offset into BINDAT-RAW." + (when (multibyte-string-p bindat-raw) (error "Pre-allocated string is multibyte")) - (let ((no-return raw-data)) - (unless pos (setq pos 0)) - (unless raw-data - (setq raw-data (make-vector (+ pos (bindat-length spec struct)) 0))) + (let ((no-return bindat-raw)) + (unless bindat-idx (setq bindat-idx 0)) + (unless bindat-raw + (setq bindat-raw (make-vector (+ bindat-idx (bindat-length spec struct)) 0))) (bindat--pack-group struct spec) - (if no-return nil (concat raw-data)))) + (if no-return nil (concat bindat-raw)))) ;; Misc. format conversions From 6c6e0bb44e484071e69ec6d3e703f20f328b20ad Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 22:20:40 +0000 Subject: [PATCH 155/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ lispref/ChangeLog | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc5602d44a1..f643cd337c7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-29 Kim F. Storm + + * emacs-lisp/bindat.el (bindat-idx, bindat-raw): Rename dynamic variables + `pos' and `raw-data' for clarity, as eval forms may access these. + 2006-05-28 Kim F. Storm * emacs-lisp/bindat.el (bindat--unpack-u8): Use aref also for strings. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index fe808c28ce9..c53a2b19a26 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-05-29 Kim F. Storm + + * processes.texi (Bindat Functions): Rename `pos' and `raw-data' to + `bindat-idx' and `bindat-raw' for clarity. + 2006-05-27 Thien-Thi Nguyen * processes.texi (Bindat Spec): Expand on `repeat' handler. From b35444d58bc3e75d79bf34bef9145a6dd4c5d84d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 28 May 2006 22:20:49 +0000 Subject: [PATCH 156/403] (Bindat Functions): Rename `pos' and `raw-data' to `bindat-idx' and `bindat-raw' for clarity. --- lispref/processes.texi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lispref/processes.texi b/lispref/processes.texi index ba6ab18a39c..0f0b617e36c 100644 --- a/lispref/processes.texi +++ b/lispref/processes.texi @@ -2185,11 +2185,11 @@ field name is specified, the value is bound to that field name. @var{form} can access and update these dynamically bound variables: @table @code -@item raw-data +@item bindat-raw The data as a byte array. -@item pos -Current position of the unpacking or packing operation. +@item bindat-idx +Current index into bindat-raw of the unpacking or packing operation. @item struct Alist. @@ -2243,14 +2243,14 @@ include a name. @subsection Functions to Unpack and Pack Bytes In the following documentation, @var{spec} refers to a data layout -specification, @code{raw-data} to a byte array, and @var{struct} to an +specification, @code{bindat-raw} to a byte array, and @var{struct} to an alist representing unpacked field data. -@defun bindat-unpack spec raw-data &optional pos +@defun bindat-unpack spec bindat-raw &optional bindat-idx This function unpacks data from the unibyte string or byte -array @code{raw-data} +array @code{bindat-raw} according to @var{spec}. Normally this starts unpacking at the -beginning of the byte array, but if @var{pos} is non-@code{nil}, it +beginning of the byte array, but if @var{bindat-idx} is non-@code{nil}, it specifies a zero-based starting position to use instead. The value is an alist or nested alist in which each element describes @@ -2283,15 +2283,15 @@ This function returns the total length of the data in @var{struct}, according to @var{spec}. @end defun -@defun bindat-pack spec struct &optional raw-data pos +@defun bindat-pack spec struct &optional bindat-raw bindat-idx This function returns a byte array packed according to @var{spec} from the data in the alist @var{struct}. Normally it creates and fills a -new byte array starting at the beginning. However, if @var{raw-data} +new byte array starting at the beginning. However, if @var{bindat-raw} is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to -pack into. If @var{pos} is non-@code{nil}, it specifies the starting -offset for packing into @code{raw-data}. +pack into. If @var{bindat-idx} is non-@code{nil}, it specifies the starting +offset for packing into @code{bindat-raw}. -When pre-allocating, you should make sure @code{(length @var{raw-data})} +When pre-allocating, you should make sure @code{(length @var{bindat-raw})} meets or exceeds the total length to avoid an out-of-range error. @end defun From 688e9e8cf999f24a7cfbe3dac0908093a37b290e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 29 May 2006 00:18:44 +0000 Subject: [PATCH 157/403] (Coding Conventions): Better explain reasons not to advise other packages or use `eval-after-load'. --- lispref/tips.texi | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/lispref/tips.texi b/lispref/tips.texi index 8447a779ea0..d2060a942bf 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi @@ -174,19 +174,28 @@ compatibility issues. @end example @item -Redefining (or advising) an Emacs primitive is discouraged. It may do +Redefining (or advising) an Emacs primitive is a bad idea. It may do the right thing for a particular program, but there is no telling what -other programs might break as a result. In any case, it is a -maintenance burden because the two packages become highly dependent on -each other. +other programs might break as a result. In any case, it is a problem +for debugging, because the two advised function doesn't do what its +source code says it does. If the programmer investigating the problem +is unaware that there is advice on the function, the experience can be +very frustrating. + +We hope to remove all the places in Emacs that advise primitives. +In the mean time, please don't add any more. + +@item +It is likewise a bad idea for one Lisp package to advise a function +in another Lisp package. @item Likewise, avoid using @code{eval-after-load} (@pxref{Hooks for Loading}) in libraries and packages. This feature is meant for -personal customizations; using it in a Lisp package increases the -coupling between it and the package mentioned in -@code{eval-after-load}, and thus makes it harder to maintain the two -packages independently. +personal customizations; using it in a Lisp program is unclean because +it modifies the behavior of another Lisp file in an invisible way. +This is an obstacle for debugging, much like advising a function in +the other package. @item If a file does replace any of the functions or library programs of From 0988217ac739a15d2f021b0e72b5e3d4830af2b2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 29 May 2006 00:28:43 +0000 Subject: [PATCH 158/403] (load-history-regexp): If FILE is relative, insist entire last name component must match it. (load-history-filename-element, load-history-regexp): Doc fixes. --- lisp/subr.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index c4fce6624bf..90f1db78de1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1394,11 +1394,11 @@ That function's doc string says which file created it." nil)) (defun load-history-regexp (file) - "Form a regexp to find FILE in load-history. -FILE, a string, is described in eval-after-load's doc-string." + "Form a regexp to find FILE in `load-history'. +FILE, a string, is described in the function `eval-after-load'." (if (file-name-absolute-p file) (setq file (file-truename file))) - (concat (if (file-name-absolute-p file) "\\`" "\\<") + (concat (if (file-name-absolute-p file) "\\`" "\\(\\`\\|/\\)") (regexp-quote file) (if (file-name-extension file) "" @@ -1409,7 +1409,7 @@ FILE, a string, is described in eval-after-load's doc-string." "\\)?\\'")) (defun load-history-filename-element (file-regexp) - "Get the first elt of load-history whose car matches FILE-REGEXP. + "Get the first elt of `load-history' whose car matches FILE-REGEXP. Return nil if there isn't one." (let* ((loads load-history) (load-elt (and loads (car loads)))) @@ -1432,8 +1432,8 @@ name, and may have an extension \(e.g. \".el\") or may lack one, and additionally may or may not have an extension denoting a compressed format \(e.g. \".gz\"). -When FILE is absolute, it is first converted to a true name by chasing -out symbolic links. Only a file of this name \(see next paragraph for +When FILE is absolute, this first converts it to a true name by chasing +symbolic links. Only a file of this name \(see next paragraph regarding extensions) will trigger the evaluation of FORM. When FILE is relative, a file whose absolute true name ends in FILE will trigger evaluation. From 0985f920394f5ee6a2fcf39ec1fbd53fbd3510bc Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 29 May 2006 00:30:23 +0000 Subject: [PATCH 159/403] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ lispref/ChangeLog | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f643cd337c7..ac1ff2c947e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-28 Richard Stallman + + * subr.el (load-history-regexp): If FILE is relative, insist + entire last name component must match it. + (load-history-filename-element, load-history-regexp): Doc fixes. + 2006-05-29 Kim F. Storm * emacs-lisp/bindat.el (bindat-idx, bindat-raw): Rename dynamic variables diff --git a/lispref/ChangeLog b/lispref/ChangeLog index c53a2b19a26..7db6cb47e63 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-05-28 Richard Stallman + + * tips.texi (Coding Conventions): Better explain reasons not to + advise other packages or use `eval-after-load'. + 2006-05-29 Kim F. Storm * processes.texi (Bindat Functions): Rename `pos' and `raw-data' to From 7311509ee6842235502d446a4aaf16d3f0a6e068 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 29 May 2006 00:57:27 +0000 Subject: [PATCH 160/403] (Ffind_operation_coding_system): Call a function by safe_call1 instead of call1. --- src/ChangeLog | 5 +++++ src/coding.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index fecf2dd636e..f210ed382a6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-05-29 Kenichi Handa + + * coding.c (Ffind_operation_coding_system): Call a function by + safe_call1 instead of call1. + 2006-05-28 Kim F. Storm * xdisp.c (set_cursor_from_row): If cursor cannot be set in row, diff --git a/src/coding.c b/src/coding.c index 5ef412a3619..03c07c3ba68 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7539,7 +7539,7 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) return Fcons (val, val); if (! NILP (Ffboundp (val))) { - val = call1 (val, Flist (nargs, args)); + val = safe_call1 (val, Flist (nargs, args)); if (CONSP (val)) return val; if (SYMBOLP (val) && ! NILP (Fcoding_system_p (val))) From 6ad0381ce14cbb2b348c62ce57c00a50929f7cf8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 May 2006 01:05:24 +0000 Subject: [PATCH 161/403] (struct saved_window): Add `dedicated'. (Fset_window_configuration, save_window_save): Save/restore the `dedicated' flag. --- src/ChangeLog | 19 ++++++++++++------- src/window.c | 7 ++++--- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f210ed382a6..c973a07f264 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,12 @@ * coding.c (Ffind_operation_coding_system): Call a function by safe_call1 instead of call1. +2006-05-28 Stefan Monnier + + * window.c (struct saved_window): Add `dedicated'. + (Fset_window_configuration, save_window_save): Save/restore the + `dedicated' flag. + 2006-05-28 Kim F. Storm * xdisp.c (set_cursor_from_row): If cursor cannot be set in row, @@ -32,8 +38,8 @@ 2006-05-27 YAMAMOTO Mitsuharu - * macselect.c (mac_handle_apple_event): Return - errAEEventNotHandled if key binding is not found. + * macselect.c (mac_handle_apple_event): + Return errAEEventNotHandled if key binding is not found. 2006-05-26 Eli Zaretskii @@ -44,9 +50,9 @@ 2006-05-26 Chong Yidong - * fileio.c (Fcopy_file): Delete argument MUSTBENEW. Incorporate - the exclusive file-opening functionality into the behavior when - OK-IF-ALREADY-EXISTS is nil. + * fileio.c (Fcopy_file): Delete argument MUSTBENEW. + Incorporate the exclusive file-opening functionality into the behavior + when OK-IF-ALREADY-EXISTS is nil. (Frename_file): Call Fcopy_file without MUSTBENEW argument. 2006-05-26 Jan Dj,Ad(Brv @@ -98,8 +104,7 @@ load-history, except at preloading time. * lread.c (Fload): At preloading time, preserve the extension of - the filename which goes into load-history. New variable - hist_file_name. + the filename which goes into load-history. New var hist_file_name. * lread.c (Fload): Do eval-after-load stuff by calling the lisp function do-after-load-evaluation. diff --git a/src/window.c b/src/window.c index 772ee18b08c..20bf204e76b 100644 --- a/src/window.c +++ b/src/window.c @@ -5794,6 +5794,7 @@ struct saved_window Lisp_Object left_margin_cols, right_margin_cols; Lisp_Object left_fringe_width, right_fringe_width, fringes_outside_margins; Lisp_Object scroll_bar_width, vertical_scroll_bar_type; + Lisp_Object dedicated; }; #define SAVED_WINDOW_N(swv,n) \ @@ -5804,9 +5805,7 @@ DEFUN ("window-configuration-p", Fwindow_configuration_p, Swindow_configuration_ (object) Lisp_Object object; { - if (WINDOW_CONFIGURATIONP (object)) - return Qt; - return Qnil; + return WINDOW_CONFIGURATIONP (object) ? Qt : Qnil; } DEFUN ("window-configuration-frame", Fwindow_configuration_frame, Swindow_configuration_frame, 1, 1, 0, @@ -6028,6 +6027,7 @@ the return value is nil. Otherwise the value is t. */) w->fringes_outside_margins = p->fringes_outside_margins; w->scroll_bar_width = p->scroll_bar_width; w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; + w->dedicated = p->dedicated; XSETFASTINT (w->last_modified, 0); XSETFASTINT (w->last_overlay_modified, 0); @@ -6297,6 +6297,7 @@ save_window_save (window, vector, i) p->fringes_outside_margins = w->fringes_outside_margins; p->scroll_bar_width = w->scroll_bar_width; p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; + p->dedicated = w->dedicated; if (!NILP (w->buffer)) { /* Save w's value of point in the window configuration. From 6d3906d52bba3dca4abd9c541850a5f30a673b95 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 29 May 2006 01:24:05 +0000 Subject: [PATCH 162/403] (find-operation-coding-system): Describe the new argument format (FILENAME . BUFFER). --- lispref/ChangeLog | 5 +++++ lispref/nonascii.texi | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 7db6cb47e63..2e20af7fc78 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-05-29 Kenichi Handa + + * nonascii.texi (find-operation-coding-system): Describe the new + argument format (FILENAME . BUFFER). + 2006-05-28 Richard Stallman * tips.texi (Coding Conventions): Better explain reasons not to diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index 0f4a70404af..d9050de33fc 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi @@ -1116,6 +1116,14 @@ or port number. Depending on @var{operation}, this function looks up the target in @code{file-coding-system-alist}, @code{process-coding-system-alist}, or @code{network-coding-system-alist}. + +If @var{operation} is @code{insert-file-contents}, the argument +corresponding to the target may be a cons cell of the form +@code{(@var{filename} . @code{buffer})}). In that case, +@code{filename} is a file name to look up, and @code{buffer} is a +buffer that already contains the file (but not yet decoded). A +function specified in @code{file-coding-system-alist} must pay +attention to this format of the target. @end defun @node Specifying Coding Systems From 7a0574f3e9489c9b87847a9beff18e7a485e1707 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 May 2006 01:35:53 +0000 Subject: [PATCH 163/403] (bibtex-autokey-name-case-convert-function) (bibtex-sort-entry-class): Add safe-local-variable predicate. (bibtex-sort-entry-class-alist): Don't set the global value. (bibtex-init-sort-entry-class-alist): New fun. (bibtex-sort-buffer, bibtex-prepare-new-entry): Call it to compute bibtex-init-sort-entry-class-alist from the buffer-local value (if any) of bibtex-init-sort-entry-class. --- lisp/ChangeLog | 12 +++++++++- lisp/textmodes/bibtex.el | 48 ++++++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac1ff2c947e..f1698732a04 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2006-05-28 Stefan Monnier + + * textmodes/bibtex.el (bibtex-autokey-name-case-convert-function) + (bibtex-sort-entry-class): Add safe-local-variable predicate. + (bibtex-sort-entry-class-alist): Don't set the global value. + (bibtex-init-sort-entry-class-alist): New fun. + (bibtex-sort-buffer, bibtex-prepare-new-entry): Call it to compute + bibtex-init-sort-entry-class-alist from the buffer-local value (if any) + of bibtex-init-sort-entry-class. + 2006-05-28 Richard Stallman * subr.el (load-history-regexp): If FILE is relative, insist @@ -6,7 +16,7 @@ 2006-05-29 Kim F. Storm - * emacs-lisp/bindat.el (bindat-idx, bindat-raw): Rename dynamic variables + * emacs-lisp/bindat.el (bindat-idx, bindat-raw): Rename dynamic vars `pos' and `raw-data' for clarity, as eval forms may access these. 2006-05-28 Kim F. Storm diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 74ec8beffa2..c82f2dcf3d0 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -183,6 +183,17 @@ to all entries not explicitly mentioned." :type '(repeat (choice :tag "Class" (const :tag "catch-all" (catch-all)) (repeat :tag "Entry name" string)))) +(put 'bibtex-sort-entry-class 'safe-local-variable + (lambda (x) (let ((OK t)) + (while (consp x) + (let ((y (pop x))) + (while (consp y) + (let ((z (pop y))) + (unless (or (stringp z) (eq z 'catch-all)) + (setq OK nil)))) + (unless (null y) (setq OK nil)))) + (unless (null x) (setq OK nil)) + OK))) (defcustom bibtex-sort-ignore-string-entries t "If non-nil, BibTeX @String entries are not sort-significant. @@ -610,6 +621,8 @@ See `bibtex-generate-autokey' for details." (const :tag "Capitalize" capitalize) (const :tag "Upcase" upcase) (function :tag "Conversion function"))) +(put 'bibtex-autokey-name-case-convert-function 'safe-local-variable + (lambda (x) (memq x '(upcase downcase capitalize identity)))) (defvaralias 'bibtex-autokey-name-case-convert 'bibtex-autokey-name-case-convert-function) @@ -1188,13 +1201,7 @@ The CDRs of the elements are t for header keys and nil for crossref keys.") (defvar bibtex-string-empty-key nil "If non-nil, `bibtex-parse-string' accepts empty key.") -(defvar bibtex-sort-entry-class-alist - (let ((i -1) alist) - (dolist (class bibtex-sort-entry-class alist) - (setq i (1+ i)) - (dolist (entry class) - ;; all entry names should be downcase (for ease of comparison) - (push (cons (if (stringp entry) (downcase entry) entry) i) alist)))) +(defvar bibtex-sort-entry-class-alist nil "Alist mapping entry types to their sorting index. Auto-generated from `bibtex-sort-entry-class'. Used when `bibtex-maintain-sorted-entries' is `entry-class'.") @@ -3188,6 +3195,17 @@ of the head of the entry found. Return nil if no entry found." entry-name)) (list key nil entry-name)))))) +(defun bibtex-init-sort-entry-class-alist () + (unless (local-variable-p 'bibtex-sort-entry-class-alist) + (set (make-local-variable 'bibtex-sort-entry-class-alist) + (let ((i -1) alist) + (dolist (class bibtex-sort-entry-class alist) + (setq i (1+ i)) + (dolist (entry class) + ;; All entry names should be downcase (for ease of comparison). + (push (cons (if (stringp entry) (downcase entry) entry) i) + alist))))))) + (defun bibtex-lessp (index1 index2) "Predicate for sorting BibTeX entries with indices INDEX1 and INDEX2. Each index is a list (KEY CROSSREF-KEY ENTRY-NAME). @@ -3225,13 +3243,14 @@ If its value is nil use plain sorting. Text outside of BibTeX entries is not affected. If `bibtex-sort-ignore-string-entries' is non-nil, @String entries are ignored." (interactive) - (bibtex-beginning-of-first-entry) ;; needed by `sort-subr' - (sort-subr nil - 'bibtex-skip-to-valid-entry ; NEXTREC function - 'bibtex-end-of-entry ; ENDREC function - 'bibtex-entry-index ; STARTKEY function - nil ; ENDKEY function - 'bibtex-lessp)) ; PREDICATE + (bibtex-beginning-of-first-entry) ; Needed by `sort-subr' + (bibtex-init-sort-entry-class-alist) ; Needed by `bibtex-lessp'. + (sort-subr nil + 'bibtex-skip-to-valid-entry ; NEXTREC function + 'bibtex-end-of-entry ; ENDREC function + 'bibtex-entry-index ; STARTKEY function + nil ; ENDKEY function + 'bibtex-lessp)) ; PREDICATE (defun bibtex-find-crossref (crossref-key &optional pnt split) "Move point to the beginning of BibTeX entry CROSSREF-KEY. @@ -3332,6 +3351,7 @@ If `bibtex-maintain-sorted-entries' is non-nil, perform a binary search to look for place for KEY. This requires that buffer is sorted, see `bibtex-validate'. Return t if preparation was successful or nil if entry KEY already exists." + (bibtex-init-sort-entry-class-alist) ; Needed by `bibtex-lessp'. (let ((key (nth 0 index)) key-exist) (cond ((or (null key) From 411fe8f336fd8c18de0e739706c8438cab926bde Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 29 May 2006 01:58:27 +0000 Subject: [PATCH 164/403] Many simplifications and improvements in wording. --- man/ChangeLog | 4 + man/basic.texi | 398 ++++++++++++++++++++++++------------------------- 2 files changed, 203 insertions(+), 199 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 1c5f19b8321..5baca433ff4 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-28 Ted Zlatanov + + * basic.texi: Many simplifications and improvements in wording. + 2006-05-27 Thien-Thi Nguyen * pcl-cvs.texi: Fix typos. diff --git a/man/basic.texi b/man/basic.texi index f4d15f9171b..d2a8b6f530f 100644 --- a/man/basic.texi +++ b/man/basic.texi @@ -7,28 +7,27 @@ @kindex C-h t @findex help-with-tutorial - We now give the basics of how to enter text, make corrections, and -save the text in a file. If this material is new to you, you might -learn it more easily by running the Emacs learn-by-doing tutorial. To -use the tutorial, run Emacs and type @kbd{Control-h t} -(@code{help-with-tutorial}). + Here we explain the basics of how to enter text, make corrections, +and save the text in a file. If this material is new to you, we +suggest you first run the Emacs learn-by-doing tutorial, by typing +@kbd{Control-h t} inside Emacs. (@code{help-with-tutorial}). - To clear the screen and redisplay, type @kbd{C-l} (@code{recenter}). + To clear and redisplay the screen, type @kbd{C-l} (@code{recenter}). @menu * Inserting Text:: Inserting text by simply typing it. -* Moving Point:: How to move the cursor to the place where you want to +* Moving Point:: Moving the cursor to the place where you want to change something. * Erasing:: Deleting and killing text. * Basic Undo:: Undoing recent changes in the text. * Files: Basic Files. Visiting, creating, and saving files. * Help: Basic Help. Asking what a character does. -* Blank Lines:: Commands to make or delete blank lines. -* Continuation Lines:: Lines too wide for the screen. +* Blank Lines:: Making and deleting blank lines. +* Continuation Lines:: How Emacs displays lines too wide for the screen. * Position Info:: What page, line, row, or column is point on? -* Arguments:: Numeric arguments for repeating a command. -* Repeating:: A short-cut for repeating the previous command. +* Arguments:: Numeric arguments for repeating a command N times. +* Repeating:: Repeating the previous command quickly. @end menu @node Inserting Text @@ -36,66 +35,71 @@ use the tutorial, run Emacs and type @kbd{Control-h t} @cindex insertion @cindex graphic characters - To insert printing characters into the text you are editing, just type -them. This inserts the characters you type into the buffer at the -cursor (that is, at @dfn{point}; @pxref{Point}). The cursor moves -forward, and any text after the cursor moves forward too. If the text -in the buffer is @samp{FOOBAR}, with the cursor before the @samp{B}, -then if you type @kbd{XX}, you get @samp{FOOXXBAR}, with the cursor -still before the @samp{B}. + Typing printing characters inserts them into the text you are +editing. It inserts them into the buffer at the cursor; more +precisely, it inserts them at @dfn{point}, but the cursor normally +shows where point is. @xref{Point}. + + Insertion moves the cursor forward, and the following text moves +forward with the cursor. If the text in the buffer is @samp{FOOBAR}, +with the cursor before the @samp{B}, and you type @kbd{XX}, you get +@samp{FOOXXBAR}, with the cursor still before the @samp{B}. To @dfn{delete} text you have just inserted, use the large key labeled @key{DEL}, @key{BACKSPACE} or @key{DELETE} which is a short -distance above the @key{RET} or @key{ENTER} key. This is the key you -normally use, outside Emacs, for erasing the last character that you -typed. Regardless of the label on that key, Emacs thinks of it as -@key{DEL}, and that's what we call it in this manual. +distance above the @key{RET} or @key{ENTER} key. Regardless of the +label on that key, Emacs thinks of it as @key{DEL}, and that's what we +call it in this manual. @key{DEL} is the key you normally use outside +Emacs to erase the last character that you typed. The @key{DEL} key deletes the character @emph{before} the cursor. As a consequence, the cursor and all the characters after it move backwards. If you type a printing character and then type @key{DEL}, they cancel out. - On most computers, Emacs recognizes automatically which key ought to -be @key{DEL}, and sets it up that way. But in some cases, especially -with text-only terminals, you will need to tell Emacs which key to use -for that purpose. If the large key not far above the @key{RET} or -@key{ENTER} key doesn't delete backwards, you need to do this. -@xref{DEL Does Not Delete}, for an explanation of how. + On most computers, Emacs sets up @key{DEL} automatically. In some +cases, especially with text-only terminals, Emacs may guess wrong. If +the key that ought to erase the last character doesn't do it in Emacs, +see @ref{DEL Does Not Delete}. - Most PC keyboards have both a @key{BACKSPACE} key not far above -@key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. On these -keyboards, Emacs supports when possible the usual convention that the -@key{BACKSPACE} key deletes backwards (it is @key{DEL}), while the -@key{DELETE} key deletes ``forwards,'' deleting the character after -point, the one underneath the cursor, like @kbd{C-d} (see below). + Most PC keyboards have both a @key{BACKSPACE} key a little ways +above @key{RET} or @key{ENTER}, and a @key{DELETE} key elsewhere. On +these keyboards, Emacs tries to set up @key{BACKSPACE} as @key{DEL}. +The @key{DELETE} key deletes ``forwards'' like @kbd{C-d} (see below), +which means it deletes the character underneath the cursor (after +point). @kindex RET @cindex newline - To end a line and start typing a new one, type @key{RET}. This -inserts a newline character in the buffer. If point is in the middle of -a line, the effect is to split the line. Typing @key{DEL} when the cursor is -at the beginning of a line deletes the preceding newline, thus joining -the line with the preceding line. + To end a line and start typing a new one, type @key{RET}. (This +key may be labeled @key{RETURN} or @key{ENTER}, but in Emacs we call +it @key{RET}.) This inserts a newline character in the buffer. If +point is at the end of the line, this creates a new blank line after +it. If point is in the middle of a line, the effect is to split that +line. Typing @key{DEL} when the cursor is at the beginning of a line +deletes the preceding newline character, thus joining the line with +the one before it. - Emacs can split lines automatically when they become too long, if you -turn on a special minor mode called @dfn{Auto Fill} mode. -@xref{Filling}, for how to use Auto Fill mode and other modes for -@dfn{filling} text. + Emacs can split lines automatically when they become too long, if +you turn on a special minor mode called @dfn{Auto Fill} mode. +@xref{Filling}, for Auto Fill mode and other methods of @dfn{filling} +text. - If you prefer to have text characters replace (overwrite) existing -text rather than shove it to the right, you can enable Overwrite mode, -a minor mode. @xref{Minor Modes}. + If you prefer printing characters to replace (overwrite) existing +text, rather than shove it to the right, you should enable Overwrite +mode, a minor mode. @xref{Minor Modes}. @cindex quoting @kindex C-q @findex quoted-insert - Direct insertion works for printing characters and @key{SPC}, but other -characters act as editing commands and do not insert themselves. If you -need to insert a control character or a character whose code is above 200 -octal, you must @dfn{quote} it by typing the character @kbd{Control-q} -(@code{quoted-insert}) first. (This character's name is normally written -@kbd{C-q} for short.) There are two ways to use @kbd{C-q}:@refill + Only printing characters and @key{SPC} insert themselves in Emacs. +Other characters act as editing commands and do not insert themselves. +These include control characters, and characters with codes above 200 +octal. If you need to insert one of these characters in the buffer, +you must @dfn{quote} it by typing the character @kbd{Control-q} +(@code{quoted-insert}) first. (This character's name is normally +written @kbd{C-q} for short.) There are two ways to use +@kbd{C-q}: @itemize @bullet @item @@ -131,16 +135,16 @@ To use decimal or hexadecimal instead of octal, set the variable 10, some letters starting with @kbd{a} serve as part of a character code, just like digits. -A numeric argument to @kbd{C-q} specifies how many copies of the -quoted character should be inserted (@pxref{Arguments}). +A numeric argument tells @kbd{C-q} how many copies of the quoted +character to insert (@pxref{Arguments}). @findex newline @findex self-insert Customization information: @key{DEL} in most modes runs the command -@code{delete-backward-char}; @key{RET} runs the command @code{newline}, and -self-inserting printing characters run the command @code{self-insert}, -which inserts whatever character was typed to invoke it. Some major modes -rebind @key{DEL} to other commands. +@code{delete-backward-char}; @key{RET} runs the command +@code{newline}, and self-inserting printing characters run the command +@code{self-insert}, which inserts whatever character you typed. Some +major modes rebind @key{DEL} to other commands. @node Moving Point @section Changing the Location of Point @@ -199,21 +203,21 @@ Move forward one word (@code{forward-word}). @item M-b Move backward one word (@code{backward-word}). @item C-n -Move down one line, vertically (@code{next-line}). This command +Move down one line vertically (@code{next-line}). This command attempts to keep the horizontal position unchanged, so if you start in -the middle of one line, you end in the middle of the next. The +the middle of one line, you move to the middle of the next. The down-arrow key does the same thing. @item C-p Move up one line, vertically (@code{previous-line}). The up-arrow key -has the same effect. +has the same effect. This command preserves position within the line, +like @kbd{C-n}. @item M-r Move point to left margin, vertically centered in the window (@code{move-to-window-line}). Text does not move on the screen. - -A numeric argument says which screen line to place point on. It counts -screen lines down from the top of the window (zero for the top line). A -negative argument counts lines from the bottom (@minus{}1 for the bottom -line). +A numeric argument says which screen line to place point on, counting +downward from the top of the window (zero means the top line). A +negative argument counts lines up from the bottom (@minus{}1 means the +bottom line). @item M-< Move to the top of the buffer (@code{beginning-of-buffer}). With numeric argument @var{n}, move to @var{n}/10 of the way from the top. @@ -228,7 +232,7 @@ put it on the screen (@code{scroll-up}). This doesn't always move point, but it is commonly used to do so. If your keyboard has a @key{PAGEDOWN} or @key{PRIOR} key, it does the same thing. -Scrolling commands are further described in @ref{Scrolling}. +Scrolling commands are described further in @ref{Scrolling}. @item M-v @itemx @key{PAGEUP} @itemx @key{NEXT} @@ -244,19 +248,19 @@ Position 1 is the beginning of the buffer. @itemx M-x goto-line Read a number @var{n} and move point to the beginning of line number @var{n}. Line 1 is the beginning of the buffer. If point is on or -just after a number, then that is the default for @var{n}, if you just -press @key{RET} with an empty minibuffer. +just after a number in the buffer, and you type @key{RET} with the +minibuffer empty, that number is used for @var{n}. @item C-x C-n @findex set-goal-column @kindex C-x C-n -Use the current column of point as the @dfn{semipermanent goal column} for -@kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). Henceforth, those -commands always move to this column in each line moved into, or as -close as possible given the contents of the line. This goal column remains -in effect until canceled. +Use the current column of point as the @dfn{semipermanent goal column} +for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). Henceforth, +those commands always try move to this column, or as close as possible +to it, after moving vertically. The goal column remains in effect +until canceled. @item C-u C-x C-n -Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} once -again try to stick to a fixed horizontal position, as usual. +Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to +preserve the horizontal position, as usual. @end table @vindex track-eol @@ -267,10 +271,10 @@ to the end of another line. Normally, @code{track-eol} is @code{nil}. @vindex next-line-add-newlines @kbd{C-n} normally stops at the end of the buffer when you use it on -the last line of the buffer. But if you set the variable +the last line of the buffer. However, if you set the variable @code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on the last line of a buffer creates an additional line at the end and -moves down onto it. +moves down into it. @node Erasing @section Erasing Text @@ -303,12 +307,13 @@ before point (that is, before the cursor). Another key, @kbd{Control-d} (@kbd{C-d} for short), deletes the character after point (that is, the character that the cursor is on). This shifts the rest of the text on the line to the left. If you type @kbd{C-d} at the end of a line, it -joins together that line and the next line. +joins that line with the following line. - To erase a larger amount of text, use the @kbd{C-k} key, which kills a -line at a time. If you type @kbd{C-k} at the beginning or middle of a -line, it kills all the text up to the end of the line. If you type -@kbd{C-k} at the end of a line, it joins that line and the next line. + To erase a larger amount of text, use the @kbd{C-k} key, which +erases (kills) a line at a time. If you type @kbd{C-k} at the +beginning or middle of a line, it kills all the text up to the end of +the line. If you type @kbd{C-k} at the end of a line, it joins that +line with the following line. @xref{Killing}, for more flexible ways of killing text. @@ -316,7 +321,7 @@ line, it kills all the text up to the end of the line. If you type @section Undoing Changes Emacs records a list of changes made in the buffer text, so you can -you can undo all the recent changes, as far as the records go. +you can undo recent changes, as far as the records go. Usually each editing command makes a separate entry in the undo records, but sometimes an entry covers just part of a command, and very simple commands may be grouped. @@ -331,12 +336,11 @@ The same. @end table The command @kbd{C-x u} (or @kbd{C-_} or @kbd{C-/}) is how you undo. -The first time you give this command, it undoes the last change. -Point moves back to where it was before the command that made the -change. +Normally this command undoes the last change, and moves point back to +where it was before the change. - Consecutive repetitions of @kbd{C-x u} (or its aliases) undo earlier -and earlier changes, back to the limit of the undo information + If you repeat @kbd{C-x u} (or its aliases), each repetition undoes +another, earlier change, back to the limit of the undo information available. If all recorded changes have already been undone, the undo command displays an error message and does nothing. @@ -349,16 +353,15 @@ popping the mark ring (@pxref{Mark Ring}). @node Basic Files @section Files - The commands described above are sufficient for creating and altering -text in an Emacs buffer; the more advanced Emacs commands just make -things easier. However, to keep any text permanently you must put it in a + Text that you insert in an Emacs buffer lasts only as long as the +Emacs session. To keep any text permanently you must put it in a @dfn{file}. Files are named units of text which are stored by the -operating system for you to retrieve later by name. To look at or use -the contents of a file in any way, including editing the file with -Emacs, you must specify the file name. +operating system for you to retrieve later by name. To use the +contents of a file in any way, you must specify the file name. That +includes editing the file with Emacs. - Consider a file named @file{test.emacs}. (We can assume it is in -your home directory.) In Emacs, to begin editing this file, type + Suppose there is a file named @file{test.emacs} in your home +directory. To begin editing this file in Emacs, type @example C-x C-f test.emacs @key{RET} @@ -368,22 +371,23 @@ C-x C-f test.emacs @key{RET} Here the file name is given as an @dfn{argument} to the command @kbd{C-x C-f} (@code{find-file}). That command uses the @dfn{minibuffer} to read the argument, and you type @key{RET} to terminate the argument -(@pxref{Minibuffer}).@refill +(@pxref{Minibuffer}). - Emacs obeys the command by @dfn{visiting} the file: creating a buffer, -copying the contents of the file into the buffer, and then displaying -the buffer for you to edit. If you alter the text, you can @dfn{save} -the new text in the file by typing @kbd{C-x C-s} (@code{save-buffer}). -This makes the changes permanent by copying the altered buffer contents -back into the file @file{test.emacs}. Until you save, the changes -exist only inside Emacs, and the file @file{test.emacs} is unaltered. + Emacs obeys this command by @dfn{visiting} the file: it creates a +buffer, it copies the contents of the file into the buffer, and then +displays the buffer for editing. If you alter the text, you can +@dfn{save} the new text in the file by typing @kbd{C-x C-s} +(@code{save-buffer}). This copies the altered buffer contents back +into the file @file{test.emacs}, making them permanent. Until you +save, the changed text exists only inside Emacs, and the file +@file{test.emacs} is unaltered. - To create a file, just visit the file with @kbd{C-x C-f} as if it -already existed. This creates an empty buffer in which you can insert -the text you want to put in the file. The file is actually created when -you save this buffer with @kbd{C-x C-s}. + To create a file, just visit it with @kbd{C-x C-f} as if it already +existed. This creates an empty buffer, in which you can insert the +text you want to put in the file. Emacs actually creates the file the +first time you save this buffer with @kbd{C-x C-s}. - Of course, there is a lot more to learn about using files. @xref{Files}. + To learn more about using files in Emacs, see @ref{Files}. @node Basic Help @section Help @@ -391,19 +395,19 @@ you save this buffer with @kbd{C-x C-s}. @cindex getting help with keys If you forget what a key does, you can find out with the Help character, which is @kbd{C-h} (or @key{F1}, which is an alias for -@kbd{C-h}). Type @kbd{C-h k} followed by the key you want to know -about; for example, @kbd{C-h k C-n} tells you all about what @kbd{C-n} -does. @kbd{C-h} is a prefix key; @kbd{C-h k} is just one of its -subcommands (the command @code{describe-key}). The other subcommands of -@kbd{C-h} provide different kinds of help. Type @kbd{C-h} twice to get -a description of all the help facilities. @xref{Help}.@refill +@kbd{C-h}). Type @kbd{C-h k} followed by the key of interest; for +example, @kbd{C-h k C-n} tells you what @kbd{C-n} does. @kbd{C-h} is +a prefix key; @kbd{C-h k} is just one of its subcommands (the command +@code{describe-key}). The other subcommands of @kbd{C-h} provide +different kinds of help. Type @kbd{C-h} twice to get a description of +all the help facilities. @xref{Help}. @node Blank Lines @section Blank Lines @cindex inserting blank lines @cindex deleting blank lines - Here are special commands and techniques for putting in and taking out + Here are special commands and techniques for inserting and deleting blank lines. @table @kbd @@ -419,8 +423,8 @@ Delete all but one of many consecutive blank lines @cindex blank lines @findex open-line @findex delete-blank-lines - When you want to insert a new line of text before an existing line, you -can do it by typing the new line of text, followed by @key{RET}. + To insert a new line of text before an existing line, +type the new line of text, followed by @key{RET}. However, it may be easier to see what you are doing if you first make a blank line and then insert the desired text into it. This is easy to do using the key @kbd{C-o} (@code{open-line}), which inserts a newline @@ -429,17 +433,16 @@ type the text for the new line. @kbd{C-o F O O} has the same effect as @w{@kbd{F O O @key{RET}}}, except for the final location of point. You can make several blank lines by typing @kbd{C-o} several times, or -by giving it a numeric argument to tell it how many blank lines to make. +by giving it a numeric argument specifying how many blank lines to make. @xref{Arguments}, for how. If you have a fill prefix, the @kbd{C-o} -command inserts the fill prefix on the new line, when you use it at the +command inserts the fill prefix on the new line, if typed at the beginning of a line. @xref{Fill Prefix}. The easy way to get rid of extra blank lines is with the command @kbd{C-x C-o} (@code{delete-blank-lines}). @kbd{C-x C-o} in a run of several blank lines deletes all but one of them. @kbd{C-x C-o} on a -solitary blank line deletes that blank line. When point is on a -nonblank line, @kbd{C-x C-o} deletes any blank lines following that -nonblank line. +lone blank line deletes that one. When point is on a nonblank line, +@kbd{C-x C-o} deletes all following blank lines (if any). @node Continuation Lines @section Continuation Lines @@ -448,40 +451,37 @@ nonblank line. @cindex wrapping @cindex line wrapping @cindex fringes, and continuation lines - If you add too many characters to one line without breaking it with -@key{RET}, the line grows to occupy two (or more) lines on the screen. -On graphical displays, Emacs indicates line wrapping with small bent -arrows in the fringes to the left and right of the window. On -text-only terminals, Emacs displays a @samp{\} character at the right -margin of a screen line if it is not the last in its text line. This -@samp{\} character says that the following screen line is not really a -distinct line in the text, just a @dfn{continuation} of a line too -long to fit the screen. Continuation is also called @dfn{line -wrapping}. + When a text line is too long to fit in one screen line, Emacs +displays it on two or more screen lines. This is called +@dfn{continuation} or @dfn{line wrapping}. On graphical displays, +Emacs indicates line wrapping with small bent arrows in the left and +right window fringes. On text-only terminals, Emacs displays a +@samp{\} character at the right margin of a screen line if it is not +the last in its text line. This @samp{\} character says that the +following screen line is not really a new text line. - When line wrapping occurs before a character that is wider than one + When line wrapping occurs just before a character that is wider than one column, some columns at the end of the previous screen line may be ``empty.'' In this case, Emacs displays additional @samp{\} -characters in the ``empty'' columns, just before the @samp{\} +characters in the ``empty'' columns before the @samp{\} character that indicates continuation. - Continued lines can be rather difficult to read, since each line is -typically broken in the middle of a word. You can have Emacs insert a + Continued lines can be difficult to read, since lines can break in +the middle of a word. If you prefer, you can make Emacs insert a newline automatically when a line gets too long, by using Auto Fill -mode. Another approach, intermediate between continued lines and Auto -Fill mode, is Long Lines mode, which ensures that wrapping only occurs -in the spaces between words. @xref{Filling}. +mode. Or enable Long Lines mode, which ensures that wrapping only +occurs between words. @xref{Filling}. @cindex truncation @cindex line truncation, and fringes - Emacs can also display long lines by @dfn{truncation}. This means -that all the characters that do not fit in the width of the screen or -window do not appear at all. @samp{$} in the last column or a small -straight arrow in the fringe to the right of the window indicates a -truncated line. + Emacs can optionally @dfn{truncate} long lines---this means +displaying just one screen line worth, and the rest of the long line +does not appear at all. @samp{$} in the last column or a small +straight arrow in the window's right fringe indicates a truncated +line. - @xref{Display Custom}, for more information about line truncation, -and other variables that affect how text is displayed. + @xref{Display Custom}, for more about line truncation, +and other variables that control how text is displayed. @node Position Info @section Cursor Position Information @@ -491,12 +491,12 @@ parts of the buffer, and to count lines. @table @kbd @item M-x what-page -Display the page number of point, and the line number within the page. +Display the page number of point, and the line number within that page. @item M-x what-line -Display the line number of point in the buffer. +Display the line number of point in the whole buffer. @item M-x line-number-mode @itemx M-x column-number-mode -Toggle automatic display of current line number or column number. +Toggle automatic display of the current line number or column number. @xref{Optional Mode Line}. @item M-= Display the number of lines in the current region (@code{count-lines-region}). @@ -518,9 +518,9 @@ Toggle automatic display of the size of the buffer. @cindex location of point @cindex cursor location @cindex point location - @kbd{M-x what-line} computes the current line number and displays it + @kbd{M-x what-line} displays the current line number in the echo area. You can also see the current line number in the -mode line; see @ref{Mode Line}. If you narrow the buffer, then the +mode line; see @ref{Mode Line}; but if you narrow the buffer, the line number in the mode line is relative to the accessible portion (@pxref{Narrowing}). By contrast, @code{what-line} shows both the line number relative to the narrowed region and the line number @@ -532,17 +532,16 @@ counts lines within the page, showing both numbers in the echo area. @kindex M-= @findex count-lines-region - While on this subject, we might as well mention @kbd{M-=} (@code{count-lines-region}), -which displays the number of lines in the region (@pxref{Mark}). -@xref{Pages}, for the command @kbd{C-x l} which counts the lines in the -current page. + Use @kbd{M-=} (@code{count-lines-region}) to displays the number of +lines in the region (@pxref{Mark}). @xref{Pages}, for the command +@kbd{C-x l} which counts the lines in the current page. @kindex C-x = @findex what-cursor-position The command @kbd{C-x =} (@code{what-cursor-position}) shows what -column the cursor is in, and other miscellaneous information about -point and the character after it. It displays a line in the echo area -that looks like this: +cursor's column position, and other information about point and the +character after it. It displays a line in the echo area that looks +like this: @smallexample Char: c (99, #o143, #x63) point=28062 of 36168 (78%) column=53 @@ -563,11 +562,11 @@ characters, but all of them together display as the original invalid byte, in octal code. In this case, @kbd{C-x =} shows @samp{part of display ...} instead of @samp{file}. - @samp{point=} is followed by the position of point expressed as a character -count. The front of the buffer counts as position 1, one character later -as 2, and so on. The next, larger, number is the total number of characters -in the buffer. Afterward in parentheses comes the position expressed as a -percentage of the total size. + @samp{point=} is followed by the position of point expressed as a +character count. The start of the buffer is position 1, one character +later is position 2, and so on. The next, larger, number is the total +number of characters in the buffer. Afterward in parentheses comes +the position expressed as a percentage of the total size. @samp{column=} is followed by the horizontal position of point, in columns from the left edge of the window. @@ -614,7 +613,7 @@ The character's encodings, both internally in the buffer, and externally if you were to save the file. @item -What to type to input the character in the current input method +What keys to type to input the character in the current input method (if it supports the character). @item @@ -656,7 +655,7 @@ There are text properties here: @cindex prefix arguments @cindex arguments to commands - In mathematics and computer usage, the word @dfn{argument} means + In mathematics and computer usage, @dfn{argument} means ``data provided to a function or operation.'' You can give any Emacs command a @dfn{numeric argument} (also called a @dfn{prefix argument}). Some commands interpret the argument as a repetition count. For @@ -679,37 +678,37 @@ M-5 C-n @end example @noindent -would move down five lines. The characters @kbd{Meta-1}, @kbd{Meta-2}, +moves down five lines. The characters @kbd{Meta-1}, @kbd{Meta-2}, and so on, as well as @kbd{Meta--}, do this because they are keys bound to commands (@code{digit-argument} and @code{negative-argument}) that -are defined to contribute to an argument for the next command. +are defined to set up an argument for the next command. @kbd{Meta--} without digits normally means @minus{}1. Digits and @kbd{-} modified with Control, or Control and Meta, also specify numeric arguments. @kindex C-u @findex universal-argument - Another way of specifying an argument is to use the @kbd{C-u} -(@code{universal-argument}) command followed by the digits of the -argument. With @kbd{C-u}, you can type the argument digits without -holding down modifier keys; @kbd{C-u} works on all terminals. To type a -negative argument, type a minus sign after @kbd{C-u}. Just a minus sign -without digits normally means @minus{}1. + You can also specify a numeric argument by typing @kbd{C-u} +(@code{universal-argument}) followed by the digits. The advantage of +@kbd{C-u} is that you can type the digits without modifier keys; thus, +@kbd{C-u} works on all terminals. For a negative argument, type a +minus sign after @kbd{C-u}. A minus sign without digits normally +means @minus{}1. - @kbd{C-u} without digits or minus sign has the special meaning of + @kbd{C-u} alone has the special meaning of ``four times'': it multiplies the argument for the next command by four. @kbd{C-u C-u} multiplies it by sixteen. Thus, @kbd{C-u C-u C-f} moves forward sixteen characters. This is a good way to move forward ``fast,'' since it moves about 1/5 of a line in the usual size screen. Other useful combinations are @kbd{C-u C-n}, @kbd{C-u C-u C-n} (move down a good fraction of a screen), @kbd{C-u C-u C-o} (make -``a lot'' of blank lines), and @kbd{C-u C-k} (kill four lines).@refill +``a lot'' of blank lines), and @kbd{C-u C-k} (kill four lines). - Some commands care only about whether there is an argument, and not about -its value. For example, the command @kbd{M-q} (@code{fill-paragraph}) with -no argument fills text; with an argument, it justifies the text as well. -(@xref{Filling}, for more information on @kbd{M-q}.) Plain @kbd{C-u} is a -handy way of providing an argument for such commands. + Some commands care whether there is an argument, but ignore its +value. For example, the command @kbd{M-q} (@code{fill-paragraph}) +fills text; with an argument, it justifies the text as well. +(@xref{Filling}, for more information on @kbd{M-q}.) Plain @kbd{C-u} +is a handy way of providing an argument for such commands. Some commands use the value of the argument as a repeat count, but do something peculiar when there is no argument. For example, the command @@ -719,27 +718,28 @@ special: it kills the text up to the next newline, or, if point is right at the end of the line, it kills the newline itself. Thus, two @kbd{C-k} commands with no arguments can kill a nonblank line, just like @kbd{C-k} with an argument of one. (@xref{Killing}, for more information on -@kbd{C-k}.)@refill +@kbd{C-k}.) A few commands treat a plain @kbd{C-u} differently from an ordinary argument. A few others may treat an argument of just a minus sign differently from an argument of @minus{}1. These unusual cases are -described when they come up; they are always for reasons of -convenience of use of the individual command, and they are documented -in the command's documentation string. +described when they come up; they exist to make an individual command +more convenient, and they are documented in that command's +documentation string. - You can use a numeric argument to insert multiple copies of a -character. This is straightforward unless the character is a digit; for -example, @kbd{C-u 6 4 a} inserts 64 copies of the character @samp{a}. -But this does not work for inserting digits; @kbd{C-u 6 4 1} specifies -an argument of 641, rather than inserting anything. To separate the -digit to insert from the argument, type another @kbd{C-u}; for example, -@kbd{C-u 6 4 C-u 1} does insert 64 copies of the character @samp{1}. + You can use a numeric argument before a self-inserting character to +insert multiple copies of it. This is straightforward when the +character is not a digit; for example, @kbd{C-u 6 4 a} inserts 64 +copies of the character @samp{a}. But this does not work for +inserting digits; @kbd{C-u 6 4 1} specifies an argument of 641. You +can separate the argument from the digit to insert with another +@kbd{C-u}; for example, @kbd{C-u 6 4 C-u 1} does insert 64 copies of +the character @samp{1}. - We use the term ``prefix argument'' as well as ``numeric argument'' to -emphasize that you type the argument before the command, and to -distinguish these arguments from minibuffer arguments that come after -the command. + We use the term ``prefix argument'' as well as ``numeric argument'', +to emphasize that you type these argument before the command, and to +distinguish them from minibuffer arguments that come after the +command. @node Repeating @section Repeating a Command @@ -749,8 +749,8 @@ the command. with @kbd{M-x @var{command-name} @key{RET}}, can be repeated by invoking them with a numeric argument that serves as a repeat count (@pxref{Arguments}). However, if the command you want to repeat -prompts for some input, or uses a numeric argument in another way, -repetition using a numeric argument might be problematical. +prompts for input, or uses a numeric argument in another way, that +method won't work. @kindex C-x z @findex repeat From 69135525601292d74ceb4dd80759e71a4a553d3a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 May 2006 02:11:27 +0000 Subject: [PATCH 165/403] (autoload-find-file): New fun. This one calls hack-local-variables. (generate-file-autoloads, update-file-autoloads): Use it. --- lisp/ChangeLog | 4 +++ lisp/emacs-lisp/autoload.el | 63 ++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1698732a04..f75a7b7ae99 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2006-05-28 Stefan Monnier + * emacs-lisp/autoload.el (autoload-find-file): New fun. + This one calls hack-local-variables. + (generate-file-autoloads, update-file-autoloads): Use it. + * textmodes/bibtex.el (bibtex-autokey-name-case-convert-function) (bibtex-sort-entry-class): Add safe-local-variable predicate. (bibtex-sort-entry-class-alist): Don't set the global value. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index ee2d74c5646..57e767db873 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -273,6 +273,20 @@ which lists the file name and which functions are in it, etc." (or (eolp) (insert "\n" generate-autoload-section-continuation)))))) +(defun autoload-find-file (file) + "Fetch file and put it in a temp buffer. Return the buffer." + ;; It is faster to avoid visiting the file. + (with-current-buffer (get-buffer-create " *autoload-file*") + (kill-all-local-variables) + (erase-buffer) + (setq buffer-undo-list t + buffer-read-only nil) + (emacs-lisp-mode) + (insert-file-contents file nil) + (let ((enable-local-variables :safe)) + (hack-local-variables)) + (current-buffer))) + (defun generate-file-autoloads (file) "Insert at point a loaddefs autoload section for FILE. autoloads are generated for defuns and defmacros in FILE @@ -313,16 +327,9 @@ are used." (save-excursion (unwind-protect (progn - (if visited - (set-buffer visited) - ;; It is faster to avoid visiting the file. - (set-buffer (get-buffer-create " *generate-autoload-file*")) - (kill-all-local-variables) - (erase-buffer) - (setq buffer-undo-list t - buffer-read-only nil) - (emacs-lisp-mode) - (insert-file-contents file nil)) + (set-buffer (or visited + ;; It is faster to avoid visiting the file. + (autoload-find-file file))) (save-excursion (save-restriction (widen) @@ -340,8 +347,7 @@ are used." (or (bolp) (forward-line 1)))) (autoload (make-autoload form load-name))) (if autoload - (setq autoloads-done (cons (nth 1 form) - autoloads-done)) + (push (nth 1 form) autoloads-done) (setq autoload form)) (let ((autoload-print-form-outbuf outbuf)) (autoload-print-form autoload))) @@ -460,31 +466,22 @@ Autoload section for %s is up to date." (and (eq found 'new) ;; Check that FILE has any cookies before generating a ;; new section for it. - (save-excursion - (if existing-buffer - (set-buffer existing-buffer) - ;; It is faster to avoid visiting the file. - (set-buffer (get-buffer-create " *autoload-file*")) - (kill-all-local-variables) - (erase-buffer) - (setq buffer-undo-list t - buffer-read-only nil) - (emacs-lisp-mode) - (insert-file-contents file nil)) - (save-excursion + (with-current-buffer + (or existing-buffer + ;; It is faster to avoid visiting the file. + (autoload-find-file file)) + (save-excursion (save-restriction (widen) (goto-char (point-min)) (prog1 - (if (re-search-forward - (concat "^" (regexp-quote - generate-autoload-cookie)) - nil t) - nil - (if (interactive-p) - (message "%s has no autoloads" file)) - (setq no-autoloads t) - t) + (setq no-autoloads + (not (re-search-forward + (concat "^" (regexp-quote + generate-autoload-cookie)) + nil t))) + (if (and no-autoloads (interactive-p)) + (message "%s has no autoloads" file)) (or existing-buffer (kill-buffer (current-buffer)))))))) (generate-file-autoloads file)))) From b17b883963111c8b1d47b397f361d4d0daa50a11 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 May 2006 02:53:14 +0000 Subject: [PATCH 166/403] (no-update-autoloads): Declare. (generate-file-autoloads): Obey it. Return whether autoloads were added at point or not. (update-file-autoloads): Use this new return value. Remove redundant test for the presence of an autoload cookie. --- lisp/ChangeLog | 6 ++ lisp/emacs-lisp/autoload.el | 157 ++++++++++++++++-------------------- 2 files changed, 77 insertions(+), 86 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f75a7b7ae99..6dd176768be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2006-05-28 Stefan Monnier + * emacs-lisp/autoload.el (no-update-autoloads): Declare. + (generate-file-autoloads): Obey it. Return whether autoloads were + added at point or not. + (update-file-autoloads): Use this new return value. + Remove redundant test for the presence of an autoload cookie. + * emacs-lisp/autoload.el (autoload-find-file): New fun. This one calls hack-local-variables. (generate-file-autoloads, update-file-autoloads): Use it. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 57e767db873..76699f10df8 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -287,12 +287,16 @@ which lists the file name and which functions are in it, etc." (hack-local-variables)) (current-buffer))) +(defvar no-update-autoloads nil + "File local variable to prevent scanning this file for autoload cookies.") + (defun generate-file-autoloads (file) "Insert at point a loaddefs autoload section for FILE. -autoloads are generated for defuns and defmacros in FILE +Autoloads are generated for defuns and defmacros in FILE marked by `generate-autoload-cookie' (which see). If FILE is being visited in a buffer, the contents of the buffer -are used." +are used. +Return non-nil in the case where no autoloads were added at point." (interactive "fGenerate autoloads for file: ") (let ((outbuf (current-buffer)) (autoloads-done '()) @@ -305,7 +309,7 @@ are used." (float-output-format nil) (done-any nil) (visited (get-file-buffer file)) - output-end) + output-start) ;; If the autoload section we create here uses an absolute ;; file name for FILE in its header, and then Emacs is installed @@ -323,68 +327,70 @@ are used." (string= dir-truename (substring source-truename 0 len))) (setq file (substring source-truename len)))) - (message "Generating autoloads for %s..." file) - (save-excursion - (unwind-protect - (progn - (set-buffer (or visited - ;; It is faster to avoid visiting the file. - (autoload-find-file file))) - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (while (not (eobp)) - (skip-chars-forward " \t\n\f") - (cond - ((looking-at (regexp-quote generate-autoload-cookie)) - (search-forward generate-autoload-cookie) - (skip-chars-forward " \t") - (setq done-any t) - (if (eolp) - ;; Read the next form and make an autoload. - (let* ((form (prog1 (read (current-buffer)) - (or (bolp) (forward-line 1)))) - (autoload (make-autoload form load-name))) - (if autoload - (push (nth 1 form) autoloads-done) - (setq autoload form)) - (let ((autoload-print-form-outbuf outbuf)) - (autoload-print-form autoload))) + (with-current-buffer (or visited + ;; It is faster to avoid visiting the file. + (autoload-find-file file)) + ;; Obey the no-update-autoloads file local variable. + (unless no-update-autoloads + (message "Generating autoloads for %s..." file) + (setq output-start (with-current-buffer outbuf (point))) + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (while (not (eobp)) + (skip-chars-forward " \t\n\f") + (cond + ((looking-at (regexp-quote generate-autoload-cookie)) + (search-forward generate-autoload-cookie) + (skip-chars-forward " \t") + (setq done-any t) + (if (eolp) + ;; Read the next form and make an autoload. + (let* ((form (prog1 (read (current-buffer)) + (or (bolp) (forward-line 1)))) + (autoload (make-autoload form load-name))) + (if autoload + (push (nth 1 form) autoloads-done) + (setq autoload form)) + (let ((autoload-print-form-outbuf outbuf)) + (autoload-print-form autoload))) - ;; Copy the rest of the line to the output. - (princ (buffer-substring - (progn - ;; Back up over whitespace, to preserve it. - (skip-chars-backward " \f\t") - (if (= (char-after (1+ (point))) ? ) - ;; Eat one space. - (forward-char 1)) - (point)) - (progn (forward-line 1) (point))) - outbuf))) - ((looking-at ";") - ;; Don't read the comment. - (forward-line 1)) - (t - (forward-sexp 1) - (forward-line 1))))))) - (or visited - ;; We created this buffer, so we should kill it. - (kill-buffer (current-buffer))) - (set-buffer outbuf) - (setq output-end (point-marker)))) - (if done-any - (progn - ;; Insert the section-header line - ;; which lists the file name and which functions are in it, etc. - (autoload-insert-section-header outbuf autoloads-done load-name file - (nth 5 (file-attributes file))) - (insert ";;; Generated autoloads from " - (autoload-trim-file-name file) "\n") - (goto-char output-end) - (insert generate-autoload-section-trailer))) - (message "Generating autoloads for %s...done" file))) + ;; Copy the rest of the line to the output. + (princ (buffer-substring + (progn + ;; Back up over whitespace, to preserve it. + (skip-chars-backward " \f\t") + (if (= (char-after (1+ (point))) ? ) + ;; Eat one space. + (forward-char 1)) + (point)) + (progn (forward-line 1) (point))) + outbuf))) + ((looking-at ";") + ;; Don't read the comment. + (forward-line 1)) + (t + (forward-sexp 1) + (forward-line 1)))))) + + (when done-any + (with-current-buffer outbuf + (save-excursion + ;; Insert the section-header line which lists the file name + ;; and which functions are in it, etc. + (goto-char output-start) + (autoload-insert-section-header + outbuf autoloads-done load-name file + (nth 5 (file-attributes file))) + (insert ";;; Generated autoloads from " + (autoload-trim-file-name file) "\n")) + (insert generate-autoload-section-trailer))) + (message "Generating autoloads for %s...done" file)) + (or visited + ;; We created this buffer, so we should kill it. + (kill-buffer (current-buffer)))) + (not done-any))) ;;;###autoload (defun update-file-autoloads (file &optional save-after) @@ -463,28 +469,7 @@ Autoload section for %s is up to date." (goto-char (point-max)) (search-backward "\f" nil t))) (or (eq found 'up-to-date) - (and (eq found 'new) - ;; Check that FILE has any cookies before generating a - ;; new section for it. - (with-current-buffer - (or existing-buffer - ;; It is faster to avoid visiting the file. - (autoload-find-file file)) - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (prog1 - (setq no-autoloads - (not (re-search-forward - (concat "^" (regexp-quote - generate-autoload-cookie)) - nil t))) - (if (and no-autoloads (interactive-p)) - (message "%s has no autoloads" file)) - (or existing-buffer - (kill-buffer (current-buffer)))))))) - (generate-file-autoloads file)))) + (setq no-autoloads (generate-file-autoloads file))))) (and save-after (buffer-modified-p) (save-buffer)) From b8909e88823fb4502e548f4462f015234fad62bb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 May 2006 03:28:52 +0000 Subject: [PATCH 167/403] (Default Coding Systems): Fix last change. --- lispref/ChangeLog | 4 ++++ lispref/nonascii.texi | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 2e20af7fc78..44c4611def7 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2006-05-29 Eli Zaretskii + + * nonascii.texi (Default Coding Systems): Fix last change. + 2006-05-29 Kenichi Handa * nonascii.texi (find-operation-coding-system): Describe the new diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index d9050de33fc..b6706613f45 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi @@ -1119,11 +1119,11 @@ or @code{network-coding-system-alist}. If @var{operation} is @code{insert-file-contents}, the argument corresponding to the target may be a cons cell of the form -@code{(@var{filename} . @code{buffer})}). In that case, -@code{filename} is a file name to look up, and @code{buffer} is a -buffer that already contains the file (but not yet decoded). A -function specified in @code{file-coding-system-alist} must pay -attention to this format of the target. +@code{(@var{filename} . @var{buffer})}). In that case, @var{filename} +is a file name to look up, and @var{buffer} is a buffer that already +contains the file's contents (not yet decoded). Functions specified +in @code{file-coding-system-alist} must pay attention to this format +of the target. @end defun @node Specifying Coding Systems From 7ece7aba2b5679b9909bf5e1969ea7c6a2ea852f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 May 2006 03:47:56 +0000 Subject: [PATCH 168/403] (ewoc--insert-new-node): Use ewoc--refresh-node. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/ewoc.el | 25 ++++++++++--------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6dd176768be..496bc1f34e2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2006-05-28 Stefan Monnier + * emacs-lisp/ewoc.el (ewoc--insert-new-node): Use ewoc--refresh-node. + * emacs-lisp/autoload.el (no-update-autoloads): Declare. (generate-file-autoloads): Obey it. Return whether autoloads were added at point or not. diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index c35d155b343..c9e2b9f27f4 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -99,7 +99,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) ;because of CL compiler macros +(eval-when-compile (require 'cl)) ;; The doubly linked list is implemented as a circular list ;; with a dummy node first and last. The dummy node is used as @@ -197,18 +197,13 @@ BUT if it is the header or the footer in EWOC return nil instead." Call PRETTY-PRINTER with point at NODE's start, thus pushing back NODE and leaving the new node's start there. Return the new node." (save-excursion - (let* ((inhibit-read-only t) - (m (copy-marker (ewoc--node-start-marker node))) - (pos (marker-position m)) - (elemnode (ewoc--node-create m data))) - (goto-char pos) - (funcall pretty-printer data) - (setf (marker-position m) pos - (ewoc--node-left elemnode) (ewoc--node-left node) + (let ((elemnode (ewoc--node-create + (copy-marker (ewoc--node-start-marker node)) data))) + (setf (ewoc--node-left elemnode) (ewoc--node-left node) (ewoc--node-right elemnode) node (ewoc--node-right (ewoc--node-left node)) elemnode (ewoc--node-left node) elemnode) - (ewoc--adjust pos (point) node) + (ewoc--refresh-node pretty-printer elemnode) elemnode))) (defun ewoc--refresh-node (pp node) @@ -584,10 +579,10 @@ Return nil if the buffer has been deleted." (provide 'ewoc) -;;; Local Variables: -;;; eval: (put 'ewoc--set-buffer-bind-dll 'lisp-indent-hook 1) -;;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2) -;;; End: +;; Local Variables: +;; eval: (put 'ewoc--set-buffer-bind-dll 'lisp-indent-hook 1) +;; eval: (put 'ewoc--set-buffer-bind-dll-let* 'lisp-indent-hook 2) +;; End: -;;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4 +;; arch-tag: d78915b9-9a07-44bf-aac6-04a1fc1bd6d4 ;;; ewoc.el ends here From bb7a346faa03a6703dd7b4dcd10dfc8bcaa5d143 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 May 2006 04:39:46 +0000 Subject: [PATCH 169/403] (ewoc--current-dll): Remove. Basically undo the change of 2006-05-26: use extra arguments instead of dynamic scoping. (ewoc-locate): Remove unused var `footer'. --- lisp/ChangeLog | 7 +++ lisp/emacs-lisp/ewoc.el | 123 +++++++++++++++++++--------------------- 2 files changed, 66 insertions(+), 64 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 496bc1f34e2..355afbbca78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2006-05-29 Stefan Monnier + + * emacs-lisp/ewoc.el (ewoc--current-dll): Remove. + Basically undo the change of 2006-05-26: use extra arguments instead of + dynamic scoping. + (ewoc-locate): Remove unused var `footer'. + 2006-05-28 Stefan Monnier * emacs-lisp/ewoc.el (ewoc--insert-new-node): Use ewoc--refresh-node. diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index c9e2b9f27f4..b4857f4310d 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -101,44 +101,40 @@ (eval-when-compile (require 'cl)) -;; The doubly linked list is implemented as a circular list -;; with a dummy node first and last. The dummy node is used as -;; "the dll" (or rather the dynamically bound `ewoc--current-dll'). - -(defvar ewoc--current-dll) - +;; The doubly linked list is implemented as a circular list with a dummy +;; node first and last. The dummy node is used as "the dll". (defstruct (ewoc--node (:type vector) ;ewoc--node-nth needs this (:constructor nil) (:constructor ewoc--node-create (start-marker data))) left right data start-marker) -(defun ewoc--node-next (node) +(defun ewoc--node-next (dll node) "Return the node after NODE, or nil if NODE is the last node." (let ((R (ewoc--node-right node))) - (unless (eq ewoc--current-dll R) R))) + (unless (eq dll R) R))) -(defun ewoc--node-prev (node) +(defun ewoc--node-prev (dll node) "Return the node before NODE, or nil if NODE is the first node." (let ((L (ewoc--node-left node))) - (unless (eq ewoc--current-dll L) L))) + (unless (eq dll L) L))) -(defun ewoc--node-nth (n) - "Return the Nth node from the doubly linked list `ewoc--current-dll'. +(defun ewoc--node-nth (dll n) + "Return the Nth node from the doubly linked list `dll'. N counts from zero. If N is negative, return the -(N+1)th last element. If N is out of range, return nil. -Thus, (ewoc--node-nth 0) returns the first node, -and (ewoc--node-nth -1) returns the last node." +Thus, (ewoc--node-nth dll 0) returns the first node, +and (ewoc--node-nth dll -1) returns the last node." ;; Presuming a node is ":type vector", starting with `left' and `right': ;; Branch 0 ("follow left pointer") is used when n is negative. ;; Branch 1 ("follow right pointer") is used otherwise. (let* ((branch (if (< n 0) 0 1)) - (node (aref ewoc--current-dll branch))) + (node (aref dll branch))) (if (< n 0) (setq n (- -1 n))) - (while (and (not (eq ewoc--current-dll node)) (> n 0)) + (while (and (not (eq dll node)) (> n 0)) (setq node (aref node branch)) (setq n (1- n))) - (unless (eq ewoc--current-dll node) node))) + (unless (eq dll node) node))) (defun ewoc-location (node) "Return the start location of NODE." @@ -155,13 +151,13 @@ and (ewoc--node-nth -1) returns the last node." (defmacro ewoc--set-buffer-bind-dll-let* (ewoc varlist &rest forms) "Execute FORMS with ewoc--buffer selected as current buffer, -`ewoc--current-dll' bound to the dll, and VARLIST bound as in a let*. -`ewoc--current-dll' will be bound when VARLIST is initialized, but +`dll' bound to the dll, and VARLIST bound as in a let*. +`dll' will be bound when VARLIST is initialized, but the current buffer will *not* have been changed. Return value of last form in FORMS." (let ((hnd (make-symbol "ewoc"))) `(let* ((,hnd ,ewoc) - (ewoc--current-dll (ewoc--dll ,hnd)) + (dll (ewoc--dll ,hnd)) ,@varlist) (with-current-buffer (ewoc--buffer ,hnd) ,@forms)))) @@ -176,7 +172,7 @@ BUT if it is the header or the footer in EWOC return nil instead." (eq node (ewoc--footer ewoc))) node)) -(defun ewoc--adjust (beg end node) +(defun ewoc--adjust (beg end node dll) ;; "Manually reseat" markers for NODE and its successors (including footer ;; and dll), in the case where they originally shared start position with ;; BEG, to END. BEG and END are buffer positions describing NODE's left @@ -187,9 +183,12 @@ BUT if it is the header or the footer in EWOC return nil instead." (when (< beg end) (let (m) (while (and (= beg (setq m (ewoc--node-start-marker node))) + ;; The "dummy" node `dll' actually holds the marker that + ;; points to the end of the footer, so we check `dll' + ;; *after* reseating the marker. (progn (set-marker m end) - (not (eq ewoc--current-dll node)))) + (not (eq dll node)))) (setq node (ewoc--node-right node)))))) (defun ewoc--insert-new-node (node data pretty-printer) @@ -203,10 +202,10 @@ NODE and leaving the new node's start there. Return the new node." (ewoc--node-right elemnode) node (ewoc--node-right (ewoc--node-left node)) elemnode (ewoc--node-left node) elemnode) - (ewoc--refresh-node pretty-printer elemnode) + (ewoc--refresh-node pretty-printer elemnode dll) elemnode))) -(defun ewoc--refresh-node (pp node) +(defun ewoc--refresh-node (pp node dll) "Redisplay the element represented by NODE using the pretty-printer PP." (let ((inhibit-read-only t) (m (ewoc--node-start-marker node)) @@ -216,7 +215,7 @@ NODE and leaving the new node's start there. Return the new node." ;; Calculate and insert the string. (goto-char m) (funcall pp (ewoc--node-data node)) - (ewoc--adjust m (point) R))) + (ewoc--adjust m (point) R dll))) (defun ewoc--wrap (func) (lexical-let ((ewoc--user-pp func)) @@ -284,19 +283,19 @@ fourth arg NOSEP non-nil inhibits this." "Enter DATA first in EWOC. Return the new node." (ewoc--set-buffer-bind-dll ewoc - (ewoc-enter-after ewoc (ewoc--node-nth 0) data))) + (ewoc-enter-after ewoc (ewoc--node-nth dll 0) data))) (defun ewoc-enter-last (ewoc data) "Enter DATA last in EWOC. Return the new node." (ewoc--set-buffer-bind-dll ewoc - (ewoc-enter-before ewoc (ewoc--node-nth -1) data))) + (ewoc-enter-before ewoc (ewoc--node-nth dll -1) data))) (defun ewoc-enter-after (ewoc node data) "Enter a new element DATA after NODE in EWOC. Return the new node." (ewoc--set-buffer-bind-dll ewoc - (ewoc-enter-before ewoc (ewoc--node-next node) data))) + (ewoc-enter-before ewoc (ewoc--node-next dll node) data))) (defun ewoc-enter-before (ewoc node data) "Enter a new element DATA before NODE in EWOC. @@ -309,16 +308,14 @@ Return the new node." Return nil if NODE is nil or the last element." (when node (ewoc--filter-hf-nodes - ewoc (let ((ewoc--current-dll (ewoc--dll ewoc))) - (ewoc--node-next node))))) + ewoc (ewoc--node-next (ewoc--dll ewoc) node)))) (defun ewoc-prev (ewoc node) "Return the node in EWOC that precedes NODE. Return nil if NODE is nil or the first element." (when node (ewoc--filter-hf-nodes - ewoc (let ((ewoc--current-dll (ewoc--dll ewoc))) - (ewoc--node-prev node))))) + ewoc (ewoc--node-prev (ewoc--dll ewoc) node)))) (defun ewoc-nth (ewoc n) "Return the Nth node. @@ -330,8 +327,7 @@ Use `ewoc-data' to extract the data from the node." ;; Skip the header (or footer, if n is negative). (setq n (if (< n 0) (1- n) (1+ n))) (ewoc--filter-hf-nodes ewoc - (let ((ewoc--current-dll (ewoc--dll ewoc))) - (ewoc--node-nth n)))) + (ewoc--node-nth (ewoc--dll ewoc) n))) (defun ewoc-map (map-function ewoc &rest args) "Apply MAP-FUNCTION to all elements in EWOC. @@ -348,12 +344,12 @@ arguments will be passed to MAP-FUNCTION." (ewoc--set-buffer-bind-dll-let* ewoc ((footer (ewoc--footer ewoc)) (pp (ewoc--pretty-printer ewoc)) - (node (ewoc--node-nth 1))) + (node (ewoc--node-nth dll 1))) (save-excursion (while (not (eq node footer)) (if (apply map-function (ewoc--node-data node) args) - (ewoc--refresh-node pp node)) - (setq node (ewoc--node-next node)))))) + (ewoc--refresh-node pp node dll)) + (setq node (ewoc--node-next dll node)))))) (defun ewoc-delete (ewoc &rest nodes) "Delete NODES from EWOC." @@ -365,7 +361,7 @@ arguments will be passed to MAP-FUNCTION." (when (eq last node) (setf last nil (ewoc--last-node ewoc) nil)) (delete-region (ewoc--node-start-marker node) - (ewoc--node-start-marker (ewoc--node-next node))) + (ewoc--node-start-marker (ewoc--node-next dll node))) (set-marker (ewoc--node-start-marker node) nil) (setf L (ewoc--node-left node) R (ewoc--node-right node) @@ -384,14 +380,14 @@ if it changes it. The PREDICATE is called with the element as its first argument. If any ARGS are given they will be passed to the PREDICATE." (ewoc--set-buffer-bind-dll-let* ewoc - ((node (ewoc--node-nth 1)) + ((node (ewoc--node-nth dll 1)) (footer (ewoc--footer ewoc)) (goodbye nil) (inhibit-read-only t)) (while (not (eq node footer)) (unless (apply predicate (ewoc--node-data node) args) (push node goodbye)) - (setq node (ewoc--node-next node))) + (setq node (ewoc--node-next dll node))) (apply 'ewoc-delete ewoc goodbye))) (defun ewoc-locate (ewoc &optional pos guess) @@ -403,27 +399,26 @@ If POS points before the first element, the first node is returned. If POS points after the last element, the last node is returned. If the EWOC is empty, nil is returned." (unless pos (setq pos (point))) - (ewoc--set-buffer-bind-dll-let* ewoc - ((footer (ewoc--footer ewoc))) + (ewoc--set-buffer-bind-dll ewoc (cond ;; Nothing present? - ((eq (ewoc--node-nth 1) (ewoc--node-nth -1)) + ((eq (ewoc--node-nth dll 1) (ewoc--node-nth dll -1)) nil) ;; Before second elem? - ((< pos (ewoc--node-start-marker (ewoc--node-nth 2))) - (ewoc--node-nth 1)) + ((< pos (ewoc--node-start-marker (ewoc--node-nth dll 2))) + (ewoc--node-nth dll 1)) ;; After one-before-last elem? - ((>= pos (ewoc--node-start-marker (ewoc--node-nth -2))) - (ewoc--node-nth -2)) + ((>= pos (ewoc--node-start-marker (ewoc--node-nth dll -2))) + (ewoc--node-nth dll -2)) ;; We now know that pos is within a elem. (t ;; Make an educated guess about which of the three known ;; node'es (the first, the last, or GUESS) is nearest. - (let* ((best-guess (ewoc--node-nth 1)) + (let* ((best-guess (ewoc--node-nth dll 1)) (distance (abs (- pos (ewoc--node-start-marker best-guess))))) (when guess (let ((d (abs (- pos (ewoc--node-start-marker guess))))) @@ -431,7 +426,7 @@ If the EWOC is empty, nil is returned." (setq distance d) (setq best-guess guess)))) - (let* ((g (ewoc--node-nth -1)) ;Check the last elem + (let* ((g (ewoc--node-nth dll -1)) ;Check the last elem (d (abs (- pos (ewoc--node-start-marker g))))) (when (< d distance) (setq distance d) @@ -454,14 +449,14 @@ If the EWOC is empty, nil is returned." (ewoc--node-start-marker best-guess)) ;; Loop until we are exactly one node too far down... (while (>= pos (ewoc--node-start-marker best-guess)) - (setq best-guess (ewoc--node-next best-guess))) + (setq best-guess (ewoc--node-next dll best-guess))) ;; ...and return the previous node. - (ewoc--node-prev best-guess)) + (ewoc--node-prev dll best-guess)) ;; Pos is before best-guess (t (while (< pos (ewoc--node-start-marker best-guess)) - (setq best-guess (ewoc--node-prev best-guess))) + (setq best-guess (ewoc--node-prev dll best-guess))) best-guess))))))) (defun ewoc-invalidate (ewoc &rest nodes) @@ -471,7 +466,7 @@ Delete current text first, thus effecting a \"refresh\"." ((pp (ewoc--pretty-printer ewoc))) (save-excursion (dolist (node nodes) - (ewoc--refresh-node pp node))))) + (ewoc--refresh-node pp node dll))))) (defun ewoc-goto-prev (ewoc arg) "Move point to the ARGth previous element in EWOC. @@ -485,10 +480,10 @@ Return the node we moved to." (setq arg (1- arg))) (while (and node (> arg 0)) (setq arg (1- arg)) - (setq node (ewoc--node-prev node))) + (setq node (ewoc--node-prev dll node))) ;; Never step above the first element. (unless (ewoc--filter-hf-nodes ewoc node) - (setq node (ewoc--node-nth 1))) + (setq node (ewoc--node-nth dll 1))) (ewoc-goto-node ewoc node)))) (defun ewoc-goto-next (ewoc arg) @@ -498,10 +493,10 @@ Return the node (or nil if we just passed the last node)." ((node (ewoc-locate ewoc (point)))) (while (and node (> arg 0)) (setq arg (1- arg)) - (setq node (ewoc--node-next node))) + (setq node (ewoc--node-next dll node))) ;; Never step below the first element. ;; (unless (ewoc--filter-hf-nodes ewoc node) - ;; (setq node (ewoc--node-nth -2))) + ;; (setq node (ewoc--node-nth dll -2))) (ewoc-goto-node ewoc node))) (defun ewoc-goto-node (ewoc node) @@ -520,15 +515,15 @@ number of elements needs to be refreshed." (ewoc--set-buffer-bind-dll-let* ewoc ((footer (ewoc--footer ewoc))) (let ((inhibit-read-only t)) - (delete-region (ewoc--node-start-marker (ewoc--node-nth 1)) + (delete-region (ewoc--node-start-marker (ewoc--node-nth dll 1)) (ewoc--node-start-marker footer)) (goto-char (ewoc--node-start-marker footer)) (let ((pp (ewoc--pretty-printer ewoc)) - (node (ewoc--node-nth 1))) + (node (ewoc--node-nth dll 1))) (while (not (eq node footer)) (set-marker (ewoc--node-start-marker node) (point)) (funcall pp (ewoc--node-data node)) - (setq node (ewoc--node-next node))))) + (setq node (ewoc--node-next dll node))))) (set-marker (ewoc--node-start-marker footer) (point)))) (defun ewoc-collect (ewoc predicate &rest args) @@ -545,12 +540,12 @@ If more than two arguments are given the remaining arguments will be passed to PREDICATE." (ewoc--set-buffer-bind-dll-let* ewoc ((header (ewoc--header ewoc)) - (node (ewoc--node-nth -2)) + (node (ewoc--node-nth dll -2)) result) (while (not (eq node header)) (if (apply predicate (ewoc--node-data node) args) (push (ewoc--node-data node) result)) - (setq node (ewoc--node-prev node))) + (setq node (ewoc--node-prev dll node))) (nreverse result))) (defun ewoc-buffer (ewoc) @@ -573,8 +568,8 @@ Return nil if the buffer has been deleted." (setf (ewoc--node-data head) header (ewoc--node-data foot) footer) (save-excursion - (ewoc--refresh-node hf-pp head) - (ewoc--refresh-node hf-pp foot)))) + (ewoc--refresh-node hf-pp head dll) + (ewoc--refresh-node hf-pp foot dll)))) (provide 'ewoc) From b486a098cb1969341daf73eb96b106cd52fa2b32 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 May 2006 05:47:29 +0000 Subject: [PATCH 170/403] (hack-one-local-variable-eval-safep): Don't burp if used during bootstrapping. --- lisp/ChangeLog | 63 +++++++++++++++++++++++++------------------------- lisp/files.el | 5 +++- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 355afbbca78..c1221136a54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-05-29 Stefan Monnier + * files.el (hack-one-local-variable-eval-safep): Don't burp if used + during bootstrapping. + * emacs-lisp/ewoc.el (ewoc--current-dll): Remove. Basically undo the change of 2006-05-26: use extra arguments instead of dynamic scoping. @@ -135,8 +138,8 @@ 2006-05-26 Reiner Steib - * comint.el (comint-kill-whole-line): Rename arg to count. Fix - doc string. + * comint.el (comint-kill-whole-line): Rename arg to count. + Fix doc string. 2006-05-26 Chong Yidong @@ -162,11 +165,10 @@ * textmodes/org.el: (org-next-item, org-previous-item): Emit more compact error message. (org-tags-view): Refresh category table in each file. - (org-table-justify-field-maybe): Removed superfluous arguments to + (org-table-justify-field-maybe): Remove superfluous arguments to `format'. (org-export-as-html): Insert "

        " before postamble. - (org-paste-subtree, org-kill-is-subtree-p): Check for empty kill - ring. + (org-paste-subtree, org-kill-is-subtree-p): Check for empty kill ring. 2006-05-26 Kenichi Handa @@ -174,14 +176,14 @@ FILENAME is a cons (NAME . BUFFER). (po-find-file-coding-system-guts): Likewise. - * arc-mode.el (archive-set-buffer-as-visiting-file): Call - find-operation-coding-system with (FILENAME . BUFFER). + * arc-mode.el (archive-set-buffer-as-visiting-file): + Call find-operation-coding-system with (FILENAME . BUFFER). * tar-mode.el (tar-extract): Call find-operation-coding-system with (FILENAME . BUFFER). - * international/mule.el (decode-coding-inserted-region): Call - find-operation-coding-system with (FILENAME . BUFFER). + * international/mule.el (decode-coding-inserted-region): + Call find-operation-coding-system with (FILENAME . BUFFER). 2006-05-25 Chong Yidong @@ -194,18 +196,17 @@ Remove 8th arg KEEP-ALL in read-from-minibuffer. 2006-05-25 Rajesh Vaidheeswarran - * whitespace.el (whitespace-cleanup): change to cleanup - region if one is active - * whitespace.el (whitespace-cleanup-internal): new internal - method + + * whitespace.el (whitespace-cleanup): Change to cleanup + region if one is active. + * whitespace.el (whitespace-cleanup-internal): New internal method. 2006-05-25 Mathias Dahl * dired.el (dired-mode-map): Add help-echo strings to tumme commands. Bind `tumme-dired-display-image' to C-t i. - * tumme.el (tumme-display-image): Change documentation string - slightly. + * tumme.el (tumme-display-image): Change documentation string slightly. (tumme-dired-display-image): Add call to `display-buffer'. 2006-05-25 Thien-Thi Nguyen @@ -285,16 +286,16 @@ * textmodes/org.el: (org-open-at-point): Use renamed variable `org-confirm-shell-link-function'. - (org-confirm-shell-link-function): Renamed from + (org-confirm-shell-link-function): Rename from `org-confirm-shell-links'. (org-export-directory): New function. (org-export-as-ascii, org-export-as-html, org-export-as-xoxo) (org-export-icalendar): Use `org-export-directory'. (org-indent-item): Keep cursor position. (org-link-file-path-type): New option. - (org-export-as-html): Fixed bug with plain lists starting in + (org-export-as-html): Fix bug with plain lists starting in column 0. - (org-export-as-html): Removed deadline formatting, this happens + (org-export-as-html): Remove deadline formatting, this happens now already in `org-html-handle-time-stamps'. (org-export-html-style): Deadline class removed. (org-insert-labeled-timestamps-at-point): New option. @@ -307,16 +308,15 @@ (org-shifttab): Use `org-global-cycle'. (org-insert-heading, org-insert-item): Go to end of new headline/item after creating it. - (org-export-visible): Renames from `org-export-copy-visible'. Now - creates a temporary org-file and applies an exporting command to - it. + (org-export-visible): Rename from `org-export-copy-visible'. + Now creates a temporary org-file and applies an exporting command + to it. (org-table-eval-formula): Support for lisp forms. (org-agenda-todo-ignore-scheduled): New option. (org-agenda-get-todos): Use new option `org-agenda-todo-ignore-scheduled'. (org-export-html-inline-images): New value `maybe'. - (org-export-as-html): Inlining of images dependent on link - description. + (org-export-as-html): Inlining of images dependent on link description. (org-archive-subtree): Check for end-of-buffer before trying `kill-line'. (org-agenda-follow-mode): New option. @@ -326,8 +326,8 @@ (org-agenda-get-todos): Use `org-agenda-todo-list-sublevels'. (org-agenda-todo-list-sublevels): New option. (org-html-level-start): When TITLE is nil, just close all levels. - (org-parse-key-lines, org-parse-export-options): Functions - removed, replaced by `org-infile-export-plist'. + (org-parse-key-lines, org-parse-export-options): Remove functions, + replaced by `org-infile-export-plist'. (org-combine-plists, org-infile-export-plist) (org-default-export-plist): New functions. (org-export-html-preamble, org-export-html-postamble) @@ -336,12 +336,12 @@ (org-export-publishing-directory): New option. (org-export-as-html, org-export-as-ascii): Use the new property lists for settings. - (org-export-copy-visible, org-export-as-xoxo): Respect - `org-export-publishing-directory'. + (org-export-copy-visible, org-export-as-xoxo): + Respect `org-export-publishing-directory'. (org-link-search, org-store-link, org-file-apps): Support for links to BibTeX database entries.. - (org-get-current-options, org-set-regexps-and-options): Implement - logging as a startup option. + (org-get-current-options, org-set-regexps-and-options): + Implement logging as a startup option. (org-store-link): Make sure context string is never empty (org-insert-link): Use relative path when possible. (org-at-item-checklet-p): New function. @@ -356,10 +356,9 @@ (org-complete): Use `org-tag-alist'. (org-fast-tag-insert, org-fast-tag-selection): New functions. (org-next-item, org-previous-item): New commands. - (org-beginning-of-item, org-end-of-item): Added (interactive) to + (org-beginning-of-item, org-end-of-item): Add (interactive) to make command. - (org-shiftup, org-shiftdown): Accommodate the item-navigation - commands. + (org-shiftup, org-shiftdown): Accommodate the item-navigation commands. 2006-05-23 Thien-Thi Nguyen diff --git a/lisp/files.el b/lisp/files.el index 8ecd57a4d24..9f15e35e987 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2689,7 +2689,10 @@ It is dangerous if either of these conditions are met: (or (numberp val) (equal val ''defun))) ((eq prop 'edebug-form-spec) ;; Only allow indirect form specs. - (edebug-basic-spec val))))) + ;; During bootstrapping, edebug-basic-spec might not be + ;; defined yet. + (and (fboundp 'edebug-basic-spec) + (edebug-basic-spec val)))))) ;; Allow expressions that the user requested. (member exp safe-local-eval-forms) ;; Certain functions can be allowed with safe arguments From c57597ddb27edbe264f374fa53272a179fbbc129 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 29 May 2006 06:11:33 +0000 Subject: [PATCH 171/403] (term-if-xemacs, term-ifnot-xemacs): Delete, replace uses with a simple test. (term-set-escape-char, term-mode, term-check-kill-echo-list) (term-send-raw-string, term-send-raw, term-mouse-paste) (term-char-mode, term-line-mode, term-exec, term-sentinel) (term-handle-exit, term-read-input-ring) (term-previous-matching-input-string) (term-previous-matching-input-string-position) (term-previous-matching-input-from-input) (term-replace-by-expanded-history, term-send-input) (term-skip-prompt, term-bol, term-send-invisible) (term-kill-input, term-delchar-or-maybe-eof) (term-backward-matching-input, term-check-source) (term-proc-query, term-emulate-terminal) (term-handle-colors-array, term-process-pager, term-pager-line) (term-pager-bob, term-unwrap-line, term-word) (term-dynamic-complete-filename) (term-dynamic-complete-as-filename) (term-dynamic-simple-complete): Replace one arm ifs with whens or unlesses. --- lisp/ChangeLog | 23 ++ lisp/term.el | 794 ++++++++++++++++++++++++------------------------- 2 files changed, 409 insertions(+), 408 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c1221136a54..08304facfaf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2006-05-28 Dan Nicolaescu + + * term.el (term-if-xemacs, term-ifnot-xemacs): Delete, replace + uses with a simple test. + (term-set-escape-char, term-mode, term-check-kill-echo-list) + (term-send-raw-string, term-send-raw, term-mouse-paste) + (term-char-mode, term-line-mode, term-exec, term-sentinel) + (term-handle-exit, term-read-input-ring) + (term-previous-matching-input-string) + (term-previous-matching-input-string-position) + (term-previous-matching-input-from-input) + (term-replace-by-expanded-history, term-send-input) + (term-skip-prompt, term-bol, term-send-invisible) + (term-kill-input, term-delchar-or-maybe-eof) + (term-backward-matching-input, term-check-source) + (term-proc-query, term-emulate-terminal) + (term-handle-colors-array, term-process-pager, term-pager-line) + (term-pager-bob, term-unwrap-line, term-word) + (term-dynamic-complete-filename) + (term-dynamic-complete-as-filename) + (term-dynamic-simple-complete): Replace one arm ifs with whens or + unlesses. + 2006-05-29 Stefan Monnier * files.el (hack-one-local-variable-eval-safep): Don't burp if used diff --git a/lisp/term.el b/lisp/term.el index a03970a368b..8e2e0773121 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -660,13 +660,6 @@ Buffer local variable.") (put 'term-scroll-show-maximum-output 'permanent-local t) (put 'term-ptyp 'permanent-local t) -;; Do FORM if running under XEmacs (previously Lucid Emacs). -(defmacro term-if-xemacs (&rest forms) - (if (featurep 'xemacs) (cons 'progn forms))) -;; Do FORM if NOT running under XEmacs (previously Lucid Emacs). -(defmacro term-ifnot-xemacs (&rest forms) - (if (not (featurep 'xemacs)) (cons 'progn forms))) - (defmacro term-in-char-mode () '(eq (current-local-map) term-raw-map)) (defmacro term-in-line-mode () '(not (term-in-char-mode))) ;; True if currently doing PAGER handling. @@ -725,13 +718,13 @@ Notice that a setting of 0 means 'don't truncate anything'. This variable is buffer-local.") ;;; -(term-if-xemacs - (defvar term-terminal-menu - '("Terminal" - [ "Character mode" term-char-mode (term-in-line-mode)] - [ "Line mode" term-line-mode (term-in-char-mode)] - [ "Enable paging" term-pager-toggle (not term-pager-count)] - [ "Disable paging" term-pager-toggle term-pager-count]))) +(when (featurep 'xemacs) + (defvar term-terminal-menu + '("Terminal" + [ "Character mode" term-char-mode (term-in-line-mode)] + [ "Line mode" term-line-mode (term-in-char-mode)] + [ "Enable paging" term-pager-toggle (not term-pager-count)] + [ "Disable paging" term-pager-toggle term-pager-count]))) (unless term-mode-map (setq term-mode-map (make-sparse-keymap)) @@ -739,10 +732,10 @@ is buffer-local.") (define-key term-mode-map "\en" 'term-next-input) (define-key term-mode-map "\er" 'term-previous-matching-input) (define-key term-mode-map "\es" 'term-next-matching-input) - (term-ifnot-xemacs - (define-key term-mode-map [?\A-\M-r] - 'term-previous-matching-input-from-input) - (define-key term-mode-map [?\A-\M-s] 'term-next-matching-input-from-input)) + (unless (featurep 'xemacs) + (define-key term-mode-map [?\A-\M-r] + 'term-previous-matching-input-from-input) + (define-key term-mode-map [?\A-\M-s] 'term-next-matching-input-from-input)) (define-key term-mode-map "\e\C-l" 'term-show-output) (define-key term-mode-map "\C-m" 'term-send-input) (define-key term-mode-map "\C-d" 'term-delchar-or-maybe-eof) @@ -781,9 +774,7 @@ is buffer-local.") ) ;; Menu bars: -(term-ifnot-xemacs - (progn - +(unless (featurep 'xemacs) ;; terminal: (let (newmap) (setq newmap (make-sparse-keymap "Terminal")) @@ -860,14 +851,14 @@ is buffer-local.") (define-key newmap [] '("BREAK" . term-interrupt-subjob)) (define-key term-mode-map [menu-bar signals] (setq term-signals-menu (cons "Signals" newmap))) - ))) + )) ;; Set up term-raw-map, etc. (defun term-set-escape-char (c) "Change term-escape-char and keymaps that depend on it." - (if term-escape-char - (define-key term-raw-map term-escape-char 'term-send-raw)) + (when term-escape-char + (define-key term-raw-map term-escape-char 'term-send-raw)) (setq c (make-string 1 c)) (define-key term-raw-map c term-raw-escape-map) ;; Define standard bindings in term-raw-escape-map @@ -901,28 +892,26 @@ is buffer-local.") ;;; Added nearly all the 'grey keys' -mm - (progn - (term-if-xemacs - (define-key term-raw-map [button2] 'term-mouse-paste)) - (term-ifnot-xemacs - (define-key term-raw-map [mouse-2] 'term-mouse-paste) - (define-key term-raw-map [menu-bar terminal] term-terminal-menu) - (define-key term-raw-map [menu-bar signals] term-signals-menu)) - (define-key term-raw-map [up] 'term-send-up) - (define-key term-raw-map [down] 'term-send-down) - (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) - (define-key term-raw-map [insert] 'term-send-insert) - (define-key term-raw-map [S-prior] 'scroll-down) - (define-key term-raw-map [S-next] 'scroll-up) - (define-key term-raw-map [S-insert] 'term-paste) - (define-key term-raw-map [prior] 'term-send-prior) - (define-key term-raw-map [next] 'term-send-next))) + (if (featurep 'xemacs) + (define-key term-raw-map [button2] 'term-mouse-paste) + (define-key term-raw-map [mouse-2] 'term-mouse-paste) + (define-key term-raw-map [menu-bar terminal] term-terminal-menu) + (define-key term-raw-map [menu-bar signals] term-signals-menu)) + (define-key term-raw-map [up] 'term-send-up) + (define-key term-raw-map [down] 'term-send-down) + (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) + (define-key term-raw-map [insert] 'term-send-insert) + (define-key term-raw-map [S-prior] 'scroll-down) + (define-key term-raw-map [S-next] 'scroll-up) + (define-key term-raw-map [S-insert] 'term-paste) + (define-key term-raw-map [prior] 'term-send-prior) + (define-key term-raw-map [next] 'term-send-next)) (term-set-escape-char ?\C-c) @@ -1114,9 +1103,9 @@ Entry to this mode runs the hooks on `term-mode-hook'." ;; Cua-mode's keybindings interfere with the term keybindings, disable it. (set (make-local-variable 'cua-mode) nil) (run-mode-hooks 'term-mode-hook) - (term-if-xemacs - (set-buffer-menubar - (append current-menubar (list term-terminal-menu)))) + (when (featurep 'xemacs) + (set-buffer-menubar + (append current-menubar (list term-terminal-menu)))) (or term-input-ring (setq term-input-ring (make-ring term-input-ring-size))) (term-update-mode-line)) @@ -1153,16 +1142,15 @@ Entry to this mode runs the hooks on `term-mode-hook'." (setq term-start-line-column nil) (setq cur nil found t)) (setq cur (cdr cur)))))) - (if (not found) - (goto-char save-point))) + (when (not found) + (goto-char save-point))) found)) (defun term-check-size (process) - (if (or (/= term-height (1- (window-height))) - (/= term-width (term-window-width))) - (progn - (term-reset-size (1- (window-height)) (term-window-width)) - (set-process-window-size process term-height term-width)))) + (when (or (/= term-height (1- (window-height))) + (/= term-width (term-window-width))) + (term-reset-size (1- (window-height)) (term-window-width)) + (set-process-window-size process term-height term-width))) (defun term-send-raw-string (chars) (let ((proc (get-buffer-process (current-buffer)))) @@ -1171,8 +1159,8 @@ Entry to this mode runs the hooks on `term-mode-hook'." ;; Note that (term-current-row) must be called *after* ;; (point) has been updated to (process-mark proc). (goto-char (process-mark proc)) - (if (term-pager-enabled) - (setq term-pager-count (term-current-row))) + (when (term-pager-enabled) + (setq term-pager-count (term-current-row))) (process-send-string proc chars)))) (defun term-send-raw () @@ -1180,9 +1168,9 @@ Entry to this mode runs the hooks on `term-mode-hook'." without any interpretation." (interactive) ;; Convert `return' to C-m, etc. - (if (and (symbolp last-input-char) - (get last-input-char 'ascii-character)) - (setq last-input-char (get last-input-char 'ascii-character))) + (when (and (symbolp last-input-char) + (get last-input-char 'ascii-character)) + (setq last-input-char (get last-input-char 'ascii-character))) (term-send-raw-string (make-string 1 last-input-char))) (defun term-send-raw-meta () @@ -1207,19 +1195,19 @@ without any interpretation." (defun term-mouse-paste (click arg) "Insert the last stretch of killed text at the position clicked on." (interactive "e\nP") - (term-if-xemacs - (term-send-raw-string (or (condition-case () (x-get-selection) (error ())) - (x-get-cutbuffer) - (error "No selection or cut buffer available")))) - (term-ifnot-xemacs - ;; Give temporary modes such as isearch a chance to turn off. - (run-hooks 'mouse-leave-buffer-hook) - (setq this-command 'yank) - (mouse-set-point click) - (term-send-raw-string (current-kill (cond - ((listp arg) 0) - ((eq arg '-) -1) - (t (1- arg))))))) + (if (featurep 'xemacs) + (term-send-raw-string + (or (condition-case () (x-get-selection) (error ())) + (x-get-cutbuffer) + (error "No selection or cut buffer available"))) + ;; Give temporary modes such as isearch a chance to turn off. + (run-hooks 'mouse-leave-buffer-hook) + (setq this-command 'yank) + (mouse-set-point click) + (term-send-raw-string (current-kill (cond + ((listp arg) 0) + ((eq arg '-) -1) + (t (1- arg))))))) (defun term-paste () "Insert the last stretch of killed text at point." @@ -1248,33 +1236,31 @@ Each character you type is sent directly to the inferior without intervention from Emacs, except for the escape character (usually C-c)." (interactive) ;; FIXME: Emit message? Cfr ilisp-raw-message - (if (term-in-line-mode) - (progn - (setq term-old-mode-map (current-local-map)) - (use-local-map term-raw-map) + (when (term-in-line-mode) + (setq term-old-mode-map (current-local-map)) + (use-local-map term-raw-map) - ;; Send existing partial line to inferior (without newline). - (let ((pmark (process-mark (get-buffer-process (current-buffer)))) - (save-input-sender term-input-sender)) - (if (> (point) pmark) - (unwind-protect - (progn - (setq term-input-sender - (symbol-function 'term-send-string)) - (end-of-line) - (term-send-input)) - (setq term-input-sender save-input-sender)))) - (term-update-mode-line)))) + ;; Send existing partial line to inferior (without newline). + (let ((pmark (process-mark (get-buffer-process (current-buffer)))) + (save-input-sender term-input-sender)) + (when (> (point) pmark) + (unwind-protect + (progn + (setq term-input-sender + (symbol-function 'term-send-string)) + (end-of-line) + (term-send-input)) + (setq term-input-sender save-input-sender)))) + (term-update-mode-line))) (defun term-line-mode () "Switch to line (\"cooked\") sub-mode of term mode. This means that Emacs editing commands work as normally, until you type \\[term-send-input] which sends the current line to the inferior." (interactive) - (if (term-in-char-mode) - (progn - (use-local-map term-old-mode-map) - (term-update-mode-line)))) + (when (term-in-char-mode) + (use-local-map term-old-mode-map) + (term-update-mode-line))) (defun term-update-mode-line () (setq mode-line-process @@ -1332,7 +1318,7 @@ buffer. The hook term-exec-hook is run after each exec." (save-excursion (set-buffer buffer) (let ((proc (get-buffer-process buffer))) ; Blast any old process. - (if proc (delete-process proc))) + (when proc (delete-process proc))) ;; Crank up a new process (let ((proc (term-exec-1 name buffer command switches))) (make-local-variable 'term-ptyp) @@ -1362,29 +1348,28 @@ buffer. The hook term-exec-hook is run after each exec." "Sentinel for term buffers. The main purpose is to get rid of the local keymap." (let ((buffer (process-buffer proc))) - (if (memq (process-status proc) '(signal exit)) - (progn - (if (null (buffer-name buffer)) - ;; buffer killed - (set-process-buffer proc nil) - (let ((obuf (current-buffer))) - ;; save-excursion isn't the right thing if - ;; process-buffer is current-buffer - (unwind-protect - (progn - ;; Write something in the compilation buffer - ;; and hack its mode line. - (set-buffer buffer) - ;; Get rid of local keymap. - (use-local-map nil) - (term-handle-exit (process-name proc) - msg) - ;; Since the buffer and mode line will show that the - ;; process is dead, we can delete it now. Otherwise it - ;; will stay around until M-x list-processes. - (delete-process proc)) - (set-buffer obuf)))) - )))) + (when (memq (process-status proc) '(signal exit)) + (if (null (buffer-name buffer)) + ;; buffer killed + (set-process-buffer proc nil) + (let ((obuf (current-buffer))) + ;; save-excursion isn't the right thing if + ;; process-buffer is current-buffer + (unwind-protect + (progn + ;; Write something in the compilation buffer + ;; and hack its mode line. + (set-buffer buffer) + ;; Get rid of local keymap. + (use-local-map nil) + (term-handle-exit (process-name proc) + msg) + ;; Since the buffer and mode line will show that the + ;; process is dead, we can delete it now. Otherwise it + ;; will stay around until M-x list-processes. + (delete-process proc)) + (set-buffer obuf))) + )))) (defun term-handle-exit (process-name msg) "Write process exit (or other change) message MSG in the current buffer." @@ -1397,8 +1382,8 @@ The main purpose is to get rid of the local keymap." (insert ?\n "Process " process-name " " msg) ;; Force mode line redisplay soon. (force-mode-line-update) - (if (and opoint (< opoint omax)) - (goto-char opoint)))) + (when (and opoint (< opoint omax)) + (goto-char opoint)))) ;;; Name to use for TERM. @@ -1521,9 +1506,9 @@ See also `term-input-ignoredups' and `term-write-input-ring'." nil t)) (let ((history (buffer-substring (match-beginning 1) (match-end 1)))) - (if (or (null term-input-ignoredups) - (ring-empty-p ring) - (not (string-equal (ring-ref ring 0) history))) + (when (or (null term-input-ignoredups) + (ring-empty-p ring) + (not (string-equal (ring-ref ring 0) history))) (ring-insert-at-beginning ring history))) (setq count (1+ count)))) (kill-buffer history-buf)) @@ -1651,15 +1636,15 @@ Moves relative to `term-input-ring-index'." "Return the string matching REGEXP ARG places along the input ring. Moves relative to `term-input-ring-index'." (let* ((pos (term-previous-matching-input-string-position regexp arg))) - (if pos (ring-ref term-input-ring pos)))) + (when pos (ring-ref term-input-ring pos)))) (defun term-previous-matching-input-string-position (regexp arg &optional start) "Return the index matching REGEXP ARG places along the input ring. Moves relative to START, or `term-input-ring-index'." - (if (or (not (ring-p term-input-ring)) - (ring-empty-p term-input-ring)) - (error "No history")) + (when (or (not (ring-p term-input-ring)) + (ring-empty-p term-input-ring)) + (error "No history")) (let* ((len (ring-length term-input-ring)) (motion (if (> arg 0) 1 -1)) (n (mod (- (or start (term-search-start arg)) motion) len)) @@ -1678,8 +1663,8 @@ Moves relative to START, or `term-input-ring-index'." tried-each-ring-item (= n prev))) (setq arg (if (> arg 0) (1- arg) (1+ arg)))) ;; Now that we know which ring element to use, if we found it, return that. - (if (string-match regexp (ring-ref term-input-ring n)) - n))) + (when (string-match regexp (ring-ref term-input-ring n)) + n))) (defun term-previous-matching-input (regexp arg) "Search backwards through input history for match for REGEXP. @@ -1713,14 +1698,14 @@ If N is negative, find the previous or Nth previous match." With prefix argument N, search for Nth previous match. If N is negative, search forwards for the -Nth following match." (interactive "p") - (if (not (memq last-command '(term-previous-matching-input-from-input + (when (not (memq last-command '(term-previous-matching-input-from-input term-next-matching-input-from-input))) - ;; Starting a new search - (setq term-matching-input-from-input-string - (buffer-substring - (process-mark (get-buffer-process (current-buffer))) - (point)) - term-input-ring-index nil)) + ;; Starting a new search + (setq term-matching-input-from-input-string + (buffer-substring + (process-mark (get-buffer-process (current-buffer))) + (point)) + term-input-ring-index nil)) (term-previous-matching-input (concat "^" (regexp-quote term-matching-input-from-input-string)) arg)) @@ -1752,15 +1737,15 @@ See `term-magic-space' and `term-replace-by-expanded-history-before-point'. Returns t if successful." (interactive) - (if (and term-input-autoexpand - (string-match "[!^]" (funcall term-get-old-input)) - (save-excursion (beginning-of-line) - (looking-at term-prompt-regexp))) - ;; Looks like there might be history references in the command. - (let ((previous-modified-tick (buffer-modified-tick))) - (message "Expanding history references...") - (term-replace-by-expanded-history-before-point silent) - (/= previous-modified-tick (buffer-modified-tick))))) + (when (and term-input-autoexpand + (string-match "[!^]" (funcall term-get-old-input)) + (save-excursion (beginning-of-line) + (looking-at term-prompt-regexp))) + ;; Looks like there might be history references in the command. + (let ((previous-modified-tick (buffer-modified-tick))) + (message "Expanding history references...") + (term-replace-by-expanded-history-before-point silent) + (/= previous-modified-tick (buffer-modified-tick))))) (defun term-replace-by-expanded-history-before-point (silent) @@ -2026,17 +2011,17 @@ Similarly for Soar, Scheme, etc." (delete-region pmark (point)) (insert input) copy)))) - (if (term-pager-enabled) - (save-excursion - (goto-char (process-mark proc)) - (setq term-pager-count (term-current-row)))) - (if (and (funcall term-input-filter history) - (or (null term-input-ignoredups) - (not (ring-p term-input-ring)) - (ring-empty-p term-input-ring) - (not (string-equal (ring-ref term-input-ring 0) - history)))) - (ring-insert term-input-ring history)) + (when (term-pager-enabled) + (save-excursion + (goto-char (process-mark proc)) + (setq term-pager-count (term-current-row)))) + (when (and (funcall term-input-filter history) + (or (null term-input-ignoredups) + (not (ring-p term-input-ring)) + (ring-empty-p term-input-ring) + (not (string-equal (ring-ref term-input-ring 0) + history)))) + (ring-insert term-input-ring history)) (let ((functions term-input-filter-functions)) (while functions (funcall (car functions) (concat input "\n")) @@ -2047,13 +2032,12 @@ Similarly for Soar, Scheme, etc." ;; in case we get output amidst sending the input. (set-marker term-last-input-start pmark) (set-marker term-last-input-end (point)) - (if input-is-new - (progn - ;; Set up to delete, because inferior should echo. - (if (marker-buffer term-pending-delete-marker) - (delete-region term-pending-delete-marker pmark)) - (set-marker term-pending-delete-marker pmark-val) - (set-marker (process-mark proc) (point)))) + (when input-is-new + ;; Set up to delete, because inferior should echo. + (when (marker-buffer term-pending-delete-marker) + (delete-region term-pending-delete-marker pmark)) + (set-marker term-pending-delete-marker pmark-val) + (set-marker (process-mark proc) (point))) (goto-char pmark) (funcall term-input-sender proc input))))) @@ -2083,9 +2067,9 @@ Calls `term-get-old-input' to get old input." "Skip past the text matching regexp term-prompt-regexp. If this takes us past the end of the current line, don't skip at all." (let ((eol (save-excursion (end-of-line) (point)))) - (if (and (looking-at term-prompt-regexp) - (<= (match-end 0) eol)) - (goto-char (match-end 0))))) + (when (and (looking-at term-prompt-regexp) + (<= (match-end 0) eol)) + (goto-char (match-end 0))))) (defun term-after-pmark-p () @@ -2114,7 +2098,7 @@ The prompt skip is done by skipping text matching the regular expression term-prompt-regexp, a buffer local variable." (interactive "P") (beginning-of-line) - (if (null arg) (term-skip-prompt))) + (when (null arg) (term-skip-prompt))) ;;; These two functions are for entering text you don't want echoed or ;;; saved -- typically passwords to ftp, telnet, or somesuch. @@ -2175,10 +2159,10 @@ is additionally sent. String is not saved on term input history list. Security bug: your string can still be temporarily recovered with \\[view-lossage]." (interactive "P") ; Defeat snooping via C-x esc - (if (not (stringp str)) - (setq str (term-read-noecho "Non-echoed text: " t))) - (if (not proc) - (setq proc (get-buffer-process (current-buffer)))) + (when (not (stringp str)) + (setq str (term-read-noecho "Non-echoed text: " t))) + (when (not proc) + (setq proc (get-buffer-process (current-buffer)))) (if (not proc) (error "Current buffer has no process") (setq term-kill-echo-list (nconc term-kill-echo-list (cons str nil))) @@ -2270,8 +2254,8 @@ Useful if you accidentally suspend the top-level process." (interactive) (let* ((pmark (process-mark (get-buffer-process (current-buffer)))) (p-pos (marker-position pmark))) - (if (> (point) p-pos) - (kill-region pmark (point))))) + (when (> (point) p-pos) + (kill-region pmark (point))))) (defun term-delchar-or-maybe-eof (arg) "Delete ARG characters forward, or send an EOF to process if at end of @@ -2279,7 +2263,7 @@ buffer." (interactive "p") (if (eobp) (process-send-eof) - (delete-char arg))) + (delete-char arg))) (defun term-send-eof () "Send an EOF to the current buffer's process." @@ -2294,8 +2278,8 @@ If N is negative, find the next or Nth next match." (interactive (term-regexp-arg "Backward input matching (regexp): ")) (let* ((re (concat term-prompt-regexp ".*" regexp)) (pos (save-excursion (end-of-line (if (> arg 0) 0 1)) - (if (re-search-backward re nil t arg) - (point))))) + (when (re-search-backward re nil t arg) + (point))))) (if (null pos) (progn (message "Not found") (ding)) @@ -2407,15 +2391,15 @@ See `term-prompt-regexp'." (defun term-check-source (fname) (let ((buff (get-file-buffer fname))) - (if (and buff - (buffer-modified-p buff) - (y-or-n-p (format "Save buffer %s first? " - (buffer-name buff)))) - ;; save BUFF. - (let ((old-buffer (current-buffer))) - (set-buffer buff) - (save-buffer) - (set-buffer old-buffer))))) + (when (and buff + (buffer-modified-p buff) + (y-or-n-p (format "Save buffer %s first? " + (buffer-name buff)))) + ;; save BUFF. + (let ((old-buffer (current-buffer))) + (set-buffer buff) + (save-buffer) + (set-buffer old-buffer))))) ;;; (TERM-GET-SOURCE prompt prev-dir/file source-modes mustmatch-p) @@ -2510,12 +2494,12 @@ See `term-prompt-regexp'." ;; Try to position the proc window so you can see the answer. ;; This is bogus code. If you delete the (sit-for 0), it breaks. ;; I don't know why. Wizards invited to improve it. - (if (not (pos-visible-in-window-p proc-pt proc-win)) - (let ((opoint (window-point proc-win))) - (set-window-point proc-win proc-mark) (sit-for 0) - (if (not (pos-visible-in-window-p opoint proc-win)) - (push-mark opoint) - (set-window-point proc-win opoint))))))) + (when (not (pos-visible-in-window-p proc-pt proc-win)) + (let ((opoint (window-point proc-win))) + (set-window-point proc-win proc-mark) (sit-for 0) + (if (not (pos-visible-in-window-p opoint proc-win)) + (push-mark opoint) + (set-window-point proc-win opoint))))))) ;;; Returns the current column in the current screen line. ;;; Note: (current-column) yields column in buffer line. @@ -2703,16 +2687,15 @@ See `term-prompt-regexp'." ;; Let's handle the messages. -mm (let* ((newstr (term-handle-ansi-terminal-messages str))) - (if (not (eq str newstr)) - (setq handled-ansi-message t - str newstr))) + (when (not (eq str newstr)) + (setq handled-ansi-message t + str newstr))) (setq str-length (length str)) - (if (marker-buffer term-pending-delete-marker) - (progn - ;; Delete text following term-pending-delete-marker. - (delete-region term-pending-delete-marker (process-mark proc)) - (set-marker term-pending-delete-marker nil))) + (when (marker-buffer term-pending-delete-marker) + ;; Delete text following term-pending-delete-marker. + (delete-region term-pending-delete-marker (process-mark proc)) + (set-marker term-pending-delete-marker nil)) (if (eq (window-buffer) (current-buffer)) (progn @@ -2723,20 +2706,20 @@ See `term-prompt-regexp'." (setq save-marker (copy-marker (process-mark proc))) - (if (/= (point) (process-mark proc)) - (progn (setq save-point (point-marker)) - (goto-char (process-mark proc)))) + (when (/= (point) (process-mark proc)) + (setq save-point (point-marker)) + (goto-char (process-mark proc))) (save-restriction ;; If the buffer is in line mode, and there is a partial ;; input line, save the line (by narrowing to leave it ;; outside the restriction ) until we're done with output. - (if (and (> (point-max) (process-mark proc)) - (term-in-line-mode)) - (narrow-to-region (point-min) (process-mark proc))) + (when (and (> (point-max) (process-mark proc)) + (term-in-line-mode)) + (narrow-to-region (point-min) (process-mark proc))) - (if term-log-buffer - (princ str term-log-buffer)) + (when term-log-buffer + (princ str term-log-buffer)) (cond ((eq term-terminal-state 4) ;; Have saved pending output. (setq str (concat term-terminal-parameter str)) (setq term-terminal-parameter nil) @@ -2750,7 +2733,7 @@ See `term-prompt-regexp'." (setq funny (string-match "[\r\n\000\007\033\t\b\032\016\017]" str i)) - (if (not funny) (setq funny str-length)) + (when (not funny) (setq funny str-length)) (cond ((> funny i) (cond ((eq term-terminal-state 1) ;; We are in state 1, we need to wrap @@ -2824,10 +2807,10 @@ See `term-prompt-regexp'." (setq count (min term-width (+ count 8 (- (mod count 8))))) (if (> term-width count) - (progn - (term-move-columns - (- count (term-current-column))) - (setq term-current-column count)) + (progn + (term-move-columns + (- count (term-current-column))) + (setq term-current-column count)) (when (> term-width (term-current-column)) (term-move-columns (1- (- term-width (term-current-column))))) @@ -2969,44 +2952,43 @@ See `term-prompt-regexp'." (setq term-terminal-previous-parameter-2 -1) (setq term-terminal-previous-parameter -1) (setq term-terminal-state 0))))) - (if (term-handling-pager) - ;; Finish stuff to get ready to handle PAGER. - (progn - (if (> (% (current-column) term-width) 0) - (setq term-terminal-parameter - (substring str i)) - ;; We're at column 0. Goto end of buffer; to compensate, - ;; prepend a ?\r for later. This looks more consistent. - (if (zerop i) - (setq term-terminal-parameter - (concat "\r" (substring str i))) - (setq term-terminal-parameter (substring str (1- i))) - (aset term-terminal-parameter 0 ?\r)) - (goto-char (point-max))) - (setq term-terminal-state 4) - (make-local-variable 'term-pager-old-filter) - (setq term-pager-old-filter (process-filter proc)) - (set-process-filter proc term-pager-filter) - (setq i str-length))) + (when (term-handling-pager) + ;; Finish stuff to get ready to handle PAGER. + (if (> (% (current-column) term-width) 0) + (setq term-terminal-parameter + (substring str i)) + ;; We're at column 0. Goto end of buffer; to compensate, + ;; prepend a ?\r for later. This looks more consistent. + (if (zerop i) + (setq term-terminal-parameter + (concat "\r" (substring str i))) + (setq term-terminal-parameter (substring str (1- i))) + (aset term-terminal-parameter 0 ?\r)) + (goto-char (point-max))) + (setq term-terminal-state 4) + (make-local-variable 'term-pager-old-filter) + (setq term-pager-old-filter (process-filter proc)) + (set-process-filter proc term-pager-filter) + (setq i str-length)) (setq i (1+ i)))) - (if (>= (term-current-row) term-height) - (term-handle-deferred-scroll)) + (when (>= (term-current-row) term-height) + (term-handle-deferred-scroll)) (set-marker (process-mark proc) (point)) - (if save-point - (progn (goto-char save-point) - (set-marker save-point nil))) + (when save-point + (goto-char save-point) + (set-marker save-point nil)) ;; Check for a pending filename-and-line number to display. ;; We do this before scrolling, because we might create a new window. - (if (and term-pending-frame - (eq (window-buffer selected) (current-buffer))) - (progn (term-display-line (car term-pending-frame) - (cdr term-pending-frame)) - (setq term-pending-frame nil) - ;; We have created a new window, so check the window size. - (term-check-size proc))) + (when (and term-pending-frame + (eq (window-buffer selected) (current-buffer))) + (term-display-line (car term-pending-frame) + (cdr term-pending-frame)) + (setq term-pending-frame nil) + ;; We have created a new window, so check the window size. + (term-check-size proc)) ;; Scroll each window displaying the buffer but (by default) ;; only if the point matches the process-mark we started with. @@ -3018,50 +3000,47 @@ See `term-prompt-regexp'." (setq last-win win) (while (progn (setq win (next-window win nil t)) - (if (eq (window-buffer win) (process-buffer proc)) - (let ((scroll term-scroll-to-bottom-on-output)) - (select-window win) - (if (or (= (point) save-marker) + (when (eq (window-buffer win) (process-buffer proc)) + (let ((scroll term-scroll-to-bottom-on-output)) + (select-window win) + (when (or (= (point) save-marker) (eq scroll t) (eq scroll 'all) ;; Maybe user wants point to jump to the end. (and (eq selected win) (or (eq scroll 'this) (not save-point))) (and (eq scroll 'others) (not (eq selected win)))) - (progn - (goto-char term-home-marker) - (recenter 0) - (goto-char (process-mark proc)) - (if (not (pos-visible-in-window-p (point) win)) - (recenter -1)))) - ;; Optionally scroll so that the text - ;; ends at the bottom of the window. - (if (and term-scroll-show-maximum-output + (goto-char term-home-marker) + (recenter 0) + (goto-char (process-mark proc)) + (if (not (pos-visible-in-window-p (point) win)) + (recenter -1))) + ;; Optionally scroll so that the text + ;; ends at the bottom of the window. + (when (and term-scroll-show-maximum-output (>= (point) (process-mark proc))) - (save-excursion - (goto-char (point-max)) - (recenter -1))))) + (save-excursion + (goto-char (point-max)) + (recenter -1))))) (not (eq win last-win)))) ;;; Stolen from comint.el and adapted -mm - (if (> term-buffer-maximum-size 0) - (save-excursion - (goto-char (process-mark (get-buffer-process (current-buffer)))) - (forward-line (- term-buffer-maximum-size)) - (beginning-of-line) - (delete-region (point-min) (point)))) -;;; - + (when (> term-buffer-maximum-size 0) + (save-excursion + (goto-char (process-mark (get-buffer-process (current-buffer)))) + (forward-line (- term-buffer-maximum-size)) + (beginning-of-line) + (delete-region (point-min) (point)))) (set-marker save-marker nil))))) (defun term-handle-deferred-scroll () (let ((count (- (term-current-row) term-height))) - (if (>= count 0) - (save-excursion - (goto-char term-home-marker) - (term-vertical-motion (1+ count)) - (set-marker term-home-marker (point)) - (setq term-current-row (1- term-height)))))) + (when (>= count 0) + (save-excursion + (goto-char term-home-marker) + (term-vertical-motion (1+ count)) + (set-marker term-home-marker (point)) + (setq term-current-row (1- term-height)))))) ;;; Reset the terminal, delete all the content and set the face to the ;;; default one. @@ -3172,17 +3151,17 @@ See `term-prompt-regexp'." (list :background (if (= term-ansi-current-color 0) (face-foreground 'default) - (elt ansi-term-color-vector term-ansi-current-color)) + (elt ansi-term-color-vector term-ansi-current-color)) :foreground (if (= term-ansi-current-bg-color 0) (face-background 'default) - (elt ansi-term-color-vector term-ansi-current-bg-color)))) + (elt ansi-term-color-vector term-ansi-current-bg-color)))) (when term-ansi-current-bold - (setq term-current-face - (append '(:weight bold) term-current-face))) + (setq term-current-face + (append '(:weight bold) term-current-face))) (when term-ansi-current-underline - (setq term-current-face - (append '(:underline t) term-current-face)))) + (setq term-current-face + (append '(:underline t) term-current-face)))) (if term-ansi-current-invisible (setq term-current-face (if (= term-ansi-current-bg-color 0) @@ -3202,12 +3181,12 @@ See `term-prompt-regexp'." :background (elt ansi-term-color-vector term-ansi-current-bg-color))) (when term-ansi-current-bold - (setq term-current-face - (append '(:weight bold) term-current-face))) + (setq term-current-face + (append '(:weight bold) term-current-face))) (when term-ansi-current-underline - (setq term-current-face - (append '(:underline t) term-current-face)))))) - + (setq term-current-face + (append '(:underline t) term-current-face)))))) + ;;; (message "Debug %S" term-current-face) (setq term-ansi-face-already-done nil)) @@ -3221,14 +3200,14 @@ See `term-prompt-regexp'." ;; (eq char ?f) ;; xterm seems to handle this sequence too, not ;; needed for now ) - (if (<= term-terminal-parameter 0) - (setq term-terminal-parameter 1)) - (if (<= term-terminal-previous-parameter 0) - (setq term-terminal-previous-parameter 1)) - (if (> term-terminal-previous-parameter term-height) - (setq term-terminal-previous-parameter term-height)) - (if (> term-terminal-parameter term-width) - (setq term-terminal-parameter term-width)) + (when (<= term-terminal-parameter 0) + (setq term-terminal-parameter 1)) + (when (<= term-terminal-previous-parameter 0) + (setq term-terminal-previous-parameter 1)) + (when (> term-terminal-previous-parameter term-height) + (setq term-terminal-previous-parameter term-height)) + (when (> term-terminal-parameter term-width) + (setq term-terminal-parameter term-width)) (term-goto (1- term-terminal-previous-parameter) (1- term-terminal-parameter))) @@ -3445,50 +3424,49 @@ The top-most line is line 0." ; The page is full, so enter "pager" mode, and wait for input. (defun term-process-pager () - (if (not term-pager-break-map) - (let* ((map (make-keymap)) - (i 0) tmp) + (when (not term-pager-break-map) + (let* ((map (make-keymap)) + (i 0) tmp) ; (while (< i 128) ; (define-key map (make-string 1 i) 'term-send-raw) ; (setq i (1+ i))) - (define-key map "\e" - (lookup-key (current-global-map) "\e")) - (define-key map "\C-x" - (lookup-key (current-global-map) "\C-x")) - (define-key map "\C-u" - (lookup-key (current-global-map) "\C-u")) - (define-key map " " 'term-pager-page) - (define-key map "\r" 'term-pager-line) - (define-key map "?" 'term-pager-help) - (define-key map "h" 'term-pager-help) - (define-key map "b" 'term-pager-back-page) - (define-key map "\177" 'term-pager-back-line) - (define-key map "q" 'term-pager-discard) - (define-key map "D" 'term-pager-disable) - (define-key map "<" 'term-pager-bob) - (define-key map ">" 'term-pager-eob) + (define-key map "\e" + (lookup-key (current-global-map) "\e")) + (define-key map "\C-x" + (lookup-key (current-global-map) "\C-x")) + (define-key map "\C-u" + (lookup-key (current-global-map) "\C-u")) + (define-key map " " 'term-pager-page) + (define-key map "\r" 'term-pager-line) + (define-key map "?" 'term-pager-help) + (define-key map "h" 'term-pager-help) + (define-key map "b" 'term-pager-back-page) + (define-key map "\177" 'term-pager-back-line) + (define-key map "q" 'term-pager-discard) + (define-key map "D" 'term-pager-disable) + (define-key map "<" 'term-pager-bob) + (define-key map ">" 'term-pager-eob) - ;; Add menu bar. - (progn - (term-ifnot-xemacs - (define-key map [menu-bar terminal] term-terminal-menu) - (define-key map [menu-bar signals] term-signals-menu) - (setq tmp (make-sparse-keymap "More pages?")) - (define-key tmp [help] '("Help" . term-pager-help)) - (define-key tmp [disable] - '("Disable paging" . term-fake-pager-disable)) - (define-key tmp [discard] - '("Discard remaining output" . term-pager-discard)) - (define-key tmp [eob] '("Goto to end" . term-pager-eob)) - (define-key tmp [bob] '("Goto to beginning" . term-pager-bob)) - (define-key tmp [line] '("1 line forwards" . term-pager-line)) - (define-key tmp [bline] '("1 line backwards" . term-pager-back-line)) - (define-key tmp [back] '("1 page backwards" . term-pager-back-page)) - (define-key tmp [page] '("1 page forwards" . term-pager-page)) - (define-key map [menu-bar page] (cons "More pages?" tmp)) - )) + ;; Add menu bar. + (unless (featurep 'xemacs) + (define-key map [menu-bar terminal] term-terminal-menu) + (define-key map [menu-bar signals] term-signals-menu) + (setq tmp (make-sparse-keymap "More pages?")) + (define-key tmp [help] '("Help" . term-pager-help)) + (define-key tmp [disable] + '("Disable paging" . term-fake-pager-disable)) + (define-key tmp [discard] + '("Discard remaining output" . term-pager-discard)) + (define-key tmp [eob] '("Goto to end" . term-pager-eob)) + (define-key tmp [bob] '("Goto to beginning" . term-pager-bob)) + (define-key tmp [line] '("1 line forwards" . term-pager-line)) + (define-key tmp [bline] '("1 line backwards" . term-pager-back-line)) + (define-key tmp [back] '("1 page backwards" . term-pager-back-page)) + (define-key tmp [page] '("1 page forwards" . term-pager-page)) + (define-key map [menu-bar page] (cons "More pages?" tmp)) + ) - (setq term-pager-break-map map))) + (setq term-pager-break-map map))) ; (let ((process (get-buffer-process (current-buffer)))) ; (stop-process process)) (setq term-pager-old-local-map (current-local-map)) @@ -3506,8 +3484,8 @@ The top-most line is line 0." (interactive "p") (let* ((moved (vertical-motion (1+ lines))) (deficit (- lines moved))) - (if (> moved lines) - (backward-char)) + (when (> moved lines) + (backward-char)) (cond ((<= deficit 0) ;; OK, had enough in the buffer for request. (recenter (1- term-height))) ((term-pager-continue deficit))))) @@ -3521,8 +3499,8 @@ The top-most line is line 0." (defun term-pager-bob () (interactive) (goto-char (point-min)) - (if (= (vertical-motion term-height) term-height) - (backward-char)) + (when (= (vertical-motion term-height) term-height) + (backward-char)) (recenter (1- term-height))) ; pager mode command to go to end of buffer @@ -3573,7 +3551,7 @@ The top-most line is line 0." (interactive) (if (term-pager-enabled) (term-pager-disable) (term-pager-enable))) -(term-ifnot-xemacs +(unless (featurep 'xemacs) (defalias 'term-fake-pager-enable 'term-pager-toggle) (defalias 'term-fake-pager-disable 'term-pager-toggle) (put 'term-char-mode 'menu-enable '(term-in-line-mode)) @@ -3626,45 +3604,45 @@ all pending output has been dealt with.")) (let ((scroll-needed (- (+ (term-current-row) down) (if (< down 0) term-scroll-start term-scroll-end)))) - (if (or (and (< down 0) (< scroll-needed 0)) - (and (> down 0) (> scroll-needed 0))) - (let ((save-point (copy-marker (point))) (save-top)) - (goto-char term-home-marker) - (cond (term-scroll-with-delete - (if (< down 0) - (progn - ;; Delete scroll-needed lines at term-scroll-end, - ;; then insert scroll-needed lines. - (term-vertical-motion (1- term-scroll-end)) - (end-of-line) - (setq save-top (point)) - (term-vertical-motion scroll-needed) - (end-of-line) - (delete-region save-top (point)) - (goto-char save-point) - (setq down (- scroll-needed down)) - (term-vertical-motion down)) - ;; Delete scroll-needed lines at term-scroll-start. - (term-vertical-motion term-scroll-start) - (setq save-top (point)) - (term-vertical-motion scroll-needed) - (delete-region save-top (point)) - (goto-char save-point) - (term-vertical-motion down) - (term-adjust-current-row-cache (- scroll-needed))) - (setq term-current-column nil) - (term-insert-char ?\n (abs scroll-needed))) - ((and (numberp term-pager-count) - (< (setq term-pager-count (- term-pager-count down)) - 0)) - (setq down 0) - (term-process-pager)) - (t - (term-adjust-current-row-cache (- scroll-needed)) + (when (or (and (< down 0) (< scroll-needed 0)) + (and (> down 0) (> scroll-needed 0))) + (let ((save-point (copy-marker (point))) (save-top)) + (goto-char term-home-marker) + (cond (term-scroll-with-delete + (if (< down 0) + (progn + ;; Delete scroll-needed lines at term-scroll-end, + ;; then insert scroll-needed lines. + (term-vertical-motion (1- term-scroll-end)) + (end-of-line) + (setq save-top (point)) + (term-vertical-motion scroll-needed) + (end-of-line) + (delete-region save-top (point)) + (goto-char save-point) + (setq down (- scroll-needed down)) + (term-vertical-motion down)) + ;; Delete scroll-needed lines at term-scroll-start. + (term-vertical-motion term-scroll-start) + (setq save-top (point)) (term-vertical-motion scroll-needed) - (set-marker term-home-marker (point)))) - (goto-char save-point) - (set-marker save-point nil)))) + (delete-region save-top (point)) + (goto-char save-point) + (term-vertical-motion down) + (term-adjust-current-row-cache (- scroll-needed))) + (setq term-current-column nil) + (term-insert-char ?\n (abs scroll-needed))) + ((and (numberp term-pager-count) + (< (setq term-pager-count (- term-pager-count down)) + 0)) + (setq down 0) + (term-process-pager)) + (t + (term-adjust-current-row-cache (- scroll-needed)) + (term-vertical-motion scroll-needed) + (set-marker term-home-marker (point)))) + (goto-char save-point) + (set-marker save-point nil)))) down) (defun term-down (down &optional check-for-scroll) @@ -3701,34 +3679,34 @@ all pending output has been dealt with.")) ;; if the line above point wraps around, add a ?\n to undo the wrapping. ;; FIXME: Probably should be called more than it is. (defun term-unwrap-line () - (if (not (bolp)) (insert-before-markers ?\n))) + (when (not (bolp)) (insert-before-markers ?\n))) (defun term-erase-in-line (kind) - (if (= kind 1) ;; erase left of point - (let ((cols (term-horizontal-column)) (saved-point (point))) - (term-vertical-motion 0) - (delete-region (point) saved-point) - (term-insert-char ? cols))) - (if (not (eq kind 1)) ;; erase right of point - (let ((saved-point (point)) - (wrapped (and (zerop (term-horizontal-column)) - (not (zerop (term-current-column)))))) - (term-vertical-motion 1) - (delete-region saved-point (point)) - ;; wrapped is true if we're at the beginning of screen line, - ;; but not a buffer line. If we delete the current screen line - ;; that will make the previous line no longer wrap, and (because - ;; of the way Emacs display works) point will be at the end of - ;; the previous screen line rather then the beginning of the - ;; current one. To avoid that, we make sure that current line - ;; contain a space, to force the previous line to continue to wrap. - ;; We could do this always, but it seems preferable to not add the - ;; extra space when wrapped is false. - (if wrapped - (insert ? )) - (insert ?\n) - (put-text-property saved-point (point) 'face 'default) - (goto-char saved-point)))) + (when (= kind 1) ;; erase left of point + (let ((cols (term-horizontal-column)) (saved-point (point))) + (term-vertical-motion 0) + (delete-region (point) saved-point) + (term-insert-char ? cols))) + (when (not (eq kind 1)) ;; erase right of point + (let ((saved-point (point)) + (wrapped (and (zerop (term-horizontal-column)) + (not (zerop (term-current-column)))))) + (term-vertical-motion 1) + (delete-region saved-point (point)) + ;; wrapped is true if we're at the beginning of screen line, + ;; but not a buffer line. If we delete the current screen line + ;; that will make the previous line no longer wrap, and (because + ;; of the way Emacs display works) point will be at the end of + ;; the previous screen line rather then the beginning of the + ;; current one. To avoid that, we make sure that current line + ;; contain a space, to force the previous line to continue to wrap. + ;; We could do this always, but it seems preferable to not add the + ;; extra space when wrapped is false. + (when wrapped + (insert ? )) + (insert ?\n) + (put-text-property saved-point (point) 'face 'default) + (goto-char saved-point)))) (defun term-erase-in-display (kind) "Erases (that is blanks out) part of the window. @@ -3934,8 +3912,8 @@ inside of a \"[...]\" (see `skip-chars-forward')." (let ((limit (point)) (word (concat "[" word-chars "]")) (non-word (concat "[^" word-chars "]"))) - (if (re-search-backward non-word nil 'move) - (forward-char 1)) + (when (re-search-backward non-word nil 'move) + (forward-char 1)) ;; Anchor the search forwards. (if (or (eolp) (looking-at non-word)) nil @@ -3976,10 +3954,10 @@ completions listing is dependent on the value of `term-completion-autolist'. Returns t if successful." (interactive) - (if (term-match-partial-filename) - (prog2 (or (eq (selected-window) (minibuffer-window)) - (message "Completing file name...")) - (term-dynamic-complete-as-filename)))) + (when (term-match-partial-filename) + (prog2 (or (eq (selected-window) (minibuffer-window)) + (message "Completing file name...")) + (term-dynamic-complete-as-filename)))) (defun term-dynamic-complete-as-filename () "Dynamically complete at point as a filename. @@ -4003,7 +3981,7 @@ See `term-dynamic-complete-filename'. Returns t if successful." (message "No completions of %s" filename) (setq success nil)) ((eq completion t) ; Means already completed "file". - (if term-completion-addsuffix (insert " ")) + (when term-completion-addsuffix (insert " ")) (or mini-flag (message "Sole completion"))) ((string-equal completion "") ; Means completion on "directory/". (term-dynamic-list-filename-completions)) @@ -4068,7 +4046,7 @@ See also `term-dynamic-complete-filename'." (message "Sole completion") (insert (substring completion (length stub))) (message "Completed")) - (if term-completion-addsuffix (insert " ")) + (when term-completion-addsuffix (insert " ")) 'sole)) (t ; There's no unique completion. (let ((completion (try-completion stub candidates))) From 345b3483786cefe059d06c07ea79b2e329f45bf7 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 29 May 2006 06:19:09 +0000 Subject: [PATCH 172/403] (invalid_character): Mark as NO_RETURN. --- src/ChangeLog | 4 ++++ src/charset.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index c973a07f264..b864244bc89 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-28 Dan Nicolaescu + + * charset.h (invalid_character): Mark as NO_RETURN. + 2006-05-29 Kenichi Handa * coding.c (Ffind_operation_coding_system): Call a function by diff --git a/src/charset.h b/src/charset.h index 0d61aa054c0..b7ab4cb8b53 100644 --- a/src/charset.h +++ b/src/charset.h @@ -825,7 +825,7 @@ while (0) /* This is the maximum byte length of multi-byte sequence. */ #define MAX_MULTIBYTE_LENGTH 4 -extern void invalid_character P_ ((int)); +extern void invalid_character P_ ((int)) NO_RETURN; extern int translate_char P_ ((Lisp_Object, int, int, int, int)); extern int split_string P_ ((const unsigned char *, int, int *, From 31c5f81f89f54ffe03dcbe3df26a3f9560d68cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 29 May 2006 07:11:05 +0000 Subject: [PATCH 173/403] Connect menu_nav_ended to "selection-done" to fix grabs --- src/gtkutil.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/gtkutil.c b/src/gtkutil.c index b8d37df2214..a5022c7cfe5 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1970,6 +1970,30 @@ xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group) return w; } +/* Callback called when keyboard traversal (started by x-menu-bar-start) ends. + WMENU is the menu for which traversal has been done. DATA points to the + frame for WMENU. We must release grabs, some bad interaction between GTK + and Emacs makes the menus keep the grabs. */ + +static void +menu_nav_ended (wmenu, data) + GtkMenuShell *wmenu; + gpointer data; +{ + FRAME_PTR f = (FRAME_PTR) data; + Display *dpy = FRAME_X_DISPLAY (f); + + BLOCK_INPUT; + GtkMenuShell *w = GTK_MENU_SHELL (FRAME_X_OUTPUT (f)->menubar_widget); + gtk_menu_shell_deactivate (w); + gtk_menu_shell_deselect (w); + + XUngrabKeyboard (dpy, CurrentTime); + XUngrabPointer (dpy, CurrentTime); + UNBLOCK_INPUT; +} + + static GtkWidget *create_menus P_ ((widget_value *, FRAME_PTR, GCallback, GCallback, GCallback, int, int, int, GtkWidget *, xg_menu_cb_data *, char *)); @@ -2024,6 +2048,12 @@ create_menus (data, f, select_cb, deactivate_cb, highlight_cb, } else wmenu = gtk_menu_bar_new (); + /* Fix up grabs after keyboard traversal ends. */ + g_signal_connect (G_OBJECT (wmenu), + "selection-done", + G_CALLBACK (menu_nav_ended), + f); + /* Put cl_data on the top menu for easier access. */ cl_data = make_cl_data (cl_data, f, highlight_cb); g_object_set_data (G_OBJECT (wmenu), XG_FRAME_DATA, (gpointer)cl_data); From 22badffeec095599bba694dcf8807b129fd4a07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 29 May 2006 07:11:35 +0000 Subject: [PATCH 174/403] (Fmenu_bar_start): New function for USE_GTK and USE_X_TOOLKIT. --- src/xmenu.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/src/xmenu.c b/src/xmenu.c index c740062a82f..90fa1595cd9 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1301,9 +1301,117 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers) } } +DEFUN ("menu-bar-start", Fmenu_bar_start, Smenu_bar_start, 0, 1, "i", + doc: /* Start key navigation of the menu bar in FRAME. +This initially opens the first menu bar item and you can then navigate with the +arrow keys, select a menu entry with the return key or cancel with the +escape key. If FRAME has no menu bar this function does nothing. + +If FRAME is nil or not given, use the selected frame. */) + (frame) + Lisp_Object frame; +{ + XEvent ev; + FRAME_PTR f = check_x_frame (frame); + Widget menubar; + BLOCK_INPUT; + + if (FRAME_EXTERNAL_MENU_BAR (f)) + set_frame_menubar (f, 0, 1); + + menubar = FRAME_X_OUTPUT (f)->menubar_widget; + if (menubar) + { + Window child; + int error_p = 0; + + x_catch_errors (FRAME_X_DISPLAY (f)); + memset (&ev, 0, sizeof ev); + ev.xbutton.display = FRAME_X_DISPLAY (f); + ev.xbutton.window = XtWindow (menubar); + ev.xbutton.root = FRAME_X_DISPLAY_INFO (f)->root_window; + ev.xbutton.time = XtLastTimestampProcessed (FRAME_X_DISPLAY (f)); + ev.xbutton.button = Button1; + ev.xbutton.x = ev.xbutton.y = FRAME_MENUBAR_HEIGHT (f) / 2; + ev.xbutton.same_screen = True; + +#ifdef USE_MOTIF + { + Arg al[2]; + WidgetList list; + Cardinal nr; + XtSetArg (al[0], XtNchildren, &list); + XtSetArg (al[1], XtNnumChildren, &nr); + XtGetValues (menubar, al, 2); + ev.xbutton.window = XtWindow (list[0]); + } +#endif + + XTranslateCoordinates (FRAME_X_DISPLAY (f), + /* From-window, to-window. */ + ev.xbutton.window, ev.xbutton.root, + + /* From-position, to-position. */ + ev.xbutton.x, ev.xbutton.y, + &ev.xbutton.x_root, &ev.xbutton.y_root, + + /* Child of win. */ + &child); + error_p = x_had_errors_p (FRAME_X_DISPLAY (f)); + x_uncatch_errors (); + + if (! error_p) + { + ev.type = ButtonPress; + ev.xbutton.state = 0; + + XtDispatchEvent (&ev); + ev.xbutton.type = ButtonRelease; + ev.xbutton.state = Button1Mask; + XtDispatchEvent (&ev); + } + } + + UNBLOCK_INPUT; +} #endif /* USE_X_TOOLKIT */ + #ifdef USE_GTK +DEFUN ("menu-bar-start", Fmenu_bar_start, Smenu_bar_start, 0, 1, "i", + doc: /* Start key navigation of the menu bar in FRAME. +This initially opens the first menu bar item and you can then navigate with the +arrow keys, select a menu entry with the return key or cancel with the +escape key. If FRAME has no menu bar this function does nothing. + +If FRAME is nil or not given, use the selected frame. */) + (frame) + Lisp_Object frame; +{ + GtkWidget *menubar; + BLOCK_INPUT; + FRAME_PTR f = check_x_frame (frame); + + if (FRAME_EXTERNAL_MENU_BAR (f)) + set_frame_menubar (f, 0, 1); + + menubar = FRAME_X_OUTPUT (f)->menubar_widget; + if (menubar) + { + /* Activate the first menu. */ + GList *children = gtk_container_get_children (GTK_CONTAINER (menubar)); + + gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar), + GTK_WIDGET (children->data)); + + popup_activated_flag = 1; + g_list_free (children); + } + UNBLOCK_INPUT; + + return Qnil; +} + /* Loop util popup_activated_flag is set to zero in a callback. Used for popup menus and dialogs. */ @@ -3659,6 +3767,11 @@ The enable predicate for a menu command should check this variable. */); #endif defsubr (&Sx_popup_menu); + +#if defined (USE_GTK) || defined (USE_X_TOOLKIT) + defsubr (&Smenu_bar_start); +#endif + #ifdef HAVE_MENUS defsubr (&Sx_popup_dialog); #endif From c1c032a39c5691180ea4b3450c846f04b62d55be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 29 May 2006 07:12:54 +0000 Subject: [PATCH 175/403] * gtkutil.c (menu_nav_ended): New function. (create_menus): Connect menu_nav_ended to "selection-done" to fix grabs. * xmenu.c (Fmenu_bar_start): New function for USE_GTK and USE_X_TOOLKIT. --- src/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b864244bc89..56f68edd091 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2006-05-29 Jan Dj,Ad(Brv + + * gtkutil.c (menu_nav_ended): New function. + (create_menus): Connect menu_nav_ended to "selection-done" to fix + grabs. + + * xmenu.c (Fmenu_bar_start): New function for USE_GTK and USE_X_TOOLKIT. + 2006-05-28 Dan Nicolaescu * charset.h (invalid_character): Mark as NO_RETURN. From c3724dccb59bcea9e650129aa5e8ec17b82cc45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 29 May 2006 07:13:57 +0000 Subject: [PATCH 176/403] * NEWS: Mention F10 for Gtk+/Leddtif/Lucid menus. --- etc/ChangeLog | 4 ++++ etc/NEWS | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 1d386d66286..64a1340f9f1 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2006-05-29 Jan Dj,Ad(Brv + + * NEWS: Mention F10 for Gtk+/Leddtif/Lucid menus. + 2006-05-26 Eli Zaretskii * ledit.l: Remove file. diff --git a/etc/NEWS b/etc/NEWS index de99c76cf07..eb203dee35c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -989,6 +989,11 @@ disabled by customizing the variable `use-file-dialog'. *** 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 menu bar fpr Motif/Lesstif/Lucid/Gtk+ can be navigated with keys. +Pressing F10 shows the first menu in the menu bar. Navigation is done with +the arrow keys, select with the return key and cancel with the escape keys. + +++ *** The Lucid menus can display multilingual text in your locale. You have to explicitly specify a fontSet resource for this to work, for example From 974bed98c1baa95e7ef4ad4bac31bad50da5c16e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 29 May 2006 07:15:22 +0000 Subject: [PATCH 177/403] * screen.texi (Menu Bar): F10 for Gtk+/Lesstif/Lucid menus. --- man/ChangeLog | 4 ++++ man/screen.texi | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 5baca433ff4..89b1e33fc5f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-29 Jan Dj,Ad(Brv + + * screen.texi (Menu Bar): F10 for Gtk+/Lesstif/Lucid menus. + 2006-05-28 Ted Zlatanov * basic.texi: Many simplifications and improvements in wording. diff --git a/man/screen.texi b/man/screen.texi index b1b37be6239..8a5d3e1a42c 100644 --- a/man/screen.texi +++ b/man/screen.texi @@ -320,12 +320,18 @@ here, as you can more easily see them yourself. @kindex M-` @kindex F10 @findex tmm-menubar +@findex menu-bar-start On a graphical display, you can use the mouse to choose a command from the menu bar. A right-arrow at the end of the menu item means it leads to a subsidiary menu; @samp{...} at the end means that the command invoked will read arguments (further input from you) before it actually does anything. + You can also invoke the first menu bar item by pressing @key{F10} (to run +the command @code{menu-bar-start}). You can then navigate the menus with +the arrow keys. You select an item by pressing @key{RET} and cancel menu +navigation with @key{ESC}. + To view the full command name and documentation for a menu item, type @kbd{C-h k}, and then select the menu bar with the mouse in the usual way (@pxref{Key Help}). From e380957ec2e24b8e6ad1a10aa40a95aa96b20ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 29 May 2006 07:16:54 +0000 Subject: [PATCH 178/403] * term/x-win.el: bind F10 to menu-bar-start if available. --- lisp/ChangeLog | 4 ++++ lisp/term/x-win.el | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 08304facfaf..9f850eeb3ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-05-29 Jan Dj,Ad(Brv + + * term/x-win.el: bind F10 to menu-bar-start if available. + 2006-05-28 Dan Nicolaescu * term.el (term-if-xemacs, term-ifnot-xemacs): Delete, replace diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 4fb6781b615..ab16bb7dfaf 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -2516,5 +2516,9 @@ order until succeed.") (add-hook 'after-make-frame-functions 'x-dnd-init-frame) (global-set-key [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) +;; Let F10 do menu bar navigation. +(and (fboundp 'menu-bar-start) + (global-set-key [f10] 'menu-bar-start)) + ;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 ;;; x-win.el ends here From 3fc7a865c4399c2ae64b10d5c0a35d6fe08d7de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 29 May 2006 07:25:01 +0000 Subject: [PATCH 179/403] * sound.c (alsa_open, alsa_configure, alsa_write): Move assignment to err out of if-statement. --- src/ChangeLog | 3 +++ src/sound.c | 41 +++++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 56f68edd091..49d3355f201 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2006-05-29 Jan Dj,Ad(Brv + * sound.c (alsa_open, alsa_configure, alsa_write): Move + assignment to err out of if-statement. + * gtkutil.c (menu_nav_ended): New function. (create_menus): Connect menu_nav_ended to "selection-done" to fix grabs. diff --git a/src/sound.c b/src/sound.c index 6317b6c6279..c512ca45864 100644 --- a/src/sound.c +++ b/src/sound.c @@ -971,7 +971,8 @@ alsa_open (sd) sd->data = p; - if ((err = snd_pcm_open (&p->handle, file, SND_PCM_STREAM_PLAYBACK, 0)) < 0) + err = snd_pcm_open (&p->handle, file, SND_PCM_STREAM_PLAYBACK, 0); + if (err < 0) alsa_sound_perror (file, err); } @@ -993,33 +994,40 @@ alsa_configure (sd) xassert (p->handle != 0); - if ((err = snd_pcm_hw_params_malloc (&p->hwparams)) < 0) + err = snd_pcm_hw_params_malloc (&p->hwparams); + if (err < 0) alsa_sound_perror ("Could not allocate hardware parameter structure", err); - if ((err = snd_pcm_sw_params_malloc (&p->swparams)) < 0) + err = snd_pcm_sw_params_malloc (&p->swparams); + if (err < 0) alsa_sound_perror ("Could not allocate software parameter structure", err); - if ((err = snd_pcm_hw_params_any (p->handle, p->hwparams)) < 0) + err = snd_pcm_hw_params_any (p->handle, p->hwparams); + if (err < 0) alsa_sound_perror ("Could not initialize hardware parameter structure", err); - if ((err = snd_pcm_hw_params_set_access (p->handle, p->hwparams, - SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) + err = snd_pcm_hw_params_set_access (p->handle, p->hwparams, + SND_PCM_ACCESS_RW_INTERLEAVED); + if (err < 0) alsa_sound_perror ("Could not set access type", err); val = sd->format; - if ((err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val)) < 0) + err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val); + if (err < 0) alsa_sound_perror ("Could not set sound format", err); val = sd->sample_rate; - if ((err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &val, 0)) - < 0) + err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &val, 0); + if (err < 0) alsa_sound_perror ("Could not set sample rate", err); val = sd->channels; - if ((err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val)) < 0) + err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val); + if (err < 0) alsa_sound_perror ("Could not set channel count", err); - if ((err = snd_pcm_hw_params (p->handle, p->hwparams)) < 0) + err = snd_pcm_hw_params (p->handle, p->hwparams); + if (err < 0) alsa_sound_perror ("Could not set parameters", err); @@ -1063,7 +1071,8 @@ alsa_configure (sd) snd_pcm_sw_params_free (p->swparams); p->swparams = NULL; - if ((err = snd_pcm_prepare (p->handle)) < 0) + err = snd_pcm_prepare (p->handle); + if (err < 0) alsa_sound_perror ("Could not prepare audio interface for use", err); if (sd->volume > 0) @@ -1194,11 +1203,11 @@ alsa_write (sd, buffer, nbytes) while (nwritten < nbytes) { - if ((err = snd_pcm_writei (p->handle, - buffer + nwritten, - (nbytes - nwritten)/fact)) < 0) + err = snd_pcm_writei (p->handle, + buffer + nwritten, + (nbytes - nwritten)/fact); + if (err < 0) { - fprintf(stderr, "Err %d/%s\n", err, snd_strerror(err)); if (err == -EPIPE) { /* under-run */ err = snd_pcm_prepare (p->handle); From 01d0930532c2fbcf249a4dfa36e8365090e109e7 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Mon, 29 May 2006 08:06:15 +0000 Subject: [PATCH 180/403] * search.c (matcher_overflow): Mark as NO_RETURN. * xterm.c (x_connection_closed): Likewise. * sysdep.c (croak): Likewise. * sound.c (sound_perror, alsa_sound_perror): Likewise. * lisp.h (die, nsberror): Likewise. --- src/ChangeLog | 12 ++++++++++++ src/lisp.h | 4 ++-- src/search.c | 1 + src/sound.c | 3 ++- src/sysdep.c | 2 +- src/xterm.c | 1 + 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 49d3355f201..8d7c9bd09fb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2006-05-29 Dan Nicolaescu + + * search.c (matcher_overflow): Mark as NO_RETURN. + + * xterm.c (x_connection_closed): Likewise. + + * sysdep.c (croak): Likewise. + + * sound.c (sound_perror, alsa_sound_perror): Likewise. + + * lisp.h (die, nsberror): Likewise. + 2006-05-29 Jan Dj,Ad(Brv * sound.c (alsa_open, alsa_configure, alsa_write): Move diff --git a/src/lisp.h b/src/lisp.h index e606024ea90..400dc8d639a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -80,7 +80,7 @@ Boston, MA 02110-1301, USA. */ /* Extra internal type checking? */ extern int suppress_checking; -extern void die P_((const char *, const char *, int)); +extern void die P_((const char *, const char *, int)) NO_RETURN; #ifdef ENABLE_CHECKING @@ -2780,7 +2780,7 @@ extern void set_time_zone_rule P_ ((char *)); /* defined in buffer.c */ extern int mouse_face_overlay_overlaps P_ ((Lisp_Object)); -extern void nsberror P_ ((Lisp_Object)); +extern void nsberror P_ ((Lisp_Object)) NO_RETURN; extern char *no_switch_window P_ ((Lisp_Object window)); EXFUN (Fset_buffer_multibyte, 1); EXFUN (Foverlay_start, 1); diff --git a/src/search.c b/src/search.c index dfbf66fc7ed..99db7f184fc 100644 --- a/src/search.c +++ b/src/search.c @@ -90,6 +90,7 @@ static void save_search_regs (); static int simple_search (); static int boyer_moore (); static int search_buffer (); +static void matcher_overflow () NO_RETURN; static void matcher_overflow () diff --git a/src/sound.c b/src/sound.c index c512ca45864..af2369040cc 100644 --- a/src/sound.c +++ b/src/sound.c @@ -113,7 +113,8 @@ enum sound_attr SOUND_ATTR_SENTINEL }; -static void sound_perror P_ ((char *)); +static void alsa_sound_perror P_ ((char *, int)) NO_RETURN; +static void sound_perror P_ ((char *)) NO_RETURN; static void sound_warning P_ ((char *)); static int parse_sound P_ ((Lisp_Object, Lisp_Object *)); diff --git a/src/sysdep.c b/src/sysdep.c index 3e06170e721..307f69290d6 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -244,7 +244,7 @@ int emacs_ospeed; under VMS, we place the input channel number here. */ int input_fd; -void croak P_ ((char *)); +void croak P_ ((char *)) NO_RETURN; #ifdef AIXHFT void hft_init (); diff --git a/src/xterm.c b/src/xterm.c index 6624fa79df1..343ca30caa9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -357,6 +357,7 @@ static void x_check_fullscreen P_ ((struct frame *)); static void x_check_expected_move P_ ((struct frame *)); static int handle_one_xevent P_ ((struct x_display_info *, XEvent *, int *, struct input_event *)); +static SIGTYPE x_connection_closed P_ ((Display *, char *)); /* Flush display of frame F, or of all frames if F is null. */ From 54b9479288eebf18fabc23ff17ba7231425a3f55 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Mon, 29 May 2006 09:42:41 +0000 Subject: [PATCH 181/403] [USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): Call mac_set_font_info_for_selection if font panel is made visible. --- src/macfns.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/macfns.c b/src/macfns.c index 43d994c1357..1f2c2d39f47 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -4514,8 +4514,18 @@ This is for internal use only. Use `mac-font-panel-mode' instead. */) check_mac (); BLOCK_INPUT; - if (NILP (visible) == (FPIsFontPanelVisible () == true)) - err = FPShowHideFontPanel (); + if (NILP (visible) != !mac_font_panel_visible_p ()) + { + err = mac_show_hide_font_panel (); + if (err == noErr && !NILP (visible)) + { + Lisp_Object focus_frame = x_get_focus_frame (SELECTED_FRAME ()); + struct frame *f = (NILP (focus_frame) ? SELECTED_FRAME () + : XFRAME (focus_frame)); + + mac_set_font_info_for_selection (f, DEFAULT_FACE_ID, 0); + } + } UNBLOCK_INPUT; if (err != noErr) From b71c381c181bfd856ada810572697f7ec771fe26 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Mon, 29 May 2006 09:43:03 +0000 Subject: [PATCH 182/403] (font_panel_shown_p) [USE_MAC_FONT_PANEL]: New variable. (mac_font_panel_visible_p, mac_show_hide_font_panel) [USE_MAC_FONT_PANEL]: New functions. [USE_MAC_FONT_PANEL] (mac_set_font_info_for_selection): Return immediately if font panel is not visible. --- src/macterm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/macterm.c b/src/macterm.c index 9a2d6e2a35d..c86ad0ffde3 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -8338,6 +8338,25 @@ x_find_ccl_program (fontp) } #if USE_MAC_FONT_PANEL +/* The first call to font panel functions (FPIsFontPanelVisible, + SetFontInfoForSelection) is slow. This variable is used for + deferring such a call as much as possible. */ +static int font_panel_shown_p = 0; + +int +mac_font_panel_visible_p () +{ + return font_panel_shown_p && FPIsFontPanelVisible (); +} + +OSStatus +mac_show_hide_font_panel () +{ + font_panel_shown_p = 1; + + return FPShowHideFontPanel (); +} + OSStatus mac_set_font_info_for_selection (f, face_id, c) struct frame *f; @@ -8347,6 +8366,9 @@ mac_set_font_info_for_selection (f, face_id, c) EventTargetRef target = NULL; XFontStruct *font = NULL; + if (!mac_font_panel_visible_p ()) + return noErr; + if (f) { target = GetWindowEventTarget (FRAME_MAC_WINDOW (f)); From ffd71266b9733ed1d45d138acfa71f27d52f1adc Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Mon, 29 May 2006 09:43:44 +0000 Subject: [PATCH 183/403] (mac_font_panel_visible_p, mac_show_hide_font_panel): Add externs. --- src/ChangeLog | 14 ++++++++++++++ src/macterm.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 8d7c9bd09fb..3aa41c16c73 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,17 @@ +2006-05-29 YAMAMOTO Mitsuharu + + * macfns.c [USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): + Call mac_set_font_info_for_selection if font panel is made visible. + + * macterm.c (font_panel_shown_p) [USE_MAC_FONT_PANEL]: New variable. + (mac_font_panel_visible_p, mac_show_hide_font_panel) + [USE_MAC_FONT_PANEL]: New functions. + [USE_MAC_FONT_PANEL] (mac_set_font_info_for_selection): Return + immediately if font panel is not visible. + + * macterm.h (mac_font_panel_visible_p, mac_show_hide_font_panel): + Add externs. + 2006-05-29 Dan Nicolaescu * search.c (matcher_overflow): Mark as NO_RETURN. diff --git a/src/macterm.h b/src/macterm.h index 348d9bc4526..a1a0a1229d6 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -626,6 +626,8 @@ extern void mac_draw_line_to_pixmap P_ ((Display *, Pixmap, GC, int, int, extern void mac_clear_area P_ ((struct frame *, int, int, unsigned int, unsigned int)); extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); +extern int mac_font_panel_visible_p P_ ((void)); +extern OSStatus mac_show_hide_font_panel P_ ((void)); extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int)); extern OSErr install_window_handler P_ ((WindowPtr)); extern void remove_window_handler P_ ((WindowPtr)); From f54511f3baf5afaa4e7ea0fb08ec39a4565bbc13 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 May 2006 20:30:16 +0000 Subject: [PATCH 184/403] * tramp.texi (Frequently Asked Questions): Disable zsh zle. --- man/ChangeLog | 4 ++++ man/tramp.texi | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/man/ChangeLog b/man/ChangeLog index 89b1e33fc5f..138437befb8 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-29 Michael Albinus + + * tramp.texi (Frequently Asked Questions): Disable zsh zle. + 2006-05-29 Jan Dj,Ad(Brv * screen.texi (Menu Bar): F10 for Gtk+/Lesstif/Lucid menus. diff --git a/man/tramp.texi b/man/tramp.texi index acee8ce7321..b6640d3648e 100644 --- a/man/tramp.texi +++ b/man/tramp.texi @@ -2028,6 +2028,11 @@ contains unknown characters like escape sequences for coloring. This should be avoided on the remote side. @xref{Remote shell setup}. for setting the regular expression detecting the prompt. +A special problem is the zsh, which uses left-hand side and right-hand +side prompts in parallel. Therefore, it is necessary to disable the +zsh line editor on the remote host. You shall add to @file{~/.zshrc} +the following command: @command{[ $TERM = "dumb" ] && unsetopt zle}. + @item @value{tramp} doesn't transfer strings with more than 500 characters correctly From e1511d8794a00f051c9a094f51b6c615260fb587 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 May 2006 21:40:59 +0000 Subject: [PATCH 185/403] (Default Coding Systems): Fix it some more. --- lispref/nonascii.texi | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index b6706613f45..f36cda3b7b5 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi @@ -1103,11 +1103,11 @@ The argument @var{operation} should be a symbol, any one of @code{insert-file-contents}, @code{write-region}, @code{start-process}, @code{call-process}, @code{call-process-region}, or @code{open-network-stream}. These are the names of the Emacs I/O -primitives that can do coding system conversion. +primitives that can do character code and eol conversion. The remaining arguments should be the same arguments that might be given -to that I/O primitive. Depending on the primitive, one of those -arguments is selected as the @dfn{target}. For example, if +to the corresponding I/O primitive. Depending on the primitive, one +of those arguments is selected as the @dfn{target}. For example, if @var{operation} does file I/O, whichever argument specifies the file name is the target. For subprocess primitives, the process name is the target. For @code{open-network-stream}, the target is the service name @@ -1115,15 +1115,20 @@ or port number. Depending on @var{operation}, this function looks up the target in @code{file-coding-system-alist}, @code{process-coding-system-alist}, -or @code{network-coding-system-alist}. +or @code{network-coding-system-alist}. If the target is found in the +alist, @code{find-operation-coding-system} returns its association in +the alist; otherwise it returns @code{nil}. If @var{operation} is @code{insert-file-contents}, the argument corresponding to the target may be a cons cell of the form @code{(@var{filename} . @var{buffer})}). In that case, @var{filename} -is a file name to look up, and @var{buffer} is a buffer that already -contains the file's contents (not yet decoded). Functions specified -in @code{file-coding-system-alist} must pay attention to this format -of the target. +is a file name to look up in @code{file-coding-system-alist}, and +@var{buffer} is a buffer will contain the file's contents (not yet +decoded). If the file's association in +@code{file-coding-system-alist} specifies a function to call, and that +function needs to examine the file's contents (as it usually does), it +should examine the contents of @var{buffer} instead of reading the +file. @end defun @node Specifying Coding Systems From a952cebe16c99c28c403758663de026b1a61cfeb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 May 2006 21:44:59 +0000 Subject: [PATCH 186/403] (Ffind_operation_coding_system): Doc fix. --- src/ChangeLog | 4 ++++ src/coding.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3aa41c16c73..14a46748955 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-30 Eli Zaretskii + + * coding.c (Ffind_operation_coding_system): Doc fix. + 2006-05-29 YAMAMOTO Mitsuharu * macfns.c [USE_MAC_FONT_PANEL] (Fmac_set_font_panel_visibility): diff --git a/src/coding.c b/src/coding.c index 03c07c3ba68..0809e2331ad 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7471,9 +7471,10 @@ which is a list of all the arguments given to this function. If OPERATION is `insert-file-contents', the argument corresponding to TARGET may be a cons (FILENAME . BUFFER). In that case, FILENAME is a -file name to look up, and BUFFER is a buffer that already contains the -file (but not yet decoded). If a function is found as above, the -function must pay attention to this format of TARGET. +file name to look up, and BUFFER is a buffer that will contain the +file (not yet decoded). If `file-coding-system-alist' specifies a +function to call for FILENAME, that function should examine the +contents of BUFFER instead of reading the file. usage: (find-operation-coding-system OPERATION ARGUMENTS ...) */) (nargs, args) From 73af07164d9081578b92f1df49bce4d817ecb20a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 29 May 2006 21:52:01 +0000 Subject: [PATCH 187/403] *** empty log message *** --- src/ChangeLog | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 14a46748955..0a59e1f8141 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,8 @@ -2006-05-30 Eli Zaretskii +2006-05-29 Kim F. Storm + + * w32term.c (x_draw_stretch_glyph_string): Fix last change. + +2006-05-29 Eli Zaretskii * coding.c (Ffind_operation_coding_system): Doc fix. From 5e6b6dcd59c4158cc286788f820afc727380a7cf Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 29 May 2006 21:52:16 +0000 Subject: [PATCH 188/403] (x_draw_stretch_glyph_string): Fix last change. --- src/w32term.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/w32term.c b/src/w32term.c index 1b2b5a30503..c8fad461668 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -2451,6 +2451,7 @@ x_draw_stretch_glyph_string (s) } if (background_width > 0) x_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); + } s->background_filled_p = 1; } From b756209da5c6b47570f8fadf45aaf2d8b8a11208 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 May 2006 22:03:01 +0000 Subject: [PATCH 189/403] (x_draw_hollow_cursor): Fix last change. --- src/w32term.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/w32term.c b/src/w32term.c index c8fad461668..c55a4cc715c 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -4950,7 +4950,7 @@ x_draw_hollow_cursor (w, row) struct frame *f = XFRAME (WINDOW_FRAME (w)); HDC hdc; RECT rect; - int h; + int left, top, h; struct glyph *cursor_glyph; HBRUSH hb = CreateSolidBrush (f->output_data.w32->cursor_pixel); @@ -4961,7 +4961,9 @@ x_draw_hollow_cursor (w, row) return; /* Compute frame-relative coordinates for phys cursor. */ - get_phys_cursor_geometry (w, row, cursor_glyph, &rect.left, &rect.top, &h); + get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h); + rect.left = left; + rect.top = top; rect.bottom = rect.top + h; rect.right = rect.left + w->phys_cursor_width; From 7c42b3e000415a7a7ceef7ce57410d24be60b7c1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 May 2006 22:03:35 +0000 Subject: [PATCH 190/403] *** empty log message *** --- lispref/ChangeLog | 4 ++++ src/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 44c4611def7..34506fdec7b 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2006-05-30 Eli Zaretskii + + * nonascii.texi (Default Coding Systems): Fix it some more. + 2006-05-29 Eli Zaretskii * nonascii.texi (Default Coding Systems): Fix last change. diff --git a/src/ChangeLog b/src/ChangeLog index 0a59e1f8141..e81ed86f5ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-30 Eli Zaretskii + + * w32term.c (x_draw_hollow_cursor): Fix last change. + 2006-05-29 Kim F. Storm * w32term.c (x_draw_stretch_glyph_string): Fix last change. From 93fd6289fe1bbd8320d32fd162e9feb3f681e3f6 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 29 May 2006 22:23:38 +0000 Subject: [PATCH 191/403] *** empty log message *** --- lispref/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 34506fdec7b..328148cde18 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,10 @@ +2006-05-29 Luc Teirlinck + + * internals.texi (Pure Storage): Mention that an overflow in pure + space causes a memory leak. + (Garbage Collection): If there was an overflow in pure space, + `garbage-collect' returns nil. + 2006-05-30 Eli Zaretskii * nonascii.texi (Default Coding Systems): Fix it some more. From 361ed4fdba1a8b8ee47b7bd473161098942f0199 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Mon, 29 May 2006 22:26:25 +0000 Subject: [PATCH 192/403] (Pure Storage): Mention that an overflow in pure space causes a memory leak. (Garbage Collection): If there was an overflow in pure space, `garbage-collect' returns nil. --- lispref/internals.texi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lispref/internals.texi b/lispref/internals.texi index bc35e215574..fa96687d1d8 100644 --- a/lispref/internals.texi +++ b/lispref/internals.texi @@ -160,7 +160,8 @@ the preloaded libraries, @file{temacs} allocates dynamic memory for the part that didn't fit. If that happens, you should increase the compilation parameter @code{PURESIZE} in the file @file{src/puresize.h} and rebuild Emacs, even though the resulting -image will work. Such an overflow normally won't happen unless you +image will work: garbage collection is disabled in this situation, +causing a memory leak. Such an overflow normally won't happen unless you try to preload additional libraries or add features to the standard ones. Emacs will display a warning about the overflow when it starts. @@ -348,6 +349,10 @@ operating system, but which are currently not in use. (A string object consists of a header and the storage for the string text itself; the latter is only allocated when the string is created.) @end table + +If there was overflow in pure space (see the previous section), +@code{garbage-collect} returns @code{nil}, because a real garbage +collection can not be done in this situation. @end deffn @defopt garbage-collection-messages From 39be728a88a93ae2b0a8ded953aa074fa0cf556d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 May 2006 01:19:09 +0000 Subject: [PATCH 193/403] (with-current-buffer): Doc fix. --- lisp/ChangeLog | 6 +++++- lisp/subr.el | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9f850eeb3ab..9e1eb780f2d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,10 @@ +2006-05-29 Richard Stallman + + * subr.el (with-current-buffer): Doc fix. + 2006-05-29 Jan Dj,Ad(Brv - * term/x-win.el: bind F10 to menu-bar-start if available. + * term/x-win.el: Bind F10 to menu-bar-start if available. 2006-05-28 Dan Nicolaescu diff --git a/lisp/subr.el b/lisp/subr.el index 90f1db78de1..993dae04181 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2203,6 +2203,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again." (defmacro with-current-buffer (buffer &rest body) "Execute the forms in BODY with BUFFER as the current buffer. +BUFFER can be a buffer or a buffer name. The value returned is the value of the last form in BODY. See also `with-temp-buffer'." (declare (indent 1) (debug t)) From 90e357ae457e40c8a4c7534deab619ee317f3bf1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 May 2006 02:35:56 +0000 Subject: [PATCH 194/403] (temp-buffer-max-height): Doc fix. --- lisp/ChangeLog | 2 ++ lisp/help.el | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e1eb780f2d..0cb2920ddea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2006-05-29 Richard Stallman + * help.el (temp-buffer-max-height): Doc fix. + * subr.el (with-current-buffer): Doc fix. 2006-05-29 Jan Dj,Ad(Brv diff --git a/lisp/help.el b/lisp/help.el index 1661779ca74..5efd58dfaf5 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -942,11 +942,11 @@ is currently activated with completion." (defcustom temp-buffer-max-height (lambda (buffer) (/ (- (frame-height) 2) 2)) "Maximum height of a window displaying a temporary buffer. -This is the maximum height (in text lines) which `resize-temp-buffer-window' +This is effective only when Temp Buffer Resize mode is enabled. +The value is the maximum height (in lines) which `resize-temp-buffer-window' will give to a window displaying a temporary buffer. -It can also be a function which will be called with the object corresponding -to the buffer to be displayed as argument and should return an integer -positive number." +It can also be a function to be called to choose the height for such a buffer. +It gets one argumemt, the buffer, and should return a positive integer." :type '(choice integer function) :group 'help :version "20.4") From 749eecf52710ddefecfd07ab7e730fcc0132a8c0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 May 2006 04:31:02 +0000 Subject: [PATCH 195/403] (Default Coding Systems): Further clarification. --- lispref/nonascii.texi | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index f36cda3b7b5..2224fdbd436 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi @@ -1123,12 +1123,11 @@ If @var{operation} is @code{insert-file-contents}, the argument corresponding to the target may be a cons cell of the form @code{(@var{filename} . @var{buffer})}). In that case, @var{filename} is a file name to look up in @code{file-coding-system-alist}, and -@var{buffer} is a buffer will contain the file's contents (not yet -decoded). If the file's association in -@code{file-coding-system-alist} specifies a function to call, and that -function needs to examine the file's contents (as it usually does), it -should examine the contents of @var{buffer} instead of reading the -file. +@var{buffer} is a buffer that contains the file's contents (not yet +decoded). If @code{file-coding-system-alist} specifies a function to +call for this file, and that function needs to examine the file's +contents (as it usually does), it should examine the contents of +@var{buffer} instead of reading the file. @end defun @node Specifying Coding Systems From 1cce8267f8efd17dfe231aacc53c0873f0c5233d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 May 2006 04:32:09 +0000 Subject: [PATCH 196/403] (fit-window-to-buffer): Doc fix. --- lisp/window.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/window.el b/lisp/window.el index 4d02390be16..ef9dd5d896d 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -597,7 +597,7 @@ in some window." (1+ (vertical-motion (buffer-size) window)))))) (defun fit-window-to-buffer (&optional window max-height min-height) - "Make WINDOW the right size to display its contents exactly. + "Make WINDOW the right height to display its contents exactly. If WINDOW is omitted or nil, it defaults to the selected window. If the optional argument MAX-HEIGHT is supplied, it is the maximum height the window is allowed to be, defaulting to the frame height. From 74b08af9468504c1f38217cc488bfa8d3270bd93 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 May 2006 04:33:21 +0000 Subject: [PATCH 197/403] (Ffind_operation_coding_system): Doc fix. --- src/coding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coding.c b/src/coding.c index 0809e2331ad..be39ceb7fe6 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7471,8 +7471,8 @@ which is a list of all the arguments given to this function. If OPERATION is `insert-file-contents', the argument corresponding to TARGET may be a cons (FILENAME . BUFFER). In that case, FILENAME is a -file name to look up, and BUFFER is a buffer that will contain the -file (not yet decoded). If `file-coding-system-alist' specifies a +file name to look up, and BUFFER is a buffer that contains the file's +contents (not yet decoded). If `file-coding-system-alist' specifies a function to call for FILENAME, that function should examine the contents of BUFFER instead of reading the file. From d9e8091dfa4215a0a719f42f262b01209985ae42 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 30 May 2006 04:33:52 +0000 Subject: [PATCH 198/403] *** empty log message *** --- lispref/ChangeLog | 4 ++++ src/ChangeLog | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 328148cde18..89f3f749696 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2006-05-30 Richard Stallman + + * nonascii.texi (Default Coding Systems): Further clarification. + 2006-05-29 Luc Teirlinck * internals.texi (Pure Storage): Mention that an overflow in pure diff --git a/src/ChangeLog b/src/ChangeLog index e81ed86f5ca..fbded7773e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-30 Richard Stallman + + * coding.c (Ffind_operation_coding_system): Doc fix. + 2006-05-30 Eli Zaretskii * w32term.c (x_draw_hollow_cursor): Fix last change. From 8088bb2ca517e6c7942550f96714e84a692589f2 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Tue, 30 May 2006 06:59:56 +0000 Subject: [PATCH 199/403] (auto-mode-alist): Add makepp suffix and optional mk on Makeppfile. --- lisp/files.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 9f15e35e987..b4bc8f9ffec 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1847,13 +1847,14 @@ in that case, this function acts as if `enable-local-variables' were t." ("\\.ad[bs].dg\\'" . ada-mode) ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) ("Imakefile\\'" . makefile-imake-mode) + ("Makeppfile\\(?:\\.mk\\)?\\'" . makefile-makepp-mode) ; Put this before .mk + ("\\.makepp\\'" . makefile-makepp-mode) ,@(if (memq system-type '(berkeley-unix next-mach darwin)) '(("\\.mk\\'" . makefile-bsdmake-mode) ("GNUmakefile\\'" . makefile-gmake-mode) ("[Mm]akefile\\'" . makefile-bsdmake-mode)) '(("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give Gnu the host advantage ("[Mm]akefile\\'" . makefile-gmake-mode))) - ("Makeppfile\\'" . makefile-makepp-mode) ("\\.am\\'" . makefile-automake-mode) ;; Less common extensions come here ;; so more common ones above are found faster. From d14fd70ce977c14229ffc2d4945942f3ef00ce52 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Tue, 30 May 2006 07:02:00 +0000 Subject: [PATCH 200/403] (compilation-error-regexp-alist-alist): Add makepp diagnostic. --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/compile.el | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0cb2920ddea..7568cacaea0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2006-05-30 Daniel Pfeiffer + + * files.el (auto-mode-alist): Add makepp suffix and optional mk on + Makeppfile. + + * progmodes/compile.el (compilation-error-regexp-alist-alist): Add + makepp diagnostic. + 2006-05-29 Richard Stallman * help.el (temp-buffer-max-height): Doc fix. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 527624bfc4e..799f108146f 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -228,7 +228,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ \\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?:\ \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\ - *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\)\\)?" + *\\([Ii]nfo\\(?:\\>\\|rmationa?l?\\)\\|I:\\|instantiated from\\)\\)?" 1 (2 . 5) (4 . 6) (7 . 8)) (lcc @@ -236,7 +236,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) 2 3 4 (1)) (makepp - "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\) \\|.*?\\)\ + "^makepp: \\(?:\\(?:warning\\(:\\).*?\\|\\(Scanning\\|[LR]e?l?oading makefile\\|Imported\\) \\|.*?\\)\ `\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]\\)" 4 5 nil (1 . 2) 3 ("`\\(\\(\\S +?\\)\\(?::\\([0-9]+\\)\\)?\\)['(]" nil nil From 1b7519892e45a5ebfea1f531ce50b45b655f6c4f Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 30 May 2006 08:06:01 +0000 Subject: [PATCH 201/403] *** empty log message *** --- lisp/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7568cacaea0..c327d42a697 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2006-05-30 Nick Roberts + + * progmodes/gdb-ui.el: Move gdb-mouse-toggle-breakpoint-* to + C-mouse-1. Move gdb-mouse-until to mouse-3, gdb-mouse-jump + to C-mouse-3 (for 2 button mice). + (gdb-send): Do the right thing for C-d. + + * speedbar.el (speedbar-detach): Delete. + (speedbar-easymenu-definition-trailer): Remove speedbar-detach as + it breaks things. + (speedbar-reconfigure-keymaps): Always add extra items to pop up + menu. + 2006-05-30 Daniel Pfeiffer * files.el (auto-mode-alist): Add makepp suffix and optional mk on From 8a464f1b547fc86a236bc386722d003e847b3257 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 30 May 2006 08:07:44 +0000 Subject: [PATCH 202/403] Move gdb-mouse-toggle-breakpoint-* to C-mouse-1. Move gdb-mouse-until to mouse-3, gdb-mouse-jump to C-mouse-3 (for 2 button mice). (gdb-send): Do the right thing for C-d. --- lisp/progmodes/gdb-ui.el | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index f5d08d533fd..3e21c5b3341 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -71,11 +71,11 @@ ;;; Known Bugs: ;; 1) Strings that are watched don't update in the speedbar when their -;; contents change unless the first character changes. +;; contents change unless the first character changes. ;; 2) Cannot handle multiple debug sessions. -;; 3) Initially, the assembler buffer does not display the cursor at the -;; current line if the line is not visible in the window (but when testing -;; gdb-assembler-custom with a lisp debugger it does!). +;; 3) M-x gdb doesn't work with "run" command in .gdbinit, use M-x gdba instead. +;; 4) M-x gdb doesn't work if the corefile is specified in the command in the +;; minibuffer, use M-x gdba instead (or specify the core in the GUD buffer). ;;; Problems with watch expressions, GDB/MI: ;; 1) They go out of scope when the inferior is re-run. @@ -83,15 +83,10 @@ ;; 3) VARNUM increments even when variable object is not created ;; (maybe trivial). -;; Known Bugs: -;; 1) M-x gdb doesn't work with "run" command in .gdbinit, use M-x gdba instead. - ;;; TODO: ;; 1) Use MI command -data-read-memory for memory window. ;; 2) Use tree-widget.el instead of the speedbar for watch-expressions? ;; 3) Mark breakpoint locations on scroll-bar of source buffer? -;; 4) With gud-print and gud-pstar, print the variable name in the GUD -;; buffer instead of the value's history number. ;;; Code: @@ -493,26 +488,28 @@ With arg, use separate IO iff arg is positive." 'gdb-mouse-set-clear-breakpoint) (define-key gud-minor-mode-map [left-fringe mouse-1] 'gdb-mouse-set-clear-breakpoint) - (define-key gud-minor-mode-map [left-fringe mouse-2] - 'gdb-mouse-until) + (define-key gud-minor-mode-map [left-margin C-mouse-1] + 'gdb-mouse-toggle-breakpoint-margin) + (define-key gud-minor-mode-map [left-fringe C-mouse-1] + 'gdb-mouse-toggle-breakpoint-fringe) + (define-key gud-minor-mode-map [left-margin drag-mouse-1] 'gdb-mouse-until) (define-key gud-minor-mode-map [left-fringe drag-mouse-1] 'gdb-mouse-until) - (define-key gud-minor-mode-map [left-margin mouse-2] + (define-key gud-minor-mode-map [left-margin mouse-3] 'gdb-mouse-until) + (define-key gud-minor-mode-map [left-fringe mouse-3] + 'gdb-mouse-until) + (define-key gud-minor-mode-map [left-margin C-drag-mouse-1] 'gdb-mouse-jump) (define-key gud-minor-mode-map [left-fringe C-drag-mouse-1] 'gdb-mouse-jump) - (define-key gud-minor-mode-map [left-fringe C-mouse-2] + (define-key gud-minor-mode-map [left-fringe C-mouse-3] 'gdb-mouse-jump) - (define-key gud-minor-mode-map [left-margin C-mouse-2] + (define-key gud-minor-mode-map [left-margin C-mouse-3] 'gdb-mouse-jump) - (define-key gud-minor-mode-map [left-margin mouse-3] - 'gdb-mouse-toggle-breakpoint-margin) - (define-key gud-minor-mode-map [left-fringe mouse-3] - 'gdb-mouse-toggle-breakpoint-fringe) (setq comint-input-sender 'gdb-send) @@ -738,7 +735,7 @@ With arg, enter name of variable to be watched in the minibuffer." `(lambda () (gdb-var-evaluate-expression-handler ,(car var) nil))))) (if (search-forward "Undefined command" nil t) - (message-box "Watching expressions requires gdb 6.0 onwards") + (message-box "Watching expressions requires GDB 6.0 onwards") (message-box "No symbol \"%s\" in current context." expr)))) (defun gdb-speedbar-update () @@ -1106,7 +1103,8 @@ This filter may simply queue input for a later time." (let ((item (concat string "\n"))) (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring)) (process-send-string proc item))) - (if (string-match "\\\\$" string) + (if (and (string-match "\\\\$" string) + (not comint-input-sender-no-newline)) ;;Try to catch C-d. (setq gdb-continuation (concat gdb-continuation string "\n")) (let ((item (concat gdb-continuation string "\n"))) (gdb-enqueue-input item) From 89f0e7cc360e37fa3c044333559ff98bbb338ad0 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 30 May 2006 08:10:16 +0000 Subject: [PATCH 203/403] *** empty log message *** --- lisp/ChangeLog | 2 ++ lisp/speedbar.el | 24 ++---------------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c327d42a697..901e98c838a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2006-05-30 Nick Roberts + * progmodes/gud.el (gud-stop-subjob): Make it work in all buffers. + * progmodes/gdb-ui.el: Move gdb-mouse-toggle-breakpoint-* to C-mouse-1. Move gdb-mouse-until to mouse-3, gdb-mouse-jump to C-mouse-3 (for 2 button mice). diff --git a/lisp/speedbar.el b/lisp/speedbar.el index b3913f6f6c6..e5ab181e8c6 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -921,8 +921,6 @@ This basically creates a sparse keymap, and makes it's parent be (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) (list ["Customize..." speedbar-customize t])) (list - ["Detach" speedbar-detach (and speedbar-frame - (eq (selected-frame) speedbar-frame)) ] ["Close" dframe-close-frame t] ["Quit" delete-frame t] )) "Menu items appearing at the end of the speedbar menu.") @@ -1047,21 +1045,6 @@ supported at a time. (dframe-attached-frame speedbar-frame) speedbar-default-position)))) -(defun speedbar-detach () - "Detach the current Speedbar from auto-updating. -Doing this allows the creation of a second speedbar." - (interactive) - (let ((buffer speedbar-buffer)) - (dframe-detach 'speedbar-frame 'speedbar-cached-frame 'speedbar-buffer) - (save-excursion - (set-buffer buffer) - ;; Permanently disable auto-updating in this speedbar buffer. - (set (make-local-variable 'speedbar-update-flag) nil) - (set (make-local-variable 'speedbar-update-flag-disable) t) - ;; Make local copies of all the different variables to prevent - ;; funny stuff later... - ))) - (defsubst speedbar-current-frame () "Return the frame to use for speedbar based on current context." (dframe-current-frame 'speedbar-frame 'speedbar-mode)) @@ -1224,11 +1207,8 @@ and the existence of packages." (speedbar-initial-menu) (save-excursion (dframe-select-attached-frame speedbar-frame) - (if (local-variable-p - 'speedbar-easymenu-definition-special - (current-buffer)) - ;; If bound locally, we can use it - speedbar-easymenu-definition-special))) + (eval (nth 1 (assoc speedbar-initial-expansion-list-name + speedbar-initial-expansion-mode-alist))))) ;; Dynamic menu stuff '("-") (list (cons "Displays" From 12e7d5871366a9df9a2fdd1d555b2a38d1c29569 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 30 May 2006 08:10:49 +0000 Subject: [PATCH 204/403] (gud-stop-subjob): Make it work in all buffers. --- lisp/progmodes/gud.el | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index bbb9df4cb2c..c54d76f1d3e 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -130,10 +130,10 @@ Used to grey out relevant togolbar icons.") (defun gud-stop-subjob () (interactive) - (if (string-equal - (buffer-local-value 'gud-target-name gud-comint-buffer) "emacs") - (comint-stop-subjob) - (comint-interrupt-subjob))) + (with-current-buffer gud-comint-buffer + (if (string-equal gud-target-name "emacs") + (comint-stop-subjob) + (comint-interrupt-subjob)))) (easy-mmode-defmap gud-menu-map '(([help] "Info" . gud-goto-info) @@ -645,7 +645,8 @@ required by the caller." :inherit minibuffer-local-map) (defun gud-query-cmdline (minor-mode &optional init) - (let* ((hist-sym (gud-symbol 'history nil minor-mode)) + (let* ((comint-file-name-quote-list '(32)) + (hist-sym (gud-symbol 'history nil minor-mode)) (cmd-name (gud-val 'command-name minor-mode))) (unless (boundp hist-sym) (set hist-sym nil)) (read-from-minibuffer @@ -2537,7 +2538,16 @@ comint mode, which see." ;; for local variables in the debugger buffer. (defun gud-common-init (command-line massage-args marker-filter &optional find-file) - (let* ((words (split-string command-line)) + (let* (string + (words + ;; Do this to allow spaces in filenames. + (let (temp-words) + (dolist (word (split-string command-line "[ \f\t\n\r\v]") + (nreverse temp-words)) + (if (string-match "\\(.*?\\)\\\\$" word) + (setq string (concat string (match-string 1 word) " ")) + (push (concat string word) temp-words) + (setq string nil))))) (program (car words)) (dir default-directory) ;; Extract the file name from WORDS From fe23e770ffb2f96e38b8ada4a605832ead77328d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 30 May 2006 14:20:02 +0000 Subject: [PATCH 205/403] autoupdate --- man/texinfo.tex | 51 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/man/texinfo.tex b/man/texinfo.tex index fcddd268999..c7784bd94af 100644 --- a/man/texinfo.tex +++ b/man/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2006-05-07.15} +\def\texinfoversion{2006-05-28.17} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free @@ -1084,15 +1084,24 @@ \def\minus{$-$} % @dots{} outputs an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in a typewriter -% font as three actual period characters. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. % \def\dots{% \leavevmode - \hbox to 1.5em{% - \hskip 0pt plus 0.25fil - .\hfil.\hfil.% - \hskip 0pt plus 0.5fil + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil }% } @@ -3391,12 +3400,39 @@ \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% + % % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + % + % The above is not enough to reproduce the bug, but it gives the flavor. + % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty + % % Do the redefinitions. \commondummies } @@ -5827,7 +5863,6 @@ \spaceisspace % % Append \endinput to make sure that TeX does not see the ending newline. - % % I've verified that it is necessary both for e-TeX and for ordinary TeX % --kasal, 29nov03 \scantokens{#1\endinput}% From 57d671b4c739d73c6a762a035b1df98bde498901 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 30 May 2006 16:12:49 +0000 Subject: [PATCH 206/403] (Fmenu_bar_start): Return a value. --- src/xmenu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xmenu.c b/src/xmenu.c index 90fa1595cd9..ef9fb05fb29 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1373,6 +1373,8 @@ If FRAME is nil or not given, use the selected frame. */) } UNBLOCK_INPUT; + + return Qnil; } #endif /* USE_X_TOOLKIT */ From 303e108cbd0d07411c9129dfbfd72938ae004ee7 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 30 May 2006 16:12:59 +0000 Subject: [PATCH 207/403] . --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index fbded7773e7..20e0e7d47a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-30 Andreas Schwab + + * xmenu.c (Fmenu_bar_start): Return a value. + 2006-05-30 Richard Stallman * coding.c (Ffind_operation_coding_system): Doc fix. From c4b5acde64d984ba7b86aef8a857996205df8319 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 30 May 2006 16:29:02 +0000 Subject: [PATCH 208/403] (org-agenda-highlight-todo): Make sure regexp does only match in the right place. (org-upcoming-deadline): New face. (org-agenda-get-deadlines): Use new face `org-upcoming-deadline'. (org-export-ascii-underline): Renamed and made an option (was constant `org-ascii-underline'). (org-export-ascii-bullets): New option. (org-export-as-html): Many changes to emit valid XHTML. (org-par-open): New variable. (org-open-par, org-close-par-maybe, org-close-li-maybe): New functions. (org-html-do-expand, org-section-number): Fixedcase in `replace-match'. (org-timeline): Pass `org-timeline-show-empty-dates' to `org-get-all-dates'. Interpret empty dates returned by `org-get-all-dates'. (org-get-all-dates): New argument EMPTY. Add dates without entries to the list, mark large ranges of empty dates. (org-point-in-group, org-context): New functions. --- lisp/textmodes/org.el | 469 ++++++++++++++++++++++++++++++++---------- 1 file changed, 355 insertions(+), 114 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index dafbc92faa9..a8e23decfad 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 4.34 +;; Version: 4.35 ;; ;; This file is part of GNU Emacs. ;; @@ -90,6 +90,15 @@ ;; ;; Recent changes ;; -------------- +;; Version 4.35 +;; - HTML export is now valid XHTML. +;; - Timeline can also show dates without entries. See new option +;; `org-timeline-show-empty-dates'. +;; - The bullets created by the ASCII exporter can now be configured. +;; See the new option `org-export-ascii-bullets'. +;; - New face `org-upcoming-deadline' (was `org-scheduled-previously'). +;; - New function `org-context' to allow testing for local context. +;; ;; Version 4.34 ;; - Bug fixes. ;; @@ -156,7 +165,7 @@ ;;; Customization variables -(defvar org-version "4.34" +(defvar org-version "4.35" "The version number of the file org.el.") (defun org-version () (interactive) @@ -1430,12 +1439,6 @@ Needs to be set before org.el is loaded." :group 'org-agenda-setup :type 'boolean) -(defcustom org-select-timeline-window t - "Non-nil means, after creating a timeline, move cursor into Timeline window. -When nil, cursor will remain in the current window." - :group 'org-agenda-setup - :type 'boolean) - (defcustom org-select-agenda-window t "Non-nil means, after creating an agenda, move cursor into Agenda window. When nil, cursor will remain in the current window." @@ -1616,11 +1619,6 @@ See also the variables `org-agenda-remove-times-when-in-prefix' and :type 'string :group 'org-agenda-prefix) -(defcustom org-timeline-prefix-format " % s" - "Like `org-agenda-prefix-format', but for the timeline of a single file." - :type 'string - :group 'org-agenda-prefix) - (defvar org-prefix-format-compiled nil "The compiled version of the most recently used prefix format. Depending on which command was used last, this may be the compiled version @@ -1654,6 +1652,34 @@ When this is the symbol `prefix', only remove tags when (const :tag "Never" nil) (const :tag "When prefix format contains %T" prefix))) +(defgroup org-agenda-timeline nil + "Options concerning the timeline buffer in Org Mode." + :tag "Org Agenda Timeline" + :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-timeline) + +(defcustom org-select-timeline-window t + "Non-nil means, after creating a timeline, move cursor into Timeline window. +When nil, cursor will remain in the current window." + :group 'org-agenda-timeline + :type 'boolean) + +(defcustom org-timeline-show-empty-dates 3 + "Non-nil means, `org-timeline' also shows dates without an entry. +When nil, only the days which actually have entries are shown. +When t, all days between the first and the last date are shown. +When an integer, show also empty dates, but if there is a gap of more than +N days, just insert a special line indicating the size of the gap." + :group 'org-agenda-timeline + :type '(choice + (const :tag "None" nil) + (const :tag "All" t) + (number :tag "at most"))) + (defgroup org-export nil "Options for exporting org-listings." :tag "Org Export" @@ -1890,6 +1916,22 @@ much faster." :tag "Org Export ASCII" :group 'org-export) +(defcustom org-export-ascii-underline '(?\$ ?\# ?^ ?\~ ?\= ?\-) + "Characters for underlining headings in ASCII export. +In the given sequence, these characters will be used for level 1, 2, ..." + :group 'org-export-ascii + :type '(repeat character)) + +(defcustom org-export-ascii-bullets '(?* ?o ?-) + "Bullet characters for headlines converted to lists in ASCII export. +The first character is is used for the first lest level generated in this +way, and so on. If there are more levels than characters given here, +the list will be repeated. +Note that plain lists will keep the same bullets as the have in the +Org-mode file." + :group 'org-export-ascii + :type '(repeat character)) + (defcustom org-export-ascii-show-new-buffer t "Non-nil means, popup buffer containing the exported ASCII text. Otherwise the buffer will just be saved to a file and stay hidden." @@ -1997,7 +2039,7 @@ This option can also be set with the +OPTIONS line, e.g. \"@:nil\"." :type 'boolean) (defcustom org-export-html-table-tag - "" + "
        " "The HTML tag used to start a table. This must be a
        tag, but you may change the options like borders and spacing." @@ -2011,8 +2053,9 @@ to a file." :group 'org-export-html :type 'boolean) +;; FIXME:

        is not pretty. (defcustom org-export-html-html-helper-timestamp - "


        \n" + "


        \n" "The HTML tag used as timestamp delimiter for HTML-helper-mode." :group 'org-export-html :type 'string) @@ -2304,6 +2347,16 @@ This face is only used if `org-fontify-done-headline' is set." "Face for items scheduled previously, and not yet done." :group 'org-faces) +(defface org-upcoming-deadline + (org-compatible-face + '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) + (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) + (((class color) (min-colors 8) (background light)) (:foreground "red")) + (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t)) + (t (:bold t)))) + "Face for items scheduled previously, and not yet done." + :group 'org-faces) + (defface org-time-grid ;; font-lock-variable-name-face (org-compatible-face '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) @@ -2347,6 +2400,10 @@ This face is only used if `org-fontify-done-headline' is set." (defvar org-todo-line-regexp nil "Matches a headline and puts TODO state into group 2 if present.") (make-variable-buffer-local 'org-todo-line-regexp) +(defvar org-todo-line-tags-regexp nil + "Matches a headline and puts TODO state into group 2 if present. +Also put tags into group 4 if tags are present.") +(make-variable-buffer-local 'org-todo-line-tags-regexp) (defvar org-nl-done-regexp nil "Matches newline followed by a headline with the DONE keyword.") (make-variable-buffer-local 'org-nl-done-regexp) @@ -2499,6 +2556,10 @@ This face is only used if `org-fontify-done-headline' is set." "\\)? *\\(.*\\)") org-nl-done-regexp (concat "[\r\n]\\*+[ \t]+" org-done-string "\\>") + org-todo-line-tags-regexp + (concat "^\\(\\*+\\)[ \t]*\\(" + (mapconcat 'regexp-quote org-todo-keywords "\\|") + "\\)? *\\(.*?\\([ \t]:[a-zA-Z0-9:_@]+:[ \t]*\\)?$\\)") org-looking-at-done-regexp (concat "^" org-done-string "\\>") org-deadline-regexp (concat "\\<" org-deadline-string) org-deadline-time-regexp @@ -5565,12 +5626,13 @@ dates." (beg (if (org-region-active-p) (region-beginning) (point-min))) (end (if (org-region-active-p) (region-end) (point-max))) (day-numbers (org-get-all-dates beg end 'no-ranges - t doclosed)) ; always include today + t doclosed ; always include today + org-timeline-show-empty-dates)) (today (time-to-days (current-time))) (org-respect-restriction t) (past t) args - s e rtn d) + s e rtn d emptyp) (setq org-agenda-redo-command (list 'progn (list 'switch-to-buffer-other-window (current-buffer)) @@ -5590,28 +5652,35 @@ dates." (push :timestamp args) (if dotodo (push :todo args)) (while (setq d (pop day-numbers)) - (if (and (>= d today) - dopast - past) + (if (and (listp d) (eq (car d) :omitted)) (progn - (setq past nil) - (insert (make-string 79 ?-) "\n"))) - (setq date (calendar-gregorian-from-absolute d)) - (setq s (point)) - (setq rtn (apply 'org-agenda-get-day-entries - entry date args)) - (if (or rtn (equal d today)) - (progn - (insert (calendar-day-name date) " " - (number-to-string (extract-calendar-day date)) " " - (calendar-month-name (extract-calendar-month date)) " " - (number-to-string (extract-calendar-year date)) "\n") - (put-text-property s (1- (point)) 'face - 'org-level-3) - (if (equal d today) - (put-text-property s (1- (point)) 'org-today t)) - (insert (org-finalize-agenda-entries rtn) "\n") - (put-text-property s (1- (point)) 'day d)))) + (setq s (point)) + (insert (format "\n[... %d empty days omitted]\n\n" (cdr d))) + (put-text-property s (1- (point)) 'face 'org-level-3)) + (if (listp d) (setq d (car d) emptyp t) (setq emptyp nil)) + (if (and (>= d today) + dopast + past) + (progn + (setq past nil) + (insert (make-string 79 ?-) "\n"))) + (setq date (calendar-gregorian-from-absolute d)) + (setq s (point)) + (setq rtn (and (not emptyp) + (apply 'org-agenda-get-day-entries + entry date args))) + (if (or rtn (equal d today) org-timeline-show-empty-dates) + (progn + (insert (calendar-day-name date) " " + (number-to-string (extract-calendar-day date)) " " + (calendar-month-name (extract-calendar-month date)) " " + (number-to-string (extract-calendar-year date)) "\n") + (put-text-property s (1- (point)) 'face + 'org-level-3) + (if (equal d today) + (put-text-property s (1- (point)) 'org-today t)) + (and rtn (insert (org-finalize-agenda-entries rtn) "\n")) + (put-text-property s (1- (point)) 'day d))))) (goto-char (point-min)) (setq buffer-read-only t) (goto-char (or (text-property-any (point-min) (point-max) 'org-today t) @@ -6174,14 +6243,15 @@ Optional argument FILE means, use this file instead of the current." (defun org-file-menu-entry (file) (vector file (list 'find-file file) t)) -(defun org-get-all-dates (beg end &optional no-ranges force-today inactive) +(defun org-get-all-dates (beg end &optional no-ranges force-today inactive empty) "Return a list of all relevant day numbers from BEG to END buffer positions. If NO-RANGES is non-nil, include only the start and end dates of a range, not every single day in the range. If FORCE-TODAY is non-nil, make sure that TODAY is included in the list. If INACTIVE is non-nil, also -inactive time stamps (those in square brackets) are included." +inactive time stamps (those in square brackets) are included. +When EMPTY is non-nil, also include days without any entries." (let ((re (if inactive org-ts-regexp-both org-ts-regexp)) - dates date day day1 day2 ts1 ts2) + dates dates1 date day day1 day2 ts1 ts2) (if force-today (setq dates (list (time-to-days (current-time))))) (save-excursion @@ -6199,7 +6269,19 @@ inactive time stamps (those in square brackets) are included." day2 (time-to-days (org-time-string-to-time ts2))) (while (< (setq day1 (1+ day1)) day2) (or (memq day1 dates) (push day1 dates))))) - (sort dates '<)))) + (setq dates (sort dates '<)) + (when empty + (while (setq day (pop dates)) + (setq day2 (car dates)) + (push day dates1) + (when (and day2 empty) + (if (or (eq empty t) + (and (numberp empty) (<= (- day2 day) empty))) + (while (< (setq day (1+ day)) day2) + (push (list day) dates1)) + (push (cons :omitted (- day2 day)) dates1)))) + (setq dates (nreverse dates1))) + dates))) ;;;###autoload (defun org-diary (&rest args) @@ -6544,7 +6626,7 @@ the documentation of `org-diary'." (todayp (equal date (calendar-current-date))) ; DATE bound by calendar (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar d2 diff pos pos1 category tags - ee txt head) + ee txt head face) (goto-char (point-min)) (while (re-search-forward regexp nil t) (setq pos (1- (match-beginning 1)) @@ -6571,20 +6653,16 @@ the documentation of `org-diary'." (setq txt (org-format-agenda-item (format "In %3d d.: " diff) head category tags)))) (setq txt org-agenda-no-heading-message)) - (when txt + (when txt + (setq face (cond ((<= diff 0) 'org-warning) + ((<= diff 5) 'org-upcoming-deadline) + (t nil))) (org-add-props txt props 'org-marker (org-agenda-new-marker pos) 'org-hd-marker (org-agenda-new-marker pos1) 'priority (+ (- 10 diff) (org-get-priority txt)) 'category category - 'face (cond ((<= diff 0) 'org-warning) - ((<= diff 5) 'org-scheduled-previously) - (t nil)) - 'undone-face (cond - ((<= diff 0) 'org-warning) - ((<= diff 5) 'org-scheduled-previously) - (t nil)) - 'done-face 'org-done) + 'face face 'undone-face face 'done-face 'org-done) (push txt ee))))) ee)) @@ -6886,7 +6964,7 @@ HH:MM." (mapconcat 'identity (sort list 'org-entries-lessp) "\n")) (defun org-agenda-highlight-todo (x) - (let (re) + (let (re pl) (if (eq x 'line) (save-excursion (beginning-of-line 1) @@ -6895,8 +6973,9 @@ HH:MM." (and (looking-at (concat "[ \t]*" re)) (add-text-properties (match-beginning 0) (match-end 0) '(face org-todo)))) - (setq re (get-text-property 0 'org-not-done-regexp x)) - (and re (string-match re x) + (setq re (get-text-property 0 'org-not-done-regexp x) + pl (get-text-property 0 'prefix-length x)) + (and re (equal (string-match re x pl) pl) (add-text-properties (match-beginning 0) (match-end 0) '(face org-todo) x)) x))) @@ -8720,7 +8799,7 @@ For file links, arg negates `org-context-in-file-links'." ((org-region-active-p) (buffer-substring (region-beginning) (region-end))) (t (buffer-substring (point-at-bol) (point-at-eol))))) - (when (string-match "\\S-" txt) + (when (or (null txt) (string-match "\\S-" txt)) (setq cpltxt (concat cpltxt "::" (if org-file-link-context-use-camel-case @@ -11685,9 +11764,6 @@ ones and overrule settings in the other lists." ;; ASCII -(defconst org-ascii-underline '(?\$ ?\# ?^ ?\~ ?\= ?\-) - "Characters for underlining headings in ASCII export.") - (defconst org-html-entities '(("nbsp") ("iexcl") @@ -12089,6 +12165,9 @@ is signaled in this case." (if org-odd-levels-only (1+ (/ n 2)) n)) (defvar org-last-level nil) ; dynamically scoped variable +(defvar org-ascii-current-indentation nil) ; For communication +;; FIXME: change indentation???/ + (defun org-export-as-ascii (arg) "Export the outline as a pretty ASCII file. @@ -12108,6 +12187,7 @@ underlined headlines. The default is 3." (org-split-string (org-cleaned-string-for-export region) "[\r\n]")))) + (org-ascii-current-indentation "") (org-startup-with-deadline-check nil) (level 0) line txt (umax nil) @@ -12221,8 +12301,11 @@ underlined headlines. The default is 3." ;; a Headline (setq level (org-tr-level (- (match-end 1) (match-beginning 1))) txt (match-string 2 line)) - (org-ascii-level-start level txt umax)) - (t (insert line "\n")))) + (org-ascii-level-start level txt umax lines)) + (t + ;; FIXME: do we need to do something about the indention when items are + ;; converted to lists? + (insert org-ascii-current-indentation line "\n")))) (normal-mode) (save-buffer) ;; remove display and invisible chars @@ -12276,18 +12359,32 @@ underlined headlines. The default is 3." (make-string (string-width s) underline) "\n")))) -(defun org-ascii-level-start (level title umax) +(defun org-ascii-level-start (level title umax &optional lines) "Insert a new level in ASCII export." - (let (char) + (let (char (n (- level umax 1)) (ind 0)) (if (> level umax) - (insert (make-string (* 2 (- level umax 1)) ?\ ) "* " title "\n") + (progn + (insert (make-string (* 2 n) ?\ ) + (char-to-string (nth (% n (length org-export-ascii-bullets)) + org-export-ascii-bullets)) + " " title "\n") + ;; find the indentation of the next non-empty line + (catch 'stop + (while lines + (if (string-match "^\\*" (car lines)) (throw 'stop nil)) + (if (string-match "^\\([ \t]*\\)\\S-" (car lines)) + (throw 'stop (setq ind (match-end 1)))) + (pop lines))) + (setq org-ascii-current-indentation + (make-string (max (- (* 2 (1+ n)) ind) 0) ?\ ))) (if (or (not (equal (char-before) ?\n)) (not (equal (char-before (1- (point))) ?\n))) (insert "\n")) - (setq char (nth (- umax level) (reverse org-ascii-underline))) + (setq char (nth (- umax level) (reverse org-export-ascii-underline))) (if org-export-with-section-numbers (setq title (concat (org-section-number level) " " title))) - (insert title "\n" (make-string (string-width title) char) "\n")))) + (insert title "\n" (make-string (string-width title) char) "\n") + (setq org-ascii-current-indentation "")))) (defun org-export-visible (type arg) "Create a copy of the visible part of the current buffer, and export it. @@ -12572,38 +12669,35 @@ org-mode's default settings, but still inferior to file-local settings." ;; File header (insert (format - " - + " + +%s - - - - + + + + %s " - language (org-html-expand title) (or charset "iso-8859-1") + language language (org-html-expand title) (or charset "iso-8859-1") date time author style)) - + (insert (or (plist-get opt-plist :preamble) "")) (when (plist-get opt-plist :auto-preamble) - (if title (insert (concat "

        " - (org-html-expand title) "

        \n"))) -; (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) -; (if email (insert (concat "<" -; email ">\n"))) -; (if (or author email) (insert "
        \n")) -; (if (and date time) (insert (concat (nth 2 lang-words) ": " -; date " " time "
        \n"))) - (if text (insert (concat "

        \n" (org-html-expand text))))) + (if title (insert (concat "

        " + (org-html-expand title) "

        \n"))) + + (if text (insert "

        \n" (org-html-expand text) "

        "))) (if org-export-with-toc (progn - (insert (format "

        %s

        \n" (nth 3 lang-words))) - (insert "
          \n") + (insert (format "

          %s

          \n" (nth 3 lang-words))) + (insert "
            \n
          • ") (setq lines (mapcar '(lambda (line) (if (string-match org-todo-line-regexp line) @@ -12635,13 +12729,13 @@ org-mode's default settings, but still inferior to file-local settings." (progn (setq cnt (- level org-last-level)) (while (>= (setq cnt (1- cnt)) 0) - (insert "
              ")) + (insert "\n
                \n
              • ")) (insert "\n"))) (if (< level org-last-level) (progn (setq cnt (- org-last-level level)) (while (>= (setq cnt (1- cnt)) 0) - (insert "
              ")) + (insert "\n
            ")) (insert "\n"))) ;; Check for targets (while (string-match org-target-regexp line) @@ -12657,8 +12751,8 @@ org-mode's default settings, but still inferior to file-local settings." (insert (format (if todo - "
          • %s\n" - "
          • %s\n") + "
          • \n
          • %s" + "
          • \n
          • %s") head-count txt)) (setq org-last-level level)) @@ -12667,7 +12761,7 @@ org-mode's default settings, but still inferior to file-local settings." lines)) (while (> org-last-level 0) (setq org-last-level (1- org-last-level)) - (insert "
          \n")) + (insert "\n
        \n")) )) (setq head-count 0) (org-init-section-numbers) @@ -12758,7 +12852,7 @@ org-mode's default settings, but still inferior to file-local settings." (save-match-data (if (string-match "::\\(.*\\)" filename) (setq search (match-string 1 filename) - filename (replace-match "" nil nil filename))) + filename (replace-match "" t nil filename))) (setq file-is-image-p (string-match (org-image-file-name-regexp) filename)) (setq thefile (if abs-p (expand-file-name filename) filename)) @@ -12797,9 +12891,9 @@ org-mode's default settings, but still inferior to file-local settings." (if (equal (match-string 2 line) org-done-string) (setq line (replace-match "\\2" - nil nil line 2)) + t nil line 2)) (setq line (replace-match "\\2" - nil nil line 2)))) + t nil line 2)))) (cond ((string-match "^\\(\\*+\\)[ \t]*\\(.*\\)" line) @@ -12812,6 +12906,7 @@ org-mode's default settings, but still inferior to file-local settings." (when in-local-list ;; Close any local lists before inserting a new header line (while local-list-num + (org-close-li) (insert (if (car local-list-num) "\n" "")) (pop local-list-num)) (setq local-list-indent nil @@ -12838,6 +12933,7 @@ org-mode's default settings, but still inferior to file-local settings." (setq table-open nil table-buffer (nreverse table-buffer) table-orig-buffer (nreverse table-orig-buffer)) + (org-close-par-maybe) (insert (org-format-table-html table-buffer table-orig-buffer)))) (t ;; Normal lines @@ -12860,6 +12956,7 @@ org-mode's default settings, but still inferior to file-local settings." (or (and (= ind (car local-list-indent)) (not starter)) (< ind (car local-list-indent)))) + (org-close-li) (insert (if (car local-list-num) "\n" "")) (pop local-list-num) (pop local-list-indent) (setq in-local-list local-list-indent)) @@ -12868,12 +12965,14 @@ org-mode's default settings, but still inferior to file-local settings." (or (not in-local-list) (> ind (car local-list-indent)))) ;; Start new (level of ) list + (org-close-par-maybe) (insert (if start-is-num "
          \n
        1. \n" "
            \n
          • \n")) (push start-is-num local-list-num) (push ind local-list-indent) (setq in-local-list t)) (starter ;; continue current list + (org-close-li) (insert "
          • \n"))) (if (string-match "^[ \t]*\\[\\([X ]\\)\\]" line) (setq line @@ -12886,16 +12985,25 @@ org-mode's default settings, but still inferior to file-local settings." ;; Empty lines start a new paragraph. If hand-formatted lists ;; are not fully interpreted, lines starting with "-", "+", "*" ;; also start a new paragraph. - (if (string-match "^ [-+*]-\\|^[ \t]*$" line) (insert "

            ")) - (insert line (if org-export-preserve-breaks "
            \n" "\n")))) - )) + (if (string-match "^ [-+*]-\\|^[ \t]*$" line) (org-open-par)) + ;; Check if the line break needs to be conserved + ;; FIXME: document \\ at end of line. + (cond + ((string-match "\\\\\\\\[ \t]*$" line) + (setq line (replace-match "
            " t t line))) + (org-export-preserve-breaks + (setq line (concat line "
            ")))) + + (insert line "\n"))))) + ;; Properly close all local lists and other lists (when inquote (insert "\n")) (when in-local-list ;; Close any local lists before inserting a new header line (while local-list-num - (insert (if (car local-list-num) "

        \n" "")) + (org-close-li) + (insert (if (car local-list-num) "\n" "\n")) (pop local-list-num)) (setq local-list-indent nil in-local-list nil)) @@ -12904,19 +13012,30 @@ org-mode's default settings, but still inferior to file-local settings." head-count) (when (plist-get opt-plist :auto-postamble) - (insert "

        ") - (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) - (if email (insert (concat "<" - email ">\n"))) - (if (or author email) (insert "
        \n")) - (if (and date time) (insert (concat (nth 2 lang-words) ": " - date " " time "
        \n")))) + (when author + (insert "

        " + (nth 1 lang-words) ": " author "\n") + (when email + (insert "<" + email ">\n")) + (insert "

        \n")) + (when (and date time) + (insert "

        " + (nth 2 lang-words) ": " + date " " time "

        \n"))) (if org-export-html-with-timestamp (insert org-export-html-html-helper-timestamp)) (insert (or (plist-get opt-plist :postamble) "")) (insert "\n\n") (normal-mode) + ;; remove empty paragraphs and lists + (goto-char (point-min)) + (while (re-search-forward "

        [ \r\n\t]*

        " nil t) + (replace-match "")) + (goto-char (point-min)) + (while (re-search-forward "
      • [ \r\n\t]*
      • \n?" nil t) + (replace-match "")) (save-buffer) (goto-char (point-min))))) @@ -13046,7 +13165,7 @@ But it has the disadvantage, that no cell- or row-spanning is allowed." (if field-buffer (setq field-buffer (mapcar (lambda (x) - (concat x "
        " (pop fields))) + (concat x "
        " (pop fields))) field-buffer)) (setq field-buffer fields)))) (setq html (concat html "
        \n")) @@ -13090,7 +13209,7 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used." s (setq r (concat r s)) (unless (string-match "\\S-" (concat b s)) - (setq r (concat r "@
        "))) + (setq r (concat r "@
        "))) r))) (defun org-html-protect (s) @@ -13131,7 +13250,7 @@ If there are links in the string, don't modify these." (setq s (org-html-protect s)) (if org-export-html-expand (while (string-match "@<\\([^&]*\\)>" s) - (setq s (replace-match "<\\1>" nil nil s)))) + (setq s (replace-match "<\\1>" t nil s)))) (if org-export-with-emphasize (setq s (org-export-html-convert-emphasize s))) (if org-export-with-sub-superscripts @@ -13200,9 +13319,30 @@ stacked delimiters is N. Escaping delimiters is not possible." (setq string (replace-match "\\1\\3\\4" t nil string))) string) +(defvar org-par-open nil) +(defun org-open-par () + "Insert

        , but first close previous paragraph if any." + (org-close-par-maybe) + (insert "\n

        ") + (setq org-par-open t)) +(defun org-close-par-maybe () + "Close paragraph if there is one open." + (when org-par-open + (insert "

        ") + (setq org-par-open nil))) +(defun org-close-li () + "Close
      • if necessary." + (org-close-par-maybe) + (insert "
      • \n")) +; (when (save-excursion +; (re-search-backward "" nil t)) +; (if (member (match-string 0) '("
      " "" "
    • ")) +; (insert "
    • ")))) + (defun org-html-level-start (level title umax with-toc head-count) "Insert a new level in HTML export. When TITLE is nil, just close all open levels." + (org-close-par-maybe) (let ((l (1+ (max level umax)))) (while (<= l org-level-max) (if (aref levels-open (1- l)) @@ -13216,9 +13356,12 @@ When TITLE is nil, just close all open levels." (if (> level umax) (progn (if (aref levels-open (1- level)) - (insert "
    • " title "

      \n") + (progn + (org-close-li) + (insert "

    • " title "
      \n")) (aset levels-open (1- level) t) - (insert "
      • " title "

        \n"))) + (org-close-par-maybe) + (insert "

          \n
        • " title "
          \n"))) (if org-export-with-section-numbers (setq title (concat (org-section-number level) " " title))) (setq level (+ level 1)) @@ -13235,12 +13378,14 @@ When TITLE is nil, just close all open levels." "") t t title))) (if with-toc - (insert (format "\n%s\n" + (insert (format "\n%s\n" level head-count title level)) - (insert (format "\n%s\n" level title level))))))) + (insert (format "\n%s\n" level title level))) + (org-open-par))))) (defun org-html-level-close (&rest args) "Terminate one level in HTML export." + (org-close-li) (insert "
        ")) ;; Variable holding the vector with section numbers @@ -13284,9 +13429,9 @@ When LEVEL is non-nil, increase section numbers on that level." (setq idx (1+ idx))) (save-match-data (if (string-match "\\`\\([@0]\\.\\)+" string) - (setq string (replace-match "" nil nil string))) + (setq string (replace-match "" t nil string))) (if (string-match "\\(\\.0\\)+\\'" string) - (setq string (replace-match "" nil nil string)))) + (setq string (replace-match "" t nil string)))) string)) @@ -14282,6 +14427,100 @@ With optional NODE, go directly to that node." ;;; Miscellaneous stuff +(defun org-context () + "Return a list of contexts of the current cursor position. +If several contexts apply, all are returned. +Each context entry is a list with a symbol naming the context, and +two positions indicating start and end of the context. Possible +contexts are: + +:headline anywhere in a headline +:headline-stars on the leading stars in a headline +:todo-keyword on a TODO keyword (including DONE) in a headline +:tags on the TAGS in a headline +:priority on the priority cookie in a headline +:item on the first line of a plain list item +:checkbox on the checkbox in a plain list item +:table in an org-mode table +:table-special on a special filed in a table +:table-table in a table.el table +:link on a hyperline +:keyword on a keyword: SCHEDULED, DEADLINE, CLOSE,COMMENT, QUOTE. +:target on a <> +:radio-target on a <<>> + +This function expects the position to be visible because it uses font-lock +faces as a help to recognize the following contexts: :table-special, :link, +and :keyword." + (let* ((f (get-text-property (point) 'face)) + (faces (if (listp f) f (list f))) + (p (point)) clist) + ;; First the large context + (cond + ((org-on-heading-p) + (push (list :headline (point-at-bol) (point-at-eol)) clist) + (when (progn + (beginning-of-line 1) + (looking-at org-todo-line-tags-regexp)) + (push (org-point-in-group p 1 :headline-stars) clist) + (push (org-point-in-group p 2 :todo-keyword) clist) + (push (org-point-in-group p 4 :tags) clist)) + (goto-char p) + (skip-chars-backward "^[\n\r \t") (or (eobp) (backward-char 1)) + (if (looking-at "\\[#[A-Z]\\]") + (push (org-point-in-group p 0 :priority) clist))) + + ((org-at-item-p) + (push (list :item (point-at-bol) + (save-excursion (org-end-of-item) (point))) + clist) + (and (org-at-item-checkbox-p) + (push (org-point-in-group p 0 :checkbox) clist))) + + ((org-at-table-p) + (push (list :table (org-table-begin) (org-table-end)) clist) + (if (memq 'org-formula faces) + (push (list :table-special + (previous-single-property-change p 'face) + (next-single-property-change p 'face)) clist))) + ((org-at-table-p 'any) + (push (list :table-table) clist))) + (goto-char p) + + ;; Now the small context + (cond + ((org-at-timestamp-p) + (push (org-point-in-group p 0 :timestamp) clist)) + ((memq 'org-link faces) + (push (list :link + (previous-single-property-change p 'face) + (next-single-property-change p 'face)) clist)) + ((memq 'org-special-keyword faces) + (push (list :keyword + (previous-single-property-change p 'face) + (next-single-property-change p 'face)) clist)) + ((org-on-target-p) + (push (org-point-in-group p 0 :target) clist) + (goto-char (1- (match-beginning 0))) + (if (looking-at org-radio-target-regexp) + (push (org-point-in-group p 0 :radio-target) clist)) + (goto-char p))) + + (setq clist (nreverse (delq nil clist))) + clist)) + +(defun org-point-in-group (point group &optional context) + "Check if POINT is in match-group GROUP. +If CONTEXT is non-nil, return a list with CONTEXT and the boundaries of the +match. If the match group does ot exist or point is not inside it, +return nil." + (and (match-beginning group) + (>= point (match-beginning group)) + (<= point (match-end group)) + (if context + (list context (match-beginning group) (match-end group)) + t))) + (defun org-move-line-down (arg) "Move the current line down. With prefix argument, move it past ARG lines." (interactive "p") @@ -14647,5 +14886,7 @@ Show the heading too, if it is currently invisible." (run-hooks 'org-load-hook) + ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd ;;; org.el ends here + From c39d5865e95e7f1f650eb7ec2e90e926c70bdc0a Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 30 May 2006 16:31:11 +0000 Subject: [PATCH 209/403] *** empty log message *** --- lisp/ChangeLog | 21 +++++++++++++++++++++ man/ChangeLog | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 901e98c838a..675087bc16c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,24 @@ +2006-05-30 Carsten Dominik + + * textmodes/org.el: (org-agenda-highlight-todo): Make sure regexp + does only match in the right place. + (org-upcoming-deadline): New face. + (org-agenda-get-deadlines): Use new face `org-upcoming-deadline'. + (org-export-ascii-underline): Renamed and made an option + (was constant `org-ascii-underline'). + (org-export-ascii-bullets): New option. + (org-export-as-html): Many changes to emit valid XHTML. + (org-par-open): New variable. + (org-open-par, org-close-par-maybe, org-close-li-maybe): New + functions. + (org-html-do-expand, org-section-number): Fixedcase in + `replace-match'. org-timeline): Pass + `org-timeline-show-empty-dates' to `org-get-all-dates'. Interpret + empty dates returned by `org-get-all-dates'. + (org-get-all-dates): New argument EMPTY. Add dates without + entries to the list, mark large ranges of empty dates. + (org-point-in-group, org-context): New functions. + 2006-05-30 Nick Roberts * progmodes/gud.el (gud-stop-subjob): Make it work in all buffers. diff --git a/man/ChangeLog b/man/ChangeLog index 138437befb8..6f3672717a4 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-30 Carsten Dominik + + * org.texi: Small typo fixes. + 2006-05-29 Michael Albinus * tramp.texi (Frequently Asked Questions): Disable zsh zle. From 6a04ed1c2fce7d59065e36c4fc74159f8fb9fa6f Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 30 May 2006 16:31:32 +0000 Subject: [PATCH 210/403] Small typo fixes. --- man/org.texi | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/man/org.texi b/man/org.texi index 9639622bbab..2e675f320e0 100644 --- a/man/org.texi +++ b/man/org.texi @@ -2,9 +2,9 @@ @c %**start of header @setfilename ../info/org -@c @settitle Org Mode Manual +@settitle Org Mode Manual -@set VERSION 4.34 +@set VERSION 4.35 @set DATE May 2006 @dircategory Emacs @@ -1484,7 +1484,7 @@ of @samp{[[link][description]]} and @samp{link} is displayed instead of @samp{[[link]]}. Links will be highlighted in the face @code{org-link}, which by default is an underlined face. You can directly edit the visible part of a link. Note that this can be either the @samp{link} -part (if there is not description) or the @samp{description} part. To +part (if there is no description) or the @samp{description} part. To edit also the invisible @samp{link} part, use @kbd{C-c C-l} with the cursor on the link. @@ -2188,7 +2188,7 @@ dates in the agenda (@pxref{Weekly/Daily agenda}). We distinguish: @cindex timestamp A simple time stamp just assigns a date/time to an item. This is just like writing down an appointment in a paper agenda, or like writing down -an event in a diary, when you want to take not of when something +an event in a diary, when you want to take note of when something happened. In the timeline and agenda displays, the headline of an entry associated with a plain time stamp will be shown exactly on that date. @@ -2478,7 +2478,7 @@ tags, the tags of the current headline, and a list of all legal tags with corresponding keys. Pressing keys for the tags will add or remove them from the list of tags in the current line. @key{SPC} clears all tags for this line, @kbd{RET} accepts the modified set, and @kbd{C-g} -aborts without installing changes. This method lets you assing tags to +aborts without installing changes. This method lets you assign tags to a headline with very few keys. With the above setup, you could clear the current tags and set @samp{@@HOME}, @samp{Laptop} and @samp{PC} tags with just the following keys: @kbd{C-c C-c @key{SPC} h l p @key{RET}}. @@ -3140,7 +3140,7 @@ produced. @xref{Text interpretation}, for more details. @section ASCII export @cindex ASCII export -ASCII export produces an simple and very readable version of an Org-mode +ASCII export produces a simple and very readable version of an Org-mode file. @cindex region, active @@ -3175,9 +3175,9 @@ creates only top level headlines and does the rest as items. @section HTML export @cindex HTML export -Org-mode contains an HTML exporter with extensive HTML formatting, in -ways similar to John Grubers @emph{markdown} language, but with -additional support for tables. +Org-mode contains an HTML (XHTML 1.0 strict) exporter with extensive +HTML formatting, in ways similar to John Grubers @emph{markdown} +language, but with additional support for tables. @cindex region, active @cindex active region @@ -3530,18 +3530,18 @@ the two following forms: @r{or} -("project-name" - ("component1" :property value :property value ...) - ("component2" :property value :property value ...) - ...) +("project-name" :components ("project-name" "project-name" ...)) + @end lisp In both cases, projects are configured by specifying property values. A project defines the set of files that will be published, as well as -the publishing configuration to use when publishing those files. -When a project takes the second form listed above, the individual -property lists are taken to be "components" of the project, which -group together files requiring different publishing options. +the publishing configuration to use when publishing those files. When +a project takes the second form listed above, the individual members +of the ``components'' property are taken to be components of the +project, which group together files requiring different publishing +options. When you publish such a ``meta-project'' all the components +will also publish. @node File sources and destinations, Selecting files, Project alist, Configuration @subsection Sources and destinations for files @@ -3736,8 +3736,7 @@ right place on the webserver, and publishing images to it. @lisp (setq org-publish-project-alist - '(("website" - ("orgfiles" + '(("orgfiles" :base-directory "~/org/" :base-extension "org" :publishing-directory "/ssh:user@@host:~/html/notebook/" @@ -3761,7 +3760,8 @@ right place on the webserver, and publishing images to it. :base-directory "~/other/" :base-extension "css\\|el" :publishing-directory "/ssh:user@@host:~/html/other/" - :publishing-function org-publish-attachment)))) + :publishing-function org-publish-attachment) + ("website" :components ("orgfiles" "images" "other")))) @end lisp @node Triggering publication, , Sample configuration, Publishing @@ -3916,7 +3916,7 @@ current file. The corresponding variables are @code{org-todo-keywords} and @code{org-todo-interpretation}. @item #+TAGS: TAG1(c1) TAG2(c2) These lines (several such lines are allowed) specify the legal tags in -this file, and (potionally) the corresponding @emph{fast tag selection} +this file, and (potentially) the corresponding @emph{fast tag selection} keys. The corresponding variable is @code{org-tag-alist}. @item #+CATEGORY: This line sets the category for the agenda file. The category applies @@ -3925,7 +3925,7 @@ end of the file. @item #+TBLFM: This line contains the formulas for the table directly above the line. @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS: -These lines provide setting for exporting files. For more details see +These lines provide settings for exporting files. For more details see @ref{Export options}. @end table @@ -4132,7 +4132,7 @@ turn it on for all @file{README} files?} @end lisp @item @b{I would like to use editing features of org-mode in other -modes, is his possible?}@* +modes, is this possible?}@* @c Not really. For tables there is @code{orgtbl-mode} which implements the table editor as a minor mode. For other features you need to switch to @@ -4556,7 +4556,7 @@ other things. Linking to VM/BBDB/GNUS was inspired by @i{Tom Shannon}'s @file{organizer-mode.el}. @item -@i{David O'Toole} wrote @file{org-publish.el} and came up with lots is +@i{David O'Toole} wrote @file{org-publish.el} and came up with lots of ideas for small changes. @item @i{J@"urgen Vollmer} contributed code generating the table of contents From f4eb5e10576c10a6a6b80f0ed9bc49ed47f3bcc4 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 30 May 2006 16:32:09 +0000 Subject: [PATCH 211/403] Version number change only --- etc/orgcard.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/orgcard.tex b/etc/orgcard.tex index 2b553260db4..242695a5930 100644 --- a/etc/orgcard.tex +++ b/etc/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{4.34} +\def\orgversionnumber{4.35} \def\year{2006} % %**start of header From 2809db3399d9807158abefef67677f51b825d361 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Tue, 30 May 2006 18:37:15 +0000 Subject: [PATCH 212/403] * textmodes/flyspell.el (turn-on-flyspell, turn-off-flyspell): New functions. * textmodes/text-mode.el (text-mode-hook): Use turn-on-flyspell. --- lisp/ChangeLog | 7 +++++++ lisp/textmodes/flyspell.el | 12 ++++++++++++ lisp/textmodes/text-mode.el | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 675087bc16c..bd2821c2a3f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2006-05-30 Reiner Steib + + * textmodes/flyspell.el (turn-on-flyspell, turn-off-flyspell): New + functions. + + * textmodes/text-mode.el (text-mode-hook): Use turn-on-flyspell. + 2006-05-30 Carsten Dominik * textmodes/org.el: (org-agenda-highlight-todo): Make sure regexp diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index c20ecef31e0..23f4756f4a7 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -486,6 +486,18 @@ in your .emacs file. (flyspell-mode-on) (flyspell-mode-off))) +;;;###autoload +(defun turn-on-flyspell () + "Unconditionally turn on Flyspell mode." + (flyspell-mode 1)) + +;;;###autoload +(defun turn-off-flyspell () + "Unconditionally turn off Flyspell mode." + (flyspell-mode -1)) + +(custom-add-option 'text-mode-hook 'turn-on-flyspell) + ;;*---------------------------------------------------------------------*/ ;;* flyspell-buffers ... */ ;;* ------------------------------------------------------------- */ diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el index a4b67057676..9263c48f18b 100644 --- a/lisp/textmodes/text-mode.el +++ b/lisp/textmodes/text-mode.el @@ -33,7 +33,7 @@ (defcustom text-mode-hook nil "Normal hook run when entering Text mode and many related modes." :type 'hook - :options '(turn-on-auto-fill flyspell-mode) + :options '(turn-on-auto-fill turn-on-flyspell) :group 'data) (defvar text-mode-variant nil From 318474dc752e9f3f90e84302116f2c28b450862a Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 30 May 2006 21:42:46 +0000 Subject: [PATCH 213/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bd2821c2a3f..1b36d520c64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-05-31 Nick Roberts + + * progmodes/gud.el (gud-query-cmdline, gud-common-init): Revert + inadvertant changes made with last commit. + 2006-05-30 Reiner Steib * textmodes/flyspell.el (turn-on-flyspell, turn-off-flyspell): New From d792d4449aa248bdc6fdb279917a07c2024cfdb1 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Tue, 30 May 2006 21:43:16 +0000 Subject: [PATCH 214/403] (gud-query-cmdline, gud-common-init): Revert inadvertant changes made with last commit. --- lisp/progmodes/gud.el | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index c54d76f1d3e..292ebdff107 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -645,8 +645,7 @@ required by the caller." :inherit minibuffer-local-map) (defun gud-query-cmdline (minor-mode &optional init) - (let* ((comint-file-name-quote-list '(32)) - (hist-sym (gud-symbol 'history nil minor-mode)) + (let* ((hist-sym (gud-symbol 'history nil minor-mode)) (cmd-name (gud-val 'command-name minor-mode))) (unless (boundp hist-sym) (set hist-sym nil)) (read-from-minibuffer @@ -2538,16 +2537,7 @@ comint mode, which see." ;; for local variables in the debugger buffer. (defun gud-common-init (command-line massage-args marker-filter &optional find-file) - (let* (string - (words - ;; Do this to allow spaces in filenames. - (let (temp-words) - (dolist (word (split-string command-line "[ \f\t\n\r\v]") - (nreverse temp-words)) - (if (string-match "\\(.*?\\)\\\\$" word) - (setq string (concat string (match-string 1 word) " ")) - (push (concat string word) temp-words) - (setq string nil))))) + (let* ((words (split-string command-line)) (program (car words)) (dir default-directory) ;; Extract the file name from WORDS From 6ac209a3f7d6a28ea4612c381ea4f63f49086f79 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 31 May 2006 00:24:26 +0000 Subject: [PATCH 215/403] (Line Height): Fix errors in description of default line height and line-height properyty. --- lispref/ChangeLog | 3 ++ lispref/display.texi | 65 ++++++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 89f3f749696..03fc486ae5a 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,5 +1,8 @@ 2006-05-30 Richard Stallman + * display.texi (Line Height): Fix errors in description of + default line height and line-height properyty. + * nonascii.texi (Default Coding Systems): Further clarification. 2006-05-29 Luc Teirlinck diff --git a/lispref/display.texi b/lispref/display.texi index 3a8b8c1b7c0..1a34b0ff785 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -1582,41 +1582,41 @@ equal to or less than the display width of @var{ellipsis}. If @cindex line height The total height of each display line consists of the height of the -contents of the line, and additional vertical line spacing below the -display row. +contents of the line, plus optional additional vertical line spacing +above or below the display line. - The height of the line contents is normally determined from the -maximum height of any character or image on that display line, -including the final newline if there is one. (A line that is -continued doesn't include a final newline.) In the most common case, -the line height equals the height of the default frame font. + The height of the line contents is the maximum height of any +character or image on that display line, including the final newline +if there is one. (A display line that is continued doesn't include a +final newline.) That is the default line height, if you do nothing to +specify a greater height. (In the most common case, this equals the +height of the default frame font.) - There are several ways to explicitly control or change the line -height, either by specifying an absolute height for the display line, -or by adding additional vertical space below one or all lines. + There are several ways to explicitly specify a larger line height, +either by specifying an absolute height for the display line, or by +specifying vertical space. However, no matter what you specify, the +actual line height can never be less than the default. @kindex line-height @r{(text property)} A newline can have a @code{line-height} text or overlay property that controls the total height of the display line ending in that newline. - If the property value is a list @code{(@var{height} @var{total})}, -then @var{height} is used as the actual property value for the -@code{line-height}, and @var{total} specifies the total displayed -height of the line, so the line spacing added below the line equals -the @var{total} height minus the actual line height. In this case, -the other ways to specify the line spacing are ignored. + If the property value is @code{t}, the newline character has no +effect on the displayed height of the line---the visible contents +alone determine the height. This is useful for tiling small images +(or image slices) without adding blank areas between the images. - If the property value is @code{t}, the displayed height of the -line is exactly what its contents demand; no line-spacing is added. -This case is useful for tiling small images or image slices without -adding blank areas between the images. + If the property value is a list of the form @code{(@var{height} +@var{total})}, that adds extra space @emph{below} the display line. +First Emacs uses @var{height} as a height spec to control extra space +@emph{above} the line; then it adds enough space @emph{below} the line +to bring the total line height up to @var{total}. In this case, the +other ways to specify the line spacing are ignored. - If the property value is not @code{t}, it is a height spec. A height -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: + Any other kind of property value is a height spec, which translates +into a number---the specified line height. There are several ways to +write a height spec; here's how each of them translates into a number: @table @code @item @var{integer} @@ -1634,11 +1634,10 @@ 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 - Thus, any valid non-@code{t} property value specifies a height in pixels, -@var{line-height}, one way or another. If the line contents' height -is less than @var{line-height}, Emacs adds extra vertical space above -the line to achieve the total height @var{line-height}. Otherwise, -@var{line-height} has no effect. + Thus, any valid height spec determines the height in pixels, one way +or another. If the line contents' height is less than that, Emacs +adds extra vertical space above the line to achieve the specified +total height. If you don't specify the @code{line-height} property, the line's height consists of the contents' height plus the line spacing. @@ -1663,9 +1662,9 @@ height. This overrides line spacings specified for the frame. @kindex line-spacing @r{(text property)} Finally, a newline can have a @code{line-spacing} text or overlay -property that controls the height of the display line ending with that -newline. The property value overrides the default frame line spacing -and the buffer local @code{line-spacing} variable. +property that overrides the default frame line spacing and the buffer +local @code{line-spacing} variable, for the display line ending in +that newline. One way or another, these mechanisms specify a Lisp value for the spacing of each line. The value is a height spec, and it translates From 3510285a5930f820d79ef381453bd75efda1105e Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Wed, 31 May 2006 02:10:40 +0000 Subject: [PATCH 216/403] typo --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index eb203dee35c..75913fc129a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -990,7 +990,7 @@ disabled by customizing the variable `use-file-dialog'. be navigated with the arrow keys (like Gtk+, Mac and W32). +++ -*** The menu bar fpr Motif/Lesstif/Lucid/Gtk+ can be navigated with keys. +*** The menu bar for Motif/Lesstif/Lucid/Gtk+ can be navigated with keys. Pressing F10 shows the first menu in the menu bar. Navigation is done with the arrow keys, select with the return key and cancel with the escape keys. From 206e215ecd2d836cf105007bbeb330c7b36980ec Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Wed, 31 May 2006 07:21:10 +0000 Subject: [PATCH 217/403] (compilation-error-regexp-alist-alist::gcov-called-line): Don't put face on `-' lines in gcov file. Suggested by Dan Nicolaescu. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/compile.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b36d520c64..31bb11e76cc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-05-31 Masatake YAMATO + + * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-called-line): + Don't put face on `-' lines in gcov file. + Suggested by Dan Nicolaescu. + 2006-05-31 Nick Roberts * progmodes/gud.el (gud-query-cmdline, gud-common-init): Revert diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 799f108146f..1649a2533ba 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -300,7 +300,7 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" "^ +\\(#####\\): +\\([0-9]+\\):.+$" nil 2 nil 2 nil (1 compilation-error-face)) (gcov-called-line - "^ +[-0-9]+: +\\([1-9]\\|[0-9]\\{2,\\}\\):.*$" nil 1 nil 0) + "^ *[0-9]+: +\\([1-9]\\|[0-9]\\{2,\\}\\):.*$" nil 1 nil 0) ) "Alist of values for `compilation-error-regexp-alist'.") From e66ca63c21de456d9f5458a1f06897402ddac3f0 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 31 May 2006 08:02:45 +0000 Subject: [PATCH 218/403] 2006-05-31 Takaaki Ota Convert all HTML tags to lower case for XHTML compatibility. --- lisp/textmodes/table.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 6c9463fe11e..dab08902769 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -6,7 +6,7 @@ ;; Keywords: wp, convenience ;; Author: Takaaki Ota ;; Created: Sat Jul 08 2000 13:28:45 (PST) -;; Revised: Sat Aug 06 2005 19:42:54 (CEST) +;; Revised: Tue May 30 2006 10:01:43 (PDT) ;; This file is part of GNU Emacs. @@ -3104,10 +3104,10 @@ CALS (DocBook DTD): (cond ((eq language 'html) (insert (format "\n" emacs-version) - (format "\n" table-html-table-attribute) + (format "
        \n" table-html-table-attribute) (if (and (stringp caption) (not (string= caption ""))) - (format " \n" caption) + (format " \n" caption) ""))) ((eq language 'latex) (insert (format "%% This LaTeX table template is generated by emacs %s\n" emacs-version) @@ -3131,7 +3131,7 @@ CALS (DocBook DTD): (with-current-buffer dest-buffer (cond ((eq language 'html) - (insert "
        %s%s
        \n")) + (insert "\n")) ((eq language 'latex) (insert "\\end{tabular}\n")) ((eq language 'cals) @@ -3152,7 +3152,7 @@ CALS (DocBook DTD): (with-current-buffer dest-buffer (cond ((eq language 'html) - (insert " \n")) + (insert " \n")) ((eq language 'cals) (insert " \n")) )) @@ -3160,7 +3160,7 @@ CALS (DocBook DTD): (with-current-buffer dest-buffer (cond ((eq language 'html) - (insert " \n")) + (insert " \n")) ((eq language 'cals) (insert " \n") (unless (/= (table-get-source-info 'current-row) table-cals-thead-rows) @@ -3207,7 +3207,7 @@ CALS (DocBook DTD): 'cell-type (if (or (<= (table-get-source-info 'current-row) table-html-th-rows) (<= (table-get-source-info 'current-column) table-html-th-columns)) - "TH" "TD")))) + "th" "td")))) (if (and table-html-cell-attribute (not (string= table-html-cell-attribute ""))) (insert " " table-html-cell-attribute)) (if (> colspan 1) (insert (format " colspan=\"%d\"" colspan))) @@ -3266,7 +3266,7 @@ CALS (DocBook DTD): (goto-char (point-min)) (while (and (re-search-forward "$" nil t) (not (eobp))) - (insert "
        ") + (insert "
        ") (forward-char 1))) (unless (and table-html-delegate-spacing-to-user-agent (progn From 360feccaf4ba7e9aa9731b25b5bdd9053067d269 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 31 May 2006 08:56:54 +0000 Subject: [PATCH 219/403] *** empty log message *** --- lisp/ChangeLog | 7 ++++++- src/ChangeLog | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31bb11e76cc..98ae42bd434 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,11 @@ +2006-05-31 Takaaki Ota + + * textmodes/table.el: Convert all HTML tags to lower case for + XHTML compatibility. + 2006-05-31 Masatake YAMATO - * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-called-line): + * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-called-line): Don't put face on `-' lines in gcov file. Suggested by Dan Nicolaescu. diff --git a/src/ChangeLog b/src/ChangeLog index 20e0e7d47a9..cca73c2d2a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-05-31 Kim F. Storm + + * process.c (select_wrapper): Add wrapper around select to work around + "incomplete backtrace" bug in gdb 5.3, when emacs is stopped inside + select called from wait_reading_process_output. + 2006-05-30 Andreas Schwab * xmenu.c (Fmenu_bar_start): Return a value. From e1e541bdf1fa6ebe4b8b3b866a8773b9339800be Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 31 May 2006 08:58:02 +0000 Subject: [PATCH 220/403] (select_wrapper): Add wrapper around select to work around "incomplete backtrace" bug in gdb 5.3, when emacs is stopped inside select called from wait_reading_process_output. --- src/process.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/process.c b/src/process.c index cfc39235c9a..3366a3f1006 100644 --- a/src/process.c +++ b/src/process.c @@ -4135,6 +4135,25 @@ wait_reading_process_output_1 () { } +/* Use a wrapper around select to work around a bug in gdb 5.3. + Normally, the wrapper is optimzed away by inlining. + + If emacs is stopped inside select, the gdb backtrace doesn't + show the function which called select, so it is practically + impossible to step through wait_reading_process_output. */ + +#ifndef select +static INLINE int +select_wrapper (n, rfd, wfd, xfd, tmo) + int n; + SELECT_TYPE *rfd, *wfd, *xfd; + EMACS_TIME *tmo; +{ + return select (n, rfd, wfd, xfd, tmo); +} +#define select select_wrapper +#endif + /* Read and dispose of subprocess output while waiting for timeout to elapse and/or keyboard input to be available. From b9d6735c82f7493aba18d2bf24d01c912c04a3eb Mon Sep 17 00:00:00 2001 From: David Ponce Date: Wed, 31 May 2006 11:02:24 +0000 Subject: [PATCH 221/403] Reduce the size of images. --- etc/ChangeLog | 13 ++ etc/tree-widget/default/close.png | Bin 999 -> 300 bytes etc/tree-widget/default/close.xpm | 315 +++---------------------- etc/tree-widget/default/empty.png | Bin 999 -> 298 bytes etc/tree-widget/default/empty.xpm | 315 +++---------------------- etc/tree-widget/default/end-guide.png | Bin 913 -> 181 bytes etc/tree-widget/default/end-guide.xpm | 308 ++---------------------- etc/tree-widget/default/guide.png | Bin 911 -> 180 bytes etc/tree-widget/default/guide.xpm | 308 ++---------------------- etc/tree-widget/default/handle.png | Bin 916 -> 180 bytes etc/tree-widget/default/handle.xpm | 308 ++---------------------- etc/tree-widget/default/leaf.png | Bin 994 -> 277 bytes etc/tree-widget/default/leaf.xpm | 315 +++---------------------- etc/tree-widget/default/no-guide.png | Bin 914 -> 170 bytes etc/tree-widget/default/no-guide.xpm | 307 ++---------------------- etc/tree-widget/default/no-handle.png | Bin 914 -> 173 bytes etc/tree-widget/default/no-handle.xpm | 307 ++---------------------- etc/tree-widget/default/open.png | Bin 1006 -> 313 bytes etc/tree-widget/default/open.xpm | 317 +++---------------------- etc/tree-widget/folder/close.png | Bin 981 -> 298 bytes etc/tree-widget/folder/close.xpm | 323 ++++---------------------- etc/tree-widget/folder/empty.png | Bin 1008 -> 305 bytes etc/tree-widget/folder/empty.xpm | 318 +++---------------------- etc/tree-widget/folder/end-guide.png | Bin 942 -> 177 bytes etc/tree-widget/folder/end-guide.xpm | 310 +++--------------------- etc/tree-widget/folder/guide.png | Bin 940 -> 178 bytes etc/tree-widget/folder/guide.xpm | 310 +++--------------------- etc/tree-widget/folder/handle.png | Bin 915 -> 180 bytes etc/tree-widget/folder/handle.xpm | 310 +++--------------------- etc/tree-widget/folder/leaf.png | Bin 980 -> 336 bytes etc/tree-widget/folder/leaf.xpm | 317 +++---------------------- etc/tree-widget/folder/no-guide.png | Bin 934 -> 171 bytes etc/tree-widget/folder/no-guide.xpm | 309 ++---------------------- etc/tree-widget/folder/no-handle.png | Bin 942 -> 173 bytes etc/tree-widget/folder/no-handle.xpm | 309 ++---------------------- etc/tree-widget/folder/open.png | Bin 1019 -> 344 bytes etc/tree-widget/folder/open.xpm | 322 +++---------------------- 37 files changed, 538 insertions(+), 5103 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 64a1340f9f1..91882e4518d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,16 @@ +2006-05-31 David Ponce + + * tree-widget/default/close.*, tree-widget/default/empty.*: + * tree-widget/default/end-guide.*, tree-widget/default/guide.*: + * tree-widget/default/handle.*, tree-widget/default/leaf.*: + * tree-widget/default/no-guide.*, tree-widget/default/no-handle.*: + * tree-widget/default/open.*, tree-widget/folder/close.*: + * tree-widget/folder/empty.*, tree-widget/folder/end-guide.*: + * tree-widget/folder/guide.*, tree-widget/folder/handle.*: + * tree-widget/folder/leaf.*, tree-widget/folder/no-guide.*: + * tree-widget/folder/no-handle.*, tree-widget/folder/open.*: + Reduce the size of images. + 2006-05-29 Jan Dj,Ad(Brv * NEWS: Mention F10 for Gtk+/Leddtif/Lucid menus. diff --git a/etc/tree-widget/default/close.png b/etc/tree-widget/default/close.png index 0725def3deeb2c1ea44f8d4219776e26309f8e15..1c3f6083992fc4feb2b76651bebccd087eba873d 100644 GIT binary patch delta 284 zcmaFPzJ_UnWIY=L1B1U^-X$Q#mgMd3!tfsi7wla=87RV8;1OBOz`&&j!i<3{R~iEa z*-JcqUD>a(3UY9WHb1=T3>1AKI5^Dlaa^*0zsj=K* zVmuk1tN;G#Eb9m7UyB@Xmy0;Gv-?W_M2VPH^HQca+4=~DUcNKQgNKciVa3|LQ#`oL zjxnfg$=xh;^5C6!uVVgjZ~pEnq4LMz$#IEWtJnG-S~>C5K8xPR%0ISvEEFz%C-� e+P|L)qT2E+wKimW?qvtMj=|H_&t;ucLK6TvP;Gqx literal 999 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRv!3-oT9?W|H;*_{XlsFfqCYEI8=P86_=B6^R zU*?n&;$yn-z`)E9;1lB7 z!oV;^Q*(}?;T%iLrA|&uy}Z@}QBcs@sHp#=U^E1VdkE~+)Z_qW5U!FSzhJmu88)5K zIS&+d_H=O!skpUvf+Zh=0>^<@qF?{Zn*};t3EfuK!1l}ZkI(@{g`C4rW}Mkzk!s2@ uUF+BmGf|CXYn%1jeM=Y1%I3fPUeB|+m2a(3UaWkpIJA92Ph<4;u=xnoS&PUnpeW$T$GwvlA5AWo>`Ki5R#Fq;O^-g z@IFN~52&!u)5S5w;&gI?1gi+MTS?=zda<_u24%jy%WSL?4lRpxa1cIh(8Q*Y{p`Vm zgb5QisGJf|%b6u9VIctmBBFCSqz-j>8>_3U&#C?Y&umWOAr}v0c6RpWWoaUH`ZYfa zWS6J0vGKLNzCQh7zuOFRg}P(wB*Ui|DSF@AzrSDQtj5I-gB0nDvsO+La%U7}VAv_# WV$y!WTa_Q^HU>{uKbLh*2~7a|5MGl2 literal 999 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRv!3-oT9?W|H;*_{XlsFfqCYEI8=P86_=B6^R zU*?n&5>yY{CA<%)fW5@i*A*(2lzyTEEEbxddW?*a3)z4*}Q$iB}PqI52 diff --git a/etc/tree-widget/default/empty.xpm b/etc/tree-widget/default/empty.xpm index 6bb0a285dd8..8af9f2f23e1 100644 --- a/etc/tree-widget/default/empty.xpm +++ b/etc/tree-widget/default/empty.xpm @@ -1,284 +1,33 @@ /* XPM */ -static char *empty[] = { -/* width height num_colors chars_per_pixel */ -" 16 21 256 2", -/* colors */ -"`` c #848400", -"`. c #949429", -"`# c #9c9c31", -"`a c #9c9c39", -"`b c #a5a542", -"`c c #a5a54a", -"`d c #adad4a", -"`e c #adad52", -"`f c #adad5a", -"`g c None", -"`h c #ffffff", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g```````g`g`g`g`g`g`g`g`g", -"`g`g`g`````.`````g`g`g`g`g`g`g`g", -"`g`g`````.`#`a`````g`g`g`g`g`g`g", -"`g`````.`#`a`a`b`````g`g`g`g`g`g", -"`````.`#`a`a`b`c`c`````g`g`g`g`g", -"```.`#`a`a`b`c`c`e`f```g`g`g`g`g", -"`````a`a`b`c`c`e`f`````g`g`g`g`g", -"`g`````b`c`c`e`f`````g`g`g`g`g`g", -"`g`g`````c`e`f`````g`g`g`g`g`g`g", -"`g`g`g`````f`````g`g`g`g`g`g`g`g", -"`g`g`g`g```````g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g`g" -}; +static char * empty_xpm[] = { +"16 21 9 1", +" c None", +". c #848400", +"+ c #949429", +"@ c #9C9C31", +"# c #9C9C39", +"$ c #A5A542", +"% c #A5A54A", +"& c #ADAD52", +"* c #ADAD5A", +" ", +" ", +" ", +" ", +" ", +" ... ", +" ..+.. ", +" ..+@#.. ", +" ..+@##$.. ", +"..+@##$%%.. ", +".+@##$%%&*. ", +"..##$%%&*.. ", +" ..$%%&*.. ", +" ..%&*.. ", +" ..*.. ", +" ... ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/default/end-guide.png b/etc/tree-widget/default/end-guide.png index 908048c429367b1b03ce5fac49b9d1a391ef404c..72bb67a45132671cebc90e3785a488f0c9c1d7f7 100644 GIT binary patch delta 164 zcmbQpzLjx;WIY=L14C-x{8}KzmgMd3!tfsi7wla=87RV8;1OBOz`&&e!i--Po}L8? zvX^-Jy0Twm732^z%wEjr3lx$qag8W(&d<$F%`0JWE=o--Nlj5G&n(GM2+2rQaQE~L zc%P!02UIBO>EaloaXvZW0Mj)++i&wbWf|Eez6mLdGcXt&XVytCX)*??V(@hJb6Mw< G&;$TD`!CV} literal 913 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Ol^!3-pW0`mQV6nlxMuPggyPFW6hz9YrYPXL8D z3p^r=85p=UK$!8X!qc-149pAxJ|V6^$)!t=tzCNT+_~rH&i$u4XlP)dx|yQ}j)nlW zLSS{A4ihjBu$2V)1%u6G*t~zqexQhur;B4q#jWH7Rz@{8t)Mj`K@7`JF@*_voB(Aw N22WQ%mvv4FO#uF+8nXZZ diff --git a/etc/tree-widget/default/end-guide.xpm b/etc/tree-widget/default/end-guide.xpm index 8e5d727b440..a8e684ac406 100644 --- a/etc/tree-widget/default/end-guide.xpm +++ b/etc/tree-widget/default/end-guide.xpm @@ -1,284 +1,26 @@ /* XPM */ -static char *end-guide[] = { -/* width height num_colors chars_per_pixel */ -" 6 21 256 2", -/* colors */ -"`` c #000000", -"`. c #a5a5c6", -"`# c #ada5c6", -"`a c #cecee7", -"`b c #ceceff", -"`c c None", -"`d c #ffffff", -"`e c #ffffff", -"`f c #ffffff", -"`g c #ffffff", -"`h c #ffffff", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #808000", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`#", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c", -"`c`c`c`c`c`c" -}; +static char * end_guide_xpm[] = { +"6 21 2 1", +" c None", +". c #ADA5C6", +" .", +" .", +" .", +" .", +" .", +" .", +" .", +" .", +" .", +" .", +" .", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/default/guide.png b/etc/tree-widget/default/guide.png index c93b71ef073cc90d192264db962ea55689c5ac6f..85fa0c87b7b8a2fb3575effa15d6218f16d20a8d 100644 GIT binary patch delta 163 zcmeBY-@-USvYw5Bfg!bTel3t4uk@Q5sCVBpdKVaBftPtO7c z*-JcqUD>a(3UY``y7Nx|1{9Jlag8W(&d<$F%`0JWE=o--Nlj5G&n(GM2+2rQaQE~L zc%P!02UIBG>EaloaXvZW0Mj)++i&wbWf<8drb=uRVz6#yc98a6t_@Vg;OXk;vd$@? F2>>Z=FX#XO literal 911 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Ol^!3-pW0`mQV6nlxMuPggyPFW5$-Fp7zzkx!W z1s;*b3=CWvAk6qx;ptfh24;o;pAc7|&6h2cL4F4((#GEjuGz$3Dlfq_c{gc-joJUt5( zWH0gbb!ETCD#*ddvY$K194I7P;u=xnoS&PUnpeW$T$GwvlA5AWo>`Ki5R#Fq;O^-g z@IFN~52#SW)5S4F<9u?01Z%Uf!MfNgnK%D440uu*81hy#ORh-s%m*rB@O1TaS?83{ F1OPyCFgXAK literal 916 zcmeAS@N?(olHy`uVBq!ia0vp^Ahsw6Gm!Mi=|2dh*h@TpUD+>l%5td6z5X;+4=BW0 z;1O92RH^~Oj9(R=o@HQQW(e>JaRo{)U3zTo(qre&JwJEuKh;4)0|V8~95rw>1gI4P ztK)Q-fO&weB*-rqY$n6z{Y&-(MMOPa978H@B`35pvsoF;e9$1bO>qXpSqa(3UY9&scN-~0EJ{rTq8=H^K)}k^GX<;i&7IyQd1PlGfOfQLNZbn+&z5* z-lwSM0Totyx;TbdoPImWkn4Z~k8Ays+Ge@q+7AHpLy%7M+V`K=fPXXq`<*~Fd;bOnQ_tDnm{r-UW| DjND(- literal 994 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRv!3-oT9?W|H;*_{XlsFfqCYEI8=P86_=B6^R zU*?n&Vw117*53wHz+U3%>k1MQwvd_^?g`S$S>O>_%)r3)0fZTy)|kv-U|?nl@Ck8s za&jszF0QVwZfR-h>FJp=Wy+j6bCxb$`hOIRhQJ62fy=J9fcb-gvn0qb80KAuVE+ms zprE~{i(^Q|t>gy|%sg9!5*Qd&7}?y^)Y8(}b}+P@Kg1-O*zhqjQgQ*4ft_>=!>RQ2 nhMA3r*l#zTIsS^zszRPY_cq6?iB6^SK^Azr`njxgN@xNAetEaloaXvXgf^{(i7XuTo5Cdb@Z-yeE6oaR$pUXO@geCy#ohlaq literal 914 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Ol^!3-pW0`mQV6nlxMuPggyPFW5$(Qsb*RG<)N zfk$L90|S=^2s3_FczTwBftew|C&U#f+0rtnr)TNXrN`DTJ+^i0xpU{9pF8*e`Sbrk z(9pmDqDH}J2n^E@VE^I%7nldQN`m}?;a+6ebVlbqP?X=(#WAGfR`LTD<~BzcMg})? Vmi(TaEBAm>44$rjF6*2UngCqt8dd-R diff --git a/etc/tree-widget/default/no-guide.xpm b/etc/tree-widget/default/no-guide.xpm index 82729cf59b0..d9d93ea7294 100644 --- a/etc/tree-widget/default/no-guide.xpm +++ b/etc/tree-widget/default/no-guide.xpm @@ -1,284 +1,25 @@ /* XPM */ -static char *no-guide[] = { -/* width height num_colors chars_per_pixel */ -" 6 21 256 2", -/* colors */ -"`` c #000000", -"`. c #84849c", -"`# c #8c8ca5", -"`a c #a5a5c6", -"`b c #ada5c6", -"`c c #b5b5ce", -"`d c #cecee7", -"`e c #ceceff", -"`f c #e7e7ff", -"`g c None", -"`h c #808000", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g", -"`g`g`g`g`g`g" -}; +static char * no_guide_xpm[] = { +"6 21 1 1", +" c None", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/default/no-handle.png b/etc/tree-widget/default/no-handle.png index 00de3c09c267f373bf3e7da8fb481bab20f26dbe..123cf45fa979b943c625f530431b7f0d6b5a2e32 100644 GIT binary patch delta 156 zcmbQlzLs%&6h2cL4F4((#GEjuGz$3Dlfq_c{gc-joJUt5( zWH0gbb!ETCD#*cS&6!)z1r(Akag8W(&d<$F%`0JWE=o--Nlj5G&n(GM2+2rQaQE~L xc%P!02UIBN>EaloaXvXgf^~6%$ORS#Q3mE%2FCFAW9~p%22WQ%mvv4FO#rx7ECK)k literal 914 zcmeAS@N?(olHy`uVBq!ia0vp^Ahsw6Gm!Mi=|2dh*h@TpUD+>l%5tb$SpFBd3>4xl z@Q5r1D%AjC#;*!b&oVGDGX(gAxB?|xTITfhEM2RZaVHyJLKivNU^8i;#kY6y|iwv92=$r?N@_V{ChE&{2e$c|)mUxDRA@nqR UvZ>l_8K4w{r>mdKI;Vst05zx_zyJUM diff --git a/etc/tree-widget/default/no-handle.xpm b/etc/tree-widget/default/no-handle.xpm index 7ce048c91ea..3eaa2daee32 100644 --- a/etc/tree-widget/default/no-handle.xpm +++ b/etc/tree-widget/default/no-handle.xpm @@ -1,284 +1,25 @@ /* XPM */ -static char *no-handle[] = { -/* width height num_colors chars_per_pixel */ -" 10 21 256 2", -/* colors */ -"`` c #000000", -"`. c #84849c", -"`# c #8c8ca5", -"`a c #a5a5c6", -"`b c #ada5c6", -"`c c #b5b5ce", -"`d c #cecee7", -"`e c #ceceff", -"`f c #e7e7ff", -"`g c None", -"`h c #808000", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g", -"`g`g`g`g`g`g`g`g`g`g" -}; +static char * no_handle_xpm[] = { +"10 21 1 1", +" c None", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/default/open.png b/etc/tree-widget/default/open.png index d234ecadf39d67510414f57b8726c7a53da7ed16..ea2a8dba00d477ce54f9bafd881f23fd91091360 100644 GIT binary patch delta 297 zcmaFIzLRN!WIY=L1B1U^-X$Q#mgMd3!tfsi7wla=87RV8;1OBOz`&&j!i<3{R~iEa z*-JcqUD>a(3UY9=eDFH*0VpI};u=xnoS&PUnpeW$T$GwvlA5AWo>`Ki5R#Fq;O^-g z@IFN~52$dir;B5V#p$<`b@>h(@U-6VsgLV3l!%bXx}p5UX17;$&w+~v56P)A{|?-0 z<+(g7<(2cax9>G4=03QPH#bbuweI-I74;rEH|GDnwI*{z1EzNdO9Q7I;J!Gca&{0AWU_H6}9{7?>FXd_r6q zoES8dH4T#u4YLg`vn`#9oxF;@ysEu|T7sflqLwZ__J0(NhQRO*ft9usxq%skrzFTP z7|E9mLif*|1B!cix;TbZ+**6ilJ9^559>unM~)x=zPoa5JABE>e7%AEO}Xt15e$d) zYh)*LFAg?y{H>{VFW>Zl)PBS7KT@;q22PiK9yC!cd?B;CB=_OWq>?E>GZ{Qx{an^L HB{Ts5UD`Gz diff --git a/etc/tree-widget/default/open.xpm b/etc/tree-widget/default/open.xpm index 4c5c7b065b8..a216a3f5ab4 100644 --- a/etc/tree-widget/default/open.xpm +++ b/etc/tree-widget/default/open.xpm @@ -1,284 +1,35 @@ /* XPM */ -static char *open[] = { -/* width height num_colors chars_per_pixel */ -" 16 21 256 2", -/* colors */ -"`` c #004200", -"`. c #296329", -"`# c #316331", -"`a c #316b31", -"`b c #396b39", -"`c c #427342", -"`d c #4a734a", -"`e c #4a7b4a", -"`f c #528452", -"`g c #5a845a", -"`h c #a5a5c6", -"`i c None", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i```````i`i`i`i`i`i`i`i`i", -"`i`i`i`````.`````i`i`i`i`i`i`i`i", -"`i`i`````.`#`b`````i`i`i`i`i`i`i", -"`i`````.`#`b`b`c`````i`i`i`i`i`i", -"`````.`#`b`b`c`d`e`````i`i`i`i`i", -"```.`#`b`b`c`d`e`f`g```i`i`i`i`i", -"`````b`b`c`d`e`f`g`````i`i`i`i`i", -"`i`````c`d`e`f`g`````i`i`i`i`i`i", -"`i`i`````e`f`g`````i`i`i`i`i`i`i", -"`i`i`i`````g`````i`i`i`i`i`i`i`i", -"`i`i`i`i```````i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`h`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`h`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`h`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`h`i`i`i`i`i`i`i`i`i`i", -"`i`i`i`i`i`h`i`i`i`i`i`i`i`i`i`i" -}; +static char * open_xpm[] = { +"16 21 11 1", +" c None", +". c #004200", +"+ c #296329", +"@ c #316331", +"# c #396B39", +"$ c #427342", +"% c #4A734A", +"& c #4A7B4A", +"* c #528452", +"= c #5A845A", +"- c #A5A5C6", +" ", +" ", +" ", +" ", +" ", +" ... ", +" ..+.. ", +" ..+@#.. ", +" ..+@##$.. ", +"..+@##$%&.. ", +".+@##$%&*=. ", +"..##$%&*=.. ", +" ..$%&*=.. ", +" ..&*=.. ", +" ..=.. ", +" ... ", +" - ", +" - ", +" - ", +" - ", +" - "}; diff --git a/etc/tree-widget/folder/close.png b/etc/tree-widget/folder/close.png index f840ba89a4eb2df70b1cd5715d1ce664cf7aa3a3..3a509b095f80b8f6e052a2408bf1542eb25f26c1 100644 GIT binary patch delta 282 zcmcc0zKUsrWIY=L1H;KxGBrSoEy>&6h2cL4F4((#GEjuGz$3Dlfq_c{gc-joJUt5( zWH0gbb!ETCD#&hS8n^h_aiEZFiEBiObAE1aYF-J0b5UwyNotBhd1gt5LP$ocg1e`0 z!21-{JfOlpPZ!4!i_>o}Z{$7XAmDN_z5YqUdgkp9gjO8a6%dM(JTk@cl~7FA+?fn5 z409(wWl{Wic;df1@4SxBe;@34?%DGX6?>j$uP8Pvzso5sah$Wg(z8N;{k{11ZFiL$ zJ9aErRQmGw=h7u@%QBaW_&Y`FZ9JUzGjKzgpXOBVYo|Aw95max;ZXX{l5VNChoAlj c*`F2d6kac3XSFFi9q2X&Pgg&ebxsLQ0As#$NdN!< literal 981 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3-q-mAvr-QtTz3zOL+-x!Bp&n3lH*Yyk>! z7I;J!Gca&zfH31%g{Nm37?>FXd_r7XS{UZc(OkOJaP3;lwQHTWZuQ!_HE8c%Ac{J6 zEcw{6>~rUUsQBK!p6Ab}Jbymt{rfrpN5Nk= z*2~kyF{I+w*7N3k42nE17b7Pz2p;*X?`?2HyK33*^@a;#4@)1oAs^s c #C6C663", +", c #C6C66B", +"' c #CECE73", +" ", +" ", +" ", +" ", +" ", +" ", +" .... ", +".+@@#....... ", +".....$%%&&*=. ", +".-;;$%%&&*==. ", +".;;$%%&&*===. ", +".;$%%&&*===>. ", +".$%%&&*===>,. ", +".%%&&*===>,,. ", +".%&&*===>,,'. ", +"............. ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/folder/empty.png b/etc/tree-widget/folder/empty.png index 712af9747c65064114fe64db43730def4e6fa753..3f89471828d9994777a7e75df6ab256a05d95ff0 100644 GIT binary patch delta 289 zcmeyszL9ByWIY=L1H;KxGBrSoEy>&6h2cL4F4((#GEjuGz$3Dlfq_c{gc-joJUt5( zWH0gbb!ETCD#&grVAqxC3>1V!+7!+T26}%b7s$;xeB3XY*5W@ml>GLjY?e?7HP+V}0i=meFLYh+8Gd}c4Vz(w82`~3SS6vs); h%9mn$b5Q>y)462ZHIHpSC;*+v;OXk;vd$@?2>?GqW?BFM literal 1008 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3-q-mAvr-QlcfU5hcz=sfi_-`FRQGCVbY+zzrzGS>O>_%)r2<0m6)56`r1DU|?nl z@Ck8sa&pSf&Mq!4uCA_bX=&-{>6tQR%A7fKmM&eocJ12#qhK@yhII&JZ9KmOm_fKp zg8YIJ9%bd_V#pf45_%a^?V@T0R;}`3r$I#-|au7nTh<}USB&w;6nccz6ZW+ zJFGXBFr2)0M&QHQWKIPamr(DOqKvEir8oPZ*tKF56B-ufqu^IN%mP6!v-1C3?y MboFyt=akR{0IEAc1^@s6 diff --git a/etc/tree-widget/folder/empty.xpm b/etc/tree-widget/folder/empty.xpm index df92fd22008..598401ab413 100644 --- a/etc/tree-widget/folder/empty.xpm +++ b/etc/tree-widget/folder/empty.xpm @@ -1,285 +1,35 @@ /* XPM */ -static char *empty[] = { -/* width height num_colors chars_per_pixel */ -" 16 22 256 2", -/* colors */ -"`` c #424242", -"`. c #6b6b6b", -"`# c #737373", -"`a c #7b7b7b", -"`b c #848484", -"`c c #8c8c8c", -"`d c #949494", -"`e c #9c9c9c", -"`f c #a5a5a5", -"`g c #adadad", -"`h c None", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`````````h`h`h`h`h`h`h`h`h`h`h", -"```f`f`f`e```````````h`h`h`h`h`h", -"```f`f`e`e`e`d`d`c`c```h`h`h`h`h", -"```f`e`````````````````````h`h`h", -"```e```.`.`.`#`#`#`a`a`b`b```h`h", -"```e```.`.`#`#`#`a`a`b`b```h`h`h", -"`````.`.`#`#`#`a`a`b`b`b```h`h`h", -"`````.`#`#`#`a`a`b`b`b```h`h`h`h", -"```.`#`#`#`a`a`b`b`b`c```h`h`h`h", -"```````````````````````h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h" -}; +static char * empty_xpm[] = { +"16 22 10 1", +" c None", +". c #424242", +"+ c #A5A5A5", +"@ c #9C9C9C", +"# c #949494", +"$ c #8C8C8C", +"% c #6B6B6B", +"& c #737373", +"* c #7B7B7B", +"= c #848484", +" ", +" ", +" ", +" ", +" ", +" ", +" .... ", +".+++@..... ", +".++@@@##$$. ", +".+@.......... ", +".@.%%%&&&**==. ", +".@.%%&&&**==. ", +"..%%&&&**===. ", +"..%&&&**===. ", +".%&&&**===$. ", +"........... ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/folder/end-guide.png b/etc/tree-widget/folder/end-guide.png index 994c8bbf10a6966d3177162ae8eb91195e375b0c..b1290f31e6f5437c4a49788f331fdd4b51088de2 100644 GIT binary patch delta 160 zcmZ3-zL9Z)WIY=L1H)sfx0itwTavfC3&Vd9T(EcfWS|IVfk$L90|S>D2r~w*Txkpx zWH0gbb!ETCD##(N6_T;@4Nyq7#5JPCIX^cyHLrxhxhOTUBsE2$JhLQ2AtWPJ!QIn0 z;C+f}9#EmEr;B5V#`)v~1=cmORd4JMORne>WM>HbD%8DcfoeZc1%s!npUXO@geCy< Ch%qYw literal 942 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Ol=!3-p?9Fctpq(n+wBTAf$QWHxu^Yau!GILWI z*sm~hvGJW-nIH|6XD{*eb!ETI#m>$qaB#P498id}z$3Dlfr0A-2s1jZF`2=@z|0Wf z6XLpd>9PN#U^E0qY6#3&vnc?WL6}N{{DS{8Jl$^K1>^~Px;TbZ+)7ShVP@kv=};?o aQ-neF5<~q-HgQ{^G=rzBpUXO@geCxa^eB7) diff --git a/etc/tree-widget/folder/end-guide.xpm b/etc/tree-widget/folder/end-guide.xpm index 3cdb2332c55..6788538c7ab 100644 --- a/etc/tree-widget/folder/end-guide.xpm +++ b/etc/tree-widget/folder/end-guide.xpm @@ -1,285 +1,27 @@ /* XPM */ -static char *end-guide[] = { -/* width height num_colors chars_per_pixel */ -" 6 22 256 2", -/* colors */ -"`` c #ada5c6", -"`. c None", -"`# c #ffffff", -"`a c #ffffff", -"`b c #ffffff", -"`c c #ffffff", -"`d c #ffffff", -"`e c #ffffff", -"`f c #ffffff", -"`g c #ffffff", -"`h c #ffffff", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`.", -"`.`.`.`.`.`." -}; +static char * end_guide_xpm[] = { +"6 22 2 1", +" c None", +". c #ADA5C6", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/folder/guide.png b/etc/tree-widget/folder/guide.png index 5a4d4f0b751c3d8c29249438aa0efe5d737d0499..8535f86f3bf7cd9327895266263c03f8d38b7154 100644 GIT binary patch delta 161 zcmZ3(zKL;yWIY=L1H)sfx0itwTavfC3&Vd9T(EcfWS|IVfk$L90|S>D2r~w*Txkpx zWH0gbb!ETCD##(D@@FEG4p2z8#5JPCIX^cyHLrxhxhOTUBsE2$JhLQ2AtWPJ!QIn0 z;C+f}9#El}r;B5V#`)v~1=cmORd4JMOReY=T+YnUqNw;!X-4cXpb`d8S3j3^P6&A#F-;<4=BW0;1OBOz`*qZgc+UIn9N{cU}gyL z32|M!^w|GVFd70QH3Vj?*%ScGAWS7ee!>44o^Chr0`desT^vIyZY3wMFtc%-H0Y>c YP<3Renmu!W9#E3O)78&qol`;+0B!&$x&QzG diff --git a/etc/tree-widget/folder/guide.xpm b/etc/tree-widget/folder/guide.xpm index 5d23ef64eeb..647d0590173 100644 --- a/etc/tree-widget/folder/guide.xpm +++ b/etc/tree-widget/folder/guide.xpm @@ -1,285 +1,27 @@ /* XPM */ -static char *guide[] = { -/* width height num_colors chars_per_pixel */ -" 6 22 256 2", -/* colors */ -"`` c #ada5c6", -"`. c None", -"`# c #ffffff", -"`a c #ffffff", -"`b c #ffffff", -"`c c #ffffff", -"`d c #ffffff", -"`e c #ffffff", -"`f c #ffffff", -"`g c #ffffff", -"`h c #ffffff", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``", -"`.`.`.`.`.`.", -"`.`.`.`.`.``" -}; +static char * guide_xpm[] = { +"6 22 2 1", +" c None", +". c #ADA5C6", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" .", +" ", +" ."}; diff --git a/etc/tree-widget/folder/handle.png b/etc/tree-widget/folder/handle.png index 87058b7cc4d97adc5da8d1c6b40452f63bcf9440..cc5aa61b860d7e0c0a2fb7e4feae040e041a5c6c 100644 GIT binary patch delta 163 zcmbQtzJ+muWIY=L1H(@>-dG^TmgMd3!tfsi7wla=87RV8;1OBOz`&&e!i--Po}L8? zvX^-Jy0Twm735H4y(JKJ1}G$3;u=xnoS&PUnpeW$T$GwvlA5AWo>`Ki5R#Fq;O^-g z@IFN~52#SW)5S4F<9u?01nXhOHL+E1Wb6&UXh`%hFx+$GFS+`enH8vr!PC{xWt~$( F69D$NFp2;G literal 915 zcmeAS@N?(olHy`uVBq!ia0vp^Ahs9>Gmt#@<8MBYVlVOZb!ETI#m=tI5HQ){CQyj8 zz$3C4s8j=l8NVt#Jldw%ZRf2xCq1_r8|Icnf&2v92o zR>$cu0rLP`NswPK*i44a`&6h2cL4F4((#GEjuGz$3Dlfq_c{gc-joJUt5( zWH0gbb!ETCD#&iF8pVJ75l~3B#5JPCIX^cyHLrxhxhOTUBsE2$JhLQ2AtWPJ!QIn0 z;C+f}9#G*HPZ!4!i_>o>DGD7{5O9sRsu%4(?4~qv;zk+8>n9>7OpH;z-qF*0hBxY{ zpLMRr+^$(QTMwVB|1I7SY`>aQ@lM~Y&o<_v4T%yA0)h-ZhD)ZbQkWiNGi&p)!X;Az z7~h{^xNO2GqIf+f=k~JpYf(-d74HQFlX^rLk4ela_FugvcXg@ftc2L`HCx~OUUzog zYda@Pkq3M0XU5ERaEX}a`u)7-uYK#|72_k`J~>?fp*K?a$#=W2>US9%zH5rrNX@GS P`hdaH)z4*}Q$iB}nSg$! literal 980 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3-q-mAvr-QtTz3zOL+-x!BoNtuL=TT@MuE zEbxddW?yQ7{?;!#V_56ZcI8<^k@KAirRQM;W~Q89xDq13X~qz2L~lpvb}Ourlb( zzyAljXEA)t$)C%{zwNzOHDgiGg71bVM-T4iQcWm5tIf_JyM^JtXB6Xo#@U?J^EqSu l7aY2$J!hUk>6$IXwUX diff --git a/etc/tree-widget/folder/leaf.xpm b/etc/tree-widget/folder/leaf.xpm index c353cb2cdf8..53a86c75d64 100644 --- a/etc/tree-widget/folder/leaf.xpm +++ b/etc/tree-widget/folder/leaf.xpm @@ -1,285 +1,34 @@ /* XPM */ -static char *leaf[] = { -/* width height num_colors chars_per_pixel */ -" 16 22 256 2", -/* colors */ -"`` c #000000", -"`. c #424242", -"`# c #848484", -"`a c #949494", -"`b c #9c9c9c", -"`c c #a5a5a5", -"`d c #adadad", -"`e c #b5b5b5", -"`f c #bdbdbd", -"`g c #c6c6c6", -"`h c None", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`.`.`.`.`.`.`.`h`h`h`h`h`h`h`h`h", -"`.`a`a`b`b`c`.`.`h`h`h`h`h`h`h`h", -"`.`a`b`b`c`c`.`d`.`h`h`h`h`h`h`h", -"`.`b`b`c`c`c`.`.`.`.`h`h`h`h`h`h", -"`.`b`#`#`#`a`#`d`e`.`h`h`h`h`h`h", -"`.`c`c`c`d`d`d`e`e`.`h`h`h`h`h`h", -"`.`c`#`a`#`#`#`e`f`.`h`h`h`h`h`h", -"`.`c`d`d`d`e`e`f`f`.`h`h`h`h`h`h", -"`.`d`#`#`a`#`#`f`f`.`h`h`h`h`h`h", -"`.`d`d`e`e`f`f`f`f`.`h`h`h`h`h`h", -"`.`d`e`e`f`f`f`f`f`.`h`h`h`h`h`h", -"`.`.`.`.`.`.`.`.`.`.`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h", -"`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h`h" -}; +static char * leaf_xpm[] = { +"16 22 9 1", +" c None", +". c #424242", +"+ c #949494", +"@ c #9C9C9C", +"# c #A5A5A5", +"$ c #ADADAD", +"% c #848484", +"& c #B5B5B5", +"* c #BDBDBD", +" ", +" ", +" ", +" ", +" ", +"....... ", +".++@@#.. ", +".+@@##.$. ", +".@@###.... ", +".@%%%+%$&. ", +".###$$$&&. ", +".#%+%%%&*. ", +".#$$$&&**. ", +".$%%+%%**. ", +".$$&&****. ", +".$&&*****. ", +".......... ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/folder/no-guide.png b/etc/tree-widget/folder/no-guide.png index 5705cc83cf48cb012ff4f0e8e34a6167446bc956..81999263b2c290e298eece91ebd107a94a1532be 100644 GIT binary patch delta 154 zcmZ3+zM64@WIY=L1H)sfx0itwTavfC3&Vd9T(EcfWS|IVfk$L90|S>D2r~w*Txkpx zWH0gbb!ETCD##(LI;ofWH&95n#5JPCIX^cyHLrxhxhOTUBsE2$JhLQ2AtWPJ!QIn0 v;C+f}9#A2_r;B5V#`)v~3D(680t^gH!fFhRJ)Kr1Ksg3aS3j3^P6&AI3d+F1t`Q>;1OBOz`*qZgc+UIn9N{cU}gyL z332^D3PwX<1c$(WJ�S24O4-@(X5gcy=QV$l>vHaSW-rm7E~42FRPm!04UNcoWEC N@O1TaS?83{1OR7bB|HEC diff --git a/etc/tree-widget/folder/no-guide.xpm b/etc/tree-widget/folder/no-guide.xpm index 2d3e1e7c099..a74b84061ca 100644 --- a/etc/tree-widget/folder/no-guide.xpm +++ b/etc/tree-widget/folder/no-guide.xpm @@ -1,285 +1,26 @@ /* XPM */ -static char *no-guide[] = { -/* width height num_colors chars_per_pixel */ -" 6 22 256 2", -/* colors */ -"`` c None", -"`. c #ffffff", -"`# c #ffffff", -"`a c #ffffff", -"`b c #ffffff", -"`c c #ffffff", -"`d c #ffffff", -"`e c #ffffff", -"`f c #ffffff", -"`g c #ffffff", -"`h c #ffffff", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````", -"````````````" -}; +static char * no_guide_xpm[] = { +"6 22 1 1", +" c None", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/folder/no-handle.png b/etc/tree-widget/folder/no-handle.png index c335dd938ac688381b274caef02d9fb16a58f0f7..3055803a595fe2b37f910bb20b18bd7a42c91264 100644 GIT binary patch delta 156 zcmZ3-zLs%-dG^TmgMd3!tfsi7wla=87RV8;1OBOz`&&e!i--Po}L8? zvX^-Jy0Twm735GEaloaXvXgf^~6%2#*efCGmt#@<8MBY5-D+wC~+=IO)SaG&r=A=%uQur zzrx7H#&>RIf;3Q`y~NYkmHjdoJG(mHcJ17IKq1ZokH})6Q5qo3_*LQQSq27Xh5(-s zSD@t5rN`DTJ$CNg^K<9^QynxkFi_phQ3FRqfLbB2I!=cPm<%0e4l2gTmVWjc)I$ztaD0e0ss-qCanMf diff --git a/etc/tree-widget/folder/no-handle.xpm b/etc/tree-widget/folder/no-handle.xpm index fa3e4c5874b..cea559fd763 100644 --- a/etc/tree-widget/folder/no-handle.xpm +++ b/etc/tree-widget/folder/no-handle.xpm @@ -1,285 +1,26 @@ /* XPM */ -static char *no-handle[] = { -/* width height num_colors chars_per_pixel */ -" 10 22 256 2", -/* colors */ -"`` c #000000", -"`. c #a5a5c6", -"`# c #ada5c6", -"`a c #cecee7", -"`b c #ceceff", -"`c c None", -"`d c #ffffff", -"`e c #ffffff", -"`f c #ffffff", -"`g c #ffffff", -"`h c #ffffff", -"`i c #ffffff", -"`j c #ffffff", -"`k c #ffffff", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #808000", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c", -"`c`c`c`c`c`c`c`c`c`c" -}; +static char * no_handle_xpm[] = { +"10 22 1 1", +" c None", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/etc/tree-widget/folder/open.png b/etc/tree-widget/folder/open.png index 4237d3aa648a937bb8be059e3b7473fe47b4ca2c..6696a43c09c9d60ec6a9f667738f3592ccebc4b4 100644 GIT binary patch delta 328 zcmey(euHU(WIY=L1H;KxGBrSoEy>&6h2cL4F4((#GEjuGz$3Dlfq_c{gc-joJUt5( zWH0gbb!ETCD#&idJ^#?}9H5YFiEBiObAE1aYF-J0b5UwyNotBhd1gt5LP$ocg1e`0 z!21-{JfOloo-U3d7N_4%wiP<0Akt!QTrW}}(wA^ru!y%m!7Ix9^ps59;Gn8jnZrgU z5l`HOdXH>8Ve#0^rtC)T=?@L|+m7=ch;s4~b3MMkal^C;&)xUPYw*uG^yk5(l?-V~ z2G1BAZr^jecgwpXRY`8?@^$|CkNLuTdtG#{Rq<;uESYlg)>W^S_g2VUPPr_Xxv}`E ziX)rjm%F|}HgA%Bgq9pRH+O!VGV_I7Do2C#&M-P$-Vy5j`D8I`Sx%D^lRd+DY YJ88XFV428GpidY)UHx3vIVCg!05isfSO5S3 literal 1019 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3-q-mAvr-QlcfU5hcz=sfi_-`FRQ`nRKQ;1>FdgVnTwrWUBdbQ4UiCLfk$L90|S=^2s3_FczTwBftew| zC&aa-g<aN$z?~C7nP5*B$B>F!Tl*dP8Wea~+#8z|{{LSmuqI46*=EP~ znR%Nuzl!}6+!Apx%In#d3l_^&gaQoTMKzsyGv~Xbid)-;JLY_TS~}r}PwVMP_wV;v df4?p(NB$u1Ji9r|i-5*6c)I$ztaD0e0sx~0N%{Z) diff --git a/etc/tree-widget/folder/open.xpm b/etc/tree-widget/folder/open.xpm index 720f79fa94b..dfbf758dd8f 100644 --- a/etc/tree-widget/folder/open.xpm +++ b/etc/tree-widget/folder/open.xpm @@ -1,285 +1,39 @@ /* XPM */ -static char *open[] = { -/* width height num_colors chars_per_pixel */ -" 16 22 256 2", -/* colors */ -"`` c #848400", -"`. c #a5a5c6", -"`# c #adad39", -"`a c #adad42", -"`b c #b5b54a", -"`c c #bdbd52", -"`d c #bdbd5a", -"`e c #c6c663", -"`f c #c6c66b", -"`g c #cece6b", -"`h c #cece73", -"`i c #cece7b", -"`j c #d6d67b", -"`k c None", -"`l c #ffffff", -"`m c #ffffff", -"`n c #ffffff", -"`o c #ffffff", -"`p c #ffffff", -"`q c #ffffff", -"`r c #ffffff", -"`s c #ffffff", -"`t c #ffffff", -"`u c #ffffff", -"`v c #ffffff", -"`w c #ffffff", -"`x c #ffffff", -"`y c #ffffff", -"`z c #ffffff", -"`A c #ffffff", -"`B c #ffffff", -"`C c #ffffff", -"`D c #ffffff", -"`E c #ffffff", -"`F c #ffffff", -"`G c #ffffff", -"`H c #ffffff", -"`I c #ffffff", -"`J c #ffffff", -"`K c #ffffff", -"`L c #ffffff", -"`M c #ffffff", -"`N c #ffffff", -"`O c #ffffff", -"`P c #ffffff", -"`Q c #ffffff", -"`R c #ffffff", -"`S c #ffffff", -"`T c #ffffff", -"`U c #ffffff", -"`V c #ffffff", -"`W c #ffffff", -"`X c #ffffff", -"`Y c #ffffff", -"`Z c #ffffff", -"`0 c #ffffff", -"`1 c #ffffff", -"`2 c #ffffff", -"`3 c #ffffff", -"`4 c #ffffff", -"`5 c #ffffff", -"`6 c #ffffff", -"`7 c #ffffff", -"`8 c #ffffff", -".` c #ffffff", -".. c #ffffff", -".# c #ffffff", -".a c #ffffff", -".b c #ffffff", -".c c #ffffff", -".d c #ffffff", -".e c #ffffff", -".f c #ffffff", -".g c #ffffff", -".h c #ffffff", -".i c #ffffff", -".j c #ffffff", -".k c #ffffff", -".l c #ffffff", -".m c #ffffff", -".n c #ffffff", -".o c #ffffff", -".p c #ffffff", -".q c #ffffff", -".r c #ffffff", -".s c #ffffff", -".t c #ffffff", -".u c #ffffff", -".v c #ffffff", -".w c #ffffff", -".x c #ffffff", -".y c #ffffff", -".z c #ffffff", -".A c #ffffff", -".B c #ffffff", -".C c #ffffff", -".D c #ffffff", -".E c #ffffff", -".F c #ffffff", -".G c #ffffff", -".H c #ffffff", -".I c #ffffff", -".J c #ffffff", -".K c #ffffff", -".L c #ffffff", -".M c #ffffff", -".N c #ffffff", -".O c #ffffff", -".P c #ffffff", -".Q c #ffffff", -".R c #ffffff", -".S c #ffffff", -".T c #ffffff", -".U c #ffffff", -".V c #ffffff", -".W c #ffffff", -".X c #ffffff", -".Y c #ffffff", -".Z c #ffffff", -".0 c #ffffff", -".1 c #ffffff", -".2 c #ffffff", -".3 c #ffffff", -".4 c #ffffff", -".5 c #ffffff", -".6 c #ffffff", -".7 c #ffffff", -".8 c #ffffff", -"#` c #ffffff", -"#. c #ffffff", -"## c #ffffff", -"#a c #ffffff", -"#b c #ffffff", -"#c c #ffffff", -"#d c #ffffff", -"#e c #ffffff", -"#f c #ffffff", -"#g c #ffffff", -"#h c #ffffff", -"#i c #ffffff", -"#j c #ffffff", -"#k c #ffffff", -"#l c #ffffff", -"#m c #ffffff", -"#n c #ffffff", -"#o c #ffffff", -"#p c #ffffff", -"#q c #ffffff", -"#r c #ffffff", -"#s c #ffffff", -"#t c #ffffff", -"#u c #ffffff", -"#v c #ffffff", -"#w c #ffffff", -"#x c #ffffff", -"#y c #ffffff", -"#z c #ffffff", -"#A c #ffffff", -"#B c #ffffff", -"#C c #ffffff", -"#D c #ffffff", -"#E c #ffffff", -"#F c #ffffff", -"#G c #ffffff", -"#H c #ffffff", -"#I c #ffffff", -"#J c #ffffff", -"#K c #ffffff", -"#L c #ffffff", -"#M c #ffffff", -"#N c #ffffff", -"#O c #ffffff", -"#P c #ffffff", -"#Q c #ffffff", -"#R c #ffffff", -"#S c #ffffff", -"#T c #ffffff", -"#U c #ffffff", -"#V c #ffffff", -"#W c #ffffff", -"#X c #ffffff", -"#Y c #ffffff", -"#Z c #ffffff", -"#0 c #ffffff", -"#1 c #ffffff", -"#2 c #ffffff", -"#3 c #ffffff", -"#4 c #ffffff", -"#5 c #ffffff", -"#6 c #ffffff", -"#7 c #ffffff", -"#8 c #ffffff", -"a` c #ffffff", -"a. c #ffffff", -"a# c #ffffff", -"aa c #ffffff", -"ab c #ffffff", -"ac c #ffffff", -"ad c #ffffff", -"ae c #ffffff", -"af c #ffffff", -"ag c #ffffff", -"ah c #ffffff", -"ai c #ffffff", -"aj c #ffffff", -"ak c #ffffff", -"al c #ffffff", -"am c #ffffff", -"an c #ffffff", -"ao c #ffffff", -"ap c #ffffff", -"aq c #ffffff", -"ar c #ffffff", -"as c #ffffff", -"at c #ffffff", -"au c #ffffff", -"av c #ffffff", -"aw c #ffffff", -"ax c #ffffff", -"ay c #ffffff", -"az c #ffffff", -"aA c #ffffff", -"aB c #ffffff", -"aC c #ffffff", -"aD c #ffffff", -"aE c #ffffff", -"aF c #ffffff", -"aG c #ffffff", -"aH c #ffffff", -"aI c #ffffff", -"aJ c #ffffff", -"aK c #ffffff", -"aL c #ffffff", -"aM c #ffffff", -"aN c #ffffff", -"aO c #ffffff", -"aP c #ffffff", -"aQ c #ffffff", -"aR c #ffffff", -"aS c #ffffff", -"aT c #ffffff", -"aU c #ffffff", -"aV c #ffffff", -"aW c #ffffff", -"aX c #ffffff", -"aY c #ffffff", -"aZ c #ffffff", -"a0 c #ffffff", -"a1 c #ffffff", -"a2 c #ffffff", -"a3 c #ffffff", -"a4 c #ffffff", -"a5 c #ffffff", -"a6 c #ffffff", -"a7 c #ffffff", -"a8 c #ffffff", -/* pixels */ -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`````````k`k`k`k`k`k`k`k`k`k`k", -"```j`i`i`h```````````k`k`k`k`k`k", -"```i`i`h`h`f`f`d`d`c```k`k`k`k`k", -"```i`h`````````````````````k`k`k", -"```h```#`a`a`b`b`c`d`d`e`e```k`k", -"```h```a`a`b`b`c`d`d`e`e```k`k`k", -"`````a`a`b`b`c`d`d`e`e`f```k`k`k", -"`````a`b`b`c`d`d`e`e`f```k`k`k`k", -"```a`b`b`c`d`d`e`e`f`g```k`k`k`k", -"```````````````````````k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`.`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`.`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k`k", -"`k`k`k`k`k`.`k`k`k`k`k`k`k`k`k`k" -}; +static char * open_xpm[] = { +"16 22 14 1", +" c None", +". c #848400", +"+ c #D6D67B", +"@ c #CECE7B", +"# c #CECE73", +"$ c #C6C66B", +"% c #BDBD5A", +"& c #BDBD52", +"* c #ADAD39", +"= c #ADAD42", +"- c #B5B54A", +"; c #C6C663", +"> c #CECE6B", +", c #A5A5C6", +" ", +" ", +" ", +" ", +" ", +" ", +" .... ", +".+@@#..... ", +".@@##$$%%&. ", +".@#.......... ", +".#.*==--&%%;;. ", +".#.==--&%%;;. ", +"..==--&%%;;$. ", +"..=--&%%;;$. ", +".=--&%%;;$>. ", +"........... ", +" ", +" , ", +" ", +" , ", +" ", +" , "}; From e223ede91633099df2cf0d8853d8de7e191def6e Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 31 May 2006 13:20:40 +0000 Subject: [PATCH 222/403] *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 98ae42bd434..2065e55b4a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2006-06-01 Nick Roberts + + * progmodes/gdb-ui.el (gdb-look-up-stack): New variable. + (gdb-stopped, gdb-info-stack-custom): If there is no source info + look up the stack and pop up GUD buffer if necessary. + (gdb-frames-select): Remove redundant call to gud-display-frame. + (gdb-info-threads-custom): Keep point at start of buffer. + (gdb-find-file-hook): Make it work for pre-GDB 6.4. + 2006-05-31 Takaaki Ota * textmodes/table.el: Convert all HTML tags to lower case for From c1719ebfb33dab1b850d109cd989fa8c78b4ce87 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 31 May 2006 13:21:39 +0000 Subject: [PATCH 223/403] (gdb-look-up-stack): New variable. (gdb-stopped, gdb-info-stack-custom): If there is no source info look up the stack and pop up GUD buffer if necessary. (gdb-frames-select): Remove redundant call to gud-display-frame. (gdb-info-threads-custom): Keep point at start of buffer. (gdb-find-file-hook): Make it work for pre-GDB 6.4. --- lisp/progmodes/gdb-ui.el | 116 ++++++++++++++++++++++++++------------- 1 file changed, 77 insertions(+), 39 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 3e21c5b3341..0f92523e306 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -125,6 +125,7 @@ and #define directives otherwise.") (defvar gdb-source-window nil) (defvar gdb-inferior-status nil) (defvar gdb-continuation nil) +(defvar gdb-look-up-stack nil) (defvar gdb-buffer-type nil "One of the symbols bound in `gdb-buffer-rules'.") @@ -540,7 +541,8 @@ With arg, use separate IO iff arg is positive." gdb-signalled nil gdb-source-window nil gdb-inferior-status nil - gdb-continuation nil) + gdb-continuation nil + gdb-look-up-stack nil) (setq gdb-buffer-type 'gdba) @@ -1332,9 +1334,20 @@ directives." It is just like `gdb-stopping', except that if we already set the output sink to `user' in `gdb-stopping', that is fine." (setq gud-running nil) - (unless (or gud-overlay-arrow-position gud-last-frame - (not gud-last-last-frame)) - (gud-display-line (car gud-last-last-frame) (cdr gud-last-last-frame))) + (unless (or gud-overlay-arrow-position gud-last-frame) + ;;Pop up GUD buffer to display current frame when it doesn't have source + ;;information i.e id not compiled with -g as with libc routines generally. + (let ((special-display-regexps (append special-display-regexps '(".*"))) + (special-display-frame-alist gdb-frame-parameters) + (same-window-regexps nil)) + (display-buffer gud-comint-buffer)) + ;;Try to find source further up stack e.g after signal. + (setq gdb-look-up-stack + (if (gdb-get-buffer 'gdb-stack-buffer) 'keep + (progn + (gdb-get-buffer-create 'gdb-stack-buffer) + (gdb-invalidate-frames) + 'delete)))) (unless (member gdb-inferior-status '("exited" "signal")) (setq gdb-inferior-status "stopped") (gdb-force-mode-line-update gdb-inferior-status)) @@ -1943,36 +1956,57 @@ static char *magick[] = { (defun gdb-info-stack-custom () (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) (save-excursion - (let ((buffer-read-only nil) - bl el) - (goto-char (point-min)) - (while (< (point) (point-max)) - (setq bl (line-beginning-position) - el (line-end-position)) - (when (looking-at "#") - (add-text-properties bl el - '(mouse-face highlight - help-echo "mouse-2, RET: Select frame"))) - (goto-char bl) - (when (looking-at "^#\\([0-9]+\\)") - (when (string-equal (match-string 1) gdb-frame-number) + (unless (eq gdb-look-up-stack 'delete) + (let ((buffer-read-only nil) + bl el) + (goto-char (point-min)) + (while (< (point) (point-max)) + (setq bl (line-beginning-position) + el (line-end-position)) + (when (looking-at "#") + (add-text-properties bl el + '(mouse-face highlight + help-echo "mouse-2, RET: Select frame"))) + (goto-char bl) + (when (looking-at "^#\\([0-9]+\\)") + (when (string-equal (match-string 1) gdb-frame-number) (put-text-property bl (+ bl 4) 'face '(:inverse-video t))) - (when (re-search-forward - (concat - (if (string-equal (match-string 1) "0") "" " in ") - "\\([^ ]+\\) (") el t) - (put-text-property (match-beginning 1) (match-end 1) - 'face font-lock-function-name-face) - (setq bl (match-end 0)) - (while (re-search-forward "<\\([^>]+\\)>" el t) + (when (re-search-forward + (concat + (if (string-equal (match-string 1) "0") "" " in ") + "\\([^ ]+\\) (") el t) (put-text-property (match-beginning 1) (match-end 1) + 'face font-lock-function-name-face) + (setq bl (match-end 0)) + (while (re-search-forward "<\\([^>]+\\)>" el t) + (put-text-property (match-beginning 1) (match-end 1) 'face font-lock-function-name-face)) - (goto-char bl) - (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t) - (put-text-property (match-beginning 1) (match-end 1) - 'face font-lock-variable-name-face)))) - (forward-line 1)))))) + (goto-char bl) + (while (re-search-forward "\\(\\(\\sw\\|[_.]\\)+\\)=" el t) + (put-text-property (match-beginning 1) (match-end 1) + 'face font-lock-variable-name-face)))) + (forward-line 1)))) + (when gdb-look-up-stack + (goto-char (point-min)) + (when (re-search-forward "\\(\\S-+?\\):\\([0-9]+\\)" nil t) + (let ((start (line-beginning-position)) + (file (match-string 1)) + (line (match-string 2))) + (re-search-backward "^#*\\([0-9]+\\)" start t) + (gdb-enqueue-input + (list (concat gdb-server-prefix "frame " + (match-string 1) "\n") 'gdb-set-hollow)) + (gdb-enqueue-input + (list (concat gdb-server-prefix "frame 0\n") 'ignore))))))) + (if (eq gdb-look-up-stack 'delete) + (kill-buffer (gdb-get-buffer 'gdb-stack-buffer))) + (setq gdb-look-up-stack nil)) + +(defun gdb-set-hollow () + (with-current-buffer (gud-find-file (car gud-last-last-frame)) + (setq fringe-indicator-alist + '((overlay-arrow . hollow-right-triangle))))) (defun gdb-stack-buffer-name () (with-current-buffer gud-comint-buffer @@ -2028,8 +2062,7 @@ static char *magick[] = { (if event (posn-set-point (event-end event))) (gdb-enqueue-input (list (concat gdb-server-prefix "frame " - (gdb-get-frame-number) "\n") 'ignore)) - (gud-display-frame)) + (gdb-get-frame-number) "\n") 'ignore))) ;; Threads buffer. This displays a selectable thread list. @@ -2047,13 +2080,14 @@ static char *magick[] = { (defun gdb-info-threads-custom () (with-current-buffer (gdb-get-buffer 'gdb-threads-buffer) (let ((buffer-read-only nil)) - (goto-char (point-min)) - (while (< (point) (point-max)) - (unless (looking-at "No ") - (add-text-properties (line-beginning-position) (line-end-position) - '(mouse-face highlight + (save-excursion + (goto-char (point-min)) + (while (< (point) (point-max)) + (unless (looking-at "No ") + (add-text-properties (line-beginning-position) (line-end-position) + '(mouse-face highlight help-echo "mouse-2, RET: select thread"))) - (forward-line 1))))) + (forward-line 1)))))) (defun gdb-threads-buffer-name () (with-current-buffer gud-comint-buffer @@ -2866,7 +2900,11 @@ of the current session." gud-comint-buffer (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer) '(gdba gdbmi))) - (if (member buffer-file-name gdb-source-file-list) + ;;Pre GDB 6.3 "info sources" doesn't give absolute file name. + (if (member (if (string-equal gdb-version "pre-6.4") + (file-name-nondirectory buffer-file-name) + buffer-file-name) + gdb-source-file-list) (with-current-buffer (find-buffer-visiting buffer-file-name) (set (make-local-variable 'gud-minor-mode) (buffer-local-value 'gud-minor-mode gud-comint-buffer)) From d3b87ec4947322eb1d6e8a71790c9fe6c392923d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 31 May 2006 16:23:16 +0000 Subject: [PATCH 224/403] (Moving Point): Fix previous change. --- man/ChangeLog | 4 ++++ man/basic.texi | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 6f3672717a4..cb462c465fb 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-31 Richard Stallman + + * basic.texi (Moving Point): Fix previous change. + 2006-05-30 Carsten Dominik * org.texi: Small typo fixes. diff --git a/man/basic.texi b/man/basic.texi index d2a8b6f530f..26b3137d632 100644 --- a/man/basic.texi +++ b/man/basic.texi @@ -254,10 +254,10 @@ minibuffer empty, that number is used for @var{n}. @findex set-goal-column @kindex C-x C-n Use the current column of point as the @dfn{semipermanent goal column} -for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). Henceforth, -those commands always try move to this column, or as close as possible -to it, after moving vertically. The goal column remains in effect -until canceled. +for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). When a +semipermanent goal column is in effect, those commands always try to +move to this column, or as close as possible to it, after moving +vertically. The goal column remains in effect until canceled. @item C-u C-x C-n Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to preserve the horizontal position, as usual. From 09fd8197ffbbd7e7fe6339f86a3477531d20ab27 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Wed, 31 May 2006 17:28:58 +0000 Subject: [PATCH 225/403] (ediff-diff-options): fixed the doc string --- lisp/ediff-diff.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 013ed9073db..57456367522 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el @@ -128,10 +128,10 @@ are `-I REGEXP', to ignore changes whose lines match the REGEXP." (defcustom ediff-diff-options "" "*Options to pass to `ediff-diff-program'. -If Unix diff is used as `ediff-diff-program', then a useful option is -`-w', to ignore space, and `-i', to ignore case of letters. -Options `-c' and `-i' are not allowed. Case sensitivity can be toggled -interactively using [ediff-toggle-ignore-case]" +If Unix diff is used as `ediff-diff-program', + then a useful option is `-w', to ignore space. +Options `-c' and `-i' are not allowed. Case sensitivity can be + toggled interactively using \\[ediff-toggle-ignore-case]." :set 'ediff-reset-diff-options :type 'string :group 'ediff-diff) @@ -399,7 +399,7 @@ one optional arguments, diff-number to refine.") (c-prev-pt nil) diff-list shift-A shift-B ) - + ;; diff list contains word numbers, unless changed later (setq diff-list (cons (if word-mode 'words 'points) diff-list)) @@ -411,7 +411,7 @@ one optional arguments, diff-number to refine.") shift-B (ediff-overlay-start (ediff-get-value-according-to-buffer-type 'B bounds)))) - + ;; reset point in buffers A/B/C (ediff-with-current-buffer A-buffer (goto-char (if shift-A shift-A (point-min)))) @@ -1525,7 +1525,7 @@ affects only files whose names match the expression." (ediff-barf-if-not-control-buffer) (setq ediff-ignore-case (not ediff-ignore-case)) (cond (ediff-ignore-case - (setq ediff-actual-diff-options + (setq ediff-actual-diff-options (concat ediff-diff-options " " ediff-ignore-case-option) ediff-actual-diff3-options (concat ediff-diff3-options " " ediff-ignore-case-option3)) From 69164016401b08b29597915b6792df359bbe0132 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 31 May 2006 20:18:27 +0000 Subject: [PATCH 226/403] (Special Properties): Add an xref to "Color Names". --- lispref/text.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lispref/text.texi b/lispref/text.texi index c9f1a83a74c..426ec1ef00f 100644 --- a/lispref/text.texi +++ b/lispref/text.texi @@ -2967,7 +2967,8 @@ time you want to specify a particular attribute for certain text. @item A cons cell of the form @code{(foreground-color . @var{color-name})} or @code{(background-color . @var{color-name})}. These elements specify -just the foreground color or just the background color. +just the foreground color or just the background color. @xref{Color +Names}, for the supported forms of @var{color-name}. @code{(foreground-color . @var{color-name})} is equivalent to specifying @code{(:foreground @var{color-name})}, and likewise for the From 12e224253631ad277706990ed1becf75f8f5a0f3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 31 May 2006 20:23:15 +0000 Subject: [PATCH 227/403] Fix typos. --- man/ChangeLog | 4 ++++ man/ediff.texi | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index cb462c465fb..e406caef57d 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-05-31 Michael Ernst + + * ediff.texi: Fix typos. + 2006-05-31 Richard Stallman * basic.texi (Moving Point): Fix previous change. diff --git a/man/ediff.texi b/man/ediff.texi index 3179447fd9a..c92ea91a361 100644 --- a/man/ediff.texi +++ b/man/ediff.texi @@ -135,7 +135,7 @@ The architecture and the interface are, of course, drastically different. @chapter Major Entry Points When Ediff starts up, it displays a small control window, which accepts the -Ediff commands and two or three windows displaying the files to be compared +Ediff commands, and two or three windows displaying the files to be compared or merged. The control window can be in its own small frame or it can be part of a bigger frame that displays other buffers. In any case, it is important that the control window be active (i.e., be the one receiving the @@ -829,7 +829,7 @@ identical to its default setting, as originally decided by Ediff. For instance, if Ediff is merging according to the `combined' policy, then the merge region is skipped over if it is different from the combination of the regions in buffers A and B. (Warning: swapping buffers A and B will confuse -things in this respect). If the merge region is marked as `prefer-A' then +things in this respect.) If the merge region is marked as `prefer-A' then this region will be skipped if it differs from the current difference region in buffer A, etc. @@ -1599,8 +1599,6 @@ problem. @vindex ediff-ignore-case Finally, Ediff can be told to ignore the case of the letters. This behavior can be toggled with @kbd{#c} and it is controlled with three variables: -Toggle case sensitivity in the diff program. All diffs are recomputed. -Case sensitivity is controlled by the variables @code{ediff-ignore-case-option}, @code{ediff-ignore-case-option3}, and @code{ediff-ignore-case}. From 179a4ca7f903042317f9ea514d6647bcdd74a568 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 May 2006 21:11:07 +0000 Subject: [PATCH 228/403] (Vhistory_add_new_input): New variable. (read_minibuf): Use it. (syms_of_minibuf) : New Lisp variable. (syms_of_minibuf) : Doc fix. --- src/minibuf.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/minibuf.c b/src/minibuf.c index ff56eca3241..86d24e6647c 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -66,6 +66,10 @@ Lisp_Object Qhistory_length, Vhistory_length; int history_delete_duplicates; +/* Non-nil means add new input to history. */ + +Lisp_Object Vhistory_add_new_input; + /* Fread_minibuffer leaves the input here as a string. */ Lisp_Object last_minibuf_string; @@ -753,7 +757,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, histstring = Qnil; /* Add the value to the appropriate history list, if any. */ - if (SYMBOLP (Vminibuffer_history_variable) + if (!NILP (Vhistory_add_new_input) + && SYMBOLP (Vminibuffer_history_variable) && !NILP (histstring)) { /* If the caller wanted to save the value read on a history list, @@ -2800,9 +2805,16 @@ property of a history variable overrides this default. */); DEFVAR_BOOL ("history-delete-duplicates", &history_delete_duplicates, doc: /* *Non-nil means to delete duplicates in history. If set to t when adding a new history element, all previous identical -elements are deleted. */); +elements are deleted from the history list. */); history_delete_duplicates = 0; + DEFVAR_LISP ("history-add-new-input", &Vhistory_add_new_input, + doc: /* *Non-nil means to add new elements in history. +If set to nil, minibuffer reading functions don't add new elements to the +history list, so it is possible to do this afterwards by calling +`add-to-history' explicitly. */); + Vhistory_add_new_input = Qt; + DEFVAR_LISP ("completion-auto-help", &Vcompletion_auto_help, doc: /* *Non-nil means automatically provide help for invalid completion input. Under Partial Completion mode, a non-nil, non-t value has a special meaning; From a8ccd062c46e6a23555422f27d0bb9102f354619 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 May 2006 22:02:33 +0000 Subject: [PATCH 229/403] (Minibuffer History): Add history-add-new-input. --- lispref/minibuf.texi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index 2fca6cc04b8..0409796a882 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi @@ -460,6 +460,12 @@ However, if @var{keep-all} is non-@code{nil}, that says not to remove duplicates, and to add @var{newelt} to the list even if it is empty. @end defun +@defvar history-add-new-input +The value of this variable @code{nil} means that standard functions +that read from the minibuffer don't add new elements to the history +list, so it is possible to do this explicitly by using @code{add-to-history}. +@end defvar + @defvar history-length The value of this variable specifies the maximum length for all history lists that don't specify their own maximum lengths. If the From 82db8fa7c5ef973cb17c82d90bd2d2f7900b428f Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 May 2006 22:07:21 +0000 Subject: [PATCH 230/403] *** empty log message *** --- lispref/ChangeLog | 4 ++++ src/ChangeLog | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 03fc486ae5a..e0f53dd26e1 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2006-05-31 Juri Linkov + + * minibuf.texi (Minibuffer History): Add history-add-new-input. + 2006-05-30 Richard Stallman * display.texi (Line Height): Fix errors in description of diff --git a/src/ChangeLog b/src/ChangeLog index cca73c2d2a8..555e57110f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2006-05-31 Juri Linkov + + * minibuf.c (Vhistory_add_new_input): New variable. + (read_minibuf): Use it. + (syms_of_minibuf) : New Lisp variable. + (syms_of_minibuf) : Doc fix. + 2006-05-31 Kim F. Storm * process.c (select_wrapper): Add wrapper around select to work around From 06e95e651654e89e5ba6cfc1e12603f23b8e568a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 May 2006 22:17:37 +0000 Subject: [PATCH 231/403] Add `history-add-new-input'. --- etc/NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 75913fc129a..a8dd3843396 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -4377,6 +4377,12 @@ whether completion ignores case when reading a file name with the It is like `read-file-name' except that the defaulting works better for directories, and completion inside it shows only directories. ++++ +*** The new variable `history-add-new-input' specifies whether to add new +elements in history. If set to nil, minibuffer reading functions don't +add new elements to the history list, so it is possible to do this +afterwards by calling `add-to-history' explicitly. + ** Completion changes: +++ From 8ba7e5409ccbed8dd4fff03c8d2f0e337ad3d42e Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 31 May 2006 22:46:20 +0000 Subject: [PATCH 232/403] *** empty log message *** --- lisp/ChangeLog | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2065e55b4a1..3af011ffd34 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -14,39 +14,40 @@ 2006-05-31 Masatake YAMATO - * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-called-line): - Don't put face on `-' lines in gcov file. - Suggested by Dan Nicolaescu. + * progmodes/compile.el: + (compilation-error-regexp-alist-alist::gcov-called-line): + Don't put face on `-' lines in gcov file. Suggested by Dan Nicolaescu. 2006-05-31 Nick Roberts - * progmodes/gud.el (gud-query-cmdline, gud-common-init): Revert - inadvertant changes made with last commit. + * progmodes/gud.el (gud-query-cmdline, gud-common-init): + Revert inadvertant changes made with last commit. 2006-05-30 Reiner Steib - * textmodes/flyspell.el (turn-on-flyspell, turn-off-flyspell): New - functions. + * textmodes/flyspell.el (turn-on-flyspell, turn-off-flyspell): + New functions. * textmodes/text-mode.el (text-mode-hook): Use turn-on-flyspell. 2006-05-30 Carsten Dominik * textmodes/org.el: (org-agenda-highlight-todo): Make sure regexp - does only match in the right place. + only matches in the right place. (org-upcoming-deadline): New face. (org-agenda-get-deadlines): Use new face `org-upcoming-deadline'. - (org-export-ascii-underline): Renamed and made an option - (was constant `org-ascii-underline'). + (org-export-ascii-underline): Rename constant `org-ascii-underline' + and make it an option. (org-export-ascii-bullets): New option. (org-export-as-html): Many changes to emit valid XHTML. (org-par-open): New variable. - (org-open-par, org-close-par-maybe, org-close-li-maybe): New - functions. - (org-html-do-expand, org-section-number): Fixedcase in - `replace-match'. org-timeline): Pass - `org-timeline-show-empty-dates' to `org-get-all-dates'. Interpret - empty dates returned by `org-get-all-dates'. + (org-open-par, org-close-par-maybe, org-close-li-maybe): + New functions. + (org-html-do-expand, org-section-number): Fixed case in + `replace-match'. + (org-timeline): Pass `org-timeline-show-empty-dates' to + `org-get-all-dates'. + Interpret empty dates returned by `org-get-all-dates'. (org-get-all-dates): New argument EMPTY. Add dates without entries to the list, mark large ranges of empty dates. (org-point-in-group, org-context): New functions. @@ -63,16 +64,15 @@ * speedbar.el (speedbar-detach): Delete. (speedbar-easymenu-definition-trailer): Remove speedbar-detach as it breaks things. - (speedbar-reconfigure-keymaps): Always add extra items to pop up - menu. + (speedbar-reconfigure-keymaps): Always add extra items to pop up menu. 2006-05-30 Daniel Pfeiffer * files.el (auto-mode-alist): Add makepp suffix and optional mk on Makeppfile. - * progmodes/compile.el (compilation-error-regexp-alist-alist): Add - makepp diagnostic. + * progmodes/compile.el (compilation-error-regexp-alist-alist): + Add makepp diagnostic. 2006-05-29 Richard Stallman @@ -863,8 +863,7 @@ Move `safe-local-variable' declarations to the respective files. * help-fns.el (describe-variable): Don't print safe-var if it is - byte-code. Improve wording as suggested by Luc Teirlinck - . + byte-code. Improve wording as suggested by Luc Teirlinck. 2006-05-11 Nick Roberts From 2bf2b947056917796033acf2e975539b96024fda Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 May 2006 22:48:31 +0000 Subject: [PATCH 233/403] (query-replace-read-from, query-replace-read-to): Bind `history-add-new-input' to nil. Call `add-to-history'. --- lisp/replace.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index 72236c298cd..2f8fe86860c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -99,7 +99,8 @@ The return value can also be a pair (FROM . TO) indicating that the user wants to replace FROM with TO." (if query-replace-interactive (car (if regexp-flag regexp-search-ring search-ring)) - (let ((from + (let* ((history-add-new-input nil) + (from ;; The save-excursion here is in case the user marks and copies ;; a region in order to specify the minibuffer input. ;; That should not clobber the region for the query-replace itself. @@ -117,6 +118,7 @@ wants to replace FROM with TO." (cons (car query-replace-defaults) (query-replace-compile-replacement (cdr query-replace-defaults) regexp-flag)) + (add-to-history query-replace-from-history-variable from nil t) ;; Warn if user types \n or \t, but don't reject the input. (and regexp-flag (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) @@ -174,10 +176,12 @@ the original string if not." "Query and return the `to' argument of a query-replace operation." (query-replace-compile-replacement (save-excursion - (let ((to (read-from-minibuffer - (format "%s %s with: " prompt (query-replace-descr from)) - nil nil nil - query-replace-to-history-variable from t))) + (let* ((history-add-new-input nil) + (to (read-from-minibuffer + (format "%s %s with: " prompt (query-replace-descr from)) + nil nil nil + query-replace-to-history-variable from t))) + (add-to-history query-replace-to-history-variable to nil t) (setq query-replace-defaults (cons from to)) to)) regexp-flag)) From 955951b8ff61fa00102bb4d53f9246f3221410a9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 31 May 2006 22:48:41 +0000 Subject: [PATCH 234/403] *** empty log message *** --- lisp/ChangeLog | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3af011ffd34..fab5e4ad75a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -41,13 +41,10 @@ (org-export-ascii-bullets): New option. (org-export-as-html): Many changes to emit valid XHTML. (org-par-open): New variable. - (org-open-par, org-close-par-maybe, org-close-li-maybe): - New functions. - (org-html-do-expand, org-section-number): Fixed case in - `replace-match'. + (org-open-par, org-close-par-maybe, org-close-li-maybe): New functions. + (org-html-do-expand, org-section-number): Fixedcase in `replace-match'. (org-timeline): Pass `org-timeline-show-empty-dates' to - `org-get-all-dates'. - Interpret empty dates returned by `org-get-all-dates'. + `org-get-all-dates'. Interpret empty dates returned by `org-get-all-dates'. (org-get-all-dates): New argument EMPTY. Add dates without entries to the list, mark large ranges of empty dates. (org-point-in-group, org-context): New functions. From 81c6e791bf162230014830acffc07915358d01c4 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 31 May 2006 23:49:19 +0000 Subject: [PATCH 235/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fab5e4ad75a..d227fe4f26d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -7,6 +7,11 @@ (gdb-info-threads-custom): Keep point at start of buffer. (gdb-find-file-hook): Make it work for pre-GDB 6.4. +2006-05-31 Juri Linkov + + * replace.el (query-replace-read-from, query-replace-read-to): + Bind `history-add-new-input' to nil. Call `add-to-history'. + 2006-05-31 Takaaki Ota * textmodes/table.el: Convert all HTML tags to lower case for From 9c5247543cb3897ca95b60e444df6cba938ce565 Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Thu, 1 Jun 2006 06:30:55 +0000 Subject: [PATCH 236/403] *** empty log message *** --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d227fe4f26d..9be1c0ead8b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -306,7 +306,7 @@ * replace.el (query-replace-read-from, query-replace-read-to): Remove 8th arg KEEP-ALL in read-from-minibuffer. -2006-05-25 Rajesh Vaidheeswarran +2006-05-25 Rajesh Vaidheeswarran * whitespace.el (whitespace-cleanup): Change to cleanup region if one is active. From c9467aaa7d02820ebbc37b3acf2227c821c132d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 1 Jun 2006 06:39:18 +0000 Subject: [PATCH 237/403] * xmenu.c (Fmenu_bar_open, syms_of_xmenu): Change menu-bar-start to menu-bar-open. * gtkutil.c (menu_nav_ended): Change x-menu-bar-start to menu-bar-open. --- src/ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 555e57110f2..fc6b3cd48e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2006-06-01 Jan Dj,Ad(Brv + + * xmenu.c (Fmenu_bar_open, syms_of_xmenu): Change menu-bar-start to + menu-bar-open. + + * gtkutil.c (menu_nav_ended): Change x-menu-bar-start to menu-bar-open. + 2006-05-31 Juri Linkov * minibuf.c (Vhistory_add_new_input): New variable. From ebe80e837d051c1ff513314bad6cd3af158ea1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 1 Jun 2006 06:39:44 +0000 Subject: [PATCH 238/403] * xmenu.c (Fmenu_bar_open, syms_of_xmenu): Change menu-bar-start to menu-bar-open. --- src/xmenu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xmenu.c b/src/xmenu.c index ef9fb05fb29..f2b5f9f0c07 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1301,7 +1301,7 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers) } } -DEFUN ("menu-bar-start", Fmenu_bar_start, Smenu_bar_start, 0, 1, "i", +DEFUN ("menu-bar-open", Fmenu_bar_open, Smenu_bar_open, 0, 1, "i", doc: /* Start key navigation of the menu bar in FRAME. This initially opens the first menu bar item and you can then navigate with the arrow keys, select a menu entry with the return key or cancel with the @@ -1380,7 +1380,7 @@ If FRAME is nil or not given, use the selected frame. */) #ifdef USE_GTK -DEFUN ("menu-bar-start", Fmenu_bar_start, Smenu_bar_start, 0, 1, "i", +DEFUN ("menu-bar-open", Fmenu_bar_open, Smenu_bar_open, 0, 1, "i", doc: /* Start key navigation of the menu bar in FRAME. This initially opens the first menu bar item and you can then navigate with the arrow keys, select a menu entry with the return key or cancel with the @@ -3771,7 +3771,7 @@ The enable predicate for a menu command should check this variable. */); defsubr (&Sx_popup_menu); #if defined (USE_GTK) || defined (USE_X_TOOLKIT) - defsubr (&Smenu_bar_start); + defsubr (&Smenu_bar_open); #endif #ifdef HAVE_MENUS From 0e00a9dc33e11941e9caa4159ec0507018fc740d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 1 Jun 2006 06:40:28 +0000 Subject: [PATCH 239/403] * screen.texi (Menu Bar): Change menu-bar-start to menu-bar-open. --- man/ChangeLog | 4 ++++ man/screen.texi | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index e406caef57d..7e52afc7471 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-06-01 Jan Dj,Ad(Brv + + * screen.texi (Menu Bar): Change menu-bar-start to menu-bar-open. + 2006-05-31 Michael Ernst * ediff.texi: Fix typos. diff --git a/man/screen.texi b/man/screen.texi index 8a5d3e1a42c..f641001579a 100644 --- a/man/screen.texi +++ b/man/screen.texi @@ -320,7 +320,7 @@ here, as you can more easily see them yourself. @kindex M-` @kindex F10 @findex tmm-menubar -@findex menu-bar-start +@findex menu-bar-open On a graphical display, you can use the mouse to choose a command from the menu bar. A right-arrow at the end of the menu item means it leads to a subsidiary menu; @samp{...} at the end means that the @@ -328,7 +328,7 @@ command invoked will read arguments (further input from you) before it actually does anything. You can also invoke the first menu bar item by pressing @key{F10} (to run -the command @code{menu-bar-start}). You can then navigate the menus with +the command @code{menu-bar-open}). You can then navigate the menus with the arrow keys. You select an item by pressing @key{RET} and cancel menu navigation with @key{ESC}. From f84173d358185ae88602b49425d48029bd9c72e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 1 Jun 2006 06:40:43 +0000 Subject: [PATCH 240/403] * gtkutil.c (menu_nav_ended): Change x-menu-bar-start to menu-bar-open. --- src/gtkutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gtkutil.c b/src/gtkutil.c index a5022c7cfe5..7d9778bfd53 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1970,7 +1970,7 @@ xg_create_one_menuitem (item, f, select_cb, highlight_cb, cl_data, group) return w; } -/* Callback called when keyboard traversal (started by x-menu-bar-start) ends. +/* Callback called when keyboard traversal (started by menu-bar-open) ends. WMENU is the menu for which traversal has been done. DATA points to the frame for WMENU. We must release grabs, some bad interaction between GTK and Emacs makes the menus keep the grabs. */ From 4054794d5825ab8efba399c681a9b998f2bd355e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 1 Jun 2006 06:42:22 +0000 Subject: [PATCH 241/403] * term/x-win.el: Change x-menu-bar-start to menu-bar-open. --- lisp/ChangeLog | 4 ++++ lisp/term/x-win.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9be1c0ead8b..5539538df5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-06-01 Jan Dj,Ad(Brv + + * term/x-win.el: Change x-menu-bar-start to menu-bar-open. + 2006-06-01 Nick Roberts * progmodes/gdb-ui.el (gdb-look-up-stack): New variable. diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index ab16bb7dfaf..494143b6fcc 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -2517,8 +2517,8 @@ order until succeed.") (global-set-key [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) ;; Let F10 do menu bar navigation. -(and (fboundp 'menu-bar-start) - (global-set-key [f10] 'menu-bar-start)) +(and (fboundp 'menu-bar-open) + (global-set-key [f10] 'menu-bar-open)) ;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 ;;; x-win.el ends here From 2e92a7cbd6126487315aa3fc2d1e1f5faa84292d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Thu, 1 Jun 2006 08:57:37 +0000 Subject: [PATCH 242/403] * xmenu.c (syms_of_xmenu): Make accelerate-menu an alias for menu-bar-open. --- src/ChangeLog | 5 +++++ src/xmenu.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index fc6b3cd48e7..78ce1234a32 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-06-01 Jan Dj,Ad(Brv + + * xmenu.c (syms_of_xmenu): Make accelerate-menu an alias for + menu-bar-open. + 2006-06-01 Jan Dj,Ad(Brv * xmenu.c (Fmenu_bar_open, syms_of_xmenu): Change menu-bar-start to diff --git a/src/xmenu.c b/src/xmenu.c index f2b5f9f0c07..5a71d82a424 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -3772,6 +3772,8 @@ The enable predicate for a menu command should check this variable. */); #if defined (USE_GTK) || defined (USE_X_TOOLKIT) defsubr (&Smenu_bar_open); + Fdefalias (intern ("accelerate-menu"), intern (Smenu_bar_open.symbol_name), + Qnil); #endif #ifdef HAVE_MENUS From 36f0107c0b82922b89d2812ed01bb3c3a6ed1ad2 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Thu, 1 Jun 2006 09:37:18 +0000 Subject: [PATCH 243/403] (mac_handle_visibility_change): Set buf.arg to Qnil. (XTread_socket): Remove obsolete comment. --- src/ChangeLog | 5 +++++ src/macterm.c | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 78ce1234a32..3999209f97e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-06-01 YAMAMOTO Mitsuharu + + * macterm.c (mac_handle_visibility_change): Set buf.arg to Qnil. + (XTread_socket): Remove obsolete comment. + 2006-06-01 Jan Dj,Ad(Brv * xmenu.c (syms_of_xmenu): Make accelerate-menu an alias for diff --git a/src/macterm.c b/src/macterm.c index c86ad0ffde3..0d166595773 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -6134,6 +6134,7 @@ mac_handle_visibility_change (f) EVENT_INIT (buf); buf.kind = DEICONIFY_EVENT; XSETFRAME (buf.frame_or_window, f); + buf.arg = Qnil; kbd_buffer_store_event (&buf); } else if (! NILP (Vframe_list) && ! NILP (XCDR (Vframe_list))) @@ -6147,6 +6148,7 @@ mac_handle_visibility_change (f) EVENT_INIT (buf); buf.kind = ICONIFY_EVENT; XSETFRAME (buf.frame_or_window, f); + buf.arg = Qnil; kbd_buffer_store_event (&buf); } @@ -8338,9 +8340,10 @@ x_find_ccl_program (fontp) } #if USE_MAC_FONT_PANEL -/* The first call to font panel functions (FPIsFontPanelVisible, - SetFontInfoForSelection) is slow. This variable is used for - deferring such a call as much as possible. */ +/* Whether Font Panel has been shown before. The first call to font + panel functions (FPIsFontPanelVisible, SetFontInfoForSelection) is + slow. This variable is used for deferring such a call as much as + possible. */ static int font_panel_shown_p = 0; int @@ -9866,10 +9869,6 @@ XTread_socket (sd, expected, hold_quit) struct frame *f; unsigned long timestamp; - /* It is necessary to set this (additional) argument slot of an - event to nil because keyboard.c protects incompletely - processed event from being garbage collected by placing them - in the kbd_buffer_gcpro vector. */ EVENT_INIT (inev); inev.kind = NO_EVENT; inev.arg = Qnil; From a71a77046d9afc7ffaef3fa67b5e9b4434a2f0a9 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 1 Jun 2006 13:52:42 +0000 Subject: [PATCH 244/403] *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3999209f97e..d51e67b4a12 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-06-01 Kim F. Storm + + * dispnew.c (sit_for): Perform redisplay even if input is pending + when redisplay-dont-pause is non-nil. + 2006-06-01 YAMAMOTO Mitsuharu * macterm.c (mac_handle_visibility_change): Set buf.arg to Qnil. From 29bcbe54e131e03bb3a4d41c35dfbf5a7a8c0bfb Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 1 Jun 2006 13:53:19 +0000 Subject: [PATCH 245/403] (sit_for): Perform redisplay even if input is pending when redisplay-dont-pause is non-nil. --- src/dispnew.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dispnew.c b/src/dispnew.c index da5e9c6e398..e88029b827f 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -6405,7 +6405,10 @@ sit_for (sec, usec, reading, display, initial_display) { swallow_events (display); - if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_kbd_macro)) + if ((detect_input_pending_run_timers (display) + && !redisplay_dont_pause) + || !NILP (Vexecuting_kbd_macro)) + return Qnil; if (initial_display) From 24a71bb14092f0f789d7412c278c45079f791477 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 1 Jun 2006 14:07:33 +0000 Subject: [PATCH 246/403] *** empty log message *** --- src/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d51e67b4a12..6584d610532 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2006-06-01 Micha,Ak(Bl Cadilhac + + * process.c (deleted_pid_list): New variable to store the pids + of deleted processes. Declare it only if SIGCHLD is defined. + (init_process): Initialize it. + (syms_of_process): Staticpro it. + (Fdelete_process): Add pid of the deleted process to it. Check after + the addition and before the kill if the process is already stopped, + in which case it is deleted from the list and not killed. + (sigchld_handler): Define it only if SIGCHLD is. Search the process + that signaled Emacs in `deleted_pid_list' before `Vprocess_alist'. + Original idea by Stefan Monnier. + 2006-06-01 Kim F. Storm * dispnew.c (sit_for): Perform redisplay even if input is pending From a5cfdda8adae935411ed4bf9a11999ccdb8b956a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Thu, 1 Jun 2006 14:08:25 +0000 Subject: [PATCH 247/403] =?UTF-8?q?2006-06-01=20=20Micha=C3=ABl=20Cadilhac?= =?UTF-8?q?=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (deleted_pid_list): New variable to store the pids of deleted processes. Declare it only if SIGCHLD is defined. (init_process): Initialize it. (syms_of_process): Staticpro it. (Fdelete_process): Add pid of the deleted process to it. Check after the addition and before the kill if the process is already stopped, in which case it is deleted from the list and not killed. (sigchld_handler): Define it only if SIGCHLD is. Search the process that signaled Emacs in `deleted_pid_list' before `Vprocess_alist'. Original idea by Stefan Monnier. --- src/process.c | 65 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 8 deletions(-) diff --git a/src/process.c b/src/process.c index 3366a3f1006..f2c2ddf3e14 100644 --- a/src/process.c +++ b/src/process.c @@ -778,6 +778,16 @@ get_process (name) return proc; } + +#ifdef SIGCHLD +/* Fdelete_process promises to immediately forget about the process, but in + reality, Emacs needs to remember those processes until they have been + treated by sigchld_handler; otherwise this handler would consider the + process as being synchronous and say that the synchronous process is + dead. */ +static Lisp_Object deleted_pid_list; +#endif + DEFUN ("delete-process", Fdelete_process, Sdelete_process, 1, 1, 0, doc: /* Delete PROCESS: kill it and forget about it immediately. PROCESS may be a process, a buffer, the name of a process or buffer, or @@ -799,12 +809,31 @@ nil, indicating the current buffer's process. */) } else if (XINT (p->infd) >= 0) { - Fkill_process (process, Qnil); - /* Do this now, since remove_process will make sigchld_handler do nothing. */ - p->status - = Fcons (Qsignal, Fcons (make_number (SIGKILL), Qnil)); - XSETINT (p->tick, ++process_tick); - status_notify (p); +#ifdef SIGCHLD + Lisp_Object symbol; + + /* No problem storing the pid here, as it is still in Vprocess_alist. */ + deleted_pid_list = Fcons (make_fixnum_or_float (p->pid), + /* GC treated elements set to nil. */ + Fdelq (Qnil, deleted_pid_list)); + /* If the process has already signaled, remove it from the list. */ + if (p->raw_status_new) + update_status (p); + symbol = p->status; + if (CONSP (p->status)) + symbol = XCAR (p->status); + if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) + Fdelete (make_fixnum_or_float (p->pid), deleted_pid_list); + else +#endif + { + Fkill_process (process, Qnil); + /* Do this now, since remove_process will make sigchld_handler do nothing. */ + p->status + = Fcons (Qsignal, Fcons (make_number (SIGKILL), Qnil)); + XSETINT (p->tick, ++process_tick); + status_notify (p); + } } remove_process (process); return Qnil; @@ -6335,6 +6364,7 @@ kill_buffer_processes (buffer) ** Malloc WARNING: This should never call malloc either directly or indirectly; if it does, that is a bug */ +#ifdef SIGCHLD SIGTYPE sigchld_handler (signo) int signo; @@ -6392,6 +6422,15 @@ sigchld_handler (signo) /* Find the process that signaled us, and record its status. */ + /* The process can have been deleted by Fdelete_process. */ + tail = Fmember (make_fixnum_or_float (pid), deleted_pid_list); + if (!NILP (tail)) + { + Fsetcar (tail, Qnil); + goto sigchld_end_of_loop; + } + + /* Otherwise, if it is asynchronous, it is in Vprocess_alist. */ p = 0; for (tail = Vprocess_alist; GC_CONSP (tail); tail = XCDR (tail)) { @@ -6443,8 +6482,8 @@ sigchld_handler (signo) EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); } - /* There was no asynchronous process found for that id. Check - if we have a synchronous process. */ + /* There was no asynchronous process found for that pid: we have + a synchronous process. */ else { synch_process_alive = 0; @@ -6461,6 +6500,9 @@ sigchld_handler (signo) EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); } + sigchld_end_of_loop: + ; + /* On some systems, we must return right away. If any more processes want to signal us, we will get another signal. @@ -6477,6 +6519,7 @@ sigchld_handler (signo) #endif /* USG, but not HPUX with WNOHANG */ } } +#endif /* SIGCHLD */ static Lisp_Object @@ -6862,6 +6905,9 @@ init_process () FD_SET (0, &input_wait_mask); Vprocess_alist = Qnil; +#ifdef SIGCHLD + deleted_pid_list = Qnil; +#endif for (i = 0; i < MAXDESC; i++) { chan_process[i] = Qnil; @@ -7000,6 +7046,9 @@ syms_of_process () staticpro (&Qlast_nonmenu_event); staticpro (&Vprocess_alist); +#ifdef SIGCHLD + staticpro (&deleted_pid_list); +#endif DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes, doc: /* *Non-nil means delete processes immediately when they exit. From 6a8aec41a3d465217a7d998cae05bd640a748a2f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 1 Jun 2006 21:04:58 +0000 Subject: [PATCH 248/403] Whitespace changes. --- src/dispnew.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index e88029b827f..89e2673d6c2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -355,8 +355,7 @@ static unsigned history_tick; static void add_frame_display_history P_ ((struct frame *, int)); static void add_window_display_history P_ ((struct window *, char *, int)); - - + /* Add to the redisplay history how window W has been displayed. MSG is a trace containing the information how W's glyph matrix has been constructed. PAUSED_P non-zero means that the update @@ -6408,7 +6407,6 @@ sit_for (sec, usec, reading, display, initial_display) if ((detect_input_pending_run_timers (display) && !redisplay_dont_pause) || !NILP (Vexecuting_kbd_macro)) - return Qnil; if (initial_display) From 5d72601f6a6570b108573d346da64bbccc0cb8de Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 2 Jun 2006 02:04:15 +0000 Subject: [PATCH 249/403] (comint-send-input): Do not add help-echo and mouse-face to input if `comint-use-prompt-regexp' is non-nil. --- lisp/comint.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index 20b7817b9dc..eb5c9f28a4e 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1047,12 +1047,12 @@ Moves relative to `comint-input-ring-index'." (defun comint-previous-input (arg) "Cycle backwards through input history, saving input." (interactive "*p") - (if (and comint-input-ring-index + (if (and comint-input-ring-index (or ;; leaving the "end" of the ring (and (< arg 0) ; going down (eq comint-input-ring-index 0)) (and (> arg 0) ; going up - (eq comint-input-ring-index + (eq comint-input-ring-index (1- (ring-length comint-input-ring))))) comint-stored-incomplete-input) (comint-restore-input) @@ -1510,23 +1510,23 @@ Similarly for Soar, Scheme, etc." (concat input "\n"))) (let ((beg (marker-position pmark)) - (end (if no-newline (point) (1- (point)))) - (inhibit-modification-hooks t)) + (end (if no-newline (point) (1- (point)))) + (inhibit-modification-hooks t)) (when (> end beg) - ;; Set text-properties for the input field - (add-text-properties - beg end - '(front-sticky t - font-lock-face comint-highlight-input - mouse-face highlight - help-echo "mouse-2: insert after prompt as new input")) + (add-text-properties beg end + '(front-sticky t + font-lock-face comint-highlight-input)) (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))) + (add-text-properties + beg end + '(mouse-face highlight + help-echo "mouse-2: insert after prompt as new input" + field input)))) (unless (or no-newline comint-use-prompt-regexp) ;; Cover the terminating newline (add-text-properties end (1+ end) From 4c7d938d858907da4708b4fafe52e1c0fc5e6975 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 2 Jun 2006 02:07:11 +0000 Subject: [PATCH 250/403] (inferior-lisp-mode): Doc fixes. --- lisp/progmodes/inf-lisp.el | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index 092c7736c27..4a50e00063c 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -233,30 +233,37 @@ documentation for variable `inferior-lisp-buffer'. \\{inferior-lisp-mode-map} -Customisation: Entry to this mode runs the hooks on `comint-mode-hook' and +Customization: Entry to this mode runs the hooks on `comint-mode-hook' and `inferior-lisp-mode-hook' (in that order). You can send text to the inferior Lisp process from other buffers containing Lisp source. - switch-to-lisp switches the current buffer to the Lisp process buffer. - lisp-eval-defun sends the current defun to the Lisp process. - lisp-compile-defun compiles the current defun. - lisp-eval-region sends the current region to the Lisp process. - lisp-compile-region compiles the current region. + `switch-to-lisp' switches the current buffer to the Lisp process buffer. + `lisp-eval-defun' sends the current defun to the Lisp process. + `lisp-compile-defun' compiles the current defun. + `lisp-eval-region' sends the current region to the Lisp process. + `lisp-compile-region' compiles the current region. Prefixing the lisp-eval/compile-defun/region commands with a \\[universal-argument] causes a switch to the Lisp process buffer after sending the text. -Commands: -Return after the end of the process' output sends the text from the +Commands:\\ +\\[comint-send-input] after the end of the process' output sends the text from the end of process to point. -Return before the end of the process' output copies the sexp ending at point +\\[comint-send-input] before the end of the process' output copies the sexp ending at point to the end of the process' output, and sends it. -Delete converts tabs to spaces as it moves back. -Tab indents for Lisp; with argument, shifts rest +\\[comint-copy-old-input] copies the sexp ending at point to the end of the process' output, + allowing you to edit it before sending it. +If `comint-use-prompt-regexp' is nil (the default), \\[comint-insert-input] on old input + copies the entire old input to the end of the process' output, allowing + you to edit it before sending it. When not used on old input, or if + `comint-use-prompt-regexp' is non-nil, \\[comint-insert-input] behaves according to + its global binding. +\\[backward-delete-char-untabify] converts tabs to spaces as it moves back. +\\[lisp-indent-line] indents for Lisp; with argument, shifts rest of expression rigidly with the current line. -C-M-q does Tab on each line starting within following expression. +\\[indent-sexp] does \\[lisp-indent-line] on each line starting within following expression. Paragraphs are separated only by blank lines. Semicolons start comments. If you accidentally suspend your process, use \\[comint-continue-subjob] to continue it." From 933907e9fa3a240eac97c9768447d0b2adc7874e Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 2 Jun 2006 02:09:19 +0000 Subject: [PATCH 251/403] (shell-mode): Use shell-mode-map in docstring. --- lisp/shell.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/shell.el b/lisp/shell.el index 6e87ba41d37..6b22ac79238 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -367,7 +367,7 @@ Thus, this does not include the shell's current directory.") (put 'shell-mode 'mode-class 'special) (define-derived-mode shell-mode comint-mode "Shell" - "Major mode for interacting with an inferior shell. + "Major mode for interacting with an inferior shell.\\ \\[comint-send-input] after the end of the process' output sends the text from the end of process to the end of the current line. \\[comint-send-input] before end of process output copies the current line minus the prompt to From f3aead2ff7a4506bde0383f016257d51b75ccf95 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 2 Jun 2006 02:12:22 +0000 Subject: [PATCH 252/403] (Splitting Windows): Clarify splitting nonselected window. --- lispref/windows.texi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lispref/windows.texi b/lispref/windows.texi index a2746889633..af73339a311 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi @@ -161,10 +161,8 @@ The two ``halves'' of the split window initially display the same buffer previously visible in the window that was split. @deffn Command split-window &optional window size horizontal -This function splits @var{window} into two windows. The original -window @var{window} remains the selected window, but occupies only -part of its former screen area. The rest is occupied by a newly created -window which is returned as the value of this function. +This function splits a new window out of @var{window}'s screen area. +It returns the new window. If @var{horizontal} is non-@code{nil}, then @var{window} splits into two side by side windows. The original window @var{window} keeps the @@ -175,11 +173,13 @@ lines to the new window. The original window is therefore the left-hand or upper of the two, and the new window is the right-hand or lower. -If @var{window} is omitted or @code{nil}, then the selected window is -split. If @var{size} is omitted or @code{nil}, then @var{window} is -divided evenly into two parts. (If there is an odd line, it is -allocated to the new window.) When @code{split-window} is called -interactively, all its arguments are @code{nil}. +If @var{window} is omitted or @code{nil}, that stands for the selected +window. When you split the selected window, it remains selected. + +If @var{size} is omitted or @code{nil}, then @var{window} is divided +evenly into two parts. (If there is an odd line, it is allocated to +the new window.) When @code{split-window} is called interactively, +all its arguments are @code{nil}. If splitting would result in making a window that is smaller than @code{window-min-height} or @code{window-min-width}, the function From 19ca94ce908e57420e9579392f071575fe31427e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 2 Jun 2006 02:12:45 +0000 Subject: [PATCH 253/403] (Fsplit_window): Doc fix. --- src/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/window.c b/src/window.c index 20bf204e76b..acb4c5cfbdd 100644 --- a/src/window.c +++ b/src/window.c @@ -3778,7 +3778,9 @@ SIZE includes that window's scroll bar, or the divider column to its right. Interactively, all arguments are nil. Returns the newly created window (which is the lower or rightmost one). -The upper or leftmost window is the original one and remains selected. +The upper or leftmost window is the original one, and remains selected +if it was selected before. + See Info node `(elisp)Splitting Windows' for more details and examples.*/) (window, size, horflag) Lisp_Object window, size, horflag; From 963128f36a23a39049b3cbc182c709cfe1543be4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 2 Jun 2006 02:12:52 +0000 Subject: [PATCH 254/403] *** empty log message *** --- lisp/ChangeLog | 2 ++ lispref/ChangeLog | 5 +++++ src/ChangeLog | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5539538df5d..da45695a2c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -82,6 +82,8 @@ 2006-05-29 Richard Stallman + * window.el (fit-window-to-buffer): Doc fix. + * help.el (temp-buffer-max-height): Doc fix. * subr.el (with-current-buffer): Doc fix. diff --git a/lispref/ChangeLog b/lispref/ChangeLog index e0f53dd26e1..722a2baa71a 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-06-01 Richard Stallman + + * windows.texi (Splitting Windows): Clarify splitting nonselected + window. + 2006-05-31 Juri Linkov * minibuf.texi (Minibuffer History): Add history-add-new-input. diff --git a/src/ChangeLog b/src/ChangeLog index 6584d610532..c74958d68b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-06-01 Richard Stallman + + * window.c (Fsplit_window): Doc fix. + 2006-06-01 Micha,Ak(Bl Cadilhac * process.c (deleted_pid_list): New variable to store the pids From 90d40a35c377d94a1bd9181ad53e62a74099fd43 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 2 Jun 2006 02:15:46 +0000 Subject: [PATCH 255/403] *** empty log message *** --- lisp/ChangeLog | 9 +++++++++ man/ChangeLog | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index da45695a2c4..f4ed60dc75e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2006-06-01 Luc Teirlinck + + * progmodes/inf-lisp.el (inferior-lisp-mode): Doc fixes. + + * shell.el (shell-mode): Use shell-mode-map in docstring. + + * comint.el (comint-send-input): Do not add help-echo and + mouse-face to input if `comint-use-prompt-regexp' is non-nil. + 2006-06-01 Jan Dj,Ad(Brv * term/x-win.el: Change x-menu-bar-start to menu-bar-open. diff --git a/man/ChangeLog b/man/ChangeLog index 7e52afc7471..e4280d404d8 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2006-06-01 Luc Teirlinck + + * misc.texi (Shell History Copying): Update descriptions of `C-c RET' + and Mouse-2. + 2006-06-01 Jan Dj,Ad(Brv * screen.texi (Menu Bar): Change menu-bar-start to menu-bar-open. From 55f626914e8e48e68673c4082a932b4c431f4c0d Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Fri, 2 Jun 2006 02:18:58 +0000 Subject: [PATCH 256/403] (Shell History Copying): Update descriptions of `C-c RET' and Mouse-2. --- man/misc.texi | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/man/misc.texi b/man/misc.texi index b8c3c133a60..88659aa4528 100644 --- a/man/misc.texi +++ b/man/misc.texi @@ -873,17 +873,21 @@ Move point to the previous prompt (@code{comint-previous-prompt}). Move point to the following prompt (@code{comint-next-prompt}). @kindex C-c RET @r{(Shell mode)} -@findex comint-insert-input +@findex comint-copy-old-input @item C-c @key{RET} Copy the input command which point is in, inserting the copy at the end -of the buffer (@code{comint-insert-input}). This is useful if you +of the buffer (@code{comint-copy-old-input}). This is useful if you move point back to a previous command. After you copy the command, you can submit the copy as input with @key{RET}. If you wish, you can -edit the copy before resubmitting it. +edit the copy before resubmitting it. If you use this command on an +output line, it copies that line to the end of the buffer. @item Mouse-2 -Copy the input command that you click on, inserting the copy at the end -of the buffer. +If @code{comint-use-prompt-regexp} is @code{nil} (the default), copy +the old input command that you click on, inserting the copy at the end +of the buffer (@code{comint-insert-input}). If +@code{comint-use-prompt-regexp} is non-@code{nil}, or if the click is +not over old input, just yank as usual. @end table Moving to a previous input and then copying it with @kbd{C-c From eb3d96092ad3fc6b8a29e5f58dafa89338ba2b58 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Fri, 2 Jun 2006 02:38:53 +0000 Subject: [PATCH 257/403] (compilation-error-regexp-alist-alist::gcov-*): Almost rewrite. Underlines over all lines of gcov output are too uncomfortable to read. --- lisp/ChangeLog | 7 +++++++ lisp/progmodes/compile.el | 35 +++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f4ed60dc75e..99a3a0d04ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2006-06-02 Masatake YAMATO + + * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-*): + + Almost rewrite. Underlines over all lines of gcov output are too + uncomfortable to read. Suggested by Dan Nicolaescu. + 2006-06-01 Luc Teirlinck * progmodes/inf-lisp.el (inferior-lisp-mode): Doc fixes. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1649a2533ba..5da86972ec5 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -293,15 +293,34 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column = \\([0-9]+\\)\\)?" \\(?:: \\(warning:\\)?\\|$\\| ),\\)" 1 2 nil (3)) (gcov-file - "^ +-: \\(0\\):Source:\\(.+\\)$" 2 1 nil 0) - (gcov-bb-file - "^ +-: \\(0\\):Object:\\(?:.+\\)$" nil 1 nil 0) - (gcov-never-called-line - "^ +\\(#####\\): +\\([0-9]+\\):.+$" nil 2 nil 2 nil - (1 compilation-error-face)) + "^ *-: *\\(0\\):Source:\\(.+\\)$" + 2 1 nil 0 nil + (1 compilation-line-face prepend) (2 compilation-info-face prepend)) + (gcov-header + "^ *-: *\\(0\\):\\(?:Object\\|Graph\\|Data\\|Runs\\|Programs\\):.+$" + nil 1 nil 0 nil + (1 compilation-line-face prepend)) + ;; Underlines over all lines of gcov output are too uncomfortable to read. + ;; However, hyperlinks embedded in the lines are useful. + ;; So I put default face on the lines; and then put + ;; compilation-*-face by manually to eliminate the underlines. + ;; The hyperlinks are still effective. + (gcov-nomark + "^ *-: *\\([1-9]\\|[0-9]\\{2,\\}\\):.*$" + nil 1 nil 0 nil + (0 'default t) + (1 compilation-line-face prepend)) (gcov-called-line - "^ *[0-9]+: +\\([1-9]\\|[0-9]\\{2,\\}\\):.*$" nil 1 nil 0) -) + "^ *\\([0-9]+\\): *\\([0-9]+\\):.*$" + nil 2 nil 0 nil + (0 'default t) + (1 compilation-info-face prepend) (2 compilation-line-face prepend)) + (gcov-never-called + "^ *\\(#####\\): *\\([0-9]+\\):.*$" + nil 2 nil 2 nil + (0 'default t) + (1 compilation-error-face prepend) (2 compilation-line-face prepend)) + ) "Alist of values for `compilation-error-regexp-alist'.") (defcustom compilation-error-regexp-alist From 08a61c99b53c83365d466effb2bfbe94ce6a0e2c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 2 Jun 2006 03:30:24 +0000 Subject: [PATCH 258/403] (with-current-buffer): Doc fix. --- lisp/ChangeLog | 5 ++++- lisp/subr.el | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 99a3a0d04ec..55e33540dbe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,10 @@ +2006-06-01 Richard Stallman + + * subr.el (with-current-buffer): Doc fix. + 2006-06-02 Masatake YAMATO * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-*): - Almost rewrite. Underlines over all lines of gcov output are too uncomfortable to read. Suggested by Dan Nicolaescu. diff --git a/lisp/subr.el b/lisp/subr.el index 993dae04181..f19142faa60 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2202,7 +2202,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again." ;;;; Lisp macros to do various things temporarily. (defmacro with-current-buffer (buffer &rest body) - "Execute the forms in BODY with BUFFER as the current buffer. + "Execute the forms in BODY with BUFFER temporarily current. BUFFER can be a buffer or a buffer name. The value returned is the value of the last form in BODY. See also `with-temp-buffer'." From 605e71f10ee23495b4af108a650dbaf0bbb37753 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 2 Jun 2006 03:53:55 +0000 Subject: [PATCH 259/403] *** empty log message *** --- lisp/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55e33540dbe..9014741b08a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-06-02 Juri Linkov + + * international/mule.el (sgml-html-meta-auto-coding-function): + Limit the search by the end of the HTML header (if any). + 2006-06-01 Richard Stallman * subr.el (with-current-buffer): Doc fix. From b3a726d58695b200ffbd067b688dc02c383c8f7e Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 2 Jun 2006 03:54:14 +0000 Subject: [PATCH 260/403] (sgml-html-meta-auto-coding-function): Limit the search by the end of the HTML header (if any). --- lisp/international/mule.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index b66345ea3a8..c2d398b440e 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2256,7 +2256,10 @@ This function is intended to be added to `auto-coding-functions'." (setq size (min (+ (point) size) ;; Only search forward 10 lines (save-excursion - (forward-line 10) + ;; Limit the search by the end of the HTML header. + (or (search-forward "" size t) + ;; In case of no header, search only 10 lines. + (forward-line 10)) (point)))) (when (and (search-forward " Date: Fri, 2 Jun 2006 06:28:13 +0000 Subject: [PATCH 261/403] (hack-local-variables-prop-line): Ignore `char-trans' as well as `coding'. --- lisp/files.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index b4bc8f9ffec..65baa60e173 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2487,10 +2487,12 @@ and VAL is the specified value." ;; case when checking for `mode' in set-auto-mode, ;; so we must do that here as well. ;; That is inconsistent, but we're stuck with it. - ;; The same can be said for `coding' in set-auto-coding. + ;; The same can be said for `coding' and `char-trans' + ;; in set-auto-coding. (or (and (equal (downcase (symbol-name key)) "mode") (setq mode-specified t)) (equal (downcase (symbol-name key)) "coding") + (equal (downcase (symbol-name key)) "char-trans") (condition-case nil (push (cons (if (eq key 'eval) 'eval From 09e5712dd139c54f445797f70b4c014f4557eecc Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 2 Jun 2006 06:28:36 +0000 Subject: [PATCH 262/403] (enable-character-translation): Put permanent-local and safe-local-variable properties. (find-auto-coding): Handle char-trans: tag. --- lisp/international/mule.el | 41 ++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index c2d398b440e..e2e9ba62398 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1655,6 +1655,9 @@ This is used for loading and byte-compiling Emacs Lisp files.") (setq alist (cdr alist)))) coding-system)) +(put 'enable-character-translation 'permanent-local t) +(put 'enable-character-translation 'safe-local-variable 'booleanp) + (defun find-auto-coding (filename size) "Find a coding system for a file FILENAME of which SIZE bytes follow point. These bytes should include at least the first 1k of the file @@ -1692,17 +1695,20 @@ If nothing is specified, the return value is nil." (head-end (+ head-start (min size 1024))) (tail-start (+ head-start (max (- size 3072) 0))) (tail-end (+ head-start size)) - coding-system head-found tail-found pos) + coding-system head-found tail-found pos char-trans) ;; Try a short cut by searching for the string "coding:" ;; and for "unibyte:" at the head and tail of SIZE bytes. (setq head-found (or (search-forward "coding:" head-end t) - (search-forward "unibyte:" head-end t))) + (search-forward "unibyte:" head-end t) + (search-forward "char-trans:" head-end t))) (if (and head-found (> head-found tail-start)) ;; Head and tail are overlapped. (setq tail-found head-found) (goto-char tail-start) (setq tail-found (or (search-forward "coding:" tail-end t) - (search-forward "unibyte:" tail-end t)))) + (search-forward "unibyte:" tail-end t) + (search-forward "enable-character-translation:" + tail-end t)))) ;; At first check the head. (when head-found @@ -1720,12 +1726,16 @@ If nothing is specified, the return value is nil." (re-search-forward "\\(.*;\\)?[ \t]*coding:[ \t]*\\([^ ;]+\\)" head-end t)) - (setq coding-system (intern (match-string 2)))))) + (setq coding-system (intern (match-string 2)))) + (when (re-search-forward + "\\(.*;\\)?[ \t]*char-trans:[ \t]*\\([^ ;]+\\)" + head-end t) + (setq char-trans (match-string 2))))) ;; If no coding: tag in the head, check the tail. ;; Here we must pay attention to the case that the end-of-line ;; is just "\r" and we can't use "^" nor "$" in regexp. - (when (and tail-found (not coding-system)) + (when (and tail-found (or (not coding-system) (not char-trans))) (goto-char tail-start) (re-search-forward "[\r\n]\^L" nil t) (if (re-search-forward @@ -1748,6 +1758,11 @@ If nothing is specified, the return value is nil." "[\r\n]" prefix "[ \t]*unibyte[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*" suffix "[\r\n]")) + (re-char-trans + (concat + "[\r\n]" prefix + "[ \t]*enable-character-translation[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*" + suffix "[\r\n]")) (re-end (concat "[\r\n]" prefix "[ \t]*End *:[ \t]*" suffix "[\r\n]?")) @@ -1761,7 +1776,21 @@ If nothing is specified, the return value is nil." (setq coding-system 'raw-text)) (when (and (not coding-system) (re-search-forward re-coding tail-end t)) - (setq coding-system (intern (match-string 1))))))) + (setq coding-system (intern (match-string 1)))) + (when (and (not char-trans) + (re-search-forward re-char-trans tail-end t)) + (setq char-trans (match-string 1)))))) + (if coding-system + ;; If the coding-system name ends with "!", remove it and + ;; set char-trans to "nil". + (let ((name (symbol-name coding-system))) + (if (= (aref name (1- (length name))) ?!) + (setq coding-system (intern (substring name 0 -1)) + char-trans "nil")))) + (when (and char-trans + (not (setq char-trans (intern char-trans)))) + (make-local-variable 'enable-character-translation) + (setq enable-character-translation nil)) (if coding-system (cons coding-system :coding))) ;; Finally, try all the `auto-coding-functions'. From 8a3d7ed3461ccd9f5702f7b5c99f474af4d41281 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 2 Jun 2006 06:34:00 +0000 Subject: [PATCH 263/403] (hack-local-variables): Ignore `char-trans' as well as `coding'. --- lisp/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 65baa60e173..a8016a0262e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2582,7 +2582,7 @@ is specified, returning t if it is specified." (if mode-only (if (eq var 'mode) (setq result t)) - (unless (eq var 'coding) + (unless (or (eq var 'coding) (eq var 'char-trans)) (condition-case nil (push (cons (if (eq var 'eval) 'eval From 62e51d535651cd8b4242aace2f53e16c82eaf6b7 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 2 Jun 2006 06:34:41 +0000 Subject: [PATCH 264/403] (find-auto-coding): Fix previous change. --- lisp/ChangeLog | 10 ++++++++++ lisp/international/mule.el | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9014741b08a..dd2670f403e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2006-06-02 Kenichi Handa + + * files.el (hack-local-variables-prop-line): Ignore `char-trans' + as well as `coding'. + (hack-local-variables): Likewise. + + * international/mule.el (enable-character-translation): Put + permanent-local and safe-local-variable properties. + (find-auto-coding): Handle char-trans: tag. + 2006-06-02 Juri Linkov * international/mule.el (sgml-html-meta-auto-coding-function): diff --git a/lisp/international/mule.el b/lisp/international/mule.el index e2e9ba62398..d9242f7cb5d 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1707,6 +1707,7 @@ If nothing is specified, the return value is nil." (goto-char tail-start) (setq tail-found (or (search-forward "coding:" tail-end t) (search-forward "unibyte:" tail-end t) + (search-forward "char-trans:" tail-end t) (search-forward "enable-character-translation:" tail-end t)))) @@ -1761,7 +1762,7 @@ If nothing is specified, the return value is nil." (re-char-trans (concat "[\r\n]" prefix - "[ \t]*enable-character-translation[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*" + "[ \t]*\\(enable-character-translation\\|char-trans\\)[ \t]*:[ \t]*\\([^ \t\r\n]+\\)[ \t]*" suffix "[\r\n]")) (re-end (concat "[\r\n]" prefix "[ \t]*End *:[ \t]*" suffix @@ -1779,7 +1780,7 @@ If nothing is specified, the return value is nil." (setq coding-system (intern (match-string 1)))) (when (and (not char-trans) (re-search-forward re-char-trans tail-end t)) - (setq char-trans (match-string 1)))))) + (setq char-trans (match-string 2)))))) (if coding-system ;; If the coding-system name ends with "!", remove it and ;; set char-trans to "nil". From 8b2b00f51c7eb836c35ef90d6e62609bc0ca8246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 2 Jun 2006 08:49:25 +0000 Subject: [PATCH 265/403] * gtkutil.c (menu_nav_ended): Check that menubar_widget is not NULL. --- src/ChangeLog | 4 ++++ src/gtkutil.c | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c74958d68b9..a3c92e6f1a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-06-02 Jan Dj,Ad(Brv + + * gtkutil.c (menu_nav_ended): Check that menubar_widget is not NULL. + 2006-06-01 Richard Stallman * window.c (Fsplit_window): Doc fix. diff --git a/src/gtkutil.c b/src/gtkutil.c index 7d9778bfd53..2a6ed9d1524 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1981,16 +1981,20 @@ menu_nav_ended (wmenu, data) gpointer data; { FRAME_PTR f = (FRAME_PTR) data; - Display *dpy = FRAME_X_DISPLAY (f); - BLOCK_INPUT; + if (FRAME_X_OUTPUT (f)->menubar_widget) + { GtkMenuShell *w = GTK_MENU_SHELL (FRAME_X_OUTPUT (f)->menubar_widget); + Display *dpy = FRAME_X_DISPLAY (f); + + BLOCK_INPUT; gtk_menu_shell_deactivate (w); gtk_menu_shell_deselect (w); - XUngrabKeyboard (dpy, CurrentTime); - XUngrabPointer (dpy, CurrentTime); - UNBLOCK_INPUT; + XUngrabKeyboard (dpy, CurrentTime); + XUngrabPointer (dpy, CurrentTime); + UNBLOCK_INPUT; + } } From 70a4cae4681c1e6d2506b8d09fdb27c338f4d9cc Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 2 Jun 2006 09:39:54 +0000 Subject: [PATCH 266/403] (next_element_from_composition): Set it->object to it->string if composition is coming from string. (set_cursor_from_row): Don't return 0 unless row displays a continued line. (dump_glyph): Dump composite glyph. --- src/ChangeLog | 8 ++++++++ src/xdisp.c | 23 ++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a3c92e6f1a1..dccebac3ec5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2006-06-02 YAMAMOTO Mitsuharu + + * xdisp.c (next_element_from_composition): Set it->object to + it->string if composition is coming from string. + (set_cursor_from_row): Don't return 0 unless row displays a + continued line. + (dump_glyph): Dump composite glyph. + 2006-06-02 Jan Dj,Ad(Brv * gtkutil.c (menu_nav_ended): Check that menubar_widget is not NULL. diff --git a/src/xdisp.c b/src/xdisp.c index aa0625532ab..80237e89fa1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6238,6 +6238,8 @@ next_element_from_composition (it) it->position = (STRINGP (it->string) ? it->current.string_pos : it->current.pos); + if (STRINGP (it->string)) + it->object = it->string; return 1; } @@ -11777,7 +11779,7 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) /* If we reached the end of the line, and end was from a string, cursor is not on this line. */ - if (glyph == end) + if (glyph == end && row->continued_p) return 0; } @@ -14961,6 +14963,25 @@ dump_glyph (row, glyph, area) glyph->left_box_line_p, glyph->right_box_line_p); } + else if (glyph->type == COMPOSITE_GLYPH) + { + fprintf (stderr, + " %5d %4c %6d %c %3d 0x%05x %c %4d %1.1d%1.1d\n", + glyph - row->glyphs[TEXT_AREA], + '+', + glyph->charpos, + (BUFFERP (glyph->object) + ? 'B' + : (STRINGP (glyph->object) + ? 'S' + : '-')), + glyph->pixel_width, + glyph->u.cmp_id, + '.', + glyph->face_id, + glyph->left_box_line_p, + glyph->right_box_line_p); + } } From 3196bfd28616c4250f6afe532c891dbe7403badf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 2 Jun 2006 09:48:28 +0000 Subject: [PATCH 267/403] (EMACS): Remove quotes from the Emacs executable file name. (emacs): Enclose the value of $(EMACS) in quotes. --- lisp/makefile.w32-in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 15fab808381..16c2ae15441 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -33,7 +33,7 @@ srcdir = $(CURDIR)/.. # You can specify a different executable on the make command line, # e.g. "make EMACS=../src/emacs ...". -EMACS = "$(THISDIR)/../bin/emacs.exe" +EMACS = $(THISDIR)/../bin/emacs.exe # Command line flags for Emacs. This must include --multibyte, # otherwise some files will not compile. @@ -61,8 +61,11 @@ COMPILE_FIRST = \ $(lisp)/progmodes/cc-vars.el # The actual Emacs command run in the targets below. +# The quotes around $(EMACS) are here because the user could type +# it with forward slashes and without quotes, which will fail if +# the shell is cmd.exe. -emacs = $(EMACS) $(EMACSOPT) +emacs = "$(EMACS)" $(EMACSOPT) # Common command to find subdirectories From 9c51bb6a95c3fcd63a51d7435e0fae230225faf4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 2 Jun 2006 10:13:20 +0000 Subject: [PATCH 268/403] Add Make 3.81 to the list of Make & shell combinations known to work. --- nt/INSTALL | 1 + 1 file changed, 1 insertion(+) diff --git a/nt/INSTALL b/nt/INSTALL index f9231d4b704..dc289531472 100644 --- a/nt/INSTALL +++ b/nt/INSTALL @@ -127,6 +127,7 @@ cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5] mingw32 compiled make 3.79.1: okay okay mingw32 compiled make 3.80: okay unknown[6] + mingw32 compiled make 3.81: okay okay[7] Notes: From 3d80c94156fe6e9e750058edf091b638401cc248 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 2 Jun 2006 10:13:43 +0000 Subject: [PATCH 269/403] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ nt/ChangeLog | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dd2670f403e..492cc7a73ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2006-06-02 Eli Zaretskii + + * makefile.w32-in (EMACS): Remove quotes from the Emacs executable + file name. + (emacs): Enclose the value of $(EMACS) in quotes. + 2006-06-02 Kenichi Handa * files.el (hack-local-variables-prop-line): Ignore `char-trans' diff --git a/nt/ChangeLog b/nt/ChangeLog index e0a5a417528..96594144135 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2006-06-02 Eli Zaretskii + + * INSTALL: Add Make 3.81 to the list of Make & shell combinations + known to work. + 2006-03-12 Jason Rumney * addpm.c (add_registry): Don't change the registry unless keys From 56f41f98c0536b58e5f2bfeb8e0675d64796125b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 2 Jun 2006 16:35:59 +0000 Subject: [PATCH 270/403] * xfns.c (x_set_icon_name): No-op if arg is non-nil and not a string. --- src/ChangeLog | 5 +++++ src/xfns.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index dccebac3ec5..06144ce5498 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-06-02 Chong Yidong + + * xfns.c (x_set_icon_name): No-op if arg is non-nil and not a + string. + 2006-06-02 YAMAMOTO Mitsuharu * xdisp.c (next_element_from_composition): Set it->object to diff --git a/src/xfns.c b/src/xfns.c index 396ef8ceb64..9b9ba48ba82 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1249,7 +1249,7 @@ x_set_icon_name (f, arg, oldval) if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt)) return; } - else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil)) + else if (!NILP (arg) || NILP (oldval)) return; f->icon_name = arg; From 06c7827a7344344ea22c875189478b6d658edcd4 Mon Sep 17 00:00:00 2001 From: Romain Francoise Date: Fri, 2 Jun 2006 17:33:54 +0000 Subject: [PATCH 271/403] *** empty log message *** --- lisp/ChangeLog | 4 ++-- src/ChangeLog | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 492cc7a73ee..3602e5c9090 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -25,8 +25,8 @@ 2006-06-02 Masatake YAMATO - * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-*): - Almost rewrite. Underlines over all lines of gcov output are too + * progmodes/compile.el (compilation-error-regexp-alist-alist::gcov-*): + Almost rewrite. Underlines over all lines of gcov output are too uncomfortable to read. Suggested by Dan Nicolaescu. 2006-06-01 Luc Teirlinck diff --git a/src/ChangeLog b/src/ChangeLog index 06144ce5498..386ec5670d4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,7 +10,7 @@ (set_cursor_from_row): Don't return 0 unless row displays a continued line. (dump_glyph): Dump composite glyph. - + 2006-06-02 Jan Dj,Ad(Brv * gtkutil.c (menu_nav_ended): Check that menubar_widget is not NULL. From 21b28a27fc3d38901cc50feb1ce904712a3a2597 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 2 Jun 2006 18:17:02 +0000 Subject: [PATCH 272/403] (sgml-html-meta-auto-coding-function): Remove the condition `(search-forward "" size t) ;; In case of no header, search only 10 lines. (forward-line 10)) (point)))) - (when (and (search-forward " Date: Fri, 2 Jun 2006 18:24:59 +0000 Subject: [PATCH 273/403] *** empty log message *** --- lisp/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3602e5c9090..2d24de2c4ce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,12 @@ file name. (emacs): Enclose the value of $(EMACS) in quotes. +2006-06-02 Juri Linkov + + * international/mule.el (sgml-html-meta-auto-coding-function): + Remove the condition `(search-forward " * files.el (hack-local-variables-prop-line): Ignore `char-trans' From c1def6ea27a433be107ea99b0e2684492aea8165 Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Fri, 2 Jun 2006 18:47:44 +0000 Subject: [PATCH 274/403] (mh-folder-exists-p): Change test from an empty buffer, to one that contains the actual folder, since GNU mailutils' folder command displays output if the folder doesn't exist (closes SF #1499712). --- lisp/mh-e/mh-search.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 14891204fad..b6f8dd71d9a 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el @@ -1524,7 +1524,7 @@ construct the base name." (with-temp-buffer (mh-exec-cmd-output "folder" nil "-fast" "-nocreate" folder) (goto-char (point-min)) - (not (eobp)))))) + (looking-at (format "+?%s" folder)))))) (defun mh-msg-exists-p (msg folder) "Check if MSG exists in FOLDER." From 3f65d6f5206a47fd677036a73d8d1a0920454d05 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 2 Jun 2006 21:21:55 +0000 Subject: [PATCH 275/403] (x_set_icon_name): Don't use arg if it's not a string and not nil. --- src/ChangeLog | 5 +++++ src/w32fns.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 386ec5670d4..0b352232cb2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-06-03 Eli Zaretskii + + * w32fns.c (x_set_icon_name): Don't use arg if it's not a string + and not nil. + 2006-06-02 Chong Yidong * xfns.c (x_set_icon_name): No-op if arg is non-nil and not a diff --git a/src/w32fns.c b/src/w32fns.c index 609a88debbd..25aa22f0683 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -1683,7 +1683,7 @@ x_set_icon_name (f, arg, oldval) if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt)) return; } - else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil)) + else if (!NILP (arg) || NILP (oldval)) return; f->icon_name = arg; From 4985dde2d0220cf74334261e0f558c377d295815 Mon Sep 17 00:00:00 2001 From: John Paul Wallington Date: Fri, 2 Jun 2006 21:35:39 +0000 Subject: [PATCH 276/403] (x_set_name_internal): Set icon to `text', derived from name, when frame's icon_name isn't a string rather than only when it is nil. --- src/ChangeLog | 6 ++++++ src/xfns.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0b352232cb2..27040e76822 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-06-02 John Paul Wallington + + * xfns.c (x_set_name_internal): Set icon to `text', derived from + name, when frame's icon_name isn't a string rather than only when + it is nil. + 2006-06-03 Eli Zaretskii * w32fns.c (x_set_icon_name): Don't use arg if it's not a string diff --git a/src/xfns.c b/src/xfns.c index 9b9ba48ba82..e6772dc65d9 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1626,7 +1626,7 @@ x_set_name_internal (f, name) text.format = 8; text.nitems = bytes; - if (NILP (f->icon_name)) + if (!STRINGP (f->icon_name)) { icon = text; } From dc34c597e44738705941b4caf44afad3cfdad9a9 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 3 Jun 2006 02:31:51 +0000 Subject: [PATCH 277/403] (mac-ts-active-input-overlay): Add defvar. (mac-ae-number, mac-ae-frame, mac-ae-script-language) (mac-bytes-to-text-range, mac-ae-text-range-array) (mac-ts-update-active-input-buf, mac-split-string-by-property-change) (mac-replace-untranslated-utf-8-chars, mac-ts-update-active-input-area) (mac-ts-unicode-for-key-event): New functions. (mac-handle-toolbar-switch-mode): Use mac-ae-frame. (mac-handle-font-selection): Use mac-ae-number. (mac-ts-active-input-buf, mac-ts-update-active-input-area-seqno): New variables. (mac-ts-caret-position, mac-ts-raw-text, mac-ts-selected-raw-text) (mac-ts-converted-text, mac-ts-selected-converted-text) (mac-ts-block-fill-text, mac-ts-outline-text) (mac-ts-selected-text, mac-ts-no-hilite): New faces. (mac-ts-hilite-style-faces): New constant. (mac-apple-event-map): Bind text input events. (mac-dispatch-apple-event): Use command-execute instead of call-interactively. (global-map): Don't bind mac-apple-event. (special-event-map): Bind mac-apple-event. --- lisp/term/mac-win.el | 345 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 327 insertions(+), 18 deletions(-) diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 318503db974..5c546f77d33 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -84,6 +84,7 @@ (defvar mac-apple-event-map) (defvar mac-atsu-font-table) (defvar mac-font-panel-mode) +(defvar mac-ts-active-input-overlay) (defvar x-invocation-args) (defvar x-command-line-resources nil) @@ -1570,6 +1571,15 @@ in `selection-converter-alist', which see." (mac-coerce-ae-data (car type-data) (cdr type-data) type)) (cdr desc))))))) +(defun mac-ae-number (ae keyword) + (let ((type-data (mac-ae-parameter ae keyword)) + str) + (if (and type-data + (setq str (mac-coerce-ae-data (car type-data) + (cdr type-data) "TEXT"))) + (string-to-number str) + nil))) + (defun mac-bytes-to-integer (bytes &optional from to) (or from (setq from 0)) (or to (setq to (length bytes))) @@ -1610,6 +1620,65 @@ in `selection-converter-alist', which see." (and utf8-text (decode-coding-string utf8-text 'utf-8)))) +(defun mac-ae-text (ae) + (or (cdr (mac-ae-parameter ae nil "TEXT")) + (error "No text in Apple event."))) + +(defun mac-ae-frame (ae &optional keyword type) + (let ((bytes (cdr (mac-ae-parameter ae keyword type)))) + (if (or (null bytes) (/= (length bytes) 4)) + (error "No window reference in Apple event.") + (let ((window-id (mac-coerce-ae-data "long" bytes "TEXT")) + (rest (frame-list)) + frame) + (while (and (null frame) rest) + (if (string= (frame-parameter (car rest) 'window-id) window-id) + (setq frame (car rest))) + (setq rest (cdr rest))) + frame)))) + +(defun mac-ae-script-language (ae keyword) +;; struct WritingCode { +;; ScriptCode theScriptCode; +;; LangCode theLangCode; +;; }; + (let ((bytes (cdr (mac-ae-parameter ae keyword "intl")))) + (and bytes + (cons (mac-bytes-to-integer bytes 0 2) + (mac-bytes-to-integer bytes 2 4))))) + +(defun mac-bytes-to-text-range (bytes &optional from to) +;; struct TextRange { +;; long fStart; +;; long fEnd; +;; short fHiliteStyle; +;; }; + (or from (setq from 0)) + (or to (setq to (length bytes))) + (and (= (- to from) (+ 4 4 2)) + (list (mac-bytes-to-integer bytes from (+ from 4)) + (mac-bytes-to-integer bytes (+ from 4) (+ from 8)) + (mac-bytes-to-integer bytes (+ from 8) to)))) + +(defun mac-ae-text-range-array (ae keyword) +;; struct TextRangeArray { +;; short fNumOfRanges; +;; TextRange fRange[1]; +;; }; + (let* ((bytes (cdr (mac-ae-parameter ae keyword "tray"))) + (len (length bytes)) + nranges result) + (when (and bytes (>= len 2) + (progn + (setq nranges (mac-bytes-to-integer bytes 0 2)) + (= len (+ 2 (* nranges 10))))) + (setq result (make-vector nranges nil)) + (dotimes (i nranges) + (aset result i + (mac-bytes-to-text-range bytes (+ (* i 10) 2) + (+ (* i 10) 12))))) + result)) + (defun mac-ae-open-documents (event) "Open the documents specified by the Apple event EVENT." (interactive "e") @@ -1637,10 +1706,6 @@ in `selection-converter-alist', which see." nil t))))) (select-frame-set-input-focus (selected-frame))) -(defun mac-ae-text (ae) - (or (cdr (mac-ae-parameter ae nil "TEXT")) - (error "No text in Apple event."))) - (defun mac-ae-get-url (event) "Open the URL specified by the Apple event EVENT. Currently the `mailto' scheme is supported." @@ -1685,14 +1750,7 @@ modifiers, it changes global tool-bar visibility setting." (if (and modifiers (not (string= modifiers "\000\000\000\000"))) ;; Globally toggle tool-bar-mode if some modifier key is pressed. (tool-bar-mode) - (let ((window-id - (mac-coerce-ae-data "long" (cdr (mac-ae-parameter ae)) "TEXT")) - (rest (frame-list)) - frame) - (while (and (null frame) rest) - (if (string= (frame-parameter (car rest) 'window-id) window-id) - (setq frame (car rest))) - (setq rest (cdr rest))) + (let ((frame (mac-ae-frame ae))) (set-frame-parameter frame 'tool-bar-lines (if (= (frame-parameter frame 'tool-bar-lines) 0) 1 0)))))) @@ -1722,13 +1780,12 @@ With numeric ARG, display the font panel if and only if ARG is positive." "Change default face attributes according to font selection EVENT." (interactive "e") (let* ((ae (mac-event-ae event)) - (fm-font-size (cdr (mac-ae-parameter ae "fmsz"))) + (fm-font-size (mac-ae-number ae "fmsz")) (atsu-font-id (cdr (mac-ae-parameter ae "auid"))) (attribute-values (gethash atsu-font-id mac-atsu-font-table))) (if fm-font-size (setq attribute-values - `(:height ,(* 10 (mac-bytes-to-integer fm-font-size)) - ,@attribute-values))) + `(:height ,(* 10 fm-font-size) ,@attribute-values))) (apply 'set-face-attribute 'default (selected-frame) attribute-values))) ;; kEventClassFont/kEventFontPanelClosed @@ -1745,6 +1802,258 @@ With numeric ARG, display the font panel if and only if ARG is positive." ) ;; (fboundp 'mac-set-font-panel-visibility) +;;; Text Services +(defvar mac-ts-active-input-buf "" + "Byte sequence of the current Mac TSM active input area.") +(defvar mac-ts-update-active-input-area-seqno 0 + "Number of processed update-active-input-area events.") +(setq mac-ts-active-input-overlay (make-overlay 0 0)) + +(defface mac-ts-caret-position + '((t :inverse-video t)) + "Face for caret position in Mac TSM active input area. +This is used only when the active input area is displayed in the +echo area." + :group 'mac) + +(defface mac-ts-raw-text + '((t :underline t)) + "Face for raw text in Mac TSM active input area." + :group 'mac) + +(defface mac-ts-selected-raw-text + '((t :underline t)) + "Face for selected raw text in Mac TSM active input area." + :group 'mac) + +(defface mac-ts-converted-text + '((((background dark)) :underline "gray20") + (t :underline "gray80")) + "Face for converted text in Mac TSM active input area." + :group 'mac) + +(defface mac-ts-selected-converted-text + '((t :underline t)) + "Face for selected converted text in Mac TSM active input area." + :group 'mac) + +(defface mac-ts-block-fill-text + '((t :underline t)) + "Face for block fill text in Mac TSM active input area." + :group 'mac) + +(defface mac-ts-outline-text + '((t :underline t)) + "Face for outline text in Mac TSM active input area." + :group 'mac) + +(defface mac-ts-selected-text + '((t :underline t)) + "Face for selected text in Mac TSM active input area." + :group 'mac) + +(defface mac-ts-no-hilite + '((t :inherit default)) + "Face for no hilite in Mac TSM active input area." + :group 'mac) + +(defconst mac-ts-hilite-style-faces + '((2 . mac-ts-raw-text) ; kTSMHiliteRawText + (3 . mac-ts-selected-raw-text) ; kTSMHiliteSelectedRawText + (4 . mac-ts-converted-text) ; kTSMHiliteConvertedText + (5 . mac-ts-selected-converted-text) ; kTSMHiliteSelectedConvertedText + (6 . mac-ts-block-fill-text) ; kTSMHiliteBlockFillText + (7 . mac-ts-outline-text) ; kTSMHiliteOutlineText + (8 . mac-ts-selected-text) ; kTSMHiliteSelectedText + (9 . mac-ts-no-hilite)) ; kTSMHiliteNoHilite + "Alist of Mac TSM hilite style vs Emacs face.") + +(defun mac-ts-update-active-input-buf (text fix-len hilite-rng update-rng) + (let ((buf-len (length mac-ts-active-input-buf)) + confirmed) + (if (or (null update-rng) + (/= (% (length update-rng) 2) 0)) + ;; The parameter is missing (or in a bad format). The + ;; existing inline input session is completely replaced with + ;; the new text. + (setq mac-ts-active-input-buf text) + ;; Otherwise, the current subtext specified by the (2*j)-th + ;; range is replaced with the new subtext specified by the + ;; (2*j+1)-th range. + (let ((tail buf-len) + (i (length update-rng)) + segments rng) + (while (> i 0) + (setq i (- i 2)) + (setq rng (aref update-rng i)) + (if (and (<= 0 (cadr rng)) (< (cadr rng) tail) + (<= tail buf-len)) + (setq segments + (cons (substring mac-ts-active-input-buf (cadr rng) tail) + segments))) + (setq tail (car rng)) + (setq rng (aref update-rng (1+ i))) + (if (and (<= 0 (car rng)) (< (car rng) (cadr rng)) + (<= (cadr rng) (length text))) + (setq segments + (cons (substring text (car rng) (cadr rng)) + segments)))) + (if (and (< 0 tail) (<= tail buf-len)) + (setq segments + (cons (substring mac-ts-active-input-buf 0 tail) + segments))) + (setq mac-ts-active-input-buf (apply 'concat segments)))) + (setq buf-len (length mac-ts-active-input-buf)) + ;; Confirm (a part of) inline input session. + (cond ((< fix-len 0) + ;; Entire inline session is being confirmed. + (setq confirmed mac-ts-active-input-buf) + (setq mac-ts-active-input-buf "")) + ((= fix-len 0) + ;; None of the text is being confirmed (yet). + (setq confirmed "")) + (t + (if (> fix-len buf-len) + (setq fix-len buf-len)) + (setq confirmed (substring mac-ts-active-input-buf 0 fix-len)) + (setq mac-ts-active-input-buf + (substring mac-ts-active-input-buf fix-len)))) + (setq buf-len (length mac-ts-active-input-buf)) + ;; Update highlighting and the caret position in the new inline + ;; input session. + (remove-text-properties 0 buf-len '(cursor nil) mac-ts-active-input-buf) + (mapc (lambda (rng) + (cond ((and (= (nth 2 rng) 1) ; kTSMHiliteCaretPosition + (<= 0 (car rng)) (< (car rng) buf-len)) + (put-text-property (car rng) buf-len + 'cursor t mac-ts-active-input-buf)) + ((and (<= 0 (car rng)) (< (car rng) (cadr rng)) + (<= (cadr rng) buf-len)) + (put-text-property (car rng) (cadr rng) 'face + (cdr (assq (nth 2 rng) + mac-ts-hilite-style-faces)) + mac-ts-active-input-buf)))) + hilite-rng) + confirmed)) + +(defun mac-split-string-by-property-change (string) + (let ((tail (length string)) + head result) + (unless (= tail 0) + (while (setq head (previous-property-change tail string) + result (cons (substring string (or head 0) tail) result) + tail head))) + result)) + +(defun mac-replace-untranslated-utf-8-chars (string &optional to-string) + (or to-string (setq to-string "$,3u=(B")) + (mapconcat + (lambda (str) + (if (get-text-property 0 'untranslated-utf-8 str) to-string str)) + (mac-split-string-by-property-change string) + "")) + +(defun mac-ts-update-active-input-area (event) + "Update Mac TSM active input area according to EVENT. +The confirmed text is converted to Emacs input events and pushed +into `unread-command-events'. The unconfirmed text is displayed +either in the current buffer or in the echo area." + (interactive "e") + (let* ((ae (mac-event-ae event)) + (text (or (cdr (mac-ae-parameter ae "tstx" "utxt")) "")) + (script-language (mac-ae-script-language ae "tssl")) + (coding (or (cdr (assq (car script-language) + mac-script-code-coding-systems)) + 'mac-roman)) + (fix-len (mac-bytes-to-integer + (cdr (mac-ae-parameter ae "tsfx" "long")))) + ;; Optional parameters + (hilite-rng (mac-ae-text-range-array ae "tshi")) + (update-rng (mac-ae-text-range-array ae "tsup")) + ;;(pin-rng (mac-bytes-to-text-range (cdr (mac-ae-parameter ae "tspn" "txrn")))) + ;;(clause-offsets (cdr (mac-ae-parameter ae "tscl" "ofay"))) + (seqno (mac-ae-number ae "tsSn")) + confirmed) + (unless (= seqno mac-ts-update-active-input-area-seqno) + ;; Reset internal states if sequence number is out of sync. + (setq mac-ts-active-input-buf "")) + (setq confirmed + (mac-ts-update-active-input-buf text fix-len hilite-rng update-rng)) + (let ((use-echo-area + (or isearch-mode + (and cursor-in-echo-area (current-message)) + ;; Overlay strings are not shown in some cases. + (get-char-property (point) 'display) + (get-char-property (point) 'invisible) + (get-char-property (point) 'composition))) + active-input-string caret-seen) + ;; Decode the active input area text with inheriting faces and + ;; the caret position. + (setq active-input-string + (mapconcat + (lambda (str) + (let ((decoded (mac-utxt-to-string str coding))) + (put-text-property 0 (length decoded) 'face + (get-text-property 0 'face str) decoded) + (when (and (not caret-seen) + (get-text-property 0 'cursor str)) + (setq caret-seen t) + (if use-echo-area + (put-text-property 0 1 'face 'mac-ts-caret-position + decoded) + (put-text-property 0 1 'cursor t decoded))) + decoded)) + (mac-split-string-by-property-change mac-ts-active-input-buf) + "")) + (put-text-property 0 (length active-input-string) + 'mac-ts-active-input-string t active-input-string) + (if use-echo-area + (let (msg message-log-max) + (if (and (current-message) + ;; Don't get confused by previously displayed + ;; `active-input-string'. + (null (get-text-property 0 'mac-ts-active-input-string + (current-message)))) + (setq msg (propertize (current-message) 'display + (concat (current-message) + active-input-string))) + (setq msg active-input-string)) + (message "%s" msg) + (overlay-put mac-ts-active-input-overlay 'before-string nil)) + (move-overlay mac-ts-active-input-overlay + (point) (point) (current-buffer)) + (overlay-put mac-ts-active-input-overlay 'before-string + active-input-string)) + ;; Unread confirmed characters and insert them in a keyboard + ;; macro being defined. + (apply 'isearch-unread + (append (mac-replace-untranslated-utf-8-chars + (mac-utxt-to-string confirmed coding)) '()))) + ;; The event is successfully processed. Sync the sequence number. + (setq mac-ts-update-active-input-area-seqno (1+ seqno)))) + +(defun mac-ts-unicode-for-key-event (event) + "Convert Unicode key EVENT to Emacs key events and unread them." + (interactive "e") + (let* ((ae (mac-event-ae event)) + (text (cdr (mac-ae-parameter ae "tstx" "utxt"))) + (script-language (mac-ae-script-language ae "tssl")) + (coding (or (cdr (assq (car script-language) + mac-script-code-coding-systems)) + 'mac-roman))) + ;; Unread characters and insert them in a keyboard macro being + ;; defined. + (apply 'isearch-unread + (append (mac-replace-untranslated-utf-8-chars + (mac-utxt-to-string text coding)) '())))) + +;; kEventClassTextInput/kEventTextInputUpdateActiveInputArea +(define-key mac-apple-event-map [text-input update-active-input-area] + 'mac-ts-update-active-input-area) +;; kEventClassTextInput/kEventTextInputUnicodeForKeyEvent +(define-key mac-apple-event-map [text-input unicode-for-key-event] + 'mac-ts-unicode-for-key-event) + ;;; Services (defun mac-service-open-file () "Open the file specified by the selection value for Services." @@ -1811,17 +2120,17 @@ With numeric ARG, display the font panel if and only if ARG is positive." ;; returns it. (setcar (cdr event) (list (selected-window) (point) '(0 . 0) 0)) (if (null (mac-ae-parameter ae 'emacs-suspension-id)) - (call-interactively binding) + (command-execute binding nil (vector event) t) (condition-case err (progn - (call-interactively binding) + (command-execute binding nil (vector event) t) (mac-resume-apple-event ae)) (error (mac-ae-set-reply-parameter ae "errs" (cons "TEXT" (error-message-string err))) (mac-resume-apple-event ae -10000)))))) ; errAEEventFailed -(global-set-key [mac-apple-event] 'mac-dispatch-apple-event) +(define-key special-event-map [mac-apple-event] 'mac-dispatch-apple-event) ;; Processing of Apple events are deferred at the startup time. For ;; example, files dropped onto the Emacs application icon can only be From a05e867db70e729774f9cd27822f6b80184d7930 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 3 Jun 2006 02:32:42 +0000 Subject: [PATCH 278/403] (x_set_icon_name): Apply 2006-06-02 change for xfns.c. --- src/macfns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macfns.c b/src/macfns.c index 1f2c2d39f47..752a6a6991c 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -1592,7 +1592,7 @@ x_set_icon_name (f, arg, oldval) if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt)) return; } - else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil)) + else if (!NILP (arg) || NILP (oldval)) return; f->icon_name = arg; From a625bb4ef2f27aada39b6906c6de1b5d1f875ff9 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 3 Jun 2006 02:33:43 +0000 Subject: [PATCH 279/403] (USE_MAC_TSM): Set default to 1 on Mac OS X. --- src/macgui.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/macgui.h b/src/macgui.h index f7005600d43..a93131e565e 100644 --- a/src/macgui.h +++ b/src/macgui.h @@ -110,6 +110,13 @@ typedef unsigned long Time; #endif #endif +/* Whether to use Text Services Manager. */ +#ifndef USE_MAC_TSM +#ifdef MAC_OSX +#define USE_MAC_TSM 1 +#endif +#endif + typedef WindowPtr Window; typedef GWorldPtr Pixmap; From 02236cbc8c55400fa78800065da0fb1e0ddd2ef0 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 3 Jun 2006 02:34:11 +0000 Subject: [PATCH 280/403] (tsm_document_id) [USE_MAC_TSM]: New variable. (Qtext_input, Qupdate_active_input_area, Qunicode_for_key_event) [USE_MAC_TSM]: Likewise. (syms_of_macterm) [USE_MAC_TSM]: Intern and staticpro them. (Qbefore_string) [USE_MAC_TSM]: Add extern. (do_app_resume, do_app_suspend) [USE_MAC_TSM]: Call ActivateTSMDocument/DeactivateTSMDocument. (mac_store_event_ref_as_apple_event): Call mac_post_mouse_moved_event. (mac_handle_window_event) [USE_MAC_TSM]: Handle kEventWindowFocusAcquired/kEventWindowFocusRelinquish. (mac_handle_text_input_event) [USE_MAC_TSM]: New function. (install_window_handler) [USE_MAC_TSM]: Install it. Register kEventWindowFocusAcquired/kEventWindowFocusRelinquish. (keycode_to_xkeysym_table): Add entry for f16. (XTread_socket) [USE_MAC_TSM]: Set/reset read_socket_inev before/after passing keystroke event to toolbox dispatcher. (init_tsm) [USE_MAC_TSM]: New function. (mac_initialize) [USE_MAC_TSM]: Call it. (Vmac_ts_active_input_overlay) [USE_MAC_TSM]: New defvar. --- src/macterm.c | 272 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 267 insertions(+), 5 deletions(-) diff --git a/src/macterm.c b/src/macterm.c index 0d166595773..995422b90fc 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -8506,6 +8506,13 @@ static Lisp_Object Qtoolbar_switch_mode; extern Lisp_Object Qfont; static Lisp_Object Qpanel_closed, Qselection; #endif +#if USE_MAC_TSM +static TSMDocumentID tsm_document_id; +static Lisp_Object Qtext_input; +static Lisp_Object Qupdate_active_input_area, Qunicode_for_key_event; +static Lisp_Object Vmac_ts_active_input_overlay; +extern Lisp_Object Qbefore_string; +#endif #endif extern int mac_ready_for_apple_events; extern Lisp_Object Qundefined; @@ -8857,13 +8864,17 @@ is_emacs_window (WindowPtr win) static void do_app_resume () { - /* Window-activate events will do the job. */ +#if USE_MAC_TSM + ActivateTSMDocument (tsm_document_id); +#endif } static void do_app_suspend () { - /* Window-deactivate events will do the job. */ +#if USE_MAC_TSM + DeactivateTSMDocument (tsm_document_id); +#endif } @@ -9123,6 +9134,9 @@ mac_store_event_ref_as_apple_event (class, id, class_key, id_key, { mac_store_apple_event (class_key, id_key, &apple_event); AEDisposeDesc (&apple_event); + /* Post a harmless event so as to wake up from + ReceiveNextEvent. */ + mac_post_mouse_moved_event (); } } } @@ -9312,6 +9326,18 @@ mac_handle_window_event (next_handler, event, data) } return err == noErr ? noErr : result; #endif + +#if USE_MAC_TSM + case kEventWindowFocusAcquired: + result = CallNextEventHandler (next_handler, event); + err = ActivateTSMDocument (tsm_document_id); + return err == noErr ? noErr : result; + + case kEventWindowFocusRelinquish: + result = CallNextEventHandler (next_handler, event); + err = DeactivateTSMDocument (tsm_document_id); + return err == noErr ? noErr : result; +#endif } return eventNotHandledErr; @@ -9438,6 +9464,183 @@ mac_handle_font_event (next_handler, event, data) } #endif +#if USE_MAC_TSM +static pascal OSStatus +mac_handle_text_input_event (next_handler, event, data) + EventHandlerCallRef next_handler; + EventRef event; + void *data; +{ + OSStatus result, err = noErr; + Lisp_Object id_key = Qnil; + int num_params; + EventParamName *names; + EventParamType *types; + static UInt32 seqno_uaia = 0; + static EventParamName names_uaia[] = + {kEventParamTextInputSendComponentInstance, + kEventParamTextInputSendRefCon, + kEventParamTextInputSendSLRec, + kEventParamTextInputSendFixLen, + kEventParamTextInputSendText, + kEventParamTextInputSendUpdateRng, + kEventParamTextInputSendHiliteRng, + kEventParamTextInputSendClauseRng, + kEventParamTextInputSendPinRng, + kEventParamTextInputSendTextServiceEncoding, + kEventParamTextInputSendTextServiceMacEncoding, + EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER}; + static EventParamType types_uaia[] = + {typeComponentInstance, + typeLongInteger, + typeIntlWritingCode, + typeLongInteger, + typeUnicodeText, + typeTextRangeArray, + typeTextRangeArray, + typeOffsetArray, + typeTextRange, + typeUInt32, + typeUInt32, + typeUInt32}; + static EventParamName names_ufke[] = + {kEventParamTextInputSendComponentInstance, + kEventParamTextInputSendRefCon, + kEventParamTextInputSendSLRec, + kEventParamTextInputSendText}; + static EventParamType types_ufke[] = + {typeComponentInstance, + typeLongInteger, + typeIntlWritingCode, + typeUnicodeText}; + + result = CallNextEventHandler (next_handler, event); + + switch (GetEventKind (event)) + { + case kEventTextInputUpdateActiveInputArea: + id_key = Qupdate_active_input_area; + num_params = sizeof (names_uaia) / sizeof (names_uaia[0]); + names = names_uaia; + types = types_uaia; + SetEventParameter (event, EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER, + typeUInt32, sizeof (UInt32), &seqno_uaia); + seqno_uaia++; + break; + + case kEventTextInputUnicodeForKeyEvent: + { + EventRef kbd_event; + UInt32 actual_size, modifiers, mapped_modifiers; + UniChar code; + + err = GetEventParameter (event, kEventParamTextInputSendKeyboardEvent, + typeEventRef, NULL, sizeof (EventRef), NULL, + &kbd_event); + if (err == noErr) + err = GetEventParameter (kbd_event, kEventParamKeyModifiers, + typeUInt32, NULL, + sizeof (UInt32), NULL, &modifiers); + if (err == noErr) + { + mapped_modifiers = + (NILP (Vmac_control_modifier) ? 0 : controlKey) + | (NILP (Vmac_option_modifier) ? 0 : optionKey) + | (NILP (Vmac_command_modifier) ? 0 : cmdKey); +#ifdef MAC_OSX + mapped_modifiers |= + (NILP (Vmac_function_modifier) ? 0 : kEventKeyModifierFnMask); +#endif + if (modifiers & mapped_modifiers) + /* There're mapped modifier keys. Process it in + XTread_socket. */ + return eventNotHandledErr; + } + if (err == noErr) + err = GetEventParameter (kbd_event, kEventParamKeyUnicodes, + typeUnicodeText, NULL, 0, &actual_size, + NULL); + if (err == noErr) + { + if (actual_size == sizeof (UniChar)) + err = GetEventParameter (kbd_event, kEventParamKeyUnicodes, + typeUnicodeText, NULL, + sizeof (UniChar), NULL, &code); + if (err == noErr && code < 0x80) + { + /* ASCII character. Process it in XTread_socket. */ + if (read_socket_inev && code >= 0x20) + { + struct frame *f = mac_focus_frame (&one_mac_display_info); + + read_socket_inev->kind = ASCII_KEYSTROKE_EVENT; + read_socket_inev->code = code; + read_socket_inev->modifiers = + (extra_keyboard_modifiers + & (meta_modifier | alt_modifier + | hyper_modifier | super_modifier)); + XSETFRAME (read_socket_inev->frame_or_window, f); + } + return eventNotHandledErr; + } + } + } + /* Non-ASCII keystrokes without mapped modifiers are processed + at the Lisp level. */ + id_key = Qunicode_for_key_event; + num_params = sizeof (names_ufke) / sizeof (names_ufke[0]); + names = names_ufke; + types = types_ufke; + break; + + case kEventTextInputOffsetToPos: + { + struct frame *f; + struct window *w; + Point p; + + if (!OVERLAYP (Vmac_ts_active_input_overlay)) + return eventNotHandledErr; + + /* Strictly speaking, this is not always correct because + previous events may change some states about display. */ + if (NILP (Foverlay_get (Vmac_ts_active_input_overlay, Qbefore_string))) + { + /* Active input area is displayed in the echo area. */ + w = XWINDOW (echo_area_window); + f = WINDOW_XFRAME (w); + } + else + { + /* Active input area is displayed around the current point. */ + f = SELECTED_FRAME (); + w = XWINDOW (f->selected_window); + } + + p.h = (WINDOW_TO_FRAME_PIXEL_X (w, w->cursor.x) + + WINDOW_LEFT_FRINGE_WIDTH (w)); + p.v = (WINDOW_TO_FRAME_PIXEL_Y (w, w->cursor.y) + + FONT_BASE (FRAME_FONT (f))); + SetPortWindowPort (FRAME_MAC_WINDOW (f)); + LocalToGlobal (&p); + err = SetEventParameter (event, kEventParamTextInputReplyPoint, + typeQDPoint, sizeof (typeQDPoint), &p); + } + break; + + default: + abort (); + } + + if (!NILP (id_key)) + err = mac_store_event_ref_as_apple_event (0, 0, Qtext_input, id_key, + event, num_params, + names, types); + + return err == noErr ? noErr : result; +} +#endif + #ifdef MAC_OSX OSStatus mac_store_service_event (event) @@ -9498,6 +9701,10 @@ install_window_handler (window) {kEventClassWindow, kEventWindowCollapsed}, #ifdef MAC_OSX {kEventClassWindow, kEventWindowToolbarSwitchMode}, +#endif +#if USE_MAC_TSM + {kEventClassWindow, kEventWindowFocusAcquired}, + {kEventClassWindow, kEventWindowFocusRelinquish}, #endif }; EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}}; @@ -9508,6 +9715,13 @@ install_window_handler (window) {kEventClassFont, kEventFontSelection}}; static EventHandlerUPP handle_font_eventUPP = NULL; #endif +#if USE_MAC_TSM + EventTypeSpec specs_text_input[] = + {{kEventClassTextInput, kEventTextInputUpdateActiveInputArea}, + {kEventClassTextInput, kEventTextInputUnicodeForKeyEvent}, + {kEventClassTextInput, kEventTextInputOffsetToPos}}; + static EventHandlerUPP handle_text_input_eventUPP = NULL; +#endif if (handle_window_eventUPP == NULL) handle_window_eventUPP = NewEventHandlerUPP (mac_handle_window_event); @@ -9516,6 +9730,11 @@ install_window_handler (window) #if USE_MAC_FONT_PANEL if (handle_font_eventUPP == NULL) handle_font_eventUPP = NewEventHandlerUPP (mac_handle_font_event); +#endif +#if USE_MAC_TSM + if (handle_text_input_eventUPP == NULL) + handle_text_input_eventUPP = + NewEventHandlerUPP (mac_handle_text_input_event); #endif err = InstallWindowEventHandler (window, handle_window_eventUPP, GetEventTypeCount (specs_window), @@ -9530,6 +9749,12 @@ install_window_handler (window) GetEventTypeCount (specs_font), specs_font, NULL, NULL); #endif +#if USE_MAC_TSM + if (err == noErr) + err = InstallWindowEventHandler (window, handle_text_input_eventUPP, + GetEventTypeCount (specs_text_input), + specs_text_input, window, NULL); +#endif #endif if (err == noErr) err = install_drag_handler (window); @@ -9655,7 +9880,7 @@ static unsigned char keycode_to_xkeysym_table[] = { /*0x60*/ 0xc2 /*f5*/, 0xc3 /*f6*/, 0xc4 /*f7*/, 0xc0 /*f3*/, /*0x64*/ 0xc5 /*f8*/, 0xc6 /*f9*/, 0, 0xc8 /*f11*/, - /*0x68*/ 0, 0xca /*f13*/, 0, 0xcb /*f14*/, + /*0x68*/ 0, 0xca /*f13*/, 0xcd /*f16*/, 0xcb /*f14*/, /*0x6C*/ 0, 0xc7 /*f10*/, 0x0a /*fn+enter on laptops*/, 0xc9 /*f12*/, /*0x70*/ 0, 0xcc /*f15*/, 0x6a /*help*/, 0x50 /*home*/, @@ -10363,9 +10588,15 @@ XTread_socket (sd, expected, hold_quit) if (!(mapped_modifiers & ~(mac_pass_command_to_system ? cmdKey : 0) & ~(mac_pass_control_to_system ? controlKey : 0))) - if (SendEventToEventTarget (eventRef, toolbox_dispatcher) - != eventNotHandledErr) + { + OSStatus err; + + read_socket_inev = &inev; + err = SendEventToEventTarget (eventRef, toolbox_dispatcher); + read_socket_inev = NULL; + if (err != eventNotHandledErr) break; + } #endif if (er.what == keyUp) break; @@ -10396,6 +10627,11 @@ XTread_socket (sd, expected, hold_quit) last_key_script = current_key_script; } +#if USE_MAC_TSM + if (inev.kind != NO_EVENT) + break; +#endif + #ifdef MAC_OSX if (mapped_modifiers & kEventKeyModifierFnMask && keycode <= 0x7f @@ -11004,6 +11240,16 @@ init_menu_bar () #endif } +#if USE_MAC_TSM +static void +init_tsm () +{ + static InterfaceTypeList types = {kUnicodeDocument}; + + NewTSMDocument (sizeof (types) / sizeof (types[0]), types, + &tsm_document_id, 0); +} +#endif /* Set up use of X before we make the first connection. */ @@ -11098,6 +11344,10 @@ mac_initialize () init_command_handler (); init_menu_bar (); + +#if USE_MAC_TSM + init_tsm (); +#endif #endif /* USE_CARBON_EVENTS */ #ifdef MAC_OSX @@ -11154,6 +11404,13 @@ syms_of_macterm () Qpaste = intern ("paste"); staticpro (&Qpaste); Qperform = intern ("perform"); staticpro (&Qperform); #endif +#if USE_MAC_TSM + Qtext_input = intern ("text-input"); staticpro (&Qtext_input); + Qupdate_active_input_area = intern ("update-active-input-area"); + staticpro (&Qupdate_active_input_area); + Qunicode_for_key_event = intern ("unicode-for-key-event"); + staticpro (&Qunicode_for_key_event); +#endif #endif #ifdef MAC_OSX @@ -11296,6 +11553,11 @@ order. */); make_float (DEFAULT_REHASH_THRESHOLD), Qnil, Qnil, Qnil); #endif +#if USE_MAC_TSM + DEFVAR_LISP ("mac-ts-active-input-overlay", &Vmac_ts_active_input_overlay, + doc: /* Overlay used to display Mac TSM active input area. */); + Vmac_ts_active_input_overlay = Qnil; +#endif } /* arch-tag: f2259165-4454-4c04-a029-a133c8af7b5b From ae674cef6cc7670fafbd7ade69a9d79814abb706 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 3 Jun 2006 02:34:25 +0000 Subject: [PATCH 281/403] (EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER): New enumerator. --- src/macterm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/macterm.h b/src/macterm.h index a1a0a1229d6..55bf583c214 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -550,6 +550,11 @@ enum { KEY_EMACS_SUSPENSION_ID_ATTR = 'esId' /* typeUInt32 */ }; +/* Carbon event parameter names. */ +enum { + EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER = 'tsSn' /* typeUInt32 */ +}; + /* Some constants that are not defined in older versions. */ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 /* Keywords for Apple event attributes */ From fabcf455104c1fed5db99510ac2bec2aad6018b7 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sat, 3 Jun 2006 02:34:35 +0000 Subject: [PATCH 282/403] *** empty log message *** --- lisp/ChangeLog | 23 +++++++++++++++++++++++ src/ChangeLog | 28 ++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2d24de2c4ce..9d4a6d0de47 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,26 @@ +2006-06-03 YAMAMOTO Mitsuharu + + * term/mac-win.el (mac-ts-active-input-overlay): Add defvar. + (mac-ae-number, mac-ae-frame, mac-ae-script-language) + (mac-bytes-to-text-range, mac-ae-text-range-array) + (mac-ts-update-active-input-buf, mac-split-string-by-property-change) + (mac-replace-untranslated-utf-8-chars, mac-ts-update-active-input-area) + (mac-ts-unicode-for-key-event): New functions. + (mac-handle-toolbar-switch-mode): Use mac-ae-frame. + (mac-handle-font-selection): Use mac-ae-number. + (mac-ts-active-input-buf, mac-ts-update-active-input-area-seqno): + New variables. + (mac-ts-caret-position, mac-ts-raw-text, mac-ts-selected-raw-text) + (mac-ts-converted-text, mac-ts-selected-converted-text) + (mac-ts-block-fill-text, mac-ts-outline-text) + (mac-ts-selected-text, mac-ts-no-hilite): New faces. + (mac-ts-hilite-style-faces): New constant. + (mac-apple-event-map): Bind text input events. + (mac-dispatch-apple-event): Use command-execute instead of + call-interactively. + (global-map): Don't bind mac-apple-event. + (special-event-map): Bind mac-apple-event. + 2006-06-02 Eli Zaretskii * makefile.w32-in (EMACS): Remove quotes from the Emacs executable diff --git a/src/ChangeLog b/src/ChangeLog index 27040e76822..31e235c65cc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,31 @@ +2006-06-03 YAMAMOTO Mitsuharu + + * macfns.c (x_set_icon_name): Apply 2006-06-02 change for xfns.c. + + * macgui.h (USE_MAC_TSM): Set default to 1 on Mac OS X. + + * macterm.c (tsm_document_id) [USE_MAC_TSM]: New variable. + (Qtext_input, Qupdate_active_input_area, Qunicode_for_key_event) + [USE_MAC_TSM]: Likewise. + (syms_of_macterm) [USE_MAC_TSM]: Intern and staticpro them. + (Qbefore_string) [USE_MAC_TSM]: Add extern. + (do_app_resume, do_app_suspend) [USE_MAC_TSM]: Call + ActivateTSMDocument/DeactivateTSMDocument. + (mac_store_event_ref_as_apple_event): Call mac_post_mouse_moved_event. + (mac_handle_window_event) [USE_MAC_TSM]: Handle + kEventWindowFocusAcquired/kEventWindowFocusRelinquish. + (mac_handle_text_input_event) [USE_MAC_TSM]: New function. + (install_window_handler) [USE_MAC_TSM]: Install it. Register + kEventWindowFocusAcquired/kEventWindowFocusRelinquish. + (keycode_to_xkeysym_table): Add entry for f16. + (XTread_socket) [USE_MAC_TSM]: Set/reset read_socket_inev + before/after passing keystroke event to toolbox dispatcher. + (init_tsm) [USE_MAC_TSM]: New function. + (mac_initialize) [USE_MAC_TSM]: Call it. + (Vmac_ts_active_input_overlay) [USE_MAC_TSM]: New defvar. + + * macterm.h (EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER): New enumerator. + 2006-06-02 John Paul Wallington * xfns.c (x_set_name_internal): Set icon to `text', derived from From e7818a4a1fffbb56db506881771f37d6c92cb59e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 08:28:03 +0000 Subject: [PATCH 283/403] (Minibuffer History) : Reword variable's description. --- lispref/minibuf.texi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index 0409796a882..20a049f037b 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi @@ -461,9 +461,11 @@ duplicates, and to add @var{newelt} to the list even if it is empty. @end defun @defvar history-add-new-input -The value of this variable @code{nil} means that standard functions -that read from the minibuffer don't add new elements to the history -list, so it is possible to do this explicitly by using @code{add-to-history}. +If the value of this variable is @code{nil}, standard functions that +read from the minibuffer don't add new elements to the history list. +This lets Lisp programs explicitly manage input history by using +@code{add-to-history}. By default, @code{history-add-new-input} is +set to a non-@code{nil} value. @end defvar @defvar history-length From 6d39902f3583e94a67281f0ca15b6f715ade4484 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 08:38:43 +0000 Subject: [PATCH 284/403] (sh-quoted-exec): New face for quoted exec constructs like `foo bar`. (sh-quoted-subshell): New helper function to search for a possibly nested subshell (like `` or $()) within a "" quoted string. (sh-font-lock-keywords-var): Add sh-quoted-exec for Bash. (sh-apply-quoted-subshell): Flag quote characters inside a subshell, which is itself already in a quoted region, as punctuation, since this is the closest to what they actually are. (sh-font-lock-syntactic-keywords): Add sh-quoted-subshell and sh-apply-quoted-subshell. (sh-font-lock-syntactic-face-function): Apply the new face for text inside `` instead of the old font-lock-string-face. --- lisp/ChangeLog | 15 +++++++ lisp/progmodes/sh-script.el | 82 ++++++++++++++++++++++++++++++++++--- 2 files changed, 91 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d4a6d0de47..8f29118a10e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2006-05-20 Vivek Dasmohapatra + + * progmodes/sh-script.el (sh-quoted-exec): New face for quoted + exec constructs like `foo bar`. + (sh-quoted-subshell): New helper function to search for a possibly + nested subshell (like `` or $()) within a "" quoted string. + (sh-font-lock-keywords-var): Add sh-quoted-exec for Bash. + (sh-apply-quoted-subshell): Flag quote characters inside a + subshell, which is itself already in a quoted region, as + punctuation, since this is the closest to what they actually are. + (sh-font-lock-syntactic-keywords): Add sh-quoted-subshell and + sh-apply-quoted-subshell. + (sh-font-lock-syntactic-face-function): Apply the new face for + text inside `` instead of the old font-lock-string-face. + 2006-06-03 YAMAMOTO Mitsuharu * term/mac-win.el (mac-ts-active-input-overlay): Add defvar. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index ab3da050456..ef80d28c578 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -814,6 +814,18 @@ See `sh-feature'.") (:weight bold))) "Face to show a here-document" :group 'sh-indentation) + +;; These colours are probably icky. It's just a placeholder though. +(defface sh-quoted-exec + '((((class color) (background dark)) + (:foreground "salmon")) + (((class color) (background light)) + (:foreground "magenta")) + (t + (:weight bold))) + "Face to show quoted execs like ``" + :group 'sh-indentation) + ;; backward-compatibility alias (put 'sh-heredoc-face 'face-alias 'sh-heredoc) (defvar sh-heredoc-face 'sh-heredoc) @@ -833,7 +845,7 @@ See `sh-feature'.") font-lock-variable-name-face)) (rc sh-append es) - + (bash sh-append shell ("\\$(\\(\\sw+\\)" (1 'sh-quoted-exec t) )) (sh sh-append shell ;; Variable names. ("\\$\\({#?\\)?\\([A-Za-z_][A-Za-z0-9_]*\\|[-#?@!]\\)" 2 @@ -967,6 +979,49 @@ Point is at the beginning of the next line." ;; This looks silly, but it's because `sh-here-doc-re' keeps changing. (re-search-forward sh-here-doc-re limit t)) +(defun sh-quoted-subshell (limit) + "Search for a subshell embedded in a string. Find all the unescaped +\" characters within said subshell, remembering that subshells can nest." + (if (re-search-forward "\"\\(?:.\\|\n\\)*?\\(\\$(\\|`\\)" limit t) + ;; bingo we have a $( or a ` inside a "" + (let ((char (char-after (point))) + (continue t) + (pos (point)) + (data nil) ;; value to put into match-data (and return) + (last nil) ;; last char seen + (bq (equal (match-string 1) "`")) ;; ` state flip-flop + (seen nil) ;; list of important positions + (nest 1)) ;; subshell nesting level + (while (and continue char (<= pos limit)) + ;; unescaped " inside a $( ... ) construct. + ;; state machine time... + ;; \ => ignore next char; + ;; ` => increase or decrease nesting level based on bq flag + ;; ) [where nesting > 0] => decrease nesting + ;; ( [where nesting > 0] => increase nesting + ;; ( [preceeded by $ ] => increase nesting + ;; " [nesting <= 0 ] => terminate, we're done. + ;; " [nesting > 0 ] => remember this, it's not a proper " + (if (eq ?\\ last) nil + (if (eq ?\` char) (setq nest (+ nest (if bq -1 1)) bq (not bq)) + (if (and (> nest 0) (eq ?\) char)) (setq nest (1- nest)) + (if (and (eq ?$ last) (eq ?\( char)) (setq nest (1+ nest)) + (if (and (> nest 0) (eq ?\( char)) (setq nest (1+ nest)) + (if (eq char ?\") + (if (>= 0 nest) (setq continue nil) + (setq seen (cons pos seen)) ) )))))) + ;;(message "POS: %d [%d]" pos nest) + (setq last char + pos (1+ pos) + char (char-after pos)) ) + (when seen + ;;(message "SEEN: %S" seen) + (setq data (list (current-buffer))) + (mapc (lambda (P) + (setq data (cons P (cons (1+ P) data)) ) ) seen) + (store-match-data data)) + data) )) + (defun sh-is-quoted-p (pos) (and (eq (char-before pos) ?\\) (not (sh-is-quoted-p (1- pos))))) @@ -997,6 +1052,17 @@ Point is at the beginning of the next line." (when (save-excursion (backward-char 2) (looking-at ";;\\|in")) sh-st-punc))) +(defun sh-apply-quoted-subshell () + "Apply the `sh-st-punc' syntax to all the matches in `match-data'. +This is used to flag quote characters in subshell constructs inside strings +\(which should therefore not be treated as normal quote characters\)" + (let ((m (match-data)) a b) + (while m + (setq a (car m) + b (cadr m) + m (cddr m)) + (put-text-property a b 'syntax-table sh-st-punc))) sh-st-punc) + (defconst sh-font-lock-syntactic-keywords ;; A `#' begins a comment when it is unquoted and at the beginning of a ;; word. In the shell, words are separated by metacharacters. @@ -1007,6 +1073,9 @@ Point is at the beginning of the next line." ("\\(\\\\\\)'" 1 ,sh-st-punc) ;; Make sure $@ and @? are correctly recognized as sexps. ("\\$\\([?@]\\)" 1 ,sh-st-symbol) + ;; highlight (possibly nested) subshells inside "" quoted regions correctly. + (sh-quoted-subshell + (1 (sh-apply-quoted-subshell) t t)) ;; Find HEREDOC starters and add a corresponding rule for the ender. (sh-font-lock-here-doc (2 (sh-font-lock-open-heredoc @@ -1019,11 +1088,12 @@ Point is at the beginning of the next line." (")" 0 (sh-font-lock-paren (match-beginning 0))))) (defun sh-font-lock-syntactic-face-function (state) - (if (nth 3 state) - (if (char-valid-p (nth 3 state)) - font-lock-string-face - sh-heredoc-face) - font-lock-comment-face)) + (let ((q (nth 3 state))) + (if q + (if (char-valid-p q) + (if (eq q ?\`) 'sh-quoted-exec font-lock-string-face) + sh-heredoc-face) + font-lock-comment-face))) (defgroup sh-indentation nil "Variables controlling indentation in shell scripts. From af6aef872b9d67b1e3ce755dbc1fbc18c61ce815 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 08:39:30 +0000 Subject: [PATCH 285/403] Fix date of last entry. --- lisp/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8f29118a10e..ea1045ebb7e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,4 +1,4 @@ -2006-05-20 Vivek Dasmohapatra +2006-06-03 Vivek Dasmohapatra * progmodes/sh-script.el (sh-quoted-exec): New face for quoted exec constructs like `foo bar`. From 04a1dad0855a77fc160d38c0b91a107168c97475 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 12:10:37 +0000 Subject: [PATCH 286/403] Remove the file. --- etc/LEDIT | 77 --------------------------------------------- lib-src/leditcfns.c | 21 ------------- 2 files changed, 98 deletions(-) delete mode 100644 etc/LEDIT delete mode 100644 lib-src/leditcfns.c diff --git a/etc/LEDIT b/etc/LEDIT deleted file mode 100644 index 009243f5ec0..00000000000 --- a/etc/LEDIT +++ /dev/null @@ -1,77 +0,0 @@ -Date: 17 Apr 85 15:45:42 EST (Wed) -From: Martin David Connor - - Date: Sat, 13 Apr 85 16:28:15 est - From: Richard M. Stallman - - Can you help this person? Also, can you give me the rest of ledit - to distribute, plus some info on how to use it? - -I have put the files "ledit.l" and "leditcfns.c" on prep:~mdc. -Much to my disgust ledit.l relied on some bogus little package of -functions on HT, so I had to massage it a bit. - -To get it to work, one must: - - - Compile leditcfns.c with something like: - - cc leditcfns.c - - - Edit ledit.l, changing the line beginning "(cfasl" to - have the right pathname for the cfns file you compiled in - the last step. - - - Compile ledit.l with: - - liszt ledit.l - -Then put the following lines in your .lisprc file: - - ;load in functions for emacs interface - (load "//src//mdc//ledit//ledit") ; Location of Ledit library - (set-proc-str "%gnumacs") ; Name of editor - -Then you can use ^E to get from LISP back to gnumacs. - -Here is the part of my .emacs file that pertains to ledit. - - ;;; Set up ledit mode - (setq ledit-go-to-lisp-string "%lisp") - (setq lisp-mode-hook 'ledit-from-lisp-mode) - - Date: Sat, 13 Apr 85 11:26:32 cst - From: neves@wisc-ai.arpa (David Neves) - - This is a documentation question. - I cannot figure out how to use Ledit. I suspect I need some - function on the Franz Lisp end of things to go to Emacs and read in - the temporary file. Is this true? Is the Lisp job started within - Emacs or outside of emacs? I'm just plain confused. Perhaps a couple - of words from someone in the know would help. - - A related question. I have been using a shell buffer when interacting - with Lisp (ie. put a definition in the kill buffer and then yank it - into the shell buffer to redefine it). This is nice but tends to fill - up the shell buffer with lots of code (I'd rather keep calls to functions - in the shell and not the functions themselves). - My question: Is using the shell buffer "better" than ledit? Am I using - it in the best way (i.e. copying definitions from an edit buffer to the - shell buffer)? -Thanks, David Neves - -I have found that ledit works well for doing programming development -when you are changing lots of little pieces of a file and don't wish -to recompile the whole file. Of course M-X Compile is very nice for -calling up a liszt on a buffer and watching it in the another window. -Of course the interface of something like NIL is even better because -you can compile your function directly into your lisp. But since NIL -doesn't run under Unix, this is probably the next best thing. - -I have tried the 2 window method (shell in lower window, lisp code in -upper), and have found it a little awkward. It does have certain -advantages, but most of the time, I get be fine using M-C-D to save a -defun for lisp, and C-X Z to jump back to LISP. C-E RETURN from lisp -is also mnemonic for getting back to gnumacs. - -I hope this helps somewhat. - - diff --git a/lib-src/leditcfns.c b/lib-src/leditcfns.c deleted file mode 100644 index 239db1cd1fa..00000000000 --- a/lib-src/leditcfns.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#define STRLEN 100 -static char str[STRLEN+1] = "%?emacs"; /* extra char for the null */ - -switch_to_proc(){ - char *ptr = str; - while (*ptr) ioctl(0, TIOCSTI, ptr++); - ioctl(0, TIOCSTI, "\n"); - kill(getpid(), SIGTSTP); - } - -set_proc_str(ptr) char *ptr; { - if (strlen(ptr) <= STRLEN) - strcpy(str, ptr); - else - printf("string too long for set-proc-str: %s\n", ptr); - } - -/* arch-tag: eb7ae804-0d6e-4077-ab42-7173821410c3 - (do not change this comment) */ From 1f4fd92cafe64500baac93d76e15ba6b91272d48 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 12:12:13 +0000 Subject: [PATCH 287/403] Delete traces of leditcfns.c. --- lib-src/makefile.w32-in | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 6aa15964f45..7cc4c27aa5b 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -34,7 +34,6 @@ LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ # $(BLD)/env.exe \ # $(BLD)/server.exe \ # $(BLD)/emacstool.exe \ -# $(BLD)/leditcfns.exe \ # $(BLD)/emacsclient.exe \ # $(BLD)/cvtmail.exe \ # $(BLD)/digest-doc.exe \ @@ -117,7 +116,6 @@ $(BLD)/ctags.$(O): ctags.c # $(BLD)/sorted-doc.exe: $(BLD)/sorted-doc.$(O) # $(BLD)/yow.exe: $(BLD)/yow.$(O) # $(BLD)/emacstool.exe: $(BLD)/emacstool.$(O) -# $(BLD)/leditcfns.exe: $(BLD)/leditcfns.$(O) # $(BLD)/server.exe: $(BLD)/server.$(O) # $(BLD)/cvtmail.exe: $(BLD)/cvtmail.$(O) # $(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O) From a941b26bc2e35cbf10cc9ee2f08d35c0af433f23 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 12:12:34 +0000 Subject: [PATCH 288/403] *** empty log message *** --- etc/ChangeLog | 4 ++++ lib-src/ChangeLog | 6 ++++++ lispref/ChangeLog | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 91882e4518d..0ea138ceb01 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2006-06-03 Eli Zaretskii + + * LEDIT: Remove file. + 2006-05-31 David Ponce * tree-widget/default/close.*, tree-widget/default/empty.*: diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 9ba3191ed46..6d64d79b7bd 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2006-06-03 Eli Zaretskii + + * makefile.w32-in: Delete traces of leditcfns.c. + + * leditcfns.c: Remove file. + 2006-05-23 Francesco Potort,Al(B * pop.c (pop_open, socket_connection, KPOP_SERVICE): Added diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 722a2baa71a..7c842470062 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,8 @@ +2006-06-03 Eli Zaretskii + + * minibuf.texi (Minibuffer History) : + Reword variable's description. + 2006-06-01 Richard Stallman * windows.texi (Splitting Windows): Clarify splitting nonselected From 309920fa034cf798bd68eada95a53a61c515e7a6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 12:52:35 +0000 Subject: [PATCH 289/403] Add copyright notice and copying permissions. --- etc/MORE.STUFF | 11 +++++++++++ etc/TODO | 18 +++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF index f5fb4b13ad7..771294734c6 100644 --- a/etc/MORE.STUFF +++ b/etc/MORE.STUFF @@ -1,4 +1,7 @@ More Neat Stuff for your Emacs +Copyright (c) 1993, 1999, 2003, 2004, 2005, 2006 +Free software Foundation, Inc. +See the end of the file for copying permissions. This file describes GNU Emacs programs and resources that are maintained by other people. Some of these may become part of the @@ -276,4 +279,12 @@ mode: view eval: (goto-address) End: +COPYING PERMISSIONS + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation. + arch-tag: c1d4e7c8-db85-44e6-909e-659e2b20fefa diff --git a/etc/TODO b/etc/TODO index ea027d8c5ec..ea070e01398 100644 --- a/etc/TODO +++ b/etc/TODO @@ -1,4 +1,8 @@ - -*-outline-*- +Emacs TODO List -*-outline-*- + +Copyright (c) 2003, 2004, 2005, 2006 +Free software Foundation, Inc. +See the end of the file for copying permissions. If you are ready to start working on any of these TODO items, we appreciate your help; please write to emacs-devel@gnu.org so we can be @@ -490,4 +494,16 @@ not be noticed if it appears within a word. ** Fix unexelf.c to handle the .data.rel and .data.rel.local sections made by GCC 3.4 on IRIX. +COPYING PERMISSIONS: + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this file, to deal in the file without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the file, and to + permit persons to whom the file is furnished to do so, subject to + the following condition: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the file. + ;;; arch-tag: b0a3e40b-726a-457d-9999-ba848321b036 From b727702bfa2f76b255f8753a11c595e193880b58 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 13:53:01 +0000 Subject: [PATCH 290/403] Add copyright notice and copying permissions. --- etc/ETAGS.EBNF | 21 +++++++++++++++++++++ etc/FTP | 5 +++++ etc/HELLO | 21 +++++++++++++++++++++ etc/MACHINES | 18 ++++++++++++++++++ etc/MAILINGLISTS | 18 +++++++++++++++++- etc/MOTIVATION | 3 +++ etc/ORDERS | 5 +++++ etc/README | 16 ++++++++++++++++ etc/SERVICE | 10 ++++++++++ etc/TERMS | 21 +++++++++++++++++++++ etc/Xkeymap.txt | 16 ++++++++++++++++ etc/compilation.txt | 22 +++++++++++++++++++++- etc/emacs.csh | 16 ++++++++++++++++ etc/enriched.doc | 21 +++++++++++++++++++++ etc/grep.txt | 24 +++++++++++++++++++++++- etc/ms-7bkermit | 19 +++++++++++++++++++ etc/ses-example.ses | 20 ++++++++++++++++++++ etc/ulimit.hack | 19 +++++++++++++++++++ 18 files changed, 292 insertions(+), 3 deletions(-) diff --git a/etc/ETAGS.EBNF b/etc/ETAGS.EBNF index 4d09eaa581d..395080b9c0a 100644 --- a/etc/ETAGS.EBNF +++ b/etc/ETAGS.EBNF @@ -1,5 +1,7 @@ -*- indented-text -*- +See the end of this file for copyright information. + This file contains two sections: 1) An EBNF (Extended Backus-Naur Form) description of the format of @@ -91,3 +93,22 @@ rightmost consecutive characters in the pattern which are not one of those. ===================== end of discussion of tag names ===================== + +Copyright (c) 2002, 2004, 2006 +Free software Foundation, Inc. + +COPYING PERMISSIONS: + + This document 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/etc/FTP b/etc/FTP index 45048af4160..ea8d50f23de 100644 --- a/etc/FTP +++ b/etc/FTP @@ -1,2 +1,7 @@ Please refer to for information about obtaining Emacs. + +Copyright (c) 2000, 2006 Free Software Foundation, Inc. + +Verbatim copying and distribution is permitted in any medium +provided this notice is preserved. diff --git a/etc/HELLO b/etc/HELLO index 1c59bdb4de6..75e01e75f52 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -67,3 +67,24 @@ Maltese (il-Malti) Bon$,1 A(Bu, Sa$,1 G G(Ba ;;; Local Variables: ;;; tab-width: 32 ;;; End: + + + +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 +Free software Foundation, Inc. + +COPYING PERMISSIONS: + + This document 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/etc/MACHINES b/etc/MACHINES index ee57fc6d0b0..9d7e81ebb97 100644 --- a/etc/MACHINES +++ b/etc/MACHINES @@ -1,3 +1,9 @@ +Emacs machines list + +Copyright (c) 1989, 1990, 1992, 1993, 1998, 2001, 2003, 2006 +Free software Foundation, Inc. +See the end of the file for copying permissions. + This is a list of the status of GNU Emacs on various machines and systems. For each system and machine, we give the configuration name you should @@ -1470,5 +1476,17 @@ mode: indented-text fill-prefix: " " End: +COPYING PERMISSIONS: + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this file, to deal in the file without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the file, and to + permit persons to whom the file is furnished to do so, subject to + the following condition: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the file. + arch-tag: 7d2e93c7-e982-40ec-9055-3cd064042473 diff --git a/etc/MAILINGLISTS b/etc/MAILINGLISTS index ff3d5013b74..531e57522ee 100644 --- a/etc/MAILINGLISTS +++ b/etc/MAILINGLISTS @@ -1,8 +1,10 @@ GNU Project Electronic Mailing Lists and gnUSENET Newsgroups - Last Updated 2004-10-19 + Last Updated 2006-06-03 Please report improvements to: gnu@gnu.org + See the end of this file for copyright notice and copying conditions + * Mailing list archives The GNU mailing lists are archived at http://lists.gnu.org. @@ -316,4 +318,18 @@ mode: outline fill-column: 72 End: +Copyright (c) 1999, 2003, 2004, 2006 +Free software Foundation, Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this file, to deal in the file without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the file, and to + permit persons to whom the file is furnished to do so, subject to + the following condition: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the file. + + arch-tag: 6e42bba8-7532-4a23-8486-99dbc5770a8e diff --git a/etc/MOTIVATION b/etc/MOTIVATION index 267a2333f76..50194925f13 100644 --- a/etc/MOTIVATION +++ b/etc/MOTIVATION @@ -7,6 +7,9 @@ Special to the Boston Globe [reprinted with permission of the author from the Monday 19 January 1987 Boston Globe] +Verbatim copying and distribution is permitted in any medium +provided this notice is preserved. + In the laboratory, rats get Rice Krispies. In the classroom the top students get A's, and in the factory or office the best workers get raises. It's an article of faith for most of us that rewards promote diff --git a/etc/ORDERS b/etc/ORDERS index c29e6b101f3..07c25d06717 100644 --- a/etc/ORDERS +++ b/etc/ORDERS @@ -7,3 +7,8 @@ further development of Emacs and other free software programs. You can also make tax-deductable donations to the Free Software Foundation, a not-for-profit organization (assuming you pay US taxes) - see . + +Copyright (c) 2000, 2001, 2006 Free Software Foundation + +Verbatim copying and distribution is permitted in any medium +provided this notice is preserved. diff --git a/etc/README b/etc/README index 1d476a0620c..856f8cdfcd4 100644 --- a/etc/README +++ b/etc/README @@ -11,3 +11,19 @@ without installing the modified TeX versions. `termcap.src' is included mainly for VMS. It is a copy of the `/etc/termcap' file used on Unix. + +Copyright (c) 1992, 1995, 2001, 2006 +Free Software Foundation, Inc. + + +COPYING PERMISSIONS: + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this file, to deal in the file without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the file, and to + permit persons to whom the file is furnished to do so, subject to + the following condition: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the file. diff --git a/etc/SERVICE b/etc/SERVICE index 40b12ac4a01..e97196d7c95 100644 --- a/etc/SERVICE +++ b/etc/SERVICE @@ -2,6 +2,8 @@ GNU Service Directory --------------------- +See the end of file for copyright information. + This is a list of people who have asked to be listed as offering support services for GNU software, including GNU Emacs, for a fee or in some cases at no charge. @@ -1365,4 +1367,12 @@ A current version should be available on our web site at http://www.gnu.org. ** Please keep the entries in this file alphabetical ** + +Copyright (c) 2000, 2004, 2005, 2006 +Free Software Foundation + + Verbatim copying and distribution of this document are permitted + worldwide, without royalty, in any medium, provided this notice is + preserved. + arch-tag: 1253ce32-1cbd-428a-ac36-70ed9e3999fc diff --git a/etc/TERMS b/etc/TERMS index dd447259710..4b34a45d676 100644 --- a/etc/TERMS +++ b/etc/TERMS @@ -1,3 +1,7 @@ +Copyright (c) 1999, 2003, 2006 +Free software Foundation, Inc. +See the end of the file for copying permissions. + This file describes what you must or might want to do to termcap entries to make terminals work properly and efficiently with Emacs. Information on likely problems with specific types of terminals appears at the end @@ -227,3 +231,20 @@ AT386|at386|386AT|386at|at/386 console, AT386-UL|at386-ul|386AT-UL|386at-ul|at/386 console, is2=\E[0;10;38m, use=at386, + + +COPYING PERMISSIONS: + + This document 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/etc/Xkeymap.txt b/etc/Xkeymap.txt index fcdbbf43215..dca688bd701 100644 --- a/etc/Xkeymap.txt +++ b/etc/Xkeymap.txt @@ -1,5 +1,10 @@ # -*-Mode: Fundamental-*- # X keymap file for rlk with some emacsified bindings +# +# Copyright (c) 1999, 2003, 2006 +# Free software Foundation, Inc. +# See the end of the file for copying conditions. +# # This file contains the default keyboard mapping. The first column contains a X keyboard code; the other # 16 columns contain the mapping of the keycode to a character string, with various combinations # of the SHIFT, LOCK, META, and CONTROL keys down. See the man page for "keycomp" for more information. @@ -96,5 +101,16 @@ # local variables: # tab-width: 4 # End: +# +# COPYING CONDITIONS +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this file, to deal in the file without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the file, and to +# permit persons to whom the file is furnished to do so, subject to +# the following condition: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the file. # arch-tag: cbaa71af-719b-4647-a2c1-cd4d36a4fc64 diff --git a/etc/compilation.txt b/etc/compilation.txt index 72ff5ac5316..2e784000149 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -1,4 +1,4 @@ -* Introduction -*-compilation-*- +* Introduction -*-compilation-*- (Copyright information at end of file) This shows the different kinds of messages compile recognizes by default and how they are rendered. It is intended both to help you decide which matchers @@ -401,3 +401,23 @@ Compilation killed at Wed Jul 20 12:20:10 Compilation terminated at Wed Jul 20 12:20:10 Compilation exited abnormally with code 1 at Wed Jul 20 12:21:12 Compilation finished at Thu Jul 21 15:02:15 + + +Copyright (c) 2004, 2005, 2006 +Free software Foundation, Inc. + +COPYING PERMISSIONS: + + This document 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/etc/emacs.csh b/etc/emacs.csh index 411feedaef5..3de336b8075 100644 --- a/etc/emacs.csh +++ b/etc/emacs.csh @@ -1,3 +1,6 @@ +# Copyright (c) 1999, 2003, 2006 +# Free software Foundation, Inc. +# # This defines a csh command named `edit' which resumes an # existing Emacs or starts a new one if none exists. # One way or another, any arguments are passed to Emacs to specify files @@ -24,4 +27,17 @@ alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\ test -S ~/.emacs_server && emacsclient \!* \ || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]' +#COPYING PERMISSIONS: +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this file, to deal in the file without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the file, and to +# permit persons to whom the file is furnished to do so, subject to +# the following condition: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the file. + + # arch-tag: 433d58df-15b9-446f-ad37-f0393e3a23d4 diff --git a/etc/enriched.doc b/etc/enriched.doc index 122652f005a..0b83bbcabfe 100644 --- a/etc/enriched.doc +++ b/etc/enriched.doc @@ -254,3 +254,24 @@ bug reports are welcome. bluewhiteApril 1995; updated August 1997 + + +Copyright (c) 1995, 1997, 2006 +Free software Foundation, Inc. + +COPYING PERMISSIONS: + + This document 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + diff --git a/etc/grep.txt b/etc/grep.txt index 8acfc4fc644..d2a934fbeff 100644 --- a/etc/grep.txt +++ b/etc/grep.txt @@ -1,4 +1,4 @@ -* Introduction -*-grep-*- +* Introduction -*-grep-*- (See the end of file for copyright information) This shows the different kinds of messages grep recognizes by default and how they are rendered. It is intended both to help you decide which matchers @@ -85,3 +85,25 @@ grep -nH -e "xyzxyz" ../info/* ;;; Local Variables: ;;; buffer-read-only: t ;;; End: + + + +Copyright (c) 2005, 2006 +Free software Foundation, Inc. + +COPYING PERMISSIONS: + + This document 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + diff --git a/etc/ms-7bkermit b/etc/ms-7bkermit index 28847b06136..b239e942293 100644 --- a/etc/ms-7bkermit +++ b/etc/ms-7bkermit @@ -1,3 +1,6 @@ +;;; Copyright (c) 1999, 2003, 2006 +;;; Free Software Foundation, Inc. + ;;; This file is designed for 7-bit connections. ;;; Use the file ms-kermit if you have an 8-bit connection. @@ -311,4 +314,20 @@ set key \2463 \kendscn set key \2457 \kupscn set key \2465 \kdnscn +;;; COPYING PERMISSIONS: +;;; +;;; This document 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 of the License, or +;;; (at your option) any later version. +;;; +;;; This program 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 this program; if not, write to the Free Software +;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + ;;; arch-tag: b066a884-e956-4f46-9d9c-13502f6cf7a6 diff --git a/etc/ses-example.ses b/etc/ses-example.ses index fdbdb0cfca2..d0fb9198e20 100644 --- a/etc/ses-example.ses +++ b/etc/ses-example.ses @@ -206,4 +206,24 @@ Sales summary - Acme fundraising ;;; symbolic-formulas: (("Eastern area") ("West-district") ("North&South") ("Other")) ;;; End: +;;; Copyright (c) 2002, 2006 +;;; Free Software Foundation, Inc. + +;;; COPYING PERMISSIONS: +;;; +;;; This document 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 of the License, or +;;; (at your option) any later version. +;;; +;;; This program 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 this program; if not, write to the Free Software +;;; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + ;;; arch-tag: 4fcb0843-e3f9-4270-b8fb-998129190765 diff --git a/etc/ulimit.hack b/etc/ulimit.hack index 17105158c42..d804459ba0b 100644 --- a/etc/ulimit.hack +++ b/etc/ulimit.hack @@ -37,4 +37,23 @@ exit 0 # # Upon system reboot, all processes will inherit the new large ulimit. +# Copyright (c) 1999, 2003, 2006 +# Free Software Foundation, Inc. + +# COPYING PERMISSIONS: +# +# This document 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 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # arch-tag: 6f9a7072-9d07-4431-b0bb-e867648ad0b4 From a03d86d56563a891195548201f639360371c2ce8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 13:53:18 +0000 Subject: [PATCH 291/403] Fix last change. --- etc/ORDERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/ORDERS b/etc/ORDERS index 07c25d06717..55d222c17cb 100644 --- a/etc/ORDERS +++ b/etc/ORDERS @@ -8,7 +8,7 @@ can also make tax-deductable donations to the Free Software Foundation, a not-for-profit organization (assuming you pay US taxes) - see . -Copyright (c) 2000, 2001, 2006 Free Software Foundation +Copyright (c) 2000, 2001, 2006 Free Software Foundation, Inc. Verbatim copying and distribution is permitted in any medium provided this notice is preserved. From c61bea765d6511d69f8e0eb023e071a47b73122d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 13:54:26 +0000 Subject: [PATCH 292/403] Remove file. --- etc/LPF | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 etc/LPF diff --git a/etc/LPF b/etc/LPF deleted file mode 100644 index 02c7d28d150..00000000000 --- a/etc/LPF +++ /dev/null @@ -1,43 +0,0 @@ - Protect Your Freedom to Write Programs - Join the League for Programming Freedom - (Version of February 3, 1994) - -Ten years ago, programmers were allowed to write programs using all -the techniques they knew, and providing whatever features they felt -were useful. This is no longer the case. New monopolies, known as -software patents and interface copyrights, have taken away our freedom -of expression and our ability to do a good job. - -"Look and feel" lawsuits attempt to monopolize well-known command -languages; some have succeeded. Copyrights on command languages -enforce gratuitous incompatibility, close opportunities for -competition, and stifle incremental improvements. - -Software patents are even more dangerous; they make every design -decision in the development of a program carry a risk of a lawsuit, -with draconian pretrial seizure. It is difficult and expensive to -find out whether the techniques you consider using are patented; it is -impossible to find out whether they will be patented in the future. - -The League for Programming Freedom is a grass-roots organization of -professors, students, businessmen, programmers and users dedicated to -bringing back the freedom to write programs. The League is not -opposed to the legal system that Congress expressly established for -software--copyright on individual programs. Our aim is to reverse the -recent changes that prevent programmers from doing their work. - -The League works to abolish the new monopolies by publishing articles, -talking with public officials, denouncing egregious offenders, and -filing amicus curiae briefs, most notably against Lotus in its suit -against Borland. We testified twice at the recent Patent Office -hearings on software patents. We welcome suggestions for other -activities, as well as help in carrying them out. - - -(Added 2003) The League for Programming Freedom is inactive nowadays, -though its web site www.programming-freedom.org is still maintained. -It would be very useful to find a person who could take the initiative -to get the LPF operating again. It will be a substantial job, -requiring persistence and working with a lawyer. If you want to do -it, please write to rms@gnu.org. - From e75dcee327e6ece31d765beff38f6784745c87ce Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 14:51:25 +0000 Subject: [PATCH 293/403] [DOS_NT] : Include fcntl.h and io.h. [WINDOWSNT] : Don't redeclare malloc. (main) [DOS_NT]: Switch stdin to binary mode, if it is not a terminal device. --- lib-src/sorted-doc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c index 0a06aa2c984..67bddbc3304 100644 --- a/lib-src/sorted-doc.c +++ b/lib-src/sorted-doc.c @@ -29,9 +29,15 @@ #include #include +#ifdef DOS_NT +#include /* for O_BINARY */ +#include /* for setmode */ +#endif #ifndef HAVE_STDLIB_H /* config.h includes stdlib. */ +#ifndef WINDOWSNT /* src/s/ms-w32.h includes stdlib.h */ extern char *malloc (); #endif +#endif #define NUL '\0' #define MARKER '\037' @@ -134,6 +140,12 @@ main () DOCSTR *docs = NULL; /* chain of allocated DOCSTRS */ char buf[512]; /* line buffer */ +#ifdef DOS_NT + /* DOC is a binary file. */ + if (!isatty (fileno (stdin))) + setmode (fileno (stdin), O_BINARY); +#endif + while (1) /* process one char at a time */ { /* this char from the DOCSTR file */ From ae85efdbd570887c527abcf0498d039b388b3a8f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 14:51:44 +0000 Subject: [PATCH 294/403] *** empty log message *** --- etc/ChangeLog | 23 +++++++++++++++++++++++ lib-src/ChangeLog | 5 +++++ 2 files changed, 28 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 0ea138ceb01..a0acf56373b 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,5 +1,28 @@ 2006-06-03 Eli Zaretskii + * LPF: Deleted. + + * FTP: + * ORDERS: + * MOTIVATION: + * enriched.doc: + * README: + * TERMS: + * ulimit.hack: + * ses-example.ses: + * ms-7bkermit: + * emacs.csh: + * Xkeymap.txt: + * SERVICE: + * HELLO: + * ETAGS.EBNF: + * MAILINGLISTS: + * compilation.txt: + * grep.txt: + * MACHINES: + * TODO: + * MORE.STUFF: Add copyright notice and copying permissions. + * LEDIT: Remove file. 2006-05-31 David Ponce diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 6d64d79b7bd..61e0d42ab1c 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,10 @@ 2006-06-03 Eli Zaretskii + * sorted-doc.c [DOS_NT] : Include fcntl.h and io.h. + [WINDOWSNT] : Don't redeclare malloc. + (main) [DOS_NT]: Switch stdin to binary mode, if it is not a + terminal device. + * makefile.w32-in: Delete traces of leditcfns.c. * leditcfns.c: Remove file. From 37c49f02a0e237509b8b8e200d8cc0f1baa46843 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 14:58:50 +0000 Subject: [PATCH 295/403] (main): Initialize bp, to avoid compiler warnings --- lib-src/sorted-doc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c index 67bddbc3304..a8b2d441f9a 100644 --- a/lib-src/sorted-doc.c +++ b/lib-src/sorted-doc.c @@ -146,6 +146,8 @@ main () setmode (fileno (stdin), O_BINARY); #endif + bp = buf; + while (1) /* process one char at a time */ { /* this char from the DOCSTR file */ From 1b178b9902fce72c5e08cb0ef6527615477f510f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 15:05:05 +0000 Subject: [PATCH 296/403] [DOS_NT] : Include fcntl.h and io.h. (main) [DOS_NT]: Switch stdin to binary mode, if it is not a terminal device. --- lib-src/ChangeLog | 5 +++++ lib-src/digest-doc.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 61e0d42ab1c..c448ac31c5d 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,9 +1,14 @@ 2006-06-03 Eli Zaretskii + * digest-doc.c [DOS_NT] : Include fcntl.h and io.h. + (main) [DOS_NT]: Switch stdin to binary mode, if it is not a + terminal device. + * sorted-doc.c [DOS_NT] : Include fcntl.h and io.h. [WINDOWSNT] : Don't redeclare malloc. (main) [DOS_NT]: Switch stdin to binary mode, if it is not a terminal device. + (main): Initialize bp, to avoid compiler warnings * makefile.w32-in: Delete traces of leditcfns.c. diff --git a/lib-src/digest-doc.c b/lib-src/digest-doc.c index 7b5a9677e7c..7787d422e39 100644 --- a/lib-src/digest-doc.c +++ b/lib-src/digest-doc.c @@ -26,12 +26,23 @@ #include +#ifdef DOS_NT +#include /* for O_BINARY */ +#include /* for setmode */ +#endif + int main () { register int ch; register int notfirst = 0; +#ifdef DOS_NT + /* DOC is a binary file. */ + if (!isatty (fileno (stdin))) + setmode (fileno (stdin), O_BINARY); +#endif + printf (".TL\n"); printf ("Command Summary for GNU Emacs\n"); printf (".AU\nRichard M. Stallman\n"); From 9781fb53c897dc37a13a490e988977758029a3c2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Jun 2006 15:30:02 +0000 Subject: [PATCH 297/403] (ALL): Add sorted-doc and digest-doc. ($(BLD)/sorted-doc.exe, $(BLD)/digest-doc.exe) ($(BLD)/test-distrib.exe): New targets. (sorted-doc, digest-doc, test-distrib): New targets. (install): Install sorted-doc.exe and digest-doc.exe. ($(BLD)/sorted-doc.$(O)): Update dependencies. --- lib-src/ChangeLog | 7 +++++++ lib-src/makefile.w32-in | 27 ++++++++++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index c448ac31c5d..eaaa293e293 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,12 @@ 2006-06-03 Eli Zaretskii + * makefile.w32-in (ALL): Add sorted-doc and digest-doc. + ($(BLD)/sorted-doc.exe, $(BLD)/digest-doc.exe) + ($(BLD)/test-distrib.exe): New targets. + (sorted-doc, digest-doc, test-distrib): New targets. + (install): Install sorted-doc.exe and digest-doc.exe. + ($(BLD)/sorted-doc.$(O)): Update dependencies. + * digest-doc.c [DOS_NT] : Include fcntl.h and io.h. (main) [DOS_NT]: Switch stdin to binary mode, if it is not a terminal device. diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 7cc4c27aa5b..aaa35aec040 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -20,7 +20,7 @@ # Boston, MA 02110-1301, USA. # -ALL = make-docfile hexl ctags etags movemail ebrowse +ALL = make-docfile hexl ctags etags movemail ebrowse sorted-doc digest-doc .PHONY: $(ALL) @@ -30,14 +30,10 @@ LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ # don't know what (if) to do with these yet... # -# $(BLD)/sorted-doc.exe \ -# $(BLD)/env.exe \ # $(BLD)/server.exe \ # $(BLD)/emacstool.exe \ # $(BLD)/emacsclient.exe \ # $(BLD)/cvtmail.exe \ -# $(BLD)/digest-doc.exe \ -# $(BLD)/test-distrib.exe \ LIBS = $(BASE_LIBS) $(ADVAPI32) @@ -47,6 +43,12 @@ $(BLD)/hexl.exe: $(BLD)/hexl.$(O) $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/hexl.$(O) $(LIBS) $(BLD)/fakemail.exe: $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/fakemail.$(O) $(BLD)/ntlib.$(O) $(LIBS) +$(BLD)/sorted-doc.exe: $(BLD)/sorted-doc.$(O) + $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/sorted-doc.$(O) $(LIBS) +$(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O) + $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/digest-doc.$(O) $(LIBS) +$(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O) + $(LINK) $(LINK_OUT)$@ $(LINK_FLAGS) $(BLD)/test-distrib.$(O) $(LIBS) make-docfile: $(BLD) $(BLD)/make-docfile.exe ctags: $(BLD) $(BLD)/ctags.exe @@ -55,6 +57,11 @@ ebrowse: $(BLD) $(BLD)/ebrowse.exe hexl: $(BLD) $(BLD)/hexl.exe movemail: $(BLD) $(BLD)/movemail.exe fakemail: $(BLD) $(BLD)/fakemail.exe +sorted-doc: $(BLD) $(BLD)/sorted-doc.exe +digest-doc: $(BLD) $(BLD)/digest-doc.exe + +test-distrib: $(BLD) $(BLD)/test-distrib.exe + "$(BLD)/test-distrib.exe" "$(SRC)/testfile" GETOPTOBJS = $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O) GETOPTDEPS = $(GETOPTOBJS) getopt.h @@ -113,14 +120,11 @@ $(BLD)/ctags.$(O): ctags.c # # don't know what to do with these yet... # -# $(BLD)/sorted-doc.exe: $(BLD)/sorted-doc.$(O) # $(BLD)/yow.exe: $(BLD)/yow.$(O) # $(BLD)/emacstool.exe: $(BLD)/emacstool.$(O) # $(BLD)/server.exe: $(BLD)/server.$(O) # $(BLD)/cvtmail.exe: $(BLD)/cvtmail.$(O) -# $(BLD)/digest-doc.exe: $(BLD)/digest-doc.$(O) # $(BLD)/emacsclient.exe: $(BLD)/emacsclient.$(O) -# $(BLD)/test-distrib.exe: $(BLD)/test-distrib.$(O) # # From ..\src\Makefile.in @@ -291,6 +295,8 @@ install: $(INSTALL_FILES) $(CP) $(BLD)/ctags.exe $(INSTALL_DIR)/bin $(CP) $(BLD)/hexl.exe $(INSTALL_DIR)/bin $(CP) $(BLD)/movemail.exe $(INSTALL_DIR)/bin + $(CP) $(BLD)/sorted-doc.exe $(INSTALL_DIR)/bin + $(CP) $(BLD)/digest-doc.exe $(INSTALL_DIR)/bin - mkdir "$(INSTALL_DIR)/etc" $(CP) $(DOC) $(INSTALL_DIR)/etc @@ -446,7 +452,10 @@ $(BLD)/qsort.$(O) : \ $(SRC)/qsort.c $(BLD)/sorted-doc.$(O) : \ - $(SRC)/sorted-doc.c + $(SRC)/sorted-doc.c \ + $(EMACS_ROOT)/src/s/ms-w32.h \ + $(EMACS_ROOT)/src/m/intel386.h \ + $(EMACS_ROOT)/src/config.h \ $(BLD)/tcp.$(O) : \ $(SRC)/tcp.c From 0f29c66d2557458cd49b32ad48d5baed25533295 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Sat, 3 Jun 2006 17:49:36 +0000 Subject: [PATCH 298/403] (main): Exit with EXIT_FAILURE if BROWSE file doesn't exist, is not seekable, not is failed in ftall. --- lib-src/ChangeLog | 5 +++++ lib-src/ebrowse.c | 22 ++++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index eaaa293e293..40b4779dea4 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2006-06-04 Masatake YAMATO + + * ebrowse.c (main): Exit with EXIT_FAILURE if BROWSE file + doesn't exist, is not seekable, not is failed in ftall. + 2006-06-03 Eli Zaretskii * makefile.w32-in (ALL): Add sorted-doc and digest-doc. diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 94fa9114d23..398dd10896e 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -3909,17 +3909,31 @@ main (argc, argv) fp = fopen (out_filename, "r"); if (fp == NULL) - yyerror ("file `%s' must exist for --append", out_filename); + { + yyerror ("file `%s' must exist for --append", out_filename); + exit (EXIT_FAILURE); + } rc = fseek (fp, 0, SEEK_END); if (rc == -1) - yyerror ("error seeking in file `%s'", out_filename); + { + yyerror ("error seeking in file `%s'", out_filename); + exit (EXIT_FAILURE); + } rc = ftell (fp); if (rc == -1) - yyerror ("error getting size of file `%s'", out_filename); + { + yyerror ("error getting size of file `%s'", out_filename); + exit (EXIT_FAILURE); + } + else if (rc == 0) - yyerror ("file `%s' is empty", out_filename); + { + yyerror ("file `%s' is empty", out_filename); + /* It may be ok to use an empty file for appending. + exit (EXIT_FAILURE); */ + } fclose (fp); } From ff3e9dbcc7274cadad448e80f58af791aa6e99d6 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 3 Jun 2006 21:55:47 +0000 Subject: [PATCH 299/403] Fix typo. --- etc/PROBLEMS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 0794c84f2fa..6d74b9876bb 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1690,7 +1690,7 @@ keys can serve as Meta. The `xkeycaps' also shows a visual representation of the current keyboard settings. It also allows to modify them. -*** GNU/Linux: low startup on Linux-based GNU systems. +*** GNU/Linux: slow startup on Linux-based GNU systems. People using systems based on the Linux kernel sometimes report that startup takes 10 to 15 seconds longer than `usual'. From 71ee3e042e4bc6464430e25574a440d15e14a328 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 3 Jun 2006 22:51:32 +0000 Subject: [PATCH 300/403] (Abstract Display): Fix typo. --- lispref/ChangeLog | 4 ++++ lispref/display.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 7c842470062..d8c8480c6d3 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,7 @@ +2006-06-04 Thien-Thi Nguyen + + * display.texi (Abstract Display): Fix typo. + 2006-06-03 Eli Zaretskii * minibuf.texi (Minibuffer History) : diff --git a/lispref/display.texi b/lispref/display.texi index 1a34b0ff785..21277d1c587 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -4631,7 +4631,7 @@ buffer. If @var{count-current} is non-@code{nil}, count any button at The Ewoc package constructs buffer text that represents a structure of Lisp objects, and updates the text to follow changes in that -structure. This is like the ``view'' component in the the +structure. This is like the ``view'' component in the ``model/view/controller'' design paradigm. An @dfn{ewoc} is a structure that organizes information required to From 9a21d88ba1c249264c225cb64d24cdb3b57b73e1 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 4 Jun 2006 01:01:51 +0000 Subject: [PATCH 301/403] Reorganize NEWS and ONEWS.* files into NEWS for current major version and NEWS.21, NEWS.20, NEWS.19, NEWS.18, and NEWS.1-17 for older version. Update copyright notices. --- etc/NEWS | 9351 +----------------------------------- etc/{ONEWS.2 => NEWS.1-17} | 1190 ++++- etc/{ONEWS.3 => NEWS.18} | 19 +- etc/{ONEWS => NEWS.19} | 69 +- etc/NEWS.20 | 4513 +++++++++++++++++ etc/NEWS.21 | 4900 +++++++++++++++++++ etc/ONEWS.1 | 1167 ----- etc/ONEWS.4 | 1693 ------- 8 files changed, 10687 insertions(+), 12215 deletions(-) rename etc/{ONEWS.2 => NEWS.1-17} (51%) rename etc/{ONEWS.3 => NEWS.18} (99%) rename etc/{ONEWS => NEWS.19} (99%) create mode 100644 etc/NEWS.20 create mode 100644 etc/NEWS.21 delete mode 100644 etc/ONEWS.1 delete mode 100644 etc/ONEWS.4 diff --git a/etc/NEWS b/etc/NEWS index a8dd3843396..2c545b5b221 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1,12 +1,18 @@ -GNU Emacs NEWS -- history of user-visible changes. 2006-05-21 -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +GNU Emacs NEWS -- history of user-visible changes. 2006-06-04 +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. See the end for copying conditions. Please send Emacs bug reports to bug-gnu-emacs@gnu.org. -For older news, see the file ONEWS -You can narrow news to the specific version by calling -`view-emacs-news' with a prefix argument or by typing C-u C-h C-n. +If possible, use M-x report-emacs-bug. + +This file is about changes in emacs version 22. + +See files NEWS.21, NEWS.20, NEWS.19, NEWS.18, and NEWS.1-17 for changes +in older emacs versions. + +You can narrow news to a specific version by calling `view-emacs-news' +with a prefix argument or by typing C-u C-h C-n. Temporary note: +++ indicates that the appropriate manual has already been updated. @@ -5656,9345 +5662,14 @@ 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. - -* Installation changes in Emacs 21.3 - -** Support for GNU/Linux on little-endian MIPS and on IBM S390 has -been added. - - -* Changes in Emacs 21.3 - -** The obsolete C mode (c-mode.el) has been removed to avoid problems -with Custom. - -** UTF-16 coding systems are available, encoding the same characters -as mule-utf-8. - -** There is a new language environment for UTF-8 (set up automatically -in UTF-8 locales). - -** Translation tables are available between equivalent characters in -different Emacs charsets -- for instance `e with acute' coming from the -Latin-1 and Latin-2 charsets. User options `unify-8859-on-encoding-mode' -and `unify-8859-on-decoding-mode' respectively turn on translation -between ISO 8859 character sets (`unification') on encoding -(e.g. writing a file) and decoding (e.g. reading a file). Note that -`unify-8859-on-encoding-mode' is useful and safe, but -`unify-8859-on-decoding-mode' can cause text to change when you read -it and write it out again without edits, so it is not generally advisable. -By default `unify-8859-on-encoding-mode' is turned on. - -** In Emacs running on the X window system, the default value of -`selection-coding-system' is now `compound-text-with-extensions'. - -If you want the old behavior, set selection-coding-system to -compound-text, which may be significantly more efficient. Using -compound-text-with-extensions seems to be necessary only for decoding -text from applications under XFree86 4.2, whose behavior is actually -contrary to the compound text specification. - - -* Installation changes in Emacs 21.2 - -** Support for BSD/OS 5.0 has been added. - -** Support for AIX 5.1 was added. - - -* Changes in Emacs 21.2 - -** Emacs now supports compound-text extended segments in X selections. - -X applications can use `extended segments' to encode characters in -compound text that belong to character sets which are not part of the -list of approved standard encodings for X, e.g. Big5. To paste -selections with such characters into Emacs, use the new coding system -compound-text-with-extensions as the value of selection-coding-system. - -** The default values of `tooltip-delay' and `tooltip-hide-delay' -were changed. - -** On terminals whose erase-char is ^H (Backspace), Emacs -now uses normal-erase-is-backspace-mode. - -** When the *scratch* buffer is recreated, its mode is set from -initial-major-mode, which normally is lisp-interaction-mode, -instead of using default-major-mode. - -** The new option `Info-scroll-prefer-subnodes' causes Info to behave -like the stand-alone Info reader (from the GNU Texinfo package) as far -as motion between nodes and their subnodes is concerned. If it is t -(the default), Emacs behaves as before when you type SPC in a menu: it -visits the subnode pointed to by the first menu entry. If this option -is nil, SPC scrolls to the end of the current node, and only then goes -to the first menu item, like the stand-alone reader does. - -This change was already in Emacs 21.1, but wasn't advertised in the -NEWS. - - -* Lisp Changes in Emacs 21.2 - -** The meanings of scroll-up-aggressively and scroll-down-aggressively -have been interchanged, so that the former now controls scrolling up, -and the latter now controls scrolling down. - -** The variable `compilation-parse-errors-filename-function' can -be used to transform filenames found in compilation output. - - -* Installation Changes in Emacs 21.1 - -See the INSTALL file for information on installing extra libraries and -fonts to take advantage of the new graphical features and extra -charsets in this release. - -** Support for GNU/Linux on IA64 machines has been added. - -** Support for LynxOS has been added. - -** There are new configure options associated with the support for -images and toolkit scrollbars. Use the --help option in `configure' -to list them. - -** You can build a 64-bit Emacs for SPARC/Solaris systems which -support 64-bit executables and also on Irix 6.5. This increases the -maximum buffer size. See etc/MACHINES for instructions. Changes to -build on other 64-bit systems should be straightforward modulo any -necessary changes to unexec. - -** There is a new configure option `--disable-largefile' to omit -Unix-98-style support for large files if that is available. - -** There is a new configure option `--without-xim' that instructs -Emacs to not use X Input Methods (XIM), if these are available. - -** `movemail' defaults to supporting POP. You can turn this off using -the --without-pop configure option, should that be necessary. - -** This version can be built for the Macintosh, but does not implement -all of the new display features described below. The port currently -lacks unexec, asynchronous processes, and networking support. See the -"Emacs and the Mac OS" appendix in the Emacs manual, for the -description of aspects specific to the Mac. - -** Note that the MS-Windows port does not yet implement various of the -new display features described below. - - -* Changes in Emacs 21.1 - -** Emacs has a new redisplay engine. - -The new redisplay handles characters of variable width and height. -Italic text can be used without redisplay problems. Fonts containing -oversized characters, i.e. characters larger than the logical height -of a font can be used. Images of various formats can be displayed in -the text. - -** Emacs has a new face implementation. - -The new faces no longer fundamentally use X font names to specify the -font. Instead, each face has several independent attributes--family, -height, width, weight and slant--that it may or may not specify. -These attributes can be merged from various faces, and then together -specify a font. - -Faces are supported on terminals that can display color or fonts. -These terminal capabilities are auto-detected. Details can be found -under Lisp changes, below. - -** Emacs can display faces on TTY frames. - -Emacs automatically detects terminals that are able to display colors. -Faces with a weight greater than normal are displayed extra-bright, if -the terminal supports it. Faces with a weight less than normal and -italic faces are displayed dimmed, if the terminal supports it. -Underlined faces are displayed underlined if possible. Other face -attributes such as `overline', `strike-through', and `box' are ignored -on terminals. - -The command-line options `-fg COLOR', `-bg COLOR', and `-rv' are now -supported on character terminals. - -Emacs automatically remaps all X-style color specifications to one of -the colors supported by the terminal. This means you could have the -same color customizations that work both on a windowed display and on -a TTY or when Emacs is invoked with the -nw option. - -** New default font is Courier 12pt under X. - -** Sound support - -Emacs supports playing sound files on GNU/Linux and FreeBSD (Voxware -driver and native BSD driver, a.k.a. Luigi's driver). Currently -supported file formats are RIFF-WAVE (*.wav) and Sun Audio (*.au). -You must configure Emacs with the option `--with-sound=yes' to enable -sound support. - -** Emacs now resizes mini-windows if appropriate. - -If a message is longer than one line, or minibuffer contents are -longer than one line, Emacs can resize the minibuffer window unless it -is on a frame of its own. You can control resizing and the maximum -minibuffer window size by setting the following variables: - -- User option: max-mini-window-height - -Maximum height for resizing mini-windows. If a float, it specifies a -fraction of the mini-window frame's height. If an integer, it -specifies a number of lines. - -Default is 0.25. - -- User option: resize-mini-windows - -How to resize mini-windows. If nil, don't resize. If t, always -resize to fit the size of the text. If `grow-only', let mini-windows -grow only, until they become empty, at which point they are shrunk -again. - -Default is `grow-only'. - -** LessTif support. - -Emacs now runs with the LessTif toolkit (see -). You will need version 0.92.26, or later. - -** LessTif/Motif file selection dialog. - -When Emacs is configured to use LessTif or Motif, reading a file name -from a menu will pop up a file selection dialog if `use-dialog-box' is -non-nil. - -** File selection dialog on MS-Windows is supported. - -When a file is visited by clicking File->Open, the MS-Windows version -now pops up a standard file selection dialog where you can select a -file to visit. File->Save As also pops up that dialog. - -** Toolkit scroll bars. - -Emacs now uses toolkit scroll bars if available. When configured for -LessTif/Motif, it will use that toolkit's scroll bar. Otherwise, when -configured for Lucid and Athena widgets, it will use the Xaw3d scroll -bar if Xaw3d is available. You can turn off the use of toolkit scroll -bars by specifying `--with-toolkit-scroll-bars=no' when configuring -Emacs. - -When you encounter problems with the Xaw3d scroll bar, watch out how -Xaw3d is compiled on your system. If the Makefile generated from -Xaw3d's Imakefile contains a `-DNARROWPROTO' compiler option, and your -Emacs system configuration file `s/your-system.h' does not contain a -define for NARROWPROTO, you might consider adding it. Take -`s/freebsd.h' as an example. - -Alternatively, if you don't have access to the Xaw3d source code, take -a look at your system's imake configuration file, for example in the -directory `/usr/X11R6/lib/X11/config' (paths are different on -different systems). You will find files `*.cf' there. If your -system's cf-file contains a line like `#define NeedWidePrototypes NO', -add a `#define NARROWPROTO' to your Emacs system configuration file. - -The reason for this is that one Xaw3d function uses `double' or -`float' function parameters depending on the setting of NARROWPROTO. -This is not a problem when Imakefiles are used because each system's -imake configuration file contains the necessary information. Since -Emacs doesn't use imake, this has do be done manually. - -** Tool bar support. - -Emacs supports a tool bar at the top of a frame under X. For details -of how to define a tool bar, see the page describing Lisp-level -changes. Tool-bar global minor mode controls whether or not it is -displayed and is on by default. The appearance of the bar is improved -if Emacs has been built with XPM image support. Otherwise monochrome -icons will be used. - -To make the tool bar more useful, we need contributions of extra icons -for specific modes (with copyright assignments). - -** Tooltips. - -Tooltips are small X windows displaying a help string at the current -mouse position. The Lisp package `tooltip' implements them. You can -turn them off via the user option `tooltip-mode'. - -Tooltips also provides support for GUD debugging. If activated, -variable values can be displayed in tooltips by pointing at them with -the mouse in source buffers. You can customize various aspects of the -tooltip display in the group `tooltip'. - -** Automatic Hscrolling - -Horizontal scrolling now happens automatically if -`automatic-hscrolling' is set (the default). This setting can be -customized. - -If a window is scrolled horizontally with set-window-hscroll, or -scroll-left/scroll-right (C-x <, C-x >), this serves as a lower bound -for automatic horizontal scrolling. Automatic scrolling will scroll -the text more to the left if necessary, but won't scroll the text more -to the right than the column set with set-window-hscroll etc. - -** When using a windowing terminal, each Emacs window now has a cursor -of its own. By default, when a window is selected, the cursor is -solid; otherwise, it is hollow. The user-option -`cursor-in-non-selected-windows' controls how to display the -cursor in non-selected windows. If nil, no cursor is shown, if -non-nil a hollow box cursor is shown. - -** Fringes to the left and right of windows are used to display -truncation marks, continuation marks, overlay arrows and alike. The -foreground, background, and stipple of these areas can be changed by -customizing face `fringe'. - -** The mode line under X is now drawn with shadows by default. -You can change its appearance by modifying the face `mode-line'. -In particular, setting the `:box' attribute to nil turns off the 3D -appearance of the mode line. (The 3D appearance makes the mode line -occupy more space, and thus might cause the first or the last line of -the window to be partially obscured.) - -The variable `mode-line-inverse-video', which was used in older -versions of emacs to make the mode-line stand out, is now deprecated. -However, setting it to nil will cause the `mode-line' face to be -ignored, and mode-lines to be drawn using the default text face. - -** Mouse-sensitive mode line. - -Different parts of the mode line have been made mouse-sensitive on all -systems which support the mouse. Moving the mouse to a -mouse-sensitive part in the mode line changes the appearance of the -mouse pointer to an arrow, and help about available mouse actions is -displayed either in the echo area, or in the tooltip window if you -have enabled one. - -Currently, the following actions have been defined: - -- Mouse-1 on the buffer name in the mode line goes to the next buffer. - -- Mouse-3 on the buffer-name goes to the previous buffer. - -- Mouse-2 on the read-only or modified status in the mode line (`%' or -`*') toggles the status. - -- Mouse-3 on the major mode name displays a major mode menu. - -- Mouse-3 on the mode name displays a minor-mode menu. - -** Hourglass pointer - -Emacs can optionally display an hourglass pointer under X. You can -turn the display on or off by customizing group `cursor'. - -** Blinking cursor - -M-x blink-cursor-mode toggles a blinking cursor under X and on -terminals having terminal capabilities `vi', `vs', and `ve'. Blinking -and related parameters like frequency and delay can be customized in -the group `cursor'. - -** New font-lock support mode `jit-lock-mode'. - -This support mode is roughly equivalent to `lazy-lock' but is -generally faster. It supports stealth and deferred fontification. -See the documentation of the function `jit-lock-mode' for more -details. - -Font-lock uses jit-lock-mode as default support mode, so you don't -have to do anything to activate it. - -** The default binding of the Delete key has changed. - -The new user-option `normal-erase-is-backspace' can be set to -determine the effect of the Delete and Backspace function keys. - -On window systems, the default value of this option is chosen -according to the keyboard used. If the keyboard has both a Backspace -key and a Delete key, and both are mapped to their usual meanings, the -option's default value is set to t, so that Backspace can be used to -delete backward, and Delete can be used to delete forward. On -keyboards which either have only one key (usually labeled DEL), or two -keys DEL and BS which produce the same effect, the option's value is -set to nil, and these keys delete backward. - -If not running under a window system, setting this option accomplishes -a similar effect by mapping C-h, which is usually generated by the -Backspace key, to DEL, and by mapping DEL to C-d via -`keyboard-translate'. The former functionality of C-h is available on -the F1 key. You should probably not use this setting on a text-only -terminal if you don't have both Backspace, Delete and F1 keys. - -Programmatically, you can call function normal-erase-is-backspace-mode -to toggle the behavior of the Delete and Backspace keys. - -** The default for user-option `next-line-add-newlines' has been -changed to nil, i.e. C-n will no longer add newlines at the end of a -buffer by default. - -** The and keys now move to the beginning or end of the -current line, respectively. C- and C- move to the -beginning and end of the buffer. - -** Emacs now checks for recursive loads of Lisp files. If the -recursion depth exceeds `recursive-load-depth-limit', an error is -signaled. - -** When an error is signaled during the loading of the user's init -file, Emacs now pops up the *Messages* buffer. - -** Emacs now refuses to load compiled Lisp files which weren't -compiled with Emacs. Set `load-dangerous-libraries' to t to change -this behavior. - -The reason for this change is an incompatible change in XEmacs's byte -compiler. Files compiled with XEmacs can contain byte codes that let -Emacs dump core. - -** Toggle buttons and radio buttons in menus. - -When compiled with LessTif (or Motif) support, Emacs uses toolkit -widgets for radio and toggle buttons in menus. When configured for -Lucid, Emacs draws radio buttons and toggle buttons similar to Motif. - -** The menu bar configuration has changed. The new configuration is -more CUA-compliant. The most significant change is that Options is -now a separate menu-bar item, with Mule and Customize as its submenus. - -** Item Save Options on the Options menu allows saving options set -using that menu. - -** Highlighting of trailing whitespace. - -When `show-trailing-whitespace' is non-nil, Emacs displays trailing -whitespace in the face `trailing-whitespace'. Trailing whitespace is -defined as spaces or tabs at the end of a line. To avoid busy -highlighting when entering new text, trailing whitespace is not -displayed if point is at the end of the line containing the -whitespace. - -** C-x 5 1 runs the new command delete-other-frames which deletes -all frames except the selected one. - -** The new user-option `confirm-kill-emacs' can be customized to -let Emacs ask for confirmation before exiting. - -** The header line in an Info buffer is now displayed as an emacs -header-line (which is like a mode-line, but at the top of the window), -so that it remains visible even when the buffer has been scrolled. -This behavior may be disabled by customizing the option -`Info-use-header-line'. - -** Polish, Czech, German, and French translations of Emacs' reference card -have been added. They are named `pl-refcard.tex', `cs-refcard.tex', -`de-refcard.tex' and `fr-refcard.tex'. Postscript files are included. - -** An `Emacs Survival Guide', etc/survival.tex, is available. - -** A reference card for Dired has been added. Its name is -`dired-ref.tex'. A French translation is available in -`fr-drdref.tex'. - -** C-down-mouse-3 is bound differently. Now if the menu bar is not -displayed it pops up a menu containing the items which would be on the -menu bar. If the menu bar is displayed, it pops up the major mode -menu or the Edit menu if there is no major mode menu. - -** Variable `load-path' is no longer customizable through Customize. - -You can no longer use `M-x customize-variable' to customize `load-path' -because it now contains a version-dependent component. You can still -use `add-to-list' and `setq' to customize this variable in your -`~/.emacs' init file or to modify it from any Lisp program in general. - -** C-u C-x = provides detailed information about the character at -point in a pop-up window. - -** Emacs can now support 'wheeled' mice (such as the MS IntelliMouse) -under XFree86. To enable this, use the `mouse-wheel-mode' command, or -customize the variable `mouse-wheel-mode'. - -The variables `mouse-wheel-follow-mouse' and `mouse-wheel-scroll-amount' -determine where and by how much buffers are scrolled. - -** Emacs' auto-save list files are now by default stored in a -sub-directory `.emacs.d/auto-save-list/' of the user's home directory. -(On MS-DOS, this subdirectory's name is `_emacs.d/auto-save.list/'.) -You can customize `auto-save-list-file-prefix' to change this location. - -** The function `getenv' is now callable interactively. - -** The new user-option `even-window-heights' can be set to nil -to prevent `display-buffer' from evening out window heights. - -** The new command M-x delete-trailing-whitespace RET will delete the -trailing whitespace within the current restriction. You can also add -this function to `write-file-hooks' or `local-write-file-hooks'. - -** When visiting a file with M-x find-file-literally, no newlines will -be added to the end of the buffer even if `require-final-newline' is -non-nil. - -** The new user-option `find-file-suppress-same-file-warnings' can be -set to suppress warnings ``X and Y are the same file'' when visiting a -file that is already visited under a different name. - -** The new user-option `electric-help-shrink-window' can be set to -nil to prevent adjusting the help window size to the buffer size. - -** New command M-x describe-character-set reads a character set name -and displays information about that. - -** The new variable `auto-mode-interpreter-regexp' contains a regular -expression matching interpreters, for file mode determination. - -This regular expression is matched against the first line of a file to -determine the file's mode in `set-auto-mode' when Emacs can't deduce a -mode from the file's name. If it matches, the file is assumed to be -interpreted by the interpreter matched by the second group of the -regular expression. The mode is then determined as the mode -associated with that interpreter in `interpreter-mode-alist'. - -** New function executable-make-buffer-file-executable-if-script-p is -suitable as an after-save-hook as an alternative to `executable-chmod'. - -** The most preferred coding-system is now used to save a buffer if -buffer-file-coding-system is `undecided' and it is safe for the buffer -contents. (The most preferred is set by set-language-environment or -by M-x prefer-coding-system.) Thus if you visit an ASCII file and -insert a non-ASCII character from your current language environment, -the file will be saved silently with the appropriate coding. -Previously you would be prompted for a safe coding system. - -** The many obsolete language `setup-...-environment' commands have -been removed -- use `set-language-environment'. - -** The new Custom option `keyboard-coding-system' specifies a coding -system for keyboard input. - -** New variable `inhibit-iso-escape-detection' determines if Emacs' -coding system detection algorithm should pay attention to ISO2022's -escape sequences. If this variable is non-nil, the algorithm ignores -such escape sequences. The default value is nil, and it is -recommended not to change it except for the special case that you -always want to read any escape code verbatim. If you just want to -read a specific file without decoding escape codes, use C-x RET c -(`universal-coding-system-argument'). For instance, C-x RET c latin-1 -RET C-x C-f filename RET. - -** Variable `default-korean-keyboard' is initialized properly from the -environment variable `HANGUL_KEYBOARD_TYPE'. - -** New command M-x list-charset-chars reads a character set name and -displays all characters in that character set. - -** M-x set-terminal-coding-system (C-x RET t) now allows CCL-based -coding systems such as cpXXX and cyrillic-koi8. - -** Emacs now attempts to determine the initial language environment -and preferred and locale coding systems systematically from the -LC_ALL, LC_CTYPE, and LANG environment variables during startup. - -** New language environments `Polish', `Latin-8' and `Latin-9'. -Latin-8 and Latin-9 correspond respectively to the ISO character sets -8859-14 (Celtic) and 8859-15 (updated Latin-1, with the Euro sign). -GNU Intlfonts doesn't support these yet but recent X releases have -8859-15. See etc/INSTALL for information on obtaining extra fonts. -There are new Leim input methods for Latin-8 and Latin-9 prefix (only) -and Polish `slash'. - -** New language environments `Dutch' and `Spanish'. -These new environments mainly select appropriate translations -of the tutorial. - -** In Ethiopic language environment, special key bindings for -function keys are changed as follows. This is to conform to "Emacs -Lisp Coding Convention". - - new command old-binding - --- ------- ----------- - f3 ethio-fidel-to-sera-buffer f5 - S-f3 ethio-fidel-to-sera-region f5 - C-f3 ethio-fidel-to-sera-mail-or-marker f5 - - f4 ethio-sera-to-fidel-buffer unchanged - S-f4 ethio-sera-to-fidel-region unchanged - C-f4 ethio-sera-to-fidel-mail-or-marker unchanged - - S-f5 ethio-toggle-punctuation f3 - S-f6 ethio-modify-vowel f6 - S-f7 ethio-replace-space f7 - S-f8 ethio-input-special-character f8 - S-f9 ethio-replace-space unchanged - C-f9 ethio-toggle-space f2 - -** There are new Leim input methods. -New input methods "turkish-postfix", "turkish-alt-postfix", -"greek-mizuochi", "TeX", and "greek-babel" are now part of the Leim -package. - -** The rule of input method "slovak" is slightly changed. Now the -rules for translating "q" and "Q" to "`" (backquote) are deleted, thus -typing them inserts "q" and "Q" respectively. Rules for translating -"=q", "+q", "=Q", and "+Q" to "`" are also deleted. Now, to input -"`", you must type "=q". - -** When your terminal can't display characters from some of the ISO -8859 character sets but can display Latin-1, you can display -more-or-less mnemonic sequences of ASCII/Latin-1 characters instead of -empty boxes (under a window system) or question marks (not under a -window system). Customize the option `latin1-display' to turn this -on. - -** M-; now calls comment-dwim which tries to do something clever based -on the context. M-x kill-comment is now an alias to comment-kill, -defined in newcomment.el. You can choose different styles of region -commenting with the variable `comment-style'. - -** New user options `display-time-mail-face' and -`display-time-use-mail-icon' control the appearance of mode-line mail -indicator used by the display-time package. On a suitable display the -indicator can be an icon and is mouse-sensitive. - -** On window-systems, additional space can be put between text lines -on the display using several methods - -- By setting frame parameter `line-spacing' to PIXELS. PIXELS must be -a positive integer, and specifies that PIXELS number of pixels should -be put below text lines on the affected frame or frames. - -- By setting X resource `lineSpacing', class `LineSpacing'. This is -equivalent to specifying the frame parameter. - -- By specifying `--line-spacing=N' or `-lsp N' on the command line. - -- By setting buffer-local variable `line-spacing'. The meaning is -the same, but applies to the a particular buffer only. - -** The new command `clone-indirect-buffer' can be used to create -an indirect buffer that is a twin copy of the current buffer. The -command `clone-indirect-buffer-other-window', bound to C-x 4 c, -does the same but displays the indirect buffer in another window. - -** New user options `backup-directory-alist' and -`make-backup-file-name-function' control the placement of backups, -typically in a single directory or in an invisible sub-directory. - -** New commands iso-iso2sgml and iso-sgml2iso convert between Latin-1 -characters and the corresponding SGML (HTML) entities. - -** New X resources recognized - -*** The X resource `synchronous', class `Synchronous', specifies -whether Emacs should run in synchronous mode. Synchronous mode -is useful for debugging X problems. - -Example: - - emacs.synchronous: true - -*** The X resource `visualClass, class `VisualClass', specifies the -visual Emacs should use. The resource's value should be a string of -the form `CLASS-DEPTH', where CLASS is the name of the visual class, -and DEPTH is the requested color depth as a decimal number. Valid -visual class names are - - TrueColor - PseudoColor - DirectColor - StaticColor - GrayScale - StaticGray - -Visual class names specified as X resource are case-insensitive, i.e. -`pseudocolor', `Pseudocolor' and `PseudoColor' all have the same -meaning. - -The program `xdpyinfo' can be used to list the visual classes -supported on your display, and which depths they have. If -`visualClass' is not specified, Emacs uses the display's default -visual. - -Example: - - emacs.visualClass: TrueColor-8 - -*** The X resource `privateColormap', class `PrivateColormap', -specifies that Emacs should use a private colormap if it is using the -default visual, and that visual is of class PseudoColor. Recognized -resource values are `true' or `on'. - -Example: - - emacs.privateColormap: true - -** Faces and frame parameters. - -There are four new faces `scroll-bar', `border', `cursor' and `mouse'. -Setting the frame parameters `scroll-bar-foreground' and -`scroll-bar-background' sets foreground and background color of face -`scroll-bar' and vice versa. Setting frame parameter `border-color' -sets the background color of face `border' and vice versa. Likewise -for frame parameters `cursor-color' and face `cursor', and frame -parameter `mouse-color' and face `mouse'. - -Changing frame parameter `font' sets font-related attributes of the -`default' face and vice versa. Setting frame parameters -`foreground-color' or `background-color' sets the colors of the -`default' face and vice versa. - -** New face `menu'. - -The face `menu' can be used to change colors and font of Emacs' menus. - -** New frame parameter `screen-gamma' for gamma correction. - -The new frame parameter `screen-gamma' specifies gamma-correction for -colors. Its value may be nil, the default, in which case no gamma -correction occurs, or a number > 0, usually a float, that specifies -the screen gamma of a frame's display. - -PC monitors usually have a screen gamma of 2.2. smaller values result -in darker colors. You might want to try a screen gamma of 1.5 for LCD -color displays. The viewing gamma Emacs uses is 0.4545. (1/2.2). - -The X resource name of this parameter is `screenGamma', class -`ScreenGamma'. - -** Tabs and variable-width text. - -Tabs are now displayed with stretch properties; the width of a tab is -defined as a multiple of the normal character width of a frame, and is -independent of the fonts used in the text where the tab appears. -Thus, tabs can be used to line up text in different fonts. - -** Enhancements of the Lucid menu bar - -*** The Lucid menu bar now supports the resource "margin". - - emacs.pane.menubar.margin: 5 - -The default margin is 4 which makes the menu bar appear like the -LessTif/Motif one. - -*** Arrows that indicate sub-menus are now drawn with shadows, as in -LessTif and Motif. - -** A block cursor can be drawn as wide as the glyph under it under X. - -As an example: if a block cursor is over a tab character, it will be -drawn as wide as that tab on the display. To do this, set -`x-stretch-cursor' to a non-nil value. - -** Empty display lines at the end of a buffer may be marked with a -bitmap (this is similar to the tilde displayed by vi and Less). - -This behavior is activated by setting the buffer-local variable -`indicate-empty-lines' to a non-nil value. The default value of this -variable is found in `default-indicate-empty-lines'. - -** There is a new "aggressive" scrolling method. - -When scrolling up because point is above the window start, if the -value of the buffer-local variable `scroll-up-aggressively' is a -number, Emacs chooses a new window start so that point ends up that -fraction of the window's height from the top of the window. - -When scrolling down because point is below the window end, if the -value of the buffer-local variable `scroll-down-aggressively' is a -number, Emacs chooses a new window start so that point ends up that -fraction of the window's height from the bottom of the window. - -** You can now easily create new *Info* buffers using either -M-x clone-buffer, C-u m RET or C-u g RET. -M-x clone-buffer can also be used on *Help* and several other special -buffers. - -** The command `Info-search' now uses a search history. - -** Listing buffers with M-x list-buffers (C-x C-b) now shows -abbreviated file names. Abbreviations can be customized by changing -`directory-abbrev-alist'. - -** A new variable, backup-by-copying-when-privileged-mismatch, gives -the highest file uid for which backup-by-copying-when-mismatch will be -forced on. The assumption is that uids less than or equal to this -value are special uids (root, bin, daemon, etc.--not real system -users) and that files owned by these users should not change ownership, -even if your system policy allows users other than root to edit them. - -The default is 200; set the variable to nil to disable the feature. - -** The rectangle commands now avoid inserting undesirable spaces, -notably at the end of lines. - -All these functions have been rewritten to avoid inserting unwanted -spaces, and an optional prefix now allows them to behave the old way. - -** The function `replace-rectangle' is an alias for `string-rectangle'. - -** The new command M-x string-insert-rectangle is like `string-rectangle', -but inserts text instead of replacing it. - -** The new command M-x query-replace-regexp-eval acts like -query-replace-regexp, but takes a Lisp expression which is evaluated -after each match to get the replacement text. - -** M-x query-replace recognizes a new command `e' (or `E') that lets -you edit the replacement string. - -** The new command mail-abbrev-complete-alias, bound to `M-TAB' -(if you load the library `mailabbrev'), lets you complete mail aliases -in the text, analogous to lisp-complete-symbol. - -** The variable `echo-keystrokes' may now have a floating point value. - -** If your init file is compiled (.emacs.elc), `user-init-file' is set -to the source name (.emacs.el), if that exists, after loading it. - -** The help string specified for a menu-item whose definition contains -the property `:help HELP' is now displayed under X, on MS-Windows, and -MS-DOS, either in the echo area or with tooltips. Many standard menus -displayed by Emacs now have help strings. - --- -** New user option `read-mail-command' specifies a command to use to -read mail from the menu etc. - -** The environment variable `EMACSLOCKDIR' is no longer used on MS-Windows. -This environment variable was used when creating lock files. Emacs on -MS-Windows does not use this variable anymore. This change was made -before Emacs 21.1, but wasn't documented until now. - -** Highlighting of mouse-sensitive regions is now supported in the -MS-DOS version of Emacs. - -** The new command `msdos-set-mouse-buttons' forces the MS-DOS version -of Emacs to behave as if the mouse had a specified number of buttons. -This comes handy with mice that don't report their number of buttons -correctly. One example is the wheeled mice, which report 3 buttons, -but clicks on the middle button are not passed to the MS-DOS version -of Emacs. - -** Customize changes - -*** Customize now supports comments about customized items. Use the -`State' menu to add comments, or give a prefix argument to -M-x customize-set-variable or M-x customize-set-value. Note that -customization comments will cause the customizations to fail in -earlier versions of Emacs. - -*** The new option `custom-buffer-done-function' says whether to kill -Custom buffers when you've done with them or just bury them (the -default). - -*** If Emacs was invoked with the `-q' or `--no-init-file' options, it -does not allow you to save customizations in your `~/.emacs' init -file. This is because saving customizations from such a session would -wipe out all the other customizationss you might have on your init -file. - -** If Emacs was invoked with the `-q' or `--no-init-file' options, it -does not save disabled and enabled commands for future sessions, to -avoid overwriting existing customizations of this kind that are -already in your init file. - -** New features in evaluation commands - -*** The commands to evaluate Lisp expressions, such as C-M-x in Lisp -modes, C-j in Lisp Interaction mode, and M-:, now bind the variables -print-level, print-length, and debug-on-error based on the new -customizable variables eval-expression-print-level, -eval-expression-print-length, and eval-expression-debug-on-error. - -The default values for the first two of these variables are 12 and 4 -respectively, which means that `eval-expression' now prints at most -the first 12 members of a list and at most 4 nesting levels deep (if -the list is longer or deeper than that, an ellipsis `...' is -printed). - - or on the printed text toggles between an abbreviated -printed representation and an unabbreviated one. - -The default value of eval-expression-debug-on-error is t, so any error -during evaluation produces a backtrace. - -*** The function `eval-defun' (C-M-x) now loads Edebug and instruments -code when called with a prefix argument. - -** CC mode changes. - -Note: This release contains changes that might not be compatible with -current user setups (although it's believed that these -incompatibilities will only show in very uncommon circumstances). -However, since the impact is uncertain, these changes may be rolled -back depending on user feedback. Therefore there's no forward -compatibility guarantee wrt the new features introduced in this -release. - -*** The hardcoded switch to "java" style in Java mode is gone. -CC Mode used to automatically set the style to "java" when Java mode -is entered. This has now been removed since it caused too much -confusion. - -However, to keep backward compatibility to a certain extent, the -default value for c-default-style now specifies the "java" style for -java-mode, but "gnu" for all other modes (as before). So you won't -notice the change if you haven't touched that variable. - -*** New cleanups, space-before-funcall and compact-empty-funcall. -Two new cleanups have been added to c-cleanup-list: - -space-before-funcall causes a space to be inserted before the opening -parenthesis of a function call, which gives the style "foo (bar)". - -compact-empty-funcall causes any space before a function call opening -parenthesis to be removed if there are no arguments to the function. -It's typically useful together with space-before-funcall to get the -style "foo (bar)" and "foo()". - -*** Some keywords now automatically trigger reindentation. -Keywords like "else", "while", "catch" and "finally" have been made -"electric" to make them reindent automatically when they continue an -earlier statement. An example: - -for (i = 0; i < 17; i++) - if (a[i]) - res += a[i]->offset; -else - -Here, the "else" should be indented like the preceding "if", since it -continues that statement. CC Mode will automatically reindent it after -the "else" has been typed in full, since it's not until then it's -possible to decide whether it's a new statement or a continuation of -the preceding "if". - -CC Mode uses Abbrev mode to achieve this, which is therefore turned on -by default. - -*** M-a and M-e now moves by sentence in multiline strings. -Previously these two keys only moved by sentence in comments, which -meant that sentence movement didn't work in strings containing -documentation or other natural language text. - -The reason it's only activated in multiline strings (i.e. strings that -contain a newline, even when escaped by a '\') is to avoid stopping in -the short strings that often reside inside statements. Multiline -strings almost always contain text in a natural language, as opposed -to other strings that typically contain format specifications, -commands, etc. Also, it's not that bothersome that M-a and M-e misses -sentences in single line strings, since they're short anyway. - -*** Support for autodoc comments in Pike mode. -Autodoc comments for Pike are used to extract documentation from the -source, like Javadoc in Java. Pike mode now recognize this markup in -comment prefixes and paragraph starts. - -*** The comment prefix regexps on c-comment-prefix may be mode specific. -When c-comment-prefix is an association list, it specifies the comment -line prefix on a per-mode basis, like c-default-style does. This -change came about to support the special autodoc comment prefix in -Pike mode only. - -*** Better handling of syntactic errors. -The recovery after unbalanced parens earlier in the buffer has been -improved; CC Mode now reports them by dinging and giving a message -stating the offending line, but still recovers and indent the -following lines in a sane way (most of the time). An "else" with no -matching "if" is handled similarly. If an error is discovered while -indenting a region, the whole region is still indented and the error -is reported afterwards. - -*** Lineup functions may now return absolute columns. -A lineup function can give an absolute column to indent the line to by -returning a vector with the desired column as the first element. - -*** More robust and warning-free byte compilation. -Although this is strictly not a user visible change (well, depending -on the view of a user), it's still worth mentioning that CC Mode now -can be compiled in the standard ways without causing trouble. Some -code have also been moved between the subpackages to enhance the -modularity somewhat. Thanks to Martin Buchholz for doing the -groundwork. - -*** c-style-variables-are-local-p now defaults to t. -This is an incompatible change that has been made to make the behavior -of the style system wrt global variable settings less confusing for -non-advanced users. If you know what this variable does you might -want to set it to nil in your .emacs, otherwise you probably don't -have to bother. - -Defaulting c-style-variables-are-local-p to t avoids the confusing -situation that occurs when a user sets some style variables globally -and edits both a Java and a non-Java file in the same Emacs session. -If the style variables aren't buffer local in this case, loading of -the second file will cause the default style (either "gnu" or "java" -by default) to override the global settings made by the user. - -*** New initialization procedure for the style system. -When the initial style for a buffer is determined by CC Mode (from the -variable c-default-style), the global values of style variables now -take precedence over the values specified by the chosen style. This -is different than the old behavior: previously, the style-specific -settings would override the global settings. This change makes it -possible to do simple configuration in the intuitive way with -Customize or with setq lines in one's .emacs file. - -By default, the global value of every style variable is the new -special symbol set-from-style, which causes the value to be taken from -the style system. This means that in effect, only an explicit setting -of a style variable will cause the "overriding" behavior described -above. - -Also note that global settings override style-specific settings *only* -when the initial style of a buffer is chosen by a CC Mode major mode -function. When a style is chosen in other ways --- for example, by a -call like (c-set-style "gnu") in a hook, or via M-x c-set-style --- -then the style-specific values take precedence over any global style -values. In Lisp terms, global values override style-specific values -only when the new second argument to c-set-style is non-nil; see the -function documentation for more info. - -The purpose of these changes is to make it easier for users, -especially novice users, to do simple customizations with Customize or -with setq in their .emacs files. On the other hand, the new system is -intended to be compatible with advanced users' customizations as well, -such as those that choose styles in hooks or whatnot. This new system -is believed to be almost entirely compatible with current -configurations, in spite of the changed precedence between style and -global variable settings when a buffer's default style is set. - -(Thanks to Eric Eide for clarifying this explanation a bit.) - -**** c-offsets-alist is now a customizable variable. -This became possible as a result of the new initialization behavior. - -This variable is treated slightly differently from the other style -variables; instead of using the symbol set-from-style, it will be -completed with the syntactic symbols it doesn't already contain when -the style is first initialized. This means it now defaults to the -empty list to make all syntactic elements get their values from the -style system. - -**** Compatibility variable to restore the old behavior. -In case your configuration doesn't work with this change, you can set -c-old-style-variable-behavior to non-nil to get the old behavior back -as far as possible. - -*** Improvements to line breaking and text filling. -CC Mode now handles this more intelligently and seamlessly wrt the -surrounding code, especially inside comments. For details see the new -chapter about this in the manual. - -**** New variable to recognize comment line prefix decorations. -The variable c-comment-prefix-regexp has been added to properly -recognize the line prefix in both block and line comments. It's -primarily used to initialize the various paragraph recognition and -adaptive filling variables that the text handling functions uses. - -**** New variable c-block-comment-prefix. -This is a generalization of the now obsolete variable -c-comment-continuation-stars to handle arbitrary strings. - -**** CC Mode now uses adaptive fill mode. -This to make it adapt better to the paragraph style inside comments. - -It's also possible to use other adaptive filling packages inside CC -Mode, notably Kyle E. Jones' Filladapt mode (http://wonderworks.com/). -A new convenience function c-setup-filladapt sets up Filladapt for use -inside CC Mode. - -Note though that the 2.12 version of Filladapt lacks a feature that -causes it to work suboptimally when c-comment-prefix-regexp can match -the empty string (which it commonly does). A patch for that is -available from the CC Mode web site (http://www.python.org/emacs/ -cc-mode/). - -**** The variables `c-hanging-comment-starter-p' and -`c-hanging-comment-ender-p', which controlled how comment starters and -enders were filled, are not used anymore. The new version of the -function `c-fill-paragraph' keeps the comment starters and enders as -they were before the filling. - -**** It's now possible to selectively turn off auto filling. -The variable c-ignore-auto-fill is used to ignore auto fill mode in -specific contexts, e.g. in preprocessor directives and in string -literals. - -**** New context sensitive line break function c-context-line-break. -It works like newline-and-indent in normal code, and adapts the line -prefix according to the comment style when used inside comments. If -you're normally using newline-and-indent, you might want to switch to -this function. - -*** Fixes to IDL mode. -It now does a better job in recognizing only the constructs relevant -to IDL. E.g. it no longer matches "class" as the beginning of a -struct block, but it does match the CORBA 2.3 "valuetype" keyword. -Thanks to Eric Eide. - -*** Improvements to the Whitesmith style. -It now keeps the style consistently on all levels and both when -opening braces hangs and when they don't. - -**** New lineup function c-lineup-whitesmith-in-block. - -*** New lineup functions c-lineup-template-args and c-indent-multi-line-block. -See their docstrings for details. c-lineup-template-args does a -better job of tracking the brackets used as parens in C++ templates, -and is used by default to line up continued template arguments. - -*** c-lineup-comment now preserves alignment with a comment on the -previous line. It used to instead preserve comments that started in -the column specified by comment-column. - -*** c-lineup-C-comments handles "free form" text comments. -In comments with a long delimiter line at the start, the indentation -is kept unchanged for lines that start with an empty comment line -prefix. This is intended for the type of large block comments that -contain documentation with its own formatting. In these you normally -don't want CC Mode to change the indentation. - -*** The `c' syntactic symbol is now relative to the comment start -instead of the previous line, to make integers usable as lineup -arguments. - -*** All lineup functions have gotten docstrings. - -*** More preprocessor directive movement functions. -c-down-conditional does the reverse of c-up-conditional. -c-up-conditional-with-else and c-down-conditional-with-else are -variants of these that also stops at "#else" lines (suggested by Don -Provan). - -*** Minor improvements to many movement functions in tricky situations. - -** Dired changes - -*** New variable `dired-recursive-deletes' determines if the delete -command will delete non-empty directories recursively. The default -is, delete only empty directories. - -*** New variable `dired-recursive-copies' determines if the copy -command will copy directories recursively. The default is, do not -copy directories recursively. - -*** In command `dired-do-shell-command' (usually bound to `!') a `?' -in the shell command has a special meaning similar to `*', but with -the difference that the command will be run on each file individually. - -*** The new command `dired-find-alternate-file' (usually bound to `a') -replaces the Dired buffer with the buffer for an alternate file or -directory. - -*** The new command `dired-show-file-type' (usually bound to `y') shows -a message in the echo area describing what type of file the point is on. -This command invokes the external program `file' do its work, and so -will only work on systems with that program, and will be only as -accurate or inaccurate as it is. - -*** Dired now properly handles undo changes of adding/removing `-R' -from ls switches. - -*** Dired commands that prompt for a destination file now allow the use -of the `M-n' command in the minibuffer to insert the source filename, -which the user can then edit. This only works if there is a single -source file, not when operating on multiple marked files. - -** Gnus changes. - -The Gnus NEWS entries are short, but they reflect sweeping changes in -four areas: Article display treatment, MIME treatment, -internationalization and mail-fetching. - -*** The mail-fetching functions have changed. See the manual for the -many details. In particular, all procmail fetching variables are gone. - -If you used procmail like in - -(setq nnmail-use-procmail t) -(setq nnmail-spool-file 'procmail) -(setq nnmail-procmail-directory "~/mail/incoming/") -(setq nnmail-procmail-suffix "\\.in") - -this now has changed to - -(setq mail-sources - '((directory :path "~/mail/incoming/" - :suffix ".in"))) - -More information is available in the info doc at Select Methods -> -Getting Mail -> Mail Sources - -*** Gnus is now a MIME-capable reader. This affects many parts of -Gnus, and adds a slew of new commands. See the manual for details. -Separate MIME packages like RMIME, mime-compose etc., will probably no -longer work; remove them and use the native facilities. - -The FLIM/SEMI package still works with Emacs 21, but if you want to -use the native facilities, you must remove any mailcap.el[c] that was -installed by FLIM/SEMI version 1.13 or earlier. - -*** Gnus has also been multilingualized. This also affects too many -parts of Gnus to summarize here, and adds many new variables. There -are built-in facilities equivalent to those of gnus-mule.el, which is -now just a compatibility layer. - -*** gnus-mule.el is now just a compatibility layer over the built-in -Gnus facilities. - -*** gnus-auto-select-first can now be a function to be -called to position point. - -*** The user can now decide which extra headers should be included in -summary buffers and NOV files. - -*** `gnus-article-display-hook' has been removed. Instead, a number -of variables starting with `gnus-treat-' have been added. - -*** The Gnus posting styles have been redone again and now work in a -subtly different manner. - -*** New web-based backends have been added: nnslashdot, nnwarchive -and nnultimate. nnweb has been revamped, again, to keep up with -ever-changing layouts. - -*** Gnus can now read IMAP mail via nnimap. - -*** There is image support of various kinds and some sound support. - -** Changes in Texinfo mode. - -*** A couple of new key bindings have been added for inserting Texinfo -macros - - Key binding Macro - ------------------------- - C-c C-c C-s @strong - C-c C-c C-e @emph - C-c C-c u @uref - C-c C-c q @quotation - C-c C-c m @email - C-c C-o @ ... @end - M-RET @item - -*** The " key now inserts either " or `` or '' depending on context. - -** Changes in Outline mode. - -There is now support for Imenu to index headings. A new command -`outline-headers-as-kill' copies the visible headings in the region to -the kill ring, e.g. to produce a table of contents. - -** Changes to Emacs Server - -*** The new option `server-kill-new-buffers' specifies what to do -with buffers when done with them. If non-nil, the default, buffers -are killed, unless they were already present before visiting them with -Emacs Server. If nil, `server-temp-file-regexp' specifies which -buffers to kill, as before. - -Please note that only buffers are killed that still have a client, -i.e. buffers visited with `emacsclient --no-wait' are never killed in -this way. - -** Both emacsclient and Emacs itself now accept command line options -of the form +LINE:COLUMN in addition to +LINE. - -** Changes to Show Paren mode. - -*** Overlays used by Show Paren mode now use a priority property. -The new user option show-paren-priority specifies the priority to -use. Default is 1000. - -** New command M-x check-parens can be used to find unbalanced paren -groups and strings in buffers in Lisp mode (or other modes). - -** Changes to hideshow.el - -*** Generalized block selection and traversal - -A block is now recognized by its start and end regexps (both strings), -and an integer specifying which sub-expression in the start regexp -serves as the place where a `forward-sexp'-like function can operate. -See the documentation of variable `hs-special-modes-alist'. - -*** During incremental search, if Hideshow minor mode is active, -hidden blocks are temporarily shown. The variable `hs-headline' can -be used in the mode line format to show the line at the beginning of -the open block. - -*** User option `hs-hide-all-non-comment-function' specifies a -function to be called at each top-level block beginning, instead of -the normal block-hiding function. - -*** The command `hs-show-region' has been removed. - -*** The key bindings have changed to fit the Emacs conventions, -roughly imitating those of Outline minor mode. Notably, the prefix -for all bindings is now `C-c @'. For details, see the documentation -for `hs-minor-mode'. - -*** The variable `hs-show-hidden-short-form' has been removed, and -hideshow.el now always behaves as if this variable were set to t. - -** Changes to Change Log mode and Add-Log functions - -*** If you invoke `add-change-log-entry' from a backup file, it makes -an entry appropriate for the file's parent. This is useful for making -log entries by comparing a version with deleted functions. - -**** New command M-x change-log-merge merges another log into the -current buffer. - -*** New command M-x change-log-redate fixes any old-style date entries -in a log file. - -*** Change Log mode now adds a file's version number to change log -entries if user-option `change-log-version-info-enabled' is non-nil. -Unless the file is under version control the search for a file's -version number is performed based on regular expressions from -`change-log-version-number-regexp-list' which can be customized. -Version numbers are only found in the first 10 percent of a file. - -*** Change Log mode now defines its own faces for font-lock highlighting. - -** Changes to cmuscheme - -*** The user-option `scheme-program-name' has been renamed -`cmuscheme-program-name' due to conflicts with xscheme.el. - -** Changes in Font Lock - -*** The new function `font-lock-remove-keywords' can be used to remove -font-lock keywords from the current buffer or from a specific major mode. - -*** Multi-line patterns are now supported. Modes using this, should -set font-lock-multiline to t in their font-lock-defaults. - -*** `font-lock-syntactic-face-function' allows major-modes to choose -the face used for each string/comment. - -*** A new standard face `font-lock-doc-face'. -Meant for Lisp docstrings, Javadoc comments and other "documentation in code". - -** Changes to Shell mode - -*** The `shell' command now accepts an optional argument to specify the buffer -to use, which defaults to "*shell*". When used interactively, a -non-default buffer may be specified by giving the `shell' command a -prefix argument (causing it to prompt for the buffer name). - -** Comint (subshell) changes - -These changes generally affect all modes derived from comint mode, which -include shell-mode, gdb-mode, scheme-interaction-mode, etc. - -*** Comint now by default interprets some carriage-control characters. -Comint now removes CRs from CR LF sequences, and treats single CRs and -BSs in the output in a way similar to a terminal (by deleting to the -beginning of the line, or deleting the previous character, -respectively). This is achieved by adding `comint-carriage-motion' to -the `comint-output-filter-functions' hook by default. - -*** By default, comint no longer uses the variable `comint-prompt-regexp' -to distinguish prompts from user-input. Instead, it notices which -parts of the text were output by the process, and which entered by the -user, and attaches `field' properties to allow emacs commands to use -this information. Common movement commands, notably beginning-of-line, -respect field boundaries in a fairly natural manner. To disable this -feature, and use the old behavior, customize the user option -`comint-use-prompt-regexp-instead-of-fields'. - -*** Comint now includes new features to send commands to running processes -and redirect the output to a designated buffer or buffers. - -*** The command M-x comint-redirect-send-command reads a command and -buffer name from the mini-buffer. The command is sent to the current -buffer's process, and its output is inserted into the specified buffer. - -The command M-x comint-redirect-send-command-to-process acts like -M-x comint-redirect-send-command but additionally reads the name of -the buffer whose process should be used from the mini-buffer. - -*** Packages based on comint now highlight user input and program prompts, -and support choosing previous input with mouse-2. To control these features, -see the user-options `comint-highlight-input' and `comint-highlight-prompt'. - -*** The new command `comint-write-output' (usually bound to `C-c C-s') -saves the output from the most recent command to a file. With a prefix -argument, it appends to the file. - -*** The command `comint-kill-output' has been renamed `comint-delete-output' -(usually bound to `C-c C-o'); the old name is aliased to it for -compatibility. - -*** The new function `comint-add-to-input-history' adds commands to the input -ring (history). - -*** The new variable `comint-input-history-ignore' is a regexp for -identifying history lines that should be ignored, like tcsh time-stamp -strings, starting with a `#'. The default value of this variable is "^#". - -** Changes to Rmail mode - -*** The new user-option rmail-user-mail-address-regexp can be -set to fine tune the identification of the correspondent when -receiving new mail. If it matches the address of the sender, the -recipient is taken as correspondent of a mail. If nil, the default, -`user-login-name' and `user-mail-address' are used to exclude yourself -as correspondent. - -Usually you don't have to set this variable, except if you collect -mails sent by you under different user names. Then it should be a -regexp matching your mail addresses. - -*** The new user-option rmail-confirm-expunge controls whether and how -to ask for confirmation before expunging deleted messages from an -Rmail file. You can choose between no confirmation, confirmation -with y-or-n-p, or confirmation with yes-or-no-p. Default is to ask -for confirmation with yes-or-no-p. - -*** RET is now bound in the Rmail summary to rmail-summary-goto-msg, -like `j'. - -*** There is a new user option `rmail-digest-end-regexps' that -specifies the regular expressions to detect the line that ends a -digest message. - -*** The new user option `rmail-automatic-folder-directives' specifies -in which folder to put messages automatically. - -*** The new function `rmail-redecode-body' allows to fix a message -with non-ASCII characters if Emacs happens to decode it incorrectly -due to missing or malformed "charset=" header. - -** The new user-option `mail-envelope-from' can be used to specify -an envelope-from address different from user-mail-address. - -** The variable mail-specify-envelope-from controls whether to -use the -f option when sending mail. - -** The Rmail command `o' (`rmail-output-to-rmail-file') now writes the -current message in the internal `emacs-mule' encoding, rather than in -the encoding taken from the variable `buffer-file-coding-system'. -This allows to save messages whose characters cannot be safely encoded -by the buffer's coding system, and makes sure the message will be -displayed correctly when you later visit the target Rmail file. - -If you want your Rmail files be encoded in a specific coding system -other than `emacs-mule', you can customize the variable -`rmail-file-coding-system' to set its value to that coding system. - -** Changes to TeX mode - -*** The default mode has been changed from `plain-tex-mode' to -`latex-mode'. - -*** latex-mode now has a simple indentation algorithm. - -*** M-f and M-p jump around \begin...\end pairs. - -*** Added support for outline-minor-mode. - -** Changes to RefTeX mode - -*** RefTeX has new support for index generation. Index entries can be - created with `C-c <', with completion available on index keys. - Pressing `C-c /' indexes the word at the cursor with a default - macro. `C-c >' compiles all index entries into an alphabetically - sorted *Index* buffer which looks like the final index. Entries - can be edited from that buffer. - -*** Label and citation key selection now allow to select several - items and reference them together (use `m' to mark items, `a' or - `A' to use all marked entries). - -*** reftex.el has been split into a number of smaller files to reduce - memory use when only a part of RefTeX is being used. - -*** a new command `reftex-view-crossref-from-bibtex' (bound to `C-c &' - in BibTeX-mode) can be called in a BibTeX database buffer in order - to show locations in LaTeX documents where a particular entry has - been cited. - -** Emacs Lisp mode now allows multiple levels of outline headings. -The level of a heading is determined from the number of leading -semicolons in a heading line. Toplevel forms starting with a `(' -in column 1 are always made leaves. - -** The M-x time-stamp command (most commonly used on write-file-hooks) -has the following new features: - -*** The patterns for finding the time stamp and for updating a pattern -may match text spanning multiple lines. For example, some people like -to have the filename and date on separate lines. The new variable -time-stamp-inserts-lines controls the matching for multi-line patterns. - -*** More than one time stamp can be updated in the same file. This -feature is useful if you need separate time stamps in a program source -file to both include in formatted documentation and insert in the -compiled binary. The same time-stamp will be written at each matching -pattern. The variable time-stamp-count enables this new feature; it -defaults to 1. - -** Partial Completion mode now completes environment variables in -file names. - -** Ispell changes - -*** The command `ispell' now spell-checks a region if -transient-mark-mode is on, and the mark is active. Otherwise it -spell-checks the current buffer. - -*** Support for synchronous subprocesses - DOS/Windoze - has been -added. - -*** An "alignment error" bug was fixed when a manual spelling -correction is made and re-checked. - -*** Italian, Portuguese, and Slovak dictionary definitions have been added. - -*** Region skipping performance has been vastly improved in some -cases. - -*** Spell checking HTML buffers has been improved and isn't so strict -on syntax errors. - -*** The buffer-local words are now always placed on a new line at the -end of the buffer. - -*** Spell checking now works in the MS-DOS version of Emacs. - -*** The variable `ispell-format-word' has been renamed to -`ispell-format-word-function'. The old name is still available as -alias. - -** Makefile mode changes - -*** The mode now uses the abbrev table `makefile-mode-abbrev-table'. - -*** Conditionals and include statements are now highlighted when -Fontlock mode is active. - -** Isearch changes - -*** Isearch now puts a call to `isearch-resume' in the command history, -so that searches can be resumed. - -*** In Isearch mode, C-M-s and C-M-r are now bound like C-s and C-r, -respectively, i.e. you can repeat a regexp isearch with the same keys -that started the search. - -*** In Isearch mode, mouse-2 in the echo area now yanks the current -selection into the search string rather than giving an error. - -*** There is a new lazy highlighting feature in incremental search. - -Lazy highlighting is switched on/off by customizing variable -`isearch-lazy-highlight'. When active, all matches for the current -search string are highlighted. The current match is highlighted as -before using face `isearch' or `region'. All other matches are -highlighted using face `isearch-lazy-highlight-face' which defaults to -`secondary-selection'. - -The extra highlighting makes it easier to anticipate where the cursor -will end up each time you press C-s or C-r to repeat a pending search. -Highlighting of these additional matches happens in a deferred fashion -using "idle timers," so the cycles needed do not rob isearch of its -usual snappy response. - -If `isearch-lazy-highlight-cleanup' is set to t, highlights for -matches are automatically cleared when you end the search. If it is -set to nil, you can remove the highlights manually with `M-x -isearch-lazy-highlight-cleanup'. - -** VC Changes - -VC has been overhauled internally. It is now modular, making it -easier to plug-in arbitrary version control backends. (See Lisp -Changes for details on the new structure.) As a result, the mechanism -to enable and disable support for particular version systems has -changed: everything is now controlled by the new variable -`vc-handled-backends'. Its value is a list of symbols that identify -version systems; the default is '(RCS CVS SCCS). When finding a file, -each of the backends in that list is tried in order to see whether the -file is registered in that backend. - -When registering a new file, VC first tries each of the listed -backends to see if any of them considers itself "responsible" for the -directory of the file (e.g. because a corresponding subdirectory for -master files exists). If none of the backends is responsible, then -the first backend in the list that could register the file is chosen. -As a consequence, the variable `vc-default-back-end' is now obsolete. - -The old variable `vc-master-templates' is also obsolete, although VC -still supports it for backward compatibility. To define templates for -RCS or SCCS, you should rather use the new variables -vc-{rcs,sccs}-master-templates. (There is no such feature under CVS -where it doesn't make sense.) - -The variables `vc-ignore-vc-files' and `vc-handle-cvs' are also -obsolete now, you must set `vc-handled-backends' to nil or exclude -`CVS' from the list, respectively, to achieve their effect now. - -*** General Changes - -The variable `vc-checkout-carefully' is obsolete: the corresponding -checks are always done now. - -VC Dired buffers are now kept up-to-date during all version control -operations. - -`vc-diff' output is now displayed in `diff-mode'. -`vc-print-log' uses `log-view-mode'. -`vc-log-mode' (used for *VC-Log*) has been replaced by `log-edit-mode'. - -The command C-x v m (vc-merge) now accepts an empty argument as the -first revision number. This means that any recent changes on the -current branch should be picked up from the repository and merged into -the working file (``merge news''). - -The commands C-x v s (vc-create-snapshot) and C-x v r -(vc-retrieve-snapshot) now ask for a directory name from which to work -downwards. - -*** Multiple Backends - -VC now lets you register files in more than one backend. This is -useful, for example, if you are working with a slow remote CVS -repository. You can then use RCS for local editing, and occasionally -commit your changes back to CVS, or pick up changes from CVS into your -local RCS archives. - -To make this work, the ``more local'' backend (RCS in our example) -should come first in `vc-handled-backends', and the ``more remote'' -backend (CVS) should come later. (The default value of -`vc-handled-backends' already has it that way.) - -You can then commit changes to another backend (say, RCS), by typing -C-u C-x v v RCS RET (i.e. vc-next-action now accepts a backend name as -a revision number). VC registers the file in the more local backend -if that hasn't already happened, and commits to a branch based on the -current revision number from the more remote backend. - -If a file is registered in multiple backends, you can switch to -another one using C-x v b (vc-switch-backend). This does not change -any files, it only changes VC's perspective on the file. Use this to -pick up changes from CVS while working under RCS locally. - -After you are done with your local RCS editing, you can commit your -changes back to CVS using C-u C-x v v CVS RET. In this case, the -local RCS archive is removed after the commit, and the log entry -buffer is initialized to contain the entire RCS change log of the file. - -*** Changes for CVS - -There is a new user option, `vc-cvs-stay-local'. If it is `t' (the -default), then VC avoids network queries for files registered in -remote repositories. The state of such files is then only determined -by heuristics and past information. `vc-cvs-stay-local' can also be a -regexp to match against repository hostnames; only files from hosts -that match it are treated locally. If the variable is nil, then VC -queries the repository just as often as it does for local files. - -If `vc-cvs-stay-local' is on, then VC also makes local backups of -repository versions. This means that ordinary diffs (C-x v =) and -revert operations (C-x v u) can be done completely locally, without -any repository interactions at all. The name of a local version -backup of FILE is FILE.~REV.~, where REV is the repository version -number. This format is similar to that used by C-x v ~ -(vc-version-other-window), except for the trailing dot. As a matter -of fact, the two features can each use the files created by the other, -the only difference being that files with a trailing `.' are deleted -automatically after commit. (This feature doesn't work on MS-DOS, -since DOS disallows more than a single dot in the trunk of a file -name.) - -If `vc-cvs-stay-local' is on, and there have been changes in the -repository, VC notifies you about it when you actually try to commit. -If you want to check for updates from the repository without trying to -commit, you can either use C-x v m RET to perform an update on the -current file, or you can use C-x v r RET to get an update for an -entire directory tree. - -The new user option `vc-cvs-use-edit' indicates whether VC should call -"cvs edit" to make files writeable; it defaults to `t'. (This option -is only meaningful if the CVSREAD variable is set, or if files are -"watched" by other developers.) - -The commands C-x v s (vc-create-snapshot) and C-x v r -(vc-retrieve-snapshot) are now also implemented for CVS. If you give -an empty snapshot name to the latter, that performs a `cvs update', -starting at the given directory. - -*** Lisp Changes in VC - -VC has been restructured internally to make it modular. You can now -add support for arbitrary version control backends by writing a -library that provides a certain set of backend-specific functions, and -then telling VC to use that library. For example, to add support for -a version system named SYS, you write a library named vc-sys.el, which -provides a number of functions vc-sys-... (see commentary at the top -of vc.el for a detailed list of them). To make VC use that library, -you need to put it somewhere into Emacs' load path and add the symbol -`SYS' to the list `vc-handled-backends'. - -** The customizable EDT emulation package now supports the EDT -SUBS command and EDT scroll margins. It also works with more -terminal/keyboard configurations and it now works under XEmacs. -See etc/edt-user.doc for more information. - -** New modes and packages - -*** The new global minor mode `minibuffer-electric-default-mode' -automatically hides the `(default ...)' part of minibuffer prompts when -the default is not applicable. - -*** Artist is an Emacs lisp package that allows you to draw lines, -rectangles and ellipses by using your mouse and/or keyboard. The -shapes are made up with the ascii characters |, -, / and \. - -Features are: - -- Intersecting: When a `|' intersects with a `-', a `+' is - drawn, like this: | \ / - --+-- X - | / \ - -- Rubber-banding: When drawing lines you can interactively see the - result while holding the mouse button down and moving the mouse. If - your machine is not fast enough (a 386 is a bit too slow, but a - pentium is well enough), you can turn this feature off. You will - then see 1's and 2's which mark the 1st and 2nd endpoint of the line - you are drawing. - -- Arrows: After having drawn a (straight) line or a (straight) - poly-line, you can set arrows on the line-ends by typing < or >. - -- Flood-filling: You can fill any area with a certain character by - flood-filling. - -- Cut copy and paste: You can cut, copy and paste rectangular - regions. Artist also interfaces with the rect package (this can be - turned off if it causes you any trouble) so anything you cut in - artist can be yanked with C-x r y and vice versa. - -- Drawing with keys: Everything you can do with the mouse, you can - also do without the mouse. - -- Aspect-ratio: You can set the variable artist-aspect-ratio to - reflect the height-width ratio for the font you are using. Squares - and circles are then drawn square/round. Note, that once your - ascii-file is shown with font with a different height-width ratio, - the squares won't be square and the circles won't be round. - -- Drawing operations: The following drawing operations are implemented: - - lines straight-lines - rectangles squares - poly-lines straight poly-lines - ellipses circles - text (see-thru) text (overwrite) - spray-can setting size for spraying - vaporize line vaporize lines - erase characters erase rectangles - - Straight lines are lines that go horizontally, vertically or - diagonally. Plain lines go in any direction. The operations in - the right column are accessed by holding down the shift key while - drawing. - - It is possible to vaporize (erase) entire lines and connected lines - (rectangles for example) as long as the lines being vaporized are - straight and connected at their endpoints. Vaporizing is inspired - by the drawrect package by Jari Aalto . - -- Picture mode compatibility: Artist is picture mode compatible (this - can be turned off). - -*** The new package Eshell is an operating system command shell -implemented entirely in Emacs Lisp. Use `M-x eshell' to invoke it. -It functions similarly to bash and zsh, and allows running of Lisp -functions and external commands using the same syntax. It supports -history lists, aliases, extended globbing, smart scrolling, etc. It -will work on any platform Emacs has been ported to. And since most of -the basic commands -- ls, rm, mv, cp, ln, du, cat, etc. -- have been -rewritten in Lisp, it offers an operating-system independent shell, -all within the scope of your Emacs process. - -*** The new package timeclock.el is a mode is for keeping track of time -intervals. You can use it for whatever purpose you like, but the -typical scenario is to keep track of how much time you spend working -on certain projects. - -*** The new package hi-lock.el provides commands to highlight matches -of interactively entered regexps. For example, - - M-x highlight-regexp RET clearly RET RET - -will highlight all occurrences of `clearly' using a yellow background -face. New occurrences of `clearly' will be highlighted as they are -typed. `M-x unhighlight-regexp RET' will remove the highlighting. -Any existing face can be used for highlighting and a set of -appropriate faces is provided. The regexps can be written into the -current buffer in a form that will be recognized the next time the -corresponding file is read. There are commands to highlight matches -to phrases and to highlight entire lines containing a match. - -*** The new package zone.el plays games with Emacs' display when -Emacs is idle. - -*** The new package tildify.el allows to add hard spaces or other text -fragments in accordance with the current major mode. - -*** The new package xml.el provides a simple but generic XML -parser. It doesn't parse the DTDs however. - -*** The comment operations are now provided by the newcomment.el -package which allows different styles of comment-region and should -be more robust while offering the same functionality. -`comment-region' now doesn't always comment a-line-at-a-time, but only -comments the region, breaking the line at point if necessary. - -*** The Ebrowse package implements a C++ class browser and tags -facilities tailored for use with C++. It is documented in a -separate Texinfo file. - -*** The PCL-CVS package available by either running M-x cvs-examine or -by visiting a CVS administrative directory (with a prefix argument) -provides an alternative interface to VC-dired for CVS. It comes with -`log-view-mode' to view RCS and SCCS logs and `log-edit-mode' used to -enter check-in log messages. - -*** The new package called `woman' allows to browse Unix man pages -without invoking external programs. - -The command `M-x woman' formats manual pages entirely in Emacs Lisp -and then displays them, like `M-x manual-entry' does. Unlike -`manual-entry', `woman' does not invoke any external programs, so it -is useful on systems such as MS-DOS/MS-Windows where the `man' and -Groff or `troff' commands are not readily available. - -The command `M-x woman-find-file' asks for the file name of a man -page, then formats and displays it like `M-x woman' does. - -*** The new command M-x re-builder offers a convenient interface for -authoring regular expressions with immediate visual feedback. - -The buffer from which the command was called becomes the target for -the regexp editor popping up in a separate window. Matching text in -the target buffer is immediately color marked during the editing. -Each sub-expression of the regexp will show up in a different face so -even complex regexps can be edited and verified on target data in a -single step. - -On displays not supporting faces the matches instead blink like -matching parens to make them stand out. On such a setup you will -probably also want to use the sub-expression mode when the regexp -contains such to get feedback about their respective limits. - -*** glasses-mode is a minor mode that makes -unreadableIdentifiersLikeThis readable. It works as glasses, without -actually modifying content of a buffer. - -*** The package ebnf2ps translates an EBNF to a syntactic chart in -PostScript. - -Currently accepts ad-hoc EBNF, ISO EBNF and Bison/Yacc. - -The ad-hoc default EBNF syntax has the following elements: - - ; comment (until end of line) - A non-terminal - "C" terminal - ?C? special - $A default non-terminal - $"C" default terminal - $?C? default special - A = B. production (A is the header and B the body) - C D sequence (C occurs before D) - C | D alternative (C or D occurs) - A - B exception (A excluding B, B without any non-terminal) - n * A repetition (A repeats n (integer) times) - (C) group (expression C is grouped together) - [C] optional (C may or not occurs) - C+ one or more occurrences of C - {C}+ one or more occurrences of C - {C}* zero or more occurrences of C - {C} zero or more occurrences of C - C / D equivalent to: C {D C}* - {C || D}+ equivalent to: C {D C}* - {C || D}* equivalent to: [C {D C}*] - {C || D} equivalent to: [C {D C}*] - -Please, see ebnf2ps documentation for EBNF syntax and how to use it. - -*** The package align.el will align columns within a region, using M-x -align. Its mode-specific rules, based on regular expressions, -determine where the columns should be split. In C and C++, for -example, it will align variable names in declaration lists, or the -equal signs of assignments. - -*** `paragraph-indent-minor-mode' is a new minor mode supporting -paragraphs in the same style as `paragraph-indent-text-mode'. - -*** bs.el is a new package for buffer selection similar to -list-buffers or electric-buffer-list. Use M-x bs-show to display a -buffer menu with this package. See the Custom group `bs'. - -*** find-lisp.el is a package emulating the Unix find command in Lisp. - -*** calculator.el is a small calculator package that is intended to -replace desktop calculators such as xcalc and calc.exe. Actually, it -is not too small - it has more features than most desktop calculators, -and can be customized easily to get many more functions. It should -not be confused with "calc" which is a much bigger mathematical tool -which answers different needs. - -*** The minor modes cwarn-mode and global-cwarn-mode highlights -suspicious C and C++ constructions. Currently, assignments inside -expressions, semicolon following `if', `for' and `while' (except, of -course, after a `do .. while' statement), and C++ functions with -reference parameters are recognized. The modes require font-lock mode -to be enabled. - -*** smerge-mode.el provides `smerge-mode', a simple minor-mode for files -containing diff3-style conflict markers, such as generated by RCS. - -*** 5x5.el is a simple puzzle game. - -*** hl-line.el provides `hl-line-mode', a minor mode to highlight the -current line in the current buffer. It also provides -`global-hl-line-mode' to provide the same behavior in all buffers. - -*** ansi-color.el translates ANSI terminal escapes into text-properties. - -Please note: if `ansi-color-for-comint-mode' and -`global-font-lock-mode' are non-nil, loading ansi-color.el will -disable font-lock and add `ansi-color-apply' to -`comint-preoutput-filter-functions' for all shell-mode buffers. This -displays the output of "ls --color=yes" using the correct foreground -and background colors. - -*** delphi.el provides a major mode for editing the Delphi (Object -Pascal) language. - -*** quickurl.el provides a simple method of inserting a URL based on -the text at point. - -*** sql.el provides an interface to SQL data bases. - -*** fortune.el uses the fortune program to create mail/news signatures. - -*** whitespace.el is a package for warning about and cleaning bogus -whitespace in a file. - -*** PostScript mode (ps-mode) is a new major mode for editing PostScript -files. It offers: interaction with a PostScript interpreter, including -(very basic) error handling; fontification, easily customizable for -interpreter messages; auto-indentation; insertion of EPSF templates and -often used code snippets; viewing of BoundingBox; commenting out / -uncommenting regions; conversion of 8bit characters to PostScript octal -codes. All functionality is accessible through a menu. - -*** delim-col helps to prettify columns in a text region or rectangle. - -Here is an example of columns: - -horse apple bus -dog pineapple car EXTRA -porcupine strawberry airplane - -Doing the following settings: - - (setq delimit-columns-str-before "[ ") - (setq delimit-columns-str-after " ]") - (setq delimit-columns-str-separator ", ") - (setq delimit-columns-separator "\t") - - -Selecting the lines above and typing: - - M-x delimit-columns-region - -It results: - -[ horse , apple , bus , ] -[ dog , pineapple , car , EXTRA ] -[ porcupine, strawberry, airplane, ] - -delim-col has the following options: - - delimit-columns-str-before Specify a string to be inserted - before all columns. - - delimit-columns-str-separator Specify a string to be inserted - between each column. - - delimit-columns-str-after Specify a string to be inserted - after all columns. - - delimit-columns-separator Specify a regexp which separates - each column. - -delim-col has the following commands: - - delimit-columns-region Prettify all columns in a text region. - delimit-columns-rectangle Prettify all columns in a text rectangle. - -*** Recentf mode maintains a menu for visiting files that were -operated on recently. User option recentf-menu-filter specifies a -menu filter function to change the menu appearance. For example, the -recent file list can be displayed: - -- organized by major modes, directories or user defined rules. -- sorted by file paths, file names, ascending or descending. -- showing paths relative to the current default-directory - -The `recentf-filter-changer' menu filter function allows to -dynamically change the menu appearance. - -*** elide-head.el provides a mechanism for eliding boilerplate header -text. - -*** footnote.el provides `footnote-mode', a minor mode supporting use -of footnotes. It is intended for use with Message mode, but isn't -specific to Message mode. - -*** diff-mode.el provides `diff-mode', a major mode for -viewing/editing context diffs (patches). It is selected for files -with extension `.diff', `.diffs', `.patch' and `.rej'. - -*** EUDC, the Emacs Unified Directory Client, provides a common user -interface to access directory servers using different directory -protocols. It has a separate manual. - -*** autoconf.el provides a major mode for editing configure.in files -for Autoconf, selected automatically. - -*** windmove.el provides moving between windows. - -*** crm.el provides a facility to read multiple strings from the -minibuffer with completion. - -*** todo-mode.el provides management of TODO lists and integration -with the diary features. - -*** autoarg.el provides a feature reported from Twenex Emacs whereby -numeric keys supply prefix args rather than self inserting. - -*** The function `turn-off-auto-fill' unconditionally turns off Auto -Fill mode. - -*** pcomplete.el is a library that provides programmable completion -facilities for Emacs, similar to what zsh and tcsh offer. The main -difference is that completion functions are written in Lisp, meaning -they can be profiled, debugged, etc. - -*** antlr-mode is a new major mode for editing ANTLR grammar files. -It is automatically turned on for files whose names have the extension -`.g'. - -** Changes in sort.el - -The function sort-numeric-fields interprets numbers starting with `0' -as octal and numbers starting with `0x' or `0X' as hexadecimal. The -new user-option sort-numeric-base can be used to specify a default -numeric base. - -** Changes to Ange-ftp - -*** Ange-ftp allows you to specify of a port number in remote file -names cleanly. It is appended to the host name, separated by a hash -sign, e.g. `/foo@bar.org#666:mumble'. (This syntax comes from EFS.) - -*** If the new user-option `ange-ftp-try-passive-mode' is set, passive -ftp mode will be used if the ftp client supports that. - -*** Ange-ftp handles the output of the w32-style clients which -output ^M at the end of lines. - -** The recommended way of using Iswitchb is via the new global minor -mode `iswitchb-mode'. - -** Just loading the msb package doesn't switch on Msb mode anymore. -If you have `(require 'msb)' in your .emacs, please replace it with -`(msb-mode 1)'. - -** Changes in Flyspell mode - -*** Flyspell mode has various new options. See the `flyspell' Custom -group. - -*** The variable `flyspell-generic-check-word-p' has been renamed -to `flyspell-generic-check-word-predicate'. The old name is still -available as alias. - -** The user option `backward-delete-char-untabify-method' controls the -behavior of `backward-delete-char-untabify'. The following values -are recognized: - -`untabify' -- turn a tab to many spaces, then delete one space; -`hungry' -- delete all whitespace, both tabs and spaces; -`all' -- delete all whitespace, including tabs, spaces and newlines; -nil -- just delete one character. - -Default value is `untabify'. - -[This change was made in Emacs 20.3 but not mentioned then.] - -** In Cperl mode `cperl-invalid-face' should now be a normal face -symbol, not double-quoted. - -** Some packages are declared obsolete, to be removed in a future -version. They are: auto-show, c-mode, hilit19, hscroll, ooutline, -profile, rnews, rnewspost, and sc. Their implementations have been -moved to lisp/obsolete. - -** auto-compression mode is no longer enabled just by loading jka-compr.el. -To control it, set `auto-compression-mode' via Custom or use the -`auto-compression-mode' command. - -** `browse-url-gnome-moz' is a new option for -`browse-url-browser-function', invoking Mozilla in GNOME, and -`browse-url-kde' can be chosen for invoking the KDE browser. - -** The user-option `browse-url-new-window-p' has been renamed to -`browse-url-new-window-flag'. - -** The functions `keep-lines', `flush-lines' and `how-many' now -operate on the active region in Transient Mark mode. - -** `gnus-user-agent' is a new possibility for `mail-user-agent'. It -is like `message-user-agent', but with all the Gnus paraphernalia. - -** The Strokes package has been updated. If your Emacs has XPM -support, you can use it for pictographic editing. In Strokes mode, -use C-mouse-2 to compose a complex stoke and insert it into the -buffer. You can encode or decode a strokes buffer with new commands -M-x strokes-encode-buffer and M-x strokes-decode-buffer. There is a -new command M-x strokes-list-strokes. - -** Hexl contains a new command `hexl-insert-hex-string' which inserts -a string of hexadecimal numbers read from the mini-buffer. - -** Hexl mode allows to insert non-ASCII characters. - -The non-ASCII characters are encoded using the same encoding as the -file you are visiting in Hexl mode. - -** Shell script mode changes. - -Shell script mode (sh-script) can now indent scripts for shells -derived from sh and rc. The indentation style is customizable, and -sh-script can attempt to "learn" the current buffer's style. - -** Etags changes. - -*** In DOS, etags looks for file.cgz if it cannot find file.c. - -*** New option --ignore-case-regex is an alternative to --regex. It is now -possible to bind a regexp to a language, by prepending the regexp with -{lang}, where lang is one of the languages that `etags --help' prints out. -This feature is useful especially for regex files, where each line contains -a regular expression. The manual contains details. - -*** In C and derived languages, etags creates tags for function -declarations when given the --declarations option. - -*** In C++, tags are created for "operator". The tags have the form -"operator+", without spaces between the keyword and the operator. - -*** You shouldn't generally need any more the -C or -c++ option: etags -automatically switches to C++ parsing when it meets the `class' or -`template' keywords. - -*** Etags now is able to delve at arbitrary deeps into nested structures in -C-like languages. Previously, it was limited to one or two brace levels. - -*** New language Ada: tags are functions, procedures, packages, tasks, and -types. - -*** In Fortran, `procedure' is not tagged. - -*** In Java, tags are created for "interface". - -*** In Lisp, "(defstruct (foo", "(defun (operator" and similar constructs -are now tagged. - -*** In makefiles, tags the targets. - -*** In Perl, the --globals option tags global variables. my and local -variables are tagged. - -*** New language Python: def and class at the beginning of a line are tags. - -*** .ss files are Scheme files, .pdb is Postscript with C syntax, .psw is -for PSWrap. - -** Changes in etags.el - -*** The new user-option tags-case-fold-search can be used to make -tags operations case-sensitive or case-insensitive. The default -is to use the same setting as case-fold-search. - -*** You can display additional output with M-x tags-apropos by setting -the new variable tags-apropos-additional-actions. - -If non-nil, the variable's value should be a list of triples (TITLE -FUNCTION TO-SEARCH). For each triple, M-x tags-apropos processes -TO-SEARCH and lists tags from it. TO-SEARCH should be an alist, -obarray, or symbol. If it is a symbol, the symbol's value is used. - -TITLE is a string to use to label the list of tags from TO-SEARCH. - -FUNCTION is a function to call when an entry is selected in the Tags -List buffer. It is called with one argument, the selected symbol. - -A useful example value for this variable might be something like: - - '(("Emacs Lisp" Info-goto-emacs-command-node obarray) - ("Common Lisp" common-lisp-hyperspec common-lisp-hyperspec-obarray) - ("SCWM" scwm-documentation scwm-obarray)) - -*** The face tags-tag-face can be used to customize the appearance -of tags in the output of M-x tags-apropos. - -*** Setting tags-apropos-verbose to a non-nil value displays the -names of tags files in the *Tags List* buffer. - -*** You can now search for tags that are part of the filename itself. -If you have tagged the files topfile.c subdir/subfile.c -/tmp/tempfile.c, you can now search for tags "topfile.c", "subfile.c", -"dir/sub", "tempfile", "tempfile.c". If the tag matches the file name, -point will go to the beginning of the file. - -*** Compressed files are now transparently supported if -auto-compression-mode is active. You can tag (with Etags) and search -(with find-tag) both compressed and uncompressed files. - -*** Tags commands like M-x tags-search no longer change point -in buffers where no match is found. In buffers where a match is -found, the original value of point is pushed on the marker ring. - -** Fortran mode has a new command `fortran-strip-sequence-nos' to -remove text past column 72. The syntax class of `\' in Fortran is now -appropriate for C-style escape sequences in strings. - -** SGML mode's default `sgml-validate-command' is now `nsgmls'. - -** A new command `view-emacs-problems' (C-h P) displays the PROBLEMS file. - -** The Dabbrev package has a new user-option `dabbrev-ignored-regexps' -containing a list of regular expressions. Buffers matching a regular -expression from that list, are not checked. - -** Emacs can now figure out modification times of remote files. -When you do C-x C-f /user@host:/path/file RET and edit the file, -and someone else modifies the file, you will be prompted to revert -the buffer, just like for the local files. - -** The buffer menu (C-x C-b) no longer lists the *Buffer List* buffer. - -** When invoked with a prefix argument, the command `list-abbrevs' now -displays local abbrevs, only. - -** Refill minor mode provides preliminary support for keeping -paragraphs filled as you modify them. - -** The variable `double-click-fuzz' specifies how much the mouse -may be moved between clicks that are recognized as a pair. Its value -is measured in pixels. - -** The new global minor mode `auto-image-file-mode' allows image files -to be visited as images. - -** Two new user-options `grep-command' and `grep-find-command' -were added to compile.el. - -** Withdrawn packages - -*** mldrag.el has been removed. mouse.el provides the same -functionality with aliases for the mldrag functions. - -*** eval-reg.el has been obsoleted by changes to edebug.el and removed. - -*** ph.el has been obsoleted by EUDC and removed. - - -* Incompatible Lisp changes - -There are a few Lisp changes which are not backwards-compatible and -may require changes to existing code. Here is a list for reference. -See the sections below for details. - -** Since `format' preserves text properties, the idiom -`(format "%s" foo)' no longer works to copy and remove properties. -Use `copy-sequence' to copy the string, then use `set-text-properties' -to remove the properties of the copy. - -** Since the `keymap' text property now has significance, some code -which uses both `local-map' and `keymap' properties (for portability) -may, for instance, give rise to duplicate menus when the keymaps from -these properties are active. - -** The change in the treatment of non-ASCII characters in search -ranges may affect some code. - -** A non-nil value for the LOCAL arg of add-hook makes the hook -buffer-local even if `make-local-hook' hasn't been called, which might -make a difference to some code. - -** The new treatment of the minibuffer prompt might affect code which -operates on the minibuffer. - -** The new character sets `eight-bit-control' and `eight-bit-graphic' -cause `no-conversion' and `emacs-mule-unix' coding systems to produce -different results when reading files with non-ASCII characters -(previously, both coding systems would produce the same results). -Specifically, `no-conversion' interprets each 8-bit byte as a separate -character. This makes `no-conversion' inappropriate for reading -multibyte text, e.g. buffers written to disk in their internal MULE -encoding (auto-saving does that, for example). If a Lisp program -reads such files with `no-conversion', each byte of the multibyte -sequence, including the MULE leading codes such as \201, is treated as -a separate character, which prevents them from being interpreted in -the buffer as multibyte characters. - -Therefore, Lisp programs that read files which contain the internal -MULE encoding should use `emacs-mule-unix'. `no-conversion' is only -appropriate for reading truly binary files. - -** Code that relies on the obsolete `before-change-function' and -`after-change-function' to detect buffer changes will now fail. Use -`before-change-functions' and `after-change-functions' instead. - -** Code that uses `concat' with integer args now gets an error, as -long promised. So does any code that uses derivatives of `concat', -such as `mapconcat'. - -** The function base64-decode-string now always returns a unibyte -string. - -** Not a Lisp incompatibility as such but, with the introduction of -extra private charsets, there is now only one slot free for a new -dimension-2 private charset. User code which tries to add more than -one extra will fail unless you rebuild Emacs with some standard -charset(s) removed; that is probably inadvisable because it changes -the emacs-mule encoding. Also, files stored in the emacs-mule -encoding using Emacs 20 with additional private charsets defined will -probably not be read correctly by Emacs 21. - -** The variable `directory-sep-char' is slated for removal. -Not really a change (yet), but a projected one that you should be -aware of: The variable `directory-sep-char' is deprecated, and should -not be used. It was always ignored on GNU/Linux and Unix systems and -on MS-DOS, but the MS-Windows port tried to support it by adapting the -behavior of certain primitives to the value of this variable. It -turned out that such support cannot be reliable, so it was decided to -remove this variable in the near future. Lisp programs are well -advised not to set it to anything but '/', because any different value -will not have any effect when support for this variable is removed. - - -* Lisp changes made after edition 2.6 of the Emacs Lisp Manual, -(Display-related features are described in a page of their own below.) - -** Function assq-delete-all replaces function assoc-delete-all. - -** The new function animate-string, from lisp/play/animate.el -allows the animated display of strings. - -** The new function `interactive-form' can be used to obtain the -interactive form of a function. - -** The keyword :set-after in defcustom allows to specify dependencies -between custom options. Example: - - (defcustom default-input-method nil - "*Default input method for multilingual text (a string). - This is the input method activated automatically by the command - `toggle-input-method' (\\[toggle-input-method])." - :group 'mule - :type '(choice (const nil) string) - :set-after '(current-language-environment)) - -This specifies that default-input-method should be set after -current-language-environment even if default-input-method appears -first in a custom-set-variables statement. - -** The new hook `kbd-macro-termination-hook' is run at the end of -function execute-kbd-macro. Functions on this hook are called with no -args. The hook is run independent of how the macro was terminated -(signal or normal termination). - -** Functions `butlast' and `nbutlast' for removing trailing elements -from a list are now available without requiring the CL package. - -** The new user-option `even-window-heights' can be set to nil -to prevent `display-buffer' from evening out window heights. - -** The user-option `face-font-registry-alternatives' specifies -alternative font registry names to try when looking for a font. - -** Function `md5' calculates the MD5 "message digest"/"checksum". - -** Function `delete-frame' runs `delete-frame-hook' before actually -deleting the frame. The hook is called with one arg, the frame -being deleted. - -** `add-hook' now makes the hook local if called with a non-nil LOCAL arg. - -** The treatment of non-ASCII characters in search ranges has changed. -If a range in a regular expression or the arg of -skip-chars-forward/backward starts with a unibyte character C and ends -with a multibyte character C2, the range is divided into two: one is -C..?\377, the other is C1..C2, where C1 is the first character of C2's -charset. - -** The new function `display-message-or-buffer' displays a message in -the echo area or pops up a buffer, depending on the length of the -message. - -** The new macro `with-auto-compression-mode' allows evaluating an -expression with auto-compression-mode enabled. - -** In image specifications, `:heuristic-mask' has been replaced -with the more general `:mask' property. - -** Image specifications accept more `:conversion's. - -** A `?' can be used in a symbol name without escaping it with a -backslash. - -** Reading from the mini-buffer now reads from standard input if Emacs -is running in batch mode. For example, - - (message "%s" (read t)) - -will read a Lisp expression from standard input and print the result -to standard output. - -** The argument of `down-list', `backward-up-list', `up-list', -`kill-sexp', `backward-kill-sexp' and `mark-sexp' is now optional. - -** If `display-buffer-reuse-frames' is set, function `display-buffer' -will raise frames displaying a buffer, instead of creating a new -frame or window. - -** Two new functions for removing elements from lists/sequences -were added - -- Function: remove ELT SEQ - -Return a copy of SEQ with all occurrences of ELT removed. SEQ must be -a list, vector, or string. The comparison is done with `equal'. - -- Function: remq ELT LIST - -Return a copy of LIST with all occurrences of ELT removed. The -comparison is done with `eq'. - -** The function `delete' now also works with vectors and strings. - -** The meaning of the `:weakness WEAK' argument of make-hash-table -has been changed: WEAK can now have new values `key-or-value' and -`key-and-value', in addition to `nil', `key', `value', and `t'. - -** Function `aset' stores any multibyte character in any string -without signaling "Attempt to change char length of a string". It may -convert a unibyte string to multibyte if necessary. - -** The value of the `help-echo' text property is called as a function -or evaluated, if it is not a string already, to obtain a help string. - -** Function `make-obsolete' now has an optional arg to say when the -function was declared obsolete. - -** Function `plist-member' is renamed from `widget-plist-member' (which is -retained as an alias). - -** Easy-menu's :filter now takes the unconverted form of the menu and -the result is automatically converted to Emacs' form. - -** The new function `window-list' has been defined - -- Function: window-list &optional FRAME WINDOW MINIBUF - -Return a list of windows on FRAME, starting with WINDOW. FRAME nil or -omitted means use the selected frame. WINDOW nil or omitted means use -the selected window. MINIBUF t means include the minibuffer window, -even if it isn't active. MINIBUF nil or omitted means include the -minibuffer window only if it's active. MINIBUF neither nil nor t -means never include the minibuffer window. - -** There's a new function `get-window-with-predicate' defined as follows - -- Function: get-window-with-predicate PREDICATE &optional MINIBUF ALL-FRAMES DEFAULT - -Return a window satisfying PREDICATE. - -This function cycles through all visible windows using `walk-windows', -calling PREDICATE on each one. PREDICATE is called with a window as -argument. The first window for which PREDICATE returns a non-nil -value is returned. If no window satisfies PREDICATE, DEFAULT is -returned. - -Optional second arg MINIBUF t means count the minibuffer window even -if not active. MINIBUF nil or omitted means count the minibuffer iff -it is active. MINIBUF neither t nor nil means not to count the -minibuffer even if it is active. - -Several frames may share a single minibuffer; if the minibuffer -counts, all windows on all frames that share that minibuffer count -too. Therefore, if you are using a separate minibuffer frame -and the minibuffer is active and MINIBUF says it counts, -`walk-windows' includes the windows in the frame from which you -entered the minibuffer, as well as the minibuffer window. - -ALL-FRAMES is the optional third argument. -ALL-FRAMES nil or omitted means cycle within the frames as specified above. -ALL-FRAMES = `visible' means include windows on all visible frames. -ALL-FRAMES = 0 means include windows on all visible and iconified frames. -ALL-FRAMES = t means include windows on all frames including invisible frames. -If ALL-FRAMES is a frame, it means include windows on that frame. -Anything else means restrict to the selected frame. - -** The function `single-key-description' now encloses function key and -event names in angle brackets. When called with a second optional -argument non-nil, angle brackets won't be printed. - -** If the variable `message-truncate-lines' is bound to t around a -call to `message', the echo area will not be resized to display that -message; it will be truncated instead, as it was done in 20.x. -Default value is nil. - -** The user option `line-number-display-limit' can now be set to nil, -meaning no limit. - -** The new user option `line-number-display-limit-width' controls -the maximum width of lines in a buffer for which Emacs displays line -numbers in the mode line. The default is 200. - -** `select-safe-coding-system' now also checks the most preferred -coding-system if buffer-file-coding-system is `undecided' and -DEFAULT-CODING-SYSTEM is not specified, - -** The function `subr-arity' provides information about the argument -list of a primitive. - -** `where-is-internal' now also accepts a list of keymaps. - -** The text property `keymap' specifies a key map which overrides the -buffer's local map and the map specified by the `local-map' property. -This is probably what most current uses of `local-map' want, rather -than replacing the local map. - -** The obsolete variables `before-change-function' and -`after-change-function' are no longer acted upon and have been -removed. Use `before-change-functions' and `after-change-functions' -instead. - -** The function `apropos-mode' runs the hook `apropos-mode-hook'. - -** `concat' no longer accepts individual integer arguments, -as promised long ago. - -** The new function `float-time' returns the current time as a float. - -** The new variable auto-coding-regexp-alist specifies coding systems -for reading specific files, analogous to auto-coding-alist, but -patterns are checked against file contents instead of file names. - - -* Lisp changes in Emacs 21.1 (see following page for display-related features) - -** The new package rx.el provides an alternative sexp notation for -regular expressions. - -- Function: rx-to-string SEXP - -Translate SEXP into a regular expression in string notation. - -- Macro: rx SEXP - -Translate SEXP into a regular expression in string notation. - -The following are valid subforms of regular expressions in sexp -notation. - -STRING - matches string STRING literally. - -CHAR - matches character CHAR literally. - -`not-newline' - matches any character except a newline. - . -`anything' - matches any character - -`(any SET)' - matches any character in SET. SET may be a character or string. - Ranges of characters can be specified as `A-Z' in strings. - -'(in SET)' - like `any'. - -`(not (any SET))' - matches any character not in SET - -`line-start' - matches the empty string, but only at the beginning of a line - in the text being matched - -`line-end' - is similar to `line-start' but matches only at the end of a line - -`string-start' - matches the empty string, but only at the beginning of the - string being matched against. - -`string-end' - matches the empty string, but only at the end of the - string being matched against. - -`buffer-start' - matches the empty string, but only at the beginning of the - buffer being matched against. - -`buffer-end' - matches the empty string, but only at the end of the - buffer being matched against. - -`point' - matches the empty string, but only at point. - -`word-start' - matches the empty string, but only at the beginning or end of a - word. - -`word-end' - matches the empty string, but only at the end of a word. - -`word-boundary' - matches the empty string, but only at the beginning or end of a - word. - -`(not word-boundary)' - matches the empty string, but not at the beginning or end of a - word. - -`digit' - matches 0 through 9. - -`control' - matches ASCII control characters. - -`hex-digit' - matches 0 through 9, a through f and A through F. - -`blank' - matches space and tab only. - -`graphic' - matches graphic characters--everything except ASCII control chars, - space, and DEL. - -`printing' - matches printing characters--everything except ASCII control chars - and DEL. - -`alphanumeric' - matches letters and digits. (But at present, for multibyte characters, - it matches anything that has word syntax.) - -`letter' - matches letters. (But at present, for multibyte characters, - it matches anything that has word syntax.) - -`ascii' - matches ASCII (unibyte) characters. - -`nonascii' - matches non-ASCII (multibyte) characters. - -`lower' - matches anything lower-case. - -`upper' - matches anything upper-case. - -`punctuation' - matches punctuation. (But at present, for multibyte characters, - it matches anything that has non-word syntax.) - -`space' - matches anything that has whitespace syntax. - -`word' - matches anything that has word syntax. - -`(syntax SYNTAX)' - matches a character with syntax SYNTAX. SYNTAX must be one - of the following symbols. - - `whitespace' (\\s- in string notation) - `punctuation' (\\s.) - `word' (\\sw) - `symbol' (\\s_) - `open-parenthesis' (\\s() - `close-parenthesis' (\\s)) - `expression-prefix' (\\s') - `string-quote' (\\s\") - `paired-delimiter' (\\s$) - `escape' (\\s\\) - `character-quote' (\\s/) - `comment-start' (\\s<) - `comment-end' (\\s>) - -`(not (syntax SYNTAX))' - matches a character that has not syntax SYNTAX. - -`(category CATEGORY)' - matches a character with category CATEGORY. CATEGORY must be - either a character to use for C, or one of the following symbols. - - `consonant' (\\c0 in string notation) - `base-vowel' (\\c1) - `upper-diacritical-mark' (\\c2) - `lower-diacritical-mark' (\\c3) - `tone-mark' (\\c4) - `symbol' (\\c5) - `digit' (\\c6) - `vowel-modifying-diacritical-mark' (\\c7) - `vowel-sign' (\\c8) - `semivowel-lower' (\\c9) - `not-at-end-of-line' (\\c<) - `not-at-beginning-of-line' (\\c>) - `alpha-numeric-two-byte' (\\cA) - `chinse-two-byte' (\\cC) - `greek-two-byte' (\\cG) - `japanese-hiragana-two-byte' (\\cH) - `indian-two-byte' (\\cI) - `japanese-katakana-two-byte' (\\cK) - `korean-hangul-two-byte' (\\cN) - `cyrillic-two-byte' (\\cY) - `ascii' (\\ca) - `arabic' (\\cb) - `chinese' (\\cc) - `ethiopic' (\\ce) - `greek' (\\cg) - `korean' (\\ch) - `indian' (\\ci) - `japanese' (\\cj) - `japanese-katakana' (\\ck) - `latin' (\\cl) - `lao' (\\co) - `tibetan' (\\cq) - `japanese-roman' (\\cr) - `thai' (\\ct) - `vietnamese' (\\cv) - `hebrew' (\\cw) - `cyrillic' (\\cy) - `can-break' (\\c|) - -`(not (category CATEGORY))' - matches a character that has not category CATEGORY. - -`(and SEXP1 SEXP2 ...)' - matches what SEXP1 matches, followed by what SEXP2 matches, etc. - -`(submatch SEXP1 SEXP2 ...)' - like `and', but makes the match accessible with `match-end', - `match-beginning', and `match-string'. - -`(group SEXP1 SEXP2 ...)' - another name for `submatch'. - -`(or SEXP1 SEXP2 ...)' - matches anything that matches SEXP1 or SEXP2, etc. If all - args are strings, use `regexp-opt' to optimize the resulting - regular expression. - -`(minimal-match SEXP)' - produce a non-greedy regexp for SEXP. Normally, regexps matching - zero or more occurrences of something are \"greedy\" in that they - match as much as they can, as long as the overall regexp can - still match. A non-greedy regexp matches as little as possible. - -`(maximal-match SEXP)' - produce a greedy regexp for SEXP. This is the default. - -`(zero-or-more SEXP)' - matches zero or more occurrences of what SEXP matches. - -`(0+ SEXP)' - like `zero-or-more'. - -`(* SEXP)' - like `zero-or-more', but always produces a greedy regexp. - -`(*? SEXP)' - like `zero-or-more', but always produces a non-greedy regexp. - -`(one-or-more SEXP)' - matches one or more occurrences of A. - -`(1+ SEXP)' - like `one-or-more'. - -`(+ SEXP)' - like `one-or-more', but always produces a greedy regexp. - -`(+? SEXP)' - like `one-or-more', but always produces a non-greedy regexp. - -`(zero-or-one SEXP)' - matches zero or one occurrences of A. - -`(optional SEXP)' - like `zero-or-one'. - -`(? SEXP)' - like `zero-or-one', but always produces a greedy regexp. - -`(?? SEXP)' - like `zero-or-one', but always produces a non-greedy regexp. - -`(repeat N SEXP)' - matches N occurrences of what SEXP matches. - -`(repeat N M SEXP)' - matches N to M occurrences of what SEXP matches. - -`(eval FORM)' - evaluate FORM and insert result. If result is a string, - `regexp-quote' it. - -`(regexp REGEXP)' - include REGEXP in string notation in the result. - -*** The features `md5' and `overlay' are now provided by default. - -*** The special form `save-restriction' now works correctly even if the -buffer is widened inside the save-restriction and changes made outside -the original restriction. Previously, doing this would cause the saved -restriction to be restored incorrectly. - -*** The functions `find-charset-region' and `find-charset-string' include -`eight-bit-control' and/or `eight-bit-graphic' in the returned list -when they find 8-bit characters. Previously, they included `ascii' in a -multibyte buffer and `unknown' in a unibyte buffer. - -*** The functions `set-buffer-multibyte', `string-as-multibyte' and -`string-as-unibyte' change the byte sequence of a buffer or a string -if it contains a character from the `eight-bit-control' character set. - -*** The handling of multibyte sequences in a multibyte buffer is -changed. Previously, a byte sequence matching the pattern -[\200-\237][\240-\377]+ was interpreted as a single character -regardless of the length of the trailing bytes [\240-\377]+. Thus, if -the sequence was longer than what the leading byte indicated, the -extra trailing bytes were ignored by Lisp functions. Now such extra -bytes are independent 8-bit characters belonging to the charset -eight-bit-graphic. - -** Fontsets are now implemented using char-tables. - -A fontset can now be specified for each independent character, for -a group of characters or for a character set rather than just for a -character set as previously. - -*** The arguments of the function `set-fontset-font' are changed. -They are NAME, CHARACTER, FONTNAME, and optional FRAME. The function -modifies fontset NAME to use FONTNAME for CHARACTER. - -CHARACTER may be a cons (FROM . TO), where FROM and TO are non-generic -characters. In that case FONTNAME is used for all characters in the -range FROM and TO (inclusive). CHARACTER may be a charset. In that -case FONTNAME is used for all character in the charset. - -FONTNAME may be a cons (FAMILY . REGISTRY), where FAMILY is the family -name of a font and REGISTRY is a registry name of a font. - -*** Variable x-charset-registry has been deleted. The default charset -registries of character sets are set in the default fontset -"fontset-default". - -*** The function `create-fontset-from-fontset-spec' ignores the second -argument STYLE-VARIANT. It never creates style-variant fontsets. - -** The method of composing characters is changed. Now character -composition is done by a special text property `composition' in -buffers and strings. - -*** Charset composition is deleted. Emacs never creates a `composite -character' which is an independent character with a unique character -code. Thus the following functions handling `composite characters' -have been deleted: composite-char-component, -composite-char-component-count, composite-char-composition-rule, -composite-char-composition-rule and decompose-composite-char delete. -The variables leading-code-composition and min-composite-char have -also been deleted. - -*** Three more glyph reference points are added. They can be used to -specify a composition rule. See the documentation of the variable -`reference-point-alist' for more detail. - -*** The function `compose-region' takes new arguments COMPONENTS and -MODIFICATION-FUNC. With COMPONENTS, you can specify not only a -composition rule but also characters to be composed. Such characters -may differ between buffer and string text. - -*** The function `compose-string' takes new arguments START, END, -COMPONENTS, and MODIFICATION-FUNC. - -*** The function `compose-string' puts text property `composition' -directly on the argument STRING instead of returning a new string. -Likewise, the function `decompose-string' just removes text property -`composition' from STRING. - -*** The new function `find-composition' returns information about -a composition at a specified position in a buffer or a string. - -*** The function `decompose-composite-char' is now labeled as -obsolete. - -** The new coding system `mac-roman' is primarily intended for use on -the Macintosh but may be used generally for Macintosh-encoded text. - -** The new character sets `mule-unicode-0100-24ff', -`mule-unicode-2500-33ff', and `mule-unicode-e000-ffff' have been -introduced for Unicode characters in the range U+0100..U+24FF, -U+2500..U+33FF, U+E000..U+FFFF respectively. - -Note that the character sets are not yet unified in Emacs, so -characters which belong to charsets such as Latin-2, Greek, Hebrew, -etc. and the same characters in the `mule-unicode-*' charsets are -different characters, as far as Emacs is concerned. For example, text -which includes Unicode characters from the Latin-2 locale cannot be -encoded by Emacs with ISO 8859-2 coding system. - -** The new coding system `mule-utf-8' has been added. -It provides limited support for decoding/encoding UTF-8 text. For -details, please see the documentation string of this coding system. - -** The new character sets `japanese-jisx0213-1' and -`japanese-jisx0213-2' have been introduced for the new Japanese -standard JIS X 0213 Plane 1 and Plane 2. - -** The new character sets `latin-iso8859-14' and `latin-iso8859-15' -have been introduced. - -** The new character sets `eight-bit-control' and `eight-bit-graphic' -have been introduced for 8-bit characters in the ranges 0x80..0x9F and -0xA0..0xFF respectively. Note that the multibyte representation of -eight-bit-control is never exposed; this leads to an exception in the -emacs-mule coding system, which encodes everything else to the -buffer/string internal representation. Note that to search for -eight-bit-graphic characters in a multibyte buffer, the search string -must be multibyte, otherwise such characters will be converted to -their multibyte equivalent. - -** If the APPEND argument of `write-region' is an integer, it seeks to -that offset in the file before writing. - -** The function `add-minor-mode' has been added for convenience and -compatibility with XEmacs (and is used internally by define-minor-mode). - -** The function `shell-command' now sets the default directory of the -`*Shell Command Output*' buffer to the default directory of the buffer -from which the command was issued. - -** The functions `query-replace', `query-replace-regexp', -`query-replace-regexp-eval' `map-query-replace-regexp', -`replace-string', `replace-regexp', and `perform-replace' take two -additional optional arguments START and END that specify the region to -operate on. - -** The new function `count-screen-lines' is a more flexible alternative -to `window-buffer-height'. - -- Function: count-screen-lines &optional BEG END COUNT-FINAL-NEWLINE WINDOW - -Return the number of screen lines in the region between BEG and END. -The number of screen lines may be different from the number of actual -lines, due to line breaking, display table, etc. - -Optional arguments BEG and END default to `point-min' and `point-max' -respectively. - -If region ends with a newline, ignore it unless optional third argument -COUNT-FINAL-NEWLINE is non-nil. - -The optional fourth argument WINDOW specifies the window used for -obtaining parameters such as width, horizontal scrolling, and so -on. The default is to use the selected window's parameters. - -Like `vertical-motion', `count-screen-lines' always uses the current -buffer, regardless of which buffer is displayed in WINDOW. This makes -possible to use `count-screen-lines' in any buffer, whether or not it -is currently displayed in some window. - -** The new function `mapc' is like `mapcar' but doesn't collect the -argument function's results. - -** The functions base64-decode-region and base64-decode-string now -signal an error instead of returning nil if decoding fails. Also, -`base64-decode-string' now always returns a unibyte string (in Emacs -20, it returned a multibyte string when the result was a valid multibyte -sequence). - -** The function sendmail-user-agent-compose now recognizes a `body' -header in the list of headers passed to it. - -** The new function member-ignore-case works like `member', but -ignores differences in case and text representation. - -** The buffer-local variable cursor-type can be used to specify the -cursor to use in windows displaying a buffer. Values are interpreted -as follows: - - t use the cursor specified for the frame (default) - nil don't display a cursor - `bar' display a bar cursor with default width - (bar . WIDTH) display a bar cursor with width WIDTH - others display a box cursor. - -** The variable open-paren-in-column-0-is-defun-start controls whether -an open parenthesis in column 0 is considered to be the start of a -defun. If set, the default, it is considered a defun start. If not -set, an open parenthesis in column 0 has no special meaning. - -** The new function `string-to-syntax' can be used to translate syntax -specifications in string form as accepted by `modify-syntax-entry' to -the cons-cell form that is used for the values of the `syntax-table' -text property, and in `font-lock-syntactic-keywords'. - -Example: - - (string-to-syntax "()") - => (4 . 41) - -** Emacs' reader supports CL read syntax for integers in bases -other than 10. - -*** `#BINTEGER' or `#bINTEGER' reads INTEGER in binary (radix 2). -INTEGER optionally contains a sign. - - #b1111 - => 15 - #b-1111 - => -15 - -*** `#OINTEGER' or `#oINTEGER' reads INTEGER in octal (radix 8). - - #o666 - => 438 - -*** `#XINTEGER' or `#xINTEGER' reads INTEGER in hexadecimal (radix 16). - - #xbeef - => 48815 - -*** `#RADIXrINTEGER' reads INTEGER in radix RADIX, 2 <= RADIX <= 36. - - #2R-111 - => -7 - #25rah - => 267 - -** The function `documentation-property' now evaluates the value of -the given property to obtain a string if it doesn't refer to etc/DOC -and isn't a string. - -** If called for a symbol, the function `documentation' now looks for -a `function-documentation' property of that symbol. If it has a non-nil -value, the documentation is taken from that value. If the value is -not a string, it is evaluated to obtain a string. - -** The last argument of `define-key-after' defaults to t for convenience. - -** The new function `replace-regexp-in-string' replaces all matches -for a regexp in a string. - -** `mouse-position' now runs the abnormal hook -`mouse-position-function'. - -** The function string-to-number now returns a float for numbers -that don't fit into a Lisp integer. - -** The variable keyword-symbols-constants-flag has been removed. -Keywords are now always considered constants. - -** The new function `delete-and-extract-region' deletes text and -returns it. - -** The function `clear-this-command-keys' now also clears the vector -returned by function `recent-keys'. - -** Variables `beginning-of-defun-function' and `end-of-defun-function' -can be used to define handlers for the functions that find defuns. -Major modes can define these locally instead of rebinding C-M-a -etc. if the normal conventions for defuns are not appropriate for the -mode. - -** easy-mmode-define-minor-mode now takes an additional BODY argument -and is renamed `define-minor-mode'. - -** If an abbrev has a hook function which is a symbol, and that symbol -has a non-nil `no-self-insert' property, the return value of the hook -function specifies whether an expansion has been done or not. If it -returns nil, abbrev-expand also returns nil, meaning "no expansion has -been performed." - -When abbrev expansion is done by typing a self-inserting character, -and the abbrev has a hook with the `no-self-insert' property, and the -hook function returns non-nil meaning expansion has been done, -then the self-inserting character is not inserted. - -** The function `intern-soft' now accepts a symbol as first argument. -In this case, that exact symbol is looked up in the specified obarray, -and the function's value is nil if it is not found. - -** The new macro `with-syntax-table' can be used to evaluate forms -with the syntax table of the current buffer temporarily set to a -specified table. - - (with-syntax-table TABLE &rest BODY) - -Evaluate BODY with syntax table of current buffer set to a copy of -TABLE. The current syntax table is saved, BODY is evaluated, and the -saved table is restored, even in case of an abnormal exit. Value is -what BODY returns. - -** Regular expressions now support intervals \{n,m\} as well as -Perl's shy-groups \(?:...\) and non-greedy *? +? and ?? operators. -Also back-references like \2 are now considered as an error if the -corresponding subgroup does not exist (or is not closed yet). -Previously it would have been silently turned into `2' (ignoring the `\'). - -** The optional argument BUFFER of function file-local-copy has been -removed since it wasn't used by anything. - -** The file name argument of function `file-locked-p' is now required -instead of being optional. - -** The new built-in error `text-read-only' is signaled when trying to -modify read-only text. - -** New functions and variables for locales. - -The new variable `locale-coding-system' specifies how to encode and -decode strings passed to low-level message functions like strerror and -time functions like strftime. The new variables -`system-messages-locale' and `system-time-locale' give the system -locales to be used when invoking these two types of functions. - -The new function `set-locale-environment' sets the language -environment, preferred coding system, and locale coding system from -the system locale as specified by the LC_ALL, LC_CTYPE, and LANG -environment variables. Normally, it is invoked during startup and need -not be invoked thereafter. It uses the new variables -`locale-language-names', `locale-charset-language-names', and -`locale-preferred-coding-systems' to make its decisions. - -** syntax tables now understand nested comments. -To declare a comment syntax as allowing nesting, just add an `n' -modifier to either of the characters of the comment end and the comment -start sequences. - -** The function `pixmap-spec-p' has been renamed `bitmap-spec-p' -because `bitmap' is more in line with the usual X terminology. - -** New function `propertize' - -The new function `propertize' can be used to conveniently construct -strings with text properties. - -- Function: propertize STRING &rest PROPERTIES - -Value is a copy of STRING with text properties assigned as specified -by PROPERTIES. PROPERTIES is a sequence of pairs PROPERTY VALUE, with -PROPERTY being the name of a text property and VALUE being the -specified value of that property. Example: - - (propertize "foo" 'face 'bold 'read-only t) - -** push and pop macros. - -Simple versions of the push and pop macros of Common Lisp -are now defined in Emacs Lisp. These macros allow only symbols -as the place that holds the list to be changed. - -(push NEWELT LISTNAME) add NEWELT to the front of LISTNAME's value. -(pop LISTNAME) return first elt of LISTNAME, and remove it - (thus altering the value of LISTNAME). - -** New dolist and dotimes macros. - -Simple versions of the dolist and dotimes macros of Common Lisp -are now defined in Emacs Lisp. - -(dolist (VAR LIST [RESULT]) BODY...) - Execute body once for each element of LIST, - using the variable VAR to hold the current element. - Then return the value of RESULT, or nil if RESULT is omitted. - -(dotimes (VAR COUNT [RESULT]) BODY...) - Execute BODY with VAR bound to successive integers running from 0, - inclusive, to COUNT, exclusive. - Then return the value of RESULT, or nil if RESULT is omitted. - -** Regular expressions now support Posix character classes such as -[:alpha:], [:space:] and so on. These must be used within a character -class--for instance, [-[:digit:].+] matches digits or a period -or a sign. - -[:digit:] matches 0 through 9 -[:cntrl:] matches ASCII control characters -[:xdigit:] matches 0 through 9, a through f and A through F. -[:blank:] matches space and tab only -[:graph:] matches graphic characters--everything except ASCII control chars, - space, and DEL. -[:print:] matches printing characters--everything except ASCII control chars - and DEL. -[:alnum:] matches letters and digits. - (But at present, for multibyte characters, - it matches anything that has word syntax.) -[:alpha:] matches letters. - (But at present, for multibyte characters, - it matches anything that has word syntax.) -[:ascii:] matches ASCII (unibyte) characters. -[:nonascii:] matches non-ASCII (multibyte) characters. -[:lower:] matches anything lower-case. -[:punct:] matches punctuation. - (But at present, for multibyte characters, - it matches anything that has non-word syntax.) -[:space:] matches anything that has whitespace syntax. -[:upper:] matches anything upper-case. -[:word:] matches anything that has word syntax. - -** Emacs now has built-in hash tables. - -The following functions are defined for hash tables: - -- Function: make-hash-table ARGS - -The argument list ARGS consists of keyword/argument pairs. All arguments -are optional. The following arguments are defined: - -:test TEST - -TEST must be a symbol specifying how to compare keys. Default is `eql'. -Predefined are `eq', `eql' and `equal'. If TEST is not predefined, -it must have been defined with `define-hash-table-test'. - -:size SIZE - -SIZE must be an integer > 0 giving a hint to the implementation how -many elements will be put in the hash table. Default size is 65. - -:rehash-size REHASH-SIZE - -REHASH-SIZE specifies by how much to grow a hash table once it becomes -full. If REHASH-SIZE is an integer, add that to the hash table's old -size to get the new size. Otherwise, REHASH-SIZE must be a float > -1.0, and the new size is computed by multiplying REHASH-SIZE with the -old size. Default rehash size is 1.5. - -:rehash-threshold THRESHOLD - -THRESHOLD must be a float > 0 and <= 1.0 specifying when to resize the -hash table. It is resized when the ratio of (number of entries) / -(size of hash table) is >= THRESHOLD. Default threshold is 0.8. - -:weakness WEAK - -WEAK must be either nil, one of the symbols `key, `value', -`key-or-value', `key-and-value', or t, meaning the same as -`key-and-value'. Entries are removed from weak tables during garbage -collection if their key and/or value are not referenced elsewhere -outside of the hash table. Default are non-weak hash tables. - -- Function: makehash &optional TEST - -Similar to make-hash-table, but only TEST can be specified. - -- Function: hash-table-p TABLE - -Returns non-nil if TABLE is a hash table object. - -- Function: copy-hash-table TABLE - -Returns a copy of TABLE. Only the table itself is copied, keys and -values are shared. - -- Function: hash-table-count TABLE - -Returns the number of entries in TABLE. - -- Function: hash-table-rehash-size TABLE - -Returns the rehash size of TABLE. - -- Function: hash-table-rehash-threshold TABLE - -Returns the rehash threshold of TABLE. - -- Function: hash-table-rehash-size TABLE - -Returns the size of TABLE. - -- Function: hash-table-test TABLE - -Returns the test TABLE uses to compare keys. - -- Function: hash-table-weakness TABLE - -Returns the weakness specified for TABLE. - -- Function: clrhash TABLE - -Clear TABLE. - -- Function: gethash KEY TABLE &optional DEFAULT - -Look up KEY in TABLE and return its associated VALUE or DEFAULT if -not found. - -- Function: puthash KEY VALUE TABLE - -Associate KEY with VALUE in TABLE. If KEY is already associated with -another value, replace the old value with VALUE. - -- Function: remhash KEY TABLE - -Remove KEY from TABLE if it is there. - -- Function: maphash FUNCTION TABLE - -Call FUNCTION for all elements in TABLE. FUNCTION must take two -arguments KEY and VALUE. - -- Function: sxhash OBJ - -Return a hash code for Lisp object OBJ. - -- Function: define-hash-table-test NAME TEST-FN HASH-FN - -Define a new hash table test named NAME. If NAME is specified as -a test in `make-hash-table', the table created will use TEST-FN for -comparing keys, and HASH-FN to compute hash codes for keys. Test -and hash function are stored as symbol property `hash-table-test' -of NAME with a value of (TEST-FN HASH-FN). - -TEST-FN must take two arguments and return non-nil if they are the same. - -HASH-FN must take one argument and return an integer that is the hash -code of the argument. The function should use the whole range of -integer values for hash code computation, including negative integers. - -Example: The following creates a hash table whose keys are supposed to -be strings that are compared case-insensitively. - - (defun case-fold-string= (a b) - (compare-strings a nil nil b nil nil t)) - - (defun case-fold-string-hash (a) - (sxhash (upcase a))) - - (define-hash-table-test 'case-fold 'case-fold-string= - 'case-fold-string-hash)) - - (make-hash-table :test 'case-fold) - -** The Lisp reader handles circular structure. - -It now works to use the #N= and #N# constructs to represent -circular structures. For example, #1=(a . #1#) represents -a cons cell which is its own cdr. - -** The Lisp printer handles circular structure. - -If you bind print-circle to a non-nil value, the Lisp printer outputs -#N= and #N# constructs to represent circular and shared structure. - -** If the second argument to `move-to-column' is anything but nil or -t, that means replace a tab with spaces if necessary to reach the -specified column, but do not add spaces at the end of the line if it -is too short to reach that column. - -** perform-replace has a new feature: the REPLACEMENTS argument may -now be a cons cell (FUNCTION . DATA). This means to call FUNCTION -after each match to get the replacement text. FUNCTION is called with -two arguments: DATA, and the number of replacements already made. - -If the FROM-STRING contains any upper-case letters, -perform-replace also turns off `case-fold-search' temporarily -and inserts the replacement text without altering case in it. - -** The function buffer-size now accepts an optional argument -to specify which buffer to return the size of. - -** The calendar motion commands now run the normal hook -calendar-move-hook after moving point. - -** The new variable small-temporary-file-directory specifies a -directory to use for creating temporary files that are likely to be -small. (Certain Emacs features use this directory.) If -small-temporary-file-directory is nil, they use -temporary-file-directory instead. - -** The variable `inhibit-modification-hooks', if non-nil, inhibits all -the hooks that track changes in the buffer. This affects -`before-change-functions' and `after-change-functions', as well as -hooks attached to text properties and overlay properties. - -** assq-delete-all is a new function that deletes all the -elements of an alist which have a car `eq' to a particular value. - -** make-temp-file provides a more reliable way to create a temporary file. - -make-temp-file is used like make-temp-name, except that it actually -creates the file before it returns. This prevents a timing error, -ensuring that no other job can use the same name for a temporary file. - -** New exclusive-open feature in `write-region' - -The optional seventh arg is now called MUSTBENEW. If non-nil, it 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 gives confirmation. - -If the MUSTBENEW argument in `write-region' is `excl', -that means to use a special feature in the `open' system call -to get an error if the file exists at that time. -The error reported is `file-already-exists'. - -** Function `format' now handles text properties. - -Text properties of the format string are applied to the result string. -If the result string is longer than the format string, text properties -ending at the end of the format string are extended to the end of the -result string. - -Text properties from string arguments are applied to the result -string where arguments appear in the result string. - -Example: - - (let ((s1 "hello, %s") - (s2 "world")) - (put-text-property 0 (length s1) 'face 'bold s1) - (put-text-property 0 (length s2) 'face 'italic s2) - (format s1 s2)) - -results in a bold-face string with an italic `world' at the end. - -** Messages can now be displayed with text properties. - -Text properties are handled as described above for function `format'. -The following example displays a bold-face message with an italic -argument in it. - - (let ((msg "hello, %s!") - (arg "world")) - (put-text-property 0 (length msg) 'face 'bold msg) - (put-text-property 0 (length arg) 'face 'italic arg) - (message msg arg)) - -** Sound support - -Emacs supports playing sound files on GNU/Linux and the free BSDs -(Voxware driver and native BSD driver, aka as Luigi's driver). - -Currently supported file formats are RIFF-WAVE (*.wav) and Sun Audio -(*.au). You must configure Emacs with the option `--with-sound=yes' -to enable sound support. - -Sound files can be played by calling (play-sound SOUND). SOUND is a -list of the form `(sound PROPERTY...)'. The function is only defined -when sound support is present for the system on which Emacs runs. The -functions runs `play-sound-functions' with one argument which is the -sound to play, before playing the sound. - -The following sound properties are supported: - -- `:file FILE' - -FILE is a file name. If FILE isn't an absolute name, it will be -searched relative to `data-directory'. - -- `:data DATA' - -DATA is a string containing sound data. Either :file or :data -may be present, but not both. - -- `:volume VOLUME' - -VOLUME must be an integer in the range 0..100 or a float in the range -0..1. This property is optional. - -- `:device DEVICE' - -DEVICE is a string specifying the system device on which to play the -sound. The default device is system-dependent. - -Other properties are ignored. - -An alternative interface is called as -(play-sound-file FILE &optional VOLUME DEVICE). - -** `multimedia' is a new Finder keyword and Custom group. - -** keywordp is a new predicate to test efficiently for an object being -a keyword symbol. - -** Changes to garbage collection - -*** The function garbage-collect now additionally returns the number -of live and free strings. - -*** There is a new variable `strings-consed' holding the number of -strings that have been consed so far. - - -* Lisp-level Display features added after release 2.6 of the Emacs -Lisp Manual - -** The user-option `resize-mini-windows' controls how Emacs resizes -mini-windows. - -** The function `pos-visible-in-window-p' now has a third optional -argument, PARTIALLY. If a character is only partially visible, nil is -returned, unless PARTIALLY is non-nil. - -** On window systems, `glyph-table' is no longer used. - -** Help strings in menu items are now used to provide `help-echo' text. - -** The function `image-size' can be used to determine the size of an -image. - -- Function: image-size SPEC &optional PIXELS FRAME - -Return the size of an image as a pair (WIDTH . HEIGHT). - -SPEC is an image specification. PIXELS non-nil means return sizes -measured in pixels, otherwise return sizes measured in canonical -character units (fractions of the width/height of the frame's default -font). FRAME is the frame on which the image will be displayed. -FRAME nil or omitted means use the selected frame. - -** The function `image-mask-p' can be used to determine if an image -has a mask bitmap. - -- Function: image-mask-p SPEC &optional FRAME - -Return t if image SPEC has a mask bitmap. -FRAME is the frame on which the image will be displayed. FRAME nil -or omitted means use the selected frame. - -** The function `find-image' can be used to find a usable image -satisfying one of a list of specifications. - -** The STRING argument of `put-image' and `insert-image' is now -optional. - -** Image specifications may contain the property `:ascent center' (see -below). - - -* New Lisp-level Display features in Emacs 21.1 - -** The function tty-suppress-bold-inverse-default-colors can be used -to make Emacs avoid displaying text with bold black foreground on TTYs. - -Some terminals, notably PC consoles, emulate bold text by displaying -text in brighter colors. On such a console, a bold black foreground -is displayed in a gray color. If this turns out to be hard to read on -your monitor---the problem occurred with the mode line on -laptops---you can instruct Emacs to ignore the text's boldness, and to -just display it black instead. - -This situation can't be detected automatically. You will have to put -a line like - - (tty-suppress-bold-inverse-default-colors t) - -in your `.emacs'. - -** New face implementation. - -Emacs faces have been reimplemented from scratch. They don't use XLFD -font names anymore and face merging now works as expected. - -*** New faces. - -Each face can specify the following display attributes: - - 1. Font family or fontset alias name. - - 2. Relative proportionate width, aka character set width or set - width (swidth), e.g. `semi-compressed'. - - 3. Font height in 1/10pt - - 4. Font weight, e.g. `bold'. - - 5. Font slant, e.g. `italic'. - - 6. Foreground color. - - 7. Background color. - - 8. Whether or not characters should be underlined, and in what color. - - 9. Whether or not characters should be displayed in inverse video. - - 10. A background stipple, a bitmap. - - 11. Whether or not characters should be overlined, and in what color. - - 12. Whether or not characters should be strike-through, and in what - color. - - 13. Whether or not a box should be drawn around characters, its - color, the width of the box lines, and 3D appearance. - -Faces are frame-local by nature because Emacs allows to define the -same named face (face names are symbols) differently for different -frames. Each frame has an alist of face definitions for all named -faces. The value of a named face in such an alist is a Lisp vector -with the symbol `face' in slot 0, and a slot for each of the face -attributes mentioned above. - -There is also a global face alist `face-new-frame-defaults'. Face -definitions from this list are used to initialize faces of newly -created frames. - -A face doesn't have to specify all attributes. Those not specified -have a nil value. Faces specifying all attributes are called -`fully-specified'. - -*** Face merging. - -The display style of a given character in the text is determined by -combining several faces. This process is called `face merging'. Any -aspect of the display style that isn't specified by overlays or text -properties is taken from the `default' face. Since it is made sure -that the default face is always fully-specified, face merging always -results in a fully-specified face. - -*** Face realization. - -After all face attributes for a character have been determined by -merging faces of that character, that face is `realized'. The -realization process maps face attributes to what is physically -available on the system where Emacs runs. The result is a `realized -face' in form of an internal structure which is stored in the face -cache of the frame on which it was realized. - -Face realization is done in the context of the charset of the -character to display because different fonts and encodings are used -for different charsets. In other words, for characters of different -charsets, different realized faces are needed to display them. - -Except for composite characters, faces are always realized for a -specific character set and contain a specific font, even if the face -being realized specifies a fontset. The reason is that the result of -the new font selection stage is better than what can be done with -statically defined font name patterns in fontsets. - -In unibyte text, Emacs' charsets aren't applicable; function -`char-charset' reports ASCII for all characters, including those > -0x7f. The X registry and encoding of fonts to use is determined from -the variable `face-default-registry' in this case. The variable is -initialized at Emacs startup time from the font the user specified for -Emacs. - -Currently all unibyte text, i.e. all buffers with -`enable-multibyte-characters' nil are displayed with fonts of the same -registry and encoding `face-default-registry'. This is consistent -with the fact that languages can also be set globally, only. - -**** Clearing face caches. - -The Lisp function `clear-face-cache' can be called to clear face caches -on all frames. If called with a non-nil argument, it will also unload -unused fonts. - -*** Font selection. - -Font selection tries to find the best available matching font for a -given (charset, face) combination. This is done slightly differently -for faces specifying a fontset, or a font family name. - -If the face specifies a fontset name, that fontset determines a -pattern for fonts of the given charset. If the face specifies a font -family, a font pattern is constructed. Charset symbols have a -property `x-charset-registry' for that purpose that maps a charset to -an XLFD registry and encoding in the font pattern constructed. - -Available fonts on the system on which Emacs runs are then matched -against the font pattern. The result of font selection is the best -match for the given face attributes in this font list. - -Font selection can be influenced by the user. - -The user can specify the relative importance he gives the face -attributes width, height, weight, and slant by setting -face-font-selection-order (faces.el) to a list of face attribute -names. The default is (:width :height :weight :slant), and means -that font selection first tries to find a good match for the font -width specified by a face, then---within fonts with that width---tries -to find a best match for the specified font height, etc. - -Setting `face-font-family-alternatives' allows the user to specify -alternative font families to try if a family specified by a face -doesn't exist. - -Setting `face-font-registry-alternatives' allows the user to specify -all alternative font registry names to try for a face specifying a -registry. - -Please note that the interpretations of the above two variables are -slightly different. - -Setting face-ignored-fonts allows the user to ignore specific fonts. - - -**** Scalable fonts - -Emacs can make use of scalable fonts but doesn't do so by default, -since the use of too many or too big scalable fonts may crash XFree86 -servers. - -To enable scalable font use, set the variable -`scalable-fonts-allowed'. A value of nil, the default, means never use -scalable fonts. A value of t means any scalable font may be used. -Otherwise, the value must be a list of regular expressions. A -scalable font may then be used if it matches a regular expression from -that list. Example: - - (setq scalable-fonts-allowed '("muleindian-2$")) - -allows the use of scalable fonts with registry `muleindian-2'. - -*** Functions and variables related to font selection. - -- Function: x-family-fonts &optional FAMILY FRAME - -Return a list of available fonts of family FAMILY on FRAME. If FAMILY -is omitted or nil, list all families. Otherwise, FAMILY must be a -string, possibly containing wildcards `?' and `*'. - -If FRAME is omitted or nil, use the selected frame. Each element of -the result is a vector [FAMILY WIDTH POINT-SIZE WEIGHT SLANT FIXED-P -FULL REGISTRY-AND-ENCODING]. FAMILY is the font family name. -POINT-SIZE is the size of the font in 1/10 pt. WIDTH, WEIGHT, and -SLANT are symbols describing the width, weight and slant of the font. -These symbols are the same as for face attributes. FIXED-P is non-nil -if the font is fixed-pitch. FULL is the full name of the font, and -REGISTRY-AND-ENCODING is a string giving the registry and encoding of -the font. The result list is sorted according to the current setting -of the face font sort order. - -- Function: x-font-family-list - -Return a list of available font families on FRAME. If FRAME is -omitted or nil, use the selected frame. Value is a list of conses -(FAMILY . FIXED-P) where FAMILY is a font family, and FIXED-P is -non-nil if fonts of that family are fixed-pitch. - -- Variable: font-list-limit - -Limit for font matching. If an integer > 0, font matching functions -won't load more than that number of fonts when searching for a -matching font. The default is currently 100. - -*** Setting face attributes. - -For the most part, the new face implementation is interface-compatible -with the old one. Old face attribute related functions are now -implemented in terms of the new functions `set-face-attribute' and -`face-attribute'. - -Face attributes are identified by their names which are keyword -symbols. All attributes can be set to `unspecified'. - -The following attributes are recognized: - -`:family' - -VALUE must be a string specifying the font family, e.g. ``courier'', -or a fontset alias name. If a font family is specified, wild-cards `*' -and `?' are allowed. - -`:width' - -VALUE specifies the relative proportionate width of the font to use. -It must be one of the symbols `ultra-condensed', `extra-condensed', -`condensed', `semi-condensed', `normal', `semi-expanded', `expanded', -`extra-expanded', or `ultra-expanded'. - -`:height' - -VALUE must be either an integer specifying the height of the font to use -in 1/10 pt, a floating point number specifying the amount by which to -scale any underlying face, or a function, which is called with the old -height (from the underlying face), and should return the new height. - -`:weight' - -VALUE specifies the weight of the font to use. It must be one of the -symbols `ultra-bold', `extra-bold', `bold', `semi-bold', `normal', -`semi-light', `light', `extra-light', `ultra-light'. - -`:slant' - -VALUE specifies the slant of the font to use. It must be one of the -symbols `italic', `oblique', `normal', `reverse-italic', or -`reverse-oblique'. - -`:foreground', `:background' - -VALUE must be a color name, a string. - -`:underline' - -VALUE specifies whether characters in FACE should be underlined. If -VALUE is t, underline with foreground color of the face. If VALUE is -a string, underline with that color. If VALUE is nil, explicitly -don't underline. - -`:overline' - -VALUE specifies whether characters in FACE should be overlined. If -VALUE is t, overline with foreground color of the face. If VALUE is a -string, overline with that color. If VALUE is nil, explicitly don't -overline. - -`:strike-through' - -VALUE specifies whether characters in FACE should be drawn with a line -striking through them. If VALUE is t, use the foreground color of the -face. If VALUE is a string, strike-through with that color. If VALUE -is nil, explicitly don't strike through. - -`:box' - -VALUE specifies whether characters in FACE should have a box drawn -around them. If VALUE is nil, explicitly don't draw boxes. If -VALUE is t, draw a box with lines of width 1 in the foreground color -of the face. If VALUE is a string, the string must be a color name, -and the box is drawn in that color with a line width of 1. Otherwise, -VALUE must be a property list of the form `(:line-width WIDTH -:color COLOR :style STYLE)'. If a keyword/value pair is missing from -the property list, a default value will be used for the value, as -specified below. WIDTH specifies the width of the lines to draw; it -defaults to 1. COLOR is the name of the color to draw in, default is -the foreground color of the face for simple boxes, and the background -color of the face for 3D boxes. STYLE specifies whether a 3D box -should be draw. If STYLE is `released-button', draw a box looking -like a released 3D button. If STYLE is `pressed-button' draw a box -that appears like a pressed button. If STYLE is nil, the default if -the property list doesn't contain a style specification, draw a 2D -box. - -`:inverse-video' - -VALUE specifies whether characters in FACE should be displayed in -inverse video. VALUE must be one of t or nil. - -`:stipple' - -If VALUE is a string, it must be the name of a file of pixmap data. -The directories listed in the `x-bitmap-file-path' variable are -searched. Alternatively, VALUE may be a list of the form (WIDTH -HEIGHT DATA) where WIDTH and HEIGHT are the size in pixels, and DATA -is a string containing the raw bits of the bitmap. VALUE nil means -explicitly don't use a stipple pattern. - -For convenience, attributes `:family', `:width', `:height', `:weight', -and `:slant' may also be set in one step from an X font name: - -`:font' - -Set font-related face attributes from VALUE. VALUE must be a valid -XLFD font name. If it is a font name pattern, the first matching font -is used--this is for compatibility with the behavior of previous -versions of Emacs. - -For compatibility with Emacs 20, keywords `:bold' and `:italic' can -be used to specify that a bold or italic font should be used. VALUE -must be t or nil in that case. A value of `unspecified' is not allowed." - -Please see also the documentation of `set-face-attribute' and -`defface'. - -`:inherit' - -VALUE is the name of a face from which to inherit attributes, or a list -of face names. Attributes from inherited faces are merged into the face -like an underlying face would be, with higher priority than underlying faces. - -*** Face attributes and X resources - -The following X resource names can be used to set face attributes -from X resources: - - Face attribute X resource class ------------------------------------------------------------------------ - :family attributeFamily . Face.AttributeFamily - :width attributeWidth Face.AttributeWidth - :height attributeHeight Face.AttributeHeight - :weight attributeWeight Face.AttributeWeight - :slant attributeSlant Face.AttributeSlant - foreground attributeForeground Face.AttributeForeground - :background attributeBackground . Face.AttributeBackground - :overline attributeOverline Face.AttributeOverline - :strike-through attributeStrikeThrough Face.AttributeStrikeThrough - :box attributeBox Face.AttributeBox - :underline attributeUnderline Face.AttributeUnderline - :inverse-video attributeInverse Face.AttributeInverse - :stipple attributeStipple Face.AttributeStipple - or attributeBackgroundPixmap - Face.AttributeBackgroundPixmap - :font attributeFont Face.AttributeFont - :bold attributeBold Face.AttributeBold - :italic attributeItalic . Face.AttributeItalic - :font attributeFont Face.AttributeFont - -*** Text property `face'. - -The value of the `face' text property can now be a single face -specification or a list of such specifications. Each face -specification can be - -1. A symbol or string naming a Lisp face. - -2. A property list of the form (KEYWORD VALUE ...) where each - KEYWORD is a face attribute name, and VALUE is an appropriate value - for that attribute. Please see the doc string of `set-face-attribute' - for face attribute names. - -3. Conses of the form (FOREGROUND-COLOR . COLOR) or - (BACKGROUND-COLOR . COLOR) where COLOR is a color name. This is - for compatibility with previous Emacs versions. - -** Support functions for colors on text-only terminals. - -The function `tty-color-define' can be used to define colors for use -on TTY and MSDOS frames. It maps a color name to a color number on -the terminal. Emacs defines a couple of common color mappings by -default. You can get defined colors with a call to -`defined-colors'. The function `tty-color-clear' can be -used to clear the mapping table. - -** Unified support for colors independent of frame type. - -The new functions `defined-colors', `color-defined-p', `color-values', -and `display-color-p' work for any type of frame. On frames whose -type is neither x nor w32, these functions transparently map X-style -color specifications to the closest colors supported by the frame -display. Lisp programs should use these new functions instead of the -old `x-defined-colors', `x-color-defined-p', `x-color-values', and -`x-display-color-p'. (The old function names are still available for -compatibility; they are now aliases of the new names.) Lisp programs -should no more look at the value of the variable window-system to -modify their color-related behavior. - -The primitives `color-gray-p' and `color-supported-p' also work for -any frame type. - -** Platform-independent functions to describe display capabilities. - -The new functions `display-mouse-p', `display-popup-menus-p', -`display-graphic-p', `display-selections-p', `display-screens', -`display-pixel-width', `display-pixel-height', `display-mm-width', -`display-mm-height', `display-backing-store', `display-save-under', -`display-planes', `display-color-cells', `display-visual-class', and -`display-grayscale-p' describe the basic capabilities of a particular -display. Lisp programs should call these functions instead of testing -the value of the variables `window-system' or `system-type', or calling -platform-specific functions such as `x-display-pixel-width'. - -The new function `display-images-p' returns non-nil if a particular -display can display image files. - -** The minibuffer prompt is now actually inserted in the minibuffer. - -This makes it possible to scroll through the prompt, if you want to. -To disallow this completely (like previous versions of emacs), customize -the variable `minibuffer-prompt-properties', and turn on the -`Inviolable' option. - -The function `minibuffer-prompt-end' returns the current position of the -end of the minibuffer prompt, if the minibuffer is current. -Otherwise, it returns `(point-min)'. - -** New `field' abstraction in buffers. - -There is now code to support an abstraction called `fields' in emacs -buffers. A field is a contiguous region of text with the same `field' -property (which can be a text property or an overlay). - -Many emacs functions, such as forward-word, forward-sentence, -forward-paragraph, beginning-of-line, etc., stop moving when they come -to the boundary between fields; beginning-of-line and end-of-line will -not let the point move past the field boundary, but other movement -commands continue into the next field if repeated. Stopping at field -boundaries can be suppressed programmatically by binding -`inhibit-field-text-motion' to a non-nil value around calls to these -functions. - -Now that the minibuffer prompt is inserted into the minibuffer, it is in -a separate field from the user-input part of the buffer, so that common -editing commands treat the user's text separately from the prompt. - -The following functions are defined for operating on fields: - -- Function: constrain-to-field NEW-POS OLD-POS &optional ESCAPE-FROM-EDGE ONLY-IN-LINE INHIBIT-CAPTURE-PROPERTY - -Return the position closest to NEW-POS that is in the same field as OLD-POS. - -A field is a region of text with the same `field' property. -If NEW-POS is nil, then the current point is used instead, and set to the -constrained position if that is different. - -If OLD-POS is at the boundary of two fields, then the allowable -positions for NEW-POS depends on the value of the optional argument -ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is -constrained to the field that has the same `field' char-property -as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE -is non-nil, NEW-POS is constrained to the union of the two adjacent -fields. Additionally, if two fields are separated by another field with -the special value `boundary', then any point within this special field is -also considered to be `on the boundary'. - -If the optional argument ONLY-IN-LINE is non-nil and constraining -NEW-POS would move it to a different line, NEW-POS is returned -unconstrained. This useful for commands that move by line, like -C-n or C-a, which should generally respect field boundaries -only in the case where they can still move to the right line. - -If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has -a non-nil property of that name, then any field boundaries are ignored. - -Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. - -- Function: delete-field &optional POS - -Delete the field surrounding POS. -A field is a region of text with the same `field' property. -If POS is nil, the value of point is used for POS. - -- Function: field-beginning &optional POS ESCAPE-FROM-EDGE - -Return the beginning of the field surrounding POS. -A field is a region of text with the same `field' property. -If POS is nil, the value of point is used for POS. -If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its -field, then the beginning of the *previous* field is returned. - -- Function: field-end &optional POS ESCAPE-FROM-EDGE - -Return the end of the field surrounding POS. -A field is a region of text with the same `field' property. -If POS is nil, the value of point is used for POS. -If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field, -then the end of the *following* field is returned. - -- Function: field-string &optional POS - -Return the contents of the field surrounding POS as a string. -A field is a region of text with the same `field' property. -If POS is nil, the value of point is used for POS. - -- Function: field-string-no-properties &optional POS - -Return the contents of the field around POS, without text-properties. -A field is a region of text with the same `field' property. -If POS is nil, the value of point is used for POS. - -** Image support. - -Emacs can now display images. Images are inserted into text by giving -strings or buffer text a `display' text property containing one of -(AREA IMAGE) or IMAGE. The display of the `display' property value -replaces the display of the characters having that property. - -If the property value has the form (AREA IMAGE), AREA must be one of -`(margin left-margin)', `(margin right-margin)' or `(margin nil)'. If -AREA is `(margin nil)', IMAGE will be displayed in the text area of a -window, otherwise it will be displayed in the left or right marginal -area. - -IMAGE is an image specification. - -*** Image specifications - -Image specifications are lists of the form `(image PROPS)' where PROPS -is a property list whose keys are keyword symbols. Each -specifications must contain a property `:type TYPE' with TYPE being a -symbol specifying the image type, e.g. `xbm'. Properties not -described below are ignored. - -The following is a list of properties all image types share. - -`:ascent ASCENT' - -ASCENT must be a number in the range 0..100, or the symbol `center'. -If it is a number, it specifies the percentage of the image's height -to use for its ascent. - -If not specified, ASCENT defaults to the value 50 which means that the -image will be centered with the base line of the row it appears in. - -If ASCENT is `center' the image is vertically centered around a -centerline which is the vertical center of text drawn at the position -of the image, in the manner specified by the text properties and -overlays that apply to the image. - -`:margin MARGIN' - -MARGIN must be either a number >= 0 specifying how many pixels to put -as margin around the image, or a pair (X . Y) with X specifying the -horizontal margin and Y specifying the vertical margin. Default is 0. - -`:relief RELIEF' - -RELIEF is analogous to the `:relief' attribute of faces. Puts a relief -around an image. - -`:conversion ALGO' - -Apply an image algorithm to the image before displaying it. - -ALGO `laplace' or `emboss' means apply a Laplace or ``emboss'' -edge-detection algorithm to the image. - -ALGO `(edge-detection :matrix MATRIX :color-adjust ADJUST)' means -apply a general edge-detection algorithm. MATRIX must be either a -nine-element list or a nine-element vector of numbers. A pixel at -position x/y in the transformed image is computed from original pixels -around that position. MATRIX specifies, for each pixel in the -neighborhood of x/y, a factor with which that pixel will influence the -transformed pixel; element 0 specifies the factor for the pixel at -x-1/y-1, element 1 the factor for the pixel at x/y-1 etc. as shown -below. - - (x-1/y-1 x/y-1 x+1/y-1 - x-1/y x/y x+1/y - x-1/y+1 x/y+1 x+1/y+1) - -The resulting pixel is computed from the color intensity of the color -resulting from summing up the RGB values of surrounding pixels, -multiplied by the specified factors, and dividing that sum by the sum -of the factors' absolute values. - -Laplace edge-detection currently uses a matrix of - - (1 0 0 - 0 0 0 - 9 9 -1) - -Emboss edge-detection uses a matrix of - - ( 2 -1 0 - -1 0 1 - 0 1 -2) - -ALGO `disabled' means transform the image so that it looks -``disabled''. - -`:mask MASK' - -If MASK is `heuristic' or `(heuristic BG)', build a clipping mask for -the image, so that the background of a frame is visible behind the -image. If BG is not specified, or if BG is t, determine the -background color of the image by looking at the 4 corners of the -image, assuming the most frequently occurring color from the corners is -the background color of the image. Otherwise, BG must be a list `(RED -GREEN BLUE)' specifying the color to assume for the background of the -image. - -If MASK is nil, remove a mask from the image, if it has one. Images -in some formats include a mask which can be removed by specifying -`:mask nil'. - -`:file FILE' - -Load image from FILE. If FILE is not absolute after expanding it, -search for the image in `data-directory'. Some image types support -building images from data. When this is done, no `:file' property -may be present in the image specification. - -`:data DATA' - -Get image data from DATA. (As of this writing, this is not yet -supported for image type `postscript'). Either :file or :data may be -present in an image specification, but not both. All image types -support strings as DATA, some types allow additional types of DATA. - -*** Supported image types - -**** XBM, image type `xbm'. - -XBM images don't require an external library. Additional image -properties supported are: - -`:foreground FG' - -FG must be a string specifying the image foreground color, or nil -meaning to use the default. Default is the frame's foreground color. - -`:background BG' - -BG must be a string specifying the image background color, or nil -meaning to use the default. Default is the frame's background color. - -XBM images can be constructed from data instead of file. In this -case, the image specification must contain the following properties -instead of a `:file' property. - -`:width WIDTH' - -WIDTH specifies the width of the image in pixels. - -`:height HEIGHT' - -HEIGHT specifies the height of the image in pixels. - -`:data DATA' - -DATA must be either - - 1. a string large enough to hold the bitmap data, i.e. it must - have a size >= (WIDTH + 7) / 8 * HEIGHT - - 2. a bool-vector of size >= WIDTH * HEIGHT - - 3. a vector of strings or bool-vectors, one for each line of the - bitmap. - - 4. a string that's an in-memory XBM file. Neither width nor - height may be specified in this case because these are defined - in the file. - -**** XPM, image type `xpm' - -XPM images require the external library `libXpm', package -`xpm-3.4k.tar.gz', version 3.4k or later. Make sure the library is -found when Emacs is configured by supplying appropriate paths via -`--x-includes' and `--x-libraries'. - -Additional image properties supported are: - -`:color-symbols SYMBOLS' - -SYMBOLS must be a list of pairs (NAME . COLOR), with NAME being the -name of color as it appears in an XPM file, and COLOR being an X color -name. - -XPM images can be built from memory instead of files. In that case, -add a `:data' property instead of a `:file' property. - -The XPM library uses libz in its implementation so that it is able -to display compressed images. - -**** PBM, image type `pbm' - -PBM images don't require an external library. Color, gray-scale and -mono images are supported. Additional image properties supported for -mono images are: - -`:foreground FG' - -FG must be a string specifying the image foreground color, or nil -meaning to use the default. Default is the frame's foreground color. - -`:background FG' - -BG must be a string specifying the image background color, or nil -meaning to use the default. Default is the frame's background color. - -**** JPEG, image type `jpeg' - -Support for JPEG images requires the external library `libjpeg', -package `jpegsrc.v6a.tar.gz', or later. There are no additional image -properties defined. - -**** TIFF, image type `tiff' - -Support for TIFF images requires the external library `libtiff', -package `tiff-v3.4-tar.gz', or later. There are no additional image -properties defined. - -**** GIF, image type `gif' - -Support for GIF images requires the external library `libungif', package -`libungif-4.1.0', or later. - -Additional image properties supported are: - -`:index INDEX' - -INDEX must be an integer >= 0. Load image number INDEX from a -multi-image GIF file. If INDEX is too large, the image displays -as a hollow box. - -This could be used to implement limited support for animated GIFs. -For example, the following function displays a multi-image GIF file -at point-min in the current buffer, switching between sub-images -every 0.1 seconds. - -(defun show-anim (file max) - "Display multi-image GIF file FILE which contains MAX subimages." - (display-anim (current-buffer) file 0 max t)) - -(defun display-anim (buffer file idx max first-time) - (when (= idx max) - (setq idx 0)) - (let ((img (create-image file nil nil :index idx))) - (save-excursion - (set-buffer buffer) - (goto-char (point-min)) - (unless first-time (delete-char 1)) - (insert-image img "x")) - (run-with-timer 0.1 nil 'display-anim buffer file (1+ idx) max nil))) - -**** PNG, image type `png' - -Support for PNG images requires the external library `libpng', -package `libpng-1.0.2.tar.gz', or later. There are no additional image -properties defined. - -**** Ghostscript, image type `postscript'. - -Additional image properties supported are: - -`:pt-width WIDTH' - -WIDTH is width of the image in pt (1/72 inch). WIDTH must be an -integer. This is a required property. - -`:pt-height HEIGHT' - -HEIGHT specifies the height of the image in pt (1/72 inch). HEIGHT -must be a integer. This is an required property. - -`:bounding-box BOX' - -BOX must be a list or vector of 4 integers giving the bounding box of -the PS image, analogous to the `BoundingBox' comment found in PS -files. This is an required property. - -Part of the Ghostscript interface is implemented in Lisp. See -lisp/gs.el. - -*** Lisp interface. - -The variable `image-types' contains a list of those image types -which are supported in the current configuration. - -Images are stored in an image cache and removed from the cache when -they haven't been displayed for `image-cache-eviction-delay seconds. -The function `clear-image-cache' can be used to clear the image cache -manually. Images in the cache are compared with `equal', i.e. all -images with `equal' specifications share the same image. - -*** Simplified image API, image.el - -The new Lisp package image.el contains functions that simplify image -creation and putting images into text. The function `create-image' -can be used to create images. The macro `defimage' can be used to -define an image based on available image types. The functions -`put-image' and `insert-image' can be used to insert an image into a -buffer. - -** Display margins. - -Windows can now have margins which are used for special text -and images. - -To give a window margins, either set the buffer-local variables -`left-margin-width' and `right-margin-width', or call -`set-window-margins'. The function `window-margins' can be used to -obtain the current settings. To make `left-margin-width' and -`right-margin-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. - -You can put text in margins by giving it a `display' text property -containing a pair of the form `(LOCATION . VALUE)', where LOCATION is -one of `left-margin' or `right-margin' or nil. VALUE can be either a -string, an image specification or a stretch specification (see later -in this file). - -** Help display - -Emacs displays short help messages in the echo area, when the mouse -moves over a tool-bar item or a piece of text that has a text property -`help-echo'. This feature also applies to strings in the mode line -that have a `help-echo' property. - -If the value of the `help-echo' property is a function, that function -is called with three arguments WINDOW, OBJECT and POSITION. WINDOW is -the window in which the help was found. - -If OBJECT is a buffer, POS is the position in the buffer where the -`help-echo' text property was found. - -If OBJECT is an overlay, that overlay has a `help-echo' property, and -POS is the position in the overlay's buffer under the mouse. - -If OBJECT is a string (an overlay string or a string displayed with -the `display' property), POS is the position in that string under the -mouse. - -If the value of the `help-echo' property is neither a function nor a -string, it is evaluated to obtain a help string. - -For tool-bar and menu-bar items, their key definition is used to -determine the help to display. If their definition contains a -property `:help FORM', FORM is evaluated to determine the help string. -For tool-bar items without a help form, the caption of the item is -used as help string. - -The hook `show-help-function' can be set to a function that displays -the help string differently. For example, enabling a tooltip window -causes the help display to appear there instead of in the echo area. - -** Vertical fractional scrolling. - -The display of text in windows can be scrolled smoothly in pixels. -This is useful, for example, for making parts of large images visible. - -The function `window-vscroll' returns the current value of vertical -scrolling, a non-negative fraction of the canonical character height. -The function `set-window-vscroll' can be used to set the vertical -scrolling value. Here is an example of how these function might be -used. - - (global-set-key [A-down] - #'(lambda () - (interactive) - (set-window-vscroll (selected-window) - (+ 0.5 (window-vscroll))))) - (global-set-key [A-up] - #'(lambda () - (interactive) - (set-window-vscroll (selected-window) - (- (window-vscroll) 0.5))))) - -** New hook `fontification-functions'. - -Functions from `fontification-functions' are called from redisplay -when it encounters a region of text that is not yet fontified. This -variable automatically becomes buffer-local when set. Each function -is called with one argument, POS. - -At least one of the hook functions should fontify one or more -characters starting at POS in the current buffer. It should mark them -as fontified by giving them a non-nil value of the `fontified' text -property. It may be reasonable for these functions to check for the -`fontified' property and not put it back on, but they do not have to. - -** Tool bar support. - -Emacs supports a tool bar at the top of a frame under X. The frame -parameter `tool-bar-lines' (X resource "toolBar", class "ToolBar") -controls how may lines to reserve for the tool bar. A zero value -suppresses the tool bar. If the value is non-zero and -`auto-resize-tool-bars' is non-nil the tool bar's size will be changed -automatically so that all tool bar items are visible. - -*** Tool bar item definitions - -Tool bar items are defined using `define-key' with a prefix-key -`tool-bar'. For example `(define-key global-map [tool-bar item1] ITEM)' -where ITEM is a list `(menu-item CAPTION BINDING PROPS...)'. - -CAPTION is the caption of the item, If it's not a string, it is -evaluated to get a string. The caption is currently not displayed in -the tool bar, but it is displayed if the item doesn't have a `:help' -property (see below). - -BINDING is the tool bar item's binding. Tool bar items with keymaps as -binding are currently ignored. - -The following properties are recognized: - -`:enable FORM'. - -FORM is evaluated and specifies whether the tool bar item is enabled -or disabled. - -`:visible FORM' - -FORM is evaluated and specifies whether the tool bar item is displayed. - -`:filter FUNCTION' - -FUNCTION is called with one parameter, the same list BINDING in which -FUNCTION is specified as the filter. The value FUNCTION returns is -used instead of BINDING to display this item. - -`:button (TYPE SELECTED)' - -TYPE must be one of `:radio' or `:toggle'. SELECTED is evaluated -and specifies whether the button is selected (pressed) or not. - -`:image IMAGES' - -IMAGES is either a single image specification or a vector of four -image specifications. If it is a vector, this table lists the -meaning of each of the four elements: - - Index Use when item is - ---------------------------------------- - 0 enabled and selected - 1 enabled and deselected - 2 disabled and selected - 3 disabled and deselected - -If IMAGE is a single image specification, a Laplace edge-detection -algorithm is used on that image to draw the image in disabled state. - -`:help HELP-STRING'. - -Gives a help string to display for the tool bar item. This help -is displayed when the mouse is moved over the item. - -The function `toolbar-add-item' is a convenience function for adding -toolbar items generally, and `tool-bar-add-item-from-menu' can be used -to define a toolbar item with a binding copied from an item on the -menu bar. - -The default bindings use a menu-item :filter to derive the tool-bar -dynamically from variable `tool-bar-map' which may be set -buffer-locally to override the global map. - -*** Tool-bar-related variables. - -If `auto-resize-tool-bar' is non-nil, the tool bar will automatically -resize to show all defined tool bar items. It will never grow larger -than 1/4 of the frame's size. - -If `auto-raise-tool-bar-buttons' is non-nil, tool bar buttons will be -raised when the mouse moves over them. - -You can add extra space between tool bar items by setting -`tool-bar-button-margin' to a positive integer specifying a number of -pixels, or a pair of integers (X . Y) specifying horizontal and -vertical margins . Default is 1. - -You can change the shadow thickness of tool bar buttons by setting -`tool-bar-button-relief' to an integer. Default is 3. - -*** Tool-bar clicks with modifiers. - -You can bind commands to clicks with control, shift, meta etc. on -a tool bar item. If - - (define-key global-map [tool-bar shell] - '(menu-item "Shell" shell - :image (image :type xpm :file "shell.xpm"))) - -is the original tool bar item definition, then - - (define-key global-map [tool-bar S-shell] 'some-command) - -makes a binding to run `some-command' for a shifted click on the same -item. - -** Mode line changes. - -*** Mouse-sensitive mode line. - -The mode line can be made mouse-sensitive by displaying strings there -that have a `local-map' text property. There are three ways to display -a string with a `local-map' property in the mode line. - -1. The mode line spec contains a variable whose string value has -a `local-map' text property. - -2. The mode line spec contains a format specifier (e.g. `%12b'), and -that format specifier has a `local-map' property. - -3. The mode line spec contains a list containing `:eval FORM'. FORM -is evaluated. If the result is a string, and that string has a -`local-map' property. - -The same mechanism is used to determine the `face' and `help-echo' -properties of strings in the mode line. See `bindings.el' for an -example. - -*** If a mode line element has the form `(:eval FORM)', FORM is -evaluated and the result is used as mode line element. - -*** You can suppress mode-line display by setting the buffer-local -variable mode-line-format to nil. - -*** A headerline can now be displayed at the top of a window. - -This mode line's contents are controlled by the new variable -`header-line-format' and `default-header-line-format' which are -completely analogous to `mode-line-format' and -`default-mode-line-format'. A value of nil means don't display a top -line. - -The appearance of top mode lines is controlled by the face -`header-line'. - -The function `coordinates-in-window-p' returns `header-line' for a -position in the header-line. - -** Text property `display' - -The `display' text property is used to insert images into text, -replace text with other text, display text in marginal area, and it is -also used to control other aspects of how text displays. The value of -the `display' property should be a display specification, as described -below, or a list or vector containing display specifications. - -*** Replacing text, displaying text in marginal areas - -To replace the text having the `display' property with some other -text, use a display specification of the form `(LOCATION STRING)'. - -If LOCATION is `(margin left-margin)', STRING is displayed in the left -marginal area, if it is `(margin right-margin)', it is displayed in -the right marginal area, and if LOCATION is `(margin nil)' STRING -is displayed in the text. In the latter case you can also use the -simpler form STRING as property value. - -*** Variable width and height spaces - -To display a space of fractional width or height, use a display -specification of the form `(LOCATION STRECH)'. If LOCATION is -`(margin left-margin)', the space is displayed in the left marginal -area, if it is `(margin right-margin)', it is displayed in the right -marginal area, and if LOCATION is `(margin nil)' the space is -displayed in the text. In the latter case you can also use the -simpler form STRETCH as property value. - -The stretch specification STRETCH itself is a list of the form `(space -PROPS)', where PROPS is a property list which can contain the -properties described below. - -The display of the fractional space replaces the display of the -characters having the `display' property. - -- :width WIDTH - -Specifies that the space width should be WIDTH times the normal -character width. WIDTH can be an integer or floating point number. - -- :relative-width FACTOR - -Specifies that the width of the stretch should be computed from the -first character in a group of consecutive characters that have the -same `display' property. The computation is done by multiplying the -width of that character by FACTOR. - -- :align-to HPOS - -Specifies that the space should be wide enough to reach HPOS. The -value HPOS is measured in units of the normal character width. - -Exactly one of the above properties should be used. - -- :height HEIGHT - -Specifies the height of the space, as HEIGHT, measured in terms of the -normal line height. - -- :relative-height FACTOR - -The height of the space is computed as the product of the height -of the text having the `display' property and FACTOR. - -- :ascent ASCENT - -Specifies that ASCENT percent of the height of the stretch should be -used for the ascent of the stretch, i.e. for the part above the -baseline. The value of ASCENT must be a non-negative number less or -equal to 100. - -You should not use both `:height' and `:relative-height' together. - -*** Images - -A display specification for an image has the form `(LOCATION -. IMAGE)', where IMAGE is an image specification. The image replaces, -in the display, the characters having this display specification in -their `display' text property. If LOCATION is `(margin left-margin)', -the image will be displayed in the left marginal area, if it is -`(margin right-margin)' it will be displayed in the right marginal -area, and if LOCATION is `(margin nil)' the image will be displayed in -the text. In the latter case you can also use the simpler form IMAGE -as display specification. - -*** Other display properties - -- (space-width FACTOR) - -Specifies that space characters in the text having that property -should be displayed FACTOR times as wide as normal; FACTOR must be an -integer or float. - -- (height HEIGHT) - -Display text having this property in a font that is smaller or larger. - -If HEIGHT is a list of the form `(+ N)', where N is an integer, that -means to use a font that is N steps larger. If HEIGHT is a list of -the form `(- N)', that means to use a font that is N steps smaller. A -``step'' is defined by the set of available fonts; each size for which -a font is available counts as a step. - -If HEIGHT is a number, that means to use a font that is HEIGHT times -as tall as the frame's default font. - -If HEIGHT is a symbol, it is called as a function with the current -height as argument. The function should return the new height to use. - -Otherwise, HEIGHT is evaluated to get the new height, with the symbol -`height' bound to the current specified font height. - -- (raise FACTOR) - -FACTOR must be a number, specifying a multiple of the current -font's height. If it is positive, that means to display the characters -raised. If it is negative, that means to display them lower down. The -amount of raising or lowering is computed without taking account of the -`height' subproperty. - -*** Conditional display properties - -All display specifications can be conditionalized. If a specification -has the form `(when CONDITION . SPEC)', the specification SPEC applies -only when CONDITION yields a non-nil value when evaluated. During the -evaluation, `object' is bound to the string or buffer having the -conditional display property; `position' and `buffer-position' are -bound to the position within `object' and the buffer position where -the display property was found, respectively. Both positions can be -different when object is a string. - -The normal specification consisting of SPEC only is equivalent to -`(when t . SPEC)'. - -** New menu separator types. - -Emacs now supports more than one menu separator type. Menu items with -item names consisting of dashes only (including zero dashes) are -treated like before. In addition, the following item names are used -to specify other menu separator types. - -- `--no-line' or `--space', or `--:space', or `--:noLine' - -No separator lines are drawn, but a small space is inserted where the -separator occurs. - -- `--single-line' or `--:singleLine' - -A single line in the menu's foreground color. - -- `--double-line' or `--:doubleLine' - -A double line in the menu's foreground color. - -- `--single-dashed-line' or `--:singleDashedLine' - -A single dashed line in the menu's foreground color. - -- `--double-dashed-line' or `--:doubleDashedLine' - -A double dashed line in the menu's foreground color. - -- `--shadow-etched-in' or `--:shadowEtchedIn' - -A single line with 3D sunken appearance. This is the form -displayed for item names consisting of dashes only. - -- `--shadow-etched-out' or `--:shadowEtchedOut' - -A single line with 3D raised appearance. - -- `--shadow-etched-in-dash' or `--:shadowEtchedInDash' - -A single dashed line with 3D sunken appearance. - -- `--shadow-etched-out-dash' or `--:shadowEtchedOutDash' - -A single dashed line with 3D raise appearance. - -- `--shadow-double-etched-in' or `--:shadowDoubleEtchedIn' - -Two lines with 3D sunken appearance. - -- `--shadow-double-etched-out' or `--:shadowDoubleEtchedOut' - -Two lines with 3D raised appearance. - -- `--shadow-double-etched-in-dash' or `--:shadowDoubleEtchedInDash' - -Two dashed lines with 3D sunken appearance. - -- `--shadow-double-etched-out-dash' or `--:shadowDoubleEtchedOutDash' - -Two dashed lines with 3D raised appearance. - -Under LessTif/Motif, the last four separator types are displayed like -the corresponding single-line separators. - -** New frame parameters for scroll bar colors. - -The new frame parameters `scroll-bar-foreground' and -`scroll-bar-background' can be used to change scroll bar colors. -Their value must be either a color name, a string, or nil to specify -that scroll bars should use a default color. For toolkit scroll bars, -default colors are toolkit specific. For non-toolkit scroll bars, the -default background is the background color of the frame, and the -default foreground is black. - -The X resource name of these parameters are `scrollBarForeground' -(class ScrollBarForeground) and `scrollBarBackground' (class -`ScrollBarBackground'). - -Setting these parameters overrides toolkit specific X resource -settings for scroll bar colors. - -** You can set `redisplay-dont-pause' to a non-nil value to prevent -display updates from being interrupted when input is pending. - -** Changing a window's width may now change its window start if it -starts on a continuation line. The new window start is computed based -on the window's new width, starting from the start of the continued -line as the start of the screen line with the minimum distance from -the original window start. - -** The variable `hscroll-step' and the functions -`hscroll-point-visible' and `hscroll-window-column' have been removed -now that proper horizontal scrolling is implemented. - -** Windows can now be made fixed-width and/or fixed-height. - -A window is fixed-size if its buffer has a buffer-local variable -`window-size-fixed' whose value is not nil. A value of `height' makes -windows fixed-height, a value of `width' makes them fixed-width, any -other non-nil value makes them both fixed-width and fixed-height. - -The following code makes all windows displaying the current buffer -fixed-width and fixed-height. - - (set (make-local-variable 'window-size-fixed) t) - -A call to enlarge-window on a window gives an error if that window is -fixed-width and it is tried to change the window's width, or if the -window is fixed-height, and it is tried to change its height. To -change the size of a fixed-size window, bind `window-size-fixed' -temporarily to nil, for example - - (let ((window-size-fixed nil)) - (enlarge-window 10)) - -Likewise, an attempt to split a fixed-height window vertically, -or a fixed-width window horizontally results in a error. - -** The cursor-type frame parameter is now supported on MS-DOS -terminals. When Emacs starts, it by default changes the cursor shape -to a solid box, as it does on Unix. The `cursor-type' frame parameter -overrides this as it does on Unix, except that the bar cursor is -horizontal rather than vertical (since the MS-DOS display doesn't -support a vertical-bar cursor). -* Emacs 20.7 is a bug-fix release with few user-visible changes - -** It is now possible to use CCL-based coding systems for keyboard -input. - -** ange-ftp now handles FTP security extensions, like Kerberos. - -** Rmail has been extended to recognize more forms of digest messages. - -** Now, most coding systems set in keyboard coding system work not -only for character input, but also in incremental search. The -exceptions are such coding systems that handle 2-byte character sets -(e.g euc-kr, euc-jp) and that use ISO's escape sequence -(e.g. iso-2022-jp). They are ignored in incremental search. - -** Support for Macintosh PowerPC-based machines running GNU/Linux has -been added. - - -* Emacs 20.6 is a bug-fix release with one user-visible change - -** Support for ARM-based non-RISCiX machines has been added. - - - -* Emacs 20.5 is a bug-fix release with no user-visible changes. - -** Not new, but not mentioned before: -M-w when Transient Mark mode is enabled disables the mark. - -* Changes in Emacs 20.4 - -** Init file may be called .emacs.el. - -You can now call the Emacs init file `.emacs.el'. -Formerly the name had to be `.emacs'. If you use the name -`.emacs.el', you can byte-compile the file in the usual way. - -If both `.emacs' and `.emacs.el' exist, the latter file -is the one that is used. - -** shell-command, and shell-command-on-region, now return -the exit code of the command (unless it is asynchronous). -Also, you can specify a place to put the error output, -separate from the command's regular output. -Interactively, the variable shell-command-default-error-buffer -says where to put error output; set it to a buffer name. -In calls from Lisp, an optional argument ERROR-BUFFER specifies -the buffer name. - -When you specify a non-nil error buffer (or buffer name), any error -output is inserted before point in that buffer, with \f\n to separate -it from the previous batch of error output. The error buffer is not -cleared, so error output from successive commands accumulates there. - -** Setting the default value of enable-multibyte-characters to nil in -the .emacs file, either explicitly using setq-default, or via Custom, -is now essentially equivalent to using --unibyte: all buffers -created during startup will be made unibyte after loading .emacs. - -** C-x C-f now handles the wildcards * and ? in file names. For -example, typing C-x C-f c*.c RET visits all the files whose names -match c*.c. To visit a file whose name contains * or ?, add the -quoting sequence /: to the beginning of the file name. - -** The M-x commands keep-lines, flush-lines and count-matches -now have the same feature as occur and query-replace: -if the pattern contains any upper case letters, then -they never ignore case. - -** The end-of-line format conversion feature previously mentioned -under `* Emacs 20.1 changes for MS-DOS and MS-Windows' actually -applies to all operating systems. Emacs recognizes from the contents -of a file what convention it uses to separate lines--newline, CRLF, or -just CR--and automatically converts the contents to the normal Emacs -convention (using newline to separate lines) for editing. This is a -part of the general feature of coding system conversion. - -If you subsequently save the buffer, Emacs converts the text back to -the same format that was used in the file before. - -You can turn off end-of-line conversion by setting the variable -`inhibit-eol-conversion' to non-nil, e.g. with Custom in the MULE group. - -** The character set property `prefered-coding-system' has been -renamed to `preferred-coding-system', for the sake of correct spelling. -This is a fairly internal feature, so few programs should be affected. - -** Mode-line display of end-of-line format is changed. -The indication of the end-of-line format of the file visited by a -buffer is now more explicit when that format is not the usual one for -your operating system. For example, the DOS-style end-of-line format -is displayed as "(DOS)" on Unix and GNU/Linux systems. The usual -end-of-line format is still displayed as a single character (colon for -Unix, backslash for DOS and Windows, and forward slash for the Mac). - -The values of the variables eol-mnemonic-unix, eol-mnemonic-dos, -eol-mnemonic-mac, and eol-mnemonic-undecided, which are strings, -control what is displayed in the mode line for each end-of-line -format. You can now customize these variables. - -** In the previous version of Emacs, tar-mode didn't work well if a -filename contained non-ASCII characters. Now this is fixed. Such a -filename is decoded by file-name-coding-system if the default value of -enable-multibyte-characters is non-nil. - -** The command temp-buffer-resize-mode toggles a minor mode -in which temporary buffers (such as help buffers) are given -windows just big enough to hold the whole contents. - -** If you use completion.el, you must now run the function -dynamic-completion-mode to enable it. Just loading the file -doesn't have any effect. - -** In Flyspell mode, the default is now to make just one Ispell process, -not one per buffer. - -** If you use iswitchb but do not call (iswitchb-default-keybindings) to -use the default keybindings, you will need to add the following line: - (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup) - -** Auto-show mode is no longer enabled just by loading auto-show.el. -To control it, set `auto-show-mode' via Custom or use the -`auto-show-mode' command. - -** Handling of X fonts' ascent/descent parameters has been changed to -avoid redisplay problems. As a consequence, compared with previous -versions the line spacing and frame size now differ with some font -choices, typically increasing by a pixel per line. This change -occurred in version 20.3 but was not documented then. - -** If you select the bar cursor style, it uses the frame's -cursor-color, rather than the cursor foreground pixel. - -** In multibyte mode, Rmail decodes incoming MIME messages using the -character set specified in the message. If you want to disable this -feature, set the variable rmail-decode-mime-charset to nil. - -** Not new, but not mentioned previously in NEWS: when you use #! at -the beginning of a file to make it executable and specify an -interpreter program, Emacs looks on the second line for the -*- mode -and variable specification, as well as on the first line. - -** Support for IBM codepage encoding of non-ASCII characters. - -The new command M-x codepage-setup creates a special coding system -that can be used to convert text between a specific IBM codepage and -one of the character sets built into Emacs which matches that -codepage. For example, codepage 850 corresponds to Latin-1 character -set, codepage 855 corresponds to Cyrillic-ISO character set, etc. - -Windows codepages 1250, 1251 and some others, where Windows deviates -from the corresponding ISO character set, are also supported. - -IBM box-drawing characters and other glyphs which don't have -equivalents in the corresponding ISO character set, are converted to -a character defined by dos-unsupported-char-glyph on MS-DOS, and to -`?' on other systems. - -IBM codepages are widely used on MS-DOS and MS-Windows, so this -feature is most useful on those platforms, but it can also be used on -Unix. - -Emacs compiled for MS-DOS automatically loads the support for the -current codepage when it starts. - -** Mail changes - -*** When mail is sent using compose-mail (C-x m), and if -`mail-send-nonascii' is set to the new default value `mime', -appropriate MIME headers are added. The headers are added only if -non-ASCII characters are present in the body of the mail, and no other -MIME headers are already present. For example, the following three -headers are added if the coding system used in the *mail* buffer is -latin-1: - - MIME-version: 1.0 - Content-type: text/plain; charset=iso-8859-1 - Content-Transfer-Encoding: 8bit - -*** The new variable default-sendmail-coding-system specifies the -default way to encode outgoing mail. This has higher priority than -default-buffer-file-coding-system but has lower priority than -sendmail-coding-system and the local value of -buffer-file-coding-system. - -You should not set this variable manually. Instead, set -sendmail-coding-system to specify a fixed encoding for all outgoing -mail. - -*** When you try to send a message that contains non-ASCII characters, -if the coding system specified by those variables doesn't handle them, -Emacs will ask you to select a suitable coding system while showing a -list of possible coding systems. - -** CC Mode changes - -*** c-default-style can now take an association list that maps major -modes to style names. When this variable is an alist, Java mode no -longer hardcodes a setting to "java" style. See the variable's -docstring for details. - -*** It's now possible to put a list as the offset on a syntactic -symbol. The list is evaluated recursively until a non-nil offset is -found. This is useful to combine several lineup functions to act in a -prioritized order on a single line. However, none of the supplied -lineup functions use this feature currently. - -*** New syntactic symbol catch-clause, which is used on the "catch" and -"finally" lines in try-catch constructs in C++ and Java. - -*** New cleanup brace-catch-brace on c-cleanup-list, which does for -"catch" lines what brace-elseif-brace does for "else if" lines. - -*** The braces of Java anonymous inner classes are treated separately -from the braces of other classes in auto-newline mode. Two new -symbols inexpr-class-open and inexpr-class-close may be used on -c-hanging-braces-alist to control the automatic newlines used for -anonymous classes. - -*** Support for the Pike language added, along with new Pike specific -syntactic symbols: inlambda, lambda-intro-cont - -*** Support for Java anonymous classes via new syntactic symbol -inexpr-class. New syntactic symbol inexpr-statement for Pike -support and gcc-style statements inside expressions. New lineup -function c-lineup-inexpr-block. - -*** New syntactic symbol brace-entry-open which is used in brace lists -(i.e. static initializers) when a list entry starts with an open -brace. These used to be recognized as brace-list-entry's. -c-electric-brace also recognizes brace-entry-open braces -(brace-list-entry's can no longer be electrified). - -*** New command c-indent-line-or-region, not bound by default. - -*** `#' is only electric when typed in the indentation of a line. - -*** Parentheses are now electric (via the new command c-electric-paren) -for auto-reindenting lines when parens are typed. - -*** In "gnu" style, inline-open offset is now set to zero. - -*** Uniform handling of the inclass syntactic symbol. The indentation -associated with it is now always relative to the class opening brace. -This means that the indentation behavior has changed in some -circumstances, but only if you've put anything besides 0 on the -class-open syntactic symbol (none of the default styles do that). - -** Gnus changes. - -*** New functionality for using Gnus as an offline newsreader has been -added. A plethora of new commands and modes have been added. See the -Gnus manual for the full story. - -*** The nndraft backend has returned, but works differently than -before. All Message buffers are now also articles in the nndraft -group, which is created automatically. - -*** `gnus-alter-header-function' can now be used to alter header -values. - -*** `gnus-summary-goto-article' now accept Message-ID's. - -*** A new Message command for deleting text in the body of a message -outside the region: `C-c C-v'. - -*** You can now post to component group in nnvirtual groups with -`C-u C-c C-c'. - -*** `nntp-rlogin-program' -- new variable to ease customization. - -*** `C-u C-c C-c' in `gnus-article-edit-mode' will now inhibit -re-highlighting of the article buffer. - -*** New element in `gnus-boring-article-headers' -- `long-to'. - -*** `M-i' symbolic prefix command. See the section "Symbolic -Prefixes" in the Gnus manual for details. - -*** `L' and `I' in the summary buffer now take the symbolic prefix -`a' to add the score rule to the "all.SCORE" file. - -*** `gnus-simplify-subject-functions' variable to allow greater -control over simplification. - -*** `A T' -- new command for fetching the current thread. - -*** `/ T' -- new command for including the current thread in the -limit. - -*** `M-RET' is a new Message command for breaking cited text. - -*** \\1-expressions are now valid in `nnmail-split-methods'. - -*** The `custom-face-lookup' function has been removed. -If you used this function in your initialization files, you must -rewrite them to use `face-spec-set' instead. - -*** Canceling now uses the current select method. Symbolic prefix -`a' forces normal posting method. - -*** New command to translate M******** sm*rtq**t*s into proper text --- `W d'. - -*** For easier debugging of nntp, you can set `nntp-record-commands' -to a non-nil value. - -*** nntp now uses ~/.authinfo, a .netrc-like file, for controlling -where and how to send AUTHINFO to NNTP servers. - -*** A command for editing group parameters from the summary buffer -has been added. - -*** A history of where mails have been split is available. - -*** A new article date command has been added -- `article-date-iso8601'. - -*** Subjects can be simplified when threading by setting -`gnus-score-thread-simplify'. - -*** A new function for citing in Message has been added -- -`message-cite-original-without-signature'. - -*** `article-strip-all-blank-lines' -- new article command. - -*** A new Message command to kill to the end of the article has -been added. - -*** A minimum adaptive score can be specified by using the -`gnus-adaptive-word-minimum' variable. - -*** The "lapsed date" article header can be kept continually -updated by the `gnus-start-date-timer' command. - -*** Web listserv archives can be read with the nnlistserv backend. - -*** Old dejanews archives can now be read by nnweb. - -*** `gnus-posting-styles' has been re-activated. - -** Changes to TeX and LaTeX mode - -*** The new variable `tex-start-options-string' can be used to give -options for the TeX run. The default value causes TeX to run in -nonstopmode. For an interactive TeX run set it to nil or "". - -*** The command `tex-feed-input' sends input to the Tex Shell. In a -TeX buffer it is bound to the keys C-RET, C-c RET, and C-c C-m (some -of these keys may not work on all systems). For instance, if you run -TeX interactively and if the TeX run stops because of an error, you -can continue it without leaving the TeX buffer by typing C-RET. - -*** The Tex Shell Buffer is now in `compilation-shell-minor-mode'. -All error-parsing commands of the Compilation major mode are available -but bound to keys that don't collide with the shell. Thus you can use -the Tex Shell for command line executions like a usual shell. - -*** The commands `tex-validate-region' and `tex-validate-buffer' check -the matching of braces and $'s. The errors are listed in a *Occur* -buffer and you can use C-c C-c or mouse-2 to go to a particular -mismatch. - -** Changes to RefTeX mode - -*** The table of contents buffer can now also display labels and -file boundaries in addition to sections. Use `l', `i', and `c' keys. - -*** Labels derived from context (the section heading) are now -lowercase by default. To make the label legal in LaTeX, latin-1 -characters will lose their accent. All Mule characters will be -removed from the label. - -*** The automatic display of cross reference information can also use -a window instead of the echo area. See variable `reftex-auto-view-crossref'. - -*** kpsewhich can be used by RefTeX to find TeX and BibTeX files. See the -customization group `reftex-finding-files'. - -*** The option `reftex-bibfile-ignore-list' has been renamed to -`reftex-bibfile-ignore-regexps' and indeed can be fed with regular -expressions. - -*** Multiple Selection buffers are now hidden buffers. - -** New/deleted modes and packages - -*** The package snmp-mode.el provides major modes for editing SNMP and -SNMPv2 MIBs. It has entries on `auto-mode-alist'. - -*** The package sql.el provides a major mode, M-x sql-mode, for -editing SQL files, and M-x sql-interactive-mode for interacting with -SQL interpreters. It has an entry on `auto-mode-alist'. - -*** ispell4.el has been deleted. It got in the way of ispell.el and -this was hard to fix reliably. It has long been obsolete -- use -Ispell 3.1 and ispell.el. - -* MS-DOS changes in Emacs 20.4 - -** Emacs compiled for MS-DOS now supports MULE features better. -This includes support for display of all ISO 8859-N character sets, -conversion to and from IBM codepage encoding of non-ASCII characters, -and automatic setup of the MULE environment at startup. For details, -check out the section `MS-DOS and MULE' in the manual. - -The MS-DOS installation procedure automatically configures and builds -Emacs with input method support if it finds an unpacked Leim -distribution when the config.bat script is run. - -** Formerly, the value of lpr-command did not affect printing on -MS-DOS unless print-region-function was set to nil, but now it -controls whether an external program is invoked or output is written -directly to a printer port. Similarly, in the previous version of -Emacs, the value of ps-lpr-command did not affect PostScript printing -on MS-DOS unless ps-printer-name was set to something other than a -string (eg. t or `pipe'), but now it controls whether an external -program is used. (These changes were made so that configuration of -printing variables would be almost identical across all platforms.) - -** In the previous version of Emacs, PostScript and non-PostScript -output was piped to external programs, but because most print programs -available for MS-DOS and MS-Windows cannot read data from their standard -input, on those systems the data to be output is now written to a -temporary file whose name is passed as the last argument to the external -program. - -An exception is made for `print', a standard program on Windows NT, -and `nprint', a standard program on Novell Netware. For both of these -programs, the command line is constructed in the appropriate syntax -automatically, using only the value of printer-name or ps-printer-name -as appropriate--the value of the relevant `-switches' variable is -ignored, as both programs have no useful switches. - -** The value of the variable dos-printer (cf. dos-ps-printer), if it has -a value, overrides the value of printer-name (cf. ps-printer-name), on -MS-DOS and MS-Windows only. This has been true since version 20.3, but -was not documented clearly before. - -** All the Emacs games now work on MS-DOS terminals. -This includes Tetris and Snake. - -* Lisp changes in Emacs 20.4 - -** New functions line-beginning-position and line-end-position -return the position of the beginning or end of the current line. -They both accept an optional argument, which has the same -meaning as the argument to beginning-of-line or end-of-line. - -** find-file and allied functions now have an optional argument -WILDCARD. If this is non-nil, they do wildcard processing, -and visit all files that match the wildcard pattern. - -** Changes in the file-attributes function. - -*** The file size returned by file-attributes may be an integer or a float. -It is an integer if the size fits in a Lisp integer, float otherwise. - -*** The inode number returned by file-attributes may be an integer (if -the number fits in a Lisp integer) or a cons cell containing two -integers. - -** The new function directory-files-and-attributes returns a list of -files in a directory and their attributes. It accepts the same -arguments as directory-files and has similar semantics, except that -file names and attributes are returned. - -** The new function file-attributes-lessp is a helper function for -sorting the list generated by directory-files-and-attributes. It -accepts two arguments, each a list of a file name and its attributes. -It compares the file names of each according to string-lessp and -returns the result. - -** The new function file-expand-wildcards expands a wildcard-pattern -to produce a list of existing files that match the pattern. - -** New functions for base64 conversion: - -The function base64-encode-region converts a part of the buffer -into the base64 code used in MIME. base64-decode-region -performs the opposite conversion. Line-breaking is supported -optionally. - -Functions base64-encode-string and base64-decode-string do a similar -job on the text in a string. They return the value as a new string. - -** -The new function process-running-child-p -will tell you if a subprocess has given control of its -terminal to its own child process. - -** interrupt-process and such functions have a new feature: -when the second argument is `lambda', they send a signal -to the running child of the subshell, if any, but if the shell -itself owns its terminal, no signal is sent. - -** There are new widget types `plist' and `alist' which can -be used for customizing variables whose values are plists or alists. - -** easymenu.el now understands `:key-sequence' and `:style button'. -:included is an alias for :visible. - -easy-menu-add-item now understands the values returned by -easy-menu-remove-item and easy-menu-item-present-p. This can be used -to move or copy menu entries. - -** Multibyte editing changes - -*** The definitions of sref and char-bytes are changed. Now, sref is -an alias of aref and char-bytes always returns 1. This change is to -make some Emacs Lisp code which works on 20.2 and earlier also -work on the latest Emacs. Such code uses a combination of sref and -char-bytes in a loop typically as below: - (setq char (sref str idx) - idx (+ idx (char-bytes idx))) -The byte-compiler now warns that this is obsolete. - -If you want to know how many bytes a specific multibyte character -(say, CH) occupies in a multibyte buffer, use this code: - (charset-bytes (char-charset ch)) - -*** In multibyte mode, when you narrow a buffer to some region, and the -region is preceded or followed by non-ASCII codes, inserting or -deleting at the head or the end of the region may signal this error: - - Byte combining across boundary of accessible buffer text inhibited - -This is to avoid some bytes being combined together into a character -across the boundary. - -*** The functions find-charset-region and find-charset-string include -`unknown' in the returned list in the following cases: - o The current buffer or the target string is unibyte and - contains 8-bit characters. - o The current buffer or the target string is multibyte and - contains invalid characters. - -*** The functions decode-coding-region and encode-coding-region remove -text properties of the target region. Ideally, they should correctly -preserve text properties, but for the moment, it's hard. Removing -text properties is better than preserving them in a less-than-correct -way. - -*** prefer-coding-system sets EOL conversion of default coding systems. -If the argument to prefer-coding-system specifies a certain type of -end of line conversion, the default coding systems set by -prefer-coding-system will specify that conversion type for end of line. - -*** The new function thai-compose-string can be used to properly -compose Thai characters in a string. - -** The primitive `define-prefix-command' now takes an optional third -argument NAME, which should be a string. It supplies the menu name -for the created keymap. Keymaps created in order to be displayed as -menus should always use the third argument. - -** The meanings of optional second arguments for read-char, -read-event, and read-char-exclusive are flipped. Now the second -arguments are INHERIT-INPUT-METHOD. These functions use the current -input method (if any) if and only if INHERIT-INPUT-METHOD is non-nil. - -** The new function clear-this-command-keys empties out the contents -of the vector that (this-command-keys) returns. This is useful in -programs that read passwords, to prevent the passwords from echoing -inadvertently as part of the next command in certain cases. - -** The new macro `with-temp-message' displays a temporary message in -the echo area, while executing some Lisp code. Like `progn', it -returns the value of the last form, but it also restores the previous -echo area contents. - - (with-temp-message MESSAGE &rest BODY) - -** The function `require' now takes an optional third argument -NOERROR. If it is non-nil, then there is no error if the -requested feature cannot be loaded. - -** In the function modify-face, an argument of (nil) for the -foreground color, background color or stipple pattern -means to clear out that attribute. - -** The `outer-window-id' frame property of an X frame -gives the window number of the outermost X window for the frame. - -** Temporary buffers made with with-output-to-temp-buffer are now -read-only by default, and normally use the major mode Help mode -unless you put them in some other non-Fundamental mode before the -end of with-output-to-temp-buffer. - -** The new functions gap-position and gap-size return information on -the gap of the current buffer. - -** The new functions position-bytes and byte-to-position provide a way -to convert between character positions and byte positions in the -current buffer. - -** vc.el defines two new macros, `edit-vc-file' and `with-vc-file', to -facilitate working with version-controlled files from Lisp programs. -These macros check out a given file automatically if needed, and check -it back in after any modifications have been made. - -* Installation Changes in Emacs 20.3 - -** The default value of load-path now includes most subdirectories of -the site-specific directories /usr/local/share/emacs/site-lisp and -/usr/local/share/emacs/VERSION/site-lisp, in addition to those -directories themselves. Both immediate subdirectories and -subdirectories multiple levels down are added to load-path. - -Not all subdirectories are included, though. Subdirectories whose -names do not start with a letter or digit are excluded. -Subdirectories named RCS or CVS are excluded. Also, a subdirectory -which contains a file named `.nosearch' is excluded. You can use -these methods to prevent certain subdirectories from being searched. - -Emacs finds these subdirectories and adds them to load-path when it -starts up. While it would be cleaner to find the subdirectories each -time Emacs loads a file, that would be much slower. - -This feature is an incompatible change. If you have stored some Emacs -Lisp files in a subdirectory of the site-lisp directory specifically -to prevent them from being used, you will need to rename the -subdirectory to start with a non-alphanumeric character, or create a -`.nosearch' file in it, in order to continue to achieve the desired -results. - -** Emacs no longer includes an old version of the C preprocessor from -GCC. This was formerly used to help compile Emacs with C compilers -that had limits on the significant length of an identifier, but in -fact we stopped supporting such compilers some time ago. - -* Changes in Emacs 20.3 - -** The new command C-x z (repeat) repeats the previous command -including its argument. If you repeat the z afterward, -it repeats the command additional times; thus, you can -perform many repetitions with one keystroke per repetition. - -** Emacs now supports "selective undo" which undoes only within a -specified region. To do this, set point and mark around the desired -region and type C-u C-x u (or C-u C-_). You can then continue undoing -further, within the same region, by repeating the ordinary undo -command C-x u or C-_. This will keep undoing changes that were made -within the region you originally specified, until either all of them -are undone, or it encounters a change which crosses the edge of that -region. - -In Transient Mark mode, undoing when a region is active requests -selective undo. - -** If you specify --unibyte when starting Emacs, then all buffers are -unibyte, except when a Lisp program specifically creates a multibyte -buffer. Setting the environment variable EMACS_UNIBYTE has the same -effect. The --no-unibyte option overrides EMACS_UNIBYTE and directs -Emacs to run normally in multibyte mode. - -The option --unibyte does not affect the reading of Emacs Lisp files, -though. If you want a Lisp file to be read in unibyte mode, use --*-unibyte: t;-*- on its first line. That will force Emacs to -load that file in unibyte mode, regardless of how Emacs was started. - -** toggle-enable-multibyte-characters no longer has a key binding and -no longer appears in the menu bar. We've realized that changing the -enable-multibyte-characters variable in an existing buffer is -something that most users not do. - -** You can specify a coding system to use for the next cut or paste -operations through the window system with the command C-x RET X. -The coding system can make a difference for communication with other -applications. - -C-x RET x specifies a coding system for all subsequent cutting and -pasting operations. - -** You can specify the printer to use for commands that do printing by -setting the variable `printer-name'. Just what a printer name looks -like depends on your operating system. You can specify a different -printer for the Postscript printing commands by setting -`ps-printer-name'. - -** Emacs now supports on-the-fly spell checking by the means of a -minor mode. It is called M-x flyspell-mode. You don't have to remember -any other special commands to use it, and you will hardly notice it -except when you make a spelling error. Flyspell works by highlighting -incorrect words as soon as they are completed or as soon as the cursor -hits a new word. - -Flyspell mode works with whichever dictionary you have selected for -Ispell in Emacs. In TeX mode, it understands TeX syntax so as not -to be confused by TeX commands. - -You can correct a misspelled word by editing it into something -correct. You can also correct it, or accept it as correct, by -clicking on the word with Mouse-2; that gives you a pop-up menu -of various alternative replacements and actions. - -Flyspell mode also proposes "automatic" corrections. M-TAB replaces -the current misspelled word with a possible correction. If several -corrections are made possible, M-TAB cycles through them in -alphabetical order, or in order of decreasing likelihood if -flyspell-sort-corrections is nil. - -Flyspell mode also flags an error when a word is repeated, if -flyspell-mark-duplications-flag is non-nil. - -** Changes in input method usage. - -Now you can use arrow keys (right, left, down, up) for selecting among -the alternatives just the same way as you do by C-f, C-b, C-n, and C-p -respectively. - -You can use the ENTER key to accept the current conversion. - -If you type TAB to display a list of alternatives, you can select one -of the alternatives with Mouse-2. - -The meaning of the variable `input-method-verbose-flag' is changed so -that you can set it to t, nil, `default', or `complex-only'. - - If the value is nil, extra guidance is never given. - - If the value is t, extra guidance is always given. - - If the value is `complex-only', extra guidance is always given only - when you are using complex input methods such as chinese-py. - - If the value is `default' (this is the default), extra guidance is - given in the following case: - o When you are using a complex input method. - o When you are using a simple input method but not in the minibuffer. - -If you are using Emacs through a very slow line, setting -input-method-verbose-flag to nil or to complex-only is a good choice, -and if you are using an input method you are not familiar with, -setting it to t is helpful. - -The old command select-input-method is now called set-input-method. - -In the language environment "Korean", you can use the following -keys: - Shift-SPC toggle-korean-input-method - C-F9 quail-hangul-switch-symbol-ksc - F9 quail-hangul-switch-hanja -These key bindings are canceled when you switch to another language -environment. - -** The minibuffer history of file names now records the specified file -names, not the entire minibuffer input. For example, if the -minibuffer starts out with /usr/foo/, you might type in /etc/passwd to -get - - /usr/foo//etc/passwd - -which stands for the file /etc/passwd. - -Formerly, this used to put /usr/foo//etc/passwd in the history list. -Now this puts just /etc/passwd in the history list. - -** If you are root, Emacs sets backup-by-copying-when-mismatch to t -at startup, so that saving a file will be sure to preserve -its owner and group. - -** find-func.el can now also find the place of definition of Emacs -Lisp variables in user-loaded libraries. - -** C-x r t (string-rectangle) now deletes the existing rectangle -contents before inserting the specified string on each line. - -** There is a new command delete-whitespace-rectangle -which deletes whitespace starting from a particular column -in all the lines on a rectangle. The column is specified -by the left edge of the rectangle. - -** You can now store a number into a register with C-u NUMBER C-x r n REG, -increment it by INC with C-u INC C-x r + REG (to increment by one, omit -C-u INC), and insert it in the buffer with C-x r g REG. This is useful -for writing keyboard macros. - -** The new command M-x speedbar displays a frame in which directories, -files, and tags can be displayed, manipulated, and jumped to. The -frame defaults to 20 characters in width, and is the same height as -the frame that it was started from. Some major modes define -additional commands for the speedbar, including Rmail, GUD/GDB, and -info. - -** query-replace-regexp is now bound to C-M-%. - -** In Transient Mark mode, when the region is active, M-x -query-replace and the other replace commands now operate on the region -contents only. - -** M-x write-region, when used interactively, now asks for -confirmation before overwriting an existing file. When you call -the function from a Lisp program, a new optional argument CONFIRM -says whether to ask for confirmation in this case. - -** If you use find-file-literally and the file is already visited -non-literally, the command asks you whether to revisit the file -literally. If you say no, it signals an error. - -** Major modes defined with the "derived mode" feature -now use the proper name for the mode hook: WHATEVER-mode-hook. -Formerly they used the name WHATEVER-mode-hooks, but that is -inconsistent with Emacs conventions. - -** shell-command-on-region (and shell-command) reports success or -failure if the command produces no output. - -** Set focus-follows-mouse to nil if your window system or window -manager does not transfer focus to another window when you just move -the mouse. - -** mouse-menu-buffer-maxlen has been renamed to -mouse-buffer-menu-maxlen to be consistent with the other related -function and variable names. - -** The new variable auto-coding-alist specifies coding systems for -reading specific files. This has higher priority than -file-coding-system-alist. - -** If you set the variable unibyte-display-via-language-environment to -t, then Emacs displays non-ASCII characters are displayed by -converting them to the equivalent multibyte characters according to -the current language environment. As a result, they are displayed -according to the current fontset. - -** C-q's handling of codes in the range 0200 through 0377 is changed. - -The codes in the range 0200 through 0237 are inserted as one byte of -that code regardless of the values of nonascii-translation-table and -nonascii-insert-offset. - -For the codes in the range 0240 through 0377, if -enable-multibyte-characters is non-nil and nonascii-translation-table -nor nonascii-insert-offset can't convert them to valid multibyte -characters, they are converted to Latin-1 characters. - -** If you try to find a file that is not read-accessible, you now get -an error, rather than an empty buffer and a warning. - -** In the minibuffer history commands M-r and M-s, an upper case -letter in the regular expression forces case-sensitive search. - -** In the *Help* buffer, cross-references to commands and variables -are inferred and hyperlinked. Use C-h m in Help mode for the relevant -command keys. - -** M-x apropos-command, with a prefix argument, no longer looks for -user option variables--instead it looks for noninteractive functions. - -Meanwhile, the command apropos-variable normally searches for -user option variables; with a prefix argument, it looks at -all variables that have documentation. - -** When you type a long line in the minibuffer, and the minibuffer -shows just one line, automatically scrolling works in a special way -that shows you overlap with the previous line of text. The variable -minibuffer-scroll-overlap controls how many characters of overlap -it should show; the default is 20. - -Meanwhile, Resize Minibuffer mode is still available; in that mode, -the minibuffer grows taller (up to a point) as needed to show the whole -of your input. - -** The new command M-x customize-changed-options lets you customize -all the options whose meanings or default values have changed in -recent Emacs versions. You specify a previous Emacs version number as -argument, and the command creates a customization buffer showing all -the customizable options which were changed since that version. -Newly added options are included as well. - -If you don't specify a particular version number argument, -then the customization buffer shows all the customizable options -for which Emacs versions of changes are recorded. - -This function is also bound to the Changed Options entry in the -Customize menu. - -** When you run M-x grep with a prefix argument, it figures out -the tag around point and puts that into the default grep command. - -** The new command M-* (pop-tag-mark) pops back through a history of -buffer positions from which M-. or other tag-finding commands were -invoked. - -** The new variable comment-padding specifies the number of spaces -that `comment-region' will insert before the actual text of the comment. -The default is 1. - -** In Fortran mode the characters `.', `_' and `$' now have symbol -syntax, not word syntax. Fortran mode now supports `imenu' and has -new commands fortran-join-line (M-^) and fortran-narrow-to-subprogram -(C-x n d). M-q can be used to fill a statement or comment block -sensibly. - -** GUD now supports jdb, the Java debugger, and pdb, the Python debugger. - -** If you set the variable add-log-keep-changes-together to a non-nil -value, the command `C-x 4 a' will automatically notice when you make -two entries in one day for one file, and combine them. - -** You can use the command M-x diary-mail-entries to mail yourself a -reminder about upcoming diary entries. See the documentation string -for a sample shell script for calling this function automatically -every night. - -** Desktop changes - -*** All you need to do to enable use of the Desktop package, is to set -the variable desktop-enable to t with Custom. - -*** Minor modes are now restored. Which minor modes are restored -and how modes are restored is controlled by `desktop-minor-mode-table'. - -** There is no need to do anything special, now, to enable Gnus to -read and post multi-lingual articles. - -** Outline mode has now support for showing hidden outlines when -doing an isearch. In order for this to happen search-invisible should -be set to open (the default). If an isearch match is inside a hidden -outline the outline is made visible. If you continue pressing C-s and -the match moves outside the formerly invisible outline, the outline is -made invisible again. - -** Mail reading and sending changes - -*** The Rmail e command now switches to displaying the whole header of -the message before it lets you edit the message. This is so that any -changes you make in the header will not be lost if you subsequently -toggle. - -*** The w command in Rmail, which writes the message body into a file, -now works in the summary buffer as well. (The command to delete the -summary buffer is now Q.) The default file name for the w command, if -the message has no subject, is stored in the variable -rmail-default-body-file. - -*** Most of the commands and modes that operate on mail and netnews no -longer depend on the value of mail-header-separator. Instead, they -handle whatever separator the buffer happens to use. - -*** If you set mail-signature to a value which is not t, nil, or a string, -it should be an expression. When you send a message, this expression -is evaluated to insert the signature. - -*** The new Lisp library feedmail.el (version 8) enhances processing of -outbound email messages. It works in coordination with other email -handling packages (e.g., rmail, VM, gnus) and is responsible for -putting final touches on messages and actually submitting them for -transmission. Users of the emacs program "fakemail" might be -especially interested in trying feedmail. - -feedmail is not enabled by default. See comments at the top of -feedmail.el for set-up instructions. Among the bigger features -provided by feedmail are: - -**** you can park outgoing messages into a disk-based queue and -stimulate sending some or all of them later (handy for laptop users); -there is also a queue for draft messages - -**** you can get one last look at the prepped outbound message and -be prompted for confirmation - -**** does smart filling of address headers - -**** can generate a MESSAGE-ID: line and a DATE: line; the date can be -the time the message was written or the time it is being sent; this -can make FCC copies more closely resemble copies that recipients get - -**** you can specify an arbitrary function for actually transmitting -the message; included in feedmail are interfaces for /bin/[r]mail, -/usr/lib/sendmail, and Emacs Lisp smtpmail; it's easy to write a new -function for something else (10-20 lines of Lisp code). - -** Dired changes - -*** The Dired function dired-do-toggle, which toggles marked and unmarked -files, is now bound to "t" instead of "T". - -*** dired-at-point has been added to ffap.el. It allows one to easily -run Dired on the directory name at point. - -*** Dired has a new command: %g. It searches the contents of -files in the directory and marks each file that contains a match -for a specified regexp. - -** VC Changes - -*** New option vc-ignore-vc-files lets you turn off version control -conveniently. - -*** VC Dired has been completely rewritten. It is now much -faster, especially for CVS, and works very similar to ordinary -Dired. - -VC Dired is invoked by typing C-x v d and entering the name of the -directory to display. By default, VC Dired gives you a recursive -listing of all files at or below the given directory which are -currently locked (for CVS, all files not up-to-date are shown). - -You can change the listing format by setting vc-dired-recurse to nil, -then it shows only the given directory, and you may also set -vc-dired-terse-display to nil, then it shows all files under version -control plus the names of any subdirectories, so that you can type `i' -on such lines to insert them manually, as in ordinary Dired. - -All Dired commands operate normally in VC Dired, except for `v', which -is redefined as the version control prefix. That means you may type -`v l', `v =' etc. to invoke `vc-print-log', `vc-diff' and the like on -the file named in the current Dired buffer line. `v v' invokes -`vc-next-action' on this file, or on all files currently marked. - -The new command `v t' (vc-dired-toggle-terse-mode) allows you to -toggle between terse display (only locked files) and full display (all -VC files plus subdirectories). There is also a special command, -`* l', to mark all files currently locked. - -Giving a prefix argument to C-x v d now does the same thing as in -ordinary Dired: it allows you to supply additional options for the ls -command in the minibuffer, to fine-tune VC Dired's output. - -*** Under CVS, if you merge changes from the repository into a working -file, and CVS detects conflicts, VC now offers to start an ediff -session to resolve them. - -Alternatively, you can use the new command `vc-resolve-conflicts' to -resolve conflicts in a file at any time. It works in any buffer that -contains conflict markers as generated by rcsmerge (which is what CVS -uses as well). - -*** You can now transfer changes between branches, using the new -command vc-merge (C-x v m). It is implemented for RCS and CVS. When -you invoke it in a buffer under version-control, you can specify -either an entire branch or a pair of versions, and the changes on that -branch or between the two versions are merged into the working file. -If this results in any conflicts, they may be resolved interactively, -using ediff. - -** Changes in Font Lock - -*** The face and variable previously known as font-lock-reference-face -are now called font-lock-constant-face to better reflect their typical -use for highlighting constants and labels. (Its face properties are -unchanged.) The variable font-lock-reference-face remains for now for -compatibility reasons, but its value is font-lock-constant-face. - -** Frame name display changes - -*** The command set-frame-name lets you set the name of the current -frame. You can use the new command select-frame-by-name to select and -raise a frame; this is mostly useful on character-only terminals, or -when many frames are invisible or iconified. - -*** On character-only terminal (not a window system), changing the -frame name is now reflected on the mode line and in the Buffers/Frames -menu. - -** Comint (subshell) changes - -*** In Comint modes, the commands to kill, stop or interrupt a -subjob now also kill pending input. This is for compatibility -with ordinary shells, where the signal characters do this. - -*** There are new commands in Comint mode. - -C-c C-x fetches the "next" line from the input history; -that is, the line after the last line you got. -You can use this command to fetch successive lines, one by one. - -C-c SPC accumulates lines of input. More precisely, it arranges to -send the current line together with the following line, when you send -the following line. - -C-c C-a if repeated twice consecutively now moves to the process mark, -which separates the pending input from the subprocess output and the -previously sent input. - -C-c M-r now runs comint-previous-matching-input-from-input; -it searches for a previous command, using the current pending input -as the search string. - -*** New option compilation-scroll-output can be set to scroll -automatically in compilation-mode windows. - -** C mode changes - -*** Multiline macros are now handled, both as they affect indentation, -and as recognized syntax. New syntactic symbol cpp-macro-cont is -assigned to second and subsequent lines of a multiline macro -definition. - -*** A new style "user" which captures all non-hook-ified -(i.e. top-level) .emacs file variable settings and customizations. -Style "cc-mode" is an alias for "user" and is deprecated. "gnu" -style is still the default however. - -*** "java" style now conforms to Sun's JDK coding style. - -*** There are new commands c-beginning-of-defun, c-end-of-defun which -are alternatives which you could bind to C-M-a and C-M-e if you prefer -them. They do not have key bindings by default. - -*** New and improved implementations of M-a (c-beginning-of-statement) -and M-e (c-end-of-statement). - -*** C++ namespace blocks are supported, with new syntactic symbols -namespace-open, namespace-close, and innamespace. - -*** File local variable settings of c-file-style and c-file-offsets -makes the style variables local to that buffer only. - -*** New indentation functions c-lineup-close-paren, -c-indent-one-line-block, c-lineup-dont-change. - -*** Improvements (hopefully!) to the way CC Mode is loaded. You -should now be able to do a (require 'cc-mode) to get the entire -package loaded properly for customization in your .emacs file. A new -variable c-initialize-on-load controls this and is t by default. - -** Changes to hippie-expand. - -*** New customization variable `hippie-expand-dabbrev-skip-space'. If -non-nil, trailing spaces may be included in the abbreviation to search for, -which then gives the same behavior as the original `dabbrev-expand'. - -*** New customization variable `hippie-expand-dabbrev-as-symbol'. If -non-nil, characters of syntax '_' is considered part of the word when -expanding dynamically. - -*** New customization variable `hippie-expand-no-restriction'. If -non-nil, narrowed buffers are widened before they are searched. - -*** New customization variable `hippie-expand-only-buffers'. If -non-empty, buffers searched are restricted to the types specified in -this list. Useful for example when constructing new special-purpose -expansion functions with `make-hippie-expand-function'. - -*** Text properties of the expansion are no longer copied. - -** Changes in BibTeX mode. - -*** Any titleword matching a regexp in the new variable -bibtex-autokey-titleword-ignore (case sensitive) is ignored during -automatic key generation. This replaces variable -bibtex-autokey-titleword-first-ignore, which only checked for matches -against the first word in the title. - -*** Autokey generation now uses all words from the title, not just -capitalized words. To avoid conflicts with existing customizations, -bibtex-autokey-titleword-ignore is set up such that words starting with -lowerkey characters will still be ignored. Thus, if you want to use -lowercase words from the title, you will have to overwrite the -bibtex-autokey-titleword-ignore standard setting. - -*** Case conversion of names and title words for automatic key -generation is more flexible. Variable bibtex-autokey-preserve-case is -replaced by bibtex-autokey-titleword-case-convert and -bibtex-autokey-name-case-convert. - -** Changes in vcursor.el. - -*** Support for character terminals is available: there is a new keymap -and the vcursor will appear as an arrow between buffer text. A -variable `vcursor-interpret-input' allows input from the vcursor to be -entered exactly as if typed. Numerous functions, including -`vcursor-compare-windows', have been rewritten to improve consistency -in the selection of windows and corresponding keymaps. - -*** vcursor options can now be altered with M-x customize under the -Editing group once the package is loaded. - -*** Loading vcursor now does not define keys by default, as this is -generally a bad side effect. Use M-x customize to set -vcursor-key-bindings to t to restore the old behavior. - -*** vcursor-auto-disable can be `copy', which turns off copying from the -vcursor, but doesn't disable it, after any non-vcursor command. - -** Ispell changes. - -*** You can now spell check comments and strings in the current -buffer with M-x ispell-comments-and-strings. Comments and strings -are identified by syntax tables in effect. - -*** Generic region skipping implemented. -A single buffer can be broken into a number of regions where text will -and will not be checked. The definitions of the regions can be user -defined. New applications and improvements made available by this -include: - - o URLs are automatically skipped - o EMail message checking is vastly improved. - -*** Ispell can highlight the erroneous word even on non-window terminals. - -** Changes to RefTeX mode - -RefTeX has been updated in order to make it more usable with very -large projects (like a several volume math book). The parser has been -re-written from scratch. To get maximum speed from RefTeX, check the -section `Optimizations' in the manual. - -*** New recursive parser. - -The old version of RefTeX created a single large buffer containing the -entire multifile document in order to parse the document. The new -recursive parser scans the individual files. - -*** Parsing only part of a document. - -Reparsing of changed document parts can now be made faster by enabling -partial scans. To use this feature, read the documentation string of -the variable `reftex-enable-partial-scans' and set the variable to t. - - (setq reftex-enable-partial-scans t) - -*** Storing parsing information in a file. - -This can improve startup times considerably. To turn it on, use - - (setq reftex-save-parse-info t) - -*** Using multiple selection buffers - -If the creation of label selection buffers is too slow (this happens -for large documents), you can reuse these buffers by setting - - (setq reftex-use-multiple-selection-buffers t) - -*** References to external documents. - -The LaTeX package `xr' allows to cross-reference labels in external -documents. RefTeX can provide information about the external -documents as well. To use this feature, set up the \externaldocument -macros required by the `xr' package and rescan the document with -RefTeX. The external labels can then be accessed with the `x' key in -the selection buffer provided by `reftex-reference' (bound to `C-c )'). -The `x' key also works in the table of contents buffer. - -*** Many more labeled LaTeX environments are recognized by default. - -The built-in command list now covers all the standard LaTeX commands, -and all of the major packages included in the LaTeX distribution. - -Also, RefTeX now understands the \appendix macro and changes -the enumeration of sections in the *toc* buffer accordingly. - -*** Mouse support for selection and *toc* buffers - -The mouse can now be used to select items in the selection and *toc* -buffers. See also the new option `reftex-highlight-selection'. - -*** New keymaps for selection and table of contents modes. - -The selection processes for labels and citation keys, and the table of -contents buffer now have their own keymaps: `reftex-select-label-map', -`reftex-select-bib-map', `reftex-toc-map'. The selection processes -have a number of new keys predefined. In particular, TAB lets you -enter a label with completion. Check the on-the-fly help (press `?' -at the selection prompt) or read the Info documentation to find out -more. - -*** Support for the varioref package - -The `v' key in the label selection buffer toggles \ref versus \vref. - -*** New hooks - -Three new hooks can be used to redefine the way labels, references, -and citations are created. These hooks are -`reftex-format-label-function', `reftex-format-ref-function', -`reftex-format-cite-function'. - -*** Citations outside LaTeX - -The command `reftex-citation' may also be used outside LaTeX (e.g. in -a mail buffer). See the Info documentation for details. - -*** Short context is no longer fontified. - -The short context in the label menu no longer copies the -fontification from the text in the buffer. If you prefer it to be -fontified, use - - (setq reftex-refontify-context t) - -** file-cache-minibuffer-complete now accepts a prefix argument. -With a prefix argument, it does not try to do completion of -the file name within its directory; it only checks for other -directories that contain the same file name. - -Thus, given the file name Makefile, and assuming that a file -Makefile.in exists in the same directory, ordinary -file-cache-minibuffer-complete will try to complete Makefile to -Makefile.in and will therefore never look for other directories that -have Makefile. A prefix argument tells it not to look for longer -names such as Makefile.in, so that instead it will look for other -directories--just as if the name were already complete in its present -directory. - -** New modes and packages - -*** There is a new alternative major mode for Perl, Cperl mode. -It has many more features than Perl mode, and some people prefer -it, but some do not. - -*** There is a new major mode, M-x vhdl-mode, for editing files of VHDL -code. - -*** M-x which-function-mode enables a minor mode that displays the -current function name continuously in the mode line, as you move -around in a buffer. - -Which Function mode is effective in major modes which support Imenu. - -*** Gametree is a major mode for editing game analysis trees. The author -uses it for keeping notes about his postal Chess games, but it should -be helpful for other two-player games as well, as long as they have an -established system of notation similar to Chess. - -*** The new minor mode checkdoc-minor-mode provides Emacs Lisp -documentation string checking for style and spelling. The style -guidelines are found in the Emacs Lisp programming manual. - -*** The net-utils package makes some common networking features -available in Emacs. Some of these functions are wrappers around -system utilities (ping, nslookup, etc.); others are implementations of -simple protocols (finger, whois) in Emacs Lisp. There are also -functions to make simple connections to TCP/IP ports for debugging and -the like. - -*** highlight-changes-mode is a minor mode that uses colors to -identify recently changed parts of the buffer text. - -*** The new package `midnight' lets you specify things to be done -within Emacs at midnight--by default, kill buffers that you have not -used in a considerable time. To use this feature, customize -the user option `midnight-mode' to t. - -*** The file generic-x.el defines a number of simple major modes. - - apache-generic-mode: For Apache and NCSA httpd configuration files - samba-generic-mode: Samba configuration files - fvwm-generic-mode: For fvwm initialization files - x-resource-generic-mode: For X resource files - hosts-generic-mode: For hosts files (.rhosts, /etc/hosts, etc.) - mailagent-rules-generic-mode: For mailagent .rules files - javascript-generic-mode: For JavaScript files - vrml-generic-mode: For VRML files - java-manifest-generic-mode: For Java MANIFEST files - java-properties-generic-mode: For Java property files - mailrc-generic-mode: For .mailrc files - - Platform-specific modes: - - prototype-generic-mode: For Solaris/Sys V prototype files - pkginfo-generic-mode: For Solaris/Sys V pkginfo files - alias-generic-mode: For C shell alias files - inf-generic-mode: For MS-Windows INF files - ini-generic-mode: For MS-Windows INI files - reg-generic-mode: For MS-Windows Registry files - bat-generic-mode: For MS-Windows BAT scripts - rc-generic-mode: For MS-Windows Resource files - rul-generic-mode: For InstallShield scripts - -* Lisp changes in Emacs 20.3 since the Emacs Lisp Manual was published - -** If you want a Lisp file to be read in unibyte mode, -use -*-unibyte: t;-*- on its first line. -That will force Emacs to read that file in unibyte mode. -Otherwise, the file will be loaded and byte-compiled in multibyte mode. - -Thus, each lisp file is read in a consistent way regardless of whether -you started Emacs with --unibyte, so that a Lisp program gives -consistent results regardless of how Emacs was started. - -** The new function assoc-default is useful for searching an alist, -and using a default value if the key is not found there. You can -specify a comparison predicate, so this function is useful for -searching comparing a string against an alist of regular expressions. - -** The functions unibyte-char-to-multibyte and -multibyte-char-to-unibyte convert between unibyte and multibyte -character codes, in a way that is appropriate for the current language -environment. - -** The functions read-event, read-char and read-char-exclusive now -take two optional arguments. PROMPT, if non-nil, specifies a prompt -string. SUPPRESS-INPUT-METHOD, if non-nil, says to disable the -current input method for reading this one event. - -** Two new variables print-escape-nonascii and print-escape-multibyte -now control whether to output certain characters as -backslash-sequences. print-escape-nonascii applies to single-byte -non-ASCII characters; print-escape-multibyte applies to multibyte -characters. Both of these variables are used only when printing -in readable fashion (prin1 uses them, princ does not). - -* Lisp changes in Emacs 20.3 before the Emacs Lisp Manual was published - -** Compiled Emacs Lisp files made with the modified "MBSK" version -of Emacs 20.2 do not work in Emacs 20.3. - -** Buffer positions are now measured in characters, as they were -in Emacs 19 and before. This means that (forward-char 1) -always increases point by 1. - -The function chars-in-region now just subtracts its arguments. It is -considered obsolete. The function char-boundary-p has been deleted. - -See below for additional changes relating to multibyte characters. - -** defcustom, defface and defgroup now accept the keyword `:version'. -Use this to specify in which version of Emacs a certain variable's -default value changed. For example, - - (defcustom foo-max 34 "*Maximum number of foo's allowed." - :type 'integer - :group 'foo - :version "20.3") - - (defgroup foo-group nil "The foo group." - :version "20.3") - -If an entire new group is added or the variables in it have the -default values changed, then just add a `:version' to that group. It -is recommended that new packages added to the distribution contain a -`:version' in the top level group. - -This information is used to control the customize-changed-options command. - -** It is now an error to change the value of a symbol whose name -starts with a colon--if it is interned in the standard obarray. - -However, setting such a symbol to its proper value, which is that -symbol itself, is not an error. This is for the sake of programs that -support previous Emacs versions by explicitly setting these variables -to themselves. - -If you set the variable keyword-symbols-constant-flag to nil, -this error is suppressed, and you can set these symbols to any -values whatever. - -** There is a new debugger command, R. -It evaluates an expression like e, but saves the result -in the buffer *Debugger-record*. - -** Frame-local variables. - -You can now make a variable local to various frames. To do this, call -the function make-variable-frame-local; this enables frames to have -local bindings for that variable. - -These frame-local bindings are actually frame parameters: you create a -frame-local binding in a specific frame by calling -modify-frame-parameters and specifying the variable name as the -parameter name. - -Buffer-local bindings take precedence over frame-local bindings. -Thus, if the current buffer has a buffer-local binding, that binding is -active; otherwise, if the selected frame has a frame-local binding, -that binding is active; otherwise, the default binding is active. - -It would not be hard to implement window-local bindings, but it is not -clear that this would be very useful; windows tend to come and go in a -very transitory fashion, so that trying to produce any specific effect -through a window-local binding would not be very robust. - -** `sregexq' and `sregex' are two new functions for constructing -"symbolic regular expressions." These are Lisp expressions that, when -evaluated, yield conventional string-based regexps. The symbolic form -makes it easier to construct, read, and maintain complex patterns. -See the documentation in sregex.el. - -** parse-partial-sexp's return value has an additional element which -is used to pass information along if you pass it to another call to -parse-partial-sexp, starting its scan where the first call ended. -The contents of this field are not yet finalized. - -** eval-region now accepts a fourth optional argument READ-FUNCTION. -If it is non-nil, that function is used instead of `read'. - -** unload-feature by default removes the feature's functions from -known hooks to avoid trouble, but a package providing FEATURE can -define a hook FEATURE-unload-hook to be run by unload-feature instead. - -** read-from-minibuffer no longer returns the argument DEFAULT-VALUE -when the user enters empty input. It now returns the null string, as -it did in Emacs 19. The default value is made available in the -history via M-n, but it is not applied here as a default. - -The other, more specialized minibuffer-reading functions continue to -return the default value (not the null string) when the user enters -empty input. - -** The new variable read-buffer-function controls which routine to use -for selecting buffers. For example, if you set this variable to -`iswitchb-read-buffer', iswitchb will be used to read buffer names. -Other functions can also be used if they accept the same arguments as -`read-buffer' and return the selected buffer name as a string. - -** The new function read-passwd reads a password from the terminal, -echoing a period for each character typed. It takes three arguments: -a prompt string, a flag which says "read it twice to make sure", and a -default password to use if the user enters nothing. - -** The variable fill-nobreak-predicate gives major modes a way to -specify not to break a line at certain places. Its value is a -function which is called with no arguments, with point located at the -place where a break is being considered. If the function returns -non-nil, then the line won't be broken there. - -** window-end now takes an optional second argument, UPDATE. -If this is non-nil, then the function always returns an accurate -up-to-date value for the buffer position corresponding to the -end of the window, even if this requires computation. - -** other-buffer now takes an optional argument FRAME -which specifies which frame's buffer list to use. -If it is nil, that means use the selected frame's buffer list. - -** The new variable buffer-display-time, always local in every buffer, -holds the value of (current-time) as of the last time that a window -was directed to display this buffer. - -** It is now meaningful to compare two window-configuration objects -with `equal'. Two window-configuration objects are equal if they -describe equivalent arrangements of windows, in the same frame--in -other words, if they would give the same results if passed to -set-window-configuration. - -** compare-window-configurations is a new function that compares two -window configurations loosely. It ignores differences in saved buffer -positions and scrolling, and considers only the structure and sizes of -windows and the choice of buffers to display. - -** The variable minor-mode-overriding-map-alist allows major modes to -override the key bindings of a minor mode. The elements of this alist -look like the elements of minor-mode-map-alist: (VARIABLE . KEYMAP). - -If the VARIABLE in an element of minor-mode-overriding-map-alist has a -non-nil value, the paired KEYMAP is active, and totally overrides the -map (if any) specified for the same variable in minor-mode-map-alist. - -minor-mode-overriding-map-alist is automatically local in all buffers, -and it is meant to be set by major modes. - -** The function match-string-no-properties is like match-string -except that it discards all text properties from the result. - -** The function load-average now accepts an optional argument -USE-FLOATS. If it is non-nil, the load average values are returned as -floating point numbers, rather than as integers to be divided by 100. - -** The new variable temporary-file-directory specifies the directory -to use for creating temporary files. The default value is determined -in a reasonable way for your operating system; on GNU and Unix systems -it is based on the TMP and TMPDIR environment variables. - -** Menu changes - -*** easymenu.el now uses the new menu item format and supports the -keywords :visible and :filter. The existing keyword :keys is now -better supported. - -The variable `easy-menu-precalculate-equivalent-keybindings' controls -a new feature which calculates keyboard equivalents for the menu when -you define the menu. The default is t. If you rarely use menus, you -can set the variable to nil to disable this precalculation feature; -then the calculation is done only if you use the menu bar. - -*** A new format for menu items is supported. - -In a keymap, a key binding that has the format - (STRING . REAL-BINDING) or (STRING HELP-STRING . REAL-BINDING) -defines a menu item. Now a menu item definition may also be a list that -starts with the symbol `menu-item'. - -The format is: - (menu-item ITEM-NAME) or - (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) -where ITEM-NAME is an expression which evaluates to the menu item -string, and ITEM-PROPERTY-LIST has the form of a property list. -The supported properties include - -:enable FORM Evaluate FORM to determine whether the - item is enabled. -:visible FORM Evaluate FORM to determine whether the - item should appear in the menu. -:filter FILTER-FN - FILTER-FN is a function of one argument, - which will be REAL-BINDING. - It should return a binding to use instead. -:keys DESCRIPTION - DESCRIPTION is a string that describes an equivalent keyboard - binding for REAL-BINDING. DESCRIPTION is expanded with - `substitute-command-keys' before it is used. -:key-sequence KEY-SEQUENCE - KEY-SEQUENCE is a key-sequence for an equivalent - keyboard binding. -:key-sequence nil - This means that the command normally has no - keyboard equivalent. -:help HELP HELP is the extra help string (not currently used). -:button (TYPE . SELECTED) - TYPE is :toggle or :radio. - SELECTED is a form, to be evaluated, and its - value says whether this button is currently selected. - -Buttons are at the moment only simulated by prefixes in the menu. -Eventually ordinary X-buttons may be supported. - -(menu-item ITEM-NAME) defines unselectable item. - -** New event types - -*** The new event type `mouse-wheel' is generated by a wheel on a -mouse (such as the MS Intellimouse). The event contains a delta that -corresponds to the amount and direction that the wheel is rotated, -which is typically used to implement a scroll or zoom. The format is: - - (mouse-wheel POSITION DELTA) - -where POSITION is a list describing the position of the event in the -same format as a mouse-click event, and DELTA is a signed number -indicating the number of increments by which the wheel was rotated. A -negative DELTA indicates that the wheel was rotated backwards, towards -the user, and a positive DELTA indicates that the wheel was rotated -forward, away from the user. - -As of now, this event type is generated only on MS Windows. - -*** The new event type `drag-n-drop' is generated when a group of -files is selected in an application outside of Emacs, and then dragged -and dropped onto an Emacs frame. The event contains a list of -filenames that were dragged and dropped, which are then typically -loaded into Emacs. The format is: - - (drag-n-drop POSITION FILES) - -where POSITION is a list describing the position of the event in the -same format as a mouse-click event, and FILES is the list of filenames -that were dragged and dropped. - -As of now, this event type is generated only on MS Windows. - -** Changes relating to multibyte characters. - -*** The variable enable-multibyte-characters is now read-only; -any attempt to set it directly signals an error. The only way -to change this value in an existing buffer is with set-buffer-multibyte. - -*** In a string constant, `\ ' now stands for "nothing at all". You -can use it to terminate a hex escape which is followed by a character -that could otherwise be read as part of the hex escape. - -*** String indices are now measured in characters, as they were -in Emacs 19 and before. - -The function chars-in-string has been deleted. -The function concat-chars has been renamed to `string'. - -*** The function set-buffer-multibyte sets the flag in the current -buffer that says whether the buffer uses multibyte representation or -unibyte representation. If the argument is nil, it selects unibyte -representation. Otherwise it selects multibyte representation. - -This function does not change the contents of the buffer, viewed -as a sequence of bytes. However, it does change the contents -viewed as characters; a sequence of two bytes which is treated as -one character when the buffer uses multibyte representation -will count as two characters using unibyte representation. - -This function sets enable-multibyte-characters to record which -representation is in use. It also adjusts various data in the buffer -(including its markers, overlays and text properties) so that they are -consistent with the new representation. - -*** string-make-multibyte takes a string and converts it to multibyte -representation. Most of the time, you don't need to care -about the representation, because Emacs converts when necessary; -however, it makes a difference when you compare strings. - -The conversion of non-ASCII characters works by adding the value of -nonascii-insert-offset to each character, or by translating them -using the table nonascii-translation-table. - -*** string-make-unibyte takes a string and converts it to unibyte -representation. Most of the time, you don't need to care about the -representation, but it makes a difference when you compare strings. - -The conversion from multibyte to unibyte representation -loses information; the only time Emacs performs it automatically -is when inserting a multibyte string into a unibyte buffer. - -*** string-as-multibyte takes a string, and returns another string -which contains the same bytes, but treats them as multibyte. - -*** string-as-unibyte takes a string, and returns another string -which contains the same bytes, but treats them as unibyte. - -*** The new function compare-strings lets you compare -portions of two strings. Unibyte strings are converted to multibyte, -so that a unibyte string can match a multibyte string. -You can specify whether to ignore case or not. - -*** assoc-ignore-case now uses compare-strings so that -it can treat unibyte and multibyte strings as equal. - -*** Regular expression operations and buffer string searches now -convert the search pattern to multibyte or unibyte to accord with the -buffer or string being searched. - -One consequence is that you cannot always use \200-\377 inside of -[...] to match all non-ASCII characters. This does still work when -searching or matching a unibyte buffer or string, but not when -searching or matching a multibyte string. Unfortunately, there is no -obvious choice of syntax to use within [...] for that job. But, what -you want is just to match all non-ASCII characters, the regular -expression [^\0-\177] works for it. - -*** Structure of coding system changed. - -All coding systems (including aliases and subsidiaries) are named -by symbols; the symbol's `coding-system' property is a vector -which defines the coding system. Aliases share the same vector -as the principal name, so that altering the contents of this -vector affects the principal name and its aliases. You can define -your own alias name of a coding system by the function -define-coding-system-alias. - -The coding system definition includes a property list of its own. Use -the new functions `coding-system-get' and `coding-system-put' to -access such coding system properties as post-read-conversion, -pre-write-conversion, character-translation-table-for-decode, -character-translation-table-for-encode, mime-charset, and -safe-charsets. For instance, (coding-system-get 'iso-latin-1 -'mime-charset) gives the corresponding MIME-charset parameter -`iso-8859-1'. - -Among the coding system properties listed above, safe-charsets is new. -The value of this property is a list of character sets which this -coding system can correctly encode and decode. For instance: -(coding-system-get 'iso-latin-1 'safe-charsets) => (ascii latin-iso8859-1) - -Here, "correctly encode" means that the encoded character sets can -also be handled safely by systems other than Emacs as far as they -are capable of that coding system. Though, Emacs itself can encode -the other character sets and read it back correctly. - -*** The new function select-safe-coding-system can be used to find a -proper coding system for encoding the specified region or string. -This function requires a user interaction. - -*** The new functions find-coding-systems-region and -find-coding-systems-string are helper functions used by -select-safe-coding-system. They return a list of all proper coding -systems to encode a text in some region or string. If you don't want -a user interaction, use one of these functions instead of -select-safe-coding-system. - -*** The explicit encoding and decoding functions, such as -decode-coding-region and encode-coding-string, now set -last-coding-system-used to reflect the actual way encoding or decoding -was done. - -*** The new function detect-coding-with-language-environment can be -used to detect a coding system of text according to priorities of -coding systems used by some specific language environment. - -*** The functions detect-coding-region and detect-coding-string always -return a list if the arg HIGHEST is nil. Thus, if only ASCII -characters are found, they now return a list of single element -`undecided' or its subsidiaries. - -*** The new functions coding-system-change-eol-conversion and -coding-system-change-text-conversion can be used to get a different -coding system than what specified only in how end-of-line or text is -converted. - -*** The new function set-selection-coding-system can be used to set a -coding system for communicating with other X clients. - -*** The function `map-char-table' now passes as argument only valid -character codes, plus generic characters that stand for entire -character sets or entire subrows of a character set. In other words, -each time `map-char-table' calls its FUNCTION argument, the key value -either will be a valid individual character code, or will stand for a -range of characters. - -*** The new function `char-valid-p' can be used for checking whether a -Lisp object is a valid character code or not. - -*** The new function `charset-after' returns a charset of a character -in the current buffer at position POS. - -*** Input methods are now implemented using the variable -input-method-function. If this is non-nil, its value should be a -function; then, whenever Emacs reads an input event that is a printing -character with no modifier bits, it calls that function, passing the -event as an argument. Often this function will read more input, first -binding input-method-function to nil. - -The return value should be a list of the events resulting from input -method processing. These events will be processed sequentially as -input, before resorting to unread-command-events. Events returned by -the input method function are not passed to the input method function, -not even if they are printing characters with no modifier bits. - -The input method function is not called when reading the second and -subsequent events of a key sequence. - -*** You can customize any language environment by using -set-language-environment-hook and exit-language-environment-hook. - -The hook `exit-language-environment-hook' should be used to undo -customizations that you made with set-language-environment-hook. For -instance, if you set up a special key binding for a specific language -environment by set-language-environment-hook, you should set up -exit-language-environment-hook to restore the normal key binding. - -* Changes in Emacs 20.1 - -** Emacs has a new facility for customization of its many user -options. It is called M-x customize. With this facility you can look -at the many user options in an organized way; they are grouped into a -tree structure. - -M-x customize also knows what sorts of values are legitimate for each -user option and ensures that you don't use invalid values. - -With M-x customize, you can set options either for the present Emacs -session or permanently. (Permanent settings are stored automatically -in your .emacs file.) - -** Scroll bars are now on the left side of the window. -You can change this with M-x customize-option scroll-bar-mode. - -** The mode line no longer includes the string `Emacs'. -This makes more space in the mode line for other information. - -** When you select a region with the mouse, it is highlighted -immediately afterward. At that time, if you type the DELETE key, it -kills the region. - -The BACKSPACE key, and the ASCII character DEL, do not do this; they -delete the character before point, as usual. - -** In an incremental search the whole current match is highlighted -on terminals which support this. (You can disable this feature -by setting search-highlight to nil.) - -** In the minibuffer, in some cases, you can now use M-n to -insert the default value into the minibuffer as text. In effect, -the default value (if the minibuffer routines know it) is tacked -onto the history "in the future". (The more normal use of the -history list is to use M-p to insert minibuffer input used in the -past.) - -** In Text mode, now only blank lines separate paragraphs. -This makes it possible to get the full benefit of Adaptive Fill mode -in Text mode, and other modes derived from it (such as Mail mode). -TAB in Text mode now runs the command indent-relative; this -makes a practical difference only when you use indented paragraphs. - -As a result, the old Indented Text mode is now identical to Text mode, -and is an alias for it. - -If you want spaces at the beginning of a line to start a paragraph, -use the new mode, Paragraph Indent Text mode. - -** Scrolling changes - -*** Scroll commands to scroll a whole screen now preserve the screen -position of the cursor, if scroll-preserve-screen-position is non-nil. - -In this mode, if you scroll several screens back and forth, finishing -on the same screen where you started, the cursor goes back to the line -where it started. - -*** If you set scroll-conservatively to a small number, then when you -move point a short distance off the screen, Emacs will scroll the -screen just far enough to bring point back on screen, provided that -does not exceed `scroll-conservatively' lines. - -*** The new variable scroll-margin says how close point can come to the -top or bottom of a window. It is a number of screen lines; if point -comes within that many lines of the top or bottom of the window, Emacs -recenters the window. - -** International character set support (MULE) - -Emacs now supports a wide variety of international character sets, -including European variants of the Latin alphabet, as well as Chinese, -Devanagari (Hindi and Marathi), Ethiopian, Greek, IPA, Japanese, -Korean, Lao, Russian, Thai, Tibetan, and Vietnamese scripts. These -features have been merged from the modified version of Emacs known as -MULE (for "MULti-lingual Enhancement to GNU Emacs") - -Users of these scripts have established many more-or-less standard -coding systems for storing files. Emacs uses a single multibyte -character encoding within Emacs buffers; it can translate from a wide -variety of coding systems when reading a file and can translate back -into any of these coding systems when saving a file. - -Keyboards, even in the countries where these character sets are used, -generally don't have keys for all the characters in them. So Emacs -supports various "input methods", typically one for each script or -language, to make it possible to type them. - -The Emacs internal multibyte encoding represents a non-ASCII -character as a sequence of bytes in the range 0200 through 0377. - -The new prefix key C-x RET is used for commands that pertain -to multibyte characters, coding systems, and input methods. - -You can disable multibyte character support as follows: - - (setq-default enable-multibyte-characters nil) - -Calling the function standard-display-european turns off multibyte -characters, unless you specify a non-nil value for the second -argument, AUTO. This provides compatibility for people who are -already using standard-display-european to continue using unibyte -characters for their work until they want to change. - -*** Input methods - -An input method is a kind of character conversion which is designed -specifically for interactive input. In Emacs, typically each language -has its own input method (though sometimes several languages which use -the same characters can share one input method). Some languages -support several input methods. - -The simplest kind of input method works by mapping ASCII letters into -another alphabet. This is how the Greek and Russian input methods -work. - -A more powerful technique is composition: converting sequences of -characters into one letter. Many European input methods use -composition to produce a single non-ASCII letter from a sequence which -consists of a letter followed by diacritics. For example, a' is one -sequence of two characters that might be converted into a single -letter. - -The input methods for syllabic scripts typically use mapping followed -by conversion. The input methods for Thai and Korean work this way. -First, letters are mapped into symbols for particular sounds or tone -marks; then, sequences of these which make up a whole syllable are -mapped into one syllable sign--most often a "composite character". - -None of these methods works very well for Chinese and Japanese, so -they are handled specially. First you input a whole word using -phonetic spelling; then, after the word is in the buffer, Emacs -converts it into one or more characters using a large dictionary. - -Since there is more than one way to represent a phonetically spelled -word using Chinese characters, Emacs can only guess which one to use; -typically these input methods give you a way to say "guess again" if -the first guess is wrong. - -*** The command C-x RET m (toggle-enable-multibyte-characters) -turns multibyte character support on or off for the current buffer. - -If multibyte character support is turned off in a buffer, then each -byte is a single character, even codes 0200 through 0377--exactly as -they did in Emacs 19.34. This includes the features for support for -the European characters, ISO Latin-1 and ISO Latin-2. - -However, there is no need to turn off multibyte character support to -use ISO Latin-1 or ISO Latin-2; the Emacs multibyte character set -includes all the characters in these character sets, and Emacs can -translate automatically to and from either one. - -*** Visiting a file in unibyte mode. - -Turning off multibyte character support in the buffer after visiting a -file with multibyte code conversion will display the multibyte -sequences already in the buffer, byte by byte. This is probably not -what you want. - -If you want to edit a file of unibyte characters (Latin-1, for -example), you can do it by specifying `no-conversion' as the coding -system when reading the file. This coding system also turns off -multibyte characters in that buffer. - -If you turn off multibyte character support entirely, this turns off -character conversion as well. - -*** Displaying international characters on X Windows. - -A font for X typically displays just one alphabet or script. -Therefore, displaying the entire range of characters Emacs supports -requires using many fonts. - -Therefore, Emacs now supports "fontsets". Each fontset is a -collection of fonts, each assigned to a range of character codes. - -A fontset has a name, like a font. Individual fonts are defined by -the X server; fontsets are defined within Emacs itself. But once you -have defined a fontset, you can use it in a face or a frame just as -you would use a font. - -If a fontset specifies no font for a certain character, or if it -specifies a font that does not exist on your system, then it cannot -display that character. It will display an empty box instead. - -The fontset height and width are determined by the ASCII characters -(that is, by the font in the fontset which is used for ASCII -characters). - -*** Defining fontsets. - -Emacs does not use any fontset by default. Its default font is still -chosen as in previous versions. You can tell Emacs to use a fontset -with the `-fn' option or the `Font' X resource. - -Emacs creates a standard fontset automatically according to the value -of standard-fontset-spec. This fontset's short name is -`fontset-standard'. Bold, italic, and bold-italic variants of the -standard fontset are created automatically. - -If you specify a default ASCII font with the `Font' resource or `-fn' -argument, a fontset is generated from it. This works by replacing the -FOUNDARY, FAMILY, ADD_STYLE, and AVERAGE_WIDTH fields of the font name -with `*' then using this to specify a fontset. This fontset's short -name is `fontset-startup'. - -Emacs checks resources of the form Fontset-N where N is 0, 1, 2... -The resource value should have this form: - FONTSET-NAME, [CHARSET-NAME:FONT-NAME]... -FONTSET-NAME should have the form of a standard X font name, except: - * most fields should be just the wild card "*". - * the CHARSET_REGISTRY field should be "fontset" - * the CHARSET_ENCODING field can be any nickname of the fontset. -The construct CHARSET-NAME:FONT-NAME can be repeated any number -of times; each time specifies the font for one character set. -CHARSET-NAME should be the name of a character set, and FONT-NAME -should specify an actual font to use for that character set. - -Each of these fontsets has an alias which is made from the -last two font name fields, CHARSET_REGISTRY and CHARSET_ENCODING. -You can refer to the fontset by that alias or by its full name. - -For any character sets that you don't mention, Emacs tries to choose a -font by substituting into FONTSET-NAME. For instance, with the -following resource, - Emacs*Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24 -the font for ASCII is generated as below: - -*-fixed-medium-r-normal-*-24-*-ISO8859-1 -Here is the substitution rule: - Change CHARSET_REGISTRY and CHARSET_ENCODING to that of the charset - defined in the variable x-charset-registries. For instance, ASCII has - the entry (ascii . "ISO8859-1") in this variable. Then, reduce - sequences of wild cards -*-...-*- with a single wildcard -*-. - (This is to prevent use of auto-scaled fonts.) - -The function which processes the fontset resource value to create the -fontset is called create-fontset-from-fontset-spec. You can also call -that function explicitly to create a fontset. - -With the X resource Emacs.Font, you can specify a fontset name just -like an actual font name. But be careful not to specify a fontset -name in a wildcard resource like Emacs*Font--that tries to specify the -fontset for other purposes including menus, and they cannot handle -fontsets. - -*** The command M-x set-language-environment sets certain global Emacs -defaults for a particular choice of language. - -Selecting a language environment typically specifies a default input -method and which coding systems to recognize automatically when -visiting files. However, it does not try to reread files you have -already visited; the text in those buffers is not affected. The -language environment may also specify a default choice of coding -system for new files that you create. - -It makes no difference which buffer is current when you use -set-language-environment, because these defaults apply globally to the -whole Emacs session. - -For example, M-x set-language-environment RET Latin-1 RET -chooses the Latin-1 character set. In the .emacs file, you can do this -with (set-language-environment "Latin-1"). - -*** The command C-x RET f (set-buffer-file-coding-system) -specifies the file coding system for the current buffer. This -specifies what sort of character code translation to do when saving -the file. As an argument, you must specify the name of one of the -coding systems that Emacs supports. - -*** The command C-x RET c (universal-coding-system-argument) -lets you specify a coding system when you read or write a file. -This command uses the minibuffer to read a coding system name. -After you exit the minibuffer, the specified coding system -is used for *the immediately following command*. - -So if the immediately following command is a command to read or -write a file, it uses the specified coding system for that file. - -If the immediately following command does not use the coding system, -then C-x RET c ultimately has no effect. - -For example, C-x RET c iso-8859-1 RET C-x C-f temp RET -visits the file `temp' treating it as ISO Latin-1. - -*** You can specify the coding system for a file using the -*- -construct. Include `coding: CODINGSYSTEM;' inside the -*-...-*- -to specify use of coding system CODINGSYSTEM. You can also -specify the coding system in a local variable list at the end -of the file. - -*** The command C-x RET t (set-terminal-coding-system) specifies -the coding system for terminal output. If you specify a character -code for terminal output, all characters output to the terminal are -translated into that character code. - -This feature is useful for certain character-only terminals built in -various countries to support the languages of those countries. - -By default, output to the terminal is not translated at all. - -*** The command C-x RET k (set-keyboard-coding-system) specifies -the coding system for keyboard input. - -Character code translation of keyboard input is useful for terminals -with keys that send non-ASCII graphic characters--for example, -some terminals designed for ISO Latin-1 or subsets of it. - -By default, keyboard input is not translated at all. - -Character code translation of keyboard input is similar to using an -input method, in that both define sequences of keyboard input that -translate into single characters. However, input methods are designed -to be convenient for interactive use, while the code translations are -designed to work with terminals. - -*** The command C-x RET p (set-buffer-process-coding-system) -specifies the coding system for input and output to a subprocess. -This command applies to the current buffer; normally, each subprocess -has its own buffer, and thus you can use this command to specify -translation to and from a particular subprocess by giving the command -in the corresponding buffer. - -By default, process input and output are not translated at all. - -*** The variable file-name-coding-system specifies the coding system -to use for encoding file names before operating on them. -It is also used for decoding file names obtained from the system. - -*** The command C-\ (toggle-input-method) activates or deactivates -an input method. If no input method has been selected before, the -command prompts for you to specify the language and input method you -want to use. - -C-u C-\ (select-input-method) lets you switch to a different input -method. C-h C-\ (or C-h I) describes the current input method. - -*** Some input methods remap the keyboard to emulate various keyboard -layouts commonly used for particular scripts. How to do this -remapping properly depends on your actual keyboard layout. To specify -which layout your keyboard has, use M-x quail-set-keyboard-layout. - -*** The command C-h C (describe-coding-system) displays -the coding systems currently selected for various purposes, plus -related information. - -*** The command C-h h (view-hello-file) displays a file called -HELLO, which has examples of text in many languages, using various -scripts. - -*** The command C-h L (describe-language-support) displays -information about the support for a particular language. -You specify the language as an argument. - -*** The mode line now contains a letter or character that identifies -the coding system used in the visited file. It normally follows the -first dash. - -A dash indicates the default state of affairs: no code conversion -(except CRLF => newline if appropriate). `=' means no conversion -whatsoever. The ISO 8859 coding systems are represented by digits -1 through 9. Other coding systems are represented by letters: - - A alternativnyj (Russian) - B big5 (Chinese) - C cn-gb-2312 (Chinese) - C iso-2022-cn (Chinese) - D in-is13194-devanagari (Indian languages) - E euc-japan (Japanese) - I iso-2022-cjk or iso-2022-ss2 (Chinese, Japanese, Korean) - J junet (iso-2022-7) or old-jis (iso-2022-jp-1978-irv) (Japanese) - K euc-korea (Korean) - R koi8 (Russian) - Q tibetan - S shift_jis (Japanese) - T lao - T tis620 (Thai) - V viscii or vscii (Vietnamese) - i iso-2022-lock (Chinese, Japanese, Korean) - k iso-2022-kr (Korean) - v viqr (Vietnamese) - z hz (Chinese) - -When you are using a character-only terminal (not a window system), -two additional characters appear in between the dash and the file -coding system. These two characters describe the coding system for -keyboard input, and the coding system for terminal output. - -*** The new variable rmail-file-coding-system specifies the code -conversion to use for RMAIL files. The default value is nil. - -When you read mail with Rmail, each message is decoded automatically -into Emacs' internal format. This has nothing to do with -rmail-file-coding-system. That variable controls reading and writing -Rmail files themselves. - -*** The new variable sendmail-coding-system specifies the code -conversion for outgoing mail. The default value is nil. - -Actually, there are three different ways of specifying the coding system -for sending mail: - -- If you use C-x RET f in the mail buffer, that takes priority. -- Otherwise, if you set sendmail-coding-system non-nil, that specifies it. -- Otherwise, the default coding system for new files is used, - if that is non-nil. That comes from your language environment. -- Otherwise, Latin-1 is used. - -*** The command C-h t (help-with-tutorial) accepts a prefix argument -to specify the language for the tutorial file. Currently, English, -Japanese, Korean and Thai are supported. We welcome additional -translations. - -** An easy new way to visit a file with no code or format conversion -of any kind: Use M-x find-file-literally. There is also a command -insert-file-literally which inserts a file into the current buffer -without any conversion. - -** C-q's handling of octal character codes is changed. -You can now specify any number of octal digits. -RET terminates the digits and is discarded; -any other non-digit terminates the digits and is then used as input. - -** There are new commands for looking up Info documentation for -functions, variables and file names used in your programs. - -Type M-x info-lookup-symbol to look up a symbol in the buffer at point. -Type M-x info-lookup-file to look up a file in the buffer at point. - -Precisely which Info files are used to look it up depends on the major -mode. For example, in C mode, the GNU libc manual is used. - -** M-TAB in most programming language modes now runs the command -complete-symbol. This command performs completion on the symbol name -in the buffer before point. - -With a numeric argument, it performs completion based on the set of -symbols documented in the Info files for the programming language that -you are using. - -With no argument, it does completion based on the current tags tables, -just like the old binding of M-TAB (complete-tag). - -** File locking works with NFS now. - -The lock file for FILENAME is now a symbolic link named .#FILENAME, -in the same directory as FILENAME. - -This means that collision detection between two different machines now -works reasonably well; it also means that no file server or directory -can become a bottleneck. - -The new method does have drawbacks. It means that collision detection -does not operate when you edit a file in a directory where you cannot -create new files. Collision detection also doesn't operate when the -file server does not support symbolic links. But these conditions are -rare, and the ability to have collision detection while using NFS is -so useful that the change is worth while. - -When Emacs or a system crashes, this may leave behind lock files which -are stale. So you may occasionally get warnings about spurious -collisions. When you determine that the collision is spurious, just -tell Emacs to go ahead anyway. - -** If you wish to use Show Paren mode to display matching parentheses, -it is no longer sufficient to load paren.el. Instead you must call -show-paren-mode. - -** If you wish to use Delete Selection mode to replace a highlighted -selection when you insert new text, it is no longer sufficient to load -delsel.el. Instead you must call the function delete-selection-mode. - -** If you wish to use Partial Completion mode to complete partial words -within symbols or filenames, it is no longer sufficient to load -complete.el. Instead you must call the function partial-completion-mode. - -** If you wish to use uniquify to rename buffers for you, -it is no longer sufficient to load uniquify.el. You must also -set uniquify-buffer-name-style to one of the non-nil legitimate values. - -** Changes in View mode. - -*** Several new commands are available in View mode. -Do H in view mode for a list of commands. - -*** There are two new commands for entering View mode: -view-file-other-frame and view-buffer-other-frame. - -*** Exiting View mode does a better job of restoring windows to their -previous state. - -*** New customization variable view-scroll-auto-exit. If non-nil, -scrolling past end of buffer makes view mode exit. - -*** New customization variable view-exits-all-viewing-windows. If -non-nil, view-mode will at exit restore all windows viewing buffer, -not just the selected window. - -*** New customization variable view-read-only. If non-nil, visiting a -read-only file automatically enters View mode, and toggle-read-only -turns View mode on or off. - -*** New customization variable view-remove-frame-by-deleting controls -how to remove a not needed frame at view mode exit. If non-nil, -delete the frame, if nil make an icon of it. - -** C-x v l, the command to print a file's version control log, -now positions point at the entry for the file's current branch version. - -** C-x v =, the command to compare a file with the last checked-in version, -has a new feature. If the file is currently not locked, so that it is -presumably identical to the last checked-in version, the command now asks -which version to compare with. - -** When using hideshow.el, incremental search can temporarily show hidden -blocks if a match is inside the block. - -The block is hidden again if the search is continued and the next match -is outside the block. By customizing the variable -isearch-hide-immediately you can choose to hide all the temporarily -shown blocks only when exiting from incremental search. - -By customizing the variable hs-isearch-open you can choose what kind -of blocks to temporarily show during isearch: comment blocks, code -blocks, all of them or none. - -** The new command C-x 4 0 (kill-buffer-and-window) kills the -current buffer and deletes the selected window. It asks for -confirmation first. - -** C-x C-w, which saves the buffer into a specified file name, -now changes the major mode according to that file name. -However, the mode will not be changed if -(1) a local variables list or the `-*-' line specifies a major mode, or -(2) the current major mode is a "special" mode, - not suitable for ordinary files, or -(3) the new file name does not particularly specify any mode. - -This applies to M-x set-visited-file-name as well. - -However, if you set change-major-mode-with-file-name to nil, then -these commands do not change the major mode. - -** M-x occur changes. - -*** If the argument to M-x occur contains upper case letters, -it performs a case-sensitive search. - -*** In the *Occur* buffer made by M-x occur, -if you type g or M-x revert-buffer, this repeats the search -using the same regular expression and the same buffer as before. - -** In Transient Mark mode, the region in any one buffer is highlighted -in just one window at a time. At first, it is highlighted in the -window where you set the mark. The buffer's highlighting remains in -that window unless you select to another window which shows the same -buffer--then the highlighting moves to that window. - -** The feature to suggest key bindings when you use M-x now operates -after the command finishes. The message suggesting key bindings -appears temporarily in the echo area. The previous echo area contents -come back after a few seconds, in case they contain useful information. - -** Each frame now independently records the order for recently -selected buffers, so that the default for C-x b is now based on the -buffers recently selected in the selected frame. - -** Outline mode changes. - -*** Outline mode now uses overlays (this is the former noutline.el). - -*** Incremental searches skip over invisible text in Outline mode. - -** When a minibuffer window is active but not the selected window, if -you try to use the minibuffer, you used to get a nested minibuffer. -Now, this not only gives an error, it also cancels the minibuffer that -was already active. - -The motive for this change is so that beginning users do not -unknowingly move away from minibuffers, leaving them active, and then -get confused by it. - -If you want to be able to have recursive minibuffers, you must -set enable-recursive-minibuffers to non-nil. - -** Changes in dynamic abbrevs. - -*** Expanding dynamic abbrevs with M-/ is now smarter about case -conversion. If the expansion has mixed case not counting the first -character, and the abbreviation matches the beginning of the expansion -including case, then the expansion is copied verbatim. - -The expansion is also copied verbatim if the abbreviation itself has -mixed case. And using SPC M-/ to copy an additional word always -copies it verbatim except when the previous copied word is all caps. - -*** The values of `dabbrev-case-replace' and `dabbrev-case-fold-search' -are no longer Lisp expressions. They have simply three possible -values. - -`dabbrev-case-replace' has these three values: nil (don't preserve -case), t (do), or `case-replace' (do like M-x query-replace). -`dabbrev-case-fold-search' has these three values: nil (don't ignore -case), t (do), or `case-fold-search' (do like search). - -** Minibuffer history lists are truncated automatically now to a -certain length. The variable history-length specifies how long they -can be. The default value is 30. - -** Changes in Mail mode. - -*** The key C-x m no longer runs the `mail' command directly. -Instead, it runs the command `compose-mail', which invokes the mail -composition mechanism you have selected with the variable -`mail-user-agent'. The default choice of user agent is -`sendmail-user-agent', which gives behavior compatible with the old -behavior. - -C-x 4 m now runs compose-mail-other-window, and C-x 5 m runs -compose-mail-other-frame. - -*** While composing a reply to a mail message, from Rmail, you can use -the command C-c C-r to cite just the region from the message you are -replying to. This copies the text which is the selected region in the -buffer that shows the original message. - -*** The command C-c C-i inserts a file at the end of the message, -with separator lines around the contents. - -*** The command M-x expand-mail-aliases expands all mail aliases -in suitable mail headers. Emacs automatically extracts mail alias -definitions from your mail alias file (e.g., ~/.mailrc). You do not -need to expand mail aliases yourself before sending mail. - -*** New features in the mail-complete command. - -**** The mail-complete command now inserts the user's full name, -for local users or if that is known. The variable mail-complete-style -controls the style to use, and whether to do this at all. -Its values are like those of mail-from-style. - -**** The variable mail-passwd-command lets you specify a shell command -to run to fetch a set of password-entries that add to the ones in -/etc/passwd. - -**** The variable mail-passwd-file now specifies a list of files to read -to get the list of user ids. By default, one file is used: -/etc/passwd. - -** You can "quote" a file name to inhibit special significance of -special syntax, by adding `/:' to the beginning. Thus, if you have a -directory named `/foo:', you can prevent it from being treated as a -reference to a remote host named `foo' by writing it as `/:/foo:'. - -Emacs uses this new construct automatically when necessary, such as -when you start it with a working directory whose name might otherwise -be taken to be magic. - -** There is a new command M-x grep-find which uses find to select -files to search through, and grep to scan them. The output is -available in a Compile mode buffer, as with M-x grep. - -M-x grep now uses the -e option if the grep program supports that. -(-e prevents problems if the search pattern starts with a dash.) - -** In Dired, the & command now flags for deletion the files whose names -suggest they are probably not needed in the long run. - -In Dired, * is now a prefix key for mark-related commands. - -new key dired.el binding old key -------- ---------------- ------- - * c dired-change-marks c - * m dired-mark m - * * dired-mark-executables * (binding deleted) - * / dired-mark-directories / (binding deleted) - * @ dired-mark-symlinks @ (binding deleted) - * u dired-unmark u - * DEL dired-unmark-backward DEL - * ? dired-unmark-all-files C-M-? - * ! dired-unmark-all-marks - * % dired-mark-files-regexp % m - * C-n dired-next-marked-file M-} - * C-p dired-prev-marked-file M-{ - -** Rmail changes. - -*** When Rmail cannot convert your incoming mail into Babyl format, it -saves the new mail in the file RMAILOSE.n, where n is an integer -chosen to make a unique name. This way, Rmail will not keep crashing -each time you run it. - -*** In Rmail, the variable rmail-summary-line-count-flag now controls -whether to include the line count in the summary. Non-nil means yes. - -*** In Rmail summary buffers, d and C-d (the commands to delete -messages) now take repeat counts as arguments. A negative argument -means to move in the opposite direction. - -*** In Rmail, the t command now takes an optional argument which lets -you specify whether to show the message headers in full or pruned. - -*** In Rmail, the new command w (rmail-output-body-to-file) writes -just the body of the current message into a file, without the headers. -It takes the file name from the message subject, by default, but you -can edit that file name in the minibuffer before it is actually used -for output. - -** Gnus changes. - -*** nntp.el has been totally rewritten in an asynchronous fashion. - -*** Article prefetching functionality has been moved up into -Gnus. - -*** Scoring can now be performed with logical operators like -`and', `or', `not', and parent redirection. - -*** Article washing status can be displayed in the -article mode line. - -*** gnus.el has been split into many smaller files. - -*** Suppression of duplicate articles based on Message-ID. - -(setq gnus-suppress-duplicates t) - -*** New variables for specifying what score and adapt files -are to be considered home score and adapt files. See -`gnus-home-score-file' and `gnus-home-adapt-files'. - -*** Groups can inherit group parameters from parent topics. - -*** Article editing has been revamped and is now usable. - -*** Signatures can be recognized in more intelligent fashions. -See `gnus-signature-separator' and `gnus-signature-limit'. - -*** Summary pick mode has been made to look more nn-like. -Line numbers are displayed and the `.' command can be -used to pick articles. - -*** Commands for moving the .newsrc.eld from one server to -another have been added. - - `M-x gnus-change-server' - -*** A way to specify that "uninteresting" fields be suppressed when -generating lines in buffers. - -*** Several commands in the group buffer can be undone with -`C-M-_'. - -*** Scoring can be done on words using the new score type `w'. - -*** Adaptive scoring can be done on a Subject word-by-word basis: - - (setq gnus-use-adaptive-scoring '(word)) - -*** Scores can be decayed. - - (setq gnus-decay-scores t) - -*** Scoring can be performed using a regexp on the Date header. The -Date is normalized to compact ISO 8601 format first. - -*** A new command has been added to remove all data on articles from -the native server. - - `M-x gnus-group-clear-data-on-native-groups' - -*** A new command for reading collections of documents -(nndoc with nnvirtual on top) has been added -- `C-M-d'. - -*** Process mark sets can be pushed and popped. - -*** A new mail-to-news backend makes it possible to post -even when the NNTP server doesn't allow posting. - -*** A new backend for reading searches from Web search engines -(DejaNews, Alta Vista, InReference) has been added. - - Use the `G w' command in the group buffer to create such - a group. - -*** Groups inside topics can now be sorted using the standard -sorting functions, and each topic can be sorted independently. - - See the commands under the `T S' submap. - -*** Subsets of the groups can be sorted independently. - - See the commands under the `G P' submap. - -*** Cached articles can be pulled into the groups. - - Use the `Y c' command. - -*** Score files are now applied in a more reliable order. - -*** Reports on where mail messages end up can be generated. - - `M-x nnmail-split-history' - -*** More hooks and functions have been added to remove junk -from incoming mail before saving the mail. - - See `nnmail-prepare-incoming-header-hook'. - -*** The nnml mail backend now understands compressed article files. - -*** To enable Gnus to read/post multi-lingual articles, you must execute -the following code, for instance, in your .emacs. - - (add-hook 'gnus-startup-hook 'gnus-mule-initialize) - -Then, when you start Gnus, it will decode non-ASCII text automatically -and show appropriate characters. (Note: if you are using gnus-mime -from the SEMI package, formerly known as TM, you should NOT add this -hook to gnus-startup-hook; gnus-mime has its own method of handling -this issue.) - -Since it is impossible to distinguish all coding systems -automatically, you may need to specify a choice of coding system for a -particular news group. This can be done by: - - (gnus-mule-add-group NEWSGROUP 'CODING-SYSTEM) - -Here NEWSGROUP should be a string which names a newsgroup or a tree -of newsgroups. If NEWSGROUP is "XXX.YYY", all news groups under -"XXX.YYY" (including "XXX.YYY.ZZZ") will use the specified coding -system. CODING-SYSTEM specifies which coding system to use (for both -for reading and posting). - -CODING-SYSTEM can also be a cons cell of the form - (READ-CODING-SYSTEM . POST-CODING-SYSTEM) -Then READ-CODING-SYSTEM is used when you read messages from the -newsgroups, while POST-CODING-SYSTEM is used when you post messages -there. - -Emacs knows the right coding systems for certain newsgroups by -default. Here are some of these default settings: - - (gnus-mule-add-group "fj" 'iso-2022-7) - (gnus-mule-add-group "alt.chinese.text" 'hz-gb-2312) - (gnus-mule-add-group "alt.hk" 'hz-gb-2312) - (gnus-mule-add-group "alt.chinese.text.big5" 'cn-big5) - (gnus-mule-add-group "soc.culture.vietnamese" '(nil . viqr)) - -When you reply by mail to an article, these settings are ignored; -the mail is encoded according to sendmail-coding-system, as usual. - -** CC mode changes. - -*** If you edit primarily one style of C (or C++, Objective-C, Java) -code, you may want to make the CC Mode style variables have global -values so that you can set them directly in your .emacs file. To do -this, set c-style-variables-are-local-p to nil in your .emacs file. -Note that this only takes effect if you do it *before* cc-mode.el is -loaded. - -If you typically edit more than one style of C (or C++, Objective-C, -Java) code in a single Emacs session, you may want to make the CC Mode -style variables have buffer local values. By default, all buffers -share the same style variable settings; to make them buffer local, set -c-style-variables-are-local-p to t in your .emacs file. Note that you -must do this *before* CC Mode is loaded. - -*** The new variable c-indentation-style holds the C style name -of the current buffer. - -*** The variable c-block-comments-indent-p has been deleted, because -it is no longer necessary. C mode now handles all the supported styles -of block comments, with no need to say which one you will use. - -*** There is a new indentation style "python", which specifies the C -style that the Python developers like. - -*** There is a new c-cleanup-list option: brace-elseif-brace. -This says to put ...} else if (...) {... on one line, -just as brace-else-brace says to put ...} else {... on one line. - -** VC Changes [new] - -*** In vc-retrieve-snapshot (C-x v r), if you don't specify a snapshot -name, it retrieves the *latest* versions of all files in the current -directory and its subdirectories (aside from files already locked). - -This feature is useful if your RCS directory is a link to a common -master directory, and you want to pick up changes made by other -developers. - -You can do the same thing for an individual file by typing C-u C-x C-q -RET in a buffer visiting that file. - -*** VC can now handle files under CVS that are being "watched" by -other developers. Such files are made read-only by CVS. To get a -writable copy, type C-x C-q in a buffer visiting such a file. VC then -calls "cvs edit", which notifies the other developers of it. - -*** vc-version-diff (C-u C-x v =) now suggests reasonable defaults for -version numbers, based on the current state of the file. - -** Calendar changes. - -*** A new function, list-holidays, allows you list holidays or -subclasses of holidays for ranges of years. Related menu items allow -you do this for the year of the selected date, or the -following/previous years. - -*** There is now support for the Baha'i calendar system. Use `pb' in -the *Calendar* buffer to display the current Baha'i date. The Baha'i -calendar, or "Badi calendar" is a system of 19 months with 19 days -each, and 4 intercalary days (5 during a Gregorian leap year). The -calendar begins May 23, 1844, with each of the months named after a -supposed attribute of God. - -** ps-print changes - -There are some new user variables and subgroups for customizing the page -layout. - -*** Headers & Footers (subgroup) - -Some printer systems print a header page and force the first page to -be printed on the back of the header page when using duplex. If your -printer system has this behavior, set variable -`ps-banner-page-when-duplexing' to t. - -If variable `ps-banner-page-when-duplexing' is non-nil, it prints a -blank page as the very first printed page. So, it behaves as if the -very first character of buffer (or region) were a form feed ^L (\014). - -The variable `ps-spool-config' specifies who is responsible for -setting duplex mode and page size. Valid values are: - - lpr-switches duplex and page size are configured by `ps-lpr-switches'. - Don't forget to set `ps-lpr-switches' to select duplex - printing for your printer. - - setpagedevice duplex and page size are configured by ps-print using the - setpagedevice PostScript operator. - - nil duplex and page size are configured by ps-print *not* using - the setpagedevice PostScript operator. - -The variable `ps-spool-tumble' specifies how the page images on -opposite sides of a sheet are oriented with respect to each other. If -`ps-spool-tumble' is nil, ps-print produces output suitable for -bindings on the left or right. If `ps-spool-tumble' is non-nil, -ps-print produces output suitable for bindings at the top or bottom. -This variable takes effect only if `ps-spool-duplex' is non-nil. -The default value is nil. - -The variable `ps-header-frame-alist' specifies a header frame -properties alist. Valid frame properties are: - - fore-color Specify the foreground frame color. - Value should be a float number between 0.0 (black - color) and 1.0 (white color), or a string which is a - color name, or a list of 3 float numbers which - correspond to the Red Green Blue color scale, each - float number between 0.0 (dark color) and 1.0 (bright - color). The default is 0 ("black"). - - back-color Specify the background frame color (similar to fore-color). - The default is 0.9 ("gray90"). - - shadow-color Specify the shadow color (similar to fore-color). - The default is 0 ("black"). - - border-color Specify the border color (similar to fore-color). - The default is 0 ("black"). - - border-width Specify the border width. - The default is 0.4. - -Any other property is ignored. - -Don't change this alist directly; instead use Custom, or the -`ps-value', `ps-get', `ps-put' and `ps-del' functions (see there for -documentation). - -Ps-print can also print footers. The footer variables are: -`ps-print-footer', `ps-footer-offset', `ps-print-footer-frame', -`ps-footer-font-family', `ps-footer-font-size', `ps-footer-line-pad', -`ps-footer-lines', `ps-left-footer', `ps-right-footer' and -`ps-footer-frame-alist'. These variables are similar to those -controlling headers. - -*** Color management (subgroup) - -If `ps-print-color-p' is non-nil, the buffer's text will be printed in -color. - -*** Face Management (subgroup) - -If you need to print without worrying about face background colors, -set the variable `ps-use-face-background' which specifies if face -background should be used. Valid values are: - - t always use face background color. - nil never use face background color. - (face...) list of faces whose background color will be used. - -*** N-up printing (subgroup) - -The variable `ps-n-up-printing' specifies the number of pages per -sheet of paper. - -The variable `ps-n-up-margin' specifies the margin in points (pt) -between the sheet border and the n-up printing. - -If variable `ps-n-up-border-p' is non-nil, a border is drawn around -each page. - -The variable `ps-n-up-filling' specifies how the page matrix is filled -on each sheet of paper. Following are the valid values for -`ps-n-up-filling' with a filling example using a 3x4 page matrix: - - `left-top' 1 2 3 4 `left-bottom' 9 10 11 12 - 5 6 7 8 5 6 7 8 - 9 10 11 12 1 2 3 4 - - `right-top' 4 3 2 1 `right-bottom' 12 11 10 9 - 8 7 6 5 8 7 6 5 - 12 11 10 9 4 3 2 1 - - `top-left' 1 4 7 10 `bottom-left' 3 6 9 12 - 2 5 8 11 2 5 8 11 - 3 6 9 12 1 4 7 10 - - `top-right' 10 7 4 1 `bottom-right' 12 9 6 3 - 11 8 5 2 11 8 5 2 - 12 9 6 3 10 7 4 1 - -Any other value is treated as `left-top'. - -*** Zebra stripes (subgroup) - -The variable `ps-zebra-color' controls the zebra stripes grayscale or -RGB color. - -The variable `ps-zebra-stripe-follow' specifies how zebra stripes -continue on next page. Visually, valid values are (the character `+' -to the right of each column indicates that a line is printed): - - `nil' `follow' `full' `full-follow' - Current Page -------- ----------- --------- ---------------- - 1 XXXXX + 1 XXXXXXXX + 1 XXXXXX + 1 XXXXXXXXXXXXX + - 2 XXXXX + 2 XXXXXXXX + 2 XXXXXX + 2 XXXXXXXXXXXXX + - 3 XXXXX + 3 XXXXXXXX + 3 XXXXXX + 3 XXXXXXXXXXXXX + - 4 + 4 + 4 + 4 + - 5 + 5 + 5 + 5 + - 6 + 6 + 6 + 6 + - 7 XXXXX + 7 XXXXXXXX + 7 XXXXXX + 7 XXXXXXXXXXXXX + - 8 XXXXX + 8 XXXXXXXX + 8 XXXXXX + 8 XXXXXXXXXXXXX + - 9 XXXXX + 9 XXXXXXXX + 9 XXXXXX + 9 XXXXXXXXXXXXX + - 10 + 10 + - 11 + 11 + - -------- ----------- --------- ---------------- - Next Page -------- ----------- --------- ---------------- - 12 XXXXX + 12 + 10 XXXXXX + 10 + - 13 XXXXX + 13 XXXXXXXX + 11 XXXXXX + 11 + - 14 XXXXX + 14 XXXXXXXX + 12 XXXXXX + 12 + - 15 + 15 XXXXXXXX + 13 + 13 XXXXXXXXXXXXX + - 16 + 16 + 14 + 14 XXXXXXXXXXXXX + - 17 + 17 + 15 + 15 XXXXXXXXXXXXX + - 18 XXXXX + 18 + 16 XXXXXX + 16 + - 19 XXXXX + 19 XXXXXXXX + 17 XXXXXX + 17 + - 20 XXXXX + 20 XXXXXXXX + 18 XXXXXX + 18 + - 21 + 21 XXXXXXXX + - 22 + 22 + - -------- ----------- --------- ---------------- - -Any other value is treated as `nil'. - - -*** Printer management (subgroup) - -The variable `ps-printer-name-option' determines the option used by -some utilities to indicate the printer name; it's used only when -`ps-printer-name' is a non-empty string. If you're using the lpr -utility to print, for example, `ps-printer-name-option' should be set -to "-P". - -The variable `ps-manual-feed' indicates if the printer requires manual -paper feeding. If it's nil, automatic feeding takes place. If it's -non-nil, manual feeding takes place. - -The variable `ps-end-with-control-d' specifies whether C-d (\x04) -should be inserted at end of the generated PostScript. Non-nil means -do so. - -*** Page settings (subgroup) - -If variable `ps-warn-paper-type' is nil, it's *not* treated as an -error if the PostScript printer doesn't have a paper with the size -indicated by `ps-paper-type'; the default paper size will be used -instead. If `ps-warn-paper-type' is non-nil, an error is signaled if -the PostScript printer doesn't support a paper with the size indicated -by `ps-paper-type'. This is used when `ps-spool-config' is set to -`setpagedevice'. - -The variable `ps-print-upside-down' determines the orientation for -printing pages: nil means `normal' printing, non-nil means -`upside-down' printing (that is, the page is rotated by 180 degrees). - -The variable `ps-selected-pages' specifies which pages to print. If -it's nil, all pages are printed. If it's a list, list elements may be -integers specifying a single page to print, or cons cells (FROM . TO) -specifying to print from page FROM to TO. Invalid list elements, that -is integers smaller than one, or elements whose FROM is greater than -its TO, are ignored. - -The variable `ps-even-or-odd-pages' specifies how to print even/odd -pages. Valid values are: - - nil print all pages. - - `even-page' print only even pages. - - `odd-page' print only odd pages. - - `even-sheet' print only even sheets. - That is, if `ps-n-up-printing' is 1, it behaves like - `even-page', but for values greater than 1, it'll - print only the even sheet of paper. - - `odd-sheet' print only odd sheets. - That is, if `ps-n-up-printing' is 1, it behaves like - `odd-page'; but for values greater than 1, it'll print - only the odd sheet of paper. - -Any other value is treated as nil. - -If you set `ps-selected-pages' (see there for documentation), pages -are filtered by `ps-selected-pages', and then by -`ps-even-or-odd-pages'. For example, if we have: - - (setq ps-selected-pages '(1 4 (6 . 10) (12 . 16) 20)) - -and we combine this with `ps-even-or-odd-pages' and -`ps-n-up-printing', we get: - -`ps-n-up-printing' = 1: - `ps-even-or-odd-pages' PAGES PRINTED - nil 1, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 20 - even-page 4, 6, 8, 10, 12, 14, 16, 20 - odd-page 1, 7, 9, 13, 15 - even-sheet 4, 6, 8, 10, 12, 14, 16, 20 - odd-sheet 1, 7, 9, 13, 15 - -`ps-n-up-printing' = 2: - `ps-even-or-odd-pages' PAGES PRINTED - nil 1/4, 6/7, 8/9, 10/12, 13/14, 15/16, 20 - even-page 4/6, 8/10, 12/14, 16/20 - odd-page 1/7, 9/13, 15 - even-sheet 6/7, 10/12, 15/16 - odd-sheet 1/4, 8/9, 13/14, 20 - -*** Miscellany (subgroup) - -The variable `ps-error-handler-message' specifies where error handler -messages should be sent. - -It is also possible to add a user-defined PostScript prologue code in -front of all generated prologue code by setting the variable -`ps-user-defined-prologue'. - -The variable `ps-line-number-font' specifies the font for line numbers. - -The variable `ps-line-number-font-size' specifies the font size in -points for line numbers. - -The variable `ps-line-number-color' specifies the color for line -numbers. See `ps-zebra-color' for documentation. - -The variable `ps-line-number-step' specifies the interval in which -line numbers are printed. For example, if `ps-line-number-step' is set -to 2, the printing will look like: - - 1 one line - one line - 3 one line - one line - 5 one line - one line - ... - -Valid values are: - -integer an integer specifying the interval in which line numbers are - printed. If it's smaller than or equal to zero, 1 - is used. - -`zebra' specifies that only the line number of the first line in a - zebra stripe is to be printed. - -Any other value is treated as `zebra'. - -The variable `ps-line-number-start' specifies the starting point in -the interval given by `ps-line-number-step'. For example, if -`ps-line-number-step' is set to 3, and `ps-line-number-start' is set to -3, the output will look like: - - one line - one line - 3 one line - one line - one line - 6 one line - one line - one line - 9 one line - one line - ... - -The variable `ps-postscript-code-directory' specifies the directory -where the PostScript prologue file used by ps-print is found. - -The variable `ps-line-spacing' determines the line spacing in points, -for ordinary text, when generating PostScript (similar to -`ps-font-size'). - -The variable `ps-paragraph-spacing' determines the paragraph spacing, -in points, for ordinary text, when generating PostScript (similar to -`ps-font-size'). - -The variable `ps-paragraph-regexp' specifies the paragraph delimiter. - -The variable `ps-begin-cut-regexp' and `ps-end-cut-regexp' specify the -start and end of a region to cut out when printing. - -** hideshow changes. - -*** now supports hiding of blocks of single line comments (like // for -C++, ; for lisp). - -*** Support for java-mode added. - -*** When doing `hs-hide-all' it is now possible to also hide the comments -in the file if `hs-hide-comments-when-hiding-all' is set. - -*** The new function `hs-hide-initial-comment' hides the comments at -the beginning of the files. Finally those huge RCS logs don't stay in your -way! This is run by default when entering the `hs-minor-mode'. - -*** Now uses overlays instead of `selective-display', so is more -robust and a lot faster. - -*** A block beginning can span multiple lines. - -*** The new variable `hs-show-hidden-short-form' if t, directs hideshow -to show only the beginning of a block when it is hidden. See the -documentation for more details. - -** Changes in Enriched mode. - -*** When you visit a file in enriched-mode, Emacs will make sure it is -filled to the current fill-column. This behavior is now independent -of the size of the window. When you save the file, the fill-column in -use is stored as well, so that the whole buffer need not be refilled -the next time unless the fill-column is different. - -*** use-hard-newlines is now a minor mode. When it is enabled, Emacs -distinguishes between hard and soft newlines, and treats hard newlines -as paragraph boundaries. Otherwise all newlines inserted are marked -as soft, and paragraph boundaries are determined solely from the text. - -** Font Lock mode - -*** Custom support - -The variables font-lock-face-attributes, font-lock-display-type and -font-lock-background-mode are now obsolete; the recommended way to specify -the faces to use for Font Lock mode is with M-x customize-group on the new -custom group font-lock-faces. If you set font-lock-face-attributes in your -~/.emacs file, Font Lock mode will respect its value. However, you should -consider converting from setting that variable to using M-x customize. - -You can still use X resources to specify Font Lock face appearances. - -*** Maximum decoration - -Fontification now uses the maximum level of decoration supported by -default. Previously, fontification used a mode-specific default level -of decoration, which is typically the minimum level of decoration -supported. You can set font-lock-maximum-decoration to nil -to get the old behavior. - -*** New support - -Support is now provided for Java, Objective-C, AWK and SIMULA modes. - -Note that Font Lock mode can be turned on without knowing exactly what modes -support Font Lock mode, via the command global-font-lock-mode. - -*** Configurable support - -Support for C, C++, Objective-C and Java can be more easily configured for -additional types and classes via the new variables c-font-lock-extra-types, -c++-font-lock-extra-types, objc-font-lock-extra-types and, you guessed it, -java-font-lock-extra-types. These value of each of these variables should be a -list of regexps matching the extra type names. For example, the default value -of c-font-lock-extra-types is ("\\sw+_t") which means fontification follows the -convention that C type names end in _t. This results in slower fontification. - -Of course, you can change the variables that specify fontification in whatever -way you wish, typically by adding regexps. However, these new variables make -it easier to make specific and common changes for the fontification of types. - -*** Adding highlighting patterns to existing support - -You can use the new function font-lock-add-keywords to add your own -highlighting patterns, such as for project-local or user-specific constructs, -for any mode. - -For example, to highlight `FIXME:' words in C comments, put: - - (font-lock-add-keywords 'c-mode '(("\\ tex --> reftex.el - -** Changes in BibTeX mode. - -*** Info documentation is now available. - -*** Don't allow parentheses in string constants anymore. This confused -both the BibTeX program and Emacs BibTeX mode. - -*** Renamed variable bibtex-mode-user-optional-fields to -bibtex-user-optional-fields. - -*** Removed variable bibtex-include-OPTannote -(use bibtex-user-optional-fields instead). - -*** New interactive functions to copy and kill fields and complete -entries to the BibTeX kill ring, from where they can be yanked back by -appropriate functions. - -*** New interactive functions for repositioning and marking of -entries. They are bound by default to C-M-l and C-M-h. - -*** New hook bibtex-clean-entry-hook. It is called after entry has -been cleaned. - -*** New variable bibtex-field-delimiters, which replaces variables -bibtex-field-{left|right}-delimiter. - -*** New variable bibtex-entry-delimiters to determine how entries -shall be delimited. - -*** Allow preinitialization of fields. See documentation of -bibtex-user-optional-fields, bibtex-entry-field-alist, and -bibtex-include-OPTkey for details. - -*** Book and InBook entries require either an author or an editor -field. This is now supported by bibtex.el. Alternative fields are -prefixed with `ALT'. - -*** New variable bibtex-entry-format, which replaces variable -bibtex-clean-entry-zap-empty-opts and allows specification of many -formatting options performed on cleaning an entry (see variable -documentation). - -*** Even more control on how automatic keys are generated. See -documentation of bibtex-generate-autokey for details. Transcriptions -for foreign languages other than German are now handled, too. - -*** New boolean user option bibtex-comma-after-last-field to decide if -comma should be inserted at end of last field. - -*** New boolean user option bibtex-align-at-equal-sign to determine if -alignment should be made at left side of field contents or at equal -signs. New user options to control entry layout (e.g. indentation). - -*** New function bibtex-fill-entry to realign entries. - -*** New function bibtex-reformat to reformat region or buffer. - -*** New function bibtex-convert-alien to convert a BibTeX database -from alien sources. - -*** New function bibtex-complete-key (similar to bibtex-complete-string) -to complete prefix to a key defined in buffer. Mainly useful in -crossref entries. - -*** New function bibtex-count-entries to count entries in buffer or -region. - -*** Added support for imenu. - -*** The function `bibtex-validate' now checks current region instead -of buffer if mark is active. Now it shows all errors of buffer in a -`compilation mode' buffer. You can use the normal commands (e.g. -`next-error') for compilation modes to jump to errors. - -*** New variable `bibtex-string-file-path' to determine where the files -from `bibtex-string-files' are searched. - -** Iso Accents mode now supports Latin-3 as an alternative. - -** The command next-error now opens blocks hidden by hideshow. - -** The function using-unix-filesystems has been replaced by the -functions add-untranslated-filesystem and remove-untranslated-filesystem. -Each of these functions takes the name of a drive letter or directory -as an argument. - -When a filesystem is added as untranslated, all files on it are read -and written in binary mode (no cr/lf translation is performed). - -** browse-url changes - -*** New methods for: Grail (browse-url-generic), MMM (browse-url-mmm), -Lynx in a separate xterm (browse-url-lynx-xterm) or in an Emacs window -(browse-url-lynx-emacs), remote W3 (browse-url-w3-gnudoit), generic -non-remote-controlled browsers (browse-url-generic) and associated -customization variables. - -*** New commands `browse-url-of-region' and `browse-url'. - -*** URLs marked up with (RFC1738) work if broken across -lines. Browsing methods can be associated with URL regexps -(e.g. mailto: URLs) via `browse-url-browser-function'. - -** Changes in Ediff - -*** Clicking Mouse-2 on a brief command description in Ediff control panel -pops up the Info file for this command. - -*** There is now a variable, ediff-autostore-merges, which controls whether -the result of a merge is saved in a file. By default, this is done only when -merge is done from a session group (eg, when merging files in two different -directories). - -*** Since Emacs 19.31 (this hasn't been announced before), Ediff can compare -and merge groups of files residing in different directories, or revisions of -files in the same directory. - -*** Since Emacs 19.31, Ediff can apply multi-file patches interactively. -The patches must be in the context format or GNU unified format. (The bug -related to the GNU format has now been fixed.) - -** Changes in Viper - -*** The startup file is now .viper instead of .vip -*** All variable/function names have been changed to start with viper- - instead of vip-. -*** C-\ now simulates the meta-key in all Viper states. -*** C-z in Insert state now escapes to Vi for the duration of the next -Viper command. In Vi and Insert states, C-z behaves as before. -*** C-c \ escapes to Vi for one command if Viper is in Insert or Emacs states. -*** _ is no longer the meta-key in Vi state. -*** The variable viper-insert-state-cursor-color can be used to change cursor -color when Viper is in insert state. -*** If search lands the cursor near the top or the bottom of the window, -Viper pulls the window up or down to expose more context. The variable -viper-adjust-window-after-search controls this behavior. - -** Etags changes. - -*** In C, C++, Objective C and Java, Etags tags global variables by -default. The resulting tags files are inflated by 30% on average. -Use --no-globals to turn this feature off. Etags can also tag -variables which are members of structure-like constructs, but it does -not by default. Use --members to turn this feature on. - -*** C++ member functions are now recognized as tags. - -*** Java is tagged like C++. In addition, "extends" and "implements" -constructs are tagged. Files are recognized by the extension .java. - -*** Etags can now handle programs written in Postscript. Files are -recognized by the extensions .ps and .pdb (Postscript with C syntax). -In Postscript, tags are lines that start with a slash. - -*** Etags now handles Objective C and Objective C++ code. The usual C and -C++ tags are recognized in these languages; in addition, etags -recognizes special Objective C syntax for classes, class categories, -methods and protocols. - -*** Etags also handles Cobol. Files are recognized by the extension -.cobol. The tagged lines are those containing a word that begins in -column 8 and ends in a full stop, i.e. anything that could be a -paragraph name. - -*** Regexps in Etags now support intervals, as in ed or grep. The syntax of -an interval is \{M,N\}, and it means to match the preceding expression -at least M times and as many as N times. - -** The format for specifying a custom format for time-stamp to insert -in files has changed slightly. - -With the new enhancements to the functionality of format-time-string, -time-stamp-format will change to be eventually compatible with it. -This conversion is being done in two steps to maintain compatibility -with old time-stamp-format values. - -In the new scheme, alternate case is signified by the number-sign -(`#') modifier, rather than changing the case of the format character. -This feature is as yet incompletely implemented for compatibility -reasons. - -In the old time-stamp-format, all numeric fields defaulted to their -natural width. (With format-time-string, each format has a -fixed-width default.) In this version, you can specify the colon -(`:') modifier to a numeric conversion to mean "give me the historical -time-stamp-format width default." Do not use colon if you are -specifying an explicit width, as in "%02d". - -Numbers are no longer truncated to the requested width, except in the -case of "%02y", which continues to give a two-digit year. Digit -truncation probably wasn't being used for anything else anyway. - -The new formats will work with old versions of Emacs. New formats are -being recommended now to allow time-stamp-format to change in the -future to be compatible with format-time-string. The new forms being -recommended now will continue to work then. - -See the documentation string for the variable time-stamp-format for -details. - -** There are some additional major modes: - -dcl-mode, for editing VMS DCL files. -m4-mode, for editing files of m4 input. -meta-mode, for editing MetaFont and MetaPost source files. - -** In Shell mode, the command shell-copy-environment-variable lets you -copy the value of a specified environment variable from the subshell -into Emacs. - -** New Lisp packages include: - -*** battery.el displays battery status for laptops. - -*** M-x bruce (named after Lenny Bruce) is a program that might -be used for adding some indecent words to your email. - -*** M-x crisp-mode enables an emulation for the CRiSP editor. - -*** M-x dirtrack arranges for better tracking of directory changes -in shell buffers. - -*** The new library elint.el provides for linting of Emacs Lisp code. -See the documentation for `elint-initialize', `elint-current-buffer' -and `elint-defun'. - -*** M-x expand-add-abbrevs defines a special kind of abbrev which is -meant for programming constructs. These abbrevs expand like ordinary -ones, when you type SPC, but only at the end of a line and not within -strings or comments. - -These abbrevs can act as templates: you can define places within an -abbrev for insertion of additional text. Once you expand the abbrev, -you can then use C-x a p and C-x a n to move back and forth to these -insertion points. Thus you can conveniently insert additional text -at these points. - -*** filecache.el remembers the location of files so that you -can visit them by short forms of their names. - -*** find-func.el lets you find the definition of the user-loaded -Emacs Lisp function at point. - -*** M-x handwrite converts text to a "handwritten" picture. - -*** M-x iswitchb-buffer is a command for switching to a buffer, much like -switch-buffer, but it reads the argument in a more helpful way. - -*** M-x landmark implements a neural network for landmark learning. - -*** M-x locate provides a convenient interface to the `locate' program. - -*** M4 mode is a new mode for editing files of m4 input. - -*** mantemp.el creates C++ manual template instantiations -from the GCC error messages which indicate which instantiations are needed. - -*** mouse-copy.el provides a one-click copy and move feature. -You can drag a region with M-mouse-1, and it is automatically -inserted at point. M-Shift-mouse-1 deletes the text from its -original place after inserting the copy. - -*** mouse-drag.el lets you do scrolling by dragging Mouse-2 -on the buffer. - -You click the mouse and move; that distance either translates into the -velocity to scroll (with mouse-drag-throw) or the distance to scroll -(with mouse-drag-drag). Horizontal scrolling is enabled when needed. - -Enable mouse-drag with: - (global-set-key [down-mouse-2] 'mouse-drag-throw) --or- - (global-set-key [down-mouse-2] 'mouse-drag-drag) - -*** mspools.el is useful for determining which mail folders have -mail waiting to be read in them. It works with procmail. - -*** Octave mode is a major mode for editing files of input for Octave. -It comes with a facility for communicating with an Octave subprocess. - -*** ogonek - -The ogonek package provides functions for changing the coding of -Polish diacritic characters in buffers. Codings known from various -platforms are supported such as ISO8859-2, Mazovia, IBM Latin2, and -TeX. For example, you can change the coding from Mazovia to -ISO8859-2. Another example is a change of coding from ISO8859-2 to -prefix notation (in which `/a' stands for the aogonek character, for -instance) and vice versa. - -To use this package load it using - M-x load-library [enter] ogonek -Then, you may get an explanation by calling one of - M-x ogonek-jak -- in Polish - M-x ogonek-how -- in English -The info specifies the commands and variables provided as well as the -ways of customization in `.emacs'. - -*** Interface to ph. - -Emacs provides a client interface to CCSO Nameservers (ph/qi) - -The CCSO nameserver is used in many universities to provide directory -services about people. ph.el provides a convenient Emacs interface to -these servers. - -*** uce.el is useful for replying to unsolicited commercial email. - -*** vcursor.el implements a "virtual cursor" feature. -You can move the virtual cursor with special commands -while the real cursor does not move. - -*** webjump.el is a "hot list" package which you can set up -for visiting your favorite web sites. - -*** M-x winner-mode is a minor mode which saves window configurations, -so you can move back to other configurations that you have recently used. - -** movemail change - -Movemail no longer needs to be installed setuid root in order for POP -mail retrieval to function properly. This is because it no longer -supports the RPOP (reserved-port POP) protocol; instead, it uses the -user's POP password to authenticate to the mail server. - -This change was made earlier, but not reported in NEWS before. - -* Emacs 20.1 changes for MS-DOS and MS-Windows. - -** Changes in handling MS-DOS/MS-Windows text files. - -Emacs handles three different conventions for representing -end-of-line: CRLF for MSDOS, LF for Unix and GNU, and CR (used on the -Macintosh). Emacs determines which convention is used in a specific -file based on the contents of that file (except for certain special -file names), and when it saves the file, it uses the same convention. - -To save the file and change the end-of-line convention, you can use -C-x RET f (set-buffer-file-coding-system) to specify a different -coding system for the buffer. Then, when you save the file, the newly -specified coding system will take effect. For example, to save with -LF, specify undecided-unix (or some other ...-unix coding system); to -save with CRLF, specify undecided-dos. - -* Lisp Changes in Emacs 20.1 - -** Byte-compiled files made with Emacs 20 will, in general, work in -Emacs 19 as well, as long as the source code runs in Emacs 19. And -vice versa: byte-compiled files made with Emacs 19 should also run in -Emacs 20, as long as the program itself works in Emacs 20. - -** Windows-specific functions and variables have been renamed -to start with w32- instead of win32-. - -In hacker language, calling something a "win" is a form of praise. We -don't want to praise a non-free Microsoft system, so we don't call it -"win". - -** Basic Lisp changes - -*** A symbol whose name starts with a colon now automatically -evaluates to itself. Therefore such a symbol can be used as a constant. - -*** The defined purpose of `defconst' has been changed. It should now -be used only for values that should not be changed whether by a program -or by the user. - -The actual behavior of defconst has not been changed. - -*** There are new macros `when' and `unless' - -(when CONDITION BODY...) is short for (if CONDITION (progn BODY...)) -(unless CONDITION BODY...) is short for (if CONDITION nil BODY...) - -*** Emacs now defines functions caar, cadr, cdar and cddr with their -usual Lisp meanings. For example, caar returns the car of the car of -its argument. - -*** equal, when comparing strings, now ignores their text properties. - -*** The new function `functionp' tests whether an object is a function. - -*** arrayp now returns t for char-tables and bool-vectors. - -*** Certain primitives which use characters (as integers) now get an -error if the integer is not a valid character code. These primitives -include insert-char, char-to-string, and the %c construct in the -`format' function. - -*** The `require' function now insists on adding a suffix, either .el -or .elc, to the file name. Thus, (require 'foo) will not use a file -whose name is just foo. It insists on foo.el or foo.elc. - -*** The `autoload' function, when the file name does not contain -either a directory name or the suffix .el or .elc, insists on -adding one of these suffixes. - -*** string-to-number now takes an optional second argument BASE -which specifies the base to use when converting an integer. -If BASE is omitted, base 10 is used. - -We have not implemented other radices for floating point numbers, -because that would be much more work and does not seem useful. - -*** substring now handles vectors as well as strings. - -*** The Common Lisp function eql is no longer defined normally. -You must load the `cl' library to define it. - -*** The new macro `with-current-buffer' lets you evaluate an expression -conveniently with a different current buffer. It looks like this: - - (with-current-buffer BUFFER BODY-FORMS...) - -BUFFER is the expression that says which buffer to use. -BODY-FORMS say what to do in that buffer. - -*** The new primitive `save-current-buffer' saves and restores the -choice of current buffer, like `save-excursion', but without saving or -restoring the value of point or the mark. `with-current-buffer' -works using `save-current-buffer'. - -*** The new macro `with-temp-file' lets you do some work in a new buffer and -write the output to a specified file. Like `progn', it returns the value -of the last form. - -*** The new macro `with-temp-buffer' lets you do some work in a new buffer, -which is discarded after use. Like `progn', it returns the value of the -last form. If you wish to return the buffer contents, use (buffer-string) -as the last form. - -*** The new function split-string takes a string, splits it at certain -characters, and returns a list of the substrings in between the -matches. - -For example, (split-string "foo bar lose" " +") returns ("foo" "bar" "lose"). - -*** The new macro with-output-to-string executes some Lisp expressions -with standard-output set up so that all output feeds into a string. -Then it returns that string. - -For example, if the current buffer name is `foo', - -(with-output-to-string - (princ "The buffer is ") - (princ (buffer-name))) - -returns "The buffer is foo". - -** Non-ASCII characters are now supported, if enable-multibyte-characters -is non-nil. - -These characters have character codes above 256. When inserted in the -buffer or stored in a string, they are represented as multibyte -characters that occupy several buffer positions each. - -*** When enable-multibyte-characters is non-nil, a single character in -a buffer or string can be two or more bytes (as many as four). - -Buffers and strings are still made up of unibyte elements; -character positions and string indices are always measured in bytes. -Therefore, moving forward one character can increase the buffer -position by 2, 3 or 4. The function forward-char moves by whole -characters, and therefore is no longer equivalent to - (lambda (n) (goto-char (+ (point) n))). - -ASCII characters (codes 0 through 127) are still single bytes, always. -Sequences of byte values 128 through 255 are used to represent -non-ASCII characters. These sequences are called "multibyte -characters". - -The first byte of a multibyte character is always in the range 128 -through 159 (octal 0200 through 0237). These values are called -"leading codes". The second and subsequent bytes are always in the -range 160 through 255 (octal 0240 through 0377). The first byte, the -leading code, determines how many bytes long the sequence is. - -*** The function forward-char moves over characters, and therefore -(forward-char 1) may increase point by more than 1 if it moves over a -multibyte character. Likewise, delete-char always deletes a -character, which may be more than one buffer position. - -This means that some Lisp programs, which assume that a character is -always one buffer position, need to be changed. - -However, all ASCII characters are always one buffer position. - -*** The regexp [\200-\377] no longer matches all non-ASCII characters, -because when enable-multibyte-characters is non-nil, these characters -have codes that are not in the range octal 200 to octal 377. However, -the regexp [^\000-\177] does match all non-ASCII characters, -guaranteed. - -*** The function char-boundary-p returns non-nil if position POS is -between two characters in the buffer (not in the middle of a -character). - -When the value is non-nil, it says what kind of character follows POS: - - 0 if POS is at an ASCII character or at the end of range, - 1 if POS is before a 2-byte length multi-byte form, - 2 if POS is at a head of 3-byte length multi-byte form, - 3 if POS is at a head of 4-byte length multi-byte form, - 4 if POS is at a head of multi-byte form of a composite character. - -*** The function char-bytes returns how many bytes the character CHAR uses. - -*** Strings can contain multibyte characters. The function -`length' returns the string length counting bytes, which may be -more than the number of characters. - -You can include a multibyte character in a string constant by writing -it literally. You can also represent it with a hex escape, -\xNNNNNNN..., using as many digits as necessary. Any character which -is not a valid hex digit terminates this construct. If you want to -follow it with a character that is a hex digit, write backslash and -newline in between; that will terminate the hex escape. - -*** The function concat-chars takes arguments which are characters -and returns a string containing those characters. - -*** The function sref access a multibyte character in a string. -(sref STRING INDX) returns the character in STRING at INDEX. INDEX -counts from zero. If INDEX is at a position in the middle of a -character, sref signals an error. - -*** The function chars-in-string returns the number of characters -in a string. This is less than the length of the string, if the -string contains multibyte characters (the length counts bytes). - -*** The function chars-in-region returns the number of characters -in a region from BEG to END. This is less than (- END BEG) if the -region contains multibyte characters (the length counts bytes). - -*** The function string-to-list converts a string to a list of -the characters in it. string-to-vector converts a string -to a vector of the characters in it. - -*** The function store-substring alters part of the contents -of a string. You call it as follows: - - (store-substring STRING IDX OBJ) - -This says to alter STRING, by storing OBJ starting at index IDX in -STRING. OBJ may be either a character or a (smaller) string. -This function really does alter the contents of STRING. -Since it is impossible to change the length of an existing string, -it is an error if OBJ doesn't fit within STRING's actual length. - -*** char-width returns the width (in columns) of the character CHAR, -if it were displayed in the current buffer and the selected window. - -*** string-width returns the width (in columns) of the text in STRING, -if it were displayed in the current buffer and the selected window. - -*** truncate-string-to-width shortens a string, if necessary, -to fit within a certain number of columns. (Of course, it does -not alter the string that you give it; it returns a new string -which contains all or just part of the existing string.) - -(truncate-string-to-width STR END-COLUMN &optional START-COLUMN PADDING) - -This returns the part of STR up to column END-COLUMN. - -The optional argument START-COLUMN specifies the starting column. -If this is non-nil, then the first START-COLUMN columns of the string -are not included in the resulting value. - -The optional argument PADDING, if non-nil, is a padding character to be added -at the beginning and end the resulting string, to extend it to exactly -WIDTH columns. If PADDING is nil, that means do not pad; then, if STRING -is narrower than WIDTH, the value is equal to STRING. - -If PADDING and START-COLUMN are both non-nil, and if there is no clean -place in STRING that corresponds to START-COLUMN (because one -character extends across that column), then the padding character -PADDING is added one or more times at the beginning of the result -string, so that its columns line up as if it really did start at -column START-COLUMN. - -*** When the functions in the list after-change-functions are called, -the third argument is the number of bytes in the pre-change text, not -necessarily the number of characters. It is, in effect, the -difference in buffer position between the beginning and the end of the -changed text, before the change. - -*** The characters Emacs uses are classified in various character -sets, each of which has a name which is a symbol. In general there is -one character set for each script, not for each language. - -**** The function charsetp tests whether an object is a character set name. - -**** The variable charset-list holds a list of character set names. - -**** char-charset, given a character code, returns the name of the character -set that the character belongs to. (The value is a symbol.) - -**** split-char, given a character code, returns a list containing the -name of the character set, followed by one or two byte-values -which identify the character within that character set. - -**** make-char, given a character set name and one or two subsequent -byte-values, constructs a character code. This is roughly the -opposite of split-char. - -**** find-charset-region returns a list of the character sets -of all the characters between BEG and END. - -**** find-charset-string returns a list of the character sets -of all the characters in a string. - -*** Here are the Lisp facilities for working with coding systems -and specifying coding systems. - -**** The function coding-system-list returns a list of all coding -system names (symbols). With optional argument t, it returns a list -of all distinct base coding systems, not including variants. -(Variant coding systems are those like latin-1-dos, latin-1-unix -and latin-1-mac which specify the end-of-line conversion as well -as what to do about code conversion.) - -**** coding-system-p tests a symbol to see if it is a coding system -name. It returns t if so, nil if not. - -**** file-coding-system-alist specifies which coding systems to use -for certain file names. It works like network-coding-system-alist, -except that the PATTERN is matched against the file name. - -Each element has the format (PATTERN . VAL), where PATTERN determines -which file names the element applies to. PATTERN should be a regexp -to match against a file name. - -VAL is a coding system, a cons cell containing two coding systems, or -a function symbol. If VAL is a coding system, it is used for both -decoding what received from the network stream and encoding what sent -to the network stream. If VAL is a cons cell containing two coding -systems, the car specifies the coding system for decoding, and the cdr -specifies the coding system for encoding. - -If VAL is a function symbol, the function must return a coding system -or a cons cell containing two coding systems, which is used as above. - -**** The variable network-coding-system-alist specifies -the coding system to use for network sockets. - -Each element has the format (PATTERN . VAL), where PATTERN determines -which network sockets the element applies to. PATTERN should be -either a port number or a regular expression matching some network -service names. - -VAL is a coding system, a cons cell containing two coding systems, or -a function symbol. If VAL is a coding system, it is used for both -decoding what received from the network stream and encoding what sent -to the network stream. If VAL is a cons cell containing two coding -systems, the car specifies the coding system for decoding, and the cdr -specifies the coding system for encoding. - -If VAL is a function symbol, the function must return a coding system -or a cons cell containing two coding systems, which is used as above. - -**** process-coding-system-alist specifies which coding systems to use -for certain subprocess. It works like network-coding-system-alist, -except that the PATTERN is matched against the program name used to -start the subprocess. - -**** The variable default-process-coding-system specifies the coding -systems to use for subprocess (and net connection) input and output, -when nothing else specifies what to do. The value is a cons cell -(OUTPUT-CODING . INPUT-CODING). OUTPUT-CODING applies to output -to the subprocess, and INPUT-CODING applies to input from it. - -**** The variable coding-system-for-write, if non-nil, specifies the -coding system to use for writing a file, or for output to a synchronous -subprocess. - -It also applies to any asynchronous subprocess or network connection, -but in a different way: the value of coding-system-for-write when you -start the subprocess or connection affects that subprocess or -connection permanently or until overridden. - -The variable coding-system-for-write takes precedence over -file-coding-system-alist, process-coding-system-alist and -network-coding-system-alist, and all other methods of specifying a -coding system for output. But most of the time this variable is nil. -It exists so that Lisp programs can bind it to a specific coding -system for one operation at a time. - -**** coding-system-for-read applies similarly to input from -files, subprocesses or network connections. - -**** The function process-coding-system tells you what -coding systems(s) an existing subprocess is using. -The value is a cons cell, - (DECODING-CODING-SYSTEM . ENCODING-CODING-SYSTEM) -where DECODING-CODING-SYSTEM is used for decoding output from -the subprocess, and ENCODING-CODING-SYSTEM is used for encoding -input to the subprocess. - -**** The function set-process-coding-system can be used to -change the coding systems in use for an existing subprocess. - -** Emacs has a new facility to help users manage the many -customization options. To make a Lisp program work with this facility, -you need to use the new macros defgroup and defcustom. - -You use defcustom instead of defvar, for defining a user option -variable. The difference is that you specify two additional pieces of -information (usually): the "type" which says what values are -legitimate, and the "group" which specifies the hierarchy for -customization. - -Thus, instead of writing - - (defvar foo-blurgoze nil - "*Non-nil means that foo will act very blurgozely.") - -you would now write this: - - (defcustom foo-blurgoze nil - "*Non-nil means that foo will act very blurgozely." - :type 'boolean - :group foo) - -The type `boolean' means that this variable has only -two meaningful states: nil and non-nil. Other type values -describe other possibilities; see the manual for Custom -for a description of them. - -The "group" argument is used to specify a group which the option -should belong to. You define a new group like this: - - (defgroup ispell nil - "Spell checking using Ispell." - :group 'processes) - -The "group" argument in defgroup specifies the parent group. The root -group is called `emacs'; it should not contain any variables itself, -but only other groups. The immediate subgroups of `emacs' correspond -to the keywords used by C-h p. Under these subgroups come -second-level subgroups that belong to individual packages. - -Each Emacs package should have its own set of groups. A simple -package should have just one group; a more complex package should -have a hierarchy of its own groups. The sole or root group of a -package should be a subgroup of one or more of the "keyword" -first-level subgroups. - -** New `widget' library for inserting UI components in buffers. - -This library, used by the new custom library, is documented in a -separate manual that accompanies Emacs. - -** easy-mmode - -The easy-mmode package provides macros and functions that make -developing minor modes easier. Roughly, the programmer has to code -only the functionality of the minor mode. All the rest--toggles, -predicate, and documentation--can be done in one call to the macro -`easy-mmode-define-minor-mode' (see the documentation). See also -`easy-mmode-define-keymap'. - -** Text property changes - -*** The `intangible' property now works on overlays as well as on a -text property. - -*** The new functions next-char-property-change and -previous-char-property-change scan through the buffer looking for a -place where either a text property or an overlay might change. The -functions take two arguments, POSITION and LIMIT. POSITION is the -starting position for the scan. LIMIT says where to stop the scan. - -If no property change is found before LIMIT, the value is LIMIT. If -LIMIT is nil, scan goes to the beginning or end of the accessible part -of the buffer. If no property change is found, the value is the -position of the beginning or end of the buffer. - -*** In the `local-map' text property or overlay property, the property -value can now be a symbol whose function definition is a keymap. This -is an alternative to using the keymap itself. - -** Changes in invisibility features - -*** Isearch can now temporarily show parts of the buffer which are -hidden by an overlay with a invisible property, when the search match -is inside that portion of the buffer. To enable this the overlay -should have a isearch-open-invisible property which is a function that -would be called having the overlay as an argument, the function should -make the overlay visible. - -During incremental search the overlays are shown by modifying the -invisible and intangible properties, if beside this more actions are -needed the overlay should have a isearch-open-invisible-temporary -which is a function. The function is called with 2 arguments: one is -the overlay and the second is nil when it should show the overlay and -t when it should hide it. - -*** add-to-invisibility-spec, remove-from-invisibility-spec - -Modes that use overlays to hide portions of a buffer should set the -invisible property of the overlay to the mode's name (or another symbol) -and modify the `buffer-invisibility-spec' to include that symbol. -Use `add-to-invisibility-spec' and `remove-from-invisibility-spec' to -manipulate the `buffer-invisibility-spec'. -Here is an example of how to do this: - - ;; If we want to display an ellipsis: - (add-to-invisibility-spec '(my-symbol . t)) - ;; If you don't want ellipsis: - (add-to-invisibility-spec 'my-symbol) - - ... - (overlay-put (make-overlay beginning end) 'invisible 'my-symbol) - - ... - ;; When done with the overlays: - (remove-from-invisibility-spec '(my-symbol . t)) - ;; Or respectively: - (remove-from-invisibility-spec 'my-symbol) - -** Changes in syntax parsing. - -*** The syntax-directed buffer-scan functions (such as -`parse-partial-sexp', `forward-word' and similar functions) can now -obey syntax information specified by text properties, if the variable -`parse-sexp-lookup-properties' is non-nil. - -If the value of `parse-sexp-lookup-properties' is nil, the behavior -is as before: the syntax-table of the current buffer is always -used to determine the syntax of the character at the position. - -When `parse-sexp-lookup-properties' is non-nil, the syntax of a -character in the buffer is calculated thus: - - a) if the `syntax-table' text-property of that character - is a cons, this cons becomes the syntax-type; - - Valid values of `syntax-table' text-property are: nil, a valid - syntax-table, and a valid syntax-table element, i.e., - a cons cell of the form (SYNTAX-CODE . MATCHING-CHAR). - - b) if the character's `syntax-table' text-property - is a syntax table, this syntax table is used - (instead of the syntax-table of the current buffer) to - determine the syntax type of the character. - - c) otherwise the syntax-type is determined by the syntax-table - of the current buffer. - -*** The meaning of \s in regular expressions is also affected by the -value of `parse-sexp-lookup-properties'. The details are the same as -for the syntax-directed buffer-scan functions. - -*** There are two new syntax-codes, `!' and `|' (numeric values 14 -and 15). A character with a code `!' starts a comment which is ended -only by another character with the same code (unless quoted). A -character with a code `|' starts a string which is ended only by -another character with the same code (unless quoted). - -These codes are mainly meant for use as values of the `syntax-table' -text property. - -*** The function `parse-partial-sexp' has new semantics for the sixth -arg COMMENTSTOP. If it is `syntax-table', parse stops after the start -of a comment or a string, or after end of a comment or a string. - -*** The state-list which the return value from `parse-partial-sexp' -(and can also be used as an argument) now has an optional ninth -element: the character address of the start of last comment or string; -nil if none. The fourth and eighth elements have special values if the -string/comment is started by a "!" or "|" syntax-code. - -*** Since new features of `parse-partial-sexp' allow a complete -syntactic parsing, `font-lock' no longer supports -`font-lock-comment-start-regexp'. - -** Changes in face features - -*** The face functions are now unconditionally defined in Emacs, even -if it does not support displaying on a device that supports faces. - -*** The function face-documentation returns the documentation string -of a face (or nil if it doesn't have one). - -*** The function face-bold-p returns t if a face should be bold. -set-face-bold-p sets that flag. - -*** The function face-italic-p returns t if a face should be italic. -set-face-italic-p sets that flag. - -*** You can now specify foreground and background colors for text -by adding elements of the form (foreground-color . COLOR-NAME) -and (background-color . COLOR-NAME) to the list of faces in -the `face' property (either the character's text property or an -overlay property). - -This means that you no longer need to create named faces to use -arbitrary colors in a Lisp package. - -** Changes in file-handling functions - -*** File-access primitive functions no longer discard an extra redundant -directory name from the beginning of the file name. In other words, -they no longer do anything special with // or /~. That conversion -is now done only in substitute-in-file-name. - -This makes it possible for a Lisp program to open a file whose name -begins with ~. - -*** If copy-file is unable to set the date of the output file, -it now signals an error with the condition file-date-error. - -*** The inode number returned by file-attributes may be an integer (if -the number fits in a Lisp integer) or a list of integers. - -*** insert-file-contents can now read from a special file, -as long as the arguments VISIT and REPLACE are nil. - -*** The RAWFILE arg to find-file-noselect, if non-nil, now suppresses -character code conversion as well as other things. - -Meanwhile, this feature does work with remote file names -(formerly it did not). - -*** Lisp packages which create temporary files should use the TMPDIR -environment variable to decide which directory to put them in. - -*** interpreter-mode-alist elements now specify regexps -instead of constant strings. - -*** expand-file-name no longer treats `//' or `/~' specially. It used -to delete all the text of a file name up through the first slash of -any `//' or `/~' sequence. Now it passes them straight through. - -substitute-in-file-name continues to treat those sequences specially, -in the same way as before. - -*** The variable `format-alist' is more general now. -The FROM-FN and TO-FN in a format definition can now be strings -which specify shell commands to use as filters to perform conversion. - -*** The new function access-file tries to open a file, and signals an -error if that fails. If the open succeeds, access-file does nothing -else, and returns nil. - -*** The function insert-directory now signals an error if the specified -directory cannot be listed. - -** Changes in minibuffer input - -*** The functions read-buffer, read-variable, read-command, read-string -read-file-name, read-from-minibuffer and completing-read now take an -additional argument which specifies the default value. If this -argument is non-nil, it should be a string; that string is used in two -ways: - - It is returned if the user enters empty input. - It is available through the history command M-n. - -*** The functions read-string, read-from-minibuffer, -read-no-blanks-input and completing-read now take an additional -argument INHERIT-INPUT-METHOD. If this is non-nil, then the -minibuffer inherits the current input method and the setting of -enable-multibyte-characters from the previously current buffer. - -In an interactive spec, you can use M instead of s to read an -argument in this way. - -*** All minibuffer input functions discard text properties -from the text you enter in the minibuffer, unless the variable -minibuffer-allow-text-properties is non-nil. - -** Echo area features - -*** Clearing the echo area now runs the normal hook -echo-area-clear-hook. Note that the echo area can be used while the -minibuffer is active; in that case, the minibuffer is still active -after the echo area is cleared. - -*** The function current-message returns the message currently displayed -in the echo area, or nil if there is none. - -** Keyboard input features - -*** tty-erase-char is a new variable that reports which character was -set up as the terminal's erase character when time Emacs was started. - -*** num-nonmacro-input-events is the total number of input events -received so far from the terminal. It does not count those generated -by keyboard macros. - -** Frame-related changes - -*** make-frame runs the normal hook before-make-frame-hook just before -creating a frame, and just after creating a frame it runs the abnormal -hook after-make-frame-functions with the new frame as arg. - -*** The new hook window-configuration-change-hook is now run every time -the window configuration has changed. The frame whose configuration -has changed is the selected frame when the hook is run. - -*** Each frame now independently records the order for recently -selected buffers, in its buffer-list frame parameter, so that the -value of other-buffer is now based on the buffers recently displayed -in the selected frame. - -*** The value of the frame parameter vertical-scroll-bars -is now `left', `right' or nil. A non-nil value specifies -which side of the window to put the scroll bars on. - -** X Windows features - -*** You can examine X resources for other applications by binding -x-resource-class around a call to x-get-resource. The usual value of -x-resource-class is "Emacs", which is the correct value for Emacs. - -*** In menus, checkboxes and radio buttons now actually work. -The menu displays the current status of the box or button. - -*** The function x-list-fonts now takes an optional fourth argument -MAXIMUM which sets a limit on how many matching fonts to return. -A smaller value of MAXIMUM makes the function faster. - -If the only question is whether *any* font matches the pattern, -it is good to supply 1 for this argument. - -** Subprocess features - -*** A reminder: it is no longer necessary for subprocess filter -functions and sentinels to do save-match-data, because Emacs does this -automatically. - -*** The new function shell-command-to-string executes a shell command -and returns the output from the command as a string. - -*** The new function process-contact returns t for a child process, -and (HOSTNAME SERVICE) for a net connection. - -** An error in running pre-command-hook or post-command-hook -does clear the variable to nil. The documentation was wrong before. - -** In define-key-after, if AFTER is t, the new binding now always goes -at the end of the keymap. If the keymap is a menu, this means it -goes after the other menu items. - -** If you have a program that makes several changes in the same area -of the buffer, you can use the macro combine-after-change-calls -around that Lisp code to make it faster when after-change hooks -are in use. - -The macro arranges to call the after-change functions just once for a -series of several changes--if that seems safe. - -Don't alter the variables after-change-functions and -after-change-function within the body of a combine-after-change-calls -form. - -** If you define an abbrev (with define-abbrev) whose EXPANSION -is not a string, then the abbrev does not expand in the usual sense, -but its hook is still run. - -** Normally, the Lisp debugger is not used (even if you have enabled it) -for errors that are handled by condition-case. - -If you set debug-on-signal to a non-nil value, then the debugger is called -regardless of whether there is a handler for the condition. This is -useful for debugging problems that happen inside of a condition-case. - -This mode of operation seems to be unreliable in other ways. Errors that -are normal and ought to be handled, perhaps in timers or process -filters, will instead invoke the debugger. So don't say you weren't -warned. - -** The new variable ring-bell-function lets you specify your own -way for Emacs to "ring the bell". - -** If run-at-time's TIME argument is t, the action is repeated at -integral multiples of REPEAT from the epoch; this is useful for -functions like display-time. - -** You can use the function locate-library to find the precise file -name of a Lisp library. This isn't new, but wasn't documented before. - -** Commands for entering view mode have new optional arguments that -can be used from Lisp. Low-level entrance to and exit from view mode -is done by functions view-mode-enter and view-mode-exit. - -** batch-byte-compile-file now makes Emacs return a nonzero status code -if there is an error in compilation. - -** pop-to-buffer, switch-to-buffer-other-window and -switch-to-buffer-other-frame now accept an additional optional -argument NORECORD, much like switch-to-buffer. If it is non-nil, -they don't put the buffer at the front of the buffer list. - -** If your .emacs file leaves the *scratch* buffer non-empty, -Emacs does not display the startup message, so as to avoid changing -the *scratch* buffer. - -** The new function regexp-opt returns an efficient regexp to match a string. -The arguments are STRINGS and (optionally) PAREN. This function can be used -where regexp matching or searching is intensively used and speed is important, -e.g., in Font Lock mode. - -** The variable buffer-display-count is local to each buffer, -and is incremented each time the buffer is displayed in a window. -It starts at 0 when the buffer is created. - -** The new function compose-mail starts composing a mail message -using the user's chosen mail composition agent (specified with the -variable mail-user-agent). It has variants compose-mail-other-window -and compose-mail-other-frame. - -** The `user-full-name' function now takes an optional parameter which -can either be a number (the UID) or a string (the login name). The -full name of the specified user will be returned. - -** Lisp packages that load files of customizations, or any other sort -of user profile, should obey the variable init-file-user in deciding -where to find it. They should load the profile of the user name found -in that variable. If init-file-user is nil, meaning that the -q -option was used, then Lisp packages should not load the customization -files at all. - -** format-time-string now allows you to specify the field width -and type of padding. This works as in printf: you write the field -width as digits in the middle of a %-construct. If you start -the field width with 0, it means to pad with zeros. - -For example, %S normally specifies the number of seconds since the -minute; %03S means to pad this with zeros to 3 positions, %_3S to pad -with spaces to 3 positions. Plain %3S pads with zeros, because that -is how %S normally pads to two positions. - -** thing-at-point now supports a new kind of "thing": url. - -** imenu.el changes. - -You can now specify a function to be run when selecting an -item from menu created by imenu. - -An example of using this feature: if we define imenu items for the -#include directives in a C file, we can open the included file when we -select one of those items. - -* For older news, see the file ONEWS - ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/etc/ONEWS.2 b/etc/NEWS.1-17 similarity index 51% rename from etc/ONEWS.2 rename to etc/NEWS.1-17 index d9f75c278ed..0297c928b72 100644 --- a/etc/ONEWS.2 +++ b/etc/NEWS.1-17 @@ -1,8 +1,10 @@ GNU Emacs NEWS -- history of user-visible changes. 26-Mar-1986 -Copyright (C) 1986 Richard M. Stallman. +Copyright (C) 1985, 1986, 2006 Richard M. Stallman. See the end for copying conditions. -For older news, see the file ONEWS.1. +This file is about changes in emacs versions 1 through 17. + + Changes in Emacs 17 @@ -407,6 +409,7 @@ By default it is still "--text follows this line--". Just before each garbage collection, all but the last 30 elements of the command history are discarded. + Incompatible Lisp Programming Changes in Emacs 17 @@ -484,6 +487,7 @@ The functions `forward-to-word', `backward-to-word', `upcase-char', `mark-beginning-of-buffer' and `mark-end-of-buffer' have been removed. Their definitions can be found in file lisp/unused.el if you need them. + Upward Compatible Lisp Programming Changes in Emacs 17 @@ -804,6 +808,8 @@ a period in `modify-syntax-entry'. Backup suffixes of all kinds are now stripped from a file's name before searching `auto-mode-alist'. + + Changes in Emacs 16 @@ -1325,13 +1331,1187 @@ except when `-batch' has been specified. * Emacs can be built with output redirected to a file. This is because -batch (see above) is now used in building Emacs. - -For older news, see the file ONEWS.1. + + +Changes in Emacs 15 + +* Emacs now runs on Sun and Megatest 68000 systems; + also on at least one 16000 system running 4.2. + +* Emacs now alters the output-start and output-stop characters + to prevent C-s and C-q from being considered as flow control + by cretinous rlogin software in 4.2. + +* It is now possible convert Mocklisp code (for Gosling Emacs) to Lisp code + that can run in GNU Emacs. M-x convert-mocklisp-buffer + converts the contents of the current buffer from Mocklisp to + GNU Emacs Lisp. You should then save the converted buffer with C-x C-w + under a name ending in ".el" + + There are probably some Mocklisp constructs that are not handled. + If you encounter one, feel free to report the failure as a bug. + The construct will be handled in a future Emacs release, if that is not + not too hard to do. + + Note that lisp code converted from Mocklisp code will not necessarily + run as fast as code specifically written for GNU Emacs, nor will it use + the many features of GNU Emacs which are not present in Gosling's emacs. + (In particular, the byte-compiler (m-x byte-compile-file) knows little + about compilation of code directly converted from mocklisp.) + It is envisaged that old mocklisp code will be incrementally converted + to GNU lisp code, with M-x convert-mocklisp-buffer being the first + step in this process. + +* Control-x n (narrow-to-region) is now by default a disabled command. + + This means that, if you issue this command, it will ask whether + you really mean it. You have the opportunity to enable the + command permanently at that time, so you will not be asked again. + This will place the form "(put 'narrow-to-region 'disabled nil)" in your + .emacs file. + +* Tags now prompts for the tag table file name to use. + + All the tags commands ask for the tag table file name + if you have not yet specified one. + + Also, the command M-x visit-tag-table can now be used to + specify the tag table file name initially, or to switch + to a new tag table. + +* If truncate-partial-width-windows is non-nil (as it intially is), + all windows less than the full screen width (that is, + made by side-by-side splitting) truncate lines rather than continuing + them. + +* Emacs now checks for Lisp stack overflow to avoid fatal errors. + The depth in eval, apply and funcall may not exceed max-lisp-eval-depth. + The depth in variable bindings and unwind-protects may not exceed + max-specpdl-size. If either limit is exceeded, an error occurs. + You can set the limits to larger values if you wish, but if you make them + too large, you are vulnerable to a fatal error if you invoke + Lisp code that does infinite recursion. + +* New hooks find-file-hook and write-file-hook. + Both of these variables if non-nil should be functions of no arguments. + At the time they are called (current-buffer) will be the buffer being + read or written respectively. + + find-file-hook is called whenever a file is read into its own buffer, + such as by calling find-file, revert-buffer, etc. It is not called by + functions such as insert-file which do not read the file into a buffer of + its own. + find-file-hook is called after the file has been read in and its + local variables (if any) have been processed. + + write-file-hook is called just before writing out a file from a buffer. + +* The initial value of shell-prompt-pattern is now "^[^#$%>]*[#$%>] *" + +* If the .emacs file sets inhibit-startup-message to non-nil, + the messages normally printed by Emacs at startup time + are inhibited. + +* Facility for run-time conditionalization on the basis of emacs features. + + The new variable features is a list of symbols which represent "features" + of the executing emacs, for use in run-time conditionalization. + + The function featurep of one argument may be used to test for the + presence of a feature. It is just the same as + (not (null (memq FEATURE features))) where FEATURE is its argument. + For example, (if (featurep 'magic-window-hack) + (transmogrify-window 'vertical) + (split-window-vertically)) + + The function provide of one argument "announces" that FEATURE is present. + It is much the same as (if (not (featurep FEATURE)) + (setq features (cons FEATURE features))) + + The function require with arguments FEATURE and FILE-NAME loads FILE-NAME + (which should contain the form (provide FEATURE)) unless FEATURE is present. + It is much the same as (if (not (featurep FEATURE)) + (progn (load FILE-NAME) + (if (not featurep FEATURE) (error ...)))) + FILE-NAME is optional and defaults to FEATURE. + +* New function load-average. + + This returns a list of three integers, which are + the current 1 minute, 5 minute and 15 minute load averages, + each multiplied by a hundred (since normally they are floating + point numbers). + +* Per-terminal libraries loaded automatically. + + Emacs when starting up on terminal type T automatically loads + a library named term-T. T is the value of the TERM environment variable. + Thus, on terminal type vt100, Emacs would do (load "term-vt100" t t). + Such libraries are good places to set the character translation table. + + It is a bad idea to redefine lots of commands in a per-terminal library, + since this affects all users. Instead, define a command to do the + redefinitions and let the user's init file, which is loaded later, + call that command or not, as the user prefers. + +* Programmer's note: detecting killed buffers. + + Buffers are eliminated by explicitly killing them, using + the function kill-buffer. This does not eliminate or affect + the pointers to the buffer which may exist in list structure. + If you have a pointer to a buffer and wish to tell whether + the buffer has been killed, use the function buffer-name. + It returns nil on a killed buffer, and a string on a live buffer. + +* New ways to access the last command input character. + + The function last-key-struck, which used to return the last + input character that was read by command input, is eliminated. + Instead, you can find this information as the value of the + variable last-command-char. (This variable used to be called + last-key). + + Another new variable, last-input-char, holds the last character + read from the command input stream regardless of what it was + read for. last-input-char and last-command-char are different + only inside a command that has called read-char to read input. + +* The new switch -kill causes Emacs to exit after processing the + preceding command line arguments. Thus, + emacs -l lib data -e do-it -kill + means to load lib, find file data, call do-it on no arguments, + and then exit. + +* The config.h file has been modularized. + + Options that depend on the machine you are running on are defined + in a file whose name starts with "m-", such as m-vax.h. + Options that depend on the operating system software version you are + running on are defined in a file whose name starts with "s-", + such as s-bsd4.2.h. + + config.h includes one m- file and one s- file. It also defines a + few other options whose values do not follow from the machine type + and system type being used. Installers normally will have to + select the correct m- and s- files but will never have to change their + contents. + +* Termcap AL and DL strings are understood. + + If the termcap entry defines AL and DL strings, for insertion + and deletion of multiple lines in one blow, Emacs now uses them. + This matters most on certain bit map display terminals for which + scrolling is comparatively slow. + +* Bias against scrolling screen far on fast terminals. + + Emacs now prefers to redraw a few lines rather than + shift them a long distance on the screen, when the terminal is fast. + +* New major mode, mim-mode. + + This major mode is for editing MDL code. Perhaps a MDL + user can explain why it is not called mdl-mode. + You must load the library mim-mode explicitly to use this. + +* GNU documentation formatter `texinfo'. + + The `texinfo' library defines a format for documentation + files which can be passed through Tex to make a printed manual + or passed through texinfo to make an Info file. Texinfo is + documented fully by its own Info file; compare this file + with its source, texinfo.texinfo, for additional guidance. + + All documentation files for GNU utilities should be written + in texinfo input format. + + Tex processing of texinfo files requires the Botex macro package. + This is not ready for distribution yet, but will appear at + a later time. + +* New function read-from-string (emacs 15.29) + + read-from-string takes three arguments: a string to read from, + and optionally start and end indices which delimit a substring + from which to read. (They default to 0 and the length of the string, + respectively.) + + This function returns a cons cell whose car is the object produced + by reading from the string and whose cdr is a number giving the + index in the string of the first character not read. That index may + be passed as the second argument to a later call to read-from-string + to read the next form represented by the string. + + In addition, the function read now accepts a string as its argument. + In this case, it calls read-from-string on the whole string, and + returns the car of the result. (ie the actual object read.) + + + +Changes in Emacs 14 + +* Completion now prints various messages such as [Sole Completion] + or [Next Character Not Unique] to describe the results obtained. + These messages appear after the text in the minibuffer, and remain + on the screen until a few seconds go by or you type a key. + +* The buffer-read-only flag is implemented. + Setting or binding this per-buffer variable to a non-nil value + makes illegal any operation which would modify the textual content of + the buffer. (Such operations signal a buffer-read-only error) + The read-only state of a buffer may be altered using toggle-read-only + (C-x C-q) + The buffers used by Rmail, Dired, Rnews, and Info are now read-only + by default to prevent accidental damage to the information in those + buffers. + +* Functions car-safe and cdr-safe. + These functions are like car and cdr when the argument is a cons. + Given an argument not a cons, car-safe always returns nil, with + no error; the same for cdr-safe. + +* The new function user-real-login-name returns the name corresponding + to the real uid of the Emacs process. This is usually the same + as what user-login-name returns; however, when Emacs is invoked + from su, user-real-login-name returns "root" but user-login-name + returns the name of the user who invoked su. + + + +Changes in Emacs 13 + +* There is a new version numbering scheme. + + What used to be the first version number, which was 1, + has been discarded since it does not seem that I need three + levels of version number. + + However, a new third version number has been added to represent + changes by user sites. This number will always be zero in + Emacs when I distribute it; it will be incremented each time + Emacs is built at another site. + +* There is now a reader syntax for Meta characters: + \M-CHAR means CHAR or'ed with the Meta bit. For example: + + ?\M-x is (+ ?x 128) + ?\M-\n is (+ ?\n 128) + ?\M-\^f is (+ ?\^f 128) + + This syntax can be used in strings too. Note, however, that + Meta characters are not meaningful in key sequences being passed + to define-key or lookup-key; you must use ESC characters (\e) + in them instead. + + ?\C- can be used likewise for control characters. (13.9) + +* Installation change + The string "../lisp" now adds to the front of the load-path + used for searching for Lisp files during Emacs initialization. + It used to replace the path specified in paths.h entirely. + Now the directory ../lisp is searched first and the directoris + specified in paths.h are searched afterward. + + + +Changes in Emacs 1.12 + +* There is a new installation procedure. + See the file INSTALL that comes in the top level + directory in the tar file or tape. + +* The Meta key is now supported on terminals that have it. + This is a shift key which causes the high bit to be turned on + in all input characters typed while it is held down. + + read-char now returns a value in the range 128-255 if + a Meta character is typed. When interpreted as command + input, a Meta character is equivalent to a two character + sequence, the meta prefix character followed by the un-metized + character (Meta-G unmetized is G). + + The meta prefix character + is specified by the value of the variable meta-prefix-char. + If this character (normally Escape) has been redefined locally + with a non-prefix definition (such as happens in completing + minibuffers) then the local redefinition is suppressed when + the character is not the last one in a key sequence. + So the local redefinition is effective if you type the character + explicitly, but not effective if the character comes from + the use of the Meta key. + +* `-' is no longer a completion command in the minibuffer. + It is an ordinary self-inserting character. + +* The list load-path of directories load to search for Lisp files + is now controlled by the EMACSLOADPATH environment variable +[[ Note this was originally EMACS-LOAD-PATH and has been changed + again; sh does not deal properly with hyphens in env variable names]] + rather than the EPATH environment variable. This is to avoid + conflicts with other Emacses. + + While Emacs is being built initially, the load-path + is now just ("../lisp"), ignoring paths.h. It does not + ignore EMACSLOADPATH, however; you should avoid having + this variable set while building Emacs. + +* You can now specify a translation table for keyboard + input characters, as a way of exchanging or substituting + keys on the keyboard. + + If the value of keyboard-translate-table is a string, + every character received from the keyboard is used as an + index in that string, and the character at that index in + the string is used as input instead of what was actually + typed. If the actual input character is >= the length of + the string, it is used unchanged. + + One way this feature can be used is to fix bad keyboard + designes. For example, on some terminals, Delete is + Shift-Underscore. Since Delete is a more useful character + than Underscore, it is an improvement to make the unshifted + character Delete and the shifted one Underscore. This can + be done with + + ;; First make a translate table that does the identity translation. + (setq keyboard-translate-table (make-string 128 0)) + (let ((i 0)) + (while (< i 128) + (aset keyboard-translate-table i i) + (setq i (1+ i)))) + + ;; Now alter translations of some characters. + (aset keyboard-translate-table ?\_ ?\^?) + (aset keyboard-translate-table ?\^? ?\_) + + If your terminal has a Meta key and can therefore send + codes up to 255, Meta characters are translated through + elements 128 through 255 of the translate table, and therefore + are translated independently of the corresponding non-Meta + characters. You must therefore establish translations + independently for the Meta characters if you want them too: + + ;; First make a translate table that does the identity translation. + (setq keyboard-translate-table (make-string 256 0)) + (let ((i 0)) + (while (< i 256) + (aset keyboard-translate-table i i) + (setq i (1+ i)))) + + ;; Now alter translations of some characters. + (aset keyboard-translate-table ?\_ ?\^?) + (aset keyboard-translate-table ?\^? ?\_) + + ;; Now alter translations of some Meta characters. + (aset keyboard-translate-table (+ 128 ?\_) (+ 128 ?\^?)) + (aset keyboard-translate-table (+ 128 ?\^?) (+ 128 ?\_)) + +* (process-kill-without-query PROCESS) + +This marks the process so that, when you kill Emacs, +you will not on its account be queried about active subprocesses. + + + +Changes in Emacs 1.11 + +* The commands C-c and C-z have been interchanged, + for greater compatibility with normal Unix usage. + C-z now runs suspend-emacs and C-c runs exit-recursive-edit. + +* The value returned by file-name-directory now ends + with a slash. (file-name-directory "foo/bar") => "foo/". + This avoids confusing results when dealing with files + in the root directory. + + The value of the per-buffer variable default-directory + is also supposed to have a final slash now. + +* There are now variables to control the switches passed to + `ls' by the C-x C-d command (list-directory). + list-directory-brief-switches is a string, initially "-CF", + used for brief listings, and list-directory-verbose-switches + is a string, initially "-l", used for verbose ones. + +* For Ann Arbor Ambassador terminals, the termcap "ti" string + is now used to initialize the screen geometry on entry to Emacs, + and the "te" string is used to set it back on exit. + If the termcap entry does not define the "ti" or "te" string, + Emacs does what it used to do. + + + +Changes in Emacs 1.10 + +* GNU Emacs has been made almost 1/3 smaller. + It now dumps out as only 530kbytes on Vax 4.2bsd. + +* The term "checkpoint" has been replaced by "auto save" + throughout the function names, variable names and documentation + of GNU Emacs. + +* The function load now tries appending ".elc" and ".el" + to the specified filename BEFORE it tries the filename + without change. + +* rmail now makes the mode line display the total number + of messages and the current message number. + The "f" command now means forward a message to another user. + The command to search through all messages for a string is now "F". + The "u" command now means to move back to the previous + message and undelete it. To undelete the selected message, use Meta-u. + +* The hyphen character is now equivalent to a Space while + in completing minibuffers. Both mean to complete an additional word. + +* The Lisp function error now takes args like format + which are used to construct the error message. + +* Redisplay will refuse to start its display at the end of the buffer. + It will pick a new place to display from, rather than use that. + +* The value returned by garbage-collect has been changed. + Its first element is no longer a number but a cons, + whose car is the number of cons cells now in use, + and whose cdr is the number of cons cells that have been + made but are now free. + The second element is similar but describes symbols rather than cons cells. + The third element is similar but describes markers. + +* The variable buffer-name has been eliminated. + The function buffer-name still exists. This is to prevent + user programs from changing buffer names without going + through the rename-buffer function. + + + +Changes in Emacs 1.9 + +* When a fill prefix is in effect, paragraphs are started + or separated by lines that do not start with the fill prefix. + Also, a line which consists of the fill prefix followed by + white space separates paragraphs. + +* C-x C-v runs the new function find-alternate-file. + It finds the specified file, switches to that buffer, + and kills the previous current buffer. (It requires + confirmation if that buffer had changes.) This is + most useful after you find the wrong file due to a typo. + +* Exiting the minibuffer moves the cursor to column 0, + to show you that it has really been exited. + +* Meta-g (fill-region) now fills each paragraph in the + region individually. To fill the region as if it were + a single paragraph (for when the paragraph-delimiting mechanism + does the wrong thing), use fill-region-as-paragraph. + +* Tab in text mode now runs the function tab-to-tab-stop. + A new mode called indented-text-mode is like text-mode + except that in it Tab runs the function indent-relative, + which indents the line under the previous line. + If auto fill is enabled while in indented-text-mode, + the new lines that it makes are indented. + +* Functions kill-rectangle and yank-rectangle. + kill-rectangle deletes the rectangle specified by dot and mark + (or by two arguments) and saves it in the variable killed-rectangle. + yank-rectangle inserts the rectangle in that variable. + + Tab characters in a rectangle being saved are replaced + by spaces in such a way that their appearance will + not be changed if the rectangle is later reinserted + at a different column position. + +* `+' in a regular expression now means + to repeat the previous expression one or more times. + `?' means to repeat it zero or one time. + They are in all regards like `*' except for the + number of repetitions they match. + + \< in a regular expression now matches the null string + when it is at the beginning of a word; \> matches + the null string at the end of a word. + +* C-x p narrows the buffer so that only the current page + is visible. + +* C-x ) with argument repeats the kbd macro just + defined that many times, counting the definition + as one repetition. + +* C-x ( with argument begins defining a kbd macro + starting with the last one defined. It executes that + previous kbd macro initially, just as if you began + by typing it over again. + +* C-x q command queries the user during kbd macro execution. + With prefix argument, enters recursive edit, + reading keyboard commands even within a kbd macro. + You can give different commands each time the macro executes. + Without prefix argument, reads a character. Your options are: + Space -- execute the rest of the macro. + Delete -- skip the rest of the macro; start next repetition. + C-d -- skip rest of the macro and don't repeat it any more. + C-r -- enter a recursive edit, then on exit ask again for a character + C-l -- redisplay screen and ask again." + +* write-kbd-macro and append-kbd-macro are used to save + a kbd macro definition in a file (as Lisp code to + redefine the macro when the file is loaded). + These commands differ in that write-kbd-macro + discards the previous contents of the file. + If given a prefix argument, both commands + record the keys which invoke the macro as well as the + macro's definition. + +* The variable global-minor-modes is used to display + strings in the mode line of all buffers. It should be + a list of elements thaht are conses whose cdrs are strings + to be displayed. This complements the variable + minor-modes, which has the same effect but has a separate + value in each buffer. + +* C-x = describes horizontal scrolling in effect, if any. + +* Return now auto-fills the line it is ending, in auto fill mode. + Space with zero as argument auto-fills the line before it + just like Space without an argument. + + + +Changes in Emacs 1.8 + +This release mostly fixes bugs. There are a few new features: + +* apropos now sorts the symbols before displaying them. + Also, it returns a list of the symbols found. + + apropos now accepts a second arg PRED which should be a function + of one argument; if PRED is non-nil, each symbol is tested + with PRED and only symbols for which PRED returns non-nil + appear in the output or the returned list. + + If the third argument to apropos is non-nil, apropos does not + display anything; it merely returns the list of symbols found. + + C-h a now runs the new function command-apropos rather than + apropos, and shows only symbols with definitions as commands. + +* M-x shell sends the command + if (-f ~/.emacs_NAME)source ~/.emacs_NAME + invisibly to the shell when it starts. Here NAME + is replaced by the name of shell used, + as it came from your ESHELL or SHELL environment variable + but with directory name, if any, removed. + +* M-, now runs the command tags-loop-continue, which is used + to resume a terminated tags-search or tags-query-replace. + + + +Changes in Emacs 1.7 + +It's Beat CCA Week. + +* The initial buffer is now called "*scratch*" instead of "scratch", + so that all buffer names used automatically by Emacs now have *'s. + +* Undo information is now stored separately for each buffer. + The Undo command (C-x u) always applies to the current + buffer only. + + C-_ is now a synonym for C-x u. + + (buffer-flush-undo BUFFER) causes undo information not to + be kept for BUFFER, and frees the space that would have + been used to hold it. In any case, no undo information is + kept for buffers whose names start with spaces. (These + buffers also do not appear in the C-x C-b display.) + +* Rectangle operations are now implemented. + C-x r stores the rectangle described by dot and mark + into a register; it reads the register name from the keyboard. + C-x g, the command to insert the contents of a register, + can be used to reinsert the rectangle elsewhere. + + Other rectangle commands include + open-rectangle: + insert a blank rectangle in the position and size + described by dot and mark, at its corners; + the existing text is pushed to the right. + clear-rectangle: + replace the rectangle described by dot ane mark + with blanks. The previous text is deleted. + delete-rectangle: + delete the text of the specified rectangle, + moving the text beyond it on each line leftward. + +* Side-by-side windows are allowed. Use C-x 5 to split the + current window into two windows side by side. + C-x } makes the selected window ARG columns wider at the + expense of the windows at its sides. C-x { makes the selected + window ARG columns narrower. An argument to C-x 5 specifies + how many columns to give to the leftmost of the two windows made. + + C-x 2 now accepts a numeric argument to specify the number of + lines to give to the uppermost of the two windows it makes. + +* Horizontal scrolling of the lines in a window is now implemented. + C-x < (scroll-left) scrolls all displayed lines left, + with the numeric argument (default 1) saying how far to scroll. + When the window is scrolled left, some amount of the beginning + of each nonempty line is replaced by an "$". + C-x > scrolls right. If a window has no text hidden at the left + margin, it cannot be scrolled any farther right than that. + When nonzero leftwards scrolling is in effect in a window. + lines are automatically truncated at the window's right margin + regardless of the value of the variable truncate-lines in the + buffer being displayed. + +* C-x C-d now uses the default output format of `ls', + which gives just file names in multiple columns. + C-u C-x C-d passes the -l switch to `ls'. + +* C-t at the end of a line now exchanges the two preceding characters. + + All the transpose commands now interpret zero as an argument + to mean to transpose the textual unit after or around dot + with the one after or around the mark. + +* M-! executes a shell command in an inferior shell + and displays the output from it. With a prefix argument, + it inserts the output in the current buffer after dot + and sets the mark after the output. The shell command + gets /dev/null as its standard input. + + M-| is like M-! but passes the contents of the region + as input to the shell command. A prefix argument makes + the output from the command replace the contents of the region. + +* The mode line will now say "Def" after the major mode + while a keyboard macro is being defined. + +* The variable fill-prefix is now used by Meta-q. + Meta-q removes the fill prefix from lines that start with it + before filling, and inserts the fill prefix on each line + after filling. + + The command C-x . sets the fill prefix equal to the text + on the current line before dot. + +* The new command Meta-j (indent-new-comment-line), + is like Linefeed (indent-new-line) except when dot is inside a comment; + in that case, Meta-j inserts a comment starter on the new line, + indented under the comment starter above. It also inserts + a comment terminator at the end of the line above, + if the language being edited calls for one. + +* Rmail should work correctly now, and has some C-h m documentation. + + + +Changes in Emacs 1.6 + +* save-buffers-kill-emacs is now on C-x C-c + while C-x C-z does suspend-emacs. This is to make + C-x C-c like the normal Unix meaning of C-c + and C-x C-z linke the normal Unix meaning of C-z. + +* M-ESC (eval-expression) is now a disabled command by default. + This prevents users who type ESC ESC accidentally from + getting confusing results. Put + (put 'eval-expression 'disabled nil) + in your ~/.emacs file to enable the command. + +* Self-inserting text is grouped into bunches for undoing. + Each C-x u command undoes up to 20 consecutive self-inserting + characters. + +* Help f now uses as a default the function being called + in the innermost Lisp expression that dot is in. + This makes it more convenient to use while writing + Lisp code to run in Emacs. + (If the text around dot does not appear to be a call + to a Lisp function, there is no default.) + + Likewise, Help v uses the symbol around or before dot + as a default, if that is a variable name. + +* Commands that read filenames now insert the default + directory in the minibuffer, to become part of your input. + This allows you to see what the default is. + You may type a filename which goes at the end of the + default directory, or you may edit the default directory + as you like to create the input you want to give. + You may also type an absolute pathname (starting with /) + or refer to a home directory (input starting with ~) + after the default; the presence of // or /~ causes + everything up through the slash that precedes your + type-in to be ignored. + + Returning the default directory without change, + including the terminating slash, requests the use + of the default file name (usually the visited file's name). + + Set the variable insert-default-directory to nil + to turn off this feature. + +* M-x shell now uses the environment variable ESHELL, + if it exists, as the file name of the shell to run. + If there is no ESHELL variable, the SHELL variable is used. + This is because some shells do not work properly as inferiors + of Emacs (or anything like Emacs). + +* A new variable minor-modes now exists, with a separate value + in each buffer. Its value should be an alist of elements + (MODE-FUNCTION-SYMBOL . PRETTY-NAME-STRING), one for each + minor mode that is turned on in the buffer. The pretty + name strings are displayed in the mode line after the name of the + major mode (with spaces between them). The mode function + symbols should be symbols whose function definitions will + turn on the minor mode if given 1 as an argument; they are present + so that Help m can find their documentation strings. + +* The format of tag table files has been changed. + The new format enables Emacs to find tags much faster. + + A new program, etags, exists to make the kind of + tag table that Emacs wants. etags is invoked just + like ctags; in fact, if you give it any switches, + it does exactly what ctags would do. Give it the + empty switch ("-") to make it act like ctags with no switches. + + etags names the tag table file "TAGS" rather than "tags", + so that these tag tables and the standard Unix ones + can coexist. + + The tags library can no longer use standard ctags-style + tag tables files. + +* The file of Lisp code Emacs reads on startup is now + called ~/.emacs rather than ~/.emacs_pro. + +* copy-file now gives the copied file the same mode bits + as the original file. + +* Output from a process inserted into the process's buffer + no longer sets the buffer's mark. Instead it sets a + marker associated with the process to point to the end + of the inserted text. You can access this marker with + (process-mark PROCESS) + and then either examine its position with marker-position + or set its position with set-marker. + +* completing-read takes a new optional fifth argument which, + if non-nil, should be a string of text to insert into + the minibuffer before reading user commands. + +* The Lisp function elt now exists: + (elt ARRAY N) is like (aref ARRAY N), + (elt LIST N) is like (nth N LIST). + +* rplaca is now a synonym for setcar, and rplacd for setcdr. + eql is now a synonym for eq; it turns out that the Common Lisp + distinction between eq and eql is insignificant in Emacs. + numberp is a new synonym for integerp. + +* auto-save has been renamed to auto-save-mode. + +* Auto save file names for buffers are now created by the + function make-auto-save-file-name. This is so you can + redefine that function to change the way auto save file names + are chosen. + +* expand-file-name no longer discards a final slash. + (expand-file-name "foo" "/lose") => "/lose/foo" + (expand-file-name "foo/" "/lose") => "/lose/foo/" + + Also, expand-file-name no longer substitutes $ constructs. + A new function substitute-in-file-name does this. Reading + a file name with read-file-name or the `f' or`F' option + of interactive calling uses substitute-in-file-name + on the file name that was read and returns the result. + + All I/O primitives including insert-file-contents and + delete-file call expand-file-name on the file name supplied. + This change makes them considerably faster in the usual case. + +* Interactive calling spec strings allow the new code letter 'D' + which means to read a directory name. It is like 'f' except + that the default if the user makes no change in the minibuffer + is to return the current default directory rather than the + current visited file name. + + + +Changes in Emacs 1.5 + +* suspend-emacs now accepts an optional argument + which is a string to be stuffed as terminal input + to be read by Emacs's superior shell after Emacs exits. + + A library called ledit exists which uses this feature + to transmit text to a Lisp job running as a sibling of + Emacs. + +* If find-file is given the name of a directory, + it automatically invokes dired on that directory + rather than reading in the binary data that make up + the actual contents of the directory according to Unix. + +* Saving an Emacs buffer now preserves the file modes + of any previously existing file with the same name. + This works using new Lisp functions file-modes and + set-file-modes, which can be used to read or set the mode + bits of any file. + +* The Lisp function cond now exists, with its traditional meaning. + +* defvar and defconst now permit the documentation string + to be omitted. defvar also permits the initial value + to be omitted; then it acts only as a comment. + + + +Changes in Emacs 1.4 + +* Auto-filling now normally indents the new line it creates + by calling indent-according-to-mode. This function, meanwhile, + has in Fundamental and Text modes the effect of making the line + have an indentation of the value of left-margin, a per-buffer variable. + + Tab no longer precisely does indent-according-to-mode; + it does that in all modes that supply their own indentation routine, + but in Fundamental, Text and allied modes it inserts a tab character. + +* The command M-x grep now invokes grep (on arguments + supplied by the user) and reads the output from grep + asynchronously into a buffer. The command C-x ` can + be used to move to the lines that grep has found. + This is an adaptation of the mechanism used for + running compilations and finding the loci of error messages. + + You can now use C-x ` even while grep or compilation + is proceeding; as more matches or error messages arrive, + C-x ` will parse them and be able to find them. + +* M-x mail now provides a command to send the message + and "exit"--that is, return to the previously selected + buffer. It is C-z C-z. + +* Tab in C mode now tries harder to adapt to all indentation styles. + If the line being indented is a statement that is not the first + one in the containing compound-statement, it is aligned under + the beginning of the first statement. + +* The functions screen-width and screen-height return the + total width and height of the screen as it is now being used. + set-screen-width and set-screen-height tell Emacs how big + to assume the screen is; they each take one argument, + an integer. + +* The Lisp function 'function' now exists. function is the + same as quote, except that it serves as a signal to the + Lisp compiler that the argument should be compiled as + a function. Example: + (mapcar (function (lambda (x) (+ x 5))) list) + +* The function set-key has been renamed to global-set-key. + undefine-key and local-undefine-key has been renamed to + global-unset-key and local-unset-key. + +* Emacs now collects input from asynchronous subprocesses + while waiting in the functions sleep-for and sit-for. + +* Shell mode's Newline command attempts to distinguish subshell + prompts from user input when issued in the middle of the buffer. + It no longer reexecutes from dot to the end of the line; + it reeexecutes the entire line minus any prompt. + The prompt is recognized by searching for the value of + shell-prompt-pattern, starting from the beginning of the line. + Anything thus skipped is not reexecuted. + + + +Changes in Emacs 1.3 + +* An undo facility exists now. Type C-x u to undo a batch of + changes (usually one command's changes, but some commands + such as query-replace divide their changes into multiple + batches. You can repeat C-x u to undo further. As long + as no commands other than C-x u intervene, each one undoes + another batch. A numeric argument to C-x u acts as a repeat + count. + + If you keep on undoing, eventually you may be told that + you have used up all the recorded undo information. + Some actions, such as reading in files, discard all + undo information. + + The undo information is not currently stored separately + for each buffer, so it is mainly good if you do something + totally spastic. [This has since been fixed.] + +* A learn-by-doing tutorial introduction to Emacs now exists. + Type C-h t to enter it. + +* An Info documentation browser exists. Do M-x info to enter it. + It contains a tutorial introduction so that no more documentation + is needed here. As of now, the only documentation in it + is that of Info itself. + +* Help k and Help c are now different. Help c prints just the + name of the function which the specified key invokes. Help k + prints the documentation of the function as well. + +* A document of the differences between GNU Emacs and Twenex Emacs + now exists. It is called DIFF, in the same directory as this file. + +* C mode can now indent comments better, including multi-line ones. + Meta-Control-q now reindents comment lines within the expression + being aligned. + +* Insertion of a close-parenthesis now shows the matching open-parenthesis + even if it is off screen, by printing the text following it on its line + in the minibuffer. + +* A file can now contain a list of local variable values + to be in effect when the file is edited. See the file DIFF + in the same directory as this file for full details. + +* A function nth is defined. It means the same thing as in Common Lisp. + +* The function install-command has been renamed to set-key. + It now takes the key sequence as the first argument + and the definition for it as the second argument. + Likewise, local-install-command has been renamed to local-set-key. + + + +Changes in Emacs 1.2 + +* A Lisp single-stepping and debugging facility exists. + To cause the debugger to be entered when an error + occurs, set the variable debug-on-error non-nil. + + To cause the debugger to be entered whenever function foo + is called, do (debug-on-entry 'foo). To cancel this, + do (cancel-debug-on-entry 'foo). debug-on-entry does + not work for primitives (written in C), only functions + written in Lisp. Most standard Emacs commands are in Lisp. + + When the debugger is entered, the selected window shows + a buffer called " *Backtrace" which displays a series + of stack frames, most recently entered first. For each + frame, the function name called is shown, usually followed + by the argument values unless arguments are still being + calculated. At the beginning of the buffer is a description + of why the debugger was entered: function entry, function exit, + error, or simply that the user called the function `debug'. + + To exit the debugger and return to top level, type `q'. + + In the debugger, you can evaluate Lisp expressions by + typing `e'. This is equivalent to `M-ESC'. + + When the debugger is entered due to an error, that is + all you can do. When it is entered due to function entry + (such as, requested by debug-on-entry), you have two + options: + Continue execution and reenter debugger after the + completion of the function being entered. Type `c'. + Continue execution but enter the debugger before + the next subexpression. Type `d'. + + You will see that some stack frames are marked with *. + This means the debugger will be entered when those + frames exit. You will see the value being returned + in the first line of the backtrace buffer. Your options: + Continue execution, and return that value. Type `c'. + Continue execution, and return a specified value. Type `r'. + + You can mark a frame to enter the debugger on exit + with the `b' command, or clear such a mark with `u'. + +* Lisp macros now exist. + For example, you can write + (defmacro cadr (arg) (list 'car (list 'cdr arg))) + and then the expression + (cadr foo) + will expand into + (car (cdr foo)) + + + +Changes in Emacs 1.1 + +* The initial buffer is now called "scratch" and is in a + new major mode, Lisp Interaction mode. This mode is + intended for typing Lisp expressions, evaluating them, + and having the values printed into the buffer. + + Type Linefeed after a Lisp expression, to evaluate the + expression and have its value printed into the buffer, + advancing dot. + + The other commands of Lisp mode are available. + +* The C-x C-e command for evaluating the Lisp expression + before dot has been changed to print the value in the + minibuffer line rather than insert it in the buffer. + A numeric argument causes the printed value to appear + in the buffer instead. + +* In Lisp mode, the command M-C-x evaluates the defun + containing or following dot. The value is printed in + the minibuffer. + +* The value of a Lisp expression evaluated using M-ESC + is now printed in the minibuffer. + +* M-q now runs fill-paragraph, independent of major mode. + +* C-h m now prints documentation on the current buffer's + major mode. What it prints is the documentation of the + major mode name as a function. All major modes have been + equipped with documentation that describes all commands + peculiar to the major mode, for this purpose. + +* You can display a Unix manual entry with + the M-x manual-entry command. + +* You can run a shell, displaying its output in a buffer, + with the M-x shell command. The Return key sends input + to the subshell. Output is printed inserted automatically + in the buffer. Commands C-c, C-d, C-u, C-w and C-z are redefined + for controlling the subshell and its subjobs. + "cd", "pushd" and "popd" commands are recognized as you + enter them, so that the default directory of the Emacs buffer + always remains the same as that of the subshell. + +* C-x $ (that's a real dollar sign) controls line-hiding based + on indentation. With a numeric arg N > 0, it causes all lines + indented by N or more columns to become invisible. + They are, effectively, tacked onto the preceding line, where + they are represented by " ..." on the screen. + (The end of the preceding visible line corresponds to a + screen cursor position before the "...". Anywhere in the + invisible lines that follow appears on the screen as a cursor + position after the "...".) + Currently, all editing commands treat invisible lines just + like visible ones, except for C-n and C-p, which have special + code to count visible lines only. + C-x $ with no argument turns off this mode, which in any case + is remembered separately for each buffer. + +* Outline mode is another form of selective display. + It is a major mode invoked with M-x outline-mode. + It is intended for editing files that are structured as + outlines, with heading lines (lines that begin with one + or more asterisks) and text lines (all other lines). + The number of asterisks in a heading line are its level; + the subheadings of a heading line are all following heading + lines at higher levels, until but not including the next + heading line at the same or a lower level, regardless + of intervening text lines. + + In outline mode, you have commands to hide (remove from display) + or show the text or subheadings under each heading line + independently. Hidden text or subheadings are invisibly + attached to the end of the preceding heading line, so that + if you kill the hading line and yank it back elsewhere + all the invisible lines accompany it. + + All editing commands treat hidden outline-mode lines + as part of the preceding visible line. + +* C-x C-z runs save-buffers-kill-emacs + offers to save each file buffer, then exits. + +* C-c's function is now called suspend-emacs. + +* The command C-x m runs mail, which switches to a buffer *mail* + and lets you compose a message to send. C-x 4 m runs mail in + another window. Type C-z C-s in the mail buffer to send the + message according to what you have entered in the buffer. + + You must separate the headers from the message text with + an empty line. + +* You can now dired partial directories (specified with names + containing *'s, etc, all processed by the shell). Also, you + can dired more than one directory; dired names the buffer + according to the filespec or directory name. Reinvoking + dired on a directory already direded just switches back to + the same directory used last time; do M-x revert if you want + to read in the current contents of the directory. + + C-x d runs dired, and C-x 4 d runs dired in another window. + + C-x C-d (list-directory) also allows partial directories now. + + +Lisp programming changes + +* t as an output stream now means "print to the minibuffer". + If there is already text in the minibuffer printed via t + as an output stream, the new text is appended to the old + (or is truncated and lost at the margin). If the minibuffer + contains text put there for some other reason, it is cleared + first. + + t is now the top-level value of standard-output. + + t as an input stream now means "read via the minibuffer". + The minibuffer is used to read a line of input, with editing, + and this line is then parsed. Any excess not used by `read' + is ignored; each `read' from t reads fresh input. + t is now the top-level value of standard-input. + +* A marker may be used as an input stream or an output stream. + The effect is to grab input from where the marker points, + advancing it over the characters read, or to insert output + at the marker and advance it. + +* Output from an asynchronous subprocess is now inserted at + the end of the associated buffer, not at the buffer's dot, + and the buffer's mark is set to the end of the inserted output + each time output is inserted. + +* (pos-visible-in-window-p POS WINDOW) + returns t if position POS in WINDOW's buffer is in the range + that is being displayed in WINDOW; nil if it is scrolled + vertically out of visibility. + + If display in WINDOW is not currently up to date, this function + calculates carefully whether POS would appear if display were + done immediately based on the current (window-start WINDOW). + + POS defaults to (dot), and WINDOW to (selected-window). + +* Variable buffer-alist replaced by function (buffer-list). + The actual alist of buffers used internally by Emacs is now + no longer accessible, to prevent the user from crashing Emacs + by modifying it. The function buffer-list returns a list + of all existing buffers. Modifying this list cannot hurt anything + as a new list is constructed by each call to buffer-list. + +* load now takes an optional third argument NOMSG which, if non-nil, + prevents load from printing a message when it starts and when + it is done. + +* byte-recompile-directory is a new function which finds all + the .elc files in a directory, and regenerates each one which + is older than the corresponding .el (Lisp source) file. + + + ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1985 Richard M. Stallman +Copyright (C) 1985, 1986, 2006 Richard M. Stallman Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/etc/ONEWS.3 b/etc/NEWS.18 similarity index 99% rename from etc/ONEWS.3 rename to etc/NEWS.18 index f7f36c4b1d1..9d68613d1ca 100644 --- a/etc/ONEWS.3 +++ b/etc/NEWS.18 @@ -1,8 +1,10 @@ GNU Emacs NEWS -- history of user-visible changes. 17-Aug-1988 -Copyright (C) 1988 Free Software Foundation, Inc. +Copyright (C) 1988, 2006 Free Software Foundation, Inc. See the end for copying conditions. -For older news, see the file ONEWS.2. +This file is about changes in emacs version 18. + + Changes in version 18.52. @@ -111,6 +113,8 @@ The second is used with the window system: it iconifies the Emacs window. ** VMS: the new function `define-logical-name' allows you to create job-wide logical names. The old function `define-dcl-symbol' has been removed. + + Changes in version 18.50. @@ -166,6 +170,8 @@ Emacs run. End of file causes Emacs to exit. These variables cannot really work because the 24-bit range of an integer in (most ports of) GNU Emacs is not large enough to hold their values on many systems. + + Changes in version 18.45, since version 18.41. @@ -221,6 +227,8 @@ case. You can use either upper or lower case indiscriminately. This is a new name for the function formerly called `define-logical-name'. + + Editing Changes in Emacs 18 @@ -798,6 +806,7 @@ can put in requests at the same time. The client/server work only on Berkeley Unix, since they use the Berkeley sockets mechanism for their communication. + Changes in Lisp programming in Emacs version 18. @@ -1586,13 +1595,13 @@ LD_SWITCH_MACHINE can be defined by the m- file to specify extra `ld' switches. C_DEBUG_SWITCH defines the switches to give `cc' when debugging. Default `-g'. C_OPTIMIZE_SWITCH defines the switches to give `cc' to optimize. Default `-O'. C_SWITCH_MACHINE can be defined by the m- file to specify extra `cc' switches. - -For older news, see the file ONEWS.2. + + ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1988 Free Software Foundation, Inc. +Copyright (C) 1988, 2006 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/etc/ONEWS b/etc/NEWS.19 similarity index 99% rename from etc/ONEWS rename to etc/NEWS.19 index e92965c89d9..2d2e5f57066 100644 --- a/etc/ONEWS +++ b/etc/NEWS.19 @@ -1,10 +1,14 @@ GNU Emacs NEWS -- history of user-visible changes. 1992. -Copyright (C) 1995, 2001 Free Software Foundation, Inc. +Copyright (C) 1993, 1994, 1995, 2001, 2006 Free Software Foundation, Inc. See the end for copying conditions. -For older news, see the file ONEWS.4. +This file is about changes in emacs versions 19. + + * Emacs 19.34 is a bug-fix release with no user-visible changes. + + * Changes in Emacs 19.33. @@ -14,6 +18,8 @@ mode should do that--it is the user's choice.) ** The variable normal-auto-fill-function specifies the function to use for auto-fill-function, if and when Auto Fill is turned on. Major modes can set this locally to alter how Auto Fill works. + + * Editing Changes in Emacs 19.32 @@ -255,6 +261,7 @@ cited text to hide is now customizable. The Gnus manual has been expanded. It explains all these new features in greater detail. + * Lisp Changes in Emacs 19.32 @@ -279,6 +286,8 @@ name. In such a case, you should give that alias symbol a non-nil menu-alias property. That property tells the menu system to look for equivalent keys for the real name instead of equivalent keys for the alias. + + * Editing Changes in Emacs 19.31 @@ -583,6 +592,7 @@ implementation of Emacs timers, see below). **** `M-x list-colors-display' displays all the available colors. **** The `TPU-EDT' package works. + * Lisp changes in Emacs 19.31. @@ -1029,7 +1039,7 @@ your working file with the latest version from the master. *** RCS customization. There is a new variable vc-consult-headers. If it is t (the default), -VC searches for RCS headers in working files (like `$Id: ONEWS,v 1.8 2003/02/04 14:30:40 lektu Exp $') and +VC searches for RCS headers in working files (like `$Id$') and determines the state of the file from them, not from the master file. This is fast and more reliable when you use branches. (The variable was already present in Emacs 19.29, but didn't get mentioned in the @@ -1290,6 +1300,7 @@ new file should include all the special entries from the old one. This new file is under active development as part of the ncurses project. If you have any questions about this file, or problems with an entry in it, email terminfo@ccil.org. + * Lisp changes in Emacs 19.30. @@ -1453,6 +1464,8 @@ sequence containing the events that were used to invoke the command. ** The environment variable NAME, if set, now specifies the value of (user-full-name), when Emacs starts up. + + * User Editing Changes in Emacs 19.29 @@ -2155,6 +2168,7 @@ bibtex-sort-ignore-string-entries is now t. used reference types are now on control-modified keys, mediocre used types are on unmodified keys, seldom used types are on shift-modified keys and almost never used types on meta-modified keys. + * Configuration Changes in Emacs 19.29 @@ -2171,6 +2185,7 @@ automatically enable X support if X is installed on your machine.) mail-host-address to a string in the dumped Emacs, that string becomes the default host address for initializing user-mail-address. It is used instead of the value of (system-name). + * Lisp-Level Changes in Emacs 19.29 @@ -2906,6 +2921,8 @@ three integers.) **** The new function encode-time converts specific items of time information--the second, minute, hour, day, month, year, and time zone--into a time value. + + * Changes in Emacs 19.27 @@ -2921,6 +2938,8 @@ reach the end of a subnode, SPC moves into the next subnode, and so on. DEL more or less scrolls through the same text in reverse order. + + * User Editing Changes in Emacs 19.26 @@ -2998,6 +3017,7 @@ for asking for a list of the subcommands of C-c C-v. setting just one variable, user-mail-address. This currently applies to posting news with GNUS and to making change log entries. It may apply to additional Emacs features in the future. + * Lisp-Level Changes in Emacs 19.26: @@ -3044,6 +3064,7 @@ delete-old-versions. other window for C-M-v to scroll. ** Note that the function fceiling was mistakenly documented as fceil before. + * Changes in cc-mode.el in Emacs 19.26: @@ -3081,11 +3102,15 @@ other window for C-M-v to scroll. ** new buffer-local variable c-comment-start-regexp for (potential) flexibility in adding new modes based on cc-mode.el + + * Changes in Emacs 19.25 The variable x-cross-pointer-shape (which didn't really exist) has been renamed to x-sensitive-text-pointer-shape, and now does exist. + + * Changes in Emacs 19.24 @@ -3110,6 +3135,8 @@ s-region.el Set region by holding shift. skeleton.el Templates for statement insertion. soundex.el Classifying words by how they sound. tempo.el Template insertion with hotspots. + + * User Editing Changes in 19.23. @@ -3407,6 +3434,7 @@ debugged. *** A new command, top-level-nonstop, does not even stop for unwind-protect, as top-level would. + * Changes in CC mode in Emacs 19.23. @@ -3577,6 +3605,7 @@ convention of VariableNamesWithoutUnderscoresButEachWordCapitalized. c-label-offset c-continued-statement-offset c-continued-brace-offset + * Lisp programming changes in Emacs 19.23. @@ -3977,6 +4006,8 @@ Now the file version.el contains only the first two version numbers. The third component is now determined on the basis of the names of the existing executable files. This means that version.el is not altered by building Emacs. + + * Changes in 19.22. @@ -4039,12 +4070,16 @@ greater than what it used to be. It is the position between the two characters whose properties differ, which is one greater than the position of the first character found (while scanning back) with different properties. + + * User editing changes in version 19.21. ** ISO Accents mode supports four additional characters: A-with-ring (entered as /A), AE ligature (entered as /E), and their lower-case equivalents. + + * User editing changes in version 19.20. (See following page for Lisp programming changes.) @@ -4265,6 +4300,7 @@ whether `pushd' behaves like `cd' if no argument is given (`shell-pushd-dextract'), and only add directories to the directory stack if they are not already on it (`shell-pushd-dunique'). The configuration you choose should match the underlying shell, of course. + * Emacs Lisp programming changes in Emacs 19.20. @@ -4442,6 +4478,8 @@ delete-region in comint-previous-matching-input. The input history retrieval commands still wrap-around the input ring, unlike Emacs command history. + + * Changes in version 19.19. @@ -4474,6 +4512,8 @@ taken. ** `%' no longer allows floating point arguments, since the results were often inconsistent with integer `%'. + + * Changes in version 19.18. @@ -4614,6 +4654,8 @@ of the directory containing the Emacs executable that was run. ** The new function minibuffer-window-active-p takes one argument, a minibuffer window, and returns t if the window is currently active. + + * Changes in version 19.17. @@ -4801,6 +4843,7 @@ argument FRAME, which specifies which frames it should affect. + If FRAME is a frame, then `delete-windows-on' only deletes windows on the given frame; other frames are unaffected. + * Changes in version 19.16. @@ -4927,6 +4970,7 @@ in a singleton list when it first inserts the prefix, but doesn't insert the prefix when processing events whose PLACE-SYMBOLs are already thus enclosed. + * Changes in version 19.15. @@ -4973,6 +5017,8 @@ it works the same in Emacs 18 and Emacs 19. (This change actually took place earlier, but we didn't know about it and thus didn't document it.) + + * Changes in version 19.14. @@ -5017,6 +5063,8 @@ and END that specify which part of the file to insert. BEG defaults to 0 (the beginning of the file), and END defaults to the end of the file. If you specify BEG or END, then the argument VISIT must be nil. + + * Changes in version 19.13. @@ -5035,11 +5083,15 @@ the search a case-sensitive one. C-c LETTER, since those keys are reserved for users. Those commands have been moved to C-c M-LETTER. We may move them again for greater consistency with other modes. + + * Changes in version 19.12. ** You can now make many of the sort commands ignore case by setting `sort-fold-case' to a non-nil value. + + * Changes in version 19.11. @@ -5057,6 +5109,8 @@ that you write. This is what `basic-save-buffer' does when it writes a file in the usual way. (This is not actually new, but wasn't documented before.) + + * Changes in version 19.10. @@ -5069,6 +5123,8 @@ The reason for this change is to make function keys work after C-x. the region is highlighted in windows other than the selected window (in Transient Mark mode only, of course, and currently only when using X). + + * Changes in version 19.8. @@ -6458,14 +6514,13 @@ distribution, using the contents of the source tree. Object files, old file versions, executables, DOC files, and other architecture-specific or easy-to-recreate files are not included in the tar file. - -* For older news, see the file ONEWS.4. For Lisp changes in (the first -* release of) Emacs 19, see the file LNEWS. + + ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1993, 1994, 1995, 2001, 2006 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff --git a/etc/NEWS.20 b/etc/NEWS.20 new file mode 100644 index 00000000000..44d5600ecb4 --- /dev/null +++ b/etc/NEWS.20 @@ -0,0 +1,4513 @@ +GNU Emacs NEWS -- history of user-visible changes. 2006-05-31 +Copyright (C) 1999, 2000, 2001, 2006 + Free Software Foundation, Inc. +See the end for copying conditions. + +Please send Emacs bug reports to bug-gnu-emacs@gnu.org. +If possible, use M-x report-emacs-bug. + +This file is about changes in emacs version 20. + + + +* Emacs 20.7 is a bug-fix release with few user-visible changes + +** It is now possible to use CCL-based coding systems for keyboard +input. + +** ange-ftp now handles FTP security extensions, like Kerberos. + +** Rmail has been extended to recognize more forms of digest messages. + +** Now, most coding systems set in keyboard coding system work not +only for character input, but also in incremental search. The +exceptions are such coding systems that handle 2-byte character sets +(e.g euc-kr, euc-jp) and that use ISO's escape sequence +(e.g. iso-2022-jp). They are ignored in incremental search. + +** Support for Macintosh PowerPC-based machines running GNU/Linux has +been added. + + + +* Emacs 20.6 is a bug-fix release with one user-visible change + +** Support for ARM-based non-RISCiX machines has been added. + + + +* Emacs 20.5 is a bug-fix release with no user-visible changes. + +** Not new, but not mentioned before: +M-w when Transient Mark mode is enabled disables the mark. + + + +* Changes in Emacs 20.4 + +** Init file may be called .emacs.el. + +You can now call the Emacs init file `.emacs.el'. +Formerly the name had to be `.emacs'. If you use the name +`.emacs.el', you can byte-compile the file in the usual way. + +If both `.emacs' and `.emacs.el' exist, the latter file +is the one that is used. + +** shell-command, and shell-command-on-region, now return +the exit code of the command (unless it is asynchronous). +Also, you can specify a place to put the error output, +separate from the command's regular output. +Interactively, the variable shell-command-default-error-buffer +says where to put error output; set it to a buffer name. +In calls from Lisp, an optional argument ERROR-BUFFER specifies +the buffer name. + +When you specify a non-nil error buffer (or buffer name), any error +output is inserted before point in that buffer, with \f\n to separate +it from the previous batch of error output. The error buffer is not +cleared, so error output from successive commands accumulates there. + +** Setting the default value of enable-multibyte-characters to nil in +the .emacs file, either explicitly using setq-default, or via Custom, +is now essentially equivalent to using --unibyte: all buffers +created during startup will be made unibyte after loading .emacs. + +** C-x C-f now handles the wildcards * and ? in file names. For +example, typing C-x C-f c*.c RET visits all the files whose names +match c*.c. To visit a file whose name contains * or ?, add the +quoting sequence /: to the beginning of the file name. + +** The M-x commands keep-lines, flush-lines and count-matches +now have the same feature as occur and query-replace: +if the pattern contains any upper case letters, then +they never ignore case. + +** The end-of-line format conversion feature previously mentioned +under `* Emacs 20.1 changes for MS-DOS and MS-Windows' actually +applies to all operating systems. Emacs recognizes from the contents +of a file what convention it uses to separate lines--newline, CRLF, or +just CR--and automatically converts the contents to the normal Emacs +convention (using newline to separate lines) for editing. This is a +part of the general feature of coding system conversion. + +If you subsequently save the buffer, Emacs converts the text back to +the same format that was used in the file before. + +You can turn off end-of-line conversion by setting the variable +`inhibit-eol-conversion' to non-nil, e.g. with Custom in the MULE group. + +** The character set property `prefered-coding-system' has been +renamed to `preferred-coding-system', for the sake of correct spelling. +This is a fairly internal feature, so few programs should be affected. + +** Mode-line display of end-of-line format is changed. +The indication of the end-of-line format of the file visited by a +buffer is now more explicit when that format is not the usual one for +your operating system. For example, the DOS-style end-of-line format +is displayed as "(DOS)" on Unix and GNU/Linux systems. The usual +end-of-line format is still displayed as a single character (colon for +Unix, backslash for DOS and Windows, and forward slash for the Mac). + +The values of the variables eol-mnemonic-unix, eol-mnemonic-dos, +eol-mnemonic-mac, and eol-mnemonic-undecided, which are strings, +control what is displayed in the mode line for each end-of-line +format. You can now customize these variables. + +** In the previous version of Emacs, tar-mode didn't work well if a +filename contained non-ASCII characters. Now this is fixed. Such a +filename is decoded by file-name-coding-system if the default value of +enable-multibyte-characters is non-nil. + +** The command temp-buffer-resize-mode toggles a minor mode +in which temporary buffers (such as help buffers) are given +windows just big enough to hold the whole contents. + +** If you use completion.el, you must now run the function +dynamic-completion-mode to enable it. Just loading the file +doesn't have any effect. + +** In Flyspell mode, the default is now to make just one Ispell process, +not one per buffer. + +** If you use iswitchb but do not call (iswitchb-default-keybindings) to +use the default keybindings, you will need to add the following line: + (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup) + +** Auto-show mode is no longer enabled just by loading auto-show.el. +To control it, set `auto-show-mode' via Custom or use the +`auto-show-mode' command. + +** Handling of X fonts' ascent/descent parameters has been changed to +avoid redisplay problems. As a consequence, compared with previous +versions the line spacing and frame size now differ with some font +choices, typically increasing by a pixel per line. This change +occurred in version 20.3 but was not documented then. + +** If you select the bar cursor style, it uses the frame's +cursor-color, rather than the cursor foreground pixel. + +** In multibyte mode, Rmail decodes incoming MIME messages using the +character set specified in the message. If you want to disable this +feature, set the variable rmail-decode-mime-charset to nil. + +** Not new, but not mentioned previously in NEWS: when you use #! at +the beginning of a file to make it executable and specify an +interpreter program, Emacs looks on the second line for the -*- mode +and variable specification, as well as on the first line. + +** Support for IBM codepage encoding of non-ASCII characters. + +The new command M-x codepage-setup creates a special coding system +that can be used to convert text between a specific IBM codepage and +one of the character sets built into Emacs which matches that +codepage. For example, codepage 850 corresponds to Latin-1 character +set, codepage 855 corresponds to Cyrillic-ISO character set, etc. + +Windows codepages 1250, 1251 and some others, where Windows deviates +from the corresponding ISO character set, are also supported. + +IBM box-drawing characters and other glyphs which don't have +equivalents in the corresponding ISO character set, are converted to +a character defined by dos-unsupported-char-glyph on MS-DOS, and to +`?' on other systems. + +IBM codepages are widely used on MS-DOS and MS-Windows, so this +feature is most useful on those platforms, but it can also be used on +Unix. + +Emacs compiled for MS-DOS automatically loads the support for the +current codepage when it starts. + +** Mail changes + +*** When mail is sent using compose-mail (C-x m), and if +`mail-send-nonascii' is set to the new default value `mime', +appropriate MIME headers are added. The headers are added only if +non-ASCII characters are present in the body of the mail, and no other +MIME headers are already present. For example, the following three +headers are added if the coding system used in the *mail* buffer is +latin-1: + + MIME-version: 1.0 + Content-type: text/plain; charset=iso-8859-1 + Content-Transfer-Encoding: 8bit + +*** The new variable default-sendmail-coding-system specifies the +default way to encode outgoing mail. This has higher priority than +default-buffer-file-coding-system but has lower priority than +sendmail-coding-system and the local value of +buffer-file-coding-system. + +You should not set this variable manually. Instead, set +sendmail-coding-system to specify a fixed encoding for all outgoing +mail. + +*** When you try to send a message that contains non-ASCII characters, +if the coding system specified by those variables doesn't handle them, +Emacs will ask you to select a suitable coding system while showing a +list of possible coding systems. + +** CC Mode changes + +*** c-default-style can now take an association list that maps major +modes to style names. When this variable is an alist, Java mode no +longer hardcodes a setting to "java" style. See the variable's +docstring for details. + +*** It's now possible to put a list as the offset on a syntactic +symbol. The list is evaluated recursively until a non-nil offset is +found. This is useful to combine several lineup functions to act in a +prioritized order on a single line. However, none of the supplied +lineup functions use this feature currently. + +*** New syntactic symbol catch-clause, which is used on the "catch" and +"finally" lines in try-catch constructs in C++ and Java. + +*** New cleanup brace-catch-brace on c-cleanup-list, which does for +"catch" lines what brace-elseif-brace does for "else if" lines. + +*** The braces of Java anonymous inner classes are treated separately +from the braces of other classes in auto-newline mode. Two new +symbols inexpr-class-open and inexpr-class-close may be used on +c-hanging-braces-alist to control the automatic newlines used for +anonymous classes. + +*** Support for the Pike language added, along with new Pike specific +syntactic symbols: inlambda, lambda-intro-cont + +*** Support for Java anonymous classes via new syntactic symbol +inexpr-class. New syntactic symbol inexpr-statement for Pike +support and gcc-style statements inside expressions. New lineup +function c-lineup-inexpr-block. + +*** New syntactic symbol brace-entry-open which is used in brace lists +(i.e. static initializers) when a list entry starts with an open +brace. These used to be recognized as brace-list-entry's. +c-electric-brace also recognizes brace-entry-open braces +(brace-list-entry's can no longer be electrified). + +*** New command c-indent-line-or-region, not bound by default. + +*** `#' is only electric when typed in the indentation of a line. + +*** Parentheses are now electric (via the new command c-electric-paren) +for auto-reindenting lines when parens are typed. + +*** In "gnu" style, inline-open offset is now set to zero. + +*** Uniform handling of the inclass syntactic symbol. The indentation +associated with it is now always relative to the class opening brace. +This means that the indentation behavior has changed in some +circumstances, but only if you've put anything besides 0 on the +class-open syntactic symbol (none of the default styles do that). + +** Gnus changes. + +*** New functionality for using Gnus as an offline newsreader has been +added. A plethora of new commands and modes have been added. See the +Gnus manual for the full story. + +*** The nndraft backend has returned, but works differently than +before. All Message buffers are now also articles in the nndraft +group, which is created automatically. + +*** `gnus-alter-header-function' can now be used to alter header +values. + +*** `gnus-summary-goto-article' now accept Message-ID's. + +*** A new Message command for deleting text in the body of a message +outside the region: `C-c C-v'. + +*** You can now post to component group in nnvirtual groups with +`C-u C-c C-c'. + +*** `nntp-rlogin-program' -- new variable to ease customization. + +*** `C-u C-c C-c' in `gnus-article-edit-mode' will now inhibit +re-highlighting of the article buffer. + +*** New element in `gnus-boring-article-headers' -- `long-to'. + +*** `M-i' symbolic prefix command. See the section "Symbolic +Prefixes" in the Gnus manual for details. + +*** `L' and `I' in the summary buffer now take the symbolic prefix +`a' to add the score rule to the "all.SCORE" file. + +*** `gnus-simplify-subject-functions' variable to allow greater +control over simplification. + +*** `A T' -- new command for fetching the current thread. + +*** `/ T' -- new command for including the current thread in the +limit. + +*** `M-RET' is a new Message command for breaking cited text. + +*** \\1-expressions are now valid in `nnmail-split-methods'. + +*** The `custom-face-lookup' function has been removed. +If you used this function in your initialization files, you must +rewrite them to use `face-spec-set' instead. + +*** Canceling now uses the current select method. Symbolic prefix +`a' forces normal posting method. + +*** New command to translate M******** sm*rtq**t*s into proper text +-- `W d'. + +*** For easier debugging of nntp, you can set `nntp-record-commands' +to a non-nil value. + +*** nntp now uses ~/.authinfo, a .netrc-like file, for controlling +where and how to send AUTHINFO to NNTP servers. + +*** A command for editing group parameters from the summary buffer +has been added. + +*** A history of where mails have been split is available. + +*** A new article date command has been added -- `article-date-iso8601'. + +*** Subjects can be simplified when threading by setting +`gnus-score-thread-simplify'. + +*** A new function for citing in Message has been added -- +`message-cite-original-without-signature'. + +*** `article-strip-all-blank-lines' -- new article command. + +*** A new Message command to kill to the end of the article has +been added. + +*** A minimum adaptive score can be specified by using the +`gnus-adaptive-word-minimum' variable. + +*** The "lapsed date" article header can be kept continually +updated by the `gnus-start-date-timer' command. + +*** Web listserv archives can be read with the nnlistserv backend. + +*** Old dejanews archives can now be read by nnweb. + +*** `gnus-posting-styles' has been re-activated. + +** Changes to TeX and LaTeX mode + +*** The new variable `tex-start-options-string' can be used to give +options for the TeX run. The default value causes TeX to run in +nonstopmode. For an interactive TeX run set it to nil or "". + +*** The command `tex-feed-input' sends input to the Tex Shell. In a +TeX buffer it is bound to the keys C-RET, C-c RET, and C-c C-m (some +of these keys may not work on all systems). For instance, if you run +TeX interactively and if the TeX run stops because of an error, you +can continue it without leaving the TeX buffer by typing C-RET. + +*** The Tex Shell Buffer is now in `compilation-shell-minor-mode'. +All error-parsing commands of the Compilation major mode are available +but bound to keys that don't collide with the shell. Thus you can use +the Tex Shell for command line executions like a usual shell. + +*** The commands `tex-validate-region' and `tex-validate-buffer' check +the matching of braces and $'s. The errors are listed in a *Occur* +buffer and you can use C-c C-c or mouse-2 to go to a particular +mismatch. + +** Changes to RefTeX mode + +*** The table of contents buffer can now also display labels and +file boundaries in addition to sections. Use `l', `i', and `c' keys. + +*** Labels derived from context (the section heading) are now +lowercase by default. To make the label legal in LaTeX, latin-1 +characters will lose their accent. All Mule characters will be +removed from the label. + +*** The automatic display of cross reference information can also use +a window instead of the echo area. See variable `reftex-auto-view-crossref'. + +*** kpsewhich can be used by RefTeX to find TeX and BibTeX files. See the +customization group `reftex-finding-files'. + +*** The option `reftex-bibfile-ignore-list' has been renamed to +`reftex-bibfile-ignore-regexps' and indeed can be fed with regular +expressions. + +*** Multiple Selection buffers are now hidden buffers. + +** New/deleted modes and packages + +*** The package snmp-mode.el provides major modes for editing SNMP and +SNMPv2 MIBs. It has entries on `auto-mode-alist'. + +*** The package sql.el provides a major mode, M-x sql-mode, for +editing SQL files, and M-x sql-interactive-mode for interacting with +SQL interpreters. It has an entry on `auto-mode-alist'. + +*** ispell4.el has been deleted. It got in the way of ispell.el and +this was hard to fix reliably. It has long been obsolete -- use +Ispell 3.1 and ispell.el. + + +* MS-DOS changes in Emacs 20.4 + +** Emacs compiled for MS-DOS now supports MULE features better. +This includes support for display of all ISO 8859-N character sets, +conversion to and from IBM codepage encoding of non-ASCII characters, +and automatic setup of the MULE environment at startup. For details, +check out the section `MS-DOS and MULE' in the manual. + +The MS-DOS installation procedure automatically configures and builds +Emacs with input method support if it finds an unpacked Leim +distribution when the config.bat script is run. + +** Formerly, the value of lpr-command did not affect printing on +MS-DOS unless print-region-function was set to nil, but now it +controls whether an external program is invoked or output is written +directly to a printer port. Similarly, in the previous version of +Emacs, the value of ps-lpr-command did not affect PostScript printing +on MS-DOS unless ps-printer-name was set to something other than a +string (eg. t or `pipe'), but now it controls whether an external +program is used. (These changes were made so that configuration of +printing variables would be almost identical across all platforms.) + +** In the previous version of Emacs, PostScript and non-PostScript +output was piped to external programs, but because most print programs +available for MS-DOS and MS-Windows cannot read data from their standard +input, on those systems the data to be output is now written to a +temporary file whose name is passed as the last argument to the external +program. + +An exception is made for `print', a standard program on Windows NT, +and `nprint', a standard program on Novell Netware. For both of these +programs, the command line is constructed in the appropriate syntax +automatically, using only the value of printer-name or ps-printer-name +as appropriate--the value of the relevant `-switches' variable is +ignored, as both programs have no useful switches. + +** The value of the variable dos-printer (cf. dos-ps-printer), if it has +a value, overrides the value of printer-name (cf. ps-printer-name), on +MS-DOS and MS-Windows only. This has been true since version 20.3, but +was not documented clearly before. + +** All the Emacs games now work on MS-DOS terminals. +This includes Tetris and Snake. + + +* Lisp changes in Emacs 20.4 + +** New functions line-beginning-position and line-end-position +return the position of the beginning or end of the current line. +They both accept an optional argument, which has the same +meaning as the argument to beginning-of-line or end-of-line. + +** find-file and allied functions now have an optional argument +WILDCARD. If this is non-nil, they do wildcard processing, +and visit all files that match the wildcard pattern. + +** Changes in the file-attributes function. + +*** The file size returned by file-attributes may be an integer or a float. +It is an integer if the size fits in a Lisp integer, float otherwise. + +*** The inode number returned by file-attributes may be an integer (if +the number fits in a Lisp integer) or a cons cell containing two +integers. + +** The new function directory-files-and-attributes returns a list of +files in a directory and their attributes. It accepts the same +arguments as directory-files and has similar semantics, except that +file names and attributes are returned. + +** The new function file-attributes-lessp is a helper function for +sorting the list generated by directory-files-and-attributes. It +accepts two arguments, each a list of a file name and its attributes. +It compares the file names of each according to string-lessp and +returns the result. + +** The new function file-expand-wildcards expands a wildcard-pattern +to produce a list of existing files that match the pattern. + +** New functions for base64 conversion: + +The function base64-encode-region converts a part of the buffer +into the base64 code used in MIME. base64-decode-region +performs the opposite conversion. Line-breaking is supported +optionally. + +Functions base64-encode-string and base64-decode-string do a similar +job on the text in a string. They return the value as a new string. + +** +The new function process-running-child-p +will tell you if a subprocess has given control of its +terminal to its own child process. + +** interrupt-process and such functions have a new feature: +when the second argument is `lambda', they send a signal +to the running child of the subshell, if any, but if the shell +itself owns its terminal, no signal is sent. + +** There are new widget types `plist' and `alist' which can +be used for customizing variables whose values are plists or alists. + +** easymenu.el now understands `:key-sequence' and `:style button'. +:included is an alias for :visible. + +easy-menu-add-item now understands the values returned by +easy-menu-remove-item and easy-menu-item-present-p. This can be used +to move or copy menu entries. + +** Multibyte editing changes + +*** The definitions of sref and char-bytes are changed. Now, sref is +an alias of aref and char-bytes always returns 1. This change is to +make some Emacs Lisp code which works on 20.2 and earlier also +work on the latest Emacs. Such code uses a combination of sref and +char-bytes in a loop typically as below: + (setq char (sref str idx) + idx (+ idx (char-bytes idx))) +The byte-compiler now warns that this is obsolete. + +If you want to know how many bytes a specific multibyte character +(say, CH) occupies in a multibyte buffer, use this code: + (charset-bytes (char-charset ch)) + +*** In multibyte mode, when you narrow a buffer to some region, and the +region is preceded or followed by non-ASCII codes, inserting or +deleting at the head or the end of the region may signal this error: + + Byte combining across boundary of accessible buffer text inhibited + +This is to avoid some bytes being combined together into a character +across the boundary. + +*** The functions find-charset-region and find-charset-string include +`unknown' in the returned list in the following cases: + o The current buffer or the target string is unibyte and + contains 8-bit characters. + o The current buffer or the target string is multibyte and + contains invalid characters. + +*** The functions decode-coding-region and encode-coding-region remove +text properties of the target region. Ideally, they should correctly +preserve text properties, but for the moment, it's hard. Removing +text properties is better than preserving them in a less-than-correct +way. + +*** prefer-coding-system sets EOL conversion of default coding systems. +If the argument to prefer-coding-system specifies a certain type of +end of line conversion, the default coding systems set by +prefer-coding-system will specify that conversion type for end of line. + +*** The new function thai-compose-string can be used to properly +compose Thai characters in a string. + +** The primitive `define-prefix-command' now takes an optional third +argument NAME, which should be a string. It supplies the menu name +for the created keymap. Keymaps created in order to be displayed as +menus should always use the third argument. + +** The meanings of optional second arguments for read-char, +read-event, and read-char-exclusive are flipped. Now the second +arguments are INHERIT-INPUT-METHOD. These functions use the current +input method (if any) if and only if INHERIT-INPUT-METHOD is non-nil. + +** The new function clear-this-command-keys empties out the contents +of the vector that (this-command-keys) returns. This is useful in +programs that read passwords, to prevent the passwords from echoing +inadvertently as part of the next command in certain cases. + +** The new macro `with-temp-message' displays a temporary message in +the echo area, while executing some Lisp code. Like `progn', it +returns the value of the last form, but it also restores the previous +echo area contents. + + (with-temp-message MESSAGE &rest BODY) + +** The function `require' now takes an optional third argument +NOERROR. If it is non-nil, then there is no error if the +requested feature cannot be loaded. + +** In the function modify-face, an argument of (nil) for the +foreground color, background color or stipple pattern +means to clear out that attribute. + +** The `outer-window-id' frame property of an X frame +gives the window number of the outermost X window for the frame. + +** Temporary buffers made with with-output-to-temp-buffer are now +read-only by default, and normally use the major mode Help mode +unless you put them in some other non-Fundamental mode before the +end of with-output-to-temp-buffer. + +** The new functions gap-position and gap-size return information on +the gap of the current buffer. + +** The new functions position-bytes and byte-to-position provide a way +to convert between character positions and byte positions in the +current buffer. + +** vc.el defines two new macros, `edit-vc-file' and `with-vc-file', to +facilitate working with version-controlled files from Lisp programs. +These macros check out a given file automatically if needed, and check +it back in after any modifications have been made. + + + +* Installation Changes in Emacs 20.3 + +** The default value of load-path now includes most subdirectories of +the site-specific directories /usr/local/share/emacs/site-lisp and +/usr/local/share/emacs/VERSION/site-lisp, in addition to those +directories themselves. Both immediate subdirectories and +subdirectories multiple levels down are added to load-path. + +Not all subdirectories are included, though. Subdirectories whose +names do not start with a letter or digit are excluded. +Subdirectories named RCS or CVS are excluded. Also, a subdirectory +which contains a file named `.nosearch' is excluded. You can use +these methods to prevent certain subdirectories from being searched. + +Emacs finds these subdirectories and adds them to load-path when it +starts up. While it would be cleaner to find the subdirectories each +time Emacs loads a file, that would be much slower. + +This feature is an incompatible change. If you have stored some Emacs +Lisp files in a subdirectory of the site-lisp directory specifically +to prevent them from being used, you will need to rename the +subdirectory to start with a non-alphanumeric character, or create a +`.nosearch' file in it, in order to continue to achieve the desired +results. + +** Emacs no longer includes an old version of the C preprocessor from +GCC. This was formerly used to help compile Emacs with C compilers +that had limits on the significant length of an identifier, but in +fact we stopped supporting such compilers some time ago. + + +* Changes in Emacs 20.3 + +** The new command C-x z (repeat) repeats the previous command +including its argument. If you repeat the z afterward, +it repeats the command additional times; thus, you can +perform many repetitions with one keystroke per repetition. + +** Emacs now supports "selective undo" which undoes only within a +specified region. To do this, set point and mark around the desired +region and type C-u C-x u (or C-u C-_). You can then continue undoing +further, within the same region, by repeating the ordinary undo +command C-x u or C-_. This will keep undoing changes that were made +within the region you originally specified, until either all of them +are undone, or it encounters a change which crosses the edge of that +region. + +In Transient Mark mode, undoing when a region is active requests +selective undo. + +** If you specify --unibyte when starting Emacs, then all buffers are +unibyte, except when a Lisp program specifically creates a multibyte +buffer. Setting the environment variable EMACS_UNIBYTE has the same +effect. The --no-unibyte option overrides EMACS_UNIBYTE and directs +Emacs to run normally in multibyte mode. + +The option --unibyte does not affect the reading of Emacs Lisp files, +though. If you want a Lisp file to be read in unibyte mode, use +-*-unibyte: t;-*- on its first line. That will force Emacs to +load that file in unibyte mode, regardless of how Emacs was started. + +** toggle-enable-multibyte-characters no longer has a key binding and +no longer appears in the menu bar. We've realized that changing the +enable-multibyte-characters variable in an existing buffer is +something that most users not do. + +** You can specify a coding system to use for the next cut or paste +operations through the window system with the command C-x RET X. +The coding system can make a difference for communication with other +applications. + +C-x RET x specifies a coding system for all subsequent cutting and +pasting operations. + +** You can specify the printer to use for commands that do printing by +setting the variable `printer-name'. Just what a printer name looks +like depends on your operating system. You can specify a different +printer for the Postscript printing commands by setting +`ps-printer-name'. + +** Emacs now supports on-the-fly spell checking by the means of a +minor mode. It is called M-x flyspell-mode. You don't have to remember +any other special commands to use it, and you will hardly notice it +except when you make a spelling error. Flyspell works by highlighting +incorrect words as soon as they are completed or as soon as the cursor +hits a new word. + +Flyspell mode works with whichever dictionary you have selected for +Ispell in Emacs. In TeX mode, it understands TeX syntax so as not +to be confused by TeX commands. + +You can correct a misspelled word by editing it into something +correct. You can also correct it, or accept it as correct, by +clicking on the word with Mouse-2; that gives you a pop-up menu +of various alternative replacements and actions. + +Flyspell mode also proposes "automatic" corrections. M-TAB replaces +the current misspelled word with a possible correction. If several +corrections are made possible, M-TAB cycles through them in +alphabetical order, or in order of decreasing likelihood if +flyspell-sort-corrections is nil. + +Flyspell mode also flags an error when a word is repeated, if +flyspell-mark-duplications-flag is non-nil. + +** Changes in input method usage. + +Now you can use arrow keys (right, left, down, up) for selecting among +the alternatives just the same way as you do by C-f, C-b, C-n, and C-p +respectively. + +You can use the ENTER key to accept the current conversion. + +If you type TAB to display a list of alternatives, you can select one +of the alternatives with Mouse-2. + +The meaning of the variable `input-method-verbose-flag' is changed so +that you can set it to t, nil, `default', or `complex-only'. + + If the value is nil, extra guidance is never given. + + If the value is t, extra guidance is always given. + + If the value is `complex-only', extra guidance is always given only + when you are using complex input methods such as chinese-py. + + If the value is `default' (this is the default), extra guidance is + given in the following case: + o When you are using a complex input method. + o When you are using a simple input method but not in the minibuffer. + +If you are using Emacs through a very slow line, setting +input-method-verbose-flag to nil or to complex-only is a good choice, +and if you are using an input method you are not familiar with, +setting it to t is helpful. + +The old command select-input-method is now called set-input-method. + +In the language environment "Korean", you can use the following +keys: + Shift-SPC toggle-korean-input-method + C-F9 quail-hangul-switch-symbol-ksc + F9 quail-hangul-switch-hanja +These key bindings are canceled when you switch to another language +environment. + +** The minibuffer history of file names now records the specified file +names, not the entire minibuffer input. For example, if the +minibuffer starts out with /usr/foo/, you might type in /etc/passwd to +get + + /usr/foo//etc/passwd + +which stands for the file /etc/passwd. + +Formerly, this used to put /usr/foo//etc/passwd in the history list. +Now this puts just /etc/passwd in the history list. + +** If you are root, Emacs sets backup-by-copying-when-mismatch to t +at startup, so that saving a file will be sure to preserve +its owner and group. + +** find-func.el can now also find the place of definition of Emacs +Lisp variables in user-loaded libraries. + +** C-x r t (string-rectangle) now deletes the existing rectangle +contents before inserting the specified string on each line. + +** There is a new command delete-whitespace-rectangle +which deletes whitespace starting from a particular column +in all the lines on a rectangle. The column is specified +by the left edge of the rectangle. + +** You can now store a number into a register with C-u NUMBER C-x r n REG, +increment it by INC with C-u INC C-x r + REG (to increment by one, omit +C-u INC), and insert it in the buffer with C-x r g REG. This is useful +for writing keyboard macros. + +** The new command M-x speedbar displays a frame in which directories, +files, and tags can be displayed, manipulated, and jumped to. The +frame defaults to 20 characters in width, and is the same height as +the frame that it was started from. Some major modes define +additional commands for the speedbar, including Rmail, GUD/GDB, and +info. + +** query-replace-regexp is now bound to C-M-%. + +** In Transient Mark mode, when the region is active, M-x +query-replace and the other replace commands now operate on the region +contents only. + +** M-x write-region, when used interactively, now asks for +confirmation before overwriting an existing file. When you call +the function from a Lisp program, a new optional argument CONFIRM +says whether to ask for confirmation in this case. + +** If you use find-file-literally and the file is already visited +non-literally, the command asks you whether to revisit the file +literally. If you say no, it signals an error. + +** Major modes defined with the "derived mode" feature +now use the proper name for the mode hook: WHATEVER-mode-hook. +Formerly they used the name WHATEVER-mode-hooks, but that is +inconsistent with Emacs conventions. + +** shell-command-on-region (and shell-command) reports success or +failure if the command produces no output. + +** Set focus-follows-mouse to nil if your window system or window +manager does not transfer focus to another window when you just move +the mouse. + +** mouse-menu-buffer-maxlen has been renamed to +mouse-buffer-menu-maxlen to be consistent with the other related +function and variable names. + +** The new variable auto-coding-alist specifies coding systems for +reading specific files. This has higher priority than +file-coding-system-alist. + +** If you set the variable unibyte-display-via-language-environment to +t, then Emacs displays non-ASCII characters are displayed by +converting them to the equivalent multibyte characters according to +the current language environment. As a result, they are displayed +according to the current fontset. + +** C-q's handling of codes in the range 0200 through 0377 is changed. + +The codes in the range 0200 through 0237 are inserted as one byte of +that code regardless of the values of nonascii-translation-table and +nonascii-insert-offset. + +For the codes in the range 0240 through 0377, if +enable-multibyte-characters is non-nil and nonascii-translation-table +nor nonascii-insert-offset can't convert them to valid multibyte +characters, they are converted to Latin-1 characters. + +** If you try to find a file that is not read-accessible, you now get +an error, rather than an empty buffer and a warning. + +** In the minibuffer history commands M-r and M-s, an upper case +letter in the regular expression forces case-sensitive search. + +** In the *Help* buffer, cross-references to commands and variables +are inferred and hyperlinked. Use C-h m in Help mode for the relevant +command keys. + +** M-x apropos-command, with a prefix argument, no longer looks for +user option variables--instead it looks for noninteractive functions. + +Meanwhile, the command apropos-variable normally searches for +user option variables; with a prefix argument, it looks at +all variables that have documentation. + +** When you type a long line in the minibuffer, and the minibuffer +shows just one line, automatically scrolling works in a special way +that shows you overlap with the previous line of text. The variable +minibuffer-scroll-overlap controls how many characters of overlap +it should show; the default is 20. + +Meanwhile, Resize Minibuffer mode is still available; in that mode, +the minibuffer grows taller (up to a point) as needed to show the whole +of your input. + +** The new command M-x customize-changed-options lets you customize +all the options whose meanings or default values have changed in +recent Emacs versions. You specify a previous Emacs version number as +argument, and the command creates a customization buffer showing all +the customizable options which were changed since that version. +Newly added options are included as well. + +If you don't specify a particular version number argument, +then the customization buffer shows all the customizable options +for which Emacs versions of changes are recorded. + +This function is also bound to the Changed Options entry in the +Customize menu. + +** When you run M-x grep with a prefix argument, it figures out +the tag around point and puts that into the default grep command. + +** The new command M-* (pop-tag-mark) pops back through a history of +buffer positions from which M-. or other tag-finding commands were +invoked. + +** The new variable comment-padding specifies the number of spaces +that `comment-region' will insert before the actual text of the comment. +The default is 1. + +** In Fortran mode the characters `.', `_' and `$' now have symbol +syntax, not word syntax. Fortran mode now supports `imenu' and has +new commands fortran-join-line (M-^) and fortran-narrow-to-subprogram +(C-x n d). M-q can be used to fill a statement or comment block +sensibly. + +** GUD now supports jdb, the Java debugger, and pdb, the Python debugger. + +** If you set the variable add-log-keep-changes-together to a non-nil +value, the command `C-x 4 a' will automatically notice when you make +two entries in one day for one file, and combine them. + +** You can use the command M-x diary-mail-entries to mail yourself a +reminder about upcoming diary entries. See the documentation string +for a sample shell script for calling this function automatically +every night. + +** Desktop changes + +*** All you need to do to enable use of the Desktop package, is to set +the variable desktop-enable to t with Custom. + +*** Minor modes are now restored. Which minor modes are restored +and how modes are restored is controlled by `desktop-minor-mode-table'. + +** There is no need to do anything special, now, to enable Gnus to +read and post multi-lingual articles. + +** Outline mode has now support for showing hidden outlines when +doing an isearch. In order for this to happen search-invisible should +be set to open (the default). If an isearch match is inside a hidden +outline the outline is made visible. If you continue pressing C-s and +the match moves outside the formerly invisible outline, the outline is +made invisible again. + +** Mail reading and sending changes + +*** The Rmail e command now switches to displaying the whole header of +the message before it lets you edit the message. This is so that any +changes you make in the header will not be lost if you subsequently +toggle. + +*** The w command in Rmail, which writes the message body into a file, +now works in the summary buffer as well. (The command to delete the +summary buffer is now Q.) The default file name for the w command, if +the message has no subject, is stored in the variable +rmail-default-body-file. + +*** Most of the commands and modes that operate on mail and netnews no +longer depend on the value of mail-header-separator. Instead, they +handle whatever separator the buffer happens to use. + +*** If you set mail-signature to a value which is not t, nil, or a string, +it should be an expression. When you send a message, this expression +is evaluated to insert the signature. + +*** The new Lisp library feedmail.el (version 8) enhances processing of +outbound email messages. It works in coordination with other email +handling packages (e.g., rmail, VM, gnus) and is responsible for +putting final touches on messages and actually submitting them for +transmission. Users of the emacs program "fakemail" might be +especially interested in trying feedmail. + +feedmail is not enabled by default. See comments at the top of +feedmail.el for set-up instructions. Among the bigger features +provided by feedmail are: + +**** you can park outgoing messages into a disk-based queue and +stimulate sending some or all of them later (handy for laptop users); +there is also a queue for draft messages + +**** you can get one last look at the prepped outbound message and +be prompted for confirmation + +**** does smart filling of address headers + +**** can generate a MESSAGE-ID: line and a DATE: line; the date can be +the time the message was written or the time it is being sent; this +can make FCC copies more closely resemble copies that recipients get + +**** you can specify an arbitrary function for actually transmitting +the message; included in feedmail are interfaces for /bin/[r]mail, +/usr/lib/sendmail, and Emacs Lisp smtpmail; it's easy to write a new +function for something else (10-20 lines of Lisp code). + +** Dired changes + +*** The Dired function dired-do-toggle, which toggles marked and unmarked +files, is now bound to "t" instead of "T". + +*** dired-at-point has been added to ffap.el. It allows one to easily +run Dired on the directory name at point. + +*** Dired has a new command: %g. It searches the contents of +files in the directory and marks each file that contains a match +for a specified regexp. + +** VC Changes + +*** New option vc-ignore-vc-files lets you turn off version control +conveniently. + +*** VC Dired has been completely rewritten. It is now much +faster, especially for CVS, and works very similar to ordinary +Dired. + +VC Dired is invoked by typing C-x v d and entering the name of the +directory to display. By default, VC Dired gives you a recursive +listing of all files at or below the given directory which are +currently locked (for CVS, all files not up-to-date are shown). + +You can change the listing format by setting vc-dired-recurse to nil, +then it shows only the given directory, and you may also set +vc-dired-terse-display to nil, then it shows all files under version +control plus the names of any subdirectories, so that you can type `i' +on such lines to insert them manually, as in ordinary Dired. + +All Dired commands operate normally in VC Dired, except for `v', which +is redefined as the version control prefix. That means you may type +`v l', `v =' etc. to invoke `vc-print-log', `vc-diff' and the like on +the file named in the current Dired buffer line. `v v' invokes +`vc-next-action' on this file, or on all files currently marked. + +The new command `v t' (vc-dired-toggle-terse-mode) allows you to +toggle between terse display (only locked files) and full display (all +VC files plus subdirectories). There is also a special command, +`* l', to mark all files currently locked. + +Giving a prefix argument to C-x v d now does the same thing as in +ordinary Dired: it allows you to supply additional options for the ls +command in the minibuffer, to fine-tune VC Dired's output. + +*** Under CVS, if you merge changes from the repository into a working +file, and CVS detects conflicts, VC now offers to start an ediff +session to resolve them. + +Alternatively, you can use the new command `vc-resolve-conflicts' to +resolve conflicts in a file at any time. It works in any buffer that +contains conflict markers as generated by rcsmerge (which is what CVS +uses as well). + +*** You can now transfer changes between branches, using the new +command vc-merge (C-x v m). It is implemented for RCS and CVS. When +you invoke it in a buffer under version-control, you can specify +either an entire branch or a pair of versions, and the changes on that +branch or between the two versions are merged into the working file. +If this results in any conflicts, they may be resolved interactively, +using ediff. + +** Changes in Font Lock + +*** The face and variable previously known as font-lock-reference-face +are now called font-lock-constant-face to better reflect their typical +use for highlighting constants and labels. (Its face properties are +unchanged.) The variable font-lock-reference-face remains for now for +compatibility reasons, but its value is font-lock-constant-face. + +** Frame name display changes + +*** The command set-frame-name lets you set the name of the current +frame. You can use the new command select-frame-by-name to select and +raise a frame; this is mostly useful on character-only terminals, or +when many frames are invisible or iconified. + +*** On character-only terminal (not a window system), changing the +frame name is now reflected on the mode line and in the Buffers/Frames +menu. + +** Comint (subshell) changes + +*** In Comint modes, the commands to kill, stop or interrupt a +subjob now also kill pending input. This is for compatibility +with ordinary shells, where the signal characters do this. + +*** There are new commands in Comint mode. + +C-c C-x fetches the "next" line from the input history; +that is, the line after the last line you got. +You can use this command to fetch successive lines, one by one. + +C-c SPC accumulates lines of input. More precisely, it arranges to +send the current line together with the following line, when you send +the following line. + +C-c C-a if repeated twice consecutively now moves to the process mark, +which separates the pending input from the subprocess output and the +previously sent input. + +C-c M-r now runs comint-previous-matching-input-from-input; +it searches for a previous command, using the current pending input +as the search string. + +*** New option compilation-scroll-output can be set to scroll +automatically in compilation-mode windows. + +** C mode changes + +*** Multiline macros are now handled, both as they affect indentation, +and as recognized syntax. New syntactic symbol cpp-macro-cont is +assigned to second and subsequent lines of a multiline macro +definition. + +*** A new style "user" which captures all non-hook-ified +(i.e. top-level) .emacs file variable settings and customizations. +Style "cc-mode" is an alias for "user" and is deprecated. "gnu" +style is still the default however. + +*** "java" style now conforms to Sun's JDK coding style. + +*** There are new commands c-beginning-of-defun, c-end-of-defun which +are alternatives which you could bind to C-M-a and C-M-e if you prefer +them. They do not have key bindings by default. + +*** New and improved implementations of M-a (c-beginning-of-statement) +and M-e (c-end-of-statement). + +*** C++ namespace blocks are supported, with new syntactic symbols +namespace-open, namespace-close, and innamespace. + +*** File local variable settings of c-file-style and c-file-offsets +makes the style variables local to that buffer only. + +*** New indentation functions c-lineup-close-paren, +c-indent-one-line-block, c-lineup-dont-change. + +*** Improvements (hopefully!) to the way CC Mode is loaded. You +should now be able to do a (require 'cc-mode) to get the entire +package loaded properly for customization in your .emacs file. A new +variable c-initialize-on-load controls this and is t by default. + +** Changes to hippie-expand. + +*** New customization variable `hippie-expand-dabbrev-skip-space'. If +non-nil, trailing spaces may be included in the abbreviation to search for, +which then gives the same behavior as the original `dabbrev-expand'. + +*** New customization variable `hippie-expand-dabbrev-as-symbol'. If +non-nil, characters of syntax '_' is considered part of the word when +expanding dynamically. + +*** New customization variable `hippie-expand-no-restriction'. If +non-nil, narrowed buffers are widened before they are searched. + +*** New customization variable `hippie-expand-only-buffers'. If +non-empty, buffers searched are restricted to the types specified in +this list. Useful for example when constructing new special-purpose +expansion functions with `make-hippie-expand-function'. + +*** Text properties of the expansion are no longer copied. + +** Changes in BibTeX mode. + +*** Any titleword matching a regexp in the new variable +bibtex-autokey-titleword-ignore (case sensitive) is ignored during +automatic key generation. This replaces variable +bibtex-autokey-titleword-first-ignore, which only checked for matches +against the first word in the title. + +*** Autokey generation now uses all words from the title, not just +capitalized words. To avoid conflicts with existing customizations, +bibtex-autokey-titleword-ignore is set up such that words starting with +lowerkey characters will still be ignored. Thus, if you want to use +lowercase words from the title, you will have to overwrite the +bibtex-autokey-titleword-ignore standard setting. + +*** Case conversion of names and title words for automatic key +generation is more flexible. Variable bibtex-autokey-preserve-case is +replaced by bibtex-autokey-titleword-case-convert and +bibtex-autokey-name-case-convert. + +** Changes in vcursor.el. + +*** Support for character terminals is available: there is a new keymap +and the vcursor will appear as an arrow between buffer text. A +variable `vcursor-interpret-input' allows input from the vcursor to be +entered exactly as if typed. Numerous functions, including +`vcursor-compare-windows', have been rewritten to improve consistency +in the selection of windows and corresponding keymaps. + +*** vcursor options can now be altered with M-x customize under the +Editing group once the package is loaded. + +*** Loading vcursor now does not define keys by default, as this is +generally a bad side effect. Use M-x customize to set +vcursor-key-bindings to t to restore the old behavior. + +*** vcursor-auto-disable can be `copy', which turns off copying from the +vcursor, but doesn't disable it, after any non-vcursor command. + +** Ispell changes. + +*** You can now spell check comments and strings in the current +buffer with M-x ispell-comments-and-strings. Comments and strings +are identified by syntax tables in effect. + +*** Generic region skipping implemented. +A single buffer can be broken into a number of regions where text will +and will not be checked. The definitions of the regions can be user +defined. New applications and improvements made available by this +include: + + o URLs are automatically skipped + o EMail message checking is vastly improved. + +*** Ispell can highlight the erroneous word even on non-window terminals. + +** Changes to RefTeX mode + +RefTeX has been updated in order to make it more usable with very +large projects (like a several volume math book). The parser has been +re-written from scratch. To get maximum speed from RefTeX, check the +section `Optimizations' in the manual. + +*** New recursive parser. + +The old version of RefTeX created a single large buffer containing the +entire multifile document in order to parse the document. The new +recursive parser scans the individual files. + +*** Parsing only part of a document. + +Reparsing of changed document parts can now be made faster by enabling +partial scans. To use this feature, read the documentation string of +the variable `reftex-enable-partial-scans' and set the variable to t. + + (setq reftex-enable-partial-scans t) + +*** Storing parsing information in a file. + +This can improve startup times considerably. To turn it on, use + + (setq reftex-save-parse-info t) + +*** Using multiple selection buffers + +If the creation of label selection buffers is too slow (this happens +for large documents), you can reuse these buffers by setting + + (setq reftex-use-multiple-selection-buffers t) + +*** References to external documents. + +The LaTeX package `xr' allows to cross-reference labels in external +documents. RefTeX can provide information about the external +documents as well. To use this feature, set up the \externaldocument +macros required by the `xr' package and rescan the document with +RefTeX. The external labels can then be accessed with the `x' key in +the selection buffer provided by `reftex-reference' (bound to `C-c )'). +The `x' key also works in the table of contents buffer. + +*** Many more labeled LaTeX environments are recognized by default. + +The built-in command list now covers all the standard LaTeX commands, +and all of the major packages included in the LaTeX distribution. + +Also, RefTeX now understands the \appendix macro and changes +the enumeration of sections in the *toc* buffer accordingly. + +*** Mouse support for selection and *toc* buffers + +The mouse can now be used to select items in the selection and *toc* +buffers. See also the new option `reftex-highlight-selection'. + +*** New keymaps for selection and table of contents modes. + +The selection processes for labels and citation keys, and the table of +contents buffer now have their own keymaps: `reftex-select-label-map', +`reftex-select-bib-map', `reftex-toc-map'. The selection processes +have a number of new keys predefined. In particular, TAB lets you +enter a label with completion. Check the on-the-fly help (press `?' +at the selection prompt) or read the Info documentation to find out +more. + +*** Support for the varioref package + +The `v' key in the label selection buffer toggles \ref versus \vref. + +*** New hooks + +Three new hooks can be used to redefine the way labels, references, +and citations are created. These hooks are +`reftex-format-label-function', `reftex-format-ref-function', +`reftex-format-cite-function'. + +*** Citations outside LaTeX + +The command `reftex-citation' may also be used outside LaTeX (e.g. in +a mail buffer). See the Info documentation for details. + +*** Short context is no longer fontified. + +The short context in the label menu no longer copies the +fontification from the text in the buffer. If you prefer it to be +fontified, use + + (setq reftex-refontify-context t) + +** file-cache-minibuffer-complete now accepts a prefix argument. +With a prefix argument, it does not try to do completion of +the file name within its directory; it only checks for other +directories that contain the same file name. + +Thus, given the file name Makefile, and assuming that a file +Makefile.in exists in the same directory, ordinary +file-cache-minibuffer-complete will try to complete Makefile to +Makefile.in and will therefore never look for other directories that +have Makefile. A prefix argument tells it not to look for longer +names such as Makefile.in, so that instead it will look for other +directories--just as if the name were already complete in its present +directory. + +** New modes and packages + +*** There is a new alternative major mode for Perl, Cperl mode. +It has many more features than Perl mode, and some people prefer +it, but some do not. + +*** There is a new major mode, M-x vhdl-mode, for editing files of VHDL +code. + +*** M-x which-function-mode enables a minor mode that displays the +current function name continuously in the mode line, as you move +around in a buffer. + +Which Function mode is effective in major modes which support Imenu. + +*** Gametree is a major mode for editing game analysis trees. The author +uses it for keeping notes about his postal Chess games, but it should +be helpful for other two-player games as well, as long as they have an +established system of notation similar to Chess. + +*** The new minor mode checkdoc-minor-mode provides Emacs Lisp +documentation string checking for style and spelling. The style +guidelines are found in the Emacs Lisp programming manual. + +*** The net-utils package makes some common networking features +available in Emacs. Some of these functions are wrappers around +system utilities (ping, nslookup, etc.); others are implementations of +simple protocols (finger, whois) in Emacs Lisp. There are also +functions to make simple connections to TCP/IP ports for debugging and +the like. + +*** highlight-changes-mode is a minor mode that uses colors to +identify recently changed parts of the buffer text. + +*** The new package `midnight' lets you specify things to be done +within Emacs at midnight--by default, kill buffers that you have not +used in a considerable time. To use this feature, customize +the user option `midnight-mode' to t. + +*** The file generic-x.el defines a number of simple major modes. + + apache-generic-mode: For Apache and NCSA httpd configuration files + samba-generic-mode: Samba configuration files + fvwm-generic-mode: For fvwm initialization files + x-resource-generic-mode: For X resource files + hosts-generic-mode: For hosts files (.rhosts, /etc/hosts, etc.) + mailagent-rules-generic-mode: For mailagent .rules files + javascript-generic-mode: For JavaScript files + vrml-generic-mode: For VRML files + java-manifest-generic-mode: For Java MANIFEST files + java-properties-generic-mode: For Java property files + mailrc-generic-mode: For .mailrc files + + Platform-specific modes: + + prototype-generic-mode: For Solaris/Sys V prototype files + pkginfo-generic-mode: For Solaris/Sys V pkginfo files + alias-generic-mode: For C shell alias files + inf-generic-mode: For MS-Windows INF files + ini-generic-mode: For MS-Windows INI files + reg-generic-mode: For MS-Windows Registry files + bat-generic-mode: For MS-Windows BAT scripts + rc-generic-mode: For MS-Windows Resource files + rul-generic-mode: For InstallShield scripts + + +* Lisp changes in Emacs 20.3 since the Emacs Lisp Manual was published + +** If you want a Lisp file to be read in unibyte mode, +use -*-unibyte: t;-*- on its first line. +That will force Emacs to read that file in unibyte mode. +Otherwise, the file will be loaded and byte-compiled in multibyte mode. + +Thus, each lisp file is read in a consistent way regardless of whether +you started Emacs with --unibyte, so that a Lisp program gives +consistent results regardless of how Emacs was started. + +** The new function assoc-default is useful for searching an alist, +and using a default value if the key is not found there. You can +specify a comparison predicate, so this function is useful for +searching comparing a string against an alist of regular expressions. + +** The functions unibyte-char-to-multibyte and +multibyte-char-to-unibyte convert between unibyte and multibyte +character codes, in a way that is appropriate for the current language +environment. + +** The functions read-event, read-char and read-char-exclusive now +take two optional arguments. PROMPT, if non-nil, specifies a prompt +string. SUPPRESS-INPUT-METHOD, if non-nil, says to disable the +current input method for reading this one event. + +** Two new variables print-escape-nonascii and print-escape-multibyte +now control whether to output certain characters as +backslash-sequences. print-escape-nonascii applies to single-byte +non-ASCII characters; print-escape-multibyte applies to multibyte +characters. Both of these variables are used only when printing +in readable fashion (prin1 uses them, princ does not). + + +* Lisp changes in Emacs 20.3 before the Emacs Lisp Manual was published + +** Compiled Emacs Lisp files made with the modified "MBSK" version +of Emacs 20.2 do not work in Emacs 20.3. + +** Buffer positions are now measured in characters, as they were +in Emacs 19 and before. This means that (forward-char 1) +always increases point by 1. + +The function chars-in-region now just subtracts its arguments. It is +considered obsolete. The function char-boundary-p has been deleted. + +See below for additional changes relating to multibyte characters. + +** defcustom, defface and defgroup now accept the keyword `:version'. +Use this to specify in which version of Emacs a certain variable's +default value changed. For example, + + (defcustom foo-max 34 "*Maximum number of foo's allowed." + :type 'integer + :group 'foo + :version "20.3") + + (defgroup foo-group nil "The foo group." + :version "20.3") + +If an entire new group is added or the variables in it have the +default values changed, then just add a `:version' to that group. It +is recommended that new packages added to the distribution contain a +`:version' in the top level group. + +This information is used to control the customize-changed-options command. + +** It is now an error to change the value of a symbol whose name +starts with a colon--if it is interned in the standard obarray. + +However, setting such a symbol to its proper value, which is that +symbol itself, is not an error. This is for the sake of programs that +support previous Emacs versions by explicitly setting these variables +to themselves. + +If you set the variable keyword-symbols-constant-flag to nil, +this error is suppressed, and you can set these symbols to any +values whatever. + +** There is a new debugger command, R. +It evaluates an expression like e, but saves the result +in the buffer *Debugger-record*. + +** Frame-local variables. + +You can now make a variable local to various frames. To do this, call +the function make-variable-frame-local; this enables frames to have +local bindings for that variable. + +These frame-local bindings are actually frame parameters: you create a +frame-local binding in a specific frame by calling +modify-frame-parameters and specifying the variable name as the +parameter name. + +Buffer-local bindings take precedence over frame-local bindings. +Thus, if the current buffer has a buffer-local binding, that binding is +active; otherwise, if the selected frame has a frame-local binding, +that binding is active; otherwise, the default binding is active. + +It would not be hard to implement window-local bindings, but it is not +clear that this would be very useful; windows tend to come and go in a +very transitory fashion, so that trying to produce any specific effect +through a window-local binding would not be very robust. + +** `sregexq' and `sregex' are two new functions for constructing +"symbolic regular expressions." These are Lisp expressions that, when +evaluated, yield conventional string-based regexps. The symbolic form +makes it easier to construct, read, and maintain complex patterns. +See the documentation in sregex.el. + +** parse-partial-sexp's return value has an additional element which +is used to pass information along if you pass it to another call to +parse-partial-sexp, starting its scan where the first call ended. +The contents of this field are not yet finalized. + +** eval-region now accepts a fourth optional argument READ-FUNCTION. +If it is non-nil, that function is used instead of `read'. + +** unload-feature by default removes the feature's functions from +known hooks to avoid trouble, but a package providing FEATURE can +define a hook FEATURE-unload-hook to be run by unload-feature instead. + +** read-from-minibuffer no longer returns the argument DEFAULT-VALUE +when the user enters empty input. It now returns the null string, as +it did in Emacs 19. The default value is made available in the +history via M-n, but it is not applied here as a default. + +The other, more specialized minibuffer-reading functions continue to +return the default value (not the null string) when the user enters +empty input. + +** The new variable read-buffer-function controls which routine to use +for selecting buffers. For example, if you set this variable to +`iswitchb-read-buffer', iswitchb will be used to read buffer names. +Other functions can also be used if they accept the same arguments as +`read-buffer' and return the selected buffer name as a string. + +** The new function read-passwd reads a password from the terminal, +echoing a period for each character typed. It takes three arguments: +a prompt string, a flag which says "read it twice to make sure", and a +default password to use if the user enters nothing. + +** The variable fill-nobreak-predicate gives major modes a way to +specify not to break a line at certain places. Its value is a +function which is called with no arguments, with point located at the +place where a break is being considered. If the function returns +non-nil, then the line won't be broken there. + +** window-end now takes an optional second argument, UPDATE. +If this is non-nil, then the function always returns an accurate +up-to-date value for the buffer position corresponding to the +end of the window, even if this requires computation. + +** other-buffer now takes an optional argument FRAME +which specifies which frame's buffer list to use. +If it is nil, that means use the selected frame's buffer list. + +** The new variable buffer-display-time, always local in every buffer, +holds the value of (current-time) as of the last time that a window +was directed to display this buffer. + +** It is now meaningful to compare two window-configuration objects +with `equal'. Two window-configuration objects are equal if they +describe equivalent arrangements of windows, in the same frame--in +other words, if they would give the same results if passed to +set-window-configuration. + +** compare-window-configurations is a new function that compares two +window configurations loosely. It ignores differences in saved buffer +positions and scrolling, and considers only the structure and sizes of +windows and the choice of buffers to display. + +** The variable minor-mode-overriding-map-alist allows major modes to +override the key bindings of a minor mode. The elements of this alist +look like the elements of minor-mode-map-alist: (VARIABLE . KEYMAP). + +If the VARIABLE in an element of minor-mode-overriding-map-alist has a +non-nil value, the paired KEYMAP is active, and totally overrides the +map (if any) specified for the same variable in minor-mode-map-alist. + +minor-mode-overriding-map-alist is automatically local in all buffers, +and it is meant to be set by major modes. + +** The function match-string-no-properties is like match-string +except that it discards all text properties from the result. + +** The function load-average now accepts an optional argument +USE-FLOATS. If it is non-nil, the load average values are returned as +floating point numbers, rather than as integers to be divided by 100. + +** The new variable temporary-file-directory specifies the directory +to use for creating temporary files. The default value is determined +in a reasonable way for your operating system; on GNU and Unix systems +it is based on the TMP and TMPDIR environment variables. + +** Menu changes + +*** easymenu.el now uses the new menu item format and supports the +keywords :visible and :filter. The existing keyword :keys is now +better supported. + +The variable `easy-menu-precalculate-equivalent-keybindings' controls +a new feature which calculates keyboard equivalents for the menu when +you define the menu. The default is t. If you rarely use menus, you +can set the variable to nil to disable this precalculation feature; +then the calculation is done only if you use the menu bar. + +*** A new format for menu items is supported. + +In a keymap, a key binding that has the format + (STRING . REAL-BINDING) or (STRING HELP-STRING . REAL-BINDING) +defines a menu item. Now a menu item definition may also be a list that +starts with the symbol `menu-item'. + +The format is: + (menu-item ITEM-NAME) or + (menu-item ITEM-NAME REAL-BINDING . ITEM-PROPERTY-LIST) +where ITEM-NAME is an expression which evaluates to the menu item +string, and ITEM-PROPERTY-LIST has the form of a property list. +The supported properties include + +:enable FORM Evaluate FORM to determine whether the + item is enabled. +:visible FORM Evaluate FORM to determine whether the + item should appear in the menu. +:filter FILTER-FN + FILTER-FN is a function of one argument, + which will be REAL-BINDING. + It should return a binding to use instead. +:keys DESCRIPTION + DESCRIPTION is a string that describes an equivalent keyboard + binding for REAL-BINDING. DESCRIPTION is expanded with + `substitute-command-keys' before it is used. +:key-sequence KEY-SEQUENCE + KEY-SEQUENCE is a key-sequence for an equivalent + keyboard binding. +:key-sequence nil + This means that the command normally has no + keyboard equivalent. +:help HELP HELP is the extra help string (not currently used). +:button (TYPE . SELECTED) + TYPE is :toggle or :radio. + SELECTED is a form, to be evaluated, and its + value says whether this button is currently selected. + +Buttons are at the moment only simulated by prefixes in the menu. +Eventually ordinary X-buttons may be supported. + +(menu-item ITEM-NAME) defines unselectable item. + +** New event types + +*** The new event type `mouse-wheel' is generated by a wheel on a +mouse (such as the MS Intellimouse). The event contains a delta that +corresponds to the amount and direction that the wheel is rotated, +which is typically used to implement a scroll or zoom. The format is: + + (mouse-wheel POSITION DELTA) + +where POSITION is a list describing the position of the event in the +same format as a mouse-click event, and DELTA is a signed number +indicating the number of increments by which the wheel was rotated. A +negative DELTA indicates that the wheel was rotated backwards, towards +the user, and a positive DELTA indicates that the wheel was rotated +forward, away from the user. + +As of now, this event type is generated only on MS Windows. + +*** The new event type `drag-n-drop' is generated when a group of +files is selected in an application outside of Emacs, and then dragged +and dropped onto an Emacs frame. The event contains a list of +filenames that were dragged and dropped, which are then typically +loaded into Emacs. The format is: + + (drag-n-drop POSITION FILES) + +where POSITION is a list describing the position of the event in the +same format as a mouse-click event, and FILES is the list of filenames +that were dragged and dropped. + +As of now, this event type is generated only on MS Windows. + +** Changes relating to multibyte characters. + +*** The variable enable-multibyte-characters is now read-only; +any attempt to set it directly signals an error. The only way +to change this value in an existing buffer is with set-buffer-multibyte. + +*** In a string constant, `\ ' now stands for "nothing at all". You +can use it to terminate a hex escape which is followed by a character +that could otherwise be read as part of the hex escape. + +*** String indices are now measured in characters, as they were +in Emacs 19 and before. + +The function chars-in-string has been deleted. +The function concat-chars has been renamed to `string'. + +*** The function set-buffer-multibyte sets the flag in the current +buffer that says whether the buffer uses multibyte representation or +unibyte representation. If the argument is nil, it selects unibyte +representation. Otherwise it selects multibyte representation. + +This function does not change the contents of the buffer, viewed +as a sequence of bytes. However, it does change the contents +viewed as characters; a sequence of two bytes which is treated as +one character when the buffer uses multibyte representation +will count as two characters using unibyte representation. + +This function sets enable-multibyte-characters to record which +representation is in use. It also adjusts various data in the buffer +(including its markers, overlays and text properties) so that they are +consistent with the new representation. + +*** string-make-multibyte takes a string and converts it to multibyte +representation. Most of the time, you don't need to care +about the representation, because Emacs converts when necessary; +however, it makes a difference when you compare strings. + +The conversion of non-ASCII characters works by adding the value of +nonascii-insert-offset to each character, or by translating them +using the table nonascii-translation-table. + +*** string-make-unibyte takes a string and converts it to unibyte +representation. Most of the time, you don't need to care about the +representation, but it makes a difference when you compare strings. + +The conversion from multibyte to unibyte representation +loses information; the only time Emacs performs it automatically +is when inserting a multibyte string into a unibyte buffer. + +*** string-as-multibyte takes a string, and returns another string +which contains the same bytes, but treats them as multibyte. + +*** string-as-unibyte takes a string, and returns another string +which contains the same bytes, but treats them as unibyte. + +*** The new function compare-strings lets you compare +portions of two strings. Unibyte strings are converted to multibyte, +so that a unibyte string can match a multibyte string. +You can specify whether to ignore case or not. + +*** assoc-ignore-case now uses compare-strings so that +it can treat unibyte and multibyte strings as equal. + +*** Regular expression operations and buffer string searches now +convert the search pattern to multibyte or unibyte to accord with the +buffer or string being searched. + +One consequence is that you cannot always use \200-\377 inside of +[...] to match all non-ASCII characters. This does still work when +searching or matching a unibyte buffer or string, but not when +searching or matching a multibyte string. Unfortunately, there is no +obvious choice of syntax to use within [...] for that job. But, what +you want is just to match all non-ASCII characters, the regular +expression [^\0-\177] works for it. + +*** Structure of coding system changed. + +All coding systems (including aliases and subsidiaries) are named +by symbols; the symbol's `coding-system' property is a vector +which defines the coding system. Aliases share the same vector +as the principal name, so that altering the contents of this +vector affects the principal name and its aliases. You can define +your own alias name of a coding system by the function +define-coding-system-alias. + +The coding system definition includes a property list of its own. Use +the new functions `coding-system-get' and `coding-system-put' to +access such coding system properties as post-read-conversion, +pre-write-conversion, character-translation-table-for-decode, +character-translation-table-for-encode, mime-charset, and +safe-charsets. For instance, (coding-system-get 'iso-latin-1 +'mime-charset) gives the corresponding MIME-charset parameter +`iso-8859-1'. + +Among the coding system properties listed above, safe-charsets is new. +The value of this property is a list of character sets which this +coding system can correctly encode and decode. For instance: +(coding-system-get 'iso-latin-1 'safe-charsets) => (ascii latin-iso8859-1) + +Here, "correctly encode" means that the encoded character sets can +also be handled safely by systems other than Emacs as far as they +are capable of that coding system. Though, Emacs itself can encode +the other character sets and read it back correctly. + +*** The new function select-safe-coding-system can be used to find a +proper coding system for encoding the specified region or string. +This function requires a user interaction. + +*** The new functions find-coding-systems-region and +find-coding-systems-string are helper functions used by +select-safe-coding-system. They return a list of all proper coding +systems to encode a text in some region or string. If you don't want +a user interaction, use one of these functions instead of +select-safe-coding-system. + +*** The explicit encoding and decoding functions, such as +decode-coding-region and encode-coding-string, now set +last-coding-system-used to reflect the actual way encoding or decoding +was done. + +*** The new function detect-coding-with-language-environment can be +used to detect a coding system of text according to priorities of +coding systems used by some specific language environment. + +*** The functions detect-coding-region and detect-coding-string always +return a list if the arg HIGHEST is nil. Thus, if only ASCII +characters are found, they now return a list of single element +`undecided' or its subsidiaries. + +*** The new functions coding-system-change-eol-conversion and +coding-system-change-text-conversion can be used to get a different +coding system than what specified only in how end-of-line or text is +converted. + +*** The new function set-selection-coding-system can be used to set a +coding system for communicating with other X clients. + +*** The function `map-char-table' now passes as argument only valid +character codes, plus generic characters that stand for entire +character sets or entire subrows of a character set. In other words, +each time `map-char-table' calls its FUNCTION argument, the key value +either will be a valid individual character code, or will stand for a +range of characters. + +*** The new function `char-valid-p' can be used for checking whether a +Lisp object is a valid character code or not. + +*** The new function `charset-after' returns a charset of a character +in the current buffer at position POS. + +*** Input methods are now implemented using the variable +input-method-function. If this is non-nil, its value should be a +function; then, whenever Emacs reads an input event that is a printing +character with no modifier bits, it calls that function, passing the +event as an argument. Often this function will read more input, first +binding input-method-function to nil. + +The return value should be a list of the events resulting from input +method processing. These events will be processed sequentially as +input, before resorting to unread-command-events. Events returned by +the input method function are not passed to the input method function, +not even if they are printing characters with no modifier bits. + +The input method function is not called when reading the second and +subsequent events of a key sequence. + +*** You can customize any language environment by using +set-language-environment-hook and exit-language-environment-hook. + +The hook `exit-language-environment-hook' should be used to undo +customizations that you made with set-language-environment-hook. For +instance, if you set up a special key binding for a specific language +environment by set-language-environment-hook, you should set up +exit-language-environment-hook to restore the normal key binding. + + + +* Changes in Emacs 20.1 + +** Emacs has a new facility for customization of its many user +options. It is called M-x customize. With this facility you can look +at the many user options in an organized way; they are grouped into a +tree structure. + +M-x customize also knows what sorts of values are legitimate for each +user option and ensures that you don't use invalid values. + +With M-x customize, you can set options either for the present Emacs +session or permanently. (Permanent settings are stored automatically +in your .emacs file.) + +** Scroll bars are now on the left side of the window. +You can change this with M-x customize-option scroll-bar-mode. + +** The mode line no longer includes the string `Emacs'. +This makes more space in the mode line for other information. + +** When you select a region with the mouse, it is highlighted +immediately afterward. At that time, if you type the DELETE key, it +kills the region. + +The BACKSPACE key, and the ASCII character DEL, do not do this; they +delete the character before point, as usual. + +** In an incremental search the whole current match is highlighted +on terminals which support this. (You can disable this feature +by setting search-highlight to nil.) + +** In the minibuffer, in some cases, you can now use M-n to +insert the default value into the minibuffer as text. In effect, +the default value (if the minibuffer routines know it) is tacked +onto the history "in the future". (The more normal use of the +history list is to use M-p to insert minibuffer input used in the +past.) + +** In Text mode, now only blank lines separate paragraphs. +This makes it possible to get the full benefit of Adaptive Fill mode +in Text mode, and other modes derived from it (such as Mail mode). +TAB in Text mode now runs the command indent-relative; this +makes a practical difference only when you use indented paragraphs. + +As a result, the old Indented Text mode is now identical to Text mode, +and is an alias for it. + +If you want spaces at the beginning of a line to start a paragraph, +use the new mode, Paragraph Indent Text mode. + +** Scrolling changes + +*** Scroll commands to scroll a whole screen now preserve the screen +position of the cursor, if scroll-preserve-screen-position is non-nil. + +In this mode, if you scroll several screens back and forth, finishing +on the same screen where you started, the cursor goes back to the line +where it started. + +*** If you set scroll-conservatively to a small number, then when you +move point a short distance off the screen, Emacs will scroll the +screen just far enough to bring point back on screen, provided that +does not exceed `scroll-conservatively' lines. + +*** The new variable scroll-margin says how close point can come to the +top or bottom of a window. It is a number of screen lines; if point +comes within that many lines of the top or bottom of the window, Emacs +recenters the window. + +** International character set support (MULE) + +Emacs now supports a wide variety of international character sets, +including European variants of the Latin alphabet, as well as Chinese, +Devanagari (Hindi and Marathi), Ethiopian, Greek, IPA, Japanese, +Korean, Lao, Russian, Thai, Tibetan, and Vietnamese scripts. These +features have been merged from the modified version of Emacs known as +MULE (for "MULti-lingual Enhancement to GNU Emacs") + +Users of these scripts have established many more-or-less standard +coding systems for storing files. Emacs uses a single multibyte +character encoding within Emacs buffers; it can translate from a wide +variety of coding systems when reading a file and can translate back +into any of these coding systems when saving a file. + +Keyboards, even in the countries where these character sets are used, +generally don't have keys for all the characters in them. So Emacs +supports various "input methods", typically one for each script or +language, to make it possible to type them. + +The Emacs internal multibyte encoding represents a non-ASCII +character as a sequence of bytes in the range 0200 through 0377. + +The new prefix key C-x RET is used for commands that pertain +to multibyte characters, coding systems, and input methods. + +You can disable multibyte character support as follows: + + (setq-default enable-multibyte-characters nil) + +Calling the function standard-display-european turns off multibyte +characters, unless you specify a non-nil value for the second +argument, AUTO. This provides compatibility for people who are +already using standard-display-european to continue using unibyte +characters for their work until they want to change. + +*** Input methods + +An input method is a kind of character conversion which is designed +specifically for interactive input. In Emacs, typically each language +has its own input method (though sometimes several languages which use +the same characters can share one input method). Some languages +support several input methods. + +The simplest kind of input method works by mapping ASCII letters into +another alphabet. This is how the Greek and Russian input methods +work. + +A more powerful technique is composition: converting sequences of +characters into one letter. Many European input methods use +composition to produce a single non-ASCII letter from a sequence which +consists of a letter followed by diacritics. For example, a' is one +sequence of two characters that might be converted into a single +letter. + +The input methods for syllabic scripts typically use mapping followed +by conversion. The input methods for Thai and Korean work this way. +First, letters are mapped into symbols for particular sounds or tone +marks; then, sequences of these which make up a whole syllable are +mapped into one syllable sign--most often a "composite character". + +None of these methods works very well for Chinese and Japanese, so +they are handled specially. First you input a whole word using +phonetic spelling; then, after the word is in the buffer, Emacs +converts it into one or more characters using a large dictionary. + +Since there is more than one way to represent a phonetically spelled +word using Chinese characters, Emacs can only guess which one to use; +typically these input methods give you a way to say "guess again" if +the first guess is wrong. + +*** The command C-x RET m (toggle-enable-multibyte-characters) +turns multibyte character support on or off for the current buffer. + +If multibyte character support is turned off in a buffer, then each +byte is a single character, even codes 0200 through 0377--exactly as +they did in Emacs 19.34. This includes the features for support for +the European characters, ISO Latin-1 and ISO Latin-2. + +However, there is no need to turn off multibyte character support to +use ISO Latin-1 or ISO Latin-2; the Emacs multibyte character set +includes all the characters in these character sets, and Emacs can +translate automatically to and from either one. + +*** Visiting a file in unibyte mode. + +Turning off multibyte character support in the buffer after visiting a +file with multibyte code conversion will display the multibyte +sequences already in the buffer, byte by byte. This is probably not +what you want. + +If you want to edit a file of unibyte characters (Latin-1, for +example), you can do it by specifying `no-conversion' as the coding +system when reading the file. This coding system also turns off +multibyte characters in that buffer. + +If you turn off multibyte character support entirely, this turns off +character conversion as well. + +*** Displaying international characters on X Windows. + +A font for X typically displays just one alphabet or script. +Therefore, displaying the entire range of characters Emacs supports +requires using many fonts. + +Therefore, Emacs now supports "fontsets". Each fontset is a +collection of fonts, each assigned to a range of character codes. + +A fontset has a name, like a font. Individual fonts are defined by +the X server; fontsets are defined within Emacs itself. But once you +have defined a fontset, you can use it in a face or a frame just as +you would use a font. + +If a fontset specifies no font for a certain character, or if it +specifies a font that does not exist on your system, then it cannot +display that character. It will display an empty box instead. + +The fontset height and width are determined by the ASCII characters +(that is, by the font in the fontset which is used for ASCII +characters). + +*** Defining fontsets. + +Emacs does not use any fontset by default. Its default font is still +chosen as in previous versions. You can tell Emacs to use a fontset +with the `-fn' option or the `Font' X resource. + +Emacs creates a standard fontset automatically according to the value +of standard-fontset-spec. This fontset's short name is +`fontset-standard'. Bold, italic, and bold-italic variants of the +standard fontset are created automatically. + +If you specify a default ASCII font with the `Font' resource or `-fn' +argument, a fontset is generated from it. This works by replacing the +FOUNDARY, FAMILY, ADD_STYLE, and AVERAGE_WIDTH fields of the font name +with `*' then using this to specify a fontset. This fontset's short +name is `fontset-startup'. + +Emacs checks resources of the form Fontset-N where N is 0, 1, 2... +The resource value should have this form: + FONTSET-NAME, [CHARSET-NAME:FONT-NAME]... +FONTSET-NAME should have the form of a standard X font name, except: + * most fields should be just the wild card "*". + * the CHARSET_REGISTRY field should be "fontset" + * the CHARSET_ENCODING field can be any nickname of the fontset. +The construct CHARSET-NAME:FONT-NAME can be repeated any number +of times; each time specifies the font for one character set. +CHARSET-NAME should be the name of a character set, and FONT-NAME +should specify an actual font to use for that character set. + +Each of these fontsets has an alias which is made from the +last two font name fields, CHARSET_REGISTRY and CHARSET_ENCODING. +You can refer to the fontset by that alias or by its full name. + +For any character sets that you don't mention, Emacs tries to choose a +font by substituting into FONTSET-NAME. For instance, with the +following resource, + Emacs*Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24 +the font for ASCII is generated as below: + -*-fixed-medium-r-normal-*-24-*-ISO8859-1 +Here is the substitution rule: + Change CHARSET_REGISTRY and CHARSET_ENCODING to that of the charset + defined in the variable x-charset-registries. For instance, ASCII has + the entry (ascii . "ISO8859-1") in this variable. Then, reduce + sequences of wild cards -*-...-*- with a single wildcard -*-. + (This is to prevent use of auto-scaled fonts.) + +The function which processes the fontset resource value to create the +fontset is called create-fontset-from-fontset-spec. You can also call +that function explicitly to create a fontset. + +With the X resource Emacs.Font, you can specify a fontset name just +like an actual font name. But be careful not to specify a fontset +name in a wildcard resource like Emacs*Font--that tries to specify the +fontset for other purposes including menus, and they cannot handle +fontsets. + +*** The command M-x set-language-environment sets certain global Emacs +defaults for a particular choice of language. + +Selecting a language environment typically specifies a default input +method and which coding systems to recognize automatically when +visiting files. However, it does not try to reread files you have +already visited; the text in those buffers is not affected. The +language environment may also specify a default choice of coding +system for new files that you create. + +It makes no difference which buffer is current when you use +set-language-environment, because these defaults apply globally to the +whole Emacs session. + +For example, M-x set-language-environment RET Latin-1 RET +chooses the Latin-1 character set. In the .emacs file, you can do this +with (set-language-environment "Latin-1"). + +*** The command C-x RET f (set-buffer-file-coding-system) +specifies the file coding system for the current buffer. This +specifies what sort of character code translation to do when saving +the file. As an argument, you must specify the name of one of the +coding systems that Emacs supports. + +*** The command C-x RET c (universal-coding-system-argument) +lets you specify a coding system when you read or write a file. +This command uses the minibuffer to read a coding system name. +After you exit the minibuffer, the specified coding system +is used for *the immediately following command*. + +So if the immediately following command is a command to read or +write a file, it uses the specified coding system for that file. + +If the immediately following command does not use the coding system, +then C-x RET c ultimately has no effect. + +For example, C-x RET c iso-8859-1 RET C-x C-f temp RET +visits the file `temp' treating it as ISO Latin-1. + +*** You can specify the coding system for a file using the -*- +construct. Include `coding: CODINGSYSTEM;' inside the -*-...-*- +to specify use of coding system CODINGSYSTEM. You can also +specify the coding system in a local variable list at the end +of the file. + +*** The command C-x RET t (set-terminal-coding-system) specifies +the coding system for terminal output. If you specify a character +code for terminal output, all characters output to the terminal are +translated into that character code. + +This feature is useful for certain character-only terminals built in +various countries to support the languages of those countries. + +By default, output to the terminal is not translated at all. + +*** The command C-x RET k (set-keyboard-coding-system) specifies +the coding system for keyboard input. + +Character code translation of keyboard input is useful for terminals +with keys that send non-ASCII graphic characters--for example, +some terminals designed for ISO Latin-1 or subsets of it. + +By default, keyboard input is not translated at all. + +Character code translation of keyboard input is similar to using an +input method, in that both define sequences of keyboard input that +translate into single characters. However, input methods are designed +to be convenient for interactive use, while the code translations are +designed to work with terminals. + +*** The command C-x RET p (set-buffer-process-coding-system) +specifies the coding system for input and output to a subprocess. +This command applies to the current buffer; normally, each subprocess +has its own buffer, and thus you can use this command to specify +translation to and from a particular subprocess by giving the command +in the corresponding buffer. + +By default, process input and output are not translated at all. + +*** The variable file-name-coding-system specifies the coding system +to use for encoding file names before operating on them. +It is also used for decoding file names obtained from the system. + +*** The command C-\ (toggle-input-method) activates or deactivates +an input method. If no input method has been selected before, the +command prompts for you to specify the language and input method you +want to use. + +C-u C-\ (select-input-method) lets you switch to a different input +method. C-h C-\ (or C-h I) describes the current input method. + +*** Some input methods remap the keyboard to emulate various keyboard +layouts commonly used for particular scripts. How to do this +remapping properly depends on your actual keyboard layout. To specify +which layout your keyboard has, use M-x quail-set-keyboard-layout. + +*** The command C-h C (describe-coding-system) displays +the coding systems currently selected for various purposes, plus +related information. + +*** The command C-h h (view-hello-file) displays a file called +HELLO, which has examples of text in many languages, using various +scripts. + +*** The command C-h L (describe-language-support) displays +information about the support for a particular language. +You specify the language as an argument. + +*** The mode line now contains a letter or character that identifies +the coding system used in the visited file. It normally follows the +first dash. + +A dash indicates the default state of affairs: no code conversion +(except CRLF => newline if appropriate). `=' means no conversion +whatsoever. The ISO 8859 coding systems are represented by digits +1 through 9. Other coding systems are represented by letters: + + A alternativnyj (Russian) + B big5 (Chinese) + C cn-gb-2312 (Chinese) + C iso-2022-cn (Chinese) + D in-is13194-devanagari (Indian languages) + E euc-japan (Japanese) + I iso-2022-cjk or iso-2022-ss2 (Chinese, Japanese, Korean) + J junet (iso-2022-7) or old-jis (iso-2022-jp-1978-irv) (Japanese) + K euc-korea (Korean) + R koi8 (Russian) + Q tibetan + S shift_jis (Japanese) + T lao + T tis620 (Thai) + V viscii or vscii (Vietnamese) + i iso-2022-lock (Chinese, Japanese, Korean) + k iso-2022-kr (Korean) + v viqr (Vietnamese) + z hz (Chinese) + +When you are using a character-only terminal (not a window system), +two additional characters appear in between the dash and the file +coding system. These two characters describe the coding system for +keyboard input, and the coding system for terminal output. + +*** The new variable rmail-file-coding-system specifies the code +conversion to use for RMAIL files. The default value is nil. + +When you read mail with Rmail, each message is decoded automatically +into Emacs' internal format. This has nothing to do with +rmail-file-coding-system. That variable controls reading and writing +Rmail files themselves. + +*** The new variable sendmail-coding-system specifies the code +conversion for outgoing mail. The default value is nil. + +Actually, there are three different ways of specifying the coding system +for sending mail: + +- If you use C-x RET f in the mail buffer, that takes priority. +- Otherwise, if you set sendmail-coding-system non-nil, that specifies it. +- Otherwise, the default coding system for new files is used, + if that is non-nil. That comes from your language environment. +- Otherwise, Latin-1 is used. + +*** The command C-h t (help-with-tutorial) accepts a prefix argument +to specify the language for the tutorial file. Currently, English, +Japanese, Korean and Thai are supported. We welcome additional +translations. + +** An easy new way to visit a file with no code or format conversion +of any kind: Use M-x find-file-literally. There is also a command +insert-file-literally which inserts a file into the current buffer +without any conversion. + +** C-q's handling of octal character codes is changed. +You can now specify any number of octal digits. +RET terminates the digits and is discarded; +any other non-digit terminates the digits and is then used as input. + +** There are new commands for looking up Info documentation for +functions, variables and file names used in your programs. + +Type M-x info-lookup-symbol to look up a symbol in the buffer at point. +Type M-x info-lookup-file to look up a file in the buffer at point. + +Precisely which Info files are used to look it up depends on the major +mode. For example, in C mode, the GNU libc manual is used. + +** M-TAB in most programming language modes now runs the command +complete-symbol. This command performs completion on the symbol name +in the buffer before point. + +With a numeric argument, it performs completion based on the set of +symbols documented in the Info files for the programming language that +you are using. + +With no argument, it does completion based on the current tags tables, +just like the old binding of M-TAB (complete-tag). + +** File locking works with NFS now. + +The lock file for FILENAME is now a symbolic link named .#FILENAME, +in the same directory as FILENAME. + +This means that collision detection between two different machines now +works reasonably well; it also means that no file server or directory +can become a bottleneck. + +The new method does have drawbacks. It means that collision detection +does not operate when you edit a file in a directory where you cannot +create new files. Collision detection also doesn't operate when the +file server does not support symbolic links. But these conditions are +rare, and the ability to have collision detection while using NFS is +so useful that the change is worth while. + +When Emacs or a system crashes, this may leave behind lock files which +are stale. So you may occasionally get warnings about spurious +collisions. When you determine that the collision is spurious, just +tell Emacs to go ahead anyway. + +** If you wish to use Show Paren mode to display matching parentheses, +it is no longer sufficient to load paren.el. Instead you must call +show-paren-mode. + +** If you wish to use Delete Selection mode to replace a highlighted +selection when you insert new text, it is no longer sufficient to load +delsel.el. Instead you must call the function delete-selection-mode. + +** If you wish to use Partial Completion mode to complete partial words +within symbols or filenames, it is no longer sufficient to load +complete.el. Instead you must call the function partial-completion-mode. + +** If you wish to use uniquify to rename buffers for you, +it is no longer sufficient to load uniquify.el. You must also +set uniquify-buffer-name-style to one of the non-nil legitimate values. + +** Changes in View mode. + +*** Several new commands are available in View mode. +Do H in view mode for a list of commands. + +*** There are two new commands for entering View mode: +view-file-other-frame and view-buffer-other-frame. + +*** Exiting View mode does a better job of restoring windows to their +previous state. + +*** New customization variable view-scroll-auto-exit. If non-nil, +scrolling past end of buffer makes view mode exit. + +*** New customization variable view-exits-all-viewing-windows. If +non-nil, view-mode will at exit restore all windows viewing buffer, +not just the selected window. + +*** New customization variable view-read-only. If non-nil, visiting a +read-only file automatically enters View mode, and toggle-read-only +turns View mode on or off. + +*** New customization variable view-remove-frame-by-deleting controls +how to remove a not needed frame at view mode exit. If non-nil, +delete the frame, if nil make an icon of it. + +** C-x v l, the command to print a file's version control log, +now positions point at the entry for the file's current branch version. + +** C-x v =, the command to compare a file with the last checked-in version, +has a new feature. If the file is currently not locked, so that it is +presumably identical to the last checked-in version, the command now asks +which version to compare with. + +** When using hideshow.el, incremental search can temporarily show hidden +blocks if a match is inside the block. + +The block is hidden again if the search is continued and the next match +is outside the block. By customizing the variable +isearch-hide-immediately you can choose to hide all the temporarily +shown blocks only when exiting from incremental search. + +By customizing the variable hs-isearch-open you can choose what kind +of blocks to temporarily show during isearch: comment blocks, code +blocks, all of them or none. + +** The new command C-x 4 0 (kill-buffer-and-window) kills the +current buffer and deletes the selected window. It asks for +confirmation first. + +** C-x C-w, which saves the buffer into a specified file name, +now changes the major mode according to that file name. +However, the mode will not be changed if +(1) a local variables list or the `-*-' line specifies a major mode, or +(2) the current major mode is a "special" mode, + not suitable for ordinary files, or +(3) the new file name does not particularly specify any mode. + +This applies to M-x set-visited-file-name as well. + +However, if you set change-major-mode-with-file-name to nil, then +these commands do not change the major mode. + +** M-x occur changes. + +*** If the argument to M-x occur contains upper case letters, +it performs a case-sensitive search. + +*** In the *Occur* buffer made by M-x occur, +if you type g or M-x revert-buffer, this repeats the search +using the same regular expression and the same buffer as before. + +** In Transient Mark mode, the region in any one buffer is highlighted +in just one window at a time. At first, it is highlighted in the +window where you set the mark. The buffer's highlighting remains in +that window unless you select to another window which shows the same +buffer--then the highlighting moves to that window. + +** The feature to suggest key bindings when you use M-x now operates +after the command finishes. The message suggesting key bindings +appears temporarily in the echo area. The previous echo area contents +come back after a few seconds, in case they contain useful information. + +** Each frame now independently records the order for recently +selected buffers, so that the default for C-x b is now based on the +buffers recently selected in the selected frame. + +** Outline mode changes. + +*** Outline mode now uses overlays (this is the former noutline.el). + +*** Incremental searches skip over invisible text in Outline mode. + +** When a minibuffer window is active but not the selected window, if +you try to use the minibuffer, you used to get a nested minibuffer. +Now, this not only gives an error, it also cancels the minibuffer that +was already active. + +The motive for this change is so that beginning users do not +unknowingly move away from minibuffers, leaving them active, and then +get confused by it. + +If you want to be able to have recursive minibuffers, you must +set enable-recursive-minibuffers to non-nil. + +** Changes in dynamic abbrevs. + +*** Expanding dynamic abbrevs with M-/ is now smarter about case +conversion. If the expansion has mixed case not counting the first +character, and the abbreviation matches the beginning of the expansion +including case, then the expansion is copied verbatim. + +The expansion is also copied verbatim if the abbreviation itself has +mixed case. And using SPC M-/ to copy an additional word always +copies it verbatim except when the previous copied word is all caps. + +*** The values of `dabbrev-case-replace' and `dabbrev-case-fold-search' +are no longer Lisp expressions. They have simply three possible +values. + +`dabbrev-case-replace' has these three values: nil (don't preserve +case), t (do), or `case-replace' (do like M-x query-replace). +`dabbrev-case-fold-search' has these three values: nil (don't ignore +case), t (do), or `case-fold-search' (do like search). + +** Minibuffer history lists are truncated automatically now to a +certain length. The variable history-length specifies how long they +can be. The default value is 30. + +** Changes in Mail mode. + +*** The key C-x m no longer runs the `mail' command directly. +Instead, it runs the command `compose-mail', which invokes the mail +composition mechanism you have selected with the variable +`mail-user-agent'. The default choice of user agent is +`sendmail-user-agent', which gives behavior compatible with the old +behavior. + +C-x 4 m now runs compose-mail-other-window, and C-x 5 m runs +compose-mail-other-frame. + +*** While composing a reply to a mail message, from Rmail, you can use +the command C-c C-r to cite just the region from the message you are +replying to. This copies the text which is the selected region in the +buffer that shows the original message. + +*** The command C-c C-i inserts a file at the end of the message, +with separator lines around the contents. + +*** The command M-x expand-mail-aliases expands all mail aliases +in suitable mail headers. Emacs automatically extracts mail alias +definitions from your mail alias file (e.g., ~/.mailrc). You do not +need to expand mail aliases yourself before sending mail. + +*** New features in the mail-complete command. + +**** The mail-complete command now inserts the user's full name, +for local users or if that is known. The variable mail-complete-style +controls the style to use, and whether to do this at all. +Its values are like those of mail-from-style. + +**** The variable mail-passwd-command lets you specify a shell command +to run to fetch a set of password-entries that add to the ones in +/etc/passwd. + +**** The variable mail-passwd-file now specifies a list of files to read +to get the list of user ids. By default, one file is used: +/etc/passwd. + +** You can "quote" a file name to inhibit special significance of +special syntax, by adding `/:' to the beginning. Thus, if you have a +directory named `/foo:', you can prevent it from being treated as a +reference to a remote host named `foo' by writing it as `/:/foo:'. + +Emacs uses this new construct automatically when necessary, such as +when you start it with a working directory whose name might otherwise +be taken to be magic. + +** There is a new command M-x grep-find which uses find to select +files to search through, and grep to scan them. The output is +available in a Compile mode buffer, as with M-x grep. + +M-x grep now uses the -e option if the grep program supports that. +(-e prevents problems if the search pattern starts with a dash.) + +** In Dired, the & command now flags for deletion the files whose names +suggest they are probably not needed in the long run. + +In Dired, * is now a prefix key for mark-related commands. + +new key dired.el binding old key +------- ---------------- ------- + * c dired-change-marks c + * m dired-mark m + * * dired-mark-executables * (binding deleted) + * / dired-mark-directories / (binding deleted) + * @ dired-mark-symlinks @ (binding deleted) + * u dired-unmark u + * DEL dired-unmark-backward DEL + * ? dired-unmark-all-files C-M-? + * ! dired-unmark-all-marks + * % dired-mark-files-regexp % m + * C-n dired-next-marked-file M-} + * C-p dired-prev-marked-file M-{ + +** Rmail changes. + +*** When Rmail cannot convert your incoming mail into Babyl format, it +saves the new mail in the file RMAILOSE.n, where n is an integer +chosen to make a unique name. This way, Rmail will not keep crashing +each time you run it. + +*** In Rmail, the variable rmail-summary-line-count-flag now controls +whether to include the line count in the summary. Non-nil means yes. + +*** In Rmail summary buffers, d and C-d (the commands to delete +messages) now take repeat counts as arguments. A negative argument +means to move in the opposite direction. + +*** In Rmail, the t command now takes an optional argument which lets +you specify whether to show the message headers in full or pruned. + +*** In Rmail, the new command w (rmail-output-body-to-file) writes +just the body of the current message into a file, without the headers. +It takes the file name from the message subject, by default, but you +can edit that file name in the minibuffer before it is actually used +for output. + +** Gnus changes. + +*** nntp.el has been totally rewritten in an asynchronous fashion. + +*** Article prefetching functionality has been moved up into +Gnus. + +*** Scoring can now be performed with logical operators like +`and', `or', `not', and parent redirection. + +*** Article washing status can be displayed in the +article mode line. + +*** gnus.el has been split into many smaller files. + +*** Suppression of duplicate articles based on Message-ID. + +(setq gnus-suppress-duplicates t) + +*** New variables for specifying what score and adapt files +are to be considered home score and adapt files. See +`gnus-home-score-file' and `gnus-home-adapt-files'. + +*** Groups can inherit group parameters from parent topics. + +*** Article editing has been revamped and is now usable. + +*** Signatures can be recognized in more intelligent fashions. +See `gnus-signature-separator' and `gnus-signature-limit'. + +*** Summary pick mode has been made to look more nn-like. +Line numbers are displayed and the `.' command can be +used to pick articles. + +*** Commands for moving the .newsrc.eld from one server to +another have been added. + + `M-x gnus-change-server' + +*** A way to specify that "uninteresting" fields be suppressed when +generating lines in buffers. + +*** Several commands in the group buffer can be undone with +`C-M-_'. + +*** Scoring can be done on words using the new score type `w'. + +*** Adaptive scoring can be done on a Subject word-by-word basis: + + (setq gnus-use-adaptive-scoring '(word)) + +*** Scores can be decayed. + + (setq gnus-decay-scores t) + +*** Scoring can be performed using a regexp on the Date header. The +Date is normalized to compact ISO 8601 format first. + +*** A new command has been added to remove all data on articles from +the native server. + + `M-x gnus-group-clear-data-on-native-groups' + +*** A new command for reading collections of documents +(nndoc with nnvirtual on top) has been added -- `C-M-d'. + +*** Process mark sets can be pushed and popped. + +*** A new mail-to-news backend makes it possible to post +even when the NNTP server doesn't allow posting. + +*** A new backend for reading searches from Web search engines +(DejaNews, Alta Vista, InReference) has been added. + + Use the `G w' command in the group buffer to create such + a group. + +*** Groups inside topics can now be sorted using the standard +sorting functions, and each topic can be sorted independently. + + See the commands under the `T S' submap. + +*** Subsets of the groups can be sorted independently. + + See the commands under the `G P' submap. + +*** Cached articles can be pulled into the groups. + + Use the `Y c' command. + +*** Score files are now applied in a more reliable order. + +*** Reports on where mail messages end up can be generated. + + `M-x nnmail-split-history' + +*** More hooks and functions have been added to remove junk +from incoming mail before saving the mail. + + See `nnmail-prepare-incoming-header-hook'. + +*** The nnml mail backend now understands compressed article files. + +*** To enable Gnus to read/post multi-lingual articles, you must execute +the following code, for instance, in your .emacs. + + (add-hook 'gnus-startup-hook 'gnus-mule-initialize) + +Then, when you start Gnus, it will decode non-ASCII text automatically +and show appropriate characters. (Note: if you are using gnus-mime +from the SEMI package, formerly known as TM, you should NOT add this +hook to gnus-startup-hook; gnus-mime has its own method of handling +this issue.) + +Since it is impossible to distinguish all coding systems +automatically, you may need to specify a choice of coding system for a +particular news group. This can be done by: + + (gnus-mule-add-group NEWSGROUP 'CODING-SYSTEM) + +Here NEWSGROUP should be a string which names a newsgroup or a tree +of newsgroups. If NEWSGROUP is "XXX.YYY", all news groups under +"XXX.YYY" (including "XXX.YYY.ZZZ") will use the specified coding +system. CODING-SYSTEM specifies which coding system to use (for both +for reading and posting). + +CODING-SYSTEM can also be a cons cell of the form + (READ-CODING-SYSTEM . POST-CODING-SYSTEM) +Then READ-CODING-SYSTEM is used when you read messages from the +newsgroups, while POST-CODING-SYSTEM is used when you post messages +there. + +Emacs knows the right coding systems for certain newsgroups by +default. Here are some of these default settings: + + (gnus-mule-add-group "fj" 'iso-2022-7) + (gnus-mule-add-group "alt.chinese.text" 'hz-gb-2312) + (gnus-mule-add-group "alt.hk" 'hz-gb-2312) + (gnus-mule-add-group "alt.chinese.text.big5" 'cn-big5) + (gnus-mule-add-group "soc.culture.vietnamese" '(nil . viqr)) + +When you reply by mail to an article, these settings are ignored; +the mail is encoded according to sendmail-coding-system, as usual. + +** CC mode changes. + +*** If you edit primarily one style of C (or C++, Objective-C, Java) +code, you may want to make the CC Mode style variables have global +values so that you can set them directly in your .emacs file. To do +this, set c-style-variables-are-local-p to nil in your .emacs file. +Note that this only takes effect if you do it *before* cc-mode.el is +loaded. + +If you typically edit more than one style of C (or C++, Objective-C, +Java) code in a single Emacs session, you may want to make the CC Mode +style variables have buffer local values. By default, all buffers +share the same style variable settings; to make them buffer local, set +c-style-variables-are-local-p to t in your .emacs file. Note that you +must do this *before* CC Mode is loaded. + +*** The new variable c-indentation-style holds the C style name +of the current buffer. + +*** The variable c-block-comments-indent-p has been deleted, because +it is no longer necessary. C mode now handles all the supported styles +of block comments, with no need to say which one you will use. + +*** There is a new indentation style "python", which specifies the C +style that the Python developers like. + +*** There is a new c-cleanup-list option: brace-elseif-brace. +This says to put ...} else if (...) {... on one line, +just as brace-else-brace says to put ...} else {... on one line. + +** VC Changes [new] + +*** In vc-retrieve-snapshot (C-x v r), if you don't specify a snapshot +name, it retrieves the *latest* versions of all files in the current +directory and its subdirectories (aside from files already locked). + +This feature is useful if your RCS directory is a link to a common +master directory, and you want to pick up changes made by other +developers. + +You can do the same thing for an individual file by typing C-u C-x C-q +RET in a buffer visiting that file. + +*** VC can now handle files under CVS that are being "watched" by +other developers. Such files are made read-only by CVS. To get a +writable copy, type C-x C-q in a buffer visiting such a file. VC then +calls "cvs edit", which notifies the other developers of it. + +*** vc-version-diff (C-u C-x v =) now suggests reasonable defaults for +version numbers, based on the current state of the file. + +** Calendar changes. + +*** A new function, list-holidays, allows you list holidays or +subclasses of holidays for ranges of years. Related menu items allow +you do this for the year of the selected date, or the +following/previous years. + +*** There is now support for the Baha'i calendar system. Use `pb' in +the *Calendar* buffer to display the current Baha'i date. The Baha'i +calendar, or "Badi calendar" is a system of 19 months with 19 days +each, and 4 intercalary days (5 during a Gregorian leap year). The +calendar begins May 23, 1844, with each of the months named after a +supposed attribute of God. + +** ps-print changes + +There are some new user variables and subgroups for customizing the page +layout. + +*** Headers & Footers (subgroup) + +Some printer systems print a header page and force the first page to +be printed on the back of the header page when using duplex. If your +printer system has this behavior, set variable +`ps-banner-page-when-duplexing' to t. + +If variable `ps-banner-page-when-duplexing' is non-nil, it prints a +blank page as the very first printed page. So, it behaves as if the +very first character of buffer (or region) were a form feed ^L (\014). + +The variable `ps-spool-config' specifies who is responsible for +setting duplex mode and page size. Valid values are: + + lpr-switches duplex and page size are configured by `ps-lpr-switches'. + Don't forget to set `ps-lpr-switches' to select duplex + printing for your printer. + + setpagedevice duplex and page size are configured by ps-print using the + setpagedevice PostScript operator. + + nil duplex and page size are configured by ps-print *not* using + the setpagedevice PostScript operator. + +The variable `ps-spool-tumble' specifies how the page images on +opposite sides of a sheet are oriented with respect to each other. If +`ps-spool-tumble' is nil, ps-print produces output suitable for +bindings on the left or right. If `ps-spool-tumble' is non-nil, +ps-print produces output suitable for bindings at the top or bottom. +This variable takes effect only if `ps-spool-duplex' is non-nil. +The default value is nil. + +The variable `ps-header-frame-alist' specifies a header frame +properties alist. Valid frame properties are: + + fore-color Specify the foreground frame color. + Value should be a float number between 0.0 (black + color) and 1.0 (white color), or a string which is a + color name, or a list of 3 float numbers which + correspond to the Red Green Blue color scale, each + float number between 0.0 (dark color) and 1.0 (bright + color). The default is 0 ("black"). + + back-color Specify the background frame color (similar to fore-color). + The default is 0.9 ("gray90"). + + shadow-color Specify the shadow color (similar to fore-color). + The default is 0 ("black"). + + border-color Specify the border color (similar to fore-color). + The default is 0 ("black"). + + border-width Specify the border width. + The default is 0.4. + +Any other property is ignored. + +Don't change this alist directly; instead use Custom, or the +`ps-value', `ps-get', `ps-put' and `ps-del' functions (see there for +documentation). + +Ps-print can also print footers. The footer variables are: +`ps-print-footer', `ps-footer-offset', `ps-print-footer-frame', +`ps-footer-font-family', `ps-footer-font-size', `ps-footer-line-pad', +`ps-footer-lines', `ps-left-footer', `ps-right-footer' and +`ps-footer-frame-alist'. These variables are similar to those +controlling headers. + +*** Color management (subgroup) + +If `ps-print-color-p' is non-nil, the buffer's text will be printed in +color. + +*** Face Management (subgroup) + +If you need to print without worrying about face background colors, +set the variable `ps-use-face-background' which specifies if face +background should be used. Valid values are: + + t always use face background color. + nil never use face background color. + (face...) list of faces whose background color will be used. + +*** N-up printing (subgroup) + +The variable `ps-n-up-printing' specifies the number of pages per +sheet of paper. + +The variable `ps-n-up-margin' specifies the margin in points (pt) +between the sheet border and the n-up printing. + +If variable `ps-n-up-border-p' is non-nil, a border is drawn around +each page. + +The variable `ps-n-up-filling' specifies how the page matrix is filled +on each sheet of paper. Following are the valid values for +`ps-n-up-filling' with a filling example using a 3x4 page matrix: + + `left-top' 1 2 3 4 `left-bottom' 9 10 11 12 + 5 6 7 8 5 6 7 8 + 9 10 11 12 1 2 3 4 + + `right-top' 4 3 2 1 `right-bottom' 12 11 10 9 + 8 7 6 5 8 7 6 5 + 12 11 10 9 4 3 2 1 + + `top-left' 1 4 7 10 `bottom-left' 3 6 9 12 + 2 5 8 11 2 5 8 11 + 3 6 9 12 1 4 7 10 + + `top-right' 10 7 4 1 `bottom-right' 12 9 6 3 + 11 8 5 2 11 8 5 2 + 12 9 6 3 10 7 4 1 + +Any other value is treated as `left-top'. + +*** Zebra stripes (subgroup) + +The variable `ps-zebra-color' controls the zebra stripes grayscale or +RGB color. + +The variable `ps-zebra-stripe-follow' specifies how zebra stripes +continue on next page. Visually, valid values are (the character `+' +to the right of each column indicates that a line is printed): + + `nil' `follow' `full' `full-follow' + Current Page -------- ----------- --------- ---------------- + 1 XXXXX + 1 XXXXXXXX + 1 XXXXXX + 1 XXXXXXXXXXXXX + + 2 XXXXX + 2 XXXXXXXX + 2 XXXXXX + 2 XXXXXXXXXXXXX + + 3 XXXXX + 3 XXXXXXXX + 3 XXXXXX + 3 XXXXXXXXXXXXX + + 4 + 4 + 4 + 4 + + 5 + 5 + 5 + 5 + + 6 + 6 + 6 + 6 + + 7 XXXXX + 7 XXXXXXXX + 7 XXXXXX + 7 XXXXXXXXXXXXX + + 8 XXXXX + 8 XXXXXXXX + 8 XXXXXX + 8 XXXXXXXXXXXXX + + 9 XXXXX + 9 XXXXXXXX + 9 XXXXXX + 9 XXXXXXXXXXXXX + + 10 + 10 + + 11 + 11 + + -------- ----------- --------- ---------------- + Next Page -------- ----------- --------- ---------------- + 12 XXXXX + 12 + 10 XXXXXX + 10 + + 13 XXXXX + 13 XXXXXXXX + 11 XXXXXX + 11 + + 14 XXXXX + 14 XXXXXXXX + 12 XXXXXX + 12 + + 15 + 15 XXXXXXXX + 13 + 13 XXXXXXXXXXXXX + + 16 + 16 + 14 + 14 XXXXXXXXXXXXX + + 17 + 17 + 15 + 15 XXXXXXXXXXXXX + + 18 XXXXX + 18 + 16 XXXXXX + 16 + + 19 XXXXX + 19 XXXXXXXX + 17 XXXXXX + 17 + + 20 XXXXX + 20 XXXXXXXX + 18 XXXXXX + 18 + + 21 + 21 XXXXXXXX + + 22 + 22 + + -------- ----------- --------- ---------------- + +Any other value is treated as `nil'. + + +*** Printer management (subgroup) + +The variable `ps-printer-name-option' determines the option used by +some utilities to indicate the printer name; it's used only when +`ps-printer-name' is a non-empty string. If you're using the lpr +utility to print, for example, `ps-printer-name-option' should be set +to "-P". + +The variable `ps-manual-feed' indicates if the printer requires manual +paper feeding. If it's nil, automatic feeding takes place. If it's +non-nil, manual feeding takes place. + +The variable `ps-end-with-control-d' specifies whether C-d (\x04) +should be inserted at end of the generated PostScript. Non-nil means +do so. + +*** Page settings (subgroup) + +If variable `ps-warn-paper-type' is nil, it's *not* treated as an +error if the PostScript printer doesn't have a paper with the size +indicated by `ps-paper-type'; the default paper size will be used +instead. If `ps-warn-paper-type' is non-nil, an error is signaled if +the PostScript printer doesn't support a paper with the size indicated +by `ps-paper-type'. This is used when `ps-spool-config' is set to +`setpagedevice'. + +The variable `ps-print-upside-down' determines the orientation for +printing pages: nil means `normal' printing, non-nil means +`upside-down' printing (that is, the page is rotated by 180 degrees). + +The variable `ps-selected-pages' specifies which pages to print. If +it's nil, all pages are printed. If it's a list, list elements may be +integers specifying a single page to print, or cons cells (FROM . TO) +specifying to print from page FROM to TO. Invalid list elements, that +is integers smaller than one, or elements whose FROM is greater than +its TO, are ignored. + +The variable `ps-even-or-odd-pages' specifies how to print even/odd +pages. Valid values are: + + nil print all pages. + + `even-page' print only even pages. + + `odd-page' print only odd pages. + + `even-sheet' print only even sheets. + That is, if `ps-n-up-printing' is 1, it behaves like + `even-page', but for values greater than 1, it'll + print only the even sheet of paper. + + `odd-sheet' print only odd sheets. + That is, if `ps-n-up-printing' is 1, it behaves like + `odd-page'; but for values greater than 1, it'll print + only the odd sheet of paper. + +Any other value is treated as nil. + +If you set `ps-selected-pages' (see there for documentation), pages +are filtered by `ps-selected-pages', and then by +`ps-even-or-odd-pages'. For example, if we have: + + (setq ps-selected-pages '(1 4 (6 . 10) (12 . 16) 20)) + +and we combine this with `ps-even-or-odd-pages' and +`ps-n-up-printing', we get: + +`ps-n-up-printing' = 1: + `ps-even-or-odd-pages' PAGES PRINTED + nil 1, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 20 + even-page 4, 6, 8, 10, 12, 14, 16, 20 + odd-page 1, 7, 9, 13, 15 + even-sheet 4, 6, 8, 10, 12, 14, 16, 20 + odd-sheet 1, 7, 9, 13, 15 + +`ps-n-up-printing' = 2: + `ps-even-or-odd-pages' PAGES PRINTED + nil 1/4, 6/7, 8/9, 10/12, 13/14, 15/16, 20 + even-page 4/6, 8/10, 12/14, 16/20 + odd-page 1/7, 9/13, 15 + even-sheet 6/7, 10/12, 15/16 + odd-sheet 1/4, 8/9, 13/14, 20 + +*** Miscellany (subgroup) + +The variable `ps-error-handler-message' specifies where error handler +messages should be sent. + +It is also possible to add a user-defined PostScript prologue code in +front of all generated prologue code by setting the variable +`ps-user-defined-prologue'. + +The variable `ps-line-number-font' specifies the font for line numbers. + +The variable `ps-line-number-font-size' specifies the font size in +points for line numbers. + +The variable `ps-line-number-color' specifies the color for line +numbers. See `ps-zebra-color' for documentation. + +The variable `ps-line-number-step' specifies the interval in which +line numbers are printed. For example, if `ps-line-number-step' is set +to 2, the printing will look like: + + 1 one line + one line + 3 one line + one line + 5 one line + one line + ... + +Valid values are: + +integer an integer specifying the interval in which line numbers are + printed. If it's smaller than or equal to zero, 1 + is used. + +`zebra' specifies that only the line number of the first line in a + zebra stripe is to be printed. + +Any other value is treated as `zebra'. + +The variable `ps-line-number-start' specifies the starting point in +the interval given by `ps-line-number-step'. For example, if +`ps-line-number-step' is set to 3, and `ps-line-number-start' is set to +3, the output will look like: + + one line + one line + 3 one line + one line + one line + 6 one line + one line + one line + 9 one line + one line + ... + +The variable `ps-postscript-code-directory' specifies the directory +where the PostScript prologue file used by ps-print is found. + +The variable `ps-line-spacing' determines the line spacing in points, +for ordinary text, when generating PostScript (similar to +`ps-font-size'). + +The variable `ps-paragraph-spacing' determines the paragraph spacing, +in points, for ordinary text, when generating PostScript (similar to +`ps-font-size'). + +The variable `ps-paragraph-regexp' specifies the paragraph delimiter. + +The variable `ps-begin-cut-regexp' and `ps-end-cut-regexp' specify the +start and end of a region to cut out when printing. + +** hideshow changes. + +*** now supports hiding of blocks of single line comments (like // for +C++, ; for lisp). + +*** Support for java-mode added. + +*** When doing `hs-hide-all' it is now possible to also hide the comments +in the file if `hs-hide-comments-when-hiding-all' is set. + +*** The new function `hs-hide-initial-comment' hides the comments at +the beginning of the files. Finally those huge RCS logs don't stay in your +way! This is run by default when entering the `hs-minor-mode'. + +*** Now uses overlays instead of `selective-display', so is more +robust and a lot faster. + +*** A block beginning can span multiple lines. + +*** The new variable `hs-show-hidden-short-form' if t, directs hideshow +to show only the beginning of a block when it is hidden. See the +documentation for more details. + +** Changes in Enriched mode. + +*** When you visit a file in enriched-mode, Emacs will make sure it is +filled to the current fill-column. This behavior is now independent +of the size of the window. When you save the file, the fill-column in +use is stored as well, so that the whole buffer need not be refilled +the next time unless the fill-column is different. + +*** use-hard-newlines is now a minor mode. When it is enabled, Emacs +distinguishes between hard and soft newlines, and treats hard newlines +as paragraph boundaries. Otherwise all newlines inserted are marked +as soft, and paragraph boundaries are determined solely from the text. + +** Font Lock mode + +*** Custom support + +The variables font-lock-face-attributes, font-lock-display-type and +font-lock-background-mode are now obsolete; the recommended way to specify +the faces to use for Font Lock mode is with M-x customize-group on the new +custom group font-lock-faces. If you set font-lock-face-attributes in your +~/.emacs file, Font Lock mode will respect its value. However, you should +consider converting from setting that variable to using M-x customize. + +You can still use X resources to specify Font Lock face appearances. + +*** Maximum decoration + +Fontification now uses the maximum level of decoration supported by +default. Previously, fontification used a mode-specific default level +of decoration, which is typically the minimum level of decoration +supported. You can set font-lock-maximum-decoration to nil +to get the old behavior. + +*** New support + +Support is now provided for Java, Objective-C, AWK and SIMULA modes. + +Note that Font Lock mode can be turned on without knowing exactly what modes +support Font Lock mode, via the command global-font-lock-mode. + +*** Configurable support + +Support for C, C++, Objective-C and Java can be more easily configured for +additional types and classes via the new variables c-font-lock-extra-types, +c++-font-lock-extra-types, objc-font-lock-extra-types and, you guessed it, +java-font-lock-extra-types. These value of each of these variables should be a +list of regexps matching the extra type names. For example, the default value +of c-font-lock-extra-types is ("\\sw+_t") which means fontification follows the +convention that C type names end in _t. This results in slower fontification. + +Of course, you can change the variables that specify fontification in whatever +way you wish, typically by adding regexps. However, these new variables make +it easier to make specific and common changes for the fontification of types. + +*** Adding highlighting patterns to existing support + +You can use the new function font-lock-add-keywords to add your own +highlighting patterns, such as for project-local or user-specific constructs, +for any mode. + +For example, to highlight `FIXME:' words in C comments, put: + + (font-lock-add-keywords 'c-mode '(("\\ tex --> reftex.el + +** Changes in BibTeX mode. + +*** Info documentation is now available. + +*** Don't allow parentheses in string constants anymore. This confused +both the BibTeX program and Emacs BibTeX mode. + +*** Renamed variable bibtex-mode-user-optional-fields to +bibtex-user-optional-fields. + +*** Removed variable bibtex-include-OPTannote +(use bibtex-user-optional-fields instead). + +*** New interactive functions to copy and kill fields and complete +entries to the BibTeX kill ring, from where they can be yanked back by +appropriate functions. + +*** New interactive functions for repositioning and marking of +entries. They are bound by default to C-M-l and C-M-h. + +*** New hook bibtex-clean-entry-hook. It is called after entry has +been cleaned. + +*** New variable bibtex-field-delimiters, which replaces variables +bibtex-field-{left|right}-delimiter. + +*** New variable bibtex-entry-delimiters to determine how entries +shall be delimited. + +*** Allow preinitialization of fields. See documentation of +bibtex-user-optional-fields, bibtex-entry-field-alist, and +bibtex-include-OPTkey for details. + +*** Book and InBook entries require either an author or an editor +field. This is now supported by bibtex.el. Alternative fields are +prefixed with `ALT'. + +*** New variable bibtex-entry-format, which replaces variable +bibtex-clean-entry-zap-empty-opts and allows specification of many +formatting options performed on cleaning an entry (see variable +documentation). + +*** Even more control on how automatic keys are generated. See +documentation of bibtex-generate-autokey for details. Transcriptions +for foreign languages other than German are now handled, too. + +*** New boolean user option bibtex-comma-after-last-field to decide if +comma should be inserted at end of last field. + +*** New boolean user option bibtex-align-at-equal-sign to determine if +alignment should be made at left side of field contents or at equal +signs. New user options to control entry layout (e.g. indentation). + +*** New function bibtex-fill-entry to realign entries. + +*** New function bibtex-reformat to reformat region or buffer. + +*** New function bibtex-convert-alien to convert a BibTeX database +from alien sources. + +*** New function bibtex-complete-key (similar to bibtex-complete-string) +to complete prefix to a key defined in buffer. Mainly useful in +crossref entries. + +*** New function bibtex-count-entries to count entries in buffer or +region. + +*** Added support for imenu. + +*** The function `bibtex-validate' now checks current region instead +of buffer if mark is active. Now it shows all errors of buffer in a +`compilation mode' buffer. You can use the normal commands (e.g. +`next-error') for compilation modes to jump to errors. + +*** New variable `bibtex-string-file-path' to determine where the files +from `bibtex-string-files' are searched. + +** Iso Accents mode now supports Latin-3 as an alternative. + +** The command next-error now opens blocks hidden by hideshow. + +** The function using-unix-filesystems has been replaced by the +functions add-untranslated-filesystem and remove-untranslated-filesystem. +Each of these functions takes the name of a drive letter or directory +as an argument. + +When a filesystem is added as untranslated, all files on it are read +and written in binary mode (no cr/lf translation is performed). + +** browse-url changes + +*** New methods for: Grail (browse-url-generic), MMM (browse-url-mmm), +Lynx in a separate xterm (browse-url-lynx-xterm) or in an Emacs window +(browse-url-lynx-emacs), remote W3 (browse-url-w3-gnudoit), generic +non-remote-controlled browsers (browse-url-generic) and associated +customization variables. + +*** New commands `browse-url-of-region' and `browse-url'. + +*** URLs marked up with (RFC1738) work if broken across +lines. Browsing methods can be associated with URL regexps +(e.g. mailto: URLs) via `browse-url-browser-function'. + +** Changes in Ediff + +*** Clicking Mouse-2 on a brief command description in Ediff control panel +pops up the Info file for this command. + +*** There is now a variable, ediff-autostore-merges, which controls whether +the result of a merge is saved in a file. By default, this is done only when +merge is done from a session group (eg, when merging files in two different +directories). + +*** Since Emacs 19.31 (this hasn't been announced before), Ediff can compare +and merge groups of files residing in different directories, or revisions of +files in the same directory. + +*** Since Emacs 19.31, Ediff can apply multi-file patches interactively. +The patches must be in the context format or GNU unified format. (The bug +related to the GNU format has now been fixed.) + +** Changes in Viper + +*** The startup file is now .viper instead of .vip +*** All variable/function names have been changed to start with viper- + instead of vip-. +*** C-\ now simulates the meta-key in all Viper states. +*** C-z in Insert state now escapes to Vi for the duration of the next +Viper command. In Vi and Insert states, C-z behaves as before. +*** C-c \ escapes to Vi for one command if Viper is in Insert or Emacs states. +*** _ is no longer the meta-key in Vi state. +*** The variable viper-insert-state-cursor-color can be used to change cursor +color when Viper is in insert state. +*** If search lands the cursor near the top or the bottom of the window, +Viper pulls the window up or down to expose more context. The variable +viper-adjust-window-after-search controls this behavior. + +** Etags changes. + +*** In C, C++, Objective C and Java, Etags tags global variables by +default. The resulting tags files are inflated by 30% on average. +Use --no-globals to turn this feature off. Etags can also tag +variables which are members of structure-like constructs, but it does +not by default. Use --members to turn this feature on. + +*** C++ member functions are now recognized as tags. + +*** Java is tagged like C++. In addition, "extends" and "implements" +constructs are tagged. Files are recognized by the extension .java. + +*** Etags can now handle programs written in Postscript. Files are +recognized by the extensions .ps and .pdb (Postscript with C syntax). +In Postscript, tags are lines that start with a slash. + +*** Etags now handles Objective C and Objective C++ code. The usual C and +C++ tags are recognized in these languages; in addition, etags +recognizes special Objective C syntax for classes, class categories, +methods and protocols. + +*** Etags also handles Cobol. Files are recognized by the extension +.cobol. The tagged lines are those containing a word that begins in +column 8 and ends in a full stop, i.e. anything that could be a +paragraph name. + +*** Regexps in Etags now support intervals, as in ed or grep. The syntax of +an interval is \{M,N\}, and it means to match the preceding expression +at least M times and as many as N times. + +** The format for specifying a custom format for time-stamp to insert +in files has changed slightly. + +With the new enhancements to the functionality of format-time-string, +time-stamp-format will change to be eventually compatible with it. +This conversion is being done in two steps to maintain compatibility +with old time-stamp-format values. + +In the new scheme, alternate case is signified by the number-sign +(`#') modifier, rather than changing the case of the format character. +This feature is as yet incompletely implemented for compatibility +reasons. + +In the old time-stamp-format, all numeric fields defaulted to their +natural width. (With format-time-string, each format has a +fixed-width default.) In this version, you can specify the colon +(`:') modifier to a numeric conversion to mean "give me the historical +time-stamp-format width default." Do not use colon if you are +specifying an explicit width, as in "%02d". + +Numbers are no longer truncated to the requested width, except in the +case of "%02y", which continues to give a two-digit year. Digit +truncation probably wasn't being used for anything else anyway. + +The new formats will work with old versions of Emacs. New formats are +being recommended now to allow time-stamp-format to change in the +future to be compatible with format-time-string. The new forms being +recommended now will continue to work then. + +See the documentation string for the variable time-stamp-format for +details. + +** There are some additional major modes: + +dcl-mode, for editing VMS DCL files. +m4-mode, for editing files of m4 input. +meta-mode, for editing MetaFont and MetaPost source files. + +** In Shell mode, the command shell-copy-environment-variable lets you +copy the value of a specified environment variable from the subshell +into Emacs. + +** New Lisp packages include: + +*** battery.el displays battery status for laptops. + +*** M-x bruce (named after Lenny Bruce) is a program that might +be used for adding some indecent words to your email. + +*** M-x crisp-mode enables an emulation for the CRiSP editor. + +*** M-x dirtrack arranges for better tracking of directory changes +in shell buffers. + +*** The new library elint.el provides for linting of Emacs Lisp code. +See the documentation for `elint-initialize', `elint-current-buffer' +and `elint-defun'. + +*** M-x expand-add-abbrevs defines a special kind of abbrev which is +meant for programming constructs. These abbrevs expand like ordinary +ones, when you type SPC, but only at the end of a line and not within +strings or comments. + +These abbrevs can act as templates: you can define places within an +abbrev for insertion of additional text. Once you expand the abbrev, +you can then use C-x a p and C-x a n to move back and forth to these +insertion points. Thus you can conveniently insert additional text +at these points. + +*** filecache.el remembers the location of files so that you +can visit them by short forms of their names. + +*** find-func.el lets you find the definition of the user-loaded +Emacs Lisp function at point. + +*** M-x handwrite converts text to a "handwritten" picture. + +*** M-x iswitchb-buffer is a command for switching to a buffer, much like +switch-buffer, but it reads the argument in a more helpful way. + +*** M-x landmark implements a neural network for landmark learning. + +*** M-x locate provides a convenient interface to the `locate' program. + +*** M4 mode is a new mode for editing files of m4 input. + +*** mantemp.el creates C++ manual template instantiations +from the GCC error messages which indicate which instantiations are needed. + +*** mouse-copy.el provides a one-click copy and move feature. +You can drag a region with M-mouse-1, and it is automatically +inserted at point. M-Shift-mouse-1 deletes the text from its +original place after inserting the copy. + +*** mouse-drag.el lets you do scrolling by dragging Mouse-2 +on the buffer. + +You click the mouse and move; that distance either translates into the +velocity to scroll (with mouse-drag-throw) or the distance to scroll +(with mouse-drag-drag). Horizontal scrolling is enabled when needed. + +Enable mouse-drag with: + (global-set-key [down-mouse-2] 'mouse-drag-throw) +-or- + (global-set-key [down-mouse-2] 'mouse-drag-drag) + +*** mspools.el is useful for determining which mail folders have +mail waiting to be read in them. It works with procmail. + +*** Octave mode is a major mode for editing files of input for Octave. +It comes with a facility for communicating with an Octave subprocess. + +*** ogonek + +The ogonek package provides functions for changing the coding of +Polish diacritic characters in buffers. Codings known from various +platforms are supported such as ISO8859-2, Mazovia, IBM Latin2, and +TeX. For example, you can change the coding from Mazovia to +ISO8859-2. Another example is a change of coding from ISO8859-2 to +prefix notation (in which `/a' stands for the aogonek character, for +instance) and vice versa. + +To use this package load it using + M-x load-library [enter] ogonek +Then, you may get an explanation by calling one of + M-x ogonek-jak -- in Polish + M-x ogonek-how -- in English +The info specifies the commands and variables provided as well as the +ways of customization in `.emacs'. + +*** Interface to ph. + +Emacs provides a client interface to CCSO Nameservers (ph/qi) + +The CCSO nameserver is used in many universities to provide directory +services about people. ph.el provides a convenient Emacs interface to +these servers. + +*** uce.el is useful for replying to unsolicited commercial email. + +*** vcursor.el implements a "virtual cursor" feature. +You can move the virtual cursor with special commands +while the real cursor does not move. + +*** webjump.el is a "hot list" package which you can set up +for visiting your favorite web sites. + +*** M-x winner-mode is a minor mode which saves window configurations, +so you can move back to other configurations that you have recently used. + +** movemail change + +Movemail no longer needs to be installed setuid root in order for POP +mail retrieval to function properly. This is because it no longer +supports the RPOP (reserved-port POP) protocol; instead, it uses the +user's POP password to authenticate to the mail server. + +This change was made earlier, but not reported in NEWS before. + + +* Emacs 20.1 changes for MS-DOS and MS-Windows. + +** Changes in handling MS-DOS/MS-Windows text files. + +Emacs handles three different conventions for representing +end-of-line: CRLF for MSDOS, LF for Unix and GNU, and CR (used on the +Macintosh). Emacs determines which convention is used in a specific +file based on the contents of that file (except for certain special +file names), and when it saves the file, it uses the same convention. + +To save the file and change the end-of-line convention, you can use +C-x RET f (set-buffer-file-coding-system) to specify a different +coding system for the buffer. Then, when you save the file, the newly +specified coding system will take effect. For example, to save with +LF, specify undecided-unix (or some other ...-unix coding system); to +save with CRLF, specify undecided-dos. + + +* Lisp Changes in Emacs 20.1 + +** Byte-compiled files made with Emacs 20 will, in general, work in +Emacs 19 as well, as long as the source code runs in Emacs 19. And +vice versa: byte-compiled files made with Emacs 19 should also run in +Emacs 20, as long as the program itself works in Emacs 20. + +** Windows-specific functions and variables have been renamed +to start with w32- instead of win32-. + +In hacker language, calling something a "win" is a form of praise. We +don't want to praise a non-free Microsoft system, so we don't call it +"win". + +** Basic Lisp changes + +*** A symbol whose name starts with a colon now automatically +evaluates to itself. Therefore such a symbol can be used as a constant. + +*** The defined purpose of `defconst' has been changed. It should now +be used only for values that should not be changed whether by a program +or by the user. + +The actual behavior of defconst has not been changed. + +*** There are new macros `when' and `unless' + +(when CONDITION BODY...) is short for (if CONDITION (progn BODY...)) +(unless CONDITION BODY...) is short for (if CONDITION nil BODY...) + +*** Emacs now defines functions caar, cadr, cdar and cddr with their +usual Lisp meanings. For example, caar returns the car of the car of +its argument. + +*** equal, when comparing strings, now ignores their text properties. + +*** The new function `functionp' tests whether an object is a function. + +*** arrayp now returns t for char-tables and bool-vectors. + +*** Certain primitives which use characters (as integers) now get an +error if the integer is not a valid character code. These primitives +include insert-char, char-to-string, and the %c construct in the +`format' function. + +*** The `require' function now insists on adding a suffix, either .el +or .elc, to the file name. Thus, (require 'foo) will not use a file +whose name is just foo. It insists on foo.el or foo.elc. + +*** The `autoload' function, when the file name does not contain +either a directory name or the suffix .el or .elc, insists on +adding one of these suffixes. + +*** string-to-number now takes an optional second argument BASE +which specifies the base to use when converting an integer. +If BASE is omitted, base 10 is used. + +We have not implemented other radices for floating point numbers, +because that would be much more work and does not seem useful. + +*** substring now handles vectors as well as strings. + +*** The Common Lisp function eql is no longer defined normally. +You must load the `cl' library to define it. + +*** The new macro `with-current-buffer' lets you evaluate an expression +conveniently with a different current buffer. It looks like this: + + (with-current-buffer BUFFER BODY-FORMS...) + +BUFFER is the expression that says which buffer to use. +BODY-FORMS say what to do in that buffer. + +*** The new primitive `save-current-buffer' saves and restores the +choice of current buffer, like `save-excursion', but without saving or +restoring the value of point or the mark. `with-current-buffer' +works using `save-current-buffer'. + +*** The new macro `with-temp-file' lets you do some work in a new buffer and +write the output to a specified file. Like `progn', it returns the value +of the last form. + +*** The new macro `with-temp-buffer' lets you do some work in a new buffer, +which is discarded after use. Like `progn', it returns the value of the +last form. If you wish to return the buffer contents, use (buffer-string) +as the last form. + +*** The new function split-string takes a string, splits it at certain +characters, and returns a list of the substrings in between the +matches. + +For example, (split-string "foo bar lose" " +") returns ("foo" "bar" "lose"). + +*** The new macro with-output-to-string executes some Lisp expressions +with standard-output set up so that all output feeds into a string. +Then it returns that string. + +For example, if the current buffer name is `foo', + +(with-output-to-string + (princ "The buffer is ") + (princ (buffer-name))) + +returns "The buffer is foo". + +** Non-ASCII characters are now supported, if enable-multibyte-characters +is non-nil. + +These characters have character codes above 256. When inserted in the +buffer or stored in a string, they are represented as multibyte +characters that occupy several buffer positions each. + +*** When enable-multibyte-characters is non-nil, a single character in +a buffer or string can be two or more bytes (as many as four). + +Buffers and strings are still made up of unibyte elements; +character positions and string indices are always measured in bytes. +Therefore, moving forward one character can increase the buffer +position by 2, 3 or 4. The function forward-char moves by whole +characters, and therefore is no longer equivalent to + (lambda (n) (goto-char (+ (point) n))). + +ASCII characters (codes 0 through 127) are still single bytes, always. +Sequences of byte values 128 through 255 are used to represent +non-ASCII characters. These sequences are called "multibyte +characters". + +The first byte of a multibyte character is always in the range 128 +through 159 (octal 0200 through 0237). These values are called +"leading codes". The second and subsequent bytes are always in the +range 160 through 255 (octal 0240 through 0377). The first byte, the +leading code, determines how many bytes long the sequence is. + +*** The function forward-char moves over characters, and therefore +(forward-char 1) may increase point by more than 1 if it moves over a +multibyte character. Likewise, delete-char always deletes a +character, which may be more than one buffer position. + +This means that some Lisp programs, which assume that a character is +always one buffer position, need to be changed. + +However, all ASCII characters are always one buffer position. + +*** The regexp [\200-\377] no longer matches all non-ASCII characters, +because when enable-multibyte-characters is non-nil, these characters +have codes that are not in the range octal 200 to octal 377. However, +the regexp [^\000-\177] does match all non-ASCII characters, +guaranteed. + +*** The function char-boundary-p returns non-nil if position POS is +between two characters in the buffer (not in the middle of a +character). + +When the value is non-nil, it says what kind of character follows POS: + + 0 if POS is at an ASCII character or at the end of range, + 1 if POS is before a 2-byte length multi-byte form, + 2 if POS is at a head of 3-byte length multi-byte form, + 3 if POS is at a head of 4-byte length multi-byte form, + 4 if POS is at a head of multi-byte form of a composite character. + +*** The function char-bytes returns how many bytes the character CHAR uses. + +*** Strings can contain multibyte characters. The function +`length' returns the string length counting bytes, which may be +more than the number of characters. + +You can include a multibyte character in a string constant by writing +it literally. You can also represent it with a hex escape, +\xNNNNNNN..., using as many digits as necessary. Any character which +is not a valid hex digit terminates this construct. If you want to +follow it with a character that is a hex digit, write backslash and +newline in between; that will terminate the hex escape. + +*** The function concat-chars takes arguments which are characters +and returns a string containing those characters. + +*** The function sref access a multibyte character in a string. +(sref STRING INDX) returns the character in STRING at INDEX. INDEX +counts from zero. If INDEX is at a position in the middle of a +character, sref signals an error. + +*** The function chars-in-string returns the number of characters +in a string. This is less than the length of the string, if the +string contains multibyte characters (the length counts bytes). + +*** The function chars-in-region returns the number of characters +in a region from BEG to END. This is less than (- END BEG) if the +region contains multibyte characters (the length counts bytes). + +*** The function string-to-list converts a string to a list of +the characters in it. string-to-vector converts a string +to a vector of the characters in it. + +*** The function store-substring alters part of the contents +of a string. You call it as follows: + + (store-substring STRING IDX OBJ) + +This says to alter STRING, by storing OBJ starting at index IDX in +STRING. OBJ may be either a character or a (smaller) string. +This function really does alter the contents of STRING. +Since it is impossible to change the length of an existing string, +it is an error if OBJ doesn't fit within STRING's actual length. + +*** char-width returns the width (in columns) of the character CHAR, +if it were displayed in the current buffer and the selected window. + +*** string-width returns the width (in columns) of the text in STRING, +if it were displayed in the current buffer and the selected window. + +*** truncate-string-to-width shortens a string, if necessary, +to fit within a certain number of columns. (Of course, it does +not alter the string that you give it; it returns a new string +which contains all or just part of the existing string.) + +(truncate-string-to-width STR END-COLUMN &optional START-COLUMN PADDING) + +This returns the part of STR up to column END-COLUMN. + +The optional argument START-COLUMN specifies the starting column. +If this is non-nil, then the first START-COLUMN columns of the string +are not included in the resulting value. + +The optional argument PADDING, if non-nil, is a padding character to be added +at the beginning and end the resulting string, to extend it to exactly +WIDTH columns. If PADDING is nil, that means do not pad; then, if STRING +is narrower than WIDTH, the value is equal to STRING. + +If PADDING and START-COLUMN are both non-nil, and if there is no clean +place in STRING that corresponds to START-COLUMN (because one +character extends across that column), then the padding character +PADDING is added one or more times at the beginning of the result +string, so that its columns line up as if it really did start at +column START-COLUMN. + +*** When the functions in the list after-change-functions are called, +the third argument is the number of bytes in the pre-change text, not +necessarily the number of characters. It is, in effect, the +difference in buffer position between the beginning and the end of the +changed text, before the change. + +*** The characters Emacs uses are classified in various character +sets, each of which has a name which is a symbol. In general there is +one character set for each script, not for each language. + +**** The function charsetp tests whether an object is a character set name. + +**** The variable charset-list holds a list of character set names. + +**** char-charset, given a character code, returns the name of the character +set that the character belongs to. (The value is a symbol.) + +**** split-char, given a character code, returns a list containing the +name of the character set, followed by one or two byte-values +which identify the character within that character set. + +**** make-char, given a character set name and one or two subsequent +byte-values, constructs a character code. This is roughly the +opposite of split-char. + +**** find-charset-region returns a list of the character sets +of all the characters between BEG and END. + +**** find-charset-string returns a list of the character sets +of all the characters in a string. + +*** Here are the Lisp facilities for working with coding systems +and specifying coding systems. + +**** The function coding-system-list returns a list of all coding +system names (symbols). With optional argument t, it returns a list +of all distinct base coding systems, not including variants. +(Variant coding systems are those like latin-1-dos, latin-1-unix +and latin-1-mac which specify the end-of-line conversion as well +as what to do about code conversion.) + +**** coding-system-p tests a symbol to see if it is a coding system +name. It returns t if so, nil if not. + +**** file-coding-system-alist specifies which coding systems to use +for certain file names. It works like network-coding-system-alist, +except that the PATTERN is matched against the file name. + +Each element has the format (PATTERN . VAL), where PATTERN determines +which file names the element applies to. PATTERN should be a regexp +to match against a file name. + +VAL is a coding system, a cons cell containing two coding systems, or +a function symbol. If VAL is a coding system, it is used for both +decoding what received from the network stream and encoding what sent +to the network stream. If VAL is a cons cell containing two coding +systems, the car specifies the coding system for decoding, and the cdr +specifies the coding system for encoding. + +If VAL is a function symbol, the function must return a coding system +or a cons cell containing two coding systems, which is used as above. + +**** The variable network-coding-system-alist specifies +the coding system to use for network sockets. + +Each element has the format (PATTERN . VAL), where PATTERN determines +which network sockets the element applies to. PATTERN should be +either a port number or a regular expression matching some network +service names. + +VAL is a coding system, a cons cell containing two coding systems, or +a function symbol. If VAL is a coding system, it is used for both +decoding what received from the network stream and encoding what sent +to the network stream. If VAL is a cons cell containing two coding +systems, the car specifies the coding system for decoding, and the cdr +specifies the coding system for encoding. + +If VAL is a function symbol, the function must return a coding system +or a cons cell containing two coding systems, which is used as above. + +**** process-coding-system-alist specifies which coding systems to use +for certain subprocess. It works like network-coding-system-alist, +except that the PATTERN is matched against the program name used to +start the subprocess. + +**** The variable default-process-coding-system specifies the coding +systems to use for subprocess (and net connection) input and output, +when nothing else specifies what to do. The value is a cons cell +(OUTPUT-CODING . INPUT-CODING). OUTPUT-CODING applies to output +to the subprocess, and INPUT-CODING applies to input from it. + +**** The variable coding-system-for-write, if non-nil, specifies the +coding system to use for writing a file, or for output to a synchronous +subprocess. + +It also applies to any asynchronous subprocess or network connection, +but in a different way: the value of coding-system-for-write when you +start the subprocess or connection affects that subprocess or +connection permanently or until overridden. + +The variable coding-system-for-write takes precedence over +file-coding-system-alist, process-coding-system-alist and +network-coding-system-alist, and all other methods of specifying a +coding system for output. But most of the time this variable is nil. +It exists so that Lisp programs can bind it to a specific coding +system for one operation at a time. + +**** coding-system-for-read applies similarly to input from +files, subprocesses or network connections. + +**** The function process-coding-system tells you what +coding systems(s) an existing subprocess is using. +The value is a cons cell, + (DECODING-CODING-SYSTEM . ENCODING-CODING-SYSTEM) +where DECODING-CODING-SYSTEM is used for decoding output from +the subprocess, and ENCODING-CODING-SYSTEM is used for encoding +input to the subprocess. + +**** The function set-process-coding-system can be used to +change the coding systems in use for an existing subprocess. + +** Emacs has a new facility to help users manage the many +customization options. To make a Lisp program work with this facility, +you need to use the new macros defgroup and defcustom. + +You use defcustom instead of defvar, for defining a user option +variable. The difference is that you specify two additional pieces of +information (usually): the "type" which says what values are +legitimate, and the "group" which specifies the hierarchy for +customization. + +Thus, instead of writing + + (defvar foo-blurgoze nil + "*Non-nil means that foo will act very blurgozely.") + +you would now write this: + + (defcustom foo-blurgoze nil + "*Non-nil means that foo will act very blurgozely." + :type 'boolean + :group foo) + +The type `boolean' means that this variable has only +two meaningful states: nil and non-nil. Other type values +describe other possibilities; see the manual for Custom +for a description of them. + +The "group" argument is used to specify a group which the option +should belong to. You define a new group like this: + + (defgroup ispell nil + "Spell checking using Ispell." + :group 'processes) + +The "group" argument in defgroup specifies the parent group. The root +group is called `emacs'; it should not contain any variables itself, +but only other groups. The immediate subgroups of `emacs' correspond +to the keywords used by C-h p. Under these subgroups come +second-level subgroups that belong to individual packages. + +Each Emacs package should have its own set of groups. A simple +package should have just one group; a more complex package should +have a hierarchy of its own groups. The sole or root group of a +package should be a subgroup of one or more of the "keyword" +first-level subgroups. + +** New `widget' library for inserting UI components in buffers. + +This library, used by the new custom library, is documented in a +separate manual that accompanies Emacs. + +** easy-mmode + +The easy-mmode package provides macros and functions that make +developing minor modes easier. Roughly, the programmer has to code +only the functionality of the minor mode. All the rest--toggles, +predicate, and documentation--can be done in one call to the macro +`easy-mmode-define-minor-mode' (see the documentation). See also +`easy-mmode-define-keymap'. + +** Text property changes + +*** The `intangible' property now works on overlays as well as on a +text property. + +*** The new functions next-char-property-change and +previous-char-property-change scan through the buffer looking for a +place where either a text property or an overlay might change. The +functions take two arguments, POSITION and LIMIT. POSITION is the +starting position for the scan. LIMIT says where to stop the scan. + +If no property change is found before LIMIT, the value is LIMIT. If +LIMIT is nil, scan goes to the beginning or end of the accessible part +of the buffer. If no property change is found, the value is the +position of the beginning or end of the buffer. + +*** In the `local-map' text property or overlay property, the property +value can now be a symbol whose function definition is a keymap. This +is an alternative to using the keymap itself. + +** Changes in invisibility features + +*** Isearch can now temporarily show parts of the buffer which are +hidden by an overlay with a invisible property, when the search match +is inside that portion of the buffer. To enable this the overlay +should have a isearch-open-invisible property which is a function that +would be called having the overlay as an argument, the function should +make the overlay visible. + +During incremental search the overlays are shown by modifying the +invisible and intangible properties, if beside this more actions are +needed the overlay should have a isearch-open-invisible-temporary +which is a function. The function is called with 2 arguments: one is +the overlay and the second is nil when it should show the overlay and +t when it should hide it. + +*** add-to-invisibility-spec, remove-from-invisibility-spec + +Modes that use overlays to hide portions of a buffer should set the +invisible property of the overlay to the mode's name (or another symbol) +and modify the `buffer-invisibility-spec' to include that symbol. +Use `add-to-invisibility-spec' and `remove-from-invisibility-spec' to +manipulate the `buffer-invisibility-spec'. +Here is an example of how to do this: + + ;; If we want to display an ellipsis: + (add-to-invisibility-spec '(my-symbol . t)) + ;; If you don't want ellipsis: + (add-to-invisibility-spec 'my-symbol) + + ... + (overlay-put (make-overlay beginning end) 'invisible 'my-symbol) + + ... + ;; When done with the overlays: + (remove-from-invisibility-spec '(my-symbol . t)) + ;; Or respectively: + (remove-from-invisibility-spec 'my-symbol) + +** Changes in syntax parsing. + +*** The syntax-directed buffer-scan functions (such as +`parse-partial-sexp', `forward-word' and similar functions) can now +obey syntax information specified by text properties, if the variable +`parse-sexp-lookup-properties' is non-nil. + +If the value of `parse-sexp-lookup-properties' is nil, the behavior +is as before: the syntax-table of the current buffer is always +used to determine the syntax of the character at the position. + +When `parse-sexp-lookup-properties' is non-nil, the syntax of a +character in the buffer is calculated thus: + + a) if the `syntax-table' text-property of that character + is a cons, this cons becomes the syntax-type; + + Valid values of `syntax-table' text-property are: nil, a valid + syntax-table, and a valid syntax-table element, i.e., + a cons cell of the form (SYNTAX-CODE . MATCHING-CHAR). + + b) if the character's `syntax-table' text-property + is a syntax table, this syntax table is used + (instead of the syntax-table of the current buffer) to + determine the syntax type of the character. + + c) otherwise the syntax-type is determined by the syntax-table + of the current buffer. + +*** The meaning of \s in regular expressions is also affected by the +value of `parse-sexp-lookup-properties'. The details are the same as +for the syntax-directed buffer-scan functions. + +*** There are two new syntax-codes, `!' and `|' (numeric values 14 +and 15). A character with a code `!' starts a comment which is ended +only by another character with the same code (unless quoted). A +character with a code `|' starts a string which is ended only by +another character with the same code (unless quoted). + +These codes are mainly meant for use as values of the `syntax-table' +text property. + +*** The function `parse-partial-sexp' has new semantics for the sixth +arg COMMENTSTOP. If it is `syntax-table', parse stops after the start +of a comment or a string, or after end of a comment or a string. + +*** The state-list which the return value from `parse-partial-sexp' +(and can also be used as an argument) now has an optional ninth +element: the character address of the start of last comment or string; +nil if none. The fourth and eighth elements have special values if the +string/comment is started by a "!" or "|" syntax-code. + +*** Since new features of `parse-partial-sexp' allow a complete +syntactic parsing, `font-lock' no longer supports +`font-lock-comment-start-regexp'. + +** Changes in face features + +*** The face functions are now unconditionally defined in Emacs, even +if it does not support displaying on a device that supports faces. + +*** The function face-documentation returns the documentation string +of a face (or nil if it doesn't have one). + +*** The function face-bold-p returns t if a face should be bold. +set-face-bold-p sets that flag. + +*** The function face-italic-p returns t if a face should be italic. +set-face-italic-p sets that flag. + +*** You can now specify foreground and background colors for text +by adding elements of the form (foreground-color . COLOR-NAME) +and (background-color . COLOR-NAME) to the list of faces in +the `face' property (either the character's text property or an +overlay property). + +This means that you no longer need to create named faces to use +arbitrary colors in a Lisp package. + +** Changes in file-handling functions + +*** File-access primitive functions no longer discard an extra redundant +directory name from the beginning of the file name. In other words, +they no longer do anything special with // or /~. That conversion +is now done only in substitute-in-file-name. + +This makes it possible for a Lisp program to open a file whose name +begins with ~. + +*** If copy-file is unable to set the date of the output file, +it now signals an error with the condition file-date-error. + +*** The inode number returned by file-attributes may be an integer (if +the number fits in a Lisp integer) or a list of integers. + +*** insert-file-contents can now read from a special file, +as long as the arguments VISIT and REPLACE are nil. + +*** The RAWFILE arg to find-file-noselect, if non-nil, now suppresses +character code conversion as well as other things. + +Meanwhile, this feature does work with remote file names +(formerly it did not). + +*** Lisp packages which create temporary files should use the TMPDIR +environment variable to decide which directory to put them in. + +*** interpreter-mode-alist elements now specify regexps +instead of constant strings. + +*** expand-file-name no longer treats `//' or `/~' specially. It used +to delete all the text of a file name up through the first slash of +any `//' or `/~' sequence. Now it passes them straight through. + +substitute-in-file-name continues to treat those sequences specially, +in the same way as before. + +*** The variable `format-alist' is more general now. +The FROM-FN and TO-FN in a format definition can now be strings +which specify shell commands to use as filters to perform conversion. + +*** The new function access-file tries to open a file, and signals an +error if that fails. If the open succeeds, access-file does nothing +else, and returns nil. + +*** The function insert-directory now signals an error if the specified +directory cannot be listed. + +** Changes in minibuffer input + +*** The functions read-buffer, read-variable, read-command, read-string +read-file-name, read-from-minibuffer and completing-read now take an +additional argument which specifies the default value. If this +argument is non-nil, it should be a string; that string is used in two +ways: + + It is returned if the user enters empty input. + It is available through the history command M-n. + +*** The functions read-string, read-from-minibuffer, +read-no-blanks-input and completing-read now take an additional +argument INHERIT-INPUT-METHOD. If this is non-nil, then the +minibuffer inherits the current input method and the setting of +enable-multibyte-characters from the previously current buffer. + +In an interactive spec, you can use M instead of s to read an +argument in this way. + +*** All minibuffer input functions discard text properties +from the text you enter in the minibuffer, unless the variable +minibuffer-allow-text-properties is non-nil. + +** Echo area features + +*** Clearing the echo area now runs the normal hook +echo-area-clear-hook. Note that the echo area can be used while the +minibuffer is active; in that case, the minibuffer is still active +after the echo area is cleared. + +*** The function current-message returns the message currently displayed +in the echo area, or nil if there is none. + +** Keyboard input features + +*** tty-erase-char is a new variable that reports which character was +set up as the terminal's erase character when time Emacs was started. + +*** num-nonmacro-input-events is the total number of input events +received so far from the terminal. It does not count those generated +by keyboard macros. + +** Frame-related changes + +*** make-frame runs the normal hook before-make-frame-hook just before +creating a frame, and just after creating a frame it runs the abnormal +hook after-make-frame-functions with the new frame as arg. + +*** The new hook window-configuration-change-hook is now run every time +the window configuration has changed. The frame whose configuration +has changed is the selected frame when the hook is run. + +*** Each frame now independently records the order for recently +selected buffers, in its buffer-list frame parameter, so that the +value of other-buffer is now based on the buffers recently displayed +in the selected frame. + +*** The value of the frame parameter vertical-scroll-bars +is now `left', `right' or nil. A non-nil value specifies +which side of the window to put the scroll bars on. + +** X Windows features + +*** You can examine X resources for other applications by binding +x-resource-class around a call to x-get-resource. The usual value of +x-resource-class is "Emacs", which is the correct value for Emacs. + +*** In menus, checkboxes and radio buttons now actually work. +The menu displays the current status of the box or button. + +*** The function x-list-fonts now takes an optional fourth argument +MAXIMUM which sets a limit on how many matching fonts to return. +A smaller value of MAXIMUM makes the function faster. + +If the only question is whether *any* font matches the pattern, +it is good to supply 1 for this argument. + +** Subprocess features + +*** A reminder: it is no longer necessary for subprocess filter +functions and sentinels to do save-match-data, because Emacs does this +automatically. + +*** The new function shell-command-to-string executes a shell command +and returns the output from the command as a string. + +*** The new function process-contact returns t for a child process, +and (HOSTNAME SERVICE) for a net connection. + +** An error in running pre-command-hook or post-command-hook +does clear the variable to nil. The documentation was wrong before. + +** In define-key-after, if AFTER is t, the new binding now always goes +at the end of the keymap. If the keymap is a menu, this means it +goes after the other menu items. + +** If you have a program that makes several changes in the same area +of the buffer, you can use the macro combine-after-change-calls +around that Lisp code to make it faster when after-change hooks +are in use. + +The macro arranges to call the after-change functions just once for a +series of several changes--if that seems safe. + +Don't alter the variables after-change-functions and +after-change-function within the body of a combine-after-change-calls +form. + +** If you define an abbrev (with define-abbrev) whose EXPANSION +is not a string, then the abbrev does not expand in the usual sense, +but its hook is still run. + +** Normally, the Lisp debugger is not used (even if you have enabled it) +for errors that are handled by condition-case. + +If you set debug-on-signal to a non-nil value, then the debugger is called +regardless of whether there is a handler for the condition. This is +useful for debugging problems that happen inside of a condition-case. + +This mode of operation seems to be unreliable in other ways. Errors that +are normal and ought to be handled, perhaps in timers or process +filters, will instead invoke the debugger. So don't say you weren't +warned. + +** The new variable ring-bell-function lets you specify your own +way for Emacs to "ring the bell". + +** If run-at-time's TIME argument is t, the action is repeated at +integral multiples of REPEAT from the epoch; this is useful for +functions like display-time. + +** You can use the function locate-library to find the precise file +name of a Lisp library. This isn't new, but wasn't documented before. + +** Commands for entering view mode have new optional arguments that +can be used from Lisp. Low-level entrance to and exit from view mode +is done by functions view-mode-enter and view-mode-exit. + +** batch-byte-compile-file now makes Emacs return a nonzero status code +if there is an error in compilation. + +** pop-to-buffer, switch-to-buffer-other-window and +switch-to-buffer-other-frame now accept an additional optional +argument NORECORD, much like switch-to-buffer. If it is non-nil, +they don't put the buffer at the front of the buffer list. + +** If your .emacs file leaves the *scratch* buffer non-empty, +Emacs does not display the startup message, so as to avoid changing +the *scratch* buffer. + +** The new function regexp-opt returns an efficient regexp to match a string. +The arguments are STRINGS and (optionally) PAREN. This function can be used +where regexp matching or searching is intensively used and speed is important, +e.g., in Font Lock mode. + +** The variable buffer-display-count is local to each buffer, +and is incremented each time the buffer is displayed in a window. +It starts at 0 when the buffer is created. + +** The new function compose-mail starts composing a mail message +using the user's chosen mail composition agent (specified with the +variable mail-user-agent). It has variants compose-mail-other-window +and compose-mail-other-frame. + +** The `user-full-name' function now takes an optional parameter which +can either be a number (the UID) or a string (the login name). The +full name of the specified user will be returned. + +** Lisp packages that load files of customizations, or any other sort +of user profile, should obey the variable init-file-user in deciding +where to find it. They should load the profile of the user name found +in that variable. If init-file-user is nil, meaning that the -q +option was used, then Lisp packages should not load the customization +files at all. + +** format-time-string now allows you to specify the field width +and type of padding. This works as in printf: you write the field +width as digits in the middle of a %-construct. If you start +the field width with 0, it means to pad with zeros. + +For example, %S normally specifies the number of seconds since the +minute; %03S means to pad this with zeros to 3 positions, %_3S to pad +with spaces to 3 positions. Plain %3S pads with zeros, because that +is how %S normally pads to two positions. + +** thing-at-point now supports a new kind of "thing": url. + +** imenu.el changes. + +You can now specify a function to be run when selecting an +item from menu created by imenu. + +An example of using this feature: if we define imenu items for the +#include directives in a C file, we can open the included file when we +select one of those items. + + +---------------------------------------------------------------------- +Copyright information: + +Copyright (C) 1999, 2000, 2006 + Free Software Foundation, Inc. + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +Local variables: +mode: outline +paragraph-separate: "[ ]*$" +end: diff --git a/etc/NEWS.21 b/etc/NEWS.21 new file mode 100644 index 00000000000..44462b3f827 --- /dev/null +++ b/etc/NEWS.21 @@ -0,0 +1,4900 @@ +GNU Emacs NEWS -- history of user-visible changes. 2006-05-31 +Copyright (C) 2000, 2001, 2002, 2003, 2006 + Free Software Foundation, Inc. +See the end for copying conditions. + +This file is about changes in emacs version 21. + + + +* Emacs 21.4 is a bug-fix release with no user-visible changes. + + + +* Installation changes in Emacs 21.3 + +** Support for GNU/Linux on little-endian MIPS and on IBM S390 has +been added. + + +* Changes in Emacs 21.3 + +** The obsolete C mode (c-mode.el) has been removed to avoid problems +with Custom. + +** UTF-16 coding systems are available, encoding the same characters +as mule-utf-8. + +** There is a new language environment for UTF-8 (set up automatically +in UTF-8 locales). + +** Translation tables are available between equivalent characters in +different Emacs charsets -- for instance `e with acute' coming from the +Latin-1 and Latin-2 charsets. User options `unify-8859-on-encoding-mode' +and `unify-8859-on-decoding-mode' respectively turn on translation +between ISO 8859 character sets (`unification') on encoding +(e.g. writing a file) and decoding (e.g. reading a file). Note that +`unify-8859-on-encoding-mode' is useful and safe, but +`unify-8859-on-decoding-mode' can cause text to change when you read +it and write it out again without edits, so it is not generally advisable. +By default `unify-8859-on-encoding-mode' is turned on. + +** In Emacs running on the X window system, the default value of +`selection-coding-system' is now `compound-text-with-extensions'. + +If you want the old behavior, set selection-coding-system to +compound-text, which may be significantly more efficient. Using +compound-text-with-extensions seems to be necessary only for decoding +text from applications under XFree86 4.2, whose behavior is actually +contrary to the compound text specification. + + + +* Installation changes in Emacs 21.2 + +** Support for BSD/OS 5.0 has been added. + +** Support for AIX 5.1 was added. + + +* Changes in Emacs 21.2 + +** Emacs now supports compound-text extended segments in X selections. + +X applications can use `extended segments' to encode characters in +compound text that belong to character sets which are not part of the +list of approved standard encodings for X, e.g. Big5. To paste +selections with such characters into Emacs, use the new coding system +compound-text-with-extensions as the value of selection-coding-system. + +** The default values of `tooltip-delay' and `tooltip-hide-delay' +were changed. + +** On terminals whose erase-char is ^H (Backspace), Emacs +now uses normal-erase-is-backspace-mode. + +** When the *scratch* buffer is recreated, its mode is set from +initial-major-mode, which normally is lisp-interaction-mode, +instead of using default-major-mode. + +** The new option `Info-scroll-prefer-subnodes' causes Info to behave +like the stand-alone Info reader (from the GNU Texinfo package) as far +as motion between nodes and their subnodes is concerned. If it is t +(the default), Emacs behaves as before when you type SPC in a menu: it +visits the subnode pointed to by the first menu entry. If this option +is nil, SPC scrolls to the end of the current node, and only then goes +to the first menu item, like the stand-alone reader does. + +This change was already in Emacs 21.1, but wasn't advertised in the +NEWS. + + +* Lisp Changes in Emacs 21.2 + +** The meanings of scroll-up-aggressively and scroll-down-aggressively +have been interchanged, so that the former now controls scrolling up, +and the latter now controls scrolling down. + +** The variable `compilation-parse-errors-filename-function' can +be used to transform filenames found in compilation output. + + + +* Installation Changes in Emacs 21.1 + +See the INSTALL file for information on installing extra libraries and +fonts to take advantage of the new graphical features and extra +charsets in this release. + +** Support for GNU/Linux on IA64 machines has been added. + +** Support for LynxOS has been added. + +** There are new configure options associated with the support for +images and toolkit scrollbars. Use the --help option in `configure' +to list them. + +** You can build a 64-bit Emacs for SPARC/Solaris systems which +support 64-bit executables and also on Irix 6.5. This increases the +maximum buffer size. See etc/MACHINES for instructions. Changes to +build on other 64-bit systems should be straightforward modulo any +necessary changes to unexec. + +** There is a new configure option `--disable-largefile' to omit +Unix-98-style support for large files if that is available. + +** There is a new configure option `--without-xim' that instructs +Emacs to not use X Input Methods (XIM), if these are available. + +** `movemail' defaults to supporting POP. You can turn this off using +the --without-pop configure option, should that be necessary. + +** This version can be built for the Macintosh, but does not implement +all of the new display features described below. The port currently +lacks unexec, asynchronous processes, and networking support. See the +"Emacs and the Mac OS" appendix in the Emacs manual, for the +description of aspects specific to the Mac. + +** Note that the MS-Windows port does not yet implement various of the +new display features described below. + + +* Changes in Emacs 21.1 + +** Emacs has a new redisplay engine. + +The new redisplay handles characters of variable width and height. +Italic text can be used without redisplay problems. Fonts containing +oversized characters, i.e. characters larger than the logical height +of a font can be used. Images of various formats can be displayed in +the text. + +** Emacs has a new face implementation. + +The new faces no longer fundamentally use X font names to specify the +font. Instead, each face has several independent attributes--family, +height, width, weight and slant--that it may or may not specify. +These attributes can be merged from various faces, and then together +specify a font. + +Faces are supported on terminals that can display color or fonts. +These terminal capabilities are auto-detected. Details can be found +under Lisp changes, below. + +** Emacs can display faces on TTY frames. + +Emacs automatically detects terminals that are able to display colors. +Faces with a weight greater than normal are displayed extra-bright, if +the terminal supports it. Faces with a weight less than normal and +italic faces are displayed dimmed, if the terminal supports it. +Underlined faces are displayed underlined if possible. Other face +attributes such as `overline', `strike-through', and `box' are ignored +on terminals. + +The command-line options `-fg COLOR', `-bg COLOR', and `-rv' are now +supported on character terminals. + +Emacs automatically remaps all X-style color specifications to one of +the colors supported by the terminal. This means you could have the +same color customizations that work both on a windowed display and on +a TTY or when Emacs is invoked with the -nw option. + +** New default font is Courier 12pt under X. + +** Sound support + +Emacs supports playing sound files on GNU/Linux and FreeBSD (Voxware +driver and native BSD driver, a.k.a. Luigi's driver). Currently +supported file formats are RIFF-WAVE (*.wav) and Sun Audio (*.au). +You must configure Emacs with the option `--with-sound=yes' to enable +sound support. + +** Emacs now resizes mini-windows if appropriate. + +If a message is longer than one line, or minibuffer contents are +longer than one line, Emacs can resize the minibuffer window unless it +is on a frame of its own. You can control resizing and the maximum +minibuffer window size by setting the following variables: + +- User option: max-mini-window-height + +Maximum height for resizing mini-windows. If a float, it specifies a +fraction of the mini-window frame's height. If an integer, it +specifies a number of lines. + +Default is 0.25. + +- User option: resize-mini-windows + +How to resize mini-windows. If nil, don't resize. If t, always +resize to fit the size of the text. If `grow-only', let mini-windows +grow only, until they become empty, at which point they are shrunk +again. + +Default is `grow-only'. + +** LessTif support. + +Emacs now runs with the LessTif toolkit (see +). You will need version 0.92.26, or later. + +** LessTif/Motif file selection dialog. + +When Emacs is configured to use LessTif or Motif, reading a file name +from a menu will pop up a file selection dialog if `use-dialog-box' is +non-nil. + +** File selection dialog on MS-Windows is supported. + +When a file is visited by clicking File->Open, the MS-Windows version +now pops up a standard file selection dialog where you can select a +file to visit. File->Save As also pops up that dialog. + +** Toolkit scroll bars. + +Emacs now uses toolkit scroll bars if available. When configured for +LessTif/Motif, it will use that toolkit's scroll bar. Otherwise, when +configured for Lucid and Athena widgets, it will use the Xaw3d scroll +bar if Xaw3d is available. You can turn off the use of toolkit scroll +bars by specifying `--with-toolkit-scroll-bars=no' when configuring +Emacs. + +When you encounter problems with the Xaw3d scroll bar, watch out how +Xaw3d is compiled on your system. If the Makefile generated from +Xaw3d's Imakefile contains a `-DNARROWPROTO' compiler option, and your +Emacs system configuration file `s/your-system.h' does not contain a +define for NARROWPROTO, you might consider adding it. Take +`s/freebsd.h' as an example. + +Alternatively, if you don't have access to the Xaw3d source code, take +a look at your system's imake configuration file, for example in the +directory `/usr/X11R6/lib/X11/config' (paths are different on +different systems). You will find files `*.cf' there. If your +system's cf-file contains a line like `#define NeedWidePrototypes NO', +add a `#define NARROWPROTO' to your Emacs system configuration file. + +The reason for this is that one Xaw3d function uses `double' or +`float' function parameters depending on the setting of NARROWPROTO. +This is not a problem when Imakefiles are used because each system's +imake configuration file contains the necessary information. Since +Emacs doesn't use imake, this has do be done manually. + +** Tool bar support. + +Emacs supports a tool bar at the top of a frame under X. For details +of how to define a tool bar, see the page describing Lisp-level +changes. Tool-bar global minor mode controls whether or not it is +displayed and is on by default. The appearance of the bar is improved +if Emacs has been built with XPM image support. Otherwise monochrome +icons will be used. + +To make the tool bar more useful, we need contributions of extra icons +for specific modes (with copyright assignments). + +** Tooltips. + +Tooltips are small X windows displaying a help string at the current +mouse position. The Lisp package `tooltip' implements them. You can +turn them off via the user option `tooltip-mode'. + +Tooltips also provides support for GUD debugging. If activated, +variable values can be displayed in tooltips by pointing at them with +the mouse in source buffers. You can customize various aspects of the +tooltip display in the group `tooltip'. + +** Automatic Hscrolling + +Horizontal scrolling now happens automatically if +`automatic-hscrolling' is set (the default). This setting can be +customized. + +If a window is scrolled horizontally with set-window-hscroll, or +scroll-left/scroll-right (C-x <, C-x >), this serves as a lower bound +for automatic horizontal scrolling. Automatic scrolling will scroll +the text more to the left if necessary, but won't scroll the text more +to the right than the column set with set-window-hscroll etc. + +** When using a windowing terminal, each Emacs window now has a cursor +of its own. By default, when a window is selected, the cursor is +solid; otherwise, it is hollow. The user-option +`cursor-in-non-selected-windows' controls how to display the +cursor in non-selected windows. If nil, no cursor is shown, if +non-nil a hollow box cursor is shown. + +** Fringes to the left and right of windows are used to display +truncation marks, continuation marks, overlay arrows and alike. The +foreground, background, and stipple of these areas can be changed by +customizing face `fringe'. + +** The mode line under X is now drawn with shadows by default. +You can change its appearance by modifying the face `mode-line'. +In particular, setting the `:box' attribute to nil turns off the 3D +appearance of the mode line. (The 3D appearance makes the mode line +occupy more space, and thus might cause the first or the last line of +the window to be partially obscured.) + +The variable `mode-line-inverse-video', which was used in older +versions of emacs to make the mode-line stand out, is now deprecated. +However, setting it to nil will cause the `mode-line' face to be +ignored, and mode-lines to be drawn using the default text face. + +** Mouse-sensitive mode line. + +Different parts of the mode line have been made mouse-sensitive on all +systems which support the mouse. Moving the mouse to a +mouse-sensitive part in the mode line changes the appearance of the +mouse pointer to an arrow, and help about available mouse actions is +displayed either in the echo area, or in the tooltip window if you +have enabled one. + +Currently, the following actions have been defined: + +- Mouse-1 on the buffer name in the mode line goes to the next buffer. + +- Mouse-3 on the buffer-name goes to the previous buffer. + +- Mouse-2 on the read-only or modified status in the mode line (`%' or +`*') toggles the status. + +- Mouse-3 on the major mode name displays a major mode menu. + +- Mouse-3 on the mode name displays a minor-mode menu. + +** Hourglass pointer + +Emacs can optionally display an hourglass pointer under X. You can +turn the display on or off by customizing group `cursor'. + +** Blinking cursor + +M-x blink-cursor-mode toggles a blinking cursor under X and on +terminals having terminal capabilities `vi', `vs', and `ve'. Blinking +and related parameters like frequency and delay can be customized in +the group `cursor'. + +** New font-lock support mode `jit-lock-mode'. + +This support mode is roughly equivalent to `lazy-lock' but is +generally faster. It supports stealth and deferred fontification. +See the documentation of the function `jit-lock-mode' for more +details. + +Font-lock uses jit-lock-mode as default support mode, so you don't +have to do anything to activate it. + +** The default binding of the Delete key has changed. + +The new user-option `normal-erase-is-backspace' can be set to +determine the effect of the Delete and Backspace function keys. + +On window systems, the default value of this option is chosen +according to the keyboard used. If the keyboard has both a Backspace +key and a Delete key, and both are mapped to their usual meanings, the +option's default value is set to t, so that Backspace can be used to +delete backward, and Delete can be used to delete forward. On +keyboards which either have only one key (usually labeled DEL), or two +keys DEL and BS which produce the same effect, the option's value is +set to nil, and these keys delete backward. + +If not running under a window system, setting this option accomplishes +a similar effect by mapping C-h, which is usually generated by the +Backspace key, to DEL, and by mapping DEL to C-d via +`keyboard-translate'. The former functionality of C-h is available on +the F1 key. You should probably not use this setting on a text-only +terminal if you don't have both Backspace, Delete and F1 keys. + +Programmatically, you can call function normal-erase-is-backspace-mode +to toggle the behavior of the Delete and Backspace keys. + +** The default for user-option `next-line-add-newlines' has been +changed to nil, i.e. C-n will no longer add newlines at the end of a +buffer by default. + +** The and keys now move to the beginning or end of the +current line, respectively. C- and C- move to the +beginning and end of the buffer. + +** Emacs now checks for recursive loads of Lisp files. If the +recursion depth exceeds `recursive-load-depth-limit', an error is +signaled. + +** When an error is signaled during the loading of the user's init +file, Emacs now pops up the *Messages* buffer. + +** Emacs now refuses to load compiled Lisp files which weren't +compiled with Emacs. Set `load-dangerous-libraries' to t to change +this behavior. + +The reason for this change is an incompatible change in XEmacs's byte +compiler. Files compiled with XEmacs can contain byte codes that let +Emacs dump core. + +** Toggle buttons and radio buttons in menus. + +When compiled with LessTif (or Motif) support, Emacs uses toolkit +widgets for radio and toggle buttons in menus. When configured for +Lucid, Emacs draws radio buttons and toggle buttons similar to Motif. + +** The menu bar configuration has changed. The new configuration is +more CUA-compliant. The most significant change is that Options is +now a separate menu-bar item, with Mule and Customize as its submenus. + +** Item Save Options on the Options menu allows saving options set +using that menu. + +** Highlighting of trailing whitespace. + +When `show-trailing-whitespace' is non-nil, Emacs displays trailing +whitespace in the face `trailing-whitespace'. Trailing whitespace is +defined as spaces or tabs at the end of a line. To avoid busy +highlighting when entering new text, trailing whitespace is not +displayed if point is at the end of the line containing the +whitespace. + +** C-x 5 1 runs the new command delete-other-frames which deletes +all frames except the selected one. + +** The new user-option `confirm-kill-emacs' can be customized to +let Emacs ask for confirmation before exiting. + +** The header line in an Info buffer is now displayed as an emacs +header-line (which is like a mode-line, but at the top of the window), +so that it remains visible even when the buffer has been scrolled. +This behavior may be disabled by customizing the option +`Info-use-header-line'. + +** Polish, Czech, German, and French translations of Emacs' reference card +have been added. They are named `pl-refcard.tex', `cs-refcard.tex', +`de-refcard.tex' and `fr-refcard.tex'. Postscript files are included. + +** An `Emacs Survival Guide', etc/survival.tex, is available. + +** A reference card for Dired has been added. Its name is +`dired-ref.tex'. A French translation is available in +`fr-drdref.tex'. + +** C-down-mouse-3 is bound differently. Now if the menu bar is not +displayed it pops up a menu containing the items which would be on the +menu bar. If the menu bar is displayed, it pops up the major mode +menu or the Edit menu if there is no major mode menu. + +** Variable `load-path' is no longer customizable through Customize. + +You can no longer use `M-x customize-variable' to customize `load-path' +because it now contains a version-dependent component. You can still +use `add-to-list' and `setq' to customize this variable in your +`~/.emacs' init file or to modify it from any Lisp program in general. + +** C-u C-x = provides detailed information about the character at +point in a pop-up window. + +** Emacs can now support 'wheeled' mice (such as the MS IntelliMouse) +under XFree86. To enable this, use the `mouse-wheel-mode' command, or +customize the variable `mouse-wheel-mode'. + +The variables `mouse-wheel-follow-mouse' and `mouse-wheel-scroll-amount' +determine where and by how much buffers are scrolled. + +** Emacs' auto-save list files are now by default stored in a +sub-directory `.emacs.d/auto-save-list/' of the user's home directory. +(On MS-DOS, this subdirectory's name is `_emacs.d/auto-save.list/'.) +You can customize `auto-save-list-file-prefix' to change this location. + +** The function `getenv' is now callable interactively. + +** The new user-option `even-window-heights' can be set to nil +to prevent `display-buffer' from evening out window heights. + +** The new command M-x delete-trailing-whitespace RET will delete the +trailing whitespace within the current restriction. You can also add +this function to `write-file-hooks' or `local-write-file-hooks'. + +** When visiting a file with M-x find-file-literally, no newlines will +be added to the end of the buffer even if `require-final-newline' is +non-nil. + +** The new user-option `find-file-suppress-same-file-warnings' can be +set to suppress warnings ``X and Y are the same file'' when visiting a +file that is already visited under a different name. + +** The new user-option `electric-help-shrink-window' can be set to +nil to prevent adjusting the help window size to the buffer size. + +** New command M-x describe-character-set reads a character set name +and displays information about that. + +** The new variable `auto-mode-interpreter-regexp' contains a regular +expression matching interpreters, for file mode determination. + +This regular expression is matched against the first line of a file to +determine the file's mode in `set-auto-mode' when Emacs can't deduce a +mode from the file's name. If it matches, the file is assumed to be +interpreted by the interpreter matched by the second group of the +regular expression. The mode is then determined as the mode +associated with that interpreter in `interpreter-mode-alist'. + +** New function executable-make-buffer-file-executable-if-script-p is +suitable as an after-save-hook as an alternative to `executable-chmod'. + +** The most preferred coding-system is now used to save a buffer if +buffer-file-coding-system is `undecided' and it is safe for the buffer +contents. (The most preferred is set by set-language-environment or +by M-x prefer-coding-system.) Thus if you visit an ASCII file and +insert a non-ASCII character from your current language environment, +the file will be saved silently with the appropriate coding. +Previously you would be prompted for a safe coding system. + +** The many obsolete language `setup-...-environment' commands have +been removed -- use `set-language-environment'. + +** The new Custom option `keyboard-coding-system' specifies a coding +system for keyboard input. + +** New variable `inhibit-iso-escape-detection' determines if Emacs' +coding system detection algorithm should pay attention to ISO2022's +escape sequences. If this variable is non-nil, the algorithm ignores +such escape sequences. The default value is nil, and it is +recommended not to change it except for the special case that you +always want to read any escape code verbatim. If you just want to +read a specific file without decoding escape codes, use C-x RET c +(`universal-coding-system-argument'). For instance, C-x RET c latin-1 +RET C-x C-f filename RET. + +** Variable `default-korean-keyboard' is initialized properly from the +environment variable `HANGUL_KEYBOARD_TYPE'. + +** New command M-x list-charset-chars reads a character set name and +displays all characters in that character set. + +** M-x set-terminal-coding-system (C-x RET t) now allows CCL-based +coding systems such as cpXXX and cyrillic-koi8. + +** Emacs now attempts to determine the initial language environment +and preferred and locale coding systems systematically from the +LC_ALL, LC_CTYPE, and LANG environment variables during startup. + +** New language environments `Polish', `Latin-8' and `Latin-9'. +Latin-8 and Latin-9 correspond respectively to the ISO character sets +8859-14 (Celtic) and 8859-15 (updated Latin-1, with the Euro sign). +GNU Intlfonts doesn't support these yet but recent X releases have +8859-15. See etc/INSTALL for information on obtaining extra fonts. +There are new Leim input methods for Latin-8 and Latin-9 prefix (only) +and Polish `slash'. + +** New language environments `Dutch' and `Spanish'. +These new environments mainly select appropriate translations +of the tutorial. + +** In Ethiopic language environment, special key bindings for +function keys are changed as follows. This is to conform to "Emacs +Lisp Coding Convention". + + new command old-binding + --- ------- ----------- + f3 ethio-fidel-to-sera-buffer f5 + S-f3 ethio-fidel-to-sera-region f5 + C-f3 ethio-fidel-to-sera-mail-or-marker f5 + + f4 ethio-sera-to-fidel-buffer unchanged + S-f4 ethio-sera-to-fidel-region unchanged + C-f4 ethio-sera-to-fidel-mail-or-marker unchanged + + S-f5 ethio-toggle-punctuation f3 + S-f6 ethio-modify-vowel f6 + S-f7 ethio-replace-space f7 + S-f8 ethio-input-special-character f8 + S-f9 ethio-replace-space unchanged + C-f9 ethio-toggle-space f2 + +** There are new Leim input methods. +New input methods "turkish-postfix", "turkish-alt-postfix", +"greek-mizuochi", "TeX", and "greek-babel" are now part of the Leim +package. + +** The rule of input method "slovak" is slightly changed. Now the +rules for translating "q" and "Q" to "`" (backquote) are deleted, thus +typing them inserts "q" and "Q" respectively. Rules for translating +"=q", "+q", "=Q", and "+Q" to "`" are also deleted. Now, to input +"`", you must type "=q". + +** When your terminal can't display characters from some of the ISO +8859 character sets but can display Latin-1, you can display +more-or-less mnemonic sequences of ASCII/Latin-1 characters instead of +empty boxes (under a window system) or question marks (not under a +window system). Customize the option `latin1-display' to turn this +on. + +** M-; now calls comment-dwim which tries to do something clever based +on the context. M-x kill-comment is now an alias to comment-kill, +defined in newcomment.el. You can choose different styles of region +commenting with the variable `comment-style'. + +** New user options `display-time-mail-face' and +`display-time-use-mail-icon' control the appearance of mode-line mail +indicator used by the display-time package. On a suitable display the +indicator can be an icon and is mouse-sensitive. + +** On window-systems, additional space can be put between text lines +on the display using several methods + +- By setting frame parameter `line-spacing' to PIXELS. PIXELS must be +a positive integer, and specifies that PIXELS number of pixels should +be put below text lines on the affected frame or frames. + +- By setting X resource `lineSpacing', class `LineSpacing'. This is +equivalent to specifying the frame parameter. + +- By specifying `--line-spacing=N' or `-lsp N' on the command line. + +- By setting buffer-local variable `line-spacing'. The meaning is +the same, but applies to the a particular buffer only. + +** The new command `clone-indirect-buffer' can be used to create +an indirect buffer that is a twin copy of the current buffer. The +command `clone-indirect-buffer-other-window', bound to C-x 4 c, +does the same but displays the indirect buffer in another window. + +** New user options `backup-directory-alist' and +`make-backup-file-name-function' control the placement of backups, +typically in a single directory or in an invisible sub-directory. + +** New commands iso-iso2sgml and iso-sgml2iso convert between Latin-1 +characters and the corresponding SGML (HTML) entities. + +** New X resources recognized + +*** The X resource `synchronous', class `Synchronous', specifies +whether Emacs should run in synchronous mode. Synchronous mode +is useful for debugging X problems. + +Example: + + emacs.synchronous: true + +*** The X resource `visualClass, class `VisualClass', specifies the +visual Emacs should use. The resource's value should be a string of +the form `CLASS-DEPTH', where CLASS is the name of the visual class, +and DEPTH is the requested color depth as a decimal number. Valid +visual class names are + + TrueColor + PseudoColor + DirectColor + StaticColor + GrayScale + StaticGray + +Visual class names specified as X resource are case-insensitive, i.e. +`pseudocolor', `Pseudocolor' and `PseudoColor' all have the same +meaning. + +The program `xdpyinfo' can be used to list the visual classes +supported on your display, and which depths they have. If +`visualClass' is not specified, Emacs uses the display's default +visual. + +Example: + + emacs.visualClass: TrueColor-8 + +*** The X resource `privateColormap', class `PrivateColormap', +specifies that Emacs should use a private colormap if it is using the +default visual, and that visual is of class PseudoColor. Recognized +resource values are `true' or `on'. + +Example: + + emacs.privateColormap: true + +** Faces and frame parameters. + +There are four new faces `scroll-bar', `border', `cursor' and `mouse'. +Setting the frame parameters `scroll-bar-foreground' and +`scroll-bar-background' sets foreground and background color of face +`scroll-bar' and vice versa. Setting frame parameter `border-color' +sets the background color of face `border' and vice versa. Likewise +for frame parameters `cursor-color' and face `cursor', and frame +parameter `mouse-color' and face `mouse'. + +Changing frame parameter `font' sets font-related attributes of the +`default' face and vice versa. Setting frame parameters +`foreground-color' or `background-color' sets the colors of the +`default' face and vice versa. + +** New face `menu'. + +The face `menu' can be used to change colors and font of Emacs' menus. + +** New frame parameter `screen-gamma' for gamma correction. + +The new frame parameter `screen-gamma' specifies gamma-correction for +colors. Its value may be nil, the default, in which case no gamma +correction occurs, or a number > 0, usually a float, that specifies +the screen gamma of a frame's display. + +PC monitors usually have a screen gamma of 2.2. smaller values result +in darker colors. You might want to try a screen gamma of 1.5 for LCD +color displays. The viewing gamma Emacs uses is 0.4545. (1/2.2). + +The X resource name of this parameter is `screenGamma', class +`ScreenGamma'. + +** Tabs and variable-width text. + +Tabs are now displayed with stretch properties; the width of a tab is +defined as a multiple of the normal character width of a frame, and is +independent of the fonts used in the text where the tab appears. +Thus, tabs can be used to line up text in different fonts. + +** Enhancements of the Lucid menu bar + +*** The Lucid menu bar now supports the resource "margin". + + emacs.pane.menubar.margin: 5 + +The default margin is 4 which makes the menu bar appear like the +LessTif/Motif one. + +*** Arrows that indicate sub-menus are now drawn with shadows, as in +LessTif and Motif. + +** A block cursor can be drawn as wide as the glyph under it under X. + +As an example: if a block cursor is over a tab character, it will be +drawn as wide as that tab on the display. To do this, set +`x-stretch-cursor' to a non-nil value. + +** Empty display lines at the end of a buffer may be marked with a +bitmap (this is similar to the tilde displayed by vi and Less). + +This behavior is activated by setting the buffer-local variable +`indicate-empty-lines' to a non-nil value. The default value of this +variable is found in `default-indicate-empty-lines'. + +** There is a new "aggressive" scrolling method. + +When scrolling up because point is above the window start, if the +value of the buffer-local variable `scroll-up-aggressively' is a +number, Emacs chooses a new window start so that point ends up that +fraction of the window's height from the top of the window. + +When scrolling down because point is below the window end, if the +value of the buffer-local variable `scroll-down-aggressively' is a +number, Emacs chooses a new window start so that point ends up that +fraction of the window's height from the bottom of the window. + +** You can now easily create new *Info* buffers using either +M-x clone-buffer, C-u m RET or C-u g RET. +M-x clone-buffer can also be used on *Help* and several other special +buffers. + +** The command `Info-search' now uses a search history. + +** Listing buffers with M-x list-buffers (C-x C-b) now shows +abbreviated file names. Abbreviations can be customized by changing +`directory-abbrev-alist'. + +** A new variable, backup-by-copying-when-privileged-mismatch, gives +the highest file uid for which backup-by-copying-when-mismatch will be +forced on. The assumption is that uids less than or equal to this +value are special uids (root, bin, daemon, etc.--not real system +users) and that files owned by these users should not change ownership, +even if your system policy allows users other than root to edit them. + +The default is 200; set the variable to nil to disable the feature. + +** The rectangle commands now avoid inserting undesirable spaces, +notably at the end of lines. + +All these functions have been rewritten to avoid inserting unwanted +spaces, and an optional prefix now allows them to behave the old way. + +** The function `replace-rectangle' is an alias for `string-rectangle'. + +** The new command M-x string-insert-rectangle is like `string-rectangle', +but inserts text instead of replacing it. + +** The new command M-x query-replace-regexp-eval acts like +query-replace-regexp, but takes a Lisp expression which is evaluated +after each match to get the replacement text. + +** M-x query-replace recognizes a new command `e' (or `E') that lets +you edit the replacement string. + +** The new command mail-abbrev-complete-alias, bound to `M-TAB' +(if you load the library `mailabbrev'), lets you complete mail aliases +in the text, analogous to lisp-complete-symbol. + +** The variable `echo-keystrokes' may now have a floating point value. + +** If your init file is compiled (.emacs.elc), `user-init-file' is set +to the source name (.emacs.el), if that exists, after loading it. + +** The help string specified for a menu-item whose definition contains +the property `:help HELP' is now displayed under X, on MS-Windows, and +MS-DOS, either in the echo area or with tooltips. Many standard menus +displayed by Emacs now have help strings. + +-- +** New user option `read-mail-command' specifies a command to use to +read mail from the menu etc. + +** The environment variable `EMACSLOCKDIR' is no longer used on MS-Windows. +This environment variable was used when creating lock files. Emacs on +MS-Windows does not use this variable anymore. This change was made +before Emacs 21.1, but wasn't documented until now. + +** Highlighting of mouse-sensitive regions is now supported in the +MS-DOS version of Emacs. + +** The new command `msdos-set-mouse-buttons' forces the MS-DOS version +of Emacs to behave as if the mouse had a specified number of buttons. +This comes handy with mice that don't report their number of buttons +correctly. One example is the wheeled mice, which report 3 buttons, +but clicks on the middle button are not passed to the MS-DOS version +of Emacs. + +** Customize changes + +*** Customize now supports comments about customized items. Use the +`State' menu to add comments, or give a prefix argument to +M-x customize-set-variable or M-x customize-set-value. Note that +customization comments will cause the customizations to fail in +earlier versions of Emacs. + +*** The new option `custom-buffer-done-function' says whether to kill +Custom buffers when you've done with them or just bury them (the +default). + +*** If Emacs was invoked with the `-q' or `--no-init-file' options, it +does not allow you to save customizations in your `~/.emacs' init +file. This is because saving customizations from such a session would +wipe out all the other customizationss you might have on your init +file. + +** If Emacs was invoked with the `-q' or `--no-init-file' options, it +does not save disabled and enabled commands for future sessions, to +avoid overwriting existing customizations of this kind that are +already in your init file. + +** New features in evaluation commands + +*** The commands to evaluate Lisp expressions, such as C-M-x in Lisp +modes, C-j in Lisp Interaction mode, and M-:, now bind the variables +print-level, print-length, and debug-on-error based on the new +customizable variables eval-expression-print-level, +eval-expression-print-length, and eval-expression-debug-on-error. + +The default values for the first two of these variables are 12 and 4 +respectively, which means that `eval-expression' now prints at most +the first 12 members of a list and at most 4 nesting levels deep (if +the list is longer or deeper than that, an ellipsis `...' is +printed). + + or on the printed text toggles between an abbreviated +printed representation and an unabbreviated one. + +The default value of eval-expression-debug-on-error is t, so any error +during evaluation produces a backtrace. + +*** The function `eval-defun' (C-M-x) now loads Edebug and instruments +code when called with a prefix argument. + +** CC mode changes. + +Note: This release contains changes that might not be compatible with +current user setups (although it's believed that these +incompatibilities will only show in very uncommon circumstances). +However, since the impact is uncertain, these changes may be rolled +back depending on user feedback. Therefore there's no forward +compatibility guarantee wrt the new features introduced in this +release. + +*** The hardcoded switch to "java" style in Java mode is gone. +CC Mode used to automatically set the style to "java" when Java mode +is entered. This has now been removed since it caused too much +confusion. + +However, to keep backward compatibility to a certain extent, the +default value for c-default-style now specifies the "java" style for +java-mode, but "gnu" for all other modes (as before). So you won't +notice the change if you haven't touched that variable. + +*** New cleanups, space-before-funcall and compact-empty-funcall. +Two new cleanups have been added to c-cleanup-list: + +space-before-funcall causes a space to be inserted before the opening +parenthesis of a function call, which gives the style "foo (bar)". + +compact-empty-funcall causes any space before a function call opening +parenthesis to be removed if there are no arguments to the function. +It's typically useful together with space-before-funcall to get the +style "foo (bar)" and "foo()". + +*** Some keywords now automatically trigger reindentation. +Keywords like "else", "while", "catch" and "finally" have been made +"electric" to make them reindent automatically when they continue an +earlier statement. An example: + +for (i = 0; i < 17; i++) + if (a[i]) + res += a[i]->offset; +else + +Here, the "else" should be indented like the preceding "if", since it +continues that statement. CC Mode will automatically reindent it after +the "else" has been typed in full, since it's not until then it's +possible to decide whether it's a new statement or a continuation of +the preceding "if". + +CC Mode uses Abbrev mode to achieve this, which is therefore turned on +by default. + +*** M-a and M-e now moves by sentence in multiline strings. +Previously these two keys only moved by sentence in comments, which +meant that sentence movement didn't work in strings containing +documentation or other natural language text. + +The reason it's only activated in multiline strings (i.e. strings that +contain a newline, even when escaped by a '\') is to avoid stopping in +the short strings that often reside inside statements. Multiline +strings almost always contain text in a natural language, as opposed +to other strings that typically contain format specifications, +commands, etc. Also, it's not that bothersome that M-a and M-e misses +sentences in single line strings, since they're short anyway. + +*** Support for autodoc comments in Pike mode. +Autodoc comments for Pike are used to extract documentation from the +source, like Javadoc in Java. Pike mode now recognize this markup in +comment prefixes and paragraph starts. + +*** The comment prefix regexps on c-comment-prefix may be mode specific. +When c-comment-prefix is an association list, it specifies the comment +line prefix on a per-mode basis, like c-default-style does. This +change came about to support the special autodoc comment prefix in +Pike mode only. + +*** Better handling of syntactic errors. +The recovery after unbalanced parens earlier in the buffer has been +improved; CC Mode now reports them by dinging and giving a message +stating the offending line, but still recovers and indent the +following lines in a sane way (most of the time). An "else" with no +matching "if" is handled similarly. If an error is discovered while +indenting a region, the whole region is still indented and the error +is reported afterwards. + +*** Lineup functions may now return absolute columns. +A lineup function can give an absolute column to indent the line to by +returning a vector with the desired column as the first element. + +*** More robust and warning-free byte compilation. +Although this is strictly not a user visible change (well, depending +on the view of a user), it's still worth mentioning that CC Mode now +can be compiled in the standard ways without causing trouble. Some +code have also been moved between the subpackages to enhance the +modularity somewhat. Thanks to Martin Buchholz for doing the +groundwork. + +*** c-style-variables-are-local-p now defaults to t. +This is an incompatible change that has been made to make the behavior +of the style system wrt global variable settings less confusing for +non-advanced users. If you know what this variable does you might +want to set it to nil in your .emacs, otherwise you probably don't +have to bother. + +Defaulting c-style-variables-are-local-p to t avoids the confusing +situation that occurs when a user sets some style variables globally +and edits both a Java and a non-Java file in the same Emacs session. +If the style variables aren't buffer local in this case, loading of +the second file will cause the default style (either "gnu" or "java" +by default) to override the global settings made by the user. + +*** New initialization procedure for the style system. +When the initial style for a buffer is determined by CC Mode (from the +variable c-default-style), the global values of style variables now +take precedence over the values specified by the chosen style. This +is different than the old behavior: previously, the style-specific +settings would override the global settings. This change makes it +possible to do simple configuration in the intuitive way with +Customize or with setq lines in one's .emacs file. + +By default, the global value of every style variable is the new +special symbol set-from-style, which causes the value to be taken from +the style system. This means that in effect, only an explicit setting +of a style variable will cause the "overriding" behavior described +above. + +Also note that global settings override style-specific settings *only* +when the initial style of a buffer is chosen by a CC Mode major mode +function. When a style is chosen in other ways --- for example, by a +call like (c-set-style "gnu") in a hook, or via M-x c-set-style --- +then the style-specific values take precedence over any global style +values. In Lisp terms, global values override style-specific values +only when the new second argument to c-set-style is non-nil; see the +function documentation for more info. + +The purpose of these changes is to make it easier for users, +especially novice users, to do simple customizations with Customize or +with setq in their .emacs files. On the other hand, the new system is +intended to be compatible with advanced users' customizations as well, +such as those that choose styles in hooks or whatnot. This new system +is believed to be almost entirely compatible with current +configurations, in spite of the changed precedence between style and +global variable settings when a buffer's default style is set. + +(Thanks to Eric Eide for clarifying this explanation a bit.) + +**** c-offsets-alist is now a customizable variable. +This became possible as a result of the new initialization behavior. + +This variable is treated slightly differently from the other style +variables; instead of using the symbol set-from-style, it will be +completed with the syntactic symbols it doesn't already contain when +the style is first initialized. This means it now defaults to the +empty list to make all syntactic elements get their values from the +style system. + +**** Compatibility variable to restore the old behavior. +In case your configuration doesn't work with this change, you can set +c-old-style-variable-behavior to non-nil to get the old behavior back +as far as possible. + +*** Improvements to line breaking and text filling. +CC Mode now handles this more intelligently and seamlessly wrt the +surrounding code, especially inside comments. For details see the new +chapter about this in the manual. + +**** New variable to recognize comment line prefix decorations. +The variable c-comment-prefix-regexp has been added to properly +recognize the line prefix in both block and line comments. It's +primarily used to initialize the various paragraph recognition and +adaptive filling variables that the text handling functions uses. + +**** New variable c-block-comment-prefix. +This is a generalization of the now obsolete variable +c-comment-continuation-stars to handle arbitrary strings. + +**** CC Mode now uses adaptive fill mode. +This to make it adapt better to the paragraph style inside comments. + +It's also possible to use other adaptive filling packages inside CC +Mode, notably Kyle E. Jones' Filladapt mode (http://wonderworks.com/). +A new convenience function c-setup-filladapt sets up Filladapt for use +inside CC Mode. + +Note though that the 2.12 version of Filladapt lacks a feature that +causes it to work suboptimally when c-comment-prefix-regexp can match +the empty string (which it commonly does). A patch for that is +available from the CC Mode web site (http://www.python.org/emacs/ +cc-mode/). + +**** The variables `c-hanging-comment-starter-p' and +`c-hanging-comment-ender-p', which controlled how comment starters and +enders were filled, are not used anymore. The new version of the +function `c-fill-paragraph' keeps the comment starters and enders as +they were before the filling. + +**** It's now possible to selectively turn off auto filling. +The variable c-ignore-auto-fill is used to ignore auto fill mode in +specific contexts, e.g. in preprocessor directives and in string +literals. + +**** New context sensitive line break function c-context-line-break. +It works like newline-and-indent in normal code, and adapts the line +prefix according to the comment style when used inside comments. If +you're normally using newline-and-indent, you might want to switch to +this function. + +*** Fixes to IDL mode. +It now does a better job in recognizing only the constructs relevant +to IDL. E.g. it no longer matches "class" as the beginning of a +struct block, but it does match the CORBA 2.3 "valuetype" keyword. +Thanks to Eric Eide. + +*** Improvements to the Whitesmith style. +It now keeps the style consistently on all levels and both when +opening braces hangs and when they don't. + +**** New lineup function c-lineup-whitesmith-in-block. + +*** New lineup functions c-lineup-template-args and c-indent-multi-line-block. +See their docstrings for details. c-lineup-template-args does a +better job of tracking the brackets used as parens in C++ templates, +and is used by default to line up continued template arguments. + +*** c-lineup-comment now preserves alignment with a comment on the +previous line. It used to instead preserve comments that started in +the column specified by comment-column. + +*** c-lineup-C-comments handles "free form" text comments. +In comments with a long delimiter line at the start, the indentation +is kept unchanged for lines that start with an empty comment line +prefix. This is intended for the type of large block comments that +contain documentation with its own formatting. In these you normally +don't want CC Mode to change the indentation. + +*** The `c' syntactic symbol is now relative to the comment start +instead of the previous line, to make integers usable as lineup +arguments. + +*** All lineup functions have gotten docstrings. + +*** More preprocessor directive movement functions. +c-down-conditional does the reverse of c-up-conditional. +c-up-conditional-with-else and c-down-conditional-with-else are +variants of these that also stops at "#else" lines (suggested by Don +Provan). + +*** Minor improvements to many movement functions in tricky situations. + +** Dired changes + +*** New variable `dired-recursive-deletes' determines if the delete +command will delete non-empty directories recursively. The default +is, delete only empty directories. + +*** New variable `dired-recursive-copies' determines if the copy +command will copy directories recursively. The default is, do not +copy directories recursively. + +*** In command `dired-do-shell-command' (usually bound to `!') a `?' +in the shell command has a special meaning similar to `*', but with +the difference that the command will be run on each file individually. + +*** The new command `dired-find-alternate-file' (usually bound to `a') +replaces the Dired buffer with the buffer for an alternate file or +directory. + +*** The new command `dired-show-file-type' (usually bound to `y') shows +a message in the echo area describing what type of file the point is on. +This command invokes the external program `file' do its work, and so +will only work on systems with that program, and will be only as +accurate or inaccurate as it is. + +*** Dired now properly handles undo changes of adding/removing `-R' +from ls switches. + +*** Dired commands that prompt for a destination file now allow the use +of the `M-n' command in the minibuffer to insert the source filename, +which the user can then edit. This only works if there is a single +source file, not when operating on multiple marked files. + +** Gnus changes. + +The Gnus NEWS entries are short, but they reflect sweeping changes in +four areas: Article display treatment, MIME treatment, +internationalization and mail-fetching. + +*** The mail-fetching functions have changed. See the manual for the +many details. In particular, all procmail fetching variables are gone. + +If you used procmail like in + +(setq nnmail-use-procmail t) +(setq nnmail-spool-file 'procmail) +(setq nnmail-procmail-directory "~/mail/incoming/") +(setq nnmail-procmail-suffix "\\.in") + +this now has changed to + +(setq mail-sources + '((directory :path "~/mail/incoming/" + :suffix ".in"))) + +More information is available in the info doc at Select Methods -> +Getting Mail -> Mail Sources + +*** Gnus is now a MIME-capable reader. This affects many parts of +Gnus, and adds a slew of new commands. See the manual for details. +Separate MIME packages like RMIME, mime-compose etc., will probably no +longer work; remove them and use the native facilities. + +The FLIM/SEMI package still works with Emacs 21, but if you want to +use the native facilities, you must remove any mailcap.el[c] that was +installed by FLIM/SEMI version 1.13 or earlier. + +*** Gnus has also been multilingualized. This also affects too many +parts of Gnus to summarize here, and adds many new variables. There +are built-in facilities equivalent to those of gnus-mule.el, which is +now just a compatibility layer. + +*** gnus-mule.el is now just a compatibility layer over the built-in +Gnus facilities. + +*** gnus-auto-select-first can now be a function to be +called to position point. + +*** The user can now decide which extra headers should be included in +summary buffers and NOV files. + +*** `gnus-article-display-hook' has been removed. Instead, a number +of variables starting with `gnus-treat-' have been added. + +*** The Gnus posting styles have been redone again and now work in a +subtly different manner. + +*** New web-based backends have been added: nnslashdot, nnwarchive +and nnultimate. nnweb has been revamped, again, to keep up with +ever-changing layouts. + +*** Gnus can now read IMAP mail via nnimap. + +*** There is image support of various kinds and some sound support. + +** Changes in Texinfo mode. + +*** A couple of new key bindings have been added for inserting Texinfo +macros + + Key binding Macro + ------------------------- + C-c C-c C-s @strong + C-c C-c C-e @emph + C-c C-c u @uref + C-c C-c q @quotation + C-c C-c m @email + C-c C-o @ ... @end + M-RET @item + +*** The " key now inserts either " or `` or '' depending on context. + +** Changes in Outline mode. + +There is now support for Imenu to index headings. A new command +`outline-headers-as-kill' copies the visible headings in the region to +the kill ring, e.g. to produce a table of contents. + +** Changes to Emacs Server + +*** The new option `server-kill-new-buffers' specifies what to do +with buffers when done with them. If non-nil, the default, buffers +are killed, unless they were already present before visiting them with +Emacs Server. If nil, `server-temp-file-regexp' specifies which +buffers to kill, as before. + +Please note that only buffers are killed that still have a client, +i.e. buffers visited with `emacsclient --no-wait' are never killed in +this way. + +** Both emacsclient and Emacs itself now accept command line options +of the form +LINE:COLUMN in addition to +LINE. + +** Changes to Show Paren mode. + +*** Overlays used by Show Paren mode now use a priority property. +The new user option show-paren-priority specifies the priority to +use. Default is 1000. + +** New command M-x check-parens can be used to find unbalanced paren +groups and strings in buffers in Lisp mode (or other modes). + +** Changes to hideshow.el + +*** Generalized block selection and traversal + +A block is now recognized by its start and end regexps (both strings), +and an integer specifying which sub-expression in the start regexp +serves as the place where a `forward-sexp'-like function can operate. +See the documentation of variable `hs-special-modes-alist'. + +*** During incremental search, if Hideshow minor mode is active, +hidden blocks are temporarily shown. The variable `hs-headline' can +be used in the mode line format to show the line at the beginning of +the open block. + +*** User option `hs-hide-all-non-comment-function' specifies a +function to be called at each top-level block beginning, instead of +the normal block-hiding function. + +*** The command `hs-show-region' has been removed. + +*** The key bindings have changed to fit the Emacs conventions, +roughly imitating those of Outline minor mode. Notably, the prefix +for all bindings is now `C-c @'. For details, see the documentation +for `hs-minor-mode'. + +*** The variable `hs-show-hidden-short-form' has been removed, and +hideshow.el now always behaves as if this variable were set to t. + +** Changes to Change Log mode and Add-Log functions + +*** If you invoke `add-change-log-entry' from a backup file, it makes +an entry appropriate for the file's parent. This is useful for making +log entries by comparing a version with deleted functions. + +**** New command M-x change-log-merge merges another log into the +current buffer. + +*** New command M-x change-log-redate fixes any old-style date entries +in a log file. + +*** Change Log mode now adds a file's version number to change log +entries if user-option `change-log-version-info-enabled' is non-nil. +Unless the file is under version control the search for a file's +version number is performed based on regular expressions from +`change-log-version-number-regexp-list' which can be customized. +Version numbers are only found in the first 10 percent of a file. + +*** Change Log mode now defines its own faces for font-lock highlighting. + +** Changes to cmuscheme + +*** The user-option `scheme-program-name' has been renamed +`cmuscheme-program-name' due to conflicts with xscheme.el. + +** Changes in Font Lock + +*** The new function `font-lock-remove-keywords' can be used to remove +font-lock keywords from the current buffer or from a specific major mode. + +*** Multi-line patterns are now supported. Modes using this, should +set font-lock-multiline to t in their font-lock-defaults. + +*** `font-lock-syntactic-face-function' allows major-modes to choose +the face used for each string/comment. + +*** A new standard face `font-lock-doc-face'. +Meant for Lisp docstrings, Javadoc comments and other "documentation in code". + +** Changes to Shell mode + +*** The `shell' command now accepts an optional argument to specify the buffer +to use, which defaults to "*shell*". When used interactively, a +non-default buffer may be specified by giving the `shell' command a +prefix argument (causing it to prompt for the buffer name). + +** Comint (subshell) changes + +These changes generally affect all modes derived from comint mode, which +include shell-mode, gdb-mode, scheme-interaction-mode, etc. + +*** Comint now by default interprets some carriage-control characters. +Comint now removes CRs from CR LF sequences, and treats single CRs and +BSs in the output in a way similar to a terminal (by deleting to the +beginning of the line, or deleting the previous character, +respectively). This is achieved by adding `comint-carriage-motion' to +the `comint-output-filter-functions' hook by default. + +*** By default, comint no longer uses the variable `comint-prompt-regexp' +to distinguish prompts from user-input. Instead, it notices which +parts of the text were output by the process, and which entered by the +user, and attaches `field' properties to allow emacs commands to use +this information. Common movement commands, notably beginning-of-line, +respect field boundaries in a fairly natural manner. To disable this +feature, and use the old behavior, customize the user option +`comint-use-prompt-regexp-instead-of-fields'. + +*** Comint now includes new features to send commands to running processes +and redirect the output to a designated buffer or buffers. + +*** The command M-x comint-redirect-send-command reads a command and +buffer name from the mini-buffer. The command is sent to the current +buffer's process, and its output is inserted into the specified buffer. + +The command M-x comint-redirect-send-command-to-process acts like +M-x comint-redirect-send-command but additionally reads the name of +the buffer whose process should be used from the mini-buffer. + +*** Packages based on comint now highlight user input and program prompts, +and support choosing previous input with mouse-2. To control these features, +see the user-options `comint-highlight-input' and `comint-highlight-prompt'. + +*** The new command `comint-write-output' (usually bound to `C-c C-s') +saves the output from the most recent command to a file. With a prefix +argument, it appends to the file. + +*** The command `comint-kill-output' has been renamed `comint-delete-output' +(usually bound to `C-c C-o'); the old name is aliased to it for +compatibility. + +*** The new function `comint-add-to-input-history' adds commands to the input +ring (history). + +*** The new variable `comint-input-history-ignore' is a regexp for +identifying history lines that should be ignored, like tcsh time-stamp +strings, starting with a `#'. The default value of this variable is "^#". + +** Changes to Rmail mode + +*** The new user-option rmail-user-mail-address-regexp can be +set to fine tune the identification of the correspondent when +receiving new mail. If it matches the address of the sender, the +recipient is taken as correspondent of a mail. If nil, the default, +`user-login-name' and `user-mail-address' are used to exclude yourself +as correspondent. + +Usually you don't have to set this variable, except if you collect +mails sent by you under different user names. Then it should be a +regexp matching your mail addresses. + +*** The new user-option rmail-confirm-expunge controls whether and how +to ask for confirmation before expunging deleted messages from an +Rmail file. You can choose between no confirmation, confirmation +with y-or-n-p, or confirmation with yes-or-no-p. Default is to ask +for confirmation with yes-or-no-p. + +*** RET is now bound in the Rmail summary to rmail-summary-goto-msg, +like `j'. + +*** There is a new user option `rmail-digest-end-regexps' that +specifies the regular expressions to detect the line that ends a +digest message. + +*** The new user option `rmail-automatic-folder-directives' specifies +in which folder to put messages automatically. + +*** The new function `rmail-redecode-body' allows to fix a message +with non-ASCII characters if Emacs happens to decode it incorrectly +due to missing or malformed "charset=" header. + +** The new user-option `mail-envelope-from' can be used to specify +an envelope-from address different from user-mail-address. + +** The variable mail-specify-envelope-from controls whether to +use the -f option when sending mail. + +** The Rmail command `o' (`rmail-output-to-rmail-file') now writes the +current message in the internal `emacs-mule' encoding, rather than in +the encoding taken from the variable `buffer-file-coding-system'. +This allows to save messages whose characters cannot be safely encoded +by the buffer's coding system, and makes sure the message will be +displayed correctly when you later visit the target Rmail file. + +If you want your Rmail files be encoded in a specific coding system +other than `emacs-mule', you can customize the variable +`rmail-file-coding-system' to set its value to that coding system. + +** Changes to TeX mode + +*** The default mode has been changed from `plain-tex-mode' to +`latex-mode'. + +*** latex-mode now has a simple indentation algorithm. + +*** M-f and M-p jump around \begin...\end pairs. + +*** Added support for outline-minor-mode. + +** Changes to RefTeX mode + +*** RefTeX has new support for index generation. Index entries can be + created with `C-c <', with completion available on index keys. + Pressing `C-c /' indexes the word at the cursor with a default + macro. `C-c >' compiles all index entries into an alphabetically + sorted *Index* buffer which looks like the final index. Entries + can be edited from that buffer. + +*** Label and citation key selection now allow to select several + items and reference them together (use `m' to mark items, `a' or + `A' to use all marked entries). + +*** reftex.el has been split into a number of smaller files to reduce + memory use when only a part of RefTeX is being used. + +*** a new command `reftex-view-crossref-from-bibtex' (bound to `C-c &' + in BibTeX-mode) can be called in a BibTeX database buffer in order + to show locations in LaTeX documents where a particular entry has + been cited. + +** Emacs Lisp mode now allows multiple levels of outline headings. +The level of a heading is determined from the number of leading +semicolons in a heading line. Toplevel forms starting with a `(' +in column 1 are always made leaves. + +** The M-x time-stamp command (most commonly used on write-file-hooks) +has the following new features: + +*** The patterns for finding the time stamp and for updating a pattern +may match text spanning multiple lines. For example, some people like +to have the filename and date on separate lines. The new variable +time-stamp-inserts-lines controls the matching for multi-line patterns. + +*** More than one time stamp can be updated in the same file. This +feature is useful if you need separate time stamps in a program source +file to both include in formatted documentation and insert in the +compiled binary. The same time-stamp will be written at each matching +pattern. The variable time-stamp-count enables this new feature; it +defaults to 1. + +** Partial Completion mode now completes environment variables in +file names. + +** Ispell changes + +*** The command `ispell' now spell-checks a region if +transient-mark-mode is on, and the mark is active. Otherwise it +spell-checks the current buffer. + +*** Support for synchronous subprocesses - DOS/Windoze - has been +added. + +*** An "alignment error" bug was fixed when a manual spelling +correction is made and re-checked. + +*** Italian, Portuguese, and Slovak dictionary definitions have been added. + +*** Region skipping performance has been vastly improved in some +cases. + +*** Spell checking HTML buffers has been improved and isn't so strict +on syntax errors. + +*** The buffer-local words are now always placed on a new line at the +end of the buffer. + +*** Spell checking now works in the MS-DOS version of Emacs. + +*** The variable `ispell-format-word' has been renamed to +`ispell-format-word-function'. The old name is still available as +alias. + +** Makefile mode changes + +*** The mode now uses the abbrev table `makefile-mode-abbrev-table'. + +*** Conditionals and include statements are now highlighted when +Fontlock mode is active. + +** Isearch changes + +*** Isearch now puts a call to `isearch-resume' in the command history, +so that searches can be resumed. + +*** In Isearch mode, C-M-s and C-M-r are now bound like C-s and C-r, +respectively, i.e. you can repeat a regexp isearch with the same keys +that started the search. + +*** In Isearch mode, mouse-2 in the echo area now yanks the current +selection into the search string rather than giving an error. + +*** There is a new lazy highlighting feature in incremental search. + +Lazy highlighting is switched on/off by customizing variable +`isearch-lazy-highlight'. When active, all matches for the current +search string are highlighted. The current match is highlighted as +before using face `isearch' or `region'. All other matches are +highlighted using face `isearch-lazy-highlight-face' which defaults to +`secondary-selection'. + +The extra highlighting makes it easier to anticipate where the cursor +will end up each time you press C-s or C-r to repeat a pending search. +Highlighting of these additional matches happens in a deferred fashion +using "idle timers," so the cycles needed do not rob isearch of its +usual snappy response. + +If `isearch-lazy-highlight-cleanup' is set to t, highlights for +matches are automatically cleared when you end the search. If it is +set to nil, you can remove the highlights manually with `M-x +isearch-lazy-highlight-cleanup'. + +** VC Changes + +VC has been overhauled internally. It is now modular, making it +easier to plug-in arbitrary version control backends. (See Lisp +Changes for details on the new structure.) As a result, the mechanism +to enable and disable support for particular version systems has +changed: everything is now controlled by the new variable +`vc-handled-backends'. Its value is a list of symbols that identify +version systems; the default is '(RCS CVS SCCS). When finding a file, +each of the backends in that list is tried in order to see whether the +file is registered in that backend. + +When registering a new file, VC first tries each of the listed +backends to see if any of them considers itself "responsible" for the +directory of the file (e.g. because a corresponding subdirectory for +master files exists). If none of the backends is responsible, then +the first backend in the list that could register the file is chosen. +As a consequence, the variable `vc-default-back-end' is now obsolete. + +The old variable `vc-master-templates' is also obsolete, although VC +still supports it for backward compatibility. To define templates for +RCS or SCCS, you should rather use the new variables +vc-{rcs,sccs}-master-templates. (There is no such feature under CVS +where it doesn't make sense.) + +The variables `vc-ignore-vc-files' and `vc-handle-cvs' are also +obsolete now, you must set `vc-handled-backends' to nil or exclude +`CVS' from the list, respectively, to achieve their effect now. + +*** General Changes + +The variable `vc-checkout-carefully' is obsolete: the corresponding +checks are always done now. + +VC Dired buffers are now kept up-to-date during all version control +operations. + +`vc-diff' output is now displayed in `diff-mode'. +`vc-print-log' uses `log-view-mode'. +`vc-log-mode' (used for *VC-Log*) has been replaced by `log-edit-mode'. + +The command C-x v m (vc-merge) now accepts an empty argument as the +first revision number. This means that any recent changes on the +current branch should be picked up from the repository and merged into +the working file (``merge news''). + +The commands C-x v s (vc-create-snapshot) and C-x v r +(vc-retrieve-snapshot) now ask for a directory name from which to work +downwards. + +*** Multiple Backends + +VC now lets you register files in more than one backend. This is +useful, for example, if you are working with a slow remote CVS +repository. You can then use RCS for local editing, and occasionally +commit your changes back to CVS, or pick up changes from CVS into your +local RCS archives. + +To make this work, the ``more local'' backend (RCS in our example) +should come first in `vc-handled-backends', and the ``more remote'' +backend (CVS) should come later. (The default value of +`vc-handled-backends' already has it that way.) + +You can then commit changes to another backend (say, RCS), by typing +C-u C-x v v RCS RET (i.e. vc-next-action now accepts a backend name as +a revision number). VC registers the file in the more local backend +if that hasn't already happened, and commits to a branch based on the +current revision number from the more remote backend. + +If a file is registered in multiple backends, you can switch to +another one using C-x v b (vc-switch-backend). This does not change +any files, it only changes VC's perspective on the file. Use this to +pick up changes from CVS while working under RCS locally. + +After you are done with your local RCS editing, you can commit your +changes back to CVS using C-u C-x v v CVS RET. In this case, the +local RCS archive is removed after the commit, and the log entry +buffer is initialized to contain the entire RCS change log of the file. + +*** Changes for CVS + +There is a new user option, `vc-cvs-stay-local'. If it is `t' (the +default), then VC avoids network queries for files registered in +remote repositories. The state of such files is then only determined +by heuristics and past information. `vc-cvs-stay-local' can also be a +regexp to match against repository hostnames; only files from hosts +that match it are treated locally. If the variable is nil, then VC +queries the repository just as often as it does for local files. + +If `vc-cvs-stay-local' is on, then VC also makes local backups of +repository versions. This means that ordinary diffs (C-x v =) and +revert operations (C-x v u) can be done completely locally, without +any repository interactions at all. The name of a local version +backup of FILE is FILE.~REV.~, where REV is the repository version +number. This format is similar to that used by C-x v ~ +(vc-version-other-window), except for the trailing dot. As a matter +of fact, the two features can each use the files created by the other, +the only difference being that files with a trailing `.' are deleted +automatically after commit. (This feature doesn't work on MS-DOS, +since DOS disallows more than a single dot in the trunk of a file +name.) + +If `vc-cvs-stay-local' is on, and there have been changes in the +repository, VC notifies you about it when you actually try to commit. +If you want to check for updates from the repository without trying to +commit, you can either use C-x v m RET to perform an update on the +current file, or you can use C-x v r RET to get an update for an +entire directory tree. + +The new user option `vc-cvs-use-edit' indicates whether VC should call +"cvs edit" to make files writeable; it defaults to `t'. (This option +is only meaningful if the CVSREAD variable is set, or if files are +"watched" by other developers.) + +The commands C-x v s (vc-create-snapshot) and C-x v r +(vc-retrieve-snapshot) are now also implemented for CVS. If you give +an empty snapshot name to the latter, that performs a `cvs update', +starting at the given directory. + +*** Lisp Changes in VC + +VC has been restructured internally to make it modular. You can now +add support for arbitrary version control backends by writing a +library that provides a certain set of backend-specific functions, and +then telling VC to use that library. For example, to add support for +a version system named SYS, you write a library named vc-sys.el, which +provides a number of functions vc-sys-... (see commentary at the top +of vc.el for a detailed list of them). To make VC use that library, +you need to put it somewhere into Emacs' load path and add the symbol +`SYS' to the list `vc-handled-backends'. + +** The customizable EDT emulation package now supports the EDT +SUBS command and EDT scroll margins. It also works with more +terminal/keyboard configurations and it now works under XEmacs. +See etc/edt-user.doc for more information. + +** New modes and packages + +*** The new global minor mode `minibuffer-electric-default-mode' +automatically hides the `(default ...)' part of minibuffer prompts when +the default is not applicable. + +*** Artist is an Emacs lisp package that allows you to draw lines, +rectangles and ellipses by using your mouse and/or keyboard. The +shapes are made up with the ascii characters |, -, / and \. + +Features are: + +- Intersecting: When a `|' intersects with a `-', a `+' is + drawn, like this: | \ / + --+-- X + | / \ + +- Rubber-banding: When drawing lines you can interactively see the + result while holding the mouse button down and moving the mouse. If + your machine is not fast enough (a 386 is a bit too slow, but a + pentium is well enough), you can turn this feature off. You will + then see 1's and 2's which mark the 1st and 2nd endpoint of the line + you are drawing. + +- Arrows: After having drawn a (straight) line or a (straight) + poly-line, you can set arrows on the line-ends by typing < or >. + +- Flood-filling: You can fill any area with a certain character by + flood-filling. + +- Cut copy and paste: You can cut, copy and paste rectangular + regions. Artist also interfaces with the rect package (this can be + turned off if it causes you any trouble) so anything you cut in + artist can be yanked with C-x r y and vice versa. + +- Drawing with keys: Everything you can do with the mouse, you can + also do without the mouse. + +- Aspect-ratio: You can set the variable artist-aspect-ratio to + reflect the height-width ratio for the font you are using. Squares + and circles are then drawn square/round. Note, that once your + ascii-file is shown with font with a different height-width ratio, + the squares won't be square and the circles won't be round. + +- Drawing operations: The following drawing operations are implemented: + + lines straight-lines + rectangles squares + poly-lines straight poly-lines + ellipses circles + text (see-thru) text (overwrite) + spray-can setting size for spraying + vaporize line vaporize lines + erase characters erase rectangles + + Straight lines are lines that go horizontally, vertically or + diagonally. Plain lines go in any direction. The operations in + the right column are accessed by holding down the shift key while + drawing. + + It is possible to vaporize (erase) entire lines and connected lines + (rectangles for example) as long as the lines being vaporized are + straight and connected at their endpoints. Vaporizing is inspired + by the drawrect package by Jari Aalto . + +- Picture mode compatibility: Artist is picture mode compatible (this + can be turned off). + +*** The new package Eshell is an operating system command shell +implemented entirely in Emacs Lisp. Use `M-x eshell' to invoke it. +It functions similarly to bash and zsh, and allows running of Lisp +functions and external commands using the same syntax. It supports +history lists, aliases, extended globbing, smart scrolling, etc. It +will work on any platform Emacs has been ported to. And since most of +the basic commands -- ls, rm, mv, cp, ln, du, cat, etc. -- have been +rewritten in Lisp, it offers an operating-system independent shell, +all within the scope of your Emacs process. + +*** The new package timeclock.el is a mode is for keeping track of time +intervals. You can use it for whatever purpose you like, but the +typical scenario is to keep track of how much time you spend working +on certain projects. + +*** The new package hi-lock.el provides commands to highlight matches +of interactively entered regexps. For example, + + M-x highlight-regexp RET clearly RET RET + +will highlight all occurrences of `clearly' using a yellow background +face. New occurrences of `clearly' will be highlighted as they are +typed. `M-x unhighlight-regexp RET' will remove the highlighting. +Any existing face can be used for highlighting and a set of +appropriate faces is provided. The regexps can be written into the +current buffer in a form that will be recognized the next time the +corresponding file is read. There are commands to highlight matches +to phrases and to highlight entire lines containing a match. + +*** The new package zone.el plays games with Emacs' display when +Emacs is idle. + +*** The new package tildify.el allows to add hard spaces or other text +fragments in accordance with the current major mode. + +*** The new package xml.el provides a simple but generic XML +parser. It doesn't parse the DTDs however. + +*** The comment operations are now provided by the newcomment.el +package which allows different styles of comment-region and should +be more robust while offering the same functionality. +`comment-region' now doesn't always comment a-line-at-a-time, but only +comments the region, breaking the line at point if necessary. + +*** The Ebrowse package implements a C++ class browser and tags +facilities tailored for use with C++. It is documented in a +separate Texinfo file. + +*** The PCL-CVS package available by either running M-x cvs-examine or +by visiting a CVS administrative directory (with a prefix argument) +provides an alternative interface to VC-dired for CVS. It comes with +`log-view-mode' to view RCS and SCCS logs and `log-edit-mode' used to +enter check-in log messages. + +*** The new package called `woman' allows to browse Unix man pages +without invoking external programs. + +The command `M-x woman' formats manual pages entirely in Emacs Lisp +and then displays them, like `M-x manual-entry' does. Unlike +`manual-entry', `woman' does not invoke any external programs, so it +is useful on systems such as MS-DOS/MS-Windows where the `man' and +Groff or `troff' commands are not readily available. + +The command `M-x woman-find-file' asks for the file name of a man +page, then formats and displays it like `M-x woman' does. + +*** The new command M-x re-builder offers a convenient interface for +authoring regular expressions with immediate visual feedback. + +The buffer from which the command was called becomes the target for +the regexp editor popping up in a separate window. Matching text in +the target buffer is immediately color marked during the editing. +Each sub-expression of the regexp will show up in a different face so +even complex regexps can be edited and verified on target data in a +single step. + +On displays not supporting faces the matches instead blink like +matching parens to make them stand out. On such a setup you will +probably also want to use the sub-expression mode when the regexp +contains such to get feedback about their respective limits. + +*** glasses-mode is a minor mode that makes +unreadableIdentifiersLikeThis readable. It works as glasses, without +actually modifying content of a buffer. + +*** The package ebnf2ps translates an EBNF to a syntactic chart in +PostScript. + +Currently accepts ad-hoc EBNF, ISO EBNF and Bison/Yacc. + +The ad-hoc default EBNF syntax has the following elements: + + ; comment (until end of line) + A non-terminal + "C" terminal + ?C? special + $A default non-terminal + $"C" default terminal + $?C? default special + A = B. production (A is the header and B the body) + C D sequence (C occurs before D) + C | D alternative (C or D occurs) + A - B exception (A excluding B, B without any non-terminal) + n * A repetition (A repeats n (integer) times) + (C) group (expression C is grouped together) + [C] optional (C may or not occurs) + C+ one or more occurrences of C + {C}+ one or more occurrences of C + {C}* zero or more occurrences of C + {C} zero or more occurrences of C + C / D equivalent to: C {D C}* + {C || D}+ equivalent to: C {D C}* + {C || D}* equivalent to: [C {D C}*] + {C || D} equivalent to: [C {D C}*] + +Please, see ebnf2ps documentation for EBNF syntax and how to use it. + +*** The package align.el will align columns within a region, using M-x +align. Its mode-specific rules, based on regular expressions, +determine where the columns should be split. In C and C++, for +example, it will align variable names in declaration lists, or the +equal signs of assignments. + +*** `paragraph-indent-minor-mode' is a new minor mode supporting +paragraphs in the same style as `paragraph-indent-text-mode'. + +*** bs.el is a new package for buffer selection similar to +list-buffers or electric-buffer-list. Use M-x bs-show to display a +buffer menu with this package. See the Custom group `bs'. + +*** find-lisp.el is a package emulating the Unix find command in Lisp. + +*** calculator.el is a small calculator package that is intended to +replace desktop calculators such as xcalc and calc.exe. Actually, it +is not too small - it has more features than most desktop calculators, +and can be customized easily to get many more functions. It should +not be confused with "calc" which is a much bigger mathematical tool +which answers different needs. + +*** The minor modes cwarn-mode and global-cwarn-mode highlights +suspicious C and C++ constructions. Currently, assignments inside +expressions, semicolon following `if', `for' and `while' (except, of +course, after a `do .. while' statement), and C++ functions with +reference parameters are recognized. The modes require font-lock mode +to be enabled. + +*** smerge-mode.el provides `smerge-mode', a simple minor-mode for files +containing diff3-style conflict markers, such as generated by RCS. + +*** 5x5.el is a simple puzzle game. + +*** hl-line.el provides `hl-line-mode', a minor mode to highlight the +current line in the current buffer. It also provides +`global-hl-line-mode' to provide the same behavior in all buffers. + +*** ansi-color.el translates ANSI terminal escapes into text-properties. + +Please note: if `ansi-color-for-comint-mode' and +`global-font-lock-mode' are non-nil, loading ansi-color.el will +disable font-lock and add `ansi-color-apply' to +`comint-preoutput-filter-functions' for all shell-mode buffers. This +displays the output of "ls --color=yes" using the correct foreground +and background colors. + +*** delphi.el provides a major mode for editing the Delphi (Object +Pascal) language. + +*** quickurl.el provides a simple method of inserting a URL based on +the text at point. + +*** sql.el provides an interface to SQL data bases. + +*** fortune.el uses the fortune program to create mail/news signatures. + +*** whitespace.el is a package for warning about and cleaning bogus +whitespace in a file. + +*** PostScript mode (ps-mode) is a new major mode for editing PostScript +files. It offers: interaction with a PostScript interpreter, including +(very basic) error handling; fontification, easily customizable for +interpreter messages; auto-indentation; insertion of EPSF templates and +often used code snippets; viewing of BoundingBox; commenting out / +uncommenting regions; conversion of 8bit characters to PostScript octal +codes. All functionality is accessible through a menu. + +*** delim-col helps to prettify columns in a text region or rectangle. + +Here is an example of columns: + +horse apple bus +dog pineapple car EXTRA +porcupine strawberry airplane + +Doing the following settings: + + (setq delimit-columns-str-before "[ ") + (setq delimit-columns-str-after " ]") + (setq delimit-columns-str-separator ", ") + (setq delimit-columns-separator "\t") + + +Selecting the lines above and typing: + + M-x delimit-columns-region + +It results: + +[ horse , apple , bus , ] +[ dog , pineapple , car , EXTRA ] +[ porcupine, strawberry, airplane, ] + +delim-col has the following options: + + delimit-columns-str-before Specify a string to be inserted + before all columns. + + delimit-columns-str-separator Specify a string to be inserted + between each column. + + delimit-columns-str-after Specify a string to be inserted + after all columns. + + delimit-columns-separator Specify a regexp which separates + each column. + +delim-col has the following commands: + + delimit-columns-region Prettify all columns in a text region. + delimit-columns-rectangle Prettify all columns in a text rectangle. + +*** Recentf mode maintains a menu for visiting files that were +operated on recently. User option recentf-menu-filter specifies a +menu filter function to change the menu appearance. For example, the +recent file list can be displayed: + +- organized by major modes, directories or user defined rules. +- sorted by file paths, file names, ascending or descending. +- showing paths relative to the current default-directory + +The `recentf-filter-changer' menu filter function allows to +dynamically change the menu appearance. + +*** elide-head.el provides a mechanism for eliding boilerplate header +text. + +*** footnote.el provides `footnote-mode', a minor mode supporting use +of footnotes. It is intended for use with Message mode, but isn't +specific to Message mode. + +*** diff-mode.el provides `diff-mode', a major mode for +viewing/editing context diffs (patches). It is selected for files +with extension `.diff', `.diffs', `.patch' and `.rej'. + +*** EUDC, the Emacs Unified Directory Client, provides a common user +interface to access directory servers using different directory +protocols. It has a separate manual. + +*** autoconf.el provides a major mode for editing configure.in files +for Autoconf, selected automatically. + +*** windmove.el provides moving between windows. + +*** crm.el provides a facility to read multiple strings from the +minibuffer with completion. + +*** todo-mode.el provides management of TODO lists and integration +with the diary features. + +*** autoarg.el provides a feature reported from Twenex Emacs whereby +numeric keys supply prefix args rather than self inserting. + +*** The function `turn-off-auto-fill' unconditionally turns off Auto +Fill mode. + +*** pcomplete.el is a library that provides programmable completion +facilities for Emacs, similar to what zsh and tcsh offer. The main +difference is that completion functions are written in Lisp, meaning +they can be profiled, debugged, etc. + +*** antlr-mode is a new major mode for editing ANTLR grammar files. +It is automatically turned on for files whose names have the extension +`.g'. + +** Changes in sort.el + +The function sort-numeric-fields interprets numbers starting with `0' +as octal and numbers starting with `0x' or `0X' as hexadecimal. The +new user-option sort-numeric-base can be used to specify a default +numeric base. + +** Changes to Ange-ftp + +*** Ange-ftp allows you to specify of a port number in remote file +names cleanly. It is appended to the host name, separated by a hash +sign, e.g. `/foo@bar.org#666:mumble'. (This syntax comes from EFS.) + +*** If the new user-option `ange-ftp-try-passive-mode' is set, passive +ftp mode will be used if the ftp client supports that. + +*** Ange-ftp handles the output of the w32-style clients which +output ^M at the end of lines. + +** The recommended way of using Iswitchb is via the new global minor +mode `iswitchb-mode'. + +** Just loading the msb package doesn't switch on Msb mode anymore. +If you have `(require 'msb)' in your .emacs, please replace it with +`(msb-mode 1)'. + +** Changes in Flyspell mode + +*** Flyspell mode has various new options. See the `flyspell' Custom +group. + +*** The variable `flyspell-generic-check-word-p' has been renamed +to `flyspell-generic-check-word-predicate'. The old name is still +available as alias. + +** The user option `backward-delete-char-untabify-method' controls the +behavior of `backward-delete-char-untabify'. The following values +are recognized: + +`untabify' -- turn a tab to many spaces, then delete one space; +`hungry' -- delete all whitespace, both tabs and spaces; +`all' -- delete all whitespace, including tabs, spaces and newlines; +nil -- just delete one character. + +Default value is `untabify'. + +[This change was made in Emacs 20.3 but not mentioned then.] + +** In Cperl mode `cperl-invalid-face' should now be a normal face +symbol, not double-quoted. + +** Some packages are declared obsolete, to be removed in a future +version. They are: auto-show, c-mode, hilit19, hscroll, ooutline, +profile, rnews, rnewspost, and sc. Their implementations have been +moved to lisp/obsolete. + +** auto-compression mode is no longer enabled just by loading jka-compr.el. +To control it, set `auto-compression-mode' via Custom or use the +`auto-compression-mode' command. + +** `browse-url-gnome-moz' is a new option for +`browse-url-browser-function', invoking Mozilla in GNOME, and +`browse-url-kde' can be chosen for invoking the KDE browser. + +** The user-option `browse-url-new-window-p' has been renamed to +`browse-url-new-window-flag'. + +** The functions `keep-lines', `flush-lines' and `how-many' now +operate on the active region in Transient Mark mode. + +** `gnus-user-agent' is a new possibility for `mail-user-agent'. It +is like `message-user-agent', but with all the Gnus paraphernalia. + +** The Strokes package has been updated. If your Emacs has XPM +support, you can use it for pictographic editing. In Strokes mode, +use C-mouse-2 to compose a complex stoke and insert it into the +buffer. You can encode or decode a strokes buffer with new commands +M-x strokes-encode-buffer and M-x strokes-decode-buffer. There is a +new command M-x strokes-list-strokes. + +** Hexl contains a new command `hexl-insert-hex-string' which inserts +a string of hexadecimal numbers read from the mini-buffer. + +** Hexl mode allows to insert non-ASCII characters. + +The non-ASCII characters are encoded using the same encoding as the +file you are visiting in Hexl mode. + +** Shell script mode changes. + +Shell script mode (sh-script) can now indent scripts for shells +derived from sh and rc. The indentation style is customizable, and +sh-script can attempt to "learn" the current buffer's style. + +** Etags changes. + +*** In DOS, etags looks for file.cgz if it cannot find file.c. + +*** New option --ignore-case-regex is an alternative to --regex. It is now +possible to bind a regexp to a language, by prepending the regexp with +{lang}, where lang is one of the languages that `etags --help' prints out. +This feature is useful especially for regex files, where each line contains +a regular expression. The manual contains details. + +*** In C and derived languages, etags creates tags for function +declarations when given the --declarations option. + +*** In C++, tags are created for "operator". The tags have the form +"operator+", without spaces between the keyword and the operator. + +*** You shouldn't generally need any more the -C or -c++ option: etags +automatically switches to C++ parsing when it meets the `class' or +`template' keywords. + +*** Etags now is able to delve at arbitrary deeps into nested structures in +C-like languages. Previously, it was limited to one or two brace levels. + +*** New language Ada: tags are functions, procedures, packages, tasks, and +types. + +*** In Fortran, `procedure' is not tagged. + +*** In Java, tags are created for "interface". + +*** In Lisp, "(defstruct (foo", "(defun (operator" and similar constructs +are now tagged. + +*** In makefiles, tags the targets. + +*** In Perl, the --globals option tags global variables. my and local +variables are tagged. + +*** New language Python: def and class at the beginning of a line are tags. + +*** .ss files are Scheme files, .pdb is Postscript with C syntax, .psw is +for PSWrap. + +** Changes in etags.el + +*** The new user-option tags-case-fold-search can be used to make +tags operations case-sensitive or case-insensitive. The default +is to use the same setting as case-fold-search. + +*** You can display additional output with M-x tags-apropos by setting +the new variable tags-apropos-additional-actions. + +If non-nil, the variable's value should be a list of triples (TITLE +FUNCTION TO-SEARCH). For each triple, M-x tags-apropos processes +TO-SEARCH and lists tags from it. TO-SEARCH should be an alist, +obarray, or symbol. If it is a symbol, the symbol's value is used. + +TITLE is a string to use to label the list of tags from TO-SEARCH. + +FUNCTION is a function to call when an entry is selected in the Tags +List buffer. It is called with one argument, the selected symbol. + +A useful example value for this variable might be something like: + + '(("Emacs Lisp" Info-goto-emacs-command-node obarray) + ("Common Lisp" common-lisp-hyperspec common-lisp-hyperspec-obarray) + ("SCWM" scwm-documentation scwm-obarray)) + +*** The face tags-tag-face can be used to customize the appearance +of tags in the output of M-x tags-apropos. + +*** Setting tags-apropos-verbose to a non-nil value displays the +names of tags files in the *Tags List* buffer. + +*** You can now search for tags that are part of the filename itself. +If you have tagged the files topfile.c subdir/subfile.c +/tmp/tempfile.c, you can now search for tags "topfile.c", "subfile.c", +"dir/sub", "tempfile", "tempfile.c". If the tag matches the file name, +point will go to the beginning of the file. + +*** Compressed files are now transparently supported if +auto-compression-mode is active. You can tag (with Etags) and search +(with find-tag) both compressed and uncompressed files. + +*** Tags commands like M-x tags-search no longer change point +in buffers where no match is found. In buffers where a match is +found, the original value of point is pushed on the marker ring. + +** Fortran mode has a new command `fortran-strip-sequence-nos' to +remove text past column 72. The syntax class of `\' in Fortran is now +appropriate for C-style escape sequences in strings. + +** SGML mode's default `sgml-validate-command' is now `nsgmls'. + +** A new command `view-emacs-problems' (C-h P) displays the PROBLEMS file. + +** The Dabbrev package has a new user-option `dabbrev-ignored-regexps' +containing a list of regular expressions. Buffers matching a regular +expression from that list, are not checked. + +** Emacs can now figure out modification times of remote files. +When you do C-x C-f /user@host:/path/file RET and edit the file, +and someone else modifies the file, you will be prompted to revert +the buffer, just like for the local files. + +** The buffer menu (C-x C-b) no longer lists the *Buffer List* buffer. + +** When invoked with a prefix argument, the command `list-abbrevs' now +displays local abbrevs, only. + +** Refill minor mode provides preliminary support for keeping +paragraphs filled as you modify them. + +** The variable `double-click-fuzz' specifies how much the mouse +may be moved between clicks that are recognized as a pair. Its value +is measured in pixels. + +** The new global minor mode `auto-image-file-mode' allows image files +to be visited as images. + +** Two new user-options `grep-command' and `grep-find-command' +were added to compile.el. + +** Withdrawn packages + +*** mldrag.el has been removed. mouse.el provides the same +functionality with aliases for the mldrag functions. + +*** eval-reg.el has been obsoleted by changes to edebug.el and removed. + +*** ph.el has been obsoleted by EUDC and removed. + + +* Incompatible Lisp changes in 21.1 + +There are a few Lisp changes which are not backwards-compatible and +may require changes to existing code. Here is a list for reference. +See the sections below for details. + +** Since `format' preserves text properties, the idiom +`(format "%s" foo)' no longer works to copy and remove properties. +Use `copy-sequence' to copy the string, then use `set-text-properties' +to remove the properties of the copy. + +** Since the `keymap' text property now has significance, some code +which uses both `local-map' and `keymap' properties (for portability) +may, for instance, give rise to duplicate menus when the keymaps from +these properties are active. + +** The change in the treatment of non-ASCII characters in search +ranges may affect some code. + +** A non-nil value for the LOCAL arg of add-hook makes the hook +buffer-local even if `make-local-hook' hasn't been called, which might +make a difference to some code. + +** The new treatment of the minibuffer prompt might affect code which +operates on the minibuffer. + +** The new character sets `eight-bit-control' and `eight-bit-graphic' +cause `no-conversion' and `emacs-mule-unix' coding systems to produce +different results when reading files with non-ASCII characters +(previously, both coding systems would produce the same results). +Specifically, `no-conversion' interprets each 8-bit byte as a separate +character. This makes `no-conversion' inappropriate for reading +multibyte text, e.g. buffers written to disk in their internal MULE +encoding (auto-saving does that, for example). If a Lisp program +reads such files with `no-conversion', each byte of the multibyte +sequence, including the MULE leading codes such as \201, is treated as +a separate character, which prevents them from being interpreted in +the buffer as multibyte characters. + +Therefore, Lisp programs that read files which contain the internal +MULE encoding should use `emacs-mule-unix'. `no-conversion' is only +appropriate for reading truly binary files. + +** Code that relies on the obsolete `before-change-function' and +`after-change-function' to detect buffer changes will now fail. Use +`before-change-functions' and `after-change-functions' instead. + +** Code that uses `concat' with integer args now gets an error, as +long promised. So does any code that uses derivatives of `concat', +such as `mapconcat'. + +** The function base64-decode-string now always returns a unibyte +string. + +** Not a Lisp incompatibility as such but, with the introduction of +extra private charsets, there is now only one slot free for a new +dimension-2 private charset. User code which tries to add more than +one extra will fail unless you rebuild Emacs with some standard +charset(s) removed; that is probably inadvisable because it changes +the emacs-mule encoding. Also, files stored in the emacs-mule +encoding using Emacs 20 with additional private charsets defined will +probably not be read correctly by Emacs 21. + +** The variable `directory-sep-char' is slated for removal. +Not really a change (yet), but a projected one that you should be +aware of: The variable `directory-sep-char' is deprecated, and should +not be used. It was always ignored on GNU/Linux and Unix systems and +on MS-DOS, but the MS-Windows port tried to support it by adapting the +behavior of certain primitives to the value of this variable. It +turned out that such support cannot be reliable, so it was decided to +remove this variable in the near future. Lisp programs are well +advised not to set it to anything but '/', because any different value +will not have any effect when support for this variable is removed. + + +* Lisp changes made after edition 2.6 of the Emacs Lisp Manual, +(Display-related features are described in a page of their own below.) + +** Function assq-delete-all replaces function assoc-delete-all. + +** The new function animate-string, from lisp/play/animate.el +allows the animated display of strings. + +** The new function `interactive-form' can be used to obtain the +interactive form of a function. + +** The keyword :set-after in defcustom allows to specify dependencies +between custom options. Example: + + (defcustom default-input-method nil + "*Default input method for multilingual text (a string). + This is the input method activated automatically by the command + `toggle-input-method' (\\[toggle-input-method])." + :group 'mule + :type '(choice (const nil) string) + :set-after '(current-language-environment)) + +This specifies that default-input-method should be set after +current-language-environment even if default-input-method appears +first in a custom-set-variables statement. + +** The new hook `kbd-macro-termination-hook' is run at the end of +function execute-kbd-macro. Functions on this hook are called with no +args. The hook is run independent of how the macro was terminated +(signal or normal termination). + +** Functions `butlast' and `nbutlast' for removing trailing elements +from a list are now available without requiring the CL package. + +** The new user-option `even-window-heights' can be set to nil +to prevent `display-buffer' from evening out window heights. + +** The user-option `face-font-registry-alternatives' specifies +alternative font registry names to try when looking for a font. + +** Function `md5' calculates the MD5 "message digest"/"checksum". + +** Function `delete-frame' runs `delete-frame-hook' before actually +deleting the frame. The hook is called with one arg, the frame +being deleted. + +** `add-hook' now makes the hook local if called with a non-nil LOCAL arg. + +** The treatment of non-ASCII characters in search ranges has changed. +If a range in a regular expression or the arg of +skip-chars-forward/backward starts with a unibyte character C and ends +with a multibyte character C2, the range is divided into two: one is +C..?\377, the other is C1..C2, where C1 is the first character of C2's +charset. + +** The new function `display-message-or-buffer' displays a message in +the echo area or pops up a buffer, depending on the length of the +message. + +** The new macro `with-auto-compression-mode' allows evaluating an +expression with auto-compression-mode enabled. + +** In image specifications, `:heuristic-mask' has been replaced +with the more general `:mask' property. + +** Image specifications accept more `:conversion's. + +** A `?' can be used in a symbol name without escaping it with a +backslash. + +** Reading from the mini-buffer now reads from standard input if Emacs +is running in batch mode. For example, + + (message "%s" (read t)) + +will read a Lisp expression from standard input and print the result +to standard output. + +** The argument of `down-list', `backward-up-list', `up-list', +`kill-sexp', `backward-kill-sexp' and `mark-sexp' is now optional. + +** If `display-buffer-reuse-frames' is set, function `display-buffer' +will raise frames displaying a buffer, instead of creating a new +frame or window. + +** Two new functions for removing elements from lists/sequences +were added + +- Function: remove ELT SEQ + +Return a copy of SEQ with all occurrences of ELT removed. SEQ must be +a list, vector, or string. The comparison is done with `equal'. + +- Function: remq ELT LIST + +Return a copy of LIST with all occurrences of ELT removed. The +comparison is done with `eq'. + +** The function `delete' now also works with vectors and strings. + +** The meaning of the `:weakness WEAK' argument of make-hash-table +has been changed: WEAK can now have new values `key-or-value' and +`key-and-value', in addition to `nil', `key', `value', and `t'. + +** Function `aset' stores any multibyte character in any string +without signaling "Attempt to change char length of a string". It may +convert a unibyte string to multibyte if necessary. + +** The value of the `help-echo' text property is called as a function +or evaluated, if it is not a string already, to obtain a help string. + +** Function `make-obsolete' now has an optional arg to say when the +function was declared obsolete. + +** Function `plist-member' is renamed from `widget-plist-member' (which is +retained as an alias). + +** Easy-menu's :filter now takes the unconverted form of the menu and +the result is automatically converted to Emacs' form. + +** The new function `window-list' has been defined + +- Function: window-list &optional FRAME WINDOW MINIBUF + +Return a list of windows on FRAME, starting with WINDOW. FRAME nil or +omitted means use the selected frame. WINDOW nil or omitted means use +the selected window. MINIBUF t means include the minibuffer window, +even if it isn't active. MINIBUF nil or omitted means include the +minibuffer window only if it's active. MINIBUF neither nil nor t +means never include the minibuffer window. + +** There's a new function `get-window-with-predicate' defined as follows + +- Function: get-window-with-predicate PREDICATE &optional MINIBUF ALL-FRAMES DEFAULT + +Return a window satisfying PREDICATE. + +This function cycles through all visible windows using `walk-windows', +calling PREDICATE on each one. PREDICATE is called with a window as +argument. The first window for which PREDICATE returns a non-nil +value is returned. If no window satisfies PREDICATE, DEFAULT is +returned. + +Optional second arg MINIBUF t means count the minibuffer window even +if not active. MINIBUF nil or omitted means count the minibuffer iff +it is active. MINIBUF neither t nor nil means not to count the +minibuffer even if it is active. + +Several frames may share a single minibuffer; if the minibuffer +counts, all windows on all frames that share that minibuffer count +too. Therefore, if you are using a separate minibuffer frame +and the minibuffer is active and MINIBUF says it counts, +`walk-windows' includes the windows in the frame from which you +entered the minibuffer, as well as the minibuffer window. + +ALL-FRAMES is the optional third argument. +ALL-FRAMES nil or omitted means cycle within the frames as specified above. +ALL-FRAMES = `visible' means include windows on all visible frames. +ALL-FRAMES = 0 means include windows on all visible and iconified frames. +ALL-FRAMES = t means include windows on all frames including invisible frames. +If ALL-FRAMES is a frame, it means include windows on that frame. +Anything else means restrict to the selected frame. + +** The function `single-key-description' now encloses function key and +event names in angle brackets. When called with a second optional +argument non-nil, angle brackets won't be printed. + +** If the variable `message-truncate-lines' is bound to t around a +call to `message', the echo area will not be resized to display that +message; it will be truncated instead, as it was done in 20.x. +Default value is nil. + +** The user option `line-number-display-limit' can now be set to nil, +meaning no limit. + +** The new user option `line-number-display-limit-width' controls +the maximum width of lines in a buffer for which Emacs displays line +numbers in the mode line. The default is 200. + +** `select-safe-coding-system' now also checks the most preferred +coding-system if buffer-file-coding-system is `undecided' and +DEFAULT-CODING-SYSTEM is not specified, + +** The function `subr-arity' provides information about the argument +list of a primitive. + +** `where-is-internal' now also accepts a list of keymaps. + +** The text property `keymap' specifies a key map which overrides the +buffer's local map and the map specified by the `local-map' property. +This is probably what most current uses of `local-map' want, rather +than replacing the local map. + +** The obsolete variables `before-change-function' and +`after-change-function' are no longer acted upon and have been +removed. Use `before-change-functions' and `after-change-functions' +instead. + +** The function `apropos-mode' runs the hook `apropos-mode-hook'. + +** `concat' no longer accepts individual integer arguments, +as promised long ago. + +** The new function `float-time' returns the current time as a float. + +** The new variable auto-coding-regexp-alist specifies coding systems +for reading specific files, analogous to auto-coding-alist, but +patterns are checked against file contents instead of file names. + + +* Lisp changes in Emacs 21.1 (see following page for display-related features) + +** The new package rx.el provides an alternative sexp notation for +regular expressions. + +- Function: rx-to-string SEXP + +Translate SEXP into a regular expression in string notation. + +- Macro: rx SEXP + +Translate SEXP into a regular expression in string notation. + +The following are valid subforms of regular expressions in sexp +notation. + +STRING + matches string STRING literally. + +CHAR + matches character CHAR literally. + +`not-newline' + matches any character except a newline. + . +`anything' + matches any character + +`(any SET)' + matches any character in SET. SET may be a character or string. + Ranges of characters can be specified as `A-Z' in strings. + +'(in SET)' + like `any'. + +`(not (any SET))' + matches any character not in SET + +`line-start' + matches the empty string, but only at the beginning of a line + in the text being matched + +`line-end' + is similar to `line-start' but matches only at the end of a line + +`string-start' + matches the empty string, but only at the beginning of the + string being matched against. + +`string-end' + matches the empty string, but only at the end of the + string being matched against. + +`buffer-start' + matches the empty string, but only at the beginning of the + buffer being matched against. + +`buffer-end' + matches the empty string, but only at the end of the + buffer being matched against. + +`point' + matches the empty string, but only at point. + +`word-start' + matches the empty string, but only at the beginning or end of a + word. + +`word-end' + matches the empty string, but only at the end of a word. + +`word-boundary' + matches the empty string, but only at the beginning or end of a + word. + +`(not word-boundary)' + matches the empty string, but not at the beginning or end of a + word. + +`digit' + matches 0 through 9. + +`control' + matches ASCII control characters. + +`hex-digit' + matches 0 through 9, a through f and A through F. + +`blank' + matches space and tab only. + +`graphic' + matches graphic characters--everything except ASCII control chars, + space, and DEL. + +`printing' + matches printing characters--everything except ASCII control chars + and DEL. + +`alphanumeric' + matches letters and digits. (But at present, for multibyte characters, + it matches anything that has word syntax.) + +`letter' + matches letters. (But at present, for multibyte characters, + it matches anything that has word syntax.) + +`ascii' + matches ASCII (unibyte) characters. + +`nonascii' + matches non-ASCII (multibyte) characters. + +`lower' + matches anything lower-case. + +`upper' + matches anything upper-case. + +`punctuation' + matches punctuation. (But at present, for multibyte characters, + it matches anything that has non-word syntax.) + +`space' + matches anything that has whitespace syntax. + +`word' + matches anything that has word syntax. + +`(syntax SYNTAX)' + matches a character with syntax SYNTAX. SYNTAX must be one + of the following symbols. + + `whitespace' (\\s- in string notation) + `punctuation' (\\s.) + `word' (\\sw) + `symbol' (\\s_) + `open-parenthesis' (\\s() + `close-parenthesis' (\\s)) + `expression-prefix' (\\s') + `string-quote' (\\s\") + `paired-delimiter' (\\s$) + `escape' (\\s\\) + `character-quote' (\\s/) + `comment-start' (\\s<) + `comment-end' (\\s>) + +`(not (syntax SYNTAX))' + matches a character that has not syntax SYNTAX. + +`(category CATEGORY)' + matches a character with category CATEGORY. CATEGORY must be + either a character to use for C, or one of the following symbols. + + `consonant' (\\c0 in string notation) + `base-vowel' (\\c1) + `upper-diacritical-mark' (\\c2) + `lower-diacritical-mark' (\\c3) + `tone-mark' (\\c4) + `symbol' (\\c5) + `digit' (\\c6) + `vowel-modifying-diacritical-mark' (\\c7) + `vowel-sign' (\\c8) + `semivowel-lower' (\\c9) + `not-at-end-of-line' (\\c<) + `not-at-beginning-of-line' (\\c>) + `alpha-numeric-two-byte' (\\cA) + `chinse-two-byte' (\\cC) + `greek-two-byte' (\\cG) + `japanese-hiragana-two-byte' (\\cH) + `indian-two-byte' (\\cI) + `japanese-katakana-two-byte' (\\cK) + `korean-hangul-two-byte' (\\cN) + `cyrillic-two-byte' (\\cY) + `ascii' (\\ca) + `arabic' (\\cb) + `chinese' (\\cc) + `ethiopic' (\\ce) + `greek' (\\cg) + `korean' (\\ch) + `indian' (\\ci) + `japanese' (\\cj) + `japanese-katakana' (\\ck) + `latin' (\\cl) + `lao' (\\co) + `tibetan' (\\cq) + `japanese-roman' (\\cr) + `thai' (\\ct) + `vietnamese' (\\cv) + `hebrew' (\\cw) + `cyrillic' (\\cy) + `can-break' (\\c|) + +`(not (category CATEGORY))' + matches a character that has not category CATEGORY. + +`(and SEXP1 SEXP2 ...)' + matches what SEXP1 matches, followed by what SEXP2 matches, etc. + +`(submatch SEXP1 SEXP2 ...)' + like `and', but makes the match accessible with `match-end', + `match-beginning', and `match-string'. + +`(group SEXP1 SEXP2 ...)' + another name for `submatch'. + +`(or SEXP1 SEXP2 ...)' + matches anything that matches SEXP1 or SEXP2, etc. If all + args are strings, use `regexp-opt' to optimize the resulting + regular expression. + +`(minimal-match SEXP)' + produce a non-greedy regexp for SEXP. Normally, regexps matching + zero or more occurrences of something are \"greedy\" in that they + match as much as they can, as long as the overall regexp can + still match. A non-greedy regexp matches as little as possible. + +`(maximal-match SEXP)' + produce a greedy regexp for SEXP. This is the default. + +`(zero-or-more SEXP)' + matches zero or more occurrences of what SEXP matches. + +`(0+ SEXP)' + like `zero-or-more'. + +`(* SEXP)' + like `zero-or-more', but always produces a greedy regexp. + +`(*? SEXP)' + like `zero-or-more', but always produces a non-greedy regexp. + +`(one-or-more SEXP)' + matches one or more occurrences of A. + +`(1+ SEXP)' + like `one-or-more'. + +`(+ SEXP)' + like `one-or-more', but always produces a greedy regexp. + +`(+? SEXP)' + like `one-or-more', but always produces a non-greedy regexp. + +`(zero-or-one SEXP)' + matches zero or one occurrences of A. + +`(optional SEXP)' + like `zero-or-one'. + +`(? SEXP)' + like `zero-or-one', but always produces a greedy regexp. + +`(?? SEXP)' + like `zero-or-one', but always produces a non-greedy regexp. + +`(repeat N SEXP)' + matches N occurrences of what SEXP matches. + +`(repeat N M SEXP)' + matches N to M occurrences of what SEXP matches. + +`(eval FORM)' + evaluate FORM and insert result. If result is a string, + `regexp-quote' it. + +`(regexp REGEXP)' + include REGEXP in string notation in the result. + +*** The features `md5' and `overlay' are now provided by default. + +*** The special form `save-restriction' now works correctly even if the +buffer is widened inside the save-restriction and changes made outside +the original restriction. Previously, doing this would cause the saved +restriction to be restored incorrectly. + +*** The functions `find-charset-region' and `find-charset-string' include +`eight-bit-control' and/or `eight-bit-graphic' in the returned list +when they find 8-bit characters. Previously, they included `ascii' in a +multibyte buffer and `unknown' in a unibyte buffer. + +*** The functions `set-buffer-multibyte', `string-as-multibyte' and +`string-as-unibyte' change the byte sequence of a buffer or a string +if it contains a character from the `eight-bit-control' character set. + +*** The handling of multibyte sequences in a multibyte buffer is +changed. Previously, a byte sequence matching the pattern +[\200-\237][\240-\377]+ was interpreted as a single character +regardless of the length of the trailing bytes [\240-\377]+. Thus, if +the sequence was longer than what the leading byte indicated, the +extra trailing bytes were ignored by Lisp functions. Now such extra +bytes are independent 8-bit characters belonging to the charset +eight-bit-graphic. + +** Fontsets are now implemented using char-tables. + +A fontset can now be specified for each independent character, for +a group of characters or for a character set rather than just for a +character set as previously. + +*** The arguments of the function `set-fontset-font' are changed. +They are NAME, CHARACTER, FONTNAME, and optional FRAME. The function +modifies fontset NAME to use FONTNAME for CHARACTER. + +CHARACTER may be a cons (FROM . TO), where FROM and TO are non-generic +characters. In that case FONTNAME is used for all characters in the +range FROM and TO (inclusive). CHARACTER may be a charset. In that +case FONTNAME is used for all character in the charset. + +FONTNAME may be a cons (FAMILY . REGISTRY), where FAMILY is the family +name of a font and REGISTRY is a registry name of a font. + +*** Variable x-charset-registry has been deleted. The default charset +registries of character sets are set in the default fontset +"fontset-default". + +*** The function `create-fontset-from-fontset-spec' ignores the second +argument STYLE-VARIANT. It never creates style-variant fontsets. + +** The method of composing characters is changed. Now character +composition is done by a special text property `composition' in +buffers and strings. + +*** Charset composition is deleted. Emacs never creates a `composite +character' which is an independent character with a unique character +code. Thus the following functions handling `composite characters' +have been deleted: composite-char-component, +composite-char-component-count, composite-char-composition-rule, +composite-char-composition-rule and decompose-composite-char delete. +The variables leading-code-composition and min-composite-char have +also been deleted. + +*** Three more glyph reference points are added. They can be used to +specify a composition rule. See the documentation of the variable +`reference-point-alist' for more detail. + +*** The function `compose-region' takes new arguments COMPONENTS and +MODIFICATION-FUNC. With COMPONENTS, you can specify not only a +composition rule but also characters to be composed. Such characters +may differ between buffer and string text. + +*** The function `compose-string' takes new arguments START, END, +COMPONENTS, and MODIFICATION-FUNC. + +*** The function `compose-string' puts text property `composition' +directly on the argument STRING instead of returning a new string. +Likewise, the function `decompose-string' just removes text property +`composition' from STRING. + +*** The new function `find-composition' returns information about +a composition at a specified position in a buffer or a string. + +*** The function `decompose-composite-char' is now labeled as +obsolete. + +** The new coding system `mac-roman' is primarily intended for use on +the Macintosh but may be used generally for Macintosh-encoded text. + +** The new character sets `mule-unicode-0100-24ff', +`mule-unicode-2500-33ff', and `mule-unicode-e000-ffff' have been +introduced for Unicode characters in the range U+0100..U+24FF, +U+2500..U+33FF, U+E000..U+FFFF respectively. + +Note that the character sets are not yet unified in Emacs, so +characters which belong to charsets such as Latin-2, Greek, Hebrew, +etc. and the same characters in the `mule-unicode-*' charsets are +different characters, as far as Emacs is concerned. For example, text +which includes Unicode characters from the Latin-2 locale cannot be +encoded by Emacs with ISO 8859-2 coding system. + +** The new coding system `mule-utf-8' has been added. +It provides limited support for decoding/encoding UTF-8 text. For +details, please see the documentation string of this coding system. + +** The new character sets `japanese-jisx0213-1' and +`japanese-jisx0213-2' have been introduced for the new Japanese +standard JIS X 0213 Plane 1 and Plane 2. + +** The new character sets `latin-iso8859-14' and `latin-iso8859-15' +have been introduced. + +** The new character sets `eight-bit-control' and `eight-bit-graphic' +have been introduced for 8-bit characters in the ranges 0x80..0x9F and +0xA0..0xFF respectively. Note that the multibyte representation of +eight-bit-control is never exposed; this leads to an exception in the +emacs-mule coding system, which encodes everything else to the +buffer/string internal representation. Note that to search for +eight-bit-graphic characters in a multibyte buffer, the search string +must be multibyte, otherwise such characters will be converted to +their multibyte equivalent. + +** If the APPEND argument of `write-region' is an integer, it seeks to +that offset in the file before writing. + +** The function `add-minor-mode' has been added for convenience and +compatibility with XEmacs (and is used internally by define-minor-mode). + +** The function `shell-command' now sets the default directory of the +`*Shell Command Output*' buffer to the default directory of the buffer +from which the command was issued. + +** The functions `query-replace', `query-replace-regexp', +`query-replace-regexp-eval' `map-query-replace-regexp', +`replace-string', `replace-regexp', and `perform-replace' take two +additional optional arguments START and END that specify the region to +operate on. + +** The new function `count-screen-lines' is a more flexible alternative +to `window-buffer-height'. + +- Function: count-screen-lines &optional BEG END COUNT-FINAL-NEWLINE WINDOW + +Return the number of screen lines in the region between BEG and END. +The number of screen lines may be different from the number of actual +lines, due to line breaking, display table, etc. + +Optional arguments BEG and END default to `point-min' and `point-max' +respectively. + +If region ends with a newline, ignore it unless optional third argument +COUNT-FINAL-NEWLINE is non-nil. + +The optional fourth argument WINDOW specifies the window used for +obtaining parameters such as width, horizontal scrolling, and so +on. The default is to use the selected window's parameters. + +Like `vertical-motion', `count-screen-lines' always uses the current +buffer, regardless of which buffer is displayed in WINDOW. This makes +possible to use `count-screen-lines' in any buffer, whether or not it +is currently displayed in some window. + +** The new function `mapc' is like `mapcar' but doesn't collect the +argument function's results. + +** The functions base64-decode-region and base64-decode-string now +signal an error instead of returning nil if decoding fails. Also, +`base64-decode-string' now always returns a unibyte string (in Emacs +20, it returned a multibyte string when the result was a valid multibyte +sequence). + +** The function sendmail-user-agent-compose now recognizes a `body' +header in the list of headers passed to it. + +** The new function member-ignore-case works like `member', but +ignores differences in case and text representation. + +** The buffer-local variable cursor-type can be used to specify the +cursor to use in windows displaying a buffer. Values are interpreted +as follows: + + t use the cursor specified for the frame (default) + nil don't display a cursor + `bar' display a bar cursor with default width + (bar . WIDTH) display a bar cursor with width WIDTH + others display a box cursor. + +** The variable open-paren-in-column-0-is-defun-start controls whether +an open parenthesis in column 0 is considered to be the start of a +defun. If set, the default, it is considered a defun start. If not +set, an open parenthesis in column 0 has no special meaning. + +** The new function `string-to-syntax' can be used to translate syntax +specifications in string form as accepted by `modify-syntax-entry' to +the cons-cell form that is used for the values of the `syntax-table' +text property, and in `font-lock-syntactic-keywords'. + +Example: + + (string-to-syntax "()") + => (4 . 41) + +** Emacs' reader supports CL read syntax for integers in bases +other than 10. + +*** `#BINTEGER' or `#bINTEGER' reads INTEGER in binary (radix 2). +INTEGER optionally contains a sign. + + #b1111 + => 15 + #b-1111 + => -15 + +*** `#OINTEGER' or `#oINTEGER' reads INTEGER in octal (radix 8). + + #o666 + => 438 + +*** `#XINTEGER' or `#xINTEGER' reads INTEGER in hexadecimal (radix 16). + + #xbeef + => 48815 + +*** `#RADIXrINTEGER' reads INTEGER in radix RADIX, 2 <= RADIX <= 36. + + #2R-111 + => -7 + #25rah + => 267 + +** The function `documentation-property' now evaluates the value of +the given property to obtain a string if it doesn't refer to etc/DOC +and isn't a string. + +** If called for a symbol, the function `documentation' now looks for +a `function-documentation' property of that symbol. If it has a non-nil +value, the documentation is taken from that value. If the value is +not a string, it is evaluated to obtain a string. + +** The last argument of `define-key-after' defaults to t for convenience. + +** The new function `replace-regexp-in-string' replaces all matches +for a regexp in a string. + +** `mouse-position' now runs the abnormal hook +`mouse-position-function'. + +** The function string-to-number now returns a float for numbers +that don't fit into a Lisp integer. + +** The variable keyword-symbols-constants-flag has been removed. +Keywords are now always considered constants. + +** The new function `delete-and-extract-region' deletes text and +returns it. + +** The function `clear-this-command-keys' now also clears the vector +returned by function `recent-keys'. + +** Variables `beginning-of-defun-function' and `end-of-defun-function' +can be used to define handlers for the functions that find defuns. +Major modes can define these locally instead of rebinding C-M-a +etc. if the normal conventions for defuns are not appropriate for the +mode. + +** easy-mmode-define-minor-mode now takes an additional BODY argument +and is renamed `define-minor-mode'. + +** If an abbrev has a hook function which is a symbol, and that symbol +has a non-nil `no-self-insert' property, the return value of the hook +function specifies whether an expansion has been done or not. If it +returns nil, abbrev-expand also returns nil, meaning "no expansion has +been performed." + +When abbrev expansion is done by typing a self-inserting character, +and the abbrev has a hook with the `no-self-insert' property, and the +hook function returns non-nil meaning expansion has been done, +then the self-inserting character is not inserted. + +** The function `intern-soft' now accepts a symbol as first argument. +In this case, that exact symbol is looked up in the specified obarray, +and the function's value is nil if it is not found. + +** The new macro `with-syntax-table' can be used to evaluate forms +with the syntax table of the current buffer temporarily set to a +specified table. + + (with-syntax-table TABLE &rest BODY) + +Evaluate BODY with syntax table of current buffer set to a copy of +TABLE. The current syntax table is saved, BODY is evaluated, and the +saved table is restored, even in case of an abnormal exit. Value is +what BODY returns. + +** Regular expressions now support intervals \{n,m\} as well as +Perl's shy-groups \(?:...\) and non-greedy *? +? and ?? operators. +Also back-references like \2 are now considered as an error if the +corresponding subgroup does not exist (or is not closed yet). +Previously it would have been silently turned into `2' (ignoring the `\'). + +** The optional argument BUFFER of function file-local-copy has been +removed since it wasn't used by anything. + +** The file name argument of function `file-locked-p' is now required +instead of being optional. + +** The new built-in error `text-read-only' is signaled when trying to +modify read-only text. + +** New functions and variables for locales. + +The new variable `locale-coding-system' specifies how to encode and +decode strings passed to low-level message functions like strerror and +time functions like strftime. The new variables +`system-messages-locale' and `system-time-locale' give the system +locales to be used when invoking these two types of functions. + +The new function `set-locale-environment' sets the language +environment, preferred coding system, and locale coding system from +the system locale as specified by the LC_ALL, LC_CTYPE, and LANG +environment variables. Normally, it is invoked during startup and need +not be invoked thereafter. It uses the new variables +`locale-language-names', `locale-charset-language-names', and +`locale-preferred-coding-systems' to make its decisions. + +** syntax tables now understand nested comments. +To declare a comment syntax as allowing nesting, just add an `n' +modifier to either of the characters of the comment end and the comment +start sequences. + +** The function `pixmap-spec-p' has been renamed `bitmap-spec-p' +because `bitmap' is more in line with the usual X terminology. + +** New function `propertize' + +The new function `propertize' can be used to conveniently construct +strings with text properties. + +- Function: propertize STRING &rest PROPERTIES + +Value is a copy of STRING with text properties assigned as specified +by PROPERTIES. PROPERTIES is a sequence of pairs PROPERTY VALUE, with +PROPERTY being the name of a text property and VALUE being the +specified value of that property. Example: + + (propertize "foo" 'face 'bold 'read-only t) + +** push and pop macros. + +Simple versions of the push and pop macros of Common Lisp +are now defined in Emacs Lisp. These macros allow only symbols +as the place that holds the list to be changed. + +(push NEWELT LISTNAME) add NEWELT to the front of LISTNAME's value. +(pop LISTNAME) return first elt of LISTNAME, and remove it + (thus altering the value of LISTNAME). + +** New dolist and dotimes macros. + +Simple versions of the dolist and dotimes macros of Common Lisp +are now defined in Emacs Lisp. + +(dolist (VAR LIST [RESULT]) BODY...) + Execute body once for each element of LIST, + using the variable VAR to hold the current element. + Then return the value of RESULT, or nil if RESULT is omitted. + +(dotimes (VAR COUNT [RESULT]) BODY...) + Execute BODY with VAR bound to successive integers running from 0, + inclusive, to COUNT, exclusive. + Then return the value of RESULT, or nil if RESULT is omitted. + +** Regular expressions now support Posix character classes such as +[:alpha:], [:space:] and so on. These must be used within a character +class--for instance, [-[:digit:].+] matches digits or a period +or a sign. + +[:digit:] matches 0 through 9 +[:cntrl:] matches ASCII control characters +[:xdigit:] matches 0 through 9, a through f and A through F. +[:blank:] matches space and tab only +[:graph:] matches graphic characters--everything except ASCII control chars, + space, and DEL. +[:print:] matches printing characters--everything except ASCII control chars + and DEL. +[:alnum:] matches letters and digits. + (But at present, for multibyte characters, + it matches anything that has word syntax.) +[:alpha:] matches letters. + (But at present, for multibyte characters, + it matches anything that has word syntax.) +[:ascii:] matches ASCII (unibyte) characters. +[:nonascii:] matches non-ASCII (multibyte) characters. +[:lower:] matches anything lower-case. +[:punct:] matches punctuation. + (But at present, for multibyte characters, + it matches anything that has non-word syntax.) +[:space:] matches anything that has whitespace syntax. +[:upper:] matches anything upper-case. +[:word:] matches anything that has word syntax. + +** Emacs now has built-in hash tables. + +The following functions are defined for hash tables: + +- Function: make-hash-table ARGS + +The argument list ARGS consists of keyword/argument pairs. All arguments +are optional. The following arguments are defined: + +:test TEST + +TEST must be a symbol specifying how to compare keys. Default is `eql'. +Predefined are `eq', `eql' and `equal'. If TEST is not predefined, +it must have been defined with `define-hash-table-test'. + +:size SIZE + +SIZE must be an integer > 0 giving a hint to the implementation how +many elements will be put in the hash table. Default size is 65. + +:rehash-size REHASH-SIZE + +REHASH-SIZE specifies by how much to grow a hash table once it becomes +full. If REHASH-SIZE is an integer, add that to the hash table's old +size to get the new size. Otherwise, REHASH-SIZE must be a float > +1.0, and the new size is computed by multiplying REHASH-SIZE with the +old size. Default rehash size is 1.5. + +:rehash-threshold THRESHOLD + +THRESHOLD must be a float > 0 and <= 1.0 specifying when to resize the +hash table. It is resized when the ratio of (number of entries) / +(size of hash table) is >= THRESHOLD. Default threshold is 0.8. + +:weakness WEAK + +WEAK must be either nil, one of the symbols `key, `value', +`key-or-value', `key-and-value', or t, meaning the same as +`key-and-value'. Entries are removed from weak tables during garbage +collection if their key and/or value are not referenced elsewhere +outside of the hash table. Default are non-weak hash tables. + +- Function: makehash &optional TEST + +Similar to make-hash-table, but only TEST can be specified. + +- Function: hash-table-p TABLE + +Returns non-nil if TABLE is a hash table object. + +- Function: copy-hash-table TABLE + +Returns a copy of TABLE. Only the table itself is copied, keys and +values are shared. + +- Function: hash-table-count TABLE + +Returns the number of entries in TABLE. + +- Function: hash-table-rehash-size TABLE + +Returns the rehash size of TABLE. + +- Function: hash-table-rehash-threshold TABLE + +Returns the rehash threshold of TABLE. + +- Function: hash-table-rehash-size TABLE + +Returns the size of TABLE. + +- Function: hash-table-test TABLE + +Returns the test TABLE uses to compare keys. + +- Function: hash-table-weakness TABLE + +Returns the weakness specified for TABLE. + +- Function: clrhash TABLE + +Clear TABLE. + +- Function: gethash KEY TABLE &optional DEFAULT + +Look up KEY in TABLE and return its associated VALUE or DEFAULT if +not found. + +- Function: puthash KEY VALUE TABLE + +Associate KEY with VALUE in TABLE. If KEY is already associated with +another value, replace the old value with VALUE. + +- Function: remhash KEY TABLE + +Remove KEY from TABLE if it is there. + +- Function: maphash FUNCTION TABLE + +Call FUNCTION for all elements in TABLE. FUNCTION must take two +arguments KEY and VALUE. + +- Function: sxhash OBJ + +Return a hash code for Lisp object OBJ. + +- Function: define-hash-table-test NAME TEST-FN HASH-FN + +Define a new hash table test named NAME. If NAME is specified as +a test in `make-hash-table', the table created will use TEST-FN for +comparing keys, and HASH-FN to compute hash codes for keys. Test +and hash function are stored as symbol property `hash-table-test' +of NAME with a value of (TEST-FN HASH-FN). + +TEST-FN must take two arguments and return non-nil if they are the same. + +HASH-FN must take one argument and return an integer that is the hash +code of the argument. The function should use the whole range of +integer values for hash code computation, including negative integers. + +Example: The following creates a hash table whose keys are supposed to +be strings that are compared case-insensitively. + + (defun case-fold-string= (a b) + (compare-strings a nil nil b nil nil t)) + + (defun case-fold-string-hash (a) + (sxhash (upcase a))) + + (define-hash-table-test 'case-fold 'case-fold-string= + 'case-fold-string-hash)) + + (make-hash-table :test 'case-fold) + +** The Lisp reader handles circular structure. + +It now works to use the #N= and #N# constructs to represent +circular structures. For example, #1=(a . #1#) represents +a cons cell which is its own cdr. + +** The Lisp printer handles circular structure. + +If you bind print-circle to a non-nil value, the Lisp printer outputs +#N= and #N# constructs to represent circular and shared structure. + +** If the second argument to `move-to-column' is anything but nil or +t, that means replace a tab with spaces if necessary to reach the +specified column, but do not add spaces at the end of the line if it +is too short to reach that column. + +** perform-replace has a new feature: the REPLACEMENTS argument may +now be a cons cell (FUNCTION . DATA). This means to call FUNCTION +after each match to get the replacement text. FUNCTION is called with +two arguments: DATA, and the number of replacements already made. + +If the FROM-STRING contains any upper-case letters, +perform-replace also turns off `case-fold-search' temporarily +and inserts the replacement text without altering case in it. + +** The function buffer-size now accepts an optional argument +to specify which buffer to return the size of. + +** The calendar motion commands now run the normal hook +calendar-move-hook after moving point. + +** The new variable small-temporary-file-directory specifies a +directory to use for creating temporary files that are likely to be +small. (Certain Emacs features use this directory.) If +small-temporary-file-directory is nil, they use +temporary-file-directory instead. + +** The variable `inhibit-modification-hooks', if non-nil, inhibits all +the hooks that track changes in the buffer. This affects +`before-change-functions' and `after-change-functions', as well as +hooks attached to text properties and overlay properties. + +** assq-delete-all is a new function that deletes all the +elements of an alist which have a car `eq' to a particular value. + +** make-temp-file provides a more reliable way to create a temporary file. + +make-temp-file is used like make-temp-name, except that it actually +creates the file before it returns. This prevents a timing error, +ensuring that no other job can use the same name for a temporary file. + +** New exclusive-open feature in `write-region' + +The optional seventh arg is now called MUSTBENEW. If non-nil, it 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 gives confirmation. + +If the MUSTBENEW argument in `write-region' is `excl', +that means to use a special feature in the `open' system call +to get an error if the file exists at that time. +The error reported is `file-already-exists'. + +** Function `format' now handles text properties. + +Text properties of the format string are applied to the result string. +If the result string is longer than the format string, text properties +ending at the end of the format string are extended to the end of the +result string. + +Text properties from string arguments are applied to the result +string where arguments appear in the result string. + +Example: + + (let ((s1 "hello, %s") + (s2 "world")) + (put-text-property 0 (length s1) 'face 'bold s1) + (put-text-property 0 (length s2) 'face 'italic s2) + (format s1 s2)) + +results in a bold-face string with an italic `world' at the end. + +** Messages can now be displayed with text properties. + +Text properties are handled as described above for function `format'. +The following example displays a bold-face message with an italic +argument in it. + + (let ((msg "hello, %s!") + (arg "world")) + (put-text-property 0 (length msg) 'face 'bold msg) + (put-text-property 0 (length arg) 'face 'italic arg) + (message msg arg)) + +** Sound support + +Emacs supports playing sound files on GNU/Linux and the free BSDs +(Voxware driver and native BSD driver, aka as Luigi's driver). + +Currently supported file formats are RIFF-WAVE (*.wav) and Sun Audio +(*.au). You must configure Emacs with the option `--with-sound=yes' +to enable sound support. + +Sound files can be played by calling (play-sound SOUND). SOUND is a +list of the form `(sound PROPERTY...)'. The function is only defined +when sound support is present for the system on which Emacs runs. The +functions runs `play-sound-functions' with one argument which is the +sound to play, before playing the sound. + +The following sound properties are supported: + +- `:file FILE' + +FILE is a file name. If FILE isn't an absolute name, it will be +searched relative to `data-directory'. + +- `:data DATA' + +DATA is a string containing sound data. Either :file or :data +may be present, but not both. + +- `:volume VOLUME' + +VOLUME must be an integer in the range 0..100 or a float in the range +0..1. This property is optional. + +- `:device DEVICE' + +DEVICE is a string specifying the system device on which to play the +sound. The default device is system-dependent. + +Other properties are ignored. + +An alternative interface is called as +(play-sound-file FILE &optional VOLUME DEVICE). + +** `multimedia' is a new Finder keyword and Custom group. + +** keywordp is a new predicate to test efficiently for an object being +a keyword symbol. + +** Changes to garbage collection + +*** The function garbage-collect now additionally returns the number +of live and free strings. + +*** There is a new variable `strings-consed' holding the number of +strings that have been consed so far. + + +* Lisp-level Display features added after release 2.6 of the Emacs +Lisp Manual + +** The user-option `resize-mini-windows' controls how Emacs resizes +mini-windows. + +** The function `pos-visible-in-window-p' now has a third optional +argument, PARTIALLY. If a character is only partially visible, nil is +returned, unless PARTIALLY is non-nil. + +** On window systems, `glyph-table' is no longer used. + +** Help strings in menu items are now used to provide `help-echo' text. + +** The function `image-size' can be used to determine the size of an +image. + +- Function: image-size SPEC &optional PIXELS FRAME + +Return the size of an image as a pair (WIDTH . HEIGHT). + +SPEC is an image specification. PIXELS non-nil means return sizes +measured in pixels, otherwise return sizes measured in canonical +character units (fractions of the width/height of the frame's default +font). FRAME is the frame on which the image will be displayed. +FRAME nil or omitted means use the selected frame. + +** The function `image-mask-p' can be used to determine if an image +has a mask bitmap. + +- Function: image-mask-p SPEC &optional FRAME + +Return t if image SPEC has a mask bitmap. +FRAME is the frame on which the image will be displayed. FRAME nil +or omitted means use the selected frame. + +** The function `find-image' can be used to find a usable image +satisfying one of a list of specifications. + +** The STRING argument of `put-image' and `insert-image' is now +optional. + +** Image specifications may contain the property `:ascent center' (see +below). + + +* New Lisp-level Display features in Emacs 21.1 + +** The function tty-suppress-bold-inverse-default-colors can be used +to make Emacs avoid displaying text with bold black foreground on TTYs. + +Some terminals, notably PC consoles, emulate bold text by displaying +text in brighter colors. On such a console, a bold black foreground +is displayed in a gray color. If this turns out to be hard to read on +your monitor---the problem occurred with the mode line on +laptops---you can instruct Emacs to ignore the text's boldness, and to +just display it black instead. + +This situation can't be detected automatically. You will have to put +a line like + + (tty-suppress-bold-inverse-default-colors t) + +in your `.emacs'. + +** New face implementation. + +Emacs faces have been reimplemented from scratch. They don't use XLFD +font names anymore and face merging now works as expected. + +*** New faces. + +Each face can specify the following display attributes: + + 1. Font family or fontset alias name. + + 2. Relative proportionate width, aka character set width or set + width (swidth), e.g. `semi-compressed'. + + 3. Font height in 1/10pt + + 4. Font weight, e.g. `bold'. + + 5. Font slant, e.g. `italic'. + + 6. Foreground color. + + 7. Background color. + + 8. Whether or not characters should be underlined, and in what color. + + 9. Whether or not characters should be displayed in inverse video. + + 10. A background stipple, a bitmap. + + 11. Whether or not characters should be overlined, and in what color. + + 12. Whether or not characters should be strike-through, and in what + color. + + 13. Whether or not a box should be drawn around characters, its + color, the width of the box lines, and 3D appearance. + +Faces are frame-local by nature because Emacs allows to define the +same named face (face names are symbols) differently for different +frames. Each frame has an alist of face definitions for all named +faces. The value of a named face in such an alist is a Lisp vector +with the symbol `face' in slot 0, and a slot for each of the face +attributes mentioned above. + +There is also a global face alist `face-new-frame-defaults'. Face +definitions from this list are used to initialize faces of newly +created frames. + +A face doesn't have to specify all attributes. Those not specified +have a nil value. Faces specifying all attributes are called +`fully-specified'. + +*** Face merging. + +The display style of a given character in the text is determined by +combining several faces. This process is called `face merging'. Any +aspect of the display style that isn't specified by overlays or text +properties is taken from the `default' face. Since it is made sure +that the default face is always fully-specified, face merging always +results in a fully-specified face. + +*** Face realization. + +After all face attributes for a character have been determined by +merging faces of that character, that face is `realized'. The +realization process maps face attributes to what is physically +available on the system where Emacs runs. The result is a `realized +face' in form of an internal structure which is stored in the face +cache of the frame on which it was realized. + +Face realization is done in the context of the charset of the +character to display because different fonts and encodings are used +for different charsets. In other words, for characters of different +charsets, different realized faces are needed to display them. + +Except for composite characters, faces are always realized for a +specific character set and contain a specific font, even if the face +being realized specifies a fontset. The reason is that the result of +the new font selection stage is better than what can be done with +statically defined font name patterns in fontsets. + +In unibyte text, Emacs' charsets aren't applicable; function +`char-charset' reports ASCII for all characters, including those > +0x7f. The X registry and encoding of fonts to use is determined from +the variable `face-default-registry' in this case. The variable is +initialized at Emacs startup time from the font the user specified for +Emacs. + +Currently all unibyte text, i.e. all buffers with +`enable-multibyte-characters' nil are displayed with fonts of the same +registry and encoding `face-default-registry'. This is consistent +with the fact that languages can also be set globally, only. + +**** Clearing face caches. + +The Lisp function `clear-face-cache' can be called to clear face caches +on all frames. If called with a non-nil argument, it will also unload +unused fonts. + +*** Font selection. + +Font selection tries to find the best available matching font for a +given (charset, face) combination. This is done slightly differently +for faces specifying a fontset, or a font family name. + +If the face specifies a fontset name, that fontset determines a +pattern for fonts of the given charset. If the face specifies a font +family, a font pattern is constructed. Charset symbols have a +property `x-charset-registry' for that purpose that maps a charset to +an XLFD registry and encoding in the font pattern constructed. + +Available fonts on the system on which Emacs runs are then matched +against the font pattern. The result of font selection is the best +match for the given face attributes in this font list. + +Font selection can be influenced by the user. + +The user can specify the relative importance he gives the face +attributes width, height, weight, and slant by setting +face-font-selection-order (faces.el) to a list of face attribute +names. The default is (:width :height :weight :slant), and means +that font selection first tries to find a good match for the font +width specified by a face, then---within fonts with that width---tries +to find a best match for the specified font height, etc. + +Setting `face-font-family-alternatives' allows the user to specify +alternative font families to try if a family specified by a face +doesn't exist. + +Setting `face-font-registry-alternatives' allows the user to specify +all alternative font registry names to try for a face specifying a +registry. + +Please note that the interpretations of the above two variables are +slightly different. + +Setting face-ignored-fonts allows the user to ignore specific fonts. + + +**** Scalable fonts + +Emacs can make use of scalable fonts but doesn't do so by default, +since the use of too many or too big scalable fonts may crash XFree86 +servers. + +To enable scalable font use, set the variable +`scalable-fonts-allowed'. A value of nil, the default, means never use +scalable fonts. A value of t means any scalable font may be used. +Otherwise, the value must be a list of regular expressions. A +scalable font may then be used if it matches a regular expression from +that list. Example: + + (setq scalable-fonts-allowed '("muleindian-2$")) + +allows the use of scalable fonts with registry `muleindian-2'. + +*** Functions and variables related to font selection. + +- Function: x-family-fonts &optional FAMILY FRAME + +Return a list of available fonts of family FAMILY on FRAME. If FAMILY +is omitted or nil, list all families. Otherwise, FAMILY must be a +string, possibly containing wildcards `?' and `*'. + +If FRAME is omitted or nil, use the selected frame. Each element of +the result is a vector [FAMILY WIDTH POINT-SIZE WEIGHT SLANT FIXED-P +FULL REGISTRY-AND-ENCODING]. FAMILY is the font family name. +POINT-SIZE is the size of the font in 1/10 pt. WIDTH, WEIGHT, and +SLANT are symbols describing the width, weight and slant of the font. +These symbols are the same as for face attributes. FIXED-P is non-nil +if the font is fixed-pitch. FULL is the full name of the font, and +REGISTRY-AND-ENCODING is a string giving the registry and encoding of +the font. The result list is sorted according to the current setting +of the face font sort order. + +- Function: x-font-family-list + +Return a list of available font families on FRAME. If FRAME is +omitted or nil, use the selected frame. Value is a list of conses +(FAMILY . FIXED-P) where FAMILY is a font family, and FIXED-P is +non-nil if fonts of that family are fixed-pitch. + +- Variable: font-list-limit + +Limit for font matching. If an integer > 0, font matching functions +won't load more than that number of fonts when searching for a +matching font. The default is currently 100. + +*** Setting face attributes. + +For the most part, the new face implementation is interface-compatible +with the old one. Old face attribute related functions are now +implemented in terms of the new functions `set-face-attribute' and +`face-attribute'. + +Face attributes are identified by their names which are keyword +symbols. All attributes can be set to `unspecified'. + +The following attributes are recognized: + +`:family' + +VALUE must be a string specifying the font family, e.g. ``courier'', +or a fontset alias name. If a font family is specified, wild-cards `*' +and `?' are allowed. + +`:width' + +VALUE specifies the relative proportionate width of the font to use. +It must be one of the symbols `ultra-condensed', `extra-condensed', +`condensed', `semi-condensed', `normal', `semi-expanded', `expanded', +`extra-expanded', or `ultra-expanded'. + +`:height' + +VALUE must be either an integer specifying the height of the font to use +in 1/10 pt, a floating point number specifying the amount by which to +scale any underlying face, or a function, which is called with the old +height (from the underlying face), and should return the new height. + +`:weight' + +VALUE specifies the weight of the font to use. It must be one of the +symbols `ultra-bold', `extra-bold', `bold', `semi-bold', `normal', +`semi-light', `light', `extra-light', `ultra-light'. + +`:slant' + +VALUE specifies the slant of the font to use. It must be one of the +symbols `italic', `oblique', `normal', `reverse-italic', or +`reverse-oblique'. + +`:foreground', `:background' + +VALUE must be a color name, a string. + +`:underline' + +VALUE specifies whether characters in FACE should be underlined. If +VALUE is t, underline with foreground color of the face. If VALUE is +a string, underline with that color. If VALUE is nil, explicitly +don't underline. + +`:overline' + +VALUE specifies whether characters in FACE should be overlined. If +VALUE is t, overline with foreground color of the face. If VALUE is a +string, overline with that color. If VALUE is nil, explicitly don't +overline. + +`:strike-through' + +VALUE specifies whether characters in FACE should be drawn with a line +striking through them. If VALUE is t, use the foreground color of the +face. If VALUE is a string, strike-through with that color. If VALUE +is nil, explicitly don't strike through. + +`:box' + +VALUE specifies whether characters in FACE should have a box drawn +around them. If VALUE is nil, explicitly don't draw boxes. If +VALUE is t, draw a box with lines of width 1 in the foreground color +of the face. If VALUE is a string, the string must be a color name, +and the box is drawn in that color with a line width of 1. Otherwise, +VALUE must be a property list of the form `(:line-width WIDTH +:color COLOR :style STYLE)'. If a keyword/value pair is missing from +the property list, a default value will be used for the value, as +specified below. WIDTH specifies the width of the lines to draw; it +defaults to 1. COLOR is the name of the color to draw in, default is +the foreground color of the face for simple boxes, and the background +color of the face for 3D boxes. STYLE specifies whether a 3D box +should be draw. If STYLE is `released-button', draw a box looking +like a released 3D button. If STYLE is `pressed-button' draw a box +that appears like a pressed button. If STYLE is nil, the default if +the property list doesn't contain a style specification, draw a 2D +box. + +`:inverse-video' + +VALUE specifies whether characters in FACE should be displayed in +inverse video. VALUE must be one of t or nil. + +`:stipple' + +If VALUE is a string, it must be the name of a file of pixmap data. +The directories listed in the `x-bitmap-file-path' variable are +searched. Alternatively, VALUE may be a list of the form (WIDTH +HEIGHT DATA) where WIDTH and HEIGHT are the size in pixels, and DATA +is a string containing the raw bits of the bitmap. VALUE nil means +explicitly don't use a stipple pattern. + +For convenience, attributes `:family', `:width', `:height', `:weight', +and `:slant' may also be set in one step from an X font name: + +`:font' + +Set font-related face attributes from VALUE. VALUE must be a valid +XLFD font name. If it is a font name pattern, the first matching font +is used--this is for compatibility with the behavior of previous +versions of Emacs. + +For compatibility with Emacs 20, keywords `:bold' and `:italic' can +be used to specify that a bold or italic font should be used. VALUE +must be t or nil in that case. A value of `unspecified' is not allowed." + +Please see also the documentation of `set-face-attribute' and +`defface'. + +`:inherit' + +VALUE is the name of a face from which to inherit attributes, or a list +of face names. Attributes from inherited faces are merged into the face +like an underlying face would be, with higher priority than underlying faces. + +*** Face attributes and X resources + +The following X resource names can be used to set face attributes +from X resources: + + Face attribute X resource class +----------------------------------------------------------------------- + :family attributeFamily . Face.AttributeFamily + :width attributeWidth Face.AttributeWidth + :height attributeHeight Face.AttributeHeight + :weight attributeWeight Face.AttributeWeight + :slant attributeSlant Face.AttributeSlant + foreground attributeForeground Face.AttributeForeground + :background attributeBackground . Face.AttributeBackground + :overline attributeOverline Face.AttributeOverline + :strike-through attributeStrikeThrough Face.AttributeStrikeThrough + :box attributeBox Face.AttributeBox + :underline attributeUnderline Face.AttributeUnderline + :inverse-video attributeInverse Face.AttributeInverse + :stipple attributeStipple Face.AttributeStipple + or attributeBackgroundPixmap + Face.AttributeBackgroundPixmap + :font attributeFont Face.AttributeFont + :bold attributeBold Face.AttributeBold + :italic attributeItalic . Face.AttributeItalic + :font attributeFont Face.AttributeFont + +*** Text property `face'. + +The value of the `face' text property can now be a single face +specification or a list of such specifications. Each face +specification can be + +1. A symbol or string naming a Lisp face. + +2. A property list of the form (KEYWORD VALUE ...) where each + KEYWORD is a face attribute name, and VALUE is an appropriate value + for that attribute. Please see the doc string of `set-face-attribute' + for face attribute names. + +3. Conses of the form (FOREGROUND-COLOR . COLOR) or + (BACKGROUND-COLOR . COLOR) where COLOR is a color name. This is + for compatibility with previous Emacs versions. + +** Support functions for colors on text-only terminals. + +The function `tty-color-define' can be used to define colors for use +on TTY and MSDOS frames. It maps a color name to a color number on +the terminal. Emacs defines a couple of common color mappings by +default. You can get defined colors with a call to +`defined-colors'. The function `tty-color-clear' can be +used to clear the mapping table. + +** Unified support for colors independent of frame type. + +The new functions `defined-colors', `color-defined-p', `color-values', +and `display-color-p' work for any type of frame. On frames whose +type is neither x nor w32, these functions transparently map X-style +color specifications to the closest colors supported by the frame +display. Lisp programs should use these new functions instead of the +old `x-defined-colors', `x-color-defined-p', `x-color-values', and +`x-display-color-p'. (The old function names are still available for +compatibility; they are now aliases of the new names.) Lisp programs +should no more look at the value of the variable window-system to +modify their color-related behavior. + +The primitives `color-gray-p' and `color-supported-p' also work for +any frame type. + +** Platform-independent functions to describe display capabilities. + +The new functions `display-mouse-p', `display-popup-menus-p', +`display-graphic-p', `display-selections-p', `display-screens', +`display-pixel-width', `display-pixel-height', `display-mm-width', +`display-mm-height', `display-backing-store', `display-save-under', +`display-planes', `display-color-cells', `display-visual-class', and +`display-grayscale-p' describe the basic capabilities of a particular +display. Lisp programs should call these functions instead of testing +the value of the variables `window-system' or `system-type', or calling +platform-specific functions such as `x-display-pixel-width'. + +The new function `display-images-p' returns non-nil if a particular +display can display image files. + +** The minibuffer prompt is now actually inserted in the minibuffer. + +This makes it possible to scroll through the prompt, if you want to. +To disallow this completely (like previous versions of emacs), customize +the variable `minibuffer-prompt-properties', and turn on the +`Inviolable' option. + +The function `minibuffer-prompt-end' returns the current position of the +end of the minibuffer prompt, if the minibuffer is current. +Otherwise, it returns `(point-min)'. + +** New `field' abstraction in buffers. + +There is now code to support an abstraction called `fields' in emacs +buffers. A field is a contiguous region of text with the same `field' +property (which can be a text property or an overlay). + +Many emacs functions, such as forward-word, forward-sentence, +forward-paragraph, beginning-of-line, etc., stop moving when they come +to the boundary between fields; beginning-of-line and end-of-line will +not let the point move past the field boundary, but other movement +commands continue into the next field if repeated. Stopping at field +boundaries can be suppressed programmatically by binding +`inhibit-field-text-motion' to a non-nil value around calls to these +functions. + +Now that the minibuffer prompt is inserted into the minibuffer, it is in +a separate field from the user-input part of the buffer, so that common +editing commands treat the user's text separately from the prompt. + +The following functions are defined for operating on fields: + +- Function: constrain-to-field NEW-POS OLD-POS &optional ESCAPE-FROM-EDGE ONLY-IN-LINE INHIBIT-CAPTURE-PROPERTY + +Return the position closest to NEW-POS that is in the same field as OLD-POS. + +A field is a region of text with the same `field' property. +If NEW-POS is nil, then the current point is used instead, and set to the +constrained position if that is different. + +If OLD-POS is at the boundary of two fields, then the allowable +positions for NEW-POS depends on the value of the optional argument +ESCAPE-FROM-EDGE: If ESCAPE-FROM-EDGE is nil, then NEW-POS is +constrained to the field that has the same `field' char-property +as any new characters inserted at OLD-POS, whereas if ESCAPE-FROM-EDGE +is non-nil, NEW-POS is constrained to the union of the two adjacent +fields. Additionally, if two fields are separated by another field with +the special value `boundary', then any point within this special field is +also considered to be `on the boundary'. + +If the optional argument ONLY-IN-LINE is non-nil and constraining +NEW-POS would move it to a different line, NEW-POS is returned +unconstrained. This useful for commands that move by line, like +C-n or C-a, which should generally respect field boundaries +only in the case where they can still move to the right line. + +If the optional argument INHIBIT-CAPTURE-PROPERTY is non-nil, and OLD-POS has +a non-nil property of that name, then any field boundaries are ignored. + +Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. + +- Function: delete-field &optional POS + +Delete the field surrounding POS. +A field is a region of text with the same `field' property. +If POS is nil, the value of point is used for POS. + +- Function: field-beginning &optional POS ESCAPE-FROM-EDGE + +Return the beginning of the field surrounding POS. +A field is a region of text with the same `field' property. +If POS is nil, the value of point is used for POS. +If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its +field, then the beginning of the *previous* field is returned. + +- Function: field-end &optional POS ESCAPE-FROM-EDGE + +Return the end of the field surrounding POS. +A field is a region of text with the same `field' property. +If POS is nil, the value of point is used for POS. +If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field, +then the end of the *following* field is returned. + +- Function: field-string &optional POS + +Return the contents of the field surrounding POS as a string. +A field is a region of text with the same `field' property. +If POS is nil, the value of point is used for POS. + +- Function: field-string-no-properties &optional POS + +Return the contents of the field around POS, without text-properties. +A field is a region of text with the same `field' property. +If POS is nil, the value of point is used for POS. + +** Image support. + +Emacs can now display images. Images are inserted into text by giving +strings or buffer text a `display' text property containing one of +(AREA IMAGE) or IMAGE. The display of the `display' property value +replaces the display of the characters having that property. + +If the property value has the form (AREA IMAGE), AREA must be one of +`(margin left-margin)', `(margin right-margin)' or `(margin nil)'. If +AREA is `(margin nil)', IMAGE will be displayed in the text area of a +window, otherwise it will be displayed in the left or right marginal +area. + +IMAGE is an image specification. + +*** Image specifications + +Image specifications are lists of the form `(image PROPS)' where PROPS +is a property list whose keys are keyword symbols. Each +specifications must contain a property `:type TYPE' with TYPE being a +symbol specifying the image type, e.g. `xbm'. Properties not +described below are ignored. + +The following is a list of properties all image types share. + +`:ascent ASCENT' + +ASCENT must be a number in the range 0..100, or the symbol `center'. +If it is a number, it specifies the percentage of the image's height +to use for its ascent. + +If not specified, ASCENT defaults to the value 50 which means that the +image will be centered with the base line of the row it appears in. + +If ASCENT is `center' the image is vertically centered around a +centerline which is the vertical center of text drawn at the position +of the image, in the manner specified by the text properties and +overlays that apply to the image. + +`:margin MARGIN' + +MARGIN must be either a number >= 0 specifying how many pixels to put +as margin around the image, or a pair (X . Y) with X specifying the +horizontal margin and Y specifying the vertical margin. Default is 0. + +`:relief RELIEF' + +RELIEF is analogous to the `:relief' attribute of faces. Puts a relief +around an image. + +`:conversion ALGO' + +Apply an image algorithm to the image before displaying it. + +ALGO `laplace' or `emboss' means apply a Laplace or ``emboss'' +edge-detection algorithm to the image. + +ALGO `(edge-detection :matrix MATRIX :color-adjust ADJUST)' means +apply a general edge-detection algorithm. MATRIX must be either a +nine-element list or a nine-element vector of numbers. A pixel at +position x/y in the transformed image is computed from original pixels +around that position. MATRIX specifies, for each pixel in the +neighborhood of x/y, a factor with which that pixel will influence the +transformed pixel; element 0 specifies the factor for the pixel at +x-1/y-1, element 1 the factor for the pixel at x/y-1 etc. as shown +below. + + (x-1/y-1 x/y-1 x+1/y-1 + x-1/y x/y x+1/y + x-1/y+1 x/y+1 x+1/y+1) + +The resulting pixel is computed from the color intensity of the color +resulting from summing up the RGB values of surrounding pixels, +multiplied by the specified factors, and dividing that sum by the sum +of the factors' absolute values. + +Laplace edge-detection currently uses a matrix of + + (1 0 0 + 0 0 0 + 9 9 -1) + +Emboss edge-detection uses a matrix of + + ( 2 -1 0 + -1 0 1 + 0 1 -2) + +ALGO `disabled' means transform the image so that it looks +``disabled''. + +`:mask MASK' + +If MASK is `heuristic' or `(heuristic BG)', build a clipping mask for +the image, so that the background of a frame is visible behind the +image. If BG is not specified, or if BG is t, determine the +background color of the image by looking at the 4 corners of the +image, assuming the most frequently occurring color from the corners is +the background color of the image. Otherwise, BG must be a list `(RED +GREEN BLUE)' specifying the color to assume for the background of the +image. + +If MASK is nil, remove a mask from the image, if it has one. Images +in some formats include a mask which can be removed by specifying +`:mask nil'. + +`:file FILE' + +Load image from FILE. If FILE is not absolute after expanding it, +search for the image in `data-directory'. Some image types support +building images from data. When this is done, no `:file' property +may be present in the image specification. + +`:data DATA' + +Get image data from DATA. (As of this writing, this is not yet +supported for image type `postscript'). Either :file or :data may be +present in an image specification, but not both. All image types +support strings as DATA, some types allow additional types of DATA. + +*** Supported image types + +**** XBM, image type `xbm'. + +XBM images don't require an external library. Additional image +properties supported are: + +`:foreground FG' + +FG must be a string specifying the image foreground color, or nil +meaning to use the default. Default is the frame's foreground color. + +`:background BG' + +BG must be a string specifying the image background color, or nil +meaning to use the default. Default is the frame's background color. + +XBM images can be constructed from data instead of file. In this +case, the image specification must contain the following properties +instead of a `:file' property. + +`:width WIDTH' + +WIDTH specifies the width of the image in pixels. + +`:height HEIGHT' + +HEIGHT specifies the height of the image in pixels. + +`:data DATA' + +DATA must be either + + 1. a string large enough to hold the bitmap data, i.e. it must + have a size >= (WIDTH + 7) / 8 * HEIGHT + + 2. a bool-vector of size >= WIDTH * HEIGHT + + 3. a vector of strings or bool-vectors, one for each line of the + bitmap. + + 4. a string that's an in-memory XBM file. Neither width nor + height may be specified in this case because these are defined + in the file. + +**** XPM, image type `xpm' + +XPM images require the external library `libXpm', package +`xpm-3.4k.tar.gz', version 3.4k or later. Make sure the library is +found when Emacs is configured by supplying appropriate paths via +`--x-includes' and `--x-libraries'. + +Additional image properties supported are: + +`:color-symbols SYMBOLS' + +SYMBOLS must be a list of pairs (NAME . COLOR), with NAME being the +name of color as it appears in an XPM file, and COLOR being an X color +name. + +XPM images can be built from memory instead of files. In that case, +add a `:data' property instead of a `:file' property. + +The XPM library uses libz in its implementation so that it is able +to display compressed images. + +**** PBM, image type `pbm' + +PBM images don't require an external library. Color, gray-scale and +mono images are supported. Additional image properties supported for +mono images are: + +`:foreground FG' + +FG must be a string specifying the image foreground color, or nil +meaning to use the default. Default is the frame's foreground color. + +`:background FG' + +BG must be a string specifying the image background color, or nil +meaning to use the default. Default is the frame's background color. + +**** JPEG, image type `jpeg' + +Support for JPEG images requires the external library `libjpeg', +package `jpegsrc.v6a.tar.gz', or later. There are no additional image +properties defined. + +**** TIFF, image type `tiff' + +Support for TIFF images requires the external library `libtiff', +package `tiff-v3.4-tar.gz', or later. There are no additional image +properties defined. + +**** GIF, image type `gif' + +Support for GIF images requires the external library `libungif', package +`libungif-4.1.0', or later. + +Additional image properties supported are: + +`:index INDEX' + +INDEX must be an integer >= 0. Load image number INDEX from a +multi-image GIF file. If INDEX is too large, the image displays +as a hollow box. + +This could be used to implement limited support for animated GIFs. +For example, the following function displays a multi-image GIF file +at point-min in the current buffer, switching between sub-images +every 0.1 seconds. + +(defun show-anim (file max) + "Display multi-image GIF file FILE which contains MAX subimages." + (display-anim (current-buffer) file 0 max t)) + +(defun display-anim (buffer file idx max first-time) + (when (= idx max) + (setq idx 0)) + (let ((img (create-image file nil nil :index idx))) + (save-excursion + (set-buffer buffer) + (goto-char (point-min)) + (unless first-time (delete-char 1)) + (insert-image img "x")) + (run-with-timer 0.1 nil 'display-anim buffer file (1+ idx) max nil))) + +**** PNG, image type `png' + +Support for PNG images requires the external library `libpng', +package `libpng-1.0.2.tar.gz', or later. There are no additional image +properties defined. + +**** Ghostscript, image type `postscript'. + +Additional image properties supported are: + +`:pt-width WIDTH' + +WIDTH is width of the image in pt (1/72 inch). WIDTH must be an +integer. This is a required property. + +`:pt-height HEIGHT' + +HEIGHT specifies the height of the image in pt (1/72 inch). HEIGHT +must be a integer. This is an required property. + +`:bounding-box BOX' + +BOX must be a list or vector of 4 integers giving the bounding box of +the PS image, analogous to the `BoundingBox' comment found in PS +files. This is an required property. + +Part of the Ghostscript interface is implemented in Lisp. See +lisp/gs.el. + +*** Lisp interface. + +The variable `image-types' contains a list of those image types +which are supported in the current configuration. + +Images are stored in an image cache and removed from the cache when +they haven't been displayed for `image-cache-eviction-delay seconds. +The function `clear-image-cache' can be used to clear the image cache +manually. Images in the cache are compared with `equal', i.e. all +images with `equal' specifications share the same image. + +*** Simplified image API, image.el + +The new Lisp package image.el contains functions that simplify image +creation and putting images into text. The function `create-image' +can be used to create images. The macro `defimage' can be used to +define an image based on available image types. The functions +`put-image' and `insert-image' can be used to insert an image into a +buffer. + +** Display margins. + +Windows can now have margins which are used for special text +and images. + +To give a window margins, either set the buffer-local variables +`left-margin-width' and `right-margin-width', or call +`set-window-margins'. The function `window-margins' can be used to +obtain the current settings. To make `left-margin-width' and +`right-margin-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. + +You can put text in margins by giving it a `display' text property +containing a pair of the form `(LOCATION . VALUE)', where LOCATION is +one of `left-margin' or `right-margin' or nil. VALUE can be either a +string, an image specification or a stretch specification (see later +in this file). + +** Help display + +Emacs displays short help messages in the echo area, when the mouse +moves over a tool-bar item or a piece of text that has a text property +`help-echo'. This feature also applies to strings in the mode line +that have a `help-echo' property. + +If the value of the `help-echo' property is a function, that function +is called with three arguments WINDOW, OBJECT and POSITION. WINDOW is +the window in which the help was found. + +If OBJECT is a buffer, POS is the position in the buffer where the +`help-echo' text property was found. + +If OBJECT is an overlay, that overlay has a `help-echo' property, and +POS is the position in the overlay's buffer under the mouse. + +If OBJECT is a string (an overlay string or a string displayed with +the `display' property), POS is the position in that string under the +mouse. + +If the value of the `help-echo' property is neither a function nor a +string, it is evaluated to obtain a help string. + +For tool-bar and menu-bar items, their key definition is used to +determine the help to display. If their definition contains a +property `:help FORM', FORM is evaluated to determine the help string. +For tool-bar items without a help form, the caption of the item is +used as help string. + +The hook `show-help-function' can be set to a function that displays +the help string differently. For example, enabling a tooltip window +causes the help display to appear there instead of in the echo area. + +** Vertical fractional scrolling. + +The display of text in windows can be scrolled smoothly in pixels. +This is useful, for example, for making parts of large images visible. + +The function `window-vscroll' returns the current value of vertical +scrolling, a non-negative fraction of the canonical character height. +The function `set-window-vscroll' can be used to set the vertical +scrolling value. Here is an example of how these function might be +used. + + (global-set-key [A-down] + #'(lambda () + (interactive) + (set-window-vscroll (selected-window) + (+ 0.5 (window-vscroll))))) + (global-set-key [A-up] + #'(lambda () + (interactive) + (set-window-vscroll (selected-window) + (- (window-vscroll) 0.5))))) + +** New hook `fontification-functions'. + +Functions from `fontification-functions' are called from redisplay +when it encounters a region of text that is not yet fontified. This +variable automatically becomes buffer-local when set. Each function +is called with one argument, POS. + +At least one of the hook functions should fontify one or more +characters starting at POS in the current buffer. It should mark them +as fontified by giving them a non-nil value of the `fontified' text +property. It may be reasonable for these functions to check for the +`fontified' property and not put it back on, but they do not have to. + +** Tool bar support. + +Emacs supports a tool bar at the top of a frame under X. The frame +parameter `tool-bar-lines' (X resource "toolBar", class "ToolBar") +controls how may lines to reserve for the tool bar. A zero value +suppresses the tool bar. If the value is non-zero and +`auto-resize-tool-bars' is non-nil the tool bar's size will be changed +automatically so that all tool bar items are visible. + +*** Tool bar item definitions + +Tool bar items are defined using `define-key' with a prefix-key +`tool-bar'. For example `(define-key global-map [tool-bar item1] ITEM)' +where ITEM is a list `(menu-item CAPTION BINDING PROPS...)'. + +CAPTION is the caption of the item, If it's not a string, it is +evaluated to get a string. The caption is currently not displayed in +the tool bar, but it is displayed if the item doesn't have a `:help' +property (see below). + +BINDING is the tool bar item's binding. Tool bar items with keymaps as +binding are currently ignored. + +The following properties are recognized: + +`:enable FORM'. + +FORM is evaluated and specifies whether the tool bar item is enabled +or disabled. + +`:visible FORM' + +FORM is evaluated and specifies whether the tool bar item is displayed. + +`:filter FUNCTION' + +FUNCTION is called with one parameter, the same list BINDING in which +FUNCTION is specified as the filter. The value FUNCTION returns is +used instead of BINDING to display this item. + +`:button (TYPE SELECTED)' + +TYPE must be one of `:radio' or `:toggle'. SELECTED is evaluated +and specifies whether the button is selected (pressed) or not. + +`:image IMAGES' + +IMAGES is either a single image specification or a vector of four +image specifications. If it is a vector, this table lists the +meaning of each of the four elements: + + Index Use when item is + ---------------------------------------- + 0 enabled and selected + 1 enabled and deselected + 2 disabled and selected + 3 disabled and deselected + +If IMAGE is a single image specification, a Laplace edge-detection +algorithm is used on that image to draw the image in disabled state. + +`:help HELP-STRING'. + +Gives a help string to display for the tool bar item. This help +is displayed when the mouse is moved over the item. + +The function `toolbar-add-item' is a convenience function for adding +toolbar items generally, and `tool-bar-add-item-from-menu' can be used +to define a toolbar item with a binding copied from an item on the +menu bar. + +The default bindings use a menu-item :filter to derive the tool-bar +dynamically from variable `tool-bar-map' which may be set +buffer-locally to override the global map. + +*** Tool-bar-related variables. + +If `auto-resize-tool-bar' is non-nil, the tool bar will automatically +resize to show all defined tool bar items. It will never grow larger +than 1/4 of the frame's size. + +If `auto-raise-tool-bar-buttons' is non-nil, tool bar buttons will be +raised when the mouse moves over them. + +You can add extra space between tool bar items by setting +`tool-bar-button-margin' to a positive integer specifying a number of +pixels, or a pair of integers (X . Y) specifying horizontal and +vertical margins . Default is 1. + +You can change the shadow thickness of tool bar buttons by setting +`tool-bar-button-relief' to an integer. Default is 3. + +*** Tool-bar clicks with modifiers. + +You can bind commands to clicks with control, shift, meta etc. on +a tool bar item. If + + (define-key global-map [tool-bar shell] + '(menu-item "Shell" shell + :image (image :type xpm :file "shell.xpm"))) + +is the original tool bar item definition, then + + (define-key global-map [tool-bar S-shell] 'some-command) + +makes a binding to run `some-command' for a shifted click on the same +item. + +** Mode line changes. + +*** Mouse-sensitive mode line. + +The mode line can be made mouse-sensitive by displaying strings there +that have a `local-map' text property. There are three ways to display +a string with a `local-map' property in the mode line. + +1. The mode line spec contains a variable whose string value has +a `local-map' text property. + +2. The mode line spec contains a format specifier (e.g. `%12b'), and +that format specifier has a `local-map' property. + +3. The mode line spec contains a list containing `:eval FORM'. FORM +is evaluated. If the result is a string, and that string has a +`local-map' property. + +The same mechanism is used to determine the `face' and `help-echo' +properties of strings in the mode line. See `bindings.el' for an +example. + +*** If a mode line element has the form `(:eval FORM)', FORM is +evaluated and the result is used as mode line element. + +*** You can suppress mode-line display by setting the buffer-local +variable mode-line-format to nil. + +*** A headerline can now be displayed at the top of a window. + +This mode line's contents are controlled by the new variable +`header-line-format' and `default-header-line-format' which are +completely analogous to `mode-line-format' and +`default-mode-line-format'. A value of nil means don't display a top +line. + +The appearance of top mode lines is controlled by the face +`header-line'. + +The function `coordinates-in-window-p' returns `header-line' for a +position in the header-line. + +** Text property `display' + +The `display' text property is used to insert images into text, +replace text with other text, display text in marginal area, and it is +also used to control other aspects of how text displays. The value of +the `display' property should be a display specification, as described +below, or a list or vector containing display specifications. + +*** Replacing text, displaying text in marginal areas + +To replace the text having the `display' property with some other +text, use a display specification of the form `(LOCATION STRING)'. + +If LOCATION is `(margin left-margin)', STRING is displayed in the left +marginal area, if it is `(margin right-margin)', it is displayed in +the right marginal area, and if LOCATION is `(margin nil)' STRING +is displayed in the text. In the latter case you can also use the +simpler form STRING as property value. + +*** Variable width and height spaces + +To display a space of fractional width or height, use a display +specification of the form `(LOCATION STRECH)'. If LOCATION is +`(margin left-margin)', the space is displayed in the left marginal +area, if it is `(margin right-margin)', it is displayed in the right +marginal area, and if LOCATION is `(margin nil)' the space is +displayed in the text. In the latter case you can also use the +simpler form STRETCH as property value. + +The stretch specification STRETCH itself is a list of the form `(space +PROPS)', where PROPS is a property list which can contain the +properties described below. + +The display of the fractional space replaces the display of the +characters having the `display' property. + +- :width WIDTH + +Specifies that the space width should be WIDTH times the normal +character width. WIDTH can be an integer or floating point number. + +- :relative-width FACTOR + +Specifies that the width of the stretch should be computed from the +first character in a group of consecutive characters that have the +same `display' property. The computation is done by multiplying the +width of that character by FACTOR. + +- :align-to HPOS + +Specifies that the space should be wide enough to reach HPOS. The +value HPOS is measured in units of the normal character width. + +Exactly one of the above properties should be used. + +- :height HEIGHT + +Specifies the height of the space, as HEIGHT, measured in terms of the +normal line height. + +- :relative-height FACTOR + +The height of the space is computed as the product of the height +of the text having the `display' property and FACTOR. + +- :ascent ASCENT + +Specifies that ASCENT percent of the height of the stretch should be +used for the ascent of the stretch, i.e. for the part above the +baseline. The value of ASCENT must be a non-negative number less or +equal to 100. + +You should not use both `:height' and `:relative-height' together. + +*** Images + +A display specification for an image has the form `(LOCATION +. IMAGE)', where IMAGE is an image specification. The image replaces, +in the display, the characters having this display specification in +their `display' text property. If LOCATION is `(margin left-margin)', +the image will be displayed in the left marginal area, if it is +`(margin right-margin)' it will be displayed in the right marginal +area, and if LOCATION is `(margin nil)' the image will be displayed in +the text. In the latter case you can also use the simpler form IMAGE +as display specification. + +*** Other display properties + +- (space-width FACTOR) + +Specifies that space characters in the text having that property +should be displayed FACTOR times as wide as normal; FACTOR must be an +integer or float. + +- (height HEIGHT) + +Display text having this property in a font that is smaller or larger. + +If HEIGHT is a list of the form `(+ N)', where N is an integer, that +means to use a font that is N steps larger. If HEIGHT is a list of +the form `(- N)', that means to use a font that is N steps smaller. A +``step'' is defined by the set of available fonts; each size for which +a font is available counts as a step. + +If HEIGHT is a number, that means to use a font that is HEIGHT times +as tall as the frame's default font. + +If HEIGHT is a symbol, it is called as a function with the current +height as argument. The function should return the new height to use. + +Otherwise, HEIGHT is evaluated to get the new height, with the symbol +`height' bound to the current specified font height. + +- (raise FACTOR) + +FACTOR must be a number, specifying a multiple of the current +font's height. If it is positive, that means to display the characters +raised. If it is negative, that means to display them lower down. The +amount of raising or lowering is computed without taking account of the +`height' subproperty. + +*** Conditional display properties + +All display specifications can be conditionalized. If a specification +has the form `(when CONDITION . SPEC)', the specification SPEC applies +only when CONDITION yields a non-nil value when evaluated. During the +evaluation, `object' is bound to the string or buffer having the +conditional display property; `position' and `buffer-position' are +bound to the position within `object' and the buffer position where +the display property was found, respectively. Both positions can be +different when object is a string. + +The normal specification consisting of SPEC only is equivalent to +`(when t . SPEC)'. + +** New menu separator types. + +Emacs now supports more than one menu separator type. Menu items with +item names consisting of dashes only (including zero dashes) are +treated like before. In addition, the following item names are used +to specify other menu separator types. + +- `--no-line' or `--space', or `--:space', or `--:noLine' + +No separator lines are drawn, but a small space is inserted where the +separator occurs. + +- `--single-line' or `--:singleLine' + +A single line in the menu's foreground color. + +- `--double-line' or `--:doubleLine' + +A double line in the menu's foreground color. + +- `--single-dashed-line' or `--:singleDashedLine' + +A single dashed line in the menu's foreground color. + +- `--double-dashed-line' or `--:doubleDashedLine' + +A double dashed line in the menu's foreground color. + +- `--shadow-etched-in' or `--:shadowEtchedIn' + +A single line with 3D sunken appearance. This is the form +displayed for item names consisting of dashes only. + +- `--shadow-etched-out' or `--:shadowEtchedOut' + +A single line with 3D raised appearance. + +- `--shadow-etched-in-dash' or `--:shadowEtchedInDash' + +A single dashed line with 3D sunken appearance. + +- `--shadow-etched-out-dash' or `--:shadowEtchedOutDash' + +A single dashed line with 3D raise appearance. + +- `--shadow-double-etched-in' or `--:shadowDoubleEtchedIn' + +Two lines with 3D sunken appearance. + +- `--shadow-double-etched-out' or `--:shadowDoubleEtchedOut' + +Two lines with 3D raised appearance. + +- `--shadow-double-etched-in-dash' or `--:shadowDoubleEtchedInDash' + +Two dashed lines with 3D sunken appearance. + +- `--shadow-double-etched-out-dash' or `--:shadowDoubleEtchedOutDash' + +Two dashed lines with 3D raised appearance. + +Under LessTif/Motif, the last four separator types are displayed like +the corresponding single-line separators. + +** New frame parameters for scroll bar colors. + +The new frame parameters `scroll-bar-foreground' and +`scroll-bar-background' can be used to change scroll bar colors. +Their value must be either a color name, a string, or nil to specify +that scroll bars should use a default color. For toolkit scroll bars, +default colors are toolkit specific. For non-toolkit scroll bars, the +default background is the background color of the frame, and the +default foreground is black. + +The X resource name of these parameters are `scrollBarForeground' +(class ScrollBarForeground) and `scrollBarBackground' (class +`ScrollBarBackground'). + +Setting these parameters overrides toolkit specific X resource +settings for scroll bar colors. + +** You can set `redisplay-dont-pause' to a non-nil value to prevent +display updates from being interrupted when input is pending. + +** Changing a window's width may now change its window start if it +starts on a continuation line. The new window start is computed based +on the window's new width, starting from the start of the continued +line as the start of the screen line with the minimum distance from +the original window start. + +** The variable `hscroll-step' and the functions +`hscroll-point-visible' and `hscroll-window-column' have been removed +now that proper horizontal scrolling is implemented. + +** Windows can now be made fixed-width and/or fixed-height. + +A window is fixed-size if its buffer has a buffer-local variable +`window-size-fixed' whose value is not nil. A value of `height' makes +windows fixed-height, a value of `width' makes them fixed-width, any +other non-nil value makes them both fixed-width and fixed-height. + +The following code makes all windows displaying the current buffer +fixed-width and fixed-height. + + (set (make-local-variable 'window-size-fixed) t) + +A call to enlarge-window on a window gives an error if that window is +fixed-width and it is tried to change the window's width, or if the +window is fixed-height, and it is tried to change its height. To +change the size of a fixed-size window, bind `window-size-fixed' +temporarily to nil, for example + + (let ((window-size-fixed nil)) + (enlarge-window 10)) + +Likewise, an attempt to split a fixed-height window vertically, +or a fixed-width window horizontally results in a error. + +** The cursor-type frame parameter is now supported on MS-DOS +terminals. When Emacs starts, it by default changes the cursor shape +to a solid box, as it does on Unix. The `cursor-type' frame parameter +overrides this as it does on Unix, except that the bar cursor is +horizontal rather than vertical (since the MS-DOS display doesn't +support a vertical-bar cursor). + + + +---------------------------------------------------------------------- +Copyright information: + +Copyright (C) 2000, 2001, 2002, 2003, 2006 + Free Software Foundation, Inc. + + Permission is granted to anyone to make or distribute verbatim copies + of this document as received, in any medium, provided that the + copyright notice and this permission notice are preserved, + thus giving the recipient permission to redistribute in turn. + + Permission is granted to distribute modified versions + of this document, or of portions of it, + under the above conditions, provided also that they + carry prominent notices stating who last changed them. + +Local variables: +mode: outline +paragraph-separate: "[ ]*$" +end: diff --git a/etc/ONEWS.1 b/etc/ONEWS.1 deleted file mode 100644 index 4f75a7bc6e0..00000000000 --- a/etc/ONEWS.1 +++ /dev/null @@ -1,1167 +0,0 @@ -Old GNU Emacs NEWS -- history of user-visible changes thru version 15. -Copyright (C) 1985 Richard M. Stallman. -See the end for copying conditions. - -Changes in Emacs 15 - -* Emacs now runs on Sun and Megatest 68000 systems; - also on at least one 16000 system running 4.2. - -* Emacs now alters the output-start and output-stop characters - to prevent C-s and C-q from being considered as flow control - by cretinous rlogin software in 4.2. - -* It is now possible convert Mocklisp code (for Gosling Emacs) to Lisp code - that can run in GNU Emacs. M-x convert-mocklisp-buffer - converts the contents of the current buffer from Mocklisp to - GNU Emacs Lisp. You should then save the converted buffer with C-x C-w - under a name ending in ".el" - - There are probably some Mocklisp constructs that are not handled. - If you encounter one, feel free to report the failure as a bug. - The construct will be handled in a future Emacs release, if that is not - not too hard to do. - - Note that lisp code converted from Mocklisp code will not necessarily - run as fast as code specifically written for GNU Emacs, nor will it use - the many features of GNU Emacs which are not present in Gosling's emacs. - (In particular, the byte-compiler (m-x byte-compile-file) knows little - about compilation of code directly converted from mocklisp.) - It is envisaged that old mocklisp code will be incrementally converted - to GNU lisp code, with M-x convert-mocklisp-buffer being the first - step in this process. - -* Control-x n (narrow-to-region) is now by default a disabled command. - - This means that, if you issue this command, it will ask whether - you really mean it. You have the opportunity to enable the - command permanently at that time, so you will not be asked again. - This will place the form "(put 'narrow-to-region 'disabled nil)" in your - .emacs file. - -* Tags now prompts for the tag table file name to use. - - All the tags commands ask for the tag table file name - if you have not yet specified one. - - Also, the command M-x visit-tag-table can now be used to - specify the tag table file name initially, or to switch - to a new tag table. - -* If truncate-partial-width-windows is non-nil (as it intially is), - all windows less than the full screen width (that is, - made by side-by-side splitting) truncate lines rather than continuing - them. - -* Emacs now checks for Lisp stack overflow to avoid fatal errors. - The depth in eval, apply and funcall may not exceed max-lisp-eval-depth. - The depth in variable bindings and unwind-protects may not exceed - max-specpdl-size. If either limit is exceeded, an error occurs. - You can set the limits to larger values if you wish, but if you make them - too large, you are vulnerable to a fatal error if you invoke - Lisp code that does infinite recursion. - -* New hooks find-file-hook and write-file-hook. - Both of these variables if non-nil should be functions of no arguments. - At the time they are called (current-buffer) will be the buffer being - read or written respectively. - - find-file-hook is called whenever a file is read into its own buffer, - such as by calling find-file, revert-buffer, etc. It is not called by - functions such as insert-file which do not read the file into a buffer of - its own. - find-file-hook is called after the file has been read in and its - local variables (if any) have been processed. - - write-file-hook is called just before writing out a file from a buffer. - -* The initial value of shell-prompt-pattern is now "^[^#$%>]*[#$%>] *" - -* If the .emacs file sets inhibit-startup-message to non-nil, - the messages normally printed by Emacs at startup time - are inhibited. - -* Facility for run-time conditionalization on the basis of emacs features. - - The new variable features is a list of symbols which represent "features" - of the executing emacs, for use in run-time conditionalization. - - The function featurep of one argument may be used to test for the - presence of a feature. It is just the same as - (not (null (memq FEATURE features))) where FEATURE is its argument. - For example, (if (featurep 'magic-window-hack) - (transmogrify-window 'vertical) - (split-window-vertically)) - - The function provide of one argument "announces" that FEATURE is present. - It is much the same as (if (not (featurep FEATURE)) - (setq features (cons FEATURE features))) - - The function require with arguments FEATURE and FILE-NAME loads FILE-NAME - (which should contain the form (provide FEATURE)) unless FEATURE is present. - It is much the same as (if (not (featurep FEATURE)) - (progn (load FILE-NAME) - (if (not featurep FEATURE) (error ...)))) - FILE-NAME is optional and defaults to FEATURE. - -* New function load-average. - - This returns a list of three integers, which are - the current 1 minute, 5 minute and 15 minute load averages, - each multiplied by a hundred (since normally they are floating - point numbers). - -* Per-terminal libraries loaded automatically. - - Emacs when starting up on terminal type T automatically loads - a library named term-T. T is the value of the TERM environment variable. - Thus, on terminal type vt100, Emacs would do (load "term-vt100" t t). - Such libraries are good places to set the character translation table. - - It is a bad idea to redefine lots of commands in a per-terminal library, - since this affects all users. Instead, define a command to do the - redefinitions and let the user's init file, which is loaded later, - call that command or not, as the user prefers. - -* Programmer's note: detecting killed buffers. - - Buffers are eliminated by explicitly killing them, using - the function kill-buffer. This does not eliminate or affect - the pointers to the buffer which may exist in list structure. - If you have a pointer to a buffer and wish to tell whether - the buffer has been killed, use the function buffer-name. - It returns nil on a killed buffer, and a string on a live buffer. - -* New ways to access the last command input character. - - The function last-key-struck, which used to return the last - input character that was read by command input, is eliminated. - Instead, you can find this information as the value of the - variable last-command-char. (This variable used to be called - last-key). - - Another new variable, last-input-char, holds the last character - read from the command input stream regardless of what it was - read for. last-input-char and last-command-char are different - only inside a command that has called read-char to read input. - -* The new switch -kill causes Emacs to exit after processing the - preceding command line arguments. Thus, - emacs -l lib data -e do-it -kill - means to load lib, find file data, call do-it on no arguments, - and then exit. - -* The config.h file has been modularized. - - Options that depend on the machine you are running on are defined - in a file whose name starts with "m-", such as m-vax.h. - Options that depend on the operating system software version you are - running on are defined in a file whose name starts with "s-", - such as s-bsd4.2.h. - - config.h includes one m- file and one s- file. It also defines a - few other options whose values do not follow from the machine type - and system type being used. Installers normally will have to - select the correct m- and s- files but will never have to change their - contents. - -* Termcap AL and DL strings are understood. - - If the termcap entry defines AL and DL strings, for insertion - and deletion of multiple lines in one blow, Emacs now uses them. - This matters most on certain bit map display terminals for which - scrolling is comparatively slow. - -* Bias against scrolling screen far on fast terminals. - - Emacs now prefers to redraw a few lines rather than - shift them a long distance on the screen, when the terminal is fast. - -* New major mode, mim-mode. - - This major mode is for editing MDL code. Perhaps a MDL - user can explain why it is not called mdl-mode. - You must load the library mim-mode explicitly to use this. - -* GNU documentation formatter `texinfo'. - - The `texinfo' library defines a format for documentation - files which can be passed through Tex to make a printed manual - or passed through texinfo to make an Info file. Texinfo is - documented fully by its own Info file; compare this file - with its source, texinfo.texinfo, for additional guidance. - - All documentation files for GNU utilities should be written - in texinfo input format. - - Tex processing of texinfo files requires the Botex macro package. - This is not ready for distribution yet, but will appear at - a later time. - -* New function read-from-string (emacs 15.29) - - read-from-string takes three arguments: a string to read from, - and optionally start and end indices which delimit a substring - from which to read. (They default to 0 and the length of the string, - respectively.) - - This function returns a cons cell whose car is the object produced - by reading from the string and whose cdr is a number giving the - index in the string of the first character not read. That index may - be passed as the second argument to a later call to read-from-string - to read the next form represented by the string. - - In addition, the function read now accepts a string as its argument. - In this case, it calls read-from-string on the whole string, and - returns the car of the result. (ie the actual object read.) - -Changes in Emacs 14 - -* Completion now prints various messages such as [Sole Completion] - or [Next Character Not Unique] to describe the results obtained. - These messages appear after the text in the minibuffer, and remain - on the screen until a few seconds go by or you type a key. - -* The buffer-read-only flag is implemented. - Setting or binding this per-buffer variable to a non-nil value - makes illegal any operation which would modify the textual content of - the buffer. (Such operations signal a buffer-read-only error) - The read-only state of a buffer may be altered using toggle-read-only - (C-x C-q) - The buffers used by Rmail, Dired, Rnews, and Info are now read-only - by default to prevent accidental damage to the information in those - buffers. - -* Functions car-safe and cdr-safe. - These functions are like car and cdr when the argument is a cons. - Given an argument not a cons, car-safe always returns nil, with - no error; the same for cdr-safe. - -* The new function user-real-login-name returns the name corresponding - to the real uid of the Emacs process. This is usually the same - as what user-login-name returns; however, when Emacs is invoked - from su, user-real-login-name returns "root" but user-login-name - returns the name of the user who invoked su. - -Changes in Emacs 13 - -* There is a new version numbering scheme. - - What used to be the first version number, which was 1, - has been discarded since it does not seem that I need three - levels of version number. - - However, a new third version number has been added to represent - changes by user sites. This number will always be zero in - Emacs when I distribute it; it will be incremented each time - Emacs is built at another site. - -* There is now a reader syntax for Meta characters: - \M-CHAR means CHAR or'ed with the Meta bit. For example: - - ?\M-x is (+ ?x 128) - ?\M-\n is (+ ?\n 128) - ?\M-\^f is (+ ?\^f 128) - - This syntax can be used in strings too. Note, however, that - Meta characters are not meaningful in key sequences being passed - to define-key or lookup-key; you must use ESC characters (\e) - in them instead. - - ?\C- can be used likewise for control characters. (13.9) - -* Installation change - The string "../lisp" now adds to the front of the load-path - used for searching for Lisp files during Emacs initialization. - It used to replace the path specified in paths.h entirely. - Now the directory ../lisp is searched first and the directoris - specified in paths.h are searched afterward. - -Changes in Emacs 1.12 - -* There is a new installation procedure. - See the file INSTALL that comes in the top level - directory in the tar file or tape. - -* The Meta key is now supported on terminals that have it. - This is a shift key which causes the high bit to be turned on - in all input characters typed while it is held down. - - read-char now returns a value in the range 128-255 if - a Meta character is typed. When interpreted as command - input, a Meta character is equivalent to a two character - sequence, the meta prefix character followed by the un-metized - character (Meta-G unmetized is G). - - The meta prefix character - is specified by the value of the variable meta-prefix-char. - If this character (normally Escape) has been redefined locally - with a non-prefix definition (such as happens in completing - minibuffers) then the local redefinition is suppressed when - the character is not the last one in a key sequence. - So the local redefinition is effective if you type the character - explicitly, but not effective if the character comes from - the use of the Meta key. - -* `-' is no longer a completion command in the minibuffer. - It is an ordinary self-inserting character. - -* The list load-path of directories load to search for Lisp files - is now controlled by the EMACSLOADPATH environment variable -[[ Note this was originally EMACS-LOAD-PATH and has been changed - again; sh does not deal properly with hyphens in env variable names]] - rather than the EPATH environment variable. This is to avoid - conflicts with other Emacses. - - While Emacs is being built initially, the load-path - is now just ("../lisp"), ignoring paths.h. It does not - ignore EMACSLOADPATH, however; you should avoid having - this variable set while building Emacs. - -* You can now specify a translation table for keyboard - input characters, as a way of exchanging or substituting - keys on the keyboard. - - If the value of keyboard-translate-table is a string, - every character received from the keyboard is used as an - index in that string, and the character at that index in - the string is used as input instead of what was actually - typed. If the actual input character is >= the length of - the string, it is used unchanged. - - One way this feature can be used is to fix bad keyboard - designes. For example, on some terminals, Delete is - Shift-Underscore. Since Delete is a more useful character - than Underscore, it is an improvement to make the unshifted - character Delete and the shifted one Underscore. This can - be done with - - ;; First make a translate table that does the identity translation. - (setq keyboard-translate-table (make-string 128 0)) - (let ((i 0)) - (while (< i 128) - (aset keyboard-translate-table i i) - (setq i (1+ i)))) - - ;; Now alter translations of some characters. - (aset keyboard-translate-table ?\_ ?\^?) - (aset keyboard-translate-table ?\^? ?\_) - - If your terminal has a Meta key and can therefore send - codes up to 255, Meta characters are translated through - elements 128 through 255 of the translate table, and therefore - are translated independently of the corresponding non-Meta - characters. You must therefore establish translations - independently for the Meta characters if you want them too: - - ;; First make a translate table that does the identity translation. - (setq keyboard-translate-table (make-string 256 0)) - (let ((i 0)) - (while (< i 256) - (aset keyboard-translate-table i i) - (setq i (1+ i)))) - - ;; Now alter translations of some characters. - (aset keyboard-translate-table ?\_ ?\^?) - (aset keyboard-translate-table ?\^? ?\_) - - ;; Now alter translations of some Meta characters. - (aset keyboard-translate-table (+ 128 ?\_) (+ 128 ?\^?)) - (aset keyboard-translate-table (+ 128 ?\^?) (+ 128 ?\_)) - -* (process-kill-without-query PROCESS) - -This marks the process so that, when you kill Emacs, -you will not on its account be queried about active subprocesses. - -Changes in Emacs 1.11 - -* The commands C-c and C-z have been interchanged, - for greater compatibility with normal Unix usage. - C-z now runs suspend-emacs and C-c runs exit-recursive-edit. - -* The value returned by file-name-directory now ends - with a slash. (file-name-directory "foo/bar") => "foo/". - This avoids confusing results when dealing with files - in the root directory. - - The value of the per-buffer variable default-directory - is also supposed to have a final slash now. - -* There are now variables to control the switches passed to - `ls' by the C-x C-d command (list-directory). - list-directory-brief-switches is a string, initially "-CF", - used for brief listings, and list-directory-verbose-switches - is a string, initially "-l", used for verbose ones. - -* For Ann Arbor Ambassador terminals, the termcap "ti" string - is now used to initialize the screen geometry on entry to Emacs, - and the "te" string is used to set it back on exit. - If the termcap entry does not define the "ti" or "te" string, - Emacs does what it used to do. - -Changes in Emacs 1.10 - -* GNU Emacs has been made almost 1/3 smaller. - It now dumps out as only 530kbytes on Vax 4.2bsd. - -* The term "checkpoint" has been replaced by "auto save" - throughout the function names, variable names and documentation - of GNU Emacs. - -* The function load now tries appending ".elc" and ".el" - to the specified filename BEFORE it tries the filename - without change. - -* rmail now makes the mode line display the total number - of messages and the current message number. - The "f" command now means forward a message to another user. - The command to search through all messages for a string is now "F". - The "u" command now means to move back to the previous - message and undelete it. To undelete the selected message, use Meta-u. - -* The hyphen character is now equivalent to a Space while - in completing minibuffers. Both mean to complete an additional word. - -* The Lisp function error now takes args like format - which are used to construct the error message. - -* Redisplay will refuse to start its display at the end of the buffer. - It will pick a new place to display from, rather than use that. - -* The value returned by garbage-collect has been changed. - Its first element is no longer a number but a cons, - whose car is the number of cons cells now in use, - and whose cdr is the number of cons cells that have been - made but are now free. - The second element is similar but describes symbols rather than cons cells. - The third element is similar but describes markers. - -* The variable buffer-name has been eliminated. - The function buffer-name still exists. This is to prevent - user programs from changing buffer names without going - through the rename-buffer function. - -Changes in Emacs 1.9 - -* When a fill prefix is in effect, paragraphs are started - or separated by lines that do not start with the fill prefix. - Also, a line which consists of the fill prefix followed by - white space separates paragraphs. - -* C-x C-v runs the new function find-alternate-file. - It finds the specified file, switches to that buffer, - and kills the previous current buffer. (It requires - confirmation if that buffer had changes.) This is - most useful after you find the wrong file due to a typo. - -* Exiting the minibuffer moves the cursor to column 0, - to show you that it has really been exited. - -* Meta-g (fill-region) now fills each paragraph in the - region individually. To fill the region as if it were - a single paragraph (for when the paragraph-delimiting mechanism - does the wrong thing), use fill-region-as-paragraph. - -* Tab in text mode now runs the function tab-to-tab-stop. - A new mode called indented-text-mode is like text-mode - except that in it Tab runs the function indent-relative, - which indents the line under the previous line. - If auto fill is enabled while in indented-text-mode, - the new lines that it makes are indented. - -* Functions kill-rectangle and yank-rectangle. - kill-rectangle deletes the rectangle specified by dot and mark - (or by two arguments) and saves it in the variable killed-rectangle. - yank-rectangle inserts the rectangle in that variable. - - Tab characters in a rectangle being saved are replaced - by spaces in such a way that their appearance will - not be changed if the rectangle is later reinserted - at a different column position. - -* `+' in a regular expression now means - to repeat the previous expression one or more times. - `?' means to repeat it zero or one time. - They are in all regards like `*' except for the - number of repetitions they match. - - \< in a regular expression now matches the null string - when it is at the beginning of a word; \> matches - the null string at the end of a word. - -* C-x p narrows the buffer so that only the current page - is visible. - -* C-x ) with argument repeats the kbd macro just - defined that many times, counting the definition - as one repetition. - -* C-x ( with argument begins defining a kbd macro - starting with the last one defined. It executes that - previous kbd macro initially, just as if you began - by typing it over again. - -* C-x q command queries the user during kbd macro execution. - With prefix argument, enters recursive edit, - reading keyboard commands even within a kbd macro. - You can give different commands each time the macro executes. - Without prefix argument, reads a character. Your options are: - Space -- execute the rest of the macro. - Delete -- skip the rest of the macro; start next repetition. - C-d -- skip rest of the macro and don't repeat it any more. - C-r -- enter a recursive edit, then on exit ask again for a character - C-l -- redisplay screen and ask again." - -* write-kbd-macro and append-kbd-macro are used to save - a kbd macro definition in a file (as Lisp code to - redefine the macro when the file is loaded). - These commands differ in that write-kbd-macro - discards the previous contents of the file. - If given a prefix argument, both commands - record the keys which invoke the macro as well as the - macro's definition. - -* The variable global-minor-modes is used to display - strings in the mode line of all buffers. It should be - a list of elements thaht are conses whose cdrs are strings - to be displayed. This complements the variable - minor-modes, which has the same effect but has a separate - value in each buffer. - -* C-x = describes horizontal scrolling in effect, if any. - -* Return now auto-fills the line it is ending, in auto fill mode. - Space with zero as argument auto-fills the line before it - just like Space without an argument. - -Changes in Emacs 1.8 - -This release mostly fixes bugs. There are a few new features: - -* apropos now sorts the symbols before displaying them. - Also, it returns a list of the symbols found. - - apropos now accepts a second arg PRED which should be a function - of one argument; if PRED is non-nil, each symbol is tested - with PRED and only symbols for which PRED returns non-nil - appear in the output or the returned list. - - If the third argument to apropos is non-nil, apropos does not - display anything; it merely returns the list of symbols found. - - C-h a now runs the new function command-apropos rather than - apropos, and shows only symbols with definitions as commands. - -* M-x shell sends the command - if (-f ~/.emacs_NAME)source ~/.emacs_NAME - invisibly to the shell when it starts. Here NAME - is replaced by the name of shell used, - as it came from your ESHELL or SHELL environment variable - but with directory name, if any, removed. - -* M-, now runs the command tags-loop-continue, which is used - to resume a terminated tags-search or tags-query-replace. - -Changes in Emacs 1.7 - -It's Beat CCA Week. - -* The initial buffer is now called "*scratch*" instead of "scratch", - so that all buffer names used automatically by Emacs now have *'s. - -* Undo information is now stored separately for each buffer. - The Undo command (C-x u) always applies to the current - buffer only. - - C-_ is now a synonym for C-x u. - - (buffer-flush-undo BUFFER) causes undo information not to - be kept for BUFFER, and frees the space that would have - been used to hold it. In any case, no undo information is - kept for buffers whose names start with spaces. (These - buffers also do not appear in the C-x C-b display.) - -* Rectangle operations are now implemented. - C-x r stores the rectangle described by dot and mark - into a register; it reads the register name from the keyboard. - C-x g, the command to insert the contents of a register, - can be used to reinsert the rectangle elsewhere. - - Other rectangle commands include - open-rectangle: - insert a blank rectangle in the position and size - described by dot and mark, at its corners; - the existing text is pushed to the right. - clear-rectangle: - replace the rectangle described by dot ane mark - with blanks. The previous text is deleted. - delete-rectangle: - delete the text of the specified rectangle, - moving the text beyond it on each line leftward. - -* Side-by-side windows are allowed. Use C-x 5 to split the - current window into two windows side by side. - C-x } makes the selected window ARG columns wider at the - expense of the windows at its sides. C-x { makes the selected - window ARG columns narrower. An argument to C-x 5 specifies - how many columns to give to the leftmost of the two windows made. - - C-x 2 now accepts a numeric argument to specify the number of - lines to give to the uppermost of the two windows it makes. - -* Horizontal scrolling of the lines in a window is now implemented. - C-x < (scroll-left) scrolls all displayed lines left, - with the numeric argument (default 1) saying how far to scroll. - When the window is scrolled left, some amount of the beginning - of each nonempty line is replaced by an "$". - C-x > scrolls right. If a window has no text hidden at the left - margin, it cannot be scrolled any farther right than that. - When nonzero leftwards scrolling is in effect in a window. - lines are automatically truncated at the window's right margin - regardless of the value of the variable truncate-lines in the - buffer being displayed. - -* C-x C-d now uses the default output format of `ls', - which gives just file names in multiple columns. - C-u C-x C-d passes the -l switch to `ls'. - -* C-t at the end of a line now exchanges the two preceding characters. - - All the transpose commands now interpret zero as an argument - to mean to transpose the textual unit after or around dot - with the one after or around the mark. - -* M-! executes a shell command in an inferior shell - and displays the output from it. With a prefix argument, - it inserts the output in the current buffer after dot - and sets the mark after the output. The shell command - gets /dev/null as its standard input. - - M-| is like M-! but passes the contents of the region - as input to the shell command. A prefix argument makes - the output from the command replace the contents of the region. - -* The mode line will now say "Def" after the major mode - while a keyboard macro is being defined. - -* The variable fill-prefix is now used by Meta-q. - Meta-q removes the fill prefix from lines that start with it - before filling, and inserts the fill prefix on each line - after filling. - - The command C-x . sets the fill prefix equal to the text - on the current line before dot. - -* The new command Meta-j (indent-new-comment-line), - is like Linefeed (indent-new-line) except when dot is inside a comment; - in that case, Meta-j inserts a comment starter on the new line, - indented under the comment starter above. It also inserts - a comment terminator at the end of the line above, - if the language being edited calls for one. - -* Rmail should work correctly now, and has some C-h m documentation. - -Changes in Emacs 1.6 - -* save-buffers-kill-emacs is now on C-x C-c - while C-x C-z does suspend-emacs. This is to make - C-x C-c like the normal Unix meaning of C-c - and C-x C-z linke the normal Unix meaning of C-z. - -* M-ESC (eval-expression) is now a disabled command by default. - This prevents users who type ESC ESC accidentally from - getting confusing results. Put - (put 'eval-expression 'disabled nil) - in your ~/.emacs file to enable the command. - -* Self-inserting text is grouped into bunches for undoing. - Each C-x u command undoes up to 20 consecutive self-inserting - characters. - -* Help f now uses as a default the function being called - in the innermost Lisp expression that dot is in. - This makes it more convenient to use while writing - Lisp code to run in Emacs. - (If the text around dot does not appear to be a call - to a Lisp function, there is no default.) - - Likewise, Help v uses the symbol around or before dot - as a default, if that is a variable name. - -* Commands that read filenames now insert the default - directory in the minibuffer, to become part of your input. - This allows you to see what the default is. - You may type a filename which goes at the end of the - default directory, or you may edit the default directory - as you like to create the input you want to give. - You may also type an absolute pathname (starting with /) - or refer to a home directory (input starting with ~) - after the default; the presence of // or /~ causes - everything up through the slash that precedes your - type-in to be ignored. - - Returning the default directory without change, - including the terminating slash, requests the use - of the default file name (usually the visited file's name). - - Set the variable insert-default-directory to nil - to turn off this feature. - -* M-x shell now uses the environment variable ESHELL, - if it exists, as the file name of the shell to run. - If there is no ESHELL variable, the SHELL variable is used. - This is because some shells do not work properly as inferiors - of Emacs (or anything like Emacs). - -* A new variable minor-modes now exists, with a separate value - in each buffer. Its value should be an alist of elements - (MODE-FUNCTION-SYMBOL . PRETTY-NAME-STRING), one for each - minor mode that is turned on in the buffer. The pretty - name strings are displayed in the mode line after the name of the - major mode (with spaces between them). The mode function - symbols should be symbols whose function definitions will - turn on the minor mode if given 1 as an argument; they are present - so that Help m can find their documentation strings. - -* The format of tag table files has been changed. - The new format enables Emacs to find tags much faster. - - A new program, etags, exists to make the kind of - tag table that Emacs wants. etags is invoked just - like ctags; in fact, if you give it any switches, - it does exactly what ctags would do. Give it the - empty switch ("-") to make it act like ctags with no switches. - - etags names the tag table file "TAGS" rather than "tags", - so that these tag tables and the standard Unix ones - can coexist. - - The tags library can no longer use standard ctags-style - tag tables files. - -* The file of Lisp code Emacs reads on startup is now - called ~/.emacs rather than ~/.emacs_pro. - -* copy-file now gives the copied file the same mode bits - as the original file. - -* Output from a process inserted into the process's buffer - no longer sets the buffer's mark. Instead it sets a - marker associated with the process to point to the end - of the inserted text. You can access this marker with - (process-mark PROCESS) - and then either examine its position with marker-position - or set its position with set-marker. - -* completing-read takes a new optional fifth argument which, - if non-nil, should be a string of text to insert into - the minibuffer before reading user commands. - -* The Lisp function elt now exists: - (elt ARRAY N) is like (aref ARRAY N), - (elt LIST N) is like (nth N LIST). - -* rplaca is now a synonym for setcar, and rplacd for setcdr. - eql is now a synonym for eq; it turns out that the Common Lisp - distinction between eq and eql is insignificant in Emacs. - numberp is a new synonym for integerp. - -* auto-save has been renamed to auto-save-mode. - -* Auto save file names for buffers are now created by the - function make-auto-save-file-name. This is so you can - redefine that function to change the way auto save file names - are chosen. - -* expand-file-name no longer discards a final slash. - (expand-file-name "foo" "/lose") => "/lose/foo" - (expand-file-name "foo/" "/lose") => "/lose/foo/" - - Also, expand-file-name no longer substitutes $ constructs. - A new function substitute-in-file-name does this. Reading - a file name with read-file-name or the `f' or`F' option - of interactive calling uses substitute-in-file-name - on the file name that was read and returns the result. - - All I/O primitives including insert-file-contents and - delete-file call expand-file-name on the file name supplied. - This change makes them considerably faster in the usual case. - -* Interactive calling spec strings allow the new code letter 'D' - which means to read a directory name. It is like 'f' except - that the default if the user makes no change in the minibuffer - is to return the current default directory rather than the - current visited file name. - -Changes in Emacs 1.5 - -* suspend-emacs now accepts an optional argument - which is a string to be stuffed as terminal input - to be read by Emacs's superior shell after Emacs exits. - - A library called ledit exists which uses this feature - to transmit text to a Lisp job running as a sibling of - Emacs. - -* If find-file is given the name of a directory, - it automatically invokes dired on that directory - rather than reading in the binary data that make up - the actual contents of the directory according to Unix. - -* Saving an Emacs buffer now preserves the file modes - of any previously existing file with the same name. - This works using new Lisp functions file-modes and - set-file-modes, which can be used to read or set the mode - bits of any file. - -* The Lisp function cond now exists, with its traditional meaning. - -* defvar and defconst now permit the documentation string - to be omitted. defvar also permits the initial value - to be omitted; then it acts only as a comment. - -Changes in Emacs 1.4 - -* Auto-filling now normally indents the new line it creates - by calling indent-according-to-mode. This function, meanwhile, - has in Fundamental and Text modes the effect of making the line - have an indentation of the value of left-margin, a per-buffer variable. - - Tab no longer precisely does indent-according-to-mode; - it does that in all modes that supply their own indentation routine, - but in Fundamental, Text and allied modes it inserts a tab character. - -* The command M-x grep now invokes grep (on arguments - supplied by the user) and reads the output from grep - asynchronously into a buffer. The command C-x ` can - be used to move to the lines that grep has found. - This is an adaptation of the mechanism used for - running compilations and finding the loci of error messages. - - You can now use C-x ` even while grep or compilation - is proceeding; as more matches or error messages arrive, - C-x ` will parse them and be able to find them. - -* M-x mail now provides a command to send the message - and "exit"--that is, return to the previously selected - buffer. It is C-z C-z. - -* Tab in C mode now tries harder to adapt to all indentation styles. - If the line being indented is a statement that is not the first - one in the containing compound-statement, it is aligned under - the beginning of the first statement. - -* The functions screen-width and screen-height return the - total width and height of the screen as it is now being used. - set-screen-width and set-screen-height tell Emacs how big - to assume the screen is; they each take one argument, - an integer. - -* The Lisp function 'function' now exists. function is the - same as quote, except that it serves as a signal to the - Lisp compiler that the argument should be compiled as - a function. Example: - (mapcar (function (lambda (x) (+ x 5))) list) - -* The function set-key has been renamed to global-set-key. - undefine-key and local-undefine-key has been renamed to - global-unset-key and local-unset-key. - -* Emacs now collects input from asynchronous subprocesses - while waiting in the functions sleep-for and sit-for. - -* Shell mode's Newline command attempts to distinguish subshell - prompts from user input when issued in the middle of the buffer. - It no longer reexecutes from dot to the end of the line; - it reeexecutes the entire line minus any prompt. - The prompt is recognized by searching for the value of - shell-prompt-pattern, starting from the beginning of the line. - Anything thus skipped is not reexecuted. - -Changes in Emacs 1.3 - -* An undo facility exists now. Type C-x u to undo a batch of - changes (usually one command's changes, but some commands - such as query-replace divide their changes into multiple - batches. You can repeat C-x u to undo further. As long - as no commands other than C-x u intervene, each one undoes - another batch. A numeric argument to C-x u acts as a repeat - count. - - If you keep on undoing, eventually you may be told that - you have used up all the recorded undo information. - Some actions, such as reading in files, discard all - undo information. - - The undo information is not currently stored separately - for each buffer, so it is mainly good if you do something - totally spastic. [This has since been fixed.] - -* A learn-by-doing tutorial introduction to Emacs now exists. - Type C-h t to enter it. - -* An Info documentation browser exists. Do M-x info to enter it. - It contains a tutorial introduction so that no more documentation - is needed here. As of now, the only documentation in it - is that of Info itself. - -* Help k and Help c are now different. Help c prints just the - name of the function which the specified key invokes. Help k - prints the documentation of the function as well. - -* A document of the differences between GNU Emacs and Twenex Emacs - now exists. It is called DIFF, in the same directory as this file. - -* C mode can now indent comments better, including multi-line ones. - Meta-Control-q now reindents comment lines within the expression - being aligned. - -* Insertion of a close-parenthesis now shows the matching open-parenthesis - even if it is off screen, by printing the text following it on its line - in the minibuffer. - -* A file can now contain a list of local variable values - to be in effect when the file is edited. See the file DIFF - in the same directory as this file for full details. - -* A function nth is defined. It means the same thing as in Common Lisp. - -* The function install-command has been renamed to set-key. - It now takes the key sequence as the first argument - and the definition for it as the second argument. - Likewise, local-install-command has been renamed to local-set-key. - -Changes in Emacs 1.2 - -* A Lisp single-stepping and debugging facility exists. - To cause the debugger to be entered when an error - occurs, set the variable debug-on-error non-nil. - - To cause the debugger to be entered whenever function foo - is called, do (debug-on-entry 'foo). To cancel this, - do (cancel-debug-on-entry 'foo). debug-on-entry does - not work for primitives (written in C), only functions - written in Lisp. Most standard Emacs commands are in Lisp. - - When the debugger is entered, the selected window shows - a buffer called " *Backtrace" which displays a series - of stack frames, most recently entered first. For each - frame, the function name called is shown, usually followed - by the argument values unless arguments are still being - calculated. At the beginning of the buffer is a description - of why the debugger was entered: function entry, function exit, - error, or simply that the user called the function `debug'. - - To exit the debugger and return to top level, type `q'. - - In the debugger, you can evaluate Lisp expressions by - typing `e'. This is equivalent to `M-ESC'. - - When the debugger is entered due to an error, that is - all you can do. When it is entered due to function entry - (such as, requested by debug-on-entry), you have two - options: - Continue execution and reenter debugger after the - completion of the function being entered. Type `c'. - Continue execution but enter the debugger before - the next subexpression. Type `d'. - - You will see that some stack frames are marked with *. - This means the debugger will be entered when those - frames exit. You will see the value being returned - in the first line of the backtrace buffer. Your options: - Continue execution, and return that value. Type `c'. - Continue execution, and return a specified value. Type `r'. - - You can mark a frame to enter the debugger on exit - with the `b' command, or clear such a mark with `u'. - -* Lisp macros now exist. - For example, you can write - (defmacro cadr (arg) (list 'car (list 'cdr arg))) - and then the expression - (cadr foo) - will expand into - (car (cdr foo)) - -Changes in Emacs 1.1 - -* The initial buffer is now called "scratch" and is in a - new major mode, Lisp Interaction mode. This mode is - intended for typing Lisp expressions, evaluating them, - and having the values printed into the buffer. - - Type Linefeed after a Lisp expression, to evaluate the - expression and have its value printed into the buffer, - advancing dot. - - The other commands of Lisp mode are available. - -* The C-x C-e command for evaluating the Lisp expression - before dot has been changed to print the value in the - minibuffer line rather than insert it in the buffer. - A numeric argument causes the printed value to appear - in the buffer instead. - -* In Lisp mode, the command M-C-x evaluates the defun - containing or following dot. The value is printed in - the minibuffer. - -* The value of a Lisp expression evaluated using M-ESC - is now printed in the minibuffer. - -* M-q now runs fill-paragraph, independent of major mode. - -* C-h m now prints documentation on the current buffer's - major mode. What it prints is the documentation of the - major mode name as a function. All major modes have been - equipped with documentation that describes all commands - peculiar to the major mode, for this purpose. - -* You can display a Unix manual entry with - the M-x manual-entry command. - -* You can run a shell, displaying its output in a buffer, - with the M-x shell command. The Return key sends input - to the subshell. Output is printed inserted automatically - in the buffer. Commands C-c, C-d, C-u, C-w and C-z are redefined - for controlling the subshell and its subjobs. - "cd", "pushd" and "popd" commands are recognized as you - enter them, so that the default directory of the Emacs buffer - always remains the same as that of the subshell. - -* C-x $ (that's a real dollar sign) controls line-hiding based - on indentation. With a numeric arg N > 0, it causes all lines - indented by N or more columns to become invisible. - They are, effectively, tacked onto the preceding line, where - they are represented by " ..." on the screen. - (The end of the preceding visible line corresponds to a - screen cursor position before the "...". Anywhere in the - invisible lines that follow appears on the screen as a cursor - position after the "...".) - Currently, all editing commands treat invisible lines just - like visible ones, except for C-n and C-p, which have special - code to count visible lines only. - C-x $ with no argument turns off this mode, which in any case - is remembered separately for each buffer. - -* Outline mode is another form of selective display. - It is a major mode invoked with M-x outline-mode. - It is intended for editing files that are structured as - outlines, with heading lines (lines that begin with one - or more asterisks) and text lines (all other lines). - The number of asterisks in a heading line are its level; - the subheadings of a heading line are all following heading - lines at higher levels, until but not including the next - heading line at the same or a lower level, regardless - of intervening text lines. - - In outline mode, you have commands to hide (remove from display) - or show the text or subheadings under each heading line - independently. Hidden text or subheadings are invisibly - attached to the end of the preceding heading line, so that - if you kill the hading line and yank it back elsewhere - all the invisible lines accompany it. - - All editing commands treat hidden outline-mode lines - as part of the preceding visible line. - -* C-x C-z runs save-buffers-kill-emacs - offers to save each file buffer, then exits. - -* C-c's function is now called suspend-emacs. - -* The command C-x m runs mail, which switches to a buffer *mail* - and lets you compose a message to send. C-x 4 m runs mail in - another window. Type C-z C-s in the mail buffer to send the - message according to what you have entered in the buffer. - - You must separate the headers from the message text with - an empty line. - -* You can now dired partial directories (specified with names - containing *'s, etc, all processed by the shell). Also, you - can dired more than one directory; dired names the buffer - according to the filespec or directory name. Reinvoking - dired on a directory already direded just switches back to - the same directory used last time; do M-x revert if you want - to read in the current contents of the directory. - - C-x d runs dired, and C-x 4 d runs dired in another window. - - C-x C-d (list-directory) also allows partial directories now. - -Lisp programming changes - -* t as an output stream now means "print to the minibuffer". - If there is already text in the minibuffer printed via t - as an output stream, the new text is appended to the old - (or is truncated and lost at the margin). If the minibuffer - contains text put there for some other reason, it is cleared - first. - - t is now the top-level value of standard-output. - - t as an input stream now means "read via the minibuffer". - The minibuffer is used to read a line of input, with editing, - and this line is then parsed. Any excess not used by `read' - is ignored; each `read' from t reads fresh input. - t is now the top-level value of standard-input. - -* A marker may be used as an input stream or an output stream. - The effect is to grab input from where the marker points, - advancing it over the characters read, or to insert output - at the marker and advance it. - -* Output from an asynchronous subprocess is now inserted at - the end of the associated buffer, not at the buffer's dot, - and the buffer's mark is set to the end of the inserted output - each time output is inserted. - -* (pos-visible-in-window-p POS WINDOW) - returns t if position POS in WINDOW's buffer is in the range - that is being displayed in WINDOW; nil if it is scrolled - vertically out of visibility. - - If display in WINDOW is not currently up to date, this function - calculates carefully whether POS would appear if display were - done immediately based on the current (window-start WINDOW). - - POS defaults to (dot), and WINDOW to (selected-window). - -* Variable buffer-alist replaced by function (buffer-list). - The actual alist of buffers used internally by Emacs is now - no longer accessible, to prevent the user from crashing Emacs - by modifying it. The function buffer-list returns a list - of all existing buffers. Modifying this list cannot hurt anything - as a new list is constructed by each call to buffer-list. - -* load now takes an optional third argument NOMSG which, if non-nil, - prevents load from printing a message when it starts and when - it is done. - -* byte-recompile-directory is a new function which finds all - the .elc files in a directory, and regenerates each one which - is older than the corresponding .el (Lisp source) file. - ----------------------------------------------------------------------- -Copyright information: - -Copyright (C) 1985 Richard M. Stallman - - Permission is granted to anyone to make or distribute verbatim copies - of this document as received, in any medium, provided that the - copyright notice and this permission notice are preserved, - thus giving the recipient permission to redistribute in turn. - - Permission is granted to distribute modified versions - of this document, or of portions of it, - under the above conditions, provided also that they - carry prominent notices stating who last changed them. - -Local variables: -mode: text -end: - -arch-tag: c006f958-d769-44c7-a9f4-e2faf070624d diff --git a/etc/ONEWS.4 b/etc/ONEWS.4 deleted file mode 100644 index f3da0d6e62b..00000000000 --- a/etc/ONEWS.4 +++ /dev/null @@ -1,1693 +0,0 @@ -GNU Emacs NEWS -- history of user-visible changes. 1992. -Copyright (C) 1992 Free Software Foundation, Inc. -See the end for copying conditions. - -For older news, see the file ONEWS.3. - -Changes in version 18.58. - -* RMAIL reply now properly parses nested comments in addesses. - -* The "visual bell" feature when used with X windows -now flashes only 1/4 of the window's total area. This is because -flashing the whole window is too slow on some systems. - -* `call-process' and `call-process-region' now return an indication -of the exit status of the subprocess: either a numeric exit code -or a string describing the signal which caused termination. - -* It is possible for regular expression matching to overflow the stack -of failure points. In the past, such overflow was treated as simple -failure to match. Now it causes an error. - -* You can use C-u to end a numeric argument. Thus, type C-u 1 0 0 C-u 1 -to insert 100 1's. - -* Emacs now knows how to get resource values from the X server. - -* Job control commands in shell mode work properly on more systems -because they now work by "typing" signal characters such as C-c. - -* copy-keymap no longer recursively copies keymaps reached through -symbols' function definitions (i.e., those that have names). It does -copy nested keymaps that appear directly in the other copied keymaps. - -Changes in version 18.56. - -* C-g should now work to interrupt a running program -on all kinds of systems even when using X windows. - -* Quitting is inhibited while a filter or sentinel is running. -Those functions can run asynchronously while Emacs is waiting -for keyboard input, and if they allow quitting, they -make the behavior of C-g unpredictable. - -* Storing text into the X windows cut buffer -now clears out any selection. - -* The undo facility is completely rewritten, and now -uses Lisp data structures. It can record much more -information. You can use the variables undo-threshold -and undo-high-threshold to control how much. - -* There is no longer a maximum screen height or width. - -Changes in version 18.52. - -* X windows version 10 is supported under system V. - -* Pop-up menus are now supported with the same Lisp interface in -both version 10 and 11 of X windows. - -* C-x 4 a is a new command to edit a change-log entry in another window. - -* The emacs client program now allows an option +NNN to specify the -line number to go to in the file whose name follows. Thus, - emacsclient foo.c +45 bar.c -will find the files `foo.c' and `bar.c', going to line 45 in `bar.c'. - -* Dired allows empty directories to be deleted like files. - -* When the terminal type is used to find a terminal-specific file to -run, Emacs now tries the entire terminal type first. If that doesn't -yield a file that exists, the last hyphen and what follows it is -stripped. If that doesn't yield a file that exists, the previous -hyphen is stripped, and so on until all hyphens are gone. For -example, if the terminal type is `aaa-48-foo', Emacs will try first -`term/aaa-48-foo.el', then `term/aaa-48.el' and finally `term/aaa.el'. - -Underscores now receive the same treatment as hyphens. - -* Texinfo features: @defun, etc. texinfo-show-structure. -New template commands. texinfo-format-region. - -* The special "local variable" `eval' is now ignored if you are running -as root. - -* New command `c-macro-expand' shows the result of C macro expansion -in the region. It works using the C preprocessor, so its results -are completely accurate. - -* Errors in trying to auto save now flash error messages for a few seconds. - -* Killing a buffer now sends SIGHUP to the buffer's process. - -* New hooks. - -** `spell-region' now allows you to filter the text before spelling-checking. -If the value of `spell-filter' is non-nil, it is called, with no arguments, -looking at a temporary buffer containing a copy of the text to be checked. -It can alter the text freely before the spell program sees it. - -** The variable `lpr-command' now specifies the command to be used when -you use the commands to print text (such as M-x print-buffer). - -** Posting netnews now calls the value of `news-inews-hook' (if not nil) -as a function of no arguments before the actual posting. - -** Rmail now calls the value of `rmail-show-message-hook' (if not nil) -as a function of no arguments, each time a new message is selected. - -** `kill-emacs' calls the value of `kill-emacs-hook' as a function of no args -unless Emacs is running in batch mode. - -* New libraries. -See the source code of each library for more information. - -** icon.el: a major mode for editing programs written in Icon. - -** life.el: a simulator for the cellular automaton "life". Load the -library and run M-x life. - -** doctex.el: a library for converting the Emacs `etc/DOC' file of -documentation strings into TeX input. - -** saveconf.el: a library which records the arrangement of windows and -buffers when you exit Emacs, and automatically recreates the same -setup the next time you start Emacs. - -** uncompress.el: a library that automatically uncompresses files -when you visit them. - -** c-fill.el: a mode for editing filled comments in C. - -** kermit.el: an extended version of shell-mode designed for running kermit. - -** spook.el: a library for adding some "distract the NSA" keywords to every -message you send. - -** hideif.el: a library for hiding parts of a C program based on preprocessor -conditionals. - -** autoinsert.el: a library to put in some initial text when you visit -a nonexistent file. The text used depends on the major mode, and -comes from a directory of files created by you. - -* New programming features. - -** The variable `window-system-version' now contains the version number -of the window system you are using (if appropriate). When using X windows, -its value is either 10 or 11. - -** (interactive "N") uses the prefix argument if any; otherwise, it reads -a number using the minibuffer. - -** VMS: there are two new functions `vms-system-info' and `shrink-to-icon'. -The former allows you to get many kinds of system status information. -See its self-documentation for full details. -The second is used with the window system: it iconifies the Emacs window. - -** VMS: the new function `define-logical-name' allows you to create -job-wide logical names. The old function `define-dcl-symbol' has been -removed. - -Changes in version 18.50. - -* X windows version 11 is supported. - -Define X11 in config.h if you want X version 11 instead of version 10. - -* The command M-x gdb runs the GDB debugger as an inferior. -It asks for the filename of the executable you want to debug. - -GDB runs as an inferior with I/O through an Emacs buffer. All the -facilities of Shell mode are available. In addition, each time your -program stops, and each time you select a new stack frame, the source -code is displayed in another window with an arrow added to the line -where the program is executing. - -Special GDB-mode commands include M-s, M-n, M-i, M-u, M-d, and C-c C-f -which send the GDB commands `step', `next', `stepi', `up', `down' -and `finish'. - -In any source file, the commands C-x SPC tells GDB to set a breakpoint -on the current line. - -* M-x calendar displays a three-month calendar. - -* C-u 0 C-x C-s never makes a backup file. - -This is a way you can explicitly request not to make a backup. - -* `term-setup-hook' is for users only. - -Emacs never uses this variable for internal purposes, so you can freely -set it in your `.emacs' file to make Emacs do something special after -loading any terminal-specific setup file from `lisp/term'. - -* `copy-keymap' now copies recursive submaps. - -* New overlay-arrow feature. - -If you set the variable `overlay-arrow-string' to a string -and `overlay-arrow-position' to a marker, that string is displayed on -the screen at the position of that marker, hiding whatever text would -have appeared there. If that position isn't on the screen, or if -the buffer the marker points into isn't displayed, there is no effect. - -* -batch mode can read from the terminal. - -It now works to use `read-char' to do terminal input in a noninteractive -Emacs run. End of file causes Emacs to exit. - -* Variables `data-bytes-used' and `data-bytes-free' removed. - -These variables cannot really work because the 24-bit range of an -integer in (most ports of) GNU Emacs is not large enough to hold their -values on many systems. - -Changes in version 18.45, since version 18.41. - -* C indentation parameter `c-continued-brace-offset'. - -This parameter's value is added to the indentation of any -line that is in a continuation context and starts with an open-brace. -For example, it applies to the open brace shown here: - - if (x) - { - -The default value is zero. - -* Dabbrev expansion (Meta-/) preserves case. - -When you use Meta-/ to search the buffer for an expansion of an -abbreviation, if the expansion found is all lower case except perhaps -for its first letter, then the case pattern of the abbreviation -is carried over to the expansion that replaces it. - -* TeX-mode syntax. - -\ is no longer given "escape character" syntax in TeX mode. It now -has the syntax of an ordinary punctuation character. As a result, -\[...\] and such like are considered to balance each other. - -* Mail-mode automatic Reply-to field. - -If the variable `mail-default-reply-to' is non-`nil', then each time -you start to compose a message, a Reply-to field is inserted with -its contents taken from the value of `mail-default-reply-to'. - -* Where is your .emacs file? - -If you run Emacs under `su', so your real and effective uids are -different, Emacs uses the home directory associated with the real uid -(the name you actually logged in under) to find the .emacs file. - -Otherwise, Emacs uses the environment variable HOME to find the .emacs -file. - -The .emacs file is not loaded at all if -batch is specified. - -* Prolog mode is the default for ".pl" files. - -* File names are not case-sensitive on VMS. - -On VMS systems, all file names that you specify are converted to upper -case. You can use either upper or lower case indiscriminately. - -* VMS-only function 'define-dcl-symbol'. - -This is a new name for the function formerly called -`define-logical-name'. - -Editing Changes in Emacs 18 - -* Additional systems and machines are supported. - -GNU Emacs now runs on Vax VMS. However, many facilities that are normally -implemented by running subprocesses do not work yet. This includes listing -a directory and sending mail. There are features for running subprocesses -but they are incompatible with those on Unix. I hope that some of -the VMS users can reimplement these features for VMS (compatibly for -the user, if possible). - -VMS wizards are also asked to work on making the subprocess facilities -more upward compatible with those on Unix, and also to rewrite their -internals to use the same Lisp objects that are used on Unix to -represent processes. - -In addition, the TI Nu machine running Unix system V, the AT&T 3b, and -the Wicat, Masscomp, Integrated Solutions, Alliant, Amdahl uts, Mips, -Altos 3068 and Gould Unix systems are now supported. The IBM PC-RT is -supported under 4.2, but not yet under system V. The GEC 93 is close -to working. The port for the Elxsi is partly merged. See the file -MACHINES for full status information and machine-specific installation -advice. - -* Searching is faster. - -Forward search for a text string, or for a regexp that is equivalent -to a text string, is now several times faster. Motion by lines and -counting lines is also faster. - -* Memory usage improvements. - -It is no longer possible to run out of memory during garbage -collection. As a result, running out of memory is never fatal. This -is due to a new garbage collection algorithm which compactifies -strings in place rather than copying them. Another consequence of the -change is a reduction in total memory usage and a slight increase in -garbage collection speed. - -* Display changes. - -** Editing above top of screen. - -When you delete or kill or alter text that reaches to the top of the -screen or above it, so that display would start in the middle of a -line, Emacs will usually attempt to scroll the text so that display -starts at the beginning of a line again. - -** Yanking in the minibuffer. - -The message "Mark Set" is no longer printed when the minibuffer is -active. This is convenient with many commands, including C-y, that -normally print such a message. - -** Cursor appears in last line during y-or-n questions. - -Questions that want a `y' or `n' answer now move the cursor -to the last line, following the question. - -* Library loading changes. - -`load' now considers all possible suffixes (`.elc', `.el' and none) -for each directory in `load-path' before going on to the next directory. -It now accepts an optional fourth argument which, if non-nil, says to -use no suffixes; then the file name must be given in full. The search -of the directories in `load-path' goes on as usual in this case, but -it too can be prevented by passing an absolute file name. - -The value of `load-path' no longer by default includes nil (meaning to -look in the current default directory). The idea is that `load' should -be used to search the path only for libraries to be found in the standard -places. If you want to override system libraries with your own, place -your own libraries in one special directory and add that directory to the -front of `load-path'. - -The function `load' is no longer a command; that is to say, `M-x load' -is no longer allowed. Instead, there are two commands for loading files. -`M-x load-library' is equivalent to the old meaning of `M-x load'. -`M-x load-file' reads a file name with completion and defaulting -and then loads exactly that file, with no searching and no suffixes. - -* Emulation of other editors. - -** `edt-emulation-on' starts emulating DEC's EDT editor. - -Do `edt-emulation-off' to return Emacs to normal. - -** `vi-mode' and `vip-mode' starts emulating vi. - -These are two different vi emulations provided by GNU Emacs users. -We are interested in feedback as to which emulation is preferable. - -See the documentation and source code for these functions -for more information. - -** `set-gosmacs-bindings' emulates Gosling Emacs. - -This command changes many global bindings to resemble those of -Gosling Emacs. The previous bindings are saved and can be restored using -`set-gnu-bindings'. - -* Emulation of a display terminal. - -Within Emacs it is now possible to run programs (such as emacs or -supdup) which expect to do output to a visual display terminal. - -See the function `terminal-emulator' for more information. - -* New support for keypads and function keys. - -There is now a first attempt at terminal-independent support for -keypad and function keys. - -Emacs now defines a standard set of key-names for function and keypad -keys, and provides standard hooks for defining them. Most of the -standard key-names have default definitions built into Emacs; you can -override these in a terminal-independent manner. The default definitions -and the conventions for redefining them are in the file `lisp/keypad.el'. - -These keys on the terminal normally work by sending sequences of -characters starting with ESC. The exact sequences used vary from -terminal to terminal. Emacs interprets them in two stages: -in the first stage, terminal-dependent sequences are mapped into -the standard key-names; then second stage maps the standard key-names -into their definitions in a terminal-independent fashion. - -The terminal-specific file `term/$TERM.el' now is responsible only for -establishing the mapping from the terminal's escape sequences into -standard key-names. It no longer knows what Emacs commands are -assigned to the standard key-names. - -One other change in terminal-specific files: if the value of the TERM -variable contains a hyphen, only the part before the first hyphen is -used in forming the name of the terminal-specific file. Thus, for -terminal type `aaa-48', the file loaded is now `term/aaa.el' rather -than `term/aaa-48.el'. - -* New startup command line options. - -`-i FILE' or `-insert FILE' in the command line to Emacs tells Emacs to -insert the contents of FILE into the current buffer at that point in -command line processing. This is like using the command M-x insert-file. - -`-funcall', `-load', `-user' and `-no-init-file' are new synonyms for -`-f', `-l', `-u' and `-q'. - -`-nw' means don't use a window system. If you are using a terminal -emulator on the X window system and you want to run Emacs to work through -the terminal emulator instead of working directly with the window system, -use this switch. - -* Buffer-sorting commands. - -Various M-x commands whose names start with `sort-' sort parts of -the region: - -sort-lines divides the region into lines and sorts them alphabetically. -sort-pages divides into pages and sorts them alphabetically. -sort-paragraphs divides into paragraphs and sorts them alphabetically. -sort-fields divides into lines and sorts them alphabetically - according to one field in the line. - The numeric argument specifies which field (counting - from field 1 at the beginning of the line). Fields in a line - are separated by whitespace. -sort-numeric-fields - is similar but converts the specified fields to numbers - and sorts them numerically. -sort-columns divides into lines and sorts them according to the contents - of a specified range of columns. - -Refer to the self-documentation of these commands for full usage information. - -* Changes in various commands. - -** `occur' output now serves as a menu. `occur-menu' command deleted. - -`M-x occur' now allows you to move quickly to any of the occurrences -listed. Select the `*Occur*' buffer that contains the output of `occur', -move point to the occurrence you want, and type C-c C-c. -This will move point to the same occurrence in the buffer that the -occurrences were found in. - -The command `occur-menu' is thus obsolete, and has been deleted. - -One way to get a list of matching lines without line numbers is to -copy the text to another buffer and use the command `keep-lines'. - -** Incremental search changes. - -Ordinary and regexp incremental searches now have distinct default -search strings. Thus, regexp searches recall only previous regexp -searches. - -If you exit an incremental search when the search string is empty, -the old default search string is kept. The default does not become -empty. - -Reversing the direction of an incremental search with C-s or C-r -when the search string is empty now does not get the default search -string. It leaves the search string empty. A second C-s or C-r -will get the default search string. As a result, you can do a reverse -incremental regexp search with C-M-s C-r. - -If you add a `*', `?' or `\|' to an incremental search regexp, -point will back up if that is appropriate. For example, if -you have searched for `ab' and add a `*', point moves to the -first match for `ab*', which may be before the match for `ab' -that was previously found. - -If an incremental search is failing and you ask to repeat it, -it will start again from the beginning of the buffer (or the end, -if it is a backward search). - -The search-controlling parameters `isearch-slow-speed' and -`isearch-slow-window-lines' have now been renamed to start with -`search' instead of `isearch'. Now all the parameters' names start -with `search'. - -If `search-slow-window-lines' is negative, the slow search window -is put at the top of the screen, and the absolute value or the -negative number specifies the height of it. - -** Undo changes - -The undo command now will mark the buffer as unmodified only when it is -identical to the contents of the visited file. - -** C-M-v in minibuffer. - -If while in the minibuffer you request help in a way that uses a -window to display something, then until you exit the minibuffer C-M-v -in the minibuffer window scrolls the window of help. - -For example, if you request a list of possible completions, C-M-v can -be used reliably to scroll the completion list. - -** M-TAB command. - -Meta-TAB performs completion on the Emacs Lisp symbol names. The sexp -in the buffer before point is compared against all existing nontrivial -Lisp symbols and completed as far as is uniquely determined by them. -Nontrivial symbols are those with either function definitions, values -or properties. - -If there are multiple possibilities for the very next character, a -list of possible completions is displayed. - -** Dynamic abbreviation package. - -The new command Meta-/ expands an abbreviation in the buffer before point -by searching the buffer for words that start with the abbreviation. - -** Changes in saving kbd macros. - -The commands `write-kbd-macro' and `append-kbd-macro' have been -deleted. The way to save a keyboard macro is to use the new command -`insert-kbd-macro', which inserts Lisp code to define the macro as -it is currently defined into the buffer before point. Visit a Lisp -file such as your Emacs init file `~/.emacs', insert the macro -definition (perhaps deleting an old definition for the same macro) -and then save the file. - -** C-x ' command. - -The new command C-x ' (expand-abbrev) expands the word before point as -an abbrev, even if abbrev-mode is not turned on. - -** Sending to inferior Lisp. - -The command C-M-x in Lisp mode, which sends the current defun to -an inferior Lisp process, now works by writing the text into a temporary -file and actually sending only a `load'-form to load the file. -As a result, it avoids the Unix bugs that used to strike when the -text was above a certain length. - -With a prefix argument, this command now makes the inferior Lisp buffer -appear on the screen and scrolls it so that the bottom is showing. - -Two variables `inferior-lisp-load-command' and `inferior-lisp-prompt', -exist to customize these feature for different Lisp implementations. - -** C-x n p now disabled. - -The command C-x n p, a nonrecomended command which narrows to the current -page, is now initially disabled like C-x n n. - -* Dealing with files. - -** C-x C-v generalized - -This command is now allowed even if the current buffer is not visiting -a file. As usual, it kills the current buffer and replaces it with a -newly found file. - -** M-x recover-file improved; auto save file names changed. - -M-x recover-file now checks whether the last auto-save file is more -recent than the real visited file before offering to read in the -auto-save file. If the auto-save file is newer, a directory listing -containing the two files is displayed while you are asked whether you -want the auto save file. - -Visiting a file also makes this check. If the auto-save file is more recent, -a message is printed suggesting that you consider using M-x recover file. - -Auto save file names now by default have a `#' at the end as well -as at the beginning. This is so that `*.c' in a shell command -will never match auto save files. - -On VMS, auto save file names are made by appending `_$' at the front -and `$' at the end. - -When you change the visited file name of a buffer, the auto save file -is now renamed to belong to the new visited file name. - -You can customize the way auto save file names are made by redefining -the two functions `make-auto-save-file-name' and `auto-save-file-name-p', -both of which are defined in `files.el'. - -** Modifying a buffer whose file is changed on disk is detected instantly. - -On systems where clash detection (locking of files being edited) is -implemented, Emacs also checks the first time you modify a buffer -whether the file has changed on disk since it was last visited or saved. -If it has, you are asked to confirm that you want to change the buffer. - -** Exiting Emacs offers to save `*mail*'. - -Emacs can now know about buffers that it should offer to save on exit -even though they are not visiting files. This is done for any buffer -which has a non-nil local value of `buffer-offer-save'. By default, -Mail mode provides such a local value. - -** Backup file changes. - -If a backup file cannot be written in the directory of the visited file -due to fascist file protection, a backup file is now written in your home -directory as `~/%backup%~'. Only one such file is made, ever, so only -the most recently made such backup is available. - -When backup files are made by copying, the last-modification time of the -original file is now preserved in the backup copy. - -** Visiting remote files. - -On an internet host, you can now visit and save files on any other -internet host directly from Emacs with the commands M-x ftp-find-file -and M-x ftp-write-file. Specify an argument of the form HOST:FILENAME. -Since standard internet FTP is used, the other host may be any kind -of machine and is not required to have any special facilities. - -The first time any one remote host is accessed, you will be asked to -give the user name and password for use on that host. FTP is reinvoked -each time you ask to use it, but previously specified user names and -passwords are remembered automatically. - -** Dired `g' command. - -`g' in Dired mode is equivalent to M-x revert-buffer; it causes the -current contents of the same directory to be read in. - -* Changes in major modes. - -** C mode indentation change. - -The binding of Linefeed is no longer changed by C mode. It once again -has its normal meaning, which is to insert a newline and then indent -afterward. - -The old definition did one additional thing: it reindented the line -before the new newline. This has been removed because it made the -command twice as slow. The only time it was really useful was after the -insertion of an `else', since the fact of starting with `else' may change -the way that line is indented. Now you will have to type TAB again -yourself to reindent the `else' properly. - -If the variable `c-tab-always-indent' is set to `nil', the TAB command -in C mode, with no argument, will just insert a tab character if there -is non-whitespace preceding point on the current line. Giving it a -prefix argument will force reindentation of the line (as well as -of the compound statement that begins after point, if any). - -** Fortran mode now exists. - -This mode provides commands for motion and indentation of Fortran code, -plus built-in abbrevs for Fortran keywords. For details, see the manual -or the on-line documentation of the command `fortran-mode'. - -** Scribe mode now exists. - -This mode does something useful for editing files of Scribe input. -It is used automatically for files with names ending in ".mss". - -** Modula2 and Prolog modes now exist. - -These modes are for editing programs in the languages of the same names. -They can be selected with M-x modula-2-mode and M-x prolog-mode. - -** Telnet mode changes. - -The telnet mode special commands have now been assigned to C-c keys. -Most of them are the same as in Shell mode. - -** Picture mode changes. - -The special picture-mode commands to specify the direction of cursor -motion after insertion have been moved to C-c keys. The commands to -specify diagonal motion were already C-c keys; they are unchanged. -The keys to specify horizontal or vertical motion are now -C-c < (left), C-c > (right), C-c ^ (up) and C-c . (down). - -** Nroff mode comments. - -Comments are now supported in Nroff mode. The standard comment commands -such as M-; and C-x ; know how to insert, align and delete comments -that start with backslash-doublequote. - -** LaTeX mode. - -LaTeX mode now exists. Use M-x latex-mode to select this mode, and -M-x plain-tex-mode to select the previously existing mode for Plain -TeX. M-x tex-mode attempts to examine the contents of the buffer and -choose between latex-mode and plain-tex-mode accordingly; if the -buffer is empty or it cannot tell, the variable `TeX-default-mode' -controls the choice. Its value should be the symbol for the mode to -be used. - -The facilities for running TeX on all or part of the buffer -work with LaTeX as well. - -Some new commands available in both modes: - -C-c C-l recenter the window showing the TeX output buffer - so most recent line of output can be seen. -C-c C-k kill the TeX subprocess. -C-c C-q show the printer queue. -C-c C-f close a block (appropriate for LaTeX only). - If the current line contains a \begin{...}, - this inserts an \end{...} on the following line - and puts point on a blank line between them. - -** Outline mode changes. - -Invisible lines in outline mode are now indicated by `...' at the -end of the previous visible line. - -The special outline heading motion commands are now all on C-c keys. -A few new ones have been added. Here is a full list: - -C-c C-n Move to next visible heading (formerly M-}) -C-c C-p Move to previous visible heading (formerly M-{) -C-c C-f Move to next visible heading at the same level. - Thus, if point is on a level-2 heading line, - this command moves to the next visible level-2 heading. -C-c C-b Move to previous visible heading at the same level. -C-c C-u Move up to previous visible heading at a higher level. - -The variable `outline-regexp' now controls recognition of heading lines. -Any line whose beginning matches this regexp is a heading line. -The depth in outline structure is determined by the length of -the string that matches. - -A line starting with a ^L (formfeed) is now by default considered -a header line. - -* Mail reading and sending. - -** MH-E changes. - -MH-E has been extensively modified and improved since the v17 release. -It contains many new features, including commands to: extracted failed -messages, kill a draft message, undo changes to a mail folder, monitor -delivery of a letter, print multiple messages, page digests backwards, -insert signatures, and burst digests. Also, many commands have been -made to able to deal with named sequences of messages, instead of -single messages. MH-E also has had numerous bugs fixed and commands -made to run faster. Furthermore, its keybindings have been changed to -be compatible with Rmail and the rest of GNU Emacs. - -** Mail mode changes. - -The C-c commands of mail mode have been rearranged: - -C-c s, C-c c, C-c t and C-c b (move point to various header fields) -have been reassigned as C-c C-f C-s, C-c C-f C-c, C-c C-f C-t and C-c -C-f C-b. C-c C-f is for "field". - -C-c y, C-c w and C-c q have been changed to C-c C-y, C-c C-w and C-c C-q. - -Thus, C-c LETTER is always unassigned. - -** Rmail C-r command changed to w. - -The Rmail command to edit the current message is now `w'. This change -has been made because people frequently type C-r while in Rmail hoping -to do a reverse incremental search. That now works. - -* Rnews changes. - -** Caesar rotation added. - -The function news-caesar-buffer-body performs the rot13 code on the -body of a news message. You can also specify the number to rotate by, -as a prefix argument. The function is bound to C-c C-r in both -News mode and News Reply mode. - -** rmail-output command added. - -The C-o command has been bound to rmail-output in news-mode. -This allows one to append an article to a file which is in either Unix -mail or RMAIL format. - -** news-reply-mode changes. - -The C-c commands of news reply mode have been rearranged and changed, -so that C-c LETTER is always unassigned: - -C-c y, C-c w and C-c q have been changed to C-c C-y, C-c C-w and C-c C-q. - -C-c c, C-c t, and C-c b (move to various mail header fields) have been -deleted (they make no sense for posting and replying to USENET). - -C-c s (move to Subject: header field) has been reassigned as C-c C-f -C-s. C-c C-f is for "field". Several additional move to news header -field commands have been added. - -The local news-reply-mode bindings now look like this: - -C-c C-s news-inews (post the message) C-c C-c news-inews -C-c C-f move to a header field (and create it if there isn't): - C-c C-f C-n move to Newsgroups: C-c C-f C-s move to Subj: - C-c C-f C-f move to Followup-To: C-c C-f C-k move to Keywords: - C-c C-f C-d move to Distribution: C-c C-f C-a move to Summary: -C-c C-y news-reply-yank-original (insert current message, in NEWS). -C-c C-q mail-fill-yanked-message (fill what was yanked). -C-c C-r caesar rotate all letters by 13 places in the article's body (rot13). - -* Changes in tags handling. - -** M-. (`find-tag') and similar commands now look first for an exact -match in the tags table, and try substring matches only afterward. - -** The new command `find-tag-regexp' visits successively the tags that -match a specified regular expression. - -** You can now use more than one tags table. Using `visit-tags-table' -to load a new tags table does not discard the other tables previously -loaded. The other tags commands use all the tags tables that are loaded; -the first tags table used is the one that mentions the current visited file. - -** Tags tables can now be told to "include" other tags tables. This means -the tags table gives the file names of other tags tables. Tags command -then search included tags tables after the including table (but before any -other tags tables you have loaded). Included tags tables can make it much -easier and more efficient to maintain a tags table for a large package with -many subdirectories--there is one tags table for each subdirectory, and a -master tags table that includes each subdirectory table. You use `-i' -options to `etags' when creating the tags table to give the file names of -the included tables. - -** You can now use the tags table for completion of names during -ordinary editing. The command M-TAB (except in Emacs Lisp mode) -completes the identifier in the buffer before point, using the set of -all tags as the list of possible completions. - -** `tags-query-replace' and `tags-search' changes. - -These functions no longer permanently create buffers for files that -are searched but that do not contain any matches for the search -pattern. - -* Existing Emacs usable as a server. - -Programs such as mailers that invoke "the editor" as an inferior -to edit some text can now be told to use an existing Emacs process -instead of creating a new editor. - -To do this, you must have an Emacs process running and capable of -doing terminal I/O at the time you want to invoke it. This means that -either you are using a window system and give Emacs a separate window -or you run the other programs as inferiors of Emacs (such as, using -M-x shell). - -First prepare the existing Emacs process by loading the `server' -library and executing M-x server-start. (Your .emacs can do this -automatically.) - -Now tell the other programs to use, as "the editor", the Emacs client -program (etc/emacsclient, located in the same directory as this file). -This can be done by setting the environment variable EDITOR. - -When another program invokes the emacsclient as "the editor", the -client actually transfers the file names to be edited to the existing -Emacs, which automatically visits the files. - -When you are done editing a buffer for a client, do C-x # (server-edit). -This marks that buffer as done, and selects the next buffer that the client -asked for. When all the buffers requested by a client are marked in this -way, Emacs tells the client program to exit, so that the program that -invoked "the editor" will resume execution. - -You can only have one server Emacs at a time, but multiple client programs -can put in requests at the same time. - -The client/server work only on Berkeley Unix, since they use the Berkeley -sockets mechanism for their communication. - -Changes in Lisp programming in Emacs version 18. - -* Init file changes. - -** Suffixes no longer accepted on `.emacs'. - -Emacs will no longer load a file named `.emacs.el' or `emacs.elc' -in place of `.emacs'. This is so that it will take less time to -find `.emacs'. If you want to compile your init file, give it another -name and make `.emacs' a link to the `.elc' file, or make it contain -a call to `load' to load the `.elc' file. - -** `default-profile' renamed to `default', and loaded after `.emacs'. - -It used to be the case that the file `default-profile' was loaded if -and only if `.emacs' was not found. - -Now the name `default-profile' is not used at all. Instead, a library -named `default' is loaded after the `.emacs' file. `default' is loaded -whether the `.emacs' file exists or not. However, loading of `default' -can be prevented if the `.emacs' file sets `inhibit-default-init' to non-nil. - -In fact, you would call the default file `default.el' and probably would -byte-compile it to speed execution. - -Note that for most purposes you are better off using a `site-init' library -since that will be loaded before the runnable Emacs is dumped. By using -a `site-init' library, you avoid taking up time each time Emacs is started. - -** inhibit-command-line has been eliminated. - -This variable used to exist for .emacs files to set. It has been -eliminated because you can get the same effect by setting -command-line-args to nil and setting inhibit-startup-message to t. - -* `apply' is more general. - -`apply' now accepts any number of arguments. The first one is a function; -the rest are individual arguments to pass to that function, except for the -last, which is a list of arguments to pass. - -Previously, `apply' required exactly two arguments. Its old behavior -follows as a special case of the new definition. - -* New code-letter for `interactive'. - -(interactive "NFoo: ") is like (interactive "nFoo: ") in reading -a number using the minibuffer to serve as the argument; however, -if a prefix argument was specified, it uses the prefix argument -value as the argument, and does not use the minibuffer at all. - -This is used by the `goto-line' and `goto-char' commands. - -* Semantics of variables. - -** Built-in per-buffer variables improved. - -Several built-in variables which in the past had a different value in -each buffer now behave exactly as if `make-variable-buffer-local' had -been done to them. - -These variables are `tab-width', `ctl-arrow', `truncate-lines', -`fill-column', `left-margin', `mode-line-format', `abbrev-mode', -`overwrite-mode', `case-fold-search', `auto-fill-hook', -`selective-display', `selective-display-ellipses'. - -To be precise, each variable has a default value which shows through -in most buffers and can be accessed with `default-value' and set with -`set-default'. Setting the variable with `setq' makes the variable -local to the current buffer. Changing the default value has retroactive -effect on all buffers in which the variable is not local. - -The variables `default-case-fold-search', etc., are now obsolete. -They now refer to the default value of the variable, which is not -quite the same behavior as before, but it should enable old init files -to continue to work. - -** New per-buffer variables. - -The variables `fill-prefix', `comment-column' and `indent-tabs-mode' -are now per-buffer. They work just like `fill-column', etc. - -** New function `setq-default'. - -`setq-default' sets the default value of a variable, and uses the -same syntax that `setq' accepts: the variable name is not evaluated -and need not be quoted. - -`(setq-default case-fold-search nil)' would make searches case-sensitive -in all buffers that do not have local values for `case-fold-search'. - -You can set multiple variables sequentially, each with its own value, -in `setq-default' just as in `setq'. - -** Functions `global-set' and `global-value' deleted. - -These functions were never used except by mistake by users expecting -the functionality of `set-default' and `default-value'. - -* Changes in defaulting of major modes. - -When `default-major-mode' is `nil', new buffers are supposed to -get their major mode from the buffer that is current. However, -certain major modes (such as Dired mode, Rmail mode, Rmail Summary mode, -and others) are not reasonable to use in this way. - -Now such modes' names have been given non-`nil' `mode-class' properties. -If the current buffer's mode has such a property, Fundamental mode is -used as the default for newly created buffers. - -* `where-is-internal' requires additional arguments. - -This function now accepts three arguments, two of them required: -DEFINITION, the definition to search for; LOCAL-KEYMAP, the keymap -to use as the local map when doing the searching, and FIRST-ONLY, -which is nonzero to return only the first key found. - -This function returns a list of keys (strings) whose definitions -(in the LOCAL-KEYMAP or the current global map) are DEFINITION. - -If FIRST-ONLY is non-nil, it returns a single key (string). - -This function has changed incompatibly in that now two arguments -are required when previously only one argument was allowed. To get -the old behavior of this function, write `(current-local-map)' as -the expression for the second argument. - -The incompatibility is sad, but `nil' is a legitimate value for the -second argument (it means there is no local keymap), so it cannot also -serve as a default meaning to use the current local keymap. - -* Abbrevs with hooks. - -When an abbrev defined with a hook is expanded, it now performs the -usual replacement of the abbrev with the expansion before running the -hook. Previously the abbrev itself was deleted but the expansion was -not inserted. - -* Function `scan-buffer' deleted. - -Use `search-forward' or `search-backward' in place of `scan-buffer'. -You will have to rearrange the arguments. - -* X window interface improvements. - -** Detect release of mouse buttons. - -Button-up events can now be detected. See the file `lisp/x-mouse.el' -for details. - -** New pop-up menu facility. - -The new function `x-popup-menu' pops up a menu (in a X window) -and returns an indication of which selection the user made. -For more information, see its self-documentation. - -* M-x disassemble. - -This command prints the disassembly of a byte-compiled Emacs Lisp function. - -Would anyone like to interface this to the debugger? - -* `insert-buffer-substring' can insert part of the current buffer. - -The old restriction that the text being inserted had to come from -a different buffer is now lifted. - -When inserting text from the current buffer, the text to be inserted -is determined from the specified bounds before any copying takes place. - -* New function `substitute-key-definition'. - -This is a new way to replace one command with another command as the -binding of whatever keys may happen to refer to it. - -(substitute-key-definition OLDDEF NEWDEF KEYMAP) looks through KEYMAP -for keys defined to run OLDDEF, and rebinds those keys to run NEWDEF -instead. - -* New function `insert-char'. - -Insert a specified character, a specified number of times. - -* `mark-marker' changed. - -When there is no mark, this now returns a marker that points -nowhere, rather than `nil'. - -* `ding' accepts argument. - -When given an argument, the function `ding' does not terminate -execution of a keyboard macro. Normally, `ding' does terminate -all macros that are currently executing. - -* New function `minibuffer-depth'. - -This function returns the current depth in minibuffer activations. -The value is zero when the minibuffer is not in use. -Values greater than one are possible if the user has entered the -minibuffer recursively. - -* New function `documentation-property'. - -(documentation-property SYMBOL PROPNAME) is like (get SYMBOL PROPNAME), -except that if the property value is a number `documentation-property' -will take that number (or its absolute value) as a character position -in the DOC file and return the string found there. - -(documentation-property VAR 'variable-documentation) is the proper -way for a Lisp program to get the documentation of variable VAR. - -* New documentation-string expansion feature. - -If a documentation string (for a variable or function) contains text -of the form `\', it means that all command names specified in -`\[COMMAND]' construct from that point on should be turned into keys -using the value of the variable FOO as the local keymap. Thus, for example, - - `\\[eval-defun] evaluates the defun containing point.' - -will expand into - - "ESC C-x evaluates the defun containing point." - -regardless of the current major mode, because ESC C-x is defined to -run `eval-defun' in the keymap `emacs-lisp-mode-map'. The effect is -to show the key for `eval-defun' in Emacs Lisp mode regardless of the -current major mode. - -The `\<...>' construct applies to all `\[...]' constructs that follow it, -up to the end of the documentation string or the next `\<...>'. - -Without `\<...>', the keys for commands specified in `\[...]' are found -in the current buffer's local map. - -The current global keymap is always searched second, whether `\<...>' -has been used or not. - -* Multiple hooks allowed in certain contexts. - -The old hook variables `find-file-hook', `find-file-not-found-hook' and -`write-file-hook' have been replaced. - -The replacements are `find-file-hooks', `find-file-not-found-hooks' -and `write-file-hooks'. Each holds a list of functions to be called; -by default, `nil', for no functions. The functions are called in -order of appearance in the list. - -In the case of `find-file-hooks', all the functions are executed. - -In the case of `find-file-not-found-hooks', if any of the functions -returns non-`nil', the rest of the functions are not called. - -In the case of `write-file-hooks', if any of the functions returns -non-`nil', the rest of the functions are not called, and the file is -considered to have been written already; so actual writing in the -usual way is not done. If `write-file-hooks' is local to a buffer, -it is set to its global value if `set-visited-file-name' is called -(and thus by C-x C-w as well). - -`find-file-not-found-hooks' and `write-file-hooks' can be used -together to implement editing of files that are not stored as Unix -files: stored in archives, or inside version control systems, or on -other machines running other operating systems and accessible via ftp. - -* New hooks for suspending Emacs. - -Suspending Emacs runs the hook `suspend-hook' before suspending -and the hook `suspend-resume-hook' if the suspended Emacs is resumed. -Running a hook is done by applying the variable's value to no arguments -if the variable has a non-`nil' value. If `suspend-hook' returns -non-`nil', then suspending is inhibited and so is running the -`suspend-resume-hook'. The non-`nil' value means that the `suspend-hook' -has done whatever suspending is required. - -* Disabling commands can print a special message. - -A command is disabled by giving it a non-`nil' `disabled' property. -Now, if this property is a string, it is included in the message -printed when the user tries to run the command. - -* Emacs can open TCP connections. - -The function `open-network-stream' opens a TCP connection to -a specified host and service. Its value is a Lisp object that represents -the connection. The object is a kind of "subprocess", and I/O are -done like I/O to subprocesses. - -* Display-related changes. - -** New mode-line control features. - -The display of the mode line used to be controlled by a format-string -that was the value of the variable `mode-line-format'. - -This variable still exists, but it now allows more general values, -not just strings. Lists, cons cells and symbols are also meaningful. - -The mode line contents are created by outputting various mode elements -one after the other. Here are the kinds of objects that can be -used as mode elements, and what they do in the display: - - string the contents of the string are output to the mode line, - and %-constructs are replaced by other text. - - t or nil ignored; no output results. - - symbol the symbol's value is used. If the value is a string, - the string is output verbatim to the mode line - (so %-constructs are not interpreted). Otherwise, - the symbol's value is processed as a mode element. - - list (whose first element is a string or list or cons cell) - the elements of the list are treated as as mode elements, - so that the output they generate is concatenated, - - list (whose car is a symbol) - if the symbol's value is non-nil, the second element of the - list is treated as a mode element. Otherwise, the third - element (if any) of the list is treated as a mode element. - - cons (whose car is a positive integer) - the cdr of the cons is used as a mode element, but - the text it produces is padded, if necessary, to have - at least the width specified by the integer. - - cons (whose car is a negative integer) - the cdr of the cons is used as a mode element, but - the text it produces is truncated, if necessary, to have - at most the width specified by the integer. - -There is always one mode element to start with, that being the value of -`mode-line-format', but if this value is a list then it leads to several -more mode elements, which can lead to more, and so on. - -There is one new %-construct for mode elements that are strings: -`%n' displays ` Narrow' for a buffer that is narrowed. - -The default value of `mode-line-format' refers to several other variables. -These variables are `mode-name', `mode-line-buffer-identification', -`mode-line-process', `mode-line-modified', `global-mode-string' and -`minor-mode-alist'. The first four are local in every buffer in which they -are changed from the default. - -mode-name Name of buffer's major mode. Local in every buffer. - -mode-line-buffer-identification - Normally the list ("Emacs: %17b"), it is responsible - for displaying text to indicate what buffer is being shown - and what kind of editing it is doing. `Emacs' means - that a file of characters is being edited. Major modes - such as Info and Dired which edit or view other kinds - of data often change this value. This variables becomes - local to the current buffer if it is setq'd. - -mode-line-process - Normally nil, this variable is responsible for displaying - information about the process running in the current buffer. - M-x shell-mode and M-x compile alter this variable. - -mode-line-modified - This variable is responsible for displaying the indication - of whether the current buffer is modified or read-only. - By default its value is `("--%*%*-")'. - -minor-mode-alist - This variable is responsible for displaying text for those - minor modes that are currently enabled. Its value - is a list of elements of the form (VARIABLE STRING), - where STRING is to be displayed if VARIABLE's value - (in the buffer whose mode line is being displayed) - is non-nil. This variable is not made local to particular - buffers, but loading some libraries may add elements to it. - -global-mode-string - This variable is used to display the time, if you ask - for that. - -The idea of these variables is to eliminate the need for major modes -to alter mode-line-format itself. - -** `window-point' valid for selected window. - -The value returned by `window-point' used to be incorrect when its -argument was the selected window. Now the value is correct. - -** Window configurations may be saved as Lisp objects. - -The function `current-window-configuration' returns a special type of -Lisp object that represents the current layout of windows: the -sizes and positions of windows, which buffers appear in them, and -which parts of the buffers appear on the screen. - -The function `set-window-configuration' takes one argument, which must -be a window configuration object, and restores that configuration. - -** New hook `temp-output-buffer-show-hook'. - -This hook allows you to control how help buffers are displayed. -Whenever `with-output-to-temp-buffer' has executed its body and wants -to display the temp buffer, if this variable is bound and non-`nil' -then its value is called with one argument, the temp buffer. -The hook function is solely responsible for displaying the buffer. -The standard manner of display--making the buffer appear in a window--is -used only if there is no hook function. - -** New function `minibuffer-window'. - -This function returns the window used (sometimes) for displaying -the minibuffer. It can be used even when the minibuffer is not active. - -** New feature to `next-window'. - -If the optional second argument is neither `nil' nor `t', the minibuffer -window is omitted from consideration even when active; if the starting -window was the last non-minibuffer window, the value will be the first -non-minibuffer window. - -** New variable `minibuffer-scroll-window'. - -When this variable is non-`nil', the command `scroll-other-window' -uses it as the window to be scrolled. Displays of completion-lists -set this variable to the window containing the display. - -** New argument to `sit-for'. - -A non-nil second argument to `sit-for' means do not redisplay; -just wait for the specified time or until input is available. - -** Deleted function `set-minor-mode'; minor modes must be changed. - -The function `set-minor-mode' has been eliminated. The display -of minor mode names in the mode line is now controlled by the -variable `minor-mode-alist'. To specify display of a new minor -mode, it is sufficient to add an element to this list. Once that -is done, you can turn the mode on and off just by setting a variable, -and the display will show its status automatically. - -** New variable `cursor-in-echo-area'. - -If this variable is non-nil, the screen cursor appears on the -last line of the screen, at the end of the text displayed there. - -Binding this variable to t is useful at times when reading single -characters of input with `read-char'. - -** New per-buffer variable `selective-display-ellipses'. - -If this variable is non-nil, an ellipsis (`...') appears on the screen -at the end of each text line that is followed by invisible text. - -If this variable is nil, no ellipses appear. Then there is no sign -on the screen that invisible text is present. - -Text is made invisible under the control of the variable -`selective-display'; this is how Outline mode and C-x $ work. - -** New variable `no-redraw-on-reenter'. - -If you set this variable non-nil, Emacs will not clear the screen when -you resume it after suspending it. This is for the sake of terminals -with multiple screens of memory, where the termcap entry has been set -up to switch between screens when Emacs is suspended and resumed. - -** New argument to `set-screen-height' or `set-screen-width'. - -These functions now take an optional second argument which says -what significance the newly specified height or width has. - -If the argument is nil, or absent, it means that Emacs should -believe that the terminal height or width really is as just specified. - -If the argument is t, it means Emacs should not believe that the -terminal really is this high or wide, but it should use the -specific height or width as the number of lines or columns to display. -Thus, you could display only 24 lines on a screen known to have 48 lines. - -What practical difference is there between using only 24 lines for display -and really believing that the terminal has 24 lines? - -1. The "real" height of the terminal says what the terminal command -to move the cursor to the last line will do. - -2. The "real" height of the terminal determines how much padding is -needed. - -* File-related changes. - -** New parameter `backup-by-copying-when-mismatch'. - -If this variable is non-`nil', then when Emacs is about to save a -file, it will create the backup file by copying if that would avoid -changing the file's uid or gid. - -The default value of this variable is `nil', because usually it is -useful to have the uid of a file change according to who edited it -last. I recommend thet this variable be left normally `nil' and -changed with a local variables list in those particular files where -the uid needs to be preserved. - -** New parameter `file-precious-flag'. - -If this variable is non-`nil', saving the buffer tries to avoid -leaving an incomplete file due to disk full or other I/O errors. -It renames the old file before saving. If saving is successful, -the renamed file is deleted; if saving gets an error, the renamed -file is renamed back to the name you visited. - -Backups are always made by copying for such files. - -** New variable `buffer-offer-save'. - -If the value of this variable is non-`nil' in a buffer then exiting -Emacs will offer to save the buffer (if it is modified and nonempty) -even if the buffer is not visiting a file. This variable is -automatically made local to the current buffer whenever it is set. - -** `rename-file', `copy-file', `add-name-to-file' and `make-symbolic-link'. - -The third argument to these functions used to be `t' or `nil'; `t' -meaning go ahead even if the specified new file name already has a file, -and `nil' meaning to get an error. - -Now if the third argument is a number it means to ask the user for -confirmation in this case. - -** New optional argument to `copy-file'. - -If `copy-file' receives a non-nil fourth argument, it attempts -to give the new copy the same time-of-last-modification that the -original file has. - -** New function `file-newer-than-file-p'. - -(file-newer-than-file-p FILE1 FILE2) returns non-nil if FILE1 has been -modified more recently than FILE2. If FILE1 does not exist, the value -is always nil; otherwise, if FILE2 does not exist, the value is t. -This is meant for use when FILE2 depends on FILE1, to see if changes -in FILE1 make it necessary to recompute FILE2 from it. - -** Changed function `file-exists-p'. - -This function is no longer the same as `file-readable-p'. -`file-exists-p' can now return t for a file that exists but which -the fascists won't allow you to read. - -** New function `file-locked-p'. - -This function receives a file name as argument and returns `nil' -if the file is not locked, `t' if locked by this Emacs, or a -string giving the name of the user who has locked it. - -** New function `file-name-sans-versions'. - -(file-name-sans-versions NAME) returns a substring of NAME, with any -version numbers or other backup suffixes deleted from the end. - -** New functions for directory names. - -Although a directory is really a kind of file, specifying a directory -uses a somewhat different syntax from specifying a file. -In Emacs, a directory name is used as part of a file name. - -On Unix, the difference is small: a directory name ends in a slash, -while a file name does not: thus, `/usr/rms/' to name a directory, -while `/usr/rms' names the file which holds that directory. - -On VMS, the difference is considerable: `du:[rms.foo]' specifies a -directory, but the name of the file that holds that directory is -`du:[rms]foo.dir'. - -There are two new functions for converting between directory names -and file names. `directory-file-name' takes a directory name and -returns the name of the file in which that directory's data is stored. -`file-name-as-directory' takes the name of a file and returns -the corresponding directory name. These always understand Unix file name -syntax; on VMS, they understand VMS syntax as well. - -For example, (file-name-as-directory "/usr/rms") returns "/usr/rms/" -and (directory-file-name "/usr/rms/") returns "/usr/rms". -On VMS, (file-name-as-directory "du:[rms]foo.dir") returns "du:[rms.foo]" -and (directory-file-name "du:[rms.foo]") returns "du:[rms]foo.dir". - -** Value of `file-attributes' changed. - -The function file-attributes returns a list containing many kinds of -information about a file. Now the list has eleven elements. - -The tenth element is `t' if deleting the file and creating another -file of the same name would result in a change in the file's group; -`nil' if there would be no change. You can also think of this as -comparing the file's group with the default group for files created in -the same directory by you. - -The eleventh element is the inode number of the file. - -** VMS-only function `file-name-all-versions'. - -This function returns a list of all the completions, including version -number, of a specified version-number-less file name. This is like -`file-name-all-completions', except that the latter returns values -that do not include version numbers. - -** VMS-only variable `vms-stmlf-recfm'. - -On a VMS system, if this variable is non-nil, Emacs will give newly -created files the record format `stmlf'. This is necessary for files -that must contain lines of arbitrary length, such as compiled Emacs -Lisp. - -When writing a new version of an existing file, Emacs always keeps -the same record format as the previous version; so this variable has -no effect. - -This variable has no effect on Unix systems. - -** `insert-file-contents' on an empty file. - -This no longer sets the buffer's "modified" flag. - -** New function (VMS only) `define-logical-name': - -(define-logical-name LOGICAL TRANSLATION) defines a VMS logical name -LOGICAL whose translation is TRANSLATION. The new name applies to -the current process only. - -** Deleted variable `ask-about-buffer-names'. - -If you want buffer names for files to be generated in a special way, -you must redefine `create-file-buffer'. - -* Subprocess-related changes. - -** New function `process-list'. - -This function takes no arguments and returns a list of all -of Emacs's asynchronous subprocesses. - -** New function `process-exit-status'. - -This function, given a process, process name or buffer as argument, -returns the exit status code or signal number of the process. -If the process has not yet exited or died, this function returns 0. - -** Process output ignores `buffer-read-only'. - -Output from a process will go into the process's buffer even if the -buffer is read only. - -** Switching buffers in filter functions and sentinels. - -Emacs no longer saves and restore the current buffer around calling -the filter and sentinel functions, so these functions can now -permanently alter the selected buffer in a straightforward manner. - -** Specifying environment variables for subprocesses. - -When a subprocess is started with `start-process' or `call-process', -the value of the variable `process-environment' is taken to -specify the environment variables to give the subprocess. The -value should be a list of strings, each of the form "VAR=VALUE". - -`process-environment' is initialized when Emacs starts up -based on Emacs's environment. - -** New variable `process-connection-type'. - -If this variable is `nil', when a subprocess is created, Emacs uses -a pipe rather than a pty to communicate with it. Normally this -variable is `t', telling Emacs to use a pty if ptys are supported -and one is available. - -** New function `waiting-for-user-input-p'. - -This function, given a subprocess as argument, returns `t' if that -subprocess appears to be waiting for input sent from Emacs, -or `nil' otherwise. - -** New hook `shell-set-directory-error-hook'. - -The value of this variable is called, with no arguments, whenever -Shell mode gets an error trying to keep track of directory-setting -commands (such as `cd' and `pushd') used in the shell buffer. - -* New functions `user-uid' and `user-real-uid'. - -These functions take no arguments and return, respectively, -the effective uid and the real uid of the Emacs process. -The value in each case is an integer. - -* New variable `print-escape-newlines' controls string printing. - -If this variable is non-`nil', then when a Lisp string is printed -by the Lisp printing function `prin1' or `print', newline characters -are printed as `\n' rather than as a literal newline. - -* New function `sysnetunam' on HPUX. - -This function takes two arguments, a network address PATH and a -login string LOGIN, and executes the system call `netunam'. -It returns `t' if the call succeeds, otherwise `nil'. - -News regarding installation: - -* Many `s-...' file names changed. - -Many `s-...' files have been renamed. All periods in such names, -except the ones just before the final `h', have been changed to -hyphens. Thus, `s-bsd4.2.h' has been renamed to `s-bsd4-2.h'. - -This is so a Unix distribution can be moved mechanically to VMS. - -* `DOCSTR...' file now called `DOC-...'. - -The file of on-line documentation strings, that used to be -`DOCSTR.mm.nn.oo' in this directory, is now called `DOC-mm.nn.oo'. -This is so that it can port to VMS using the standard conventions -for translating filenames for VMS. - -This file also now contains the doc strings for variables as -well as functions. - -* Emacs no longer uses floating point arithmetic. - -This may make it easier to port to some machines. - -* Macros `XPNTR' and `XSETPNTR'; flag `DATA_SEG_BITS'. - -These macros exclusively are used to unpack a pointer from a Lisp_Object -and to insert a pointer into a Lisp_Object. Redefining them may help -port Emacs to machines in which all pointers to data objects have -certain high bits set. - -If `DATA_SEG_BITS' is defined, it should be a number which contains -the high bits to be inclusive or'ed with pointers that are unpacked. - -* New flag `HAVE_X_MENU'. - -Define this flag in `config.h' in addition to `HAVE_X_WINDOWS' -to enable use of the Emacs interface to X Menus. On some operating -systems, the rest of the X interface works properly but X Menus -do not work; hence this separate flag. See the file `src/xmenu.c' -for more information. - -* Macros `ARRAY_MARK_FLAG' and `DONT_COPY_FLAG'. - -* `HAVE_ALLOCA' prevents assembly of `alloca.s'. - -* `SYSTEM_MALLOC' prevents use of GNU `malloc.c'. - -SYSTEM_MALLOC, if defined, means use the system's own `malloc' routines -rather than those that come with Emacs. - -Use this only if absolutely necessary, because if it is used you do -not get warnings when space is getting low. - -* New flags to control unexec. - -See the file `unexec.c' for a long comment on the compilation -switches that suffice to make it work on many machines. - -* `PNTR_COMPARISON_TYPE' - -Pointers that need to be compared for ordering are converted to this type -first. Normally this is `unsigned int'. - -* `HAVE_VFORK', `HAVE_DUP2' and `HAVE_GETTIMEOFDAY'. - -These flags just say whether certain system calls are available. - -* New macros control compiler switches, linker switches and libraries. - -The m- and s- files can now control in a modular fashion the precise -arguments passed to `cc' and `ld'. - -LIBS_STANDARD defines the standard C libraries. Default is `-lc'. -LIBS_DEBUG defines the extra libraries to use when debugging. Default `-lg'. -LIBS_SYSTEM can be defined by the s- file to specify extra libraries. -LIBS_MACHINE can be defined by the m- file to specify extra libraries. -LIBS_TERMCAP defines the libraries for Termcap or Terminfo. - It is defined by default in a complicated fashion but the m- or s- file - can override it. - -LD_SWITCH_SYSTEM can be defined by the s- file to specify extra `ld' switches. - The default is `-X' on BSD systems except those few that use COFF object files. -LD_SWITCH_MACHINE can be defined by the m- file to specify extra `ld' switches. - -C_DEBUG_SWITCH defines the switches to give `cc' when debugging. Default `-g'. -C_OPTIMIZE_SWITCH defines the switches to give `cc' to optimize. Default `-O'. -C_SWITCH_MACHINE can be defined by the m- file to specify extra `cc' switches. - -For older news, see the file ONEWS.3. - ----------------------------------------------------------------------- -Copyright information: - -Copyright (C) 1992 Free Software Foundation, Inc. - - Permission is granted to anyone to make or distribute verbatim copies - of this document as received, in any medium, provided that the - copyright notice and this permission notice are preserved, - thus giving the recipient permission to redistribute in turn. - - Permission is granted to distribute modified versions - of this document, or of portions of it, - under the above conditions, provided also that they - carry prominent notices stating who last changed them. - -Local variables: -mode: text -end: - -arch-tag: 373312be-99a8-46d5-bcb0-a62577ab5045 From 32a877bb6756a0f41ea919c60b846320763e7c64 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 4 Jun 2006 01:11:51 +0000 Subject: [PATCH 302/403] Reorganize NEWS and ONEWS files into NEWS for current major version and NEWS.21, NEWS.20, NEWS.19, NEWS.18, and NEWS.1-17 for older version. Update copyright notices. --- etc/ChangeLog | 46 +++++++++++++++++++++++++++------------------- lisp/ChangeLog | 7 +++++++ 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index a0acf56373b..b68a7391c14 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,26 +1,34 @@ +2006-06-04 Kim F. Storm + + * NEWS: Move news for pre-22 versions into... + * NEWS.21, NEWS.20: ... new files for Emacs 21 and Emacs 20 news. + * ONEWS, ONEWS.1, ONEWS.2, ONEWS.3, ONEWS.4: Remove (rename) files ... + * NEWS.19, NEWS.18, NEWS.1-17: ... and organize news about older Emacs + versions in separte files. Update copyright notices. + 2006-06-03 Eli Zaretskii * LPF: Deleted. - * FTP: - * ORDERS: - * MOTIVATION: - * enriched.doc: - * README: - * TERMS: - * ulimit.hack: - * ses-example.ses: - * ms-7bkermit: - * emacs.csh: - * Xkeymap.txt: - * SERVICE: - * HELLO: - * ETAGS.EBNF: - * MAILINGLISTS: - * compilation.txt: - * grep.txt: - * MACHINES: - * TODO: + * FTP: + * ORDERS: + * MOTIVATION: + * enriched.doc: + * README: + * TERMS: + * ulimit.hack: + * ses-example.ses: + * ms-7bkermit: + * emacs.csh: + * Xkeymap.txt: + * SERVICE: + * HELLO: + * ETAGS.EBNF: + * MAILINGLISTS: + * compilation.txt: + * grep.txt: + * MACHINES: + * TODO: * MORE.STUFF: Add copyright notice and copying permissions. * LEDIT: Remove file. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea1045ebb7e..29ac323e350 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2006-06-04 Kim F. Storm + + * help.el (view-emacs-news): Rewrite to support new NEWS, + NEWS.major, and NEWS.1-17 file naming. Add more intelligense, + e.g. version 10 matches 1.10, and don't be confused by version 1.1 + begin a prefix of 1.12 (etc). A numeric prefix arg also works. + 2006-06-03 Vivek Dasmohapatra * progmodes/sh-script.el (sh-quoted-exec): New face for quoted From e38cc268e2d391191b6a81b9b72f4cd1491faafa Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 4 Jun 2006 01:14:15 +0000 Subject: [PATCH 303/403] (view-emacs-news): Rewrite to support new NEWS, NEWS.major, and NEWS.1-17 file naming. Add more intelligense, e.g. version 10 matches 1.10, and don't be confused by version 1.1 begin a prefix of 1.12 (etc). A numeric prefix arg also works. --- lisp/help.el | 121 ++++++++++++++++++++++++++++----------------------- 1 file changed, 67 insertions(+), 54 deletions(-) diff --git a/lisp/help.el b/lisp/help.el index 5efd58dfaf5..d9a48a0a4cf 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -326,63 +326,76 @@ of the key sequence that ran this command." ;; run describe-prefix-bindings. (setq prefix-help-command 'describe-prefix-bindings) -(defun view-emacs-news (&optional arg) +(defun view-emacs-news (&optional version) "Display info on recent changes to Emacs. With argument, display info only for the selected version." (interactive "P") - (if (not arg) - (view-file (expand-file-name "NEWS" data-directory)) - (let* ((map (sort - (delete-dups - (apply - 'nconc - (mapcar - (lambda (file) - (with-temp-buffer - (insert-file-contents - (expand-file-name file data-directory)) - (let (res) - (while (re-search-forward - (if (string-match "^ONEWS\\.[0-9]+$" file) - "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\\.[0-9]+\\)?\\)" - "^\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t) - (setq res (cons (list (match-string-no-properties 1) - file) res))) - res))) - (append '("NEWS" "ONEWS") - (directory-files data-directory nil - "^ONEWS\\.[0-9]+$" nil))))) - (lambda (a b) - (string< (car b) (car a))))) - (current (caar map)) - (version (completing-read - (format "Read NEWS for the version (default %s): " current) - (mapcar 'car map) nil nil nil nil current)) - (file (cadr (assoc version map))) - res) - (if (not file) - (error "No news is good news") - (view-file (expand-file-name file data-directory)) - (widen) - (goto-char (point-min)) - (when (re-search-forward - (concat (if (string-match "^ONEWS\\.[0-9]+$" file) - "Changes in \\(?:Emacs\\|version\\)?[ \t]*" - "^\* [^0-9\n]*") version) - nil t) - (beginning-of-line) - (narrow-to-region - (point) - (save-excursion - (while (and (setq res - (re-search-forward - (if (string-match "^ONEWS\\.[0-9]+$" file) - "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\\.[0-9]+\\)?\\)" - "^\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t)) - (equal (match-string-no-properties 1) version))) - (or res (goto-char (point-max))) - (beginning-of-line) - (point)))))))) + (unless version + (setq version emacs-major-version)) + (when (consp version) + (let* ((all-versions + (let (res) + (mapcar + (lambda (file) + (with-temp-buffer + (insert-file-contents + (expand-file-name file data-directory)) + (while (re-search-forward + (if (member file '("NEWS.18" "NEWS.1-17")) + "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\\.[0-9]+\\)?\\)" + "^\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t) + (setq res (cons (match-string-no-properties 1) res))))) + (cons "NEWS" + (directory-files data-directory nil + "^NEWS\\.[0-9][-0-9]*$" nil))) + (sort (delete-dups res) (lambda (a b) (string< b a))))) + (current (car all-versions)) + res) + (setq version (completing-read + (format "Read NEWS for the version (default %s): " current) + all-versions nil nil nil nil current)) + (if (integerp (string-to-number version)) + (setq version (string-to-number version)) + (unless (or (member version all-versions) + (<= (string-to-number version) (string-to-number current))) + (error "No news about version %s" version))))) + (when (integerp version) + (cond ((<= version 12) + (setq version (format "1.%d" version))) + ((<= version 18) + (setq version (format "%d" version))) + ((> version emacs-major-version) + (error "No news about emacs %d (yet)" version)))) + (let* ((vn (if (stringp version) + (string-to-number version) + version)) + (file (cond + ((>= vn emacs-major-version) "NEWS") + ((< vn 18) "NEWS.1-17") + (t (format "NEWS.%d" vn))))) + (view-file (expand-file-name file data-directory)) + (widen) + (goto-char (point-min)) + (when (stringp version) + (when (re-search-forward + (concat (if (< vn 19) + "Changes in Emacs[ \t]*" + "^\* [^0-9\n]*") version "$") + nil t) + (beginning-of-line) + (narrow-to-region + (point) + (save-excursion + (while (and (setq res + (re-search-forward + (if (< vn 19) + "Changes in \\(?:Emacs\\|version\\)?[ \t]*\\([0-9]+\\(?:\\.[0-9]+\\)?\\)" + "^\* [^0-9\n]*\\([0-9]+\\.[0-9]+\\)") nil t)) + (equal (match-string-no-properties 1) version))) + (or res (goto-char (point-max))) + (beginning-of-line) + (point))))))) + (defun view-todo (&optional arg) "Display the Emacs TODO list." From 3c8c279cc1bbf28fdac7db14dc9e100d576a86cd Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 4 Jun 2006 02:17:49 +0000 Subject: [PATCH 304/403] Lots of cleanups. --- man/ChangeLog | 4 + man/mini.texi | 582 ++++++++++++++++++++++++-------------------------- 2 files changed, 279 insertions(+), 307 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index e4280d404d8..85c89fbe4d5 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,7 @@ +2006-06-03 Ted Zlatanov + + * mini.texi: Lots of cleanups. + 2006-06-01 Luc Teirlinck * misc.texi (Shell History Copying): Update descriptions of `C-c RET' diff --git a/man/mini.texi b/man/mini.texi index 4c3748a78f1..e0a851cfc9a 100644 --- a/man/mini.texi +++ b/man/mini.texi @@ -6,55 +6,53 @@ @chapter The Minibuffer @cindex minibuffer - The @dfn{minibuffer} is the facility used by Emacs commands to read -arguments more complicated than a single number. Minibuffer arguments -can be file names, buffer names, Lisp function names, Emacs command -names, Lisp expressions, and many other things, depending on the command -reading the argument. You can use the usual Emacs editing commands in -the minibuffer to edit the argument text. + The @dfn{minibuffer} is where Emacs commands read complicated +arguments (anything more a single number). We call it the +``minibuffer'' because it's a special-purpose buffer with a small +amount of screen space. Minibuffer arguments can be file names, +buffer names, Lisp function names, Emacs command names, Lisp +expressions, and many other things---whatever the command wants to +read. You can use the usual Emacs editing commands in the minibuffer +to edit the argument text. @cindex prompt - When the minibuffer is in use, it appears in the echo area, and the -terminal's cursor moves there. The beginning of the minibuffer line -displays a @dfn{prompt} in a special color, to say what kind of input -you should supply and how it will be used. Often this prompt is -derived from the name of the command that the argument is for. The -prompt normally ends with a colon. + When the minibuffer is in use, it appears in the echo area, with a +cursor. The minibuffer display starts with a @dfn{prompt} in a +distinct color; it says what kind of input is expected and how it will +be used. Often the prompt is derived from the name of the command +that is reading the argument. The prompt normally ends with a colon. @cindex default argument - Sometimes a @dfn{default argument} appears in parentheses before the -colon; it too is part of the prompt. The default will be used as the -argument value if you enter an empty argument (that is, just type -@key{RET}). For example, commands that read buffer names always show a -default, which is the name of the buffer that will be used if you type -just @key{RET}. + Sometimes a @dfn{default argument} appears in the prompt, inside +parentheses before the colon. The default will be used as the +argument value if you just type @key{RET}. For example, commands that +read buffer names show a buffer name as the default. You can type +@key{RET} to operate on that default buffer. - The simplest way to enter a minibuffer argument is to type the text -you want, terminated by @key{RET} which exits the minibuffer. You can -cancel the command that wants the argument, and get out of the -minibuffer, by typing @kbd{C-g}. + The simplest way to enter a minibuffer argument is to type the text, +then @key{RET} to exit the minibuffer. You can cancel the minibuffer, +and the command that wants the argument, by typing @kbd{C-g}. - Since the minibuffer uses the screen space of the echo area, it can -conflict with other ways Emacs customarily uses the echo area. Here is how -Emacs handles such conflicts: + Since the minibuffer appears in the echo area, it can conflict with +other uses of the echo area. Here is how Emacs handles such +conflicts: @itemize @bullet @item -If a command gets an error while you are in the minibuffer, this does -not cancel the minibuffer. However, the echo area is needed for the -error message and therefore the minibuffer itself is hidden for a -while. It comes back after a few seconds, or as soon as you type -anything. +An error occurs while the minibuffer is active. + +The error message hides the minibuffer for a few seconds, or until you +type something. Then the minibuffer comes back. @item -If in the minibuffer you use a command whose purpose is to display a -message in the echo area, such as @kbd{C-x =}, the message hides the -minibuffer for a while. The minibuffer contents come back after a few -seconds, or as soon as you type anything. +A command such as @kbd{C-x =} needs to display a message in the echo +area. + +The message hides the minibuffer for a few seconds, or until you type +something. Then the minibuffer comes back. @item -Echoing of keystrokes does not take place while the minibuffer is in -use. +Keystrokes don't echo while the minibuffer is in use. @end itemize @menu @@ -68,34 +66,32 @@ use. @node Minibuffer File @section Minibuffers for File Names - Sometimes the minibuffer starts out with text in it. For example, when -you are supposed to give a file name, the minibuffer starts out containing -the @dfn{default directory}, which ends with a slash. This is to inform -you which directory the file will be found in if you do not specify a -directory. + When you use the minibuffer to enter a file name, it starts out with +some initial text---the @dfn{default directory}, ending in a slash. +The file you specify will be in this directory unless you alter or +replace it. @c Separate paragraph to clean up ugly page break--rms @need 1500 - For example, the minibuffer might start out with these contents: + For example, if the minibuffer starts out with these contents: @example Find File: /u2/emacs/src/ @end example @noindent -where @samp{Find File:@: } is the prompt. Typing @kbd{buffer.c} as -input specifies the file @file{/u2/emacs/src/buffer.c}. To find files -in nearby directories, use @kbd{..}; thus, if you type -@kbd{../lisp/simple.el}, you will get the file named -@file{/u2/emacs/lisp/simple.el}. Alternatively, you can kill with -@kbd{M-@key{DEL}} the directory names you don't want (@pxref{Words}). +(where @samp{Find File:@: } is the prompt), and you type +@kbd{buffer.c} as input, that specifies the file +@file{/u2/emacs/src/buffer.c}. You can specify the parent directory +by adding @file{..}; thus, if you type @kbd{../lisp/simple.el}, you +will get @file{/u2/emacs/lisp/simple.el}. Alternatively, you can use +@kbd{M-@key{DEL}} to kill the directory names you don't want +(@pxref{Words}). - If you don't want any of the default, you can kill it with @kbd{C-a -C-k}. But you don't need to kill the default; you can simply ignore it. -Insert an absolute file name, one starting with a slash or a tilde, -after the default directory. For example, to specify the file -@file{/etc/termcap}, just insert that name, giving these minibuffer -contents: + You can kill it the entire default with @kbd{C-a C-k}, but there's +no need. You can simply ignore it and give an absolute file name +starting with a slash or a tilde after the default directory. For +example, to specify @file{/etc/termcap}, just type that name: @example Find File: /u2/emacs/src//etc/termcap @@ -106,59 +102,55 @@ Find File: /u2/emacs/src//etc/termcap @cindex double slash in file name @cindex slashes repeated in file name @findex file-name-shadow-mode -GNU Emacs gives a special meaning to a double slash (which is not -normally a useful thing to write): it means, ``ignore everything -before the second slash in the pair.'' Thus, @samp{/u2/emacs/src/} is -ignored in the example above, and you get the file -@file{/etc/termcap}. The ignored part of the file name is dimmed if -the terminal allows it; to disable this, turn off -@code{file-name-shadow-mode} minor mode. +GNU Emacs interprets a double slash (which is not normally useful in +file names) as, ``ignore everything before the second slash in the +pair.'' In the example above. @samp{/u2/emacs/src/} is ignored, so +you get @file{/etc/termcap}. The ignored part of the file name is +dimmed if the terminal allows it; to disable this dimming, turn off +File Name Shadow mode (a minor mode) with the command +@kbd{M-x file-name-shadow-mode}. - If you set @code{insert-default-directory} to @code{nil}, the + If the variable @code{insert-default-directory} is @code{nil}, the default directory is never inserted in the minibuffer---so the -minibuffer starts out empty. But the name you type, if relative, is -still interpreted with respect to the same default directory. +minibuffer starts out empty. Nonetheless, relative file name +arguments are still interpreted based on the same default directory. @node Minibuffer Edit @section Editing in the Minibuffer - The minibuffer is an Emacs buffer (albeit a peculiar one), and the usual -Emacs commands are available for editing the text of an argument you are -entering. + The minibuffer is an Emacs buffer (albeit a peculiar one), and the +usual Emacs commands are available for editing the argument text. Since @key{RET} in the minibuffer is defined to exit the minibuffer, you can't use it to insert a newline in the minibuffer. To do that, type @kbd{C-o} or @kbd{C-q C-j}. (The newline character is really the @acronym{ASCII} character control-J.) - The minibuffer has its own window, which normally has space on the -Emacs frame at all times, but it only acts like an Emacs window when -the minibuffer is really in use. At those times, its window is much -like any other Emacs window; you can switch from the minibuffer window -to another window with @kbd{C-x o}, and edit text in other windows, -before returning to the minibuffer to submit the argument. You can -kill text in another window, return to the minibuffer window, and then -yank the text to use it in the argument. @xref{Windows}. + The minibuffer has its own window, which normally has space in the +frame at all times, but it only acts like an Emacs window when the +minibuffer is active. When active, this window is much like any other +Emacs window; for instance, you can switch to another window (with +@kbd{C-x o}), edit text there, then return to the minibuffer window to +finish the argument. You can even kill text in another window, return +to the minibuffer window, and then yank the text into the argument. +@xref{Windows}. @cindex height of minibuffer @cindex size of minibuffer @cindex growing minibuffer @cindex resizing minibuffer - There are some restrictions on the use of the minibuffer window, -however. You cannot switch buffers in it---the minibuffer and its -window are permanently attached. Also, you cannot split or kill the -minibuffer window. But you can make it taller in the normal fashion -with @kbd{C-x ^}. + There are some restrictions on the minibuffer window, however: you +cannot kill it, or split it, or switch buffers in it---the minibuffer +and its window are permanently attached. @vindex resize-mini-windows The minibuffer window expands vertically as necessary to hold the text that you put in the minibuffer. If @code{resize-mini-windows} is -@code{t} (the default), the window is always resized to fit the size -of the text it displays. If its value is the symbol @code{grow-only}, -the window grows when the size of displayed text increases, but -shrinks (back to the normal size) only when the minibuffer becomes -inactive. If its value is @code{nil}, you have to adjust the height -yourself. +@code{t} (the default), the window always resizes as needed by its +contents. If its value is the symbol @code{grow-only}, the window +grows automatically as needed, but shrinks (back to the normal size) +only when the minibuffer becomes inactive. If its value is +@code{nil}, you have to adjust the height yourself. @vindex max-mini-window-height The variable @code{max-mini-window-height} controls the maximum @@ -167,52 +159,47 @@ specifies a fraction of the frame's height; an integer specifies the maximum number of lines; @code{nil} means do not resize the minibuffer window automatically. The default value is 0.25. - If, while in the minibuffer, you issue a command that displays help -text of any sort in another window, you can use the @kbd{C-M-v} -command while in the minibuffer to scroll the help text. -(@kbd{M-@key{PAGEUP}} and @kbd{M-@key{PAGEDOWN}} also operate on that -help text.) This lasts until you exit the minibuffer. This feature -is especially useful when you display a buffer listing possible + The @kbd{C-M-v} command in the minibuffer scrolls the help text from +commands that display help text of any sort in another window. +@kbd{M-@key{PAGEUP}} and @kbd{M-@key{PAGEDOWN}} also operate on that +help text. This is especially useful with long lists of possible completions. @xref{Other Window}. @vindex enable-recursive-minibuffers Emacs normally disallows most commands that use the minibuffer while -the minibuffer is active. This rule is to prevent recursive minibuffers -from confusing novice users. If you want to be able to use such -commands in the minibuffer, set the variable -@code{enable-recursive-minibuffers} to a non-@code{nil} value. +the minibuffer is active. (Entering the minibuffer from the +minibuffer can be confusing.) To allow such commands in the +minibuffer, set the variable @code{enable-recursive-minibuffers} to +@code{t}. @node Completion @section Completion @cindex completion + + Some arguments allow @dfn{completion} to enter their value. This +means that after you type part of the argument, Emacs can fill in the +rest, or some of it, based on what you have typed so far. - For certain kinds of arguments, you can use @dfn{completion} to enter -the argument value. Completion means that you type part of the -argument, then Emacs visibly fills in the rest, or as much as -can be determined from the part you have typed. + When completion is available, certain keys---@key{TAB}, @key{RET}, +and @key{SPC}---are rebound to complete the text in the minibuffer +before point into a longer string chosen from a set of @dfn{completion +alternatives} provided by the command that requested the argument. +(@key{SPC} does not do completion in reading file names, because it is +common to use spaces in file names on some systems.) @kbd{?} displays +a list of the possible completions at any time. - When completion is available, certain keys---@key{TAB}, @key{RET}, and -@key{SPC}---are rebound to complete the text in the minibuffer before point -into a longer string that it stands for, by matching it against a set of -@dfn{completion alternatives} provided by the command reading the -argument. @kbd{?} is defined to display a list of possible completions -of what you have inserted. + For example, @kbd{M-x} uses the minibuffer to read the name of a +command, so it provides a list of all Emacs command names for +completion candidates. The completion keys match the minibuffer text +against these candidates, find any additional name characters implied +by the the text already present in the minibuffer, and add those +characters. This makes it possible to type @kbd{M-x ins @key{SPC} b +@key{RET}} instead of @kbd{M-x insert-buffer @key{RET}}, for example. - For example, when @kbd{M-x} uses the minibuffer to read the name of -a command, it provides a list of all available Emacs command names to -complete against. The completion keys match the minibuffer text -against all the command names, find any additional name characters -implied by the ones already present in the minibuffer, and add those -characters to the ones you have given. This is what makes it possible -to type @kbd{M-x ins @key{SPC} b @key{RET}} instead of @kbd{M-x -insert-buffer @key{RET}} (for example). (@key{SPC} does not do -completion in reading file names, because it is common to use spaces -in file names on some systems.) - - Case is normally significant in completion, because it is significant -in most of the names that you can complete (buffer names, file names and -command names). Thus, @samp{fo} does not complete to @samp{Foo}. -Completion does ignore case distinctions for certain arguments in which + Case is significant in completion when it is significant in the +argument you are entering (buffer names, file names, command names, +for instance). Thus, @samp{fo} does not complete to @samp{Foo}. +Completion ignores case distinctions for certain arguments in which case does not matter. Completion acts only on the text before point. If there is text in @@ -230,42 +217,39 @@ typing some text into the minibuffer---it remains unchanged. @subsection Completion Example @kindex TAB @r{(completion)} -@findex minibuffer-complete - A concrete example may help here. If you type @kbd{M-x au @key{TAB}}, -the @key{TAB} looks for alternatives (in this case, command names) that -start with @samp{au}. There are several, including -@code{auto-fill-mode} and @code{auto-save-mode}---but they are all the -same as far as @code{auto-}, so the @samp{au} in the minibuffer changes -to @samp{auto-}.@refill + A concrete example may help here. If you type @kbd{M-x au +@key{TAB}}, the @key{TAB} looks for alternatives (in this case, +command names) that start with @samp{au}. There are several, +including @code{auto-fill-mode} and @code{auto-save-mode}, but they +all begin with @code{auto-}, so the @samp{au} in the minibuffer +completes to @samp{auto-}. - If you type @key{TAB} again immediately, there are multiple -possibilities for the very next character---it could be any of -@samp{cfilrs}---so no more characters are added; instead, @key{TAB} -displays a list of all possible completions in another window. + If you type @key{TAB} again immediately, it cannot determine the +next character; it could be any of @samp{cfilrs}. So it does not add +any characters; instead, @key{TAB} displays a list of all possible +completions in another window. - If you go on to type @kbd{f @key{TAB}}, this @key{TAB} sees -@samp{auto-f}. The only command name starting this way is -@code{auto-fill-mode}, so completion fills in the rest of that. You now -have @samp{auto-fill-mode} in the minibuffer after typing just @kbd{au -@key{TAB} f @key{TAB}}. Note that @key{TAB} has this effect because in -the minibuffer it is bound to the command @code{minibuffer-complete} -when completion is available. + Now type @kbd{f @key{TAB}}. This @key{TAB} sees @samp{auto-f}. The +only command name starting with that is @code{auto-fill-mode}, so +completion fills in the rest of that. You have been able to enter +@samp{auto-fill-mode} by typing just @kbd{au @key{TAB} f @key{TAB}}. @node Completion Commands @subsection Completion Commands Here is a list of the completion commands defined in the minibuffer -when completion is available. +when completion is allowed. @table @kbd @item @key{TAB} +@findex minibuffer-complete Complete the text before point in the minibuffer as much as possible (@code{minibuffer-complete}). @item @key{SPC} -Complete the minibuffer text before point, but don't go beyond one -word (@code{minibuffer-complete-word}). @key{SPC} for completion is -not available when entering a file name, since some users often put -spaces in filenames. +Complete up to one word from the minibuffer text before point +(@code{minibuffer-complete-word}). @key{SPC} for completion is not +available when entering a file name, since file names often include +spaces. @item @key{RET} Submit the text in the minibuffer as the argument, possibly completing first as described @@ -277,31 +261,30 @@ in the next node (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}. @end ifnottex @item ? -Display a list of all possible completions of the text in the minibuffer +Display a list of possible completions of the text before point (@code{minibuffer-completion-help}). @end table @kindex SPC @findex minibuffer-complete-word - @key{SPC} completes much like @key{TAB}, but never goes beyond the -next hyphen or space. If you have @samp{auto-f} in the minibuffer and -type @key{SPC}, it finds that the completion is @samp{auto-fill-mode}, -but it stops completing after @samp{fill-}. This gives -@samp{auto-fill-}. Another @key{SPC} at this point completes all the -way to @samp{auto-fill-mode}. The command that implements this -behavior is called @code{minibuffer-complete-word}. + @key{SPC} completes like @key{TAB}, but only up to the next hyphen +or space. If you have @samp{auto-f} in the minibuffer and type +@key{SPC}, it finds that the completion is @samp{auto-fill-mode}, but +it only inserts @samp{ill-}, giving @samp{auto-fill-}. Another +@key{SPC} at this point completes all the way to +@samp{auto-fill-mode}. The command that implements this behavior is +called @code{minibuffer-complete-word}. - Here are some commands you can use to choose a completion from a -window that displays a list of completions: + When you display a list of possible completions, you can choose +one from it: @table @kbd @findex mouse-choose-completion @item Mouse-1 @itemx Mouse-2 -Clicking mouse button 1 or 2 on a completion in the list of possible -completions chooses that completion (@code{mouse-choose-completion}). -You normally use this command while point is in the minibuffer, but you -must click in the list of completions, not in the minibuffer itself. +Clicking mouse button 1 or 2 on a completion possibility chooses that +completion (@code{mouse-choose-completion}). You must click in the +list of completions, not in the minibuffer. @findex switch-to-completions @item @key{PRIOR} @@ -309,98 +292,91 @@ must click in the list of completions, not in the minibuffer itself. Typing @key{PRIOR} or @key{PAGE-UP}, or @kbd{M-v}, while in the minibuffer, selects the window showing the completion list buffer (@code{switch-to-completions}). This paves the way for using the -commands below. (Selecting that window in the usual ways has the same -effect, but this way is more convenient.) +commands below. (Selecting that window in other ways has the same +effect.) @findex choose-completion @item @key{RET} Typing @key{RET} @emph{in the completion list buffer} chooses the completion that point is in or next to (@code{choose-completion}). To -use this command, you must first switch windows to the window that shows -the list of completions. +use this command, you must first switch to the completion list window. @findex next-completion @item @key{RIGHT} Typing the right-arrow key @key{RIGHT} @emph{in the completion list -buffer} moves point to the following completion (@code{next-completion}). +buffer} moves point to the following completion possibility +(@code{next-completion}). @findex previous-completion @item @key{LEFT} Typing the left-arrow key @key{LEFT} @emph{in the completion list -buffer} moves point toward the beginning of the buffer, to the previous -completion (@code{previous-completion}). +buffer} moves point to the previous completion possibility +(@code{previous-completion}). @end table @node Strict Completion @subsection Strict Completion - There are three different ways that @key{RET} can work in completing -minibuffers, depending on how the argument will be used. + There are three different ways that @key{RET} can do completion, +depending on how the argument will be used. @itemize @bullet @item -@dfn{Strict} completion is used when it is meaningless to give any -argument except one of the known alternatives. For example, when -@kbd{C-x k} reads the name of a buffer to kill, it is meaningless to -give anything but the name of an existing buffer. In strict -completion, @key{RET} refuses to exit if the text in the minibuffer -does not complete to an exact match. +@dfn{Strict} completion accepts only known completion candidates. For +example, when @kbd{C-x k} reads the name of a buffer to kill, only the +name of an existing buffer makes sense. In strict completion, +@key{RET} refuses to exit if the text in the minibuffer does not +complete to an exact match. @item @dfn{Cautious} completion is similar to strict completion, except that -@key{RET} exits only if the text was an exact match already, not -needing completion. If the text is not an exact match, @key{RET} does -not exit, but it does complete the text. If it completes to an exact -match, a second @key{RET} will exit. +@key{RET} exits only if the text is an already exact match. +Otherwise, @key{RET} does not exit, but it does complete the text. If +that completes to an exact match, a second @key{RET} will exit. Cautious completion is used for reading file names for files that must -already exist. +already exist, for example. @item -@dfn{Permissive} completion is used when any string whatever is -meaningful, and the list of completion alternatives is just a guide. -For example, when @kbd{C-x C-f} reads the name of a file to visit, any -file name is allowed, in case you want to create a file. In -permissive completion, @key{RET} takes the text in the minibuffer -exactly as given, without completing it. +@dfn{Permissive} completion allows any input; the completion +candidates are just suggestions. For example, when @kbd{C-x C-f} +reads the name of a file to visit, any file name is allowed, including +nonexistent file (in case you want to create a file). In permissive +completion, @key{RET} does not complete, it just submits the argument +as you have entered it. @end itemize - The completion commands display a list of all possible completions in -a window whenever there is more than one possibility for the very next -character. Also, typing @kbd{?} explicitly requests such a list. If -the list of completions is long, you can scroll it with @kbd{C-M-v} -(@pxref{Other Window}). + The completion commands display a list of all possible completions +whenever they can't determine even one more character by completion. +Also, typing @kbd{?} explicitly requests such a list. You can scroll +the list with @kbd{C-M-v} (@pxref{Other Window}). @node Completion Options @subsection Completion Options @vindex completion-ignored-extensions @cindex ignored file names, in completion - When completion is done on file names, certain file names are usually -ignored. The variable @code{completion-ignored-extensions} contains a -list of strings; a file whose name ends in any of those strings is -ignored as a possible completion. The standard value of this variable -has several elements including @code{".o"}, @code{".elc"}, @code{".dvi"} -and @code{"~"}. The effect is that, for example, @samp{foo} can -complete to @samp{foo.c} even though @samp{foo.o} exists as well. -However, if @emph{all} the possible completions end in ``ignored'' -strings, then they are not ignored. Ignored extensions do not apply to -lists of completions---those always mention all possible completions. + When completing file names, certain file names are usually ignored. +The variable @code{completion-ignored-extensions} contains a list of +strings; a file name ending in any of those strings is ignored as a +completion candidate. The standard value of this variable has several +elements including @code{".o"}, @code{".elc"}, @code{".dvi"} and +@code{"~"}. The effect is that, for example, @samp{foo} can complete +to @samp{foo.c} even though @samp{foo.o} exists as well. However, if +@emph{all} the possible completions end in ``ignored'' strings, then +they are not ignored. Displaying a list of possible completions +disregards @code{completion-ignored-extensions}; it shows them all. - If an element of the list in @code{completion-ignored-extensions} ends -in a slash @file{/}, it indicates a subdirectory that should be ignored -when completing file names. Elements of + If an element of @code{completion-ignored-extensions} ends in a +slash (@file{/}), it's a subdirectory name; then that directory and +its contents are ignored. Elements of @code{completion-ignored-extensions} which do not end in a slash are -never considered when a completion candidate is a directory; thus, -completion returns directories whose names end in @file{.elc} even -though there's an element @code{".elc"} in the list. +ordinary file names, and do not apply to names of directories. @vindex completion-auto-help - Normally, a completion command that cannot determine even one -additional character automatically displays a list of all possible -completions. If the variable @code{completion-auto-help} is set to -@code{nil}, this automatic display is disabled, so you must type -@kbd{?} to display the list of completions. + If @code{completion-auto-help} is set to @code{nil}, the completion +commands never display a list of possibilities; you must type @kbd{?} +to display the list. @cindex Partial Completion mode @vindex partial-completion-mode @@ -408,30 +384,29 @@ completions. If the variable @code{completion-auto-help} is set to Partial Completion mode implements a more powerful kind of completion that can complete multiple words in parallel. For example, it can complete the command name abbreviation @code{p-b} into -@code{print-buffer}, because no other command starts with two words -whose initials are @samp{p} and @samp{b}. +@code{print-buffer} if no other command starts with two words whose +initials are @samp{p} and @samp{b}. + + To enable this mode, use @kbd{M-x partial-completion-mode}, or +customize the variable @code{partial-completion-mode}. This mode +binds special partial completion commands to @key{TAB}, @key{SPC}, +@key{RET}, and @kbd{?} in the minibuffer. The usual completion +commands are available on @kbd{M-@key{TAB}} (or @kbd{C-M-i}), +@kbd{M-@key{SPC}}, @kbd{M-@key{RET}} and @kbd{M-?}. Partial completion of directories in file names uses @samp{*} to indicate the places for completion; thus, @file{/u*/b*/f*} might -complete to @file{/usr/bin/foo}. - - For remote files, partial completion enables completion of methods, -user names and host names. @xref{Remote Files}. - - To enable this mode, use the command @kbd{M-x -partial-completion-mode}, or customize the variable -@code{partial-completion-mode}. This binds the partial completion -commands to @key{TAB}, @key{SPC}, @key{RET}, and @kbd{?}. The usual -completion commands are available on @kbd{M-@key{TAB}} (or -@kbd{C-M-i}), @kbd{M-@key{SPC}}, @kbd{M-@key{RET}} and @kbd{M-?}. +complete to @file{/usr/bin/foo}. For remote files, partial completion +enables completion of methods, user names and host names. +@xref{Remote Files}. @vindex PC-include-file-path @vindex PC-disable-includes - Another feature of Partial Completion mode is to extend -@code{find-file} so that @samp{<@var{include}>} stands for the -file named @var{include} in some directory in the path -@code{PC-include-file-path}. If you set @code{PC-disable-includes} to -non-@code{nil}, this feature is disabled. + Partial Completion mode also extends @code{find-file} so that +@samp{<@var{include}>} looks for the file named @var{include} in the +directories in the path @code{PC-include-file-path}. If you set +@code{PC-disable-includes} to non-@code{nil}, this feature is +disabled. @cindex Icomplete mode @findex icomplete-mode @@ -446,52 +421,50 @@ icomplete-mode}. @cindex history of minibuffer input Every argument that you enter with the minibuffer is saved on a -@dfn{minibuffer history list} so that you can use it again later in -another argument. Special commands load the text of an earlier argument -in the minibuffer. They discard the old minibuffer contents, so you can -think of them as moving through the history of previous arguments. +@dfn{minibuffer history list} so you can easily use it again later. +Special commands fetch the text of an earlier argument into the +minibuffer, replacing the old minibuffer contents. You can think of +them as moving through the history of previous arguments. @table @kbd @item @key{UP} @itemx M-p -Move to the next earlier argument string saved in the minibuffer history +Move to the previous item in the minibuffer history, an earlier argument (@code{previous-history-element}). @item @key{DOWN} @itemx M-n -Move to the next later argument string saved in the minibuffer history +Move to the next item in the minibuffer history (@code{next-history-element}). @item M-r @var{regexp} @key{RET} -Move to an earlier saved argument in the minibuffer history that has a -match for @var{regexp} (@code{previous-matching-history-element}). +Move to an earlier item in the minibuffer history that +matches @var{regexp} (@code{previous-matching-history-element}). @item M-s @var{regexp} @key{RET} -Move to a later saved argument in the minibuffer history that has a -match for @var{regexp} (@code{next-matching-history-element}). +Move to a later item in the minibuffer history that matches +@var{regexp} (@code{next-matching-history-element}). @end table @kindex M-p @r{(minibuffer history)} @kindex M-n @r{(minibuffer history)} @findex next-history-element @findex previous-history-element - The simplest way to reuse the saved arguments in the history list is -to move through the history list one element at a time. While in the -minibuffer, use @kbd{M-p} or up-arrow -(@code{previous-history-element}) to ``move to'' the next earlier -minibuffer input, and use @kbd{M-n} or down-arrow -(@code{next-history-element}) to ``move to'' the next later input. -These commands don't move the cursor, they bring different saved -strings into the minibuffer. But you can think of them as ``moving'' -through the history list. + To move through the minibuffer history list one item at a time, use +@kbd{M-p} or up-arrow (@code{previous-history-element}) to fetch the +next earlier minibuffer input, and use @kbd{M-n} or down-arrow +(@code{next-history-element}) to fetch the next later input. These +commands don't move the cursor, they pull different saved strings into +the minibuffer. But you can think of them as ``moving'' through the +history list. - The previous input that you fetch from the history entirely replaces -the contents of the minibuffer. To use it as the argument, exit the -minibuffer as usual with @key{RET}. You can also edit the text before -you reuse it; this does not change the history element that you -``moved'' to, but your new argument does go at the end of the history -list in its own right. + The input that you fetch from the history entirely replaces the +contents of the minibuffer. To use it again unchanged, just type +@key{RET}. You can also edit the text before you reuse it; this does +not change the history element that you ``moved'' to, but your new +argument does go at the end of the history list in its own right. - For many minibuffer arguments there is a ``default'' value. Then -you can insert the default value into the minibuffer as text by using -@kbd{M-n} to move ``into the future'' in the history. + For many minibuffer arguments there is a ``default'' value. You can +insert the default value into the minibuffer as text by using +@kbd{M-n}. You can think of this as moving ``into the future'' in the +history. @findex previous-matching-history-element @findex next-matching-history-element @@ -499,14 +472,13 @@ you can insert the default value into the minibuffer as text by using @kindex M-s @r{(minibuffer history)} There are also commands to search forward or backward through the history; they search for history elements that match a regular -expression that you specify with the minibuffer. @kbd{M-r} -(@code{previous-matching-history-element}) searches older elements in -the history, while @kbd{M-s} (@code{next-matching-history-element}) -searches newer elements. By special dispensation, these commands can -use the minibuffer to read their arguments even though you are already -in the minibuffer when you issue them. As with incremental searching, -an upper-case letter in the regular expression makes the search -case-sensitive (@pxref{Search Case}). +expression. @kbd{M-r} (@code{previous-matching-history-element}) +searches older elements in the history, while @kbd{M-s} +(@code{next-matching-history-element}) searches newer elements. These +commands are unusual; they use the minibuffer to read the regular +expression even though they are invoked from the minibuffer. As with +incremental searching, an upper-case letter in the regular expression +makes the search case-sensitive (@pxref{Search Case}). @ignore We may change the precise way these commands read their arguments. @@ -519,46 +491,45 @@ actually available, type @kbd{C-h f previous-matching-history-element}. @end ignore All uses of the minibuffer record your input on a history list, but -there are separate history lists for different kinds of arguments. For -example, there is a list for file names, used by all the commands that -read file names. (As a special feature, this history list records -the absolute file name, no more and no less, even if that is not how -you entered the file name.) +there are separate history lists for different kinds of arguments. +For example, there is a list for file names, used by all the commands +that read file names. (As a special feature, this history list +records the absolute file name, even if the name you entered was not +absolute.) - There are several other very specific history lists, including one for -command names read by @kbd{M-x}, one for buffer names, one for arguments -of commands like @code{query-replace}, and one for compilation commands -read by @code{compile}. Finally, there is one ``miscellaneous'' history -list that most minibuffer arguments use. + There are several other specific history lists, including one for +buffer names, one for arguments of commands like @code{query-replace}, +one used by @kbd{M-x} for command names, and one used by +@code{compile} for compilation commands. Finally, there is one +``miscellaneous'' history list that most minibuffer arguments use. @vindex history-length The variable @code{history-length} specifies the maximum length of a -minibuffer history list; once a list gets that long, the oldest element -is deleted each time an element is added. If the value of -@code{history-length} is @code{t}, though, there is no maximum length -and elements are never deleted. +minibuffer history list; adding a new element deletes the oldest +element if the list gets too long. If the value of +@code{history-length} is @code{t}, though, there is no maximum length. @vindex history-delete-duplicates The variable @code{history-delete-duplicates} specifies whether to -delete duplicates in history. If the value of @code{history-delete-duplicates} -is @code{t}, that means when adding a new history element, all -previous identical elements are deleted. +delete duplicates in history. If it is @code{t}, adding a new element +deletes from the list all other elements that are equal to it. @node Repetition @section Repeating Minibuffer Commands @cindex command history @cindex history of commands - Every command that uses the minibuffer at least once is recorded on a -special history list, together with the values of its arguments, so that -you can repeat the entire command. In particular, every use of -@kbd{M-x} is recorded there, since @kbd{M-x} uses the minibuffer to read -the command name. + Every command that uses the minibuffer once is recorded on a special +history list, the @dfn{command history}, together with the values of +its arguments, so that you can repeat the entire command. In +particular, every use of @kbd{M-x} is recorded there, since @kbd{M-x} +uses the minibuffer to read the command name. @findex list-command-history @table @kbd @item C-x @key{ESC} @key{ESC} -Re-execute a recent minibuffer command (@code{repeat-complex-command}). +Re-execute a recent minibuffer command from the command history + (@code{repeat-complex-command}). @item M-x list-command-history Display the entire command history, showing all the commands @kbd{C-x @key{ESC} @key{ESC}} can repeat, most recent first. @@ -566,36 +537,33 @@ Display the entire command history, showing all the commands @kindex C-x ESC ESC @findex repeat-complex-command - @kbd{C-x @key{ESC} @key{ESC}} is used to re-execute a recent -minibuffer-using command. With no argument, it repeats the last such -command. A numeric argument specifies which command to repeat; one -means the last one, and larger numbers specify earlier ones. + @kbd{C-x @key{ESC} @key{ESC}} is used to re-execute a recent command +that used the minibuffer. With no argument, it repeats the last such +command. A numeric argument specifies which command to repeat; 1 +means the last one, 2 the previous, and so on. @kbd{C-x @key{ESC} @key{ESC}} works by turning the previous command into a Lisp expression and then entering a minibuffer initialized with -the text for that expression. If you type just @key{RET}, the command -is repeated as before. You can also change the command by editing the -Lisp expression. Whatever expression you finally submit is what will be -executed. The repeated command is added to the front of the command -history unless it is identical to the most recently executed command -already there. - - Even if you don't understand Lisp syntax, it will probably be obvious -which command is displayed for repetition. If you do not change the -text, it will repeat exactly as before. +the text for that expression. Even if you don't understand Lisp +syntax, it will probably be obvious which command is displayed for +repetition. If you type just @key{RET}, that repeats the command +unchanged. You can also change the command by editing the Lisp +expression before you execute it. The repeated command is added to +the front of the command history unless it is identical to the most +recently item. Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you can use the minibuffer history commands (@kbd{M-p}, @kbd{M-n}, @kbd{M-r}, @kbd{M-s}; @pxref{Minibuffer History}) to move through the history list of saved entire commands. After finding the desired previous command, -you can edit its expression as usual and then resubmit it by typing -@key{RET} as usual. +you can edit its expression as usual and then repeat it by typing +@key{RET}. @vindex isearch-resume-in-command-history - Incremental search does not, strictly speaking, use the minibuffer, -but it does something similar. Although it behaves like a complex command, -it normally does not appear in the history list for @kbd{C-x -@key{ESC} @key{ESC}}. You can make it appear in the history by + Incremental search does not, strictly speaking, use the minibuffer. +Therefore, although it behaves like a complex command, it normally +does not appear in the history list for @kbd{C-x @key{ESC} @key{ESC}}. +You can make incremental search commands appear in the history by setting @code{isearch-resume-in-command-history} to a non-@code{nil} value. @xref{Incremental Search}. From 6dfbf803008ef9d5bd5a53cbe5848cc797c94938 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sun, 4 Jun 2006 09:39:11 +0000 Subject: [PATCH 305/403] Update for Emacs 22: Use German quotes and umlauts; fix overfull /hboxes; many rewordings. --- etc/ChangeLog | 5 + etc/de-refcard.tex | 500 +++++++++++++++++++++++++-------------------- 2 files changed, 279 insertions(+), 226 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index b68a7391c14..55a923b6edb 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2006-06-04 Sven Joachim + + * de-refcard.tex: Update for Emacs 22: Use German quotes + and umlauts; fix overfull /hboxes; many rewordings. + 2006-06-04 Kim F. Storm * NEWS: Move news for pre-22 versions into... diff --git a/etc/de-refcard.tex b/etc/de-refcard.tex index 6572a672fcf..7e0df6e378b 100644 --- a/etc/de-refcard.tex +++ b/etc/de-refcard.tex @@ -1,12 +1,28 @@ -% Reference Card for GNU Emacs version 19 on Unix systems +% Reference Card for GNU Emacs version 22 on Unix systems +% +% Translation into German by Sven Joachim +% %**start of header \newcount\columnsperpage +\newcount\letterpaper % This file can be printed with 1, 2, or 3 columns per page (see below). -% Specify how many you want here. Nothing else needs to be changed. +% Specify how many you want here. -\columnsperpage=2 +\columnsperpage=3 +% Set letterpaper to 0 for A4 paper, 1 for letter (US) paper. Useful +% only when columnsperpage is 2 or 3. + +\letterpaper=0 + +% If you don't have german.sty, you can either get it from CTAN or +% change the \glqq and \grqq commands below. + +\input german.sty +\mdqoff % deactivates the "-char + +% Nothing else needs to be changed below this line. % Copyright (C) 1987, 1993, 1996, 2000, 2002, 2003, 2004, % 2005, 2006 Free Software Foundation, Inc. @@ -43,6 +59,10 @@ % For this you need a dvi device driver that can print sideways. % Which mode to use is controlled by setting \columnsperpage above. % +% To compile and print this document: +% tex de-refcard.tex +% dvips -t landscape de-refcard.dvi +% % Author: % Stephen Gildea % Internet: gildea@stop.mail-abuse.org @@ -52,23 +72,26 @@ % If there were room, it would be nice to see a section on Dired. -\def\versionnumber{2.1} +\def\versionnumber{2.3} \def\year{2006} -\def\version{March \year\ v\versionnumber} \def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. - Permissions on back. v\versionnumber}} + Bedingungen auf der R\"uckseite. v\versionnumber}} \def\copyrightnotice{\vskip 1ex plus 2 fill\begingroup\small \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.} -\centerline{designed by Stephen Gildea, \version} -\centerline{for GNU Emacs version 19 on Unix systems} +\centerline{v\versionnumber{} f\"ur GNU Emacs Version 22, \year} +\centerline{entworfen von Stephen Gildea} +% \centerline{deutsche \"Ubersetzung von Sven Joachim} -Permission is granted to make and distribute copies of -this card provided the copyright notice and this permission notice -are preserved on all copies. +Es ist gestattet, diese Referenzkarte zu vervielf\"altigen und zu +verbreiten, vorausgesetzt dass sich der Copyright-Hinweis und der +Hinweis auf diese Erlaubnis auf allen Kopien befinden. +F\"ur Kopien des Handbuchs zu GNU Emacs schreiben Sie an die Free +Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. \endgroup} @@ -104,9 +127,9 @@ \hsize 3.2in \vsize 7.95in % \hoffset -.75in - \hoffset -.82in + \hoffset -.49in % \voffset -.745in - \voffset -.6in + \voffset -.84in \font\titlefont=cmbx10 \scaledmag2 \font\headingfont=cmbx10 \scaledmag1 \font\smallfont=cmr6 @@ -174,7 +197,7 @@ \chardef\{=`\{ \chardef\}=`\} -\hyphenation{mini-buf-fer} +\hyphenation{Mini-puf-fer} \parindent 0pt \parskip 1ex plus .5ex minus .5ex @@ -190,8 +213,8 @@ % section - new major section. Argument is section name. \outer\def\section#1{\par\filbreak - \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% - \vskip 2ex plus 1ex minus 1.5ex} + \vskip 2ex plus 1.5ex minus 2.5ex {\headingfont #1}\mark{#1}% + \vskip 1.5ex plus 1ex minus 1.5ex} \newdimen\keyindent @@ -250,142 +273,146 @@ %**end of header -\title{GNU Emacs Referenzkarte} +\title{Referenzkarte zu GNU Emacs} -%\centerline{(fuer version 19)} +\centerline{(f\"ur Version 22)} -\section{Emacs Starten} +\section{Emacs starten} -Um GNU Emacs 19 zu starten, tippen Sie ein: \kbd{emacs} +Um GNU Emacs 22 zu starten, geben Sie \kbd{emacs} ein. -Um eine Datei fuers Editieren zu laden, lesen Sie unten weiter. +% Um eine Datei f\"urs Editieren zu laden, lesen Sie unten weiter. -\section{Emacs Verlassen} +\section{Emacs verlassen} -\key{Emacs pausieren lassen}{C-z} +\key{Emacs unterbrechen (unter X: minimieren)}{C-z} \key{Emacs beenden}{C-x C-c} \section{Dateien} -\key{Datei {\bf oeffnen} }{C-x C-f} -\key{Datei {\bf sichern} }{C-x C-s} -\key{{\bf alle} Dateien sichern}{C-x s} -\key{den Inhalt einer anderen Datei {\bf einfuegen}}{C-x i} +\key{Datei {\bf \"offnen} }{C-x C-f} +\key{Datei {\bf speichern} }{C-x C-s} +\key{{\bf alle} Dateien speichern}{C-x s} +\key{den Inhalt einer anderen Datei {\bf einf\"ugen}}{C-x i} \key{diese Datei durch eine andere ersetzen}{C-x C-v} -\key{Datei neu anlegen und speichern}{C-x C-w} -\key{version control ein/auschecken}{C-x C-q} +\key{Puffer in neuer Datei speichern}{C-x C-w} +\key{Nur-Lesen-Modus des Puffers wechseln}{C-x C-q} \section{Hilfe} -Das Hilfesystem ist einfach zu bedienen. Tippen Sie \kbd{C-h} (oder \kbd{F1}). Neulinge tippen \kbd{C-h t} um ein {\bf tutorial} zu starten. +Das Hilfesystem ist einfach zu bedienen. Dr\"ucken Sie \kbd{C-h} (oder +\kbd{F1}). Neulinge dr\"ucken \kbd{C-h t}, um eine {\bf Einf\"uhrung} zu +starten. -\key{Hilfe Fenster entfernen}{C-x 1} -\key{Hilfe Fenster scrollen}{C-M-v} +\key{Hilfefenster entfernen}{C-x 1} +\key{Hilfefenster scrollen}{C-M-v} -\key{apropos: zeigt alle Befehle mit dem Muster}{C-h a} -\key{zeigt die Funktion mit dieser Tastenkomb.}{C-h c} -\key{beschreibt die Funktion}{C-h f} -\key{modusspezifische Information}{C-h m} +\key{Befehle zeigen, die Zeichenkette enthalten}{C-h a} +\key{Tastenkombination beschreiben}{C-h k} +\key{eine Funktion beschreiben}{C-h f} +\key{modusspezifische Informationen}{C-h m} -\section{Was tun wenn nichts mehr geht} +\section{Fehlerbehandlung} \key{{\bf Abbrechen} eines Vorgangs}{C-g} -\metax{{\bf Wiederherstellung} von Dateien}{M-x recover-file} -\key{{\bf rueckgaengig} machen}{C-x u} +\metax{{\bf Wiederherstellung} von Dateien}{M-x recover-session} +\metax{{\"Anderungen \bf r\"uckg\"angig} machen}{C-x u, C-_ {\rm oder} C-/} \metax{Puffer in Ursprungszustand bringen}{M-x revert-buffer} \key{Bildschirmanzeige in Ordnung bringen}{C-l} \section{Inkrementelle Suche} -\key{Suche vorwaerts}{C-s} -\key{Suche rueckwaerts}{C-r} -\key{Suche mit regulaeren Ausdruecken}{C-M-s} -\key{Rueckwaertssuche mit reg. Ausdruecken}{C-M-r} -\key{letzten Suchausdruck auswaehlen}{M-p} -\key{spaeteren Suchausdruck auswaehlen}{M-n} +\key{Suche vorw\"arts}{C-s} +\key{Suche r\"uckw\"arts}{C-r} +\key{Suche mit regul\"aren Ausdr\"ucken}{C-M-s} +\key{R\"uckw\"artssuche mit regul\"aren Ausdr\"ucken}{C-M-r} + +\key{fr\"uheren Suchausdruck ausw\"ahlen}{M-p} +\key{sp\"ateren Suchausdruck ausw\"ahlen}{M-n} \key{inkrementelle Suche beenden}{RET} -\key{ein Suchzeichen zurueckgehen}{DEL} +\key{ein Suchzeichen zur\"uckgehen}{DEL} \key{Suche abbrechen}{C-g} -Wiederholtes Druecken von \kbd{C-s} oder \kbd{C-r} sucht weitere Treffer. +Wiederholtes Dr\"ucken von \kbd{C-s} oder \kbd{C-r} sucht weitere Treffer. Wenn Emacs sucht, unterbricht \kbd{C-g} nur die jeweils letzte Suche. \shortcopyrightnotice -\section{Cursor Bewegung} +\section{Cursor-Bewegung} \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr -\threecol{{\bf Textteile ueberspringen}}{{\bf rueckw.}}{{\bf vorw.}} +\threecol{{\bf Textteile \"uberspringen}}{{\bf r\"uckw.}}{{\bf vorw.}} \threecol{Zeichen}{C-b}{C-f} \threecol{Wort}{M-b}{M-f} \threecol{Zeile}{C-p}{C-n} -\threecol{zum Zeilenende springen}{C-a}{C-e} +\threecol{zum Zeilenanfang (oder -ende) springen}{C-a}{C-e} \threecol{Satz}{M-a}{M-e} \threecol{Paragraph}{M-\{}{M-\}} \threecol{Seite}{C-x [}{C-x ]} \threecol{Lisp-s-expression}{C-M-b}{C-M-f} \threecol{Funktion}{C-M-a}{C-M-e} -\threecol{zum Pufferanfang (oder Ende)springen}{M-<}{M->} +\threecol{zum Pufferanfang (oder -ende) springen}{M-<}{M->} } -\key{eine Bildschirmseite runter scrollen}{C-v} +\key{eine Bildschirmseite herunter scrollen}{C-v} \key{eine Bildschirmseite hoch scrollen}{M-v} \key{nach links scrollen}{C-x <} \key{nach rechts scrollen}{C-x >} -\key{Cursorzeile in die Bildschirmmitte scrollen}{C-u C-l} +\key{Cursor-Zeile in die Bildschirmmitte scrollen}{C-u C-l} -\section{Loeschen} +\section{L\"oschen und Ausschneiden} \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr -\threecol{{\bf Textteile }}{{\bf rueckwaerts}}{{\bf vorwaerts}} -\threecol{Zeichen (loeschen)}{DEL}{C-d} +\threecol{{\bf Textteile ausschneiden}}{{\bf r\"uckw.}}{{\bf vorw.}} +\threecol{Zeichen (l\"oschen, nicht ausschneiden)}{DEL}{C-d} \threecol{Wort}{M-DEL}{M-d} \threecol{Zeile (bis zum Ende)}{M-0 C-k}{C-k} \threecol{Satz}{C-x DEL}{M-k} \threecol{Lisp-s-expression}{M-- C-M-k}{C-M-k} } -\key{{\bf Bereiche} loeschen}{C-w} +\key{{\bf Bereich} ausschneiden}{C-w} \key{Bereich in die Ablage kopieren}{M-w} -\key{Bis zum {\it Zeichen} loeschen }{M-z {\it Zeichen}} -\key{letztes geloeschtes Zeichen einsetzen}{C-y} -\key{eins davor einsetzen}{M-y} +\key{bis zum {\it Zeichen} ausschneiden }{M-z {\it Zeichen}} +\key{zuletzt ausgeschnittenen Text einf\"ugen}{C-y} +\key{vorher ausgeschnittenen Text einf\"ugen}{M-y} \section{Markieren} -\key{Marke setzen}{C-@ {\rm or} C-SPC} -\key{zwischen Cursor und Marke wechseln}{C-x C-x} +\key{Marke setzen}{C-@ {\rm oder}\thinspace\thinspace{}C-SPC} % H\"asslich, aber +% Leerzeichen statt \thinspace erzeugt overfull \hbox. @#$?*&! +\key{Cursor und Marke austauschen}{C-x C-x} \key{Marke {\it Argument\/} {\bf Worte} entfernt setzen}{M-@} \key{{\bf Paragraph} markieren}{M-h} \key{{\bf Seite} markieren}{C-x C-p} \key{{\bf Lisp-s-expression} markieren}{C-M-@} -\key{{\bf Funktion} markiern}{C-M-h} +\key{{\bf Funktion} markieren}{C-M-h} \key{den ganzen {\bf Puffer} markieren}{C-x h} \section{Interaktives Ersetzen} \key{Zeichenkette interaktiv ersetzen}{M-\%} -\metax{mit regulaeren Ausdruecken}{M-x query-replace-regexp} +\metax{mit regul\"aren Ausdr\"ucken}{M-x query-replace-regexp} -Moegliche Antworten in diesem Modus: +M\"ogliche Antworten in diesem Modus: -\key{dies {\bf ersetzten} und zum naechsten gehen}{SPC} -\key{dies ersetzen}{,} -\key{dies {\bf ueberspringen}, zum naechsten gehen}{DEL} +\key{dies {\bf ersetzen} und zum n\"achsten gehen}{SPC} +\key{dies ersetzen und nicht weitergehen}{,} +\key{dies {\bf \"uberspringen}, zum n\"achsten gehen}{DEL} \key{alle verbleibenden Treffer ersetzen}{!} -\key{eine Ersetzung{\bf rueckgaengig} machen }{^} -\key{interaktiven Modus{\bf verlassen}}{RET} -\key{rekursiven Modus starten (\kbd{C-M-c} verlassen)}{C-r} +\key{zum vorherigen Treffer {\bf zur\"uckgehen} }{^} +\key{interaktives Ersetzen {\bf beenden}}{RET} +\key{rekursives Editieren starten (\kbd{C-M-c} beendet)}{C-r} \section{Mehrere Fenster} -Die zweite Tastenk. bezieht sich immer auf das andere Fenster: - -\key{alle anderen Fenster in den Hintergrund}{C-x 1} +Wenn zwei Befehle angezeigt werden, ist der zweite ein \"ahn\-li\-cher f\"ur +einen Rahmen statt eines Fensters. {\setbox0=\hbox{\kbd{0}}\advance\hsize by 0\wd0 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr +\threecol{alle anderen Fenster schlie\ss{}en}{C-x 1\ \ \ \ }{C-x 5 1} \threecol{Fenster vertikal teilen}{C-x 2\ \ \ \ }{C-x 5 2} -\threecol{dieses Fenster loeschen}{C-x 0\ \ \ \ }{C-x 5 0} +\threecol{dieses Fenster schlie\ss{}en}{C-x 0\ \ \ \ }{C-x 5 0} }} \key{Fenster horizontal teilen}{C-x 3} @@ -393,252 +420,273 @@ \section{Mehrere Fenster} {\setbox0=\hbox{\kbd{0}}\advance\hsize by 2\wd0 \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr -\threecol{ins andere Fenster wechseln}{C-x o}{C-x 5 o} +\threecol{in anderes Fenster wechseln}{C-x o}{C-x 5 o} -\threecol{Puffer in ein anderes Fenster bringen}{C-x 4 b}{C-x 5 b} -\threecol{Puffer in einem anderen Fenster darstellen}{C-x 4 C-o}{C-x 5 C-o} -\threecol{Datei in ein anderes Fenster oeffnen}{C-x 4 f}{C-x 5 f} -\threecol{Datei im Ansichtmodus in anderem Fenster oeffnen}{C-x 4 r}{C-x 5 r} -\threecol{Dired in einem anderen Fenster oeffnen}{C-x 4 d}{C-x 5 d} -\threecol{Tag in einem anderen Fenster finden}{C-x 4 .}{C-x 5 .} +\threecol{Puffer in and. Fenster ausw\"ahlen}{C-x 4 b}{C-x 5 b} +\threecol{Puffer in anderem Fenster anzeigen}{C-x 4 C-o}{C-x 5 C-o} +\threecol{Datei in anderem Fenster \"offnen}{C-x 4 f}{C-x 5 f} +\threecol{Datei in anderem Fenster anzeigen}{C-x 4 r}{C-x 5 r} +\threecol{Dired in anderem Fenster starten}{C-x 4 d}{C-x 5 d} +\threecol{Tag in anderem Fenster finden}{C-x 4 .}{C-x 5 .} }} -\key{Fenster vergroessern}{C-x ^} -\key{Fenster schmaler machen}{C-x \{} -\key{Fenster breiter machen}{C-x \}} +\key{Fenster vergr\"o\ss{}ern}{C-x ^} +\key{Fenster verengen}{C-x \{} +\key{Fenster verbreitern}{C-x \}} -\section{Formattierung} +\section{Formatierung} -\key{{\bf Zeile} (modusabhaengig) einruecken}{TAB} -\key{{\bf Bereich} (modusabh.) einruecken}{C-M-\\} -\key{{\bf Lisp-s-expression} (modusabh.) einruecken}{C-M-q} -\key{Bereich {\it Argument\/} Spalten einruecken}{C-x TAB} -\key{Zeilenumbruch nach Cursor einfuegen}{C-o} +\key{{\bf Zeile} (modusabh\"angig) einr\"ucken}{TAB} +\key{{\bf Bereich} (modusabh\"angig) einr\"ucken}{C-M-\\} +\key{{\bf Lisp-s-expression} (modusabh.) einr\"ucken}{C-M-q} +\key{Bereich {\it Argument\/} Spalten einr\"ucken}{C-x TAB} + +\key{Zeilenumbruch nach Cursor einf\"ugen}{C-o} \key{Zeilenrest vertikal nach unten verschieben}{C-M-o} -\key{Leerzeilen um Cursorposition loeschen}{C-x C-o} -\key{Zeile mit letzter verbinden (Arg. naechster)}{M-^} -\key{Leerzeichen an Cursorposition loeschen}{M-\\} -\key{ein Leerzeichen an Cursorposition setzen}{M-SPC} -\key{Paragraph auffuellen}{M-q} -\key{Fuell Spalte setzen}{C-x f} -\key{Praefix setzen fuer jede Zeile}{C-x .} -\key{Zeichendarstellung setzen}{M-g} +\key{Leerzeilen um Cursor-Position l\"oschen}{C-x C-o} +\key{Zeile mit voriger verbinden (Arg. n\"achste)}{M-^} +\key{alle Leerzeichen um Cursor-Position l\"oschen}{M-\\} +\key{genau ein Leerzeichen an Cursor-Position}{M-SPC} -\section{Gross-Kleinbuchstaben} +\key{Paragraph auff\"ullen}{M-q} +\key{Spalte f\"ur Umbruch setzen}{C-x f} +\key{Pr\"afix f\"ur jede Zeile setzen}{C-x .} -\key{Wort in Grossbuchstaben}{M-u} +\key{Face setzen}{M-o} + +\section{Gro\ss{}- und Kleinschreibung} + +\key{Wort in Gro\ss{}buchstaben}{M-u} \key{Wort in Kleinbuchstaben}{M-l} -\key{Word mit grossen Anfangsbuchstaben}{M-c} +\key{Wort mit gro\ss{}em Anfangsbuchstaben}{M-c} -\key{Bereich in Grossbuchstaben}{C-x C-u} +\key{Bereich in Gro\ss{}buchstaben}{C-x C-u} \key{Bereich in Kleinbuchstaben}{C-x C-l} \section{Der Minipuffer} -Die folgenden Tastenkombination gelten im Minipuffer: +Die folgenden Tastenkombinationen gelten im Minipuffer: -\key{so viel wie moeglich ergaenzen}{TAB} -\key{ein Wort ergaenzen}{SPC} -\key{ergaenzen und ausfuehren}{RET} -\key{moegliche Ergaenzungen zeigen}{?} -\key{letzte Eingabe wiederanzeigen}{M-p} -\key{spaetere Eingabe wiederanzeigen}{M-n} -\key{reg. Ausd. rueckwaerts in History suchen}{M-r} -\key{reg. Ausd. vorwaerts in History suchen}{M-s} -\key{Vorgang unterbrechen}{C-g} +\key{so weit wie m\"oglich erg\"anzen}{TAB} +\key{ein Wort erg\"anzen}{SPC} +\key{erg\"anzen und ausf\"uhren}{RET} +\key{m\"ogliche Erg\"anzungen zeigen}{?} +\key{letzte Eingabe zur\"uckholen}{M-p} +\key{sp\"atere Eingabe zur\"uckholen}{M-n} +\key{reg. Ausd. r\"uckw\"arts in History suchen}{M-r} +\key{reg. Ausd. vorw\"arts in History suchen}{M-s} +\key{Befehl abbrechen}{C-g} -Tippen Sie \kbd{C-x ESC ESC} um den letzten Befehl zu editieren und zu wiederholen der im Minipuffer ausgefuehrt wurde. +Dr\"ucken Sie \kbd{C-x ESC ESC}, um den letzten Befehl zu bearbeiten +und zu wiederholen, der im Minipuffer aus\-gef\"uhrt wurde. Dr\"u\-cken Sie +\kbd{F10}, um die Men\"u\-zei\-le im Minipuffer zu aktivieren. \newcolumn -\title{GNU Emacs Referenzkarte} +\title{Referenzkarte zu GNU Emacs} \section{Puffer} -\key{anderen Puffer auswaehlen}{C-x b} -\key{alle Puffer anzeigen}{C-x C-b} -\key{Puffer loeschen}{C-x k} +\key{anderen Puffer ausw\"ahlen}{C-x b} +\key{Liste aller Puffer anzeigen}{C-x C-b} +\key{einen Puffer schlie\ss{}en}{C-x k} \section{Vertauschen} -\key{ {\bf Zeichen} vertauschen}{C-t} -\key{ {\bf Worte} vertauschen}{M-t} -\key{ {\bf Zeilen} vertauschen}{C-x C-t} -\key{ {\bf Lisp-s-expressions} vertauschen}{C-M-t} +\key{{\bf Zeichen} vertauschen}{C-t} +\key{{\bf Worte} vertauschen}{M-t} +\key{{\bf Zeilen} vertauschen}{C-x C-t} +\key{{\bf Lisp-s-expressions} vertauschen}{C-M-t} -\section{Rechtschreibkorrrektur} +\section{Rechtschreibpr\"ufung} -\key{Ueberpruefe aktuelles Wort}{M-\$} -\metax{Ueberpruefe alle Woerter in Bereich}{M-x ispell-region} -\metax{Ueberpruefe den gesamten Bereich}{M-x ispell-buffer} +\key{aktuelles Wort \"uberpr\"ufen}{M-\$} +\metax{alle W\"orter im Bereich \"uberpr\"ufen}{M-x ispell-region} +\metax{gesamten Puffer \"uberpr\"ufen}{M-x ispell-buffer} \section{Tags} \key{Tag finden (Definition)}{M-.} -\key{Naechstes Vorkommen von Tag finden}{C-u M-.} -\metax{Neue Tags Datei angeben}{M-x visit-tags-table} -\metax{Regulaere Ausdruck Suche in Dateien}{M-x tags-search} -\metax{Interakt. Ersetzen in allen Dateien}{M-x tags-query-replace} -\key{Letzte Tag Suche oder Ersetzen nochmal}{M-,} +\key{n\"achstes Vorkommen von Tag finden}{C-u M-.} +\metax{neue Tagsdatei angeben}{M-x visit-tags-table} + +\metax{regul\"aren Ausdruck in Dateien suchen}{M-x tags-search} +\metax{interakt. Ersetzen in allen Dateien}{M-x tags-query-replace} +\key{letztes Suchen oder Ersetzen fortsetzen}{M-,} \section{Shells} -\key{Shell Kommando ausfuehren}{M-!} -\key{Shell Kommando fuer bereich ausfuehren}{M-|} -\key{Bereich durch Shell Kommando filtern}{C-u M-|} -\metax{Shell im Fenster \kbd{*shell*} starten}{M-x shell} +\key{Shellbefehl ausf\"uhren}{M-!} +\key{Shellbefehl f\"ur Bereich ausf\"uhren}{M-|} +\key{Bereich durch Shellbefehl filtern}{C-u M-|} +\metax{eine Shell im Fenster \kbd{*shell*} starten}{M-x shell} \section{Rechtecke} -\key{Kopiere Rechteck in Register}{C-x r r} -\key{Loesche Rechteck}{C-x r k} -\key{Rechteck einsetzen}{C-x r y} -\key{Rechteck aufmachen, Text nach rechts}{C-x r o} -\key{Rechteck mit Leerzeichen ueberschreiben}{C-x r c} -\key{Praefix vor jede Zeile setzen}{C-x r t} +\key{Rechteck in Register kopieren}{C-x r r} +\key{Rechteck ausschneiden}{C-x r k} +\key{Rechteck einf\"ugen}{C-x r y} +\key{Rechteck \"offnen, Text nach rechts}{C-x r o} +\key{Rechteck mit Leerzeichen \"uberschreiben}{C-x r c} +\key{Pr\"afix vor jede Zeile setzen}{C-x r t} -\section{Abkuerzungen} +\section{Abk\"urzungen} -\key{globale Abkuerzung hinzufuegen}{C-x a g} -\key{modusabhaengige Abkuerzung hinzufuegen}{C-x a l} -\key{globale Expansion fuer Abk. definieren}{C-x a i g} -\key{modusabhaengige Abkuerzung definieren}{C-x a i l} -\key{explizites Expandieren}{C-x a e} -\key{letztes Wort dynamisch expandieren}{M-/} +\key{globale Abk\"urzung hinzuf\"ugen}{C-x a g} +\key{modusabh\"angige Abk\"urzung hinzuf\"ugen}{C-x a l} +\key{globalen Ersetzungstext f\"ur Abk. definieren}{C-x a i g} +\key{modusabh. Ersetzungstext f\"ur Abk. def.}{C-x a i l} +\key{Abk\"urzung explizit ausschreiben}{C-x a e} -\section{Regulaere Ausdruecke} +\key{letztes Wort dynamisch ausschreiben}{M-/} -\key{jedes Zeichen ausser Zeilenumbruch}{. {\rm(Punkt)}} -\key{Null oder mehr Wiederholungen}{*} -\key{Eine oder mehr Wiederholungen}{+} -\key{Null oder eine Wiederholung}{?} -\key{jedes Zeichen in der Menge}{[ {\rm$\ldots$} ]} -\key{jedes Zeichen nicht in der Menge}{[^ {\rm$\ldots$} ]} -\key{Zeilenanfang}{^} -\key{Zeilenende}{\$} -\key{spezielles Zeichen maskieren {\it c\/}}{\\{\it c}} -\key{Alternative (``oder'')}{\\|} +\section{Regul\"are Ausdr\"ucke} + +\key{jedes einzelne Zeichen au\ss{}er Zeilenumbruch}{. {\rm(Punkt)}} +\key{null oder mehr Wiederholungen}{*} +\key{eine oder mehr Wiederholungen}{+} +\key{null oder eine Wiederholung}{?} +\key{Spezialzeichen {\it c\/} maskieren}{\\{\it c}} +\key{Alternative (\glqq oder\grqq )}{\\|} \key{Gruppe}{\\( {\rm$\ldots$} \\)} -\key{{\it n\/}te Gruppe}{\\{\it n}} -\key{Pufferanfang}{\\`} -\key{Pufferende}{\\'} -\key{Wortzwischenraum}{\\b} -\key{Weder Anfang noch Ende eines Wortes}{\\B} -\key{Wortanfang}{\\<} -\key{Wortende}{\\>} -\key{jedes Wort-Syntax Zeichen}{\\w} -\key{jedes Nicht-Wort-Syntax Zeichen}{\\W} -\key{Zeichen mit Syntax {\it c}}{\\s{\it c}} -\key{Zeichen nicht mit Syntax {\it c}}{\\S{\it c}} +\key{gleicher Text wie {\it n\/}te Gruppe}{\\{\it n}} +\key{Anfang oder Ende eines Wortes}{\\b} +\key{weder Anfang noch Ende eines Wortes}{\\B} -\section{Register} +% \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr +% \threecol{{\bf Einheit}}{{\bf passt am Anfang}\hskip-1.5ex}{{\bf passt am Ende}} +% \threecol{Zeile}{^}{\$} +% \threecol{Wort}{\\<}{\\>} +% \threecol{Puffer}{\\`}{\\'} -\key{Region in Register speichern}{C-x r s} -\key{Register Inhalt in Puffer einfuegen}{C-x r i} -\key{Cursorposition in Register speichern}{C-x r SPC} -\key{Springe zur abgespeicherten Position}{C-x r j} +% \threecol{{\bf Zeichenklasse}}{{\bf passt auf diese}}{{\bf passt auf andere}} +% \threecol{Explizite Menge}{[ {\rm$\ldots$} ]}{[^ {\rm$\ldots$} ]} +% \threecol{Wortsyntax-Zeichen\hskip-10ex}{\\w}{\\W} +% \threecol{Zeichen mit Syntax {\it c}\hskip-2.5ex}{\\s{\it c}}{\\S{\it c}} +% } + +\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr +\threecol{{\bf Einheit}}{{\bf passt am Anf.}}{{\bf passt am Ende}} +\threecol{Zeile}{^}{\$} +\threecol{Wort}{\\<}{\\>} +\threecol{Puffer}{\\`}{\\'} + +\threecol{{\bf Zeichenklasse}}{{\bf passt auf diese}}{{\bf passt auf and.}} +\threecol{Explizite Menge}{[ {\rm$\ldots$} ]}{[^ {\rm$\ldots$} ]} +\threecol{Wortsyntax-Zeichen}{\\w}{\\W} +\threecol{Zeichen mit Syntax {\it c}}{\\s{\it c}}{\\S{\it c}} +} + +\section{Internationale Zeichens\"atze} + +\key{Hauptsprache einstellen}{C-x RET l} +\metax{Alle Eingabemethoden anzeigen}{M-x list-input-methods} +\key{Eingabemethode in oder au\ss{}er Kraft setzen}{C-\\} +\key{Kodierung f\"ur n\"achsten Befehl setzen}{C-x RET c} +\metax{Alle Kodierungen anzeigen}{M-x list-coding-systems} +\metax{bevorzugte Kodierung ausw\"ahlen}{M-x prefer-coding-system} \section{Info} -\key{Info starten}{C-h i} +\key{Info-Betrachter starten}{C-h i} +\key{Funktion oder Variable in Info finden}{C-h S} \beginindentedkeys Bewegung innerhalb eines Knotens: -\key{vorwaerts scrollen}{SPC} -\key{rueckwaerts scrollen}{DEL} -\key{zum Anfang eines Knotens}{. {\rm (dot)}} +\key{vorw\"arts scrollen}{SPC} +\key{r\"uckw\"arts scrollen}{DEL} +\key{zum Anfang eines Knotens}{. {\rm (Punkt)}} Bewegung zwischen Knoten: -\key{{\bf naechster} Knoten}{n} +\key{{\bf n\"achster} Knoten}{n} \key{{\bf vorheriger} Knoten}{p} \key{nach {\bf oben}}{u} -\key{Menue Element ueber Namen auswaehlen}{m} -\key{{\it n\/}ten Menueeintrag auswaehlen (1--9)}{{\it n}} -\key{Kreuzverweis folgen (zurueck mit \kbd{l})}{f} -\key{zurueck zum letzten gesehenen Knoten}{l} -\key{zurueck zum Verzeichnisknoten}{d} -\key{Knoten ueber Namen auswaehlen}{g} +\key{Men\"ueintrag \"uber Namen ausw\"ahlen}{m} +\key{{\it n\/}ten Men\"ueintrag ausw\"ahlen (1--9)}{{\it n}} +\key{Querverweis folgen (zur\"uck mit \kbd{l})}{f} +\key{zur\"uck zum letzten gesehenen Knoten}{l} +\key{zur\"uck zum Verzeichnisknoten}{d} +\key{zum Anfangsknoten der aktuellen Datei}{t} +\key{beliebigen Knoten \"uber Namen ausw\"ahlen}{g} -Sonstige: +Sonstiges: -\key{Info {\bf Tutorial} starten}{h} -\key{Begriff in den Indices suchen}{i} -\key{Knoten nach reg. Ausd. durchsuchen}{s} +\key{{\bf Einf\"uhrung} in Info starten}{h} +\key{Begriff in den Indizes suchen}{i} +\key{nach regul\"aren Ausdr\"ucken suchen}{s} \key{Info {\bf verlassen} }{q} \endindentedkeys -\section{Tastatur Makros} +\section{Register} -\key{Tastatur Makro Definition {\bf starten} }{C-x (} -\key{Tastatur Makro Definition {\bf beenden} }{C-x )} -\key{zuletzt definiertes Tast. Makro {\bf ausfuehren}}{C-x e} -\key{an letztes Tastatur Makro anhaengen}{C-u C-x (} -\metax{letztes Tastatur Makro benennen}{M-x name-last-kbd-macro} -\metax{Lisp Definition in Puffer einfuegen}{M-x insert-kbd-macro} +\key{Region in Register speichern}{C-x r s} +\key{Registerinhalt in Puffer einf\"ugen}{C-x r i} +\key{Cursor-Position in Register speichern}{C-x r SPC} +\key{zu abgespeicherter Position springen}{C-x r j} -\section{Kommandos fuer Emacs Lisp} +\section{Tastaturmakros} -\key{{\bf Lisp-s-expression} vor Cursor laden}{C-x C-e} +\key{Makrodefinition {\bf starten} }{C-x (} +\key{Makrodefinition {\bf beenden} }{C-x )} +\key{zuletzt definiertes Makro {\bf ausf\"uhren}}{C-x e} +\key{an letztes Makro anh\"angen}{C-u C-x (} +\metax{letztes Makro benennen}{M-x name-last-kbd-macro} +\metax{Lispcode f\"ur Makro in Puffer einf\"ugen}{M-x insert-kbd-macro} + +\section{Befehle f\"ur Emacs-Lisp} + +\key{{\bf Lisp-s-expression} vor Cursor auswerten}{C-x C-e} \key{aktuelle {\bf Definition} auswerten}{C-M-x} \metax{{\bf Bereich} auswerten}{M-x eval-region} -\metax{gesamten {\bf Puffer} auswerten}{M-x eval-current-buffer} -\key{Lispausdruck im Minipuffer auswerten}{M-:} -\key{letztes Minipufferkommando auswerten}{C-x ESC ESC} -\metax{Emacs Lisp Datei lesen und auswerten}{M-x load-file} -\metax{aus Standard Systemverzeichnis laden}{M-x load-library} +\key{Lisp-Ausdruck im Minipuffer auswerten}{M-:} +\metax{Datei aus Standardverzeichnis laden}{M-x load-library} -\section{Einfaches Konfigurieren} +\section{Einfache Anpassungen} -% Das ist nur was fuer Leute die Lisp beherrschen +\metax{Variablen und Faces anpassen}{M-x customize} -Ein Beispiel dafuer, wie man Tastenkombinationen definiert: +% Das ist nur was f\"ur Leute die Lisp beherrschen + +Tastenkombinationen definieren (Beispiele): \beginexample% (global-set-key "\\C-cg" 'goto-line) -(global-set-key "\\C-x\\C-k" 'kill-region) (global-set-key "\\M-\#" 'query-replace-regexp) \endexample -So weist man in Emacs Lisp einer Variablen Werte zu: +\section{Eigene Befehle schreiben} \beginexample% -(setq backup-by-copying-when-linked t) -\endexample - -\section{Selbst Kommandos schreiben} - -\beginexample% -(defun \ (\) - "\" - (interactive "\