Commit graph

28400 commits

Author SHA1 Message Date
Dan Nicolaescu
a4ada374d6 * xfns.c (syms_of_xfns): Use make_pure_string instead of build_string.
* xterm.c (syms_of_xterm):
* xfaces.c (syms_of_xfaces):
* xdisp.c (syms_of_xdisp):
* lread.c (syms_of_lread):
* keyboard.c (syms_of_keyboard): Use make_pure_c_string instead of
build_string.
* doc.c (Fsnarf_documentation): Purecopy Vbuild_files.
2009-11-11 06:10:42 +00:00
Stefan Monnier
af98fc7f9a (Fplist_get): Merge the active and the uncommented code. 2009-11-10 21:22:57 +00:00
Jan Djärv
e90292a90c Bug #4574. Common code for file/font dialog. Handle timers with glib-timers.
* keyboard.h: Declare timer_check.

* keyboard.c (timer_check_2): New function that does what the old
timer_check did.
(timer_check): Call timer_check_2 until -1 or a non-zero time is
returned, i.e. don't return -1 with timers pending.

* process.c: Remove extern declaration of timer_check.

* xmenu.c (x_menu_wait_for_event): Remove code that did a timeout
even if timer_check returned -1.

* gtkutil.c (xg_dialog_response_cb): data is now a struct xg_dialog_data
(pop_down_dialog): Destroy widget (if any), cancel timer and unref
the event loop.
(xg_maybe_add_timer, xg_dialog_run): New functions (bug #4574).
(xg_get_file_name, xg_get_font_name): Call xg_dialog_run (bug #4574).
Destroy the dialog after xg_dialog_run.
2009-11-10 19:06:40 +00:00
Stefan Monnier
045b83c00a (Fx_popup_menu) [HAVE_NS]: Remove unused vars. 2009-11-10 18:07:09 +00:00
Jan Djärv
1fb99a3a63 xmenu.c (xmenu_show): Must not be static after 2009-11-09 changes. 2009-11-10 07:58:57 +00:00
Juanma Barranquero
362654a675 Fix typos. 2009-11-09 11:21:04 +00:00
Juanma Barranquero
04e452cb31 * menu.c [HAVE_NTGUI]: Declare current_popup_menu. 2009-11-09 11:07:05 +00:00
Stefan Monnier
ef7417fd76 * menu.c (Fx_popup_menu): Consolidate versions from xmenu.c,
w32menu.c, and nsmenu.m.
Simplify the obsolete case where position is nil.
(cleanup_popup_menu): New function, moved from nsmenu.m.
(struct skp): Remove slot `notreal'.
(single_keymap_panes, keymap_panes): Remove arg `notreal' and adjust callers.
(single_menu_item): Adjust call to parse_menu_item.
(syms_of_menu): Defsubr x-popup-menu.
* menu.h (Vmenu_updating_frame): Consolidate declarations from *menu.c.
(keymap_panes): Don't export any more.
(mouse_position_for_popup, w32_menu_show, ns_menu_show, xmenu_show): Declare.
* keyboard.c (parse_menu_item): Remove arg `notreal'.
(menu_bar_item, read_char_minibuf_menu_prompt): Adjust callers.
* keyboard.h (parse_menu_item): Update declaration.
* xmenu.c (Fx_popup_menu): Remove.
(syms_of_xmenu): Don't defsubr x-popup-menu.
* w32menu.c (Fx_popup_menu): Remove.
(syms_of_w32menu): Don't defsubr x-popup-menu.
* nsmenu.m (cleanup_popup_menu): Remove.
(ns_menu_show): Rename from ns_popup_menu and remove all the code
moved to menu.c's Fx_popup_menu.
(Fx_popup_menu): Remove.
(syms_of_nsmenu): Don't defsubr x-popup-menu, and don't initialize
menu_items (it's done in menu.c already).
2009-11-09 06:21:03 +00:00
Chong Yidong
b25399ac46 Delete trailing whitespace. 2009-11-08 15:42:32 +00:00
Stefan Monnier
424d6179b3 (parse_menu_item): Handle `notreal' a bit earlier.
Use `tem' less.  Make sure KEYEQ holds a string or nil (bug#4879).
2009-11-08 15:06:50 +00:00
Chong Yidong
c0df13a6e3 * xmenu.c (Fx_popup_menu): Hide any tooltip before opening a menu. 2009-11-08 00:14:30 +00:00
Chong Yidong
eb99095dbd Fix last change. 2009-11-07 23:53:54 +00:00
Chong Yidong
a20903d09e * xmenu.c (Fx_popup_menu): Extract event timestamp. Pass it to
xmenu_show.
(xmenu_show): New arg.  Pass it to create_and_show_popup_menu.
(create_and_show_popup_menu): New arg.  Pass it to gtk_menu_popup.
2009-11-07 23:49:08 +00:00
Stefan Monnier
2de9f71c22 Let integers use up 2 tags to give them one extra bit and double their range.
* lisp.h (USE_2_TAGS_FOR_INTS): New macro.
(LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P): New macros.
(enum Lisp_Type): Use them.  Give explicit values.
(Lisp_Type_Limit): Remove.
(XINT, XUINT, make_number) [!USE_LISP_UNION_TYPE]:
(MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
Pay attention to USE_2_TAGS_FOR_INTS.
(INTEGERP): Use LISP_INT_TAG_P.
* fns.c (internal_equal): Simplify the default case.
(sxhash): Use case_Lisp_Int.
* data.c (wrong_type_argument): Don't check against Lisp_Type_Limit any more.
(Ftype_of): Use case_Lisp_Int.
(store_symval_forwarding): Take into account the fact that Ints can
now have more than one tag.
* buffer.c (syms_of_buffer): Use LISP_INT_TAG.
buffer_slot_type_mismatch):
* xfaces.c (face_attr_equal_p):
* print.c (print_object):
* alloc.c (mark_maybe_object, mark_object, survives_gc_p): Use case_Lisp_Int.
2009-11-06 18:47:48 +00:00
Eli Zaretskii
7ac65b3893 (SYSTEM_PURESIZE_EXTRA): Reduce by further 30K. 2009-11-06 11:40:24 +00:00
Eli Zaretskii
323637a270 (make_pure_c_string): Fix last change to avoid compiler warning. 2009-11-06 10:55:11 +00:00
Jan Djärv
e511451fd3 Fix bug #4870, issues 3 and 4.
* gtkutil.c (xg_event_is_for_scrollbar): New function (bug#4870).

* gtkutil.h: Declare xg_event_is_for_scrollbar (bug#4870).

* xterm.c (handle_one_xevent): Call xg_event_is_for_scrollbar for
ButtonPressRelease and MotionNotify (bug#4870).
2009-11-06 08:30:43 +00:00
Dan Nicolaescu
5adc433ec6 * keymap.c (syms_of_keymap): Construct exclude_keys in pure memory. 2009-11-06 07:49:31 +00:00
Dan Nicolaescu
d67b4f80db * xterm.c (syms_of_xterm):
* xselect.c (syms_of_xselect):
* xmenu.c (syms_of_xmenu):
* xfns.c (syms_of_xfns):
* xfaces.c (syms_of_xfaces):
* xdisp.c (syms_of_xdisp):
* window.c (syms_of_window):
* w32fns.c (syms_of_w32fns):
* undo.c (syms_of_undo):
* textprop.c (syms_of_textprop):
* terminal.c (syms_of_terminal):
* syntax.c (syms_of_syntax):
* sound.c (syms_of_sound):
* search.c (syms_of_search):
* print.c (syms_of_print):
* minibuf.c (syms_of_minibuf):
* macros.c (syms_of_macros):
* keymap.c (syms_of_keymap, initial_define_key)
(initial_define_lispy_key):
* keyboard.c (syms_of_keyboard):
* insdel.c (syms_of_insdel):
* image.c (syms_of_image):
* fringe.c (syms_of_fringe):
* frame.c (syms_of_frame):
* fontset.c (syms_of_fontset):
* fns.c (syms_of_fns):
* fns.c (syms_of_fns):
* fileio.c (syms_of_fileio):
* fileio.c (syms_of_fileio):
* eval.c (syms_of_eval):
* doc.c (syms_of_doc):
* dispnew.c (syms_of_display):
* dired.c (syms_of_dired):
* dbusbind.c (syms_of_dbusbind):
* data.c (syms_of_data):
* composite.c (syms_of_composite):
* coding.c (syms_of_coding):
* cmds.c (syms_of_cmds):
* charset.c (define_charset_internal, syms_of_character):
* ccl.c (syms_of_ccl):
* category.c (syms_of_category, init_category_once):
* casetab.c (syms_of_casetab):
* casefiddle.c (syms_of_casefiddle):
* callint.c (syms_of_callint):
* bytecode.c (syms_of_bytecode):
* buffer.c (keys_of_buffer, syms_of_buffer):
* alloc.c (syms_of_alloc):
* process.c (syms_of_process, init_process):
* lread.c (syms_of_lread, init_obarray):
* font.c (build_style_table):
* emacs.c (syms_of_emacs, main): Replace calls to intern with
intern_c_string, calls to make_pure_string with
make_pure_c_string.  Use pure_cons instead of Fcons.

* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.

* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it.  Make the name const char*.

* font.c (struct table_entry): Remove unused member.  Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.

* emacs.c (struct standard_args): Make name and longname constant.
2009-11-06 06:50:52 +00:00
Dan Nicolaescu
5e2327cf92 * process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.

* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it.  Make the name const char*.

* lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Update prototypes.
(DEFUN, EXFUN): Support for prototypes is now required.
(intern_c_string): New prototype.
(struct Lisp_Subr): Make symbol_name constant.

* font.c (struct table_entry): Remove unused member.  Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.

* emacs.c (struct standard_args): Make name and longname constant.

* character.h (DEFSYM): Use intern_c_string.
2009-11-06 06:07:46 +00:00
Dan Nicolaescu
a56eaaef7c * alloc.c (make_pure_c_string): New function.
* eval.c (Fautoload): Purecopy all arguments.
2009-11-06 05:24:28 +00:00
Kenichi Handa
f6a074209a (Finsert_file_contents): Be sure set coding-system of
the buffer in case of replace.
2009-11-05 04:16:04 +00:00
Dan Nicolaescu
5d28d4b18b (BASE_PURESIZE): Increase to 1620000. 2009-11-04 06:31:42 +00:00
Stefan Monnier
d528b1ce66 (save_restriction_restore): Update the (pt/begv/vz)_markers
when applicable (bug#4851).
2009-11-03 21:34:59 +00:00
Stefan Monnier
524420d289 (XPNTR) [USE_LSB_TAG && USE_LISP_UNION_TYPE]: silence compiler. 2009-11-03 21:12:15 +00:00
Stefan Monnier
b349d11143 Make USE_LSB_TAG work with USE_LISP_UNION_TYPE.
(P_): Support for prototypes is now required.
2009-11-03 15:30:39 +00:00
Chong Yidong
c38eb0274c * frame.c (Fmake_frame_invisible, Fframe_visible_p): Doc fix
(Bug#4827).
2009-10-31 17:12:13 +00:00
Eli Zaretskii
0405f8d9a3 (SYSTEM_PURESIZE_EXTRA): Redefine to waste less pure space. 2009-10-30 10:55:20 +00:00
Dan Nicolaescu
ca0a881a35 * puresize.h (BASE_PURESIZE): Increase to 1470000.
* lread.c (Fload): Purecopy the file name when building Vpreloaded_file_list.

* textmodes/ispell.el (ispell-skip-region-alist):
* international/mule-conf.el (eight-bit):
* international/fontset.el (font-encoding-alist):
* startup.el (pure-space-overflow-message):
* simple.el (overwrite-mode-textual, overwrite-mode-binary):
* paths.el (gnus-nntp-service, rmail-spool-directory)
(term-file-prefix):
* files.el (save-some-buffers-action-alist):
* cmuscheme.el (same-window-buffer-names):
* ielm.el (same-window-buffer-names):
* shell.el (same-window-buffer-names):
* mail/sendmail.el (same-window-buffer-names):
* progmodes/inf-lisp.el (same-window-buffer-names):
* bindings.el (mode-line-client)
(mode-line-column-line-number-mode-map):
* language/tibetan.el (tibetan-precomposition-rule-regexp)
(tibetan-precomposed-regexp): Purecopy string arguments.
2009-10-30 02:00:11 +00:00
Jason Rumney
47e0e0e4de (syms_of_w32fns): Change default value of
w32-scroll-lock-modifier to nil.  (Bug#2827)
2009-10-29 14:33:44 +00:00
Juanma Barranquero
782a943e7f * minibuf.c (Fall_completions): Fix typos in docstring. 2009-10-26 16:20:44 +00:00
Juanma Barranquero
057bce6f17 Fix typos in comments.
* minibuf.c (Fall_completions): Fix typo in docstring.
2009-10-26 15:18:03 +00:00
Andreas Schwab
242bc74cea (PURESIZE_RATIO): Increase back to 10/6. 2009-10-26 10:39:41 +00:00
Juanma Barranquero
522d013a59 * window.c (grow_mini_window): Comment out "delta >= 0" assertion.
For delta < 0, skip check that only makes sense when the mini-window
  is going to be enlarged.  (Bug#4534)
2009-10-26 10:04:37 +00:00
Stefan Monnier
4fcc3d324a (all-completions): Declare the 4th arg obsolete. 2009-10-26 03:39:15 +00:00
Chong Yidong
18060980dd * keyboard.c (read_char_x_menu_prompt): Don't demand a prompt
string in menu maps (Bug#4471).
2009-10-25 00:40:13 +00:00
Chong Yidong
fec8f0fe66 * nsfns.m (ns_set_name, ns_set_name_as_filename): Don't call
FRAME_NS_VIEW on terminal frames (Bug#4765).
2009-10-24 18:58:50 +00:00
Andreas Schwab
1cae01f715 (xd_retrieve_arg): Handle DBUS_TYPE_INTnn and
DBUS_TYPE_UINTnn separately to get proper sign extension.
2009-10-24 16:45:25 +00:00
Andreas Schwab
58a1288952 (Ffile_attributes): Simplify now that FIXNUM_OVERFLOW_P
can properly handle unsigned types.
(make_uid, make_gid): Removed.
2009-10-24 16:34:52 +00:00
Andreas Schwab
987c93276e (FIXNUM_OVERFLOW_P): Fix last change to handle unsigned
types again.
2009-10-24 16:32:06 +00:00
Andreas Schwab
10d66ec001 (procfs_ttyname): Fix sprintf format to match argument
type.
(system_process_attributes): Likewise.
2009-10-24 14:01:03 +00:00
Dan Nicolaescu
905a9ed392 * keymap.c (Fmake_sparse_keymap): Purecopy the name.
* eval.c (Fautoload): Purecopy the filename.  Simplify.

* category.c (Fdefine_category): Purecopy docstring.

* international/mule-cmds.el (set-language-info-alist): Purecopy lang-env.
(leim-list-header, leim-list-entry-regexp): Change defvars to defconst.
(charset): Purecopy the name.
(define-char-code-property): Purecopy string arguments.

* emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Purecopy string arguments.

* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map):
* ediff-hook.el (menu-bar-ediff-menu):
* buff-menu.el (Buffer-menu-mode-map): Purecopy names and tooltips.
* bookmark.el (menu-bar-bookmark-map): Add :help and purecopy the name.
2009-10-24 06:32:03 +00:00
Andreas Schwab
7b792fc98d (FIXNUM_OVERFLOW_P): Remove cast to avoid overflow. 2009-10-23 20:56:30 +00:00
Andreas Schwab
a599b3e810 (PURESIZE_RATIO): Decrease to 11/7. 2009-10-23 17:56:06 +00:00
Chong Yidong
b35ac83e46 * window.c (Fwindow_edges, Fwindow_pixel_edges)
(Fwindow_inside_edges, Fwindow_inside_pixel_edges): Doc fix
(Bug#4775).
2009-10-23 17:52:56 +00:00
Stefan Monnier
e8903e00e3 * fileio.c (syms_of_fileio): Initialize Vdirectory_sep_char.
(init_fileio_once):
* lisp.h (init_fileio_once): Remove.
* emacs.c (main): Don't call init_fileio_once.
2009-10-23 17:33:52 +00:00
Dan Nicolaescu
8f43cbf352 * puresize.h (BASE_PURESIZE): Increase to 1430000.
* term/tty-colors.el (msdos-color-values): Remove declaration, unused.
(color-name-rgb-alist, tty-standard-colors)
(tty-color-mode-alist): Change to defconst.

* simple.el (mark-inactive): Purecopy message.

* menu-bar.el (menu-bar-make-mm-toggle, menu-bar-make-toggle): Fix macro.
(global-map, yank-menu):
* textmodes/ispell.el (ispell-menu-map):
* net/eudc.el (eudc-tools-menu):
* international/mule-cmds.el (describe-language-environment-map)
(setup-language-environment-map, set-coding-system-map)
(mule-menu-keymap):
* vc-hooks.el (vc-menu-entry, vc-menu-map):
* replace.el (occur-mode-map):
* pcvs-defs.el (cvs-global-menu): Purecopy names and tooltips.

* bindings.el (propertized-buffer-identification): Purecopy
tooltip text.
2009-10-23 05:15:26 +00:00
Juanma Barranquero
a53af587e4 Add missing entry. 2009-10-22 09:40:54 +00:00
Andreas Schwab
268989432a (doprnt): Fix overflow check. 2009-10-21 21:28:59 +00:00
Jan Djärv
3132a7ea15 * xterm.c (x_term_init): Remove XSynchronize call done for debugging. 2009-10-21 19:15:57 +00:00