No revisions to pull. ------------------------------------------------------------ revno: 105392 committer: Glenn Morris branch nick: trunk timestamp: Wed 2011-08-03 06:20:59 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2011-07-17 10:26:13 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2011-08-03 10:20:59 +0000 @@ -282,7 +282,7 @@ ;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist ;;;;;; do* do loop return-from return block etypecase typecase ecase ;;;;;; case load-time-value eval-when destructuring-bind function* -;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "9452c0e16fd960fce5c19e5c067a7160") +;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "21df83d6106cb0c3d037e75ad79359dc") ;;; Generated autoloads from cl-macs.el (autoload 'gensym "cl-macs" "\ @@ -426,6 +426,7 @@ Loop over a list. Evaluate BODY with VAR bound to each `car' from LIST, in turn. Then evaluate RESULT to get return value, default nil. +An implicit nil block is established around the loop. \(fn (VAR LIST [RESULT]) BODY...)" nil (quote macro)) ------------------------------------------------------------ revno: 105391 committer: Paul Eggert branch nick: trunk timestamp: Tue 2011-08-02 22:24:30 -0700 message: * xdisp.c (compute_display_string_pos): Remove unused local. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-02 19:16:32 +0000 +++ src/ChangeLog 2011-08-03 05:24:30 +0000 @@ -1,3 +1,7 @@ +2011-08-03 Paul Eggert + + * xdisp.c (compute_display_string_pos): Remove unused local. + 2011-08-02 Eli Zaretskii Fix slow cursor motion and scrolling in large buffers with === modified file 'src/xdisp.c' --- src/xdisp.c 2011-08-02 19:16:32 +0000 +++ src/xdisp.c 2011-08-03 05:24:30 +0000 @@ -3163,7 +3163,6 @@ EMACS_INT lim = (charpos < eob - MAX_DISP_SCAN) ? charpos + MAX_DISP_SCAN : eob; struct text_pos tpos; - struct buffer *b; *disp_prop_p = 1; ------------------------------------------------------------ revno: 105390 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9190 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-08-02 22:00:22 -0400 message: * lisp/progmodes/sh-script.el (sh-font-lock-paren): "main" is not "in". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 19:43:09 +0000 +++ lisp/ChangeLog 2011-08-03 02:00:22 +0000 @@ -1,3 +1,8 @@ +2011-08-03 Stefan Monnier + + * progmodes/sh-script.el (sh-font-lock-paren): Don't mistake "main" for + "in" (bug#9190). + 2011-08-02 Lars Magne Ingebrigtsen * mail/sendmail.el (sendmail-query-once): Restore the current @@ -23,8 +28,8 @@ * info.el: Remove the `Info-beginning-of-buffer' function (bug#8325). - * net/network-stream.el (network-stream-open-starttls): Use - `starttls-available-p' to see whether starttls.el can be used. + * net/network-stream.el (network-stream-open-starttls): + Use `starttls-available-p' to see whether starttls.el can be used. 2011-08-01 Martin Rudalics @@ -32,8 +37,7 @@ of window here (Bug#9215). (display-buffer-pop-up-window, display-buffer-pop-up-frame) (display-buffer-pop-up-side-window) - (display-buffer-in-side-window): Set dedicated status of window - here. + (display-buffer-in-side-window): Set dedicated status of window here. 2011-08-01 Stefan Monnier @@ -87,8 +91,8 @@ QT keyword "more" to prevent "more slots: ...." being spuriously parsed as a bitfield declaraion. - * progmodes/cc-engine.el (c-beginning-of-statement-1): Refactor - and enhance to handle bitfield declarations. + * progmodes/cc-engine.el (c-beginning-of-statement-1): + Refactor and enhance to handle bitfield declarations. (c-punctuation-in): New function. (c-forward-decl-or-cast-1): Enhance CASE 3 to handle bitfield declarations properly. @@ -97,7 +101,7 @@ * calendar/icalendar.el (icalendar--all-events): Take care of multiple vcalendars in a single file. - (icalendar--convert-float-to-ical): checkdoc fixes. + (icalendar--convert-float-to-ical): Checkdoc fixes. 2011-07-25 Deniz Dogan @@ -131,8 +135,7 @@ (display-buffer-pop-up-side-window) (display-buffer-in-side-window): Call display-buffer-set-height and display-buffer-set-width after setting the new window's - buffer so `fit-window-to-buffer' and friends work on the right - buffer. + buffer so `fit-window-to-buffer' and friends work on the right buffer. 2011-07-20 Sam Steingold @@ -164,8 +167,8 @@ 2011-07-19 Martin Rudalics * window.el (display-buffer-alist-of-strings-p) - (display-buffer-alist-set-1, display-buffer-alist-set-2): New - functions. + (display-buffer-alist-set-1, display-buffer-alist-set-2): + New functions. (display-buffer-alist-set): Rewrite to handle Emacs 23 options more accurately. @@ -176,8 +179,8 @@ * progmodes/cc-langs.el (c-symbol-chars): Correct a typo. - * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): New - function. + * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): + New function. (c-complex-decl-matchers): Insert reference to c-font-lock-enclosing-decls. @@ -196,7 +199,7 @@ 2011-07-16 Lars Magne Ingebrigtsen - * net/gnutls.el (gnutls-log-level): Removed. + * net/gnutls.el (gnutls-log-level): Remove. * textmodes/fill.el (adaptive-fill-regexp): Include EN DASH as an indentation character (bug#6380). @@ -218,11 +221,10 @@ 2011-07-16 Martin Rudalics - * frame.el (select-frame-set-input-focus): New argument - NORECORD. + * frame.el (select-frame-set-input-focus): New argument NORECORD. * window.el (pop-to-buffer): Select window used even if it was - selected before, see discussion of (Bug#8615), (Bug#6954). Pass - argument NORECORD on to select-frame-set-input-focus. + selected before, see discussion of (Bug#8615), (Bug#6954). + Pass argument NORECORD on to select-frame-set-input-focus. 2011-07-15 Glenn Morris @@ -236,8 +238,8 @@ 2011-07-15 Lars Magne Ingebrigtsen - * net/gnutls.el (gnutls-negotiate): Upcase - `gnutls-algorithm-priority'. + * net/gnutls.el (gnutls-negotiate): + Upcase `gnutls-algorithm-priority'. 2011-07-15 Glenn Morris @@ -318,9 +320,9 @@ * printing.el (pr-toggle-region): Clarify the documentation slightly (bug#7493). - * time.el (display-time-update): Allow - `display-time-mail-function' to return nil (bug#7158). Fix - suggested by Detlev Zundel. + * time.el (display-time-update): + Allow `display-time-mail-function' to return nil (bug#7158). + Fix suggested by Detlev Zundel. * vc/diff.el (diff): Clarify the order the file names are read (bug#7111). @@ -336,8 +338,8 @@ 2011-07-14 Martin Rudalics - * window.el (display-buffer-normalize-special): Replace - `dedicated' by `dedicate' to dedicate window (Bug#9072). + * window.el (display-buffer-normalize-special): + Replace `dedicated' by `dedicate' to dedicate window (Bug#9072). 2011-07-14 Eli Zaretskii @@ -358,7 +360,7 @@ switch-to-buffer. * net/tramp-compat.el (tramp-compat-pop-to-buffer-same-window): - Deleted. + Delete. 2011-07-14 Juanma Barranquero @@ -376,8 +378,8 @@ 2011-07-13 Chong Yidong - * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW. Use - pop-to-buffer buffer-or-name if it is nil. + * window.el (switch-to-buffer): New arg FORCE-SAME-WINDOW. + Use pop-to-buffer buffer-or-name if it is nil. * emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions): Remove switch-to-buffer. @@ -402,8 +404,8 @@ 2011-07-13 Lars Magne Ingebrigtsen - * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock): Rewrite - to avoid awkward possessive "s" (bug#5986). + * progmodes/cperl-mode.el (cperl-syntaxify-by-font-lock): + Rewrite to avoid awkward possessive "s" (bug#5986). 2011-07-13 Glenn Morris @@ -497,15 +499,15 @@ 2011-07-12 Roland Winkler - * textmodes/bibtex.el (bibtex-initialize): Use - pop-to-buffer-same-window. + * textmodes/bibtex.el (bibtex-initialize): + Use pop-to-buffer-same-window. (bibtex-search-entries): Fix interactive call. 2011-07-12 Lars Magne Ingebrigtsen * progmodes/compile.el (compilation-error-regexp-alist-alist): - Fontise bytecomp Error lines more correctly (bug#2490). Fix - suggested by Johan Bockgård. + Fontise bytecomp Error lines more correctly (bug#2490). + Fix suggested by Johan Bockgård. * subr.el (remove-duplicates): Remove; `delete-dups' is sufficient. @@ -518,8 +520,8 @@ 2011-07-11 Lars Magne Ingebrigtsen - * mail/sendmail.el (sendmail-query-once): Use - `customize-save-variable' unconditionally, now that it works under + * mail/sendmail.el (sendmail-query-once): + Use `customize-save-variable' unconditionally, now that it works under emacs -Q. * mail/smtpmail.el (smtpmail-query-smtp-server): Ditto. @@ -584,16 +586,15 @@ 2011-07-09 Bob Nnamtrop (tiny change) - * emulation/viper-cmd.el (viper-change-state-to-vi): Limit - triggering of abbrev expansion (Bug#9038). + * emulation/viper-cmd.el (viper-change-state-to-vi): + Limit triggering of abbrev expansion (Bug#9038). 2011-07-09 Martin Rudalics * window.el (display-buffer-default-specifiers): Remove. (display-buffer-macro-specifiers): Remove default specifiers. (display-buffer-alist): Default to nil. - (display-buffer-reuse-window): New optional argument - other-window. + (display-buffer-reuse-window): New optional argument other-window. (display-buffer-pop-up-window): Allow splitting internal windows. Check whether a live window was created. (display-buffer-other-window-means-other-frame) @@ -608,11 +609,10 @@ (display-buffer): Process other-window specifier and call display-buffer-reuse-window with it. Emulate Emacs 23 behavior more faithfully. - (pop-up-windows, even-window-heights): Restore Emacs 23 default - values. + (pop-up-windows, even-window-heights): Restore Emacs 23 default values. (display-buffer-alist-set): Don't handle 'unset default values. - (display-buffer-in-window, display-buffer-alist-set): Replace - symbol "dedicated" by "dedicate". Reported by Tassilo Horn + (display-buffer-in-window, display-buffer-alist-set): + Replace symbol "dedicated" by "dedicate". Reported by Tassilo Horn . 2011-07-09 Leo Liu === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2011-04-22 18:44:26 +0000 +++ lisp/progmodes/sh-script.el 2011-08-03 02:00:22 +0000 @@ -1028,45 +1028,45 @@ (defun sh-font-lock-paren (start) (unless (nth 8 (syntax-ppss)) - (save-excursion - (goto-char start) - ;; Skip through all patterns - (while - (progn + (save-excursion + (goto-char start) + ;; Skip through all patterns + (while + (progn (while (progn - (forward-comment (- (point-max))) + (forward-comment (- (point-max))) (when (and (eolp) (sh-is-quoted-p (point))) (forward-char -1) t))) - ;; Skip through one pattern - (while - (or (/= 0 (skip-syntax-backward "w_")) + ;; Skip through one pattern + (while + (or (/= 0 (skip-syntax-backward "w_")) (/= 0 (skip-chars-backward "-$=?[]*@/\\\\")) - (and (sh-is-quoted-p (1- (point))) - (goto-char (- (point) 2))) + (and (sh-is-quoted-p (1- (point))) + (goto-char (- (point) 2))) (when (memq (char-before) '(?\" ?\' ?\})) - (condition-case nil (progn (backward-sexp 1) t) - (error nil))))) - ;; Patterns can be preceded by an open-paren (Bug#1320). - (if (eq (char-before (point)) ?\() - (backward-char 1)) - (while (progn - (forward-comment (- (point-max))) - ;; Maybe we've bumped into an escaped newline. - (sh-is-quoted-p (point))) - (backward-char 1)) - (when (eq (char-before) ?|) - (backward-char 1) t))) - (when (progn (backward-char 2) - (if (> start (line-end-position)) - (put-text-property (point) (1+ start) - 'syntax-multiline t)) - ;; FIXME: The `in' may just be a random argument to - ;; a normal command rather than the real `in' keyword. - ;; I.e. we should look back to try and find the - ;; corresponding `case'. - (and (looking-at ";[;&]\\|in") + (condition-case nil (progn (backward-sexp 1) t) + (error nil))))) + ;; Patterns can be preceded by an open-paren (Bug#1320). + (if (eq (char-before (point)) ?\() + (backward-char 1)) + (while (progn + (forward-comment (- (point-max))) + ;; Maybe we've bumped into an escaped newline. + (sh-is-quoted-p (point))) + (backward-char 1)) + (when (eq (char-before) ?|) + (backward-char 1) t))) + (when (progn (backward-char 2) + (if (> start (line-end-position)) + (put-text-property (point) (1+ start) + 'syntax-multiline t)) + ;; FIXME: The `in' may just be a random argument to + ;; a normal command rather than the real `in' keyword. + ;; I.e. we should look back to try and find the + ;; corresponding `case'. + (and (looking-at ";[;&]\\|\\_ committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2011-08-02 22:16:33 +0000 message: Merge changes made in Gnus trunk. nnir.el (nnir-search-thread): Position point on referring article line. (nnir-warp-to-article): Clean up summary buffers. nnimap.el (nnimap-request-thread): Whitespace fix. nnimap.el (nnimap-get-groups): Decode "&" correctly. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-08-02 13:30:46 +0000 +++ lisp/gnus/ChangeLog 2011-08-02 22:16:33 +0000 @@ -1,3 +1,15 @@ +2011-08-02 Andrew Cohen + + * nnir.el (nnir-search-thread): Position point on referring article + line. + (nnir-warp-to-article): Clean up summary buffers. + + * nnimap.el (nnimap-request-thread): Whitespace fix. + +2011-08-02 Steve Purcell (tiny change) + + * nnimap.el (nnimap-get-groups): Decode "&" correctly. + 2011-08-02 Lars Magne Ingebrigtsen * starttls.el (starttls-available-p): Renamed from === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-07-24 22:15:15 +0000 +++ lisp/gnus/nnimap.el 2011-08-02 22:16:33 +0000 @@ -1107,9 +1107,9 @@ (separator (read (current-buffer))) (group (read (current-buffer)))) (unless (member '%NoSelect flags) - (push (if (stringp group) - group - (format "%s" group)) + (push (utf7-decode (if (stringp group) + group + (format "%s" group)) t) groups)))) (nreverse groups))) @@ -1168,7 +1168,7 @@ (nnimap-get-groups))) (unless (assoc group nnimap-current-infos) ;; Insert dummy numbers here -- they don't matter. - (insert (format "%S 0 1 y\n" group)))) + (insert (format "%S 0 1 y\n" (utf7-encode group))))) t))) (deffoo nnimap-retrieve-group-data-early (server infos) @@ -1566,7 +1566,7 @@ (articles &optional limit force-new dependencies)) (deffoo nnimap-request-thread (header &optional group server) - (if gnus-refer-thread-use-nnir + (if gnus-refer-thread-use-nnir (nnir-search-thread header) (when (nnimap-possibly-change-group group server) (let* ((cmd (nnimap-make-thread-query header)) === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2011-07-24 00:19:29 +0000 +++ lisp/gnus/nnir.el 2011-08-02 22:16:33 +0000 @@ -767,11 +767,18 @@ (deffoo nnir-warp-to-article () (let* ((cur (if (> (gnus-summary-article-number) 0) (gnus-summary-article-number) - (error "This is not a real article."))) - (gnus-newsgroup-name (nnir-article-group cur)) - (backend-number (nnir-article-number cur))) - (gnus-summary-read-group-1 gnus-newsgroup-name t t gnus-summary-buffer - nil (list backend-number)))) + (error "This is not a real article"))) + (backend-article-group (nnir-article-group cur)) + (backend-article-number (nnir-article-number cur)) + (quit-config (gnus-ephemeral-group-p gnus-newsgroup-name))) + ;; first exit from the nnir summary buffer. + (gnus-summary-exit) + ;; and if the nnir summary buffer in turn came from another + ;; summary buffer we have to clean that summary up too. + (when (eq (cdr quit-config) 'summary) + (gnus-summary-exit)) + (gnus-summary-read-group-1 backend-article-group t t nil + nil (list backend-article-number)))) (nnoo-define-skeleton nnir) @@ -1659,7 +1666,8 @@ (cons 'server (gnus-method-to-server (gnus-find-method-for-group gnus-newsgroup-name)))))) - (gnus-group-make-nnir-group nil parm))) + (gnus-group-make-nnir-group nil parm) + (gnus-summary-goto-subject (gnus-id-to-article (mail-header-id header))))) ;; unused? (defun nnir-artlist-groups (artlist) ------------------------------------------------------------ revno: 105388 fixes bug(s): http://debbugs.gnu.org/9074 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 21:43:09 +0200 message: (sendmail-query-once): Restore the current buffer after querying diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 19:05:04 +0000 +++ lisp/ChangeLog 2011-08-02 19:43:09 +0000 @@ -1,5 +1,8 @@ 2011-08-02 Lars Magne Ingebrigtsen + * mail/sendmail.el (sendmail-query-once): Restore the current + buffer after querying (bug#9074). + * dired.el (dired-flagged): Use different faces for marked and flagged files (bug#6117). === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2011-07-11 20:15:04 +0000 +++ lisp/mail/sendmail.el 2011-08-02 19:43:09 +0000 @@ -165,7 +165,8 @@ If `sendmail-query-once-function' is `query', ask the user what function to use, and then save that choice." (when (equal sendmail-query-once-function 'query) - (let* ((default + (let* ((mail-buffer (current-buffer)) + (default (cond ((or (and window-system (eq system-type 'darwin)) (eq system-type 'windows-nt)) @@ -195,7 +196,8 @@ (if (y-or-n-p "Configure outgoing SMTP in Emacs? ") 'smtpmail-send-it default)) - (kill-buffer (current-buffer)))))) + (kill-buffer (current-buffer)) + (set-buffer mail-buffer))))) (customize-save-variable 'sendmail-query-once-function function))) (funcall sendmail-query-once-function)) ------------------------------------------------------------ revno: 105387 fixes bug(s): http://debbugs.gnu.org/9218 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2011-08-02 22:16:32 +0300 message: Fix bug #9218 with slow cursor motion and scrolling Org Mode buffers. src/dispextern.h (struct bidi_it): New member disp_prop_p. src/xdisp.c: Remove one-slot cache of display string positions. (compute_display_string_pos): Accept an additional argument DISP_PROP_P; callers changed. Scan at most 5K characters forward for a display string or property. If found, set DISP_PROP_P non-zero. src/bidi.c (bidi_fetch_char): Accept an additional argument DISP_PROP_P, and pass it to compute_display_string_pos. Only handle text covered by a display string if DISP_PROP_P is returned non-zero. All callers of bidi_fetch_char changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-02 16:02:52 +0000 +++ src/ChangeLog 2011-08-02 19:16:32 +0000 @@ -1,3 +1,21 @@ +2011-08-02 Eli Zaretskii + + Fix slow cursor motion and scrolling in large buffers with + selective display, like Org Mode buffers. (Bug#9218) + + * dispextern.h (struct bidi_it): New member disp_prop_p. + + * xdisp.c: Remove one-slot cache of display string positions. + (compute_display_string_pos): Accept an additional argument + DISP_PROP_P; callers changed. Scan at most 5K characters forward + for a display string or property. If found, set DISP_PROP_P + non-zero. + + * bidi.c (bidi_fetch_char): Accept an additional argument + DISP_PROP_P, and pass it to compute_display_string_pos. Only + handle text covered by a display string if DISP_PROP_P is returned + non-zero. All callers of bidi_fetch_char changed. + 2011-08-02 Stefan Monnier * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE. === modified file 'src/bidi.c' --- src/bidi.c 2011-07-28 00:24:58 +0000 +++ src/bidi.c 2011-08-02 19:16:32 +0000 @@ -792,6 +792,7 @@ bidi_it->prev_for_neutral.orig_type = UNKNOWN_BT; bidi_it->sor = L2R; /* FIXME: should it be user-selectable? */ bidi_it->disp_pos = -1; /* invalid/unknown */ + bidi_it->disp_prop_p = 0; /* We can only shrink the cache if we are at the bottom level of its "stack". */ if (bidi_cache_start == 0) @@ -874,14 +875,16 @@ covered characters as a single character u+FFFC, and return their combined length in CH_LEN and NCHARS. DISP_POS specifies the character position of the next display string, or -1 if not yet - computed. When the next character is at or beyond that position, - the function updates DISP_POS with the position of the next display - string. STRING->s is the C string to iterate, or NULL if iterating - over a buffer or a Lisp string; in the latter case, STRING->lstring - is the Lisp string. */ + computed. DISP_PROP_P non-zero means that there's really a display + string at DISP_POS, as opposed to when we searched till DISP_POS + without findingone. When the next character is at or beyond that + position, the function updates DISP_POS with the position of the + next display string. STRING->s is the C string to iterate, or NULL + if iterating over a buffer or a Lisp string; in the latter case, + STRING->lstring is the Lisp string. */ static inline int bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos, - struct bidi_string_data *string, + int *disp_prop_p, struct bidi_string_data *string, int frame_window_p, EMACS_INT *ch_len, EMACS_INT *nchars) { int ch; @@ -894,7 +897,8 @@ if (charpos < endpos && charpos > *disp_pos) { SET_TEXT_POS (pos, charpos, bytepos); - *disp_pos = compute_display_string_pos (&pos, string, frame_window_p); + *disp_pos = compute_display_string_pos (&pos, string, frame_window_p, + disp_prop_p); } /* Fetch the character at BYTEPOS. */ @@ -904,8 +908,9 @@ *ch_len = 1; *nchars = 1; *disp_pos = endpos; + *disp_prop_p = 0; } - else if (charpos >= *disp_pos) + else if (charpos >= *disp_pos && *disp_prop_p) { EMACS_INT disp_end_pos; @@ -972,10 +977,12 @@ /* If we just entered a run of characters covered by a display string, compute the position of the next display string. */ - if (charpos + *nchars <= endpos && charpos + *nchars > *disp_pos) + if (charpos + *nchars <= endpos && charpos + *nchars > *disp_pos + && *disp_prop_p) { SET_TEXT_POS (pos, charpos + *nchars, bytepos + *ch_len); - *disp_pos = compute_display_string_pos (&pos, string, frame_window_p); + *disp_pos = compute_display_string_pos (&pos, string, frame_window_p, + disp_prop_p); } return ch; @@ -1083,6 +1090,7 @@ int ch; EMACS_INT ch_len, nchars; EMACS_INT pos, disp_pos = -1; + int disp_prop_p = 0; bidi_type_t type; const unsigned char *s; @@ -1130,7 +1138,8 @@ bytepos = pstartbyte; if (!string_p) pos = BYTE_TO_CHAR (bytepos); - ch = bidi_fetch_char (bytepos, pos, &disp_pos, &bidi_it->string, + ch = bidi_fetch_char (bytepos, pos, &disp_pos, &disp_prop_p, + &bidi_it->string, bidi_it->frame_window_p, &ch_len, &nchars); type = bidi_get_type (ch, NEUTRAL_DIR); @@ -1157,7 +1166,8 @@ && bidi_at_paragraph_end (pos, bytepos) >= -1) break; /* Fetch next character and advance to get past it. */ - ch = bidi_fetch_char (bytepos, pos, &disp_pos, &bidi_it->string, + ch = bidi_fetch_char (bytepos, pos, &disp_pos, + &disp_prop_p, &bidi_it->string, bidi_it->frame_window_p, &ch_len, &nchars); pos += nchars; bytepos += ch_len; @@ -1290,6 +1300,7 @@ bidi_it->ch_len = 1; bidi_it->nchars = 1; bidi_it->disp_pos = (string_p ? bidi_it->string.schars : ZV); + bidi_it->disp_prop_p = 0; } else { @@ -1297,8 +1308,8 @@ display string, treat the entire run of covered characters as a single character u+FFFC. */ curchar = bidi_fetch_char (bidi_it->bytepos, bidi_it->charpos, - &bidi_it->disp_pos, &bidi_it->string, - bidi_it->frame_window_p, + &bidi_it->disp_pos, &bidi_it->disp_prop_p, + &bidi_it->string, bidi_it->frame_window_p, &bidi_it->ch_len, &bidi_it->nchars); } bidi_it->ch = curchar; @@ -2032,12 +2043,13 @@ struct bidi_string_data bs = bidi_it->string; bidi_type_t chtype; int fwp = bidi_it->frame_window_p; + int dpp = bidi_it->disp_prop_p; if (bidi_it->nchars <= 0) abort (); do { - ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &bs, fwp, - &clen, &nc); + ch = bidi_fetch_char (bpos += clen, cpos += nc, &disp_pos, &dpp, &bs, + fwp, &clen, &nc); if (ch == '\n' || ch == BIDI_EOB /* || ch == LINESEP_CHAR */) chtype = NEUTRAL_B; else === modified file 'src/dispextern.h' --- src/dispextern.h 2011-07-14 17:28:42 +0000 +++ src/dispextern.h 2011-08-02 19:16:32 +0000 @@ -1868,6 +1868,8 @@ bidi_dir_t paragraph_dir; /* current paragraph direction */ EMACS_INT separator_limit; /* where paragraph separator should end */ EMACS_INT disp_pos; /* position of display string after ch */ + int disp_prop_p; /* if non-zero, there really is a + `display' property/string at disp_pos */ unsigned first_elt : 1; /* if non-zero, examine current char first */ unsigned new_paragraph : 1; /* if non-zero, we expect a new paragraph */ unsigned frame_window_p : 1; /* non-zero if displaying on a GUI frame */ @@ -3035,7 +3037,8 @@ extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object, struct font *, int, int *); extern EMACS_INT compute_display_string_pos (struct text_pos *, - struct bidi_string_data *, int); + struct bidi_string_data *, + int, int *); extern EMACS_INT compute_display_string_end (EMACS_INT, struct bidi_string_data *); === modified file 'src/xdisp.c' --- src/xdisp.c 2011-08-01 17:59:35 +0000 +++ src/xdisp.c 2011-08-02 19:16:32 +0000 @@ -3134,13 +3134,10 @@ return endpos; } -/* Record one cached display string position found recently by - compute_display_string_pos. */ -static EMACS_INT cached_disp_pos; -static EMACS_INT cached_prev_pos = -1; -static struct buffer *cached_disp_buffer; -static int cached_disp_modiff; -static int cached_disp_overlay_modiff; +/* How many characters forward to search for a display property or + display string. Enough for a screenful of 100 lines x 50 + characters in a line. */ +#define MAX_DISP_SCAN 5000 /* Return the character position of a display string at or after position specified by POSITION. If no display string exists at or @@ -3152,57 +3149,33 @@ on a GUI frame. */ EMACS_INT compute_display_string_pos (struct text_pos *position, - struct bidi_string_data *string, int frame_window_p) + struct bidi_string_data *string, + int frame_window_p, int *disp_prop_p) { /* OBJECT = nil means current buffer. */ Lisp_Object object = (string && STRINGP (string->lstring)) ? string->lstring : Qnil; - Lisp_Object pos, spec; + Lisp_Object pos, spec, limpos; int string_p = (string && (STRINGP (string->lstring) || string->s)); EMACS_INT eob = string_p ? string->schars : ZV; EMACS_INT begb = string_p ? 0 : BEGV; EMACS_INT bufpos, charpos = CHARPOS (*position); + EMACS_INT lim = + (charpos < eob - MAX_DISP_SCAN) ? charpos + MAX_DISP_SCAN : eob; struct text_pos tpos; struct buffer *b; + *disp_prop_p = 1; + if (charpos >= eob /* We don't support display properties whose values are strings that have display string properties. */ || string->from_disp_str /* C strings cannot have display properties. */ || (string->s && !STRINGP (object))) - return eob; - - /* Check the cached values. */ - if (!STRINGP (object)) { - if (NILP (object)) - b = current_buffer; - else - b = XBUFFER (object); - if (b == cached_disp_buffer - && BUF_MODIFF (b) == cached_disp_modiff - && BUF_OVERLAY_MODIFF (b) == cached_disp_overlay_modiff - && !b->clip_changed) - { - if (cached_prev_pos >= 0 - && cached_prev_pos < charpos && charpos <= cached_disp_pos) - return cached_disp_pos; - /* Handle overstepping either end of the known interval. */ - if (charpos > cached_disp_pos) - cached_prev_pos = cached_disp_pos; - else /* charpos <= cached_prev_pos */ - cached_prev_pos = max (charpos - 1, 0); - } - - /* Record new values in the cache. */ - if (b != cached_disp_buffer) - { - cached_disp_buffer = b; - cached_prev_pos = max (charpos - 1, 0); - } - cached_disp_modiff = BUF_MODIFF (b); - cached_disp_overlay_modiff = BUF_OVERLAY_MODIFF (b); + *disp_prop_p = 0; + return eob; } /* If the character at CHARPOS is where the display string begins, @@ -3221,22 +3194,24 @@ && handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos, frame_window_p)) { - if (!STRINGP (object)) - cached_disp_pos = charpos; return charpos; } /* Look forward for the first character with a `display' property that will replace the underlying text when displayed. */ + limpos = make_number (lim); do { - pos = Fnext_single_char_property_change (pos, Qdisplay, object, Qnil); + pos = Fnext_single_char_property_change (pos, Qdisplay, object, limpos); CHARPOS (tpos) = XFASTINT (pos); + if (CHARPOS (tpos) >= lim) + { + *disp_prop_p = 0; + break; + } if (STRINGP (object)) BYTEPOS (tpos) = string_char_to_byte (object, CHARPOS (tpos)); else BYTEPOS (tpos) = CHAR_TO_BYTE (CHARPOS (tpos)); - if (CHARPOS (tpos) >= eob) - break; spec = Fget_char_property (pos, Qdisplay, object); if (!STRINGP (object)) bufpos = CHARPOS (tpos); @@ -3244,8 +3219,6 @@ || !handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos, frame_window_p)); - if (!STRINGP (object)) - cached_disp_pos = CHARPOS (tpos); return CHARPOS (tpos); } ------------------------------------------------------------ revno: 105386 fixes bug(s): http://debbugs.gnu.org/6117 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 21:05:04 +0200 message: Use different faces for marked and flagged files in dired diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 18:49:12 +0000 +++ lisp/ChangeLog 2011-08-02 19:05:04 +0000 @@ -1,5 +1,8 @@ 2011-08-02 Lars Magne Ingebrigtsen + * dired.el (dired-flagged): Use different faces for marked and + flagged files (bug#6117). + * emacs-lisp/cl-macs.el (dolist): Mention that there's a nil block (bug#4433). === modified file 'lisp/dired.el' --- lisp/dired.el 2011-07-30 10:18:37 +0000 +++ lisp/dired.el 2011-08-02 19:05:04 +0000 @@ -350,7 +350,7 @@ "Face name used for marked files.") (defface dired-flagged - '((t (:inherit font-lock-warning-face))) + '((t (:inherit font-lock-variable-name-face))) "Face used for files flagged for deletion." :group 'dired-faces :version "22.1") ------------------------------------------------------------ revno: 105385 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 20:49:12 +0200 message: dolist doc fix. (dolist): Mention that there's a nil block diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 15:59:31 +0000 +++ lisp/ChangeLog 2011-08-02 18:49:12 +0000 @@ -1,5 +1,8 @@ 2011-08-02 Lars Magne Ingebrigtsen + * emacs-lisp/cl-macs.el (dolist): Mention that there's a nil block + (bug#4433). + * ido.el (ido-mode): Switch off the message if called non-interactively. === modified file 'lisp/emacs-lisp/cl-macs.el' --- lisp/emacs-lisp/cl-macs.el 2011-07-16 15:52:46 +0000 +++ lisp/emacs-lisp/cl-macs.el 2011-08-02 18:49:12 +0000 @@ -1233,6 +1233,7 @@ "Loop over a list. Evaluate BODY with VAR bound to each `car' from LIST, in turn. Then evaluate RESULT to get return value, default nil. +An implicit nil block is established around the loop. \(fn (VAR LIST [RESULT]) BODY...)" (let ((temp (make-symbol "--cl-dolist-temp--"))) ------------------------------------------------------------ revno: 105384 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2011-08-02 12:02:52 -0400 message: * src/keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-02 15:27:38 +0000 +++ src/ChangeLog 2011-08-02 16:02:52 +0000 @@ -1,3 +1,7 @@ +2011-08-02 Stefan Monnier + + * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE. + 2010-12-03 Don March * keymap.c (Fdefine_key): Fix non-prefix key error message when === modified file 'src/keymap.c' --- src/keymap.c 2011-08-02 15:27:38 +0000 +++ src/keymap.c 2011-08-02 16:02:52 +0000 @@ -1217,16 +1217,9 @@ keymap = get_keymap (cmd, 0, 1); if (!CONSP (keymap)) { - char trailing_esc[5]; - if (c == meta_prefix_char && metized) - { - if (idx == 0) - strcpy(trailing_esc, "ESC"); - else - strcpy(trailing_esc, " ESC"); - } - else - strcpy(trailing_esc, ""); + const char *trailing_esc = ((EQ (c, meta_prefix_char) && metized) + ? (idx == 0 ? "ESC" : " ESC") + : ""); /* We must use Fkey_description rather than just passing key to error; key might be a vector, not a string. */ ------------------------------------------------------------ revno: 105383 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 17:59:31 +0200 message: (ido-mode): Switch off the message if called non-interactively. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 15:57:35 +0000 +++ lisp/ChangeLog 2011-08-02 15:59:31 +0000 @@ -1,5 +1,8 @@ 2011-08-02 Lars Magne Ingebrigtsen + * ido.el (ido-mode): Switch off the message if called + non-interactively. + * mail/smtpmail.el (smtpmail-query-smtp-server): Try port 25 before 587, since it appears that that's more likely to work for more people. === modified file 'lisp/ido.el' --- lisp/ido.el 2011-05-23 17:57:17 +0000 +++ lisp/ido.el 2011-08-02 15:59:31 +0000 @@ -1557,7 +1557,8 @@ (setq ido-minor-mode-map-entry (cons 'ido-mode map)) (add-to-list 'minor-mode-map-alist ido-minor-mode-map-entry)))) - (message "Ido mode %s" (if ido-mode "enabled" "disabled"))) + (when (called-interactively-p 'any) + (message "Ido mode %s" (if ido-mode "enabled" "disabled")))) ;;; IDO KEYMAP ------------------------------------------------------------ revno: 105382 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 17:57:35 +0200 message: Prefer port smtp over port 587 when sending mail. * mail/smtpmail.el (smtpmail-query-smtp-server): Try port 25 before 587, since it appears that that's more likely to work for more people. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 15:46:07 +0000 +++ lisp/ChangeLog 2011-08-02 15:57:35 +0000 @@ -1,5 +1,9 @@ 2011-08-02 Lars Magne Ingebrigtsen + * mail/smtpmail.el (smtpmail-query-smtp-server): Try port 25 + before 587, since it appears that that's more likely to work for + more people. + * cus-edit.el (custom-file): When running under emacs -q, always refuse to save the customisations, even if the .emacs file doesn't exist. === modified file 'lisp/mail/smtpmail.el' --- lisp/mail/smtpmail.el 2011-07-17 00:45:56 +0000 +++ lisp/mail/smtpmail.el 2011-08-02 15:57:35 +0000 @@ -589,7 +589,7 @@ (defun smtpmail-query-smtp-server () (let ((server (read-string "Outgoing SMTP mail server: ")) - (ports '(587 "smtp")) + (ports '("smtp" 587)) stream port) (when (and smtpmail-smtp-server (not (member smtpmail-smtp-server ports))) ------------------------------------------------------------ revno: 105381 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 17:46:07 +0200 message: When running under emacs -q, always refuse to save the customisations, even if the .emacs file doesn't exist. This makes it easier to reproduce testing runs under "emacs -Q" more reliably. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 15:21:07 +0000 +++ lisp/ChangeLog 2011-08-02 15:46:07 +0000 @@ -1,5 +1,9 @@ 2011-08-02 Lars Magne Ingebrigtsen + * cus-edit.el (custom-file): When running under emacs -q, always + refuse to save the customisations, even if the .emacs file doesn't + exist. + * info.el: Remove the `Info-beginning-of-buffer' function (bug#8325). === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2011-07-11 20:12:07 +0000 +++ lisp/cus-edit.el 2011-08-02 15:46:07 +0000 @@ -4409,25 +4409,14 @@ (defun custom-file (&optional no-error) "Return the file name for saving customizations." - (let ((file - (or custom-file - (let ((user-init-file user-init-file) - (default-init-file - (if (eq system-type 'ms-dos) "~/_emacs" "~/.emacs"))) - (when (null user-init-file) - (if (or (file-exists-p default-init-file) - (and (eq system-type 'windows-nt) - (file-exists-p "~/_emacs"))) - ;; Started with -q, i.e. the file containing - ;; Custom settings hasn't been read. Saving - ;; settings there would overwrite other settings. - (if no-error - nil - (error "Saving settings from \"emacs -q\" would overwrite existing customizations")) - (setq user-init-file default-init-file))) - user-init-file)))) - (and file - (file-chase-links file)))) + (if (null user-init-file) + ;; Started with -q, i.e. the file containing Custom settings + ;; hasn't been read. Saving settings there won't make much + ;; sense. + (if no-error + nil + (error "Saving settings from \"emacs -q\" would overwrite existing customizations")) + (file-chase-links (or custom-file user-init-file)))) ;; If recentf-mode is non-nil, this is defined. (declare-function recentf-expand-file-name "recentf" (name)) ------------------------------------------------------------ revno: 105380 author: Don March committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 17:27:38 +0200 message: Fix non-prefix key error message when last character M-[char] is translated to ESC [char] diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-02 03:50:38 +0000 +++ src/ChangeLog 2011-08-02 15:27:38 +0000 @@ -1,3 +1,8 @@ +2010-12-03 Don March + + * keymap.c (Fdefine_key): Fix non-prefix key error message when + last character M-[char] is translated to ESC [char] (bug#7541). + 2011-08-02 Kenichi Handa * lisp.h (uniprop_table): Extern it. === modified file 'src/keymap.c' --- src/keymap.c 2011-07-12 21:12:36 +0000 +++ src/keymap.c 2011-08-02 15:27:38 +0000 @@ -1216,13 +1216,27 @@ keymap = get_keymap (cmd, 0, 1); if (!CONSP (keymap)) - /* We must use Fkey_description rather than just passing key to - error; key might be a vector, not a string. */ - error ("Key sequence %s starts with non-prefix key %s", - SDATA (Fkey_description (key, Qnil)), - SDATA (Fkey_description (Fsubstring (key, make_number (0), - make_number (idx)), - Qnil))); + { + char trailing_esc[5]; + if (c == meta_prefix_char && metized) + { + if (idx == 0) + strcpy(trailing_esc, "ESC"); + else + strcpy(trailing_esc, " ESC"); + } + else + strcpy(trailing_esc, ""); + + /* We must use Fkey_description rather than just passing key to + error; key might be a vector, not a string. */ + error ("Key sequence %s starts with non-prefix key %s%s", + SDATA (Fkey_description (key, Qnil)), + SDATA (Fkey_description (Fsubstring (key, make_number (0), + make_number (idx)), + Qnil)), + trailing_esc); + } } } ------------------------------------------------------------ revno: 105379 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 17:21:07 +0200 message: * info.el: Remove the `Info-beginning-of-buffer' function diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-02 13:34:05 +0000 +++ lisp/ChangeLog 2011-08-02 15:21:07 +0000 @@ -1,5 +1,8 @@ 2011-08-02 Lars Magne Ingebrigtsen + * info.el: Remove the `Info-beginning-of-buffer' function + (bug#8325). + * net/network-stream.el (network-stream-open-starttls): Use `starttls-available-p' to see whether starttls.el can be used. === modified file 'lisp/info.el' --- lisp/info.el 2011-07-15 17:18:53 +0000 +++ lisp/info.el 2011-08-02 15:21:07 +0000 @@ -2789,11 +2789,6 @@ (goto-char (point-max))))) (t (error "No previous nodes")))) -(defun Info-beginning-of-buffer () - "Go to the beginnning of the buffer." - (interactive) - (goto-char (point-min))) - (defun Info-scroll-up () "Scroll one screenful forward in Info, considering all nodes as one sequence. Once you scroll far enough in a node that its menu appears on the screen @@ -3655,7 +3650,7 @@ (defvar Info-mode-map (let ((map (make-keymap))) (suppress-keymap map) - (define-key map "." 'Info-beginning-of-buffer) + (define-key map "." 'beginning-of-buffer) (define-key map " " 'Info-scroll-up) (define-key map "\C-m" 'Info-follow-nearest-node) (define-key map "\t" 'Info-next-reference) @@ -3676,8 +3671,8 @@ (define-key map "[" 'Info-backward-node) (define-key map "<" 'Info-top-node) (define-key map ">" 'Info-final-node) - (define-key map "b" 'Info-beginning-of-buffer) - (put 'Info-beginning-of-buffer :advertised-binding "b") + (define-key map "b" 'beginning-of-buffer) + (put 'beginning-of-buffer :advertised-binding "b") (define-key map "d" 'Info-directory) (define-key map "e" 'Info-edit) (define-key map "f" 'Info-follow-reference) @@ -3731,7 +3726,7 @@ :help "Go backward one node, considering all as a sequence"] ["Forward" Info-forward-node :help "Go forward one node, considering all as a sequence"] - ["Beginning" Info-beginning-of-buffer + ["Beginning" beginning-of-buffer :help "Go to beginning of this node"] ["Top" Info-top-node :help "Go to top node of file"] @@ -3937,7 +3932,7 @@ \\[Info-scroll-down] Normally, scroll backward. If the beginning of the buffer is already visible, try to go to the previous menu entry, or up if there is none. -\\[Info-beginning-of-buffer] Go to beginning of node. +\\[beginning-of-buffer] Go to beginning of node. Advanced commands: \\[Info-search] Search through this Info file for specified regexp, ------------------------------------------------------------ revno: 105378 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 15:34:05 +0200 message: Use `starttls-available-p' to see whether starttls.el can be used. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-01 18:10:58 +0000 +++ lisp/ChangeLog 2011-08-02 13:34:05 +0000 @@ -1,3 +1,8 @@ +2011-08-02 Lars Magne Ingebrigtsen + + * net/network-stream.el (network-stream-open-starttls): Use + `starttls-available-p' to see whether starttls.el can be used. + 2011-08-01 Martin Rudalics * window.el (display-buffer-in-window): Don't set dedicated status === modified file 'lisp/net/network-stream.el' --- lisp/net/network-stream.el 2011-07-07 15:14:17 +0000 +++ lisp/net/network-stream.el 2011-08-02 13:34:05 +0000 @@ -230,7 +230,7 @@ (or builtin-starttls (and (or require-tls (plist-get parameters :use-starttls-if-possible)) - (executable-find "gnutls-cli"))) + (starttls-available-p))) (not (eq (plist-get parameters :type) 'plain))) ;; If using external STARTTLS, drop this connection and start ;; anew with `starttls-open-stream'. ------------------------------------------------------------ revno: 105377 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Tue 2011-08-02 15:30:46 +0200 message: (starttls-available-p): Renamed from `starttls-any-program-available' and changed return convention. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-07-31 22:15:44 +0000 +++ lisp/gnus/ChangeLog 2011-08-02 13:30:46 +0000 @@ -1,3 +1,8 @@ +2011-08-02 Lars Magne Ingebrigtsen + + * starttls.el (starttls-available-p): Renamed from + `starttls-any-program-available' and changed return convention. + 2011-07-31 Lars Ingebrigtsen * nnmaildir.el (nnmaildir-request-accept-article): Don't call === modified file 'lisp/gnus/starttls.el' --- lisp/gnus/starttls.el 2011-01-25 04:08:28 +0000 +++ lisp/gnus/starttls.el 2011-08-02 13:30:46 +0000 @@ -295,18 +295,11 @@ (starttls-set-process-query-on-exit-flag process nil) process))) -(defun starttls-any-program-available () - (let ((program (if starttls-use-gnutls - starttls-gnutls-program - starttls-program))) - (condition-case () - (progn - (call-process program) - program) - (error (progn - (message "No STARTTLS program was available (tried '%s')" - program) - nil))))) +(defun starttls-available-p () + "Say whether the STARTTLS programs are available." + (executable-find (if starttls-use-gnutls + starttls-gnutls-program + starttls-program))) (provide 'starttls) ------------------------------------------------------------ revno: 105376 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Tue 2011-08-02 12:51:14 +0900 message: Make uniprop_table non-static. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-08-01 17:34:04 +0000 +++ src/ChangeLog 2011-08-02 03:50:38 +0000 @@ -1,3 +1,9 @@ +2011-08-02 Kenichi Handa + + * lisp.h (uniprop_table): Extern it. + + * chartab.c (uniprop_table): Make it non-static. + 2011-08-01 Eli Zaretskii * xdisp.c (forward_to_next_line_start): Accept additional argument === modified file 'src/chartab.c' --- src/chartab.c 2011-07-10 04:54:04 +0000 +++ src/chartab.c 2011-08-02 03:49:09 +0000 @@ -1310,7 +1310,7 @@ function may load a Lisp file and thus may cause garbage-collection. */ -static Lisp_Object +Lisp_Object uniprop_table (Lisp_Object prop) { Lisp_Object val, table, result; === modified file 'src/lisp.h' --- src/lisp.h 2011-07-08 00:51:25 +0000 +++ src/lisp.h 2011-08-02 03:49:09 +0000 @@ -2861,6 +2861,7 @@ Lisp_Object, Lisp_Object, Lisp_Object, struct charset *, unsigned, unsigned); +extern Lisp_Object uniprop_table (Lisp_Object); extern void syms_of_chartab (void); /* Defined in print.c */ ------------------------------------------------------------ revno: 105375 committer: martin rudalics branch nick: trunk timestamp: Mon 2011-08-01 20:10:58 +0200 message: Don't set dedicated status for reused normal windows (Bug#9215). * window.el (display-buffer-in-window): Don't set dedicated status of window here (Bug#9215). (display-buffer-pop-up-window, display-buffer-pop-up-frame) (display-buffer-pop-up-side-window) (display-buffer-in-side-window): Set dedicated status of window here. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-01 15:54:09 +0000 +++ lisp/ChangeLog 2011-08-01 18:10:58 +0000 @@ -1,3 +1,12 @@ +2011-08-01 Martin Rudalics + + * window.el (display-buffer-in-window): Don't set dedicated status + of window here (Bug#9215). + (display-buffer-pop-up-window, display-buffer-pop-up-frame) + (display-buffer-pop-up-side-window) + (display-buffer-in-side-window): Set dedicated status of window + here. + 2011-08-01 Stefan Monnier * emacs-lisp/package.el (package-generate-autoloads): Load autoloads === modified file 'lisp/window.el' --- lisp/window.el 2011-07-21 08:27:44 +0000 +++ lisp/window.el 2011-08-01 18:10:58 +0000 @@ -4715,15 +4715,12 @@ (setq window (window-normalize-live-window window)) (let* ((old-frame (selected-frame)) (new-frame (window-frame window)) - (dedicate (cdr (assq 'dedicate specifiers))) (no-other-window (cdr (assq 'no-other-window specifiers)))) ;; Show BUFFER in WINDOW. (unless (eq buffer (window-buffer window)) ;; If we show another buffer in WINDOW, undedicate it first. (set-window-dedicated-p window nil)) (set-window-buffer window buffer) - (when dedicate - (set-window-dedicated-p window dedicate)) (when no-other-window (set-window-parameter window 'no-other-window t)) (unless (or (eq old-frame new-frame) @@ -4965,7 +4962,7 @@ (selected-window (selected-window)) root new new-parent) - ;; We are in an atomic window. + ;; We are in an atomic window. (when (and (window-parameter window 'window-atom) (not nest)) ;; Split the root window. (setq window (window-atom-root window))) @@ -5059,6 +5056,10 @@ (setq display-buffer-window (cons window 'new-window)) ;; Install BUFFER in the new window. (display-buffer-in-window buffer window specifiers) + (let ((dedicate (cdr (assq 'dedicate specifiers)))) + (when dedicate + ;; Dedicate window to buffer. + (set-window-dedicated-p window dedicate))) ;; Adjust sizes if asked for (for `fit-window-to-buffer' ;; and friends BUFFER must be already shown in the new ;; window). @@ -5094,7 +5095,12 @@ (set-window-parameter window 'quit-restore (list 'new-frame buffer selected-window)) (setq display-buffer-window (cons window 'new-frame)) - (display-buffer-in-window buffer window specifiers)))))) + (display-buffer-in-window buffer window specifiers) + (let ((dedicate (cdr (assq 'dedicate specifiers)))) + (when dedicate + ;; Dedicate window to buffer. + (set-window-dedicated-p window dedicate))) + window))))) (defun display-buffer-pop-up-side-window (buffer side slot &optional specifiers) "Display BUFFER in a new window on SIDE of the selected frame. @@ -5142,6 +5148,10 @@ (setq display-buffer-window (cons window 'new-window)) ;; Install BUFFER in new window. (display-buffer-in-window buffer window specifiers) + (let ((dedicate (cdr (assq 'dedicate specifiers)))) + (when dedicate + ;; Dedicate window to buffer. + (set-window-dedicated-p window dedicate))) ;; Adjust sizes of new window if asked for. (display-buffer-set-height window specifiers) (display-buffer-set-width window specifiers) @@ -5282,6 +5292,10 @@ (set-window-parameter window 'window-slot slot)) ;; Install BUFFER in the window. (display-buffer-in-window buffer window specifiers) + (let ((dedicate (cdr (assq 'dedicate specifiers)))) + (when dedicate + ;; Dedicate window to buffer. + (set-window-dedicated-p window dedicate))) (when new-window ;; Adjust sizes if asked for (for `fit-window-to-buffer' and ;; friends BUFFER must be already shown in the new window). ------------------------------------------------------------ revno: 105374 fixes bug(s): http://debbugs.gnu.org/9212 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-08-01 20:59:35 +0300 message: Fix last change for bug#9212. diff: === modified file 'src/xdisp.c' --- src/xdisp.c 2011-08-01 17:34:04 +0000 +++ src/xdisp.c 2011-08-01 17:59:35 +0000 @@ -5730,29 +5730,36 @@ { if (IT_STRING_CHARPOS (*it) > 0) { - --IT_STRING_CHARPOS (*it); - --IT_STRING_BYTEPOS (*it); - if (it->bidi_p) + if (!it->bidi_p) + { + --IT_STRING_CHARPOS (*it); + --IT_STRING_BYTEPOS (*it); + } + else { /* We need to restore the bidi iterator to the state - it had on the newline. */ + it had on the newline, and resync the IT's + position with that. */ it->bidi_it = bidi_it_prev; - xassert (IT_STRING_CHARPOS (*it) == it->bidi_it.charpos - && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos); + IT_STRING_CHARPOS (*it) = it->bidi_it.charpos; + IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos; } } } else if (IT_CHARPOS (*it) > BEGV) { - --IT_CHARPOS (*it); - --IT_BYTEPOS (*it); - if (it->bidi_p) + if (!it->bidi_p) + { + --IT_CHARPOS (*it); + --IT_BYTEPOS (*it); + } + else { /* We need to restore the bidi iterator to the state it - had on the newline. */ + had on the newline and resync IT with that. */ it->bidi_it = bidi_it_prev; - xassert (IT_CHARPOS (*it) == it->bidi_it.charpos - && IT_BYTEPOS (*it) == it->bidi_it.bytepos); + IT_CHARPOS (*it) = it->bidi_it.charpos; + IT_BYTEPOS (*it) = it->bidi_it.bytepos; } reseat (it, it->current.pos, 0); } ------------------------------------------------------------ revno: 105373 fixes bug(s): http://debbugs.gnu.org/9212 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2011-08-01 20:34:04 +0300 message: Fix bug #9212 with selective-display under bidi. src/xdisp.c (forward_to_next_line_start): Accept additional argument BIDI_IT_PREV, and store into it the state of the bidi iterator had on the newline. (reseat_at_next_visible_line_start): Use the bidi iterator state returned by forward_to_next_line_start to restore the state of it->bidi_it after backing up to previous newline. (Bug#9212) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-07-30 13:20:04 +0000 +++ src/ChangeLog 2011-08-01 17:34:04 +0000 @@ -1,3 +1,12 @@ +2011-08-01 Eli Zaretskii + + * xdisp.c (forward_to_next_line_start): Accept additional argument + BIDI_IT_PREV, and store into it the state of the bidi iterator had + on the newline. + (reseat_at_next_visible_line_start): Use the bidi iterator state + returned by forward_to_next_line_start to restore the state of + it->bidi_it after backing up to previous newline. (Bug#9212) + 2011-07-30 Andreas Schwab * regex.c (re_comp): Protoize. === modified file 'src/xdisp.c' --- src/xdisp.c 2011-07-28 06:44:45 +0000 +++ src/xdisp.c 2011-08-01 17:34:04 +0000 @@ -899,7 +899,7 @@ static int init_to_row_end (struct it *, struct window *, struct glyph_row *); static void back_to_previous_line_start (struct it *); -static int forward_to_next_line_start (struct it *, int *); +static int forward_to_next_line_start (struct it *, int *, struct bidi_it *); static struct text_pos string_pos_nchars_ahead (struct text_pos, Lisp_Object, EMACS_INT); static struct text_pos string_pos (EMACS_INT, Lisp_Object); @@ -5494,6 +5494,9 @@ continuously over the text). Otherwise, don't change the value of *SKIPPED_P. + If BIDI_IT_PREV is non-NULL, store into it the state of the bidi + iterator on the newline, if it was found. + Newlines may come from buffer text, overlay strings, or strings displayed via the `display' property. That's the reason we can't simply use find_next_newline_no_quit. @@ -5506,7 +5509,8 @@ leads to wrong cursor motion. */ static int -forward_to_next_line_start (struct it *it, int *skipped_p) +forward_to_next_line_start (struct it *it, int *skipped_p, + struct bidi_it *bidi_it_prev) { EMACS_INT old_selective; int newline_found_p, n; @@ -5518,6 +5522,8 @@ && it->c == '\n' && CHARPOS (it->position) == IT_CHARPOS (*it)) { + if (it->bidi_p && bidi_it_prev) + *bidi_it_prev = it->bidi_it; set_iterator_to_next (it, 0); it->c = 0; return 1; @@ -5539,6 +5545,8 @@ if (!get_next_display_element (it)) return 0; newline_found_p = it->what == IT_CHARACTER && it->c == '\n'; + if (newline_found_p && it->bidi_p && bidi_it_prev) + *bidi_it_prev = it->bidi_it; set_iterator_to_next (it, 0); } @@ -5573,6 +5581,8 @@ && !newline_found_p) { newline_found_p = ITERATOR_AT_END_OF_LINE_P (it); + if (newline_found_p && it->bidi_p && bidi_it_prev) + *bidi_it_prev = it->bidi_it; set_iterator_to_next (it, 0); } } @@ -5696,8 +5706,9 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p) { int newline_found_p, skipped_p = 0; + struct bidi_it bidi_it_prev; - newline_found_p = forward_to_next_line_start (it, &skipped_p); + newline_found_p = forward_to_next_line_start (it, &skipped_p, &bidi_it_prev); /* Skip over lines that are invisible because they are indented more than the value of IT->selective. */ @@ -5708,7 +5719,8 @@ { xassert (IT_BYTEPOS (*it) == BEGV || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); - newline_found_p = forward_to_next_line_start (it, &skipped_p); + newline_found_p = + forward_to_next_line_start (it, &skipped_p, &bidi_it_prev); } /* Position on the newline if that's what's requested. */ @@ -5718,29 +5730,30 @@ { if (IT_STRING_CHARPOS (*it) > 0) { - if (!it->bidi_p) + --IT_STRING_CHARPOS (*it); + --IT_STRING_BYTEPOS (*it); + if (it->bidi_p) { - --IT_STRING_CHARPOS (*it); - --IT_STRING_BYTEPOS (*it); + /* We need to restore the bidi iterator to the state + it had on the newline. */ + it->bidi_it = bidi_it_prev; + xassert (IT_STRING_CHARPOS (*it) == it->bidi_it.charpos + && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos); } - else - /* Setting this flag will cause - bidi_move_to_visually_next not to advance, but - instead deliver the current character (newline), - which is what the ON_NEWLINE_P flag wants. */ - it->bidi_it.first_elt = 1; } } else if (IT_CHARPOS (*it) > BEGV) { - if (!it->bidi_p) + --IT_CHARPOS (*it); + --IT_BYTEPOS (*it); + if (it->bidi_p) { - --IT_CHARPOS (*it); - --IT_BYTEPOS (*it); + /* We need to restore the bidi iterator to the state it + had on the newline. */ + it->bidi_it = bidi_it_prev; + xassert (IT_CHARPOS (*it) == it->bidi_it.charpos + && IT_BYTEPOS (*it) == it->bidi_it.bytepos); } - /* With bidi iteration, the call to `reseat' will cause - bidi_move_to_visually_next deliver the current character, - the newline, instead of advancing. */ reseat (it, it->current.pos, 0); } } ------------------------------------------------------------ revno: 105372 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2011-08-01 11:54:09 -0400 message: * lisp/emacs-lisp/package.el (package-generate-autoloads): Load autoloads before binding generated-autoload-file. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-08-01 12:30:18 +0000 +++ lisp/ChangeLog 2011-08-01 15:54:09 +0000 @@ -1,3 +1,8 @@ +2011-08-01 Stefan Monnier + + * emacs-lisp/package.el (package-generate-autoloads): Load autoloads + before binding generated-autoload-file. + 2011-08-01 Deniz Dogan * net/rcirc.el (rcirc-handler-333): Clarify docstring. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2011-04-24 20:32:23 +0000 +++ lisp/emacs-lisp/package.el 2011-08-01 15:54:09 +0000 @@ -570,11 +570,11 @@ file) (defun package-generate-autoloads (name pkg-dir) + (require 'autoload) ;Load before we let-bind generated-autoload-file! (let* ((auto-name (concat name "-autoloads.el")) (ignore-name (concat name "-pkg.el")) (generated-autoload-file (expand-file-name auto-name pkg-dir)) (version-control 'never)) - (require 'autoload) (unless (fboundp 'autoload-ensure-default-file) (package-autoload-ensure-default-file generated-autoload-file)) (update-directory-autoloads pkg-dir))) ------------------------------------------------------------ revno: 105371 committer: Deniz Dogan branch nick: emacs-trunk timestamp: Mon 2011-08-01 14:30:18 +0200 message: * lisp/net/rcirc.el (rcirc-handler-333): Clarify docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-07-30 14:57:12 +0000 +++ lisp/ChangeLog 2011-08-01 12:30:18 +0000 @@ -1,3 +1,7 @@ +2011-08-01 Deniz Dogan + + * net/rcirc.el (rcirc-handler-333): Clarify docstring. + 2011-07-30 Michael Albinus Sync with Tramp 2.2.2. === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2011-07-27 03:44:45 +0000 +++ lisp/net/rcirc.el 2011-08-01 12:30:18 +0000 @@ -2695,7 +2695,8 @@ (setq rcirc-topic (caddr args))))) (defun rcirc-handler-333 (process sender args text) - "Not in rfc1459.txt" + "333 says who set the topic and when. +Not in rfc1459.txt" (let ((buffer (or (rcirc-get-buffer process (cadr args)) (rcirc-get-temp-buffer-create process (cadr args))))) (with-current-buffer buffer ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions. .