Mercurial > emacs
changeset 106748:f99663857782
Merge from trunk.
author | Jan D. <jan.h.d@swipnet.se> |
---|---|
date | Wed, 06 Jan 2010 15:33:57 +0100 |
parents | 861edc07f3ea (current diff) 47e4680680fe (diff) |
children | fa4743217572 |
files | |
diffstat | 8 files changed, 109 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/ChangeLog Wed Jan 06 15:33:57 2010 +0100 @@ -1,3 +1,13 @@ +2010-01-05 Tom Tromey <tromey@redhat.com> + + * progmodes/python.el (python-font-lock-keywords): Handle + qualified decorators (Bug#881). + +2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> + + * vc-bzr.el (vc-bzr-working-revision): Fix looking for a revision + in a lightweight checkout. + 2010-01-05 Kenichi Handa <handa@m17n.org> * language/indian.el (malayalam-composable-pattern): Fix ZWNJ and
--- a/lisp/gnus/ChangeLog Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/gnus/ChangeLog Wed Jan 06 15:33:57 2010 +0100 @@ -1,3 +1,22 @@ +2010-01-06 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-art.el (gnus-article-describe-bindings): Work for prefix keys. + + * message.el (message-check-news-header-syntax): Protect against a + string that `rfc822-addresses' returns when parsing fails. + +2010-01-06 Katsumi Yamaoka <yamaoka@jpl.org> + + * gnus-util.el (gnus-invisible-p, gnus-next-char-property-change) + (gnus-previous-char-property-change): New functions. + + * gnus-sum.el (gnus-forward-line-ignore-invisible): Use them. + +2010-01-05 Andreas Schwab <schwab@linux-m68k.org> + + * gnus-sum.el (gnus-forward-line-ignore-invisible): New function. + (gnus-summary-recenter): Use it instead of forward-line. (Bug#5257) + 2010-01-02 Chong Yidong <cyd@stupidchicken.com> * message.el (message-exchange-point-and-mark): Rework last change to @@ -13788,7 +13807,7 @@ See ChangeLog.2 for earlier changes. - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs.
--- a/lisp/gnus/gnus-art.el Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/gnus/gnus-art.el Wed Jan 06 15:33:57 2010 +0100 @@ -6477,10 +6477,17 @@ (let ((keymap (copy-keymap gnus-article-mode-map)) (map (copy-keymap gnus-article-send-map)) (sumkeys (where-is-internal 'gnus-article-read-summary-keys)) - agent draft) + parent agent draft) (define-key keymap "S" map) (define-key map [t] nil) (with-current-buffer gnus-article-current-summary + (set-keymap-parent + keymap + (if (setq parent (keymap-parent gnus-article-mode-map)) + (prog1 + (setq parent (copy-keymap parent)) + (set-keymap-parent parent (current-local-map))) + (current-local-map))) (set-keymap-parent map (key-binding "S")) (let (key def gnus-pick-mode) (while sumkeys
--- a/lisp/gnus/gnus-sum.el Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/gnus/gnus-sum.el Wed Jan 06 15:33:57 2010 +0100 @@ -6727,6 +6727,26 @@ (put 'gnus-recenter 'isearch-scroll t) +(defun gnus-forward-line-ignore-invisible (n) + "Move N lines forward (backward if N is negative). +Like forward-line, but skip over (and don't count) invisible lines." + (let (done) + (while (and (> n 0) (not done)) + ;; If the following character is currently invisible, + ;; skip all characters with that same `invisible' property value. + (while (gnus-invisible-p (point)) + (goto-char (gnus-next-char-property-change (point)))) + (forward-line 1) + (if (eobp) + (setq done t) + (setq n (1- n)))) + (while (and (< n 0) (not done)) + (forward-line -1) + (if (bobp) (setq done t) + (setq n (1+ n)) + (while (and (not (bobp)) (gnus-invisible-p (1- (point)))) + (goto-char (gnus-previous-char-property-change (point)))))))) + (defun gnus-summary-recenter () "Center point in the summary window. If `gnus-auto-center-summary' is nil, or the article buffer isn't @@ -6742,16 +6762,19 @@ gnus-auto-center-summary (/ (1- (window-height)) 2))))) (height (1- (window-height))) - (bottom (save-excursion (goto-char (point-max)) - (forward-line (- height)) - (point))) + (bottom (save-excursion + (goto-char (point-max)) + (gnus-forward-line-ignore-invisible (- height)) + (point))) (window (get-buffer-window (current-buffer)))) (when (get-buffer-window gnus-article-buffer) ;; Only do recentering when the article buffer is displayed, ;; Set the window start to either `bottom', which is the biggest ;; possible valid number, or the second line from the top, ;; whichever is the least. - (let ((top-pos (save-excursion (forward-line (- top)) (point)))) + (let ((top-pos (save-excursion + (gnus-forward-line-ignore-invisible (- top)) + (point)))) (if (> bottom top-pos) ;; Keep the second line from the top visible (set-window-start window top-pos) @@ -6760,12 +6783,12 @@ ;; visible, or revert to using TOP-POS. (save-excursion (goto-char (point-max)) - (forward-line -1) + (gnus-forward-line-ignore-invisible -1) (let ((last-line-start (point))) (goto-char bottom) (set-window-start window (point) t) (when (not (pos-visible-in-window-p last-line-start window)) - (forward-line 1) + (gnus-forward-line-ignore-invisible 1) (set-window-start window (min (point) top-pos) t))))))) ;; Do horizontal recentering while we're at it. (when (and (get-buffer-window (current-buffer) t)
--- a/lisp/gnus/gnus-util.el Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/gnus/gnus-util.el Wed Jan 06 15:33:57 2010 +0100 @@ -969,6 +969,29 @@ (overlay-get overlay 'face)) (overlays-at pos))))))) +(if (fboundp 'invisible-p) + (defalias 'gnus-invisible-p 'invisible-p) + ;; for Emacs < 22.2, and XEmacs. + (defun gnus-invisible-p (pos) + "Return non-nil if the character after POS is currently invisible." + (let ((prop (get-char-property pos 'invisible))) + (if (eq buffer-invisibility-spec t) + prop + (or (memq prop buffer-invisibility-spec) + (assq prop buffer-invisibility-spec)))))) + +;; Note: the optional 2nd argument has a different meaning between +;; Emacs and XEmacs. +;; (next-char-property-change POSITION &optional LIMIT) +;; (next-extent-change POS &optional OBJECT) +(defalias 'gnus-next-char-property-change + (if (fboundp 'next-extent-change) + 'next-extent-change 'next-char-property-change)) + +(defalias 'gnus-previous-char-property-change + (if (fboundp 'previous-extent-change) + 'previous-extent-change 'previous-char-property-change)) + ;;; Protected and atomic operations. dmoore@ucsd.edu 21.11.1996 ;; The primary idea here is to try to protect internal datastructures ;; from becoming corrupted when the user hits C-g, or if a hook or
--- a/lisp/gnus/message.el Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/gnus/message.el Wed Jan 06 15:33:57 2010 +0100 @@ -5077,7 +5077,8 @@ "Denied posting -- the From looks strange: \"%s\"." from) nil) ((let ((addresses (rfc822-addresses from))) - (while (and addresses + ;; `rfc822-addresses' returns a string if parsing fails. + (while (and (consp addresses) (not (eq (string-to-char (car addresses)) ?\())) (setq addresses (cdr addresses))) addresses)
--- a/lisp/progmodes/python.el Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/progmodes/python.el Wed Jan 06 15:33:57 2010 +0100 @@ -1,6 +1,6 @@ ;;; python.el --- silly walks for Python -*- coding: iso-8859-1 -*- -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Dave Love <fx@gnu.org> @@ -112,7 +112,9 @@ ;; Top-level assignments are worth highlighting. (,(rx line-start (group (1+ (or word ?_))) (0+ space) "=") (1 font-lock-variable-name-face)) - (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)))) ; decorators + ;; Decorators. + (,(rx line-start (* (any " \t")) (group "@" (1+ (or word ?_)) + (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
--- a/lisp/vc-bzr.el Tue Jan 05 15:42:39 2010 +0100 +++ b/lisp/vc-bzr.el Wed Jan 06 15:33:57 2010 +0100 @@ -356,9 +356,19 @@ (if (file-exists-p location-fname) (with-temp-buffer (insert-file-contents location-fname) - (when (re-search-forward "file://\(.+\)" nil t) - (setq branch-format-file (match-string 1)) - (file-exists-p branch-format-file))) + ;; If the lightweight checkout points to a + ;; location in the local file system, then we can + ;; look there for the version information. + (when (re-search-forward "file://\\(.+\\)" nil t) + (let ((l-c-parent-dir (match-string 1))) + (setq branch-format-file + (expand-file-name vc-bzr-admin-branch-format-file + l-c-parent-dir)) + (setq lastrev-file + (expand-file-name vc-bzr-admin-lastrev l-c-parent-dir)) + ;; FIXME: maybe it's overkill to check if both these files exist. + (and (file-exists-p branch-format-file) + (file-exists-p lastrev-file))))) t))) (with-temp-buffer (insert-file-contents branch-format-file)