# HG changeset patch # User Stefan Monnier # Date 1258382465 0 # Node ID a7d1facd7ddffd9929f7bc85c9b9bc4ad48c9055 # Parent 5ebde643d5d0e06b412dae0c32d04765e291a623 (vc-rcs-consult-headers): Add missing save-excursion. diff -r 5ebde643d5d0 -r a7d1facd7ddf lisp/ChangeLog --- a/lisp/ChangeLog Mon Nov 16 14:29:55 2009 +0000 +++ b/lisp/ChangeLog Mon Nov 16 14:41:05 2009 +0000 @@ -1,3 +1,7 @@ +2009-11-16 Stefan Monnier + + * vc-rcs.el (vc-rcs-consult-headers): Add missing save-excursion. + 2009-11-16 Michael Albinus * net/dbus.el (dbus-unregister-service): New defun. @@ -20,28 +24,27 @@ * calc/calc-bin.el (calc-word-size): Reset the variables `math-2-word-size' and `math-half-2-word-size'. - (math-format-complement-signed, math-symclip, calcFunc-symclip) - (calc-symclip): New functions. + (math-format-complement-signed, math-symclip, calcFunc-symclip) + (calc-symclip): New functions. * calc/calc-aent.el (math-read-token): Read complement signed numbers. - * calc/calc-embed.el (calc-embedded-mode-vars): Add - `calc-complement-signed-mode' to the list of modes. + * calc/calc-embed.el (calc-embedded-mode-vars): + Add `calc-complement-signed-mode' to the list of modes. * calc/calc-map.el (calc-get-operator): Add `calc-symclip'. - (calc-b-oper-keys): Add `calc-symclip' to list. + (calc-b-oper-keys): Add `calc-symclip' to list. * calc/calc-ext.el (math-read-number-fancy): Read complement signed numbers. - (calc-init-extensions): Add binding for `calc-symclip'. - Add autoload for `calcFunc-symclip' and `calc-symclip'. + (calc-init-extensions): Add binding for `calc-symclip'. + Add autoload for `calcFunc-symclip' and `calc-symclip'. * calc/calc-menu.el (calc-arithmetic-menu): Add item for `calc-symclip'. - (calc-modes-menu): Add item for twos complement mode. - - * calc/calc-help.el (calc-b-prefix-help): Add help for - `calc-symclip'. + (calc-modes-menu): Add item for twos complement mode. + + * calc/calc-help.el (calc-b-prefix-help): Add help for `calc-symclip'. 2009-11-15 Chong Yidong diff -r 5ebde643d5d0 -r a7d1facd7ddf lisp/vc-rcs.el --- a/lisp/vc-rcs.el Mon Nov 16 14:29:55 2009 +0000 +++ b/lisp/vc-rcs.el Mon Nov 16 14:41:05 2009 +0000 @@ -1056,63 +1056,64 @@ ((not (get-file-buffer file)) nil) ((let (status version locking-user) (with-current-buffer (get-file-buffer file) - (goto-char (point-min)) - (cond - ;; search for $Id or $Header - ;; ------------------------- - ;; The `\ 's below avoid an RCS 5.7 bug when checking in this file. - ((or (and (search-forward "$Id\ : " nil t) - (looking-at "[^ ]+ \\([0-9.]+\\) ")) - (and (progn (goto-char (point-min)) - (search-forward "$Header\ : " nil t)) - (looking-at "[^ ]+ \\([0-9.]+\\) "))) - (goto-char (match-end 0)) - ;; if found, store the revision number ... - (setq version (match-string-no-properties 1)) - ;; ... and check for the locking state + (save-excursion + (goto-char (point-min)) (cond - ((looking-at - (concat "[0-9]+[/-][01][0-9][/-][0-3][0-9] " ; date - "[0-2][0-9]:[0-5][0-9]+:[0-6][0-9]+\\([+-][0-9:]+\\)? " ; time - "[^ ]+ [^ ]+ ")) ; author & state - (goto-char (match-end 0)) ; [0-6] in regexp handles leap seconds + ;; search for $Id or $Header + ;; ------------------------- + ;; The `\ 's below avoid an RCS 5.7 bug when checking in this file. + ((or (and (search-forward "$Id\ : " nil t) + (looking-at "[^ ]+ \\([0-9.]+\\) ")) + (and (progn (goto-char (point-min)) + (search-forward "$Header\ : " nil t)) + (looking-at "[^ ]+ \\([0-9.]+\\) "))) + (goto-char (match-end 0)) + ;; if found, store the revision number ... + (setq version (match-string-no-properties 1)) + ;; ... and check for the locking state (cond - ;; unlocked revision - ((looking-at "\\$") - (setq locking-user 'none) - (setq status 'rev-and-lock)) - ;; revision is locked by some user - ((looking-at "\\([^ ]+\\) \\$") - (setq locking-user (match-string-no-properties 1)) - (setq status 'rev-and-lock)) - ;; everything else: false + ((looking-at + (concat "[0-9]+[/-][01][0-9][/-][0-3][0-9] " ; date + "[0-2][0-9]:[0-5][0-9]+:[0-6][0-9]+\\([+-][0-9:]+\\)? " ; time + "[^ ]+ [^ ]+ ")) ; author & state + (goto-char (match-end 0)) ; [0-6] in regexp handles leap seconds + (cond + ;; unlocked revision + ((looking-at "\\$") + (setq locking-user 'none) + (setq status 'rev-and-lock)) + ;; revision is locked by some user + ((looking-at "\\([^ ]+\\) \\$") + (setq locking-user (match-string-no-properties 1)) + (setq status 'rev-and-lock)) + ;; everything else: false + (nil))) + ;; unexpected information in + ;; keyword string --> quit (nil))) - ;; unexpected information in - ;; keyword string --> quit - (nil))) - ;; search for $Revision - ;; -------------------- - ((re-search-forward (concat "\\$" - "Revision: \\([0-9.]+\\) \\$") - nil t) - ;; if found, store the revision number ... - (setq version (match-string-no-properties 1)) - ;; and see if there's any lock information - (goto-char (point-min)) - (if (re-search-forward (concat "\\$" "Locker:") nil t) - (cond ((looking-at " \\([^ ]+\\) \\$") - (setq locking-user (match-string-no-properties 1)) - (setq status 'rev-and-lock)) - ((looking-at " *\\$") - (setq locking-user 'none) - (setq status 'rev-and-lock)) - (t - (setq locking-user 'none) - (setq status 'rev-and-lock))) - (setq status 'rev))) - ;; else: nothing found - ;; ------------------- - (t nil))) + ;; search for $Revision + ;; -------------------- + ((re-search-forward (concat "\\$" + "Revision: \\([0-9.]+\\) \\$") + nil t) + ;; if found, store the revision number ... + (setq version (match-string-no-properties 1)) + ;; and see if there's any lock information + (goto-char (point-min)) + (if (re-search-forward (concat "\\$" "Locker:") nil t) + (cond ((looking-at " \\([^ ]+\\) \\$") + (setq locking-user (match-string-no-properties 1)) + (setq status 'rev-and-lock)) + ((looking-at " *\\$") + (setq locking-user 'none) + (setq status 'rev-and-lock)) + (t + (setq locking-user 'none) + (setq status 'rev-and-lock))) + (setq status 'rev))) + ;; else: nothing found + ;; ------------------- + (t nil)))) (if status (vc-file-setprop file 'vc-working-revision version)) (and (eq status 'rev-and-lock) (vc-file-setprop file 'vc-state