mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 16:30:46 -08:00
Merge remote-tracking branch 'origin/master' into feature/package+vc
This commit is contained in:
commit
37bfb623e4
34 changed files with 5396 additions and 138 deletions
|
|
@ -35,18 +35,7 @@
|
|||
## it with the -d option in the repository directory, in case a pull
|
||||
## updates this script while it is working.
|
||||
|
||||
set -o nounset
|
||||
|
||||
die () # write error to stderr and exit
|
||||
{
|
||||
[ $# -gt 0 ] && echo "$PN: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
PN=${0##*/} # basename of script
|
||||
PD=${0%/*}
|
||||
|
||||
[ "$PD" = "$0" ] && PD=. # if PATH includes PWD
|
||||
source "${0%/*}/emacs-shell-lib"
|
||||
|
||||
usage ()
|
||||
{
|
||||
|
|
@ -129,13 +118,7 @@ OPTIND=1
|
|||
[ "$test" ] && build=1
|
||||
|
||||
|
||||
if [ -x "$(command -v mktemp)" ]; then
|
||||
tempfile=$(mktemp "/tmp/$PN.XXXXXXXXXX")
|
||||
else
|
||||
tempfile=/tmp/$PN.$$
|
||||
fi
|
||||
|
||||
trap 'rm -f $tempfile 2> /dev/null' EXIT
|
||||
tempfile="$(emacs_mktemp)"
|
||||
|
||||
|
||||
[ -e Makefile ] && [ "$build" ] && {
|
||||
|
|
@ -263,5 +246,3 @@ git push || die "push error"
|
|||
|
||||
|
||||
exit 0
|
||||
|
||||
### automerge ends here
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
source "${0%/*}/emacs-shell-lib"
|
||||
|
||||
if [ $# != 2 ]; then
|
||||
cat <<EOF
|
||||
|
|
@ -31,9 +32,8 @@ fi
|
|||
old_tar=$1
|
||||
new_tar=$2
|
||||
|
||||
old_tmp=/tmp/old.$$
|
||||
new_tmp=/tmp/new.$$
|
||||
trap "rm -f $old_tmp $new_tmp; exit 1" 1 2 15
|
||||
old_tmp="$(emacs_mktemp ${PN}-old)"
|
||||
new_tmp="$(emacs_mktemp ${PN}-new)"
|
||||
|
||||
tar tf "$old_tar" | sed -e 's,^[^/]*,,' | sort > $old_tmp
|
||||
tar tf "$new_tar" | sed -e 's,^[^/]*,,' | sort > $new_tmp
|
||||
|
|
|
|||
87
admin/emacs-shell-lib
Normal file
87
admin/emacs-shell-lib
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
#!/bin/bash
|
||||
### emacs-shell-lib - shared code for Emacs shell scripts
|
||||
|
||||
## Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
|
||||
## Author: Stefan Kangas <stefankangas@gmail.com>
|
||||
|
||||
## This file is part of GNU Emacs.
|
||||
|
||||
## GNU Emacs is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
|
||||
## GNU Emacs is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
### Code:
|
||||
|
||||
# Set an explicit umask.
|
||||
umask 077
|
||||
|
||||
# Treat unset variables as an error.
|
||||
set -o nounset
|
||||
|
||||
# Exit immediately on error.
|
||||
set -o errexit
|
||||
|
||||
# Avoid non-standard command output from non-C locales.
|
||||
unset LANG LC_ALL LC_MESSAGES
|
||||
|
||||
PN=${0##*/} # basename of script
|
||||
PD=${0%/*} # script directory
|
||||
|
||||
[ "$PD" = "$0" ] && PD=. # if PATH includes PWD
|
||||
|
||||
die () # write error to stderr and exit
|
||||
{
|
||||
[ $# -gt 0 ] && echo "$PN: $@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
emacs_tempfiles=()
|
||||
|
||||
emacs_tempfiles_cleanup ()
|
||||
{
|
||||
for file in ${emacs_tempfiles[@]}; do
|
||||
rm -f "${file}" 2> /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
trap '
|
||||
ret=$?
|
||||
emacs_tempfiles_cleanup
|
||||
exit $ret
|
||||
' EXIT
|
||||
|
||||
emacs_mktemp ()
|
||||
{
|
||||
local readonly file="${1-}"
|
||||
local tempfile
|
||||
local prefix
|
||||
|
||||
if [ -z "$file" ]; then
|
||||
prefix="$PN"
|
||||
else
|
||||
prefix="$1"
|
||||
fi
|
||||
|
||||
if [ -x "$(command -v mktemp)" ]; then
|
||||
tempfile=$(mktemp "${TMPDIR-/tmp}/${prefix}.XXXXXXXXXX")
|
||||
else
|
||||
tempfile="${TMPDIR-/tmp}/${prefix}.$RANDOM$$"
|
||||
(umask 077 && touch "$tempfile")
|
||||
fi
|
||||
|
||||
[ -z "${tempfile}" ] && die "Creating temporary file failed"
|
||||
|
||||
emacs_tempfiles+=("${tempfile}")
|
||||
|
||||
echo "$tempfile"
|
||||
}
|
||||
|
|
@ -33,15 +33,7 @@
|
|||
|
||||
### Code:
|
||||
|
||||
set -o nounset
|
||||
|
||||
die () # write error to stderr and exit
|
||||
{
|
||||
[ $# -gt 0 ] && echo "$PN: $@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
PN=${0##*/} # basename of script
|
||||
source "${0%/*}/emacs-shell-lib"
|
||||
|
||||
usage ()
|
||||
{
|
||||
|
|
@ -96,8 +88,7 @@ OPTIND=1
|
|||
[ -e admin/admin.el ] || die "admin/admin.el not found"
|
||||
|
||||
|
||||
tempfile=/tmp/$PN.$$
|
||||
trap "rm -f $tempfile 2> /dev/null" EXIT
|
||||
tempfile="$(emacs_mktemp)"
|
||||
|
||||
|
||||
[ "$continue" ] || rm -rf $outdir
|
||||
|
|
|
|||
|
|
@ -32,18 +32,7 @@
|
|||
|
||||
### Code:
|
||||
|
||||
set -o nounset
|
||||
|
||||
die () # write error to stderr and exit
|
||||
{
|
||||
[ $# -gt 0 ] && echo "$PN: $@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
PN=${0##*/} # basename of script
|
||||
PD=${0%/*}
|
||||
|
||||
[ "$PD" = "$0" ] && PD=. # if PATH includes PWD
|
||||
source "${0%/*}/emacs-shell-lib"
|
||||
|
||||
## This should be the admin directory.
|
||||
cd $PD || exit
|
||||
|
|
@ -102,10 +91,7 @@ done
|
|||
|
||||
[ "$basegen" ] || die "internal error"
|
||||
|
||||
tempfile=/tmp/$PN.$$
|
||||
|
||||
trap 'rm -f $tempfile 2> /dev/null' EXIT
|
||||
|
||||
tempfile="$(emacs_mktemp)"
|
||||
|
||||
while getopts ":hcfqA:CL" option ; do
|
||||
case $option in
|
||||
|
|
@ -312,5 +298,3 @@ commit "loaddefs" $modified || die "commit error"
|
|||
|
||||
|
||||
exit 0
|
||||
|
||||
### update_autogen ends here
|
||||
|
|
|
|||
|
|
@ -36,15 +36,7 @@
|
|||
|
||||
### Code:
|
||||
|
||||
set -o nounset
|
||||
|
||||
die () # write error to stderr and exit
|
||||
{
|
||||
[ $# -gt 0 ] && echo "$PN: $@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
PN=${0##*/} # basename of script
|
||||
source "${0%/*}/emacs-shell-lib"
|
||||
|
||||
usage ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2094,6 +2094,13 @@ definitions of symbols. (One disadvantage of this kind of backend is
|
|||
that it only knows about subunits that were loaded into the
|
||||
interpreter.)
|
||||
|
||||
@item
|
||||
If Eglot is activated for the current buffer's project
|
||||
(@pxref{Projects}) and the current buffer's major mode, Eglot consults
|
||||
an external language server program and provides the data supplied by
|
||||
the server regarding the definitions of the identifiers in the
|
||||
project. @xref{Eglot Features,,, eglot, Eglot: The Emacs LSP Client}.
|
||||
|
||||
@item
|
||||
An external program can extract references by scanning the relevant
|
||||
files, and build a database of these references. A backend can then
|
||||
|
|
|
|||
|
|
@ -287,6 +287,13 @@ they occur in the buffer; if you want alphabetic sorting, use the
|
|||
symbol @code{imenu--sort-by-name} as the value. You can also
|
||||
define your own comparison function by writing Lisp code.
|
||||
|
||||
If Eglot is activated for the current buffer's project
|
||||
(@pxref{Projects}) and the current buffer's major mode, Eglot provides
|
||||
its own facility for producing the buffer's index based on the
|
||||
analysis of the program source by the language-server which manages
|
||||
the current buffer. @xref{Eglot Features,,, eglot, Eglot: The Emacs
|
||||
LSP Client}.
|
||||
|
||||
Imenu provides the information to guide Which Function mode
|
||||
@ifnottex
|
||||
(@pxref{Which Function}).
|
||||
|
|
@ -1438,6 +1445,13 @@ uses the available support facilities to come up with the completion
|
|||
candidates:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
If Eglot is activated for the current buffer's project
|
||||
(@pxref{Projects}) and the current buffer's major mode, the command
|
||||
tries to use the corresponding language server for producing the list
|
||||
of completion candidates. @xref{Eglot Features,,, eglot, Eglot: The
|
||||
Emacs LSP Client}.
|
||||
|
||||
@item
|
||||
If Semantic mode is enabled (@pxref{Semantic}), the command tries to
|
||||
use the Semantic parser data for completion.
|
||||
|
|
|
|||
|
|
@ -533,6 +533,44 @@ Instead, use the @code{advertised-calling-convention} declaration
|
|||
compiler emit a warning message when it compiles Lisp programs which
|
||||
use the deprecated calling convention.
|
||||
|
||||
@cindex computed documentation string
|
||||
@kindex :documentation
|
||||
Documentation strings are usually static, but occasionally it can be
|
||||
necessary to generate them dynamically. In some cases you can do so
|
||||
by writing a macro which generates at compile time the code of the
|
||||
function, including the desired documentation string. But you can
|
||||
also generate the docstring dynamically by writing
|
||||
@code{(:documentation @var{form})} instead of the documentation
|
||||
string. This will evaluate @var{form} at run-time when the function
|
||||
is defined and use it as the documentation string@footnote{This only
|
||||
works in code using @code{lexical-binding}.}. You can also compute
|
||||
the documentation string on the fly when it is requested, by setting
|
||||
the @code{function-documentation} property of the function's symbol to
|
||||
a Lisp form that evaluates to a string.
|
||||
|
||||
For example:
|
||||
@example
|
||||
@group
|
||||
(defun adder (x)
|
||||
(lambda (y)
|
||||
(:documentation (format "Add %S to the argument Y." x))
|
||||
(+ x y)))
|
||||
(defalias 'adder5 (adder 5))
|
||||
(documentation 'adder5)
|
||||
@result{} "Add 5 to the argument Y."
|
||||
@end group
|
||||
|
||||
@group
|
||||
(put 'adder5 'function-documentation
|
||||
'(concat (documentation (symbol-function 'adder5) 'raw)
|
||||
" Consulted at " (format-time-string "%H:%M:%S")))
|
||||
(documentation 'adder5)
|
||||
@result{} "Add 5 to the argument Y. Consulted at 15:52:13"
|
||||
(documentation 'adder5)
|
||||
@result{} "Add 5 to the argument Y. Consulted at 15:52:18"
|
||||
@end group
|
||||
@end example
|
||||
|
||||
@node Function Names
|
||||
@section Naming a Function
|
||||
@cindex function definition
|
||||
|
|
|
|||
|
|
@ -1851,7 +1851,9 @@ to enable or disable the buffer-local minor mode @var{mode} in all (or
|
|||
some; see below) buffers. It also executes the @var{body} forms. To
|
||||
turn on the minor mode in a buffer, it uses the function
|
||||
@var{turn-on}; to turn off the minor mode, it calls @var{mode} with
|
||||
@minus{}1 as argument.
|
||||
@minus{}1 as argument. (The function @var{turn-on} is a separate
|
||||
function so it could determine whether to enable the minor mode or not
|
||||
when it is not a priori clear that it should always be enabled.)
|
||||
|
||||
Globally enabling the mode also affects buffers subsequently created
|
||||
by visiting files, and buffers that use a major mode other than
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ DOCMISC_W32 = @DOCMISC_W32@
|
|||
|
||||
## Info files to build and install on all platforms.
|
||||
INFO_COMMON = auth autotype bovine calc ccmode cl \
|
||||
dbus dired-x ebrowse ede ediff edt eieio \
|
||||
dbus dired-x ebrowse ede ediff edt eglot eieio \
|
||||
emacs-mime epa erc ert eshell eudc efaq eww \
|
||||
flymake forms gnus emacs-gnutls htmlfontify idlwave ido info.info \
|
||||
mairix-el message mh-e modus-themes newsticker nxml-mode octave-mode \
|
||||
|
|
|
|||
1138
doc/misc/eglot.texi
Normal file
1138
doc/misc/eglot.texi
Normal file
File diff suppressed because it is too large
Load diff
10
etc/NEWS
10
etc/NEWS
|
|
@ -1357,6 +1357,16 @@ The default input method for the Tamil language environment is now
|
|||
change the input method's translation rules, customize the user option
|
||||
'tamil-translation-rules'.
|
||||
|
||||
---
|
||||
*** New tamil99 input method for the Tamil language.
|
||||
This supports the keyboard layout specifically designed for the Tamil
|
||||
language.
|
||||
|
||||
---
|
||||
*** New input method 'slovak-qwerty'.
|
||||
This is a variant of the 'slovak' input method, which corresponds to
|
||||
the QWERTY Slovak keyboards.
|
||||
|
||||
|
||||
* Changes in Specialized Modes and Packages in Emacs 29.1
|
||||
|
||||
|
|
|
|||
11
etc/PROBLEMS
11
etc/PROBLEMS
|
|
@ -1229,6 +1229,17 @@ you should use an Emacs input method instead.
|
|||
|
||||
** X keyboard problems
|
||||
|
||||
*** `x-focus-frame' fails to activate the frame.
|
||||
|
||||
Some window managers prevent `x-focus-frame' from activating the given
|
||||
frame when Emacs is in the background.
|
||||
|
||||
Emacs tries to work around this problem by default, but the workaround
|
||||
does not work on all window managers. You can try different
|
||||
workarounds by changing the value of `x-allow-focus-stealing' (see its
|
||||
doc string for more details). The value `imitate-pager' may be
|
||||
required on some versions of KWin.
|
||||
|
||||
*** You "lose characters" after typing Compose Character key.
|
||||
|
||||
This is because the Compose Character key is defined as the keysym
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ month_data='
|
|||
if type mktemp >/dev/null 2>&1; then
|
||||
logdir=`mktemp -d`
|
||||
else
|
||||
logdir=$TMPDIR/rcs2log$$
|
||||
logdir="${TMPDIR-/tmp}/rcs2log$$"
|
||||
(umask 077 && mkdir "$logdir")
|
||||
fi || exit
|
||||
case $logdir in
|
||||
|
|
|
|||
|
|
@ -3928,6 +3928,7 @@ processes from `comp-async-compilations'"
|
|||
"Start compiling files from `comp-files-queue' asynchronously.
|
||||
When compilation is finished, run `native-comp-async-all-done-hook' and
|
||||
display a message."
|
||||
(cl-assert (null comp-no-spawn))
|
||||
(if (or comp-files-queue
|
||||
(> (comp-async-runnings) 0))
|
||||
(unless (>= (comp-async-runnings) (comp-effective-async-max-jobs))
|
||||
|
|
@ -4048,7 +4049,7 @@ the deferred compilation mechanism."
|
|||
(stringp function-or-file))
|
||||
(signal 'native-compiler-error
|
||||
(list "Not a function symbol or file" function-or-file)))
|
||||
(unless comp-no-spawn
|
||||
(when (or (null comp-no-spawn) comp-async-compilation)
|
||||
(catch 'no-native-compile
|
||||
(let* ((print-symbols-bare t)
|
||||
(data function-or-file)
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ list."
|
|||
;; runs while point is in the minibuffer and the users attempt
|
||||
;; to use completion. Don't ask me.
|
||||
(condition-case nil
|
||||
(sit-for 0 0)
|
||||
(sit-for 0)
|
||||
(error nil)))
|
||||
|
||||
(defun eshell-read-passwd-file (file)
|
||||
|
|
|
|||
|
|
@ -1051,6 +1051,7 @@ Return nil if there is nothing appropriate in the buffer near point."
|
|||
("eieio" "Function Index")
|
||||
("gnutls" "(emacs-gnutls)Variable Index" "(emacs-gnutls)Function Index")
|
||||
("mm" "(emacs-mime)Index")
|
||||
("eglot" "Index")
|
||||
("epa" "Variable Index" "Function Index")
|
||||
("ert" "Index")
|
||||
("eshell" "Function and Variable Index")
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'pcase)
|
||||
(require 'seq)
|
||||
(require 'quail)
|
||||
(require 'ind-util)
|
||||
|
||||
|
|
@ -699,6 +701,165 @@ is."
|
|||
"tamil-inscript-digits" "Tamil" "TmlISD"
|
||||
"Tamil keyboard Inscript with Tamil digits support.")
|
||||
|
||||
;; Tamil99 input method
|
||||
;;
|
||||
;; Tamil99 is a keyboard layout and input method that is specifically
|
||||
;; designed for the Tamil language. Vowels and vowel modifiers are
|
||||
;; input with your left hand, and consonants are input with your right
|
||||
;; hand. See https://en.wikipedia.org/wiki/Tamil_99
|
||||
;;
|
||||
;; தமிழ்99 உள்ளீட்டு முறை
|
||||
;;
|
||||
;; தமிழ்99 தமிழுக்கென்றே உருவாக்கப்பட்ட விசைப்பலகை அமைப்பும் உள்ளீட்டு முறையும்
|
||||
;; ஆகும். உயிர்களை இடக்கையுடனும் மெய்களை வலக்கையுடனும் தட்டச்சிடும்படி
|
||||
;; அமைக்கப்பட்டது. https://ta.wikipedia.org/wiki/%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D_99
|
||||
;; காண்க.
|
||||
|
||||
(quail-define-package
|
||||
"tamil99" "Tamil" "தமிழ்99"
|
||||
t "Tamil99 input method"
|
||||
nil t t t t nil nil nil nil nil t)
|
||||
|
||||
(defconst tamil99-vowels
|
||||
'(("q" "ஆ")
|
||||
("w" "ஈ")
|
||||
("e" "ஊ")
|
||||
("r" "ஐ")
|
||||
("t" "ஏ")
|
||||
("a" "அ")
|
||||
("s" "இ")
|
||||
("d" "உ")
|
||||
("g" "எ")
|
||||
("z" "ஔ")
|
||||
("x" "ஓ")
|
||||
("c" "ஒ"))
|
||||
"Mapping for vowels.")
|
||||
|
||||
(defconst tamil99-vowel-modifiers
|
||||
'(("q" "ா")
|
||||
("w" "ீ")
|
||||
("e" "ூ")
|
||||
("r" "ை")
|
||||
("t" "ே")
|
||||
("a" "")
|
||||
("s" "ி")
|
||||
("d" "ு")
|
||||
("g" "ெ")
|
||||
("z" "ௌ")
|
||||
("x" "ோ")
|
||||
("c" "ொ")
|
||||
("f" "்"))
|
||||
"Mapping for vowel modifiers.")
|
||||
|
||||
(defconst tamil99-hard-consonants
|
||||
'(("h" "க")
|
||||
("[" "ச")
|
||||
("o" "ட")
|
||||
("l" "த")
|
||||
("j" "ப")
|
||||
("u" "ற"))
|
||||
"Mapping for hard consonants (வல்லினம்).")
|
||||
|
||||
(defconst tamil99-soft-consonants
|
||||
'(("b" "ங")
|
||||
("]" "ஞ")
|
||||
("p" "ண")
|
||||
(";" "ந")
|
||||
("k" "ம")
|
||||
("i" "ன"))
|
||||
"Mapping for soft consonants (மெல்லினம்).")
|
||||
|
||||
(defconst tamil99-medium-consonants
|
||||
'(("'" "ய")
|
||||
("m" "ர")
|
||||
("n" "ல")
|
||||
("v" "வ")
|
||||
("/" "ழ")
|
||||
("y" "ள"))
|
||||
"Mapping for medium consonants (இடையினம்).")
|
||||
|
||||
(defconst tamil99-grantham-consonants
|
||||
'(("Q" "ஸ")
|
||||
("W" "ஷ")
|
||||
("E" "ஜ")
|
||||
("R" "ஹ"))
|
||||
"Mapping for grantham consonants (கிரந்தம்).")
|
||||
|
||||
(defconst tamil99-consonants
|
||||
(append tamil99-hard-consonants
|
||||
tamil99-soft-consonants
|
||||
tamil99-medium-consonants
|
||||
tamil99-grantham-consonants)
|
||||
"Mapping for all consonants.")
|
||||
|
||||
(defconst tamil99-other
|
||||
`(("T" ,(vector "க்ஷ"))
|
||||
("Y" ,(vector "ஶஂரீ"))
|
||||
("O" "[")
|
||||
("P" "]")
|
||||
("A" "௹")
|
||||
("S" "௺")
|
||||
("D" "௸")
|
||||
("F" "ஃ")
|
||||
("K" "\"")
|
||||
("L" ":")
|
||||
(":" ";")
|
||||
("\"" "'")
|
||||
("Z" "௳")
|
||||
("X" "௴")
|
||||
("C" "௵")
|
||||
("V" "௶")
|
||||
("B" "௷")
|
||||
("M" "/"))
|
||||
"Mapping for miscellaneous characters.")
|
||||
|
||||
;; உயிர்
|
||||
;; vowel
|
||||
(mapc (pcase-lambda (`(,vowel-key ,vowel))
|
||||
(quail-defrule vowel-key vowel))
|
||||
tamil99-vowels)
|
||||
|
||||
(mapc (pcase-lambda (`(,consonant-key ,consonant))
|
||||
;; அகர உயிர்மெய்
|
||||
;; consonant symbol (consonant combined with the first vowel அ)
|
||||
(quail-defrule consonant-key consonant)
|
||||
;; மெய்யொற்று பின் அகர உயிர்மெய்
|
||||
;; pulli on double consonant
|
||||
(quail-defrule (concat consonant-key consonant-key)
|
||||
(vector (concat consonant "்" consonant)))
|
||||
(mapc (pcase-lambda (`(,vowel-key ,vowel-modifier))
|
||||
;; உயிர்மெய்
|
||||
;; vowelised consonant
|
||||
(quail-defrule (concat consonant-key vowel-key)
|
||||
(vector (concat consonant vowel-modifier)))
|
||||
;; மெய்யொற்று பின் பிற உயிர்மெய்
|
||||
;; vowelised consonant after double consonant
|
||||
(quail-defrule (concat consonant-key consonant-key vowel-key)
|
||||
(vector (concat consonant "்" consonant vowel-modifier))))
|
||||
tamil99-vowel-modifiers))
|
||||
tamil99-consonants)
|
||||
|
||||
(seq-mapn (pcase-lambda (`(,soft-consonant-key ,soft-consonant)
|
||||
`(,hard-consonant-key ,hard-consonant))
|
||||
;; மெல்லினம் பின் வல்லினம்
|
||||
;; hard consonant after soft consonant
|
||||
(quail-defrule (concat soft-consonant-key hard-consonant-key)
|
||||
(vector (concat soft-consonant "்" hard-consonant)))
|
||||
(mapc (pcase-lambda (`(,vowel-key ,vowel-modifier))
|
||||
;; மெல்லின ஒற்றொட்டிய வல்லினம் பின் உயிர்மெய்
|
||||
;; vowelised consonant after soft-hard consonant pair
|
||||
(quail-defrule (concat soft-consonant-key hard-consonant-key vowel-key)
|
||||
(vector (concat soft-consonant "்" hard-consonant vowel-modifier))))
|
||||
tamil99-vowel-modifiers))
|
||||
tamil99-soft-consonants
|
||||
tamil99-hard-consonants)
|
||||
|
||||
;; பிற வரியுருக்கள்
|
||||
;; other characters
|
||||
(mapc (pcase-lambda (`(,key ,translation))
|
||||
(quail-defrule key translation))
|
||||
tamil99-other)
|
||||
|
||||
;; Probhat Input Method
|
||||
(quail-define-package
|
||||
"bengali-probhat" "Bengali" "BngPB" t
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
;; Copyright (C) 1998, 2001-2022 Free Software Foundation, Inc.
|
||||
|
||||
;; Authors: Tibor Šimko <tibor.simko@fmph.uniba.sk>
|
||||
;; Milan Zamazal <pdm@zamazal.org>
|
||||
;; Milan Zamazal <pdm@zamazal.org>
|
||||
;; Rudolf Adamkovič <salutis@me.com>
|
||||
;; Maintainer: Pavel Janík <Pavel@Janik.cz>
|
||||
;; Keywords: i18n, multilingual, input method, Slovak
|
||||
|
||||
|
|
@ -25,8 +26,9 @@
|
|||
;;; Commentary:
|
||||
|
||||
;; This file defines the following Slovak keyboards:
|
||||
;; - standard Slovak keyboard
|
||||
;; - standard Slovak keyboards, QWERTZ and QWERTY variants
|
||||
;; - three Slovak keyboards for programmers
|
||||
;; LocalWords: QWERTZ
|
||||
|
||||
;;; Code:
|
||||
|
||||
|
|
@ -35,7 +37,7 @@
|
|||
|
||||
(quail-define-package
|
||||
"slovak" "Slovak" "SK" t
|
||||
"Standard Slovak keyboard."
|
||||
"Standard Slovak QWERTZ keyboard."
|
||||
nil t nil nil t nil nil nil nil nil t)
|
||||
|
||||
(quail-define-rules
|
||||
|
|
@ -154,6 +156,123 @@
|
|||
("+0" ?\)))
|
||||
|
||||
|
||||
(quail-define-package
|
||||
"slovak-qwerty" "Slovak" "SK" t
|
||||
"Standard Slovak QWERTY keyboard."
|
||||
nil t nil nil t nil nil nil nil nil t)
|
||||
|
||||
(quail-define-rules
|
||||
("1" ?+)
|
||||
("2" ?ľ)
|
||||
("3" ?š)
|
||||
("4" ?č)
|
||||
("5" ?ť)
|
||||
("6" ?ž)
|
||||
("7" ?ý)
|
||||
("8" ?á)
|
||||
("9" ?í)
|
||||
("0" ?é)
|
||||
("!" ?1)
|
||||
("@" ?2)
|
||||
("#" ?3)
|
||||
("$" ?4)
|
||||
("%" ?5)
|
||||
("^" ?6)
|
||||
("&" ?7)
|
||||
("*" ?8)
|
||||
("(" ?9)
|
||||
(")" ?0)
|
||||
("-" ?=)
|
||||
("_" ?%)
|
||||
("=" ?')
|
||||
("[" ?ú)
|
||||
("{" ?/)
|
||||
("]" ?ä)
|
||||
("}" ?\()
|
||||
("\\" ?ň)
|
||||
("|" ?\))
|
||||
(";" ?ô)
|
||||
(":" ?\")
|
||||
("'" ?§)
|
||||
("\"" ?!)
|
||||
("<" ??)
|
||||
(">" ?:)
|
||||
("/" ?-)
|
||||
("?" ?_)
|
||||
("`" ?\;)
|
||||
("~" ?^)
|
||||
("=a" ?á)
|
||||
("+a" ?ä)
|
||||
("+=a" ?ä)
|
||||
("+c" ?č)
|
||||
("+d" ?ď)
|
||||
("=e" ?é)
|
||||
("+e" ?ě)
|
||||
("=i" ?í)
|
||||
("=l" ?ĺ)
|
||||
("+l" ?ľ)
|
||||
("+n" ?ň)
|
||||
("=o" ?ó)
|
||||
("+o" ?ô)
|
||||
("~o" ?ô)
|
||||
("+=o" ?ö)
|
||||
("=r" ?ŕ)
|
||||
("+r" ?ř)
|
||||
("=s" ?ß)
|
||||
("+s" ?š)
|
||||
("+t" ?ť)
|
||||
("=u" ?ú)
|
||||
("+u" ?ů)
|
||||
("+=u" ?ü)
|
||||
("=y" ?ý)
|
||||
("+z" ?ž)
|
||||
("=A" ?Á)
|
||||
("+A" ?Ä)
|
||||
("+=A" ?Ä)
|
||||
("+C" ?Č)
|
||||
("+D" ?Ď)
|
||||
("=E" ?É)
|
||||
("+E" ?Ě)
|
||||
("=I" ?Í)
|
||||
("=L" ?Ĺ)
|
||||
("+L" ?Ľ)
|
||||
("+N" ?Ň)
|
||||
("=O" ?Ó)
|
||||
("+O" ?Ô)
|
||||
("~O" ?Ô)
|
||||
("+=O" ?Ö)
|
||||
("=R" ?Ŕ)
|
||||
("+R" ?Ř)
|
||||
("=S" ?ß)
|
||||
("+S" ?Š)
|
||||
("+T" ?Ť)
|
||||
("=U" ?Ú)
|
||||
("+U" ?Ů)
|
||||
("+=U" ?Ü)
|
||||
("=Y" ?Ý)
|
||||
("+Z" ?Ž)
|
||||
("=q" ?`)
|
||||
("=2" ?@)
|
||||
("=3" ?#)
|
||||
("=4" ?$)
|
||||
("=5" ?%)
|
||||
("=6" ?^)
|
||||
("=7" ?&)
|
||||
("=8" ?*)
|
||||
("=9" ?\()
|
||||
("=0" ?\))
|
||||
("+1" ?!)
|
||||
("+2" ?@)
|
||||
("+3" ?#)
|
||||
("+4" ?$)
|
||||
("+5" ?%)
|
||||
("+6" ?^)
|
||||
("+7" ?&)
|
||||
("+8" ?*)
|
||||
("+9" ?\()
|
||||
("+0" ?\)))
|
||||
|
||||
|
||||
(quail-define-package
|
||||
"slovak-prog-1" "Slovak" "SK" t
|
||||
"Slovak (non-standard) keyboard for programmers #1.
|
||||
|
|
|
|||
|
|
@ -1847,6 +1847,10 @@ mail status in mode line"))
|
|||
:help "Toggle automatic parsing in source code buffers (Semantic mode)"
|
||||
:button (:toggle . (bound-and-true-p semantic-mode))))
|
||||
|
||||
(bindings--define-key menu [eglot]
|
||||
'(menu-item "Language Server Support (Eglot)" eglot
|
||||
:help "Start language server suitable for this buffer's major-mode"))
|
||||
|
||||
(bindings--define-key menu [ede]
|
||||
'(menu-item "Project Support (EDE)"
|
||||
global-ede-mode
|
||||
|
|
|
|||
|
|
@ -715,14 +715,14 @@ an alist of attribute/value pairs."
|
|||
(eq (string-match "/\\(.:.*\\)$" value) 0))
|
||||
(setq value (match-string 1 value)))
|
||||
;; Do not try to open non-existent files
|
||||
(if (equal value "")
|
||||
(setq value " ")
|
||||
(with-current-buffer bufval
|
||||
(if (match-string 3)
|
||||
(with-current-buffer bufval
|
||||
(erase-buffer)
|
||||
(set-buffer-multibyte nil)
|
||||
(insert-file-contents-literally value)
|
||||
(delete-file value)
|
||||
(setq value (buffer-string))))
|
||||
(setq value (buffer-string)))
|
||||
(setq value " "))
|
||||
(setq record (cons (list name value)
|
||||
record))
|
||||
(forward-line 1))
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ run a specific program. The program must be a member of
|
|||
(untabify (point-min) (point-max))
|
||||
(set-window-start (selected-window) (point-min))
|
||||
(set-window-point (selected-window) wp)
|
||||
(sit-for 0 500)
|
||||
(sit-for 0.500)
|
||||
(let ((ct (and f (frame-parameter f 'cursor-type)))
|
||||
(show-trailing-whitespace nil)
|
||||
restore)
|
||||
|
|
@ -249,7 +249,7 @@ run a specific program. The program must be a member of
|
|||
(while (not (input-pending-p))
|
||||
(funcall (elt ops (random (length ops))))
|
||||
(goto-char (point-min))
|
||||
(sit-for 0 10))))
|
||||
(sit-for 0.01))))
|
||||
|
||||
|
||||
;;;; whacking chars
|
||||
|
|
@ -262,7 +262,7 @@ run a specific program. The program must be a member of
|
|||
(aset tbl i (+ 48 (random (- 123 48))))
|
||||
(setq i (1+ i)))
|
||||
(translate-region (point-min) (point-max) tbl)
|
||||
(sit-for 0 2)))))
|
||||
(sit-for 0.002)))))
|
||||
|
||||
(put 'zone-pgm-whack-chars 'wc-tbl
|
||||
(let ((tbl (make-string 128 ?x))
|
||||
|
|
@ -290,7 +290,7 @@ run a specific program. The program must be a member of
|
|||
(delete-char 1)
|
||||
(insert " ")))
|
||||
(forward-char 1))))
|
||||
(sit-for 0 2))))
|
||||
(sit-for 0.002))))
|
||||
|
||||
(defun zone-pgm-dissolve ()
|
||||
(zone-remove-text)
|
||||
|
|
|
|||
|
|
@ -9106,7 +9106,9 @@ multi-line strings (but not C++, for example)."
|
|||
(when (save-excursion
|
||||
(goto-char post-prefix-pos)
|
||||
(looking-at c-self-contained-typename-key))
|
||||
(c-add-type pos (point)))
|
||||
(c-add-type pos (save-excursion
|
||||
(c-backward-syntactic-ws)
|
||||
(point))))
|
||||
(when (and c-record-type-identifiers
|
||||
c-last-identifier-range)
|
||||
(c-record-type-id c-last-identifier-range)))
|
||||
|
|
@ -9191,7 +9193,10 @@ multi-line strings (but not C++, for example)."
|
|||
(goto-char id-end)
|
||||
(if (or res c-promote-possible-types)
|
||||
(progn
|
||||
(c-add-type id-start id-end)
|
||||
(c-add-type id-start (save-excursion
|
||||
(goto-char id-end)
|
||||
(c-backward-syntactic-ws)
|
||||
(point)))
|
||||
(when (and c-record-type-identifiers id-range)
|
||||
(c-record-type-id id-range))
|
||||
(unless res
|
||||
|
|
@ -10762,8 +10767,16 @@ This function might do hidden buffer changes."
|
|||
(setq backup-if-not-cast t)
|
||||
(throw 'at-decl-or-cast t)))
|
||||
|
||||
(setq backup-if-not-cast t)
|
||||
(throw 'at-decl-or-cast t)))
|
||||
;; If we're in declaration or template delimiters, or one
|
||||
;; of a certain set of characters follows, we've got a
|
||||
;; type and variable.
|
||||
(if (or (memq context '(decl <>))
|
||||
(memq (char-after) '(?\; ?, ?= ?\( ?{ ?:)))
|
||||
(progn
|
||||
(setq backup-if-not-cast t)
|
||||
(throw 'at-decl-or-cast t))
|
||||
;; We're probably just typing a statement.
|
||||
(throw 'at-decl-or-cast nil))))
|
||||
|
||||
;; CASE 4
|
||||
(when (and got-suffix
|
||||
|
|
@ -10879,8 +10892,13 @@ This function might do hidden buffer changes."
|
|||
|
||||
;; CASE 10
|
||||
(when at-decl-or-cast
|
||||
;; By now we've located the type in the declaration that we know
|
||||
;; we're in.
|
||||
;; By now we've located the type in the declaration that we think
|
||||
;; we're in. Do we have enough evidence to promote the putative
|
||||
;; type to a found type? The user may be halfway through typing
|
||||
;; a statement beginning with an identifier.
|
||||
(when (and (eq at-type 'maybe)
|
||||
(not (eq context 'top)))
|
||||
(setq c-record-type-identifiers nil))
|
||||
(throw 'at-decl-or-cast t))
|
||||
|
||||
;; CASE 11
|
||||
|
|
@ -11123,7 +11141,10 @@ This function might do hidden buffer changes."
|
|||
(not (c-on-identifier)))))))))
|
||||
|
||||
;; Handle the cast.
|
||||
(when (and c-record-type-identifiers at-type (not (eq at-type t)))
|
||||
(when (and c-record-type-identifiers
|
||||
at-type
|
||||
(not (memq at-type '(t maybe)))) ; 'maybe isn't strong enough
|
||||
; evidence to promote the type.
|
||||
(let ((c-promote-possible-types t))
|
||||
(goto-char type-start)
|
||||
(c-forward-type)))
|
||||
|
|
|
|||
|
|
@ -1197,8 +1197,21 @@ casts and declarations are fontified. Used on level 2 and higher."
|
|||
;; arguments lists (i.e. lists enclosed by <...>) is more strict about what
|
||||
;; characters it allows within the list.
|
||||
(let ((type (and (> match-pos (point-min))
|
||||
(c-get-char-property (1- match-pos) 'c-type))))
|
||||
(cond ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?< ?{)))
|
||||
(c-get-char-property (1- match-pos) 'c-type)))
|
||||
id-pos)
|
||||
(cond
|
||||
;; Are we just after something like "(foo((bar))" ?
|
||||
((and (eq (char-before match-pos) ?\))
|
||||
(c-go-list-backward match-pos)
|
||||
(progn
|
||||
(c-backward-syntactic-ws)
|
||||
(and (setq id-pos (c-on-identifier))
|
||||
(goto-char id-pos)
|
||||
(progn
|
||||
(c-backward-syntactic-ws)
|
||||
(eq (char-before) ?\()))))
|
||||
(c-get-fontification-context (point) not-front-decl toplev))
|
||||
((not (memq (char-before match-pos) '(?\( ?, ?\[ ?< ?{)))
|
||||
(cons (and toplev 'top) nil))
|
||||
;; A control flow expression or a decltype
|
||||
((and (eq (char-before match-pos) ?\()
|
||||
|
|
|
|||
|
|
@ -2080,13 +2080,14 @@ with // and /*, not more generic line and block comments."
|
|||
(defun c-update-new-id (end)
|
||||
;; Note the bounds of any identifier that END is in or just after, in
|
||||
;; `c-new-id-start' and `c-new-id-end'. Otherwise set these variables to
|
||||
;; nil.
|
||||
;; nil. Set `c-new-id-is-type' unconditionally to nil.
|
||||
(save-excursion
|
||||
(goto-char end)
|
||||
(let ((id-beg (c-on-identifier)))
|
||||
(setq c-new-id-start id-beg
|
||||
c-new-id-end (and id-beg
|
||||
(progn (c-end-of-current-token) (point)))))))
|
||||
(progn (c-end-of-current-token) (point)))
|
||||
c-new-id-is-type nil))))
|
||||
|
||||
(defun c-post-command ()
|
||||
;; If point was inside of a new identifier and no longer is, record that
|
||||
|
|
|
|||
3461
lisp/progmodes/eglot.el
Normal file
3461
lisp/progmodes/eglot.el
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -65,39 +65,36 @@
|
|||
"Column for aligning the end of a comment, in Modula-2."
|
||||
:type 'integer)
|
||||
|
||||
;;; Added by TEP
|
||||
(defvar m2-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
;; FIXME: Many of those bindings are contrary to coding conventions.
|
||||
(define-key map "\C-cb" #'m2-begin)
|
||||
(define-key map "\C-cc" #'m2-case)
|
||||
(define-key map "\C-cd" #'m2-definition)
|
||||
(define-key map "\C-ce" #'m2-else)
|
||||
(define-key map "\C-cf" #'m2-for)
|
||||
(define-key map "\C-ch" #'m2-header)
|
||||
(define-key map "\C-ci" #'m2-if)
|
||||
(define-key map "\C-cm" #'m2-module)
|
||||
(define-key map "\C-cl" #'m2-loop)
|
||||
(define-key map "\C-co" #'m2-or)
|
||||
(define-key map "\C-cp" #'m2-procedure)
|
||||
(define-key map "\C-c\C-w" #'m2-with)
|
||||
(define-key map "\C-cr" #'m2-record)
|
||||
(define-key map "\C-cs" #'m2-stdio)
|
||||
(define-key map "\C-ct" #'m2-type)
|
||||
(define-key map "\C-cu" #'m2-until)
|
||||
(define-key map "\C-cv" #'m2-var)
|
||||
(define-key map "\C-cw" #'m2-while)
|
||||
(define-key map "\C-cx" #'m2-export)
|
||||
(define-key map "\C-cy" #'m2-import)
|
||||
(define-key map "\C-c{" #'m2-begin-comment)
|
||||
(define-key map "\C-c}" #'m2-end-comment)
|
||||
(define-key map "\C-c\C-z" #'suspend-emacs)
|
||||
(define-key map "\C-c\C-v" #'m2-visit)
|
||||
(define-key map "\C-c\C-t" #'m2-toggle)
|
||||
(define-key map "\C-c\C-l" #'m2-link)
|
||||
(define-key map "\C-c\C-c" #'m2-compile)
|
||||
map)
|
||||
"Keymap used in Modula-2 mode.")
|
||||
(defvar-keymap m2-mode-map
|
||||
:doc "Keymap used in Modula-2 mode."
|
||||
;; FIXME: Many of those bindings are contrary to coding conventions.
|
||||
"C-c b" #'m2-begin
|
||||
"C-c c" #'m2-case
|
||||
"C-c d" #'m2-definition
|
||||
"C-c e" #'m2-else
|
||||
"C-c f" #'m2-for
|
||||
"C-c h" #'m2-header
|
||||
"C-c i" #'m2-if
|
||||
"C-c m" #'m2-module
|
||||
"C-c l" #'m2-loop
|
||||
"C-c o" #'m2-or
|
||||
"C-c p" #'m2-procedure
|
||||
"C-c C-w" #'m2-with
|
||||
"C-c r" #'m2-record
|
||||
"C-c s" #'m2-stdio
|
||||
"C-c t" #'m2-type
|
||||
"C-c u" #'m2-until
|
||||
"C-c v" #'m2-var
|
||||
"C-c w" #'m2-while
|
||||
"C-c x" #'m2-export
|
||||
"C-c y" #'m2-import
|
||||
"C-c {" #'m2-begin-comment
|
||||
"C-c }" #'m2-end-comment
|
||||
"C-c C-z" #'suspend-emacs
|
||||
"C-c C-v" #'m2-visit
|
||||
"C-c C-t" #'m2-toggle
|
||||
"C-c C-l" #'m2-link
|
||||
"C-c C-c" #'m2-compile)
|
||||
|
||||
(defcustom m2-indent 5
|
||||
"This variable gives the indentation in Modula-2 mode."
|
||||
|
|
|
|||
|
|
@ -215,11 +215,16 @@
|
|||
(eval-and-compile
|
||||
(defconst perl--syntax-exp-intro-keywords
|
||||
'("split" "if" "unless" "until" "while" "print" "printf"
|
||||
"grep" "map" "not" "or" "and" "for" "foreach" "return"))
|
||||
"grep" "map" "not" "or" "and" "for" "foreach" "return" "die"
|
||||
"warn" "eval"))
|
||||
|
||||
(defconst perl--syntax-exp-intro-regexp
|
||||
(concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)"
|
||||
(regexp-opt perl--syntax-exp-intro-keywords)
|
||||
;; A HERE document as an argument to printf?
|
||||
;; when printing to a filehandle.
|
||||
"\\|printf?[ \t]*$?[_[:alpha:]][_[:alnum:]]*"
|
||||
"\\|=>"
|
||||
"\\|[?:.,;|&*=!~({[]"
|
||||
"\\|[^-+][-+]" ;Bug#42168: `+' is intro but `++' isn't!
|
||||
"\\|\\(^\\)\\)[ \t\n]*")))
|
||||
|
|
@ -335,7 +340,7 @@
|
|||
"<<\\(~\\)?[ \t]*\\('[^'\n]*'\\|\"[^\"\n]*\"\\|\\\\[[:alpha:]][[:alnum:]]*\\)"
|
||||
;; The <<EOF case which needs perl--syntax-exp-intro-regexp, to
|
||||
;; disambiguate with the left-bitshift operator.
|
||||
"\\|" perl--syntax-exp-intro-regexp "<<\\(?2:\\sw+\\)\\)"
|
||||
"\\|" perl--syntax-exp-intro-regexp "<<\\(?1:~\\)?\\(?2:\\sw+\\)\\)"
|
||||
".*\\(\n\\)")
|
||||
(4 (let* ((eol (match-beginning 4))
|
||||
(st (get-text-property eol 'syntax-table))
|
||||
|
|
|
|||
|
|
@ -3270,7 +3270,14 @@ An obsolete, but still supported form is
|
|||
where the optional arg MILLISECONDS specifies an additional wait period,
|
||||
in milliseconds; this was useful when Emacs was built without
|
||||
floating point support."
|
||||
(declare (advertised-calling-convention (seconds &optional nodisp) "22.1"))
|
||||
(declare (advertised-calling-convention (seconds &optional nodisp) "22.1")
|
||||
(compiler-macro
|
||||
(lambda (form)
|
||||
(if (not (or (numberp nodisp) obsolete)) form
|
||||
(macroexp-warn-and-return
|
||||
"Obsolete calling convention for 'sit-for'"
|
||||
`(,(car form) (+ ,seconds (/ (or ,nodisp 0) 1000.0)) ,obsolete)
|
||||
'(obsolete sit-for))))))
|
||||
;; This used to be implemented in C until the following discussion:
|
||||
;; https://lists.gnu.org/r/emacs-devel/2006-07/msg00401.html
|
||||
;; Then it was moved here using an implementation based on an idle timer,
|
||||
|
|
|
|||
17
src/window.c
17
src/window.c
|
|
@ -5441,12 +5441,13 @@ window_wants_mode_line (struct window *w)
|
|||
* Return 1 if window W wants a header line and is high enough to
|
||||
* accommodate it, 0 otherwise.
|
||||
*
|
||||
* W wants a header line if it's a leaf window and neither a minibuffer
|
||||
* nor a pseudo window. Moreover, its 'window-mode-line-format'
|
||||
* parameter must not be 'none' and either that parameter or W's
|
||||
* buffer's 'mode-line-format' value must be non-nil. Finally, W must
|
||||
* be higher than its frame's canonical character height and be able to
|
||||
* accommodate a mode line too if necessary (the mode line prevails).
|
||||
* W wants a header line if it's a leaf window and neither a
|
||||
* minibuffer nor a pseudo window. Moreover, its
|
||||
* 'window-header-line-format' parameter must not be 'none' and either
|
||||
* that parameter or W's buffer's 'header-line-format' value must be
|
||||
* non-nil. Finally, W must be higher than its frame's canonical
|
||||
* character height and be able to accommodate a mode line too if
|
||||
* necessary (the mode line prevails).
|
||||
*/
|
||||
bool
|
||||
window_wants_header_line (struct window *w)
|
||||
|
|
@ -5474,9 +5475,9 @@ window_wants_header_line (struct window *w)
|
|||
* accommodate it, 0 otherwise.
|
||||
*
|
||||
* W wants a tab line if it's a leaf window and neither a minibuffer
|
||||
* nor a pseudo window. Moreover, its 'window-mode-line-format'
|
||||
* nor a pseudo window. Moreover, its 'window-tab-line-format'
|
||||
* parameter must not be 'none' and either that parameter or W's
|
||||
* buffer's 'mode-line-format' value must be non-nil. Finally, W must
|
||||
* buffer's 'tab-line-format' value must be non-nil. Finally, W must
|
||||
* be higher than its frame's canonical character height and be able
|
||||
* to accommodate a mode line and a header line too if necessary (the
|
||||
* mode line and a header line prevail).
|
||||
|
|
|
|||
146
src/xterm.c
146
src/xterm.c
|
|
@ -17857,7 +17857,7 @@ x_handle_wm_state (struct frame *f, struct input_event *ie)
|
|||
|
||||
static bool
|
||||
x_handle_selection_monitor_event (struct x_display_info *dpyinfo,
|
||||
XEvent *event)
|
||||
const XEvent *event)
|
||||
{
|
||||
XFixesSelectionNotifyEvent *notify;
|
||||
int i;
|
||||
|
|
@ -17940,7 +17940,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpyinfo->display);
|
||||
#endif
|
||||
int dx, dy;
|
||||
|
||||
/* Avoid warnings when SAFE_ALLOCA is not actually used. */
|
||||
#if defined HAVE_XINPUT2 || defined HAVE_XKB || defined HAVE_X_I18N
|
||||
USE_SAFE_ALLOCA;
|
||||
#endif
|
||||
|
||||
/* This function is not reentrant, so input should be blocked before
|
||||
it is called. */
|
||||
|
|
@ -24220,7 +24224,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
count++;
|
||||
}
|
||||
|
||||
#if defined HAVE_XINPUT2 || defined HAVE_XKB || defined HAVE_X_I18N
|
||||
SAFE_FREE ();
|
||||
#endif
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
@ -25691,6 +25698,14 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
|
|||
|
||||
#ifdef HAVE_X11R6
|
||||
|
||||
/* HAVE_X11R6 means Xlib conforms to the R6 specification or later.
|
||||
HAVE_X11R6_XIM, OTOH, means that Emacs should try to use R6-style
|
||||
callback driven input method initialization. They are separate
|
||||
because Sun apparently ships buggy Xlib with some versions of
|
||||
Solaris... */
|
||||
|
||||
#ifdef HAVE_X11R6_XIM
|
||||
|
||||
/* If preedit text is set on F, cancel preedit, free the text, and
|
||||
generate the appropriate events to cancel the preedit display.
|
||||
|
||||
|
|
@ -25756,6 +25771,8 @@ xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data)
|
|||
unblock_input ();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_X11R6 */
|
||||
|
||||
/* Open the connection to the XIM server on display DPYINFO.
|
||||
|
|
@ -27117,6 +27134,64 @@ xembed_request_focus (struct frame *f)
|
|||
XEMBED_REQUEST_FOCUS, 0, 0, 0);
|
||||
}
|
||||
|
||||
static Bool
|
||||
server_timestamp_predicate (Display *display, XEvent *xevent,
|
||||
XPointer arg)
|
||||
{
|
||||
XID *args = (XID *) arg;
|
||||
|
||||
if (xevent->type == PropertyNotify
|
||||
&& xevent->xproperty.window == args[0]
|
||||
&& xevent->xproperty.atom == args[1])
|
||||
return True;
|
||||
|
||||
return False;
|
||||
}
|
||||
|
||||
/* Get the server time. The X server is guaranteed to deliver the
|
||||
PropertyNotify event, so there is no reason to use x_if_event. */
|
||||
|
||||
static Time
|
||||
x_get_server_time (struct frame *f)
|
||||
{
|
||||
Atom property_atom;
|
||||
XEvent property_dummy;
|
||||
struct x_display_info *dpyinfo;
|
||||
XID client_data[2];
|
||||
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||
uint_fast64_t current_monotonic_time;
|
||||
#endif
|
||||
|
||||
/* If the server time is the same as the monotonic time, avoid a
|
||||
roundtrip by using that instead. */
|
||||
|
||||
#if defined HAVE_XSYNC && !defined USE_GTK && defined HAVE_CLOCK_GETTIME
|
||||
if (FRAME_DISPLAY_INFO (f)->server_time_monotonic_p)
|
||||
{
|
||||
current_monotonic_time = x_sync_current_monotonic_time ();
|
||||
|
||||
if (current_monotonic_time)
|
||||
/* Truncate the time to CARD32. */
|
||||
return (current_monotonic_time / 1000) & X_ULONG_MAX;
|
||||
}
|
||||
#endif
|
||||
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
property_atom = dpyinfo->Xatom_EMACS_SERVER_TIME_PROP;
|
||||
client_data[0] = FRAME_OUTER_WINDOW (f);
|
||||
client_data[1] = property_atom;
|
||||
|
||||
XChangeProperty (dpyinfo->display, FRAME_OUTER_WINDOW (f),
|
||||
property_atom, XA_ATOM, 32,
|
||||
PropModeReplace,
|
||||
(unsigned char *) &property_atom, 1);
|
||||
|
||||
XIfEvent (dpyinfo->display, &property_dummy,
|
||||
server_timestamp_predicate, (XPointer) client_data);
|
||||
|
||||
return property_dummy.xproperty.time;
|
||||
}
|
||||
|
||||
/* Activate frame with Extended Window Manager Hints */
|
||||
|
||||
static void
|
||||
|
|
@ -27124,6 +27199,7 @@ x_ewmh_activate_frame (struct frame *f)
|
|||
{
|
||||
XEvent msg;
|
||||
struct x_display_info *dpyinfo;
|
||||
Time time;
|
||||
|
||||
dpyinfo = FRAME_DISPLAY_INFO (f);
|
||||
|
||||
|
|
@ -27144,6 +27220,43 @@ x_ewmh_activate_frame (struct frame *f)
|
|||
msg.xclient.data.l[3] = 0;
|
||||
msg.xclient.data.l[4] = 0;
|
||||
|
||||
/* No frame is currently focused on that display, so apply any
|
||||
bypass for focus stealing prevention that the user has
|
||||
specified. */
|
||||
if (!dpyinfo->x_focus_frame)
|
||||
{
|
||||
if (EQ (Vx_allow_focus_stealing, Qimitate_pager))
|
||||
msg.xclient.data.l[0] = 2;
|
||||
else if (EQ (Vx_allow_focus_stealing, Qnewer_time))
|
||||
{
|
||||
block_input ();
|
||||
time = x_get_server_time (f);
|
||||
#ifdef USE_GTK
|
||||
x_set_gtk_user_time (f, time);
|
||||
#endif
|
||||
/* Temporarily override dpyinfo->x_focus_frame so the
|
||||
user time property is set on the right window. */
|
||||
dpyinfo->x_focus_frame = f;
|
||||
x_display_set_last_user_time (dpyinfo, time, true, true);
|
||||
dpyinfo->x_focus_frame = NULL;
|
||||
unblock_input ();
|
||||
|
||||
msg.xclient.data.l[1] = time;
|
||||
}
|
||||
else if (EQ (Vx_allow_focus_stealing, Qraise_and_focus))
|
||||
{
|
||||
time = x_get_server_time (f);
|
||||
|
||||
x_ignore_errors_for_next_request (dpyinfo);
|
||||
XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
|
||||
RevertToParent, time);
|
||||
XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
|
||||
x_stop_ignoring_errors (dpyinfo);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
XSendEvent (dpyinfo->display, dpyinfo->root_window,
|
||||
False, (SubstructureRedirectMask
|
||||
| SubstructureNotifyMask), &msg);
|
||||
|
|
@ -30281,7 +30394,7 @@ mark_xterm (void)
|
|||
{
|
||||
Lisp_Object val;
|
||||
#if defined HAVE_XINPUT2 || defined USE_TOOLKIT_SCROLL_BARS \
|
||||
|| defined HAVE_XRANDR || defined USE_GTK
|
||||
|| defined HAVE_XRANDR || defined USE_GTK || defined HAVE_X_I18N
|
||||
struct x_display_info *dpyinfo;
|
||||
#if defined HAVE_XINPUT2 || defined USE_TOOLKIT_SCROLL_BARS
|
||||
int i;
|
||||
|
|
@ -30505,8 +30618,14 @@ x_get_keyboard_modifiers (struct x_display_info *dpyinfo)
|
|||
/* This sometimes happens when the function is called during display
|
||||
initialization, which can happen while obtaining vendor specific
|
||||
keysyms. */
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
if (!dpyinfo->xkb_desc && !dpyinfo->modmap)
|
||||
x_find_modifier_meanings (dpyinfo);
|
||||
#else
|
||||
if (!dpyinfo->modmap)
|
||||
x_find_modifier_meanings (dpyinfo);
|
||||
#endif
|
||||
|
||||
return list5 (make_uint (dpyinfo->hyper_mod_mask),
|
||||
make_uint (dpyinfo->super_mod_mask),
|
||||
|
|
@ -30626,6 +30745,9 @@ With MS Windows, Haiku windowing or Nextstep, the value is t. */);
|
|||
Fput (Qsuper, Qmodifier_value, make_fixnum (super_modifier));
|
||||
DEFSYM (QXdndSelection, "XdndSelection");
|
||||
DEFSYM (Qx_selection_alias_alist, "x-selection-alias-alist");
|
||||
DEFSYM (Qimitate_pager, "imitate-pager");
|
||||
DEFSYM (Qnewer_time, "newer-time");
|
||||
DEFSYM (Qraise_and_focus, "raise-and-focus");
|
||||
|
||||
DEFVAR_LISP ("x-ctrl-keysym", Vx_ctrl_keysym,
|
||||
doc: /* Which keys Emacs uses for the ctrl modifier.
|
||||
|
|
@ -30879,4 +31001,24 @@ connection setup. */);
|
|||
/* The default value of this variable is chosen so that updating the
|
||||
tool bar does not require a call to _XReply. */
|
||||
Vx_fast_selection_list = list1 (QCLIPBOARD);
|
||||
|
||||
DEFVAR_LISP ("x-allow-focus-stealing", Vx_allow_focus_stealing,
|
||||
doc: /* How to bypass window manager focus stealing prevention.
|
||||
|
||||
Some window managers prevent `x-focus-frame' from activating the given
|
||||
frame when Emacs is in the background, which is especially prone to
|
||||
cause problems when the Emacs server wants to activate itself. This
|
||||
variable specifies the strategy used to activate frames when that is
|
||||
the case, and has several valid values (any other value means to not
|
||||
bypass window manager focus stealing prevention):
|
||||
|
||||
- The symbol `imitate-pager', which means to pretend that Emacs is a
|
||||
pager.
|
||||
|
||||
- The symbol `newer-time', which means to fetch the current time
|
||||
from the X server and use it to activate the frame.
|
||||
|
||||
- The symbol `raise-and-focus', which means to raise the window and
|
||||
focus it manually. */);
|
||||
Vx_allow_focus_stealing = Qnewer_time;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,9 +99,12 @@
|
|||
("touch" "touch" fil
|
||||
:init-action (lambda () (setq called t)))))
|
||||
(wallpaper-command (wallpaper--find-command))
|
||||
(wallpaper-command-args (wallpaper--find-command-args)))
|
||||
(wallpaper-command-args (wallpaper--find-command-args))
|
||||
process)
|
||||
(should (functionp (wallpaper-setter-init-action wallpaper--current-setter)))
|
||||
(wallpaper-set fil-jpg)
|
||||
(setq process (wallpaper-set fil-jpg))
|
||||
;; Wait for "touch" process to exit so temp file is removed.
|
||||
(accept-process-output process 3)
|
||||
(should called)))))
|
||||
|
||||
(ert-deftest wallpaper-set/calls-wallpaper-set-function ()
|
||||
|
|
|
|||
|
|
@ -140,4 +140,70 @@ HERE
|
|||
|
||||
. 'indent-level'; # Continuation, should be indented
|
||||
|
||||
=head2 Test case 7
|
||||
|
||||
An indented HERE document using a bare identifier.
|
||||
|
||||
=cut
|
||||
|
||||
## test case
|
||||
|
||||
$text = <<~HERE;
|
||||
look-here
|
||||
HERE
|
||||
|
||||
$noindent = "New statement in this line";
|
||||
|
||||
=head2 Test case 8
|
||||
|
||||
A HERE document as an argument to print when printing to a filehandle.
|
||||
|
||||
=cut
|
||||
|
||||
## test case
|
||||
|
||||
print $fh <<~HERE;
|
||||
look-here
|
||||
HERE
|
||||
|
||||
$noindent = "New statement in this line";
|
||||
|
||||
=head2 Test case 9
|
||||
|
||||
A HERE document as a hash value.
|
||||
|
||||
=cut
|
||||
|
||||
my %foo = (
|
||||
text => <<~HERE
|
||||
look-here
|
||||
HERE
|
||||
);
|
||||
|
||||
$noindent = "New statement in this line";
|
||||
|
||||
=head2 Test case 10
|
||||
|
||||
A HERE document as an argument to die.
|
||||
|
||||
=cut
|
||||
|
||||
1 or die <<HERE;
|
||||
look-here
|
||||
HERE
|
||||
|
||||
$noindent = "New statement in this line";
|
||||
|
||||
=head2 Test case 11
|
||||
|
||||
A HERE document as an argument to warn.
|
||||
|
||||
=cut
|
||||
|
||||
1 or warn <<HERE;
|
||||
look-here
|
||||
HERE
|
||||
|
||||
$noindent = "New statement in this line";
|
||||
|
||||
__END__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue