Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 99796. ------------------------------------------------------------ revno: 99796 committer: Chong Yidong branch nick: trunk timestamp: Wed 2010-03-31 18:28:12 -0400 message: [merge] Fix last set of Nextstep changes. * nsfns.m (ns_set_doc_edited): Remove unused arg OLDVAL. * nsterm.h: Fix prototype. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-03-31 20:39:03 +0000 +++ src/ChangeLog 2010-03-31 22:28:12 +0000 @@ -16,6 +16,11 @@ (gif_load): Put GIF extension data to the property `Qextension_data'. +2010-03-31 Chong Yidong + + * nsfns.m (ns_set_doc_edited): Remove unused arg OLDVAL. + * nsterm.h: Fix prototype. + 2010-03-31 Eli Zaretskii * xdisp.c (highlight_trailing_whitespace): Support highlight of === modified file 'src/nsfns.m' --- src/nsfns.m 2010-03-29 23:48:44 +0000 +++ src/nsfns.m 2010-03-31 22:28:12 +0000 @@ -686,7 +686,7 @@ void -ns_set_doc_edited (struct frame *f, Lisp_Object arg, Lisp_Object oldval) +ns_set_doc_edited (struct frame *f, Lisp_Object arg) { NSView *view = FRAME_NS_VIEW (f); NSAutoreleasePool *pool; ------------------------------------------------------------ revno: 99795 committer: Chong Yidong branch nick: trunk timestamp: Wed 2010-03-31 18:22:17 -0400 message: * cus-edit.el (custom-buffer-sort-alphabetically): Update :version. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-03-31 15:16:12 +0000 +++ lisp/ChangeLog 2010-03-31 22:22:17 +0000 @@ -1,3 +1,8 @@ +2010-03-31 Chong Yidong + + * cus-edit.el (custom-buffer-sort-alphabetically): Update + :version. + 2010-03-31 Juri Linkov * simple.el (next-line, previous-line): Re-throw a signal === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2010-03-12 22:56:30 +0000 +++ lisp/cus-edit.el 2010-03-31 22:22:17 +0000 @@ -675,7 +675,8 @@ (defcustom custom-buffer-sort-alphabetically t "Whether to sort customization groups alphabetically in Custom buffer." :type 'boolean - :group 'custom-buffer) + :group 'custom-buffer + :version "24.1") (defcustom custom-buffer-order-groups 'last "If non-nil, order group members within each customization group. ------------------------------------------------------------ revno: 99794 committer: Dan Nicolaescu branch nick: trunk timestamp: Wed 2010-03-31 13:39:03 -0700 message: Clean up BSD_SYSTEM use. * xterm.c: * process.c: * emacs.c: Use HAVE_SYS_IOCTL_H instead of BSD_SYSTEM as a guard for including . * sysdep.c (wait_without_blocking): Remove BSD_SYSTEM case, this code is only used for MSDOS. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-03-31 14:55:01 +0000 +++ src/ChangeLog 2010-03-31 20:39:03 +0000 @@ -1,3 +1,13 @@ +2010-03-31 Dan Nicolaescu + + Clean up BSD_SYSTEM use. + * xterm.c: + * process.c: + * emacs.c: Use HAVE_SYS_IOCTL_H instead of BSD_SYSTEM as a guard + for including . + * sysdep.c (wait_without_blocking): Remove BSD_SYSTEM case, this + code is only used for MSDOS. + 2010-03-31 Juri Linkov * image.c: Add `Qextension_data'. === modified file 'src/emacs.c' --- src/emacs.c 2010-03-20 08:11:59 +0000 +++ src/emacs.c 2010-03-31 20:39:03 +0000 @@ -32,7 +32,7 @@ #include #endif -#ifdef BSD_SYSTEM +#ifdef HAVE_SYS_IOCTL_H #include #endif === modified file 'src/process.c' --- src/process.c 2010-03-27 00:45:32 +0000 +++ src/process.c 2010-03-31 20:39:03 +0000 @@ -69,12 +69,12 @@ #endif #endif /* HAVE_SOCKETS */ -#if defined(BSD_SYSTEM) +#if defined(HAVE_SYS_IOCTL_H) #include #if !defined (O_NDELAY) && defined (HAVE_PTYS) && !defined(USG5) #include #endif /* HAVE_PTYS and no O_NDELAY */ -#endif /* BSD_SYSTEM */ +#endif /* HAVE_SYS_IOCTL_H */ #ifdef NEED_BSDTTY #include === modified file 'src/sysdep.c' --- src/sysdep.c 2010-03-31 04:14:08 +0000 +++ src/sysdep.c 2010-03-31 20:39:03 +0000 @@ -384,11 +384,7 @@ wait_without_blocking () { -#ifdef BSD_SYSTEM - wait3 (0, WNOHANG | WUNTRACED, 0); -#else croak ("wait_without_blocking"); -#endif synch_process_alive = 0; } === modified file 'src/xterm.c' --- src/xterm.c 2010-02-24 18:23:48 +0000 +++ src/xterm.c 2010-03-31 20:39:03 +0000 @@ -50,9 +50,9 @@ #include #endif /* makedev */ -#ifdef BSD_SYSTEM +#ifdef HAVE_SYS_IOCTL_H #include -#endif /* ! defined (BSD_SYSTEM) */ +#endif /* ! defined (HAVE_SYS_IOCTL_H) */ #include "systime.h" ------------------------------------------------------------ revno: 99793 committer: Juri Linkov branch nick: trunk timestamp: Wed 2010-03-31 18:16:12 +0300 message: * simple.el (next-line, previous-line): Re-throw a signal with `signal' instead of using `ding'. http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01432.html diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-03-31 15:02:53 +0000 +++ lisp/ChangeLog 2010-03-31 15:16:12 +0000 @@ -1,5 +1,11 @@ 2010-03-31 Juri Linkov + * simple.el (next-line, previous-line): Re-throw a signal + with `signal' instead of using `ding'. + http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01432.html + +2010-03-31 Juri Linkov + * simple.el (keyboard-escape-quit): Raise deselecting the active region higher than exiting the minibuffer. http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html === modified file 'lisp/simple.el' --- lisp/simple.el 2010-03-31 15:02:53 +0000 +++ lisp/simple.el 2010-03-31 15:16:12 +0000 @@ -4003,9 +4003,10 @@ (insert (if use-hard-newlines hard-newline "\n"))) (line-move arg nil nil try-vscroll)) (if (called-interactively-p 'interactive) - (condition-case nil + (condition-case err (line-move arg nil nil try-vscroll) - ((beginning-of-buffer end-of-buffer) (ding))) + ((beginning-of-buffer end-of-buffer) + (signal (car err) (cdr err)))) (line-move arg nil nil try-vscroll))) nil) @@ -4033,9 +4034,10 @@ (interactive "^p\np") (or arg (setq arg 1)) (if (called-interactively-p 'interactive) - (condition-case nil + (condition-case err (line-move (- arg) nil nil try-vscroll) - ((beginning-of-buffer end-of-buffer) (ding))) + ((beginning-of-buffer end-of-buffer) + (signal (car err) (cdr err)))) (line-move (- arg) nil nil try-vscroll)) nil) ------------------------------------------------------------ revno: 99792 committer: Juri Linkov branch nick: trunk timestamp: Wed 2010-03-31 18:02:53 +0300 message: * simple.el (keyboard-escape-quit): Raise deselecting the active region higher than exiting the minibuffer. http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-03-31 14:55:01 +0000 +++ lisp/ChangeLog 2010-03-31 15:02:53 +0000 @@ -1,5 +1,11 @@ 2010-03-31 Juri Linkov + * simple.el (keyboard-escape-quit): Raise deselecting the active + region higher than exiting the minibuffer. + http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg00904.html + +2010-03-31 Juri Linkov + * image.el (image-animated-p): Use `image-metadata' instead of `image-extension-data'. Get GIF extenstion data from metadata property `extension-data'. === modified file 'lisp/simple.el' --- lisp/simple.el 2010-03-31 02:53:53 +0000 +++ lisp/simple.el 2010-03-31 15:02:53 +0000 @@ -5490,12 +5490,12 @@ or go back to just one window (by deleting all but the selected window)." (interactive) (cond ((eq last-command 'mode-exited) nil) + ((region-active-p) + (deactivate-mark)) ((> (minibuffer-depth) 0) (abort-recursive-edit)) (current-prefix-arg nil) - ((region-active-p) - (deactivate-mark)) ((> (recursion-depth) 0) (exit-recursive-edit)) (buffer-quit-function ------------------------------------------------------------ revno: 99791 committer: Juri Linkov branch nick: trunk timestamp: Wed 2010-03-31 17:55:01 +0300 message: Rename `image-extension-data' to `image-metadata'. http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01456.html * image.c: Add `Qextension_data'. (syms_of_image): Initialize and staticpro `Qextension_data'. (Fimage_metadata): Rename from `Fimage_extension_data'. (gif_load): Put GIF extension data to the property `Qextension_data'. * image.el (image-animated-p): Use `image-metadata' instead of `image-extension-data'. Get GIF extenstion data from metadata property `extension-data'. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-03-31 01:51:54 +0000 +++ etc/NEWS 2010-03-31 14:55:01 +0000 @@ -132,12 +132,14 @@ ** Image API *** When the image type is one of listed in `image-animated-types' -and the number of sub-images in the image is more then one, then the +and the number of sub-images in the image is more than one, then the new function `create-animated-image' creates an animated image where sub-images are displayed successively with the duration defined by `image-animate-max-time' and the delay between sub-images defined by the Graphic Control Extension of the image. +*** `image-extension-data' is renamed to `image-metadata'. + ** Progress reporters can now "spin". The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can now be nil, or omitted. This makes a "non-numeric" reporter. Each === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-03-31 02:53:53 +0000 +++ lisp/ChangeLog 2010-03-31 14:55:01 +0000 @@ -1,3 +1,9 @@ +2010-03-31 Juri Linkov + + * image.el (image-animated-p): Use `image-metadata' instead of + `image-extension-data'. Get GIF extenstion data from metadata + property `extension-data'. + 2010-03-31 Stefan Monnier * simple.el (append-to-buffer): Simplify. === modified file 'lisp/image.el' --- lisp/image.el 2010-03-11 06:17:08 +0000 +++ lisp/image.el 2010-03-31 14:55:01 +0000 @@ -681,8 +681,9 @@ shall be displayed." (cond ((eq (plist-get (cdr image) :type) 'gif) - (let* ((extdata (image-extension-data image)) - (images (plist-get extdata 'count)) + (let* ((metadata (image-metadata image)) + (images (plist-get metadata 'count)) + (extdata (plist-get metadata 'extension-data)) (anim (plist-get extdata #xF9))) (and (integerp images) (> images 1) (stringp anim) (>= (length anim) 4) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-03-31 14:28:16 +0000 +++ src/ChangeLog 2010-03-31 14:55:01 +0000 @@ -1,3 +1,11 @@ +2010-03-31 Juri Linkov + + * image.c: Add `Qextension_data'. + (syms_of_image): Initialize and staticpro `Qextension_data'. + (Fimage_metadata): Rename from `Fimage_extension_data'. + (gif_load): Put GIF extension data to the property + `Qextension_data'. + 2010-03-31 Eli Zaretskii * xdisp.c (highlight_trailing_whitespace): Support highlight of === modified file 'src/image.c' --- src/image.c 2010-01-24 23:03:13 +0000 +++ src/image.c 2010-03-31 14:55:01 +0000 @@ -604,7 +604,7 @@ extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile; extern Lisp_Object QCdata, QCtype; extern Lisp_Object Qcenter; -Lisp_Object QCascent, QCmargin, QCrelief, Qcount; +Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data; Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask; Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask; @@ -1011,8 +1011,8 @@ return mask; } -DEFUN ("image-extension-data", Fimage_extension_data, Simage_extension_data, 1, 2, 0, - doc: /* Return extension data for image SPEC. +DEFUN ("image-metadata", Fimage_metadata, Simage_metadata, 1, 2, 0, + doc: /* Return metadata for image SPEC. FRAME is the frame on which the image will be displayed. FRAME nil or omitted means use the selected frame. */) (spec, frame) @@ -7169,7 +7169,7 @@ struct frame *f; struct image *img; { - /* IMG->data.ptr_val may contain extension data. */ + /* IMG->data.ptr_val may contain metadata with extension data. */ img->data.lisp_val = Qnil; x_clear_image (f, img); } @@ -7488,8 +7488,8 @@ } } - /* Save GIF image extension data for `image-extension-data'. - Format is (count IMAGES FUNCTION "BYTES" ...). */ + /* Save GIF image extension data for `image-metadata'. + Format is (count IMAGES extension-data (FUNCTION "BYTES" ...)). */ img->data.lisp_val = Qnil; if (gif->SavedImages[ino].ExtensionBlockCount > 0) { @@ -7499,7 +7499,9 @@ img->data.lisp_val = Fcons (make_unibyte_string (ext->Bytes, ext->ByteCount), Fcons (make_number (ext->Function), img->data.lisp_val)); - img->data.lisp_val = Fnreverse (img->data.lisp_val); + img->data.lisp_val = Fcons (Qextension_data, + Fcons (Fnreverse (img->data.lisp_val), + Qnil)); } if (gif->ImageCount > 1) img->data.lisp_val = Fcons (Qcount, @@ -8403,6 +8405,8 @@ Qcount = intern_c_string ("count"); staticpro (&Qcount); + Qextension_data = intern_c_string ("extension-data"); + staticpro (&Qextension_data); QCascent = intern_c_string (":ascent"); staticpro (&QCascent); @@ -8498,7 +8502,7 @@ defsubr (&Simage_refresh); defsubr (&Simage_size); defsubr (&Simage_mask_p); - defsubr (&Simage_extension_data); + defsubr (&Simage_metadata); #if GLYPH_DEBUG defsubr (&Simagep); ------------------------------------------------------------ revno: 99790 committer: Eli Zaretskii branch nick: trunk timestamp: Wed 2010-03-31 17:28:16 +0300 message: Fix highlight of trailing whitespace is right-to-left lines. xdisp.c (highlight_trailing_whitespace): Support highlight of trailing whitespace in right-to-left rows. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-03-31 04:14:08 +0000 +++ src/ChangeLog 2010-03-31 14:28:16 +0000 @@ -1,3 +1,8 @@ +2010-03-31 Eli Zaretskii + + * xdisp.c (highlight_trailing_whitespace): Support highlight of + trailing whitespace in right-to-left rows. + 2010-03-31 Stefan Monnier Get rid of the direct_output optimizations. === modified file 'src/xdisp.c' --- src/xdisp.c 2010-03-31 04:14:08 +0000 +++ src/xdisp.c 2010-03-31 14:28:16 +0000 @@ -16868,19 +16868,37 @@ struct glyph *start = row->glyphs[TEXT_AREA]; struct glyph *glyph = start + used - 1; + if (row->reversed_p) + { + /* Right-to-left rows need to be processed in the opposite + direction, so swap the edge pointers. */ + glyph = start; + start = row->glyphs[TEXT_AREA] + used - 1; + } + /* Skip over glyphs inserted to display the cursor at the end of a line, for extending the face of the last glyph to the end of the line on terminals, and for truncation and continuation glyphs. */ - while (glyph >= start - && glyph->type == CHAR_GLYPH - && INTEGERP (glyph->object)) - --glyph; + if (!row->reversed_p) + { + while (glyph >= start + && glyph->type == CHAR_GLYPH + && INTEGERP (glyph->object)) + --glyph; + } + else + { + while (glyph <= start + && glyph->type == CHAR_GLYPH + && INTEGERP (glyph->object)) + ++glyph; + } /* If last glyph is a space or stretch, and it's trailing whitespace, set the face of all trailing whitespace glyphs in IT->glyph_row to `trailing-whitespace'. */ - if (glyph >= start + if ((row->reversed_p ? glyph <= start : glyph >= start) && BUFFERP (glyph->object) && (glyph->type == STRETCH_GLYPH || (glyph->type == CHAR_GLYPH @@ -16891,12 +16909,24 @@ if (face_id < 0) return; - while (glyph >= start - && BUFFERP (glyph->object) - && (glyph->type == STRETCH_GLYPH - || (glyph->type == CHAR_GLYPH - && glyph->u.ch == ' '))) - (glyph--)->face_id = face_id; + if (!row->reversed_p) + { + while (glyph >= start + && BUFFERP (glyph->object) + && (glyph->type == STRETCH_GLYPH + || (glyph->type == CHAR_GLYPH + && glyph->u.ch == ' '))) + (glyph--)->face_id = face_id; + } + else + { + while (glyph <= start + && BUFFERP (glyph->object) + && (glyph->type == STRETCH_GLYPH + || (glyph->type == CHAR_GLYPH + && glyph->u.ch == ' '))) + (glyph++)->face_id = face_id; + } } } } ------------------------------------------------------------ revno: 99789 [merge] committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2010-03-31 06:48:04 +0000 message: (gnus-article-browse-html-save-cid-content): Rename from gnus-article-browse-html-save-cid-image; make it work recursively for forwarded messages as well. (gnus-article-browse-html-parts): Work when prefix arg is given. (gnus-article-browse-html-article): Doc fix. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-03-31 02:37:57 +0000 +++ lisp/gnus/ChangeLog 2010-03-31 06:45:38 +0000 @@ -1,3 +1,11 @@ +2010-03-31 Katsumi Yamaoka + + * gnus-art.el (gnus-article-browse-html-save-cid-content): Rename from + gnus-article-browse-html-save-cid-image; make it work recursively for + forwarded messages as well. + (gnus-article-browse-html-parts): Work when prefix arg is given. + (gnus-article-browse-html-article): Doc fix. + 2010-03-30 Chong Yidong * message.el (message-default-mail-headers): === modified file 'lisp/gnus/gnus-art.el' --- lisp/gnus/gnus-art.el 2010-03-30 04:44:38 +0000 +++ lisp/gnus/gnus-art.el 2010-03-31 06:44:35 +0000 @@ -2827,41 +2827,39 @@ (setq gnus-article-browse-html-temp-list nil)) gnus-article-browse-html-temp-list) -(defun gnus-article-browse-html-save-cid-image (cid dir) - "Save CID contents to a file in DIR. Return file name." +(defun gnus-article-browse-html-save-cid-content (cid handles directory) + "Find CID content in HANDLES and save it in a file in DIRECTORY. +Return file name." (save-match-data - (gnus-with-article-buffer - (let (cid-handle cid-tmp-file cid-type) - (mapc - (lambda (handle) - (when (and (listp handle) - (stringp (car (last handle))) - (string= (format "<%s>" cid) - (car (last handle)))) - (setq cid-handle handle) - (setq cid-tmp-file - (expand-file-name - (or (mail-content-type-get - (mm-handle-disposition handle) 'filename) - (mail-content-type-get - (setq cid-type (mm-handle-type handle)) 'name) - (concat (make-temp-name "cid") - (or (car (rassoc (car cid-type) - mailcap-mime-extensions)) - ""))) - dir)))) - gnus-article-mime-handles) - (when (and cid-handle cid-tmp-file) - (mm-save-part-to-file cid-handle - cid-tmp-file) - (concat "file://" cid-tmp-file)))))) + (let (file type) + (catch 'found + (dolist (handle handles) + (cond + ((not (listp handle))) + ((equal (mm-handle-media-supertype handle) "multipart") + (when (setq file (gnus-article-browse-html-save-cid-content + cid handle directory)) + (throw 'found file))) + ((equal (concat "<" cid ">") (mm-handle-id handle)) + (setq file + (expand-file-name + (or (mail-content-type-get + (mm-handle-disposition handle) 'filename) + (mail-content-type-get + (setq type (mm-handle-type handle)) 'name) + (concat + (make-temp-name "cid") + (car (rassoc (car type) mailcap-mime-extensions)))) + directory)) + (mm-save-part-to-file handle file) + (throw 'found file)))))))) (defun gnus-article-browse-html-parts (list &optional header) "View all \"text/html\" parts from LIST. Recurse into multiparts. The optional HEADER that should be a decoded message header will be added to the bodies of the \"text/html\" parts." ;; Internal function used by `gnus-article-browse-html-article'. - (let (type file charset tmp-file showed) + (let (type file charset content cid-dir tmp-file showed) ;; Find and show the html-parts. (dolist (handle list) ;; If HTML, show it: @@ -2884,17 +2882,42 @@ (setq handle (mm-handle-cache handle) type (mm-handle-type handle)) (equal (car type) "text/html")))) - (when (or (setq charset (mail-content-type-get type 'charset)) - header - (not file)) + (setq charset (mail-content-type-get type 'charset) + content (mm-get-part handle)) + (with-temp-buffer + (if (eq charset 'gnus-decoded) + (mm-enable-multibyte) + (mm-disable-multibyte)) + (insert content) + ;; resolve cid contents + (let ((case-fold-search t) + cid-file) + (goto-char (point-min)) + (while (re-search-forward "\ +]+[\t\n ]+\\)*src=\"\\(cid:\\([^\"]+\\)\\)\"" + nil t) + (unless cid-dir + (setq cid-dir (make-temp-file "cid" t)) + (add-to-list 'gnus-article-browse-html-temp-list cid-dir)) + (setq file nil + content nil) + (when (setq cid-file + (gnus-article-browse-html-save-cid-content + (match-string 2) + (with-current-buffer gnus-article-buffer + gnus-article-mime-handles) + cid-dir)) + (replace-match (concat "file://" cid-file) + nil nil nil 1)))) + (unless content (setq content (buffer-string)))) + (when (or charset header (not file)) (setq tmp-file (mm-make-temp-file ;; Do we need to care for 8.3 filenames? "mm-" nil ".html"))) ;; Add a meta html tag to specify charset and a header. (cond (header - (let (title eheader body hcharset coding force-charset - cid-image-dir) + (let (title eheader body hcharset coding force-charset) (with-temp-buffer (mm-enable-multibyte) (setq case-fold-search t) @@ -2917,8 +2940,7 @@ charset) title (when title (mm-encode-coding-string title charset)) - body (mm-encode-coding-string (mm-get-part handle) - charset) + body (mm-encode-coding-string content charset) force-charset t) (setq hcharset (mm-find-mime-charset-region (point-min) (point-max))) @@ -2940,7 +2962,7 @@ title (when title (mm-encode-coding-string title coding)) - body (mm-get-part handle)) + body content) (setq charset 'utf-8 eheader (mm-encode-coding-string (buffer-string) charset) @@ -2949,7 +2971,7 @@ title charset)) body (mm-encode-coding-string (mm-decode-coding-string - (mm-get-part handle) body) + content body) charset) force-charset t))) (setq charset hcharset @@ -2958,9 +2980,9 @@ title (when title (mm-encode-coding-string title coding)) - body (mm-get-part handle))) + body content)) (setq eheader (mm-string-as-unibyte (buffer-string)) - body (mm-get-part handle)))) + body content))) (erase-buffer) (mm-disable-multibyte) (insert body) @@ -2977,27 +2999,14 @@ (re-search-forward "]+\\|\\s-*\\)>\\s-*" nil t)) (insert eheader) - ;; resolve cid images - (while (re-search-forward - "