Commit graph

28430 commits

Author SHA1 Message Date
Richard M. Stallman
82c602f0fe * lread.c (Funintern): Error if symbol is t or nil. 2009-11-19 16:13:22 +00:00
Stefan Monnier
87e32266f0 (make_gap_larger): Don't make as many assumptions about the
representation of Lisp integers.
Reported by MJ Chan <mjchan.inbox@gmail.com>.
2009-11-19 01:40:22 +00:00
Andreas Schwab
1b9ac1453d * lisp.h: Remove declaration of Ffont_get_system_font.
* xfns.c: Move include of "xsettings.h".
* xsettings.h: Use EXFUN to declare Ffont_get_system_font.
2009-11-17 21:57:48 +00:00
Jan Djärv
dfb3c4c640 xsettings.c didn't check font-use-system-font, fix that.
* xsettings.c (something_changedCB, Ffont_get_system_font): Check
use_system_font.
(syms_of_xsettings): DEFVAR font-use-system-font.

* font-setting.el (font-use-system-font): Moved ...

* cus-start.el (all): ... to here.
2009-11-17 20:17:46 +00:00
Andreas Schwab
25fe851a7c (x_default_font_parameter): Remove dead assignment. 2009-11-17 19:13:14 +00:00
Andreas Schwab
9370c1d8eb (Fbyteorder, init_font, Ffont_get_system_font): Declare. 2009-11-17 19:11:53 +00:00
Jan Djärv
21050de1b8 * xftfont.c (xftfont_fix_match): Older versions of fontconfig does
not have FC_LCD_*.  #define them if not there.
2009-11-17 13:47:29 +00:00
Jan Djärv
a6eb20d8fe #ifdef on FC_LCD_FILTER.
* xftfont.c (xftfont_fix_match): Older versions of fontconfig does
not have FC_LCD_FILTER.  #ifdef it.

* xsettings.c (parse_xft_settings, apply_xft_settings): Ditto

* xftfont.c (xftfont_fix_match): New function.
(xftfont_open): Call XftDefaultSubstitute before XftFontMatch.
Call xftfont_fix_match after XftFontMatch.
2009-11-17 09:53:45 +00:00
Jan Djärv
749cebc32f Add font-setting.el to DOC. 2009-11-17 09:13:36 +00:00
Jan Djärv
637fa98808 Handle system default font and changing font parameters.
* xterm.h (struct x_display_info): Add atoms and Window for xsettings.

* xterm.c (handle_one_xevent): Call xft_settings_event for
ClientMessage, PropertyNotify and DestroyNotify.
(x_term_init): If we have XFT, get DPI from Xft.dpi.
Call xsettings_initialize.

* xftfont.c (xftfont_fix_match): New function.
(xftfont_open): Call XftDefaultSubstitute before XftFontMatch.
Call xftfont_fix_match after XftFontMatch.

* xfont.c (xfont_driver): Initialize all members.

* xfns.c (x_default_font_parameter): Try font from Ffont_get_system_font.
Do not get font from x_default_parameter if we got one from
Ffont_get_system_font.
(Fx_select_font): Get the defaut font name from :name of FRAME_FONT (f).

* w32font.c (w32font_driver): Initialize all members.

* termhooks.h (enum event_kind): CONFIG_CHANGED_EVENT is new.

* lisp.h: Declare syms_of_xsettings.

* keyboard.c (kbd_buffer_get_event, make_lispy_event): Handle
CONFIG_CHANGED_EVENT.

* ftfont.c (ftfont_filter_properties): New function.

* frame.c (x_set_font): Remove unused variable lval.

* font.h (struct font_driver): filter_properties is new.

* font.c (font_put_extra): Don't return if val is nil, it means
boolean option is off.
(font_parse_fcname): Collect all extra properties in extra_props
and call filter_properties for all drivers with extra_props and
font as parameter.
(font_open_entity): Do not use cache, it does not pick up new fontconfig
settings like hinting.
(font_load_for_lface): If spec had a name in it, store it in entity.

* emacs.c (main): Call syms_of_xsettings

* config.in: HAVE_GCONF is new.

* Makefile.in (GCONF_CFLAGS, GCONF_LIBS): New variables for HAVE_GCONF.
xsettings.o is new.

* menu-bar.el: Put "Use system font" in Option-menu.

* loadup.el: If feature system-font-setting or font-render-setting is
there, load font-setting.

* Makefile.in (ELCFILES): font-settings.el is new.
* font-setting.el: New file.

* NEWS: Mention dynamic font changes (font-use-system-font).

* configure.in: New option: --with(out)-gconf.
Set HAVE_GCONF if we find gconf.
2009-11-17 08:21:23 +00:00
Kenichi Handa
5a94293248 (x_produce_glyphs): Consider face-remapping when falling
back to the default font in case that no suitable font is found.
2009-11-17 04:17:19 +00:00
Stefan Monnier
b7c7a4d1f8 (Fx_popup_menu) [HAVE_NS]: Use generic code for window edge.
Suggested by Chad Brown <yandros@mit.edu>.
(push_menu_item): Use MENU_ITEMS_ITEM_* names.
2009-11-17 03:32:04 +00:00
Jan Djärv
118141564b *** empty log message *** 2009-11-16 19:46:56 +00:00
Jan Djärv
072f1e39a2 xmenu.c(x_menu_wait_for_event): Call XFlush before select. 2009-11-16 19:43:40 +00:00
Andreas Schwab
5d1e70a2c4 Ignore errors from mkdir when creating deps
directory.
2009-11-14 18:35:19 +00:00
Jan Djärv
473a99b7c9 gtkutil.c (xg_update_frame_menubar): Do nothing if menubar already has a parent. 2009-11-14 18:22:34 +00:00
Jan Djärv
a53cfbe587 Use gcc-generated dependency files if we can (GNU Make and gcc required).
* Makefile.in: If AUTO_DEPEND is defined, make gcc generate
dependency files in deps/. Include those files into Makefile.

* config.in: Generated (AUTO_DEPEND).

* configure.in: --enable-autodepend is new.  Check for GNU Make
and that gcc supports -MMD -MF. Define AUTO_DEPEND if we can use
gcc and GNU make to generate dependencies.
2009-11-14 15:17:38 +00:00
Glenn Morris
f97d0f5777 Fix typo. 2009-11-14 04:07:19 +00:00
Michael Albinus
f04bb9b2d8 * dbusbind.c (Vdbus_registered_objects_table): Renamed from
Vdbus_registered_functions_table, because it contains also
properties.  Fix docstring.
(Fdbus_call_method, Fdbus_call_method_asynchronously): Fix
docstring.
2009-11-13 16:12:08 +00:00
Stefan Monnier
8f11f7ecce (mark_object): Don't reprocess marked strings.
Check vector's markbit earlier.  Adjust calls to mark_vectorlike.
(mark_vectorlike, mark_char_table): Assume the object is unmarked.
2009-11-13 15:26:28 +00:00
Kenichi Handa
8a605fe839 (word_boundary_p): Adjusted for the change of the
semantics of Vword_combining_categories.
(Vword_combining_categories): Describe the slight change of the
semantics.
2009-11-13 11:18:02 +00:00
Eli Zaretskii
241c4680c9 (SYSTEM_PURESIZE_EXTRA): Revert last change. 2009-11-13 10:10:15 +00:00
Eli Zaretskii
dc92c039bc (Fx_popup_menu): Call Fx_hide_tip only if HAVE_WINDOW_SYSTEM. 2009-11-13 10:09:05 +00:00
Stefan Monnier
5d58e44c27 (syms_of_xdisp): Fix typo in last change. 2009-11-12 02:09:33 +00:00
Juanma Barranquero
5e13f9d32c * makefile.w32-in: Update dependencies; add dependencies to lisp.h. 2009-11-12 00:51:37 +00:00
David Reitter
cf54c75498 menu.c (Fx_popup_menu): Remove left-over debugging code and rename variables to fix 2009-11-09 change. 2009-11-12 00:26:09 +00:00
Dan Nicolaescu
9143355208 * process.c (ifflag_def): Make flag_sym constant.
(Fnetwork_interface_info): Use a constant pointer.
(ifflag_table):
* xfns.c (cursor_bits):
* xdisp.c (power_letter):
* termcap.c (speeds, esctab):
* sysdep.c (baud_convert):
* keyboard.c (lispy_accent_codes, modifier_names):
* image.c (xbm_format, xpm_format, pbm_format, png_format)
(jpeg_format, tiff_format, gif_format, svg_format)
(interlace_start, interlace_increment, gs_format):
* gtkutil.c (separator_names):
* fringe.c (swap_nibble):
* fns.c (base64_value_to_char, base64_char_to_value):
* fileio.c (make_temp_name_tbl):
* coding.c (suffixes): Make constant.
2009-11-11 20:11:51 +00:00
Dan Nicolaescu
f4265f6c27 * frame.c (make_initial_frame):
* buffer.c (init_buffer_once): Use make_pure_c_string instead of
build_string.
* alloc.c (syms_of_alloc): Build Vmemory_signal_data in pure memory.
2009-11-11 19:25:24 +00:00
Dan Nicolaescu
04420943de * s/freebsd.h:
* s/netbsd.h: Remove code referring to non-existent file: unexsunos4.o.
2009-11-11 19:13:50 +00:00
Dan Nicolaescu
0a5d24aedd Add dependencies to lisp.h. Remove dependencies
for non-existent files: unexmips.c, unexnext.c, abbrev.c, malloc.c.
2009-11-11 06:41:07 +00:00
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