Mercurial > hg > xemacs-beta
annotate lisp/cus-file.el @ 5580:a0e81357194e
Move macros with shadows in bytecomp.el to the end of the files, cl-macs
lisp/ChangeLog addition:
2011-10-08 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el:
* cl-macs.el (load-time-value):
* cl-macs.el (flet):
* cl-macs.el (labels):
* cl-macs.el (the):
* cl-macs.el (declare):
Move all these macros to the end of the file, since they're in
byte-compile-initial-macro-environment, and we don't want their
definitions to override that for the rest of the file during
byte-compilation. Happens not to matter right now, but avoids
surprises for anyone using the macros elsewhere in cl-macs down
the line.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 08 Oct 2011 12:26:09 +0100 |
parents | 8861440b1aa4 |
children |
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 (defconst custom-file-base "custom.el" | |
35 "Base of file name for storing customization information.") | |
36 | |
37 (defvar custom-file nil | |
38 "File used for storing customization information. | |
39 If you change this from the default you need to | |
40 explicitly load that file for the settings to take effect.") | |
41 | |
42 (defun make-custom-file-name (init-file &optional force-new) | |
43 "Construct the default custom file name from the init file name. | |
44 If FORCE-NEW is non-nil, force post-migration location." | |
45 (let ((init-file (or init-file user-init-file))) | |
46 (if (or force-new | |
47 (not init-file) | |
48 (string= (file-name-directory init-file) | |
49 (expand-file-name | |
50 (file-name-as-directory user-init-directory)))) | |
51 (expand-file-name custom-file-base user-init-directory) | |
52 init-file))) | |
53 | |
54 ;;; cus-file.el ends here |