Merge from origin/emacs-28
29fffbdd87
Revert field-related thingatpt changes9bcb732686
* lisp/window.el (quit-restore-window): Select previously ...b7d31d6192
Revert "Remove Motif support" # Conflicts: # etc/NEWS
This commit is contained in:
commit
be38405b1f
5 changed files with 25 additions and 39 deletions
|
@ -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
|
||||
|
|
|
@ -77,9 +77,6 @@ shaping, so 'configure' now recommends that combination.
|
|||
'configure --with-xdbe=no' can now be used to disable double buffering
|
||||
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.
|
||||
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue