annotate lisp/cus-file.el @ 5905:85fd1ab80057

Fix a bug in #'parse-integer with negative bignums and non-nil JUNK-ALLOWED src/ChangeLog addition: 2015-05-08 Aidan Kehoe <kehoea@parhasard.net> * data.c (parse_integer): Fix a bug here with the interaction of negative bignums and a non-zero JUNK-ALLOWED argument. tests/ChangeLog addition: 2015-05-08 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el: Check for a bug just fixed with the interaction of negative bignums and :junk-allowed non-nil.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 08 May 2015 16:24:57 +0100
parents 8861440b1aa4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1 ;;; cus-file.el --- Manage location of the customize init file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
3 ;; Copyright (C) 2000 by Free Software Foundation, Inc.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
4
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
5 ;; Author: Mike Sperber <mike@xemacs.org>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
6 ;; Keywords: internal
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
7
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
9
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
10 ;; XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
11 ;; under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
12 ;; Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
13 ;; option) any later version.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
14
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
16 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
17 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
18 ;; for more details.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
19
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 442
diff changeset
21 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
22
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
23 ;;; Synched up with: Not in FSF
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
25 ;;; Commentary:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
26
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
27 ;; This file manages the location of the custom init file without
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
28 ;; loading all of the custom code itself.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
29
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
30
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
31 ;;; Code:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
32 (provide 'cus-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
33
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
34 (defconst custom-file-base "custom.el"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
35 "Base of file name for storing customization information.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
36
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
37 (defvar custom-file nil
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
38 "File used for storing customization information.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
39 If you change this from the default you need to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40 explicitly load that file for the settings to take effect.")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
42 (defun make-custom-file-name (init-file &optional force-new)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
43 "Construct the default custom file name from the init file name.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
44 If FORCE-NEW is non-nil, force post-migration location."
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
45 (let ((init-file (or init-file user-init-file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
46 (if (or force-new
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
47 (not init-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
48 (string= (file-name-directory init-file)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
49 (expand-file-name
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
50 (file-name-as-directory user-init-directory))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
51 (expand-file-name custom-file-base user-init-directory)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
52 init-file)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
53
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
54 ;;; cus-file.el ends here