emacs-diffs
[Top][All Lists]
Advanced

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

master be38405: Merge from origin/emacs-28


From: Stefan Kangas
Subject: master be38405: Merge from origin/emacs-28
Date: Thu, 23 Dec 2021 00:52:31 -0500 (EST)

branch: master
commit be38405b1f5309c14668510ccc7c1306f399de6e
Merge: b1cfdb3 29fffbd
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Merge from origin/emacs-28
    
    29fffbdd87 Revert field-related thingatpt changes
    9bcb732686 * lisp/window.el (quit-restore-window): Select previously ...
    b7d31d6192 Revert "Remove Motif support"
    
    # Conflicts:
    #   etc/NEWS
---
 configure.ac                 |  9 +++++----
 etc/NEWS.28                  |  4 ----
 lisp/thingatpt.el            | 38 ++++++++++++++++----------------------
 lisp/window.el               |  5 ++++-
 test/lisp/thingatpt-tests.el |  8 --------
 5 files changed, 25 insertions(+), 39 deletions(-)

diff --git a/configure.ac b/configure.ac
index d1a433a..9fcc124 100644
--- a/configure.ac
+++ b/configure.ac
@@ -410,18 +410,19 @@ dnl This should be the last --with option, because 
--with-x is
 dnl added later on when we find the file name of X, and it's best to
 dnl keep them together visually.
 AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT],
- [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, 
no)])],
+ [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, 
motif, no)])],
 [        case "${withval}" in
            y | ye | yes )      val=gtk ;;
            n | no )            val=no  ;;
            l | lu | luc | luci | lucid )       val=lucid ;;
            a | at | ath | athe | athen | athena )      val=athena ;;
+           m | mo | mot | moti | motif )       val=motif ;;
            g | gt | gtk  )     val=gtk ;;
            gtk2  )     val=gtk2 ;;
            gtk3  )     val=gtk3 ;;
            * )
 AC_MSG_ERROR(['--with-x-toolkit=$withval' is invalid;
-this option's value should be 'yes', 'no', 'lucid', 'athena', 'gtk',
+this option's value should be 'yes', 'no', 'lucid', 'athena', 'motif', 'gtk',
 'gtk2' or 'gtk3'.  'yes' and 'gtk' are synonyms.
 'athena' and 'lucid' are synonyms.])
            ;;
@@ -462,7 +463,7 @@ OPTION_DEFAULT_ON([harfbuzz],[don't use HarfBuzz for text 
shaping])
 OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support])
 OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping])
 
-OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Xaw3d/GTK toolkit scroll 
bars])
+OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif/Xaw3d/GTK toolkit 
scroll bars])
 OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
 OPTION_DEFAULT_ON([xim],[at runtime, default X11 XIM to off])
 OPTION_DEFAULT_ON([xdbe],[don't use X11 double buffering support])
@@ -2334,7 +2335,7 @@ if test "$window_system" = none && test "X$with_x" != 
"Xno"; then
    then
         AC_MSG_ERROR([You seem to be running X, but no X development libraries
 were found.  You should install the relevant development files for X
-and for the toolkit you want, such as Gtk+.  Also make
+and for the toolkit you want, such as Gtk+ or Motif.  Also make
 sure you have development files for image handling, i.e.
 tiff, gif, jpeg, png and xpm.
 If you are sure you want Emacs compiled without X window support, pass
diff --git a/etc/NEWS.28 b/etc/NEWS.28
index e7d7215..1664ccf 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -78,9 +78,6 @@ shaping, so 'configure' now recommends that combination.
 at build time.
 
 ---
-** Support for building with Motif has been removed.
-
----
 ** The configure option '--without-makeinfo' has been removed.
 This was only ever relevant when building from a repository checkout.
 This now requires makeinfo, which is part of the texinfo package.
@@ -3041,7 +3038,6 @@ checkdoc will now check the format of 'yes-or-no-p'.
 *** New command 'checkdoc-dired'.
 This can be used to run checkdoc on files from a Dired buffer.
 
----
 *** No longer checks for 'A-' modifiers.
 Checkdoc recommends usage of command substitutions ("\\[foo-command]")
 in favor of writing keybindings like 'C-c f'.  It now no longer warns
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 2d1bf20..d9ec66a 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -171,30 +171,24 @@ Possibilities include `symbol', `list', `sexp', `defun',
 When the optional argument NO-PROPERTIES is non-nil,
 strip text properties from the return value.
 
-If the current buffer uses fields (see Info node `(elisp)Fields'),
-this function will narrow to the field before identifying the
-thing at point.
-
 See the file `thingatpt.el' for documentation on how to define
 a symbol as a valid THING."
-  (save-restriction
-    (narrow-to-region (field-beginning) (field-end))
-    (let ((text
-           (cond
-            ((cl-loop for (pthing . function) in thing-at-point-provider-alist
-                      when (eq pthing thing)
-                      for result = (funcall function)
-                      when result
-                      return result))
-            ((get thing 'thing-at-point)
-             (funcall (get thing 'thing-at-point)))
-            (t
-             (let ((bounds (bounds-of-thing-at-point thing)))
-               (when bounds
-                 (buffer-substring (car bounds) (cdr bounds))))))))
-      (when (and text no-properties (sequencep text))
-        (set-text-properties 0 (length text) nil text))
-      text)))
+  (let ((text
+         (cond
+          ((cl-loop for (pthing . function) in thing-at-point-provider-alist
+                    when (eq pthing thing)
+                    for result = (funcall function)
+                    when result
+                    return result))
+          ((get thing 'thing-at-point)
+           (funcall (get thing 'thing-at-point)))
+          (t
+           (let ((bounds (bounds-of-thing-at-point thing)))
+             (when bounds
+               (buffer-substring (car bounds) (cdr bounds))))))))
+    (when (and text no-properties (sequencep text))
+      (set-text-properties 0 (length text) nil text))
+    text))
 
 ;;;###autoload
 (defun bounds-of-thing-at-mouse (event thing)
diff --git a/lisp/window.el b/lisp/window.el
index 0f17bb2..aff99d3 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5151,7 +5151,10 @@ nil means to not handle the buffer in a particular way.  
This
     (cond
      ;; First try to delete dedicated windows that are not side windows.
      ((and dedicated (not (eq dedicated 'side))
-           (window--delete window 'dedicated (eq bury-or-kill 'kill))))
+           (window--delete window 'dedicated (eq bury-or-kill 'kill)))
+      ;; If the previously selected window is still alive, select it.
+      (when (window-live-p (nth 2 quit-restore))
+        (select-window (nth 2 quit-restore))))
      ((and (not prev-buffer)
           (eq (nth 1 quit-restore) 'tab)
           (eq (nth 3 quit-restore) buffer))
diff --git a/test/lisp/thingatpt-tests.el b/test/lisp/thingatpt-tests.el
index f2031fa..1df1b80 100644
--- a/test/lisp/thingatpt-tests.el
+++ b/test/lisp/thingatpt-tests.el
@@ -215,12 +215,4 @@ position to retrieve THING.")
   (should (equal (test--number "0xf00" 2) 3840))
   (should (equal (test--number "0xf00" 3) 3840)))
 
-(ert-deftest test-fields ()
-  (with-temp-buffer
-    (insert (propertize "foo" 'field 1) "bar" (propertize "zot" 'field 2))
-    (goto-char 1)
-    (should (eq (symbol-at-point) 'foo))
-    (goto-char 5)
-    (should (eq (symbol-at-point) 'bar))))
-
 ;;; thingatpt-tests.el ends here



reply via email to

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