diff options
author | Glenn Morris <rgm@gnu.org> | 2011-05-12 00:07:06 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-05-12 00:07:06 -0700 |
commit | d2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68 (patch) | |
tree | e6d877c35b4396bd5092a7be244b1527374d4a0e | |
parent | d45885f7e0025fb5bd0756ba78c511a981d64533 (diff) | |
parent | e531bdfff1ee57a0ba4af6c8575ed7856e4c86d2 (diff) | |
download | emacs-d2fc7e3d0f6f57f962cbd94df3bf4fd15a37bb68.tar.gz |
Merge from emacs-23; up to 2010-06-10T12:56:11Z!michael.albinus@gmx.de.
-rw-r--r-- | doc/lispref/ChangeLog | 12 | ||||
-rw-r--r-- | doc/lispref/elisp.texi | 2 | ||||
-rw-r--r-- | doc/lispref/files.texi | 2 | ||||
-rw-r--r-- | doc/lispref/modes.texi | 10 | ||||
-rw-r--r-- | doc/lispref/vol1.texi | 2 | ||||
-rw-r--r-- | doc/lispref/vol2.texi | 2 | ||||
-rw-r--r-- | lisp/ChangeLog | 16 | ||||
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 6 | ||||
-rw-r--r-- | lisp/progmodes/which-func.el | 7 | ||||
-rw-r--r-- | lisp/vc/smerge-mode.el | 4 | ||||
-rw-r--r-- | src/ChangeLog | 16 | ||||
-rw-r--r-- | src/textprop.c | 4 | ||||
-rw-r--r-- | src/w32term.c | 52 | ||||
-rw-r--r-- | src/xterm.c | 54 |
14 files changed, 143 insertions, 46 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7ef3be46b68..3a66cebce2a 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,15 @@ +2011-05-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * modes.texi (Region to Refontify): Rename from "Region to Fontify". + (Multiline Font Lock): + * vol2.texi (Top): + * vol1.texi (Top): + * elisp.texi (Top): Update menu accordingly. + +2011-05-12 Drew Adams <drew.adams@oracle.com> + + * modes.texi (Region to Fontify): Fix typo. + 2011-05-06 Paul Eggert <eggert@cs.ucla.edu> * numbers.texi (Integer Basics): Large integers are treated as floats. diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 69c50ba42be..259bb3cf86e 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -828,7 +828,7 @@ Font Lock Mode Multiline Font Lock Constructs * Font Lock Multiline:: Marking multiline chunks with a text property. -* Region to Fontify:: Controlling which region gets refontified +* Region to Refontify:: Controlling which region gets refontified after a buffer change. Documentation diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index e3bdebd28a1..72f39f681ae 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -251,7 +251,7 @@ literally, i.e. without conversions of any kind. The command @code{find-file-literally} sets this variable's local value, but other equivalent functions and commands can do that as well, e.g.@: to avoid automatic addition of a newline at the end of the file. This variable -us permanent local, so it is unaffected by changes of major modes. +is permanent local, so it is unaffected by changes of major modes. @end defvar @node Subroutines of Visiting diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index f0a8985fa75..02f89f93207 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3174,7 +3174,7 @@ subsequent lines. @menu * Font Lock Multiline:: Marking multiline chunks with a text property. -* Region to Fontify:: Controlling which region gets refontified +* Region to Refontify:: Controlling which region gets refontified after a buffer change. @end menu @@ -3226,7 +3226,7 @@ place the @code{font-lock-multiline} property on the text before Font-Lock looks at it, or use @code{font-lock-fontify-region-function}. -@node Region to Fontify +@node Region to Refontify @subsubsection Region to Fontify after a Buffer Change When a buffer is changed, the region that Font Lock refontifies is @@ -3235,15 +3235,15 @@ While this works well most of the time, sometimes it doesn't---for example, when a change alters the syntactic meaning of text on an earlier line. - You can enlarge (or even reduce) the region to fontify by setting -one the following variables: + You can enlarge (or even reduce) the region to refontify by setting +the following variable: @defvar font-lock-extend-after-change-region-function This buffer-local variable is either @code{nil} or a function for Font-Lock to call to determine the region to scan and fontify. The function is given three parameters, the standard @var{beg}, -@var{end}, and @var{old-len} from after-change-functions +@var{end}, and @var{old-len} from @code{after-change-functions} (@pxref{Change Hooks}). It should return either a cons of the beginning and end buffer positions (in that order) of the region to fontify, or @code{nil} (which means choose the region in the standard diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index ad8ff0819ca..afcd3d6cbd6 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi @@ -847,7 +847,7 @@ Font Lock Mode Multiline Font Lock Constructs * Font Lock Multiline:: Marking multiline chunks with a text property. -* Region to Fontify:: Controlling which region gets refontified +* Region to Refontify:: Controlling which region gets refontified after a buffer change. Documentation diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 7832b3a8614..65ffbc23860 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi @@ -846,7 +846,7 @@ Font Lock Mode Multiline Font Lock Constructs * Font Lock Multiline:: Marking multiline chunks with a text property. -* Region to Fontify:: Controlling which region gets refontified +* Region to Refontify:: Controlling which region gets refontified after a buffer change. Documentation diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b223382b271..d1348485002 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2011-05-12 Eli Zaretskii <eliz@gnu.org> + + * smerge-mode.el (smerge-resolve): Use null-device rather than a + literal "/dev/null". + +2011-05-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/lisp.el (lisp-complete-symbol, lisp-completion-at-point): + Fix typo. + +2011-05-12 Ralph Schleicher <rs@ralph-schleicher.de> + + * progmodes/which-func.el (which-function): + Use add-log-current-defun instead of add-log-current-defun-function, + which might not be defined (Bug#8260). + 2011-05-12 Glenn Morris <rgm@gnu.org> * emacs-lisp/bytecomp.el (byte-compile-file-form-defmumble): diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index deb06f52549..ef0c49b8616 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -636,8 +636,8 @@ considered." (plist (nthcdr 3 data))) (if (null data) (minibuffer-message "Nothing to complete") - (let ((completion-annotate-function - (plist-get plist :annotate-function))) + (let ((completion-annotate-function + (plist-get plist :annotation-function))) (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) (plist-get plist :predicate)))))) @@ -685,7 +685,7 @@ considered." (when end (list beg end obarray :predicate predicate - :annotate-function + :annotation-function (unless (eq predicate 'fboundp) (lambda (str) (if (fboundp (intern-soft str)) " <f>")))))))) diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index ae18486c43b..4e4d7b15053 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -270,7 +270,7 @@ It calls them sequentially, and if any returns non-nil, (defun which-function () "Return current function name based on point. Uses `which-func-functions', `imenu--index-alist' -or `add-log-current-defun-function'. +or `add-log-current-defun'. If no function name is found, return nil." (let ((name ;; Try the `which-func-functions' functions first. @@ -320,9 +320,8 @@ If no function name is found, return nil." (reverse (cons (car pair) namestack)))))))))))) ;; Try using add-log support. - (when (and (null name) (boundp 'add-log-current-defun-function) - add-log-current-defun-function) - (setq name (funcall add-log-current-defun-function))) + (when (null name) + (setq name (add-log-current-defun))) ;; Filter the name if requested. (when name (if which-func-cleanup-function diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 75e3b514531..f26ccdbedda 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -566,7 +566,7 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (with-current-buffer buf (zerop (call-process-region (point-min) (point-max) "patch" t nil nil - "-r" "/dev/null" "--no-backup-if-mismatch" + "-r" null-device "--no-backup-if-mismatch" "-fl" o)))) (save-restriction (narrow-to-region m0b m0e) @@ -582,7 +582,7 @@ major modes. Uses `smerge-resolve-function' to do the actual work." (with-current-buffer buf (zerop (call-process-region (point-min) (point-max) "patch" t nil nil - "-r" "/dev/null" "--no-backup-if-mismatch" + "-r" null-device "--no-backup-if-mismatch" "-fl" m)))) (save-restriction (narrow-to-region m0b m0e) diff --git a/src/ChangeLog b/src/ChangeLog index f7010859baa..d8895a91a55 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2011-05-12 Drew Adams <drew.adams@oracle.com> + + * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655). + +2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and + `width' to `bar_area_x' and `bar_area_width', respectively. + (x_scroll_run): Take account of fringe background extension. + + * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]: Rename + local vars `left' and `width' to `bar_area_x' and + `bar_area_width', respectively. + (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe + background extension. + 2011-05-10 Juanma Barranquero <lekktu@gmail.com> * image.c (Finit_image_library): Return t for built-in image types, diff --git a/src/textprop.c b/src/textprop.c index aad090c5b41..566b2962a63 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -838,8 +838,8 @@ In a buffer, it runs to (point-min), and the value cannot be less than that. The property values are compared with `eq'. If the property is constant all the way to the start of OBJECT, return the first valid position in OBJECT. -If the optional fourth argument LIMIT is non-nil, don't search -back past position LIMIT; return LIMIT if nothing is found before LIMIT. */) +If the optional fourth argument LIMIT is non-nil, don't search back past +position LIMIT; return LIMIT if nothing is found before reaching LIMIT. */) (Lisp_Object position, Lisp_Object prop, Lisp_Object object, Lisp_Object limit) { if (STRINGP (object)) diff --git a/src/w32term.c b/src/w32term.c index f6a6ba3e82f..d22aee6dc76 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -715,22 +715,22 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, if (sb_width > 0) { - int left = WINDOW_SCROLL_BAR_AREA_X (w); - int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) - * FRAME_COLUMN_WIDTH (f)); + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); if (bx < 0) { /* Bitmap fills the fringe. */ - if (left + width == p->x) - bx = left + sb_width; - else if (p->x + p->wd == left) - bx = left; + if (bar_area_x + bar_area_width == p->x) + bx = bar_area_x + sb_width; + else if (p->x + p->wd == bar_area_x) + bx = bar_area_x; if (bx >= 0) { int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); - nx = width - sb_width; + nx = bar_area_width - sb_width; by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); ny = row->visible_height; @@ -738,13 +738,13 @@ w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, } else { - if (left + width == bx) + if (bar_area_x + bar_area_width == bx) { - bx = left + sb_width; - nx += width - sb_width; + bx = bar_area_x + sb_width; + nx += bar_area_width - sb_width; } - else if (bx + nx == left) - nx += width - sb_width; + else if (bx + nx == bar_area_x) + nx += bar_area_width - sb_width; } } } @@ -2619,6 +2619,32 @@ x_scroll_run (struct window *w, struct run *run) fringes of W. */ window_box (w, -1, &x, &y, &width, &height); + /* If the fringe is adjacent to the left (right) scroll bar of a + leftmost (rightmost, respectively) window, then extend its + background to the gap between the fringe and the bar. */ + if ((WINDOW_LEFTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) + || (WINDOW_RIGHTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) + { + int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w); + + if (sb_width > 0) + { + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); + + if (bar_area_x + bar_area_width == x) + { + x = bar_area_x + sb_width; + width += bar_area_width - sb_width; + } + else if (x + width == bar_area_x) + width += bar_area_width - sb_width; + } + } + from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); bottom_y = y + height; diff --git a/src/xterm.c b/src/xterm.c index 20259b7ab2e..2352f51cfb7 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -753,22 +753,22 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring if (sb_width > 0) { - int left = WINDOW_SCROLL_BAR_AREA_X (w); - int width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) - * FRAME_COLUMN_WIDTH (f)); + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); if (bx < 0) { /* Bitmap fills the fringe. */ - if (left + width == p->x) - bx = left + sb_width; - else if (p->x + p->wd == left) - bx = left; + if (bar_area_x + bar_area_width == p->x) + bx = bar_area_x + sb_width; + else if (p->x + p->wd == bar_area_x) + bx = bar_area_x; if (bx >= 0) { int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); - nx = width - sb_width; + nx = bar_area_width - sb_width; by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); ny = row->visible_height; @@ -776,13 +776,13 @@ x_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fring } else { - if (left + width == bx) + if (bar_area_x + bar_area_width == bx) { - bx = left + sb_width; - nx += width - sb_width; + bx = bar_area_x + sb_width; + nx += bar_area_width - sb_width; } - else if (bx + nx == left) - nx += width - sb_width; + else if (bx + nx == bar_area_x) + nx += bar_area_width - sb_width; } } } @@ -3232,6 +3232,34 @@ x_scroll_run (struct window *w, struct run *run) fringe of W. */ window_box (w, -1, &x, &y, &width, &height); +#ifdef USE_TOOLKIT_SCROLL_BARS + /* If the fringe is adjacent to the left (right) scroll bar of a + leftmost (rightmost, respectively) window, then extend its + background to the gap between the fringe and the bar. */ + if ((WINDOW_LEFTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)) + || (WINDOW_RIGHTMOST_P (w) + && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) + { + int sb_width = WINDOW_CONFIG_SCROLL_BAR_WIDTH (w); + + if (sb_width > 0) + { + int bar_area_x = WINDOW_SCROLL_BAR_AREA_X (w); + int bar_area_width = (WINDOW_CONFIG_SCROLL_BAR_COLS (w) + * FRAME_COLUMN_WIDTH (f)); + + if (bar_area_x + bar_area_width == x) + { + x = bar_area_x + sb_width; + width += bar_area_width - sb_width; + } + else if (x + width == bar_area_x) + width += bar_area_width - sb_width; + } + } +#endif + from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); bottom_y = y + height; |