emacs-diffs
[Top][All Lists]
Advanced

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

master 6b63b66 1/3: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 6b63b66 1/3: Merge from origin/emacs-27
Date: Sat, 7 Nov 2020 12:58:09 -0500 (EST)

branch: master
commit 6b63b6669d51331381063781dd28bb02a26d3d04
Merge: 35d9881 53933cd
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Merge from origin/emacs-27
    
    53933cdf5c ; * lisp/international/mule.el (define-coding-system): Doc...
    e90ffcf759 * src/w32fns.c (Fw32_register_hot_key): Doc fix.  (Bug#44456)
    89740e9cb5 Prevent redisplay from moving point behind user's back
    5932df7435 Document that the :match function for a widget takes an ex...
    1b7ab9d0ac Don't render XML declaration of an HTML document (bug#44348)
    
    # Conflicts:
    #   lisp/international/mule.el
---
 doc/misc/widget.texi       | 19 ++++++++++++++++---
 lisp/international/mule.el | 11 +++++++++--
 lisp/net/eww.el            |  2 +-
 src/bidi.c                 | 12 ++++++++++++
 src/w32fns.c               | 27 +++++++++++++++------------
 5 files changed, 53 insertions(+), 18 deletions(-)

diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi
index 3ce27a1..83a6c4c 100644
--- a/doc/misc/widget.texi
+++ b/doc/misc/widget.texi
@@ -484,9 +484,21 @@ are interpreted in a widget specific way.
 The following keyword arguments apply to all widgets:
 
 @table @code
+@cindex internal format
+@cindex external format
 @vindex value@r{ keyword}
 @item :value
-The initial value for widgets of this type.
+The initial value for widgets of this type.  Typically, a widget
+represents its value in two formats: external and internal.  The
+external format is the value as the rest of Emacs sees it, and the
+internal format is a representation that the widget defines and uses
+in a widget specific way.
+
+Both formats might be the same for certain widgets and might differ
+for others, and there is no guarantee about which format the value
+stored in the @code{:value} property has.  However, when creating a
+widget or defining a new one (@pxref{Defining New Widgets}), the
+@code{:value} should be in the external format.
 
 @vindex format@r{ keyword}
 @item :format
@@ -629,8 +641,9 @@ representation of the @code{:value} property if not.
 
 @vindex match@r{ keyword}
 @item :match
-Should be a function called with two arguments, the widget and a value,
-and returning non-@code{nil} if the widget can represent the specified value.
+Should be a function called with two arguments, the widget and an
+external value, and should return non-@code{nil} if the widget can
+represent the specified value.
 
 @vindex validate@r{ keyword}
 @item :validate
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index ad9c3a2..212e723 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -857,16 +857,23 @@ as an encoding result.
 
 `:inhibit-null-byte-detection'
 
-VALUE non-nil means Emacs ignore null bytes on code detection.
+VALUE non-nil means Emacs should ignore null bytes on code detection.
 See the variable `inhibit-null-byte-detection'.  This attribute
 is meaningful only when `:coding-type' is `undecided'.
+If VALUE is t, Emacs will ignore null bytes unconditionally while
+detecting encoding.  If VALUE is non-nil and not t, Emacs will
+ignore null bytes if `inhibit-null-byte-detection' is non-nil.
 
 `:inhibit-iso-escape-detection'
 
-VALUE non-nil means Emacs ignores ISO-2022 escape sequences on
+VALUE non-nil means Emacs should ignore ISO-2022 escape sequences on
 code detection.  See the variable `inhibit-iso-escape-detection'.
 This attribute is meaningful only when `:coding-type' is
 `undecided'.
+If VALUE is t, Emacs will ignore escape sequences unconditionally
+while detecting encoding.  If VALUE is non-nil and not t, Emacs
+will ignore escape sequences if `inhibit-iso-escape-detection' is
+non-nil.
 
 `:prefer-utf-8'
 
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 43405fb..9ed01ec 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -420,7 +420,7 @@ killed after rendering."
       (narrow-to-region start end)
       (goto-char start)
       (let ((case-fold-search t))
-        (while (re-search-forward "<[^0-9a-z!/]" nil t)
+        (while (re-search-forward "<[^0-9a-z!?/]" nil t)
           (goto-char (match-beginning 0))
           (delete-region (point) (1+ (point)))
           (insert "&lt;"))))))
diff --git a/src/bidi.c b/src/bidi.c
index 225b27b..ef062ad 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1460,6 +1460,11 @@ bidi_at_paragraph_end (ptrdiff_t charpos, ptrdiff_t 
bytepos)
   else
     start_re = paragraph_start_re;
 
+  /* Prevent quitting inside re_match_2, as redisplay_window could
+     have temporarily moved point.  */
+  ptrdiff_t count = SPECPDL_INDEX ();
+  specbind (Qinhibit_quit, Qt);
+
   val = fast_looking_at (sep_re, charpos, bytepos, ZV, ZV_BYTE, Qnil);
   if (val < 0)
     {
@@ -1469,6 +1474,7 @@ bidi_at_paragraph_end (ptrdiff_t charpos, ptrdiff_t 
bytepos)
        val = -2;
     }
 
+  unbind_to (count, Qnil);
   return val;
 }
 
@@ -1544,6 +1550,11 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t 
pos_byte)
   if (cache_buffer->base_buffer)
     cache_buffer = cache_buffer->base_buffer;
 
+  /* Prevent quitting inside re_match_2, as redisplay_window could
+     have temporarily moved point.  */
+  ptrdiff_t count = SPECPDL_INDEX ();
+  specbind (Qinhibit_quit, Qt);
+
   while (pos_byte > BEGV_BYTE
         && n++ < MAX_PARAGRAPH_SEARCH
         && fast_looking_at (re, pos, pos_byte, limit, limit_byte, Qnil) < 0)
@@ -1561,6 +1572,7 @@ bidi_find_paragraph_start (ptrdiff_t pos, ptrdiff_t 
pos_byte)
       else
        pos = find_newline_no_quit (pos, pos_byte, -1, &pos_byte);
     }
+  unbind_to (count, Qnil);
   if (n >= MAX_PARAGRAPH_SEARCH)
     pos = BEGV, pos_byte = BEGV_BYTE;
   if (bpc)
diff --git a/src/w32fns.c b/src/w32fns.c
index ef69f40..7bb9689 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -8498,8 +8498,8 @@ DEFUN ("w32-register-hot-key", Fw32_register_hot_key,
        doc: /* Register KEY as a hot-key combination.
 Certain key combinations like Alt-Tab and Win-R are reserved for
 system use on Windows, and therefore are normally intercepted by the
-system.  These key combinations can be received by registering them
-as hot-keys, except for Win-L which always locks the computer.
+system.  These key combinations can be used in Emacs by registering
+them as hot-keys, except for Win-L which always locks the computer.
 
 On Windows 98 and ME, KEY must be a one element key definition in
 vector form that would be acceptable to `define-key' (e.g. [A-tab] for
@@ -8508,16 +8508,19 @@ Alt-Tab).  The meta modifier is interpreted as Alt if
 modifier keys.  The return value is the hotkey-id if registered,
 otherwise nil.
 
-On Windows versions since NT, KEY can also be specified as [M-], [s-] or
-[h-] to indicate that all combinations of that key should be processed
-by Emacs instead of the operating system.  The super and hyper
-modifiers are interpreted according to the current values of
-`w32-lwindow-modifier' and `w32-rwindow-modifier'.  For instance,
-setting `w32-lwindow-modifier' to `super' and then calling
-`(w32-register-hot-key [s-])' grabs all combinations of the left Windows
-key to Emacs, but leaves the right Windows key free for the operating
-system keyboard shortcuts.  The return value is t if the call affected
-any key combinations, otherwise nil.  */)
+On Windows versions since NT, KEY can also be specified as just a
+modifier key, [M-], [s-] or [H-], to indicate that all combinations
+of the respective modifier key should be processed by Emacs instead
+of the operating system.  The super and hyper modifiers are
+interpreted according to the current values of `w32-lwindow-modifier'
+and `w32-rwindow-modifier'.  For instance, setting `w32-lwindow-modifier'
+to `super' and then calling `(w32-register-hot-key [s-])' grabs all
+combinations of the left Windows key to Emacs as keys with the Super
+modifier, but leaves the right Windows key free for the operating
+system keyboard shortcuts.
+
+The return value is t if the call affected any key combinations,
+otherwise nil.  */)
   (Lisp_Object key)
 {
   key = w32_parse_and_hook_hot_key (key, 1);



reply via email to

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