Mercurial > emacs
changeset 83466:9bec09743395
Merged from
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-38
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-39
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-40
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-506
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Fri, 03 Feb 2006 15:24:23 +0000 |
parents | 3ec9cf0f2305 (current diff) 2bbc3753aa7e (diff) |
children | d04d8ccb3c41 |
files | etc/TODO lisp/ChangeLog lisp/international/mule-cmds.el lisp/net/newsticker.el lisp/net/rcirc.el man/ChangeLog |
diffstat | 17 files changed, 309 insertions(+), 123 deletions(-) [+] |
line wrap: on
line diff
--- a/INSTALL.CVS Fri Feb 03 14:44:51 2006 +0000 +++ b/INSTALL.CVS Fri Feb 03 15:24:23 2006 +0000 @@ -25,18 +25,17 @@ (If you want to install the Emacs binary, type "make install" instead of "make" in the last command.) -Occasionally the files "lisp/loaddefs.el" or lisp/mh-e/mh-loaddefs.el -will need be updated to reflect new autoloaded functions. If you see -errors about undefined lisp functions during compilation, that may be -the reason. Another symptom may be an error saying that "loaddefs.el" -could not be found; this is due to a change in the way loaddefs.el was -handled in CVS, and should only happen once, for users that are -updating old CVS trees. +Occasionally the file "lisp/loaddefs.el" will need be updated to +reflect new autoloaded functions. If you see errors about undefined +lisp functions during compilation, that may be the reason. Another +symptom may be an error saying that "loaddefs.el" could not be found; +this is due to a change in the way loaddefs.el was handled in CVS, and +should only happen once, for users that are updating old CVS trees. -To update loaddefs.el and mh-loaddefs.el, do: +To update loaddefs.el, do: $ cd lisp - $ make autoloads mh-autoloads EMACS=../src/emacs + $ make autoloads EMACS=../src/emacs If either of the above partial procedures fails, try "make bootstrap".
--- a/etc/TODO Fri Feb 03 14:44:51 2006 +0000 +++ b/etc/TODO Fri Feb 03 15:24:23 2006 +0000 @@ -123,6 +123,9 @@ * Other features we would like: +** Create a category of errors called `user-error' for errors which are +typically due to pilot errors and should thus be in debug-ignored-errors. + ** Give Tar mode all the features of Archive mode. ** Create a category of errors called `process-error' @@ -422,6 +425,9 @@ "japanese". Currently, most Japanese users are using external packages (e.g. tamago, anthy) or an input method via XIM. +** Let LEIM handle the Mode_switch key like XIM does (i.e. a toggle like C-\ +but which can also be used as a modifier). + ** Provide the toolbar on ttys. This could map a bit like tmm-menubar for the menubar and buttons could look a bit like those used by customize.
--- a/lisp/ChangeLog Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/ChangeLog Fri Feb 03 15:24:23 2006 +0000 @@ -1,3 +1,29 @@ +2006-02-03 Jens Petersen <petersen@redhat.com> (tiny change) + + * international/mule-cmds.el (set-locale-environment): Add + "/usr/share/X11/locale/locale.alias" to search list for xorg-x11 + libX11. + +2006-02-03 Joe Wells <jbw@macs.hw.ac.uk> (tiny change) + + * arc-mode.el (archive-maybe-copy): Fix the way directories in the + archive are created in archive-tmpdir. + +2006-02-02 John Paul Wallington <jpw@pobox.com> + + * ibuffer.el (ibuffer-compressed-file-name-regexp): New defcustom. + (ibuffer-fontification-alist): Use it. + (ibuffer-mode-map): Bind `ibuffer-mark-compressed-file-buffers' + to "* z" and the Ibuffer Mark menu. + + * ibuf-ext.el (ibuffer-mark-compressed-file-buffers): New command. + +2006-02-02 Stefan Monnier <monnier@iro.umontreal.ca> + + * textmodes/table.el (*table--cell-describe-mode) + (*table--cell-describe-bindings): Undo last change since + print-help-return-message is not obsoleted by anything at all. + 2006-02-02 Luc Teirlinck <teirllm@auburn.edu> * emulation/cua-base.el (cua-mode): Doc fix. @@ -19,13 +45,26 @@ (hi-lock-file-patterns-range): Fix typos in docstrings. * savehist.el (savehist-loaded, savehist-load, savehist-install) - (savehist-autosave, savehist-trim-history): Fix typos in - docstrings. + (savehist-autosave, savehist-trim-history): Fix typos in docstrings. * mail/mailclient.el (mailclient-place-body-on-clipboard-flag): Fix typo in docstring. - * net/rcirc.el (rcirc-debug): Fix docstring. + * net/newsticker.el (newsticker--decode-iso8601-date) + (newsticker--set-customvar, newsticker--buffer-insert-item) + (newsticker--do-run-auto-mark-filter) + (newsticker--parse-generic-feed): Doc fixes. + (newsticker--retrieval-timer-list, newsticker-url-list) + (newsticker-hide-immortal-items-in-echo-area) + (newsticker-hide-obsolete-items-in-echo-area) + (newsticker-new-item-face, newsticker--enclosure) + (newsticker-buffer-update, newsticker-w3m-show-inline-images) + (newsticker--parse-atom-0.3, newsticker--parse-rss-1.0) + (newsticker--parse-generic-feed, newsticker--cache-contains) + (newsticker--stat-num-items, newsticker-download-enclosures): + Fix typos in docstrings. + + * net/rcirc.el (rcirc-debug): Doc fix. (rcirc-fill-column, rcirc-receive-message-hooks) (rcirc-browse-url-map, rcirc-read-only-flag, rcirc-prompt) (rcirc-mode, rcirc-generate-new-buffer-name) @@ -33,6 +72,7 @@ (rcirc-cmd-ignore, rcirc-browse-url, rcirc-url-regexp): Fix typos in docstrings. (rcirc-print): "?\ " -> "?\s". + (rcirc-cmd-join): Improve argument/docstring consistency. 2006-02-01 Mark A. Hershberger <mah@everybody.org> @@ -66,7 +106,7 @@ 2006-01-31 Richard M. Stallman <rms@gnu.org> * replace.el (multi-occur): Doc fix. - (multi-occur-in-matching-buffers): Renamed from + (multi-occur-in-matching-buffers): Rename from multi-occur-by-filename-regexp. Prefix arg says match buffer names instead of file names.
--- a/lisp/arc-mode.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/arc-mode.el Fri Feb 03 15:24:23 2006 +0000 @@ -800,17 +800,13 @@ (archive-name (or (and archive-subfile-mode (aref archive-subfile-mode 0)) archive))) - (make-directory archive-tmpdir t) - ;; If ARCHIVE includes leading directories, make sure they - ;; exist under archive-tmpdir. - (let ((arch-dir (file-name-directory archive))) - (if arch-dir - (make-directory (concat - (file-name-as-directory archive-tmpdir) - arch-dir) - t))) (setq archive-local-name (archive-unique-fname archive-name archive-tmpdir)) + ;; Maked sure all the leading directories in + ;; archive-local-name exist under archive-tmpdir, so that + ;; the directory structure recorded in the archive is + ;; reconstructed in the temporary directory. + (make-directory (file-name-directory archive-local-name) t) (save-restriction (widen) (write-region start (point-max) archive-local-name nil 'nomessage))
--- a/lisp/erc/ChangeLog Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/erc/ChangeLog Fri Feb 03 15:24:23 2006 +0000 @@ -1,3 +1,8 @@ +2006-02-03 Zhang Wei <id.brep@gmail.com> (tiny change) + + * erc.el (erc-version-string): Don't hard-code Emacs version. + (erc-version): Use emacs-version. + 2006-01-30 Simon Josefsson <jas@extundo.com> * erc.el (erc-open-ssl-stream): Use tls.el.
--- a/lisp/erc/erc.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/erc/erc.el Fri Feb 03 15:24:23 2006 +0000 @@ -66,7 +66,7 @@ ;;; Code: -(defconst erc-version-string "Version 5.1 (Emacs 22)" +(defconst erc-version-string "Version 5.1" "ERC version. This is used by function `erc-version'.") (eval-when-compile (require 'cl)) @@ -5774,7 +5774,7 @@ If optional argument HERE is non-nil, insert version number at point." (interactive "P") (let ((version-string - (format "ERC %s" erc-version-string))) + (format "ERC %s (GNU Emacs %s)" erc-version-string emacs-version))) (if here (insert version-string) (if (interactive-p)
--- a/lisp/ibuf-ext.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/ibuf-ext.el Fri Feb 03 15:24:23 2006 +0000 @@ -1,7 +1,7 @@ ;;; ibuf-ext.el --- extensions for ibuffer ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005 Free Software Foundation, Inc. +;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Colin Walters <walters@verbum.org> ;; Maintainer: John Paul Wallington <jpw@gnu.org> @@ -1449,6 +1449,17 @@ (memq major-mode ibuffer-help-buffer-modes))))) ;;;###autoload +(defun ibuffer-mark-compressed-file-buffers () + "Mark buffers whose associated file is compressed." + (interactive) + (ibuffer-mark-on-buffer + #'(lambda (buf) + (with-current-buffer buf + (and buffer-file-name + (string-match ibuffer-compressed-file-name-regexp + buffer-file-name)))))) + +;;;###autoload (defun ibuffer-mark-old-buffers () "Mark buffers which have not been viewed in `ibuffer-old-time' days." (interactive)
--- a/lisp/ibuffer.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/ibuffer.el Fri Feb 03 15:24:23 2006 +0000 @@ -1,7 +1,7 @@ ;;; ibuffer.el --- operate on buffers like dired ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, -;; 2005 Free Software Foundation, Inc. +;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Colin Walters <walters@verbum.org> ;; Maintainer: John Paul Wallington <jpw@gnu.org> @@ -142,12 +142,16 @@ (defcustom ibuffer-fontification-alist `((10 buffer-read-only font-lock-constant-face) - (15 (string-match "^*" (buffer-name)) font-lock-keyword-face) - (20 (and (string-match "^ " (buffer-name)) + (15 (and buffer-file-name + (string-match ibuffer-compressed-file-name-regexp + buffer-file-name)) + font-lock-doc-face) + (20 (string-match "^*" (buffer-name)) font-lock-keyword-face) + (25 (and (string-match "^ " (buffer-name)) (null buffer-file-name)) italic) - (25 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face) - (30 (eq major-mode 'dired-mode) font-lock-function-name-face)) + (30 (memq major-mode ibuffer-help-buffer-modes) font-lock-comment-face) + (35 (eq major-mode 'dired-mode) font-lock-function-name-face)) "An alist describing how to fontify buffers. Each element should be of the form (PRIORITY FORM FACE), where PRIORITY is an integer, FORM is an arbitrary form to evaluate in the @@ -320,6 +324,14 @@ :type '(repeat function) :group 'ibuffer) +(defcustom ibuffer-compressed-file-name-regexp + (concat "\\.\\(" + (regexp-opt '("arj" "bgz" "bz2" "gz" "lzh" "taz" "tgz" "zip" "z")) + "\\)$") + "Regexp to match compressed file names." + :type 'regexp + :group 'ibuffer) + (defcustom ibuffer-hook nil "Hook run when `ibuffer' is called." :type 'hook @@ -403,6 +415,7 @@ (define-key map (kbd "* /") 'ibuffer-mark-dired-buffers) (define-key map (kbd "* e") 'ibuffer-mark-dissociated-buffers) (define-key map (kbd "* h") 'ibuffer-mark-help-buffers) + (define-key map (kbd "* z") 'ibuffer-mark-compressed-file-buffers) (define-key map (kbd ".") 'ibuffer-mark-old-buffers) (define-key map (kbd "d") 'ibuffer-mark-for-delete) @@ -718,6 +731,9 @@ (define-key-after map [menu-bar mark mark-help-buffers] '(menu-item "Mark help buffers" ibuffer-mark-help-buffers :help "Mark buffers in help-mode")) + (define-key-after map [menu-bar mark mark-compressed-file-buffers] + '(menu-item "Mark compressed file buffers" ibuffer-mark-compressed-file-buffers + :help "Mark buffers which have a file that is compressed")) (define-key-after map [menu-bar mark mark-old-buffers] '(menu-item "Mark old buffers" ibuffer-mark-old-buffers :help "Mark buffers which have not been viewed recently"))
--- a/lisp/international/mule-cmds.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/international/mule-cmds.el Fri Feb 03 15:24:23 2006 +0000 @@ -2440,7 +2440,8 @@ ;; to a system without X. (setq locale-translation-file-name (let ((files - '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4 + '("/usr/share/X11/locale/locale.alias" ; e.g. X11R7 + "/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4 "/usr/X11R6/lib/X11/locale/locale.alias" ; XFree86, e.g. RedHat 4.2 "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6 ;;
--- a/lisp/net/newsticker.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/net/newsticker.el Fri Feb 03 15:24:23 2006 +0000 @@ -1,6 +1,6 @@ ;;; newsticker.el --- A Newsticker for Emacs. -;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -397,7 +397,7 @@ (defvar newsticker--retrieval-timer-list nil "List of timers for news retrieval. -This is an alist, each element consisting of (feed-name . timer)") +This is an alist, each element consisting of (feed-name . timer).") (defvar newsticker--display-timer nil "Timer for newsticker display.") @@ -485,8 +485,8 @@ (defun newsticker--set-customvar (symbol value) "Set newsticker-variable SYMBOL value to VALUE. -Calls all necessary actions which are necessary in order to make -the new value effective. Changing `newsticker-url-list', for example, +Calls all actions which are necessary in order to make the new +value effective. Changing `newsticker-url-list', for example, will re-start the retrieval-timers." (unless (condition-case nil (eq (symbol-value symbol) value) @@ -586,7 +586,7 @@ The START-TIME can be either a string, or nil. If it is a string it specifies a fixed time at which this feed shall be retrieved for the -first time. (Examples: \"11:00pm\", \"23:00\"). If it is nil (or +first time. (Examples: \"11:00pm\", \"23:00\".) If it is nil (or unspecified), this feed will be retrieved immediately after calling `newsticker-start'. @@ -940,7 +940,7 @@ (:family "helvetica" :bold t)) (((class color) (background light)) (:family "helvetica" :bold t))) - "Face for old news items." + "Face for news items." :group 'newsticker-faces) (defface newsticker-old-item-face @@ -1041,7 +1041,7 @@ t "Decides whether to show immortal/non-expiring news items in the ticker. If t the echo area will not show immortal items. See also -`newsticker-hide-old-items-in-echo-area." +`newsticker-hide-old-items-in-echo-area'." :type 'boolean :set 'newsticker--set-customvar :group 'newsticker-ticker) @@ -1059,7 +1059,7 @@ t "Decides whether to show obsolete items items in the ticker. If t the echo area will not show obsolete items. See also -`newsticker-hide-old-items-in-echo-area." +`newsticker-hide-old-items-in-echo-area'." :type 'boolean :set 'newsticker--set-customvar :group 'newsticker-ticker) @@ -2376,7 +2376,7 @@ guid (car (xml-node-children guid))))) (defsubst newsticker--enclosure (item) - "Return enclosure element of ITEM in the form \(...FIXME...\)or nil." + "Return enclosure element of ITEM in the form \(...FIXME...\) or nil." (let ((enclosure (assoc 'enclosure (newsticker--extra item)))) (if enclosure (xml-node-attributes enclosure)))) @@ -2490,7 +2490,7 @@ (defun newsticker-buffer-update (&optional force) "Update the *newsticker* buffer. -Unless FORCE is t this is donly only if necessary, i.e. when the +Unless FORCE is t this is done only if necessary, i.e. when the *newsticker* buffer is not up-to-date." (interactive) ;; bring cache data into proper order.... @@ -2584,7 +2584,7 @@ "Show inline images in visible text ranges. In-line images in invisible text ranges are hidden. This function calls `w3m-toggle-inline-image'. It works only if -`newsticker-html-renderer' is set to `w3m-region'" +`newsticker-html-renderer' is set to `w3m-region'." (interactive) (if (eq newsticker-html-renderer 'w3m-region) (let ((inhibit-read-only t)) @@ -3290,7 +3290,7 @@ (newsticker--cache-replace-age newsticker--cache name-symbol 'feed 'obsolete-old) - + ;; check Atom/RSS version and call corresponding parser (condition-case error-data (if (cond @@ -3405,7 +3405,7 @@ (defun newsticker--parse-atom-0.3 (name time topnode) "Parse Atom 0.3 data. Return value as well as arguments NAME, TIME, and TOPNODE are the -same as in `newsticker--parse-generic-rss'." +same as in `newsticker--parse-atom-1.0'." (newsticker--debug-msg "Parsing Atom 0.3 feed %s" name) (let (new-feed new-item) (setq new-feed (newsticker--parse-generic-feed @@ -3613,8 +3613,8 @@ (defun newsticker--parse-rss-1.0 (name time topnode) "Parse RSS 1.0 data. -Return value as well as arguments NAME, TIME, and -TOPNODE are the same as in `newsticker--parse-atom-1.0'. +Return value as well as arguments NAME, TIME, and TOPNODE are the +same as in `newsticker--parse-atom-1.0'. For the RSS 1.0 specification see http://web.resource.org/rss/1.0/spec." (newsticker--debug-msg "Parsing RSS 1.0 feed %s" name) @@ -3724,9 +3724,7 @@ extra-elements) "Parse generic news feed data. Argument NAME gives the name of a news feed. TIME gives the -system time at which the data have been retrieved. CHANNELNODE -is the node in the feed data which contains the description, link -etc. of the feed itself. +system time at which the data have been retrieved. The arguments TITLE, DESC, LINK, and EXTRA-ELEMENTS give the feed's title, description, link, and extra elements resp." @@ -3966,7 +3964,7 @@ (defun newsticker--decode-iso8601-date (iso8601-string) "Return ISO8601-STRING in format like `decode-time'. -Converts from ISO-8601 to Emacs representation. If ISO8601-STRING +Converts from ISO-8601 to Emacs representation. Examples: 2004-09-17T05:09:49+00:00 2004-09-17T05:09+00:00 @@ -4300,10 +4298,9 @@ (defun newsticker--buffer-insert-item (item &optional feed-name-symbol) "Insert a news item in the current buffer. -Insert the string PREFIX and a formatted representation of the -ITEM. The optional parameter FEED-NAME-SYMBOL determines how the -item is formatted and whether the item-retrieval time is added as -well." +Insert a formatted representation of the ITEM. The optional parameter +FEED-NAME-SYMBOL determines how the item is formatted and whether the +item-retrieval time is added as well." ;; insert headline (if (eq (newsticker--age item) 'feed) (newsticker--buffer-do-insert-text item 'feed feed-name-symbol) @@ -4831,11 +4828,11 @@ (goto-char pos)) pos)) -(defun newsticker--buffer-hideshow (mark-age onoff ) +(defun newsticker--buffer-hideshow (mark-age onoff) "Hide or show items of type MARK-AGE. If ONOFF is nil the item is hidden, otherwise it is shown." (if onoff - (remove-from-invisibility-spec mark-age ) + (remove-from-invisibility-spec mark-age) (add-to-invisibility-spec mark-age))) (defun newsticker--buffer-beginning-of-item () @@ -5026,7 +5023,7 @@ certain item, except for the following cases. If AGE equals 'feed the TITLE, DESCription and LINK do not -matter. If DESC is nil it is ignored as well. If +matter. If DESC is nil it is ignored as well. If `newsticker-desc-comp-max' is non-nil, only the first `newsticker-desc-comp-max' characters of DESC are taken into account. @@ -5252,7 +5249,7 @@ ;; ====================================================================== (defun newsticker--stat-num-items (feed &optional age) "Return number of items in the given FEED which have the given AGE. -If AGE is nil, the total number items is returned." +If AGE is nil, the total number of items is returned." (let ((items (cdr (newsticker--cache-get-feed feed))) (num 0)) (while items @@ -5329,7 +5326,8 @@ newsticker-auto-mark-filter-list))) (defun newsticker--do-run-auto-mark-filter (item list) - "Actually compare ITEM AGE LIST against `newsticker-auto-mark-filter-list'." + "Actually compare ITEM against the pattern-LIST +\(from `newsticker-auto-mark-filter-list')." (mapc (lambda (pattern) (let ((age (nth 0 pattern)) (place (nth 1 pattern)) @@ -5384,8 +5382,8 @@ (defun newsticker-download-enclosures (feed item) "In all FEEDs download the enclosed object of the news ITEM. The object is saved to the directory \"~/tmp/newsticker/FEED/TITLE\", which -is created if it does not exist. TITLE is the title of the news -item. Argument FEED is ignored. +is created if it does not exist. TITLE is the title of the news +item. Argument FEED is ignored. This function is suited for adding it to `newsticker-new-item-functions'." (let ((title (newsticker--title item)) (enclosure (newsticker--enclosure item)))
--- a/lisp/net/rcirc.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/net/rcirc.el Fri Feb 03 15:24:23 2006 +0000 @@ -1375,14 +1375,14 @@ (when (not existing-buffer) (rcirc-cmd-whois nick)))) -(defun-rcirc-command join (args) +(defun-rcirc-command join (channel) "Join CHANNEL." (interactive "sJoin channel: ") - (let* ((channel (car (split-string args))) - (buffer (rcirc-get-buffer-create process channel))) + (let ((buffer (rcirc-get-buffer-create process + (car (split-string channel))))) (when (not (eq (selected-window) (minibuffer-window))) (funcall rcirc-switch-to-buffer-function buffer)) - (rcirc-send-string process (concat "JOIN " args)))) + (rcirc-send-string process (concat "JOIN " channel)))) (defun-rcirc-command part (channel) "Part CHANNEL."
--- a/lisp/textmodes/table.el Fri Feb 03 14:44:51 2006 +0000 +++ b/lisp/textmodes/table.el Fri Feb 03 15:24:23 2006 +0000 @@ -4076,7 +4076,7 @@ folded location is marked by a continuation character which is specified in the variable `table-word-continuation-char'. ") - (help-print-return-message)))) + (print-help-return-message)))) (defun *table--cell-describe-bindings () "Table cell version of `describe-bindings'." @@ -4094,7 +4094,7 @@ (key-description (car binding)) (cdr binding)))) table-cell-bindings) - (help-print-return-message)))) + (print-help-return-message)))) (defun *table--cell-dabbrev-expand (arg) "Table cell version of `dabbrev-expand'."
--- a/lispref/frames.texi Fri Feb 03 14:44:51 2006 +0000 +++ b/lispref/frames.texi Fri Feb 03 15:24:23 2006 +0000 @@ -64,6 +64,7 @@ * Dialog Boxes:: Displaying a box to ask yes or no. * Pointer Shapes:: Specifying the shape of the mouse pointer. * Window System Selections:: Transferring text to and from other X clients. +* Drag and Drop:: Internals of Drag-and-Drop implementation. * Color Names:: Getting the definitions of color names. * Text Terminal Colors:: Defining colors for text-only terminals. * Resources:: Getting resource values from the server. @@ -469,7 +470,7 @@ The width in pixels of the frame's border. @item internal-border-width -The distance in pixels between text and the frame's border. +The distance in pixels between text (or fringe) and the frame's border. @item vertical-scroll-bars Whether the frame has scroll bars for vertical scrolling, and which side @@ -1685,6 +1686,35 @@ but @code{t} on MS-Windows. @end defopt +@node Drag and Drop +@section Drag and Drop + +@vindex x-dnd-test-function +@vindex x-dnd-known-types + When a user drags something from another application over Emacs, that other +application expects Emacs to tell it if Emacs can handle the data that is +dragged. The variable @code{x-dnd-test-function} is used by Emacs to determine +what to reply. The default value is @code{x-dnd-default-test-function} +which accepts drops if the type of the data to be dropped is present in +@code{x-dnd-known-types}. You can customize @code{x-dnd-test-function} and/or +@code{x-dnd-known-types} if you want Emacs to accept or reject drops based +on some other criteria. + +@vindex x-dnd-types-alist + If you want to change the way Emacs handles drop of different types +or add a new type, customize @code{x-dnd-types-alist}. This requires +detailed knowledge of what types other applications use for drag and +drop. + +@vindex dnd-protocol-alist + When an URL is dropped on Emacs it may be a file, but it may also be +another URL type (ftp, http, etc.). Emacs first checks +@code{dnd-protocol-alist} to determine what to do with the URL. If +there is no match there and if @code{browse-url-browser-function} is +an alist, Emacs looks for a match there. If no match is found the +text for the URL is inserted. If you want to alter Emacs behavior, +you can customize these variables. + @node Color Names @section Color Names
--- a/lispref/keymaps.texi Fri Feb 03 14:44:51 2006 +0000 +++ b/lispref/keymaps.texi Fri Feb 03 15:24:23 2006 +0000 @@ -22,10 +22,13 @@ * Inheritance and Keymaps:: How one keymap can inherit the bindings of another keymap. * Prefix Keys:: Defining a key with a keymap as its definition. -* Active Keymaps:: Each buffer has a local keymap +* Active Keymaps:: How Emacs searches the active keymaps + for a key binding. +* Searching Keymaps:: A pseudo-Lisp summary of searching active maps. +* Controlling Active Maps:: Each buffer has a local keymap to override the standard (global) bindings. A minor mode can also override them. -* Key Lookup:: How extracting elements from keymaps works. +* Key Lookup:: Finding a key's binding in one keymap. * Functions for Key Lookup:: How to request key lookup. * Changing Key Bindings:: Redefining a key in a keymap. * Remapping Commands:: Bindings that translate one command to another. @@ -537,17 +540,38 @@ @cindex local keymap Emacs normally contains many keymaps; at any given time, just a few -of them are @dfn{active} in that they participate in the +of them are @dfn{active}, meaning that they participate in the interpretation of user input. All the active keymaps are used together to determine what command to execute when a key is entered. Emacs searches these keymaps one by one, in a standard order, until it -finds a binding in one of the keymaps. (Searching a single keymap for a -binding is called @dfn{key lookup}; see @ref{Key Lookup}.) +finds a binding in one of the keymaps. Normally the active keymaps are the @code{keymap} property keymap, the keymaps of any enabled minor modes, the current buffer's local keymap, and the global keymap, in that order. Therefore, Emacs -searches for each input key sequence in all these keymaps. +searches for each input key sequence in all these keymaps. Here is a +pseudo-Lisp description of how this process works: + +@lisp +(or (if overriding-terminal-local-map + (@var{find-in} overriding-terminal-local-map) + (if overriding-local-map + (@var{find-in} overriding-local-map) + (or (@var{find-in} (get-text-property (point) 'keymap)) + (@var{find-in-any} emulation-mode-map-alists) + (@var{find-in-any} minor-mode-overriding-map-alist) + (@var{find-in-any} minor-mode-map-alist) + (if (get-text-property (point) 'local-map)) + (@var{find-in} (get-text-property (point) 'local-map)) + (@var{find-in} (current-local-map)))))) + (@var{find-in} (current-global-map))) +@end lisp + +@noindent +Here, the pseudo-function @var{find-in} means to look up the key +sequence in a single map, and @var{find-in-any} means to search the +appropriate keymaps from an alist. (Searching a single keymap for a +binding is called @dfn{key lookup}; see @ref{Key Lookup}.) The @dfn{global keymap} holds the bindings of keys that are defined regardless of the current buffer, such as @kbd{C-f}. The variable @@ -597,10 +621,92 @@ @xref{Standard Keymaps}, for a list of standard keymaps. +@defun current-active-maps &optional olp +This returns the list of active keymaps that would be used by the +command loop in the current circumstances to look up a key sequence. +Normally it ignores @code{overriding-local-map} and +@code{overriding-terminal-local-map}, but if @var{olp} is +non-@code{nil} then it pays attention to them. +@end defun + +@defun key-binding key &optional accept-defaults no-remap +This function returns the binding for @var{key} according to the +current active keymaps. The result is @code{nil} if @var{key} is +undefined in the keymaps. + +@c Emacs 19 feature +The argument @var{accept-defaults} controls checking for default +bindings, as in @code{lookup-key} (above). + +When commands are remapped (@pxref{Remapping Commands}), +@code{key-binding} normally processes command remappings so as to +returns the remapped command that will actually be executed. However, +if @var{no-remap} is non-@code{nil}, @code{key-binding} ignores +remappings and returns the binding directly specified for @var{key}. + +An error is signaled if @var{key} is not a string or a vector. + +@example +@group +(key-binding "\C-x\C-f") + @result{} find-file +@end group +@end example +@end defun + +@node Searching Keymaps +@section Searching the Active Keymaps + + After translation of the input events (@pxref{Translating Input}) +Emacs looks for them in the active keymaps. Here is a pseudo-Lisp +description of the order in which the active keymaps are searched: + +@lisp +(or (if overriding-terminal-local-map + (@var{find-in} overriding-terminal-local-map) + (if overriding-local-map + (@var{find-in} overriding-local-map) + (or (@var{find-in} (get-text-property (point) 'keymap)) + (@var{find-in-any} emulation-mode-map-alists) + (@var{find-in-any} minor-mode-overriding-map-alist) + (@var{find-in-any} minor-mode-map-alist) + (@var{find-in} (get-text-property (point) 'local-map)) + (@var{find-in} (current-local-map))))) + (@var{find-in} (current-global-map))) +@end lisp + +@noindent +The @var{find-in} and @var{find-in-any} are pseudo functions that +searches in one keymap respectively an alist of keymaps. + +@enumerate +@item +The function finally found may be remapped +(@pxref{Remapping Commands}). + +@item +Characters that are bound to @code{self-insert-command} are translated +according to @code{translation-table-for-input} before insertion. + +@item +@code{current-active-maps} returns a list of the +currently active keymaps at point. + +@item +When a match is found (@pxref{Key Lookup}), if the binding in the +keymap is a function, the search is over. However if the keymap entry +is a symbol with a value or a string, Emacs replaces the input key +sequences with the variable's value or the string, and restarts the +search of the active keymaps. +@end enumerate + +@node Controlling Active Maps +@section Controlling the Active Keymaps + @defvar global-map This variable contains the default global keymap that maps Emacs -keyboard input to commands. The global keymap is normally this keymap. -The default global keymap is a full keymap that binds +keyboard input to commands. The global keymap is normally this +keymap. The default global keymap is a full keymap that binds @code{self-insert-command} to all of the printing characters. It is normal practice to change the bindings in the global keymap, but you @@ -763,14 +869,14 @@ @cindex keymap entry @dfn{Key lookup} is the process of finding the binding of a key -sequence from a given keymap. Actual execution of the binding is not -part of key lookup. +sequence from a given keymap. The execution or use of the binding is +not part of key lookup. Key lookup uses just the event type of each event in the key sequence; the rest of the event is ignored. In fact, a key sequence used for key lookup may designate a mouse event with just its types (a symbol) instead of the entire event (a list). @xref{Input Events}. Such -a ``key-sequence'' is insufficient for @code{command-execute} to run, +a ``key sequence'' is insufficient for @code{command-execute} to run, but it is sufficient for looking up or rebinding a key. When the key sequence consists of multiple events, key lookup @@ -965,39 +1071,6 @@ not cause an error. @end deffn -@defun key-binding key &optional accept-defaults no-remap -This function returns the binding for @var{key} in the current -keymaps, trying all the active keymaps. The result is @code{nil} if -@var{key} is undefined in the keymaps. - -@c Emacs 19 feature -The argument @var{accept-defaults} controls checking for default -bindings, as in @code{lookup-key} (above). - -When commands are remapped (@pxref{Remapping Commands}), -@code{key-binding} normally processes command remappings so as to -returns the remapped command that will actually be executed. However, -if @var{no-remap} is non-@code{nil}, @code{key-binding} ignores -remappings and returns the binding directly specified for @var{key}. - -An error is signaled if @var{key} is not a string or a vector. - -@example -@group -(key-binding "\C-x\C-f") - @result{} find-file -@end group -@end example -@end defun - -@defun current-active-maps &optional olp -This returns the list of keymaps that would be used by the command -loop in the current circumstances to look up a key sequence. Normally -it ignores @code{overriding-local-map} and -@code{overriding-terminal-local-map}, but if @var{olp} is -non-@code{nil} then it pays attention to them. -@end defun - @defun local-key-binding key &optional accept-defaults This function returns the binding for @var{key} in the current local keymap, or @code{nil} if it is undefined there. @@ -1036,11 +1109,11 @@ @defvar meta-prefix-char @cindex @key{ESC} -This variable is the meta-prefix character code. It is used when +This variable is the meta-prefix character code. It is used for translating a meta character to a two-character sequence so it can be -looked up in a keymap. For useful results, the value should be a prefix -event (@pxref{Prefix Keys}). The default value is 27, which is the -@acronym{ASCII} code for @key{ESC}. +looked up in a keymap. For useful results, the value should be a +prefix event (@pxref{Prefix Keys}). The default value is 27, which is +the @acronym{ASCII} code for @key{ESC}. As long as the value of @code{meta-prefix-char} remains 27, key lookup translates @kbd{M-b} into @kbd{@key{ESC} b}, which is normally defined
--- a/lispref/minibuf.texi Fri Feb 03 14:44:51 2006 +0000 +++ b/lispref/minibuf.texi Fri Feb 03 15:24:23 2006 +0000 @@ -583,6 +583,10 @@ so as to keep them near the higher-level completion features that do use the minibuffer. + If you store a completion alist in a variable, you should mark the +variable as ``risky'' with a non-@code{nil} +@code{risky-local-variable} property. + @defun try-completion string collection &optional predicate This function returns the longest common substring of all possible completions of @var{string} in @var{collection}. The value of
--- a/man/ChangeLog Fri Feb 03 14:44:51 2006 +0000 +++ b/man/ChangeLog Fri Feb 03 15:24:23 2006 +0000 @@ -1,3 +1,8 @@ +2006-02-03 Eli Zaretskii <eliz@gnu.org> + + * custom.texi (Init File, Find Init): Add cross-references to + where $HOME is described. + 2006-02-01 Luc Teirlinck <teirllm@auburn.edu> * frames.texi (Frame Parameters): Remove @item for S-Mouse-1; it
--- a/man/custom.texi Fri Feb 03 14:44:51 2006 +0000 +++ b/man/custom.texi Fri Feb 03 15:24:23 2006 +0000 @@ -2029,8 +2029,9 @@ @cindex startup (init file) When Emacs is started, it normally loads a Lisp program from the -file @file{.emacs} or @file{.emacs.el} in your home directory. We -call this file your @dfn{init file} because it specifies how to +file @file{.emacs} or @file{.emacs.el} in your home directory +(see @ref{General Variables, HOME} if you don't know where that is). +We call this file your @dfn{init file} because it specifies how to initialize Emacs for you. You can use the command line switch @samp{-q} to prevent loading your init file, and @samp{-u} (or @samp{--user}) to specify a different user's init file (@pxref{Initial @@ -2442,11 +2443,12 @@ @node Find Init @subsection How Emacs Finds Your Init File - Normally Emacs uses the environment variable @env{HOME} to find -@file{.emacs}; that's what @samp{~} means in a file name. If -@file{.emacs} is not found inside @file{~/} (nor @file{.emacs.el}), -Emacs looks for @file{~/.emacs.d/init.el} (which, like -@file{~/.emacs.el}, can be byte-compiled). + Normally Emacs uses the environment variable @env{HOME} +(@pxref{General Variables, HOME}) to find @file{.emacs}; that's what +@samp{~} means in a file name. If @file{.emacs} is not found inside +@file{~/} (nor @file{.emacs.el}), Emacs looks for +@file{~/.emacs.d/init.el} (which, like @file{~/.emacs.el}, can be +byte-compiled). However, if you run Emacs from a shell started by @code{su}, Emacs tries to find your own @file{.emacs}, not that of the user you are