annotate src/vdb-fake.c @ 5659:e63bb7b22c8f

Add compiler macros for #'equal, #'member, ... where #'eq, #'memq appropriate. lisp/ChangeLog addition: 2012-05-07 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el: * cl-macs.el (cl-non-fixnum-number-p): Rename, to cl-non-immediate-number-p. This is a little more informative as a name, though still not ideal, in that it will give t for some immediate fixnums on 64-bit builds. * cl-macs.el (eql): * cl-macs.el (define-star-compiler-macros): * cl-macs.el (delq): * cl-macs.el (remq): Use the new name. * cl-macs.el (cl-equal-equivalent-to-eq-p): New. * cl-macs.el (cl-car-or-pi): New. * cl-macs.el (cl-cdr-or-pi): New. * cl-macs.el (equal): New compiler macro. * cl-macs.el (member): New compiler macro. * cl-macs.el (assoc): New compiler macro. * cl-macs.el (rassoc): New compiler macro. If any of #'equal, #'member, #'assoc or #'rassoc has a constant argument such that #'eq, #'memq, #'assq or #'rassq, respectively, are equivalent, make the substitution. Relevant in files like ispell.el, there's a reasonable amount of code out there that doesn't quite get the distinction.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 07 May 2012 17:56:24 +0100
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
1 /* Virtual diry bit implementation for XEmacs.
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
2 Copyright (C) 2005 Marcus Crestani.
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
3
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
4 This file is part of XEmacs.
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
5
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3092
diff changeset
6 XEmacs is free software: you can redistribute it and/or modify it
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 3092
diff changeset
8 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: 3092
diff changeset
9 option) any later version.
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
10
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
14 for more details.
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
15
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
16 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: 3092
diff changeset
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
3092
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
18
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
19 /* Synched up with: Not in FSF. */
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
20
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
21 #include <config.h>
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
22 #include "lisp.h"
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
23
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
24 void
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
25 fake_error (void)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
26 {
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
27 fprintf (stderr, "Incremental garbage collection not yet available on this");
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
28 fprintf (stderr, "system.\nDon't try to set allow-incremental-gc to t.\n");
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
29 ABORT ();
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
30 }
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
31
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
32 void
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
33 vdb_install_signal_handler (void)
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
34 {
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
35 allow_incremental_gc = 0;
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
36 }
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
37
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
38 void
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
39 vdb_protect (void *UNUSED (ptr), EMACS_INT UNUSED (len))
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
40 {
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
41 fake_error ();
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
42 }
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
43
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
44 void
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
45 vdb_unprotect (void *UNUSED (ptr), EMACS_INT UNUSED (len))
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
46 {
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
47 fake_error ();
141c2920ea48 [xemacs-hg @ 2005-11-25 01:41:31 by crestani]
crestani
parents:
diff changeset
48 }