From 3633e3aa59f8df4e12f1b509c952e17dbf205819 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sun, 11 Dec 2011 21:08:51 +0900 Subject: coding.c (Funencodable_char_position): Pay attention to the buffer text relocation (Bug#9389). --- src/ChangeLog | 5 +++++ src/coding.c | 11 +++++++++++ 2 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 20fd021a376..221ba913a80 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-11 Kenichi Handa + + * coding.c (Funencodable_char_position): Pay attention to the + buffer text relocation (Bug#9389). + 2011-12-10 Jan Djärv * xterm.c (x_term_init): Move call to gdk_window_add_filter before diff --git a/src/coding.c b/src/coding.c index 50268099413..e15d725af3a 100644 --- a/src/coding.c +++ b/src/coding.c @@ -8756,6 +8756,7 @@ to the string. */) } positions = Qnil; + charset_map_loaded = 0; while (1) { int c; @@ -8783,6 +8784,16 @@ to the string. */) } from++; + if (charset_map_loaded && NILP (string)) + { + p = CHAR_POS_ADDR (from); + pend = CHAR_POS_ADDR (to); + if (from < GPT && to >= GPT) + stop = GPT_ADDR; + else + stop = pend; + charset_map_loaded = 0; + } } return (NILP (count) ? Fcar (positions) : Fnreverse (positions)); -- cgit v1.2.1 From 333f9019e29e9b6de3a7ec07448be1d364ba540b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 11 Dec 2011 21:32:49 -0800 Subject: Spelling fixes. --- src/ChangeLog.10 | 6 +++--- src/ChangeLog.2 | 6 +++--- src/alloc.c | 2 +- src/editfns.c | 2 +- src/emacs.c | 2 +- src/fontset.c | 2 +- src/ftfont.c | 2 +- src/lastfile.c | 3 +-- src/lread.c | 2 +- src/nsfont.m | 2 +- src/region-cache.c | 4 ++-- src/region-cache.h | 4 ++-- src/termhooks.h | 4 ++-- src/xfns.c | 8 ++++---- 14 files changed, 24 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index e759183724e..53f7a016654 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 @@ -15816,14 +15816,14 @@ Add prototypes. * macterm.c (mac_draw_bitmap): Add overlay_p arg. - (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps; + (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps; thanks to YAMAMOTO Mitsuharu for advice on how to do this. Use cursor color for displaying cursor in fringe. (x_redisplay_interface): Add null handlers for define_fringe_bitmap and destroy_fringe_bitmap functions. * w32term.c (w32_draw_fringe_bitmap): Copy unadapted code from - xterm.c to handle overlayed fringe bitmaps and to use cursor color + xterm.c to handle overlaid fringe bitmaps and to use cursor color for displaying cursor in fringe. (w32_define_fringe_bitmap, w32_destroy_fringe_bitmap): New W32 specific functions to define and destroy fringe bitmaps in fringe_bmp. @@ -15849,7 +15849,7 @@ (display_line): Handle cursor in fringe at eob. (display_line): Set row user fringe bitmaps from iterator. - * xterm.c (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps. + * xterm.c (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps. Use cursor color for displaying cursor in fringe. (x_redisplay_interface): Add null handlers for define_fringe_bitmap and destroy_fringe_bitmap functions. diff --git a/src/ChangeLog.2 b/src/ChangeLog.2 index ba61c337efc..d3be0064610 100644 --- a/src/ChangeLog.2 +++ b/src/ChangeLog.2 @@ -2254,7 +2254,7 @@ Initialize save_color. * fileio.c, search.c, sysdep.c, filelock.c, editfns.c, process.c: - Delete/replace unused/conditionalised variables + Delete/replace unused/conditionalized variables 1987-01-15 Richard M. Stallman (rms@prep) @@ -2632,7 +2632,7 @@ * fns.c: Fding requires an arg; pass Qnil. * m-alliant.h: define TEXT_START as 0x1000. - Don't define LIBS_STANDARD; the default (sharable) library + Don't define LIBS_STANDARD; the default (shareable) library is said to work now. * alloc.c (mark_object): Now pass address of slot being marked. @@ -4220,7 +4220,7 @@ Increase PURESIZE again (sigh) * unexec.c (write_segment): - Kludgey coercions ("(int)") to get this line to compile: + Kludgy coercions ("(int)") to get this line to compile: nwrite = (((int) ptr + 128) & ~127) - (int) ptr; Also changed incorrect ~128 to ~127. diff --git a/src/alloc.c b/src/alloc.c index 96d63f53cf9..6f70976c345 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6399,7 +6399,7 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */); Vgc_cons_percentage = make_float (0.1); DEFVAR_INT ("pure-bytes-used", pure_bytes_used, - doc: /* Number of bytes of sharable Lisp data allocated so far. */); + doc: /* Number of bytes of shareable Lisp data allocated so far. */); DEFVAR_INT ("cons-cells-consed", cons_cells_consed, doc: /* Number of cons cells that have been consed so far. */); diff --git a/src/editfns.c b/src/editfns.c index 83cd4bd5535..7077f40e51c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3870,7 +3870,7 @@ usage: (format STRING &rest OBJECTS) */) enum { /* Maximum precision for a %f conversion such that the - trailing output digit might be nonzero. Any precisions + trailing output digit might be nonzero. Any precision larger than this will not yield useful information. */ USEFUL_PRECISION_MAX = ((1 - DBL_MIN_EXP) diff --git a/src/emacs.c b/src/emacs.c index 6bfc0dc60d0..12a48b26553 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -951,7 +951,7 @@ main (int argc, char **argv) } /* Command line option --no-windows is deprecated and thus not mentioned - in the manual and usage informations. */ + in the manual and usage information. */ if (argmatch (argv, argc, "-nw", "--no-window-system", 6, NULL, &skip_args) || argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args)) inhibit_window_system = 1; diff --git a/src/fontset.c b/src/fontset.c index 605d807aa3c..281ac92f82d 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -643,7 +643,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fa if (font_has_char (f, font_object, c)) goto found; - /* Find a font already opened, maching with the current spec, + /* Find a font already opened, matching with the current spec, and supporting C. */ font_def = RFONT_DEF_FONT_DEF (rfont_def); for (; found_index + 1 < ASIZE (vec); found_index++) diff --git a/src/ftfont.c b/src/ftfont.c index bab97e44fab..dbb2ce2745e 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -960,7 +960,7 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec) /* Need fix because this finds any fonts. */ if (fontset->nfont == 0 && ! NILP (family)) { - /* Try maching with configuration. For instance, the + /* Try matching with configuration. For instance, the configuration may specify "Nimbus Mono L" as an alias of "Courier". */ FcPattern *pat = FcPatternBuild (0, FC_FAMILY, FcTypeString, diff --git a/src/lastfile.c b/src/lastfile.c index d348e4ebb07..ab07e748930 100644 --- a/src/lastfile.c +++ b/src/lastfile.c @@ -23,7 +23,7 @@ along with GNU Emacs. If not, see . */ The files of Emacs are written so as to have no initialized data that can ever need to be altered except at the first startup. - This is so that those words can be dumped as sharable text. + This is so that those words can be dumped as shareable text. It is not possible to exercise such control over library files. So it is necessary to refrain from making their data areas shared. @@ -47,4 +47,3 @@ char my_endbss[1]; of the bss area used by Emacs. */ static char _my_endbss[1]; char * my_endbss_static = _my_endbss; - diff --git a/src/lread.c b/src/lread.c index 582d8f46638..7c0b0475786 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2822,7 +2822,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) So we now use the same heuristic as for backquote: old-style unquotes are only recognized when first on a list, and when followed by a space. - Because it's more difficult to peak 2 chars ahead, a new-style + Because it's more difficult to peek 2 chars ahead, a new-style ,@ can still not be used outside of a `, unless it's in the middle of a list. */ if (new_backquote_flag diff --git a/src/nsfont.m b/src/nsfont.m index 7d691ced6e1..6a053af344d 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -630,7 +630,7 @@ nsfont_list (Lisp_Object frame, Lisp_Object font_spec) } -/* Return a font entity most closely maching with FONT_SPEC on +/* Return a font entity most closely matching with FONT_SPEC on FRAME. The closeness is determined by the font backend, thus `face-font-selection-order' is ignored here. Properties to be considered are same as for list(). */ diff --git a/src/region-cache.c b/src/region-cache.c index ed7a07a6709..054374eb688 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -699,7 +699,7 @@ know_region_cache (struct buffer *buf, struct region_cache *c, /* Return true if the text immediately after POS in BUF is known, for the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest - position after POS where the knownness changes. */ + position after POS where the knowledge changes. */ int region_cache_forward (struct buffer *buf, struct region_cache *c, ptrdiff_t pos, ptrdiff_t *next) @@ -736,7 +736,7 @@ region_cache_forward (struct buffer *buf, struct region_cache *c, /* Return true if the text immediately before POS in BUF is known, for the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest - position before POS where the knownness changes. */ + position before POS where the knowledge changes. */ int region_cache_backward (struct buffer *buf, struct region_cache *c, ptrdiff_t pos, ptrdiff_t *next) { diff --git a/src/region-cache.h b/src/region-cache.h index 8e1be716776..6758f8bcd08 100644 --- a/src/region-cache.h +++ b/src/region-cache.h @@ -97,7 +97,7 @@ extern void invalidate_region_cache (struct buffer *BUF, /* Return true if the text immediately after POS in BUF is known, for the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest - position after POS where the knownness changes. */ + position after POS where the knowledge changes. */ extern int region_cache_forward (struct buffer *BUF, struct region_cache *CACHE, ptrdiff_t POS, @@ -105,7 +105,7 @@ extern int region_cache_forward (struct buffer *BUF, /* Return true if the text immediately before POS in BUF is known, for the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest - position before POS where the knownness changes. */ + position before POS where the knowledge changes. */ extern int region_cache_backward (struct buffer *BUF, struct region_cache *CACHE, ptrdiff_t POS, diff --git a/src/termhooks.h b/src/termhooks.h index 63d166b6418..5bd081d6d8b 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -553,7 +553,7 @@ struct terminal /* Arrange for all scroll bars on FRAME to be removed at the next call to `*judge_scroll_bars_hook'. A scroll bar may be spared if - `*redeem_scroll_bar_hook' is applied to its window before the judgement. + `*redeem_scroll_bar_hook' is applied to its window before the judgment. This should be applied to each frame each time its window tree is redisplayed, even if it is not displaying scroll bars at the moment; @@ -565,7 +565,7 @@ struct terminal currently displaying them. */ void (*condemn_scroll_bars_hook) (struct frame *frame); - /* Unmark WINDOW's scroll bar for deletion in this judgement cycle. + /* Unmark WINDOW's scroll bar for deletion in this judgment cycle. Note that it's okay to redeem a scroll bar that is not condemned. */ void (*redeem_scroll_bar_hook) (struct window *window); diff --git a/src/xfns.c b/src/xfns.c index 95154395e9c..e44f28df870 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1877,7 +1877,7 @@ static XIMStyle supported_xim_styles[] = #if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT /* Create an X fontset on frame F with base font name BASE_FONTNAME. */ -static const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; +static const char xic_default_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; /* Create an Xt fontset spec from the name of a base font. If `motif' is True use the Motif syntax. */ @@ -1888,7 +1888,7 @@ xic_create_fontsetname (const char *base_fontname, int motif) char *fontsetname; /* Make a fontset name from the base font name. */ - if (xic_defaut_fontset == base_fontname) + if (xic_default_fontset == base_fontname) { /* There is no base font name, use the default. */ ptrdiff_t len = strlen (base_fontname) + 2; fontsetname = xmalloc (len); @@ -1912,12 +1912,12 @@ xic_create_fontsetname (const char *base_fontname, int motif) modify it to generalize it to allcs and allfamilies. Use the specified font plus the default. */ ptrdiff_t len = - strlen (base_fontname) + strlen (xic_defaut_fontset) + 3; + strlen (base_fontname) + strlen (xic_default_fontset) + 3; fontsetname = xmalloc (len); memset (fontsetname, 0, len); strcpy (fontsetname, base_fontname); strcat (fontsetname, sep); - strcat (fontsetname, xic_defaut_fontset); + strcat (fontsetname, xic_default_fontset); } else { -- cgit v1.2.1 From 454592a615ac4d86a6ce594945487642be5013d7 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 13 Dec 2011 14:37:48 +0100 Subject: Minor fixes in window handling code and docs. * window.c (Vwindow_combination_resize) (Vwindow_combination_limit): Use t instead of non-nil in doc-strings. * window.el (delete-other-windows): Use correct frame in call to window-with-parameter. * windows.texi (Splitting Windows): Use t instead of non-nil when describing window-combination-resize. --- src/ChangeLog | 6 ++++++ src/window.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 221ba913a80..5cdbd528a2e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-12-13 Martin Rudalics + + * window.c (Vwindow_combination_resize) + (Vwindow_combination_limit): Use t instead of non-nil in + doc-strings. + 2011-12-11 Kenichi Handa * coding.c (Funencodable_char_position): Pay attention to the diff --git a/src/window.c b/src/window.c index b908749ea4a..f007aaf52cd 100644 --- a/src/window.c +++ b/src/window.c @@ -6506,22 +6506,24 @@ frame to be redrawn only if it is a tty frame. */); Vrecenter_redisplay = Qtty; DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize, - doc: /* Non-nil means resize window combinations proportionally. + doc: /* If t, resize window combinations proportionally. If this variable is nil, splitting a window gets the entire screen space for displaying the new window from the window to split. Deleting and resizing a window preferably resizes one adjacent window only. -If this variable is non-nil, splitting a window tries to get the space +If this variable is t, splitting a window tries to get the space proportionally from all windows in the same combination. This also allows to split a window that is otherwise too small or of fixed size. Resizing and deleting a window proportionally resize all windows in the same combination. +Other values are reserved for future use. + This variable takes no effect if `window-combination-limit' is non-nil. */); Vwindow_combination_resize = Qnil; DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit, - doc: /* Non-nil means splitting a window makes a new parent window. + doc: /* If t, splitting a window makes a new parent window. If this variable is nil, splitting a window will create a new parent window only if the window has no parent window or the window shall become a combination orthogonal to the one it is part of. -- cgit v1.2.1 From 61d4b438e6abfb422e533090e08ba0d743553c51 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 13 Dec 2011 14:53:00 +0100 Subject: Fix doc-string of recenter-redisplay. --- src/ChangeLog | 2 ++ src/window.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 5cdbd528a2e..a56bb49da00 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * window.c (Vwindow_combination_resize) (Vwindow_combination_limit): Use t instead of non-nil in doc-strings. + (Vrecenter_redisplay): Add first sentence of doc-string on + separate line. 2011-12-11 Kenichi Handa diff --git a/src/window.c b/src/window.c index f007aaf52cd..4711dc8ff53 100644 --- a/src/window.c +++ b/src/window.c @@ -6500,9 +6500,10 @@ with the relevant frame selected. */); Vwindow_configuration_change_hook = Qnil; DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay, - doc: /* If non-nil, then the `recenter' command with a nil argument -will redraw the entire frame; the special value `tty' causes the -frame to be redrawn only if it is a tty frame. */); + doc: /* Non-nil means `recenter' redraws entire frame. +If this option is non-nil, then the `recenter' command with a nil +argument will redraw the entire frame; the special value `tty' causes +the frame to be redrawn only if it is a tty frame. */); Vrecenter_redisplay = Qtty; DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize, -- cgit v1.2.1 From 53524d93770aa3a789c50f6266020e20abd4093f Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 13 Dec 2011 14:58:20 +0100 Subject: Fix doc-string typo. --- src/ChangeLog | 1 + src/window.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index a56bb49da00..68547e191f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,7 @@ doc-strings. (Vrecenter_redisplay): Add first sentence of doc-string on separate line. + (Frecenter): Fix doc-string typo. 2011-12-11 Kenichi Handa diff --git a/src/window.c b/src/window.c index 4711dc8ff53..ef61d668499 100644 --- a/src/window.c +++ b/src/window.c @@ -4995,7 +4995,7 @@ the selected window; if the variable `recenter-redisplay' is non-nil, also erase the entire frame and redraw it (when `auto-resize-tool-bars' is set to `grow-only', this resets the tool-bar's height to the minimum height needed); if `recenter-redisplay' has the special value `tty', -then only tty frame are redrawn. +then only tty frames are redrawn. Just C-u as prefix means put point in the center of the window and redisplay normally--don't erase and redraw the frame. */) -- cgit v1.2.1