Mercurial > hg > xemacs-beta
annotate lisp/cus-file.el @ 5441:5d2981eee77e
Added copyright notices and GPLV3 or later license to NEWS files.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Sun, 12 Dec 2010 00:20:02 +0100 |
parents | 308d34e9f07d |
children | 8861440b1aa4 |
rev | line source |
---|---|
442 | 1 ;;; cus-file.el --- Manage location of the customize init file |
2 | |
3 ;; Copyright (C) 2000 by Free Software Foundation, Inc. | |
4 | |
5 ;; Author: Mike Sperber <mike@xemacs.org> | |
6 ;; Keywords: internal | |
7 | |
8 ;; This file is part of XEmacs. | |
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 | 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 | 19 |
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 | 22 |
23 ;;; Synched up with: Not in FSF | |
24 | |
25 ;;; Commentary: | |
26 | |
27 ;; This file manages the location of the custom init file without | |
28 ;; loading all of the custom code itself. | |
29 | |
30 | |
31 ;;; Code: | |
32 (provide 'cus-file) | |
33 | |
34 ;;;###autoload | |
35 (defconst custom-file-base "custom.el" | |
36 "Base of file name for storing customization information.") | |
37 | |
38 ;;;###autoload | |
39 (defvar custom-file nil | |
40 "File used for storing customization information. | |
41 If you change this from the default you need to | |
42 explicitly load that file for the settings to take effect.") | |
43 | |
44 ;;;###autoload | |
45 (defun make-custom-file-name (init-file &optional force-new) | |
46 "Construct the default custom file name from the init file name. | |
47 If FORCE-NEW is non-nil, force post-migration location." | |
48 (let ((init-file (or init-file user-init-file))) | |
49 (if (or force-new | |
50 (not init-file) | |
51 (string= (file-name-directory init-file) | |
52 (expand-file-name | |
53 (file-name-as-directory user-init-directory)))) | |
54 (expand-file-name custom-file-base user-init-directory) | |
55 init-file))) | |
56 | |
57 ;;; cus-file.el ends here |