Commit 3274b809 authored by Glenn Morris's avatar Glenn Morris

Merge from origin/emacs-27

72f87f88 (origin/emacs-27) NS port documentation updates
5b19db98 ; * etc/NEWS: correctly describe what fido-mode is
fc47e3ad Let fido-mode users force a minibuffer-exit
e734961d icomplete-fido-exit: New command for the M-j binding
335a9bd2 minibuffer-force-complete-and-exit: Allow input with no ma...
34132d4b ; * etc/NEWS: Mark 2 entries as fully documented.
d28b7384 ; * etc/NEWS: Fix the 'mml-secure-openpgp-sign-with-sender...
d1d56a9f ; * etc/NEWS: 'thunk-let' and 'thunk-let*' are fully docum...
fc4f4efa ; * etc/NEWS: No need to document vc-hg and mergebase chan...
9e8456cf ; * etc/NEWS: No need to document changes in Octave mode.
25b4d6fa ; * etc/NEWS: No need to document changes in map.el and se...
fc4d0f86 ; * etc/NEWS: No need to document Ido news.
d4ac478c ; * etc/NEWS: No need to document news of doc-view.el.
08c042bd Document that 'byte-compile-dynamic' is obsolete
512b66ab ; * etc/NEWS: No need to document 'goto-address-uri-scheme...
3103c01c ; * etc/NEWS: Formatting fixes.
98306fdf ; * etc/NEWS: No need to document deprecation of 'cl'.
6281ed58 ; * etc/NEWS: No need to document the change in 'list-proc...
e252341e ; * etc/NEWS: 'backup-by-copying-when-privileged-mismatch'...
ec5a267d ; * etc/NEWS: Mark 'byte-count-to-string-function' as undo...
89307ebc ; * etc/NEWS: Mark 'completion-common-part' face entry as ...
fdbe7cac Document the changes in 'read-answer'
10c58356 Document changes in lexical-binding
5cb312b5 Update ERC mailing list address
cb187732 Use regexp-opt to define bibtex-autokey-transcriptions.  (...
3f9c340d Improve documentation of 'table-generate-source'
33b31dc3 Attempt to avoid rare segfaults in show_mouse_face
88c6db91 Avoid crashes when a fontset has strange entries
1814c7e1 Fix rx error with ? and ??
40fb2006 * lisp/emacs-lisp/rx.el (rx--string-to-intervals): Fix err...
08d7d28d Fix args in 'window-text-pixel-size' call in 'fit-window-t...
cb1e3091 Have pulse.el preserve existing overlay priorities

# Conflicts:
#	etc/NEWS
parents c996fe1e 72f87f88
Pipeline #4969 passed with stage
in 52 minutes and 39 seconds
......@@ -143,6 +143,64 @@ The variables for right-hand keys, like @code{ns-right-alternate-modifier},
may also be set to @code{left}, which means to use the same behavior as
the corresponding left-hand key.
@subsection Frame Variables
@table @code
@vindex ns-use-proxy-icon
@item ns-use-proxy-icon
This variable specifies whether to display the proxy icon in the
titlebar.
@vindex ns-confirm-quit
@item ns-confirm-quit
This variable specifies whether to display a graphical confirmation
dialogue on quitting.
@vindex ns-auto-hide-menu-bar
@item ns-auto-hide-menu-bar
This variable specifies whether the macOS menu bar is hidden when an
Emacs frame is selected. If non-nil the menu bar is not shown unless
the mouse pointer is moved near to the top of the screen.
@vindex ns-use-native-fullscreen
@item ns-use-native-fullscreen
This variable controls whether to use native, or non-native
fullscreen. Native fullscreen is only available on macOS 10.7 and
above.
@end table
@subsection macOS Trackpad/Mousewheel Variables
These variables only apply to macOS 10.7 (Lion) and above.
@table @code
@vindex ns-use-mwheel-acceleration
@item ns-use-mwheel-acceleration
This variable controls whether Emacs ignores the system mousewheel
acceleration. When nil each `click' of the mousewheel will correspond
exactly with one mousewheel event. When non-nil, the default, each
`click' may correspond with more than one mousewheel event, depending
on the user's input.
@vindex ns-use-mwheel-momentum
@item ns-use-mwheel-momentum
This variable controls whether Emacs ignores the system `momentum'
when scrolling using a trackpad. When non-nil, the default, scrolling
rapidly may result in the buffer continuing to scroll for a short
while after the user has lifted their fingers off the trackpad.
@vindex ns-mwheel-line-height
@item ns-mwheel-line-height
This variable controls the sensitivity of scrolling with the trackpad.
Apple trackpads scroll by pixels, not lines, so Emacs converts the
system's pixel values into lines. When set to a number, this variable
sets the number of pixels Emacs will consider as one line. When nil
or a non-number the default line height is used.
Setting a lower number makes the trackpad more sensitive, and a higher
number makes the trackpad less sensitive.
@end table
@subsection Font Panel
@findex ns-popup-font-panel
......@@ -153,17 +211,6 @@ recently used or clicked on.
@c To make the setting permanent, use @samp{Save Options} in the
@c Options menu, or run @code{menu-bar-options-save}.
@cindex Core Text, on macOS
@cindex font backend, on macOS
In macOS, Emacs uses a Core Text based font backend
by default. If you prefer the older font style, enter the following
at the command-line before starting Emacs:
@example
% defaults write org.gnu.Emacs FontBackend ns
@end example
@node Mac / GNUstep Events
@section Windowing System Events under macOS / GNUstep
@cindex events on macOS
......
......@@ -302,7 +302,7 @@ function is called, it reads the full definition from the file, to
replace the place-holder.
The advantage of dynamic function loading is that loading the file
becomes much faster. This is a good thing for a file which contains
should become faster. This is a good thing for a file which contains
many separate user-callable functions, if using one of them does not
imply you will probably also use the rest. A specialized mode which
provides many keyboard commands often has that usage pattern: a user may
......@@ -326,6 +326,10 @@ installed Emacs files. But they are quite likely to happen with Lisp
files that you are changing. The easiest way to prevent these problems
is to reload the new compiled file immediately after each recompilation.
@emph{Experience shows that using dynamic function loading provides
benefits that are hardly measurable, so this feature is deprecated
since Emacs 27.1.}
The byte compiler uses the dynamic function loading feature if the
variable @code{byte-compile-dynamic} is non-@code{nil} at compilation
time. Do not set this variable globally, since dynamic loading is
......
......@@ -2236,16 +2236,16 @@ the end of @var{question}. The possible responses are provided in
@noindent
where @var{long-answer} is the complete text of the user response, a
string; @var{short-answer} is a short form of the same response, a
single character; and @var{help-message} is the text that describes
the meaning of the answer. If the variable @code{read-answer-short}
is non-@code{nil}, the prompt will show the short variants of the
possible answers and the user is expected to type the single
characters shown in the prompt; otherwise the prompt will show the
long variants of the answers, and the user is expected to type the
full text of one of the answers and end by pressing @key{RET}. If
@code{use-dialog-box} is non-@code{nil}, and this function was invoked
by mouse events, the question and the answers will be displayed in a
GUI dialog box.
single character or a function key; and @var{help-message} is the text
that describes the meaning of the answer. If the variable
@code{read-answer-short} is non-@code{nil}, the prompt will show the
short variants of the possible answers and the user is expected to
type the single characters/keys shown in the prompt; otherwise the
prompt will show the long variants of the answers, and the user is
expected to type the full text of one of the answers and end by
pressing @key{RET}. If @code{use-dialog-box} is non-@code{nil}, and
this function was invoked by mouse events, the question and the
answers will be displayed in a GUI dialog box.
The function returns the text of the @var{long-answer} selected by the
user, regardless of whether long or short answers were shown in the
......
......@@ -1187,8 +1187,14 @@ When evaluating Emacs Lisp code directly using an @code{eval} call,
lexical binding is enabled if the @var{lexical} argument to
@code{eval} is non-@code{nil}. @xref{Eval}.
Lexical binding is also enabled in Lisp Interaction and IELM
mode, used in the @file{*scratch*} and @file{*ielm*} buffers.
@findex eval-expression@r{, and }lexical-binding
Lexical binding is also enabled in Lisp Interaction and IELM mode,
used in the @file{*scratch*} and @file{*ielm*} buffers, and also when
evaluating expressions via @kbd{M-:} (@code{eval-expression}) and when
processing the @option{--eval} command-line options of Emacs
(@pxref{Action Arguments,,, emacs, The GNU Emacs Manual}) and
@command{emacsclient} (@pxref{emacsclient Options,,, emacs, The GNU
Emacs Manual}).
@cindex special variables
Even when lexical binding is enabled, certain variables will
......
......@@ -347,14 +347,18 @@ The default value is 30000, as the previously hard-coded threshold.
+++
** The function 'read-passwd' uses "*" as default character to hide passwords.
+++
** The function 'read-answer' now accepts not only single character
answers, but also function keys like 'F1', character events such as
'C-M-h', and control characters like 'C-h'.
** Lexical binding is now used when evaluating interactive Elisp forms.
More specifically, 'lexical-binding' is now used for 'M-:', '--eval',
as well as in 'lisp-interaction-mode' and 'ielm-mode', used in the
"*scratch*" and "*ielm*" buffers.
+++
** Lexical binding is now used by default when evaluating interactive Elisp.
More specifically, 'lexical-binding' is now used by default for 'M-:'
and '--eval' (including in evaluations invoked from 'emacsclient' via
its '--eval' command-line option), as well as in
'lisp-interaction-mode' and 'ielm-mode', used in the "*scratch*" and
"*ielm*" buffers.
---
** The new user option 'tooltip-resize-echo-area' avoids truncating
......@@ -489,6 +493,7 @@ matches strings where the pattern appears as a subsequence. Put
simply, makes "foo" complete to both "barfoo" and "frodo". Add 'flex'
to 'completion-styles' or 'completion-category-overrides' to use it.
---
** The 'completion-common-part' face is now visible by default.
+++
......@@ -555,6 +560,7 @@ mode, they are described in the manual "(emacs) Display".
** New user option 'xref-file-name-display' controls the display of
file names in xref buffers.
---
** New user option 'byte-count-to-string-function'.
It is used for displaying file sizes and disk space in some cases.
......@@ -586,6 +592,7 @@ The HIST argument of 'read-from-minibuffer' now works correctly with
buffer-local variables. This means that different buffers can have
their own separated input history list if desired.
+++
** 'backup-by-copying-when-privileged-mismatch' applies to file gid, too.
In addition to checking the file owner uid, Emacs also checks that the
group gid is not greater than 'backup-by-copying-when-privileged-mismatch';
......@@ -739,9 +746,11 @@ non-nil.
what they're named, and the 'battery-linux-sysfs-regexp' variable has
been removed.
---
** The 'list-processes' command now includes port numbers in the
network connection information (in addition to the host name).
---
** The 'cl' package is now officially deprecated in favor of 'cl-lib'.
---
......@@ -750,51 +759,55 @@ network connection information (in addition to the host name).
*** When called interactively with a prefix arg 'C-u', 'desktop-read'
now prompts the user for the directory containing the desktop file.
+++
** display-line-numbers-mode
+++
*** New faces 'line-number-major-tick' and 'line-number-minor-tick',
and user options 'display-line-numbers-major-tick' and
'display-line-numbers-minor-tick' can be used to highlight the line
numbers of lines multiple of certain numbers.
+++
*** New variable 'display-line-numbers-offset', when non-zero, adds
an offset to absolute line numbers.
+++
** winner
+++
*** A new user option, 'winner-boring-buffers-regexp', has been added.
** table
*** 'table-generate-source' and friends now support outputting wiki and
mediawiki format tables.
+++
*** 'table-generate-source' now supports wiki and mediawiki
This command can now output wiki and mediawiki format tables.
---
** telnet-mode
---
*** Reverting a buffer in 'telnet-mode' will restart a closed connection.
** goto-addr
---
*** A way to more conveniently specify what URI address schemes should
be ignored has been added via the 'goto-address-uri-schemes-ignored'
variable.
+++
** tex-mode
+++
*** 'latex-noindent-commands' controls indentation of certain commands.
You can use this new user option to control indentation of arguments of
\emph, \footnote, and similar commands.
** byte compiler
+++
*** 'byte-compile-dynamic' is now obsolete.
This is because on the one hand it suffers from misbehavior in corner
cases that have plagued it for years, and on the other experiments indicated
that it doesn't bring any measurable benefit.
cases that have plagued it for years, and on the other hand experience
indicates that it doesn't bring any measurable benefit.
---
*** The 'g' keystroke in "*Compile-Log*" buffers has been bound to a
......@@ -832,15 +845,19 @@ its functions.
** doc-view.el
---
*** New commands 'doc-view-presentation' and 'doc-view-fit-window-to-page'.
---
*** Added support for password-protected PDF files.
---
*** A new user option 'doc-view-pdftotext-program-args' has been added
to allow controlling how the conversion to text is done.
** Ido
---
*** New user option 'ido-big-directories' to mark directories whose
names match certain regular expressions as big. Ido won't attempt to
list the contents of such directories when completing file names.
......@@ -871,6 +888,7 @@ at the end of the active minibuffer.
*** Some commands that previously used 'read-char-choice' now read
a character using the minibuffer by 'read-char-from-minibuffer'.
---
** map.el
*** Now also understands plists.
......@@ -882,6 +900,7 @@ a character using the minibuffer by 'read-char-from-minibuffer'.
+++
*** The 'type' arg can be a list '(hash-table :key1 VAL1 :key2 VAL2 ...)'.
---
** seq.el
New convenience functions 'seq-first' and 'seq-rest' give easy access
to respectively the first and all but the first elements of sequences.
......@@ -941,6 +960,7 @@ functions 'windmove-coord-add', 'windmove-constrain-to-range',
'windmove-constrain-loc-for-movement', 'windmove-wrap-loc-for-movement',
'windmove-reference-loc' and 'windmove-other-window-loc'.
---
** Octave mode
The mode is automatically enabled in files that start with the
'function' keyword.
......@@ -1103,9 +1123,11 @@ for a revision.
*** 'C-u C-x v D' ('vc-root-version-diff') prompts for two revisions
and compares their entire trees.
---
*** New user option 'vc-hg-revert-switches'.
It specifies switches to pass to Hg's 'revert' command.
---
*** 'C-x v M D' ('vc-diff-mergebase') and 'C-x v M L' ('vc-log-mergebase')
print diffs and logs between the merge base (common ancestor) of two
given revisions.
......@@ -1475,9 +1497,9 @@ strings and report all the spelling mistakes.
+++
*** New minor mode Fido mode.
This mode is based on Icomplete, and its name stands for "Fake Ido".
The point of this mode is to be an 'ido-mode' workalike, but provide
most of the functionality present in Icomplete that is not in
'ido-mode', while being much more compatible with all of Emacs's
The point of this mode is to be an 'ido-mode' workalike, providing
most of the functionality present in 'ido-mode' that is not in
Icomplete, which is much more compatible with all of Emacs's
completion facilities.
** Ecomplete
......@@ -1809,7 +1831,6 @@ keyboard macros.
'isearch-yank-symbol-or-char'. 'isearch-del-char' is now bound to
'C-M-d'.
+++
'M-s h l' invokes 'highlight-lines-matching-regexp' using the search
string to highlight lines matching the search string. This is similar
to the existing binding 'M-s h r' ('highlight-regexp') that highlights
......@@ -1964,6 +1985,7 @@ This is useful for games where lower scores are better, like time-based games.
*** Completing file names in the minibuffer via 'C-TAB' now uses the
styles as configured by the user option 'completion-styles'.
+++
** New macros 'thunk-let' and 'thunk-let*'.
These macros are analogue to 'let' and 'let*', but create bindings that
are evaluated lazily.
......@@ -2187,8 +2209,9 @@ are formatted as MIME digests.
*** 'message-forward-included-headers' has changed its default to
exclude most headers when forwarding.
---
*** 'mml-secure-openpgp-sign-with-sender' sets also "gpg --sender".
When 'mml-secure-openpgp-sign-with-sender' is non-nil message sender's
When 'mml-secure-openpgp-sign-with-sender' is non-nil, message sender's
email address (in addition to its old behavior) will also be used to
set gpg's "--sender email@domain" option.
......@@ -2640,6 +2663,7 @@ overrides all system and Emacs-provided defaults. To get the old
method back, set 'mailcap-prefer-mailcap-viewers' to nil.
** MH-E
+++
*** The hook 'mh-show-mode-hook' is now called before the message is inserted.
Functions that want to affect the message text (for example, to change
......@@ -3084,6 +3108,7 @@ with POSIX.1-2017.
'decoded-time-weekday', 'decoded-time-dst' and 'decoded-time-zone'
accessors can be used.
+++
*** The new functions 'date-days-in-month' (which will say how many
days there are in a month in a specific year), 'date-ordinal-to-time'
(that computes the date of an ordinal day), 'decoded-time-add' (for
......@@ -3143,6 +3168,7 @@ throughput of reading from sub-processes that produces vast
** The new user option 'quit-window-hook' is now run first when
executing the 'quit-window' command.
+++
** The user options 'help-enable-completion-auto-load',
'help-enable-auto-load' and 'vhdl-project-auto-load', as well as the
function 'vhdl-auto-load-project' have been renamed to have "autoload"
......@@ -3623,15 +3649,18 @@ signal 'user-error' if there is no buffer to switch to.
** Battery status is now supported in all Cygwin builds.
Previously it was supported only in the Cygwin-w32 build.
---
** Emacs now handles key combinations involving the macOS "command"
and "option" modifier keys more correctly.
+++
** MacOS modifier key behavior is now more adjustable.
The behavior of the macOS "Option", "Command", "Control" and
"Function" keys can now be specified separately for use with
ordinary keys, function keys and mouse clicks. This allows using them
in their standard macOS way for composing characters.
+++
** The special handling of 'frame-title-format' on NS where setting it
to t would enable the macOS proxy icon has been replaced with a
separate variable, 'ns-use-proxy-icon'. 'frame-title-format' will now
......@@ -3682,6 +3711,7 @@ modifier keys in line with Apples guidelines. This makes the drag and
drop behavior more consistent, as previously the sending application
was able to 'set' modifiers without the knowledge of the user.
---
** On NS multicolor font display is enabled again since it is also
implemented in Emacs on free operating systems via Cairo drawing.
......
......@@ -181,6 +181,7 @@ Optional argument FACE specifies the face to do the highlighting."
(overlay-put o 'original-face (overlay-get o 'face))
;; Make this overlay take priority over the `transient-mark-mode'
;; overlay.
(overlay-put o 'original-priority (overlay-get o 'priority))
(overlay-put o 'priority 1)
(setq pulse-momentary-overlay o)
(if (eq pulse-flag 'never)
......@@ -214,6 +215,7 @@ Optional argument FACE specifies the face to do the highlighting."
(let ((ol pulse-momentary-overlay))
(overlay-put ol 'face (overlay-get ol 'original-face))
(overlay-put ol 'original-face nil)
(overlay-put ol 'priority (overlay-get ol 'original-priority))
;; Clear the overlay if it needs deleting.
(when (overlay-get ol 'pulse-delete) (delete-overlay ol)))
......
......@@ -134,7 +134,7 @@ Each entry is:
(if (cdr def)
(error "Not an `rx' symbol definition: %s" form)
(car def)))))
((consp form)
((and (consp form) (symbolp (car form)))
(let* ((op (car form))
(def (rx--lookup-def op)))
(and def
......@@ -360,7 +360,7 @@ character X becomes (?X . ?X). Return the intervals in a list."
(push (cons start end) intervals))
(t
(error "Invalid rx `any' range: %s"
(substring str i 3))))
(substring str i (+ i 3)))))
(setq i (+ i 3))))
(t
;; Single character.
......
......@@ -75,7 +75,7 @@
(eval-when-compile (require 'subr-x))
(defvar erc-official-location
"https://www.emacswiki.org/emacs/ERC (mailing list: erc-discuss@gnu.org)"
"https://www.emacswiki.org/emacs/ERC (mailing list: emacs-erc@gnu.org)"
"Location of the ERC client on the Internet.")
(defgroup erc nil
......
......@@ -284,6 +284,17 @@ require user confirmation."
(t
(icomplete-force-complete-and-exit)))))
(defun icomplete-fido-exit (force)
"Attempt to exit minibuffer immediately with current input.
Unless FORCE is non-nil (interactively with a prefix argument),
honour a non-nil REQUIRE-MATCH argument to `completing-read' by
trying to complete as much as possible and disallowing the exit
if that doesn't produce a completion match."
(interactive "P")
(if (and (not force) minibuffer--require-match)
(minibuffer-complete-and-exit)
(exit-minibuffer)))
(defun icomplete-fido-backward-updir ()
"Delete char before or go up directory, like `ido-mode'."
(interactive)
......@@ -299,7 +310,7 @@ require user confirmation."
(define-key map (kbd "RET") 'icomplete-fido-ret)
(define-key map (kbd "C-m") 'icomplete-fido-ret)
(define-key map (kbd "DEL") 'icomplete-fido-backward-updir)
(define-key map (kbd "M-j") 'exit-minibuffer)
(define-key map (kbd "M-j") 'icomplete-fido-exit)
(define-key map (kbd "C-s") 'icomplete-forward-completions)
(define-key map (kbd "C-r") 'icomplete-backward-completions)
(define-key map (kbd "<right>") 'icomplete-forward-completions)
......@@ -541,7 +552,7 @@ See `icomplete-mode' and `minibuffer-setup-hook'."
(icomplete--completion-table)
(icomplete--completion-predicate)
(if (window-minibuffer-p)
(not minibuffer-completion-confirm)))))
(eq minibuffer--require-match t)))))
(buffer-undo-list t)
deactivate-mark)
;; Do nothing if while-no-input was aborted.
......
......@@ -1400,7 +1400,11 @@ scroll the window of possible completions."
(minibuffer-prompt-end) (point-max) #'exit-minibuffer
;; If the previous completion completed to an element which fails
;; test-completion, then we shouldn't exit, but that should be rare.
(lambda () (minibuffer-message "Incomplete"))))
(lambda ()
(if minibuffer--require-match
(minibuffer-message "Incomplete")
;; If a match is not required, exit after all.
(exit-minibuffer)))))
(defun minibuffer-force-complete (&optional start end dont-cycle)
"Complete the minibuffer to an exact match.
......@@ -1464,6 +1468,9 @@ DONT-CYCLE tells the function not to setup cycling."
"List of commands which cause an immediately following
`minibuffer-complete-and-exit' to ask for extra confirmation.")
(defvar minibuffer--require-match nil
"Value of REQUIRE-MATCH passed to `completing-read'.")
(defun minibuffer-complete-and-exit ()
"Exit if the minibuffer contains a valid completion.
Otherwise, try to complete the minibuffer contents. If
......@@ -3748,8 +3755,10 @@ See `completing-read' for the meaning of the arguments."
(let* ((minibuffer-completion-table collection)
(minibuffer-completion-predicate predicate)
;; FIXME: Remove/rename this var, see the next one.
(minibuffer-completion-confirm (unless (eq require-match t)
require-match))
(minibuffer--require-match require-match)
(base-keymap (if require-match
minibuffer-local-must-match-map
minibuffer-local-completion-map))
......
......@@ -1006,32 +1006,36 @@ See `bibtex-generate-autokey' for details."
:type 'boolean)
(defvar bibtex-autokey-transcriptions
'(;; language specific characters
("\\\\aa" . "a") ; \aa -> a
("\\\\AA" . "A") ; \AA -> A
("\\\"a\\|\\\\\\\"a\\|\\\\ae" . "ae") ; "a,\"a,\ae -> ae
("\\\"A\\|\\\\\\\"A\\|\\\\AE" . "Ae") ; "A,\"A,\AE -> Ae
("\\\\i" . "i") ; \i -> i
("\\\\j" . "j") ; \j -> j
("\\\\l" . "l") ; \l -> l
("\\\\L" . "L") ; \L -> L
("\\\"o\\|\\\\\\\"o\\|\\\\o\\|\\\\oe" . "oe") ; "o,\"o,\o,\oe -> oe
("\\\"O\\|\\\\\\\"O\\|\\\\O\\|\\\\OE" . "Oe") ; "O,\"O,\O,\OE -> Oe
("\\\"s\\|\\\\\\\"s\\|\\\\3" . "ss") ; "s,\"s,\3 -> ss
("\\\"u\\|\\\\\\\"u" . "ue") ; "u,\"u -> ue
("\\\"U\\|\\\\\\\"U" . "Ue") ; "U,\"U -> Ue
;; accents
("\\\\`\\|\\\\'\\|\\\\\\^\\|\\\\~\\|\\\\=\\|\\\\\\.\\|\\\\u\\|\\\\v\\|\\\\H\\|\\\\t\\|\\\\c\\|\\\\d\\|\\\\b" . "")
;; braces, quotes, concatenation.
("[`'\"{}#]" . "")
("\\\\-" . "") ; \- ->
;; spaces
("\\\\?[ \t\n]+\\|~" . " "))
(nconc
(mapcar (lambda (a) (cons (regexp-opt (car a)) (cdr a)))
'(;; language specific characters
(("\\aa") . "a") ; \aa -> a
(("\\AA") . "A") ; \AA -> A
(("\"a" "\\\"a" "\\ae") . "ae") ; "a,\"a,\ae -> ae
(("\"A" "\\\"A" "\\AE") . "Ae") ; "A,\"A,\AE -> Ae
(("\\i") . "i") ; \i -> i
(("\\j") . "j") ; \j -> j
(("\\l") . "l") ; \l -> l
(("\\L") . "L") ; \L -> L
(("\"o" "\\\"o" "\\o" "\\oe") . "oe") ; "o,\"o,\o,\oe -> oe
(("\"O" "\\\"O" "\\O" "\\OE") . "Oe") ; "O,\"O,\O,\OE -> Oe
(("\"s" "\\\"s" "\\3") . "ss") ; "s,\"s,\3 -> ss
(("\"u" "\\\"u") . "ue") ; "u,\"u -> ue
(("\"U" "\\\"U") . "Ue") ; "U,\"U -> Ue
;; hyphen, accents
(("\\-" "\\`" "\\'" "\\^" "\\~" "\\=" "\\." "\\u" "\\v"
"\\H" "\\t" "\\c" "\\d" "\\b") . "")
;; space
(("~") . " ")))
;; more spaces
'(("[\s\t\n]*\\(?:\\\\\\)?[\s\t\n]+" . " ")
;; braces, quotes, concatenation.
("[`'\"{}#]" . "")))
"Alist of (OLD-REGEXP . NEW-STRING) pairs.
Used by the default values of `bibtex-autokey-name-change-strings' and
Used as default values of `bibtex-autokey-name-change-strings' and
`bibtex-autokey-titleword-change-strings'. Defaults to translating some
language specific characters to their ASCII transcriptions, and
removing any character accents.")
removing any accent characters.")
(defcustom bibtex-autokey-name-change-strings
bibtex-autokey-transcriptions
......
......@@ -2914,16 +2914,17 @@ WHERE is provided the cell and table at that location is reported."
(defun table-generate-source (language &optional dest-buffer caption)
"Generate source of the current table in the specified language.
LANGUAGE is a symbol that specifies the language to describe the
structure of the table. It must be either `html', `latex' or `cals'.
The resulted source text is inserted into DEST-BUFFER and the buffer
object is returned. When DEST-BUFFER is omitted or nil the default
buffer specified in `table-dest-buffer-name' is used. In this case
the content of the default buffer is erased prior to the generation.
When DEST-BUFFER is non-nil it is expected to be either a destination
buffer or a name of the destination buffer. In this case the
generated result is inserted at the current point in the destination
buffer and the previously existing contents in the buffer are
untouched.
structure of the table. It must be either `html', `latex', `cals',
`wiki', or `mediawiki'.
The function inserts the resulting source text into DEST-BUFFER, and
returns the buffer object. When DEST-BUFFER is omitted or nil, the
function uses the default buffer specified in `table-dest-buffer-name'.
In this case, the function erases the default buffer prior to the
source generation.
When DEST-BUFFER is non-nil, it should be either a destination
buffer or a name of the destination buffer. In that case, the
function inserts the generated result at point in the destination
buffer, and leaves the previous contents of the buffer untouched.
References used for this implementation:
......
......@@ -9125,8 +9125,8 @@ accessible position."
;; wider than its frame's pixel width, its height
;; remains unaltered.
(width (+ (car (window-text-pixel-size
window (window-start) (point-max)
(frame-pixel-width)
window (window-start window) nil
(frame-pixel-width (window-frame window))
;; Add one line-height to assure that
;; we're on the safe side. This
;; overshoots when the first line below
......
......@@ -367,8 +367,14 @@ fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Objec
static int
fontset_compare_rfontdef (const void *val1, const void *val2)
{
return (RFONT_DEF_SCORE (*(Lisp_Object *) val1)
- RFONT_DEF_SCORE (*(Lisp_Object *) val2));
Lisp_Object v1 = *(Lisp_Object *) val1, v2 = *(Lisp_Object *) val2;
if (NILP (v1) && NILP (v2))
return 0;
else if (NILP (v1))
return INT_MIN;
else if (NILP (v2))
return INT_MAX;
return (RFONT_DEF_SCORE (v1) - RFONT_DEF_SCORE (v2));
}
/* Update a cons cell which has this form:
......@@ -400,6 +406,8 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
for (i = 0; i < size; i++)
{
Lisp_Object rfont_def = AREF (vec, i);
if (NILP (rfont_def))
continue;
Lisp_Object font_def = RFONT_DEF_FONT_DEF (rfont_def);
Lisp_Object font_spec = FONT_DEF_SPEC (font_def);
int score = RFONT_DEF_SCORE (rfont_def) & 0xFF;
......
......@@ -31441,6 +31441,10 @@ show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw)
struct window *w = XWINDOW (hlinfo->mouse_face_window);
struct frame *f = XFRAME (WINDOW_FRAME (w));
/* Don't bother doing anything if we are on a wrong frame. */
if (f != hlinfo->mouse_face_mouse_frame)
return;
if (/* If window is in the process of being destroyed, don't bother
to do anything. */
w->current_matrix != NULL
......@@ -316,7 +316,9 @@
(should (equal (rx (not (or (in "abc") (char "bcd"))))
"[^a-d]"))
(should (equal (rx (or (not (in "abc")) (not (char "bcd"))))
"[^bc]")))
"[^bc]"))
(should (equal (rx (or "x" (? "yz")))