emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117335: Merge from emacs-24; up to r117245


From: Glenn Morris
Subject: [Emacs-diffs] trunk r117335: Merge from emacs-24; up to r117245
Date: Sun, 15 Jun 2014 00:07:14 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117335 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2014-06-14 17:06:30 -0700
message:
  Merge from emacs-24; up to r117245
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/commands.texi      
commands.texi-20091113204419-o5vbwnq5f7feedwu-6165
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
  etc/PROBLEMS                   problems-20091113204419-o5vbwnq5f7feedwu-1498
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/bindings.el               
bindings.el-20091113204419-o5vbwnq5f7feedwu-1013
  lisp/emacs-lisp/smie.el        smie.el-20100517192034-xap3ihmey43772vj-1
  lisp/progmodes/cc-langs.el     cclangs.el-20091113204419-o5vbwnq5f7feedwu-1228
  lisp/subr.el                   subr.el-20091113204419-o5vbwnq5f7feedwu-151
  lisp/term/xterm.el             xterm.el-20091113204419-o5vbwnq5f7feedwu-884
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/alloc.c                    alloc.c-20091113204419-o5vbwnq5f7feedwu-252
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-06-13 23:05:00 +0000
+++ b/ChangeLog 2014-06-15 00:06:30 +0000
@@ -1,3 +1,11 @@
+2014-06-15  Paul Eggert  <address@hidden>
+
+       Port part of the AIX fix to Solaris (Bug#17598).
+       * configure.ac (_REENTRANT): Define on Solaris if HAVE_PTHREAD.
+       This ports part of the recent AIX fixes to Solaris.  It is needed
+       for the same reason that _THREAD_SAFE is needed on AIX, e.g., to
+       make sure that each thread has its own 'errno'.
+
 2014-06-13  Glenn Morris  <address@hidden>
 
        * Makefile.in (CC, CFLAGS, LDFLAGS, CPPFLAGS, abs_top_srcdir):

=== modified file 'configure.ac'
--- a/configure.ac      2014-06-11 17:51:27 +0000
+++ b/configure.ac      2014-06-15 00:06:30 +0000
@@ -2091,11 +2091,15 @@
      # Some systems optimize for single-threaded programs by default, and
      # need special flags to disable these optimizations. For example, the
      # definition of 'errno' in <errno.h>.
-     if test "$opsys" = aix4-2; then
-       AC_DEFINE([_THREAD_SAFE], [1],
-         [Define to 1 if your system requires this in multithreaded code.])
-     fi])
-  if test "X$LIBS" != "X$OLD_LIBS"; then
+     case $opsys in
+       sol*)
+         AC_DEFINE([_REENTRANT], 1,
+       [Define to 1 if your system requires this in multithreaded code.]);;
+       aix4-2)
+         AC_DEFINE([_THREAD_SAFE], 1,
+       [Define to 1 if your system requires this in multithreaded code.]);;
+     esac])
+ if test "X$LIBS" != "X$OLD_LIBS"; then
     eval LIB_PTHREAD=\$ac_cv_search_$emacs_pthread_function
   fi
   LIBS=$OLD_LIBS

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2014-06-10 02:11:38 +0000
+++ b/doc/lispref/ChangeLog     2014-06-15 00:06:30 +0000
@@ -1,3 +1,8 @@
+2014-06-15  Eli Zaretskii  <address@hidden>
+
+       * commands.texi (Accessing Mouse): Improve the wording of the
+       posn-col-row documentation.  (Bug#17768)
+
 2014-06-10  Glenn Morris  <address@hidden>
 
        * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.

=== modified file 'doc/lispref/commands.texi'
--- a/doc/lispref/commands.texi 2014-06-07 14:29:48 +0000
+++ b/doc/lispref/commands.texi 2014-06-15 00:06:30 +0000
@@ -2053,23 +2053,24 @@
 @defun posn-col-row position
 This function returns a cons cell @code{(@var{col} .  @var{row})},
 containing the estimated column and row corresponding to buffer
-position @var{position}.  The return value is given in units of the
-frame's default character width and height, as computed from the
address@hidden and @var{y} values corresponding to @var{position}.  (So, if
-the actual characters have non-default sizes, the actual row and
-column may differ from these computed values.)
+position in @var{position}.  The return value is given in units of the
+frame's default character width and default line height (including
+spacing), as computed from the @var{x} and @var{y} values
+corresponding to @var{position}.  (So, if the actual characters have
+non-default sizes, the actual row and column may differ from these
+computed values.)
 
 Note that @var{row} is counted from the top of the text area.  If the
-window possesses a header line (@pxref{Header Lines}), it is
address@hidden counted as the first line.
+window given by @var{position} possesses a header line (@pxref{Header
+Lines}), it is @emph{not} included in the @var{row} count.
 @end defun
 
 @defun posn-actual-col-row position
 Return the actual row and column in @var{position}, as a cons cell
 @code{(@var{col} . @var{row})}.  The values are the actual row and
-column numbers in the window.  @xref{Click Events}, for details.  It
-returns @code{nil} if @var{position} does not include actual positions
-values.
+column numbers in the window given by @var{position}.  @xref{Click
+Events}, for details.  The function returns @code{nil} if
address@hidden does not include actual position values.
 @end defun
 
 @defun posn-string position

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2014-06-13 18:09:06 +0000
+++ b/etc/NEWS  2014-06-15 00:06:30 +0000
@@ -309,16 +309,7 @@
 *** The function `quail-help' is no longer an interactive command.
 Use `C-h C-\' (`describe-input-method') instead.
 
-** ImageMagick
-
-*** ImageMagick images now support the :max-width and :max-height keywords.
-
-*** When using `create-image' with image data, you can pass a :format
-attribute (via the property-list argument) in order to help
-ImageMagick detect the image type.  The value should be a MIME
-content-type that is found in the new variable `image-format-suffixes'.
-
-** Frame and window changes
+** Frame and window handling
 
 *** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized',
 bound to <f11> and M-<f10>, respectively.
@@ -416,7 +407,7 @@
 caller of `display-buffer' is ready to handle the case of not displaying
 the buffer in a window.
 
-** Lisp evaluation changes
+** Lisp evaluation
 
 *** `eval-defun' on an already defined defcustom calls the :set function,
 if there is one.
@@ -450,7 +441,7 @@
 
 * Editing Changes in Emacs 24.4
 
-** Indentation changes
+** Indentation
 
 *** `electric-indent-mode' is now enabled by default.
 Typing RET reindents the current line and indents the new line.
@@ -708,8 +699,7 @@
 *** New option `hi-lock-auto-select-face'.  When non-nil, hi-lock commands
 will cycle through faces in `hi-lock-face-defaults' without prompting.
 
-** Icomplete
-Icomplete is now more similar to Ido.
+** Icomplete is now more similar to Ido.
 
 *** Icomplete by default now applies to all forms of minibuffer completion.
 The variable `icomplete-with-completion-tables' (now a user option)
@@ -1066,8 +1056,8 @@
 
 * New Modes and Packages in Emacs 24.4
 
-** New package `eww' is a built-in web browser.
-(It is only available if Emacs is compiled with libxml2 support.)
+** New package eww.el provides a built-in web browser.
+This requires Emacs to have been compiled with libxml2 support.
 
 ** New package nadvice.el offers lighter-weight advice facilities.
 It is layered as:
@@ -1078,11 +1068,10 @@
 *** `advice-add'/`advice-remove' to add/remove a piece of advice on a named
 function, much like `defadvice' does.
 
-** New package frameset.el.
-It provides a set of operations to save a frameset (the state of all
-or a subset of the existing frames and windows, somewhat similar to a
-frame configuration), both in-session and persistently, and restore it
-at some point in the future.
+** New package frameset.el provides a set of operations to save a frameset
+(the state of all or a subset of the existing frames and windows, somewhat
+similar to a frame configuration), both in-session and persistently, and
+restore it at some point in the future.
 
 ** New package filenotify.el provides an interface for file system
 notifications.  It requires that Emacs be compiled with one of the
@@ -1092,9 +1081,9 @@
 display specified symbols as composed characters.  E.g., in Emacs Lisp mode,
 this replaces the string "lambda" with the Greek lambda character.
 
-** New minor mode `superword-mode'.
-This overrides the default word motion commands to treat "symbol_words"
-as a single word, similar to what `subword-mode' does.
+** New minor mode `superword-mode', which overrides the default word motion
+commands to treat "symbol_words" as a single word, similar to what
+`subword-mode' does.
 
 
 * Incompatible Lisp Changes in Emacs 24.4
@@ -1332,6 +1321,15 @@
 *** New functions `image-current-frame' and `image-show-frame' for getting
 and setting the current frame of a multi-frame image.
 
+** ImageMagick
+
+*** ImageMagick images now support the :max-width and :max-height keywords.
+
+*** When using `create-image' with image data, you can pass a :format
+attribute (via the property-list argument) in order to help
+ImageMagick detect the image type.  The value should be a MIME
+content-type that is found in the new variable `image-format-suffixes'.
+
 ** Revert and Autorevert
 
 *** If Emacs is compiled with file notification support, it uses notifications

=== modified file 'etc/PROBLEMS'
--- a/etc/PROBLEMS      2014-05-16 15:49:13 +0000
+++ b/etc/PROBLEMS      2014-06-15 00:06:30 +0000
@@ -159,7 +159,6 @@
 be fixed in ImageMagick 6.8.3-10.  See <URL:http://debbugs.gnu.org/13867>.
 
 ** Crashes when displaying GIF images in Emacs built with version
-
 libungif-4.1.0 are resolved by using version libungif-4.1.0b1.
 Configure checks for the correct version, but this problem could occur
 if a binary built against a shared libungif is run on a system with an

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-06-14 20:57:34 +0000
+++ b/lisp/ChangeLog    2014-06-15 00:06:30 +0000
@@ -1,6 +1,31 @@
-2014-06-14  Ron Schnell  <address@hidden>      
+2014-06-15  Glenn Morris  <address@hidden>
+
+       * progmodes/cc-langs.el: Require cl-lib.  (Bug#17463)
+       Replace delete-duplicates and mapcan by cl- versions throughout.
+       And cl-macroexpand-all by macroexpand-all.
+       (delete-duplicates, mapcan, cl-macroexpand-all): No need to declare.
+
+2014-06-15  Eli Zaretskii  <address@hidden>
+
+       * subr.el (posn-col-row): Doc fix.  (Bug#17768)
+
+2014-06-15  Juri Linkov  <address@hidden>
+
+       * bindings.el: Put `ascii-character' property on keypad keys
+       mapped to characters.  (Bug#17759)
+
+2014-06-15  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when
+       bumping forward into a closing paren (bug#17761).
+
+       * term/xterm.el (xterm--version-handler): Work around for OSX
+       Terminal.app (bug#17607).
+
+2014-06-14  Ron Schnell  <address@hidden>
+
        * play/dunnet.el If a lamp is in the room, you won't be eaten by a grue.
-       
+
 2014-06-13  Glenn Morris  <address@hidden>
 
        * Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el)

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2014-03-20 17:14:45 +0000
+++ b/lisp/bindings.el  2014-06-14 09:50:13 +0000
@@ -1075,10 +1075,14 @@
              (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
              (kp-add ?+) (kp-subtract ?-) (kp-multiply ?*) (kp-divide ?/))))
   (dolist (pair keys)
-    (dolist (mod modifiers)
-      (define-key function-key-map
-       (vector (append mod (list (nth 0 pair))))
-       (vector (append mod (list (nth 1 pair))))))))
+    (let ((keypad (nth 0 pair))
+         (normal (nth 1 pair)))
+      (when (characterp normal)
+       (put keypad 'ascii-character normal))
+      (dolist (mod modifiers)
+       (define-key function-key-map
+         (vector (append mod (list keypad)))
+         (vector (append mod (list normal))))))))
 
 (define-key function-key-map [backspace] [?\C-?])
 (define-key function-key-map [delete] [?\C-?])

=== modified file 'lisp/emacs-lisp/smie.el'
--- a/lisp/emacs-lisp/smie.el   2014-03-04 08:35:11 +0000
+++ b/lisp/emacs-lisp/smie.el   2014-06-13 15:31:17 +0000
@@ -709,7 +709,8 @@
                 (condition-case err
                     (progn (funcall next-sexp 1) nil)
                   (scan-error
-                   (let ((epos (nth 2 err)))
+                   (let* ((epos1 (nth 2 err))
+                          (epos (if (<= (point) epos1) (nth 3 err) epos1)))
                      (goto-char pos)
                      (throw 'return
                             (list t epos
@@ -1832,6 +1833,8 @@
                     (append smie-blink-matching-triggers
                             (delete-dups triggers)))))))
 
+(declare-function edebug-instrument-function "edebug" (func))
+
 (defun smie-edebug ()
   "Instrument the `smie-rules-function' for Edebug."
   (interactive)

=== modified file 'lisp/progmodes/cc-langs.el'
--- a/lisp/progmodes/cc-langs.el        2014-01-01 07:43:34 +0000
+++ b/lisp/progmodes/cc-langs.el        2014-06-14 23:54:39 +0000
@@ -130,7 +130,9 @@
 
 
 ;; This file is not always loaded.  See note above.
-(cc-external-require 'cl)
+;; Except it is always loaded - see bug#17463.
+;;;(cc-external-require 'cl)
+(require 'cl-lib)
 
 
 ;;; Setup for the `c-lang-defvar' system.
@@ -209,9 +211,9 @@
 ;; Suppress "might not be defined at runtime" warning.
 ;; This file is only used when compiling other cc files.
 ;; These are defined in cl as aliases to the cl- versions.
-(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t)
-(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t)
-(declare-function cl-macroexpand-all "cl" (form &optional env))
+;(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t)
+;(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t)
+;(declare-function cl-macroexpand-all "cl" (form &optional env))
 
 (eval-and-compile
   ;; Some helper functions used when building the language constants.
@@ -252,14 +254,14 @@
     (unless xlate
       (setq xlate 'identity))
     (c-with-syntax-table (c-lang-const c-mode-syntax-table)
-      (delete-duplicates
-       (mapcan (lambda (opgroup)
+      (cl-delete-duplicates
+       (cl-mapcan (lambda (opgroup)
                 (when (if (symbolp (car opgroup))
                           (when (funcall opgroup-filter (car opgroup))
                             (setq opgroup (cdr opgroup))
                             t)
                         t)
-                  (mapcan (lambda (op)
+                  (cl-mapcan (lambda (op)
                             (when (funcall op-filter op)
                               (let ((res (funcall xlate op)))
                                 (if (listp res) res (list res)))))
@@ -1147,7 +1149,7 @@
 (c-lang-defconst c-all-op-syntax-tokens
   ;; List of all tokens in the punctuation and parenthesis syntax
   ;; classes.
-  t (delete-duplicates (append (c-lang-const c-other-op-syntax-tokens)
+  t (cl-delete-duplicates (append (c-lang-const c-other-op-syntax-tokens)
                               (c-lang-const c-operator-list))
                       :test 'string-equal))
 
@@ -1700,7 +1702,7 @@
 (c-lang-defconst c-type-start-kwds
   ;; All keywords that can start a type (i.e. are either a type prefix
   ;; or a complete type).
-  t (delete-duplicates (append (c-lang-const c-primitive-type-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-primitive-type-kwds)
                               (c-lang-const c-type-prefix-kwds)
                               (c-lang-const c-type-modifier-kwds))
                       :test 'string-equal))
@@ -1943,7 +1945,7 @@
   ;; something is a type or just some sort of macro in front of the
   ;; declaration.  They might be ambiguous with types or type
   ;; prefixes.
-  t (delete-duplicates (append (c-lang-const c-class-decl-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-class-decl-kwds)
                               (c-lang-const c-brace-list-decl-kwds)
                               (c-lang-const c-other-block-decl-kwds)
                               (c-lang-const c-typedef-decl-kwds)
@@ -2136,7 +2138,7 @@
   pike '("array" "function" "int" "mapping" "multiset" "object" "program"))
 
 (c-lang-defconst c-paren-any-kwds
-  t (delete-duplicates (append (c-lang-const c-paren-nontype-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-paren-nontype-kwds)
                               (c-lang-const c-paren-type-kwds))
                       :test 'string-equal))
 
@@ -2162,7 +2164,7 @@
 
 (c-lang-defconst c-<>-sexp-kwds
   ;; All keywords that can be followed by an angle bracket sexp.
-  t (delete-duplicates (append (c-lang-const c-<>-type-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-<>-type-kwds)
                               (c-lang-const c-<>-arglist-kwds))
                       :test 'string-equal))
 
@@ -2222,7 +2224,7 @@
 
 (c-lang-defconst c-block-stmt-kwds
   ;; Union of `c-block-stmt-1-kwds' and `c-block-stmt-2-kwds'.
-  t (delete-duplicates (append (c-lang-const c-block-stmt-1-kwds)
+  t (cl-delete-duplicates (append (c-lang-const c-block-stmt-1-kwds)
                               (c-lang-const c-block-stmt-2-kwds))
                       :test 'string-equal))
 
@@ -2326,7 +2328,7 @@
 (c-lang-defconst c-expr-kwds
   ;; Keywords that can occur anywhere in expressions.  Built from
   ;; `c-primary-expr-kwds' and all keyword operators in `c-operators'.
-  t (delete-duplicates
+  t (cl-delete-duplicates
      (append (c-lang-const c-primary-expr-kwds)
             (c-filter-ops (c-lang-const c-operator-list)
                           t
@@ -2430,7 +2432,7 @@
 
 (c-lang-defconst c-keywords
   ;; All keywords as a list.
-  t (delete-duplicates
+  t (cl-delete-duplicates
      (c-lang-defconst-eval-immediately
       `(append ,@(mapcar (lambda (kwds-lang-const)
                           `(c-lang-const ,kwds-lang-const))
@@ -3193,10 +3195,10 @@
                             ;; `c-lang-const' will expand to the evaluated
                             ;; constant immediately in `cl-macroexpand-all'
                             ;; below.
-                             (mapcan
+                             (cl-mapcan
                               (lambda (init)
                                 `(current-var ',(car init)
-                                  ,(car init) ,(cl-macroexpand-all
+                                  ,(car init) ,(macroexpand-all
                                                 (elt init 1))))
                               ;; Note: The following `append' copies the
                               ;; first argument.  That list is small, so

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2014-06-02 00:18:22 +0000
+++ b/lisp/subr.el      2014-06-15 00:06:30 +0000
@@ -1127,7 +1127,7 @@
   "Return the nominal column and row in POSITION, measured in characters.
 The column and row values are approximations calculated from the x
 and y coordinates in POSITION and the frame's default character width
-and height.
+and default line height, including spacing.
 For a scroll-bar event, the result column is 0, and the row
 corresponds to the vertical position of the click in the scroll bar.
 POSITION should be a list of the form returned by the `event-start'

=== modified file 'lisp/term/xterm.el'
--- a/lisp/term/xterm.el        2014-05-25 08:08:24 +0000
+++ b/lisp/term/xterm.el        2014-06-15 00:06:30 +0000
@@ -605,6 +605,10 @@
           ;; Gnome terminal 3.6.1 reports 1;3406;0
           ;; Gnome terminal 2.32.1 reports 1;2802;0
           (setq version 200))
+        (when (equal (match-string 1 str) "83")
+          ;; OSX's Terminal.app (version 2.3 (309), which returns 83;40003;0)
+          ;; seems to also lack support for some of these (bug#17607).
+          (setq version 240))
         ;; If version is 242 or higher, assume the xterm supports
         ;; reporting the background color (TODO: maybe earlier
         ;; versions do too...)

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-06-13 23:05:00 +0000
+++ b/src/ChangeLog     2014-06-15 00:06:30 +0000
@@ -1,3 +1,13 @@
+2014-06-15  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
+       information if we are in the middle of executing a keyboard macro,
+       since redisplay doesn't update the screen until the macro is
+       finished.  (Bug#17777)
+
+       * alloc.c (cleanup_vector): Don't dereference a font driver
+       pointer if it is NULL.  (Bug#17771)
+
 2014-06-13  Glenn Morris  <address@hidden>
 
        * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)

=== modified file 'src/alloc.c'
--- a/src/alloc.c       2014-06-11 17:54:07 +0000
+++ b/src/alloc.c       2014-06-15 00:06:30 +0000
@@ -2974,9 +2974,16 @@
       && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK)
          == FONT_OBJECT_MAX))
     {
-      /* Attempt to catch subtle bugs like Bug#16140.  */
-      eassert (valid_font_driver (((struct font *) vector)->driver));
-      ((struct font *) vector)->driver->close ((struct font *) vector);
+      struct font_driver *drv = ((struct font *) vector)->driver;
+
+      /* The font driver might sometimes be NULL, e.g. if Emacs was
+        interrupted before it had time to set it up.  */
+      if (drv)
+       {
+         /* Attempt to catch subtle bugs like Bug#16140.  */
+         eassert (valid_font_driver (drv));
+         drv->close ((struct font *) vector);
+       }
     }
 }
 

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-06-11 19:33:14 +0000
+++ b/src/xdisp.c       2014-06-15 00:06:30 +0000
@@ -98,7 +98,9 @@
 
       This function attempts to redisplay a window by reusing parts of
       its existing display.  It finds and reuses the part that was not
-      changed, and redraws the rest.
+      changed, and redraws the rest.  (The "id" part in the function's
+      name stands for "insert/delete", not for "identification" or
+      somesuch.)
 
     . try_window
 
@@ -113,6 +115,19 @@
    optimizations were successful, redisplay calls redisplay_windows,
    which performs a full redisplay of all windows.
 
+   Note that there's one more important optimization up Emacs's
+   sleeve, but it is related to actually redrawing the potentially
+   changed portions of the window/frame, not to reproducing the
+   desired matrices of those potentially changed portions.  Namely,
+   the function update_frame and its subroutines, which you will find
+   in dispnew.c, compare the desired matrices with the current
+   matrices, and only redraw the portions that changed.  So it could
+   happen that the functions in this file for some reason decide that
+   the entire desired matrix needs to be regenerated from scratch, and
+   still only parts of the Emacs display, or even nothing at all, will
+   be actually delivered to the glass, because update_frame has found
+   that the new and the old screen contents are similar or identical.
+
    Desired matrices.
 
    Desired matrices are always built per Emacs window.  The function
@@ -15746,7 +15761,51 @@
    selected_window is redisplayed.
 
    We can return without actually redisplaying the window if fonts has been
-   changed on window's frame.  In that case, redisplay_internal will retry.  */
+   changed on window's frame.  In that case, redisplay_internal will retry.
+
+   As one of the important parts of redisplaying a window, we need to
+   decide whether the previous window-start position (stored in the
+   window's w->start marker position) is still valid, and if it isn't,
+   recompute it.  Some details about that:
+
+    . The previous window-start could be in a continuation line, in
+      which case we need to recompute it when the window width
+      changes.  See compute_window_start_on_continuation_line and its
+      call below.
+
+    . The text that changed since last redisplay could include the
+      previous window-start position.  In that case, we try to salvage
+      what we can from the current glyph matrix by calling
+      try_scrolling, which see.
+
+    . Some Emacs command could force us to use a specific window-start
+      position by setting the window's force_start flag, or gently
+      propose doing that by setting the window's optional_new_start
+      flag.  In these cases, we try using the specified start point if
+      that succeeds (i.e. the window desired matrix is successfully
+      recomputed, and point location is within the window).  In case
+      of optional_new_start, we first check if the specified start
+      position is feasible, i.e. if it will allow point to be
+      displayed in the window.  If using the specified start point
+      fails, e.g., if new fonts are needed to be loaded, we abort the
+      redisplay cycle and leave it up to the next cycle to figure out
+      things.
+
+    . Note that the window's force_start flag is sometimes set by
+      redisplay itself, when it decides that the previous window start
+      point is fine and should be kept.  Search for "goto force_start"
+      below to see the details.  Like the values of window-start
+      specified outside of redisply, these internally deduced values
+      are tested for feasibility, and ignored if found to be
+      unfeasible.
+
+    . Note that the function try_window, used to completely redisplay
+      a window, accepts the window's start point as its argument.
+      This is used several times in the redisplay code to control
+      where the window start will be, according to user options such
+      as scroll-conservatively, and also to ensure the screen line
+      showing point will be fully (as opposed to partially) visible on
+      display.  */
 
 static void
 redisplay_window (Lisp_Object window, bool just_this_one_p)
@@ -15792,6 +15851,8 @@
   eassert (XMARKER (w->start)->buffer == buffer);
   eassert (XMARKER (w->pointm)->buffer == buffer);
 
+  /* We come here again if we need to run window-text-change-functions
+     below.  */
  restart:
   reconsider_clip_changes (w);
   frame_line_height = default_line_pixel_height (w);
@@ -15856,7 +15917,7 @@
        && !current_buffer->prevent_redisplay_optimizations_p
        && !window_outdated (w));
 
-  /* Run the window-bottom-change-functions
+  /* Run the window-text-change-functions
      if it is possible that the text on the screen has changed
      (either due to modification of the text, or any other reason).  */
   if (!current_matrix_up_to_date_p
@@ -20685,6 +20746,7 @@
      recorded in the glyphs, at least as long as the goal is on the
      screen.  */
   if (w->window_end_valid
+      && NILP (Vexecuting_kbd_macro)
       && !windows_or_buffers_changed
       && b
       && !b->clip_changed


reply via email to

[Prev in Thread] Current Thread [Next in Thread]