aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2007-08-21 04:51:30 +0000
committerMiles Bader <[email protected]>2007-08-21 04:51:30 +0000
commitbdaf8a62d53cf8d5a0dc4f0dc530ecd6fc1f44fe (patch)
tree083bb8dc3faa311402bb8e86a67a4b9aeb207592
parentcb3fe75728ff4703c11aeb61c079a97da11ec637 (diff)
parent30a718e6b77f4f0c422f748dd14ea772b7fa2a1a (diff)
Merge from emacs--rel--22
Patches applied: * emacs--rel--22 (patch 93-96) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 245) - Update from CVS Revision: [email protected]/emacs--devo--0--patch-856
-rw-r--r--admin/FOR-RELEASE11
-rw-r--r--etc/ChangeLog4
-rw-r--r--lisp/ChangeLog22
-rw-r--r--lisp/emacs-lisp/cl-macs.el22
-rw-r--r--lisp/gnus/ChangeLog16
-rw-r--r--lisp/gnus/gnus-agent.el9
-rw-r--r--lisp/gnus/gnus-art.el11
-rw-r--r--lisp/gnus/gnus-sum.el37
-rw-r--r--lisp/gnus/gnus.el11
-rw-r--r--lisp/progmodes/gdb-ui.el6
-rw-r--r--lisp/progmodes/perl-mode.el12
-rw-r--r--lisp/smerge-mode.el51
-rw-r--r--lisp/vc-bzr.el173
-rw-r--r--man/ChangeLog4
-rw-r--r--man/gnus.texi18
-rw-r--r--nt/ChangeLog4
-rw-r--r--nt/makefile.w32-in1
17 files changed, 274 insertions, 138 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 4614fc63d4..c1ad49587b 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -44,11 +44,22 @@ NB the definitive copy of this file for Emacs 22 is on the
EMACS_22_BASE branch. Any entries below are automatically copied from
that branch. Do not make manual changes to this file on the trunk.
+** [email protected], 9 July: eshell and external commands
+http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00385.html
+
+** Check all non-file-scope static vars to make sure they
+won't lose on USG or HPUX systems.
+
* FIXES FOR EMACS 22.3
Here we list small fixes that arrived too late for Emacs 22.2, but
that should be installed on the release branch after 22.2 is released.
+** [email protected], 1 Aug: [email protected]: modification hooks called only once in
+Fix is on the trunk: 2007-08-13 change to insdel.c by Stefan Monnier.
+http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00457.html
+
+
* DOCUMENTATION
** Check the Emacs Tutorial.
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 9fd1a50736..2a09fa9c36 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-14 Glenn Morris <[email protected]>
+
+ * NEWS: Mention `bad-packages-alist'.
+
2007-08-08 Glenn Morris <[email protected]>
* TODO: `iff' item is dealt with.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 045d486b09..028fe5d2db 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,25 @@
+2007-08-20 Stefan Monnier <[email protected]>
+
+ * smerge-mode.el (smerge-resolve): New arg `safe'.
+ (smerge-resolve-all, smerge-batch-resolve): New function.
+ (smerge-refine): Make sure `diff' returns the expected result.
+ (smerge-parsep-re): New const.
+ (smerge-mode): Use it to adjust paragraph-separate.
+
+ * progmodes/perl-mode.el (perl-font-lock-syntactic-keywords):
+ Correctly match / regexp matchers as first char on a line when
+ fontifying only that line.
+
+ * emacs-lisp/cl-macs.el (cl-transform-lambda): Preserve the match-data.
+
+2007-08-20 Stefan Monnier <[email protected]>
+
+ * vc-bzr.el: Don't fiddle with vc-handled-backend.
+ (vc-bzr-registered): Don't redundantly protect against
+ file-error. Actually use the format-specific code.
+ (vc-bzr-buffer-nonblank-p): Remove.
+ (vc-bzr-status): Change `kindchange' -> `kindchanged'.
+
2007-08-20 Juri Linkov <[email protected]>
* startup.el (fancy-splash-text): Change multiple tabs into one
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index a1264940d4..2a4b69d2af 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -272,15 +272,19 @@ its argument list allows full Common Lisp conventions."
(nconc (nreverse simple-args)
(list '&rest (car (pop bind-lets))))
(nconc (let ((hdr (nreverse header)))
- (require 'help-fns)
- (cons (help-add-fundoc-usage
- (if (stringp (car hdr)) (pop hdr))
- ;; orig-args can contain &cl-defs (an internal CL
- ;; thingy that I do not understand), so remove it.
- (let ((x (memq '&cl-defs orig-args)))
- (if (null x) orig-args
- (delq (car x) (remq (cadr x) orig-args)))))
- hdr))
+ ;; Macro expansion can take place in the middle of
+ ;; apparently harmless computation, so it should not
+ ;; touch the match-data.
+ (save-match-data
+ (require 'help-fns)
+ (cons (help-add-fundoc-usage
+ (if (stringp (car hdr)) (pop hdr))
+ ;; orig-args can contain &cl-defs (an internal
+ ;; CL thingy I don't understand), so remove it.
+ (let ((x (memq '&cl-defs orig-args)))
+ (if (null x) orig-args
+ (delq (car x) (remq (cadr x) orig-args)))))
+ hdr)))
(list (nconc (list 'let* bind-lets)
(nreverse bind-forms) body)))))))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7fd187a4ae..201b7fefdc 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,19 @@
+2007-08-17 Katsumi Yamaoka <[email protected]>
+
+ * gnus-art.el (gnus-article-summary-command-nosave)
+ (gnus-article-read-summary-keys): Don't use 3rd arg of pop-to-buffer.
+
+2007-08-14 Katsumi Yamaoka <[email protected]>
+
+ * gnus.el (gnus-maximum-newsgroup): New variable.
+
+ * gnus-agent.el (gnus-agent-fetch-headers): Limit the range of articles
+ according to gnus-maximum-newsgroup.
+
+ * gnus-sum.el (gnus-articles-to-read, gnus-list-of-unread-articles)
+ (gnus-list-of-read-articles, gnus-sequence-of-unread-articles): Limit
+ the range of articles according to gnus-maximum-newsgroup.
+
2007-08-10 Katsumi Yamaoka <[email protected]>
* nntp.el (nntp-xref-number-is-evil): New server variable.
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 7b98b1e045..347b57983e 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -1765,7 +1765,14 @@ article numbers will be returned."
(gnus-agent-find-parameter group
'agent-predicate)))))
(articles (if fetch-all
- (gnus-uncompress-range (gnus-active group))
+ (if gnus-maximum-newsgroup
+ (let ((active (gnus-active group)))
+ (gnus-uncompress-range
+ (cons (max (car active)
+ (- (cdr active)
+ gnus-maximum-newsgroup -1))
+ (cdr active))))
+ (gnus-uncompress-range (gnus-active group)))
(gnus-list-of-unread-articles group)))
(gnus-decode-encoded-word-function 'identity)
(gnus-decode-encoded-address-function 'identity)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 6ccba3b108..696222e004 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5607,7 +5607,7 @@ not have a face in `gnus-article-boring-faces'."
"Execute the last keystroke in the summary buffer."
(interactive)
(let (func)
- (pop-to-buffer gnus-article-current-summary nil (not (featurep 'xemacs)))
+ (pop-to-buffer gnus-article-current-summary)
(setq func (lookup-key (current-local-map) (this-command-keys)))
(call-interactively func)))
@@ -5646,8 +5646,7 @@ not have a face in `gnus-article-boring-faces'."
(member keys nosave-in-article))
(let (func)
(save-window-excursion
- (pop-to-buffer gnus-article-current-summary
- nil (not (featurep 'xemacs)))
+ (pop-to-buffer gnus-article-current-summary)
;; We disable the pick minor mode commands.
(let (gnus-pick-mode)
(setq func (lookup-key (current-local-map) keys))))
@@ -5659,16 +5658,14 @@ not have a face in `gnus-article-boring-faces'."
(call-interactively func)
(setq new-sum-point (point)))
(when (member keys nosave-but-article)
- (pop-to-buffer gnus-article-buffer
- nil (not (featurep 'xemacs)))))
+ (pop-to-buffer gnus-article-buffer)))
;; These commands should restore window configuration.
(let ((obuf (current-buffer))
(owin (current-window-configuration))
(opoint (point))
win func in-buffer selected new-sum-start new-sum-hscroll)
(cond (not-restore-window
- (pop-to-buffer gnus-article-current-summary
- nil (not (featurep 'xemacs))))
+ (pop-to-buffer gnus-article-current-summary))
((setq win (get-buffer-window gnus-article-current-summary))
(select-window win))
(t
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 708689fef9..851ec88c96 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -5472,7 +5472,13 @@ If SELECT-ARTICLES, only select those articles from GROUP."
;; articles in the group, or (if that's nil), the
;; articles in the cache.
(or
- (gnus-uncompress-range (gnus-active group))
+ (if gnus-maximum-newsgroup
+ (let ((active (gnus-active group)))
+ (gnus-uncompress-range
+ (cons (max (car active)
+ (- (cdr active) gnus-maximum-newsgroup -1))
+ (cdr active))))
+ (gnus-uncompress-range (gnus-active group)))
(gnus-cache-articles-in-group group))
;; Select only the "normal" subset of articles.
(gnus-sorted-nunion
@@ -6534,23 +6540,26 @@ displayed, no centering will be performed."
(let* ((read (gnus-info-read (gnus-get-info group)))
(active (or (gnus-active group) (gnus-activate-group group)))
(last (cdr active))
+ (bottom (if gnus-maximum-newsgroup
+ (max (car active) (- last gnus-maximum-newsgroup -1))
+ (car active)))
first nlast unread)
;; If none are read, then all are unread.
(if (not read)
- (setq first (car active))
+ (setq first bottom)
;; If the range of read articles is a single range, then the
;; first unread article is the article after the last read
;; article. Sounds logical, doesn't it?
(if (and (not (listp (cdr read)))
- (or (< (car read) (car active))
+ (or (< (car read) bottom)
(progn (setq read (list read))
nil)))
- (setq first (max (car active) (1+ (cdr read))))
+ (setq first (max bottom (1+ (cdr read))))
;; `read' is a list of ranges.
(when (/= (setq nlast (or (and (numberp (car read)) (car read))
(caar read)))
1)
- (setq first (car active)))
+ (setq first bottom))
(while read
(when first
(while (< first nlast)
@@ -6575,7 +6584,12 @@ displayed, no centering will be performed."
(gnus-list-range-difference
(gnus-list-range-difference
(gnus-sorted-complement
- (gnus-uncompress-range active)
+ (gnus-uncompress-range
+ (if gnus-maximum-newsgroup
+ (cons (max (car active)
+ (- (cdr active) gnus-maximum-newsgroup -1))
+ (cdr active))
+ active))
(gnus-list-of-unread-articles group))
(cdr (assq 'dormant marked)))
(cdr (assq 'tick marked))))))
@@ -6587,23 +6601,26 @@ displayed, no centering will be performed."
(let* ((read (gnus-info-read (gnus-get-info group)))
(active (or (gnus-active group) (gnus-activate-group group)))
(last (cdr active))
+ (bottom (if gnus-maximum-newsgroup
+ (max (car active) (- last gnus-maximum-newsgroup -1))
+ (car active)))
first nlast unread)
;; If none are read, then all are unread.
(if (not read)
- (setq first (car active))
+ (setq first bottom)
;; If the range of read articles is a single range, then the
;; first unread article is the article after the last read
;; article. Sounds logical, doesn't it?
(if (and (not (listp (cdr read)))
- (or (< (car read) (car active))
+ (or (< (car read) bottom)
(progn (setq read (list read))
nil)))
- (setq first (max (car active) (1+ (cdr read))))
+ (setq first (max bottom (1+ (cdr read))))
;; `read' is a list of ranges.
(when (/= (setq nlast (or (and (numberp (car read)) (car read))
(caar read)))
1)
- (setq first (car active)))
+ (setq first bottom))
(while read
(when first
(push (cons first nlast) unread))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 0e8e9908cf..3f75bba6d1 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1501,6 +1501,17 @@ If it is nil, no confirmation is required."
:type '(choice (const :tag "No limit" nil)
integer))
+(defcustom gnus-maximum-newsgroup nil
+ "The maximum number of articles a newsgroup.
+If this is a number, old articles in a newsgroup exceeding this number
+are silently ignored. If it is nil, no article is ignored. Note that
+setting this variable to a number might prevent you from reading very
+old articles."
+ :group 'gnus-group-select
+ :version "22.2"
+ :type '(choice (const :tag "No limit" nil)
+ integer))
+
(defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
"*Non-nil means that the default name of a file to save articles in is the group name.
If it's nil, the directory form of the group name is used instead.
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index c4d1446224..716b79138f 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1132,10 +1132,10 @@ This filter may simply queue input for a later time."
(let ((item (concat string "\n")))
(if gdb-enable-debug (push (cons 'send item) gdb-debug-log))
(process-send-string proc item)))
- (if (and (string-match "\\\\$" string)
- (not comint-input-sender-no-newline)) ;;Try to catch C-d.
+ (if (string-match "\\\\\\'" string)
(setq gdb-continuation (concat gdb-continuation string "\n"))
- (let ((item (concat gdb-continuation string "\n")))
+ (let ((item (concat gdb-continuation string
+ (if (not comint-input-sender-no-newline) "\n"))))
(gdb-enqueue-input item)
(setq gdb-continuation nil)))))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index cfef0eedfe..f2feff595b 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -267,8 +267,16 @@ The expansion is entirely correct because it uses the C preprocessor."
("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 '(7)))
;; Funny things in sub arg specifications like `sub myfunc ($$)'
("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
- ;; regexp and funny quotes
- ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7)))
+ ;; Regexp and funny quotes.
+ ("\\(?:[?:.,;=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)"
+ (2 (if (and (match-end 1)
+ (save-excursion
+ (goto-char (match-end 1))
+ (skip-chars-backward " \t\n")
+ (not (memq (char-before)
+ '(?? ?: ?. ?, ?\; ?= ?! ?~ ?\( ?\[)))))
+ nil ;; A division sign instead of a regexp-match.
+ '(7))))
("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)"
;; Nasty cases:
;; /foo/m $a->m $#m $m @m %m
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el
index ef80ef8167..e3484bb0a4 100644
--- a/lisp/smerge-mode.el
+++ b/lisp/smerge-mode.el
@@ -324,7 +324,8 @@ Can be nil if the style is undecided, or else:
(defvar smerge-resolve-function
(lambda () (error "Don't know how to resolve"))
"Mode-specific merge function.
-The function is called with no argument and with the match data set
+The function is called with zero or one argument (non-nil if the resolution
+function should only apply safe heuristics) and with the match data set
according to `smerge-match-conflict'.")
(add-to-list 'debug-ignored-errors "Don't know how to resolve")
@@ -378,7 +379,7 @@ according to `smerge-match-conflict'.")
(smerge-remove-props (or beg (point-min)) (or end (point-max)))
(push event unread-command-events)))))
-(defun smerge-resolve ()
+(defun smerge-resolve (&optional safe)
"Resolve the conflict at point intelligently.
This relies on mode-specific knowledge and thus only works in
some major modes. Uses `smerge-resolve-function' to do the actual work."
@@ -393,8 +394,10 @@ some major modes. Uses `smerge-resolve-function' to do the actual work."
;; Mode-specific conflict resolution.
((condition-case nil
(atomic-change-group
- (funcall smerge-resolve-function)
- t)
+ (if safe
+ (funcall smerge-resolve-function safe)
+ (funcall smerge-resolve-function))
+ t)
(error nil))
;; Nothing to do: the resolution function has done it already.
nil)
@@ -412,6 +415,31 @@ some major modes. Uses `smerge-resolve-function' to do the actual work."
(error "Don't know how to resolve")))
(smerge-auto-leave))
+(defun smerge-resolve-all ()
+ "Perform automatic resolution on all conflicts."
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward smerge-begin-re nil t)
+ (condition-case nil
+ (progn
+ (smerge-match-conflict)
+ (smerge-resolve 'safe))
+ (error nil)))))
+
+(defun smerge-batch-resolve ()
+ ;; command-line-args-left is what is left of the command line.
+ (if (not noninteractive)
+ (error "`smerge-batch-resolve' is to be used only with -batch"))
+ (while command-line-args-left
+ (let ((file (pop command-line-args-left)))
+ (message "Resolving conflicts in %s..." file)
+ (when (file-readable-p file)
+ (with-current-buffer (find-file-noselect file)
+ (smerge-resolve-all)
+ (save-buffer)
+ (kill-buffer (current-buffer)))))))
+
(defun smerge-keep-base ()
"Revert to the base version."
(interactive)
@@ -677,7 +705,9 @@ Point is moved to the end of the conflict."
(unwind-protect
(with-temp-buffer
(let ((coding-system-for-read 'emacs-mule))
- (call-process diff-command nil t nil file1 file2))
+ ;; Don't forget -a to make sure diff treats it as a text file
+ ;; even if it contains \0 and such.
+ (call-process diff-command nil t nil "-a" file1 file2))
;; Process diff's output.
(goto-char (point-min))
(while (not (eobp))
@@ -831,6 +861,10 @@ buffer names."
(message "Please resolve conflicts now; exit ediff when done")))
+(defconst smerge-parsep-re
+ (concat smerge-begin-re "\\|" smerge-end-re "\\|"
+ smerge-base-re "\\|" smerge-other-re "\\|"))
+
;;;###autoload
(define-minor-mode smerge-mode
"Minor mode to simplify editing output from the diff3 program.
@@ -845,6 +879,13 @@ buffer names."
(while (smerge-find-conflict)
(save-excursion
(font-lock-fontify-region (match-beginning 0) (match-end 0) nil)))))
+ (if (string-match (regexp-quote smerge-parsep-re) paragraph-separate)
+ (unless smerge-mode
+ (set (make-local-variable 'paragraph-separate)
+ (replace-match "" t t paragraph-separate)))
+ (when smerge-mode
+ (set (make-local-variable 'paragraph-separate)
+ (concat smerge-parsep-re paragraph-separate))))
(unless smerge-mode
(smerge-remove-props (point-min) (point-max))))
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index 20a9ca9b2f..c42a64969f 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -59,7 +59,7 @@
(defgroup vc-bzr nil
"VC bzr backend."
-;; :version "22"
+ :version "22.2"
:group 'vc)
(defcustom vc-bzr-program "bzr"
@@ -131,38 +131,27 @@ format 3' in the first line.
If the `checkout/dirstate' file cannot be parsed, fall back to
running `vc-bzr-state'."
- (condition-case nil
- (lexical-let ((root (vc-bzr-root file)))
- (and root ; Short cut.
- ;; This looks at internal files. May break if they change
- ;; their format.
- (lexical-let
- ((dirstate-file (expand-file-name vc-bzr-admin-dirstate root)))
- (if (file-exists-p dirstate-file)
- (with-temp-buffer
- (insert-file-contents dirstate-file)
- (goto-char (point-min))
- (when (looking-at "#bazaar dirstate flat format 3")
- (let* ((relfile (file-relative-name file root))
- (reldir (file-name-directory relfile)))
- (re-search-forward
- (concat "^\0"
- (if reldir (regexp-quote (directory-file-name reldir)))
- "\0"
- (regexp-quote (file-name-nondirectory relfile))
- "\0")
- nil t))))
- t))
- (vc-bzr-state file))) ; Expensive.
- (file-error nil))) ; vc-bzr-program not found
-
-(defun vc-bzr-buffer-nonblank-p (&optional buffer)
- "Return non-nil if BUFFER contains any non-blank characters."
- (or (> (buffer-size buffer) 0)
- (save-excursion
- (set-buffer (or buffer (current-buffer)))
- (goto-char (point-min))
- (re-search-forward "[^ \t\n]" (point-max) t))))
+ (lexical-let ((root (vc-bzr-root file)))
+ (when root ; Short cut.
+ ;; This looks at internal files. May break if they change
+ ;; their format.
+ (lexical-let ((dirstate (expand-file-name vc-bzr-admin-dirstate root)))
+ (if (not (file-readable-p dirstate))
+ (vc-bzr-state file) ; Expensive.
+ (with-temp-buffer
+ (insert-file-contents dirstate)
+ (goto-char (point-min))
+ (if (not (looking-at "#bazaar dirstate flat format 3"))
+ (vc-bzr-state file) ; Some other unknown format?
+ (let* ((relfile (file-relative-name file root))
+ (reldir (file-name-directory relfile)))
+ (re-search-forward
+ (concat "^\0"
+ (if reldir (regexp-quote (directory-file-name reldir)))
+ "\0"
+ (regexp-quote (file-name-nondirectory relfile))
+ "\0")
+ nil t)))))))))
(defconst vc-bzr-state-words
"added\\|ignored\\|kind changed\\|modified\\|removed\\|renamed\\|unknown"
@@ -181,61 +170,53 @@ running `vc-bzr-state'."
(defun vc-bzr-status (file)
"Return FILE status according to Bzr.
Return value is a cons (STATUS . WARNING), where WARNING is a
-string or nil, and STATUS is one of the symbols: 'added,
-'ignored, 'kindchange, 'modified, 'removed, 'renamed, 'unknown,
+string or nil, and STATUS is one of the symbols: `added',
+`ignored', `kindchanged', `modified', `removed', `renamed', `unknown',
which directly correspond to `bzr status' output, or 'unchanged
for files whose copy in the working tree is identical to the one
in the branch repository, or nil for files that are not
registered with Bzr.
If any error occurred in running `bzr status', then return nil."
- (condition-case nil
(with-temp-buffer
- (let ((ret (vc-bzr-command "status" t 0 file))
- (status 'unchanged))
- ;; the only secure status indication in `bzr status' output
- ;; is a couple of lines following the pattern::
- ;; | <status>:
- ;; | <file name>
- ;; if the file is up-to-date, we get no status report from `bzr',
- ;; so if the regexp search for the above pattern fails, we consider
- ;; the file to be up-to-date.
- (goto-char (point-min))
- (when
- (re-search-forward
- ;; bzr prints paths relative to the repository root
- (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+"
- (regexp-quote (vc-bzr-file-name-relative file))
- (if (file-directory-p file) "/?" "")
- "[ \t\n]*$")
- (point-max) t)
- (let ((start (match-beginning 0))
- (end (match-end 0)))
- (goto-char start)
+ (let ((ret (condition-case nil
+ (vc-bzr-command "status" t 0 file)
+ (file-error nil))) ; vc-bzr-program not found.
+ (status 'unchanged))
+ ;; the only secure status indication in `bzr status' output
+ ;; is a couple of lines following the pattern::
+ ;; | <status>:
+ ;; | <file name>
+ ;; if the file is up-to-date, we get no status report from `bzr',
+ ;; so if the regexp search for the above pattern fails, we consider
+ ;; the file to be up-to-date.
+ (goto-char (point-min))
+ (when (re-search-forward
+ ;; bzr prints paths relative to the repository root.
+ (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+"
+ (regexp-quote (vc-bzr-file-name-relative file))
+ (if (file-directory-p file) "/?" "")
+ "[ \t\n]*$")
+ nil t)
+ (let ((status (match-string 1)))
+ ;; Erase the status text that matched.
+ (delete-region (match-beginning 0) (match-end 0))
(setq status
- (cond
- ((not (equal ret 0)) nil)
- ((looking-at "added") 'added)
- ((looking-at "kind changed") 'kindchange)
- ((looking-at "renamed") 'renamed)
- ((looking-at "modified") 'modified)
- ((looking-at "removed") 'removed)
- ((looking-at "ignored") 'ignored)
- ((looking-at "unknown") 'unknown)))
- ;; erase the status text that matched
- (delete-region start end)))
- (if status
- (cons status
- ;; "bzr" will output warnings and informational messages to
- ;; stderr; due to Emacs' `vc-do-command' (and, it seems,
- ;; `start-process' itself) limitations, we cannot catch stderr
- ;; and stdout into different buffers. So, if there's anything
- ;; left in the buffer after removing the above status
- ;; keywords, let us just presume that any other message from
- ;; "bzr" is a user warning, and display it.
- (if (vc-bzr-buffer-nonblank-p)
- (buffer-substring (point-min) (point-max)))))))
- (file-error nil))) ; vc-bzr-program not found
+ (and (equal ret 0) ; Seems redundant. --Stef
+ (intern (replace-regexp-in-string " " ""
+ status))))))
+ (when status
+ (goto-char (point-min))
+ (skip-chars-forward " \n\t") ;Throw away spaces.
+ (cons status
+ ;; "bzr" will output warnings and informational messages to
+ ;; stderr; due to Emacs' `vc-do-command' (and, it seems,
+ ;; `start-process' itself) limitations, we cannot catch stderr
+ ;; and stdout into different buffers. So, if there's anything
+ ;; left in the buffer after removing the above status
+ ;; keywords, let us just presume that any other message from
+ ;; "bzr" is a user warning, and display it.
+ (unless (eobp) (buffer-substring (point) (point-max))))))))
(defun vc-bzr-state (file)
(lexical-let ((result (vc-bzr-status file)))
@@ -244,7 +225,7 @@ If any error occurred in running `bzr status', then return nil."
(message "Warnings in `bzr' output: %s" (cdr result)))
(cdr (assq (car result)
'((added . edited)
- (kindchange . edited)
+ (kindchanged . edited)
(renamed . edited)
(modified . edited)
(removed . edited)
@@ -265,7 +246,7 @@ If any error occurred in running `bzr status', then return nil."
;; bzr process. This looks at internal files. May break if they
;; change their format.
(if (file-exists-p branch-format-file)
- (with-temp-buffer
+ (with-temp-buffer
(insert-file-contents branch-format-file)
(goto-char (point-min))
(cond
@@ -273,7 +254,7 @@ If any error occurred in running `bzr status', then return nil."
(looking-at "Bazaar-NG branch, format 0.0.4")
(looking-at "Bazaar-NG branch format 5"))
;; count lines in .bzr/branch/revision-history
- (insert-file-contents revhistory-file)
+ (insert-file-contents revhistory-file)
(number-to-string (count-lines (line-end-position) (point-max))))
((looking-at "Bazaar Branch Format 6 (bzr 0.15)")
;; revno is the first number in .bzr/branch/last-revision
@@ -341,10 +322,10 @@ EDITABLE is ignored."
(setq destfile (vc-version-backup-file-name file rev)))
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary))
- (with-temp-file destfile
- (if rev
- (vc-bzr-command "cat" t 0 file "-r" rev)
- (vc-bzr-command "cat" t 0 file)))))
+ (with-temp-file destfile
+ (if rev
+ (vc-bzr-command "cat" t 0 file "-r" rev)
+ (vc-bzr-command "cat" t 0 file)))))
(defun vc-bzr-revert (file &optional contents-done)
(unless contents-done
@@ -377,7 +358,6 @@ EDITABLE is ignored."
"Get bzr change log for FILES into specified BUFFER."
;; Fixme: This might need the locale fixing up if things like `revno'
;; got localized, but certainly it shouldn't use LC_ALL=C.
- ;; NB. Can't be async -- see `vc-bzr-post-command-function'.
(vc-bzr-command "log" buffer 0 files)
;; FIXME: Until Emacs-23, VC was missing a hook to sort out the mode for
;; the buffer, or at least set the regexps right.
@@ -401,7 +381,6 @@ EDITABLE is ignored."
(setq rev1 nil))
(if (and (not rev1) rev2)
(setq rev1 working))
- ;; NB. Can't be async -- see `vc-bzr-post-command-function'.
;; bzr diff produces condition code 1 for some reason.
(apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 1 files
"--diff-options" (mapconcat 'identity (vc-diff-switches-list bzr)
@@ -463,11 +442,11 @@ property containing author and date information."
;; Definition from Emacs 22
(unless (fboundp 'vc-annotate-convert-time)
-(defun vc-annotate-convert-time (time)
- "Convert a time value to a floating-point number of days.
+ (defun vc-annotate-convert-time (time)
+ "Convert a time value to a floating-point number of days.
The argument TIME is a list as returned by `current-time' or
`encode-time', only the first two elements of that list are considered."
- (/ (+ (* (float (car time)) (lsh 1 16)) (cadr time)) 24 3600)))
+ (/ (+ (* (float (car time)) (lsh 1 16)) (cadr time)) 24 3600)))
(defun vc-bzr-annotate-time ()
(when (re-search-forward "^ *[0-9]+ |" nil t)
@@ -549,7 +528,7 @@ Optional argument LOCALP is always ignored."
(setq current-bzr-state 'added))
((looking-at "^kind changed")
(setq current-vc-state 'edited)
- (setq current-bzr-state 'kindchange))
+ (setq current-bzr-state 'kindchanged))
((looking-at "^modified")
(setq current-vc-state 'edited)
(setq current-bzr-state 'modified))
@@ -591,17 +570,9 @@ Optional argument LOCALP is always ignored."
;; else fall back to default vc representation
(vc-default-dired-state-info 'Bzr file)))))
-;; In case of just `(load "vc-bzr")', but that's probably the wrong
-;; way to do it.
-(add-to-list 'vc-handled-backends 'Bzr)
-
(eval-after-load "vc"
'(add-to-list 'vc-directory-exclusion-list vc-bzr-admin-dirname t))
-(defconst vc-bzr-unload-hook
- (lambda ()
- (setq vc-handled-backends (delq 'Bzr vc-handled-backends))
- (remove-hook 'vc-post-command-functions 'vc-bzr-post-command-function)))
(provide 'vc-bzr)
;; arch-tag: 8101bad8-4e92-4e7d-85ae-d8e08b4e7c06
diff --git a/man/ChangeLog b/man/ChangeLog
index 911c68e9cb..7438fbad33 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -20,6 +20,10 @@
(Quick Calculator Mode): Mention that binary format will
be displayed.
+2007-08-14 Katsumi Yamaoka <[email protected]>
+
+ * gnus.texi (Selecting a Group): Mention gnus-maximum-newsgroup.
+
2007-08-10 Katsumi Yamaoka <[email protected]>
* gnus.texi (NNTP): Mention nntp-xref-number-is-evil.
diff --git a/man/gnus.texi b/man/gnus.texi
index 94144b65e3..7cabf67410 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -2153,6 +2153,24 @@ most recently will be fetched.
@code{gnus-large-newsgroup}, but is only used for ephemeral
newsgroups.
+@vindex gnus-maximum-newsgroup
+In groups in some news servers, there might be a big gap between a few
+very old articles that will never be expired and the recent ones. In
+such a case, the server will return the data like @code{(1 . 30000000)}
+for the @code{LIST ACTIVE group} command, for example. Even if there
+are actually only the articles 1-10 and 29999900-30000000, Gnus doesn't
+know it at first and prepares for getting 30000000 articles. However,
+it will consume hundreds megabytes of memories and might make Emacs get
+stuck as the case may be. If you use such news servers, set the
+variable @code{gnus-maximum-newsgroup} to a positive number. The value
+means that Gnus ignores articles other than this number of the latest
+ones in every group. For instance, the value 10000 makes Gnus get only
+the articles 29990001-30000000 (if the latest article number is 30000000
+in a group). Note that setting this variable to a number might prevent
+you from reading very old articles. The default value of the variable
+@code{gnus-maximum-newsgroup} is @code{nil}, which means Gnus never
+ignores old articles.
+
@vindex gnus-select-group-hook
@vindex gnus-auto-select-first
@vindex gnus-auto-select-subject
diff --git a/nt/ChangeLog b/nt/ChangeLog
index deea04bff1..82771f836c 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-14 Dhuvra Krishnamurthy <[email protected]> (tiny change)
+
+ * makefile.w32-in (bootstrap-nmake): Change directories once more.
+
2007-07-25 Glenn Morris <[email protected]>
* Relicense all FSF files to GPLv3 or later.
diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in
index e7a10698ea..05e9a66587 100644
--- a/nt/makefile.w32-in
+++ b/nt/makefile.w32-in
@@ -153,6 +153,7 @@ bootstrap-nmake: addsection cmdproxy
cd ..\src
$(MAKE) $(MFLAGS) bootstrap
$(MAKE) $(MFLAGS) bootstrap-clean
+ cd ..\nt
$(CP) $(BLD)/cmdproxy.exe ../bin
cd ..\lisp
$(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap