Now on revision 107605. ------------------------------------------------------------ revno: 107605 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11014 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-14 23:09:26 -0400 message: * lisp/progmodes/perl-mode.el (perl-syntax-propertize-special-constructs): Fix up parsing of multiline twoarg non-paired elements. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-15 01:38:40 +0000 +++ lisp/ChangeLog 2012-03-15 03:09:26 +0000 @@ -1,5 +1,8 @@ 2012-03-15 Stefan Monnier + * progmodes/perl-mode.el (perl-syntax-propertize-special-constructs): + Fix up parsing of multiline twoarg non-paired elements (bug#11014). + * imenu.el: Fix multiple inheritance breakage (bug#9199). (imenu-add-to-menubar): Don't add a redundant index. (imenu-update-menubar): Handle a dynamically composed keymap. === modified file 'lisp/progmodes/perl-mode.el' --- lisp/progmodes/perl-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/perl-mode.el 2012-03-15 03:09:26 +0000 @@ -388,7 +388,11 @@ ;; In case of error, make sure we don't move backward. (scan-error (goto-char startpos) nil)) (not (or (nth 8 (parse-partial-sexp - (point) limit nil nil state 'syntax-table)) + ;; Since we don't know if point is within + ;; the first or the scond arg, we have to + ;; start from the beginning. + (if twoargs (1+ (nth 8 state)) (point)) + limit nil nil state 'syntax-table)) ;; If we have a self-paired opener and a twoargs ;; command, the form is s/../../ so we have to skip ;; a second time. ------------------------------------------------------------ revno: 107604 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9199 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2012-03-14 21:38:40 -0400 message: * lisp/imenu.el: Fix multiple inheritance breakage. (imenu-add-to-menubar): Don't add a redundant index. (imenu-update-menubar): Handle a dynamically composed keymap. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-03-13 23:27:56 +0000 +++ lisp/ChangeLog 2012-03-15 01:38:40 +0000 @@ -1,3 +1,9 @@ +2012-03-15 Stefan Monnier + + * imenu.el: Fix multiple inheritance breakage (bug#9199). + (imenu-add-to-menubar): Don't add a redundant index. + (imenu-update-menubar): Handle a dynamically composed keymap. + 2012-03-13 Katsumi Yamaoka * mail/sendmail.el (mail-encode-header): === modified file 'lisp/imenu.el' --- lisp/imenu.el 2012-01-19 07:21:25 +0000 +++ lisp/imenu.el 2012-03-15 01:38:40 +0000 @@ -963,13 +963,14 @@ imenu-generic-expression (not (eq imenu-create-index-function 'imenu-default-create-index-function))) - (let ((newmap (make-sparse-keymap))) - (set-keymap-parent newmap (current-local-map)) - (setq imenu--last-menubar-index-alist nil) - (define-key newmap [menu-bar index] - `(menu-item ,name ,(make-sparse-keymap "Imenu"))) - (use-local-map newmap) - (add-hook 'menu-bar-update-hook 'imenu-update-menubar)) + (unless (keymapp (lookup-key (current-local-map) [menu-bar index])) + (let ((newmap (make-sparse-keymap))) + (set-keymap-parent newmap (current-local-map)) + (setq imenu--last-menubar-index-alist nil) + (define-key newmap [menu-bar index] + `(menu-item ,name ,(make-sparse-keymap "Imenu"))) + (use-local-map newmap) + (add-hook 'menu-bar-update-hook 'imenu-update-menubar))) (error "The mode `%s' does not support Imenu" (format-mode-line mode-name)))) @@ -1008,6 +1009,9 @@ (car (cdr menu)))) 'imenu--menubar-select)) (setq old (lookup-key (current-local-map) [menu-bar index])) + ;; This should never happen, but in some odd cases, potentially, + ;; lookup-key may return a dynamically composed keymap. + (if (keymapp (cadr old)) (setq old (cadr old))) (setcdr old (cdr menu1))))))) (defun imenu--menubar-select (item) ------------------------------------------------------------ revno: 107603 author: Lars Magne Ingebrigtsen committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2012-03-14 22:15:04 +0000 message: Merge changes made in No Gnus diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-03-12 11:48:55 +0000 +++ lisp/gnus/ChangeLog 2012-03-14 22:15:04 +0000 @@ -1,3 +1,22 @@ +2012-03-14 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-update-marks): Don't propagate marks unless + requested (bug#10961). + + * shr.el (shr-table-widths): Divide the extra width more fairly over + the TDs (bug#10973). + (shr-render-td): Don't delete too much padding. + (shr-natural-width): Compute the natural width more correctly. + (shr-insert): Allow the natural width to be computed for tables again. + (shr-tag-table-1): Rework how the natural widths are computed by + rendering the table a third time. + (shr-natural-width): Removed. + (shr-buffer-width): New function. + (shr-expand-newlines): Use it. + + * gnus-msg.el (gnus-bug): Don't delete the other windows. We may be + using a `gnus-use-full-window' setup (bug#11013). + 2012-03-12 Lars Magne Ingebrigtsen * gnus-int.el (gnus-backend-trace): Flip default to nil before Emacs === modified file 'lisp/gnus/gnus-msg.el' --- lisp/gnus/gnus-msg.el 2012-03-04 22:19:10 +0000 +++ lisp/gnus/gnus-msg.el 2012-03-14 22:15:04 +0000 @@ -1453,7 +1453,6 @@ (error "Gnus has been shut down")) (gnus-setup-message (if (message-mail-user-agent) 'message 'bug) (unless (message-mail-user-agent) - (delete-other-windows) (when gnus-bug-create-help-buffer (switch-to-buffer "*Gnus Help Bug*") (erase-buffer) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2012-02-20 11:17:07 +0000 +++ lisp/gnus/gnus-sum.el 2012-03-14 22:15:04 +0000 @@ -6074,6 +6074,10 @@ (when (and (gnus-check-backend-function 'request-set-mark gnus-newsgroup-name) + (or gnus-propagate-marks + (gnus-method-option-p + (gnus-find-method-for-group gnus-newsgroup-name) + 'server-marks)) (not (gnus-article-unpropagatable-p (cdr type)))) (let* ((old (cdr (assq (cdr type) (gnus-info-marks info)))) ;; Don't do anything about marks for articles we === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2012-02-25 13:20:57 +0000 +++ lisp/gnus/shr.el 2012-03-14 22:15:04 +0000 @@ -341,7 +341,6 @@ (delete-char -1)) (insert "\n") (unless found - (put-text-property (1- (point)) (point) 'shr-break t) ;; No space is needed at the beginning of a line. (when (eq (following-char) ? ) (delete-char 1))) @@ -711,7 +710,7 @@ (forward-line 1) (setq end (point)) (narrow-to-region start end) - (let ((width (shr-natural-width)) + (let ((width (shr-buffer-width)) column) (goto-char (point-min)) (while (not (eobp)) @@ -1048,7 +1047,10 @@ ;; be smaller (if there's little text) or bigger (if there's ;; unbreakable text). (sketch (shr-make-table cont suggested-widths)) - (sketch-widths (shr-table-widths sketch suggested-widths))) + ;; Compute the "natural" width by setting each column to 500 + ;; characters and see how wide they really render. + (natural (shr-make-table cont (make-vector (length columns) 500))) + (sketch-widths (shr-table-widths sketch natural suggested-widths))) ;; This probably won't work very well. (when (> (+ (loop for width across sketch-widths summing (1+ width)) @@ -1186,31 +1188,35 @@ shr-table-corner)) (insert "\n")) -(defun shr-table-widths (table suggested-widths) +(defun shr-table-widths (table natural-table suggested-widths) (let* ((length (length suggested-widths)) (widths (make-vector length 0)) (natural-widths (make-vector length 0))) (dolist (row table) (let ((i 0)) (dolist (column row) - (aset widths i (max (aref widths i) - (car column))) - (aset natural-widths i (max (aref natural-widths i) - (cadr column))) + (aset widths i (max (aref widths i) column)) + (setq i (1+ i))))) + (dolist (row natural-table) + (let ((i 0)) + (dolist (column row) + (aset natural-widths i (max (aref natural-widths i) column)) (setq i (1+ i))))) (let ((extra (- (apply '+ (append suggested-widths nil)) (apply '+ (append widths nil)))) (expanded-columns 0)) + ;; We have extra, unused space, so divide this space amongst the + ;; columns. (when (> extra 0) + ;; If the natural width is wider than the rendered width, we + ;; want to allow the column to expand. (dotimes (i length) - ;; If the natural width is wider than the rendered width, we - ;; want to allow the column to expand. (when (> (aref natural-widths i) (aref widths i)) (setq expanded-columns (1+ expanded-columns)))) (dotimes (i length) (when (> (aref natural-widths i) (aref widths i)) (aset widths i (min - (1+ (aref natural-widths i)) + (aref natural-widths i) (+ (/ extra expanded-columns) (aref widths i)))))))) widths)) @@ -1265,10 +1271,13 @@ (let ((shr-width width) (shr-indentation 0)) (shr-descend (cons 'td cont))) + ;; Delete padding at the bottom of the TDs. (delete-region (point) - (+ (point) - (skip-chars-backward " \t\n"))) + (progn + (skip-chars-backward " \t\n") + (end-of-line) + (point))) (push (list (cons width cont) (buffer-string) (shr-overlays-in-region (point-min) (point-max))) shr-content-cache))) @@ -1302,19 +1311,14 @@ (split-string (buffer-string) "\n") (shr-collect-overlays) (car actual-colors)) - (list max - (shr-natural-width))))))) + max))))) -(defun shr-natural-width () +(defun shr-buffer-width () (goto-char (point-min)) - (let ((current 0) - (max 0)) + (let ((max 0)) (while (not (eobp)) (end-of-line) - (setq current (+ current (current-column))) - (unless (get-text-property (point) 'shr-break) - (setq max (max max current) - current 0)) + (setq max (max max (current-column))) (forward-line 1)) max)) ------------------------------------------------------------ revno: 107602 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Wed 2012-03-14 03:44:09 +0100 message: Always call the callback when timing out url-queue jobs * url-queue.el (url-queue-kill-job): Make sure that the callback is always called, even if we have a timeout. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-03-11 15:12:26 +0000 +++ lisp/url/ChangeLog 2012-03-14 02:44:09 +0000 @@ -1,3 +1,8 @@ +2012-03-14 Lars Magne Ingebrigtsen + + * url-queue.el (url-queue-kill-job): Make sure that the callback + is always called, even if we have a timeout. + 2012-03-11 Chong Yidong * url-http.el (url-http-end-of-document-sentinel): Handle === modified file 'lisp/url/url-queue.el' --- lisp/url/url-queue.el 2012-02-20 12:12:48 +0000 +++ lisp/url/url-queue.el 2012-03-14 02:44:09 +0000 @@ -156,9 +156,20 @@ (while (setq process (get-buffer-process (url-queue-buffer job))) (set-process-sentinel process 'ignore) (ignore-errors - (delete-process process)))) - (ignore-errors - (kill-buffer (url-queue-buffer job))))) + (delete-process process))))) + ;; Call the callback with an error message to ensure that the caller + ;; is notified that the job has failed. + (with-current-buffer + (if (bufferp (url-queue-buffer job)) + ;; Use the (partially filled) process buffer it it exists. + (url-queue-buffer job) + ;; If not, just create a new buffer, which will probably be + ;; killed again by the caller. + (generate-new-buffer " *temp*")) + (apply (url-queue-callback job) + (cons (list :error (list 'error 'url-queue-timeout + "Queue timeout exceeded")) + (url-queue-cbargs job))))) (provide 'url-queue)