diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-07-10 14:52:53 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-07-10 14:52:53 -0400 |
commit | 2ec1b5ee3464999a18b8197101e8bf08a3c564a8 (patch) | |
tree | 4837c369ac576fbfd063b1ff046a3daca372f082 /lisp | |
parent | c971758df75640c55e6f9d7ac7d9c6909519d0b4 (diff) | |
parent | 7c33a0572280bdcf0583c5625cfda32f63fad56d (diff) | |
download | emacs-2ec1b5ee3464999a18b8197101e8bf08a3c564a8.tar.gz |
Merge changes from emacs-23 branch.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 137 | ||||
-rw-r--r-- | lisp/arc-mode.el | 9 | ||||
-rw-r--r-- | lisp/bs.el | 2 | ||||
-rw-r--r-- | lisp/comint.el | 8 | ||||
-rw-r--r-- | lisp/descr-text.el | 2 | ||||
-rw-r--r-- | lisp/dnd.el | 7 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-loaddefs.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/rx.el | 3 | ||||
-rw-r--r-- | lisp/emulation/cua-base.el | 2 | ||||
-rw-r--r-- | lisp/emulation/pc-select.el | 2 | ||||
-rw-r--r-- | lisp/generic-x.el | 3 | ||||
-rw-r--r-- | lisp/help.el | 5 | ||||
-rw-r--r-- | lisp/hl-line.el | 6 | ||||
-rw-r--r-- | lisp/htmlfontify.el | 2 | ||||
-rw-r--r-- | lisp/mouse.el | 1 | ||||
-rw-r--r-- | lisp/net/zeroconf.el | 27 | ||||
-rw-r--r-- | lisp/play/zone.el | 6 | ||||
-rw-r--r-- | lisp/progmodes/cc-mode.el | 7 | ||||
-rw-r--r-- | lisp/progmodes/idlwave.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/js.el | 9 | ||||
-rw-r--r-- | lisp/progmodes/python.el | 18 | ||||
-rw-r--r-- | lisp/subr.el | 11 | ||||
-rw-r--r-- | lisp/url/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/vc/vc-annotate.el | 13 | ||||
-rw-r--r-- | lisp/vc/vc-dir.el | 36 | ||||
-rw-r--r-- | lisp/vc/vc-git.el | 30 | ||||
-rw-r--r-- | lisp/vc/vc.el | 9 | ||||
-rw-r--r-- | lisp/wid-edit.el | 11 | ||||
-rw-r--r-- | lisp/x-dnd.el | 4 | ||||
-rw-r--r-- | lisp/xml.el | 26 |
30 files changed, 296 insertions, 106 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f793f91a932..01ecaab86b6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -17,6 +17,12 @@ (ispell-complete-word): Use ispell-complete-word-dict or ispell-alternate-dictionary. +2010-07-07 Christoph Scholtes <cschol2112@gmail.com> + + * progmodes/python.el (python-font-lock-keywords): Add Python 2.7 + builtins (BufferError, BytesWarning, WindowsError; callables + bin, bytearray, bytes, format, memoryview, next, print; __package__). + 2010-07-07 Glenn Morris <rgm@gnu.org> * play/zone.el (top-level): Do not require timer, tabify, or cl. @@ -207,6 +213,75 @@ 2010-06-21 Karl Fogel <kfogel@red-bean.com> + * play/zone.el (zone-fall-through-ws): Fix next-line -> + forward-line fallout. + +2010-07-06 Chong Yidong <cyd@stupidchicken.com> + + * mouse.el (mouse-appearance-menu): Add docstring. + + * help.el (describe-key): Print up-event using key-description. + +2010-07-03 Michael Albinus <michael.albinus@gmx.de> + + * net/zeroconf.el (zeroconf-resolve-service) + (zeroconf-service-resolver-handler): Use + `dbus-byte-array-to-string'. + (zeroconf-publish-service): Use `dbus-string-to-byte-array'. + +2010-07-03 Jan Moringen <jan.moringen@uni-bielefeld.de> + + * net/zeroconf.el (zeroconf-service-remove-hook): New defun. + +2010-06-30 Dan Nicolaescu <dann@ics.uci.edu> + + Avoid displaying files with a nil state in vc-dir. + * vc-dir.el (vc-dir-update): Obey the noinsert argument in all + cases that cause insertion. + (vc-dir-resynch-file): Tell vc-dir-update to avoid inserting files + with a nil state. + +2010-06-30 Chong Yidong <cyd@stupidchicken.com> + + * xml.el (xml-parse-region): Avoid infloop (Bug#5281). + +2010-06-29 Leo <sdl.web@gmail.com> + + * emacs-lisp/rx.el (rx): Doc fix. (Bug#6537) + +2010-06-27 Oleksandr Gavenko <gavenkoa@gmail.com> (tiny change) + + * generic-x.el (bat-generic-mode): Fix regexp for command line + switches (Bug#5719). + +2010-06-27 Masatake YAMATO <yamato@redhat.com> + + * htmlfontify.el (hfy-face-attr-for-class): Use append instead + of nconc to avoid pure storage error (Bug#6239). + +2010-06-27 Christoph <cschol2112@googlemail.com> (tiny change) + + * bookmark.el (bookmark-bmenu-2-window, bookmark-bmenu-other-window) + (bookmark-bmenu-other-window-with-mouse): Remove unnecessary + bindings of bookmark-automatically-show-annotations (Bug#6515). + +2010-06-25 Eli Zaretskii <eliz@gnu.org> + + * arc-mode.el (archive-zip-extract): Don't quote the file name on + MS-Windows and MS-DOS. (Bug#6467, Bug#6144) + +2010-06-24 Å tÄ›pán NÄ›mec <stepnem@gmail.com> (tiny change) + + * comint.el (make-comint, make-comint-in-buffer): Mention return + value in the docstrings. (Bug#6498) + +2010-06-24 Yoni Rabkin <yoni@rabkins.net> + + * bs.el (bs-mode-font-lock-keywords): Remove "by" from Dired pattern, + since it is not present when using some non-default switches. + +2010-06-23 Karl Fogel <kfogel@red-bean.com> + * simple.el (compose-mail): Fix doc string to refer to `compose-mail-user-agent-warnings', instead of to the nonexistent `compose-mail-check-user-agent'. @@ -320,6 +395,66 @@ * emacs-lisp/package.el: New file. +2010-06-22 Dan Nicolaescu <dann@ics.uci.edu> + + Fix vc-annotate for renamed files when using Git. + * vc-git.el (vc-git-find-revision): Deal with empty results from + ls-files. Doe not pass the object as a file name to cat-file, it + is not a file name. + (vc-git-annotate-command): Pass the file name using -- to avoid + ambiguity with the revision. + (vc-git-previous-revision): Pass a relative file name. + +2010-06-22 Glenn Morris <rgm@gnu.org> + + * progmodes/js.el (js-mode-map): Use standard capitalization and + ellipses for menu entries. + + * wid-edit.el (widget-complete): Doc fix. + +2010-06-22 Jürgen Hötzel <juergen@hoetzel.info> (tiny change) + + * wid-edit.el (widget-complete): Fix typo in 2009-12-02 change. + +2010-06-22 Dan Nicolaescu <dann@ics.uci.edu> + + Fix annotating other revisions for renamed files in vc-annotate. + * vc-annotate.el (vc-annotate): Add an optional argument for the + VC backend. Use it when non-nil. + (vc-annotate-warp-revision): Pass the VC backend to vc-annotate. (Bug#6487) + + Fix vc-annotate-show-changeset-diff-revision-at-line for git. + * vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): + Do not pass the file name to the 'previous-revision call when we + don't want a file diff. (Bug#6489) + +2010-06-21 Dan Nicolaescu <dann@ics.uci.edu> + + Fix finding revisions for renamed files in vc-annotate. + * vc.el (vc-find-revision): Add an optional argument for + the VC backend. Use it when non-nil. + * vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC + backend to vc-find-revision. (Bug#6487) + +2010-06-21 Dan Nicolaescu <dann@ics.uci.edu> + + Fix reading file names in Git annotate buffers. + * vc-git.el (vc-git-annotate-extract-revision-at-line): Remove + trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) + +2010-06-20 Alan Mackenzie <acm@muc.de> + + * progmodes/cc-mode.el (c-before-hack-hook): When the mode is set + in file local variables, set it first. + +2010-06-19 Glenn Morris <rgm@gnu.org> + + * descr-text.el (describe-char-unicode-data): Insert separating + space when needed. (Bug#6422) + + * progmodes/idlwave.el (idlwave-action-and-binding): + Fix typo in 2009-12-03 change. (Bug#6450) + 2010-06-17 Stefan Monnier <monnier@iro.umontreal.ca> * emacs-lisp/macroexp.el (macroexpand-all-1): Put back special @@ -335,6 +470,8 @@ * facemenu.el (list-colors-display): Call `pop-to-buffer' before `list-colors-print'. (Bug#6332) + * subr.el (read-quoted-char): Fix up last change (bug#6290). + 2010-06-16 Stefan Monnier <monnier@iro.umontreal.ca> * emacs-lisp/macroexp.el (macroexpand-all-1): Don't handle `lambda' diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index fb6155dfd41..6dda7b2e40b 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1811,10 +1811,13 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." (t (archive-extract-by-stdout archive - ;; unzip expands wildcards in NAME, so we need to quote it. + ;; unzip expands wildcards in NAME, so we need to quote it. But + ;; not on DOS/Windows, since that fails extraction on those + ;; systems, and file names with wildcards in zip archives don't + ;; work there anyway. ;; FIXME: Does pkunzip need similar treatment? - ;; (7z doesn't need to quote wildcards) - (if (equal (car archive-zip-extract) "unzip") + (if (and (not (memq system-type '(windows-nt ms-dos))) + (equal (car archive-zip-extract) "unzip")) (shell-quote-argument name) name) archive-zip-extract)))) diff --git a/lisp/bs.el b/lisp/bs.el index 3fa91b49178..0ce7670201d 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -195,7 +195,7 @@ return a string representing the column's value." 'font-lock-constant-face 'font-lock-comment-face)) ;; Dired-Buffers - '("^..\\(.*Dired by .*\\)$" 1 font-lock-function-name-face) + '("^..\\(.*Dired .*\\)$" 1 font-lock-function-name-face) ;; the star for modified buffers '("^.\\(\\*\\) +[^\\*]" 1 font-lock-comment-face)) "Default font lock expressions for Buffer Selection Menu.") diff --git a/lisp/comint.el b/lisp/comint.el index b097baad189..071537ffd89 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -701,7 +701,9 @@ a running process in that buffer, it is not restarted. Optional fourth arg STARTFILE is the name of a file, whose contents are sent to the process as its initial input. -If PROGRAM is a string, any more args are arguments to PROGRAM." +If PROGRAM is a string, any more args are arguments to PROGRAM. + +Returns the (possibly newly created) process buffer." (or (fboundp 'start-file-process) (error "Multi-processing is not supported for this system")) (setq buffer (get-buffer-create (or buffer (concat "*" name "*")))) @@ -725,7 +727,9 @@ a running process in that buffer, it is not restarted. Optional third arg STARTFILE is the name of a file, whose contents are sent to the process as its initial input. -If PROGRAM is a string, any more args are arguments to PROGRAM." +If PROGRAM is a string, any more args are arguments to PROGRAM. + +Returns the (possibly newly created) process buffer." (apply #'make-comint-in-buffer name nil program startfile switches)) ;;;###autoload diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 735023ceb02..93c69e0eea5 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -301,7 +301,7 @@ This function is semi-obsolete. Use `get-char-code-property'." (lambda (arg) (string (string-to-number arg 16))) parts " ")) - (concat info parts)))) + (concat info (if info " ") parts)))) (list "Decimal digit value" (nth 5 fields)) (list "Digit value" diff --git a/lisp/dnd.el b/lisp/dnd.el index c064aa9897a..d7cbb641bab 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -1,8 +1,9 @@ -;;; dnd.el --- drag and drop support. +;;; dnd.el --- drag and drop support. -*- coding: utf-8 -*- -;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. -;; Author: Jan Dj,Ad(Brv <jan.h.d@swipnet.se> +;; Author: Jan Djärv <jan.h.d@swipnet.se> ;; Maintainer: FSF ;; Keywords: window, drag, drop diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index b14c879fcf7..ff0fa599985 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -282,7 +282,7 @@ Not documented ;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist ;;;;;; do* do loop return-from return block etypecase typecase ecase ;;;;;; case load-time-value eval-when destructuring-bind function* -;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "36cafd5054969b5bb0b1ce6a21605fed") +;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "49b7d96626dd8ba5d39551909edbd4c7") ;;; Generated autoloads from cl-macs.el (autoload 'gensym "cl-macs" "\ diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 5d04494ecb6..85fe3514b01 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -1053,9 +1053,6 @@ CHAR 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 ...)' `(| SEXP1 SEXP2 ...)' matches anything that matches SEXP1 or SEXP2, etc. If all diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index c2ac7e3b3d0..f6749cd9e97 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -4,7 +4,7 @@ ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Kim F. Storm <storm@cua.dk> -;; Keywords: keyboard emulation convenience cua +;; Keywords: keyboard emulations convenience cua ;; This file is part of GNU Emacs. diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index 529ba290cb8..857f94cb5f5 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -6,7 +6,7 @@ ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Michael Staats <michael@thp.Uni-Duisburg.DE> -;; Keywords: convenience emulation +;; Keywords: convenience emulations ;; Created: 26 Sep 1995 ;; This file is part of GNU Emacs. diff --git a/lisp/generic-x.el b/lisp/generic-x.el index a96ab5cbbe9..0083989c75a 100644 --- a/lisp/generic-x.el +++ b/lisp/generic-x.el @@ -508,8 +508,7 @@ like an INI file. You can add this hook to `find-file-hook'." '("^[ \t]*\\(:\\sw+\\)" 1 font-lock-function-name-face t) '("\\(%\\sw+%\\)" 1 font-lock-variable-name-face t) '("\\(%[0-9]\\)" 1 font-lock-variable-name-face t) - '("\\(/[^/ \"\t\n]+\\)" 1 font-lock-type-face) - '("[\t ]+\\([+-][^\t\n\" ]+\\)" 1 font-lock-type-face) + '("[\t ]+\\([+-/][^\t\n\" ]+\\)" 1 font-lock-type-face) '("[ \t\n|]\\<\\([gG][oO][tT][oO]\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) diff --git a/lisp/help.el b/lisp/help.el index 899547aa0a1..9434201797e 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -768,9 +768,10 @@ temporarily enables it to allow getting help on disabled items and buttons." ----------------- up-event %s---------------- -<%S>%s%s runs the command %S, which is " +%s%s%s runs the command %S, which is " (if mouse-1-tricky "(short click) " "") - ev-type mouse-msg + (key-description (vector up-event)) + mouse-msg (if mouse-1-remapped " is remapped to <mouse-2>, which" "") defn-up)) diff --git a/lisp/hl-line.el b/lisp/hl-line.el index 755ff696453..9a791076002 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el @@ -1,12 +1,12 @@ ;;; hl-line.el --- highlight the current line -;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> ;; Maintainer: FSF ;; Created: 1998-09-13 -;; Keywords: faces, frames, emulation +;; Keywords: faces, frames, emulations ;; This file is part of GNU Emacs. diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 12e54972461..035b6d384e7 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -926,7 +926,7 @@ See also `hfy-display-class' for details of valid values for CLASS." new-spec))))) (if (or (memq :inherit face-spec) (eq 'default face)) face-spec - (nconc face-spec (list :inherit 'default))) )) + (append face-spec (list :inherit 'default))))) ;; construct an assoc of (css-tag-name . css-tag-value) pairs ;; from a face or assoc of face attributes: diff --git a/lisp/mouse.el b/lisp/mouse.el index 53818635511..0b2d7fbf83b 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2357,6 +2357,7 @@ choose a font." (declare-function font-face-attributes "font.c" (font &optional frame)) (defun mouse-appearance-menu (event) + "Show a menu for changing the default face in the current buffer." (interactive "@e") (require 'face-remap) (when (display-multi-font-p) diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el index b0b98fc57f3..e49a45c8a48 100644 --- a/lisp/net/zeroconf.el +++ b/lisp/net/zeroconf.el @@ -336,6 +336,23 @@ The attributes of SERVICE can be retrieved via the functions (puthash type l-hook zeroconf-service-removed-hooks-hash))) (t (error "EVENT must be either `:new' or `:removed'")))) +(defun zeroconf-service-remove-hook (type event function) + "Remove FUNCTION from the hook of service type TYPE. + +EVENT must be either :new or :removed and has to match the event +type used when registering FUNCTION." + (let* ((table (cond + ((equal event :new) + zeroconf-service-added-hooks-hash) + ((equal event :removed) + zeroconf-service-removed-hooks-hash) + (t (error "EVENT must be either `:new' or `:removed'")))) + (l-hook (gethash type table nil))) + (remove-hook 'l-hook function) + (if l-hook + (puthash type l-hook table) + (remhash type table)))) + (defun zeroconf-get-host () "Returns the local host name as string." (dbus-call-method @@ -407,7 +424,7 @@ TYPE. The resulting list has the format (elt (nth 9 result))) ;; TXT. ;; The TXT field has the signature "aay". Transform to "as". (while elt - (setcar elt (apply 'string (car elt))) + (setcar elt (dbus-byte-array-to-string (car elt))) (setq elt (cdr elt))) (when nil ;; We discard it, no use so far. @@ -599,7 +616,7 @@ DOMAIN is nil, the local domain is used." ;; The "TXT" field has the signature "aay". Transform to "as". (let ((elt (nth 9 val))) (while elt - (setcar elt (apply 'string (car elt))) + (setcar elt (dbus-byte-array-to-string (car elt))) (setq elt (cdr elt)))) (when zeroconf-debug (message "zeroconf-service-resolver-handler: %s %S" @@ -641,11 +658,7 @@ For the description of arguments, see `zeroconf-resolved-services-hash'." ;; The TXT field has the signature "as". Transform to "aay". (dolist (elt txt) - (let (args) - (add-to-list - 'result - (dolist (elt1 (string-to-list elt) (append '(:array) args)) - (setq args (append args (list :byte elt1))))))) + (add-to-list 'result (dbus-string-to-byte-array elt))) ;; Add the service. (dbus-call-method diff --git a/lisp/play/zone.el b/lisp/play/zone.el index 568d4cf2a19..4fa5a8c3920 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el @@ -478,8 +478,10 @@ If the element is a function or a list of a function and a number, (wait 0.15) newpos fall-p) (while (when (save-excursion - (forward-line 1) - (and (= col (current-column)) + (and (zerop (forward-line 1)) + (progn + (forward-char col) + (= col (current-column))) (setq newpos (point)) (string= spaces (buffer-substring-no-properties newpos (+ newpos cw-ceil))) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 9044b42a838..ed769158a50 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -669,8 +669,13 @@ They are set only when, respectively, the pseudo variables This function is called from the hook `before-hack-local-variables-hook'." (when c-buffer-is-cc-mode - (let ((stile (cdr (assq 'c-file-style file-local-variables-alist))) + (let ((mode-cons (assq 'mode file-local-variables-alist)) + (stile (cdr (assq 'c-file-style file-local-variables-alist))) (offsets (cdr (assq 'c-file-offsets file-local-variables-alist)))) + (when mode-cons + (hack-one-local-variable (car mode-cons) (cdr mode-cons)) + (setq file-local-variables-alist + (delq mode-cons file-local-variables-alist))) (when stile (or (stringp stile) (error "c-file-style is not a string")) (c-set-style stile)) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 402893c5946..1d042c99451 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -1602,7 +1602,7 @@ Capitalize system variables - action only `(lambda () (interactive) (self-insert-command 1) - ,@(if (listp cmd) cmd (list cmd)))))) + ,(if (listp cmd) cmd (list cmd)))))) ;; Set action and key bindings. ;; See description of the function `idlwave-action-and-binding'. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 6bd8fbc2442..60ed14afbac 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -474,8 +474,7 @@ for preventing Firefox from stealing the keyboard focus." (defcustom js-js-tmpdir "~/.emacs.d/js/js" "Temporary directory used by `js-mode' to communicate with Mozilla. -This directory must be readable and writable by both Mozilla and -Emacs." +This directory must be readable and writable by both Mozilla and Emacs." :type 'directory :group 'js) @@ -499,11 +498,11 @@ getting timeout messages." (define-key keymap [(meta ?.)] #'js-find-symbol) (easy-menu-define nil keymap "Javascript Menu" '("Javascript" - ["Select new Mozilla context…" js-set-js-context + ["Select New Mozilla Context..." js-set-js-context (fboundp #'inferior-moz-process)] - ["Evaluate expression in Mozilla context…" js-eval + ["Evaluate Expression in Mozilla Context..." js-eval (fboundp #'inferior-moz-process)] - ["Send current function to Mozilla…" js-eval-defun + ["Send Current Function to Mozilla..." js-eval-defun (fboundp #'inferior-moz-process)])) keymap) "Keymap for `js-mode'.") diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4e0f326e2d4..2b09e346331 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -93,7 +93,7 @@ (defvar python-font-lock-keywords `(,(rx symbol-start - ;; From v 2.5 reference, § keywords. + ;; From v 2.7 reference, § keywords. ;; def and class dealt with separately below (or "and" "as" "assert" "break" "continue" "del" "elif" "else" "except" "exec" "finally" "for" "from" "global" "if" @@ -102,7 +102,7 @@ ;; Not real keywords, but close enough to be fontified as such "self" "True" "False") symbol-end) - (,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.5 manual + (,(rx symbol-start "None" symbol-end) ; see § Keywords in 2.7 manual . font-lock-constant-face) ;; Definitions (,(rx symbol-start (group "class") (1+ space) (group (1+ (or word ?_)))) @@ -117,7 +117,7 @@ (0+ "." (1+ (or word ?_))))) (1 font-lock-type-face)) ;; Built-ins. (The next three blocks are from - ;; `__builtin__.__dict__.keys()' in Python 2.5.1.) These patterns + ;; `__builtin__.__dict__.keys()' in Python 2.7) These patterns ;; are debateable, but they at least help to spot possible ;; shadowing of builtins. (,(rx symbol-start (or @@ -135,7 +135,9 @@ "SystemExit" "TabError" "TypeError" "UnboundLocalError" "UnicodeDecodeError" "UnicodeEncodeError" "UnicodeError" "UnicodeTranslateError" "UnicodeWarning" "UserWarning" - "ValueError" "Warning" "ZeroDivisionError") symbol-end) + "ValueError" "Warning" "ZeroDivisionError" + ;; Python 2.7 + "BufferError" "BytesWarning" "WindowsError") symbol-end) . font-lock-type-face) (,(rx (or line-start (not (any ". \t"))) (* (any " \t")) symbol-start (group (or @@ -152,12 +154,16 @@ "range" "raw_input" "reduce" "reload" "repr" "reversed" "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" "sum" "super" "tuple" "type" "unichr" "unicode" "vars" - "xrange" "zip")) symbol-end) + "xrange" "zip" + ;; Python 2.7. + "bin" "bytearray" "bytes" "format" "memoryview" "next" "print" + )) symbol-end) (1 font-lock-builtin-face)) (,(rx symbol-start (or ;; other built-ins "True" "False" "None" "Ellipsis" - "_" "__debug__" "__doc__" "__import__" "__name__") symbol-end) + "_" "__debug__" "__doc__" "__import__" "__name__" "__package__") + symbol-end) . font-lock-builtin-face))) (defconst python-font-lock-syntactic-keywords diff --git a/lisp/subr.el b/lisp/subr.el index 16ba45f1c74..9fb737fd038 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1874,12 +1874,11 @@ any other non-digit terminates the character code and is then used as input.")) ;; Note: `read-char' does it using the `ascii-character' property. ;; We should try and use read-key instead. (let ((translation (lookup-key local-function-key-map (vector char)))) - (if (arrayp translation) - (setq translated (aref translation 0)))) - (setq translated - (if (integerp char) - (char-resolve-modifiers char) - char)) + (setq translated (if (arrayp translation) + (aref translation 0) + char))) + (if (integerp translated) + (setq translated (char-resolve-modifiers translated))) (cond ((null translated)) ((not (integerp translated)) (setq unread-command-events (list char) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 1de6f93416a..24fa2c0c064 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -806,7 +806,7 @@ (url-http-parse-headers): Use it. (url-http-handle-authentication): Use subst-char-in-string. -2005-11-16 Juergen Hoetzel <emacs@hoetzel.info> (tiny change) +2005-11-16 Jürgen Hötzel <emacs@hoetzel.info> (tiny change) * url-handlers.el (url-insert-file-contents): Use the charset info provided by the HTTP server, if any. diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index d0951bdd404..c95fe54d04a 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -315,7 +315,7 @@ use; you may override this using the second optional arg MODE." vc-annotate-display-mode)))) ;;;###autoload -(defun vc-annotate (file rev &optional display-mode buf move-point-to) +(defun vc-annotate (file rev &optional display-mode buf move-point-to vc-bk) "Display the edit history of the current FILE using colors. This command creates a buffer that shows, for each line of the current @@ -336,6 +336,8 @@ age, and everything that is older than that is shown in blue. If MOVE-POINT-TO is given, move the point to that line. +If VC-BK is given used that VC backend. + Customization variables: `vc-annotate-menu-elements' customizes the menu elements of the @@ -376,7 +378,7 @@ mode-specific menu. `vc-annotate-color-map' and ;; In case it had to be uniquified. (setq temp-buffer-name (buffer-name)))) (with-output-to-temp-buffer temp-buffer-name - (let ((backend (vc-backend file)) + (let ((backend (or vc-bk (vc-backend file))) (coding-system-for-read buffer-file-coding-system)) (vc-call-backend backend 'annotate-command file (get-buffer temp-buffer-name) rev) @@ -462,7 +464,7 @@ Return a cons (REV . FILENAME)." (if (not rev-at-line) (message "Cannot extract revision number from the current line") (switch-to-buffer-other-window - (vc-find-revision (cdr rev-at-line) (car rev-at-line))))))) + (vc-find-revision (cdr rev-at-line) (car rev-at-line) vc-annotate-backend)))))) (defun vc-annotate-revision-previous-to-line () "Visit the annotation of the revision before the revision at line." @@ -527,7 +529,7 @@ the file in question, search for the log entry required and move point ." (message "Cannot extract revision number from the current line") (setq prev-rev (vc-call-backend vc-annotate-backend 'previous-revision - fname rev)) + (if filediff fname nil) rev)) (if (not prev-rev) (message "Cannot diff from any revision prior to %s" rev) (save-window-excursion @@ -597,7 +599,8 @@ describes a revision number, so warp to that revision." ;; place the point in the line. (min oldline (progn (goto-char (point-max)) (forward-line -1) - (line-number-at-pos)))))))) + (line-number-at-pos))) + vc-annotate-backend))))) (defun vc-annotate-compcar (threshold a-list) "Test successive cons cells of A-LIST against THRESHOLD. diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 161013fbae0..9cacef2f71b 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -412,22 +412,24 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc." (setq entry (car entries)) (setq node (ewoc-next vc-ewoc node))) (t - (ewoc-enter-before vc-ewoc node - (apply 'vc-dir-create-fileinfo entry)) + (unless noinsert + (ewoc-enter-before vc-ewoc node + (apply 'vc-dir-create-fileinfo entry))) (setq entries (cdr entries)) (setq entry (car entries)))))) (t - ;; We might need to insert a directory node if the - ;; previous node was in a different directory. - (let* ((rd (file-relative-name entrydir)) - (prev-node (ewoc-prev vc-ewoc node)) - (prev-dir (vc-dir-node-directory prev-node))) - (unless (string-equal entrydir prev-dir) - (ewoc-enter-before - vc-ewoc node (vc-dir-create-fileinfo rd nil nil nil entrydir)))) - ;; Now insert the node itself. - (ewoc-enter-before vc-ewoc node - (apply 'vc-dir-create-fileinfo entry)) + (unless noinsert + ;; We might need to insert a directory node if the + ;; previous node was in a different directory. + (let* ((rd (file-relative-name entrydir)) + (prev-node (ewoc-prev vc-ewoc node)) + (prev-dir (vc-dir-node-directory prev-node))) + (unless (string-equal entrydir prev-dir) + (ewoc-enter-before + vc-ewoc node (vc-dir-create-fileinfo rd nil nil nil entrydir)))) + ;; Now insert the node itself. + (ewoc-enter-before vc-ewoc node + (apply 'vc-dir-create-fileinfo entry))) (setq entries (cdr entries) entry (car entries)))))) ;; We're past the last node, all remaining entries go to the end. (unless (or node noinsert) @@ -902,10 +904,12 @@ If it is a file, return the corresponding cons for the file itself." (vc-dir-resync-directory-files file) (ewoc-set-hf vc-ewoc (vc-dir-headers vc-dir-backend default-directory) "")) - (let ((state (vc-dir-recompute-file-state file ddir))) + (let* ((complete-state (vc-dir-recompute-file-state file ddir)) + (state (cadr complete-state))) (vc-dir-update - (list state) - status-buf (eq (cadr state) 'up-to-date)))))))))) + (list complete-state) + status-buf (or (not state) + (eq state 'up-to-date))))))))))) ;; Remove out-of-date entries from vc-dir-buffers. (dolist (b drop) (setq vc-dir-buffers (delq b vc-dir-buffers))))) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 6129b21c324..cccccbdfd02 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -563,13 +563,18 @@ or an empty string if none." (let* (process-file-side-effects (coding-system-for-read 'binary) (coding-system-for-write 'binary) - (fullname (substring - (vc-git--run-command-string - file "ls-files" "-z" "--full-name" "--") - 0 -1))) + (fullname + (let ((fn (vc-git--run-command-string + file "ls-files" "-z" "--full-name" "--"))) + ;; ls-files does not return anything when looking for a + ;; revision of a file that has been renamed or removed. + (if (string= fn "") + (file-relative-name file (vc-git-root default-directory)) + (substring fn 0 -1))))) (vc-git-command buffer 0 - (concat (if rev rev "HEAD") ":" fullname) "cat-file" "blob"))) + nil + "cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname)))) (defun vc-git-checkout (file &optional editable rev) (vc-git-command nil 0 file "checkout" (or rev "HEAD"))) @@ -723,7 +728,7 @@ or BRANCH^ (where \"^\" can be repeated)." (defun vc-git-annotate-command (file buf &optional rev) (let ((name (file-relative-name file))) - (vc-git-command buf 'async name "blame" "--date=iso" "-C" "-C" rev))) + (vc-git-command buf 'async nil "blame" "--date=iso" "-C" "-C" rev "--" name))) (declare-function vc-annotate-convert-time "vc-annotate" (time)) @@ -740,8 +745,12 @@ or BRANCH^ (where \"^\" can be repeated)." (when (looking-at "\\([0-9a-f^][0-9a-f]+\\) \\(\\([^(]+\\) \\)?") (let ((revision (match-string-no-properties 1))) (if (match-beginning 2) - (cons revision (expand-file-name (match-string-no-properties 3) - (vc-git-root default-directory))) + (let ((fname (match-string-no-properties 3))) + ;; Remove trailing whitespace from the file name. + (when (string-match " +\\'" fname) + (setq fname (substring fname 0 (match-beginning 0)))) + (cons revision + (expand-file-name fname (vc-git-root default-directory)))) revision))))) ;;; TAG SYSTEM @@ -765,11 +774,10 @@ or BRANCH^ (where \"^\" can be repeated)." (defun vc-git-previous-revision (file rev) "Git-specific version of `vc-previous-revision'." (if file - (let* ((default-directory (file-name-directory (expand-file-name file))) - (file (file-name-nondirectory file)) + (let* ((fname (file-relative-name file)) (prev-rev (with-temp-buffer (and - (vc-git--out-ok "rev-list" "-2" rev "--" file) + (vc-git--out-ok "rev-list" "-2" rev "--" fname) (goto-char (point-max)) (bolp) (zerop (forward-line -1)) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 23dd6f0f7ae..434c2a10e14 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1700,8 +1700,9 @@ If `F.~REV~' already exists, use it instead of checking it out again." rev))) (switch-to-buffer-other-window (vc-find-revision file revision)))) -(defun vc-find-revision (file revision) - "Read REVISION of FILE into a buffer and return the buffer." +(defun vc-find-revision (file revision &optional backend) + "Read REVISION of FILE into a buffer and return the buffer. +Use BACKEND as the VC backend if specified." (let ((automatic-backup (vc-version-backup-file-name file revision)) (filebuf (or (get-file-buffer file) (current-buffer))) (filename (vc-version-backup-file-name file revision 'manual))) @@ -1719,7 +1720,9 @@ If `F.~REV~' already exists, use it instead of checking it out again." ;; Change buffer to get local value of ;; vc-checkout-switches. (with-current-buffer filebuf - (vc-call find-revision file revision outbuf)))) + (if backend + (vc-call-backend backend 'find-revision file revision outbuf) + (vc-call find-revision file revision outbuf))))) (setq failed nil)) (when (and failed (file-exists-p filename)) (delete-file filename)))) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 5e67c07957e..dfeb6371f5e 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1156,14 +1156,17 @@ the field." (if field (narrow-to-region (line-beginning-position) (line-end-position))))) +;; This used to say: +;; "When not inside a field, move to the previous button or field." +;; but AFAICS, it has always just thrown an error. (defun widget-complete () "Complete content of editable field from point. -When not inside a field, move to the previous button or field." +When not inside a field, signal an error." (interactive) (let ((field (widget-field-find (point)))) - (when field - (widget-apply field :complete)) - (error "Not in an editable field"))) + (if field + (widget-apply field :complete) + (error "Not in an editable field")))) ;;; Setting up the buffer. diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el index 328eb569c6f..6d38fd043fe 100644 --- a/lisp/x-dnd.el +++ b/lisp/x-dnd.el @@ -1,9 +1,9 @@ -;;; x-dnd.el --- drag and drop support for X. +;;; x-dnd.el --- drag and drop support for X -*- coding: utf-8 -*- ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. -;; Author: Jan Dj,Ad(Brv <jan.h.d@swipnet.se> +;; Author: Jan Djärv <jan.h.d@swipnet.se> ;; Maintainer: FSF ;; Keywords: window, drag, drop diff --git a/lisp/xml.el b/lisp/xml.el index 20b595fd2d7..8e8981ac439 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -321,18 +321,20 @@ If PARSE-NS is non-nil, then QNAMES are expanded." (progn (forward-char -1) (setq result (xml-parse-tag parse-dtd parse-ns)) - (if (and xml result (not xml-sub-parser)) - ;; translation of rule [1] of XML specifications - (error "XML: (Not Well-Formed) Only one root tag allowed") - (cond - ((null result)) - ((and (listp (car result)) - parse-dtd) - (setq dtd (car result)) - (if (cdr result) ; possible leading comment - (add-to-list 'xml (cdr result)))) - (t - (add-to-list 'xml result))))) + (cond + ((null result) + ;; Not looking at an xml start tag. + (forward-char 1)) + ((and xml (not xml-sub-parser)) + ;; Translation of rule [1] of XML specifications + (error "XML: (Not Well-Formed) Only one root tag allowed")) + ((and (listp (car result)) + parse-dtd) + (setq dtd (car result)) + (if (cdr result) ; possible leading comment + (add-to-list 'xml (cdr result)))) + (t + (add-to-list 'xml result)))) (goto-char (point-max)))) (if parse-dtd (cons dtd (nreverse xml)) |