Mercurial > hg > xemacs-beta
annotate src/menubar.h @ 4678:b5e1d4f6b66f
Make #'floor, #'ceiling, #'round, #'truncate conform to Common Lisp.
lisp/ChangeLog addition:
2009-08-11 Aidan Kehoe <kehoea@parhasard.net>
* cl-extra.el (ceiling*, floor*, round*, truncate*):
Implement these in terms of the C functions; mark them as
obsolete.
(mod*, rem*): Use #'nth-value with the C functions, not #'nth with
the CL emulation functions.
man/ChangeLog addition:
2009-08-11 Aidan Kehoe <kehoea@parhasard.net>
* lispref/numbers.texi (Bigfloat Basics):
Correct this documentation (ignoring for the moment that it breaks
off in mid-sentence).
tests/ChangeLog addition:
2009-08-11 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Test the new Common Lisp-compatible rounding functions available in
C.
(generate-rounding-output): Provide a function useful for
generating the data for the rounding functions tests.
src/ChangeLog addition:
2009-08-11 Aidan Kehoe <kehoea@parhasard.net>
* floatfns.c (ROUNDING_CONVERT, CONVERT_WITH_NUMBER_TYPES)
(CONVERT_WITHOUT_NUMBER_TYPES, MAYBE_TWO_ARGS_BIGNUM)
(MAYBE_ONE_ARG_BIGNUM, MAYBE_TWO_ARGS_RATIO)
(MAYBE_ONE_ARG_RATIO, MAYBE_TWO_ARGS_BIGFLOAT)
(MAYBE_ONE_ARG_BIGFLOAT, MAYBE_EFF, MAYBE_CHAR_OR_MARKER):
New macros, used in the implementation of the rounding functions.
(ceiling_two_fixnum, ceiling_two_bignum, ceiling_two_ratio)
(ceiling_two_bigfloat, ceiling_one_ratio, ceiling_one_bigfloat)
(ceiling_two_float, ceiling_one_float, ceiling_one_mundane_arg)
(floor_two_fixnum, floor_two_bignum, floor_two_ratio)
(floor_two_bigfloat, floor_one_ratio, floor_one_bigfloat)
(floor_two_float, floor_one_mundane_arg, round_two_fixnum)
(round_two_bignum_1, round_two_bignum, round_two_ratio)
(round_one_bigfloat_1, round_two_bigfloat, round_one_ratio)
(round_one_bigfloat, round_two_float, round_one_float)
(round_one_mundane_arg, truncate_two_fixnum)
(truncate_two_bignum, truncate_two_ratio, truncate_two_bigfloat)
(truncate_one_ratio, truncate_one_bigfloat, truncate_two_float)
(truncate_one_float, truncate_one_mundane_arg):
New functions, used in the implementation of the rounding
functions.
(Fceiling, Ffloor, Fround, Ftruncate, Ffceiling, Fffloor)
(Ffround, Fftruncate):
Revise to fully support Common Lisp conventions. This means:
-- All functions have optional DIVISOR arguments
-- All functions return multiple values; see #'values
-- All functions do their arithmetic with the correct number types
according to the contamination rules.
-- #'round and #'fround always round towards the even number
in ambiguous cases.
* doprnt.c (emacs_doprnt_1):
* number.c (internal_coerce_number):
Call Ftruncate with two arguments, not one.
* floatfns.c (Ffloat):
Correct this, if NUMBER is a bignum.
* lisp.h:
Declare Ftruncate as taking two arguments.
* number.c:
Provide scratch_ratio2, init it appropriately.
* number.h:
Make scratch_ratio2 available.
* number.h (BIGFLOAT_ARITH_RETURN):
* number.h (BIGFLOAT_ARITH_RETURN1):
Correct these functions.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 11 Aug 2009 17:59:23 +0100 |
parents | cd0abfdb9e9d |
children | 308d34e9f07d |
rev | line source |
---|---|
428 | 1 /* Define generic menubar support. |
2 Copyright (C) 1995 Board of Trustees, University of Illinois. | |
3 | |
4 This file is part of XEmacs. | |
5 | |
6 XEmacs is free software; you can redistribute it and/or modify it | |
7 under the terms of the GNU General Public License as published by the | |
8 Free Software Foundation; either version 2, or (at your option) any | |
9 later version. | |
10 | |
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with XEmacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 Boston, MA 02111-1307, USA. */ | |
20 | |
21 /* Synched up with: Not in FSF. */ | |
22 | |
442 | 23 /* #### Still needs some device-abstraction work. */ |
428 | 24 |
440 | 25 #ifndef INCLUDED_menubar_h_ |
26 #define INCLUDED_menubar_h_ | |
428 | 27 |
28 #ifdef HAVE_MENUBARS | |
29 #include "gui.h" | |
30 void update_frame_menubars (struct frame *f); | |
31 void free_frame_menubars (struct frame *f); | |
32 Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc, | |
33 Lisp_Object gui_item); | |
872 | 34 Lisp_Object current_frame_menubar (const struct frame *f); |
428 | 35 |
36 EXFUN (Fmenu_find_real_submenu, 2); | |
37 | |
442 | 38 extern Lisp_Object Vmenu_accelerator_prefix; |
39 extern Lisp_Object Vmenu_accelerator_modifiers; | |
40 extern Lisp_Object Vmenu_accelerator_enabled; | |
41 extern Lisp_Object Vmenu_accelerator_map; | |
42 | |
43 extern Lisp_Object Qmenu_force; | |
44 extern Lisp_Object Qmenu_fallback; | |
45 | |
46 extern Lisp_Object Qmenu_quit; | |
47 extern Lisp_Object Qmenu_up; | |
48 extern Lisp_Object Qmenu_down; | |
49 extern Lisp_Object Qmenu_left; | |
50 extern Lisp_Object Qmenu_right; | |
51 extern Lisp_Object Qmenu_select; | |
52 extern Lisp_Object Qmenu_escape; | |
53 | |
54 | |
55 /* #### kluuuuuuuuuuuuuuuuuuuuuuuuuuuudge! | |
56 The author of the accelerator code didn't know what the hell he was doing. | |
57 Someone needs to abstract this properly. */ | |
872 | 58 #if defined (HAVE_X_WINDOWS) && defined (LWLIB_MENUBARS_LUCID) |
442 | 59 extern int x_kludge_lw_menu_active (void); |
60 struct command_builder; | |
61 Lisp_Object command_builder_find_menu_accelerator (struct command_builder | |
62 *builder); | |
63 Lisp_Object command_builder_operate_menu_accelerator (struct command_builder | |
64 *builder); | |
65 #endif | |
66 | |
872 | 67 extern int popup_menu_up_p; |
68 extern int menubar_show_keybindings; | |
69 extern int popup_menu_titles; | |
1279 | 70 extern int in_menu_callback; |
872 | 71 |
428 | 72 #endif /* HAVE_MENUBARS */ |
73 | |
440 | 74 #endif /* INCLUDED_menubar_h_ */ |