diff options
| author | Stefan Monnier | 2009-11-16 14:41:05 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-11-16 14:41:05 +0000 |
| commit | 68d87786aee83948b6e37544f6b08079ade71734 (patch) | |
| tree | bc0329bf2f4bf3a24c24ad1dbf91c942f962d98b | |
| parent | 977640ed136216a40ed365ea21d30c64e8888293 (diff) | |
| download | emacs-68d87786aee83948b6e37544f6b08079ade71734.tar.gz emacs-68d87786aee83948b6e37544f6b08079ade71734.zip | |
(vc-rcs-consult-headers): Add missing save-excursion.
| -rw-r--r-- | lisp/ChangeLog | 23 | ||||
| -rw-r--r-- | lisp/vc-rcs.el | 109 |
2 files changed, 68 insertions, 64 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5e757f1c971..a77408c604c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-11-16 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc-rcs.el (vc-rcs-consult-headers): Add missing save-excursion. | ||
| 4 | |||
| 1 | 2009-11-16 Michael Albinus <michael.albinus@gmx.de> | 5 | 2009-11-16 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 6 | ||
| 3 | * net/dbus.el (dbus-unregister-service): New defun. | 7 | * net/dbus.el (dbus-unregister-service): New defun. |
| @@ -20,28 +24,27 @@ | |||
| 20 | 24 | ||
| 21 | * calc/calc-bin.el (calc-word-size): Reset the variables | 25 | * calc/calc-bin.el (calc-word-size): Reset the variables |
| 22 | `math-2-word-size' and `math-half-2-word-size'. | 26 | `math-2-word-size' and `math-half-2-word-size'. |
| 23 | (math-format-complement-signed, math-symclip, calcFunc-symclip) | 27 | (math-format-complement-signed, math-symclip, calcFunc-symclip) |
| 24 | (calc-symclip): New functions. | 28 | (calc-symclip): New functions. |
| 25 | 29 | ||
| 26 | * calc/calc-aent.el (math-read-token): Read complement signed numbers. | 30 | * calc/calc-aent.el (math-read-token): Read complement signed numbers. |
| 27 | 31 | ||
| 28 | * calc/calc-embed.el (calc-embedded-mode-vars): Add | 32 | * calc/calc-embed.el (calc-embedded-mode-vars): |
| 29 | `calc-complement-signed-mode' to the list of modes. | 33 | Add `calc-complement-signed-mode' to the list of modes. |
| 30 | 34 | ||
| 31 | * calc/calc-map.el (calc-get-operator): Add `calc-symclip'. | 35 | * calc/calc-map.el (calc-get-operator): Add `calc-symclip'. |
| 32 | (calc-b-oper-keys): Add `calc-symclip' to list. | 36 | (calc-b-oper-keys): Add `calc-symclip' to list. |
| 33 | 37 | ||
| 34 | * calc/calc-ext.el (math-read-number-fancy): Read complement | 38 | * calc/calc-ext.el (math-read-number-fancy): Read complement |
| 35 | signed numbers. | 39 | signed numbers. |
| 36 | (calc-init-extensions): Add binding for `calc-symclip'. | 40 | (calc-init-extensions): Add binding for `calc-symclip'. |
| 37 | Add autoload for `calcFunc-symclip' and `calc-symclip'. | 41 | Add autoload for `calcFunc-symclip' and `calc-symclip'. |
| 38 | 42 | ||
| 39 | * calc/calc-menu.el (calc-arithmetic-menu): Add item for | 43 | * calc/calc-menu.el (calc-arithmetic-menu): Add item for |
| 40 | `calc-symclip'. | 44 | `calc-symclip'. |
| 41 | (calc-modes-menu): Add item for twos complement mode. | 45 | (calc-modes-menu): Add item for twos complement mode. |
| 42 | 46 | ||
| 43 | * calc/calc-help.el (calc-b-prefix-help): Add help for | 47 | * calc/calc-help.el (calc-b-prefix-help): Add help for `calc-symclip'. |
| 44 | `calc-symclip'. | ||
| 45 | 48 | ||
| 46 | 2009-11-15 Chong Yidong <cyd@stupidchicken.com> | 49 | 2009-11-15 Chong Yidong <cyd@stupidchicken.com> |
| 47 | 50 | ||
diff --git a/lisp/vc-rcs.el b/lisp/vc-rcs.el index 0fa40fac824..42e2ec30ccf 100644 --- a/lisp/vc-rcs.el +++ b/lisp/vc-rcs.el | |||
| @@ -1056,63 +1056,64 @@ Returns: nil if no headers were found | |||
| 1056 | ((not (get-file-buffer file)) nil) | 1056 | ((not (get-file-buffer file)) nil) |
| 1057 | ((let (status version locking-user) | 1057 | ((let (status version locking-user) |
| 1058 | (with-current-buffer (get-file-buffer file) | 1058 | (with-current-buffer (get-file-buffer file) |
| 1059 | (goto-char (point-min)) | 1059 | (save-excursion |
| 1060 | (cond | 1060 | (goto-char (point-min)) |
| 1061 | ;; search for $Id or $Header | ||
| 1062 | ;; ------------------------- | ||
| 1063 | ;; The `\ 's below avoid an RCS 5.7 bug when checking in this file. | ||
| 1064 | ((or (and (search-forward "$Id\ : " nil t) | ||
| 1065 | (looking-at "[^ ]+ \\([0-9.]+\\) ")) | ||
| 1066 | (and (progn (goto-char (point-min)) | ||
| 1067 | (search-forward "$Header\ : " nil t)) | ||
| 1068 | (looking-at "[^ ]+ \\([0-9.]+\\) "))) | ||
| 1069 | (goto-char (match-end 0)) | ||
| 1070 | ;; if found, store the revision number ... | ||
| 1071 | (setq version (match-string-no-properties 1)) | ||
| 1072 | ;; ... and check for the locking state | ||
| 1073 | (cond | 1061 | (cond |
| 1074 | ((looking-at | 1062 | ;; search for $Id or $Header |
| 1075 | (concat "[0-9]+[/-][01][0-9][/-][0-3][0-9] " ; date | 1063 | ;; ------------------------- |
| 1076 | "[0-2][0-9]:[0-5][0-9]+:[0-6][0-9]+\\([+-][0-9:]+\\)? " ; time | 1064 | ;; The `\ 's below avoid an RCS 5.7 bug when checking in this file. |
| 1077 | "[^ ]+ [^ ]+ ")) ; author & state | 1065 | ((or (and (search-forward "$Id\ : " nil t) |
| 1078 | (goto-char (match-end 0)) ; [0-6] in regexp handles leap seconds | 1066 | (looking-at "[^ ]+ \\([0-9.]+\\) ")) |
| 1067 | (and (progn (goto-char (point-min)) | ||
| 1068 | (search-forward "$Header\ : " nil t)) | ||
| 1069 | (looking-at "[^ ]+ \\([0-9.]+\\) "))) | ||
| 1070 | (goto-char (match-end 0)) | ||
| 1071 | ;; if found, store the revision number ... | ||
| 1072 | (setq version (match-string-no-properties 1)) | ||
| 1073 | ;; ... and check for the locking state | ||
| 1079 | (cond | 1074 | (cond |
| 1080 | ;; unlocked revision | 1075 | ((looking-at |
| 1081 | ((looking-at "\\$") | 1076 | (concat "[0-9]+[/-][01][0-9][/-][0-3][0-9] " ; date |
| 1082 | (setq locking-user 'none) | 1077 | "[0-2][0-9]:[0-5][0-9]+:[0-6][0-9]+\\([+-][0-9:]+\\)? " ; time |
| 1083 | (setq status 'rev-and-lock)) | 1078 | "[^ ]+ [^ ]+ ")) ; author & state |
| 1084 | ;; revision is locked by some user | 1079 | (goto-char (match-end 0)) ; [0-6] in regexp handles leap seconds |
| 1085 | ((looking-at "\\([^ ]+\\) \\$") | 1080 | (cond |
| 1086 | (setq locking-user (match-string-no-properties 1)) | 1081 | ;; unlocked revision |
| 1087 | (setq status 'rev-and-lock)) | 1082 | ((looking-at "\\$") |
| 1088 | ;; everything else: false | 1083 | (setq locking-user 'none) |
| 1084 | (setq status 'rev-and-lock)) | ||
| 1085 | ;; revision is locked by some user | ||
| 1086 | ((looking-at "\\([^ ]+\\) \\$") | ||
| 1087 | (setq locking-user (match-string-no-properties 1)) | ||
| 1088 | (setq status 'rev-and-lock)) | ||
| 1089 | ;; everything else: false | ||
| 1090 | (nil))) | ||
| 1091 | ;; unexpected information in | ||
| 1092 | ;; keyword string --> quit | ||
| 1089 | (nil))) | 1093 | (nil))) |
| 1090 | ;; unexpected information in | 1094 | ;; search for $Revision |
| 1091 | ;; keyword string --> quit | 1095 | ;; -------------------- |
| 1092 | (nil))) | 1096 | ((re-search-forward (concat "\\$" |
| 1093 | ;; search for $Revision | 1097 | "Revision: \\([0-9.]+\\) \\$") |
| 1094 | ;; -------------------- | 1098 | nil t) |
| 1095 | ((re-search-forward (concat "\\$" | 1099 | ;; if found, store the revision number ... |
| 1096 | "Revision: \\([0-9.]+\\) \\$") | 1100 | (setq version (match-string-no-properties 1)) |
| 1097 | nil t) | 1101 | ;; and see if there's any lock information |
| 1098 | ;; if found, store the revision number ... | 1102 | (goto-char (point-min)) |
| 1099 | (setq version (match-string-no-properties 1)) | 1103 | (if (re-search-forward (concat "\\$" "Locker:") nil t) |
| 1100 | ;; and see if there's any lock information | 1104 | (cond ((looking-at " \\([^ ]+\\) \\$") |
| 1101 | (goto-char (point-min)) | 1105 | (setq locking-user (match-string-no-properties 1)) |
| 1102 | (if (re-search-forward (concat "\\$" "Locker:") nil t) | 1106 | (setq status 'rev-and-lock)) |
| 1103 | (cond ((looking-at " \\([^ ]+\\) \\$") | 1107 | ((looking-at " *\\$") |
| 1104 | (setq locking-user (match-string-no-properties 1)) | 1108 | (setq locking-user 'none) |
| 1105 | (setq status 'rev-and-lock)) | 1109 | (setq status 'rev-and-lock)) |
| 1106 | ((looking-at " *\\$") | 1110 | (t |
| 1107 | (setq locking-user 'none) | 1111 | (setq locking-user 'none) |
| 1108 | (setq status 'rev-and-lock)) | 1112 | (setq status 'rev-and-lock))) |
| 1109 | (t | 1113 | (setq status 'rev))) |
| 1110 | (setq locking-user 'none) | 1114 | ;; else: nothing found |
| 1111 | (setq status 'rev-and-lock))) | 1115 | ;; ------------------- |
| 1112 | (setq status 'rev))) | 1116 | (t nil)))) |
| 1113 | ;; else: nothing found | ||
| 1114 | ;; ------------------- | ||
| 1115 | (t nil))) | ||
| 1116 | (if status (vc-file-setprop file 'vc-working-revision version)) | 1117 | (if status (vc-file-setprop file 'vc-working-revision version)) |
| 1117 | (and (eq status 'rev-and-lock) | 1118 | (and (eq status 'rev-and-lock) |
| 1118 | (vc-file-setprop file 'vc-state | 1119 | (vc-file-setprop file 'vc-state |