Commit graph

419 commits

Author SHA1 Message Date
Jan Djärv
1ecb2d3f03 Use XFT in Lucid dialogs if available.
* xmenu.c (apply_systemfont_to_dialog): New.
	(create_and_show_dialog): Call apply_systemfont_to_dialog if HAVE_XFT.

	* lwlib-Xaw.c (widget_xft_data): New for Xft data.
	(fill_xft_data, openFont, get_text_width_and_height)
	(draw_text, set_text, find_xft_data, command_press)
	(command_reset): New functions.
	(xaw_update_one_widget): Call set_text for dialog and buttons
	if HAVE_XFT.  Also set internalHeight for buttons.
	(xaw_destroy_instance): Free all Xft related data.
	(button_actions, buttonTrans): New structures.
	(make_dialog): Call XtAppAddActions for button_actions.
	Find xft font to use and call fill_xft_data for widgets.
	(xaw_create_dialog): Pass instance parameter to make_dialog.

	* lwlib-int.h (_widget_instance): Add Xft data if HAVE_XFT.
	Override translations for buttons.  If depth is 16 or more, tell
	Xaw3d to not be nice to colormap.
	Remove separator widget, use XtNhorizDistance on first right button
	instead.

	* xresources.texi (Lucid Resources): Mention faceName for dialogs.
2010-04-11 20:25:09 +02:00
Jan Djärv
99852628a8 Lucid menus can now use Xft for fonts.
* xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
(parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
in current_font.
(init_gconf): Read value of SYSTEM_FONT and save it in current_font.
(Ffont_get_system_normal_font, xsettings_get_system_normal_font): New
functions.
(syms_of_xsettings): Initialize current_font. defsubr
Sfont_get_system_normal_font.

* xsettings.h (Ffont_get_system_normal_font,
xsettings_get_system_normal_font): Declare.

* xfns.c (extern xlwmenu_default_font): Remove.
(Fx_create_frame): Remove setting of xlwmenu_default_font, moved
to xlwmenu.c.

* menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
menu items in UTF-8.

* xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
(apply_systemfont_to_menu): New function.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu.

* xlwmenu.c (xlwmenu_default_font): Make static.
(xlwMenuResources): Add XtNfaceName and XtNdefaultFace.
(string_width): Use XftTextExtentsUtf8 if HAVE_XFT.
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for
HAVE_XFT.
(size_menu): Set max_rest_width in window_state structure.
(display_menu_item): If HAVE_XFT and xft_draw is set, use
XftDrawRect and XftDrawStringUtf8 to draw text.
(make_windows_if_needed): Set max_rest_width and xft_draw
in windows[i].
(openXftFont): New.
(XlwMenuInitialize): Call openXftFont if HAVE_XFT. If mw->menu.font
is not set, load font fixed and save it in xlwmenu_default_font.
(XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0].
(XlwMenuClassInitialize): Initialize xlwmenu_default_font.
(XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and
windows[0].xft_draw if xft_font is set.
(XlwMenuDestroy): Destroy all xft_draw and close xft_font.
(facename_changed): New.
(XlwMenuSetValues): Call facename_changed. If face name did change,
close old fonts and destroy xft_draw:s.  Then create new ones.

* xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace,
XtCDefaultFace): New.

* xlwmenuP.h (_window_state): Add max_rest_width and xft_draw.
(_XlwMenu_part): Add faceName,xft_fg, xft_bg, xft_disabled_fg and
xft_font.

* xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
2010-04-08 18:20:32 +02:00
Stefan Monnier
857387516c Merge from emacs-23 branch 2010-03-30 22:37:57 -04:00
Juri Linkov
dc2d2590b2 Make occur handle multi-line matches cleanly with context.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01280.html

* replace.el (occur-accumulate-lines): Add optional arg `pt'.
(occur-engine): Add local variables `ret', `prev-after-lines',
`prev-lines'.  Use more arguments for `occur-context-lines'.
Set first elem of its returned list to `data', and the second elem
to `prev-after-lines'.  Don't print the separator line.
In the end, print remaining context after-lines.
(occur-context-lines): Add new arguments `begpt', `endpt',
`lines', `prev-lines', `prev-after-lines'.  Rewrite to combine
after-lines of the previous match with before-lines of the
current match and not overlap them.  Return a list with two
values: the output line and the list of context after-lines.

* search.texi (Other Repeating Search): Remove line that `occur'
can not handle multiline matches.

* occur-testsuite.el (occur-tests): Add tests for context lines.
2010-03-30 19:03:08 +03:00
Eli Zaretskii
ce79424fc8 Improve documentation of "C-x 8 RET".
mule.texi (Input Methods): Mention "C-x 8 RET" and add a
 cross-reference to "Inserting Text".
 basic.texi (Inserting Text): Add an index entry for "C-x 8 RET".
 Mention completion provided by `ucs-insert'.
2010-03-30 13:59:26 +03:00
Eli Zaretskii
a7b0282034 Initial support for bidirectional editing.
Makefile.in (obj): Include bidi.o.
 (bidi.o): New target.
 makefile.w32-in (OBJ1): Add $(BLD)/bidi.$(O).
 ($(BLD)/bidi.$(O)): New target.
 bidi.c: New file.
 buffer.h (struct buffer): New members bidi_display_reordering
 and bidi_paragraph_direction.
 buffer.c (init_buffer_once): Initialize bidi_display_reordering
 and bidi_paragraph_direction.
 (syms_of_buffer): Declare Lisp variables bidi-display-reordering
 and bidi-paragraph-direction.
 (Fbuffer_swap_text): Swap the values of
 bidi_display_reordering and bidi_paragraph_direction.
 dispextern.h (BIDI_MAXLEVEL, BIDI_AT_BASE_LEVEL): New macros.
 (bidi_type_t, bidi_dir_t): New types.
 (bidi_saved_info, bidi_stack, bidi_it): New structures.
 (struct it): New members bidi_p, bidi_it, paragraph_embedding,
 prev_stop, base_level_stop, and eol_pos.
 (bidi_init_it, bidi_get_next_char_visually): New prototypes.
 (IT_STACK_SIZE): Enlarge to 5.
 (struct glyph_row): New member reversed_p.
 <string_buffer_position>: Update prototype.
 (PRODUCE_GLYPHS): Set the reversed_p flag in the iterator's
 glyph_row if bidi_it.paragraph_dir == R2L.
 (struct glyph): New members resolved_level and bidi_type.
 dispnew.c (direct_output_forward_char): Give up if we need bidi
 processing or buffer's direction is right-to-left.
 (prepare_desired_row): Preserve the reversed_p flag.
 (row_equal_p): Compare the reversed_p attributes as well.
 xdisp.c (init_iterator): Initialize it->bidi_p.  Call
 bidi_init_it and set it->paragraph_embedding from the current
 buffer's value of bidi_paragraph_direction.
 (reseat_1): Initialize bidi_it.first_elt.
 (set_iterator_to_next, next_element_from_buffer): Use the value of
 paragraph_embedding to determine the paragraph direction.
 (set_iterator_to_next): Under bidi reordering, call
 bidi_get_next_char_visually.  Call bidi_paragraph_init if the
 new_paragraph flag is set in the bidi iterator.
 (next_element_from_buffer): If bidi_it.first_elt is set,
 initialize paragraph direction and find the first character to
 display in the visual order.  If reseated to a middle of a line,
 prime the bidi iterator starting at the line's beginning.  Handle
 the situation where we overstepped stop_charpos due to
 non-linearity of the bidi iteration.  Likewise for when we back up
 beyond the previous stop_charpos.  When moving across stop_charpos,
 record it in prev_stop.
 (display_line): Set row->end and it->start for the next row to the
 next character in logical order.  Always extend reversed_p rows to
 the end of line, even if they end at ZV.  Copy the reversed_p flag
 to the next glyph row.  Keep calling set_cursor_from_row for
 bidi-reordered rows even if we already have a possible candidate
 for cursor position.  Set row_end after all the row's glyphs have
 been produced, by looping over the glyphs.  Record the position
 after EOL in it->eol_pos, and use it to set end_pos of the last
 row produced for a continued line.
 <Qright_to_left, Qleft_to_right>: New variables.
 (syms_of_xdisp): Initialize and staticpro them.
 (string_buffer_position_lim): New function.
 (string_buffer_position): Most of code moved to
 string_buffer_position_lim.  Last argument and return value are
 now EMACS_INT; all callers changed.
 (set_cursor_from_row): Rewritten to support bidirectional text and
 reversed glyph rows.
 (text_outside_line_unchanged_p, try_window_id): Disable
 optimizations if we are reordering bidirectional text and the
 paragraph direction can be affected by the change.
 (append_glyph, append_composite_glyph)
 (produce_image_glyph, append_stretch_glyph): Set the
 resolved_level and bidi_type members of each glyph.
 (append_glyph): If the glyph row is reversed, prepend the glyph
 rather than appending it.
 (handle_stop_backwards): New function.
 (reseat_1, pop_it, push_it): Set prev_stop and base_level_stop.
 (reseat): call handle_stop_backwards to recompute prev_stop and
 base_level_stop for the new position.
 (handle_invisible_prop): Under bidi iteration, skip invisible text
 using bidi_get_next_char_visually.  If we are `reseat'ed, init the
 paragraph direction.  Update IT->prev_stop after skipping
 invisible text.
 (move_it_in_display_line_to): New variables prev_method
 and prev_pos.  Compare for strict equality in
 BUFFER_POS_REACHED_P.
 (try_cursor_movement): Examine all the candidate rows that occlude
 point, to return the best match.  If rows are bidi-reordered
 and point moved backwards, back up to the row that is not a
 continuation line, and start looking for a suitable row from
 there.
 term.c (append_glyph): Reverse glyphs by pre-pending them,
 rather than appending, if the glyph_row's reversed_p flag is set.
 Set the resolved_level and bidi_type members of each glyph.
 .gdbinit (pbiditype): New command.
 (pgx): Use it to display bidi level and type of the glyph.
 (pitx): Display some bidi information about the iterator.
 (prowlims, pmtxrows): New commands.
 files.el: Make bidi-display-reordering safe variable for boolean
 values.
 mule.texi (International): Mention support of bidirectional editing.
 (Bidirectional Editing): New section.
 HELLO: Reorder Arabic and Hebrew into logical order, and
 insert RLM before the opening paren, to make the display more
 reasonable.  Add setting for bidi-display-reordering in the local
 variables section.
 NEWS: Mention initial support for bidirectional editing.
2010-03-30 05:13:07 -04:00
Nick Roberts
146b8b16f3 *** empty log message *** 2010-03-30 13:22:34 +13:00
Chong Yidong
8233e79a56 Expand discussion of mail setup.
* sending.texi (Sending Mail): Note variables that may need customizing.
(Mail Sending): Expand discussion of send-mail-function.
2010-03-28 14:44:47 -04:00
Nick Roberts
22ef194402 emacs.texi (Top): Update node names to those in building.texi. 2010-03-28 17:00:37 +13:00
Chong Yidong
e73c243459 Document Message mode as the default mail mode.
* sending.texi (Sending Mail): Document the fact that Message mode is
now the default mail mode.
(Mail Format, Mail Headers): Document mail-from-style changes.
(Mail Commands): Rename from Mail mode.  Document Message mode.
(Mail Misc): Rename from Mail mode Misc.
(Mail Sending, Header Editing, Mail Misc): Switch to Message mode
command names and update keybindings.
(Header Editing): Document message-tab.  De-document
mail-self-blind, mail-default-reply-to, and mail-archive-file-name in
favor of mail-default-headers.  Ad index entries for user-full-name and
user-mail-address.
(Citing Mail): Update changes in Message mode behavior.  Document
mail-yank-prefix.
(Mail Signature): New node, moved from Mail Misc.
(Mail Aliases): Mail abbrevs are the default with Message mode.
(Mail Methods): Note that Message mode is now the default.

* rmail.texi (Rmail Reply):
* text.texi (Text Mode):
* major.texi (Major Modes):
* mule.texi (Output Coding): Refer to Message mode.

* custom.texi (Init Examples): Add xref to Mail Header.

* emacs.texi (Top):  Fix xrefs.
2010-03-27 23:41:34 -04:00
Chong Yidong
ef7b27ef14 * maintaining.texi (Old Revisions): Document vc-root-diff. 2010-03-25 20:04:48 -04:00
Chong Yidong
c0c035fa6a Document VC changes: vc-log-show-limit and vc-print-root-log.
* maintaining.texi (VC With A Merging VCS): C-x v v now creates a
repository if there is none.
(VC Change Log): Rename from VC Status.  Document vc-log-show-limit and
vc-print-root-log.
(Old Revisions): Copyedits.

* emacs.texi: Update.
2010-03-25 18:57:13 -04:00
Chong Yidong
f2608df3a3 Document comint history-search changes.
* misc.texi (Shell Ring): Document new M-r binding.  M-s is no longer bound.
2010-03-25 17:14:17 -04:00
Chong Yidong
71785b7a63 * programs.texi (Program Modes): Mention Javascript mode. 2010-03-25 16:36:41 -04:00
Chong Yidong
f67c5dd0dd Note in documentation that nXML is now the default XML mode.
* text.texi (HTML Mode): Note that nXML is now the default XML mode.
* emacs.texi: Update node description.
2010-03-25 16:32:39 -04:00
Chong Yidong
0f72a391d3 * misc.texi (Navigation): Document doc-view-continuous. 2010-03-25 16:15:52 -04:00
Stefan Monnier
e867cb5d30 Merge from `emacs-23'. 2010-03-24 14:02:56 -04:00
Glenn Morris
6d98672d24 Close bug#5759.
* ack.texi (Acknowledgments):
* emacs.texi (Acknowledgments): Fix ispell attribution.
2010-03-23 20:02:42 -07:00
Jan Djärv
93318cbd40 bug #5736: Allow X-resource menuBar to take on/off as documented.
* frame.c (x_get_arg): Handle RES_TYPE_BOOLEAN_NUMBER (bug #5736).

* xfns.c (Fx_create_frame): Make menuBar a RES_TYPE_BOOLEAN_NUMBER.

* dispextern.h (resource_types): RES_TYPE_BOOLEAN_NUMBER is new.

* xresources.texi (Table of Resources): Clarify toolBar number
for Gtk+.

* frames.texi (Menu Bars): menuBarLines => menuBar (bug#5736).
2010-03-22 08:26:56 +01:00
Chong Yidong
4102856c09 * dired.texi (Dired Updating): Document dired-auto-revert-buffer. 2010-03-21 18:13:26 -04:00
Chong Yidong
15cf2f5273 Document multi-isearch-buffers and tab-always-indent.
* search.texi (Other Repeating Search): Document multi-isearch-buffers
and multi-isearch-buffers-regexp.

* indent.texi (Indentation): Clarify description of
indent-for-tab-command.  Document tab-always-indent.
2010-03-21 14:32:19 -04:00
Chong Yidong
d68eb23c6a Document font-use-system-font.
* cmdargs.texi (Font X): Move most content to Fonts.

* frames.texi (Fonts): New node.  Document font-use-system-font.

* emacs.texi (Top):
* xresources.texi (Table of Resources):
* mule.texi (Defining Fontsets, Charsets): Update xrefs.
2010-03-20 13:24:06 -04:00
Chong Yidong
288f9fc069 Bump version to 24.0.50. 2010-03-10 10:17:13 -05:00
Chong Yidong
17782becc5 Improve documentation for setting buffer-local vars (Bug#5688).
* custom.texi (Init Examples): Add xref to Locals.

* major.texi (Choosing Modes): Mention usage of setq-default for
setting the default value of major-mode (Bug#5688).
2010-03-06 14:02:49 -05:00
Chong Yidong
b4a1a8b278 * frames.texi (Mouse Avoidance): Mention make-pointer-invisible.
* display.texi (Display Custom): Document make-pointer-invisible and
underline-minimum-offset.  Remove inverse-video.
2010-03-02 17:56:36 -05:00
Chong Yidong
a1e759cdee * frames.texi (Frame Commands): Note that the last ordinary frame can
be deleted in daemon mode (Bug#5616).
2010-02-21 08:35:25 -05:00
Glenn Morris
4f3bc373f1 * trouble.texi (Contributing): Repository is no longer CVS. 2010-02-18 01:04:46 -08:00
Juanma Barranquero
484eaeac27 Fix typos in ChangeLogs. 2010-02-14 18:31:34 +01:00
Glenn Morris
5dbbdd3341 Close bug#5529.
* buffers.texi (Uniquify): Must explicitly load library.  (Bug#5529)
2010-02-07 23:20:58 -08:00
Stefan Monnier
cd61af01c1 Avoid obsolete special default variables like default-major-mode.
* display.texi (Line Height):
* emacs-lisp-intro.texi (Text and Auto-fill, Mode Line):
* display.texi (Useless Whitespace, Text Display):
* custom.texi (Init Examples): Avoid obsolete special default variables
like default-major-mode.
2010-02-01 13:39:33 -05:00
Mark A. Hershberger
b1bb0a2570 merge conflict 2010-01-24 23:52:26 -05:00
Glenn Morris
99d0985b2b (Bugs): Fix PROBLEMS keybinding. 2010-01-20 20:37:44 -08:00
Mark A. Hershberger
aaef4f91fa replace references to obsolete c-subword-mode 2010-01-19 14:39:22 -05:00
Juanma Barranquero
768c0c0f39 Fix typos in comments and ChangeLogs. 2010-01-13 16:38:28 +01:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Glenn Morris
893db5bcf0 Replace emacs-pretest-bug with bug-gnu-emacs mailing list.
See http://lists.gnu.org/archive/html/emacs-devel/2009-12/msg00758.html

* emacs.c (REPORT_EMACS_BUG_PRETEST_ADDRESS): Set it to
bug-gnu-emacs rather than emacs-pretest-bug.

* mail/emacsbug.el (report-emacs-bug-pretest-address): Set
it to bug-gnu-emacs rather than emacs-pretest-bug.

* CONTRIBUTE, NEWS: Use bug-gnu-emacs rather than emacs-pretest-bug
for bug reports for development versions.

* trouble.texi (Checklist): Use bug-gnu-emacs rather than
emacs-pretest-bug for bug reports for development versions.

* emacs-pretesters, make-announcement: Use bug-gnu-emacs rather
than emacs-pretest-bug for bug reports for development versions.

* INSTALL.BZR, README: Use bug-gnu-emacs rather than emacs-pretest-bug
for bug reports for development versions.
2010-01-11 21:11:05 -08:00
Glenn Morris
0419b8d6eb (Highlight Interactively): `t' does not mean highlight all patterns.
(Bug#5335)
2010-01-10 19:03:38 -08:00
Nick Roberts
7ee6c59b15 Further changes from EMACS_23_1_RC branch (2009-12-29 contd).
* term/x-win.el (x-gtk-stock-map): Map some GUD buttons.
* progmodes/gud.el (gud-menu-map): Add reverse-execution commands.
2009-12-31 02:19:53 +13:00
Chong Yidong
26e533e2d9 * doc/emacs/misc.texi (Shell): Document async-shell-command.
* doc/emacs/building.texi (Grep Searching): Document zrgrep.

* doc/emacs/mini.texi (Completion Options):
* doc/lispref/minibuf.texi (Completion Styles): Document `initials' style.
2009-12-29 13:06:16 -05:00
Chong Yidong
91ed7ea864 * emacs.texi (Top): Update node listing.
* abbrevs.texi (Saving Abbrevs): Abbrev file should be in .emacs.d.

* basic.texi (Moving Point): M-r is now move-to-window-line-top-bottom.

* cmdargs.texi (Initial Options):
* xresources.texi (Resources): Document inhibit-x-resources.

* custom.texi (Specifying File Variables): Note that minor modes are
enabled unconditionally.

* display.texi (Scrolling): Briefly document the old recenter command,
and document recenter-positions.

* files.texi (Visiting):
* buffers.texi (Buffers): Max buffer size is now 512 MB.

* frames.texi (Cut/Paste Other App): Document
save-interprogram-paste-before-kill.

* killing.texi (Kill Options): New node.
2009-12-25 20:00:32 +00:00
Chong Yidong
6ca89aaa81 * misc.texi (Shell Options): ansi-color is now default. 2009-12-05 21:12:19 +00:00
Glenn Morris
e11adbd8d2 (Diary Display): Mention View mode. 2009-12-05 03:49:36 +00:00
Glenn Morris
1a4f0c0a35 (Displaying the Diary): Mention keys apply to calendar. 2009-12-05 03:39:03 +00:00
Glenn Morris
806642d41e (Top): Update menu for cal-xtra node changes. 2009-12-05 03:08:48 +00:00
Juri Linkov
29a483ace4 (Highlight Interactively): Actually a list of
default faces is pre-loaded into a list of default values
instead of the history.
2009-11-29 23:57:18 +00:00
Glenn Morris
83d60c79cf (Acknowledgments): Add htmlfontify. 2009-11-20 02:30:55 +00:00
Glenn Morris
98ad1baebe (Holiday Customizing): Replace obsolete alias. 2009-11-14 19:29:45 +00:00
Glenn Morris
276bbe9652 (Acknowledgments): Update for recent Org changes. 2009-11-14 04:16:17 +00:00
Chong Yidong
18430066df * mule.texi (Charsets): Numerous copyedits. Don't discuss the
`charset' property, which is irrelevant to the user manual (Bug#3526).
2009-10-31 19:30:23 +00:00
Juanma Barranquero
522ddc9f22 * trouble.texi (DEL Does Not Delete): Fix typo. 2009-10-14 14:29:31 +00:00