Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 102242. ------------------------------------------------------------ revno: 102242 committer: Chong Yidong branch nick: trunk timestamp: Wed 2010-11-03 19:21:51 -0400 message: * emacs-lisp/package.el (package-unpack): Remove no-op. (package--builtins, package--dir): Doc fix. (package-activate-1, package-activate, package-install) (package-compute-transaction): Fix error message. (package-delete): Use delete-directory. Omit system packages. (package-initialize): Set package-alist to nil first. (package-menu-mark-delete, package-menu-mark-install): Don't add symbols that are inconsistent with the package state. (package-menu-execute): Perform deletions and installations as single batch operations. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-11-03 08:03:42 +0000 +++ lisp/ChangeLog 2010-11-03 23:21:51 +0000 @@ -1,3 +1,16 @@ +2010-11-03 Chong Yidong + + * emacs-lisp/package.el (package-unpack): Remove no-op. + (package--builtins, package--dir): Doc fix. + (package-activate-1, package-activate, package-install) + (package-compute-transaction): Fix error message. + (package-delete): Use delete-directory. Omit system packages. + (package-initialize): Set package-alist to nil first. + (package-menu-mark-delete, package-menu-mark-install): Don't add + symbols that are inconsistent with the package state. + (package-menu-execute): Perform deletions and installations as + single batch operations. + 2010-11-03 Glenn Morris * progmodes/idlwave.el (idlwave-pset): Only used on XEmacs. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2010-11-03 03:25:36 +0000 +++ lisp/emacs-lisp/package.el 2010-11-03 23:21:51 +0000 @@ -77,7 +77,7 @@ ;; Other external functions you may want to use: ;; -;; M-x package-list-packages +;; M-x list-packages ;; Enters a mode similar to buffer-menu which lets you manage ;; packages. You can choose packages for install (mark with "i", ;; then "x" to execute) or deletion (not implemented yet), and you @@ -215,7 +215,6 @@ (declare-function url-http-parse-response "url-http" ()) (declare-function lm-header "lisp-mnt" (header)) (declare-function lm-commentary "lisp-mnt" (&optional file)) -(declare-function dired-delete-file "dired" (file &optional recursive trash)) (defvar url-http-end-of-headers) (defcustom package-archives '(("gnu" . "http://elpa.gnu.org/packages/")) @@ -278,9 +277,12 @@ ;; until it's needed (i.e. when `package-intialize' is called). (defvar package--builtins nil "Alist of built-in packages. +The actual value is initialized by loading the library +`finder-inf'; this is not done until it is needed, e.g. by the +function `package-built-in-p'. + Each element has the form (PKG . DESC), where PKG is a package name (a symbol) and DESC is a vector that describes the package. - The vector DESC has the form [VERSION REQS DOCSTRING]. VERSION is a version list. REQS is a list of packages (symbols) required by the package. @@ -389,8 +391,10 @@ "Extract the kind of download from an archive package description vector." (aref desc 3)) -(defun package--dir (name version-string) - (let* ((subdir (concat name "-" version-string)) +(defun package--dir (name version) + "Return the directory where a package is installed, or nil if none. +NAME and VERSION are both strings." + (let* ((subdir (concat name "-" version)) (dir-list (cons package-user-dir package-directory-list)) pkg-dir) (while dir-list @@ -406,7 +410,7 @@ (version-str (package-version-join (package-desc-vers pkg-vec))) (pkg-dir (package--dir name version-str))) (unless pkg-dir - (error "Internal error: could not find directory for %s-%s" + (error "Internal error: unable to find directory for `%s-%s'" name version-str)) ;; Add info node. (when (file-exists-p (expand-file-name "dir" pkg-dir)) @@ -457,7 +461,7 @@ (throw 'dep-failure req)))))) (if fail (warn "Unable to activate package `%s'. -Required package `%s', version %s, is unavailable" +Required package `%s-%s' is unavailable" package (car fail) (package-version-join (cadr fail))) ;; If all goes well, activate the package itself. (package-activate-1 package pkg-vec))))))) @@ -565,12 +569,8 @@ (defun package-unpack (name version) (let ((pkg-dir (expand-file-name (concat (symbol-name name) "-" version) package-user-dir))) - ;; Be careful!! (make-directory package-user-dir t) - (if (file-directory-p pkg-dir) - (mapc (lambda (file) nil) ; 'delete-file -- FIXME: when we're - ; more confident - (directory-files pkg-dir t "^[^.]"))) + ;; FIXME: should we delete PKG-DIR if it exists? (let* ((default-directory (file-name-as-directory package-user-dir))) (package-untar-buffer) (package-generate-autoloads (symbol-name name) pkg-dir) @@ -608,7 +608,7 @@ (mapcar (lambda (elt) (list (car elt) - (package-version-join (car (cdr elt))))) + (package-version-join (cadr elt)))) requires)))) "\n") nil @@ -698,18 +698,18 @@ ((null (stringp hold)) (error "Invalid element in `package-load-list'")) ((version-list-< (version-to-list hold) next-version) - (error "Package '%s' held at version %s, \ + (error "Package `%s' held at version %s, \ but version %s required" (symbol-name next-pkg) hold (package-version-join next-version))))) (unless pkg-desc - (error "Package '%s', version %s, unavailable for installation" + (error "Package `%s-%s' is unavailable" (symbol-name next-pkg) (package-version-join next-version))) (unless (version-list-<= next-version (package-desc-vers (cdr pkg-desc))) (error - "Need package '%s' with version %s, but only %s is available" + "Need package `%s-%s', but only %s is available" (symbol-name next-pkg) (package-version-join next-version) (package-version-join (package-desc-vers (cdr pkg-desc))))) ;; Only add to the transaction if we don't already have it. @@ -819,7 +819,7 @@ nil t)))) (let ((pkg-desc (assq name package-archive-contents))) (unless pkg-desc - (error "Package '%s' is not available for installation" + (error "Package `%s' is not available for installation" (symbol-name name))) (package-download-transaction (package-compute-transaction (list name) @@ -976,11 +976,16 @@ (t (error "Unrecognized extension `%s'" (file-name-extension file)))))) (defun package-delete (name version) - (require 'dired) ; for dired-delete-file - (dired-delete-file (expand-file-name (concat name "-" version) - package-user-dir) - ;; FIXME: query user? - 'always)) + (let ((dir (package--dir name version))) + (if (string-equal (file-name-directory dir) + (file-name-as-directory + (expand-file-name package-user-dir))) + (progn + (delete-directory dir t t) + (message "Package `%s-%s' deleted." name version)) + ;; Don't delete "system" packages + (error "Package `%s-%s' is a system package, not deleting" + name version)))) (defun package-archive-url (name) "Return the archive containing the package NAME." @@ -1030,7 +1035,8 @@ The variable `package-load-list' controls which packages to load. If optional arg NO-ACTIVATE is non-nil, don't activate packages." (interactive) - (setq package-obsolete-alist nil) + (setq package-alist nil + package-obsolete-alist nil) (package-load-all-descriptors) (package-read-all-archive-contents) (unless no-activate @@ -1361,12 +1367,16 @@ (defun package-menu-mark-delete (num) "Mark a package for deletion and move to the next line." (interactive "p") - (package-menu-mark-internal "D")) + (if (string-equal (package-menu-get-status) "installed") + (package-menu-mark-internal "D") + (forward-line))) (defun package-menu-mark-install (num) "Mark a package for installation and move to the next line." (interactive "p") - (package-menu-mark-internal "I")) + (if (string-equal (package-menu-get-status) "available") + (package-menu-mark-internal "I") + (forward-line))) (defun package-menu-mark-unmark (num) "Clear any marks on a package and move to the next line." @@ -1420,34 +1430,58 @@ ""))) (defun package-menu-execute () - "Perform all the marked actions. -Packages marked for installation will be downloaded and -installed. Packages marked for deletion will be removed. -Note that after installing packages you will want to restart -Emacs." + "Perform marked Package Menu actions. +Packages marked for installation are downloaded and installed; +packages marked for deletion are removed." (interactive) - (goto-char (point-min)) - (while (not (eobp)) - (let ((cmd (char-after)) - (pkg-name (package-menu-get-package)) - (pkg-vers (package-menu-get-version)) - (pkg-status (package-menu-get-status))) - (cond - ((eq cmd ?D) - (when (and (string= pkg-status "installed") - (string= pkg-name "package")) - ;; FIXME: actually, we could be tricky and remove all info. - ;; But that is drastic and the user can do that instead. - (error "Can't delete most recent version of `package'")) - ;; Ask for confirmation here? Maybe if package status is ""? - ;; Or if any lisp from package is actually loaded? - (message "Deleting %s-%s..." pkg-name pkg-vers) - (package-delete pkg-name pkg-vers) - (message "Deleting %s-%s... done" pkg-name pkg-vers)) - ((eq cmd ?I) - (package-install (intern pkg-name))))) - (forward-line)) - (package-menu-revert)) + (let (install-list delete-list cmd) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + (setq cmd (char-after)) + (cond + ((eq cmd ?\s) t) + ((eq cmd ?D) + (push (cons (package-menu-get-package) + (package-menu-get-version)) + delete-list)) + ((eq cmd ?I) + (push (package-menu-get-package) install-list))) + (forward-line))) + ;; Delete packages, prompting if necessary. + (when delete-list + (if (yes-or-no-p + (if (= (length delete-list) 1) + (format "Delete package `%s-%s'? " + (caar delete-list) + (cdr (car delete-list))) + (format "Delete these %d packages (%s)? " + (length delete-list) + (mapconcat (lambda (elt) + (concat (car elt) "-" (cdr elt))) + delete-list + ", ")))) + (dolist (elt delete-list) + (condition-case err + (package-delete (car elt) (cdr elt)) + (error (message (cadr err))))) + (error "Aborted"))) + (when install-list + (if (yes-or-no-p + (if (= (length install-list) 1) + (format "Install package `%s'? " (car install-list)) + (format "Install these %d packages (%s)? " + (length install-list) + (mapconcat 'identity install-list ", ")))) + (dolist (elt install-list) + (package-install (intern elt))))) + ;; If we deleted anything, regenerate `package-alist'. This is done + ;; automatically if we installed a package. + (and delete-list (null install-list) + (package-initialize)) + (if (or delete-list install-list) + (package-menu-revert) + (message "No operations specified.")))) (defun package-print-package (package version key desc) (let ((face ------------------------------------------------------------ revno: 102241 author: Julien Danjou committer: Chong Yidong branch nick: trunk timestamp: Wed 2010-11-03 16:08:48 -0400 message: Support for gif transparency. * image.c (gif_load): Add support for transparency and specified :background. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-01 15:18:42 +0000 +++ src/ChangeLog 2010-11-03 20:08:48 +0000 @@ -1,3 +1,8 @@ +2010-11-03 Julien Danjou + + * image.c (gif_load): Add support for transparency and specified + :background. + 2010-11-01 Kenichi Handa * dispextern.h (lookup_glyphless_char_display): Extern it. === modified file 'src/image.c' --- src/image.c 2010-10-15 10:10:20 +0000 +++ src/image.c 2010-11-03 20:08:48 +0000 @@ -7096,12 +7096,15 @@ static const int interlace_start[] = {0, 4, 2, 1}; static const int interlace_increment[] = {8, 8, 4, 2}; +#define GIF_LOCAL_DESCRIPTOR_EXTENSION 249 + static int gif_load (struct frame *f, struct image *img) { Lisp_Object file, specified_file; Lisp_Object specified_data; int rc, width, height, x, y, i; + boolean transparent_p; XImagePtr ximg; ColorMapObject *gif_color_map; unsigned long pixel_colors[256]; @@ -7110,6 +7113,7 @@ int ino, image_height, image_width; gif_memory_source memsrc; unsigned char *raster; + unsigned int transparency_color_index; specified_file = image_spec_value (img->spec, QCfile, NULL); specified_data = image_spec_value (img->spec, QCdata, NULL); @@ -7182,6 +7186,18 @@ return 0; } + for (i = 0; i < gif->SavedImages[ino].ExtensionBlockCount; i++) + if ((gif->SavedImages[ino].ExtensionBlocks[i].Function + == GIF_LOCAL_DESCRIPTOR_EXTENSION) + && gif->SavedImages[ino].ExtensionBlocks[i].ByteCount == 4 + /* Transparency enabled? */ + && gif->SavedImages[ino].ExtensionBlocks[i].Bytes[0] & 1) + { + transparent_p = 1; + transparency_color_index + = (unsigned char) gif->SavedImages[ino].ExtensionBlocks[i].Bytes[3]; + } + img->corners[TOP_CORNER] = gif->SavedImages[ino].ImageDesc.Top; img->corners[LEFT_CORNER] = gif->SavedImages[ino].ImageDesc.Left; image_height = gif->SavedImages[ino].ImageDesc.Height; @@ -7220,10 +7236,22 @@ if (gif_color_map) for (i = 0; i < gif_color_map->ColorCount; ++i) { - int r = gif_color_map->Colors[i].Red << 8; - int g = gif_color_map->Colors[i].Green << 8; - int b = gif_color_map->Colors[i].Blue << 8; - pixel_colors[i] = lookup_rgb_color (f, r, g, b); + if (transparent_p && transparency_color_index == i) + { + Lisp_Object specified_bg + = image_spec_value (img->spec, QCbackground, NULL); + pixel_colors[i] = STRINGP (specified_bg) + ? x_alloc_image_color (f, img, specified_bg, + FRAME_BACKGROUND_PIXEL (f)) + : FRAME_BACKGROUND_PIXEL (f); + } + else + { + int r = gif_color_map->Colors[i].Red << 8; + int g = gif_color_map->Colors[i].Green << 8; + int b = gif_color_map->Colors[i].Blue << 8; + pixel_colors[i] = lookup_rgb_color (f, r, g, b); + } } #ifdef COLOR_TABLE_SUPPORT ------------------------------------------------------------ revno: 102240 committer: Chong Yidong branch nick: trunk timestamp: Wed 2010-11-03 15:53:47 -0400 message: etc/NEWS: Move --with-crit-dir option to emacs-23. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-11-01 03:20:57 +0000 +++ etc/NEWS 2010-11-03 19:53:47 +0000 @@ -38,10 +38,6 @@ lib-src/Makefile by hand in order to use the associated features. --- -** There is a new configure option --with-crt-dir. -This is only useful if your crt*.o files are in a non-standard location. - ---- ** Emacs can be compiled against Gtk+ 3.0 if you pass --with-x-toolkit=gtk3 to configure. Note that other libraries used by Emacs, RSVG and GConf, also depend on Gtk+. You can disable them with --without-rsvg and ------------------------------------------------------------ revno: 102239 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-11-03 01:03:42 -0700 message: reftex-toc trivia. * lisp/textmodes/reftex-toc.el (reftex-toc-do-promote): Remove unused local `mpos'. (reftex-toc-restore-region): Make `mpos' local to this function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-11-03 07:57:43 +0000 +++ lisp/ChangeLog 2010-11-03 08:03:42 +0000 @@ -7,6 +7,8 @@ set-process-query-on-exit-flag. * textmodes/reftex-toc.el (name1, dummy, dummy2): Remove unused decs. + (reftex-toc-do-promote): Remove unused local `mpos'. + (reftex-toc-restore-region): Make `mpos' local to this function. * net/dbus.el (dbus-name-owner-changed-handler): Doc fix. === modified file 'lisp/textmodes/reftex-toc.el' --- lisp/textmodes/reftex-toc.el 2010-11-03 07:20:03 +0000 +++ lisp/textmodes/reftex-toc.el 2010-11-03 08:03:42 +0000 @@ -546,7 +546,6 @@ ;; Promotion/Demotion stuff (defvar delta) -(defvar mpos) (defvar pro-or-de) (defvar start-pos) (defvar start-line) @@ -575,7 +574,7 @@ (if (bolp) 1 0))))) (start-pos (point)) (pro-or-de (if (> delta 0) "de" "pro")) - beg end entries data sections nsec mpos msg) + beg end entries data sections nsec msg) (setq msg (catch 'exit (if (reftex-region-active-p) @@ -629,20 +628,20 @@ (defun reftex-toc-restore-region (point-line &optional mark-line) - (when mark-line - (goto-char (point-min)) - (forward-line (1- mark-line)) - (setq mpos (point))) - (when point-line - (goto-char (point-min)) - (forward-line (1- point-line))) - (if mark-line - (progn - (set-mark mpos) - (if (featurep 'xemacs) - (zmacs-activate-region) - (setq mark-active t - deactivate-mark nil))))) + (let (mpos) + (when mark-line + (goto-char (point-min)) + (forward-line (1- mark-line)) + (setq mpos (point))) + (when point-line + (goto-char (point-min)) + (forward-line (1- point-line))) + (when mark-line + (set-mark mpos) + (if (featurep 'xemacs) + (zmacs-activate-region) + (setq mark-active t + deactivate-mark nil))))) (defun reftex-toc-promote-prepare (x) "Look at a toc entry and see if we could pro/demote it. ------------------------------------------------------------ revno: 102238 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-11-03 00:57:43 -0700 message: idlwave trivia. * lisp/progmodes/idlwave.el (idlwave-pset): Only used on XEmacs. (props): Remove unnecessary declaration. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-11-03 07:42:27 +0000 +++ lisp/ChangeLog 2010-11-03 07:57:43 +0000 @@ -1,5 +1,8 @@ 2010-11-03 Glenn Morris + * progmodes/idlwave.el (idlwave-pset): Only used on XEmacs. + (props): Remove unnecessary declaration. + * textmodes/ispell.el (ispell-init-process): On Emacs, always use set-process-query-on-exit-flag. === modified file 'lisp/progmodes/idlwave.el' --- lisp/progmodes/idlwave.el 2010-08-29 16:17:13 +0000 +++ lisp/progmodes/idlwave.el 2010-11-03 07:57:43 +0000 @@ -6911,9 +6911,10 @@ ;;---------------------------------------------------------------------- ;;---------------------------------------------------------------------- ;;---------------------------------------------------------------------- -(defvar rtn) -(defun idlwave-pset (item) - (set 'rtn item)) +(when (featurep 'xemacs) + (defvar rtn) + (defun idlwave-pset (item) + (set 'rtn item))) (defun idlwave-popup-select (ev list title &optional sort) "Select an item in LIST with a popup menu. @@ -7683,7 +7684,6 @@ (t nil)))) (defvar link) ;dynamic variables set by help callback -(defvar props) (defun idlwave-complete-sysvar-help (mode word) (let ((word (or (nth 1 idlwave-completion-help-info) word)) (entry (assoc word idlwave-system-variables-alist))) @@ -9364,5 +9364,4 @@ (provide 'idlwave) -;; arch-tag: f77f3b0c-c37c-424f-a328-0886fd42b6fb ;;; idlwave.el ends here ------------------------------------------------------------ revno: 102237 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-11-03 00:42:27 -0700 message: Silence ispell.el compilation. * lisp/textmodes/ispell.el (ispell-init-process): On Emacs, always use set-process-query-on-exit-flag. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-11-03 07:20:03 +0000 +++ lisp/ChangeLog 2010-11-03 07:42:27 +0000 @@ -1,5 +1,8 @@ 2010-11-03 Glenn Morris + * textmodes/ispell.el (ispell-init-process): On Emacs, always use + set-process-query-on-exit-flag. + * textmodes/reftex-toc.el (name1, dummy, dummy2): Remove unused decs. * net/dbus.el (dbus-name-owner-changed-handler): Doc fix. === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2010-11-01 05:55:40 +0000 +++ lisp/textmodes/ispell.el 2010-11-03 07:42:27 +0000 @@ -2740,9 +2740,11 @@ (if extended-char-mode ; ~ extended character mode (ispell-send-string (concat extended-char-mode "\n")))) (if ispell-async-processp - (if (fboundp 'set-process-query-on-exit-flag) ;; not XEmacs + (if (featurep 'emacs) (set-process-query-on-exit-flag ispell-process nil) - (process-kill-without-query ispell-process)))))) + (if (fboundp 'set-process-query-on-exit-flag) + (set-process-query-on-exit-flag ispell-process nil) + (process-kill-without-query ispell-process))))))) ;;;###autoload (defun ispell-kill-ispell (&optional no-error) ------------------------------------------------------------ revno: 102236 committer: Glenn Morris branch nick: trunk timestamp: Wed 2010-11-03 00:20:03 -0700 message: * lisp/textmodes/reftex-toc.el (name1, dummy, dummy2): Remove unused decs. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-11-03 03:49:04 +0000 +++ lisp/ChangeLog 2010-11-03 07:20:03 +0000 @@ -1,5 +1,7 @@ 2010-11-03 Glenn Morris + * textmodes/reftex-toc.el (name1, dummy, dummy2): Remove unused decs. + * net/dbus.el (dbus-name-owner-changed-handler): Doc fix. * play/landmark.el (lm-losing-threshold): Correct spelling. === modified file 'lisp/textmodes/reftex-toc.el' --- lisp/textmodes/reftex-toc.el 2010-11-03 03:49:04 +0000 +++ lisp/textmodes/reftex-toc.el 2010-11-03 07:20:03 +0000 @@ -644,10 +644,6 @@ (setq mark-active t deactivate-mark nil))))) -(defvar name1) -(defvar dummy) -(defvar dummy2) - (defun reftex-toc-promote-prepare (x) "Look at a toc entry and see if we could pro/demote it. Expects the level change DELTA to be dynamically scoped into this function. ------------------------------------------------------------ revno: 102235 committer: Glenn Morris branch nick: trunk timestamp: Tue 2010-11-02 20:53:12 -0700 message: * doc/misc/gnus.texi (Configuring nnmairix): Spelling fix. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2010-11-03 03:49:04 +0000 +++ doc/misc/ChangeLog 2010-11-03 03:53:12 +0000 @@ -1,7 +1,7 @@ 2010-11-03 Glenn Morris * ediff.texi (Quick Help Commands, Miscellaneous): - * gnus.texi (Agent Variables): Spelling fix. + * gnus.texi (Agent Variables, Configuring nnmairix): Spelling fix. 2010-10-31 Lars Magne Ingebrigtsen === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2010-11-03 03:40:54 +0000 +++ doc/misc/gnus.texi 2010-11-03 03:53:12 +0000 @@ -4556,7 +4556,7 @@ server exclusively for @code{nnmairix} in your secondary select methods (@pxref{Finding the News}). If you use a secondary @code{nnml} server just for mairix, make sure that you explicitly set the server variable -@code{nnml-get-new-mail} to @code{nil}, or you might loose mail +@code{nnml-get-new-mail} to @code{nil}, or you might lose mail (@pxref{nnmairix caveats}). If you want to use mairix remotely on an @acronym{IMAP} server, you have to choose the corresponding @code{nnimap} server here.