diff options
| author | Glenn Morris | 2012-10-06 17:54:36 -0700 |
|---|---|---|
| committer | Glenn Morris | 2012-10-06 17:54:36 -0700 |
| commit | 5407f8d23491f3e7886865facc0ae6446142ba48 (patch) | |
| tree | 4915cfba6d5d7338f485d5a603cb9e42d52ec637 /admin | |
| parent | 1595ecfac950d69ae94c270fb9829529a421c56c (diff) | |
| download | emacs-5407f8d23491f3e7886865facc0ae6446142ba48.tar.gz emacs-5407f8d23491f3e7886865facc0ae6446142ba48.zip | |
Improve cusver-check's handling of the version number
* admin/admin.el (cusver-new-version): Set default.
(cusver-check): Improve interactive argument reading.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/ChangeLog | 5 | ||||
| -rw-r--r-- | admin/admin.el | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 82a01887b57..7d4921887ce 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-10-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * admin.el (cusver-new-version): Set default. | ||
| 4 | (cusver-check): Improve interactive argument reading. | ||
| 5 | |||
| 1 | 2012-10-06 Glenn Morris <rgm@gnu.org> | 6 | 2012-10-06 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * admin.el (cusver-new-version): New variable. | 8 | * admin.el (cusver-new-version): New variable. |
diff --git a/admin/admin.el b/admin/admin.el index 60a09a1e2f2..3e3fbba7202 100644 --- a/admin/admin.el +++ b/admin/admin.el | |||
| @@ -442,8 +442,8 @@ If optional OLD is non-nil, also include defvars." | |||
| 442 | )) | 442 | )) |
| 443 | "{}" "+")) | 443 | "{}" "+")) |
| 444 | 444 | ||
| 445 | ; FIXME Calculate default based on running emacs-version. | 445 | (defvar cusver-new-version (format "%s.%s" emacs-major-version |
| 446 | (defvar cusver-new-version nil | 446 | (1+ emacs-minor-version)) |
| 447 | "Version number that new defcustoms should have.") | 447 | "Version number that new defcustoms should have.") |
| 448 | 448 | ||
| 449 | ;; TODO do something about renamed variables with aliases to the old name? | 449 | ;; TODO do something about renamed variables with aliases to the old name? |
| @@ -515,7 +515,11 @@ just converting a defvar to a defcustom does not require a :version bump. | |||
| 515 | 515 | ||
| 516 | Note that a :version tag should also be added if the value of a defcustom | 516 | Note that a :version tag should also be added if the value of a defcustom |
| 517 | changes (in a non-trivial way). This function does not check for that." | 517 | changes (in a non-trivial way). This function does not check for that." |
| 518 | (interactive "DNew Lisp directory: \nDOld Lisp directory: \nsNew version number: ") | 518 | (interactive (list (read-directory-name "New Lisp directory: ") |
| 519 | (read-directory-name "Old Lisp directory: ") | ||
| 520 | (number-to-string | ||
| 521 | (read-number "New version number: " | ||
| 522 | (string-to-number cusver-new-version))))) | ||
| 519 | (or (file-directory-p (setq newdir (expand-file-name newdir))) | 523 | (or (file-directory-p (setq newdir (expand-file-name newdir))) |
| 520 | (error "Directory `%s' not found" newdir)) | 524 | (error "Directory `%s' not found" newdir)) |
| 521 | (or (file-directory-p (setq olddir (expand-file-name olddir))) | 525 | (or (file-directory-p (setq olddir (expand-file-name olddir))) |