+2009-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc-rcs.el (vc-rcs-consult-headers): Add missing save-excursion.
+
2009-11-16 Michael Albinus <michael.albinus@gmx.de>
* net/dbus.el (dbus-unregister-service): New defun.
* 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-modes-menu): Add item for twos complement mode.
- * calc/calc-help.el (calc-b-prefix-help): Add help for
- `calc-symclip'.
+ * calc/calc-help.el (calc-b-prefix-help): Add help for `calc-symclip'.
2009-11-15 Chong Yidong <cyd@stupidchicken.com>
((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